@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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { BaseMessage as BaseMessage$1 } from "./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.js";
|
|
2
|
+
import * as _angular_core0 from "@angular/core";
|
|
3
|
+
import { EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
4
|
+
import * as _langchain_langgraph_sdk_ui0 from "@langchain/langgraph-sdk/ui";
|
|
5
|
+
import { InferBag, InferStateType, ResolveStreamOptions, UseStreamCustomOptions } from "@langchain/langgraph-sdk/ui";
|
|
6
|
+
import * as _langchain_langgraph_sdk0 from "@langchain/langgraph-sdk";
|
|
7
|
+
import { BagTemplate, Client } from "@langchain/langgraph-sdk";
|
|
8
|
+
import * as _langchain_core_messages0 from "@langchain/core/messages";
|
|
9
|
+
|
|
10
|
+
//#region src/context.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* Configuration defaults for `useStream` and `injectStream` calls.
|
|
13
|
+
*/
|
|
14
|
+
interface StreamDefaults {
|
|
15
|
+
/** Base URL of the LangGraph API. */
|
|
16
|
+
apiUrl?: string;
|
|
17
|
+
/** API key for authenticating with the LangGraph API. */
|
|
18
|
+
apiKey?: string;
|
|
19
|
+
/** Pre-configured Client instance. */
|
|
20
|
+
client?: Client;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Injection token for stream default configuration.
|
|
24
|
+
* Provide via `provideStreamDefaults()` in your application config.
|
|
25
|
+
*/
|
|
26
|
+
declare const STREAM_DEFAULTS: InjectionToken<StreamDefaults>;
|
|
27
|
+
/**
|
|
28
|
+
* Injection token for a shared stream instance.
|
|
29
|
+
* Provide via `provideStream()` at the component level.
|
|
30
|
+
*/
|
|
31
|
+
declare const STREAM_INSTANCE: InjectionToken<any>;
|
|
32
|
+
/**
|
|
33
|
+
* Provides default LangGraph configuration at the application level.
|
|
34
|
+
*
|
|
35
|
+
* Use this in your application's `providers` array to set defaults like
|
|
36
|
+
* `apiUrl` that will be used by all `useStream` and `injectStream` calls.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* // app.config.ts
|
|
41
|
+
* import { ApplicationConfig } from "@angular/core";
|
|
42
|
+
* import { provideStreamDefaults } from "@langchain/angular";
|
|
43
|
+
*
|
|
44
|
+
* export const appConfig: ApplicationConfig = {
|
|
45
|
+
* providers: [
|
|
46
|
+
* provideStreamDefaults({
|
|
47
|
+
* apiUrl: "http://localhost:2024",
|
|
48
|
+
* }),
|
|
49
|
+
* ],
|
|
50
|
+
* };
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare function provideStreamDefaults(defaults: StreamDefaults): EnvironmentProviders;
|
|
54
|
+
/**
|
|
55
|
+
* Creates a provider for a shared `useStream` instance at the component level.
|
|
56
|
+
*
|
|
57
|
+
* Add the returned provider to a component's `providers` array so that all
|
|
58
|
+
* child components can access the same stream via `injectStream()`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* import { Component } from "@angular/core";
|
|
63
|
+
* import { provideStream, injectStream } from "@langchain/angular";
|
|
64
|
+
*
|
|
65
|
+
* @Component({
|
|
66
|
+
* providers: [provideStream({ assistantId: "agent" })],
|
|
67
|
+
* template: `
|
|
68
|
+
* <app-message-list />
|
|
69
|
+
* <app-message-input />
|
|
70
|
+
* `,
|
|
71
|
+
* })
|
|
72
|
+
* export class ChatContainer {}
|
|
73
|
+
*
|
|
74
|
+
* // In child components:
|
|
75
|
+
* @Component({
|
|
76
|
+
* template: `
|
|
77
|
+
* @for (msg of stream.messages(); track msg.id) {
|
|
78
|
+
* <div>{{ msg.content }}</div>
|
|
79
|
+
* }
|
|
80
|
+
* `,
|
|
81
|
+
* })
|
|
82
|
+
* export class MessageListComponent {
|
|
83
|
+
* stream = injectStream();
|
|
84
|
+
* }
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare function provideStream<T = Record<string, unknown>, Bag extends BagTemplate = BagTemplate>(options: ResolveStreamOptions<T, InferBag<T, Bag>> | UseStreamCustomOptions<InferStateType<T>, InferBag<T, Bag>>): {
|
|
88
|
+
provide: InjectionToken<any>;
|
|
89
|
+
useFactory: () => {
|
|
90
|
+
values: _angular_core0.Signal<Record<string, unknown>>;
|
|
91
|
+
error: _angular_core0.Signal<unknown>;
|
|
92
|
+
isLoading: _angular_core0.WritableSignal<boolean>;
|
|
93
|
+
isThreadLoading: _angular_core0.Signal<boolean>;
|
|
94
|
+
interrupt: _angular_core0.Signal<_langchain_langgraph_sdk0.Interrupt<unknown> | undefined>;
|
|
95
|
+
interrupts: _angular_core0.Signal<_langchain_langgraph_sdk0.Interrupt<unknown>[]>;
|
|
96
|
+
stop: () => Promise<void>;
|
|
97
|
+
branch: _angular_core0.WritableSignal<string>;
|
|
98
|
+
setBranch: (branch: string) => void;
|
|
99
|
+
experimental_branchTree: _angular_core0.Signal<_langchain_langgraph_sdk_ui0.Sequence<Record<string, unknown>>>;
|
|
100
|
+
toolProgress: _angular_core0.Signal<_langchain_langgraph_sdk0.ToolProgress[]>;
|
|
101
|
+
client: Client<_langchain_langgraph_sdk0.DefaultValues, _langchain_langgraph_sdk0.DefaultValues, unknown>;
|
|
102
|
+
assistantId: string;
|
|
103
|
+
joinStream: (runId: string, lastEventId?: string | undefined, options?: {
|
|
104
|
+
streamMode?: _langchain_langgraph_sdk0.StreamMode[] | _langchain_langgraph_sdk0.StreamMode | undefined;
|
|
105
|
+
filter?: ((event: {
|
|
106
|
+
id?: string | undefined;
|
|
107
|
+
event: _langchain_langgraph_sdk0.StreamEvent;
|
|
108
|
+
data: unknown;
|
|
109
|
+
}) => boolean) | undefined;
|
|
110
|
+
} | undefined) => Promise<void>;
|
|
111
|
+
switchThread: (newThreadId: string | null) => void;
|
|
112
|
+
queue: {
|
|
113
|
+
entries: _angular_core0.WritableSignal<readonly _langchain_langgraph_sdk_ui0.QueueEntry<Record<string, unknown>, _langchain_langgraph_sdk_ui0.SubmitOptions<Record<string, unknown>, Record<string, unknown>>>[]>;
|
|
114
|
+
size: _angular_core0.WritableSignal<number>;
|
|
115
|
+
cancel: (id: string) => Promise<boolean>;
|
|
116
|
+
clear: () => Promise<void>;
|
|
117
|
+
};
|
|
118
|
+
messages: _angular_core0.Signal<BaseMessage$1<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[]>;
|
|
119
|
+
getMessagesMetadata: (message: BaseMessage$1<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>, index?: number | undefined) => _langchain_langgraph_sdk_ui0.MessageMetadata<Record<string, unknown>> | undefined;
|
|
120
|
+
history: _angular_core0.Signal<_langchain_langgraph_sdk0.ThreadState<Omit<Record<string, unknown>, "messages"> & {
|
|
121
|
+
messages: BaseMessage$1<_langchain_core_messages0.MessageStructure<_langchain_core_messages0.MessageToolSet>, _langchain_core_messages0.MessageType>[];
|
|
122
|
+
}>[]>;
|
|
123
|
+
submit: (values: {
|
|
124
|
+
[x: string]: unknown;
|
|
125
|
+
} | null | undefined, options?: _langchain_langgraph_sdk_ui0.SubmitOptions<Record<string, unknown>, Record<string, unknown>> | undefined) => Promise<void>;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
//#endregion
|
|
129
|
+
export { STREAM_DEFAULTS, STREAM_INSTANCE, StreamDefaults, provideStream, provideStreamDefaults };
|
|
130
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","names":[],"sources":["../src/context.ts"],"mappings":";;;;;;;;;;;;;UAmBiB,cAAA;;EAEf,MAAA;EAFe;EAIf,MAAA;;EAEA,MAAA,GAAS,MAAA;AAAA;;;;;cAOE,eAAA,EAAe,cAAA,CAAA,cAAA;AAA5B;;;;AAAA,cASa,eAAA,EAAe,cAAA;AAA5B;;;;;AAyBA;;;;;;;;;AAyCA;;;;;;;AAlEA,iBAyBgB,qBAAA,CACd,QAAA,EAAU,cAAA,GACT,oBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuCa,aAAA,KACV,MAAA,+BACQ,WAAA,GAAc,WAAA,CAAA,CAE1B,OAAA,EACI,oBAAA,CAAqB,CAAA,EAAG,QAAA,CAAS,CAAA,EAAG,GAAA,KACpC,sBAAA,CAAuB,cAAA,CAAe,CAAA,GAAI,QAAA,CAAS,CAAA,EAAG,GAAA"}
|
package/dist/context.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { useStream } from "./index.js";
|
|
2
|
+
import { InjectionToken, inject, makeEnvironmentProviders } from "@angular/core";
|
|
3
|
+
//#region src/context.ts
|
|
4
|
+
/**
|
|
5
|
+
* Injection token for stream default configuration.
|
|
6
|
+
* Provide via `provideStreamDefaults()` in your application config.
|
|
7
|
+
*/
|
|
8
|
+
const STREAM_DEFAULTS = new InjectionToken("LANGCHAIN_STREAM_DEFAULTS");
|
|
9
|
+
/**
|
|
10
|
+
* Injection token for a shared stream instance.
|
|
11
|
+
* Provide via `provideStream()` at the component level.
|
|
12
|
+
*/
|
|
13
|
+
const STREAM_INSTANCE = new InjectionToken("LANGCHAIN_STREAM_INSTANCE");
|
|
14
|
+
/**
|
|
15
|
+
* Provides default LangGraph configuration at the application level.
|
|
16
|
+
*
|
|
17
|
+
* Use this in your application's `providers` array to set defaults like
|
|
18
|
+
* `apiUrl` that will be used by all `useStream` and `injectStream` calls.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // app.config.ts
|
|
23
|
+
* import { ApplicationConfig } from "@angular/core";
|
|
24
|
+
* import { provideStreamDefaults } from "@langchain/angular";
|
|
25
|
+
*
|
|
26
|
+
* export const appConfig: ApplicationConfig = {
|
|
27
|
+
* providers: [
|
|
28
|
+
* provideStreamDefaults({
|
|
29
|
+
* apiUrl: "http://localhost:2024",
|
|
30
|
+
* }),
|
|
31
|
+
* ],
|
|
32
|
+
* };
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
function provideStreamDefaults(defaults) {
|
|
36
|
+
return makeEnvironmentProviders([{
|
|
37
|
+
provide: STREAM_DEFAULTS,
|
|
38
|
+
useValue: defaults
|
|
39
|
+
}]);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Creates a provider for a shared `useStream` instance at the component level.
|
|
43
|
+
*
|
|
44
|
+
* Add the returned provider to a component's `providers` array so that all
|
|
45
|
+
* child components can access the same stream via `injectStream()`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* import { Component } from "@angular/core";
|
|
50
|
+
* import { provideStream, injectStream } from "@langchain/angular";
|
|
51
|
+
*
|
|
52
|
+
* @Component({
|
|
53
|
+
* providers: [provideStream({ assistantId: "agent" })],
|
|
54
|
+
* template: `
|
|
55
|
+
* <app-message-list />
|
|
56
|
+
* <app-message-input />
|
|
57
|
+
* `,
|
|
58
|
+
* })
|
|
59
|
+
* export class ChatContainer {}
|
|
60
|
+
*
|
|
61
|
+
* // In child components:
|
|
62
|
+
* @Component({
|
|
63
|
+
* template: `
|
|
64
|
+
* @for (msg of stream.messages(); track msg.id) {
|
|
65
|
+
* <div>{{ msg.content }}</div>
|
|
66
|
+
* }
|
|
67
|
+
* `,
|
|
68
|
+
* })
|
|
69
|
+
* export class MessageListComponent {
|
|
70
|
+
* stream = injectStream();
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
function provideStream(options) {
|
|
75
|
+
return {
|
|
76
|
+
provide: STREAM_INSTANCE,
|
|
77
|
+
useFactory: () => {
|
|
78
|
+
const defaults = inject(STREAM_DEFAULTS, { optional: true });
|
|
79
|
+
return useStream({
|
|
80
|
+
...defaults ?? {},
|
|
81
|
+
...options,
|
|
82
|
+
apiUrl: options.apiUrl ?? defaults?.apiUrl,
|
|
83
|
+
client: options.client ?? defaults?.client
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { STREAM_DEFAULTS, STREAM_INSTANCE, provideStream, provideStreamDefaults };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":["angularInject"],"sources":["../src/context.ts"],"sourcesContent":["import {\n InjectionToken,\n inject as angularInject,\n type EnvironmentProviders,\n makeEnvironmentProviders,\n} from \"@angular/core\";\nimport type { BagTemplate } from \"@langchain/langgraph-sdk\";\nimport { Client } from \"@langchain/langgraph-sdk\";\nimport type {\n ResolveStreamOptions,\n InferBag,\n InferStateType,\n UseStreamCustomOptions,\n} from \"@langchain/langgraph-sdk/ui\";\nimport { useStream } from \"./index.js\";\n\n/**\n * Configuration defaults for `useStream` and `injectStream` calls.\n */\nexport interface StreamDefaults {\n /** Base URL of the LangGraph API. */\n apiUrl?: string;\n /** API key for authenticating with the LangGraph API. */\n apiKey?: string;\n /** Pre-configured Client instance. */\n client?: Client;\n}\n\n/**\n * Injection token for stream default configuration.\n * Provide via `provideStreamDefaults()` in your application config.\n */\nexport const STREAM_DEFAULTS = new InjectionToken<StreamDefaults>(\n \"LANGCHAIN_STREAM_DEFAULTS\",\n);\n\n/**\n * Injection token for a shared stream instance.\n * Provide via `provideStream()` at the component level.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const STREAM_INSTANCE = new InjectionToken<any>(\n \"LANGCHAIN_STREAM_INSTANCE\",\n);\n\n/**\n * Provides default LangGraph configuration at the application level.\n *\n * Use this in your application's `providers` array to set defaults like\n * `apiUrl` that will be used by all `useStream` and `injectStream` calls.\n *\n * @example\n * ```typescript\n * // app.config.ts\n * import { ApplicationConfig } from \"@angular/core\";\n * import { provideStreamDefaults } from \"@langchain/angular\";\n *\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideStreamDefaults({\n * apiUrl: \"http://localhost:2024\",\n * }),\n * ],\n * };\n * ```\n */\nexport function provideStreamDefaults(\n defaults: StreamDefaults,\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: STREAM_DEFAULTS, useValue: defaults },\n ]);\n}\n\n/**\n * Creates a provider for a shared `useStream` instance at the component level.\n *\n * Add the returned provider to a component's `providers` array so that all\n * child components can access the same stream via `injectStream()`.\n *\n * @example\n * ```typescript\n * import { Component } from \"@angular/core\";\n * import { provideStream, injectStream } from \"@langchain/angular\";\n *\n * @Component({\n * providers: [provideStream({ assistantId: \"agent\" })],\n * template: `\n * <app-message-list />\n * <app-message-input />\n * `,\n * })\n * export class ChatContainer {}\n *\n * // In child components:\n * @Component({\n * template: `\n * @for (msg of stream.messages(); track msg.id) {\n * <div>{{ msg.content }}</div>\n * }\n * `,\n * })\n * export class MessageListComponent {\n * stream = injectStream();\n * }\n * ```\n */\nexport function provideStream<\n T = Record<string, unknown>,\n Bag extends BagTemplate = BagTemplate,\n>(\n options:\n | ResolveStreamOptions<T, InferBag<T, Bag>>\n | UseStreamCustomOptions<InferStateType<T>, InferBag<T, Bag>>,\n) {\n return {\n provide: STREAM_INSTANCE,\n useFactory: () => {\n const defaults = angularInject(STREAM_DEFAULTS, { optional: true });\n const merged = {\n ...(defaults ?? {}),\n ...options,\n apiUrl: (options as Record<string, unknown>).apiUrl ?? defaults?.apiUrl,\n client: (options as Record<string, unknown>).client ?? defaults?.client,\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return useStream(merged as any);\n },\n };\n}\n"],"mappings":";;;;;;;AAgCA,MAAa,kBAAkB,IAAI,eACjC,4BACD;;;;;AAOD,MAAa,kBAAkB,IAAI,eACjC,4BACD;;;;;;;;;;;;;;;;;;;;;;AAuBD,SAAgB,sBACd,UACsB;AACtB,QAAO,yBAAyB,CAC9B;EAAE,SAAS;EAAiB,UAAU;EAAU,CACjD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCJ,SAAgB,cAId,SAGA;AACA,QAAO;EACL,SAAS;EACT,kBAAkB;GAChB,MAAM,WAAWA,OAAc,iBAAiB,EAAE,UAAU,MAAM,CAAC;AAQnE,UAAO,UAPQ;IACb,GAAI,YAAY,EAAE;IAClB,GAAG;IACH,QAAS,QAAoC,UAAU,UAAU;IACjE,QAAS,QAAoC,UAAU,UAAU;IAClE,CAE8B;;EAElC"}
|