@langchain/angular 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +275 -16
- package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.cjs +9 -0
- package/dist/_virtual/_@oxc-project_runtime@0.115.0/helpers/decorate.js +9 -0
- package/dist/context.cjs +94 -0
- package/dist/context.cjs.map +1 -0
- package/dist/context.d.cts +130 -0
- package/dist/context.d.cts.map +1 -0
- package/dist/context.d.ts +130 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +91 -0
- package/dist/context.js.map +1 -0
- package/dist/index.cjs +212 -386
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +317 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +317 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -390
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/channels/base.d.cts +83 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/channels/base.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/channels/base.d.ts +83 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/channels/base.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/constants.d.cts +42 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/constants.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/constants.d.ts +42 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/constants.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/index.d.cts +2 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/index.d.ts +2 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/meta.d.cts +109 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/meta.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/meta.d.ts +109 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/meta.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/plugin.d.cts +31 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/plugin.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/plugin.d.ts +31 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/plugin.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/zod-registry.d.cts +49 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/zod-registry.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/zod-registry.d.ts +49 -0
- package/dist/node_modules/.pnpm/@langchain_langgraph@1.2.1_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27._db5dc2b7d473236f1e1bf7d3e1a7ed18/node_modules/@langchain/langgraph/dist/graph/zod/zod-registry.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/ReactAgent.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/ReactAgent.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/index.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/index.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/contextEditing.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/contextEditing.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/dynamicSystemPrompt.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/dynamicSystemPrompt.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/hitl.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/hitl.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/llmToolSelector.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/llmToolSelector.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelCallLimit.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelCallLimit.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelFallback.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelFallback.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelRetry.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/modelRetry.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/pii.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/pii.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/piiRedaction.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/piiRedaction.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/provider/anthropic/promptCaching.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/provider/anthropic/promptCaching.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/provider/openai/moderation.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/provider/openai/moderation.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/summarization.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/summarization.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/todoListMiddleware.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/todoListMiddleware.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolCallLimit.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolCallLimit.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolEmulator.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolEmulator.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolRetry.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/toolRetry.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/types.d.cts +2 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware/types.d.ts +2 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware.d.cts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/middleware.d.ts +1 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/types.d.cts +2 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/agents/types.d.ts +2 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/index.d.cts +2 -0
- package/dist/node_modules/.pnpm/langchain@1.2.30_@langchain_core@1.1.31_@opentelemetry_api@1.9.0_openai@6.27.0_ws@8.19._0520fb05d9e85da5f9e061dfe28cdbc8/node_modules/langchain/dist/index.d.ts +2 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.d.cts +155 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.d.ts +155 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/ZodError.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.d.cts +13 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.d.ts +13 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/errorUtil.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.d.cts +63 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.d.ts +63 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/parseUtil.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.d.cts +5 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.d.ts +5 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/typeAliases.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.d.cts +64 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.d.ts +64 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/helpers/util.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/standard-schema.d.cts +106 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/standard-schema.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/standard-schema.d.ts +106 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/standard-schema.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.d.cts +291 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.d.ts +291 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v3/types.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.cts +29 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.ts +29 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.cts +29 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.ts +29 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.cts +105 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.ts +105 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts +70 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.ts +70 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts +24 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.ts +24 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.cts +97 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.ts +97 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.cts +79 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.ts +79 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/standard-schema.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts +52 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.ts +52 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.cts +17 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.ts +17 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.d.ts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.cts +9 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.cts.map +1 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.ts +9 -0
- package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.d.ts.map +1 -0
- package/dist/stream.custom.cjs +54 -137
- package/dist/stream.custom.cjs.map +1 -1
- package/dist/stream.custom.d.cts +45 -0
- package/dist/stream.custom.d.cts.map +1 -0
- package/dist/stream.custom.d.ts +45 -0
- package/dist/stream.custom.d.ts.map +1 -0
- package/dist/stream.custom.js +55 -139
- package/dist/stream.custom.js.map +1 -1
- package/dist/subagent-types.d.cts +15 -0
- package/dist/subagent-types.d.cts.map +1 -0
- package/dist/subagent-types.d.ts +15 -0
- package/dist/subagent-types.d.ts.map +1 -0
- package/package.json +9 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { ClassSubagentStreamInterface } from "./subagent-types.js";
|
|
2
|
+
import { injectStreamCustom, useStreamCustom } from "./stream.custom.js";
|
|
3
|
+
import { STREAM_DEFAULTS, STREAM_INSTANCE, StreamDefaults, provideStream, provideStreamDefaults } from "./context.js";
|
|
1
4
|
import { Signal, WritableSignal } from "@angular/core";
|
|
2
5
|
import * as _langchain_langgraph_sdk_ui0 from "@langchain/langgraph-sdk/ui";
|
|
3
6
|
import { AcceptBaseMessages, AgentTypeConfigLike, AnyStreamOptions, BaseStream, BaseSubagentState, CompiledSubAgentLike, DeepAgentTypeConfigLike, DefaultSubagentStates, ExtractAgentConfig, ExtractDeepAgentConfig, ExtractSubAgentMiddleware, FetchStreamTransport, GetConfigurableType, GetInterruptType, GetToolCallsType, HistoryWithBaseMessages, InferAgentToolCalls, InferBag, InferBag as InferBag$1, InferDeepAgentSubagents, InferNodeNames, InferStateType, InferStateType as InferStateType$1, InferSubagentByName, InferSubagentNames, InferSubagentState, InferSubagentStates, InferToolCalls, IsAgentLike, IsDeepAgentLike, MessageMetadata, MessageMetadata as MessageMetadata$1, QueueEntry, QueueInterface, ResolveStreamInterface, ResolveStreamInterface as ResolveStreamInterface$1, ResolveStreamOptions, ResolveStreamOptions as ResolveStreamOptions$1, SubAgentLike, SubagentApi, SubagentManager, SubagentStateMap, SubagentStatus, SubagentStream, SubagentStreamInterface, SubagentStreamInterface as SubagentStreamInterface$1, SubagentToolCall, SubmitOptions, UseAgentStream, UseAgentStreamOptions, UseDeepAgentStream, UseDeepAgentStreamOptions, UseStreamCustomOptions, UseStreamCustomOptions as UseStreamCustomOptions$1, UseStreamOptions, UseStreamThread, UseStreamTransport, calculateDepthFromNamespace, extractParentIdFromNamespace, extractToolCallIdFromNamespace, isSubagentNamespace } from "@langchain/langgraph-sdk/ui";
|
|
4
7
|
import * as _langchain_langgraph_sdk0 from "@langchain/langgraph-sdk";
|
|
5
|
-
import { BagTemplate, Client, DefaultToolCall, DefaultToolCall as DefaultToolCall$1, Interrupt, Message, StreamEvent, StreamMode,
|
|
8
|
+
import { BagTemplate, Client, DefaultToolCall, DefaultToolCall as DefaultToolCall$1, Interrupt, Message, StreamEvent, StreamMode, ToolCallFromTool, ToolCallState, ToolCallWithResult as ToolCallWithResult$1, ToolCallsFromTools } from "@langchain/langgraph-sdk";
|
|
6
9
|
import * as _langchain_core_messages0 from "@langchain/core/messages";
|
|
7
10
|
import { AIMessage, BaseMessage, ToolMessage } from "@langchain/core/messages";
|
|
8
11
|
|
|
9
12
|
//#region src/index.d.ts
|
|
10
13
|
type ClassToolCallWithResult<T> = T extends ToolCallWithResult$1<infer TC, unknown, unknown> ? ToolCallWithResult$1<TC, ToolMessage, AIMessage> : T;
|
|
11
|
-
type ClassSubagentStreamInterface<StateType = Record<string, unknown>, ToolCall = DefaultToolCall$1, SubagentName extends string = string> = Omit<SubagentStreamInterface$1<StateType, ToolCall, SubagentName>, "messages"> & {
|
|
12
|
-
messages: BaseMessage[];
|
|
13
|
-
};
|
|
14
14
|
type WithClassMessages<T> = Omit<T, "messages" | "history" | "getMessagesMetadata" | "toolCalls" | "getToolCalls" | "submit" | "subagents" | "activeSubagents" | "getSubagent" | "getSubagentsByType" | "getSubagentsByMessage"> & {
|
|
15
15
|
messages: BaseMessage[];
|
|
16
16
|
getMessagesMetadata: (message: BaseMessage, index?: number) => MessageMetadata$1<Record<string, unknown>> | undefined;
|
|
@@ -59,8 +59,243 @@ type AngularQueueInterface<T> = T extends {
|
|
|
59
59
|
clear: Cl;
|
|
60
60
|
} : T;
|
|
61
61
|
type AngularSignalWrap<T> = { [K in keyof T]: K extends AngularPlainKeys ? T[K] : K extends AngularWritableKeys ? WritableSignal<T[K]> : K extends "queue" ? AngularQueueInterface<T[K]> : Signal<T[K]> };
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Injects the shared stream instance from the nearest ancestor that provided
|
|
64
|
+
* one via {@link provideStream}. Throws if no ancestor provides a stream
|
|
65
|
+
* instance.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* import { Component } from "@angular/core";
|
|
70
|
+
* import { injectStream } from "@langchain/angular";
|
|
71
|
+
*
|
|
72
|
+
* @Component({
|
|
73
|
+
* template: `
|
|
74
|
+
* @for (msg of stream.messages(); track msg.id) {
|
|
75
|
+
* <div>{{ msg.content }}</div>
|
|
76
|
+
* }
|
|
77
|
+
* <button
|
|
78
|
+
* [disabled]="stream.isLoading()"
|
|
79
|
+
* (click)="onSubmit()"
|
|
80
|
+
* >Send</button>
|
|
81
|
+
* `,
|
|
82
|
+
* })
|
|
83
|
+
* export class ChatComponent {
|
|
84
|
+
* stream = injectStream();
|
|
85
|
+
*
|
|
86
|
+
* onSubmit() {
|
|
87
|
+
* void this.stream.submit({
|
|
88
|
+
* messages: [{ type: "human", content: "Hello!" }],
|
|
89
|
+
* });
|
|
90
|
+
* }
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @example With type parameters for full type safety:
|
|
95
|
+
* ```typescript
|
|
96
|
+
* import type { agent } from "./agent";
|
|
97
|
+
*
|
|
98
|
+
* export class ChatComponent {
|
|
99
|
+
* stream = injectStream<typeof agent>();
|
|
100
|
+
* // stream.messages() returns typed messages
|
|
101
|
+
* }
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
declare function injectStream<T = Record<string, unknown>, Bag extends BagTemplate = BagTemplate>(): AngularSignalWrap<WithClassMessages<ResolveStreamInterface$1<T, InferBag$1<T, Bag>>>>;
|
|
105
|
+
/**
|
|
106
|
+
* Angular entry point for LangGraph streaming. Call from a component, directive,
|
|
107
|
+
* or service field initializer to get a **Signals-based** stream controller
|
|
108
|
+
* connected to the LangGraph Platform (HTTP + threads API).
|
|
109
|
+
*
|
|
110
|
+
* The returned object mirrors the shared `useStream` API from
|
|
111
|
+
* `@langchain/langgraph-sdk/ui`, but reactive fields are
|
|
112
|
+
* {@link https://angular.dev/guide/signals | Angular `Signal`s}:
|
|
113
|
+
* read state with calls like `stream.messages()`, `stream.values()`, and
|
|
114
|
+
* `stream.isLoading()`, and use `WritableSignal` setters where exposed (for
|
|
115
|
+
* example `stream.branch` for branch selection).
|
|
116
|
+
*
|
|
117
|
+
* ## Typing with `createDeepAgent`
|
|
118
|
+
*
|
|
119
|
+
* Expect `export const agent = createDeepAgent({ ... })` from `deepagents`. In
|
|
120
|
+
* UI code, `import { type agent } from "./agent"` (or `import type { agent }`)
|
|
121
|
+
* is a **type-only** import: it is erased when compiling, so the agent module
|
|
122
|
+
* does not run in the browser. You still pass **`typeof agent`** to
|
|
123
|
+
* `injectStream`, not `agent` alone — `agent` is a value; TypeScript only
|
|
124
|
+
* accepts it in a type position via `typeof` (otherwise: *refers to a value,
|
|
125
|
+
* but is being used as a type*). If you prefer a named type in generics, add
|
|
126
|
+
* `export type Agent = typeof agent` next to the const and use
|
|
127
|
+
* `injectStream<Agent>(...)`.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* // agent.ts
|
|
132
|
+
* import { createDeepAgent } from "deepagents";
|
|
133
|
+
* import { tool } from "langchain";
|
|
134
|
+
* import { z } from "zod";
|
|
135
|
+
*
|
|
136
|
+
* const getWeather = tool(
|
|
137
|
+
* async ({ location }) => `Weather in ${location}`,
|
|
138
|
+
* { name: "get_weather", schema: z.object({ location: z.string() }) },
|
|
139
|
+
* );
|
|
140
|
+
*
|
|
141
|
+
* export const agent = createDeepAgent({
|
|
142
|
+
* model: "openai:gpt-4o",
|
|
143
|
+
* tools: [getWeather],
|
|
144
|
+
* });
|
|
145
|
+
*
|
|
146
|
+
* // chat.component.ts — type-only import; no agent runtime in the frontend
|
|
147
|
+
* import { Component } from "@angular/core";
|
|
148
|
+
* import { injectStream } from "@langchain/angular";
|
|
149
|
+
* import { type agent } from "./agent";
|
|
150
|
+
*
|
|
151
|
+
* @Component({
|
|
152
|
+
* standalone: true,
|
|
153
|
+
* template: `
|
|
154
|
+
* @for (msg of stream.messages(); track msg.id ?? $index) {
|
|
155
|
+
* <p>{{ msg.content }}</p>
|
|
156
|
+
* }
|
|
157
|
+
* `,
|
|
158
|
+
* })
|
|
159
|
+
* export class ChatComponent {
|
|
160
|
+
* readonly stream = injectStream<typeof agent>({
|
|
161
|
+
* assistantId: "agent",
|
|
162
|
+
* apiUrl: "http://localhost:2024",
|
|
163
|
+
* });
|
|
164
|
+
* // stream.toolCalls()[0].call.name is typed as "get_weather"
|
|
165
|
+
* }
|
|
166
|
+
* ```
|
|
167
|
+
*
|
|
168
|
+
* ## Typing with `StateGraph` / custom graph state
|
|
169
|
+
*
|
|
170
|
+
* Use your graph state interface as `T` and embed tool call unions in
|
|
171
|
+
* `Message<...>[]` when you need discriminated tool types.
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* ```typescript
|
|
175
|
+
* import { Message } from "@langchain/langgraph-sdk";
|
|
176
|
+
* import { Component } from "@angular/core";
|
|
177
|
+
* import { injectStream } from "@langchain/angular";
|
|
178
|
+
*
|
|
179
|
+
* type MyToolCalls =
|
|
180
|
+
* | { name: "search"; args: { query: string }; id?: string }
|
|
181
|
+
* | { name: "calculate"; args: { expression: string }; id?: string };
|
|
182
|
+
*
|
|
183
|
+
* interface MyGraphState {
|
|
184
|
+
* messages: Message<MyToolCalls>[];
|
|
185
|
+
* context?: string;
|
|
186
|
+
* }
|
|
187
|
+
*
|
|
188
|
+
* @Component({ standalone: true, template: "" })
|
|
189
|
+
* export class ChatComponent {
|
|
190
|
+
* readonly stream = injectStream<MyGraphState>({
|
|
191
|
+
* assistantId: "my-graph",
|
|
192
|
+
* apiUrl: "http://localhost:2024",
|
|
193
|
+
* });
|
|
194
|
+
* // stream.values() is typed as MyGraphState | null
|
|
195
|
+
* }
|
|
196
|
+
* ```
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* // Optional bag for interrupts, configurable, custom events, and updates
|
|
201
|
+
* import { Component } from "@angular/core";
|
|
202
|
+
* import { injectStream } from "@langchain/angular";
|
|
203
|
+
* import type { Message } from "@langchain/langgraph-sdk";
|
|
204
|
+
*
|
|
205
|
+
* interface MyGraphState {
|
|
206
|
+
* messages: Message[];
|
|
207
|
+
* }
|
|
208
|
+
*
|
|
209
|
+
* @Component({ standalone: true, template: "" })
|
|
210
|
+
* export class ChatComponent {
|
|
211
|
+
* readonly stream = injectStream<
|
|
212
|
+
* MyGraphState,
|
|
213
|
+
* {
|
|
214
|
+
* InterruptType: { question: string };
|
|
215
|
+
* ConfigurableType: { userId: string };
|
|
216
|
+
* }
|
|
217
|
+
* >({
|
|
218
|
+
* assistantId: "my-graph",
|
|
219
|
+
* apiUrl: "http://localhost:2024",
|
|
220
|
+
* });
|
|
221
|
+
* // stream.interrupt() is typed as { question: string } | undefined
|
|
222
|
+
* }
|
|
223
|
+
* ```
|
|
224
|
+
*
|
|
225
|
+
* ## Subagent streaming
|
|
226
|
+
*
|
|
227
|
+
* For `createDeepAgent` agents with `subagents`, set `filterSubagentMessages`
|
|
228
|
+
* and use `streamSubgraphs` on `submit` to populate `stream.subagents` and
|
|
229
|
+
* related helpers.
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* import { Component } from "@angular/core";
|
|
234
|
+
* import { injectStream } from "@langchain/angular";
|
|
235
|
+
* import { type agent } from "./agent";
|
|
236
|
+
*
|
|
237
|
+
* @Component({ standalone: true, template: "" })
|
|
238
|
+
* export class DeepAgentChatComponent {
|
|
239
|
+
* readonly stream = injectStream<typeof agent>({
|
|
240
|
+
* assistantId: "deepagent",
|
|
241
|
+
* apiUrl: "http://localhost:2024",
|
|
242
|
+
* filterSubagentMessages: true,
|
|
243
|
+
* });
|
|
244
|
+
*
|
|
245
|
+
* send(content: string) {
|
|
246
|
+
* void this.stream.submit(
|
|
247
|
+
* { messages: [{ content, type: "human" }] },
|
|
248
|
+
* { streamSubgraphs: true },
|
|
249
|
+
* );
|
|
250
|
+
* }
|
|
251
|
+
* }
|
|
252
|
+
* ```
|
|
253
|
+
*
|
|
254
|
+
* @param options - LangGraph Platform client options (`apiUrl` or `client`),
|
|
255
|
+
* `assistantId`, stream modes, history, reconnect, subagent settings, etc.
|
|
256
|
+
*
|
|
257
|
+
* @returns A stream controller backed by Signals: graph values, messages,
|
|
258
|
+
* loading and error state, interrupts, tool calls, branching, queue, and
|
|
259
|
+
* `submit` / `stop` / `switchThread` helpers (writable where the UI layer
|
|
260
|
+
* requires mutation).
|
|
261
|
+
*
|
|
262
|
+
* @template T Agent type (with `~agentTypes`) from `createDeepAgent` or
|
|
263
|
+
* `createAgent`, or a state shape extending `Record<string, unknown>`.
|
|
264
|
+
* @template Bag Optional configuration bag:
|
|
265
|
+
* - `ConfigurableType` — `config.configurable` typing
|
|
266
|
+
* - `InterruptType` — human-in-the-loop interrupt payloads
|
|
267
|
+
* - `CustomEventType` — custom stream events
|
|
268
|
+
* - `UpdateType` — payload typing for `submit`
|
|
269
|
+
*
|
|
270
|
+
* @see {@link https://docs.langchain.com/oss/javascript/langgraph/overview | LangGraph JavaScript overview}
|
|
271
|
+
* @see {@link https://docs.langchain.com/oss/javascript/langchain/overview | LangChain JavaScript overview}
|
|
272
|
+
* @see {@link https://docs.langchain.com/oss/javascript/deepagents/overview | Deep Agents JavaScript overview}
|
|
273
|
+
*/
|
|
274
|
+
declare function injectStream<T = Record<string, unknown>, Bag extends BagTemplate = BagTemplate>(options: ResolveStreamOptions$1<T, InferBag$1<T, Bag>>): AngularSignalWrap<WithClassMessages<ResolveStreamInterface$1<T, InferBag$1<T, Bag>>>>;
|
|
275
|
+
/**
|
|
276
|
+
* Overload for a **custom transport** (`options.transport`), for example
|
|
277
|
+
* {@link FetchStreamTransport} or any implementation compatible with
|
|
278
|
+
* {@link injectStreamCustom}. Prefer {@link injectStreamCustom} directly when
|
|
279
|
+
* you only use custom transports and want a narrower import.
|
|
280
|
+
*
|
|
281
|
+
* @param options - Custom transport and stream options (must include
|
|
282
|
+
* `transport`).
|
|
283
|
+
*
|
|
284
|
+
* @returns The same Signals-based controller shape as the LangGraph Platform
|
|
285
|
+
* overload.
|
|
286
|
+
*
|
|
287
|
+
* @template T Agent type or state shape, matching the custom transport.
|
|
288
|
+
* @template Bag Same optional bag as the platform overload.
|
|
289
|
+
*
|
|
290
|
+
* @see {@link injectStreamCustom}
|
|
291
|
+
*/
|
|
292
|
+
declare function injectStream<T = Record<string, unknown>, Bag extends BagTemplate = BagTemplate>(options: UseStreamCustomOptions$1<InferStateType$1<T>, InferBag$1<T, Bag>>): AngularSignalWrap<WithClassMessages<ResolveStreamInterface$1<T, InferBag$1<T, Bag>>>>;
|
|
293
|
+
/**
|
|
294
|
+
* @deprecated Use `injectStream` instead. `useStream` will be removed in a
|
|
295
|
+
* future major version. `injectStream` follows Angular's `inject*` naming
|
|
296
|
+
* convention for injection-based patterns.
|
|
297
|
+
*/
|
|
298
|
+
declare const useStream: typeof injectStream;
|
|
64
299
|
declare function useStreamLGP<StateType extends Record<string, unknown> = Record<string, unknown>, Bag extends {
|
|
65
300
|
ConfigurableType?: Record<string, unknown>;
|
|
66
301
|
InterruptType?: unknown;
|
|
@@ -69,22 +304,22 @@ declare function useStreamLGP<StateType extends Record<string, unknown> = Record
|
|
|
69
304
|
} = BagTemplate>(options: AnyStreamOptions<StateType, Bag>): {
|
|
70
305
|
assistantId: string;
|
|
71
306
|
client: Client<_langchain_langgraph_sdk0.DefaultValues, _langchain_langgraph_sdk0.DefaultValues, unknown>;
|
|
72
|
-
values: Signal<
|
|
307
|
+
values: Signal<StateType>;
|
|
73
308
|
error: Signal<unknown>;
|
|
74
309
|
isLoading: WritableSignal<boolean>;
|
|
75
310
|
branch: WritableSignal<string>;
|
|
76
|
-
setBranch
|
|
311
|
+
setBranch(value: string): void;
|
|
77
312
|
messages: Signal<(BaseMessage<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType> | _langchain_core_messages0.BaseMessageChunk<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>)[]>;
|
|
78
313
|
toolCalls: Signal<ToolCallWithResult$1<DefaultToolCall$1>[]>;
|
|
79
|
-
getToolCalls
|
|
314
|
+
getToolCalls(message: Message): ToolCallWithResult$1<DefaultToolCall$1>[];
|
|
80
315
|
interrupt: Signal<Interrupt<GetInterruptType<Bag>> | undefined>;
|
|
81
316
|
interrupts: Signal<Interrupt<GetInterruptType<Bag>>[]>;
|
|
82
|
-
history: Signal<ThreadState<any>[]>;
|
|
317
|
+
history: Signal<_langchain_langgraph_sdk0.ThreadState<any>[]>;
|
|
83
318
|
isThreadLoading: Signal<boolean>;
|
|
84
319
|
experimental_branchTree: Signal<_langchain_langgraph_sdk_ui0.Sequence<any>>;
|
|
85
|
-
getMessagesMetadata
|
|
86
|
-
submit: (values: StateType, submitOptions?: SubmitOptions<StateType, GetConfigurableType<Bag>> | undefined) => Promise<void
|
|
87
|
-
stop: () =>
|
|
320
|
+
getMessagesMetadata(message: Message, index?: number | undefined): MessageMetadata$1<StateType> | undefined;
|
|
321
|
+
submit: (values: StateType, submitOptions?: SubmitOptions<StateType, GetConfigurableType<Bag>> | undefined) => Promise<void | Promise<void>>;
|
|
322
|
+
stop: () => void;
|
|
88
323
|
joinStream: (runId: string, lastEventId?: string | undefined, joinOptions?: {
|
|
89
324
|
streamMode?: StreamMode[] | StreamMode | undefined;
|
|
90
325
|
filter?: ((event: {
|
|
@@ -96,8 +331,8 @@ declare function useStreamLGP<StateType extends Record<string, unknown> = Record
|
|
|
96
331
|
queue: {
|
|
97
332
|
entries: WritableSignal<readonly _langchain_langgraph_sdk_ui0.QueueEntry<StateType, SubmitOptions<StateType, GetConfigurableType<Bag>>>[]>;
|
|
98
333
|
size: WritableSignal<number>;
|
|
99
|
-
cancel(id: string)
|
|
100
|
-
clear()
|
|
334
|
+
cancel: (id: string) => Promise<boolean>;
|
|
335
|
+
clear: () => Promise<void>;
|
|
101
336
|
};
|
|
102
337
|
switchThread(newThreadId: string | null): void;
|
|
103
338
|
readonly subagents: Map<string, SubagentStreamInterface$1<Record<string, unknown>, DefaultToolCall$1, string>>;
|
|
@@ -106,7 +341,73 @@ declare function useStreamLGP<StateType extends Record<string, unknown> = Record
|
|
|
106
341
|
getSubagentsByType(type: string): SubagentStreamInterface$1<Record<string, unknown>, DefaultToolCall$1, string>[];
|
|
107
342
|
getSubagentsByMessage(messageId: string): SubagentStreamInterface$1<Record<string, unknown>, DefaultToolCall$1, string>[];
|
|
108
343
|
};
|
|
344
|
+
/**
|
|
345
|
+
* Injectable Angular service that wraps {@link injectStream}.
|
|
346
|
+
*
|
|
347
|
+
* Extend this class with your own `@Injectable()` service and call
|
|
348
|
+
* `super(options)` in the constructor:
|
|
349
|
+
*
|
|
350
|
+
* ```ts
|
|
351
|
+
* \@Injectable({ providedIn: 'root' })
|
|
352
|
+
* export class ChatService extends StreamService {
|
|
353
|
+
* constructor() {
|
|
354
|
+
* super({ assistantId: 'agent', apiUrl: '...' });
|
|
355
|
+
* }
|
|
356
|
+
* }
|
|
357
|
+
* ```
|
|
358
|
+
*
|
|
359
|
+
* The service exposes the same signals and methods as `injectStream`
|
|
360
|
+
* (e.g. `values`, `messages`, `isLoading`, `submit`, `stop`).
|
|
361
|
+
*
|
|
362
|
+
* Must be created within an Angular injection context (via DI or
|
|
363
|
+
* `runInInjectionContext`).
|
|
364
|
+
*/
|
|
365
|
+
declare class StreamService<T = Record<string, unknown>, Bag extends BagTemplate = BagTemplate> {
|
|
366
|
+
private readonly _stream;
|
|
367
|
+
constructor(options: ResolveStreamOptions$1<T, InferBag$1<T, Bag>> | UseStreamCustomOptions$1<InferStateType$1<T>, InferBag$1<T, Bag>>);
|
|
368
|
+
get values(): Signal<T>;
|
|
369
|
+
get messages(): Signal<BaseMessage[]>;
|
|
370
|
+
get isLoading(): WritableSignal<boolean>;
|
|
371
|
+
get error(): Signal<unknown>;
|
|
372
|
+
get branch(): WritableSignal<string>;
|
|
373
|
+
get interrupt(): Signal<Interrupt<GetInterruptType<Bag>> | undefined>;
|
|
374
|
+
get interrupts(): Signal<Interrupt<GetInterruptType<Bag>>[]>;
|
|
375
|
+
get toolCalls(): Signal<ToolCallWithResult$1<DefaultToolCall$1>[]>;
|
|
376
|
+
get queue(): AngularQueueInterface<{
|
|
377
|
+
entries: readonly {
|
|
378
|
+
id: string;
|
|
379
|
+
values: Partial<T> | null | undefined;
|
|
380
|
+
}[];
|
|
381
|
+
size: number;
|
|
382
|
+
cancel: (id: string) => Promise<boolean>;
|
|
383
|
+
clear: () => Promise<void>;
|
|
384
|
+
}>;
|
|
385
|
+
get subagents(): Map<string, SubagentStreamInterface$1>;
|
|
386
|
+
get activeSubagents(): SubagentStreamInterface$1[];
|
|
387
|
+
get history(): Signal<unknown>;
|
|
388
|
+
get isThreadLoading(): Signal<boolean>;
|
|
389
|
+
get experimental_branchTree(): Signal<unknown>;
|
|
390
|
+
get client(): Client;
|
|
391
|
+
get assistantId(): string;
|
|
392
|
+
submit(values: AcceptBaseMessages<Exclude<T, null | undefined>> | null | undefined, options?: SubmitOptions<T extends Record<string, unknown> ? T : Record<string, unknown>, GetConfigurableType<Bag>>): ReturnType<typeof this._stream.submit>;
|
|
393
|
+
stop(): Promise<void>;
|
|
394
|
+
setBranch(value: string): void;
|
|
395
|
+
switchThread(newThreadId: string | null): void;
|
|
396
|
+
joinStream(runId: string, lastEventId?: string, options?: {
|
|
397
|
+
streamMode?: StreamMode | StreamMode[];
|
|
398
|
+
filter?: (event: {
|
|
399
|
+
id?: string;
|
|
400
|
+
event: StreamEvent;
|
|
401
|
+
data: unknown;
|
|
402
|
+
}) => boolean;
|
|
403
|
+
}): Promise<void>;
|
|
404
|
+
getMessagesMetadata(message: BaseMessage, index?: number): MessageMetadata$1<T extends Record<string, unknown> ? T : Record<string, unknown>> | undefined;
|
|
405
|
+
getToolCalls(message: BaseMessage): ToolCallWithResult$1<DefaultToolCall$1>[];
|
|
406
|
+
getSubagent(toolCallId: string): SubagentStreamInterface$1 | undefined;
|
|
407
|
+
getSubagentsByType(type: string): SubagentStreamInterface$1[];
|
|
408
|
+
getSubagentsByMessage(messageId: string): SubagentStreamInterface$1[];
|
|
409
|
+
}
|
|
109
410
|
type ToolCallWithResult<ToolCall = DefaultToolCall$1> = ToolCallWithResult$1<ToolCall, ToolMessage, AIMessage>;
|
|
110
411
|
//#endregion
|
|
111
|
-
export { type AgentTypeConfigLike, type BaseStream, type BaseSubagentState, ClassSubagentStreamInterface, type CompiledSubAgentLike, type DeepAgentTypeConfigLike, type DefaultSubagentStates, type DefaultToolCall, type ExtractAgentConfig, type ExtractDeepAgentConfig, type ExtractSubAgentMiddleware, FetchStreamTransport, type GetToolCallsType, type InferAgentToolCalls, type InferBag, type InferDeepAgentSubagents, type InferNodeNames, type InferStateType, type InferSubagentByName, type InferSubagentNames, type InferSubagentState, type InferSubagentStates, type InferToolCalls, type IsAgentLike, type IsDeepAgentLike, type MessageMetadata, type QueueEntry, type QueueInterface, type ResolveStreamInterface, type ResolveStreamOptions, type SubAgentLike, type SubagentApi, SubagentManager, type SubagentStateMap, type SubagentStatus, type SubagentStream, type SubagentStreamInterface, type SubagentToolCall, type ToolCallFromTool, type ToolCallState, ToolCallWithResult, type ToolCallsFromTools, type UseAgentStream, type UseAgentStreamOptions, type UseDeepAgentStream, type UseDeepAgentStreamOptions, type UseStreamCustomOptions, type UseStreamOptions, type UseStreamThread, type UseStreamTransport, calculateDepthFromNamespace, extractParentIdFromNamespace, extractToolCallIdFromNamespace, isSubagentNamespace, useStream, useStreamLGP };
|
|
412
|
+
export { type AgentTypeConfigLike, type BaseStream, type BaseSubagentState, type ClassSubagentStreamInterface, type CompiledSubAgentLike, type DeepAgentTypeConfigLike, type DefaultSubagentStates, type DefaultToolCall, type ExtractAgentConfig, type ExtractDeepAgentConfig, type ExtractSubAgentMiddleware, FetchStreamTransport, type GetToolCallsType, type InferAgentToolCalls, type InferBag, type InferDeepAgentSubagents, type InferNodeNames, type InferStateType, type InferSubagentByName, type InferSubagentNames, type InferSubagentState, type InferSubagentStates, type InferToolCalls, type IsAgentLike, type IsDeepAgentLike, type MessageMetadata, type QueueEntry, type QueueInterface, type ResolveStreamInterface, type ResolveStreamOptions, STREAM_DEFAULTS, STREAM_INSTANCE, type StreamDefaults, StreamService, type SubAgentLike, type SubagentApi, SubagentManager, type SubagentStateMap, type SubagentStatus, type SubagentStream, type SubagentStreamInterface, type SubagentToolCall, type ToolCallFromTool, type ToolCallState, ToolCallWithResult, type ToolCallsFromTools, type UseAgentStream, type UseAgentStreamOptions, type UseDeepAgentStream, type UseDeepAgentStreamOptions, type UseStreamCustomOptions, type UseStreamOptions, type UseStreamThread, type UseStreamTransport, calculateDepthFromNamespace, extractParentIdFromNamespace, extractToolCallIdFromNamespace, injectStream, injectStreamCustom, isSubagentNamespace, provideStream, provideStreamDefaults, useStream, useStreamCustom, useStreamLGP };
|
|
112
413
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;KAyDK,uBAAA,MACH,CAAA,SAAU,oBAAA,+BACN,oBAAA,CAAsB,EAAA,EAAI,WAAA,EAAiB,SAAA,IAC3C,CAAA;AAAA,KAED,iBAAA,MAAuB,IAAA,CAC1B,CAAA;EAaA,QAAA,EAAU,WAAA;EACV,mBAAA,GACE,OAAA,EAAS,WAAA,EACT,KAAA,cACG,iBAAA,CAAgB,MAAA;AAAA,6BACM,CAAA;EACrB,OAAA,EAAS,uBAAA,CAAwB,CAAA;AAAA,uCAEf,CAAA;EAElB,MAAA,EAAQ,CAAA;IACN,MAAA,GAAS,MAAA,WAAiB,OAAA;EAAA,KAGtB,MAAA,EACI,kBAAA,CAAmB,OAAA,CAAQ,CAAA,yCAG/B,OAAA,GAAU,CAAA,KACP,GAAA;AAAA,0CAIY,CAAA;EAErB,SAAA,EAAW,CAAA;IAAY,SAAA;EAAA,IACnB,uBAAA,CAAwB,EAA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