langchain 1.0.0-alpha.7 → 1.0.0-alpha.9
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/LICENSE +6 -6
- package/dist/agents/ReactAgent.cjs +497 -104
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.d.cts +140 -17
- package/dist/agents/ReactAgent.d.cts.map +1 -1
- package/dist/agents/ReactAgent.d.ts +140 -17
- package/dist/agents/ReactAgent.d.ts.map +1 -1
- package/dist/agents/ReactAgent.js +500 -107
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/RunnableCallable.cjs +10 -0
- package/dist/agents/RunnableCallable.cjs.map +1 -1
- package/dist/agents/RunnableCallable.js +10 -0
- package/dist/agents/RunnableCallable.js.map +1 -1
- package/dist/agents/annotation.cjs +32 -135
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.js +34 -136
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/constants.cjs.map +1 -1
- package/dist/agents/constants.d.cts +9 -0
- package/dist/agents/constants.d.cts.map +1 -0
- package/dist/agents/constants.d.ts +9 -0
- package/dist/agents/constants.d.ts.map +1 -0
- package/dist/agents/constants.js.map +1 -1
- package/dist/agents/errors.cjs +2 -1
- package/dist/agents/errors.cjs.map +1 -1
- package/dist/agents/errors.d.cts +9 -2
- package/dist/agents/errors.d.cts.map +1 -1
- package/dist/agents/errors.d.ts +9 -2
- package/dist/agents/errors.d.ts.map +1 -1
- package/dist/agents/errors.js +2 -1
- package/dist/agents/errors.js.map +1 -1
- package/dist/agents/index.cjs +6 -27
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +159 -129
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +159 -129
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +6 -25
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/middleware/callLimit.cjs +128 -0
- package/dist/agents/middleware/callLimit.cjs.map +1 -0
- package/dist/agents/middleware/callLimit.d.cts +119 -0
- package/dist/agents/middleware/callLimit.d.cts.map +1 -0
- package/dist/agents/middleware/callLimit.d.ts +119 -0
- package/dist/agents/middleware/callLimit.d.ts.map +1 -0
- package/dist/agents/middleware/callLimit.js +127 -0
- package/dist/agents/middleware/callLimit.js.map +1 -0
- package/dist/agents/middleware/contextEditing.cjs +278 -0
- package/dist/agents/middleware/contextEditing.cjs.map +1 -0
- package/dist/agents/middleware/contextEditing.d.cts +239 -0
- package/dist/agents/middleware/contextEditing.d.cts.map +1 -0
- package/dist/agents/middleware/contextEditing.d.ts +239 -0
- package/dist/agents/middleware/contextEditing.d.ts.map +1 -0
- package/dist/agents/middleware/contextEditing.js +276 -0
- package/dist/agents/middleware/contextEditing.js.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.cjs +58 -0
- package/dist/agents/middleware/dynamicSystemPrompt.cjs.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts +47 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts +47 -0
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -0
- package/dist/agents/middleware/dynamicSystemPrompt.js +58 -0
- package/dist/agents/middleware/dynamicSystemPrompt.js.map +1 -0
- package/dist/agents/middleware/hitl.cjs +404 -0
- package/dist/agents/middleware/hitl.cjs.map +1 -0
- package/dist/agents/middleware/hitl.d.cts +611 -0
- package/dist/agents/middleware/hitl.d.cts.map +1 -0
- package/dist/agents/middleware/hitl.d.ts +611 -0
- package/dist/agents/middleware/hitl.d.ts.map +1 -0
- package/dist/agents/middleware/hitl.js +403 -0
- package/dist/agents/middleware/hitl.js.map +1 -0
- package/dist/agents/middleware/index.cjs +12 -0
- package/dist/agents/middleware/index.js +12 -0
- package/dist/agents/middleware/llmToolSelector.cjs +193 -0
- package/dist/agents/middleware/llmToolSelector.cjs.map +1 -0
- package/dist/agents/middleware/llmToolSelector.d.cts +83 -0
- package/dist/agents/middleware/llmToolSelector.d.cts.map +1 -0
- package/dist/agents/middleware/llmToolSelector.d.ts +83 -0
- package/dist/agents/middleware/llmToolSelector.d.ts.map +1 -0
- package/dist/agents/middleware/llmToolSelector.js +192 -0
- package/dist/agents/middleware/llmToolSelector.js.map +1 -0
- package/dist/agents/middleware/modelFallback.cjs +74 -0
- package/dist/agents/middleware/modelFallback.cjs.map +1 -0
- package/dist/agents/middleware/modelFallback.d.cts +45 -0
- package/dist/agents/middleware/modelFallback.d.cts.map +1 -0
- package/dist/agents/middleware/modelFallback.d.ts +45 -0
- package/dist/agents/middleware/modelFallback.d.ts.map +1 -0
- package/dist/agents/middleware/modelFallback.js +74 -0
- package/dist/agents/middleware/modelFallback.js.map +1 -0
- package/dist/agents/middleware/piiRedaction.cjs +333 -0
- package/dist/agents/middleware/piiRedaction.cjs.map +1 -0
- package/dist/agents/middleware/piiRedaction.d.cts +155 -0
- package/dist/agents/middleware/piiRedaction.d.cts.map +1 -0
- package/dist/agents/middleware/piiRedaction.d.ts +155 -0
- package/dist/agents/middleware/piiRedaction.d.ts.map +1 -0
- package/dist/agents/middleware/piiRedaction.js +332 -0
- package/dist/agents/middleware/piiRedaction.js.map +1 -0
- package/dist/agents/middleware/promptCaching.cjs +213 -0
- package/dist/agents/middleware/promptCaching.cjs.map +1 -0
- package/dist/agents/middleware/promptCaching.d.cts +197 -0
- package/dist/agents/middleware/promptCaching.d.cts.map +1 -0
- package/dist/agents/middleware/promptCaching.d.ts +197 -0
- package/dist/agents/middleware/promptCaching.d.ts.map +1 -0
- package/dist/agents/middleware/promptCaching.js +212 -0
- package/dist/agents/middleware/promptCaching.js.map +1 -0
- package/dist/agents/middleware/summarization.cjs +249 -0
- package/dist/agents/middleware/summarization.cjs.map +1 -0
- package/dist/agents/middleware/summarization.d.cts +84 -0
- package/dist/agents/middleware/summarization.d.cts.map +1 -0
- package/dist/agents/middleware/summarization.d.ts +84 -0
- package/dist/agents/middleware/summarization.d.ts.map +1 -0
- package/dist/agents/middleware/summarization.js +248 -0
- package/dist/agents/middleware/summarization.js.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.cjs +314 -0
- package/dist/agents/middleware/todoListMiddleware.cjs.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.d.cts +75 -0
- package/dist/agents/middleware/todoListMiddleware.d.cts.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.d.ts +75 -0
- package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -0
- package/dist/agents/middleware/todoListMiddleware.js +312 -0
- package/dist/agents/middleware/todoListMiddleware.js.map +1 -0
- package/dist/agents/middleware/toolCallLimit.cjs +242 -0
- package/dist/agents/middleware/toolCallLimit.cjs.map +1 -0
- package/dist/agents/middleware/toolCallLimit.d.cts +158 -0
- package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -0
- package/dist/agents/middleware/toolCallLimit.d.ts +158 -0
- package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -0
- package/dist/agents/middleware/toolCallLimit.js +240 -0
- package/dist/agents/middleware/toolCallLimit.js.map +1 -0
- package/dist/agents/middleware/types.d.cts +208 -0
- package/dist/agents/middleware/types.d.cts.map +1 -0
- package/dist/agents/middleware/types.d.ts +208 -0
- package/dist/agents/middleware/types.d.ts.map +1 -0
- package/dist/agents/middleware/utils.cjs +26 -0
- package/dist/agents/middleware/utils.cjs.map +1 -0
- package/dist/agents/middleware/utils.d.cts +13 -0
- package/dist/agents/middleware/utils.d.cts.map +1 -0
- package/dist/agents/middleware/utils.d.ts +13 -0
- package/dist/agents/middleware/utils.d.ts.map +1 -0
- package/dist/agents/middleware/utils.js +25 -0
- package/dist/agents/middleware/utils.js.map +1 -0
- package/dist/agents/middleware.cjs +58 -0
- package/dist/agents/middleware.cjs.map +1 -0
- package/dist/agents/middleware.d.cts +205 -0
- package/dist/agents/middleware.d.cts.map +1 -0
- package/dist/agents/middleware.d.ts +205 -0
- package/dist/agents/middleware.d.ts.map +1 -0
- package/dist/agents/middleware.js +57 -0
- package/dist/agents/middleware.js.map +1 -0
- package/dist/agents/nodes/AfterAgentNode.cjs +27 -0
- package/dist/agents/nodes/AfterAgentNode.cjs.map +1 -0
- package/dist/agents/nodes/AfterAgentNode.js +27 -0
- package/dist/agents/nodes/AfterAgentNode.js.map +1 -0
- package/dist/agents/nodes/AfterModelNode.cjs +27 -0
- package/dist/agents/nodes/AfterModelNode.cjs.map +1 -0
- package/dist/agents/nodes/AfterModelNode.js +27 -0
- package/dist/agents/nodes/AfterModelNode.js.map +1 -0
- package/dist/agents/nodes/AgentNode.cjs +202 -71
- package/dist/agents/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/nodes/AgentNode.js +204 -73
- package/dist/agents/nodes/AgentNode.js.map +1 -1
- package/dist/agents/nodes/BeforeAgentNode.cjs +27 -0
- package/dist/agents/nodes/BeforeAgentNode.cjs.map +1 -0
- package/dist/agents/nodes/BeforeAgentNode.js +27 -0
- package/dist/agents/nodes/BeforeAgentNode.js.map +1 -0
- package/dist/agents/nodes/BeforeModelNode.cjs +27 -0
- package/dist/agents/nodes/BeforeModelNode.cjs.map +1 -0
- package/dist/agents/nodes/BeforeModelNode.js +27 -0
- package/dist/agents/nodes/BeforeModelNode.js.map +1 -0
- package/dist/agents/nodes/ToolNode.cjs +157 -47
- package/dist/agents/nodes/ToolNode.cjs.map +1 -1
- package/dist/agents/nodes/ToolNode.js +158 -48
- package/dist/agents/nodes/ToolNode.js.map +1 -1
- package/dist/agents/nodes/middleware.cjs +124 -0
- package/dist/agents/nodes/middleware.cjs.map +1 -0
- package/dist/agents/nodes/middleware.js +123 -0
- package/dist/agents/nodes/middleware.js.map +1 -0
- package/dist/agents/nodes/types.d.cts +57 -0
- package/dist/agents/nodes/types.d.cts.map +1 -0
- package/dist/agents/nodes/types.d.ts +57 -0
- package/dist/agents/nodes/types.d.ts.map +1 -0
- package/dist/agents/nodes/utils.cjs +64 -0
- package/dist/agents/nodes/utils.cjs.map +1 -1
- package/dist/agents/nodes/utils.js +62 -1
- package/dist/agents/nodes/utils.js.map +1 -1
- package/dist/agents/responses.cjs +1 -1
- package/dist/agents/responses.cjs.map +1 -1
- package/dist/agents/responses.d.cts +9 -2
- package/dist/agents/responses.d.cts.map +1 -1
- package/dist/agents/responses.d.ts +8 -1
- package/dist/agents/responses.d.ts.map +1 -1
- package/dist/agents/responses.js +1 -1
- package/dist/agents/responses.js.map +1 -1
- package/dist/agents/runtime.d.cts +123 -0
- package/dist/agents/runtime.d.cts.map +1 -0
- package/dist/agents/runtime.d.ts +123 -0
- package/dist/agents/runtime.d.ts.map +1 -0
- package/dist/agents/tests/utils.cjs +85 -0
- package/dist/agents/tests/utils.cjs.map +1 -0
- package/dist/agents/tests/utils.d.cts +62 -0
- package/dist/agents/tests/utils.d.cts.map +1 -0
- package/dist/agents/tests/utils.d.ts +62 -0
- package/dist/agents/tests/utils.d.ts.map +1 -0
- package/dist/agents/tests/utils.js +84 -0
- package/dist/agents/tests/utils.js.map +1 -0
- package/dist/agents/tools.d.cts +9 -0
- package/dist/agents/tools.d.cts.map +1 -0
- package/dist/agents/tools.d.ts +9 -0
- package/dist/agents/tools.d.ts.map +1 -0
- package/dist/agents/types.d.cts +139 -106
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +139 -106
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/utils.cjs +141 -38
- package/dist/agents/utils.cjs.map +1 -1
- package/dist/agents/utils.js +142 -40
- package/dist/agents/utils.js.map +1 -1
- package/dist/chat_models/universal.cjs +11 -0
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts +12 -3
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +11 -2
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +11 -0
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/hub/base.cjs +8 -4
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.d.cts +0 -4
- package/dist/hub/base.d.cts.map +1 -1
- package/dist/hub/base.d.ts +0 -4
- package/dist/hub/base.d.ts.map +1 -1
- package/dist/hub/base.js +8 -4
- package/dist/hub/base.js.map +1 -1
- package/dist/index.cjs +53 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -14
- package/dist/index.d.ts +23 -14
- package/dist/index.js +35 -12
- package/dist/index.js.map +1 -1
- package/dist/load/import_constants.cjs +0 -19
- package/dist/load/import_constants.cjs.map +1 -1
- package/dist/load/import_constants.js +0 -19
- package/dist/load/import_constants.js.map +1 -1
- package/dist/load/import_map.cjs +2 -115
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +3 -116
- package/dist/load/import_map.js.map +1 -1
- package/dist/load/serializable.d.cts +1 -10
- package/dist/load/serializable.d.ts +1 -10
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs +3096 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js +3095 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.cjs +12 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.js +12 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.cjs +71 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.js +38 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.cjs +221 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.js +221 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.cjs +11 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.js +11 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs +703 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js +702 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.cjs +7 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.js +6 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.cjs +29 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.js +28 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.cjs +115 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.js +113 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.cjs +14 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.js +13 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs +95 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js +95 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs +136 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js +131 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs +102 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js +99 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +140 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +140 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.cjs +18 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.js +16 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.cjs +10 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.js +10 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.cjs +30 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.js +30 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.js.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.cjs +13 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.cjs.map +1 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.js +12 -0
- package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.js.map +1 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs +83 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js +79 -0
- package/dist/node_modules/.pnpm/p-retry@4.6.2/node_modules/p-retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs +16 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js +13 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs +77 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js +74 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs +115 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.cjs.map +1 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js +112 -0
- package/dist/node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js.map +1 -0
- package/dist/storage/encoder_backed.cjs +1 -1
- package/dist/storage/encoder_backed.d.cts +1 -1
- package/dist/storage/encoder_backed.d.ts +1 -1
- package/dist/storage/encoder_backed.js +1 -1
- package/dist/storage/file_system.cjs +1 -1
- package/dist/storage/file_system.js +1 -1
- package/package.json +31 -658
- package/dist/agents/RunnableCallable.d.cts +0 -36
- package/dist/agents/RunnableCallable.d.cts.map +0 -1
- package/dist/agents/RunnableCallable.d.ts +0 -36
- package/dist/agents/RunnableCallable.d.ts.map +0 -1
- package/dist/agents/annotation.d.cts +0 -47
- package/dist/agents/annotation.d.cts.map +0 -1
- package/dist/agents/annotation.d.ts +0 -47
- package/dist/agents/annotation.d.ts.map +0 -1
- package/dist/agents/createAgent.cjs +0 -10
- package/dist/agents/createAgent.cjs.map +0 -1
- package/dist/agents/createAgent.js +0 -10
- package/dist/agents/createAgent.js.map +0 -1
- package/dist/agents/interrupt.cjs +0 -2
- package/dist/agents/interrupt.d.cts +0 -92
- package/dist/agents/interrupt.d.cts.map +0 -1
- package/dist/agents/interrupt.d.ts +0 -95
- package/dist/agents/interrupt.d.ts.map +0 -1
- package/dist/agents/interrupt.js +0 -1
- package/dist/agents/middlewareAgent/ReactAgent.cjs +0 -462
- package/dist/agents/middlewareAgent/ReactAgent.cjs.map +0 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.cts +0 -154
- package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.ts +0 -154
- package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/ReactAgent.js +0 -461
- package/dist/agents/middlewareAgent/ReactAgent.js.map +0 -1
- package/dist/agents/middlewareAgent/annotation.cjs +0 -45
- package/dist/agents/middlewareAgent/annotation.cjs.map +0 -1
- package/dist/agents/middlewareAgent/annotation.js +0 -44
- package/dist/agents/middlewareAgent/annotation.js.map +0 -1
- package/dist/agents/middlewareAgent/constants.d.cts +0 -5
- package/dist/agents/middlewareAgent/constants.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/constants.d.ts +0 -5
- package/dist/agents/middlewareAgent/constants.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/index.cjs +0 -11
- package/dist/agents/middlewareAgent/index.cjs.map +0 -1
- package/dist/agents/middlewareAgent/index.js +0 -11
- package/dist/agents/middlewareAgent/index.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs +0 -162
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts +0 -113
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts +0 -113
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.js +0 -161
- package/dist/agents/middlewareAgent/middleware/bigTool.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs +0 -58
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts +0 -46
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts +0 -46
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js +0 -58
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/hitl.cjs +0 -311
- package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts +0 -419
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts +0 -419
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/hitl.js +0 -310
- package/dist/agents/middlewareAgent/middleware/hitl.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/index.cjs +0 -32
- package/dist/agents/middlewareAgent/middleware/index.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/index.d.cts +0 -6
- package/dist/agents/middlewareAgent/middleware/index.d.ts +0 -6
- package/dist/agents/middlewareAgent/middleware/index.js +0 -21
- package/dist/agents/middlewareAgent/middleware/index.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs +0 -198
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts +0 -197
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts +0 -197
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/promptCaching.js +0 -197
- package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware/summarization.cjs +0 -274
- package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts +0 -91
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts +0 -91
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware/summarization.js +0 -272
- package/dist/agents/middlewareAgent/middleware/summarization.js.map +0 -1
- package/dist/agents/middlewareAgent/middleware.cjs +0 -50
- package/dist/agents/middlewareAgent/middleware.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middleware.d.cts +0 -106
- package/dist/agents/middlewareAgent/middleware.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middleware.d.ts +0 -106
- package/dist/agents/middlewareAgent/middleware.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middleware.js +0 -49
- package/dist/agents/middlewareAgent/middleware.js.map +0 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs +0 -29
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +0 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js +0 -29
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +0 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +0 -374
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +0 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.js +0 -373
- package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +0 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs +0 -27
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +0 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js +0 -27
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +0 -1
- package/dist/agents/middlewareAgent/nodes/middleware.cjs +0 -98
- package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +0 -1
- package/dist/agents/middlewareAgent/nodes/middleware.js +0 -97
- package/dist/agents/middlewareAgent/nodes/middleware.js.map +0 -1
- package/dist/agents/middlewareAgent/nodes/utils.cjs +0 -88
- package/dist/agents/middlewareAgent/nodes/utils.cjs.map +0 -1
- package/dist/agents/middlewareAgent/nodes/utils.js +0 -84
- package/dist/agents/middlewareAgent/nodes/utils.js.map +0 -1
- package/dist/agents/middlewareAgent/types.d.cts +0 -467
- package/dist/agents/middlewareAgent/types.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/types.d.ts +0 -467
- package/dist/agents/middlewareAgent/types.d.ts.map +0 -1
- package/dist/agents/nodes/ToolNode.d.cts +0 -97
- package/dist/agents/nodes/ToolNode.d.cts.map +0 -1
- package/dist/agents/nodes/ToolNode.d.ts +0 -97
- package/dist/agents/nodes/ToolNode.d.ts.map +0 -1
- package/dist/chains/analyze_documents_chain.cjs +0 -83
- package/dist/chains/analyze_documents_chain.cjs.map +0 -1
- package/dist/chains/analyze_documents_chain.d.cts +0 -58
- package/dist/chains/analyze_documents_chain.d.cts.map +0 -1
- package/dist/chains/analyze_documents_chain.d.ts +0 -58
- package/dist/chains/analyze_documents_chain.d.ts.map +0 -1
- package/dist/chains/analyze_documents_chain.js +0 -82
- package/dist/chains/analyze_documents_chain.js.map +0 -1
- package/dist/chains/api/api_chain.cjs +0 -100
- package/dist/chains/api/api_chain.cjs.map +0 -1
- package/dist/chains/api/api_chain.d.cts +0 -63
- package/dist/chains/api/api_chain.d.cts.map +0 -1
- package/dist/chains/api/api_chain.d.ts +0 -63
- package/dist/chains/api/api_chain.d.ts.map +0 -1
- package/dist/chains/api/api_chain.js +0 -100
- package/dist/chains/api/api_chain.js.map +0 -1
- package/dist/chains/api/prompts.cjs +0 -38
- package/dist/chains/api/prompts.cjs.map +0 -1
- package/dist/chains/api/prompts.js +0 -36
- package/dist/chains/api/prompts.js.map +0 -1
- package/dist/chains/base.cjs +0 -180
- package/dist/chains/base.cjs.map +0 -1
- package/dist/chains/base.d.cts +0 -88
- package/dist/chains/base.d.cts.map +0 -1
- package/dist/chains/base.d.ts +0 -88
- package/dist/chains/base.d.ts.map +0 -1
- package/dist/chains/base.js +0 -179
- package/dist/chains/base.js.map +0 -1
- package/dist/chains/chat_vector_db_chain.cjs +0 -130
- package/dist/chains/chat_vector_db_chain.cjs.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.cts +0 -62
- package/dist/chains/chat_vector_db_chain.d.cts.map +0 -1
- package/dist/chains/chat_vector_db_chain.d.ts +0 -62
- package/dist/chains/chat_vector_db_chain.d.ts.map +0 -1
- package/dist/chains/chat_vector_db_chain.js +0 -129
- package/dist/chains/chat_vector_db_chain.js.map +0 -1
- package/dist/chains/combine_docs_chain.cjs +0 -275
- package/dist/chains/combine_docs_chain.cjs.map +0 -1
- package/dist/chains/combine_docs_chain.d.cts +0 -126
- package/dist/chains/combine_docs_chain.d.cts.map +0 -1
- package/dist/chains/combine_docs_chain.d.ts +0 -126
- package/dist/chains/combine_docs_chain.d.ts.map +0 -1
- package/dist/chains/combine_docs_chain.js +0 -272
- package/dist/chains/combine_docs_chain.js.map +0 -1
- package/dist/chains/combine_documents/base.cjs +0 -22
- package/dist/chains/combine_documents/base.cjs.map +0 -1
- package/dist/chains/combine_documents/base.js +0 -18
- package/dist/chains/combine_documents/base.js.map +0 -1
- package/dist/chains/combine_documents/index.cjs +0 -16
- package/dist/chains/combine_documents/index.cjs.map +0 -1
- package/dist/chains/combine_documents/index.d.cts +0 -2
- package/dist/chains/combine_documents/index.d.ts +0 -2
- package/dist/chains/combine_documents/index.js +0 -10
- package/dist/chains/combine_documents/index.js.map +0 -1
- package/dist/chains/combine_documents/reduce.cjs +0 -73
- package/dist/chains/combine_documents/reduce.cjs.map +0 -1
- package/dist/chains/combine_documents/reduce.d.cts +0 -36
- package/dist/chains/combine_documents/reduce.d.cts.map +0 -1
- package/dist/chains/combine_documents/reduce.d.ts +0 -36
- package/dist/chains/combine_documents/reduce.d.ts.map +0 -1
- package/dist/chains/combine_documents/reduce.js +0 -66
- package/dist/chains/combine_documents/reduce.js.map +0 -1
- package/dist/chains/combine_documents/stuff.cjs +0 -41
- package/dist/chains/combine_documents/stuff.cjs.map +0 -1
- package/dist/chains/combine_documents/stuff.d.cts +0 -40
- package/dist/chains/combine_documents/stuff.d.cts.map +0 -1
- package/dist/chains/combine_documents/stuff.d.ts +0 -40
- package/dist/chains/combine_documents/stuff.d.ts.map +0 -1
- package/dist/chains/combine_documents/stuff.js +0 -40
- package/dist/chains/combine_documents/stuff.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts +0 -79
- package/dist/chains/constitutional_ai/constitutional_chain.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js +0 -131
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.cjs +0 -322
- package/dist/chains/constitutional_ai/constitutional_principle.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.cts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts +0 -50
- package/dist/chains/constitutional_ai/constitutional_principle.d.ts.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_principle.js +0 -320
- package/dist/chains/constitutional_ai/constitutional_principle.js.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs +0 -96
- package/dist/chains/constitutional_ai/constitutional_prompts.cjs.map +0 -1
- package/dist/chains/constitutional_ai/constitutional_prompts.js +0 -94
- package/dist/chains/constitutional_ai/constitutional_prompts.js.map +0 -1
- package/dist/chains/conversation.cjs +0 -50
- package/dist/chains/conversation.cjs.map +0 -1
- package/dist/chains/conversation.d.cts +0 -34
- package/dist/chains/conversation.d.cts.map +0 -1
- package/dist/chains/conversation.d.ts +0 -34
- package/dist/chains/conversation.d.ts.map +0 -1
- package/dist/chains/conversation.js +0 -48
- package/dist/chains/conversation.js.map +0 -1
- package/dist/chains/conversational_retrieval_chain.cjs +0 -218
- package/dist/chains/conversational_retrieval_chain.cjs.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.cts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.cts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.d.ts +0 -152
- package/dist/chains/conversational_retrieval_chain.d.ts.map +0 -1
- package/dist/chains/conversational_retrieval_chain.js +0 -217
- package/dist/chains/conversational_retrieval_chain.js.map +0 -1
- package/dist/chains/graph_qa/cypher.cjs +0 -133
- package/dist/chains/graph_qa/cypher.cjs.map +0 -1
- package/dist/chains/graph_qa/cypher.d.cts +0 -76
- package/dist/chains/graph_qa/cypher.d.cts.map +0 -1
- package/dist/chains/graph_qa/cypher.d.ts +0 -76
- package/dist/chains/graph_qa/cypher.d.ts.map +0 -1
- package/dist/chains/graph_qa/cypher.js +0 -126
- package/dist/chains/graph_qa/cypher.js.map +0 -1
- package/dist/chains/graph_qa/prompts.cjs +0 -46
- package/dist/chains/graph_qa/prompts.cjs.map +0 -1
- package/dist/chains/graph_qa/prompts.js +0 -44
- package/dist/chains/graph_qa/prompts.js.map +0 -1
- package/dist/chains/history_aware_retriever.cjs +0 -55
- package/dist/chains/history_aware_retriever.cjs.map +0 -1
- package/dist/chains/history_aware_retriever.d.cts +0 -64
- package/dist/chains/history_aware_retriever.d.cts.map +0 -1
- package/dist/chains/history_aware_retriever.d.ts +0 -64
- package/dist/chains/history_aware_retriever.d.ts.map +0 -1
- package/dist/chains/history_aware_retriever.js +0 -49
- package/dist/chains/history_aware_retriever.js.map +0 -1
- package/dist/chains/index.cjs +0 -106
- package/dist/chains/index.cjs.map +0 -1
- package/dist/chains/index.d.cts +0 -25
- package/dist/chains/index.d.ts +0 -25
- package/dist/chains/index.js +0 -67
- package/dist/chains/index.js.map +0 -1
- package/dist/chains/llm_chain.cjs +0 -155
- package/dist/chains/llm_chain.cjs.map +0 -1
- package/dist/chains/llm_chain.d.cts +0 -97
- package/dist/chains/llm_chain.d.cts.map +0 -1
- package/dist/chains/llm_chain.d.ts +0 -97
- package/dist/chains/llm_chain.d.ts.map +0 -1
- package/dist/chains/llm_chain.js +0 -154
- package/dist/chains/llm_chain.js.map +0 -1
- package/dist/chains/load.cjs +0 -48
- package/dist/chains/load.cjs.map +0 -1
- package/dist/chains/load.d.cts +0 -30
- package/dist/chains/load.d.cts.map +0 -1
- package/dist/chains/load.d.ts +0 -30
- package/dist/chains/load.d.ts.map +0 -1
- package/dist/chains/load.js +0 -42
- package/dist/chains/load.js.map +0 -1
- package/dist/chains/openai_functions/base.cjs +0 -139
- package/dist/chains/openai_functions/base.cjs.map +0 -1
- package/dist/chains/openai_functions/base.d.cts +0 -172
- package/dist/chains/openai_functions/base.d.cts.map +0 -1
- package/dist/chains/openai_functions/base.d.ts +0 -172
- package/dist/chains/openai_functions/base.d.ts.map +0 -1
- package/dist/chains/openai_functions/base.js +0 -137
- package/dist/chains/openai_functions/base.js.map +0 -1
- package/dist/chains/openai_functions/extraction.cjs +0 -71
- package/dist/chains/openai_functions/extraction.cjs.map +0 -1
- package/dist/chains/openai_functions/extraction.d.cts +0 -29
- package/dist/chains/openai_functions/extraction.d.cts.map +0 -1
- package/dist/chains/openai_functions/extraction.d.ts +0 -29
- package/dist/chains/openai_functions/extraction.d.ts.map +0 -1
- package/dist/chains/openai_functions/extraction.js +0 -69
- package/dist/chains/openai_functions/extraction.js.map +0 -1
- package/dist/chains/openai_functions/index.cjs +0 -33
- package/dist/chains/openai_functions/index.cjs.map +0 -1
- package/dist/chains/openai_functions/index.d.cts +0 -5
- package/dist/chains/openai_functions/index.d.ts +0 -5
- package/dist/chains/openai_functions/index.js +0 -21
- package/dist/chains/openai_functions/index.js.map +0 -1
- package/dist/chains/openai_functions/openapi.cjs +0 -287
- package/dist/chains/openai_functions/openapi.cjs.map +0 -1
- package/dist/chains/openai_functions/openapi.d.cts +0 -61
- package/dist/chains/openai_functions/openapi.d.cts.map +0 -1
- package/dist/chains/openai_functions/openapi.d.ts +0 -61
- package/dist/chains/openai_functions/openapi.d.ts.map +0 -1
- package/dist/chains/openai_functions/openapi.js +0 -285
- package/dist/chains/openai_functions/openapi.js.map +0 -1
- package/dist/chains/openai_functions/tagging.cjs +0 -72
- package/dist/chains/openai_functions/tagging.cjs.map +0 -1
- package/dist/chains/openai_functions/tagging.d.cts +0 -47
- package/dist/chains/openai_functions/tagging.d.cts.map +0 -1
- package/dist/chains/openai_functions/tagging.d.ts +0 -47
- package/dist/chains/openai_functions/tagging.d.ts.map +0 -1
- package/dist/chains/openai_functions/tagging.js +0 -70
- package/dist/chains/openai_functions/tagging.js.map +0 -1
- package/dist/chains/query_constructor/index.cjs +0 -145
- package/dist/chains/query_constructor/index.cjs.map +0 -1
- package/dist/chains/query_constructor/index.d.cts +0 -82
- package/dist/chains/query_constructor/index.d.cts.map +0 -1
- package/dist/chains/query_constructor/index.d.ts +0 -82
- package/dist/chains/query_constructor/index.d.ts.map +0 -1
- package/dist/chains/query_constructor/index.js +0 -130
- package/dist/chains/query_constructor/index.js.map +0 -1
- package/dist/chains/query_constructor/ir.cjs +0 -22
- package/dist/chains/query_constructor/ir.cjs.map +0 -1
- package/dist/chains/query_constructor/ir.d.cts +0 -1
- package/dist/chains/query_constructor/ir.d.ts +0 -1
- package/dist/chains/query_constructor/ir.js +0 -12
- package/dist/chains/query_constructor/ir.js.map +0 -1
- package/dist/chains/query_constructor/parser.cjs +0 -80
- package/dist/chains/query_constructor/parser.cjs.map +0 -1
- package/dist/chains/query_constructor/parser.d.cts +0 -43
- package/dist/chains/query_constructor/parser.d.cts.map +0 -1
- package/dist/chains/query_constructor/parser.d.ts +0 -43
- package/dist/chains/query_constructor/parser.d.ts.map +0 -1
- package/dist/chains/query_constructor/parser.js +0 -79
- package/dist/chains/query_constructor/parser.js.map +0 -1
- package/dist/chains/query_constructor/prompt.cjs +0 -137
- package/dist/chains/query_constructor/prompt.cjs.map +0 -1
- package/dist/chains/query_constructor/prompt.d.cts +0 -22
- package/dist/chains/query_constructor/prompt.d.cts.map +0 -1
- package/dist/chains/query_constructor/prompt.d.ts +0 -22
- package/dist/chains/query_constructor/prompt.d.ts.map +0 -1
- package/dist/chains/query_constructor/prompt.js +0 -132
- package/dist/chains/query_constructor/prompt.js.map +0 -1
- package/dist/chains/question_answering/load.cjs +0 -99
- package/dist/chains/question_answering/load.cjs.map +0 -1
- package/dist/chains/question_answering/load.d.cts +0 -72
- package/dist/chains/question_answering/load.d.cts.map +0 -1
- package/dist/chains/question_answering/load.d.ts +0 -72
- package/dist/chains/question_answering/load.d.ts.map +0 -1
- package/dist/chains/question_answering/load.js +0 -96
- package/dist/chains/question_answering/load.js.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs +0 -61
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/map_reduce_prompts.js +0 -59
- package/dist/chains/question_answering/map_reduce_prompts.js.map +0 -1
- package/dist/chains/question_answering/refine_prompts.cjs +0 -60
- package/dist/chains/question_answering/refine_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/refine_prompts.js +0 -58
- package/dist/chains/question_answering/refine_prompts.js.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.cjs +0 -20
- package/dist/chains/question_answering/stuff_prompts.cjs.map +0 -1
- package/dist/chains/question_answering/stuff_prompts.js +0 -19
- package/dist/chains/question_answering/stuff_prompts.js.map +0 -1
- package/dist/chains/retrieval.cjs +0 -55
- package/dist/chains/retrieval.cjs.map +0 -1
- package/dist/chains/retrieval.d.cts +0 -77
- package/dist/chains/retrieval.d.cts.map +0 -1
- package/dist/chains/retrieval.d.ts +0 -77
- package/dist/chains/retrieval.d.ts.map +0 -1
- package/dist/chains/retrieval.js +0 -49
- package/dist/chains/retrieval.js.map +0 -1
- package/dist/chains/retrieval_qa.cjs +0 -106
- package/dist/chains/retrieval_qa.cjs.map +0 -1
- package/dist/chains/retrieval_qa.d.cts +0 -81
- package/dist/chains/retrieval_qa.d.cts.map +0 -1
- package/dist/chains/retrieval_qa.d.ts +0 -81
- package/dist/chains/retrieval_qa.d.ts.map +0 -1
- package/dist/chains/retrieval_qa.js +0 -106
- package/dist/chains/retrieval_qa.js.map +0 -1
- package/dist/chains/router/llm_router.cjs +0 -50
- package/dist/chains/router/llm_router.cjs.map +0 -1
- package/dist/chains/router/llm_router.d.cts +0 -54
- package/dist/chains/router/llm_router.d.cts.map +0 -1
- package/dist/chains/router/llm_router.d.ts +0 -54
- package/dist/chains/router/llm_router.d.ts.map +0 -1
- package/dist/chains/router/llm_router.js +0 -50
- package/dist/chains/router/llm_router.js.map +0 -1
- package/dist/chains/router/multi_prompt.cjs +0 -116
- package/dist/chains/router/multi_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt.d.cts +0 -76
- package/dist/chains/router/multi_prompt.d.cts.map +0 -1
- package/dist/chains/router/multi_prompt.d.ts +0 -76
- package/dist/chains/router/multi_prompt.d.ts.map +0 -1
- package/dist/chains/router/multi_prompt.js +0 -115
- package/dist/chains/router/multi_prompt.js.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.cjs +0 -22
- package/dist/chains/router/multi_prompt_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_prompt_prompt.js +0 -21
- package/dist/chains/router/multi_prompt_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.cjs +0 -22
- package/dist/chains/router/multi_retrieval_prompt.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_prompt.js +0 -21
- package/dist/chains/router/multi_retrieval_prompt.js.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +0 -137
- package/dist/chains/router/multi_retrieval_qa.cjs.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.cts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.cts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.d.ts +0 -100
- package/dist/chains/router/multi_retrieval_qa.d.ts.map +0 -1
- package/dist/chains/router/multi_retrieval_qa.js +0 -136
- package/dist/chains/router/multi_retrieval_qa.js.map +0 -1
- package/dist/chains/router/multi_route.cjs +0 -69
- package/dist/chains/router/multi_route.cjs.map +0 -1
- package/dist/chains/router/multi_route.d.cts +0 -69
- package/dist/chains/router/multi_route.d.cts.map +0 -1
- package/dist/chains/router/multi_route.d.ts +0 -69
- package/dist/chains/router/multi_route.d.ts.map +0 -1
- package/dist/chains/router/multi_route.js +0 -68
- package/dist/chains/router/multi_route.js.map +0 -1
- package/dist/chains/router/utils.cjs +0 -18
- package/dist/chains/router/utils.cjs.map +0 -1
- package/dist/chains/router/utils.js +0 -17
- package/dist/chains/router/utils.js.map +0 -1
- package/dist/chains/sequential_chain.cjs +0 -255
- package/dist/chains/sequential_chain.cjs.map +0 -1
- package/dist/chains/sequential_chain.d.cts +0 -158
- package/dist/chains/sequential_chain.d.cts.map +0 -1
- package/dist/chains/sequential_chain.d.ts +0 -158
- package/dist/chains/sequential_chain.d.ts.map +0 -1
- package/dist/chains/sequential_chain.js +0 -254
- package/dist/chains/sequential_chain.js.map +0 -1
- package/dist/chains/serde.d.cts +0 -156
- package/dist/chains/serde.d.cts.map +0 -1
- package/dist/chains/serde.d.ts +0 -156
- package/dist/chains/serde.d.ts.map +0 -1
- package/dist/chains/sql_db/index.cjs +0 -35
- package/dist/chains/sql_db/index.cjs.map +0 -1
- package/dist/chains/sql_db/index.d.cts +0 -3
- package/dist/chains/sql_db/index.d.ts +0 -3
- package/dist/chains/sql_db/index.js +0 -21
- package/dist/chains/sql_db/index.js.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.cjs +0 -196
- package/dist/chains/sql_db/sql_db_chain.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.cts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.d.ts +0 -124
- package/dist/chains/sql_db/sql_db_chain.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_chain.js +0 -194
- package/dist/chains/sql_db/sql_db_chain.js.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.cjs +0 -194
- package/dist/chains/sql_db/sql_db_prompt.cjs.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts +0 -44
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +0 -1
- package/dist/chains/sql_db/sql_db_prompt.js +0 -186
- package/dist/chains/sql_db/sql_db_prompt.js.map +0 -1
- package/dist/chains/summarization/load.cjs +0 -74
- package/dist/chains/summarization/load.cjs.map +0 -1
- package/dist/chains/summarization/load.d.cts +0 -33
- package/dist/chains/summarization/load.d.cts.map +0 -1
- package/dist/chains/summarization/load.d.ts +0 -33
- package/dist/chains/summarization/load.d.ts.map +0 -1
- package/dist/chains/summarization/load.js +0 -74
- package/dist/chains/summarization/load.js.map +0 -1
- package/dist/chains/summarization/refine_prompts.cjs +0 -24
- package/dist/chains/summarization/refine_prompts.cjs.map +0 -1
- package/dist/chains/summarization/refine_prompts.js +0 -23
- package/dist/chains/summarization/refine_prompts.js.map +0 -1
- package/dist/chains/summarization/stuff_prompts.cjs +0 -19
- package/dist/chains/summarization/stuff_prompts.cjs.map +0 -1
- package/dist/chains/summarization/stuff_prompts.js +0 -18
- package/dist/chains/summarization/stuff_prompts.js.map +0 -1
- package/dist/chains/transform.cjs +0 -43
- package/dist/chains/transform.cjs.map +0 -1
- package/dist/chains/transform.d.cts +0 -44
- package/dist/chains/transform.d.cts.map +0 -1
- package/dist/chains/transform.d.ts +0 -44
- package/dist/chains/transform.d.ts.map +0 -1
- package/dist/chains/transform.js +0 -43
- package/dist/chains/transform.js.map +0 -1
- package/dist/chains/vector_db_qa.cjs +0 -95
- package/dist/chains/vector_db_qa.cjs.map +0 -1
- package/dist/chains/vector_db_qa.d.cts +0 -66
- package/dist/chains/vector_db_qa.d.cts.map +0 -1
- package/dist/chains/vector_db_qa.d.ts +0 -66
- package/dist/chains/vector_db_qa.d.ts.map +0 -1
- package/dist/chains/vector_db_qa.js +0 -95
- package/dist/chains/vector_db_qa.js.map +0 -1
- package/dist/document.cjs +0 -21
- package/dist/document.cjs.map +0 -1
- package/dist/document.d.cts +0 -2
- package/dist/document.d.ts +0 -2
- package/dist/document.js +0 -10
- package/dist/document.js.map +0 -1
- package/dist/document_loaders/base.cjs +0 -22
- package/dist/document_loaders/base.cjs.map +0 -1
- package/dist/document_loaders/base.d.cts +0 -1
- package/dist/document_loaders/base.d.ts +0 -1
- package/dist/document_loaders/base.js +0 -12
- package/dist/document_loaders/base.js.map +0 -1
- package/dist/document_loaders/fs/buffer.cjs +0 -69
- package/dist/document_loaders/fs/buffer.cjs.map +0 -1
- package/dist/document_loaders/fs/buffer.d.cts +0 -46
- package/dist/document_loaders/fs/buffer.d.cts.map +0 -1
- package/dist/document_loaders/fs/buffer.d.ts +0 -46
- package/dist/document_loaders/fs/buffer.d.ts.map +0 -1
- package/dist/document_loaders/fs/buffer.js +0 -63
- package/dist/document_loaders/fs/buffer.js.map +0 -1
- package/dist/document_loaders/fs/directory.cjs +0 -116
- package/dist/document_loaders/fs/directory.cjs.map +0 -1
- package/dist/document_loaders/fs/directory.d.cts +0 -76
- package/dist/document_loaders/fs/directory.d.cts.map +0 -1
- package/dist/document_loaders/fs/directory.d.ts +0 -76
- package/dist/document_loaders/fs/directory.d.ts.map +0 -1
- package/dist/document_loaders/fs/directory.js +0 -109
- package/dist/document_loaders/fs/directory.js.map +0 -1
- package/dist/document_loaders/fs/json.cjs +0 -128
- package/dist/document_loaders/fs/json.cjs.map +0 -1
- package/dist/document_loaders/fs/json.d.cts +0 -65
- package/dist/document_loaders/fs/json.d.cts.map +0 -1
- package/dist/document_loaders/fs/json.d.ts +0 -65
- package/dist/document_loaders/fs/json.d.ts.map +0 -1
- package/dist/document_loaders/fs/json.js +0 -121
- package/dist/document_loaders/fs/json.js.map +0 -1
- package/dist/document_loaders/fs/multi_file.cjs +0 -82
- package/dist/document_loaders/fs/multi_file.cjs.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.cts +0 -43
- package/dist/document_loaders/fs/multi_file.d.cts.map +0 -1
- package/dist/document_loaders/fs/multi_file.d.ts +0 -43
- package/dist/document_loaders/fs/multi_file.d.ts.map +0 -1
- package/dist/document_loaders/fs/multi_file.js +0 -76
- package/dist/document_loaders/fs/multi_file.js.map +0 -1
- package/dist/document_loaders/fs/text.cjs +0 -101
- package/dist/document_loaders/fs/text.cjs.map +0 -1
- package/dist/document_loaders/fs/text.d.cts +0 -57
- package/dist/document_loaders/fs/text.d.cts.map +0 -1
- package/dist/document_loaders/fs/text.d.ts +0 -57
- package/dist/document_loaders/fs/text.d.ts.map +0 -1
- package/dist/document_loaders/fs/text.js +0 -95
- package/dist/document_loaders/fs/text.js.map +0 -1
- package/dist/evaluation/agents/index.cjs +0 -1
- package/dist/evaluation/agents/index.js +0 -1
- package/dist/evaluation/agents/prompt.cjs +0 -132
- package/dist/evaluation/agents/prompt.cjs.map +0 -1
- package/dist/evaluation/agents/prompt.js +0 -130
- package/dist/evaluation/agents/prompt.js.map +0 -1
- package/dist/evaluation/agents/trajectory.cjs +0 -132
- package/dist/evaluation/agents/trajectory.cjs.map +0 -1
- package/dist/evaluation/agents/trajectory.d.cts +0 -61
- package/dist/evaluation/agents/trajectory.d.cts.map +0 -1
- package/dist/evaluation/agents/trajectory.d.ts +0 -61
- package/dist/evaluation/agents/trajectory.d.ts.map +0 -1
- package/dist/evaluation/agents/trajectory.js +0 -130
- package/dist/evaluation/agents/trajectory.js.map +0 -1
- package/dist/evaluation/base.cjs +0 -169
- package/dist/evaluation/base.cjs.map +0 -1
- package/dist/evaluation/base.d.cts +0 -240
- package/dist/evaluation/base.d.cts.map +0 -1
- package/dist/evaluation/base.d.ts +0 -240
- package/dist/evaluation/base.d.ts.map +0 -1
- package/dist/evaluation/base.js +0 -164
- package/dist/evaluation/base.js.map +0 -1
- package/dist/evaluation/comparison/index.cjs +0 -1
- package/dist/evaluation/comparison/index.js +0 -1
- package/dist/evaluation/comparison/pairwise.cjs +0 -178
- package/dist/evaluation/comparison/pairwise.cjs.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.cts +0 -56
- package/dist/evaluation/comparison/pairwise.d.cts.map +0 -1
- package/dist/evaluation/comparison/pairwise.d.ts +0 -56
- package/dist/evaluation/comparison/pairwise.d.ts.map +0 -1
- package/dist/evaluation/comparison/pairwise.js +0 -175
- package/dist/evaluation/comparison/pairwise.js.map +0 -1
- package/dist/evaluation/comparison/prompt.cjs +0 -77
- package/dist/evaluation/comparison/prompt.cjs.map +0 -1
- package/dist/evaluation/comparison/prompt.js +0 -75
- package/dist/evaluation/comparison/prompt.js.map +0 -1
- package/dist/evaluation/criteria/criteria.cjs +0 -164
- package/dist/evaluation/criteria/criteria.cjs.map +0 -1
- package/dist/evaluation/criteria/criteria.d.cts +0 -85
- package/dist/evaluation/criteria/criteria.d.cts.map +0 -1
- package/dist/evaluation/criteria/criteria.d.ts +0 -85
- package/dist/evaluation/criteria/criteria.d.ts.map +0 -1
- package/dist/evaluation/criteria/criteria.js +0 -161
- package/dist/evaluation/criteria/criteria.js.map +0 -1
- package/dist/evaluation/criteria/index.cjs +0 -1
- package/dist/evaluation/criteria/index.js +0 -1
- package/dist/evaluation/criteria/prompt.cjs +0 -50
- package/dist/evaluation/criteria/prompt.cjs.map +0 -1
- package/dist/evaluation/criteria/prompt.js +0 -48
- package/dist/evaluation/criteria/prompt.js.map +0 -1
- package/dist/evaluation/embedding_distance/base.cjs +0 -108
- package/dist/evaluation/embedding_distance/base.cjs.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.cts +0 -82
- package/dist/evaluation/embedding_distance/base.d.cts.map +0 -1
- package/dist/evaluation/embedding_distance/base.d.ts +0 -82
- package/dist/evaluation/embedding_distance/base.d.ts.map +0 -1
- package/dist/evaluation/embedding_distance/base.js +0 -105
- package/dist/evaluation/embedding_distance/base.js.map +0 -1
- package/dist/evaluation/embedding_distance/index.cjs +0 -1
- package/dist/evaluation/embedding_distance/index.js +0 -1
- package/dist/evaluation/index.cjs +0 -54
- package/dist/evaluation/index.cjs.map +0 -1
- package/dist/evaluation/index.d.cts +0 -8
- package/dist/evaluation/index.d.ts +0 -8
- package/dist/evaluation/index.js +0 -35
- package/dist/evaluation/index.js.map +0 -1
- package/dist/evaluation/loader.cjs +0 -57
- package/dist/evaluation/loader.cjs.map +0 -1
- package/dist/evaluation/loader.d.cts +0 -38
- package/dist/evaluation/loader.d.cts.map +0 -1
- package/dist/evaluation/loader.d.ts +0 -38
- package/dist/evaluation/loader.d.ts.map +0 -1
- package/dist/evaluation/loader.js +0 -56
- package/dist/evaluation/loader.js.map +0 -1
- package/dist/evaluation/qa/eval_chain.cjs +0 -41
- package/dist/evaluation/qa/eval_chain.cjs.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.cts +0 -22
- package/dist/evaluation/qa/eval_chain.d.cts.map +0 -1
- package/dist/evaluation/qa/eval_chain.d.ts +0 -22
- package/dist/evaluation/qa/eval_chain.d.ts.map +0 -1
- package/dist/evaluation/qa/eval_chain.js +0 -41
- package/dist/evaluation/qa/eval_chain.js.map +0 -1
- package/dist/evaluation/qa/index.cjs +0 -1
- package/dist/evaluation/qa/index.js +0 -1
- package/dist/evaluation/qa/prompt.cjs +0 -31
- package/dist/evaluation/qa/prompt.cjs.map +0 -1
- package/dist/evaluation/qa/prompt.js +0 -30
- package/dist/evaluation/qa/prompt.js.map +0 -1
- package/dist/evaluation/types.d.cts +0 -40
- package/dist/evaluation/types.d.cts.map +0 -1
- package/dist/evaluation/types.d.ts +0 -40
- package/dist/evaluation/types.d.ts.map +0 -1
- package/dist/langchain-core/dist/load/map_keys.d.cts +0 -10
- package/dist/langchain-core/dist/load/map_keys.d.cts.map +0 -1
- package/dist/langchain-core/dist/load/serializable.d.cts +0 -82
- package/dist/langchain-core/dist/load/serializable.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/base.d.cts +0 -125
- package/dist/langchain-core/dist/messages/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/base.d.cts +0 -22
- package/dist/langchain-core/dist/messages/content/base.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/data.d.cts +0 -96
- package/dist/langchain-core/dist/messages/content/data.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts +0 -121
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts +0 -110
- package/dist/langchain-core/dist/messages/content/multimodal.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/content/tools.d.cts +0 -214
- package/dist/langchain-core/dist/messages/content/tools.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/message.d.cts +0 -598
- package/dist/langchain-core/dist/messages/message.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/metadata.d.cts +0 -97
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +0 -1
- package/dist/langchain-core/dist/messages/utils.d.cts +0 -75
- package/dist/langchain-core/dist/messages/utils.d.cts.map +0 -1
- package/dist/langchain-core/dist/prompt_values.d.cts +0 -13
- package/dist/langchain-core/dist/prompt_values.d.cts.map +0 -1
- package/dist/langchain-core/dist/utils/types/index.d.cts +0 -8
- package/dist/langchain-core/dist/utils/types/index.d.cts.map +0 -1
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts +0 -10
- package/dist/libs/langchain-core/dist/load/map_keys.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts +0 -82
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts +0 -125
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts +0 -22
- package/dist/libs/langchain-core/dist/messages/content/base.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts +0 -96
- package/dist/libs/langchain-core/dist/messages/content/data.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts +0 -121
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts +0 -110
- package/dist/libs/langchain-core/dist/messages/content/multimodal.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts +0 -214
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts +0 -598
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts +0 -97
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +0 -75
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/prompt_values.d.ts +0 -13
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts +0 -10
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +0 -1
- package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +0 -1
- package/dist/load/map_keys.d.cts +0 -8
- package/dist/load/map_keys.d.cts.map +0 -1
- package/dist/load/map_keys.d.ts +0 -8
- package/dist/load/map_keys.d.ts.map +0 -1
- package/dist/load/serializable.d.cts.map +0 -1
- package/dist/load/serializable.d.ts.map +0 -1
- package/dist/memory/buffer_memory.cjs +0 -80
- package/dist/memory/buffer_memory.cjs.map +0 -1
- package/dist/memory/buffer_memory.d.cts +0 -67
- package/dist/memory/buffer_memory.d.cts.map +0 -1
- package/dist/memory/buffer_memory.d.ts +0 -67
- package/dist/memory/buffer_memory.d.ts.map +0 -1
- package/dist/memory/buffer_memory.js +0 -79
- package/dist/memory/buffer_memory.js.map +0 -1
- package/dist/memory/buffer_token_memory.cjs +0 -80
- package/dist/memory/buffer_token_memory.cjs.map +0 -1
- package/dist/memory/buffer_token_memory.d.cts +0 -67
- package/dist/memory/buffer_token_memory.d.cts.map +0 -1
- package/dist/memory/buffer_token_memory.d.ts +0 -67
- package/dist/memory/buffer_token_memory.d.ts.map +0 -1
- package/dist/memory/buffer_token_memory.js +0 -79
- package/dist/memory/buffer_token_memory.js.map +0 -1
- package/dist/memory/buffer_window_memory.cjs +0 -77
- package/dist/memory/buffer_window_memory.cjs.map +0 -1
- package/dist/memory/buffer_window_memory.d.cts +0 -64
- package/dist/memory/buffer_window_memory.d.cts.map +0 -1
- package/dist/memory/buffer_window_memory.d.ts +0 -64
- package/dist/memory/buffer_window_memory.d.ts.map +0 -1
- package/dist/memory/buffer_window_memory.js +0 -76
- package/dist/memory/buffer_window_memory.js.map +0 -1
- package/dist/memory/chat_memory.cjs +0 -53
- package/dist/memory/chat_memory.cjs.map +0 -1
- package/dist/memory/chat_memory.d.cts +0 -42
- package/dist/memory/chat_memory.d.cts.map +0 -1
- package/dist/memory/chat_memory.d.ts +0 -42
- package/dist/memory/chat_memory.d.ts.map +0 -1
- package/dist/memory/chat_memory.js +0 -47
- package/dist/memory/chat_memory.js.map +0 -1
- package/dist/memory/combined_memory.cjs +0 -88
- package/dist/memory/combined_memory.cjs.map +0 -1
- package/dist/memory/combined_memory.d.cts +0 -60
- package/dist/memory/combined_memory.d.cts.map +0 -1
- package/dist/memory/combined_memory.d.ts +0 -60
- package/dist/memory/combined_memory.d.ts.map +0 -1
- package/dist/memory/combined_memory.js +0 -88
- package/dist/memory/combined_memory.js.map +0 -1
- package/dist/memory/entity_memory.cjs +0 -144
- package/dist/memory/entity_memory.cjs.map +0 -1
- package/dist/memory/entity_memory.d.cts +0 -99
- package/dist/memory/entity_memory.d.cts.map +0 -1
- package/dist/memory/entity_memory.d.ts +0 -99
- package/dist/memory/entity_memory.d.ts.map +0 -1
- package/dist/memory/entity_memory.js +0 -143
- package/dist/memory/entity_memory.js.map +0 -1
- package/dist/memory/index.cjs +0 -85
- package/dist/memory/index.cjs.map +0 -1
- package/dist/memory/index.d.cts +0 -14
- package/dist/memory/index.d.ts +0 -14
- package/dist/memory/index.js +0 -39
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/prompt.cjs +0 -124
- package/dist/memory/prompt.cjs.map +0 -1
- package/dist/memory/prompt.d.cts +0 -12
- package/dist/memory/prompt.d.cts.map +0 -1
- package/dist/memory/prompt.d.ts +0 -12
- package/dist/memory/prompt.d.ts.map +0 -1
- package/dist/memory/prompt.js +0 -120
- package/dist/memory/prompt.js.map +0 -1
- package/dist/memory/stores/entity/base.cjs +0 -13
- package/dist/memory/stores/entity/base.cjs.map +0 -1
- package/dist/memory/stores/entity/base.d.cts +0 -18
- package/dist/memory/stores/entity/base.d.cts.map +0 -1
- package/dist/memory/stores/entity/base.d.ts +0 -18
- package/dist/memory/stores/entity/base.d.ts.map +0 -1
- package/dist/memory/stores/entity/base.js +0 -12
- package/dist/memory/stores/entity/base.js.map +0 -1
- package/dist/memory/stores/entity/in_memory.cjs +0 -64
- package/dist/memory/stores/entity/in_memory.cjs.map +0 -1
- package/dist/memory/stores/entity/in_memory.js +0 -64
- package/dist/memory/stores/entity/in_memory.js.map +0 -1
- package/dist/memory/summary.cjs +0 -127
- package/dist/memory/summary.cjs.map +0 -1
- package/dist/memory/summary.d.cts +0 -101
- package/dist/memory/summary.d.cts.map +0 -1
- package/dist/memory/summary.d.ts +0 -101
- package/dist/memory/summary.d.ts.map +0 -1
- package/dist/memory/summary.js +0 -125
- package/dist/memory/summary.js.map +0 -1
- package/dist/memory/summary_buffer.cjs +0 -117
- package/dist/memory/summary_buffer.cjs.map +0 -1
- package/dist/memory/summary_buffer.d.cts +0 -90
- package/dist/memory/summary_buffer.d.cts.map +0 -1
- package/dist/memory/summary_buffer.d.ts +0 -90
- package/dist/memory/summary_buffer.d.ts.map +0 -1
- package/dist/memory/summary_buffer.js +0 -116
- package/dist/memory/summary_buffer.js.map +0 -1
- package/dist/memory/vector_store.cjs +0 -87
- package/dist/memory/vector_store.cjs.map +0 -1
- package/dist/memory/vector_store.d.cts +0 -81
- package/dist/memory/vector_store.d.cts.map +0 -1
- package/dist/memory/vector_store.d.ts +0 -81
- package/dist/memory/vector_store.d.ts.map +0 -1
- package/dist/memory/vector_store.js +0 -86
- package/dist/memory/vector_store.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs +0 -3040
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js +0 -3039
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/client.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.cjs +0 -12
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.js +0 -12
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/env.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.cjs +0 -71
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.js +0 -38
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.cjs +0 -221
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.js +0 -221
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/experimental/otel/translator.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.cjs +0 -11
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.js +0 -11
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/index.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs +0 -701
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js +0 -700
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/run_trees.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.cjs +0 -7
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.js +0 -6
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/constants.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.cjs +0 -29
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.js +0 -28
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/fetch.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.cjs +0 -115
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.js +0 -113
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/singletons/otel.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.cjs +0 -14
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.js +0 -13
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/_uuid.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs +0 -94
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js +0 -94
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/async_caller.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs +0 -140
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js +0 -135
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/env.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs +0 -89
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js +0 -86
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/error.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +0 -140
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +0 -140
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.cjs +0 -18
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.js +0 -16
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/messages.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.cjs +0 -10
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.js +0 -10
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/project.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.cjs +0 -30
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.js +0 -30
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/prompts.js.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.cjs +0 -13
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.cjs.map +0 -1
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.js +0 -12
- package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_/node_modules/langsmith/dist/utils/warn.js.map +0 -1
- package/dist/output_parsers/combining.cjs +0 -61
- package/dist/output_parsers/combining.cjs.map +0 -1
- package/dist/output_parsers/combining.d.cts +0 -46
- package/dist/output_parsers/combining.d.cts.map +0 -1
- package/dist/output_parsers/combining.d.ts +0 -46
- package/dist/output_parsers/combining.d.ts.map +0 -1
- package/dist/output_parsers/combining.js +0 -60
- package/dist/output_parsers/combining.js.map +0 -1
- package/dist/output_parsers/datetime.cjs +0 -46
- package/dist/output_parsers/datetime.cjs.map +0 -1
- package/dist/output_parsers/datetime.d.cts +0 -33
- package/dist/output_parsers/datetime.d.cts.map +0 -1
- package/dist/output_parsers/datetime.d.ts +0 -33
- package/dist/output_parsers/datetime.d.ts.map +0 -1
- package/dist/output_parsers/datetime.js +0 -45
- package/dist/output_parsers/datetime.js.map +0 -1
- package/dist/output_parsers/expression.cjs +0 -86
- package/dist/output_parsers/expression.cjs.map +0 -1
- package/dist/output_parsers/expression.d.cts +0 -53
- package/dist/output_parsers/expression.d.cts.map +0 -1
- package/dist/output_parsers/expression.d.ts +0 -53
- package/dist/output_parsers/expression.d.ts.map +0 -1
- package/dist/output_parsers/expression.js +0 -79
- package/dist/output_parsers/expression.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs +0 -130
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.cts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.d.ts +0 -108
- package/dist/output_parsers/expression_type_handlers/base.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/base.js +0 -129
- package/dist/output_parsers/expression_type_handlers/base.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js +0 -38
- package/dist/output_parsers/expression_type_handlers/boolean_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js +0 -64
- package/dist/output_parsers/expression_type_handlers/call_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.cjs +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.cts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.d.ts +0 -35
- package/dist/output_parsers/expression_type_handlers/factory.d.ts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/factory.js +0 -68
- package/dist/output_parsers/expression_type_handlers/factory.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs +0 -299
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js +0 -298
- package/dist/output_parsers/expression_type_handlers/grammar/parser_grammar.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/identifier_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js +0 -48
- package/dist/output_parsers/expression_type_handlers/member_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js +0 -36
- package/dist/output_parsers/expression_type_handlers/numeric_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js +0 -40
- package/dist/output_parsers/expression_type_handlers/object_literal_expression_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js +0 -45
- package/dist/output_parsers/expression_type_handlers/property_assignment_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.cjs.map +0 -1
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js +0 -37
- package/dist/output_parsers/expression_type_handlers/string_literal_handler.js.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.cts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.cts.map +0 -1
- package/dist/output_parsers/expression_type_handlers/types.d.ts +0 -95
- package/dist/output_parsers/expression_type_handlers/types.d.ts.map +0 -1
- package/dist/output_parsers/fix.cjs +0 -92
- package/dist/output_parsers/fix.cjs.map +0 -1
- package/dist/output_parsers/fix.d.cts +0 -60
- package/dist/output_parsers/fix.d.cts.map +0 -1
- package/dist/output_parsers/fix.d.ts +0 -60
- package/dist/output_parsers/fix.d.ts.map +0 -1
- package/dist/output_parsers/fix.js +0 -91
- package/dist/output_parsers/fix.js.map +0 -1
- package/dist/output_parsers/http_response.cjs +0 -53
- package/dist/output_parsers/http_response.cjs.map +0 -1
- package/dist/output_parsers/http_response.d.cts +0 -33
- package/dist/output_parsers/http_response.d.cts.map +0 -1
- package/dist/output_parsers/http_response.d.ts +0 -33
- package/dist/output_parsers/http_response.d.ts.map +0 -1
- package/dist/output_parsers/http_response.js +0 -52
- package/dist/output_parsers/http_response.js.map +0 -1
- package/dist/output_parsers/index.cjs +0 -74
- package/dist/output_parsers/index.cjs.map +0 -1
- package/dist/output_parsers/index.d.cts +0 -11
- package/dist/output_parsers/index.d.ts +0 -11
- package/dist/output_parsers/index.js +0 -37
- package/dist/output_parsers/index.js.map +0 -1
- package/dist/output_parsers/noop.cjs +0 -43
- package/dist/output_parsers/noop.cjs.map +0 -1
- package/dist/output_parsers/noop.js +0 -42
- package/dist/output_parsers/noop.js.map +0 -1
- package/dist/output_parsers/openai_functions.cjs +0 -145
- package/dist/output_parsers/openai_functions.cjs.map +0 -1
- package/dist/output_parsers/openai_functions.d.cts +0 -85
- package/dist/output_parsers/openai_functions.d.cts.map +0 -1
- package/dist/output_parsers/openai_functions.d.ts +0 -85
- package/dist/output_parsers/openai_functions.d.ts.map +0 -1
- package/dist/output_parsers/openai_functions.js +0 -142
- package/dist/output_parsers/openai_functions.js.map +0 -1
- package/dist/output_parsers/openai_tools.cjs +0 -89
- package/dist/output_parsers/openai_tools.cjs.map +0 -1
- package/dist/output_parsers/openai_tools.d.cts +0 -69
- package/dist/output_parsers/openai_tools.d.cts.map +0 -1
- package/dist/output_parsers/openai_tools.d.ts +0 -69
- package/dist/output_parsers/openai_tools.d.ts.map +0 -1
- package/dist/output_parsers/openai_tools.js +0 -87
- package/dist/output_parsers/openai_tools.js.map +0 -1
- package/dist/output_parsers/prompts.cjs +0 -25
- package/dist/output_parsers/prompts.cjs.map +0 -1
- package/dist/output_parsers/prompts.js +0 -24
- package/dist/output_parsers/prompts.js.map +0 -1
- package/dist/output_parsers/regex.cjs +0 -74
- package/dist/output_parsers/regex.cjs.map +0 -1
- package/dist/output_parsers/regex.d.cts +0 -49
- package/dist/output_parsers/regex.d.cts.map +0 -1
- package/dist/output_parsers/regex.d.ts +0 -49
- package/dist/output_parsers/regex.d.ts.map +0 -1
- package/dist/output_parsers/regex.js +0 -73
- package/dist/output_parsers/regex.js.map +0 -1
- package/dist/output_parsers/router.cjs +0 -40
- package/dist/output_parsers/router.cjs.map +0 -1
- package/dist/output_parsers/router.d.cts +0 -36
- package/dist/output_parsers/router.d.cts.map +0 -1
- package/dist/output_parsers/router.d.ts +0 -36
- package/dist/output_parsers/router.d.ts.map +0 -1
- package/dist/output_parsers/router.js +0 -39
- package/dist/output_parsers/router.js.map +0 -1
- package/dist/output_parsers/structured.cjs +0 -164
- package/dist/output_parsers/structured.cjs.map +0 -1
- package/dist/output_parsers/structured.d.cts +0 -97
- package/dist/output_parsers/structured.d.cts.map +0 -1
- package/dist/output_parsers/structured.d.ts +0 -97
- package/dist/output_parsers/structured.d.ts.map +0 -1
- package/dist/output_parsers/structured.js +0 -161
- package/dist/output_parsers/structured.js.map +0 -1
- package/dist/retrievers/contextual_compression.cjs +0 -53
- package/dist/retrievers/contextual_compression.cjs.map +0 -1
- package/dist/retrievers/contextual_compression.d.cts +0 -42
- package/dist/retrievers/contextual_compression.d.cts.map +0 -1
- package/dist/retrievers/contextual_compression.d.ts +0 -42
- package/dist/retrievers/contextual_compression.d.ts.map +0 -1
- package/dist/retrievers/contextual_compression.js +0 -47
- package/dist/retrievers/contextual_compression.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.cjs +0 -103
- package/dist/retrievers/document_compressors/chain_extract.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.cts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.d.ts +0 -47
- package/dist/retrievers/document_compressors/chain_extract.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract.js +0 -97
- package/dist/retrievers/document_compressors/chain_extract.js.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs +0 -16
- package/dist/retrievers/document_compressors/chain_extract_prompt.cjs.map +0 -1
- package/dist/retrievers/document_compressors/chain_extract_prompt.js +0 -15
- package/dist/retrievers/document_compressors/chain_extract_prompt.js.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.cjs +0 -74
- package/dist/retrievers/document_compressors/embeddings_filter.cjs.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts +0 -58
- package/dist/retrievers/document_compressors/embeddings_filter.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/embeddings_filter.js +0 -68
- package/dist/retrievers/document_compressors/embeddings_filter.js.map +0 -1
- package/dist/retrievers/document_compressors/index.cjs +0 -69
- package/dist/retrievers/document_compressors/index.cjs.map +0 -1
- package/dist/retrievers/document_compressors/index.d.cts +0 -61
- package/dist/retrievers/document_compressors/index.d.cts.map +0 -1
- package/dist/retrievers/document_compressors/index.d.ts +0 -61
- package/dist/retrievers/document_compressors/index.d.ts.map +0 -1
- package/dist/retrievers/document_compressors/index.js +0 -62
- package/dist/retrievers/document_compressors/index.js.map +0 -1
- package/dist/retrievers/ensemble.cjs +0 -76
- package/dist/retrievers/ensemble.cjs.map +0 -1
- package/dist/retrievers/ensemble.d.cts +0 -39
- package/dist/retrievers/ensemble.d.cts.map +0 -1
- package/dist/retrievers/ensemble.d.ts +0 -39
- package/dist/retrievers/ensemble.d.ts.map +0 -1
- package/dist/retrievers/ensemble.js +0 -70
- package/dist/retrievers/ensemble.js.map +0 -1
- package/dist/retrievers/hyde.cjs +0 -128
- package/dist/retrievers/hyde.cjs.map +0 -1
- package/dist/retrievers/hyde.d.cts +0 -61
- package/dist/retrievers/hyde.d.cts.map +0 -1
- package/dist/retrievers/hyde.d.ts +0 -61
- package/dist/retrievers/hyde.d.ts.map +0 -1
- package/dist/retrievers/hyde.js +0 -121
- package/dist/retrievers/hyde.js.map +0 -1
- package/dist/retrievers/matryoshka_retriever.cjs +0 -116
- package/dist/retrievers/matryoshka_retriever.cjs.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.cts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.cts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.d.ts +0 -99
- package/dist/retrievers/matryoshka_retriever.d.ts.map +0 -1
- package/dist/retrievers/matryoshka_retriever.js +0 -110
- package/dist/retrievers/matryoshka_retriever.js.map +0 -1
- package/dist/retrievers/multi_query.cjs +0 -150
- package/dist/retrievers/multi_query.cjs.map +0 -1
- package/dist/retrievers/multi_query.d.cts +0 -59
- package/dist/retrievers/multi_query.d.cts.map +0 -1
- package/dist/retrievers/multi_query.d.ts +0 -59
- package/dist/retrievers/multi_query.d.ts.map +0 -1
- package/dist/retrievers/multi_query.js +0 -144
- package/dist/retrievers/multi_query.js.map +0 -1
- package/dist/retrievers/multi_vector.cjs +0 -67
- package/dist/retrievers/multi_vector.cjs.map +0 -1
- package/dist/retrievers/multi_vector.d.cts +0 -51
- package/dist/retrievers/multi_vector.d.cts.map +0 -1
- package/dist/retrievers/multi_vector.d.ts +0 -51
- package/dist/retrievers/multi_vector.d.ts.map +0 -1
- package/dist/retrievers/multi_vector.js +0 -61
- package/dist/retrievers/multi_vector.js.map +0 -1
- package/dist/retrievers/parent_document.cjs +0 -137
- package/dist/retrievers/parent_document.cjs.map +0 -1
- package/dist/retrievers/parent_document.d.cts +0 -92
- package/dist/retrievers/parent_document.d.cts.map +0 -1
- package/dist/retrievers/parent_document.d.ts +0 -92
- package/dist/retrievers/parent_document.d.ts.map +0 -1
- package/dist/retrievers/parent_document.js +0 -131
- package/dist/retrievers/parent_document.js.map +0 -1
- package/dist/retrievers/score_threshold.cjs +0 -43
- package/dist/retrievers/score_threshold.cjs.map +0 -1
- package/dist/retrievers/score_threshold.d.cts +0 -20
- package/dist/retrievers/score_threshold.d.cts.map +0 -1
- package/dist/retrievers/score_threshold.d.ts +0 -20
- package/dist/retrievers/score_threshold.d.ts.map +0 -1
- package/dist/retrievers/score_threshold.js +0 -37
- package/dist/retrievers/score_threshold.js.map +0 -1
- package/dist/retrievers/self_query/functional.cjs +0 -21
- package/dist/retrievers/self_query/functional.cjs.map +0 -1
- package/dist/retrievers/self_query/functional.d.cts +0 -2
- package/dist/retrievers/self_query/functional.d.ts +0 -2
- package/dist/retrievers/self_query/functional.js +0 -10
- package/dist/retrievers/self_query/functional.js.map +0 -1
- package/dist/retrievers/self_query/index.cjs +0 -130
- package/dist/retrievers/self_query/index.cjs.map +0 -1
- package/dist/retrievers/self_query/index.d.cts +0 -79
- package/dist/retrievers/self_query/index.d.cts.map +0 -1
- package/dist/retrievers/self_query/index.d.ts +0 -79
- package/dist/retrievers/self_query/index.d.ts.map +0 -1
- package/dist/retrievers/self_query/index.js +0 -106
- package/dist/retrievers/self_query/index.js.map +0 -1
- package/dist/retrievers/time_weighted.cjs +0 -236
- package/dist/retrievers/time_weighted.cjs.map +0 -1
- package/dist/retrievers/time_weighted.d.cts +0 -142
- package/dist/retrievers/time_weighted.d.cts.map +0 -1
- package/dist/retrievers/time_weighted.d.ts +0 -142
- package/dist/retrievers/time_weighted.d.ts.map +0 -1
- package/dist/retrievers/time_weighted.js +0 -228
- package/dist/retrievers/time_weighted.js.map +0 -1
- package/dist/sql_db.cjs +0 -119
- package/dist/sql_db.cjs.map +0 -1
- package/dist/sql_db.d.cts +0 -60
- package/dist/sql_db.d.cts.map +0 -1
- package/dist/sql_db.d.ts +0 -60
- package/dist/sql_db.d.ts.map +0 -1
- package/dist/sql_db.js +0 -113
- package/dist/sql_db.js.map +0 -1
- package/dist/stores/doc/base.cjs +0 -20
- package/dist/stores/doc/base.cjs.map +0 -1
- package/dist/stores/doc/base.d.cts +0 -15
- package/dist/stores/doc/base.d.cts.map +0 -1
- package/dist/stores/doc/base.d.ts +0 -15
- package/dist/stores/doc/base.d.ts.map +0 -1
- package/dist/stores/doc/base.js +0 -14
- package/dist/stores/doc/base.js.map +0 -1
- package/dist/stores/doc/in_memory.cjs +0 -94
- package/dist/stores/doc/in_memory.cjs.map +0 -1
- package/dist/stores/doc/in_memory.d.cts +0 -53
- package/dist/stores/doc/in_memory.d.cts.map +0 -1
- package/dist/stores/doc/in_memory.d.ts +0 -53
- package/dist/stores/doc/in_memory.d.ts.map +0 -1
- package/dist/stores/doc/in_memory.js +0 -87
- package/dist/stores/doc/in_memory.js.map +0 -1
- package/dist/stores/file/base.cjs +0 -13
- package/dist/stores/file/base.cjs.map +0 -1
- package/dist/stores/file/base.d.cts +0 -15
- package/dist/stores/file/base.d.cts.map +0 -1
- package/dist/stores/file/base.d.ts +0 -15
- package/dist/stores/file/base.d.ts.map +0 -1
- package/dist/stores/file/base.js +0 -12
- package/dist/stores/file/base.js.map +0 -1
- package/dist/stores/file/in_memory.cjs +0 -53
- package/dist/stores/file/in_memory.cjs.map +0 -1
- package/dist/stores/file/in_memory.d.cts +0 -33
- package/dist/stores/file/in_memory.d.cts.map +0 -1
- package/dist/stores/file/in_memory.d.ts +0 -33
- package/dist/stores/file/in_memory.d.ts.map +0 -1
- package/dist/stores/file/in_memory.js +0 -47
- package/dist/stores/file/in_memory.js.map +0 -1
- package/dist/stores/file/node.cjs +0 -52
- package/dist/stores/file/node.cjs.map +0 -1
- package/dist/stores/file/node.d.cts +0 -29
- package/dist/stores/file/node.d.cts.map +0 -1
- package/dist/stores/file/node.d.ts +0 -29
- package/dist/stores/file/node.d.ts.map +0 -1
- package/dist/stores/file/node.js +0 -46
- package/dist/stores/file/node.js.map +0 -1
- package/dist/stores/message/in_memory.cjs +0 -21
- package/dist/stores/message/in_memory.cjs.map +0 -1
- package/dist/stores/message/in_memory.d.cts +0 -2
- package/dist/stores/message/in_memory.d.ts +0 -2
- package/dist/stores/message/in_memory.js +0 -10
- package/dist/stores/message/in_memory.js.map +0 -1
- package/dist/text_splitter.cjs +0 -22
- package/dist/text_splitter.cjs.map +0 -1
- package/dist/text_splitter.d.cts +0 -1
- package/dist/text_splitter.d.ts +0 -1
- package/dist/text_splitter.js +0 -12
- package/dist/text_splitter.js.map +0 -1
- package/dist/tools/chain.cjs +0 -36
- package/dist/tools/chain.cjs.map +0 -1
- package/dist/tools/chain.d.cts +0 -32
- package/dist/tools/chain.d.cts.map +0 -1
- package/dist/tools/chain.d.ts +0 -32
- package/dist/tools/chain.d.ts.map +0 -1
- package/dist/tools/chain.js +0 -30
- package/dist/tools/chain.js.map +0 -1
- package/dist/tools/fs.cjs +0 -56
- package/dist/tools/fs.cjs.map +0 -1
- package/dist/tools/fs.d.cts +0 -92
- package/dist/tools/fs.d.cts.map +0 -1
- package/dist/tools/fs.d.ts +0 -92
- package/dist/tools/fs.d.ts.map +0 -1
- package/dist/tools/fs.js +0 -54
- package/dist/tools/fs.js.map +0 -1
- package/dist/tools/index.cjs +0 -68
- package/dist/tools/index.cjs.map +0 -1
- package/dist/tools/index.d.cts +0 -8
- package/dist/tools/index.d.ts +0 -8
- package/dist/tools/index.js +0 -30
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/json.cjs +0 -107
- package/dist/tools/json.cjs.map +0 -1
- package/dist/tools/json.d.cts +0 -65
- package/dist/tools/json.d.cts.map +0 -1
- package/dist/tools/json.d.ts +0 -65
- package/dist/tools/json.d.ts.map +0 -1
- package/dist/tools/json.js +0 -104
- package/dist/tools/json.js.map +0 -1
- package/dist/tools/render.cjs +0 -55
- package/dist/tools/render.cjs.map +0 -1
- package/dist/tools/render.d.cts +0 -32
- package/dist/tools/render.d.cts.map +0 -1
- package/dist/tools/render.d.ts +0 -32
- package/dist/tools/render.d.ts.map +0 -1
- package/dist/tools/render.js +0 -48
- package/dist/tools/render.js.map +0 -1
- package/dist/tools/requests.cjs +0 -73
- package/dist/tools/requests.cjs.map +0 -1
- package/dist/tools/requests.d.cts +0 -56
- package/dist/tools/requests.d.cts.map +0 -1
- package/dist/tools/requests.d.ts +0 -56
- package/dist/tools/requests.d.ts.map +0 -1
- package/dist/tools/requests.js +0 -71
- package/dist/tools/requests.js.map +0 -1
- package/dist/tools/retriever.cjs +0 -30
- package/dist/tools/retriever.cjs.map +0 -1
- package/dist/tools/retriever.d.cts +0 -19
- package/dist/tools/retriever.d.cts.map +0 -1
- package/dist/tools/retriever.d.ts +0 -19
- package/dist/tools/retriever.d.ts.map +0 -1
- package/dist/tools/retriever.js +0 -24
- package/dist/tools/retriever.js.map +0 -1
- package/dist/tools/sql.cjs +0 -165
- package/dist/tools/sql.cjs.map +0 -1
- package/dist/tools/sql.d.cts +0 -86
- package/dist/tools/sql.d.cts.map +0 -1
- package/dist/tools/sql.d.ts +0 -86
- package/dist/tools/sql.d.ts.map +0 -1
- package/dist/tools/sql.js +0 -156
- package/dist/tools/sql.js.map +0 -1
- package/dist/tools/vectorstore.cjs +0 -45
- package/dist/tools/vectorstore.cjs.map +0 -1
- package/dist/tools/vectorstore.d.cts +0 -40
- package/dist/tools/vectorstore.d.cts.map +0 -1
- package/dist/tools/vectorstore.d.ts +0 -40
- package/dist/tools/vectorstore.d.ts.map +0 -1
- package/dist/tools/vectorstore.js +0 -44
- package/dist/tools/vectorstore.js.map +0 -1
- package/dist/tools/webbrowser.cjs +0 -176
- package/dist/tools/webbrowser.cjs.map +0 -1
- package/dist/tools/webbrowser.d.cts +0 -69
- package/dist/tools/webbrowser.d.cts.map +0 -1
- package/dist/tools/webbrowser.d.ts +0 -69
- package/dist/tools/webbrowser.d.ts.map +0 -1
- package/dist/tools/webbrowser.js +0 -168
- package/dist/tools/webbrowser.js.map +0 -1
- package/dist/types/expression-parser.d.cts +0 -91
- package/dist/types/expression-parser.d.cts.map +0 -1
- package/dist/types/expression-parser.d.ts +0 -91
- package/dist/types/expression-parser.d.ts.map +0 -1
- package/dist/types/type-utils.d.cts +0 -7
- package/dist/types/type-utils.d.cts.map +0 -1
- package/dist/types/type-utils.d.ts +0 -7
- package/dist/types/type-utils.d.ts.map +0 -1
- package/dist/util/document.cjs +0 -23
- package/dist/util/document.cjs.map +0 -1
- package/dist/util/document.d.cts +0 -15
- package/dist/util/document.d.cts.map +0 -1
- package/dist/util/document.d.ts +0 -15
- package/dist/util/document.d.ts.map +0 -1
- package/dist/util/document.js +0 -17
- package/dist/util/document.js.map +0 -1
- package/dist/util/entrypoint_deprecation.cjs +0 -1
- package/dist/util/entrypoint_deprecation.js +0 -1
- package/dist/util/env.cjs +0 -2
- package/dist/util/env.js +0 -1
- package/dist/util/extname.cjs +0 -7
- package/dist/util/extname.cjs.map +0 -1
- package/dist/util/extname.js +0 -6
- package/dist/util/extname.js.map +0 -1
- package/dist/util/hub.cjs +0 -39
- package/dist/util/hub.cjs.map +0 -1
- package/dist/util/hub.js +0 -38
- package/dist/util/hub.js.map +0 -1
- package/dist/util/load.cjs +0 -15
- package/dist/util/load.cjs.map +0 -1
- package/dist/util/load.d.cts +0 -6
- package/dist/util/load.d.cts.map +0 -1
- package/dist/util/load.d.ts +0 -6
- package/dist/util/load.d.ts.map +0 -1
- package/dist/util/load.js +0 -14
- package/dist/util/load.js.map +0 -1
- package/dist/util/math.cjs +0 -22
- package/dist/util/math.cjs.map +0 -1
- package/dist/util/math.d.cts +0 -1
- package/dist/util/math.d.ts +0 -1
- package/dist/util/math.js +0 -12
- package/dist/util/math.js.map +0 -1
- package/dist/util/ml-distance/distances.cjs +0 -35
- package/dist/util/ml-distance/distances.cjs.map +0 -1
- package/dist/util/ml-distance/distances.js +0 -33
- package/dist/util/ml-distance/distances.js.map +0 -1
- package/dist/util/ml-distance/similarities.cjs +0 -23
- package/dist/util/ml-distance/similarities.cjs.map +0 -1
- package/dist/util/ml-distance/similarities.d.cts +0 -11
- package/dist/util/ml-distance/similarities.d.cts.map +0 -1
- package/dist/util/ml-distance/similarities.d.ts +0 -11
- package/dist/util/ml-distance/similarities.d.ts.map +0 -1
- package/dist/util/ml-distance/similarities.js +0 -22
- package/dist/util/ml-distance/similarities.js.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.cjs +0 -14
- package/dist/util/ml-distance-euclidean/euclidean.cjs.map +0 -1
- package/dist/util/ml-distance-euclidean/euclidean.js +0 -13
- package/dist/util/ml-distance-euclidean/euclidean.js.map +0 -1
- package/dist/util/openapi.cjs +0 -149
- package/dist/util/openapi.cjs.map +0 -1
- package/dist/util/openapi.d.cts +0 -83
- package/dist/util/openapi.d.cts.map +0 -1
- package/dist/util/openapi.d.ts +0 -83
- package/dist/util/openapi.d.ts.map +0 -1
- package/dist/util/openapi.js +0 -148
- package/dist/util/openapi.js.map +0 -1
- package/dist/util/parse.cjs +0 -22
- package/dist/util/parse.cjs.map +0 -1
- package/dist/util/parse.js +0 -21
- package/dist/util/parse.js.map +0 -1
- package/dist/util/set.cjs +0 -35
- package/dist/util/set.cjs.map +0 -1
- package/dist/util/set.js +0 -32
- package/dist/util/set.js.map +0 -1
- package/dist/util/sql_utils.cjs +0 -178
- package/dist/util/sql_utils.cjs.map +0 -1
- package/dist/util/sql_utils.d.cts +0 -31
- package/dist/util/sql_utils.d.cts.map +0 -1
- package/dist/util/sql_utils.d.ts +0 -31
- package/dist/util/sql_utils.d.ts.map +0 -1
- package/dist/util/sql_utils.js +0 -173
- package/dist/util/sql_utils.js.map +0 -1
- package/dist/util/time.cjs +0 -25
- package/dist/util/time.cjs.map +0 -1
- package/dist/util/time.d.cts +0 -10
- package/dist/util/time.d.cts.map +0 -1
- package/dist/util/time.d.ts +0 -10
- package/dist/util/time.d.ts.map +0 -1
- package/dist/util/time.js +0 -19
- package/dist/util/time.js.map +0 -1
- package/dist/vectorstores/memory.cjs +0 -265
- package/dist/vectorstores/memory.cjs.map +0 -1
- package/dist/vectorstores/memory.d.cts +0 -216
- package/dist/vectorstores/memory.d.cts.map +0 -1
- package/dist/vectorstores/memory.d.ts +0 -216
- package/dist/vectorstores/memory.d.ts.map +0 -1
- package/dist/vectorstores/memory.js +0 -259
- package/dist/vectorstores/memory.js.map +0 -1
- /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.11.0_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.js +0 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { JumpToTarget } from "../constants.js";
|
|
2
|
+
import { ClientTool, ServerTool } from "../tools.js";
|
|
3
|
+
import { AgentBuiltInState, Runtime } from "../runtime.js";
|
|
4
|
+
import { ModelRequest } from "../nodes/types.js";
|
|
5
|
+
import { AIMessage, ToolMessage } from "@langchain/core/messages";
|
|
6
|
+
import { AnnotationRoot, Command } from "@langchain/langgraph";
|
|
7
|
+
import { InteropZodToStateDefinition } from "@langchain/langgraph/zod";
|
|
8
|
+
import { InferInteropZodInput, InferInteropZodOutput, InteropZodDefault, InteropZodObject, InteropZodOptional } from "@langchain/core/utils/types";
|
|
9
|
+
import { ToolCall as ToolCall$1 } from "@langchain/core/messages/tool";
|
|
10
|
+
|
|
11
|
+
//#region src/agents/middleware/types.d.ts
|
|
12
|
+
type AnyAnnotationRoot = AnnotationRoot<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Result type for middleware functions.
|
|
15
|
+
*/
|
|
16
|
+
type MiddlewareResult<TState> = TState | void;
|
|
17
|
+
/**
|
|
18
|
+
* Represents a tool call request for the wrapToolCall hook.
|
|
19
|
+
* Contains the tool call information along with the agent's current state and runtime.
|
|
20
|
+
*/
|
|
21
|
+
interface ToolCallRequest<TState extends Record<string, unknown> = Record<string, unknown>, TContext = unknown> {
|
|
22
|
+
/**
|
|
23
|
+
* The tool call to be executed
|
|
24
|
+
*/
|
|
25
|
+
toolCall: ToolCall$1;
|
|
26
|
+
/**
|
|
27
|
+
* The BaseTool instance being invoked.
|
|
28
|
+
* Provides access to tool metadata like name, description, schema, etc.
|
|
29
|
+
*/
|
|
30
|
+
tool: ClientTool | ServerTool;
|
|
31
|
+
/**
|
|
32
|
+
* The current agent state (includes both middleware state and built-in state).
|
|
33
|
+
*/
|
|
34
|
+
state: TState & AgentBuiltInState;
|
|
35
|
+
/**
|
|
36
|
+
* The runtime context containing metadata, signal, writer, interrupt, etc.
|
|
37
|
+
*/
|
|
38
|
+
runtime: Runtime<TContext>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Handler function type for wrapping tool calls.
|
|
42
|
+
* Takes a tool call and returns the tool result or a command.
|
|
43
|
+
*/
|
|
44
|
+
type ToolCallHandler = (toolCall: ToolCall$1) => Promise<ToolMessage | Command> | ToolMessage | Command;
|
|
45
|
+
/**
|
|
46
|
+
* Wrapper function type for the wrapToolCall hook.
|
|
47
|
+
* Allows middleware to intercept and modify tool execution.
|
|
48
|
+
*/
|
|
49
|
+
type ToolCallWrapper<TState extends Record<string, unknown> = Record<string, unknown>, TContext = unknown> = (request: ToolCallRequest<TState, TContext>, handler: ToolCallHandler) => Promise<ToolMessage | Command> | ToolMessage | Command;
|
|
50
|
+
/**
|
|
51
|
+
* Base middleware interface.
|
|
52
|
+
*/
|
|
53
|
+
interface AgentMiddleware<TSchema extends InteropZodObject | undefined = any, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = any, TFullContext = any> {
|
|
54
|
+
stateSchema?: TSchema;
|
|
55
|
+
contextSchema?: TContextSchema;
|
|
56
|
+
name: string;
|
|
57
|
+
beforeAgentJumpTo?: JumpToTarget[];
|
|
58
|
+
beforeModelJumpTo?: JumpToTarget[];
|
|
59
|
+
afterModelJumpTo?: JumpToTarget[];
|
|
60
|
+
afterAgentJumpTo?: JumpToTarget[];
|
|
61
|
+
tools?: (ClientTool | ServerTool)[];
|
|
62
|
+
/**
|
|
63
|
+
* Wraps tool execution with custom logic. This allows you to:
|
|
64
|
+
* - Modify tool call parameters before execution
|
|
65
|
+
* - Handle errors and retry with different parameters
|
|
66
|
+
* - Post-process tool results
|
|
67
|
+
* - Implement caching, logging, authentication, or other cross-cutting concerns
|
|
68
|
+
* - Return Command objects for advanced control flow
|
|
69
|
+
*
|
|
70
|
+
* The handler receives a ToolCallRequest containing the tool call, state, and runtime,
|
|
71
|
+
* along with a handler function to execute the actual tool.
|
|
72
|
+
*
|
|
73
|
+
* @param request - The tool call request containing toolCall, state, and runtime.
|
|
74
|
+
* @param handler - The function that executes the tool. Call this with a ToolCall to get the result.
|
|
75
|
+
* @returns The tool result as a ToolMessage or a Command for advanced control flow.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* wrapToolCall: async (request, handler) => {
|
|
80
|
+
* console.log(`Calling tool: ${request.tool.name}`);
|
|
81
|
+
* console.log(`Tool description: ${request.tool.description}`);
|
|
82
|
+
*
|
|
83
|
+
* try {
|
|
84
|
+
* // Execute the tool
|
|
85
|
+
* const result = await handler(request.toolCall);
|
|
86
|
+
* console.log(`Tool ${request.tool.name} succeeded`);
|
|
87
|
+
* return result;
|
|
88
|
+
* } catch (error) {
|
|
89
|
+
* console.error(`Tool ${request.tool.name} failed:`, error);
|
|
90
|
+
* // Could return a custom error message or retry
|
|
91
|
+
* throw error;
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* ```
|
|
95
|
+
*
|
|
96
|
+
* @example Authentication
|
|
97
|
+
* ```ts
|
|
98
|
+
* wrapToolCall: async (request, handler) => {
|
|
99
|
+
* // Check if user is authorized for this tool
|
|
100
|
+
* if (!request.runtime.context.isAuthorized(request.tool.name)) {
|
|
101
|
+
* return new ToolMessage({
|
|
102
|
+
* content: "Unauthorized to call this tool",
|
|
103
|
+
* tool_call_id: request.toolCall.id,
|
|
104
|
+
* });
|
|
105
|
+
* }
|
|
106
|
+
* return handler(request.toolCall);
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @example Caching
|
|
111
|
+
* ```ts
|
|
112
|
+
* const cache = new Map();
|
|
113
|
+
* wrapToolCall: async (request, handler) => {
|
|
114
|
+
* const cacheKey = `${request.tool.name}:${JSON.stringify(request.toolCall.args)}`;
|
|
115
|
+
* if (cache.has(cacheKey)) {
|
|
116
|
+
* return cache.get(cacheKey);
|
|
117
|
+
* }
|
|
118
|
+
* const result = await handler(request.toolCall);
|
|
119
|
+
* cache.set(cacheKey, result);
|
|
120
|
+
* return result;
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
wrapToolCall?: ToolCallWrapper<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>;
|
|
125
|
+
/**
|
|
126
|
+
* Wraps the model invocation with custom logic. This allows you to:
|
|
127
|
+
* - Modify the request before calling the model
|
|
128
|
+
* - Handle errors and retry with different parameters
|
|
129
|
+
* - Post-process the response
|
|
130
|
+
* - Implement custom caching, logging, or other cross-cutting concerns
|
|
131
|
+
*
|
|
132
|
+
* @param request - The model request containing model, messages, systemPrompt, tools, state, and runtime.
|
|
133
|
+
* @param handler - The function that invokes the model. Call this with a ModelRequest to get the response.
|
|
134
|
+
* @returns The response from the model (or a modified version).
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* wrapModelCall: async (request, handler) => {
|
|
139
|
+
* // Modify request before calling
|
|
140
|
+
* const modifiedRequest = { ...request, systemPrompt: "You are helpful" };
|
|
141
|
+
*
|
|
142
|
+
* try {
|
|
143
|
+
* // Call the model
|
|
144
|
+
* return await handler(modifiedRequest);
|
|
145
|
+
* } catch (error) {
|
|
146
|
+
* // Handle errors and retry with fallback
|
|
147
|
+
* const fallbackRequest = { ...request, model: fallbackModel };
|
|
148
|
+
* return await handler(fallbackRequest);
|
|
149
|
+
* }
|
|
150
|
+
* }
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
wrapModelCall?(request: ModelRequest<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>, handler: (request: ModelRequest<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>) => Promise<AIMessage> | AIMessage): Promise<AIMessage> | AIMessage;
|
|
154
|
+
beforeAgent?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
155
|
+
beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
156
|
+
afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
157
|
+
afterAgent?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Helper type to filter out properties that start with underscore (private properties)
|
|
161
|
+
*/
|
|
162
|
+
type FilterPrivateProps<T> = { [K in keyof T as K extends `_${string}` ? never : K]: T[K] };
|
|
163
|
+
/**
|
|
164
|
+
* Helper type to infer the state schema type from a middleware
|
|
165
|
+
* This filters out private properties (those starting with underscore)
|
|
166
|
+
*/
|
|
167
|
+
type InferMiddlewareState<T extends AgentMiddleware> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};
|
|
168
|
+
/**
|
|
169
|
+
* Helper type to infer the input state schema type from a middleware (all properties optional)
|
|
170
|
+
* This filters out private properties (those starting with underscore)
|
|
171
|
+
*/
|
|
172
|
+
type InferMiddlewareInputState<T extends AgentMiddleware> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};
|
|
173
|
+
/**
|
|
174
|
+
* Helper type to infer merged state from an array of middleware (just the middleware states)
|
|
175
|
+
*/
|
|
176
|
+
type InferMiddlewareStates<T = AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};
|
|
177
|
+
/**
|
|
178
|
+
* Helper type to infer merged input state from an array of middleware (with optional defaults)
|
|
179
|
+
*/
|
|
180
|
+
type InferMiddlewareInputStates<T extends readonly AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};
|
|
181
|
+
/**
|
|
182
|
+
* Helper type to infer merged state from an array of middleware (includes built-in state)
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Helper type to infer the input context schema type from a middleware (with optional defaults)
|
|
187
|
+
*/
|
|
188
|
+
type InferMiddlewareContextInput<T extends AgentMiddleware> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};
|
|
189
|
+
/**
|
|
190
|
+
* Helper type to infer merged context from an array of middleware
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Helper to merge two context types, preserving undefined unions
|
|
195
|
+
*/
|
|
196
|
+
type MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;
|
|
197
|
+
/**
|
|
198
|
+
* Helper type to infer merged input context from an array of middleware (with optional defaults)
|
|
199
|
+
*/
|
|
200
|
+
type InferMiddlewareContextInputs<T extends readonly AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};
|
|
201
|
+
/**
|
|
202
|
+
* Helper type to extract input type from context schema (with optional defaults)
|
|
203
|
+
*/
|
|
204
|
+
type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>["State"] : {};
|
|
205
|
+
type ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;
|
|
206
|
+
//#endregion
|
|
207
|
+
export { AgentMiddleware, AnyAnnotationRoot, InferContextInput, InferMiddlewareContextInputs, InferMiddlewareInputStates, InferMiddlewareStates, MiddlewareResult, ToAnnotationRoot, ToolCallHandler, ToolCallRequest, ToolCallWrapper };
|
|
208
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":["InteropZodObject","InteropZodDefault","InteropZodOptional","InferInteropZodInput","InferInteropZodOutput","AnnotationRoot","InteropZodToStateDefinition","AIMessage","ToolMessage","ToolCall","Command","JumpToTarget","ClientTool","ServerTool","Runtime","AgentBuiltInState","ModelRequest","AnyAnnotationRoot","MiddlewareResult","TState","ToolCallRequest","Record","TContext","ToolCallHandler","Promise","ToolCallWrapper","AgentMiddleware","TSchema","TContextSchema","TFullContext","Partial","FilterPrivateProps","T","K","InferMiddlewareState","S","InferMiddlewareInputState","InferMiddlewareStates","First","Rest","InferMiddlewareInputStates","InferMergedState","InferMergedInputState","InferMiddlewareContext","C","InferMiddlewareContextInput","Inner","InferMiddlewareContexts","MergeContextTypes","A","B","InferMiddlewareContextInputs","InferContextInput","ContextSchema","ToAnnotationRoot"],"sources":["../../../src/agents/middleware/types.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodDefault, InteropZodOptional, InferInteropZodInput, InferInteropZodOutput } from \"@langchain/core/utils/types\";\nimport type { AnnotationRoot } from \"@langchain/langgraph\";\nimport type { InteropZodToStateDefinition } from \"@langchain/langgraph/zod\";\nimport type { AIMessage, ToolMessage } from \"@langchain/core/messages\";\nimport type { ToolCall } from \"@langchain/core/messages/tool\";\nimport type { Command } from \"@langchain/langgraph\";\nimport type { JumpToTarget } from \"../constants.js\";\nimport type { ClientTool, ServerTool } from \"../tools.js\";\nimport type { Runtime, AgentBuiltInState } from \"../runtime.js\";\nimport type { ModelRequest } from \"../nodes/types.js\";\nexport type AnyAnnotationRoot = AnnotationRoot<any>;\n/**\n * Result type for middleware functions.\n */\nexport type MiddlewareResult<TState> = TState | void;\n/**\n * Represents a tool call request for the wrapToolCall hook.\n * Contains the tool call information along with the agent's current state and runtime.\n */\nexport interface ToolCallRequest<TState extends Record<string, unknown> = Record<string, unknown>, TContext = unknown> {\n /**\n * The tool call to be executed\n */\n toolCall: ToolCall;\n /**\n * The BaseTool instance being invoked.\n * Provides access to tool metadata like name, description, schema, etc.\n */\n tool: ClientTool | ServerTool;\n /**\n * The current agent state (includes both middleware state and built-in state).\n */\n state: TState & AgentBuiltInState;\n /**\n * The runtime context containing metadata, signal, writer, interrupt, etc.\n */\n runtime: Runtime<TContext>;\n}\n/**\n * Handler function type for wrapping tool calls.\n * Takes a tool call and returns the tool result or a command.\n */\nexport type ToolCallHandler = (toolCall: ToolCall) => Promise<ToolMessage | Command> | ToolMessage | Command;\n/**\n * Wrapper function type for the wrapToolCall hook.\n * Allows middleware to intercept and modify tool execution.\n */\nexport type ToolCallWrapper<TState extends Record<string, unknown> = Record<string, unknown>, TContext = unknown> = (request: ToolCallRequest<TState, TContext>, handler: ToolCallHandler) => Promise<ToolMessage | Command> | ToolMessage | Command;\n/**\n * Base middleware interface.\n */\nexport interface AgentMiddleware<TSchema extends InteropZodObject | undefined = any, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = any, TFullContext = any> {\n stateSchema?: TSchema;\n contextSchema?: TContextSchema;\n name: string;\n beforeAgentJumpTo?: JumpToTarget[];\n beforeModelJumpTo?: JumpToTarget[];\n afterModelJumpTo?: JumpToTarget[];\n afterAgentJumpTo?: JumpToTarget[];\n tools?: (ClientTool | ServerTool)[];\n /**\n * Wraps tool execution with custom logic. This allows you to:\n * - Modify tool call parameters before execution\n * - Handle errors and retry with different parameters\n * - Post-process tool results\n * - Implement caching, logging, authentication, or other cross-cutting concerns\n * - Return Command objects for advanced control flow\n *\n * The handler receives a ToolCallRequest containing the tool call, state, and runtime,\n * along with a handler function to execute the actual tool.\n *\n * @param request - The tool call request containing toolCall, state, and runtime.\n * @param handler - The function that executes the tool. Call this with a ToolCall to get the result.\n * @returns The tool result as a ToolMessage or a Command for advanced control flow.\n *\n * @example\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * console.log(`Calling tool: ${request.tool.name}`);\n * console.log(`Tool description: ${request.tool.description}`);\n *\n * try {\n * // Execute the tool\n * const result = await handler(request.toolCall);\n * console.log(`Tool ${request.tool.name} succeeded`);\n * return result;\n * } catch (error) {\n * console.error(`Tool ${request.tool.name} failed:`, error);\n * // Could return a custom error message or retry\n * throw error;\n * }\n * }\n * ```\n *\n * @example Authentication\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * // Check if user is authorized for this tool\n * if (!request.runtime.context.isAuthorized(request.tool.name)) {\n * return new ToolMessage({\n * content: \"Unauthorized to call this tool\",\n * tool_call_id: request.toolCall.id,\n * });\n * }\n * return handler(request.toolCall);\n * }\n * ```\n *\n * @example Caching\n * ```ts\n * const cache = new Map();\n * wrapToolCall: async (request, handler) => {\n * const cacheKey = `${request.tool.name}:${JSON.stringify(request.toolCall.args)}`;\n * if (cache.has(cacheKey)) {\n * return cache.get(cacheKey);\n * }\n * const result = await handler(request.toolCall);\n * cache.set(cacheKey, result);\n * return result;\n * }\n * ```\n */\n wrapToolCall?: ToolCallWrapper<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>;\n /**\n * Wraps the model invocation with custom logic. This allows you to:\n * - Modify the request before calling the model\n * - Handle errors and retry with different parameters\n * - Post-process the response\n * - Implement custom caching, logging, or other cross-cutting concerns\n *\n * @param request - The model request containing model, messages, systemPrompt, tools, state, and runtime.\n * @param handler - The function that invokes the model. Call this with a ModelRequest to get the response.\n * @returns The response from the model (or a modified version).\n *\n * @example\n * ```ts\n * wrapModelCall: async (request, handler) => {\n * // Modify request before calling\n * const modifiedRequest = { ...request, systemPrompt: \"You are helpful\" };\n *\n * try {\n * // Call the model\n * return await handler(modifiedRequest);\n * } catch (error) {\n * // Handle errors and retry with fallback\n * const fallbackRequest = { ...request, model: fallbackModel };\n * return await handler(fallbackRequest);\n * }\n * }\n * ```\n */\n wrapModelCall?(request: ModelRequest<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>, handler: (request: ModelRequest<(TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, TFullContext>) => Promise<AIMessage> | AIMessage): Promise<AIMessage> | AIMessage;\n beforeAgent?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n afterAgent?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n}\n/**\n * Helper type to filter out properties that start with underscore (private properties)\n */\ntype FilterPrivateProps<T> = {\n [K in keyof T as K extends `_${string}` ? never : K]: T[K];\n};\n/**\n * Helper type to infer the state schema type from a middleware\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareState<T extends AgentMiddleware> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};\n/**\n * Helper type to infer the input state schema type from a middleware (all properties optional)\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareInputState<T extends AgentMiddleware> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (just the middleware states)\n */\nexport type InferMiddlewareStates<T = AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};\n/**\n * Helper type to infer merged input state from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareInputStates<T extends readonly AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (includes built-in state)\n */\nexport type InferMergedState<T extends readonly AgentMiddleware[]> = InferMiddlewareStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer merged input state from an array of middleware (includes built-in state)\n */\nexport type InferMergedInputState<T extends readonly AgentMiddleware[]> = InferMiddlewareInputStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer the context schema type from a middleware\n */\nexport type InferMiddlewareContext<T extends AgentMiddleware> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer the input context schema type from a middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInput<T extends AgentMiddleware> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer merged context from an array of middleware\n */\nexport type InferMiddlewareContexts<T extends readonly AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? InferMiddlewareContext<First> & InferMiddlewareContexts<Rest> : InferMiddlewareContext<First> : {} : {};\n/**\n * Helper to merge two context types, preserving undefined unions\n */\ntype MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;\n/**\n * Helper type to infer merged input context from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInputs<T extends readonly AgentMiddleware[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware ? Rest extends readonly AgentMiddleware[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};\n/**\n * Helper type to extract input type from context schema (with optional defaults)\n */\nexport type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>[\"State\"] : {};\nexport type ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;\nexport {};\n"],"mappings":";;;;;;;;;;;AAWYiB,KAAAA,iBAAAA,GAAoBZ,cAAAA,CAAAA,GAAc,CAAA;AAI9C;AAKA;;AAAgDgB,KALpCH,gBAKoCG,CAAAA,MAAAA,CAAAA,GALTF,MAKSE,GAAAA,IAAAA;;;;;AAarCF,UAbMC,eAaND,CAAAA,eAbqCE,MAarCF,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,GAb+DE,MAa/DF,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA,EAAAA,WAAAA,OAAAA,CAAAA,CAAAA;EAAM;;;EAIG,QAAA,EAbNV,UAaM;EAMRc;;;;EAA6D,IAAGb,EAdlEE,UAckEF,GAdrDG,UAcqDH;EAAO;;;EAAyB,KAAA,EAVjGS,MAUiG,GAVxFJ,iBAUwF;EAKhGU;;;EAAqC,OAAoBJ,EAXxDP,OAWwDO,CAXhDC,QAWgDD,CAAAA;;;;;;AAA+IX,KALxMa,eAAAA,GAKwMb,CAAAA,QAAAA,EAL3KD,UAK2KC,EAAAA,GAL9Jc,OAK8Jd,CALtJF,WAKsJE,GALxIA,OAKwIA,CAAAA,GAL7HF,WAK6HE,GAL/GA,OAK+GA;;;;AAAgC;AAInOgB,KAJLD,eAIoB,CAAA,eAJWJ,MAIX,CAAA,MAAA,EAAA,OAAA,CAAA,GAJqCA,MAIrC,CAAA,MAAA,EAAA,OAAA,CAAA,EAAA,WAAA,OAAA,CAAA,GAAA,CAAA,OAAA,EAJ8FD,eAI9F,CAJ8GD,MAI9G,EAJsHG,QAItH,CAAA,EAAA,OAAA,EAJ0IC,eAI1I,EAAA,GAJ8JC,OAI9J,CAJsKhB,WAItK,GAJoLE,OAIpL,CAAA,GAJ+LF,WAI/L,GAJ6ME,OAI7M;;;;AAAiHV,UAAhI0B,eAAgI1B,CAAAA,gBAAhGA,gBAAgGA,GAAAA,SAAAA,GAAAA,GAAAA,EAAAA,uBAArCA,gBAAqCA,GAAlBC,iBAAkBD,CAAAA,gBAAAA,CAAAA,GAAoBE,kBAApBF,CAAuCA,gBAAvCA,CAAAA,GAAAA,SAAAA,GAAAA,GAAAA,EAAAA,eAAAA,GAAAA,CAAAA,CAAAA;EAAgB,WAAlCC,CAAAA,EAC7G0B,OAD6G1B;EAAiB,aAAwCD,CAAAA,EAEpK4B,cAFoK5B;EAAgB,IAAnCE,EAAAA,MAAAA;EAAkB,iBACrKyB,CAAAA,EAGMhB,YAHNgB,EAAAA;EAAO,iBACLC,CAAAA,EAGIjB,YAHJiB,EAAAA;EAAc,gBAEVjB,CAAAA,EAEDA,YAFCA,EAAAA;EAAY,gBACZA,CAAAA,EAEDA,YAFCA,EAAAA;EAAY,KACbA,CAAAA,EAAAA,CAEVC,UAFUD,GAEGE,UAFHF,CAAAA,EAAAA;EAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiG4C,YAAkBI,CAAAA,EAhC9EU,eAgC8EV,CAAAA,CAhC7DY,OAgC6DZ,SAhC7Cf,gBAgC6Ce,GAhC1BZ,oBAgC0BY,CAhCLY,OAgCKZ,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,GAhCYA,iBAgCZA,EAhC+Bc,YAgC/Bd,CAAAA;EAAiB;;;;;;;;;;;;;;;;;;;;;;;AAC0C;AAC3J;;;;EAKqB,aAAgCkB,EAAAA,OAAAA,EAV1BjB,YAU0BiB,CAAAA,CAVZN,OAUYM,SAVIjC,gBAUJiC,GAVuB9B,oBAUvB8B,CAV4CN,OAU5CM,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,GAV6DlB,iBAU7DkB,EAVgFJ,YAUhFI,CAAAA,EAAAA,OAAAA,EAAAA,CAAAA,OAAAA,EAVkHjB,YAUlHiB,CAAAA,CAVgIN,OAUhIM,SAVgJjC,gBAUhJiC,GAVmK9B,oBAUnK8B,CAVwLN,OAUxLM,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,GAVyMlB,iBAUzMkB,EAV4NJ,YAU5NI,CAAAA,EAAAA,GAV8OT,OAU9OS,CAVsP1B,SAUtP0B,CAAAA,GAVmQ1B,SAUnQ0B,CAAAA,EAV+QT,OAU/QS,CAVuR1B,SAUvR0B,CAAAA,GAVoS1B,SAUpS0B;EAAC,WAAGD,EAAAA,KAAAA,EAAAA,CATjCL,OASiCK,SATjBhC,gBASiBgC,GATE7B,oBASF6B,CATuBL,OASvBK,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,GATwCjB,iBASxCiB,EAAAA,OAAAA,EAToElB,OASpEkB,CAT4EH,YAS5EG,CAAAA,CAAAA,EAT4FR,OAS5FQ,CAToGd,gBASpGc,CATqHF,OASrHE,CAT6HL,OAS7HK,SAT6IhC,gBAS7IgC,GATgK7B,oBAShK6B,CATqLL,OASrLK,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;EAAC,WAACC,EAAAA,KAAAA,EAAAA,CARnCN,OAQmCM,SARnBjC,gBAQmBiC,GARA9B,oBAQA8B,CARqBN,OAQrBM,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,GARsClB,iBAQtCkB,EAAAA,OAAAA,EARkEnB,OAQlEmB,CAR0EJ,YAQ1EI,CAAAA,CAAAA,EAR0FT,OAQ1FS,CARkGf,gBAQlGe,CARmHH,OAQnHG,CAR2HN,OAQ3HM,SAR2IjC,gBAQ3IiC,GAR8J9B,oBAQ9J8B,CARmLN,OAQnLM,CAAAA,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;EAAC,UAAA,EAAA,KAAA,EAAA,CAPrCN,OAOqC,SAPrB3B,gBAOqB,GAPFG,oBAOE,CAPmBwB,OAOnB,CAAA,GAAA,CAAA,CAAA,CAAA,GAPoCZ,iBAOpC,EAAA,OAAA,EAPgED,OAOhE,CAPwEe,YAOxE,CAAA,CAAA,EAPwFL,OAOxF,CAPgGN,gBAOhG,CAPiHY,OAOjH,CAPyHH,OAOzH,SAPyI3B,gBAOzI,GAP4JG,oBAO5J,CAPiLwB,OAOjL,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;EAMjDO,UAAAA,EAAAA,KAAAA,EAAAA,CAZYP,OAYQ,SAZQ3B,gBAYR,GAZ2BG,oBAY3B,CAZgDwB,OAYhD,CAAA,GAAA,CAAA,CAAA,CAAA,GAZiEZ,iBAYjE,EAAA,OAAA,EAZ6FD,OAY7F,CAZqGe,YAYrG,CAAA,CAAA,EAZqHL,OAYrH,CAZ6HN,gBAY7H,CAZ8IY,OAY9I,CAZsJH,OAYtJ,SAZsK3B,gBAYtK,GAZyLG,oBAYzL,CAZ8MwB,OAY9M,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;KAP3BI,kBAOwGI,CAAAA,CAAAA,CAAAA,GAAAA,QAAUnC,MANvGgC,CAMuGhC,IANlGiC,CAMkGjC,SAAAA,IAAAA,MAAAA,EAAAA,GAAAA,KAAAA,GANjEiC,CAMiEjC,GAN7DgC,CAM6DhC,CAN3DiC,CAM2DjC,CAAAA,EAAgB;;;AAAqB;AAK5J;AAAqC,KALzBkC,oBAKyB,CAAA,UALMR,eAKN,CAAA,GALyBM,CAKzB,SALmCN,eAKnC,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,GAAA,CAAA,GALwES,CAKxE,SALkFnC,gBAKlF,GALqG+B,kBAKrG,CALwH3B,qBAKxH,CAL8I+B,CAK9I,CAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA;;;;;AAAuFnC,KAAhHoC,yBAAgHpC,CAAAA,UAA5E0B,eAA4E1B,CAAAA,GAAzDgC,CAAyDhC,SAA/C0B,eAA+C1B,CAAAA,KAAAA,EAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,GAAVmC,CAAUnC,SAAAA,gBAAAA,GAAmB+B,kBAAnB/B,CAAsCG,oBAAtCH,CAA2DmC,CAA3DnC,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA;;;;AAAqC,KAIrJqC,qBAJqJ,CAAA,IAI3HX,eAJ2H,EAAA,CAAA,GAItGM,CAJsG,SAAA,SAAA,EAAA,GAAA,CAAA,CAAA,GAIzEA,CAJyE,SAAA,SAAA,CAAA,KAAA,MAAA,EAAA,GAAA,KAAA,KAAA,CAAA,GAIvBM,KAJuB,SAITZ,eAJS,GAISa,IAJT,SAAA,SAI+Bb,eAJ/B,EAAA,GAImDQ,oBAJnD,CAIwEI,KAJxE,CAAA,GAIiFD,qBAJjF,CAIuGE,IAJvG,CAAA,GAI+GL,oBAJ/G,CAIoII,KAJpI,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA;AAIjK;;;AAA2DN,KAI/CQ,0BAJ+CR,CAAAA,UAAAA,SAIDN,eAJCM,EAAAA,CAAAA,GAIoBA,CAJpBA,SAAAA,SAAAA,EAAAA,GAAAA,CAAAA,CAAAA,GAIiDA,CAJjDA,SAAAA,SAAAA,CAAAA,KAAAA,MAAAA,EAAAA,GAAAA,KAAAA,KAAAA,CAAAA,GAImGM,KAJnGN,SAIiHN,eAJjHM,GAImIO,IAJnIP,SAAAA,SAIyJN,eAJzJM,EAAAA,GAI6KI,yBAJ7KJ,CAIuMM,KAJvMN,CAAAA,GAIgNQ,0BAJhNR,CAI2OO,IAJ3OP,CAAAA,GAImPI,yBAJnPJ,CAI6QM,KAJ7QN,CAAAA,GAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA;;;;;AAI3D;;;AAA+EA,KAgBnEa,2BAhBmEb,CAAAA,UAgB7BN,eAhB6BM,CAAAA,GAgBVA,CAhBUA,SAgBAN,eAhBAM,CAAAA,GAAAA,EAAAA,KAAAA,EAAAA,EAAAA,GAAAA,CAAAA,GAgBqCY,CAhBrCZ,SAgB+C9B,kBAhB/C8B,CAAAA,KAAAA,MAAAA,CAAAA,GAgBiF7B,oBAhBjF6B,CAgBsGc,KAhBtGd,CAAAA,GAAAA,SAAAA,GAgB2HY,CAhB3HZ,SAgBqIhC,gBAhBrIgC,GAgBwJ7B,oBAhBxJ6B,CAgB6KY,CAhB7KZ,CAAAA,GAAAA,CAAAA,CAAAA,GAAAA,CAAAA,CAAAA;;;;;;;;KAwB1EgB,iBAxBiST,CAAAA,CAAAA,EAAAA,CAAAA,CAAAA,GAAAA,CAwBtQU,CAxBsQV,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAAAA,CAwB5OW,CAxB4OX,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAAAA,SAAAA,GAwBvMW,CAxBuMX,GAAAA,SAAAA,GAAAA,CAwBtLW,CAxBsLX,CAAAA,SAAAA,CAAAA,SAAAA,CAAAA,GAwB7JU,CAxB6JV,GAAAA,SAAAA,GAAAA,CAwB5IU,CAxB4IV,CAAAA,SAAAA,CAwBhIW,CAxBgIX,CAAAA,GAwB3HU,CAxB2HV,GAAAA,CAwBtHW,CAxBsHX,CAAAA,SAAAA,CAwB1GU,CAxB0GV,CAAAA,GAwBrGW,CAxBqGX,GAwBjGU,CAxBiGV,GAwB7FW,CAxB6FX;;;;AAAiC,KA4B3TY,4BA5B2T,CAAA,UAAA,SA4B3QzB,eA5B2Q,EAAA,CAAA,GA4BtPM,CA5BsP,SAAA,SAAA,EAAA,GAAA,CAAA,CAAA,GA4BzNA,CA5ByN,SAAA,SAAA,CAAA,KAAA,MAAA,EAAA,GAAA,KAAA,KAAA,CAAA,GA4BvKM,KA5BuK,SA4BzJZ,eA5ByJ,GA4BvIa,IA5BuI,SAAA,SA4BjHb,eA5BiH,EAAA,GA4B7FsB,iBA5B6F,CA4B3EH,2BA5B2E,CA4B/CP,KA5B+C,CAAA,EA4BvCa,4BA5BuC,CA4BVZ,IA5BU,CAAA,CAAA,GA4BDM,2BA5BC,CA4B2BP,KA5B3B,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,CAAA;AAgBvU;;;AAAqEN,KAgBzDoB,iBAhByDpB,CAAAA,sBAgBjBf,iBAhBiBe,GAgBGhC,gBAhBHgC,CAAAA,GAgBuBqB,aAhBvBrB,SAgB6ChC,gBAhB7CgC,GAgBgE7B,oBAhBhE6B,CAgBqFqB,aAhBrFrB,CAAAA,GAgBsGqB,aAhBtGrB,SAgB4Hf,iBAhB5He,GAgBgJsB,gBAhBhJtB,CAgBiKqB,aAhBjKrB,CAAAA,CAAAA,OAAAA,CAAAA,GAAAA,CAAAA,CAAAA;AAAUN,KAiBnE4B,gBAjBmE5B,CAAAA,UAiBxCT,iBAjBwCS,GAiBpB1B,gBAjBoB0B,CAAAA,GAiBAuB,CAjBAvB,SAiBUT,iBAjBVS,GAiB8BuB,CAjB9BvB,GAiBkCuB,CAjBlCvB,SAiB4C1B,gBAjB5C0B,GAiB+DrB,cAjB/DqB,CAiB8EpB,2BAjB9EoB,CAiB0GuB,CAjB1GvB,CAAAA,CAAAA,GAAAA,KAAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/agents/middleware/utils.ts
|
|
3
|
+
/**
|
|
4
|
+
* Default token counter that approximates based on character count
|
|
5
|
+
* @param messages Messages to count tokens for
|
|
6
|
+
* @returns Approximate token count
|
|
7
|
+
*/
|
|
8
|
+
function countTokensApproximately(messages) {
|
|
9
|
+
let totalChars = 0;
|
|
10
|
+
for (const msg of messages) {
|
|
11
|
+
let textContent;
|
|
12
|
+
if (typeof msg.content === "string") textContent = msg.content;
|
|
13
|
+
else if (Array.isArray(msg.content)) textContent = msg.content.map((item) => {
|
|
14
|
+
if (typeof item === "string") return item;
|
|
15
|
+
if (item.type === "text" && "text" in item) return item.text;
|
|
16
|
+
return "";
|
|
17
|
+
}).join("");
|
|
18
|
+
else textContent = "";
|
|
19
|
+
totalChars += textContent.length;
|
|
20
|
+
}
|
|
21
|
+
return Math.ceil(totalChars / 4);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.countTokensApproximately = countTokensApproximately;
|
|
26
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":["messages: BaseMessage[]","textContent: string"],"sources":["../../../src/agents/middleware/utils.ts"],"sourcesContent":["import type { BaseMessage } from \"@langchain/core/messages\";\n\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport function countTokensApproximately(messages: BaseMessage[]): number {\n let totalChars = 0;\n for (const msg of messages) {\n let textContent: string;\n if (typeof msg.content === \"string\") {\n textContent = msg.content;\n } else if (Array.isArray(msg.content)) {\n textContent = msg.content\n .map((item) => {\n if (typeof item === \"string\") return item;\n if (item.type === \"text\" && \"text\" in item) return item.text;\n return \"\";\n })\n .join(\"\");\n } else {\n textContent = \"\";\n }\n totalChars += textContent.length;\n }\n // Approximate 1 token = 4 characters\n return Math.ceil(totalChars / 4);\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,yBAAyBA,UAAiC;CACxE,IAAI,aAAa;AACjB,MAAK,MAAM,OAAO,UAAU;EAC1B,IAAIC;AACJ,MAAI,OAAO,IAAI,YAAY,UACzB,cAAc,IAAI;WACT,MAAM,QAAQ,IAAI,QAAQ,EACnC,cAAc,IAAI,QACf,IAAI,CAAC,SAAS;AACb,OAAI,OAAO,SAAS,SAAU,QAAO;AACrC,OAAI,KAAK,SAAS,UAAU,UAAU,KAAM,QAAO,KAAK;AACxD,UAAO;EACR,EAAC,CACD,KAAK,GAAG;OAEX,cAAc;EAEhB,cAAc,YAAY;CAC3B;AAED,QAAO,KAAK,KAAK,aAAa,EAAE;AACjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseMessage } from "@langchain/core/messages";
|
|
2
|
+
|
|
3
|
+
//#region src/agents/middleware/utils.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Default token counter that approximates based on character count
|
|
7
|
+
* @param messages Messages to count tokens for
|
|
8
|
+
* @returns Approximate token count
|
|
9
|
+
*/
|
|
10
|
+
declare function countTokensApproximately(messages: BaseMessage[]): number;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { countTokensApproximately };
|
|
13
|
+
//# sourceMappingURL=utils.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.cts","names":["BaseMessage","countTokensApproximately"],"sources":["../../../src/agents/middleware/utils.d.ts"],"sourcesContent":["import type { BaseMessage } from \"@langchain/core/messages\";\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport declare function countTokensApproximately(messages: BaseMessage[]): number;\n"],"mappings":";;;;;;AAMA;;;iBAAwBC,wBAAAA,WAAmCD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseMessage } from "@langchain/core/messages";
|
|
2
|
+
|
|
3
|
+
//#region src/agents/middleware/utils.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Default token counter that approximates based on character count
|
|
7
|
+
* @param messages Messages to count tokens for
|
|
8
|
+
* @returns Approximate token count
|
|
9
|
+
*/
|
|
10
|
+
declare function countTokensApproximately(messages: BaseMessage[]): number;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { countTokensApproximately };
|
|
13
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":["BaseMessage","countTokensApproximately"],"sources":["../../../src/agents/middleware/utils.d.ts"],"sourcesContent":["import type { BaseMessage } from \"@langchain/core/messages\";\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport declare function countTokensApproximately(messages: BaseMessage[]): number;\n"],"mappings":";;;;;;AAMA;;;iBAAwBC,wBAAAA,WAAmCD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//#region src/agents/middleware/utils.ts
|
|
2
|
+
/**
|
|
3
|
+
* Default token counter that approximates based on character count
|
|
4
|
+
* @param messages Messages to count tokens for
|
|
5
|
+
* @returns Approximate token count
|
|
6
|
+
*/
|
|
7
|
+
function countTokensApproximately(messages) {
|
|
8
|
+
let totalChars = 0;
|
|
9
|
+
for (const msg of messages) {
|
|
10
|
+
let textContent;
|
|
11
|
+
if (typeof msg.content === "string") textContent = msg.content;
|
|
12
|
+
else if (Array.isArray(msg.content)) textContent = msg.content.map((item) => {
|
|
13
|
+
if (typeof item === "string") return item;
|
|
14
|
+
if (item.type === "text" && "text" in item) return item.text;
|
|
15
|
+
return "";
|
|
16
|
+
}).join("");
|
|
17
|
+
else textContent = "";
|
|
18
|
+
totalChars += textContent.length;
|
|
19
|
+
}
|
|
20
|
+
return Math.ceil(totalChars / 4);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { countTokensApproximately };
|
|
25
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["messages: BaseMessage[]","textContent: string"],"sources":["../../../src/agents/middleware/utils.ts"],"sourcesContent":["import type { BaseMessage } from \"@langchain/core/messages\";\n\n/**\n * Default token counter that approximates based on character count\n * @param messages Messages to count tokens for\n * @returns Approximate token count\n */\nexport function countTokensApproximately(messages: BaseMessage[]): number {\n let totalChars = 0;\n for (const msg of messages) {\n let textContent: string;\n if (typeof msg.content === \"string\") {\n textContent = msg.content;\n } else if (Array.isArray(msg.content)) {\n textContent = msg.content\n .map((item) => {\n if (typeof item === \"string\") return item;\n if (item.type === \"text\" && \"text\" in item) return item.text;\n return \"\";\n })\n .join(\"\");\n } else {\n textContent = \"\";\n }\n totalChars += textContent.length;\n }\n // Approximate 1 token = 4 characters\n return Math.ceil(totalChars / 4);\n}\n"],"mappings":";;;;;;AAOA,SAAgB,yBAAyBA,UAAiC;CACxE,IAAI,aAAa;AACjB,MAAK,MAAM,OAAO,UAAU;EAC1B,IAAIC;AACJ,MAAI,OAAO,IAAI,YAAY,UACzB,cAAc,IAAI;WACT,MAAM,QAAQ,IAAI,QAAQ,EACnC,cAAc,IAAI,QACf,IAAI,CAAC,SAAS;AACb,OAAI,OAAO,SAAS,SAAU,QAAO;AACrC,OAAI,KAAK,SAAS,UAAU,UAAU,KAAM,QAAO,KAAK;AACxD,UAAO;EACR,EAAC,CACD,KAAK,GAAG;OAEX,cAAc;EAEhB,cAAc,YAAY;CAC3B;AAED,QAAO,KAAK,KAAK,aAAa,EAAE;AACjC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/agents/middleware.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a middleware instance with automatic schema inference.
|
|
5
|
+
*
|
|
6
|
+
* @param config - Middleware configuration
|
|
7
|
+
* @param config.name - The name of the middleware
|
|
8
|
+
* @param config.stateSchema - The schema of the middleware state
|
|
9
|
+
* @param config.contextSchema - The schema of the middleware context
|
|
10
|
+
* @param config.wrapModelCall - The function to wrap model invocation
|
|
11
|
+
* @param config.wrapToolCall - The function to wrap tool invocation
|
|
12
|
+
* @param config.beforeModel - The function to run before the model call
|
|
13
|
+
* @param config.afterModel - The function to run after the model call
|
|
14
|
+
* @param config.beforeAgent - The function to run before the agent execution starts
|
|
15
|
+
* @param config.afterAgent - The function to run after the agent execution completes
|
|
16
|
+
* @returns A middleware instance
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const authMiddleware = createMiddleware({
|
|
21
|
+
* name: "AuthMiddleware",
|
|
22
|
+
* stateSchema: z.object({
|
|
23
|
+
* isAuthenticated: z.boolean().default(false),
|
|
24
|
+
* }),
|
|
25
|
+
* contextSchema: z.object({
|
|
26
|
+
* userId: z.string(),
|
|
27
|
+
* }),
|
|
28
|
+
* beforeModel: async (state, runtime, controls) => {
|
|
29
|
+
* if (!state.isAuthenticated) {
|
|
30
|
+
* return controls.terminate(new Error("Not authenticated"));
|
|
31
|
+
* }
|
|
32
|
+
* },
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
function createMiddleware(config) {
|
|
37
|
+
const middleware = {
|
|
38
|
+
name: config.name,
|
|
39
|
+
stateSchema: config.stateSchema,
|
|
40
|
+
contextSchema: config.contextSchema,
|
|
41
|
+
beforeAgentJumpTo: config.beforeAgentJumpTo,
|
|
42
|
+
beforeModelJumpTo: config.beforeModelJumpTo,
|
|
43
|
+
afterModelJumpTo: config.afterModelJumpTo,
|
|
44
|
+
afterAgentJumpTo: config.afterAgentJumpTo,
|
|
45
|
+
tools: config.tools ?? []
|
|
46
|
+
};
|
|
47
|
+
if (config.wrapToolCall) middleware.wrapToolCall = async (request, handler) => Promise.resolve(config.wrapToolCall(request, handler));
|
|
48
|
+
if (config.wrapModelCall) middleware.wrapModelCall = async (request, handler) => Promise.resolve(config.wrapModelCall(request, handler));
|
|
49
|
+
if (config.beforeAgent) middleware.beforeAgent = async (state, runtime) => Promise.resolve(config.beforeAgent(state, runtime));
|
|
50
|
+
if (config.beforeModel) middleware.beforeModel = async (state, runtime) => Promise.resolve(config.beforeModel(state, runtime));
|
|
51
|
+
if (config.afterModel) middleware.afterModel = async (state, runtime) => Promise.resolve(config.afterModel(state, runtime));
|
|
52
|
+
if (config.afterAgent) middleware.afterAgent = async (state, runtime) => Promise.resolve(config.afterAgent(state, runtime));
|
|
53
|
+
return middleware;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
exports.createMiddleware = createMiddleware;
|
|
58
|
+
//# sourceMappingURL=middleware.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.cjs","names":["config: {\n /**\n * The name of the middleware\n */\n name: string;\n /**\n * The schema of the middleware state. Middleware state is persisted between multiple invocations. It can be either:\n * - A Zod object\n * - A Zod optional object\n * - A Zod default object\n * - Undefined\n */\n stateSchema?: TSchema;\n /**\n * The schema of the middleware context. Middleware context is read-only and not persisted between multiple invocations. It can be either:\n * - A Zod object\n * - A Zod optional object\n * - A Zod default object\n * - Undefined\n */\n contextSchema?: TContextSchema;\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `beforeAgent` hook.\n */\n beforeAgentJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `beforeModel` hook.\n */\n beforeModelJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `afterModel` hook.\n */\n afterModelJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `afterAgent` hook.\n */\n afterAgentJumpTo?: JumpToTarget[];\n /**\n * Additional tools registered by the middleware.\n */\n tools?: (ClientTool | ServerTool)[];\n /**\n * Wraps tool execution with custom logic. This allows you to:\n * - Modify tool call parameters before execution\n * - Handle errors and retry with different parameters\n * - Post-process tool results\n * - Implement caching, logging, authentication, or other cross-cutting concerns\n * - Return Command objects for advanced control flow\n *\n * The handler receives a ToolCallRequest containing the tool call, state, and runtime,\n * along with a handler function to execute the actual tool.\n *\n * @param request - The tool call request containing toolCall, state, and runtime.\n * @param handler - The function that executes the tool. Call this with a ToolCall to get the result.\n * @returns The tool result as a ToolMessage or a Command for advanced control flow.\n *\n * @example\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * console.log(`Calling tool: ${request.tool.name}`);\n * console.log(`Tool description: ${request.tool.description}`);\n *\n * try {\n * // Execute the tool\n * const result = await handler(request.toolCall);\n * console.log(`Tool ${request.tool.name} succeeded`);\n * return result;\n * } catch (error) {\n * console.error(`Tool ${request.tool.name} failed:`, error);\n * // Could return a custom error message or retry\n * throw error;\n * }\n * }\n * ```\n *\n * @example Authentication\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * // Check if user is authorized for this tool\n * if (!request.runtime.context.isAuthorized(request.tool.name)) {\n * return new ToolMessage({\n * content: \"Unauthorized to call this tool\",\n * tool_call_id: request.toolCall.id,\n * });\n * }\n * return handler(request.toolCall);\n * }\n * ```\n */\n wrapToolCall?: (\n request: ToolCallRequest<\n (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >,\n handler: ToolCallHandler\n ) => Promise<ToolMessage | Command> | ToolMessage | Command;\n /**\n * Wraps the model invocation with custom logic. This allows you to:\n * - Modify the request before calling the model\n * - Handle errors and retry with different parameters\n * - Post-process the response\n * - Implement custom caching, logging, or other cross-cutting concerns\n *\n * The request parameter contains: model, messages, systemPrompt, tools, state, and runtime.\n *\n * @param request - The model request containing all the parameters needed.\n * @param handler - The function that invokes the model. Call this with a ModelRequest to get the response.\n * @returns The response from the model (or a modified version).\n *\n * @example\n * ```ts\n * wrapModelCall: async (request, handler) => {\n * // Modify request before calling\n * const modifiedRequest = { ...request, systemPrompt: \"You are helpful\" };\n *\n * try {\n * // Call the model\n * return await handler(modifiedRequest);\n * } catch (error) {\n * // Handle errors and retry with fallback\n * const fallbackRequest = { ...request, model: fallbackModel };\n * return await handler(fallbackRequest);\n * }\n * }\n * ```\n */\n wrapModelCall?: (\n request: ModelRequest<\n (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >,\n handler: (\n request: ModelRequest<\n (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) => Promise<AIMessage> | AIMessage\n ) => Promise<AIMessage> | AIMessage;\n /**\n * The function to run before the agent execution starts. This function is called once at the start of the agent invocation.\n * It allows to modify the state of the agent before any model calls or tool executions.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n beforeAgent?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run before the model call. This function is called before the model is invoked and before the `wrapModelCall` hook.\n * It allows to modify the state of the agent.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n beforeModel?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run after the model call. This function is called after the model is invoked and before any tools are called.\n * It allows to modify the state of the agent after the model is invoked, e.g. to update tool call parameters.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n afterModel?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run after the agent execution completes. This function is called once at the end of the agent invocation.\n * It allows to modify the final state of the agent after all model calls and tool executions are complete.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n afterAgent?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n}","middleware: AgentMiddleware<TSchema, TContextSchema, any>"],"sources":["../../src/agents/middleware.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type {\n InteropZodObject,\n InteropZodDefault,\n InteropZodOptional,\n InferInteropZodInput,\n InferInteropZodOutput,\n} from \"@langchain/core/utils/types\";\nimport type { AIMessage, ToolMessage } from \"@langchain/core/messages\";\nimport type { Command } from \"@langchain/langgraph\";\n\nimport type { JumpToTarget } from \"./constants.js\";\nimport type { ClientTool, ServerTool } from \"./tools.js\";\nimport type { Runtime, AgentBuiltInState } from \"./runtime.js\";\nimport type {\n AgentMiddleware,\n MiddlewareResult,\n ToolCallRequest,\n ToolCallHandler,\n} from \"./middleware/types.js\";\nimport type { ModelRequest } from \"./nodes/types.js\";\n/**\n * Creates a middleware instance with automatic schema inference.\n *\n * @param config - Middleware configuration\n * @param config.name - The name of the middleware\n * @param config.stateSchema - The schema of the middleware state\n * @param config.contextSchema - The schema of the middleware context\n * @param config.wrapModelCall - The function to wrap model invocation\n * @param config.wrapToolCall - The function to wrap tool invocation\n * @param config.beforeModel - The function to run before the model call\n * @param config.afterModel - The function to run after the model call\n * @param config.beforeAgent - The function to run before the agent execution starts\n * @param config.afterAgent - The function to run after the agent execution completes\n * @returns A middleware instance\n *\n * @example\n * ```ts\n * const authMiddleware = createMiddleware({\n * name: \"AuthMiddleware\",\n * stateSchema: z.object({\n * isAuthenticated: z.boolean().default(false),\n * }),\n * contextSchema: z.object({\n * userId: z.string(),\n * }),\n * beforeModel: async (state, runtime, controls) => {\n * if (!state.isAuthenticated) {\n * return controls.terminate(new Error(\"Not authenticated\"));\n * }\n * },\n * });\n * ```\n */\nexport function createMiddleware<\n TSchema extends InteropZodObject | undefined = undefined,\n TContextSchema extends\n | InteropZodObject\n | InteropZodOptional<InteropZodObject>\n | InteropZodDefault<InteropZodObject>\n | undefined = undefined\n>(config: {\n /**\n * The name of the middleware\n */\n name: string;\n /**\n * The schema of the middleware state. Middleware state is persisted between multiple invocations. It can be either:\n * - A Zod object\n * - A Zod optional object\n * - A Zod default object\n * - Undefined\n */\n stateSchema?: TSchema;\n /**\n * The schema of the middleware context. Middleware context is read-only and not persisted between multiple invocations. It can be either:\n * - A Zod object\n * - A Zod optional object\n * - A Zod default object\n * - Undefined\n */\n contextSchema?: TContextSchema;\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `beforeAgent` hook.\n */\n beforeAgentJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `beforeModel` hook.\n */\n beforeModelJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `afterModel` hook.\n */\n afterModelJumpTo?: JumpToTarget[];\n /**\n * Explitictly defines which targets are allowed to be jumped to from the `afterAgent` hook.\n */\n afterAgentJumpTo?: JumpToTarget[];\n /**\n * Additional tools registered by the middleware.\n */\n tools?: (ClientTool | ServerTool)[];\n /**\n * Wraps tool execution with custom logic. This allows you to:\n * - Modify tool call parameters before execution\n * - Handle errors and retry with different parameters\n * - Post-process tool results\n * - Implement caching, logging, authentication, or other cross-cutting concerns\n * - Return Command objects for advanced control flow\n *\n * The handler receives a ToolCallRequest containing the tool call, state, and runtime,\n * along with a handler function to execute the actual tool.\n *\n * @param request - The tool call request containing toolCall, state, and runtime.\n * @param handler - The function that executes the tool. Call this with a ToolCall to get the result.\n * @returns The tool result as a ToolMessage or a Command for advanced control flow.\n *\n * @example\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * console.log(`Calling tool: ${request.tool.name}`);\n * console.log(`Tool description: ${request.tool.description}`);\n *\n * try {\n * // Execute the tool\n * const result = await handler(request.toolCall);\n * console.log(`Tool ${request.tool.name} succeeded`);\n * return result;\n * } catch (error) {\n * console.error(`Tool ${request.tool.name} failed:`, error);\n * // Could return a custom error message or retry\n * throw error;\n * }\n * }\n * ```\n *\n * @example Authentication\n * ```ts\n * wrapToolCall: async (request, handler) => {\n * // Check if user is authorized for this tool\n * if (!request.runtime.context.isAuthorized(request.tool.name)) {\n * return new ToolMessage({\n * content: \"Unauthorized to call this tool\",\n * tool_call_id: request.toolCall.id,\n * });\n * }\n * return handler(request.toolCall);\n * }\n * ```\n */\n wrapToolCall?: (\n request: ToolCallRequest<\n (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >,\n handler: ToolCallHandler\n ) => Promise<ToolMessage | Command> | ToolMessage | Command;\n /**\n * Wraps the model invocation with custom logic. This allows you to:\n * - Modify the request before calling the model\n * - Handle errors and retry with different parameters\n * - Post-process the response\n * - Implement custom caching, logging, or other cross-cutting concerns\n *\n * The request parameter contains: model, messages, systemPrompt, tools, state, and runtime.\n *\n * @param request - The model request containing all the parameters needed.\n * @param handler - The function that invokes the model. Call this with a ModelRequest to get the response.\n * @returns The response from the model (or a modified version).\n *\n * @example\n * ```ts\n * wrapModelCall: async (request, handler) => {\n * // Modify request before calling\n * const modifiedRequest = { ...request, systemPrompt: \"You are helpful\" };\n *\n * try {\n * // Call the model\n * return await handler(modifiedRequest);\n * } catch (error) {\n * // Handle errors and retry with fallback\n * const fallbackRequest = { ...request, model: fallbackModel };\n * return await handler(fallbackRequest);\n * }\n * }\n * ```\n */\n wrapModelCall?: (\n request: ModelRequest<\n (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >,\n handler: (\n request: ModelRequest<\n (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) => Promise<AIMessage> | AIMessage\n ) => Promise<AIMessage> | AIMessage;\n /**\n * The function to run before the agent execution starts. This function is called once at the start of the agent invocation.\n * It allows to modify the state of the agent before any model calls or tool executions.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n beforeAgent?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run before the model call. This function is called before the model is invoked and before the `wrapModelCall` hook.\n * It allows to modify the state of the agent.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n beforeModel?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run after the model call. This function is called after the model is invoked and before any tools are called.\n * It allows to modify the state of the agent after the model is invoked, e.g. to update tool call parameters.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n afterModel?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n /**\n * The function to run after the agent execution completes. This function is called once at the end of the agent invocation.\n * It allows to modify the final state of the agent after all model calls and tool executions are complete.\n *\n * @param state - The middleware state\n * @param runtime - The middleware runtime\n * @returns The modified middleware state or undefined to pass through\n */\n afterAgent?: (\n state: (TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}) &\n AgentBuiltInState,\n runtime: Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n ) =>\n | Promise<\n MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject\n ? InferInteropZodInput<TSchema>\n : {}\n >\n >\n >\n | MiddlewareResult<\n Partial<\n TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}\n >\n >;\n}): AgentMiddleware<TSchema, TContextSchema, any> {\n const middleware: AgentMiddleware<TSchema, TContextSchema, any> = {\n name: config.name,\n stateSchema: config.stateSchema,\n contextSchema: config.contextSchema,\n beforeAgentJumpTo: config.beforeAgentJumpTo,\n beforeModelJumpTo: config.beforeModelJumpTo,\n afterModelJumpTo: config.afterModelJumpTo,\n afterAgentJumpTo: config.afterAgentJumpTo,\n tools: config.tools ?? [],\n };\n\n if (config.wrapToolCall) {\n middleware.wrapToolCall = async (request, handler) =>\n Promise.resolve(config.wrapToolCall!(request, handler));\n }\n\n if (config.wrapModelCall) {\n middleware.wrapModelCall = async (request, handler) =>\n Promise.resolve(config.wrapModelCall!(request, handler));\n }\n\n if (config.beforeAgent) {\n middleware.beforeAgent = async (state, runtime) =>\n Promise.resolve(\n config.beforeAgent!(\n state,\n runtime as Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n )\n );\n }\n\n if (config.beforeModel) {\n middleware.beforeModel = async (state, runtime) =>\n Promise.resolve(\n config.beforeModel!(\n state,\n runtime as Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n )\n );\n }\n\n if (config.afterModel) {\n middleware.afterModel = async (state, runtime) =>\n Promise.resolve(\n config.afterModel!(\n state,\n runtime as Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n )\n );\n }\n\n if (config.afterAgent) {\n middleware.afterAgent = async (state, runtime) =>\n Promise.resolve(\n config.afterAgent!(\n state,\n runtime as Runtime<\n TContextSchema extends InteropZodObject\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodDefault<any>\n ? InferInteropZodOutput<TContextSchema>\n : TContextSchema extends InteropZodOptional<any>\n ? Partial<InferInteropZodOutput<TContextSchema>>\n : never\n >\n )\n );\n }\n\n return middleware;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAAgB,iBAOdA,QAqTgD;CAChD,MAAMC,aAA4D;EAChE,MAAM,OAAO;EACb,aAAa,OAAO;EACpB,eAAe,OAAO;EACtB,mBAAmB,OAAO;EAC1B,mBAAmB,OAAO;EAC1B,kBAAkB,OAAO;EACzB,kBAAkB,OAAO;EACzB,OAAO,OAAO,SAAS,CAAE;CAC1B;AAED,KAAI,OAAO,cACT,WAAW,eAAe,OAAO,SAAS,YACxC,QAAQ,QAAQ,OAAO,aAAc,SAAS,QAAQ,CAAC;AAG3D,KAAI,OAAO,eACT,WAAW,gBAAgB,OAAO,SAAS,YACzC,QAAQ,QAAQ,OAAO,cAAe,SAAS,QAAQ,CAAC;AAG5D,KAAI,OAAO,aACT,WAAW,cAAc,OAAO,OAAO,YACrC,QAAQ,QACN,OAAO,YACL,OACA,QASD,CACF;AAGL,KAAI,OAAO,aACT,WAAW,cAAc,OAAO,OAAO,YACrC,QAAQ,QACN,OAAO,YACL,OACA,QASD,CACF;AAGL,KAAI,OAAO,YACT,WAAW,aAAa,OAAO,OAAO,YACpC,QAAQ,QACN,OAAO,WACL,OACA,QASD,CACF;AAGL,KAAI,OAAO,YACT,WAAW,aAAa,OAAO,OAAO,YACpC,QAAQ,QACN,OAAO,WACL,OACA,QASD,CACF;AAGL,QAAO;AACR"}
|