diff --git a/.claude/launch.json b/.claude/launch.json
index 74c73044d..a4e442b7f 100644
--- a/.claude/launch.json
+++ b/.claude/launch.json
@@ -13,6 +13,12 @@
"runtimeExecutable": "/bin/bash",
"runtimeArgs": ["-c", "export PATH=/Users/blove/.nvm/versions/node/v22.14.0/bin:$PATH && npx nx serve cockpit --port 4201"],
"port": 4201
+ },
+ {
+ "name": "streaming",
+ "runtimeExecutable": "/bin/bash",
+ "runtimeArgs": ["-c", "export PATH=/Users/blove/.nvm/versions/node/v22.14.0/bin:$PATH && npx nx serve cockpit-langgraph-streaming-angular --port 4300"],
+ "port": 4300
}
]
}
diff --git a/.claude/worktrees/blissful-bartik b/.claude/worktrees/blissful-bartik
new file mode 160000
index 000000000..44e21de99
--- /dev/null
+++ b/.claude/worktrees/blissful-bartik
@@ -0,0 +1 @@
+Subproject commit 44e21de992ad8c0b01a35d4d71cb41dfeb92cdb8
diff --git a/.claude/worktrees/optimistic-jang b/.claude/worktrees/optimistic-jang
new file mode 160000
index 000000000..0a6d25bcb
--- /dev/null
+++ b/.claude/worktrees/optimistic-jang
@@ -0,0 +1 @@
+Subproject commit 0a6d25bcb8d03bd2afe4e5bdd50ee660e6ae4df9
diff --git a/.claude/worktrees/website-iteration b/.claude/worktrees/website-iteration
new file mode 160000
index 000000000..510befe14
--- /dev/null
+++ b/.claude/worktrees/website-iteration
@@ -0,0 +1 @@
+Subproject commit 510befe14ac3482c89f883f52821604f143fa5f2
diff --git a/.claude/worktrees/zealous-jones b/.claude/worktrees/zealous-jones
new file mode 160000
index 000000000..413d3fa51
--- /dev/null
+++ b/.claude/worktrees/zealous-jones
@@ -0,0 +1 @@
+Subproject commit 413d3fa51304735e59092675750c26631dab4ee1
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 000000000..1afcf0505
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,79 @@
+# Contributor Agent Guide
+
+This file is for agents working in this repository. It is contributor-facing, not consumer-facing. Keep decisions grounded in the actual repo state, and prefer project-specific instructions over generic agent habits.
+
+## Scope and Precedence
+
+- This guide is for contributors working in the monorepo.
+- Public-facing agent context lives under `apps/website/public/` and exists for package users, docs readers, and external tooling.
+- When instructions conflict, prefer the most local project instruction available.
+- Treat reference docs and copied workflows as inputs, not as truth. Verify against the codebase before acting.
+
+## Operating Principles
+
+- Do not bluff. If something is uncertain, say what is uncertain and verify it from code, docs, or tooling.
+- Do the research yourself when the answer can be found locally or by using current documentation.
+- Explore first, then edit. For non-trivial work, inspect the relevant files and form a plan before changing code.
+- Use applicable workflow guidance before defaulting to generic implementation habits.
+- Keep communication direct, calm, and specific. Avoid performative certainty, unnecessary filler, or aggressive phrasing.
+
+## Planning and Execution
+
+- For simple, localized changes, a brief mental plan is fine.
+- For anything that spans multiple files, affects behavior, or has unclear boundaries, inspect the codebase and write out a plan before editing.
+- Follow existing patterns unless there is a concrete reason to improve them as part of the task.
+- Keep changes scoped to the goal. Do not fold unrelated refactors into the same task unless they are required to make the work coherent.
+- If you discover the current approach is wrong, adjust course explicitly instead of forcing the original plan through.
+
+## Commands and Tooling
+
+- Prefer setting the tool's working directory over shell patterns like `cd path && command`. In Codex, pass `workdir` directly to the command tool.
+- Use the repo's actual package manager and task runner. This repo uses `npm` at the root and `nx` for workspace tasks.
+- Prefer `rg` and `rg --files` for search.
+- Prefer non-interactive commands.
+- Avoid destructive git operations unless explicitly requested.
+- Do not substitute other runners when the repo already defines the right command.
+
+## Repo Layout
+
+- `libs/stream-resource`: main Angular library.
+- `apps/website`: docs and marketing site.
+- `packages/mcp`: MCP server package.
+- `e2e/stream-resource-e2e`: end-to-end coverage for the workspace.
+- `apps/demo` and `apps/demo-e2e`: demo application and related end-to-end coverage.
+
+## Working in This Repo
+
+- The workspace is Nx-based. Prefer project-scoped commands over broad workspace runs unless the task actually needs broader verification.
+- Inspect `project.json`, `nx.json`, and existing scripts before inventing commands.
+- If you need Nx-specific syntax or behavior and it is not obvious from local config, verify it from current Nx docs rather than relying on memory.
+- Respect generated and public-facing context files. If the task changes docs, API surface, positioning, or package guidance, check whether agent context or docs should be regenerated.
+
+## Docs and Generated Context
+
+- Do not commit generated plans, analyses, or reports unless explicitly requested.
+- If docs or public agent guidance changes, check whether `npm run generate-agent-context` should be run.
+- If API docs or narrative docs are affected, check whether `npm run generate-api-docs`, `npm run generate-narrative-docs`, or `npm run generate-docs` should be run.
+- Do not regenerate files blindly. Run the smallest relevant generator for the change.
+
+## Commits and Review
+
+- Do not make mid-task commits. Group related finished work into a logical commit.
+- Do not add co-author metadata unless explicitly requested.
+- Before proposing a commit or claiming the task is done, review the diff and verify the relevant commands were actually run.
+- If you use delegated review or sub-agents, verify their output yourself before repeating their conclusions.
+
+## Verification
+
+- Do not claim work is complete without fresh verification evidence from relevant commands.
+- Verify the smallest relevant surface first, then broaden as needed.
+- Prefer repo-native commands. Typical examples in this repo include `npx nx test
-
-
+
+
-
+
@@ -27,14 +27,14 @@
---
-`agent()` is the Angular equivalent of LangGraph's React `useStream()` hook — a full-parity implementation built on Angular Signals and the Angular Resource API. It gives enterprise Angular teams the same production-grade streaming primitives available to React developers on LangChain, without compromises or workarounds. Drop it into any Angular 20+ component, point it at your LangGraph Platform endpoint, and get reactive, signal-driven access to streaming state, messages, tool calls, interrupts, and thread history.
+`streamResource()` is the Angular equivalent of LangGraph's React `useStream()` hook — a full-parity implementation built on Angular Signals and the Angular Resource API. It gives enterprise Angular teams the same production-grade streaming primitives available to React developers on LangChain, without compromises or workarounds. Drop it into any Angular 20+ component, point it at your LangGraph Platform endpoint, and get reactive, signal-driven access to streaming state, messages, tool calls, interrupts, and thread history.
---
## Install
```bash
-npm install @cacheplane/angular
+npm install @cacheplane/stream-resource
```
**Peer dependencies:** `@angular/core ^20.0.0 || ^21.0.0`, `@langchain/core ^1.1.0`, `@langchain/langgraph-sdk ^1.7.0`, `rxjs ~7.8.0`
@@ -45,7 +45,7 @@ npm install @cacheplane/angular
```typescript
import { Component } from '@angular/core';
-import { agent } from '@cacheplane/angular';
+import { streamResource } from '@cacheplane/stream-resource';
import type { BaseMessage } from '@langchain/core/messages';
@Component({
@@ -65,7 +65,7 @@ import type { BaseMessage } from '@langchain/core/messages';
`,
})
export class ChatComponent {
- chat = agent<{ messages: BaseMessage[] }>({
+ chat = streamResource<{ messages: BaseMessage[] }>({
apiUrl: 'https://your-langgraph-platform.com',
assistantId: 'my-agent',
messagesKey: 'messages',
@@ -83,7 +83,7 @@ That's it. `chat.messages()` is an Angular Signal. Bind it directly in your temp
## Feature Comparison
-| Feature | `agent()` (Angular) | `useStream()` (React) |
+| Feature | `streamResource()` (Angular) | `useStream()` (React) |
|---|---|---|
| Streaming state as reactive primitives | Angular Signals | React state |
| Messages signal | `messages()` | `messages` |
@@ -99,7 +99,7 @@ That's it. `chat.messages()` is an Angular Signal. Bind it directly in your temp
| Submit | `submit(values, opts?)` | `submit(values, opts?)` |
| Stop | `stop()` | `stop()` |
| Reload last submission | `reload()` | — |
-| Custom transport (for testing) | `MockAgentTransport` | mock fetch |
+| Custom transport (for testing) | `MockStreamTransport` | mock fetch |
| Angular `ResourceRef