@langchain/classic 1.0.0-alpha.1 → 1.0.1

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 (178) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +6 -6
  3. package/README.md +174 -66
  4. package/dist/agents/initialize.d.ts +2 -2
  5. package/dist/agents/initialize.d.ts.map +1 -1
  6. package/dist/agents/mrkl/outputParser.d.cts +1 -1
  7. package/dist/agents/mrkl/outputParser.d.cts.map +1 -1
  8. package/dist/agents/openai_tools/index.d.cts.map +1 -1
  9. package/dist/agents/openai_tools/index.d.ts.map +1 -1
  10. package/dist/agents/react/index.d.ts +2 -2
  11. package/dist/agents/react/index.d.ts.map +1 -1
  12. package/dist/agents/structured_chat/index.d.ts +2 -2
  13. package/dist/agents/structured_chat/index.d.ts.map +1 -1
  14. package/dist/agents/tool_calling/index.d.cts.map +1 -1
  15. package/dist/agents/tool_calling/index.d.ts.map +1 -1
  16. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts +2 -2
  17. package/dist/agents/toolkits/conversational_retrieval/token_buffer_memory.d.cts.map +1 -1
  18. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts +8 -2
  19. package/dist/agents/toolkits/conversational_retrieval/tool.d.cts.map +1 -1
  20. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts +8 -2
  21. package/dist/agents/toolkits/conversational_retrieval/tool.d.ts.map +1 -1
  22. package/dist/chains/index.cjs +3 -0
  23. package/dist/chains/index.cjs.map +1 -1
  24. package/dist/chains/index.d.cts +2 -1
  25. package/dist/chains/index.d.ts +2 -1
  26. package/dist/chains/index.js +3 -1
  27. package/dist/chains/index.js.map +1 -1
  28. package/dist/chains/openai_moderation.cjs +107 -0
  29. package/dist/chains/openai_moderation.cjs.map +1 -0
  30. package/dist/chains/openai_moderation.d.cts +74 -0
  31. package/dist/chains/openai_moderation.d.cts.map +1 -0
  32. package/dist/chains/openai_moderation.d.ts +74 -0
  33. package/dist/chains/openai_moderation.d.ts.map +1 -0
  34. package/dist/chains/openai_moderation.js +106 -0
  35. package/dist/chains/openai_moderation.js.map +1 -0
  36. package/dist/chains/question_answering/load.d.cts +2 -2
  37. package/dist/chains/question_answering/load.d.cts.map +1 -1
  38. package/dist/chains/question_answering/load.d.ts +2 -2
  39. package/dist/chains/question_answering/load.d.ts.map +1 -1
  40. package/dist/chains/summarization/load.d.cts +2 -2
  41. package/dist/chains/summarization/load.d.cts.map +1 -1
  42. package/dist/chains/summarization/load.d.ts +2 -2
  43. package/dist/chains/summarization/load.d.ts.map +1 -1
  44. package/dist/embeddings/cache_backed.d.cts +1 -1
  45. package/dist/embeddings/cache_backed.d.ts +1 -1
  46. package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
  47. package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
  48. package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
  49. package/dist/experimental/autogpt/prompt.d.cts +2 -2
  50. package/dist/experimental/autogpt/prompt.d.cts.map +1 -1
  51. package/dist/hub/base.cjs +1 -1
  52. package/dist/hub/base.js +1 -1
  53. package/dist/langchain-core/dist/messages/base.d.cts +2 -0
  54. package/dist/langchain-core/dist/messages/base.d.cts.map +1 -1
  55. package/dist/langchain-core/dist/messages/format.d.cts +8 -0
  56. package/dist/langchain-core/dist/messages/format.d.cts.map +1 -0
  57. package/dist/libs/langchain-core/dist/messages/base.d.ts +2 -0
  58. package/dist/libs/langchain-core/dist/messages/base.d.ts.map +1 -1
  59. package/dist/libs/langchain-core/dist/messages/format.d.ts +8 -0
  60. package/dist/libs/langchain-core/dist/messages/format.d.ts.map +1 -0
  61. package/dist/load/import_map.cjs +1 -1
  62. package/dist/load/import_map.js +1 -1
  63. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +74 -18
  64. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  65. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +75 -19
  66. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  67. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  68. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  69. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  70. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  71. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  72. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  73. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  74. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 -1
  75. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  76. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  77. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  78. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  79. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +2 -2
  80. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  81. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +2 -2
  82. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  83. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +7 -5
  84. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  85. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +7 -5
  86. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  87. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  88. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  89. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  90. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  91. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  92. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  93. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  94. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  95. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  96. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  97. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  98. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  99. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  100. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  101. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  102. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 -1
  103. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  104. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  105. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  106. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 -1
  107. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +19 -23
  108. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  109. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +19 -23
  110. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  111. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +16 -3
  112. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  113. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +16 -3
  114. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  115. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  116. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  117. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  118. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  119. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  120. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  121. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  122. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 -1
  123. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  124. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  125. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  126. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  127. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  128. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  129. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  130. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.cjs.map → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 -1
  131. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  132. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  133. package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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 +1 -1
  134. package/dist/node_modules/.pnpm/langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.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
  135. package/dist/output_parsers/structured.d.cts +7 -1
  136. package/dist/output_parsers/structured.d.cts.map +1 -1
  137. package/dist/output_parsers/structured.d.ts +7 -1
  138. package/dist/output_parsers/structured.d.ts.map +1 -1
  139. package/dist/smith/runner_utils.cjs +3 -3
  140. package/dist/smith/runner_utils.js +3 -3
  141. package/dist/tools/retriever.d.cts +12 -1
  142. package/dist/tools/retriever.d.cts.map +1 -1
  143. package/dist/tools/retriever.d.ts +12 -1
  144. package/dist/tools/retriever.d.ts.map +1 -1
  145. package/package.json +225 -225
  146. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.cjs.map +0 -1
  147. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.js.map +0 -1
  148. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.cjs.map +0 -1
  149. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/env.js.map +0 -1
  150. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/constants.js.map +0 -1
  151. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.cjs.map +0 -1
  152. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/experimental/otel/translator.js.map +0 -1
  153. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.cjs.map +0 -1
  154. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/index.js.map +0 -1
  155. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.cjs.map +0 -1
  156. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/run_trees.js.map +0 -1
  157. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.cjs.map +0 -1
  158. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/constants.js.map +0 -1
  159. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.cjs.map +0 -1
  160. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/fetch.js.map +0 -1
  161. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.cjs.map +0 -1
  162. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/singletons/otel.js.map +0 -1
  163. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/_uuid.js.map +0 -1
  164. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/async_caller.js.map +0 -1
  165. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.cjs.map +0 -1
  166. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/env.js.map +0 -1
  167. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.cjs.map +0 -1
  168. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/error.js.map +0 -1
  169. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs.map +0 -1
  170. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js.map +0 -1
  171. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/messages.js.map +0 -1
  172. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.cjs.map +0 -1
  173. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/project.js.map +0 -1
  174. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/prompts.js.map +0 -1
  175. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.cjs.map +0 -1
  176. package/dist/node_modules/.pnpm/langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/utils/warn.js.map +0 -1
  177. /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.cjs +0 -0
  178. /package/dist/node_modules/.pnpm/{langsmith@0.3.64_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_ → langsmith@0.3.74_@opentelemetry_api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@3.25.76_}/node_modules/langsmith/index.js +0 -0
