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,99 @@
|
|
|
1
|
+
//#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/utils/error.js
|
|
2
|
+
/**
|
|
3
|
+
* LangSmithConflictError
|
|
4
|
+
*
|
|
5
|
+
* Represents an error that occurs when there's a conflict during an operation,
|
|
6
|
+
* typically corresponding to HTTP 409 status code responses.
|
|
7
|
+
*
|
|
8
|
+
* This error is thrown when an attempt to create or modify a resource conflicts
|
|
9
|
+
* with the current state of the resource on the server. Common scenarios include:
|
|
10
|
+
* - Attempting to create a resource that already exists
|
|
11
|
+
* - Trying to update a resource that has been modified by another process
|
|
12
|
+
* - Violating a uniqueness constraint in the data
|
|
13
|
+
*
|
|
14
|
+
* @extends Error
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* try {
|
|
18
|
+
* await createProject("existingProject");
|
|
19
|
+
* } catch (error) {
|
|
20
|
+
* if (error instanceof ConflictError) {
|
|
21
|
+
* console.log("A conflict occurred:", error.message);
|
|
22
|
+
* // Handle the conflict, e.g., by suggesting a different project name
|
|
23
|
+
* } else {
|
|
24
|
+
* // Handle other types of errors
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* @property {string} name - Always set to 'ConflictError' for easy identification
|
|
29
|
+
* @property {string} message - Detailed error message including server response
|
|
30
|
+
*
|
|
31
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409
|
|
32
|
+
*/
|
|
33
|
+
var LangSmithConflictError = class extends Error {
|
|
34
|
+
constructor(message) {
|
|
35
|
+
super(message);
|
|
36
|
+
Object.defineProperty(this, "status", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: void 0
|
|
41
|
+
});
|
|
42
|
+
this.name = "LangSmithConflictError";
|
|
43
|
+
this.status = 409;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Throws an appropriate error based on the response status and body.
|
|
48
|
+
*
|
|
49
|
+
* @param response - The fetch Response object
|
|
50
|
+
* @param context - Additional context to include in the error message (e.g., operation being performed)
|
|
51
|
+
* @throws {LangSmithConflictError} When the response status is 409
|
|
52
|
+
* @throws {Error} For all other non-ok responses
|
|
53
|
+
*/
|
|
54
|
+
async function raiseForStatus(response, context, consumeOnSuccess) {
|
|
55
|
+
let errorBody;
|
|
56
|
+
if (response.ok) {
|
|
57
|
+
if (consumeOnSuccess) errorBody = await response.text();
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (response.status === 403) try {
|
|
61
|
+
const errorData = await response.json();
|
|
62
|
+
const errorCode = errorData?.error;
|
|
63
|
+
if (errorCode === "org_scoped_key_requires_workspace") errorBody = "This API key is org-scoped and requires workspace specification. Please provide 'workspaceId' parameter, or set LANGSMITH_WORKSPACE_ID environment variable.";
|
|
64
|
+
} catch (e) {
|
|
65
|
+
const errorWithStatus = /* @__PURE__ */ new Error(`${response.status} ${response.statusText}`);
|
|
66
|
+
errorWithStatus.status = response?.status;
|
|
67
|
+
throw errorWithStatus;
|
|
68
|
+
}
|
|
69
|
+
if (errorBody === void 0) try {
|
|
70
|
+
errorBody = await response.text();
|
|
71
|
+
} catch (e) {
|
|
72
|
+
errorBody = "";
|
|
73
|
+
}
|
|
74
|
+
const fullMessage = `Failed to ${context}. Received status [${response.status}]: ${response.statusText}. Message: ${errorBody}`;
|
|
75
|
+
if (response.status === 409) throw new LangSmithConflictError(fullMessage);
|
|
76
|
+
const err = new Error(fullMessage);
|
|
77
|
+
err.status = response.status;
|
|
78
|
+
throw err;
|
|
79
|
+
}
|
|
80
|
+
const ERR_CONFLICTING_ENDPOINTS = "ERR_CONFLICTING_ENDPOINTS";
|
|
81
|
+
var ConflictingEndpointsError = class extends Error {
|
|
82
|
+
constructor() {
|
|
83
|
+
super("You cannot provide both LANGSMITH_ENDPOINT / LANGCHAIN_ENDPOINT and LANGSMITH_RUNS_ENDPOINTS.");
|
|
84
|
+
Object.defineProperty(this, "code", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
configurable: true,
|
|
87
|
+
writable: true,
|
|
88
|
+
value: ERR_CONFLICTING_ENDPOINTS
|
|
89
|
+
});
|
|
90
|
+
this.name = "ConflictingEndpointsError";
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
function isConflictingEndpointsError(err) {
|
|
94
|
+
return typeof err === "object" && err !== null && err.code === ERR_CONFLICTING_ENDPOINTS;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
//#endregion
|
|
98
|
+
export { ConflictingEndpointsError, isConflictingEndpointsError, raiseForStatus };
|
|
99
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["function getErrorStackTrace(e) {\n if (typeof e !== \"object\" || e == null)\n return undefined;\n if (!(\"stack\" in e) || typeof e.stack !== \"string\")\n return undefined;\n let stack = e.stack;\n const prevLine = `${e}`;\n if (stack.startsWith(prevLine)) {\n stack = stack.slice(prevLine.length);\n }\n if (stack.startsWith(\"\\n\")) {\n stack = stack.slice(1);\n }\n return stack;\n}\nexport function printErrorStackTrace(e) {\n const stack = getErrorStackTrace(e);\n if (stack == null)\n return;\n console.error(stack);\n}\n/**\n * LangSmithConflictError\n *\n * Represents an error that occurs when there's a conflict during an operation,\n * typically corresponding to HTTP 409 status code responses.\n *\n * This error is thrown when an attempt to create or modify a resource conflicts\n * with the current state of the resource on the server. Common scenarios include:\n * - Attempting to create a resource that already exists\n * - Trying to update a resource that has been modified by another process\n * - Violating a uniqueness constraint in the data\n *\n * @extends Error\n *\n * @example\n * try {\n * await createProject(\"existingProject\");\n * } catch (error) {\n * if (error instanceof ConflictError) {\n * console.log(\"A conflict occurred:\", error.message);\n * // Handle the conflict, e.g., by suggesting a different project name\n * } else {\n * // Handle other types of errors\n * }\n * }\n *\n * @property {string} name - Always set to 'ConflictError' for easy identification\n * @property {string} message - Detailed error message including server response\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409\n */\nexport class LangSmithConflictError extends Error {\n constructor(message) {\n super(message);\n Object.defineProperty(this, \"status\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n this.name = \"LangSmithConflictError\";\n this.status = 409;\n }\n}\n/**\n * Throws an appropriate error based on the response status and body.\n *\n * @param response - The fetch Response object\n * @param context - Additional context to include in the error message (e.g., operation being performed)\n * @throws {LangSmithConflictError} When the response status is 409\n * @throws {Error} For all other non-ok responses\n */\nexport async function raiseForStatus(response, context, consumeOnSuccess) {\n let errorBody;\n if (response.ok) {\n // consume the response body to release the connection\n // https://undici.nodejs.org/#/?id=garbage-collection\n if (consumeOnSuccess) {\n errorBody = await response.text();\n }\n return;\n }\n if (response.status === 403) {\n try {\n const errorData = await response.json();\n const errorCode = errorData?.error;\n if (errorCode === \"org_scoped_key_requires_workspace\") {\n errorBody =\n \"This API key is org-scoped and requires workspace specification. \" +\n \"Please provide 'workspaceId' parameter, \" +\n \"or set LANGSMITH_WORKSPACE_ID environment variable.\";\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (e) {\n const errorWithStatus = new Error(`${response.status} ${response.statusText}`);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorWithStatus.status = response?.status;\n throw errorWithStatus;\n }\n }\n if (errorBody === undefined) {\n try {\n errorBody = await response.text();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (e) {\n errorBody = \"\";\n }\n }\n const fullMessage = `Failed to ${context}. Received status [${response.status}]: ${response.statusText}. Message: ${errorBody}`;\n if (response.status === 409) {\n throw new LangSmithConflictError(fullMessage);\n }\n const err = new Error(fullMessage);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n err.status = response.status;\n throw err;\n}\nconst ERR_CONFLICTING_ENDPOINTS = \"ERR_CONFLICTING_ENDPOINTS\";\nexport class ConflictingEndpointsError extends Error {\n constructor() {\n super(\"You cannot provide both LANGSMITH_ENDPOINT / LANGCHAIN_ENDPOINT \" +\n \"and LANGSMITH_RUNS_ENDPOINTS.\");\n Object.defineProperty(this, \"code\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: ERR_CONFLICTING_ENDPOINTS\n });\n this.name = \"ConflictingEndpointsError\"; // helpful in logs\n }\n}\nexport function isConflictingEndpointsError(err) {\n return (typeof err === \"object\" &&\n err !== null &&\n err.code === ERR_CONFLICTING_ENDPOINTS);\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAa,yBAAb,cAA4C,MAAM;CAC9C,YAAY,SAAS;EACjB,MAAM,QAAQ;EACd,OAAO,eAAe,MAAM,UAAU;GAClC,YAAY;GACZ,cAAc;GACd,UAAU;GACV,OAAO,KAAK;EACf,EAAC;EACF,KAAK,OAAO;EACZ,KAAK,SAAS;CACjB;AACJ;;;;;;;;;AASD,eAAsB,eAAe,UAAU,SAAS,kBAAkB;CACtE,IAAI;AACJ,KAAI,SAAS,IAAI;AAGb,MAAI,kBACA,YAAY,MAAM,SAAS,MAAM;AAErC;CACH;AACD,KAAI,SAAS,WAAW,IACpB,KAAI;EACA,MAAM,YAAY,MAAM,SAAS,MAAM;EACvC,MAAM,YAAY,WAAW;AAC7B,MAAI,cAAc,qCACd,YACI;CAKX,SACM,GAAG;EACN,MAAM,kCAAkB,IAAI,MAAM,GAAG,SAAS,OAAO,CAAC,EAAE,SAAS,YAAY;EAE7E,gBAAgB,SAAS,UAAU;AACnC,QAAM;CACT;AAEL,KAAI,cAAc,OACd,KAAI;EACA,YAAY,MAAM,SAAS,MAAM;CAEpC,SACM,GAAG;EACN,YAAY;CACf;CAEL,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,mBAAmB,EAAE,SAAS,OAAO,GAAG,EAAE,SAAS,WAAW,WAAW,EAAE,WAAW;AAC/H,KAAI,SAAS,WAAW,IACpB,OAAM,IAAI,uBAAuB;CAErC,MAAM,MAAM,IAAI,MAAM;CAEtB,IAAI,SAAS,SAAS;AACtB,OAAM;AACT;AACD,MAAM,4BAA4B;AAClC,IAAa,4BAAb,cAA+C,MAAM;CACjD,cAAc;EACV,MAAM,gGAC8B;EACpC,OAAO,eAAe,MAAM,QAAQ;GAChC,YAAY;GACZ,cAAc;GACd,UAAU;GACV,OAAO;EACV,EAAC;EACF,KAAK,OAAO;CACf;AACJ;AACD,SAAgB,4BAA4B,KAAK;AAC7C,QAAQ,OAAO,QAAQ,YACnB,QAAQ,QACR,IAAI,SAAS;AACpB"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
const require_env = require('../env.cjs');
|
|
2
|
+
|
|
3
|
+
//#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/utils/fast-safe-stringify/index.js
|
|
4
|
+
var LIMIT_REPLACE_NODE = "[...]";
|
|
5
|
+
var CIRCULAR_REPLACE_NODE = { result: "[Circular]" };
|
|
6
|
+
var arr = [];
|
|
7
|
+
var replacerStack = [];
|
|
8
|
+
const encoder = new TextEncoder();
|
|
9
|
+
function defaultOptions() {
|
|
10
|
+
return {
|
|
11
|
+
depthLimit: Number.MAX_SAFE_INTEGER,
|
|
12
|
+
edgesLimit: Number.MAX_SAFE_INTEGER
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function encodeString(str) {
|
|
16
|
+
return encoder.encode(str);
|
|
17
|
+
}
|
|
18
|
+
function serializeWellKnownTypes(val) {
|
|
19
|
+
if (val && typeof val === "object" && val !== null) {
|
|
20
|
+
if (val instanceof Map) return Object.fromEntries(val);
|
|
21
|
+
else if (val instanceof Set) return Array.from(val);
|
|
22
|
+
else if (val instanceof Date) return val.toISOString();
|
|
23
|
+
else if (val instanceof RegExp) return val.toString();
|
|
24
|
+
else if (val instanceof Error) return {
|
|
25
|
+
name: val.name,
|
|
26
|
+
message: val.message
|
|
27
|
+
};
|
|
28
|
+
} else if (typeof val === "bigint") return val.toString();
|
|
29
|
+
return val;
|
|
30
|
+
}
|
|
31
|
+
function createDefaultReplacer(userReplacer) {
|
|
32
|
+
return function(key, val) {
|
|
33
|
+
if (userReplacer) {
|
|
34
|
+
const userResult = userReplacer.call(this, key, val);
|
|
35
|
+
if (userResult !== void 0) return userResult;
|
|
36
|
+
}
|
|
37
|
+
return serializeWellKnownTypes(val);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function serialize(obj, errorContext, replacer, spacer, options) {
|
|
41
|
+
try {
|
|
42
|
+
const str = JSON.stringify(obj, createDefaultReplacer(replacer), spacer);
|
|
43
|
+
return encodeString(str);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
if (!e.message?.includes("Converting circular structure to JSON")) {
|
|
46
|
+
console.warn(`[WARNING]: LangSmith received unserializable value.${errorContext ? `\nContext: ${errorContext}` : ""}`);
|
|
47
|
+
return encodeString("[Unserializable]");
|
|
48
|
+
}
|
|
49
|
+
require_env.getLangSmithEnvironmentVariable("SUPPRESS_CIRCULAR_JSON_WARNINGS") !== "true" && console.warn(`[WARNING]: LangSmith received circular JSON. This will decrease tracer performance. ${errorContext ? `\nContext: ${errorContext}` : ""}`);
|
|
50
|
+
if (typeof options === "undefined") options = defaultOptions();
|
|
51
|
+
decirc(obj, "", 0, [], void 0, 0, options);
|
|
52
|
+
let res;
|
|
53
|
+
try {
|
|
54
|
+
if (replacerStack.length === 0) res = JSON.stringify(obj, replacer, spacer);
|
|
55
|
+
else res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
|
|
56
|
+
} catch (_) {
|
|
57
|
+
return encodeString("[unable to serialize, circular reference is too complex to analyze]");
|
|
58
|
+
} finally {
|
|
59
|
+
while (arr.length !== 0) {
|
|
60
|
+
const part = arr.pop();
|
|
61
|
+
if (part.length === 4) Object.defineProperty(part[0], part[1], part[3]);
|
|
62
|
+
else part[0][part[1]] = part[2];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return encodeString(res);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function setReplace(replace, val, k, parent) {
|
|
69
|
+
var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
|
|
70
|
+
if (propertyDescriptor.get !== void 0) if (propertyDescriptor.configurable) {
|
|
71
|
+
Object.defineProperty(parent, k, { value: replace });
|
|
72
|
+
arr.push([
|
|
73
|
+
parent,
|
|
74
|
+
k,
|
|
75
|
+
val,
|
|
76
|
+
propertyDescriptor
|
|
77
|
+
]);
|
|
78
|
+
} else replacerStack.push([
|
|
79
|
+
val,
|
|
80
|
+
k,
|
|
81
|
+
replace
|
|
82
|
+
]);
|
|
83
|
+
else {
|
|
84
|
+
parent[k] = replace;
|
|
85
|
+
arr.push([
|
|
86
|
+
parent,
|
|
87
|
+
k,
|
|
88
|
+
val
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function decirc(val, k, edgeIndex, stack, parent, depth, options) {
|
|
93
|
+
depth += 1;
|
|
94
|
+
var i;
|
|
95
|
+
if (typeof val === "object" && val !== null) {
|
|
96
|
+
for (i = 0; i < stack.length; i++) if (stack[i] === val) {
|
|
97
|
+
setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
|
|
101
|
+
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
|
|
105
|
+
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
stack.push(val);
|
|
109
|
+
if (Array.isArray(val)) for (i = 0; i < val.length; i++) decirc(val[i], i, i, stack, val, depth, options);
|
|
110
|
+
else {
|
|
111
|
+
val = serializeWellKnownTypes(val);
|
|
112
|
+
var keys = Object.keys(val);
|
|
113
|
+
for (i = 0; i < keys.length; i++) {
|
|
114
|
+
var key = keys[i];
|
|
115
|
+
decirc(val[key], key, i, stack, val, depth, options);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
stack.pop();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function replaceGetterValues(replacer) {
|
|
122
|
+
replacer = typeof replacer !== "undefined" ? replacer : function(k, v) {
|
|
123
|
+
return v;
|
|
124
|
+
};
|
|
125
|
+
return function(key, val) {
|
|
126
|
+
if (replacerStack.length > 0) for (var i = 0; i < replacerStack.length; i++) {
|
|
127
|
+
var part = replacerStack[i];
|
|
128
|
+
if (part[1] === key && part[0] === val) {
|
|
129
|
+
val = part[2];
|
|
130
|
+
replacerStack.splice(i, 1);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return replacer.call(this, key, val);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
exports.serialize = serialize;
|
|
140
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["getLangSmithEnvironmentVariable"],"sources":["../../../../../../../../../../../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"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\nimport { getLangSmithEnvironmentVariable } from \"../../utils/env.js\";\nvar LIMIT_REPLACE_NODE = \"[...]\";\nvar CIRCULAR_REPLACE_NODE = { result: \"[Circular]\" };\nvar arr = [];\nvar replacerStack = [];\nconst encoder = new TextEncoder();\nfunction defaultOptions() {\n return {\n depthLimit: Number.MAX_SAFE_INTEGER,\n edgesLimit: Number.MAX_SAFE_INTEGER,\n };\n}\nfunction encodeString(str) {\n return encoder.encode(str);\n}\n// Shared function to handle well-known types\nfunction serializeWellKnownTypes(val) {\n if (val && typeof val === \"object\" && val !== null) {\n if (val instanceof Map) {\n return Object.fromEntries(val);\n }\n else if (val instanceof Set) {\n return Array.from(val);\n }\n else if (val instanceof Date) {\n return val.toISOString();\n }\n else if (val instanceof RegExp) {\n return val.toString();\n }\n else if (val instanceof Error) {\n return {\n name: val.name,\n message: val.message,\n };\n }\n }\n else if (typeof val === \"bigint\") {\n return val.toString();\n }\n return val;\n}\n// Default replacer function to handle well-known types\nfunction createDefaultReplacer(userReplacer) {\n return function (key, val) {\n // Apply user replacer first if provided\n if (userReplacer) {\n const userResult = userReplacer.call(this, key, val);\n // If user replacer returned undefined, fall back to our serialization\n if (userResult !== undefined) {\n return userResult;\n }\n }\n // Fall back to our well-known type handling\n return serializeWellKnownTypes(val);\n };\n}\n// Regular stringify\nexport function serialize(obj, errorContext, replacer, spacer, options) {\n try {\n const str = JSON.stringify(obj, createDefaultReplacer(replacer), spacer);\n return encodeString(str);\n }\n catch (e) {\n // Fall back to more complex stringify if circular reference\n if (!e.message?.includes(\"Converting circular structure to JSON\")) {\n console.warn(`[WARNING]: LangSmith received unserializable value.${errorContext ? `\\nContext: ${errorContext}` : \"\"}`);\n return encodeString(\"[Unserializable]\");\n }\n getLangSmithEnvironmentVariable(\"SUPPRESS_CIRCULAR_JSON_WARNINGS\") !==\n \"true\" &&\n console.warn(`[WARNING]: LangSmith received circular JSON. This will decrease tracer performance. ${errorContext ? `\\nContext: ${errorContext}` : \"\"}`);\n if (typeof options === \"undefined\") {\n options = defaultOptions();\n }\n decirc(obj, \"\", 0, [], undefined, 0, options);\n let res;\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer);\n }\n else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);\n }\n }\n catch (_) {\n return encodeString(\"[unable to serialize, circular reference is too complex to analyze]\");\n }\n finally {\n while (arr.length !== 0) {\n const part = arr.pop();\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3]);\n }\n else {\n part[0][part[1]] = part[2];\n }\n }\n }\n return encodeString(res);\n }\n}\nfunction setReplace(replace, val, k, parent) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: replace });\n arr.push([parent, k, val, propertyDescriptor]);\n }\n else {\n replacerStack.push([val, k, replace]);\n }\n }\n else {\n parent[k] = replace;\n arr.push([parent, k, val]);\n }\n}\nfunction decirc(val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1;\n var i;\n if (typeof val === \"object\" && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);\n return;\n }\n }\n if (typeof options.depthLimit !== \"undefined\" &&\n depth > options.depthLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n if (typeof options.edgesLimit !== \"undefined\" &&\n edgeIndex + 1 > options.edgesLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n stack.push(val);\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, i, stack, val, depth, options);\n }\n }\n else {\n // Handle well-known types before Object.keys iteration\n val = serializeWellKnownTypes(val);\n var keys = Object.keys(val);\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n decirc(val[key], key, i, stack, val, depth, options);\n }\n }\n stack.pop();\n }\n}\n// Stable-stringify\nfunction compareFunction(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nfunction deterministicStringify(obj, replacer, spacer, options) {\n if (typeof options === \"undefined\") {\n options = defaultOptions();\n }\n var tmp = deterministicDecirc(obj, \"\", 0, [], undefined, 0, options) || obj;\n var res;\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer);\n }\n else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);\n }\n }\n catch (_) {\n return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\");\n }\n finally {\n // Ensure that we restore the object as it was.\n while (arr.length !== 0) {\n var part = arr.pop();\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3]);\n }\n else {\n part[0][part[1]] = part[2];\n }\n }\n }\n return res;\n}\nfunction deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1;\n var i;\n if (typeof val === \"object\" && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);\n return;\n }\n }\n try {\n if (typeof val.toJSON === \"function\") {\n return;\n }\n }\n catch (_) {\n return;\n }\n if (typeof options.depthLimit !== \"undefined\" &&\n depth > options.depthLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n if (typeof options.edgesLimit !== \"undefined\" &&\n edgeIndex + 1 > options.edgesLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n stack.push(val);\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, i, stack, val, depth, options);\n }\n }\n else {\n // Handle well-known types before Object.keys iteration\n val = serializeWellKnownTypes(val);\n // Create a temporary object in the required way\n var tmp = {};\n var keys = Object.keys(val).sort(compareFunction);\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n deterministicDecirc(val[key], key, i, stack, val, depth, options);\n tmp[key] = val[key];\n }\n if (typeof parent !== \"undefined\") {\n arr.push([parent, k, val]);\n parent[k] = tmp;\n }\n else {\n return tmp;\n }\n }\n stack.pop();\n }\n}\n// wraps replacer function to handle values we couldn't replace\n// and mark them as replaced value\nfunction replaceGetterValues(replacer) {\n replacer =\n typeof replacer !== \"undefined\"\n ? replacer\n : function (k, v) {\n return v;\n };\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i];\n if (part[1] === key && part[0] === val) {\n val = part[2];\n replacerStack.splice(i, 1);\n break;\n }\n }\n }\n return replacer.call(this, key, val);\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { getLangSmithEnvironmentVariable } from "../env.js";
|
|
2
|
+
|
|
3
|
+
//#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/utils/fast-safe-stringify/index.js
|
|
4
|
+
var LIMIT_REPLACE_NODE = "[...]";
|
|
5
|
+
var CIRCULAR_REPLACE_NODE = { result: "[Circular]" };
|
|
6
|
+
var arr = [];
|
|
7
|
+
var replacerStack = [];
|
|
8
|
+
const encoder = new TextEncoder();
|
|
9
|
+
function defaultOptions() {
|
|
10
|
+
return {
|
|
11
|
+
depthLimit: Number.MAX_SAFE_INTEGER,
|
|
12
|
+
edgesLimit: Number.MAX_SAFE_INTEGER
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function encodeString(str) {
|
|
16
|
+
return encoder.encode(str);
|
|
17
|
+
}
|
|
18
|
+
function serializeWellKnownTypes(val) {
|
|
19
|
+
if (val && typeof val === "object" && val !== null) {
|
|
20
|
+
if (val instanceof Map) return Object.fromEntries(val);
|
|
21
|
+
else if (val instanceof Set) return Array.from(val);
|
|
22
|
+
else if (val instanceof Date) return val.toISOString();
|
|
23
|
+
else if (val instanceof RegExp) return val.toString();
|
|
24
|
+
else if (val instanceof Error) return {
|
|
25
|
+
name: val.name,
|
|
26
|
+
message: val.message
|
|
27
|
+
};
|
|
28
|
+
} else if (typeof val === "bigint") return val.toString();
|
|
29
|
+
return val;
|
|
30
|
+
}
|
|
31
|
+
function createDefaultReplacer(userReplacer) {
|
|
32
|
+
return function(key, val) {
|
|
33
|
+
if (userReplacer) {
|
|
34
|
+
const userResult = userReplacer.call(this, key, val);
|
|
35
|
+
if (userResult !== void 0) return userResult;
|
|
36
|
+
}
|
|
37
|
+
return serializeWellKnownTypes(val);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function serialize(obj, errorContext, replacer, spacer, options) {
|
|
41
|
+
try {
|
|
42
|
+
const str = JSON.stringify(obj, createDefaultReplacer(replacer), spacer);
|
|
43
|
+
return encodeString(str);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
if (!e.message?.includes("Converting circular structure to JSON")) {
|
|
46
|
+
console.warn(`[WARNING]: LangSmith received unserializable value.${errorContext ? `\nContext: ${errorContext}` : ""}`);
|
|
47
|
+
return encodeString("[Unserializable]");
|
|
48
|
+
}
|
|
49
|
+
getLangSmithEnvironmentVariable("SUPPRESS_CIRCULAR_JSON_WARNINGS") !== "true" && console.warn(`[WARNING]: LangSmith received circular JSON. This will decrease tracer performance. ${errorContext ? `\nContext: ${errorContext}` : ""}`);
|
|
50
|
+
if (typeof options === "undefined") options = defaultOptions();
|
|
51
|
+
decirc(obj, "", 0, [], void 0, 0, options);
|
|
52
|
+
let res;
|
|
53
|
+
try {
|
|
54
|
+
if (replacerStack.length === 0) res = JSON.stringify(obj, replacer, spacer);
|
|
55
|
+
else res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
|
|
56
|
+
} catch (_) {
|
|
57
|
+
return encodeString("[unable to serialize, circular reference is too complex to analyze]");
|
|
58
|
+
} finally {
|
|
59
|
+
while (arr.length !== 0) {
|
|
60
|
+
const part = arr.pop();
|
|
61
|
+
if (part.length === 4) Object.defineProperty(part[0], part[1], part[3]);
|
|
62
|
+
else part[0][part[1]] = part[2];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return encodeString(res);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function setReplace(replace, val, k, parent) {
|
|
69
|
+
var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
|
|
70
|
+
if (propertyDescriptor.get !== void 0) if (propertyDescriptor.configurable) {
|
|
71
|
+
Object.defineProperty(parent, k, { value: replace });
|
|
72
|
+
arr.push([
|
|
73
|
+
parent,
|
|
74
|
+
k,
|
|
75
|
+
val,
|
|
76
|
+
propertyDescriptor
|
|
77
|
+
]);
|
|
78
|
+
} else replacerStack.push([
|
|
79
|
+
val,
|
|
80
|
+
k,
|
|
81
|
+
replace
|
|
82
|
+
]);
|
|
83
|
+
else {
|
|
84
|
+
parent[k] = replace;
|
|
85
|
+
arr.push([
|
|
86
|
+
parent,
|
|
87
|
+
k,
|
|
88
|
+
val
|
|
89
|
+
]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function decirc(val, k, edgeIndex, stack, parent, depth, options) {
|
|
93
|
+
depth += 1;
|
|
94
|
+
var i;
|
|
95
|
+
if (typeof val === "object" && val !== null) {
|
|
96
|
+
for (i = 0; i < stack.length; i++) if (stack[i] === val) {
|
|
97
|
+
setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
|
|
101
|
+
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
|
|
105
|
+
setReplace(LIMIT_REPLACE_NODE, val, k, parent);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
stack.push(val);
|
|
109
|
+
if (Array.isArray(val)) for (i = 0; i < val.length; i++) decirc(val[i], i, i, stack, val, depth, options);
|
|
110
|
+
else {
|
|
111
|
+
val = serializeWellKnownTypes(val);
|
|
112
|
+
var keys = Object.keys(val);
|
|
113
|
+
for (i = 0; i < keys.length; i++) {
|
|
114
|
+
var key = keys[i];
|
|
115
|
+
decirc(val[key], key, i, stack, val, depth, options);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
stack.pop();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function replaceGetterValues(replacer) {
|
|
122
|
+
replacer = typeof replacer !== "undefined" ? replacer : function(k, v) {
|
|
123
|
+
return v;
|
|
124
|
+
};
|
|
125
|
+
return function(key, val) {
|
|
126
|
+
if (replacerStack.length > 0) for (var i = 0; i < replacerStack.length; i++) {
|
|
127
|
+
var part = replacerStack[i];
|
|
128
|
+
if (part[1] === key && part[0] === val) {
|
|
129
|
+
val = part[2];
|
|
130
|
+
replacerStack.splice(i, 1);
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return replacer.call(this, key, val);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
export { serialize };
|
|
140
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../../../../../../../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"],"sourcesContent":["/* eslint-disable */\n// @ts-nocheck\nimport { getLangSmithEnvironmentVariable } from \"../../utils/env.js\";\nvar LIMIT_REPLACE_NODE = \"[...]\";\nvar CIRCULAR_REPLACE_NODE = { result: \"[Circular]\" };\nvar arr = [];\nvar replacerStack = [];\nconst encoder = new TextEncoder();\nfunction defaultOptions() {\n return {\n depthLimit: Number.MAX_SAFE_INTEGER,\n edgesLimit: Number.MAX_SAFE_INTEGER,\n };\n}\nfunction encodeString(str) {\n return encoder.encode(str);\n}\n// Shared function to handle well-known types\nfunction serializeWellKnownTypes(val) {\n if (val && typeof val === \"object\" && val !== null) {\n if (val instanceof Map) {\n return Object.fromEntries(val);\n }\n else if (val instanceof Set) {\n return Array.from(val);\n }\n else if (val instanceof Date) {\n return val.toISOString();\n }\n else if (val instanceof RegExp) {\n return val.toString();\n }\n else if (val instanceof Error) {\n return {\n name: val.name,\n message: val.message,\n };\n }\n }\n else if (typeof val === \"bigint\") {\n return val.toString();\n }\n return val;\n}\n// Default replacer function to handle well-known types\nfunction createDefaultReplacer(userReplacer) {\n return function (key, val) {\n // Apply user replacer first if provided\n if (userReplacer) {\n const userResult = userReplacer.call(this, key, val);\n // If user replacer returned undefined, fall back to our serialization\n if (userResult !== undefined) {\n return userResult;\n }\n }\n // Fall back to our well-known type handling\n return serializeWellKnownTypes(val);\n };\n}\n// Regular stringify\nexport function serialize(obj, errorContext, replacer, spacer, options) {\n try {\n const str = JSON.stringify(obj, createDefaultReplacer(replacer), spacer);\n return encodeString(str);\n }\n catch (e) {\n // Fall back to more complex stringify if circular reference\n if (!e.message?.includes(\"Converting circular structure to JSON\")) {\n console.warn(`[WARNING]: LangSmith received unserializable value.${errorContext ? `\\nContext: ${errorContext}` : \"\"}`);\n return encodeString(\"[Unserializable]\");\n }\n getLangSmithEnvironmentVariable(\"SUPPRESS_CIRCULAR_JSON_WARNINGS\") !==\n \"true\" &&\n console.warn(`[WARNING]: LangSmith received circular JSON. This will decrease tracer performance. ${errorContext ? `\\nContext: ${errorContext}` : \"\"}`);\n if (typeof options === \"undefined\") {\n options = defaultOptions();\n }\n decirc(obj, \"\", 0, [], undefined, 0, options);\n let res;\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(obj, replacer, spacer);\n }\n else {\n res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);\n }\n }\n catch (_) {\n return encodeString(\"[unable to serialize, circular reference is too complex to analyze]\");\n }\n finally {\n while (arr.length !== 0) {\n const part = arr.pop();\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3]);\n }\n else {\n part[0][part[1]] = part[2];\n }\n }\n }\n return encodeString(res);\n }\n}\nfunction setReplace(replace, val, k, parent) {\n var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);\n if (propertyDescriptor.get !== undefined) {\n if (propertyDescriptor.configurable) {\n Object.defineProperty(parent, k, { value: replace });\n arr.push([parent, k, val, propertyDescriptor]);\n }\n else {\n replacerStack.push([val, k, replace]);\n }\n }\n else {\n parent[k] = replace;\n arr.push([parent, k, val]);\n }\n}\nfunction decirc(val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1;\n var i;\n if (typeof val === \"object\" && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);\n return;\n }\n }\n if (typeof options.depthLimit !== \"undefined\" &&\n depth > options.depthLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n if (typeof options.edgesLimit !== \"undefined\" &&\n edgeIndex + 1 > options.edgesLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n stack.push(val);\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n decirc(val[i], i, i, stack, val, depth, options);\n }\n }\n else {\n // Handle well-known types before Object.keys iteration\n val = serializeWellKnownTypes(val);\n var keys = Object.keys(val);\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n decirc(val[key], key, i, stack, val, depth, options);\n }\n }\n stack.pop();\n }\n}\n// Stable-stringify\nfunction compareFunction(a, b) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return 0;\n}\nfunction deterministicStringify(obj, replacer, spacer, options) {\n if (typeof options === \"undefined\") {\n options = defaultOptions();\n }\n var tmp = deterministicDecirc(obj, \"\", 0, [], undefined, 0, options) || obj;\n var res;\n try {\n if (replacerStack.length === 0) {\n res = JSON.stringify(tmp, replacer, spacer);\n }\n else {\n res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);\n }\n }\n catch (_) {\n return JSON.stringify(\"[unable to serialize, circular reference is too complex to analyze]\");\n }\n finally {\n // Ensure that we restore the object as it was.\n while (arr.length !== 0) {\n var part = arr.pop();\n if (part.length === 4) {\n Object.defineProperty(part[0], part[1], part[3]);\n }\n else {\n part[0][part[1]] = part[2];\n }\n }\n }\n return res;\n}\nfunction deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {\n depth += 1;\n var i;\n if (typeof val === \"object\" && val !== null) {\n for (i = 0; i < stack.length; i++) {\n if (stack[i] === val) {\n setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);\n return;\n }\n }\n try {\n if (typeof val.toJSON === \"function\") {\n return;\n }\n }\n catch (_) {\n return;\n }\n if (typeof options.depthLimit !== \"undefined\" &&\n depth > options.depthLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n if (typeof options.edgesLimit !== \"undefined\" &&\n edgeIndex + 1 > options.edgesLimit) {\n setReplace(LIMIT_REPLACE_NODE, val, k, parent);\n return;\n }\n stack.push(val);\n // Optimize for Arrays. Big arrays could kill the performance otherwise!\n if (Array.isArray(val)) {\n for (i = 0; i < val.length; i++) {\n deterministicDecirc(val[i], i, i, stack, val, depth, options);\n }\n }\n else {\n // Handle well-known types before Object.keys iteration\n val = serializeWellKnownTypes(val);\n // Create a temporary object in the required way\n var tmp = {};\n var keys = Object.keys(val).sort(compareFunction);\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n deterministicDecirc(val[key], key, i, stack, val, depth, options);\n tmp[key] = val[key];\n }\n if (typeof parent !== \"undefined\") {\n arr.push([parent, k, val]);\n parent[k] = tmp;\n }\n else {\n return tmp;\n }\n }\n stack.pop();\n }\n}\n// wraps replacer function to handle values we couldn't replace\n// and mark them as replaced value\nfunction replaceGetterValues(replacer) {\n replacer =\n typeof replacer !== \"undefined\"\n ? replacer\n : function (k, v) {\n return v;\n };\n return function (key, val) {\n if (replacerStack.length > 0) {\n for (var i = 0; i < replacerStack.length; i++) {\n var part = replacerStack[i];\n if (part[1] === key && part[0] === val) {\n val = part[2];\n replacerStack.splice(i, 1);\n break;\n }\n }\n }\n return replacer.call(this, key, val);\n };\n}\n"],"x_google_ignoreList":[0],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#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/utils/messages.js
|
|
3
|
+
function isLangChainMessage(message) {
|
|
4
|
+
return typeof message?._getType === "function";
|
|
5
|
+
}
|
|
6
|
+
function convertLangChainMessageToExample(message) {
|
|
7
|
+
const converted = {
|
|
8
|
+
type: message._getType(),
|
|
9
|
+
data: { content: message.content }
|
|
10
|
+
};
|
|
11
|
+
if (message?.additional_kwargs && Object.keys(message.additional_kwargs).length > 0) converted.data.additional_kwargs = { ...message.additional_kwargs };
|
|
12
|
+
return converted;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
exports.convertLangChainMessageToExample = convertLangChainMessageToExample;
|
|
17
|
+
exports.isLangChainMessage = isLangChainMessage;
|
|
18
|
+
//# sourceMappingURL=messages.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.cjs","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["export function isLangChainMessage(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmessage) {\n return typeof message?._getType === \"function\";\n}\nexport function convertLangChainMessageToExample(message) {\n const converted = {\n type: message._getType(),\n data: { content: message.content },\n };\n // Check for presence of keys in additional_kwargs\n if (message?.additional_kwargs &&\n Object.keys(message.additional_kwargs).length > 0) {\n converted.data.additional_kwargs = { ...message.additional_kwargs };\n }\n return converted;\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAAA,SAAgB,mBAEhB,SAAS;AACL,QAAO,OAAO,SAAS,aAAa;AACvC;AACD,SAAgB,iCAAiC,SAAS;CACtD,MAAM,YAAY;EACd,MAAM,QAAQ,UAAU;EACxB,MAAM,EAAE,SAAS,QAAQ,QAAS;CACrC;AAED,KAAI,SAAS,qBACT,OAAO,KAAK,QAAQ,kBAAkB,CAAC,SAAS,GAChD,UAAU,KAAK,oBAAoB,EAAE,GAAG,QAAQ,kBAAmB;AAEvE,QAAO;AACV"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#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/utils/messages.js
|
|
2
|
+
function isLangChainMessage(message) {
|
|
3
|
+
return typeof message?._getType === "function";
|
|
4
|
+
}
|
|
5
|
+
function convertLangChainMessageToExample(message) {
|
|
6
|
+
const converted = {
|
|
7
|
+
type: message._getType(),
|
|
8
|
+
data: { content: message.content }
|
|
9
|
+
};
|
|
10
|
+
if (message?.additional_kwargs && Object.keys(message.additional_kwargs).length > 0) converted.data.additional_kwargs = { ...message.additional_kwargs };
|
|
11
|
+
return converted;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { convertLangChainMessageToExample, isLangChainMessage };
|
|
16
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["export function isLangChainMessage(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nmessage) {\n return typeof message?._getType === \"function\";\n}\nexport function convertLangChainMessageToExample(message) {\n const converted = {\n type: message._getType(),\n data: { content: message.content },\n };\n // Check for presence of keys in additional_kwargs\n if (message?.additional_kwargs &&\n Object.keys(message.additional_kwargs).length > 0) {\n converted.data.additional_kwargs = { ...message.additional_kwargs };\n }\n return converted;\n}\n"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAgB,mBAEhB,SAAS;AACL,QAAO,OAAO,SAAS,aAAa;AACvC;AACD,SAAgB,iCAAiC,SAAS;CACtD,MAAM,YAAY;EACd,MAAM,QAAQ,UAAU;EACxB,MAAM,EAAE,SAAS,QAAQ,QAAS;CACrC;AAED,KAAI,SAAS,qBACT,OAAO,KAAK,QAAQ,kBAAkB,CAAC,SAAS,GAChD,UAAU,KAAK,oBAAoB,EAAE,GAAG,QAAQ,kBAAmB;AAEvE,QAAO;AACV"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_env = require('./env.cjs');
|
|
2
|
+
|
|
3
|
+
//#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/utils/project.js
|
|
4
|
+
const getDefaultProjectName = () => {
|
|
5
|
+
return require_env.getLangSmithEnvironmentVariable("PROJECT") ?? require_env.getEnvironmentVariable("LANGCHAIN_SESSION") ?? "default";
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.getDefaultProjectName = getDefaultProjectName;
|
|
10
|
+
//# sourceMappingURL=project.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.cjs","names":["getLangSmithEnvironmentVariable","getEnvironmentVariable"],"sources":["../../../../../../../../../../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"],"sourcesContent":["import { getEnvironmentVariable, getLangSmithEnvironmentVariable, } from \"./env.js\";\nexport const getDefaultProjectName = () => {\n return (getLangSmithEnvironmentVariable(\"PROJECT\") ??\n getEnvironmentVariable(\"LANGCHAIN_SESSION\") ?? // TODO: Deprecate\n \"default\");\n};\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAa,wBAAwB,MAAM;AACvC,QAAQA,4CAAgC,UAAU,IAC9CC,mCAAuB,oBAAoB,IAC3C;AACP"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getEnvironmentVariable, getLangSmithEnvironmentVariable } from "./env.js";
|
|
2
|
+
|
|
3
|
+
//#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/utils/project.js
|
|
4
|
+
const getDefaultProjectName = () => {
|
|
5
|
+
return getLangSmithEnvironmentVariable("PROJECT") ?? getEnvironmentVariable("LANGCHAIN_SESSION") ?? "default";
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { getDefaultProjectName };
|
|
10
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["import { getEnvironmentVariable, getLangSmithEnvironmentVariable, } from \"./env.js\";\nexport const getDefaultProjectName = () => {\n return (getLangSmithEnvironmentVariable(\"PROJECT\") ??\n getEnvironmentVariable(\"LANGCHAIN_SESSION\") ?? // TODO: Deprecate\n \"default\");\n};\n"],"x_google_ignoreList":[0],"mappings":";;;AACA,MAAa,wBAAwB,MAAM;AACvC,QAAQ,gCAAgC,UAAU,IAC9C,uBAAuB,oBAAoB,IAC3C;AACP"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_index = require('../../../../../semver@7.7.2/node_modules/semver/index.cjs');
|
|
3
|
+
|
|
4
|
+
//#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/utils/prompts.js
|
|
5
|
+
var import_semver = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_index.require_semver(), 1);
|
|
6
|
+
function parsePromptIdentifier(identifier) {
|
|
7
|
+
if (!identifier || identifier.split("/").length > 2 || identifier.startsWith("/") || identifier.endsWith("/") || identifier.split(":").length > 2) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
8
|
+
const [ownerNamePart, commitPart] = identifier.split(":");
|
|
9
|
+
const commit = commitPart || "latest";
|
|
10
|
+
if (ownerNamePart.includes("/")) {
|
|
11
|
+
const [owner, name] = ownerNamePart.split("/", 2);
|
|
12
|
+
if (!owner || !name) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
13
|
+
return [
|
|
14
|
+
owner,
|
|
15
|
+
name,
|
|
16
|
+
commit
|
|
17
|
+
];
|
|
18
|
+
} else {
|
|
19
|
+
if (!ownerNamePart) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
20
|
+
return [
|
|
21
|
+
"-",
|
|
22
|
+
ownerNamePart,
|
|
23
|
+
commit
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
exports.parsePromptIdentifier = parsePromptIdentifier;
|
|
30
|
+
//# sourceMappingURL=prompts.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.cjs","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["import { parse as parseVersion } from \"semver\";\nexport function isVersionGreaterOrEqual(current_version, target_version) {\n const current = parseVersion(current_version);\n const target = parseVersion(target_version);\n if (!current || !target) {\n throw new Error(\"Invalid version format.\");\n }\n return current.compare(target) >= 0;\n}\nexport function parsePromptIdentifier(identifier) {\n if (!identifier ||\n identifier.split(\"/\").length > 2 ||\n identifier.startsWith(\"/\") ||\n identifier.endsWith(\"/\") ||\n identifier.split(\":\").length > 2) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n const [ownerNamePart, commitPart] = identifier.split(\":\");\n const commit = commitPart || \"latest\";\n if (ownerNamePart.includes(\"/\")) {\n const [owner, name] = ownerNamePart.split(\"/\", 2);\n if (!owner || !name) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n return [owner, name, commit];\n }\n else {\n if (!ownerNamePart) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n return [\"-\", ownerNamePart, commit];\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAgB,sBAAsB,YAAY;AAC9C,KAAI,CAAC,cACD,WAAW,MAAM,IAAI,CAAC,SAAS,KAC/B,WAAW,WAAW,IAAI,IAC1B,WAAW,SAAS,IAAI,IACxB,WAAW,MAAM,IAAI,CAAC,SAAS,EAC/B,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;CAE9D,MAAM,CAAC,eAAe,WAAW,GAAG,WAAW,MAAM,IAAI;CACzD,MAAM,SAAS,cAAc;AAC7B,KAAI,cAAc,SAAS,IAAI,EAAE;EAC7B,MAAM,CAAC,OAAO,KAAK,GAAG,cAAc,MAAM,KAAK,EAAE;AACjD,MAAI,CAAC,SAAS,CAAC,KACX,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;AAE9D,SAAO;GAAC;GAAO;GAAM;EAAO;CAC/B,OACI;AACD,MAAI,CAAC,cACD,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;AAE9D,SAAO;GAAC;GAAK;GAAe;EAAO;CACtC;AACJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __toESM } from "../../../../../../../_virtual/rolldown_runtime.js";
|
|
2
|
+
import { require_semver } from "../../../../../semver@7.7.2/node_modules/semver/index.js";
|
|
3
|
+
|
|
4
|
+
//#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/utils/prompts.js
|
|
5
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
6
|
+
function parsePromptIdentifier(identifier) {
|
|
7
|
+
if (!identifier || identifier.split("/").length > 2 || identifier.startsWith("/") || identifier.endsWith("/") || identifier.split(":").length > 2) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
8
|
+
const [ownerNamePart, commitPart] = identifier.split(":");
|
|
9
|
+
const commit = commitPart || "latest";
|
|
10
|
+
if (ownerNamePart.includes("/")) {
|
|
11
|
+
const [owner, name] = ownerNamePart.split("/", 2);
|
|
12
|
+
if (!owner || !name) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
13
|
+
return [
|
|
14
|
+
owner,
|
|
15
|
+
name,
|
|
16
|
+
commit
|
|
17
|
+
];
|
|
18
|
+
} else {
|
|
19
|
+
if (!ownerNamePart) throw new Error(`Invalid identifier format: ${identifier}`);
|
|
20
|
+
return [
|
|
21
|
+
"-",
|
|
22
|
+
ownerNamePart,
|
|
23
|
+
commit
|
|
24
|
+
];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { parsePromptIdentifier };
|
|
30
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["import { parse as parseVersion } from \"semver\";\nexport function isVersionGreaterOrEqual(current_version, target_version) {\n const current = parseVersion(current_version);\n const target = parseVersion(target_version);\n if (!current || !target) {\n throw new Error(\"Invalid version format.\");\n }\n return current.compare(target) >= 0;\n}\nexport function parsePromptIdentifier(identifier) {\n if (!identifier ||\n identifier.split(\"/\").length > 2 ||\n identifier.startsWith(\"/\") ||\n identifier.endsWith(\"/\") ||\n identifier.split(\":\").length > 2) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n const [ownerNamePart, commitPart] = identifier.split(\":\");\n const commit = commitPart || \"latest\";\n if (ownerNamePart.includes(\"/\")) {\n const [owner, name] = ownerNamePart.split(\"/\", 2);\n if (!owner || !name) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n return [owner, name, commit];\n }\n else {\n if (!ownerNamePart) {\n throw new Error(`Invalid identifier format: ${identifier}`);\n }\n return [\"-\", ownerNamePart, commit];\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AASA,SAAgB,sBAAsB,YAAY;AAC9C,KAAI,CAAC,cACD,WAAW,MAAM,IAAI,CAAC,SAAS,KAC/B,WAAW,WAAW,IAAI,IAC1B,WAAW,SAAS,IAAI,IACxB,WAAW,MAAM,IAAI,CAAC,SAAS,EAC/B,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;CAE9D,MAAM,CAAC,eAAe,WAAW,GAAG,WAAW,MAAM,IAAI;CACzD,MAAM,SAAS,cAAc;AAC7B,KAAI,cAAc,SAAS,IAAI,EAAE;EAC7B,MAAM,CAAC,OAAO,KAAK,GAAG,cAAc,MAAM,KAAK,EAAE;AACjD,MAAI,CAAC,SAAS,CAAC,KACX,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;AAE9D,SAAO;GAAC;GAAO;GAAM;EAAO;CAC/B,OACI;AACD,MAAI,CAAC,cACD,OAAM,IAAI,MAAM,CAAC,2BAA2B,EAAE,YAAY;AAE9D,SAAO;GAAC;GAAK;GAAe;EAAO;CACtC;AACJ"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
//#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/utils/warn.js
|
|
3
|
+
const warnedMessages = {};
|
|
4
|
+
function warnOnce(message) {
|
|
5
|
+
if (!warnedMessages[message]) {
|
|
6
|
+
console.warn(message);
|
|
7
|
+
warnedMessages[message] = true;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.warnOnce = warnOnce;
|
|
13
|
+
//# sourceMappingURL=warn.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warn.cjs","names":[],"sources":["../../../../../../../../../../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"],"sourcesContent":["const warnedMessages = {};\nexport function warnOnce(message) {\n if (!warnedMessages[message]) {\n console.warn(message);\n warnedMessages[message] = true;\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAAA,MAAM,iBAAiB,CAAE;AACzB,SAAgB,SAAS,SAAS;AAC9B,KAAI,CAAC,eAAe,UAAU;EAC1B,QAAQ,KAAK,QAAQ;EACrB,eAAe,WAAW;CAC7B;AACJ"}
|