Bumps [nanoid](https://github.com/ai/nanoid) from 5.1.6 to 5.1.16. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/ai/nanoid/releases">nanoid's releases</a>.</em></p> <blockquote> <h2>5.1.16</h2> <ul> <li>Fixed forever loop on negative size (by <a href="https://github.com/spokodev"><code>@spokodev</code></a>).</li> </ul> <h2>5.1.15</h2> <ul> <li>Fixed random pool corruption on big ID sizes.</li> </ul> <h2>5.1.14</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.13</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.12</h2> <ul> <li>Moved to npm Provenance and Staged Publishing.</li> </ul> <h2>5.1.11</h2> <ul> <li>Fixed breaking Nano ID by requesting big ID.</li> </ul> <h2>5.1.10</h2> <ul> <li>Fixed breaking nanoid by requesting big ID (by <a href="https://github.com/alanzabihi"><code>@alanzabihi</code></a>).</li> </ul> <h2>5.1.9</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.8</h2> <ul> <li>Made <code>cusatomAlphabet</code> 75% faster (by <a href="https://github.com/saripovdenis"><code>@saripovdenis</code></a>).</li> </ul> <h2>5.1.7</h2> <ul> <li>Added <code>--version</code> to CLI (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Updated <code>nanoid.js</code> for CDN (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Fixed <code>customRandom</code> types (by <a href="https://github.com/oguimbal"><code>@oguimbal</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ai/nanoid/blob/main/CHANGELOG.md">nanoid's changelog</a>.</em></p> <blockquote> <h2>5.1.16</h2> <ul> <li>Fixed forever loop on negative size (by <a href="https://github.com/spokodev"><code>@spokodev</code></a>).</li> </ul> <h2>5.1.15</h2> <ul> <li>Fixed random pool corruption on big ID sizes.</li> </ul> <h2>5.1.14</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.13</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.12</h2> <ul> <li>Moved to npm Provenance and Staged Publishing.</li> </ul> <h2>5.1.11</h2> <ul> <li>Fixed breaking Nano ID by requesting big ID.</li> </ul> <h2>5.1.10</h2> <ul> <li>Fixed breaking Nano ID by requesting big ID (by <a href="https://github.com/alanzabihi"><code>@alanzabihi</code></a>).</li> </ul> <h2>5.1.9</h2> <ul> <li>Fixed npm package size regression.</li> </ul> <h2>5.1.8</h2> <ul> <li>Made <code>cusatomAlphabet</code> 75% faster (by <a href="https://github.com/saripovdenis"><code>@saripovdenis</code></a>).</li> </ul> <h2>5.1.7</h2> <ul> <li>Added <code>--version</code> to CLI (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Updated <code>nanoid.js</code> for CDN (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Fixed docs (by <a href="https://github.com/mahmoodhamdi"><code>@mahmoodhamdi</code></a>).</li> <li>Fixed <code>customRandom</code> types (by <a href="https://github.com/oguimbal"><code>@oguimbal</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/ai/nanoid/commit/6ccc67bbaba71d3d77a21d9b636f4171a268ce49"><code>6ccc67b</code></a> Release 5.1.16 version</li> <li><a href="https://github.com/ai/nanoid/commit/6de05d794f62eeac3f527c74c34c6af0c1d32e49"><code>6de05d7</code></a> fix(non-secure): clamp negative size with a smaller guard (<a href="https://redirect.github.com/ai/nanoid/issues/600">#600</a>)</li> <li><a href="https://github.com/ai/nanoid/commit/39259034f7c095cb36a97d6937e77905a659808a"><code>3925903</code></a> Update dependencies</li> <li><a href="https://github.com/ai/nanoid/commit/0b695546fd83beaa943fbcaa90af92895dd0ae55"><code>0b69554</code></a> Release 5.1.15 version</li> <li><a href="https://github.com/ai/nanoid/commit/333c5a030e2ee68ba08c43c5021d8dbf1724cef5"><code>333c5a0</code></a> Backport changelog changes for 3.x</li> <li><a href="https://github.com/ai/nanoid/commit/266eb637236f654a6ec6ef58fd12213e1bafe35b"><code>266eb63</code></a> Remove debug code</li> <li><a href="https://github.com/ai/nanoid/commit/a6a94d3f8dc71513864f2e9ae9c5a4130511b34c"><code>a6a94d3</code></a> Do not allow to pollute pool</li> <li><a href="https://github.com/ai/nanoid/commit/93fe197416c337bb732e2665be2c60968379dc73"><code>93fe197</code></a> Reduce ID size</li> <li><a href="https://github.com/ai/nanoid/commit/e4b7a9a7323006474ec939112aec68944b0da097"><code>e4b7a9a</code></a> Release 5.1.14 version</li> <li><a href="https://github.com/ai/nanoid/commit/6bf3469b5b33137e385e07dc1c84779cf3e38956"><code>6bf3469</code></a> Update release action</li> <li>Additional commits viewable in <a href="https://github.com/ai/nanoid/compare/5.1.6...5.1.16">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~GitHub%20Actions">GitHub Actions</a>, a new releaser for nanoid since your current version.</p> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/langchain-ai/langgraphjs/network/alerts). </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: langsmith-fleet[bot] <langsmith-fleet[bot]@users.noreply.github.com>
@langchain/angular
Angular SDK for building AI-powered applications with Deep Agents, LangChain and LangGraph.
The package ships a Signals-first API built on top of the v2 streaming
protocol. injectStream returns a small, always-on root handle
(values, messages, isLoading, error, …) and pushes anything
namespaced (subagents, subgraphs, media, submission queue, per-message
metadata) behind ref-counted inject* selectors so components
only pay for data they actually consume.
Upgrading from
0.x? Seedocs/v1-migration.mdfor the complete matrix of option, return-shape, and transport changes.
Installation
npm install @langchain/angular @langchain/core
Peer dependencies: @angular/core (^18.0.0 – ^21.0.0),
@langchain/core (^1.1.27).
Quick start
import { Component } from "@angular/core";
import { injectStream } from "@langchain/angular";
@Component({
standalone: true,
template: `
<div>
@for (msg of stream.messages(); track msg.id ?? $index) {
<div>{{ str(msg.content) }}</div>
}
<button
[disabled]="stream.isLoading()"
(click)="onSubmit()"
>
Send
</button>
</div>
`,
})
export class ChatComponent {
readonly stream = injectStream({
assistantId: "agent",
apiUrl: "http://localhost:2024",
});
str(v: unknown) {
return typeof v === "string" ? v : JSON.stringify(v);
}
onSubmit() {
void this.stream.submit({
messages: [{ type: "human", content: "Hello!" }],
});
}
}
injectStream must be called from an Angular injection context —
the host's DestroyRef owns the stream, so navigating away destroys
the controller automatically.
Features at a glance
- Signals everywhere. Messages, values, tool calls, interrupts,
loading/error state — all Angular
Signal<T>s you call as functions in templates. - One call, two transports. Same option bag targets either the
LangGraph Platform (SSE by default,
transport: "websocket"opt-in) or a custom backend through anAgentServerAdapter. - Ref-counted selectors.
injectMessages,injectValues,injectToolCalls, media selectors, submission queue — the first consumer opens a subscription, the last one'sDestroyRefcloses it. Components pay only for what they render. - Human-in-the-loop. Interrupts are first-class signals; resume or fork a specific pending interrupt with one call.
- Headless tools. Register browser-side tool implementations; the runtime dispatches matching interrupts and auto-resumes with the return value.
- Subagent & subgraph discovery. Lightweight snapshots at the root; scoped content (messages, tool calls, state) via the same selectors, targeted at a snapshot or namespace.
- Forking without history preload. Per-message metadata +
submit({ forkFrom })replaces the legacybranch/fetchStateHistorytrio. - DI-native.
provideStreamfor subtree sharing,provideStreamDefaultsfor app-wide config,StreamServicefor class-based wrappers. - Typed end-to-end. Pass
typeof agentas the first generic — state, tool args, and per-subagent state flow through to every selector.
Public stream types
Use StreamApi<T> when you need to name the return type of
injectStream, useStream, provideStream, or StreamService in
Angular code. It is the Angular-facing alias for the Signals-first
handle.
UseStreamResult<T> is also exported as a React-compatible alias for
the same shape. Prefer it only in shared utilities that are designed to
accept stream handles from multiple framework packages.
Documentation
In-depth guides live under docs/:
inject-stream.md— options + return-shape referencetransports.md— SSE, WebSocket, and customAgentServerAdaptercustom-transport.md— implementingAgentServerAdapteragainst your own backend, with a worked walkthrough ofexamples/ui-react-transportselectors.md— scoped reads (injectMessages,injectValues, media, channels, …)interrupts.md— handling and responding to interruptsbranching.md— forking viainjectMessageMetadata+submit({ forkFrom })submission-queue.md—injectSubmissionQueueandmultitaskStrategy: "enqueue"headless-tools.md— browser-side tool implementationssubagents-subgraphs.md— discovery snapshots and scoped contentdependency-injection.md—provideStream,provideStreamDefaults,StreamServicetype-safety.md— generics, agent inference, and public stream aliasestesting.md—STREAM_INSTANCEfakes and service overridesv1-migration.md— migrating from0.x
Playground
For complete end-to-end examples, visit the LangChain UI Playground.
License
MIT