@@ -13,10 +13,10 @@ const require_index = require('./utils/fast-safe-stringify/index.cjs');
13
13
  const require_index$1 = require('./index.cjs');
14
14
  const uuid = require_rolldown_runtime.__toESM(require("uuid"));
15
15
 
16
- //#region ../../node_modules/.pnpm/langsmith@0.3.64_@opentelemetry+api@1.9.0_openai@5.12.2_ws@8.18.3_bufferutil@4.0.9_utf-8-validate@6.0.5__zod@4.1.11_/node_modules/langsmith/dist/client.js
17
- function mergeRuntimeEnvIntoRun(run) {
16
+ //#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/client.js
17
+ function mergeRuntimeEnvIntoRun(run, cachedEnvVars) {
18
18
  const runtimeEnv = require_env.getRuntimeEnvironment();
19
- const envVars = require_env.getLangChainEnvVarsMetadata();
19
+ const envVars = cachedEnvVars ?? require_env.getLangSmithEnvVarsMetadata();
20
20
  const extra = run.extra ?? {};
21
21
  const metadata = extra.metadata;
22
22
  run.extra = {
@@ -105,11 +105,11 @@ var AutoBatchQueue = class {
105
105
  this.sizeBytes += size;
106
106
  return itemPromise;
107
107
  }
108
- pop(upToSizeBytes) {
108
+ pop({ upToSizeBytes, upToSize }) {
109
109
  if (upToSizeBytes < 1) throw new Error("Number of bytes to pop off may not be less than 1.");
110
110
  const popped = [];
111
111
  let poppedSizeBytes = 0;
112
- while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0) {
112
+ while (poppedSizeBytes + (this.peek()?.size ?? 0) < upToSizeBytes && this.items.length > 0 && popped.length < upToSize) {
113
113
  const item = this.items.shift();
114
114
  if (item) {
115
115
  popped.push(item);
@@ -134,6 +134,8 @@ var AutoBatchQueue = class {
134
134
  };
135
135
  const DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES = 24 * 1024 * 1024;
136
136
  const SERVER_INFO_REQUEST_TIMEOUT_MS = 1e4;
137
+ /** Maximum number of operations to batch in a single request. */
138
+ const DEFAULT_BATCH_SIZE_LIMIT = 100;
137
139
  const DEFAULT_API_URL = "https://api.smith.langchain.com";
138
140
  var Client = class Client {
139
141
  get _fetch() {
@@ -158,6 +160,12 @@ var Client = class Client {
158
160
  writable: true,
159
161
  value: void 0
160
162
  });
163
+ Object.defineProperty(this, "workspaceId", {
164
+ enumerable: true,
165
+ configurable: true,
166
+ writable: true,
167
+ value: void 0
168
+ });
161
169
  Object.defineProperty(this, "caller", {
162
170
  enumerable: true,
163
171
  configurable: true,
@@ -236,6 +244,12 @@ var Client = class Client {
236
244
  writable: true,
237
245
  value: void 0
238
246
  });
247
+ Object.defineProperty(this, "batchSizeLimit", {
248
+ enumerable: true,
249
+ configurable: true,
250
+ writable: true,
251
+ value: void 0
252
+ });
239
253
  Object.defineProperty(this, "fetchOptions", {
240
254
  enumerable: true,
241
255
  configurable: true,
@@ -290,6 +304,12 @@ var Client = class Client {
290
304
  writable: true,
291
305
  value: void 0
292
306
  });
307
+ Object.defineProperty(this, "cachedLSEnvVarsForMetadata", {
308
+ enumerable: true,
309
+ configurable: true,
310
+ writable: true,
311
+ value: void 0
312
+ });
293
313
  Object.defineProperty(this, "multipartStreamingDisabled", {
294
314
  enumerable: true,
295
315
  configurable: true,
@@ -309,6 +329,7 @@ var Client = class Client {
309
329
  this.apiKey = trimQuotes(config.apiKey ?? defaultConfig.apiKey);
310
330
  this.webUrl = trimQuotes(config.webUrl ?? defaultConfig.webUrl);
311
331
  if (this.webUrl?.endsWith("/")) this.webUrl = this.webUrl.slice(0, -1);
332
+ this.workspaceId = trimQuotes(config.workspaceId ?? require_env.getLangSmithEnvironmentVariable("WORKSPACE_ID"));
312
333
  this.timeout_ms = config.timeout_ms ?? 9e4;
313
334
  this.caller = new require_async_caller.AsyncCaller({
314
335
  ...config.callerOptions ?? {},
@@ -331,9 +352,11 @@ var Client = class Client {
331
352
  this.autoBatchTracing = config.autoBatchTracing ?? this.autoBatchTracing;
332
353
  this.blockOnRootRunFinalization = config.blockOnRootRunFinalization ?? this.blockOnRootRunFinalization;
333
354
  this.batchSizeBytesLimit = config.batchSizeBytesLimit;
355
+ this.batchSizeLimit = config.batchSizeLimit;
334
356
  this.fetchOptions = config.fetchOptions || {};
335
357
  this.manualFlushMode = config.manualFlushMode ?? this.manualFlushMode;
336
358
  if (require_env.getOtelEnabled()) this.langSmithToOTELTranslator = new require_translator.LangSmithToOTELTranslator();
359
+ this.cachedLSEnvVarsForMetadata = require_env.getLangSmithEnvVarsMetadata();
337
360
  }
338
361
  static getDefaultClientConfig() {
339
362
  const apiKey = require_env.getLangSmithEnvironmentVariable("API_KEY");
@@ -376,6 +399,7 @@ var Client = class Client {
376
399
  get headers() {
377
400
  const headers = { "User-Agent": `langsmith-js/${require_index$1.__version__}` };
378
401
  if (this.apiKey) headers["x-api-key"] = `${this.apiKey}`;
402
+ if (this.workspaceId) headers["x-tenant-id"] = this.workspaceId;
379
403
  return headers;
380
404
  }
381
405
  _getPlatformEndpointPath(path) {
@@ -410,7 +434,7 @@ var Client = class Client {
410
434
  signal: AbortSignal.timeout(this.timeout_ms),
411
435
  ...this.fetchOptions
412
436
  });
413
- await require_error.raiseForStatus(res, `Failed to fetch ${path}`);
437
+ await require_error.raiseForStatus(res, `fetch ${path}`);
414
438
  return res;
415
439
  });
416
440
  return response;
@@ -433,7 +457,7 @@ var Client = class Client {
433
457
  signal: AbortSignal.timeout(this.timeout_ms),
434
458
  ...this.fetchOptions
435
459
  });
436
- await require_error.raiseForStatus(res, `Failed to fetch ${path}`);
460
+ await require_error.raiseForStatus(res, `fetch ${path}`);
437
461
  return res;
438
462
  });
439
463
  const items = transform ? transform(await response.json()) : await response.json();
@@ -458,7 +482,7 @@ var Client = class Client {
458
482
  ...this.fetchOptions,
459
483
  body: body$1
460
484
  });
461
- await require_error.raiseForStatus(res, `Failed to fetch ${path}`);
485
+ await require_error.raiseForStatus(res, `fetch ${path}`);
462
486
  return res;
463
487
  });
464
488
  const responseBody = await response.json();
@@ -498,14 +522,24 @@ var Client = class Client {
498
522
  const serverInfo = await this._ensureServerInfo();
499
523
  return this.batchSizeBytesLimit ?? serverInfo.batch_ingest_config?.size_limit_bytes ?? DEFAULT_UNCOMPRESSED_BATCH_SIZE_LIMIT_BYTES;
500
524
  }
525
+ /**
526
+ * Get the maximum number of operations to batch in a single request.
527
+ */
528
+ async _getBatchSizeLimit() {
529
+ const serverInfo = await this._ensureServerInfo();
530
+ return this.batchSizeLimit ?? serverInfo.batch_ingest_config?.size_limit ?? DEFAULT_BATCH_SIZE_LIMIT;
531
+ }
501
532
  async _getDatasetExamplesMultiPartSupport() {
502
533
  const serverInfo = await this._ensureServerInfo();
503
534
  return serverInfo.instance_flags?.dataset_examples_multipart_enabled ?? false;
504
535
  }
505
- drainAutoBatchQueue(batchSizeLimit) {
536
+ drainAutoBatchQueue({ batchSizeLimitBytes, batchSizeLimit }) {
506
537
  const promises = [];
507
538
  while (this.autoBatchQueue.items.length > 0) {
508
- const [batch, done] = this.autoBatchQueue.pop(batchSizeLimit);
539
+ const [batch, done] = this.autoBatchQueue.pop({
540
+ upToSizeBytes: batchSizeLimitBytes,
541
+ upToSize: batchSizeLimit
542
+ });
509
543
  if (!batch.length) {
510
544
  done();
511
545
  break;
@@ -579,14 +613,21 @@ var Client = class Client {
579
613
  async processRunOperation(item) {
580
614
  clearTimeout(this.autoBatchTimeout);
581
615
  this.autoBatchTimeout = void 0;
582
- item.item = mergeRuntimeEnvIntoRun(item.item);
616
+ item.item = mergeRuntimeEnvIntoRun(item.item, this.cachedLSEnvVarsForMetadata);
583
617
  const itemPromise = this.autoBatchQueue.push(item);
584
618
  if (this.manualFlushMode) return itemPromise;
585
619
  const sizeLimitBytes = await this._getBatchSizeLimitBytes();
586
- if (this.autoBatchQueue.sizeBytes > sizeLimitBytes) this.drainAutoBatchQueue(sizeLimitBytes);
620
+ const sizeLimit = await this._getBatchSizeLimit();
621
+ if (this.autoBatchQueue.sizeBytes > sizeLimitBytes || this.autoBatchQueue.items.length > sizeLimit) this.drainAutoBatchQueue({
622
+ batchSizeLimitBytes: sizeLimitBytes,
623
+ batchSizeLimit: sizeLimit
624
+ });
587
625
  if (this.autoBatchQueue.items.length > 0) this.autoBatchTimeout = setTimeout(() => {
588
626
  this.autoBatchTimeout = void 0;
589
- this.drainAutoBatchQueue(sizeLimitBytes);
627
+ this.drainAutoBatchQueue({
628
+ batchSizeLimitBytes: sizeLimitBytes,
629
+ batchSizeLimit: sizeLimit
630
+ });
590
631
  }, this.autoBatchAggregationDelayMs);
591
632
  return itemPromise;
592
633
  }
@@ -628,7 +669,11 @@ var Client = class Client {
628
669
  */
629
670
  async flush() {
630
671
  const sizeLimitBytes = await this._getBatchSizeLimitBytes();
631
- await this.drainAutoBatchQueue(sizeLimitBytes);
672
+ const sizeLimit = await this._getBatchSizeLimit();
673
+ await this.drainAutoBatchQueue({
674
+ batchSizeLimitBytes: sizeLimitBytes,
675
+ batchSizeLimit: sizeLimit
676
+ });
632
677
  }
633
678
  _cloneCurrentOTELContext() {
634
679
  const otel_trace = require_otel.getOTELTrace();
@@ -663,8 +708,9 @@ var Client = class Client {
663
708
  }).catch(console.error);
664
709
  return;
665
710
  }
666
- const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate);
711
+ const mergedRunCreateParam = mergeRuntimeEnvIntoRun(runCreate, this.cachedLSEnvVarsForMetadata);
667
712
  if (options?.apiKey !== void 0) headers["x-api-key"] = options.apiKey;
713
+ if (options?.workspaceId !== void 0) headers["x-tenant-id"] = options.workspaceId;
668
714
  const body = require_index.serialize(mergedRunCreateParam, `Creating run with id: ${mergedRunCreateParam.id}`);
669
715
  await this.caller.call(async () => {
670
716
  const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/runs`, {
@@ -954,6 +1000,7 @@ var Client = class Client {
954
1000
  "Content-Type": "application/json"
955
1001
  };
956
1002
  if (options?.apiKey !== void 0) headers["x-api-key"] = options.apiKey;
1003
+ if (options?.workspaceId !== void 0) headers["x-tenant-id"] = options.workspaceId;
957
1004
  const body = require_index.serialize(run, `Serializing payload to update run with id: ${runId}`);
958
1005
  await this.caller.call(async () => {
959
1006
  const res = await this._fetch(`${options?.apiUrl ?? this.apiUrl}/runs/${runId}`, {
@@ -1152,6 +1199,7 @@ var Client = class Client {
1152
1199
  is_root: isRoot,
1153
1200
  order
1154
1201
  };
1202
+ if (body.select.includes("child_run_ids")) require_warn.warnOnce("Deprecated: 'child_run_ids' in the listRuns select parameter is deprecated and will be removed in a future version.");
1155
1203
  let runsYielded = 0;
1156
1204
  for await (const runs of this._getCursorPaginatedList("/runs/query", body)) if (limit) {
1157
1205
  if (runsYielded >= limit) break;
@@ -1232,7 +1280,10 @@ var Client = class Client {
1232
1280
  const response = await this.caller.call(async () => {
1233
1281
  const res = await this._fetch(`${this.apiUrl}/runs/stats`, {
1234
1282
  method: "POST",
1235
- headers: this.headers,
1283
+ headers: {
1284
+ ...this.headers,
1285
+ "Content-Type": "application/json"
1286
+ },
1236
1287
  signal: AbortSignal.timeout(this.timeout_ms),
1237
1288
  ...this.fetchOptions,
1238
1289
  body
@@ -1552,7 +1603,7 @@ var Client = class Client {
1552
1603
  }
1553
1604
  throw new Error("No projects found to resolve tenant.");
1554
1605
  }
1555
- async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, referenceFree, metadata } = {}) {
1606
+ async *listProjects({ projectIds, name, nameContains, referenceDatasetId, referenceDatasetName, includeStats, datasetVersion, referenceFree, metadata } = {}) {
1556
1607
  const params = new URLSearchParams();
1557
1608
  if (projectIds !== void 0) for (const projectId of projectIds) params.append("id", projectId);
1558
1609
  if (name !== void 0) params.append("name", name);
@@ -1562,6 +1613,8 @@ var Client = class Client {
1562
1613
  const dataset = await this.readDataset({ datasetName: referenceDatasetName });
1563
1614
  params.append("reference_dataset", dataset.id);
1564
1615
  }
1616
+ if (includeStats !== void 0) params.append("include_stats", includeStats.toString());
1617
+ if (datasetVersion !== void 0) params.append("dataset_version", datasetVersion);
1565
1618
  if (referenceFree !== void 0) params.append("reference_free", referenceFree.toString());
1566
1619
  if (metadata !== void 0) params.append("metadata", JSON.stringify(metadata));
1567
1620
  for await (const projects of this._getPaginated("/sessions", params)) yield* projects;
@@ -2243,7 +2296,10 @@ var Client = class Client {
2243
2296
  }
2244
2297
  async *listFeedback({ runIds, feedbackKeys, feedbackSourceTypes } = {}) {
2245
2298
  const queryParams = new URLSearchParams();
2246
- if (runIds) queryParams.append("run", runIds.join(","));
2299
+ if (runIds) for (const runId of runIds) {
2300
+ require__uuid.assertUuid(runId);
2301
+ queryParams.append("run", runId);
2302
+ }
2247
2303
  if (feedbackKeys) for (const key of feedbackKeys) queryParams.append("key", key);
2248
2304
  if (feedbackSourceTypes) for (const type of feedbackSourceTypes) queryParams.append("source", type);
2249
2305
  for await (const feedbacks of this._getPaginated("/feedback", queryParams)) yield* feedbacks;