langchain 1.0.3 → 1.0.5

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