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