@nocobase/plugin-ai 2.0.0-alpha.68 → 2.0.0-alpha.69

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 (410) hide show
  1. package/build.config.ts +5 -1
  2. package/dist/externalVersion.js +11 -11
  3. package/dist/node_modules/@langchain/anthropic/package.json +1 -1
  4. package/dist/node_modules/@langchain/core/node_modules/langsmith/README.md +475 -0
  5. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.cjs +1 -0
  6. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.cts +1 -0
  7. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.d.ts +1 -0
  8. package/dist/node_modules/@langchain/core/node_modules/langsmith/anonymizer.js +1 -0
  9. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.cjs +1 -0
  10. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.cts +1 -0
  11. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.d.ts +1 -0
  12. package/dist/node_modules/@langchain/core/node_modules/langsmith/client.js +1 -0
  13. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.cjs +101 -0
  14. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.d.ts +16 -0
  15. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/anonymizer/index.js +95 -0
  16. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.cjs +4044 -0
  17. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.d.ts +1105 -0
  18. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/client.js +4005 -0
  19. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.cjs +12 -0
  20. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.d.ts +1 -0
  21. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/env.js +8 -0
  22. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.cjs +729 -0
  23. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.d.ts +5 -0
  24. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_random_name.js +726 -0
  25. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.cjs +874 -0
  26. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.d.ts +236 -0
  27. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/_runner.js +869 -0
  28. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.cjs +223 -0
  29. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.d.ts +62 -0
  30. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluate_comparative.js +217 -0
  31. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.cjs +116 -0
  32. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.d.ts +105 -0
  33. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/evaluator.js +111 -0
  34. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.cjs +9 -0
  35. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.d.ts +4 -0
  36. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/index.js +3 -0
  37. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.cjs +66 -0
  38. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.d.ts +30 -0
  39. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/evaluation/string_evaluator.js +62 -0
  40. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/constants.cjs +60 -0
  41. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/constants.d.ts +49 -0
  42. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/constants.js +57 -0
  43. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/exporter.cjs +222 -0
  44. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/exporter.d.ts +60 -0
  45. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/exporter.js +185 -0
  46. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/processor.cjs +90 -0
  47. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/processor.d.ts +13 -0
  48. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/processor.js +85 -0
  49. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/setup.cjs +95 -0
  50. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/setup.d.ts +66 -0
  51. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/setup.js +91 -0
  52. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/translator.cjs +447 -0
  53. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/translator.d.ts +22 -0
  54. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/translator.js +410 -0
  55. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/types.cjs +5 -0
  56. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/types.d.ts +29 -0
  57. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/types.js +4 -0
  58. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/utils.cjs +23 -0
  59. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/utils.d.ts +12 -0
  60. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/otel/utils.js +19 -0
  61. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/index.cjs +627 -0
  62. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/index.d.ts +257 -0
  63. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/index.js +623 -0
  64. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/middleware.cjs +286 -0
  65. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/middleware.d.ts +28 -0
  66. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/middleware.js +283 -0
  67. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/utils.cjs +173 -0
  68. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/utils.d.ts +4 -0
  69. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/experimental/vercel/utils.js +168 -0
  70. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.cjs +18 -0
  71. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.d.ts +8 -0
  72. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/index.js +8 -0
  73. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.cjs +111 -0
  74. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.d.ts +559 -0
  75. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/index.js +388 -0
  76. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.cjs +37 -0
  77. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.d.ts +5 -0
  78. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/jest/reporter.js +35 -0
  79. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.cjs +143 -0
  80. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.d.ts +31 -0
  81. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/langchain.js +138 -0
  82. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.cjs +1024 -0
  83. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.d.ts +147 -0
  84. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/run_trees.js +1017 -0
  85. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.cjs +2 -0
  86. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.d.ts +560 -0
  87. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/schemas.js +1 -0
  88. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.cjs +6 -0
  89. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.d.ts +3 -0
  90. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/constants.js +3 -0
  91. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.cjs +53 -0
  92. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.d.ts +9 -0
  93. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/fetch.js +46 -0
  94. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/otel.cjs +155 -0
  95. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/otel.d.ts +63 -0
  96. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/otel.js +147 -0
  97. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.cjs +50 -0
  98. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.d.ts +24 -0
  99. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/traceable.js +44 -0
  100. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.cjs +3 -0
  101. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.d.ts +46 -0
  102. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/singletons/types.js +1 -0
  103. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.cjs +816 -0
  104. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.d.ts +84 -0
  105. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/traceable.js +808 -0
  106. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.cjs +72 -0
  107. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.d.ts +14 -0
  108. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_git.js +67 -0
  109. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.cjs +66 -0
  110. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.d.ts +21 -0
  111. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/_uuid.js +60 -0
  112. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.cjs +47 -0
  113. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.d.ts +7 -0
  114. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/asserts.js +37 -0
  115. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.cjs +160 -0
  116. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.d.ts +54 -0
  117. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/async_caller.js +153 -0
  118. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.cjs +23 -0
  119. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.d.ts +1 -0
  120. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/atee.js +20 -0
  121. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/context_vars.cjs +31 -0
  122. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/context_vars.d.ts +8 -0
  123. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/context_vars.js +27 -0
  124. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.cjs +220 -0
  125. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.d.ts +51 -0
  126. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/env.js +203 -0
  127. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.cjs +179 -0
  128. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.d.ts +63 -0
  129. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/error.js +169 -0
  130. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.cjs +283 -0
  131. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.d.ts +1 -0
  132. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/fast-safe-stringify/index.js +280 -0
  133. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/is-network-error/index.cjs +42 -0
  134. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/is-network-error/index.d.ts +1 -0
  135. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/is-network-error/index.js +39 -0
  136. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.cjs +9 -0
  137. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.d.ts +3 -0
  138. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/constants.js +6 -0
  139. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.cjs +40 -0
  140. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.d.ts +35 -0
  141. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/globals.js +35 -0
  142. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.cjs +691 -0
  143. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.d.ts +107 -0
  144. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/index.js +643 -0
  145. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.cjs +103 -0
  146. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.d.ts +27 -0
  147. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/matchers.js +98 -0
  148. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.cjs +295 -0
  149. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.d.ts +5 -0
  150. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/reporter.js +256 -0
  151. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.cjs +2 -0
  152. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.d.ts +39 -0
  153. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/types.js +1 -0
  154. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.cjs +92 -0
  155. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.d.ts +1 -0
  156. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/chain.js +89 -0
  157. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.cjs +96 -0
  158. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.d.ts +12 -0
  159. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/jestlike/vendor/evaluatedBy.js +92 -0
  160. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.cjs +29 -0
  161. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.d.ts +10 -0
  162. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/assignValue.js +24 -0
  163. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.cjs +25 -0
  164. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.d.ts +11 -0
  165. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseAssignValue.js +23 -0
  166. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.cjs +50 -0
  167. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.d.ts +12 -0
  168. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/baseSet.js +45 -0
  169. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.cjs +22 -0
  170. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.d.ts +10 -0
  171. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/castPath.js +17 -0
  172. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.cjs +36 -0
  173. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.d.ts +32 -0
  174. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/eq.js +34 -0
  175. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.cjs +18 -0
  176. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.d.ts +9 -0
  177. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/getTag.js +16 -0
  178. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.cjs +25 -0
  179. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.d.ts +10 -0
  180. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isIndex.js +23 -0
  181. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.cjs +34 -0
  182. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.d.ts +10 -0
  183. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isKey.js +29 -0
  184. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.cjs +31 -0
  185. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.d.ts +25 -0
  186. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isObject.js +29 -0
  187. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.cjs +28 -0
  188. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.d.ts +17 -0
  189. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/isSymbol.js +23 -0
  190. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.cjs +65 -0
  191. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.d.ts +50 -0
  192. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/memoizeCapped.js +63 -0
  193. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.cjs +41 -0
  194. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.d.ts +32 -0
  195. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/set.js +36 -0
  196. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.cjs +49 -0
  197. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.d.ts +12 -0
  198. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/stringToPath.js +44 -0
  199. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.cjs +24 -0
  200. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.d.ts +9 -0
  201. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/lodash/toKey.js +19 -0
  202. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.cjs +21 -0
  203. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.d.ts +11 -0
  204. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/messages.js +17 -0
  205. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/p-retry/index.cjs +200 -0
  206. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/p-retry/index.d.ts +5 -0
  207. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/p-retry/index.js +191 -0
  208. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/project.cjs +10 -0
  209. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/project.d.ts +1 -0
  210. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/project.js +6 -0
  211. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.cjs +37 -0
  212. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.d.ts +2 -0
  213. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts.js +33 -0
  214. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache.cjs +292 -0
  215. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache.d.ts +142 -0
  216. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache.js +288 -0
  217. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.browser.cjs +24 -0
  218. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.browser.d.ts +16 -0
  219. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.browser.js +20 -0
  220. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.cjs +86 -0
  221. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.d.ts +16 -0
  222. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/prompts_cache_fs.js +49 -0
  223. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.cjs +14 -0
  224. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.d.ts +1 -0
  225. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/shuffle.js +11 -0
  226. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/usage.cjs +29 -0
  227. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/usage.d.ts +1 -0
  228. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/usage.js +25 -0
  229. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/vercel.cjs +225 -0
  230. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/vercel.d.ts +10 -0
  231. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/vercel.js +220 -0
  232. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.cjs +10 -0
  233. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.d.ts +1 -0
  234. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/utils/warn.js +7 -0
  235. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/uuid.cjs +13 -0
  236. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/uuid.d.ts +5 -0
  237. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/uuid.js +8 -0
  238. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.cjs +46 -0
  239. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.d.mts +392 -0
  240. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.d.ts +392 -0
  241. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.js +323 -0
  242. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/index.mjs +324 -0
  243. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.cjs +20 -0
  244. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.d.mts +11 -0
  245. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.d.ts +8 -0
  246. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.js +18 -0
  247. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/reporter.mjs +31 -0
  248. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/esm.d.mts +8 -0
  249. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/esm.mjs +38 -0
  250. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/reporter.cjs +38 -0
  251. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/reporter.d.ts +31 -0
  252. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/reporter.js +33 -0
  253. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/wrapper.cjs +63 -0
  254. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/wrapper.d.ts +167 -0
  255. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/vitest/utils/wrapper.js +59 -0
  256. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/anthropic.cjs +299 -0
  257. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/anthropic.d.ts +67 -0
  258. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/anthropic.js +295 -0
  259. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.cjs +49 -0
  260. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.d.ts +21 -0
  261. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/generic.js +44 -0
  262. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.cjs +20 -0
  263. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.d.ts +2 -0
  264. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/index.js +2 -0
  265. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.cjs +455 -0
  266. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.d.ts +80 -0
  267. package/dist/node_modules/@langchain/core/node_modules/langsmith/dist/wrappers/openai.js +451 -0
  268. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.cjs +1 -0
  269. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.cts +1 -0
  270. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.d.ts +1 -0
  271. package/dist/node_modules/@langchain/core/node_modules/langsmith/evaluation.js +1 -0
  272. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/exporter.cjs +1 -0
  273. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/exporter.d.cts +1 -0
  274. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/exporter.d.ts +1 -0
  275. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/exporter.js +1 -0
  276. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/processor.cjs +1 -0
  277. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/processor.d.cts +1 -0
  278. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/processor.d.ts +1 -0
  279. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/processor.js +1 -0
  280. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/setup.cjs +1 -0
  281. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/setup.d.cts +1 -0
  282. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/setup.d.ts +1 -0
  283. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/otel/setup.js +1 -0
  284. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/vercel.cjs +1 -0
  285. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/vercel.d.cts +1 -0
  286. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/vercel.d.ts +1 -0
  287. package/dist/node_modules/@langchain/core/node_modules/langsmith/experimental/vercel.js +1 -0
  288. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.cjs +1 -0
  289. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.cts +1 -0
  290. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.d.ts +1 -0
  291. package/dist/node_modules/@langchain/core/node_modules/langsmith/index.js +1 -0
  292. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.cjs +1 -0
  293. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.cts +1 -0
  294. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.d.ts +1 -0
  295. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest/reporter.js +1 -0
  296. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.cjs +1 -0
  297. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.cts +1 -0
  298. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.d.ts +1 -0
  299. package/dist/node_modules/@langchain/core/node_modules/langsmith/jest.js +1 -0
  300. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.cjs +1 -0
  301. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.cts +1 -0
  302. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.d.ts +1 -0
  303. package/dist/node_modules/@langchain/core/node_modules/langsmith/langchain.js +1 -0
  304. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/LICENSE +15 -0
  305. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/README.md +654 -0
  306. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/bin/semver.js +188 -0
  307. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/comparator.js +141 -0
  308. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/index.js +5 -0
  309. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/range.js +554 -0
  310. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/classes/semver.js +302 -0
  311. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/clean.js +6 -0
  312. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/cmp.js +52 -0
  313. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/coerce.js +60 -0
  314. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-build.js +7 -0
  315. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare-loose.js +3 -0
  316. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/compare.js +5 -0
  317. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/diff.js +65 -0
  318. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/eq.js +3 -0
  319. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gt.js +3 -0
  320. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/gte.js +3 -0
  321. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/inc.js +19 -0
  322. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lt.js +3 -0
  323. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/lte.js +3 -0
  324. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/major.js +3 -0
  325. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/minor.js +3 -0
  326. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/neq.js +3 -0
  327. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/parse.js +16 -0
  328. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/patch.js +3 -0
  329. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/prerelease.js +6 -0
  330. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rcompare.js +3 -0
  331. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/rsort.js +3 -0
  332. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/satisfies.js +10 -0
  333. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/sort.js +3 -0
  334. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/functions/valid.js +6 -0
  335. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/index.js +89 -0
  336. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/constants.js +35 -0
  337. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/debug.js +9 -0
  338. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/identifiers.js +23 -0
  339. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/lrucache.js +40 -0
  340. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/parse-options.js +15 -0
  341. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/internal/re.js +217 -0
  342. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/package.json +77 -0
  343. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/preload.js +2 -0
  344. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/range.bnf +16 -0
  345. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/gtr.js +4 -0
  346. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/intersects.js +7 -0
  347. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/ltr.js +4 -0
  348. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/max-satisfying.js +25 -0
  349. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-satisfying.js +24 -0
  350. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/min-version.js +61 -0
  351. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/outside.js +80 -0
  352. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/simplify.js +47 -0
  353. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/subset.js +247 -0
  354. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/to-comparators.js +8 -0
  355. package/dist/node_modules/@langchain/core/node_modules/langsmith/node_modules/semver/ranges/valid.js +11 -0
  356. package/dist/node_modules/@langchain/core/node_modules/langsmith/package.json +408 -0
  357. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.cjs +1 -0
  358. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.cts +1 -0
  359. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.d.ts +1 -0
  360. package/dist/node_modules/@langchain/core/node_modules/langsmith/run_trees.js +1 -0
  361. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.cjs +1 -0
  362. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.cts +1 -0
  363. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.d.ts +1 -0
  364. package/dist/node_modules/@langchain/core/node_modules/langsmith/schemas.js +1 -0
  365. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.cjs +1 -0
  366. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.cts +1 -0
  367. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.d.ts +1 -0
  368. package/dist/node_modules/@langchain/core/node_modules/langsmith/singletons/traceable.js +1 -0
  369. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.cjs +1 -0
  370. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.cts +1 -0
  371. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.d.ts +1 -0
  372. package/dist/node_modules/@langchain/core/node_modules/langsmith/traceable.js +1 -0
  373. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.cjs +1 -0
  374. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.cts +1 -0
  375. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.d.ts +1 -0
  376. package/dist/node_modules/@langchain/core/node_modules/langsmith/utils/jestlike.js +1 -0
  377. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.cjs +1 -0
  378. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.cts +1 -0
  379. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.d.ts +1 -0
  380. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest/reporter.js +1 -0
  381. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.cjs +1 -0
  382. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.cts +1 -0
  383. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.d.ts +1 -0
  384. package/dist/node_modules/@langchain/core/node_modules/langsmith/vitest.js +1 -0
  385. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/anthropic.cjs +1 -0
  386. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/anthropic.d.cts +1 -0
  387. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/anthropic.d.ts +1 -0
  388. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/anthropic.js +1 -0
  389. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.cjs +1 -0
  390. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.cts +1 -0
  391. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.d.ts +1 -0
  392. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers/openai.js +1 -0
  393. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.cjs +1 -0
  394. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.cts +1 -0
  395. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.d.ts +1 -0
  396. package/dist/node_modules/@langchain/core/node_modules/langsmith/wrappers.js +1 -0
  397. package/dist/node_modules/@langchain/core/package.json +1 -1
  398. package/dist/node_modules/@langchain/deepseek/package.json +1 -1
  399. package/dist/node_modules/@langchain/google-genai/package.json +1 -1
  400. package/dist/node_modules/@langchain/ollama/package.json +1 -1
  401. package/dist/node_modules/@langchain/openai/package.json +1 -1
  402. package/dist/node_modules/langchain/package.json +1 -1
  403. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  404. package/dist/node_modules/zod/package.json +1 -1
  405. package/dist/server/ai-employees/ai-employee.js +1 -1
  406. package/dist/server/llm-providers/provider.js +5 -5
  407. package/dist/server/tools/data-modeling.js +3 -2
  408. package/dist/server/tools/suggestions.js +1 -1
  409. package/dist/server/workflow/nodes/llm/index.js +1 -1
  410. package/package.json +2 -2
