langchain 1.0.2 → 1.0.3
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/CHANGELOG.md +11 -0
- package/dist/agents/ReactAgent.cjs +21 -41
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.js +21 -41
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/annotation.cjs +1 -0
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.js +1 -0
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/middleware/callLimit.d.cts.map +1 -1
- package/dist/agents/middleware/callLimit.d.ts.map +1 -1
- package/dist/agents/middleware/contextEditing.d.cts.map +1 -1
- package/dist/agents/middleware/contextEditing.d.ts.map +1 -1
- package/dist/agents/middleware/dynamicSystemPrompt.d.cts.map +1 -1
- package/dist/agents/middleware/dynamicSystemPrompt.d.ts.map +1 -1
- package/dist/agents/middleware/hitl.cjs +7 -2
- package/dist/agents/middleware/hitl.cjs.map +1 -1
- package/dist/agents/middleware/hitl.d.cts.map +1 -1
- package/dist/agents/middleware/hitl.d.ts.map +1 -1
- package/dist/agents/middleware/hitl.js +7 -2
- package/dist/agents/middleware/hitl.js.map +1 -1
- package/dist/agents/middleware/index.cjs +2 -1
- package/dist/agents/middleware/index.d.cts +15 -0
- package/dist/agents/middleware/index.d.ts +14 -0
- package/dist/agents/middleware/index.js +2 -1
- package/dist/agents/middleware/modelCallLimit.cjs +145 -0
- package/dist/agents/middleware/modelCallLimit.cjs.map +1 -0
- package/dist/agents/middleware/modelCallLimit.d.cts +128 -0
- package/dist/agents/middleware/modelCallLimit.d.cts.map +1 -0
- package/dist/agents/middleware/modelCallLimit.d.ts +128 -0
- package/dist/agents/middleware/modelCallLimit.d.ts.map +1 -0
- package/dist/agents/middleware/modelCallLimit.js +144 -0
- package/dist/agents/middleware/modelCallLimit.js.map +1 -0
- package/dist/agents/middleware/promptCaching.d.cts.map +1 -1
- package/dist/agents/middleware/promptCaching.d.ts.map +1 -1
- package/dist/agents/middleware/summarization.cjs +4 -2
- package/dist/agents/middleware/summarization.cjs.map +1 -1
- package/dist/agents/middleware/summarization.d.cts +7 -6
- package/dist/agents/middleware/summarization.d.cts.map +1 -1
- package/dist/agents/middleware/summarization.d.ts +7 -6
- package/dist/agents/middleware/summarization.d.ts.map +1 -1
- package/dist/agents/middleware/summarization.js +4 -2
- package/dist/agents/middleware/summarization.js.map +1 -1
- package/dist/agents/middleware/todoListMiddleware.d.ts.map +1 -1
- package/dist/agents/middleware/toolCallLimit.cjs +205 -92
- package/dist/agents/middleware/toolCallLimit.cjs.map +1 -1
- package/dist/agents/middleware/toolCallLimit.d.cts +46 -37
- package/dist/agents/middleware/toolCallLimit.d.cts.map +1 -1
- package/dist/agents/middleware/toolCallLimit.d.ts +46 -37
- package/dist/agents/middleware/toolCallLimit.d.ts.map +1 -1
- package/dist/agents/middleware/toolCallLimit.js +206 -93
- package/dist/agents/middleware/toolCallLimit.js.map +1 -1
- package/dist/agents/middleware/toolRetry.cjs +224 -0
- package/dist/agents/middleware/toolRetry.cjs.map +1 -0
- package/dist/agents/middleware/toolRetry.d.cts +179 -0
- package/dist/agents/middleware/toolRetry.d.cts.map +1 -0
- package/dist/agents/middleware/toolRetry.d.ts +179 -0
- package/dist/agents/middleware/toolRetry.d.ts.map +1 -0
- package/dist/agents/middleware/toolRetry.js +223 -0
- package/dist/agents/middleware/toolRetry.js.map +1 -0
- package/dist/agents/middleware/types.d.cts +21 -19
- package/dist/agents/middleware/types.d.cts.map +1 -1
- package/dist/agents/middleware/types.d.ts +21 -19
- package/dist/agents/middleware/types.d.ts.map +1 -1
- package/dist/agents/middleware/utils.cjs +7 -0
- package/dist/agents/middleware/utils.cjs.map +1 -1
- package/dist/agents/middleware/utils.d.cts.map +1 -1
- package/dist/agents/middleware/utils.d.ts.map +1 -1
- package/dist/agents/middleware/utils.js +7 -1
- package/dist/agents/middleware/utils.js.map +1 -1
- package/dist/agents/middleware.cjs.map +1 -1
- package/dist/agents/middleware.d.cts +4 -4
- package/dist/agents/middleware.d.cts.map +1 -1
- package/dist/agents/middleware.d.ts +4 -4
- package/dist/agents/middleware.d.ts.map +1 -1
- package/dist/agents/middleware.js.map +1 -1
- package/dist/agents/nodes/AgentNode.cjs +21 -47
- package/dist/agents/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/nodes/AgentNode.js +22 -48
- package/dist/agents/nodes/AgentNode.js.map +1 -1
- package/dist/agents/nodes/ToolNode.cjs +12 -18
- package/dist/agents/nodes/ToolNode.cjs.map +1 -1
- package/dist/agents/nodes/ToolNode.js +12 -18
- package/dist/agents/nodes/ToolNode.js.map +1 -1
- package/dist/agents/nodes/middleware.cjs +9 -7
- package/dist/agents/nodes/middleware.cjs.map +1 -1
- package/dist/agents/nodes/middleware.js +10 -8
- package/dist/agents/nodes/middleware.js.map +1 -1
- package/dist/agents/nodes/types.d.cts +1 -1
- package/dist/agents/nodes/types.d.cts.map +1 -1
- package/dist/agents/nodes/types.d.ts +1 -1
- package/dist/agents/nodes/types.d.ts.map +1 -1
- package/dist/agents/nodes/utils.cjs +5 -1
- package/dist/agents/nodes/utils.cjs.map +1 -1
- package/dist/agents/nodes/utils.js +5 -1
- package/dist/agents/nodes/utils.js.map +1 -1
- package/dist/agents/runtime.d.cts +11 -27
- package/dist/agents/runtime.d.cts.map +1 -1
- package/dist/agents/runtime.d.ts +11 -27
- package/dist/agents/runtime.d.ts.map +1 -1
- package/dist/agents/state.cjs +45 -0
- package/dist/agents/state.cjs.map +1 -0
- package/dist/agents/state.js +44 -0
- package/dist/agents/state.js.map +1 -0
- package/dist/agents/types.d.cts +1 -1
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +1 -1
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/utils.cjs +10 -2
- package/dist/agents/utils.cjs.map +1 -1
- package/dist/agents/utils.js +10 -2
- package/dist/agents/utils.js.map +1 -1
- package/dist/chat_models/universal.cjs +2 -2
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.js +2 -2
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/embeddings/cache_backed.cjs +140 -0
- package/dist/embeddings/cache_backed.cjs.map +1 -0
- package/dist/embeddings/cache_backed.d.cts +107 -0
- package/dist/embeddings/cache_backed.d.cts.map +1 -0
- package/dist/embeddings/cache_backed.d.ts +107 -0
- package/dist/embeddings/cache_backed.d.ts.map +1 -0
- package/dist/embeddings/cache_backed.js +134 -0
- package/dist/embeddings/cache_backed.js.map +1 -0
- package/dist/embeddings/fake.cjs +22 -0
- package/dist/embeddings/fake.cjs.map +1 -0
- package/dist/embeddings/fake.d.cts +1 -0
- package/dist/embeddings/fake.d.ts +1 -0
- package/dist/embeddings/fake.js +12 -0
- package/dist/embeddings/fake.js.map +1 -0
- package/dist/index.cjs +6 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs +248 -0
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +244 -0
- package/dist/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/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/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/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 +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/index.js +6 -0
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs +27 -0
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js +23 -0
- package/dist/node_modules/.pnpm/p-finally@1.0.0/node_modules/p-finally/index.js.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs +267 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js +263 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs +32 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js +28 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/lower-bound.js.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs +49 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.js +45 -0
- package/dist/node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/priority-queue.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/p-timeout@3.2.0/node_modules/p-timeout/index.cjs +52 -0
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/index.js +48 -0
- package/dist/node_modules/.pnpm/p-timeout@3.2.0/node_modules/p-timeout/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/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.cjs +90 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js +86 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.cjs +294 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js +290 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.cjs +191 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js +187 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.cjs +24 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.cjs +51 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js +47 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.cjs +48 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js +44 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.cjs +25 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.cjs +43 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js +39 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.cjs +32 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.cjs +29 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js +25 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.cjs +24 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.cjs +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js +24 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.cjs +24 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js +20 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.cjs +146 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js +142 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.cjs +41 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js +37 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/constants.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.cjs +19 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js +15 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/debug.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.cjs +32 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js +28 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/identifiers.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.cjs +47 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js +43 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/lrucache.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.cjs +25 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/parse-options.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.cjs +94 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js +90 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/internal/re.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.cjs +25 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.cjs +41 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js +37 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.cjs +41 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js +37 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.cjs +55 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js +51 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.cjs +74 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js +70 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.cjs +48 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js +44 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.cjs +112 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js +108 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.cjs +21 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js +17 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.cjs +27 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.cjs.map +1 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js +23 -0
- package/dist/node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
import { getEnvironmentVariable, getLangSmithEnvironmentVariable, getRuntimeEnvironment } from "./utils/env.js";
|
|
2
|
+
import { warnOnce } from "./utils/warn.js";
|
|
3
|
+
import { ConflictingEndpointsError, isConflictingEndpointsError } from "./utils/error.js";
|
|
4
|
+
import { Client } from "./client.js";
|
|
5
|
+
import { isTracingEnabled } from "./env.js";
|
|
6
|
+
import { _LC_CONTEXT_VARIABLES_KEY } from "./singletons/constants.js";
|
|
7
|
+
import { getDefaultProjectName } from "./utils/project.js";
|
|
8
|
+
import * as uuid from "uuid";
|
|
9
|
+
|
|
10
|
+
//#region ../../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
|
|
11
|
+
function stripNonAlphanumeric(input) {
|
|
12
|
+
return input.replace(/[-:.]/g, "");
|
|
13
|
+
}
|
|
14
|
+
function convertToDottedOrderFormat(epoch, runId, executionOrder = 1) {
|
|
15
|
+
const paddedOrder = executionOrder.toFixed(0).slice(0, 3).padStart(3, "0");
|
|
16
|
+
const microsecondPrecisionDatestring = `${new Date(epoch).toISOString().slice(0, -1)}${paddedOrder}Z`;
|
|
17
|
+
return {
|
|
18
|
+
dottedOrder: stripNonAlphanumeric(microsecondPrecisionDatestring) + runId,
|
|
19
|
+
microsecondPrecisionDatestring
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Baggage header information
|
|
24
|
+
*/
|
|
25
|
+
var Baggage = class Baggage {
|
|
26
|
+
constructor(metadata, tags, project_name, replicas) {
|
|
27
|
+
Object.defineProperty(this, "metadata", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: void 0
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(this, "tags", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true,
|
|
37
|
+
value: void 0
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(this, "project_name", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
writable: true,
|
|
43
|
+
value: void 0
|
|
44
|
+
});
|
|
45
|
+
Object.defineProperty(this, "replicas", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value: void 0
|
|
50
|
+
});
|
|
51
|
+
this.metadata = metadata;
|
|
52
|
+
this.tags = tags;
|
|
53
|
+
this.project_name = project_name;
|
|
54
|
+
this.replicas = replicas;
|
|
55
|
+
}
|
|
56
|
+
static fromHeader(value) {
|
|
57
|
+
const items = value.split(",");
|
|
58
|
+
let metadata = {};
|
|
59
|
+
let tags = [];
|
|
60
|
+
let project_name;
|
|
61
|
+
let replicas;
|
|
62
|
+
for (const item of items) {
|
|
63
|
+
const [key, uriValue] = item.split("=");
|
|
64
|
+
const value$1 = decodeURIComponent(uriValue);
|
|
65
|
+
if (key === "langsmith-metadata") metadata = JSON.parse(value$1);
|
|
66
|
+
else if (key === "langsmith-tags") tags = value$1.split(",");
|
|
67
|
+
else if (key === "langsmith-project") project_name = value$1;
|
|
68
|
+
else if (key === "langsmith-replicas") replicas = JSON.parse(value$1);
|
|
69
|
+
}
|
|
70
|
+
return new Baggage(metadata, tags, project_name, replicas);
|
|
71
|
+
}
|
|
72
|
+
toHeader() {
|
|
73
|
+
const items = [];
|
|
74
|
+
if (this.metadata && Object.keys(this.metadata).length > 0) items.push(`langsmith-metadata=${encodeURIComponent(JSON.stringify(this.metadata))}`);
|
|
75
|
+
if (this.tags && this.tags.length > 0) items.push(`langsmith-tags=${encodeURIComponent(this.tags.join(","))}`);
|
|
76
|
+
if (this.project_name) items.push(`langsmith-project=${encodeURIComponent(this.project_name)}`);
|
|
77
|
+
return items.join(",");
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var RunTree = class RunTree {
|
|
81
|
+
constructor(originalConfig) {
|
|
82
|
+
Object.defineProperty(this, "id", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
configurable: true,
|
|
85
|
+
writable: true,
|
|
86
|
+
value: void 0
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(this, "name", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
configurable: true,
|
|
91
|
+
writable: true,
|
|
92
|
+
value: void 0
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(this, "run_type", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
configurable: true,
|
|
97
|
+
writable: true,
|
|
98
|
+
value: void 0
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(this, "project_name", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
configurable: true,
|
|
103
|
+
writable: true,
|
|
104
|
+
value: void 0
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(this, "parent_run", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
configurable: true,
|
|
109
|
+
writable: true,
|
|
110
|
+
value: void 0
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(this, "parent_run_id", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
configurable: true,
|
|
115
|
+
writable: true,
|
|
116
|
+
value: void 0
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(this, "child_runs", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
configurable: true,
|
|
121
|
+
writable: true,
|
|
122
|
+
value: void 0
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(this, "start_time", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
configurable: true,
|
|
127
|
+
writable: true,
|
|
128
|
+
value: void 0
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(this, "end_time", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
configurable: true,
|
|
133
|
+
writable: true,
|
|
134
|
+
value: void 0
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(this, "extra", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
configurable: true,
|
|
139
|
+
writable: true,
|
|
140
|
+
value: void 0
|
|
141
|
+
});
|
|
142
|
+
Object.defineProperty(this, "tags", {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
configurable: true,
|
|
145
|
+
writable: true,
|
|
146
|
+
value: void 0
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(this, "error", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
configurable: true,
|
|
151
|
+
writable: true,
|
|
152
|
+
value: void 0
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(this, "serialized", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
configurable: true,
|
|
157
|
+
writable: true,
|
|
158
|
+
value: void 0
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(this, "inputs", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
configurable: true,
|
|
163
|
+
writable: true,
|
|
164
|
+
value: void 0
|
|
165
|
+
});
|
|
166
|
+
Object.defineProperty(this, "outputs", {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
configurable: true,
|
|
169
|
+
writable: true,
|
|
170
|
+
value: void 0
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(this, "reference_example_id", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
configurable: true,
|
|
175
|
+
writable: true,
|
|
176
|
+
value: void 0
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(this, "client", {
|
|
179
|
+
enumerable: true,
|
|
180
|
+
configurable: true,
|
|
181
|
+
writable: true,
|
|
182
|
+
value: void 0
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(this, "events", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
configurable: true,
|
|
187
|
+
writable: true,
|
|
188
|
+
value: void 0
|
|
189
|
+
});
|
|
190
|
+
Object.defineProperty(this, "trace_id", {
|
|
191
|
+
enumerable: true,
|
|
192
|
+
configurable: true,
|
|
193
|
+
writable: true,
|
|
194
|
+
value: void 0
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(this, "dotted_order", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
configurable: true,
|
|
199
|
+
writable: true,
|
|
200
|
+
value: void 0
|
|
201
|
+
});
|
|
202
|
+
Object.defineProperty(this, "tracingEnabled", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
configurable: true,
|
|
205
|
+
writable: true,
|
|
206
|
+
value: void 0
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(this, "execution_order", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
configurable: true,
|
|
211
|
+
writable: true,
|
|
212
|
+
value: void 0
|
|
213
|
+
});
|
|
214
|
+
Object.defineProperty(this, "child_execution_order", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
configurable: true,
|
|
217
|
+
writable: true,
|
|
218
|
+
value: void 0
|
|
219
|
+
});
|
|
220
|
+
/**
|
|
221
|
+
* Attachments associated with the run.
|
|
222
|
+
* Each entry is a tuple of [mime_type, bytes]
|
|
223
|
+
*/
|
|
224
|
+
Object.defineProperty(this, "attachments", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
configurable: true,
|
|
227
|
+
writable: true,
|
|
228
|
+
value: void 0
|
|
229
|
+
});
|
|
230
|
+
/**
|
|
231
|
+
* Projects to replicate this run to with optional updates.
|
|
232
|
+
*/
|
|
233
|
+
Object.defineProperty(this, "replicas", {
|
|
234
|
+
enumerable: true,
|
|
235
|
+
configurable: true,
|
|
236
|
+
writable: true,
|
|
237
|
+
value: void 0
|
|
238
|
+
});
|
|
239
|
+
Object.defineProperty(this, "_serialized_start_time", {
|
|
240
|
+
enumerable: true,
|
|
241
|
+
configurable: true,
|
|
242
|
+
writable: true,
|
|
243
|
+
value: void 0
|
|
244
|
+
});
|
|
245
|
+
if (isRunTree(originalConfig)) {
|
|
246
|
+
Object.assign(this, { ...originalConfig });
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
const defaultConfig = RunTree.getDefaultConfig();
|
|
250
|
+
const { metadata,...config } = originalConfig;
|
|
251
|
+
const client = config.client ?? RunTree.getSharedClient();
|
|
252
|
+
const dedupedMetadata = {
|
|
253
|
+
...metadata,
|
|
254
|
+
...config?.extra?.metadata
|
|
255
|
+
};
|
|
256
|
+
config.extra = {
|
|
257
|
+
...config.extra,
|
|
258
|
+
metadata: dedupedMetadata
|
|
259
|
+
};
|
|
260
|
+
Object.assign(this, {
|
|
261
|
+
...defaultConfig,
|
|
262
|
+
...config,
|
|
263
|
+
client
|
|
264
|
+
});
|
|
265
|
+
if (!this.trace_id) if (this.parent_run) this.trace_id = this.parent_run.trace_id ?? this.id;
|
|
266
|
+
else this.trace_id = this.id;
|
|
267
|
+
this.replicas = _ensureWriteReplicas(this.replicas);
|
|
268
|
+
this.execution_order ??= 1;
|
|
269
|
+
this.child_execution_order ??= 1;
|
|
270
|
+
if (!this.dotted_order) {
|
|
271
|
+
const { dottedOrder, microsecondPrecisionDatestring } = convertToDottedOrderFormat(this.start_time, this.id, this.execution_order);
|
|
272
|
+
if (this.parent_run) this.dotted_order = this.parent_run.dotted_order + "." + dottedOrder;
|
|
273
|
+
else this.dotted_order = dottedOrder;
|
|
274
|
+
this._serialized_start_time = microsecondPrecisionDatestring;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
set metadata(metadata) {
|
|
278
|
+
this.extra = {
|
|
279
|
+
...this.extra,
|
|
280
|
+
metadata: {
|
|
281
|
+
...this.extra?.metadata,
|
|
282
|
+
...metadata
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
get metadata() {
|
|
287
|
+
return this.extra?.metadata;
|
|
288
|
+
}
|
|
289
|
+
static getDefaultConfig() {
|
|
290
|
+
return {
|
|
291
|
+
id: uuid.v4(),
|
|
292
|
+
run_type: "chain",
|
|
293
|
+
project_name: getDefaultProjectName(),
|
|
294
|
+
child_runs: [],
|
|
295
|
+
api_url: getEnvironmentVariable("LANGCHAIN_ENDPOINT") ?? "http://localhost:1984",
|
|
296
|
+
api_key: getEnvironmentVariable("LANGCHAIN_API_KEY"),
|
|
297
|
+
caller_options: {},
|
|
298
|
+
start_time: Date.now(),
|
|
299
|
+
serialized: {},
|
|
300
|
+
inputs: {},
|
|
301
|
+
extra: {}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
static getSharedClient() {
|
|
305
|
+
if (!RunTree.sharedClient) RunTree.sharedClient = new Client();
|
|
306
|
+
return RunTree.sharedClient;
|
|
307
|
+
}
|
|
308
|
+
createChild(config) {
|
|
309
|
+
const child_execution_order = this.child_execution_order + 1;
|
|
310
|
+
const child = new RunTree({
|
|
311
|
+
...config,
|
|
312
|
+
parent_run: this,
|
|
313
|
+
project_name: this.project_name,
|
|
314
|
+
replicas: this.replicas,
|
|
315
|
+
client: this.client,
|
|
316
|
+
tracingEnabled: this.tracingEnabled,
|
|
317
|
+
execution_order: child_execution_order,
|
|
318
|
+
child_execution_order
|
|
319
|
+
});
|
|
320
|
+
if (_LC_CONTEXT_VARIABLES_KEY in this) child[_LC_CONTEXT_VARIABLES_KEY] = this[_LC_CONTEXT_VARIABLES_KEY];
|
|
321
|
+
const LC_CHILD = Symbol.for("lc:child_config");
|
|
322
|
+
const presentConfig = config.extra?.[LC_CHILD] ?? this.extra[LC_CHILD];
|
|
323
|
+
if (isRunnableConfigLike(presentConfig)) {
|
|
324
|
+
const newConfig = { ...presentConfig };
|
|
325
|
+
const callbacks = isCallbackManagerLike(newConfig.callbacks) ? newConfig.callbacks.copy?.() : void 0;
|
|
326
|
+
if (callbacks) {
|
|
327
|
+
Object.assign(callbacks, { _parentRunId: child.id });
|
|
328
|
+
callbacks.handlers?.find(isLangChainTracerLike)?.updateFromRunTree?.(child);
|
|
329
|
+
newConfig.callbacks = callbacks;
|
|
330
|
+
}
|
|
331
|
+
child.extra[LC_CHILD] = newConfig;
|
|
332
|
+
}
|
|
333
|
+
const visited = /* @__PURE__ */ new Set();
|
|
334
|
+
let current = this;
|
|
335
|
+
while (current != null && !visited.has(current.id)) {
|
|
336
|
+
visited.add(current.id);
|
|
337
|
+
current.child_execution_order = Math.max(current.child_execution_order, child_execution_order);
|
|
338
|
+
current = current.parent_run;
|
|
339
|
+
}
|
|
340
|
+
this.child_runs.push(child);
|
|
341
|
+
return child;
|
|
342
|
+
}
|
|
343
|
+
async end(outputs, error, endTime = Date.now(), metadata) {
|
|
344
|
+
this.outputs = this.outputs ?? outputs;
|
|
345
|
+
this.error = this.error ?? error;
|
|
346
|
+
this.end_time = this.end_time ?? endTime;
|
|
347
|
+
if (metadata && Object.keys(metadata).length > 0) this.extra = this.extra ? {
|
|
348
|
+
...this.extra,
|
|
349
|
+
metadata: {
|
|
350
|
+
...this.extra.metadata,
|
|
351
|
+
...metadata
|
|
352
|
+
}
|
|
353
|
+
} : { metadata };
|
|
354
|
+
}
|
|
355
|
+
_convertToCreate(run, runtimeEnv, excludeChildRuns = true) {
|
|
356
|
+
const runExtra = run.extra ?? {};
|
|
357
|
+
if (runExtra?.runtime?.library === void 0) {
|
|
358
|
+
if (!runExtra.runtime) runExtra.runtime = {};
|
|
359
|
+
if (runtimeEnv) {
|
|
360
|
+
for (const [k, v] of Object.entries(runtimeEnv)) if (!runExtra.runtime[k]) runExtra.runtime[k] = v;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
let child_runs;
|
|
364
|
+
let parent_run_id;
|
|
365
|
+
if (!excludeChildRuns) {
|
|
366
|
+
child_runs = run.child_runs.map((child_run) => this._convertToCreate(child_run, runtimeEnv, excludeChildRuns));
|
|
367
|
+
parent_run_id = void 0;
|
|
368
|
+
} else {
|
|
369
|
+
parent_run_id = run.parent_run?.id ?? run.parent_run_id;
|
|
370
|
+
child_runs = [];
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
id: run.id,
|
|
374
|
+
name: run.name,
|
|
375
|
+
start_time: run._serialized_start_time ?? run.start_time,
|
|
376
|
+
end_time: run.end_time,
|
|
377
|
+
run_type: run.run_type,
|
|
378
|
+
reference_example_id: run.reference_example_id,
|
|
379
|
+
extra: runExtra,
|
|
380
|
+
serialized: run.serialized,
|
|
381
|
+
error: run.error,
|
|
382
|
+
inputs: run.inputs,
|
|
383
|
+
outputs: run.outputs,
|
|
384
|
+
session_name: run.project_name,
|
|
385
|
+
child_runs,
|
|
386
|
+
parent_run_id,
|
|
387
|
+
trace_id: run.trace_id,
|
|
388
|
+
dotted_order: run.dotted_order,
|
|
389
|
+
tags: run.tags,
|
|
390
|
+
attachments: run.attachments,
|
|
391
|
+
events: run.events
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
_remapForProject(projectName, runtimeEnv, excludeChildRuns = true) {
|
|
395
|
+
const baseRun = this._convertToCreate(this, runtimeEnv, excludeChildRuns);
|
|
396
|
+
if (projectName === this.project_name) return baseRun;
|
|
397
|
+
const createRemappedId = (originalId) => {
|
|
398
|
+
return uuid.v5(`${originalId}:${projectName}`, uuid.v5.DNS);
|
|
399
|
+
};
|
|
400
|
+
const newId = createRemappedId(baseRun.id);
|
|
401
|
+
const newTraceId = baseRun.trace_id ? createRemappedId(baseRun.trace_id) : void 0;
|
|
402
|
+
const newParentRunId = baseRun.parent_run_id ? createRemappedId(baseRun.parent_run_id) : void 0;
|
|
403
|
+
let newDottedOrder;
|
|
404
|
+
if (baseRun.dotted_order) {
|
|
405
|
+
const segments = _parseDottedOrder(baseRun.dotted_order);
|
|
406
|
+
const rebuilt = [];
|
|
407
|
+
for (let i = 0; i < segments.length - 1; i++) {
|
|
408
|
+
const [timestamp, segmentId] = segments[i];
|
|
409
|
+
const remappedId = createRemappedId(segmentId);
|
|
410
|
+
rebuilt.push(timestamp.toISOString().replace(/[-:]/g, "").replace(".", "") + remappedId);
|
|
411
|
+
}
|
|
412
|
+
const [lastTimestamp] = segments[segments.length - 1];
|
|
413
|
+
rebuilt.push(lastTimestamp.toISOString().replace(/[-:]/g, "").replace(".", "") + newId);
|
|
414
|
+
newDottedOrder = rebuilt.join(".");
|
|
415
|
+
} else newDottedOrder = void 0;
|
|
416
|
+
const remappedRun = {
|
|
417
|
+
...baseRun,
|
|
418
|
+
id: newId,
|
|
419
|
+
trace_id: newTraceId,
|
|
420
|
+
parent_run_id: newParentRunId,
|
|
421
|
+
dotted_order: newDottedOrder,
|
|
422
|
+
session_name: projectName
|
|
423
|
+
};
|
|
424
|
+
return remappedRun;
|
|
425
|
+
}
|
|
426
|
+
async postRun(excludeChildRuns = true) {
|
|
427
|
+
try {
|
|
428
|
+
const runtimeEnv = getRuntimeEnvironment();
|
|
429
|
+
if (this.replicas && this.replicas.length > 0) for (const { projectName, apiKey, apiUrl, workspaceId } of this.replicas) {
|
|
430
|
+
const runCreate = this._remapForProject(projectName ?? this.project_name, runtimeEnv, true);
|
|
431
|
+
await this.client.createRun(runCreate, {
|
|
432
|
+
apiKey,
|
|
433
|
+
apiUrl,
|
|
434
|
+
workspaceId
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
const runCreate = this._convertToCreate(this, runtimeEnv, excludeChildRuns);
|
|
439
|
+
await this.client.createRun(runCreate);
|
|
440
|
+
}
|
|
441
|
+
if (!excludeChildRuns) {
|
|
442
|
+
warnOnce("Posting with excludeChildRuns=false is deprecated and will be removed in a future version.");
|
|
443
|
+
for (const childRun of this.child_runs) await childRun.postRun(false);
|
|
444
|
+
}
|
|
445
|
+
} catch (error) {
|
|
446
|
+
console.error(`Error in postRun for run ${this.id}:`, error);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
async patchRun(options) {
|
|
450
|
+
if (this.replicas && this.replicas.length > 0) for (const { projectName, apiKey, apiUrl, workspaceId, updates } of this.replicas) {
|
|
451
|
+
const runData = this._remapForProject(projectName ?? this.project_name);
|
|
452
|
+
const updatePayload = {
|
|
453
|
+
id: runData.id,
|
|
454
|
+
outputs: runData.outputs,
|
|
455
|
+
error: runData.error,
|
|
456
|
+
parent_run_id: runData.parent_run_id,
|
|
457
|
+
session_name: runData.session_name,
|
|
458
|
+
reference_example_id: runData.reference_example_id,
|
|
459
|
+
end_time: runData.end_time,
|
|
460
|
+
dotted_order: runData.dotted_order,
|
|
461
|
+
trace_id: runData.trace_id,
|
|
462
|
+
events: runData.events,
|
|
463
|
+
tags: runData.tags,
|
|
464
|
+
extra: runData.extra,
|
|
465
|
+
attachments: this.attachments,
|
|
466
|
+
...updates
|
|
467
|
+
};
|
|
468
|
+
if (!options?.excludeInputs) updatePayload.inputs = runData.inputs;
|
|
469
|
+
await this.client.updateRun(runData.id, updatePayload, {
|
|
470
|
+
apiKey,
|
|
471
|
+
apiUrl,
|
|
472
|
+
workspaceId
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
else try {
|
|
476
|
+
const runUpdate = {
|
|
477
|
+
end_time: this.end_time,
|
|
478
|
+
error: this.error,
|
|
479
|
+
outputs: this.outputs,
|
|
480
|
+
parent_run_id: this.parent_run?.id ?? this.parent_run_id,
|
|
481
|
+
reference_example_id: this.reference_example_id,
|
|
482
|
+
extra: this.extra,
|
|
483
|
+
events: this.events,
|
|
484
|
+
dotted_order: this.dotted_order,
|
|
485
|
+
trace_id: this.trace_id,
|
|
486
|
+
tags: this.tags,
|
|
487
|
+
attachments: this.attachments,
|
|
488
|
+
session_name: this.project_name
|
|
489
|
+
};
|
|
490
|
+
if (!options?.excludeInputs) runUpdate.inputs = this.inputs;
|
|
491
|
+
await this.client.updateRun(this.id, runUpdate);
|
|
492
|
+
} catch (error) {
|
|
493
|
+
console.error(`Error in patchRun for run ${this.id}`, error);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
toJSON() {
|
|
497
|
+
return this._convertToCreate(this, void 0, false);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Add an event to the run tree.
|
|
501
|
+
* @param event - A single event or string to add
|
|
502
|
+
*/
|
|
503
|
+
addEvent(event) {
|
|
504
|
+
if (!this.events) this.events = [];
|
|
505
|
+
if (typeof event === "string") this.events.push({
|
|
506
|
+
name: "event",
|
|
507
|
+
time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
508
|
+
message: event
|
|
509
|
+
});
|
|
510
|
+
else this.events.push({
|
|
511
|
+
...event,
|
|
512
|
+
time: event.time ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
static fromRunnableConfig(parentConfig, props) {
|
|
516
|
+
const callbackManager = parentConfig?.callbacks;
|
|
517
|
+
let parentRun;
|
|
518
|
+
let projectName;
|
|
519
|
+
let client;
|
|
520
|
+
let tracingEnabled = isTracingEnabled();
|
|
521
|
+
if (callbackManager) {
|
|
522
|
+
const parentRunId = callbackManager?.getParentRunId?.() ?? "";
|
|
523
|
+
const langChainTracer = callbackManager?.handlers?.find((handler) => handler?.name == "langchain_tracer");
|
|
524
|
+
parentRun = langChainTracer?.getRun?.(parentRunId);
|
|
525
|
+
projectName = langChainTracer?.projectName;
|
|
526
|
+
client = langChainTracer?.client;
|
|
527
|
+
tracingEnabled = tracingEnabled || !!langChainTracer;
|
|
528
|
+
}
|
|
529
|
+
if (!parentRun) return new RunTree({
|
|
530
|
+
...props,
|
|
531
|
+
client,
|
|
532
|
+
tracingEnabled,
|
|
533
|
+
project_name: projectName
|
|
534
|
+
});
|
|
535
|
+
const parentRunTree = new RunTree({
|
|
536
|
+
name: parentRun.name,
|
|
537
|
+
id: parentRun.id,
|
|
538
|
+
trace_id: parentRun.trace_id,
|
|
539
|
+
dotted_order: parentRun.dotted_order,
|
|
540
|
+
client,
|
|
541
|
+
tracingEnabled,
|
|
542
|
+
project_name: projectName,
|
|
543
|
+
tags: [...new Set((parentRun?.tags ?? []).concat(parentConfig?.tags ?? []))],
|
|
544
|
+
extra: { metadata: {
|
|
545
|
+
...parentRun?.extra?.metadata,
|
|
546
|
+
...parentConfig?.metadata
|
|
547
|
+
} }
|
|
548
|
+
});
|
|
549
|
+
return parentRunTree.createChild(props);
|
|
550
|
+
}
|
|
551
|
+
static fromDottedOrder(dottedOrder) {
|
|
552
|
+
return this.fromHeaders({ "langsmith-trace": dottedOrder });
|
|
553
|
+
}
|
|
554
|
+
static fromHeaders(headers, inheritArgs) {
|
|
555
|
+
const rawHeaders = "get" in headers && typeof headers.get === "function" ? {
|
|
556
|
+
"langsmith-trace": headers.get("langsmith-trace"),
|
|
557
|
+
baggage: headers.get("baggage")
|
|
558
|
+
} : headers;
|
|
559
|
+
const headerTrace = rawHeaders["langsmith-trace"];
|
|
560
|
+
if (!headerTrace || typeof headerTrace !== "string") return void 0;
|
|
561
|
+
const parentDottedOrder = headerTrace.trim();
|
|
562
|
+
const parsedDottedOrder = parentDottedOrder.split(".").map((part) => {
|
|
563
|
+
const [strTime, uuid$1] = part.split("Z");
|
|
564
|
+
return {
|
|
565
|
+
strTime,
|
|
566
|
+
time: Date.parse(strTime + "Z"),
|
|
567
|
+
uuid: uuid$1
|
|
568
|
+
};
|
|
569
|
+
});
|
|
570
|
+
const traceId = parsedDottedOrder[0].uuid;
|
|
571
|
+
const config = {
|
|
572
|
+
...inheritArgs,
|
|
573
|
+
name: inheritArgs?.["name"] ?? "parent",
|
|
574
|
+
run_type: inheritArgs?.["run_type"] ?? "chain",
|
|
575
|
+
start_time: inheritArgs?.["start_time"] ?? Date.now(),
|
|
576
|
+
id: parsedDottedOrder.at(-1)?.uuid,
|
|
577
|
+
trace_id: traceId,
|
|
578
|
+
dotted_order: parentDottedOrder
|
|
579
|
+
};
|
|
580
|
+
if (rawHeaders["baggage"] && typeof rawHeaders["baggage"] === "string") {
|
|
581
|
+
const baggage = Baggage.fromHeader(rawHeaders["baggage"]);
|
|
582
|
+
config.metadata = baggage.metadata;
|
|
583
|
+
config.tags = baggage.tags;
|
|
584
|
+
config.project_name = baggage.project_name;
|
|
585
|
+
config.replicas = baggage.replicas;
|
|
586
|
+
}
|
|
587
|
+
return new RunTree(config);
|
|
588
|
+
}
|
|
589
|
+
toHeaders(headers) {
|
|
590
|
+
const result = {
|
|
591
|
+
"langsmith-trace": this.dotted_order,
|
|
592
|
+
baggage: new Baggage(this.extra?.metadata, this.tags, this.project_name, this.replicas).toHeader()
|
|
593
|
+
};
|
|
594
|
+
if (headers) for (const [key, value] of Object.entries(result)) headers.set(key, value);
|
|
595
|
+
return result;
|
|
596
|
+
}
|
|
597
|
+
};
|
|
598
|
+
Object.defineProperty(RunTree, "sharedClient", {
|
|
599
|
+
enumerable: true,
|
|
600
|
+
configurable: true,
|
|
601
|
+
writable: true,
|
|
602
|
+
value: null
|
|
603
|
+
});
|
|
604
|
+
function isRunTree(x) {
|
|
605
|
+
return x != null && typeof x.createChild === "function" && typeof x.postRun === "function";
|
|
606
|
+
}
|
|
607
|
+
function isLangChainTracerLike(x) {
|
|
608
|
+
return typeof x === "object" && x != null && typeof x.name === "string" && x.name === "langchain_tracer";
|
|
609
|
+
}
|
|
610
|
+
function containsLangChainTracerLike(x) {
|
|
611
|
+
return Array.isArray(x) && x.some((callback) => isLangChainTracerLike(callback));
|
|
612
|
+
}
|
|
613
|
+
function isCallbackManagerLike(x) {
|
|
614
|
+
return typeof x === "object" && x != null && Array.isArray(x.handlers);
|
|
615
|
+
}
|
|
616
|
+
function isRunnableConfigLike(x) {
|
|
617
|
+
return x != null && typeof x.callbacks === "object" && (containsLangChainTracerLike(x.callbacks?.handlers) || containsLangChainTracerLike(x.callbacks));
|
|
618
|
+
}
|
|
619
|
+
function _parseDottedOrder(dottedOrder) {
|
|
620
|
+
const parts = dottedOrder.split(".");
|
|
621
|
+
return parts.map((part) => {
|
|
622
|
+
const timestampStr = part.slice(0, -36);
|
|
623
|
+
const uuidStr = part.slice(-36);
|
|
624
|
+
const year = parseInt(timestampStr.slice(0, 4));
|
|
625
|
+
const month = parseInt(timestampStr.slice(4, 6)) - 1;
|
|
626
|
+
const day = parseInt(timestampStr.slice(6, 8));
|
|
627
|
+
const hour = parseInt(timestampStr.slice(9, 11));
|
|
628
|
+
const minute = parseInt(timestampStr.slice(11, 13));
|
|
629
|
+
const second = parseInt(timestampStr.slice(13, 15));
|
|
630
|
+
const microsecond = parseInt(timestampStr.slice(15, 21));
|
|
631
|
+
const timestamp = new Date(year, month, day, hour, minute, second, microsecond / 1e3);
|
|
632
|
+
return [timestamp, uuidStr];
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
function _getWriteReplicasFromEnv() {
|
|
636
|
+
const envVar = getEnvironmentVariable("LANGSMITH_RUNS_ENDPOINTS");
|
|
637
|
+
if (!envVar) return [];
|
|
638
|
+
try {
|
|
639
|
+
const parsed = JSON.parse(envVar);
|
|
640
|
+
if (Array.isArray(parsed)) {
|
|
641
|
+
const replicas = [];
|
|
642
|
+
for (const item of parsed) {
|
|
643
|
+
if (typeof item !== "object" || item === null) {
|
|
644
|
+
console.warn(`Invalid item type in LANGSMITH_RUNS_ENDPOINTS: expected object, got ${typeof item}`);
|
|
645
|
+
continue;
|
|
646
|
+
}
|
|
647
|
+
if (typeof item.api_url !== "string") {
|
|
648
|
+
console.warn(`Invalid api_url type in LANGSMITH_RUNS_ENDPOINTS: expected string, got ${typeof item.api_url}`);
|
|
649
|
+
continue;
|
|
650
|
+
}
|
|
651
|
+
if (typeof item.api_key !== "string") {
|
|
652
|
+
console.warn(`Invalid api_key type in LANGSMITH_RUNS_ENDPOINTS: expected string, got ${typeof item.api_key}`);
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
replicas.push({
|
|
656
|
+
apiUrl: item.api_url.replace(/\/$/, ""),
|
|
657
|
+
apiKey: item.api_key
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
return replicas;
|
|
661
|
+
} else if (typeof parsed === "object" && parsed !== null) {
|
|
662
|
+
_checkEndpointEnvUnset(parsed);
|
|
663
|
+
const replicas = [];
|
|
664
|
+
for (const [url, key] of Object.entries(parsed)) {
|
|
665
|
+
const cleanUrl = url.replace(/\/$/, "");
|
|
666
|
+
if (typeof key === "string") replicas.push({
|
|
667
|
+
apiUrl: cleanUrl,
|
|
668
|
+
apiKey: key
|
|
669
|
+
});
|
|
670
|
+
else {
|
|
671
|
+
console.warn(`Invalid value type in LANGSMITH_RUNS_ENDPOINTS for URL ${url}: expected string, got ${typeof key}`);
|
|
672
|
+
continue;
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
return replicas;
|
|
676
|
+
} else {
|
|
677
|
+
console.warn(`Invalid LANGSMITH_RUNS_ENDPOINTS – must be valid JSON array of objects with api_url and api_key properties, or object mapping url->apiKey, got ${typeof parsed}`);
|
|
678
|
+
return [];
|
|
679
|
+
}
|
|
680
|
+
} catch (e) {
|
|
681
|
+
if (isConflictingEndpointsError(e)) throw e;
|
|
682
|
+
console.warn("Invalid LANGSMITH_RUNS_ENDPOINTS – must be valid JSON array of objects with api_url and api_key properties, or object mapping url->apiKey");
|
|
683
|
+
return [];
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
function _ensureWriteReplicas(replicas) {
|
|
687
|
+
if (replicas) return replicas.map((replica) => {
|
|
688
|
+
if (Array.isArray(replica)) return {
|
|
689
|
+
projectName: replica[0],
|
|
690
|
+
updates: replica[1]
|
|
691
|
+
};
|
|
692
|
+
return replica;
|
|
693
|
+
});
|
|
694
|
+
return _getWriteReplicasFromEnv();
|
|
695
|
+
}
|
|
696
|
+
function _checkEndpointEnvUnset(parsed) {
|
|
697
|
+
if (Object.keys(parsed).length > 0 && getLangSmithEnvironmentVariable("ENDPOINT")) throw new ConflictingEndpointsError();
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
//#endregion
|
|
701
|
+
export { RunTree };
|
|
702
|
+
//# sourceMappingURL=run_trees.js.map
|