package/build.config.ts CHANGED
@@ -131,7 +131,7 @@ export default defineConfig({
131
131
  'decamelize',
132
132
  'zod',
133
133
  // 'zod-to-json-schema',
134
- // 'langsmith',
134
+ 'langsmith',
135
135
  'p-retry',
136
136
  'p-queue',
137
137
  'p-timeout',
@@ -142,6 +142,10 @@ export default defineConfig({
142
142
  ];
143
143
  for (const dep of deps) {
144
144
  const depPath = path.resolve(process.cwd(), 'node_modules', dep);
145
+ if (!fs.existsSync(depPath)) {
146
+ console.warn(`depPath not existed skip: ${depPath}`);
147
+ continue;
148
+ }
145
149
  await fs.promises.cp(depPath, path.resolve(__dirname, 'dist/node_modules/@langchain/core/node_modules', dep), {
146
150
  recursive: true,
147
151
  force: true,
@@ -8,28 +8,28 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/plugin-acl": "2.0.0-alpha.68",
12
- "@nocobase/plugin-workflow": "2.0.0-alpha.68",
13
- "@nocobase/client": "2.0.0-alpha.68",
14
- "@nocobase/utils": "2.0.0-alpha.68",
15
- "@nocobase/database": "2.0.0-alpha.68",
16
- "@nocobase/server": "2.0.0-alpha.68",
11
+ "@nocobase/plugin-acl": "2.0.0-alpha.69",
12
+ "@nocobase/plugin-workflow": "2.0.0-alpha.69",
13
+ "@nocobase/client": "2.0.0-alpha.69",
14
+ "@nocobase/utils": "2.0.0-alpha.69",
15
+ "@nocobase/database": "2.0.0-alpha.69",
16
+ "@nocobase/server": "2.0.0-alpha.69",
17
17
  "axios": "1.7.7",
18
- "@nocobase/actions": "2.0.0-alpha.68",
18
+ "@nocobase/actions": "2.0.0-alpha.69",
19
19
  "react": "18.2.0",
20
20
  "antd": "5.24.2",
21
21
  "@formily/core": "2.3.7",
22
22
  "@formily/react": "2.3.7",
23
- "@nocobase/flow-engine": "2.0.0-alpha.68",
23
+ "@nocobase/flow-engine": "2.0.0-alpha.69",
24
24
  "@ant-design/icons": "5.6.1",
25
25
  "@formily/antd-v5": "1.2.3",
26
26
  "@formily/shared": "2.3.7",
27
27
  "lodash": "4.17.21",
28
- "@nocobase/plugin-file-manager": "2.0.0-alpha.68",
29
- "@nocobase/resourcer": "2.0.0-alpha.68",
28
+ "@nocobase/plugin-file-manager": "2.0.0-alpha.69",
29
+ "@nocobase/resourcer": "2.0.0-alpha.69",
30
30
  "@emotion/css": "11.13.0",
31
31
  "react-i18next": "11.18.6",
32
- "@nocobase/plugin-data-source-manager": "2.0.0-alpha.68",
32
+ "@nocobase/plugin-data-source-manager": "2.0.0-alpha.69",
33
33
  "ahooks": "3.7.8",
34
34
  "react-router-dom": "6.30.1",
35
35
  "@formily/reactive": "2.3.7"
@@ -1 +1 @@
1
- {"name":"@langchain/anthropic","version":"1.3.7","description":"Anthropic integrations for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/","dependencies":{"@anthropic-ai/sdk":"^0.71.0","zod":"^3.25.76 || ^4"},"peerDependencies":{"@langchain/core":"1.1.12"},"devDependencies":{"@anthropic-ai/vertex-sdk":"^0.11.5","@cfworker/json-schema":"^4.1.1","@tsconfig/recommended":"^1.0.10","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.2.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","rimraf":"^5.0.1","typescript":"~5.8.3","uuid":"^13.0.0","vitest":"^3.2.4","@langchain/core":"1.1.12","@langchain/eslint":"0.1.1","@langchain/standard-tests":"0.0.15","@langchain/tsconfig":"0.0.1"},"publishConfig":{"access":"public"},"keywords":["llm","ai","gpt3","chain","prompt","prompt engineering","chatgpt","machine learning","ml","anthropic","embeddings","vectorstores"],"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"scripts":{"build":"turbo build:compile --filter @langchain/anthropic --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest","test:int":"vitest run --mode int","test:standard:unit":"vitest run --mode standard-unit","test:standard:int":"vitest run --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-01-27T02:58:11.652Z"}
1
+ {"name":"@langchain/anthropic","version":"1.3.7","description":"Anthropic integrations for LangChain.js","author":"LangChain","license":"MIT","type":"module","engines":{"node":">=20"},"repository":{"type":"git","url":"git@github.com:langchain-ai/langchainjs.git"},"homepage":"https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic/","dependencies":{"@anthropic-ai/sdk":"^0.71.0","zod":"^3.25.76 || ^4"},"peerDependencies":{"@langchain/core":"1.1.12"},"devDependencies":{"@anthropic-ai/vertex-sdk":"^0.11.5","@cfworker/json-schema":"^4.1.1","@tsconfig/recommended":"^1.0.10","@vitest/coverage-v8":"^3.2.4","dotenv":"^17.2.1","dpdm":"^3.14.0","eslint":"^9.34.0","prettier":"^3.5.0","rimraf":"^5.0.1","typescript":"~5.8.3","uuid":"^13.0.0","vitest":"^3.2.4","@langchain/core":"1.1.12","@langchain/eslint":"0.1.1","@langchain/standard-tests":"0.0.15","@langchain/tsconfig":"0.0.1"},"publishConfig":{"access":"public"},"keywords":["llm","ai","gpt3","chain","prompt","prompt engineering","chatgpt","machine learning","ml","anthropic","embeddings","vectorstores"],"main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.cts","exports":{".":{"input":"./src/index.ts","require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"},"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"./package.json":"./package.json"},"files":["dist/","CHANGELOG.md","README.md","LICENSE"],"scripts":{"build":"turbo build:compile --filter @langchain/anthropic --output-logs new-only","build:compile":"tsdown","lint:eslint":"eslint --cache src/","lint:dpdm":"dpdm --skip-dynamic-imports circular --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts","lint":"pnpm lint:eslint && pnpm lint:dpdm","lint:fix":"pnpm lint:eslint --fix && pnpm lint:dpdm","clean":"rm -rf .turbo dist/","test":"vitest run","test:watch":"vitest","test:int":"vitest run --mode int","test:standard:unit":"vitest run --mode standard-unit","test:standard:int":"vitest run --mode standard-int","test:standard":"pnpm test:standard:unit && pnpm test:standard:int","format":"prettier --write \"src\"","format:check":"prettier --check \"src\"","typegen":"pnpm run typegen:profiles","typegen:profiles":"pnpm --filter @langchain/model-profiles make --config profiles.toml"},"_lastModified":"2026-02-05T07:22:59.521Z"}
@@ -0,0 +1,475 @@
1
+ # LangSmith Client SDK
2
+
3
+ ![NPM Version](https://img.shields.io/npm/v/langsmith?logo=npm)
4
+ [![JS Downloads](https://img.shields.io/npm/dm/langsmith)](https://www.npmjs.com/package/langsmith)
5
+
6
+ This package contains the TypeScript client for interacting with the [LangSmith platform](https://smith.langchain.com/).
7
+
8
+ To install:
9
+
10
+ ```bash
11
+ yarn add langsmith
12
+ ```
13
+
14
+ LangSmith helps you and your team develop and evaluate language models and intelligent agents. It is compatible with any LLM Application and provides seamless integration with [LangChain](https://github.com/hwchase17/langchainjs), a widely recognized open-source framework that simplifies the process for developers to create powerful language model applications.
15
+
16
+ > **Note**: You can enjoy the benefits of LangSmith without using the LangChain open-source packages! To get started with your own proprietary framework, set up your account and then skip to [Logging Traces Outside LangChain](#logging-traces-outside-langchain).
17
+
18
+ > **Cookbook:** For tutorials on how to get more value out of LangSmith, check out the [Langsmith Cookbook](https://github.com/langchain-ai/langsmith-cookbook/tree/main) repo.
19
+
20
+ A typical workflow looks like:
21
+
22
+ 1. Set up an account with LangSmith.
23
+ 2. Log traces.
24
+ 3. Debug, Create Datasets, and Evaluate Runs.
25
+
26
+ We'll walk through these steps in more detail below.
27
+
28
+ ## 1. Connect to LangSmith
29
+
30
+ Sign up for [LangSmith](https://smith.langchain.com/) using your GitHub, Discord accounts, or an email address and password. If you sign up with an email, make sure to verify your email address before logging in.
31
+
32
+ Then, create a unique API key on the [Settings Page](https://smith.langchain.com/settings).
33
+
34
+ > [!NOTE]
35
+ > Save the API Key in a secure location. It will not be shown again.
36
+
37
+ ## 2. Log Traces
38
+
39
+ You can log traces natively in your LangChain application or using a LangSmith RunTree.
40
+
41
+ ### Logging Traces with LangChain
42
+
43
+ LangSmith seamlessly integrates with the JavaScript LangChain library to record traces from your LLM applications.
44
+
45
+ ```bash
46
+ yarn add langchain
47
+ ```
48
+
49
+ 1. **Copy the environment variables from the Settings Page and add them to your application.**
50
+
51
+ Tracing can be activated by setting the following environment variables or by manually specifying the LangChainTracer.
52
+
53
+ ```typescript
54
+ process.env.LANGSMITH_TRACING = "true";
55
+ process.env.LANGSMITH_ENDPOINT = "https://api.smith.langchain.com";
56
+ // process.env.LANGSMITH_ENDPOINT = "https://eu.api.smith.langchain.com"; // If signed up in the EU region
57
+ process.env.LANGSMITH_API_KEY = "<YOUR-LANGSMITH-API-KEY>";
58
+ // process.env.LANGSMITH_PROJECT = "My Project Name"; // Optional: "default" is used if not set
59
+ // process.env.LANGSMITH_WORKSPACE_ID = "<YOUR-WORKSPACE-ID>"; // Required for org-scoped API keys
60
+ ```
61
+
62
+ > **Tip:** Projects are groups of traces. All runs are logged to a project. If not specified, the project is set to `default`.
63
+
64
+ 2. **Run an Agent, Chain, or Language Model in LangChain**
65
+
66
+ If the environment variables are correctly set, your application will automatically connect to the LangSmith platform.
67
+
68
+ ```typescript
69
+ import { ChatOpenAI } from "langchain/chat_models/openai";
70
+
71
+ const chat = new ChatOpenAI({ temperature: 0 });
72
+ const response = await chat.predict(
73
+ "Translate this sentence from English to French. I love programming."
74
+ );
75
+ console.log(response);
76
+ ```
77
+
78
+ ### Logging Traces Outside LangChain
79
+
80
+ You can still use the LangSmith development platform without depending on any
81
+ LangChain code. You can connect either by setting the appropriate environment variables,
82
+ or by directly specifying the connection information in the RunTree.
83
+
84
+ 1. **Copy the environment variables from the Settings Page and add them to your application.**
85
+
86
+ ```shell
87
+ export LANGSMITH_TRACING="true";
88
+ export LANGSMITH_API_KEY=<YOUR-LANGSMITH-API-KEY>
89
+ # export LANGSMITH_PROJECT="My Project Name" # Optional: "default" is used if not set
90
+ # export LANGSMITH_ENDPOINT=https://api.smith.langchain.com # or your own server
91
+ ```
92
+
93
+ ## Integrations
94
+
95
+ Langsmith's `traceable` wrapper function makes it easy to trace any function or LLM call in your own favorite framework. Below are some examples.
96
+
97
+ ### OpenAI SDK
98
+
99
+ <!-- markdown-link-check-disable -->
100
+
101
+ The easiest way to trace calls from the [OpenAI SDK](https://platform.openai.com/docs/api-reference) with LangSmith
102
+ is using the `wrapOpenAI` wrapper function available in LangSmith 0.1.3 and up.
103
+
104
+ In order to use, you first need to set your LangSmith API key:
105
+
106
+ ```shell
107
+ export LANGSMITH_TRACING="true";
108
+ export LANGSMITH_API_KEY=<your-api-key>
109
+ ```
110
+
111
+ Next, you will need to install the LangSmith SDK and the OpenAI SDK:
112
+
113
+ ```shell
114
+ npm install langsmith openai
115
+ ```
116
+
117
+ After that, initialize your OpenAI client and wrap the client with `wrapOpenAI` method to enable tracing for the completions and chat completions methods:
118
+
119
+ ```ts
120
+ import { OpenAI } from "openai";
121
+ import { wrapOpenAI } from "langsmith/wrappers";
122
+
123
+ const openai = wrapOpenAI(new OpenAI());
124
+
125
+ await openai.chat.completions.create({
126
+ model: "gpt-3.5-turbo",
127
+ messages: [{ content: "Hi there!", role: "user" }],
128
+ });
129
+ ```
130
+
131
+ Alternatively, you can use the `traceable` function to wrap the client methods you want to use:
132
+
133
+ ```ts
134
+ import { traceable } from "langsmith/traceable";
135
+
136
+ const openai = new OpenAI();
137
+
138
+ const createCompletion = traceable(
139
+ openai.chat.completions.create.bind(openai.chat.completions),
140
+ { name: "OpenAI Chat Completion", run_type: "llm" }
141
+ );
142
+
143
+ await createCompletion({
144
+ model: "gpt-3.5-turbo",
145
+ messages: [{ content: "Hi there!", role: "user" }],
146
+ });
147
+ ```
148
+
149
+ Note the use of `.bind` to preserve the function's context. The `run_type` field in the
150
+ extra config object marks the function as an LLM call, and enables token usage tracking
151
+ for OpenAI.
152
+
153
+ Oftentimes, you use the OpenAI client inside of other functions or as part of a longer
154
+ sequence. You can automatically get nested traces by using this wrapped method
155
+ within other functions wrapped with `traceable`.
156
+
157
+ ```ts
158
+ const nestedTrace = traceable(async (text: string) => {
159
+ const completion = await openai.chat.completions.create({
160
+ model: "gpt-3.5-turbo",
161
+ messages: [{ content: text, role: "user" }],
162
+ });
163
+ return completion;
164
+ });
165
+
166
+ await nestedTrace("Why is the sky blue?");
167
+ ```
168
+
169
+ ```
170
+ {
171
+ "id": "chatcmpl-8sPToJQLLVepJvyeTfzZMOMVIKjMo",
172
+ "object": "chat.completion",
173
+ "created": 1707978348,
174
+ "model": "gpt-3.5-turbo-0613",
175
+ "choices": [
176
+ {
177
+ "index": 0,
178
+ "message": {
179
+ "role": "assistant",
180
+ "content": "The sky appears blue because of a phenomenon known as Rayleigh scattering. The Earth's atmosphere is composed of tiny molecules, such as nitrogen and oxygen, which are much smaller than the wavelength of visible light. When sunlight interacts with these molecules, it gets scattered in all directions. However, shorter wavelengths of light (blue and violet) are scattered more compared to longer wavelengths (red, orange, and yellow). \n\nAs a result, when sunlight passes through the Earth's atmosphere, the blue and violet wavelengths are scattered in all directions, making the sky appear blue. This scattering of shorter wavelengths is also responsible for the vibrant colors observed during sunrise and sunset, when the sunlight has to pass through a thicker portion of the atmosphere, causing the longer wavelengths to dominate the scattered light."
181
+ },
182
+ "logprobs": null,
183
+ "finish_reason": "stop"
184
+ }
185
+ ],
186
+ "usage": {
187
+ "prompt_tokens": 13,
188
+ "completion_tokens": 154,
189
+ "total_tokens": 167
190
+ },
191
+ "system_fingerprint": null
192
+ }
193
+ ```
194
+
195
+ :::tip
196
+ [Click here](https://smith.langchain.com/public/4af46ef6-b065-46dc-9cf0-70f1274edb01/r) to see an example LangSmith trace of the above.
197
+ :::
198
+
199
+ ## Next.js
200
+
201
+ You can use the `traceable` wrapper function in Next.js apps to wrap arbitrary functions much like in the example above.
202
+
203
+ One neat trick you can use for Next.js and other similar server frameworks is to wrap the entire exported handler for a route
204
+ to group traces for the any sub-runs. Here's an example:
205
+
206
+ ```ts
207
+ import { NextRequest, NextResponse } from "next/server";
208
+
209
+ import { OpenAI } from "openai";
210
+ import { traceable } from "langsmith/traceable";
211
+ import { wrapOpenAI } from "langsmith/wrappers";
212
+
213
+ export const runtime = "edge";
214
+
215
+ const handler = traceable(
216
+ async function () {
217
+ const openai = wrapOpenAI(new OpenAI());
218
+
219
+ const completion = await openai.chat.completions.create({
220
+ model: "gpt-3.5-turbo",
221
+ messages: [{ content: "Why is the sky blue?", role: "user" }],
222
+ });
223
+
224
+ const response1 = completion.choices[0].message.content;
225
+
226
+ const completion2 = await openai.chat.completions.create({
227
+ model: "gpt-3.5-turbo",
228
+ messages: [
229
+ { content: "Why is the sky blue?", role: "user" },
230
+ { content: response1, role: "assistant" },
231
+ { content: "Cool thank you!", role: "user" },
232
+ ],
233
+ });
234
+
235
+ const response2 = completion2.choices[0].message.content;
236
+
237
+ return {
238
+ text: response2,
239
+ };
240
+ },
241
+ {
242
+ name: "Simple Next.js handler",
243
+ }
244
+ );
245
+
246
+ export async function POST(req: NextRequest) {
247
+ const result = await handler();
248
+ return NextResponse.json(result);
249
+ }
250
+ ```
251
+
252
+ The two OpenAI calls within the handler will be traced with appropriate inputs, outputs,
253
+ and token usage information.
254
+
255
+ :::tip
256
+ [Click here](https://smith.langchain.com/public/faaf26ad-8c59-4622-bcfe-b7d896733ca6/r) to see an example LangSmith trace of the above.
257
+ :::
258
+
259
+ ## Vercel AI SDK
260
+
261
+ The [Vercel AI SDK](https://sdk.vercel.ai/docs) contains integrations with a variety of model providers.
262
+ Here's an example of how you can trace outputs in a Next.js handler:
263
+
264
+ ```ts
265
+ import { traceable } from "langsmith/traceable";
266
+ import { OpenAIStream, StreamingTextResponse } from "ai";
267
+
268
+ // Note: There are no types for the Mistral API client yet.
269
+ import MistralClient from "@mistralai/mistralai";
270
+
271
+ const client = new MistralClient(process.env.MISTRAL_API_KEY || "");
272
+
273
+ export async function POST(req: Request) {
274
+ // Extract the `messages` from the body of the request
275
+ const { messages } = await req.json();
276
+
277
+ const mistralChatStream = traceable(client.chatStream.bind(client), {
278
+ name: "Mistral Stream",
279
+ run_type: "llm",
280
+ });
281
+
282
+ const response = await mistralChatStream({
283
+ model: "mistral-tiny",
284
+ maxTokens: 1000,
285
+ messages,
286
+ });
287
+
288
+ // Convert the response into a friendly text-stream. The Mistral client responses are
289
+ // compatible with the Vercel AI SDK OpenAIStream adapter.
290
+ const stream = OpenAIStream(response as any);
291
+
292
+ // Respond with the stream
293
+ return new StreamingTextResponse(stream);
294
+ }
295
+ ```
296
+
297
+ See the [AI SDK docs](https://sdk.vercel.ai/docs) for more examples.
298
+
299
+ ## Arbitrary SDKs
300
+
301
+ You can use the generic `wrapSDK` method to add tracing for arbitrary SDKs.
302
+
303
+ Do note that this will trace ALL methods in the SDK, not just chat completion endpoints.
304
+ If the SDK you are wrapping has other methods, we recommend using it for only LLM calls.
305
+
306
+ Here's an example using the Anthropic SDK:
307
+
308
+ ```ts
309
+ import { wrapSDK } from "langsmith/wrappers";
310
+ import { Anthropic } from "@anthropic-ai/sdk";
311
+
312
+ const originalSDK = new Anthropic();
313
+ const sdkWithTracing = wrapSDK(originalSDK);
314
+
315
+ const response = await sdkWithTracing.messages.create({
316
+ messages: [
317
+ {
318
+ role: "user",
319
+ content: `What is 1 + 1? Respond only with "2" and nothing else.`,
320
+ },
321
+ ],
322
+ model: "claude-3-sonnet-20240229",
323
+ max_tokens: 1024,
324
+ });
325
+ ```
326
+
327
+ :::tip
328
+ [Click here](https://smith.langchain.com/public/0e7248af-bbed-47cf-be9f-5967fea1dec1/r) to see an example LangSmith trace of the above.
329
+ :::
330
+
331
+ #### Alternatives: **Log traces using a RunTree.**
332
+
333
+ A RunTree tracks your application. Each RunTree object is required to have a name and run_type. These and other important attributes are as follows:
334
+
335
+ - `name`: `string` - used to identify the component's purpose
336
+ - `run_type`: `string` - Currently one of "llm", "chain" or "tool"; more options will be added in the future
337
+ - `inputs`: `Record<string, any>` - the inputs to the component
338
+ - `outputs`: `Optional<Record<string, any>>` - the (optional) returned values from the component
339
+ - `error`: `Optional<string>` - Any error messages that may have arisen during the call
340
+
341
+ ```typescript
342
+ import { RunTree, RunTreeConfig } from "langsmith";
343
+
344
+ const parentRunConfig: RunTreeConfig = {
345
+ name: "My Chat Bot",
346
+ run_type: "chain",
347
+ inputs: {
348
+ text: "Summarize this morning's meetings.",
349
+ },
350
+ serialized: {}, // Serialized representation of this chain
351
+ // project_name: "Defaults to the LANGSMITH_PROJECT env var"
352
+ // apiUrl: "Defaults to the LANGSMITH_ENDPOINT env var"
353
+ // apiKey: "Defaults to the LANGSMITH_API_KEY env var"
354
+ };
355
+
356
+ const parentRun = new RunTree(parentRunConfig);
357
+
358
+ await parentRun.postRun();
359
+
360
+ const childLlmRun = await parentRun.createChild({
361
+ name: "My Proprietary LLM",
362
+ run_type: "llm",
363
+ inputs: {
364
+ prompts: [
365
+ "You are an AI Assistant. The time is XYZ." +
366
+ " Summarize this morning's meetings.",
367
+ ],
368
+ },
369
+ });
370
+
371
+ await childLlmRun.postRun();
372
+
373
+ await childLlmRun.end({
374
+ outputs: {
375
+ generations: [
376
+ "I should use the transcript_loader tool" +
377
+ " to fetch meeting_transcripts from XYZ",
378
+ ],
379
+ },
380
+ });
381
+
382
+ await childLlmRun.patchRun();
383
+
384
+ const childToolRun = await parentRun.createChild({
385
+ name: "transcript_loader",
386
+ run_type: "tool",
387
+ inputs: {
388
+ date: "XYZ",
389
+ content_type: "meeting_transcripts",
390
+ },
391
+ });
392
+ await childToolRun.postRun();
393
+
394
+ await childToolRun.end({
395
+ outputs: {
396
+ meetings: ["Meeting1 notes.."],
397
+ },
398
+ });
399
+
400
+ await childToolRun.patchRun();
401
+
402
+ const childChainRun = await parentRun.createChild({
403
+ name: "Unreliable Component",
404
+ run_type: "tool",
405
+ inputs: {
406
+ input: "Summarize these notes...",
407
+ },
408
+ });
409
+
410
+ await childChainRun.postRun();
411
+
412
+ try {
413
+ // .... the component does work
414
+ throw new Error("Something went wrong");
415
+ } catch (e) {
416
+ await childChainRun.end({
417
+ error: `I errored again ${e.message}`,
418
+ });
419
+ await childChainRun.patchRun();
420
+ throw e;
421
+ }
422
+
423
+ await childChainRun.patchRun();
424
+
425
+ await parentRun.end({
426
+ outputs: {
427
+ output: ["The meeting notes are as follows:..."],
428
+ },
429
+ });
430
+
431
+ // False directs to not exclude child runs
432
+ await parentRun.patchRun();
433
+ ```
434
+
435
+ ## Evaluation
436
+
437
+ #### Create a Dataset from Existing Runs
438
+
439
+ Once your runs are stored in LangSmith, you can convert them into a dataset.
440
+ For this example, we will do so using the Client, but you can also do this using
441
+ the web interface, as explained in the [LangSmith docs](https://docs.smith.langchain.com/docs/).
442
+
443
+ ```typescript
444
+ import { Client } from "langsmith/client";
445
+ const client = new Client({
446
+ // apiUrl: "https://api.langchain.com", // Defaults to the LANGSMITH_ENDPOINT env var
447
+ // apiKey: "my_api_key", // Defaults to the LANGSMITH_API_KEY env var
448
+ /* callerOptions: {
449
+ maxConcurrency?: Infinity; // Maximum number of concurrent requests to make
450
+ maxRetries?: 6; // Maximum number of retries to make
451
+ */
452
+ });
453
+ const datasetName = "Example Dataset";
454
+ // We will only use examples from the top level AgentExecutor run here,
455
+ // and exclude runs that errored.
456
+ const runs = await client.listRuns({
457
+ projectName: "my_project",
458
+ executionOrder: 1,
459
+ error: false,
460
+ });
461
+
462
+ const dataset = await client.createDataset(datasetName, {
463
+ description: "An example dataset",
464
+ });
465
+
466
+ for (const run of runs) {
467
+ await client.createExample(run.inputs, run.outputs ?? {}, {
468
+ datasetId: dataset.id,
469
+ });
470
+ }
471
+ ```
472
+
473
+ ## Additional Documentation
474
+
475
+ To learn more about the LangSmith platform, check out the [docs](https://docs.smith.langchain.com/docs/).
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/anonymizer/index.cjs');
@@ -0,0 +1 @@
1
+ export * from './dist/anonymizer/index.js'
@@ -0,0 +1 @@
1
+ export * from './dist/anonymizer/index.js'
@@ -0,0 +1 @@
1
+ export * from './dist/anonymizer/index.js'
@@ -0,0 +1 @@
1
+ module.exports = require('./dist/client.cjs');
@@ -0,0 +1 @@
1
+ export * from './dist/client.js'
@@ -0,0 +1 @@
1
+ export * from './dist/client.js'
@@ -0,0 +1 @@
1
+ export * from './dist/client.js'
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createAnonymizer = createAnonymizer;
7
+ const set_js_1 = __importDefault(require("../utils/lodash/set.cjs"));
8
+ function extractStringNodes(data, options) {
9
+ const parsedOptions = { ...options, maxDepth: options.maxDepth ?? 10 };
10
+ const queue = [
11
+ [data, 0, ""],
12
+ ];
13
+ const result = [];
14
+ while (queue.length > 0) {
15
+ const task = queue.shift();
16
+ if (task == null)
17
+ continue;
18
+ const [value, depth, path] = task;
19
+ if (typeof value === "object" && value != null) {
20
+ if (depth >= parsedOptions.maxDepth)
21
+ continue;
22
+ for (const [key, nestedValue] of Object.entries(value)) {
23
+ queue.push([nestedValue, depth + 1, path ? `${path}.${key}` : key]);
24
+ }
25
+ }
26
+ else if (Array.isArray(value)) {
27
+ if (depth >= parsedOptions.maxDepth)
28
+ continue;
29
+ for (let i = 0; i < value.length; i++) {
30
+ queue.push([value[i], depth + 1, `${path}[${i}]`]);
31
+ }
32
+ }
33
+ else if (typeof value === "string") {
34
+ result.push({ value, path });
35
+ }
36
+ }
37
+ return result;
38
+ }
39
+ function deepClone(data) {
40
+ return JSON.parse(JSON.stringify(data));
41
+ }
42
+ function createAnonymizer(replacer, options) {
43
+ return (data) => {
44
+ let mutateValue = deepClone(data);
45
+ const nodes = extractStringNodes(mutateValue, {
46
+ maxDepth: options?.maxDepth,
47
+ });
48
+ const processor = Array.isArray(replacer)
49
+ ? (() => {
50
+ const replacers = replacer.map(({ pattern, type, replace }) => {
51
+ if (type != null && type !== "pattern")
52
+ throw new Error("Invalid anonymizer type");
53
+ return [
54
+ typeof pattern === "string"
55
+ ? new RegExp(pattern, "g")
56
+ : pattern,
57
+ replace ?? "[redacted]",
58
+ ];
59
+ });
60
+ if (replacers.length === 0)
61
+ throw new Error("No replacers provided");
62
+ return {
63
+ maskNodes: (nodes) => {
64
+ return nodes.reduce((memo, item) => {
65
+ const newValue = replacers.reduce((value, [regex, replace]) => {
66
+ const result = value.replace(regex, replace);
67
+ // make sure we reset the state of regex
68
+ regex.lastIndex = 0;
69
+ return result;
70
+ }, item.value);
71
+ if (newValue !== item.value) {
72
+ memo.push({ value: newValue, path: item.path });
73
+ }
74
+ return memo;
75
+ }, []);
76
+ },
77
+ };
78
+ })()
79
+ : typeof replacer === "function"
80
+ ? {
81
+ maskNodes: (nodes) => nodes.reduce((memo, item) => {
82
+ const newValue = replacer(item.value, item.path);
83
+ if (newValue !== item.value) {
84
+ memo.push({ value: newValue, path: item.path });
85
+ }
86
+ return memo;
87
+ }, []),
88
+ }
89
+ : replacer;
90
+ const toUpdate = processor.maskNodes(nodes);
91
+ for (const node of toUpdate) {
92
+ if (node.path === "") {
93
+ mutateValue = node.value;
94
+ }
95
+ else {
96
+ (0, set_js_1.default)(mutateValue, node.path, node.value);
97
+ }
98
+ }
99
+ return mutateValue;
100
+ };
101
+ }