plugin-agent-orchestrator 1.0.0 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/dist/client/AIEmployeeSelect.d.ts +11 -0
  2. package/dist/client/AIEmployeesContext.d.ts +23 -0
  3. package/dist/client/OrchestratorSettings.d.ts +2 -0
  4. package/dist/client/RulesTab.d.ts +2 -0
  5. package/dist/client/TracingTab.d.ts +2 -0
  6. package/dist/client/index.d.ts +1 -0
  7. package/dist/client/index.js +10 -8
  8. package/dist/client/plugin.d.ts +5 -0
  9. package/dist/externalVersion.js +22 -0
  10. package/dist/index.d.ts +2 -0
  11. package/dist/index.js +48 -0
  12. package/dist/node_modules/zod/LICENSE +21 -0
  13. package/dist/node_modules/zod/index.cjs +1 -0
  14. package/dist/node_modules/zod/index.d.cts +4 -0
  15. package/dist/node_modules/zod/index.d.ts +4 -0
  16. package/dist/node_modules/zod/index.js +4 -0
  17. package/dist/node_modules/zod/package.json +1 -0
  18. package/dist/node_modules/zod/src/index.ts +4 -0
  19. package/dist/node_modules/zod/src/v3/ZodError.ts +330 -0
  20. package/dist/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  21. package/dist/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  22. package/dist/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  23. package/dist/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  24. package/dist/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  25. package/dist/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  26. package/dist/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  27. package/dist/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  28. package/dist/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  29. package/dist/node_modules/zod/src/v3/errors.ts +13 -0
  30. package/dist/node_modules/zod/src/v3/external.ts +6 -0
  31. package/dist/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  32. package/dist/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  33. package/dist/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  34. package/dist/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  35. package/dist/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  36. package/dist/node_modules/zod/src/v3/helpers/util.ts +224 -0
  37. package/dist/node_modules/zod/src/v3/index.ts +4 -0
  38. package/dist/node_modules/zod/src/v3/locales/en.ts +124 -0
  39. package/dist/node_modules/zod/src/v3/standard-schema.ts +113 -0
  40. package/dist/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  41. package/dist/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  42. package/dist/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  43. package/dist/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  44. package/dist/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  45. package/dist/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  46. package/dist/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  47. package/dist/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  48. package/dist/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  49. package/dist/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  50. package/dist/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  51. package/dist/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  52. package/dist/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  53. package/dist/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  54. package/dist/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  55. package/dist/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  56. package/dist/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  57. package/dist/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  58. package/dist/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  59. package/dist/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  60. package/dist/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  61. package/dist/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  62. package/dist/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  63. package/dist/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  64. package/dist/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  65. package/dist/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  66. package/dist/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  67. package/dist/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  68. package/dist/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  69. package/dist/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  70. package/dist/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  71. package/dist/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  72. package/dist/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  73. package/dist/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  74. package/dist/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  75. package/dist/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  76. package/dist/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  77. package/dist/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  78. package/dist/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  79. package/dist/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  80. package/dist/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  81. package/dist/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  82. package/dist/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  83. package/dist/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  84. package/dist/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  85. package/dist/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  86. package/dist/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  87. package/dist/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  88. package/dist/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  89. package/dist/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  90. package/dist/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  91. package/dist/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  92. package/dist/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  93. package/dist/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  94. package/dist/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  95. package/dist/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  96. package/dist/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  97. package/dist/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  98. package/dist/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  99. package/dist/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  100. package/dist/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  101. package/dist/node_modules/zod/src/v3/types.ts +5136 -0
  102. package/dist/node_modules/zod/src/v4/classic/checks.ts +30 -0
  103. package/dist/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  104. package/dist/node_modules/zod/src/v4/classic/compat.ts +66 -0
  105. package/dist/node_modules/zod/src/v4/classic/errors.ts +75 -0
  106. package/dist/node_modules/zod/src/v4/classic/external.ts +50 -0
  107. package/dist/node_modules/zod/src/v4/classic/index.ts +5 -0
  108. package/dist/node_modules/zod/src/v4/classic/iso.ts +90 -0
  109. package/dist/node_modules/zod/src/v4/classic/parse.ts +33 -0
  110. package/dist/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  111. package/dist/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  112. package/dist/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  113. package/dist/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  114. package/dist/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  115. package/dist/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  116. package/dist/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  117. package/dist/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  118. package/dist/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  119. package/dist/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  120. package/dist/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  121. package/dist/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  122. package/dist/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  123. package/dist/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  124. package/dist/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  125. package/dist/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  126. package/dist/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  127. package/dist/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  128. package/dist/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  129. package/dist/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  130. package/dist/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  131. package/dist/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  132. package/dist/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  133. package/dist/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  134. package/dist/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  135. package/dist/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  136. package/dist/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  137. package/dist/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  138. package/dist/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  139. package/dist/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  140. package/dist/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  141. package/dist/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  142. package/dist/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  143. package/dist/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  144. package/dist/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  145. package/dist/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  146. package/dist/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  147. package/dist/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  148. package/dist/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  149. package/dist/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  150. package/dist/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  151. package/dist/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  152. package/dist/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  153. package/dist/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  154. package/dist/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  155. package/dist/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  156. package/dist/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  157. package/dist/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  158. package/dist/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  159. package/dist/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  160. package/dist/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  161. package/dist/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  162. package/dist/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  163. package/dist/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  164. package/dist/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  165. package/dist/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  166. package/dist/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  167. package/dist/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  168. package/dist/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  169. package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  170. package/dist/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  171. package/dist/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  172. package/dist/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  173. package/dist/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  174. package/dist/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  175. package/dist/node_modules/zod/src/v4/core/api.ts +1594 -0
  176. package/dist/node_modules/zod/src/v4/core/checks.ts +1283 -0
  177. package/dist/node_modules/zod/src/v4/core/config.ts +15 -0
  178. package/dist/node_modules/zod/src/v4/core/core.ts +134 -0
  179. package/dist/node_modules/zod/src/v4/core/doc.ts +44 -0
  180. package/dist/node_modules/zod/src/v4/core/errors.ts +424 -0
  181. package/dist/node_modules/zod/src/v4/core/function.ts +176 -0
  182. package/dist/node_modules/zod/src/v4/core/index.ts +15 -0
  183. package/dist/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  184. package/dist/node_modules/zod/src/v4/core/parse.ts +94 -0
  185. package/dist/node_modules/zod/src/v4/core/regexes.ts +135 -0
  186. package/dist/node_modules/zod/src/v4/core/registries.ts +96 -0
  187. package/dist/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  188. package/dist/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  189. package/dist/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  190. package/dist/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  191. package/dist/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  192. package/dist/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  193. package/dist/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  194. package/dist/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  195. package/dist/node_modules/zod/src/v4/core/util.ts +775 -0
  196. package/dist/node_modules/zod/src/v4/core/versions.ts +5 -0
  197. package/dist/node_modules/zod/src/v4/core/zsf.ts +323 -0
  198. package/dist/node_modules/zod/src/v4/index.ts +4 -0
  199. package/dist/node_modules/zod/src/v4/locales/ar.ts +125 -0
  200. package/dist/node_modules/zod/src/v4/locales/az.ts +121 -0
  201. package/dist/node_modules/zod/src/v4/locales/be.ts +184 -0
  202. package/dist/node_modules/zod/src/v4/locales/ca.ts +127 -0
  203. package/dist/node_modules/zod/src/v4/locales/cs.ts +142 -0
  204. package/dist/node_modules/zod/src/v4/locales/de.ts +124 -0
  205. package/dist/node_modules/zod/src/v4/locales/en.ts +127 -0
  206. package/dist/node_modules/zod/src/v4/locales/eo.ts +125 -0
  207. package/dist/node_modules/zod/src/v4/locales/es.ts +125 -0
  208. package/dist/node_modules/zod/src/v4/locales/fa.ts +134 -0
  209. package/dist/node_modules/zod/src/v4/locales/fi.ts +131 -0
  210. package/dist/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  211. package/dist/node_modules/zod/src/v4/locales/fr.ts +124 -0
  212. package/dist/node_modules/zod/src/v4/locales/he.ts +125 -0
  213. package/dist/node_modules/zod/src/v4/locales/hu.ts +126 -0
  214. package/dist/node_modules/zod/src/v4/locales/id.ts +125 -0
  215. package/dist/node_modules/zod/src/v4/locales/index.ts +39 -0
  216. package/dist/node_modules/zod/src/v4/locales/it.ts +125 -0
  217. package/dist/node_modules/zod/src/v4/locales/ja.ts +122 -0
  218. package/dist/node_modules/zod/src/v4/locales/kh.ts +126 -0
  219. package/dist/node_modules/zod/src/v4/locales/ko.ts +131 -0
  220. package/dist/node_modules/zod/src/v4/locales/mk.ts +127 -0
  221. package/dist/node_modules/zod/src/v4/locales/ms.ts +124 -0
  222. package/dist/node_modules/zod/src/v4/locales/nl.ts +126 -0
  223. package/dist/node_modules/zod/src/v4/locales/no.ts +124 -0
  224. package/dist/node_modules/zod/src/v4/locales/ota.ts +125 -0
  225. package/dist/node_modules/zod/src/v4/locales/pl.ts +126 -0
  226. package/dist/node_modules/zod/src/v4/locales/ps.ts +133 -0
  227. package/dist/node_modules/zod/src/v4/locales/pt.ts +123 -0
  228. package/dist/node_modules/zod/src/v4/locales/ru.ts +184 -0
  229. package/dist/node_modules/zod/src/v4/locales/sl.ts +126 -0
  230. package/dist/node_modules/zod/src/v4/locales/sv.ts +127 -0
  231. package/dist/node_modules/zod/src/v4/locales/ta.ts +125 -0
  232. package/dist/node_modules/zod/src/v4/locales/th.ts +126 -0
  233. package/dist/node_modules/zod/src/v4/locales/tr.ts +121 -0
  234. package/dist/node_modules/zod/src/v4/locales/ua.ts +126 -0
  235. package/dist/node_modules/zod/src/v4/locales/ur.ts +126 -0
  236. package/dist/node_modules/zod/src/v4/locales/vi.ts +125 -0
  237. package/dist/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  238. package/dist/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  239. package/dist/node_modules/zod/src/v4/mini/checks.ts +32 -0
  240. package/dist/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  241. package/dist/node_modules/zod/src/v4/mini/external.ts +40 -0
  242. package/dist/node_modules/zod/src/v4/mini/index.ts +3 -0
  243. package/dist/node_modules/zod/src/v4/mini/iso.ts +62 -0
  244. package/dist/node_modules/zod/src/v4/mini/parse.ts +1 -0
  245. package/dist/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  246. package/dist/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  247. package/dist/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  248. package/dist/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  249. package/dist/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  250. package/dist/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  251. package/dist/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  252. package/dist/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  253. package/dist/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  254. package/dist/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  255. package/dist/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  256. package/dist/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  257. package/dist/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  258. package/dist/node_modules/zod/src/v4-mini/index.ts +1 -0
  259. package/dist/node_modules/zod/v3/ZodError.cjs +138 -0
  260. package/dist/node_modules/zod/v3/ZodError.d.cts +164 -0
  261. package/dist/node_modules/zod/v3/ZodError.d.ts +164 -0
  262. package/dist/node_modules/zod/v3/ZodError.js +133 -0
  263. package/dist/node_modules/zod/v3/errors.cjs +17 -0
  264. package/dist/node_modules/zod/v3/errors.d.cts +5 -0
  265. package/dist/node_modules/zod/v3/errors.d.ts +5 -0
  266. package/dist/node_modules/zod/v3/errors.js +9 -0
  267. package/dist/node_modules/zod/v3/external.cjs +22 -0
  268. package/dist/node_modules/zod/v3/external.d.cts +6 -0
  269. package/dist/node_modules/zod/v3/external.d.ts +6 -0
  270. package/dist/node_modules/zod/v3/external.js +6 -0
  271. package/dist/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  272. package/dist/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  273. package/dist/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  274. package/dist/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  275. package/dist/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  276. package/dist/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  277. package/dist/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  278. package/dist/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  279. package/dist/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  280. package/dist/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  281. package/dist/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  282. package/dist/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  283. package/dist/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  284. package/dist/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  285. package/dist/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  286. package/dist/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  287. package/dist/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  288. package/dist/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  289. package/dist/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  290. package/dist/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  291. package/dist/node_modules/zod/v3/helpers/util.cjs +137 -0
  292. package/dist/node_modules/zod/v3/helpers/util.d.cts +85 -0
  293. package/dist/node_modules/zod/v3/helpers/util.d.ts +85 -0
  294. package/dist/node_modules/zod/v3/helpers/util.js +133 -0
  295. package/dist/node_modules/zod/v3/index.cjs +33 -0
  296. package/dist/node_modules/zod/v3/index.d.cts +4 -0
  297. package/dist/node_modules/zod/v3/index.d.ts +4 -0
  298. package/dist/node_modules/zod/v3/index.js +4 -0
  299. package/dist/node_modules/zod/v3/locales/en.cjs +111 -0
  300. package/dist/node_modules/zod/v3/locales/en.d.cts +3 -0
  301. package/dist/node_modules/zod/v3/locales/en.d.ts +3 -0
  302. package/dist/node_modules/zod/v3/locales/en.js +109 -0
  303. package/dist/node_modules/zod/v3/standard-schema.cjs +2 -0
  304. package/dist/node_modules/zod/v3/standard-schema.d.cts +102 -0
  305. package/dist/node_modules/zod/v3/standard-schema.d.ts +102 -0
  306. package/dist/node_modules/zod/v3/standard-schema.js +1 -0
  307. package/dist/node_modules/zod/v3/types.cjs +3775 -0
  308. package/dist/node_modules/zod/v3/types.d.cts +1031 -0
  309. package/dist/node_modules/zod/v3/types.d.ts +1031 -0
  310. package/dist/node_modules/zod/v3/types.js +3693 -0
  311. package/dist/node_modules/zod/v4/classic/checks.cjs +32 -0
  312. package/dist/node_modules/zod/v4/classic/checks.d.cts +1 -0
  313. package/dist/node_modules/zod/v4/classic/checks.d.ts +1 -0
  314. package/dist/node_modules/zod/v4/classic/checks.js +1 -0
  315. package/dist/node_modules/zod/v4/classic/coerce.cjs +47 -0
  316. package/dist/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  317. package/dist/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  318. package/dist/node_modules/zod/v4/classic/coerce.js +17 -0
  319. package/dist/node_modules/zod/v4/classic/compat.cjs +57 -0
  320. package/dist/node_modules/zod/v4/classic/compat.d.cts +46 -0
  321. package/dist/node_modules/zod/v4/classic/compat.d.ts +46 -0
  322. package/dist/node_modules/zod/v4/classic/compat.js +27 -0
  323. package/dist/node_modules/zod/v4/classic/errors.cjs +67 -0
  324. package/dist/node_modules/zod/v4/classic/errors.d.cts +30 -0
  325. package/dist/node_modules/zod/v4/classic/errors.d.ts +30 -0
  326. package/dist/node_modules/zod/v4/classic/errors.js +41 -0
  327. package/dist/node_modules/zod/v4/classic/external.cjs +70 -0
  328. package/dist/node_modules/zod/v4/classic/external.d.cts +13 -0
  329. package/dist/node_modules/zod/v4/classic/external.d.ts +13 -0
  330. package/dist/node_modules/zod/v4/classic/external.js +18 -0
  331. package/dist/node_modules/zod/v4/classic/index.cjs +33 -0
  332. package/dist/node_modules/zod/v4/classic/index.d.cts +4 -0
  333. package/dist/node_modules/zod/v4/classic/index.d.ts +4 -0
  334. package/dist/node_modules/zod/v4/classic/index.js +4 -0
  335. package/dist/node_modules/zod/v4/classic/iso.cjs +60 -0
  336. package/dist/node_modules/zod/v4/classic/iso.d.cts +22 -0
  337. package/dist/node_modules/zod/v4/classic/iso.d.ts +22 -0
  338. package/dist/node_modules/zod/v4/classic/iso.js +30 -0
  339. package/dist/node_modules/zod/v4/classic/parse.cjs +32 -0
  340. package/dist/node_modules/zod/v4/classic/parse.d.cts +23 -0
  341. package/dist/node_modules/zod/v4/classic/parse.d.ts +23 -0
  342. package/dist/node_modules/zod/v4/classic/parse.js +6 -0
  343. package/dist/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  344. package/dist/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  345. package/dist/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  346. package/dist/node_modules/zod/v4/classic/schemas.js +1006 -0
  347. package/dist/node_modules/zod/v4/core/api.cjs +1039 -0
  348. package/dist/node_modules/zod/v4/core/api.d.cts +284 -0
  349. package/dist/node_modules/zod/v4/core/api.d.ts +284 -0
  350. package/dist/node_modules/zod/v4/core/api.js +906 -0
  351. package/dist/node_modules/zod/v4/core/checks.cjs +591 -0
  352. package/dist/node_modules/zod/v4/core/checks.d.cts +278 -0
  353. package/dist/node_modules/zod/v4/core/checks.d.ts +278 -0
  354. package/dist/node_modules/zod/v4/core/checks.js +565 -0
  355. package/dist/node_modules/zod/v4/core/core.cjs +67 -0
  356. package/dist/node_modules/zod/v4/core/core.d.cts +49 -0
  357. package/dist/node_modules/zod/v4/core/core.d.ts +49 -0
  358. package/dist/node_modules/zod/v4/core/core.js +61 -0
  359. package/dist/node_modules/zod/v4/core/doc.cjs +39 -0
  360. package/dist/node_modules/zod/v4/core/doc.d.cts +14 -0
  361. package/dist/node_modules/zod/v4/core/doc.d.ts +14 -0
  362. package/dist/node_modules/zod/v4/core/doc.js +35 -0
  363. package/dist/node_modules/zod/v4/core/errors.cjs +226 -0
  364. package/dist/node_modules/zod/v4/core/errors.d.cts +208 -0
  365. package/dist/node_modules/zod/v4/core/errors.d.ts +208 -0
  366. package/dist/node_modules/zod/v4/core/errors.js +195 -0
  367. package/dist/node_modules/zod/v4/core/function.cjs +102 -0
  368. package/dist/node_modules/zod/v4/core/function.d.cts +52 -0
  369. package/dist/node_modules/zod/v4/core/function.d.ts +52 -0
  370. package/dist/node_modules/zod/v4/core/function.js +75 -0
  371. package/dist/node_modules/zod/v4/core/index.cjs +44 -0
  372. package/dist/node_modules/zod/v4/core/index.d.cts +15 -0
  373. package/dist/node_modules/zod/v4/core/index.d.ts +15 -0
  374. package/dist/node_modules/zod/v4/core/index.js +15 -0
  375. package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
  376. package/dist/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  377. package/dist/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  378. package/dist/node_modules/zod/v4/core/json-schema.js +1 -0
  379. package/dist/node_modules/zod/v4/core/parse.cjs +87 -0
  380. package/dist/node_modules/zod/v4/core/parse.d.cts +25 -0
  381. package/dist/node_modules/zod/v4/core/parse.d.ts +25 -0
  382. package/dist/node_modules/zod/v4/core/parse.js +57 -0
  383. package/dist/node_modules/zod/v4/core/regexes.cjs +103 -0
  384. package/dist/node_modules/zod/v4/core/regexes.d.cts +62 -0
  385. package/dist/node_modules/zod/v4/core/regexes.d.ts +62 -0
  386. package/dist/node_modules/zod/v4/core/regexes.js +95 -0
  387. package/dist/node_modules/zod/v4/core/registries.cjs +56 -0
  388. package/dist/node_modules/zod/v4/core/registries.d.cts +35 -0
  389. package/dist/node_modules/zod/v4/core/registries.d.ts +35 -0
  390. package/dist/node_modules/zod/v4/core/registries.js +51 -0
  391. package/dist/node_modules/zod/v4/core/schemas.cjs +1748 -0
  392. package/dist/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  393. package/dist/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  394. package/dist/node_modules/zod/v4/core/schemas.js +1717 -0
  395. package/dist/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  396. package/dist/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  397. package/dist/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  398. package/dist/node_modules/zod/v4/core/standard-schema.js +1 -0
  399. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  400. package/dist/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  401. package/dist/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  402. package/dist/node_modules/zod/v4/core/to-json-schema.js +849 -0
  403. package/dist/node_modules/zod/v4/core/util.cjs +539 -0
  404. package/dist/node_modules/zod/v4/core/util.d.cts +183 -0
  405. package/dist/node_modules/zod/v4/core/util.d.ts +183 -0
  406. package/dist/node_modules/zod/v4/core/util.js +493 -0
  407. package/dist/node_modules/zod/v4/core/versions.cjs +8 -0
  408. package/dist/node_modules/zod/v4/core/versions.d.cts +5 -0
  409. package/dist/node_modules/zod/v4/core/versions.d.ts +5 -0
  410. package/dist/node_modules/zod/v4/core/versions.js +5 -0
  411. package/dist/node_modules/zod/v4/index.cjs +22 -0
  412. package/dist/node_modules/zod/v4/index.d.cts +3 -0
  413. package/dist/node_modules/zod/v4/index.d.ts +3 -0
  414. package/dist/node_modules/zod/v4/index.js +3 -0
  415. package/dist/node_modules/zod/v4/locales/ar.cjs +142 -0
  416. package/dist/node_modules/zod/v4/locales/ar.d.cts +4 -0
  417. package/dist/node_modules/zod/v4/locales/ar.d.ts +4 -0
  418. package/dist/node_modules/zod/v4/locales/ar.js +116 -0
  419. package/dist/node_modules/zod/v4/locales/az.cjs +141 -0
  420. package/dist/node_modules/zod/v4/locales/az.d.cts +4 -0
  421. package/dist/node_modules/zod/v4/locales/az.d.ts +4 -0
  422. package/dist/node_modules/zod/v4/locales/az.js +115 -0
  423. package/dist/node_modules/zod/v4/locales/be.cjs +190 -0
  424. package/dist/node_modules/zod/v4/locales/be.d.cts +4 -0
  425. package/dist/node_modules/zod/v4/locales/be.d.ts +4 -0
  426. package/dist/node_modules/zod/v4/locales/be.js +164 -0
  427. package/dist/node_modules/zod/v4/locales/ca.cjs +144 -0
  428. package/dist/node_modules/zod/v4/locales/ca.d.cts +4 -0
  429. package/dist/node_modules/zod/v4/locales/ca.d.ts +4 -0
  430. package/dist/node_modules/zod/v4/locales/ca.js +118 -0
  431. package/dist/node_modules/zod/v4/locales/cs.cjs +161 -0
  432. package/dist/node_modules/zod/v4/locales/cs.d.cts +4 -0
  433. package/dist/node_modules/zod/v4/locales/cs.d.ts +4 -0
  434. package/dist/node_modules/zod/v4/locales/cs.js +135 -0
  435. package/dist/node_modules/zod/v4/locales/de.cjs +142 -0
  436. package/dist/node_modules/zod/v4/locales/de.d.cts +4 -0
  437. package/dist/node_modules/zod/v4/locales/de.d.ts +4 -0
  438. package/dist/node_modules/zod/v4/locales/de.js +116 -0
  439. package/dist/node_modules/zod/v4/locales/en.cjs +145 -0
  440. package/dist/node_modules/zod/v4/locales/en.d.cts +5 -0
  441. package/dist/node_modules/zod/v4/locales/en.d.ts +5 -0
  442. package/dist/node_modules/zod/v4/locales/en.js +117 -0
  443. package/dist/node_modules/zod/v4/locales/eo.cjs +144 -0
  444. package/dist/node_modules/zod/v4/locales/eo.d.cts +5 -0
  445. package/dist/node_modules/zod/v4/locales/eo.d.ts +5 -0
  446. package/dist/node_modules/zod/v4/locales/eo.js +116 -0
  447. package/dist/node_modules/zod/v4/locales/es.cjs +143 -0
  448. package/dist/node_modules/zod/v4/locales/es.d.cts +4 -0
  449. package/dist/node_modules/zod/v4/locales/es.d.ts +4 -0
  450. package/dist/node_modules/zod/v4/locales/es.js +117 -0
  451. package/dist/node_modules/zod/v4/locales/fa.cjs +148 -0
  452. package/dist/node_modules/zod/v4/locales/fa.d.cts +4 -0
  453. package/dist/node_modules/zod/v4/locales/fa.d.ts +4 -0
  454. package/dist/node_modules/zod/v4/locales/fa.js +122 -0
  455. package/dist/node_modules/zod/v4/locales/fi.cjs +148 -0
  456. package/dist/node_modules/zod/v4/locales/fi.d.cts +4 -0
  457. package/dist/node_modules/zod/v4/locales/fi.d.ts +4 -0
  458. package/dist/node_modules/zod/v4/locales/fi.js +122 -0
  459. package/dist/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  460. package/dist/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  461. package/dist/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  462. package/dist/node_modules/zod/v4/locales/fr-CA.js +117 -0
  463. package/dist/node_modules/zod/v4/locales/fr.cjs +142 -0
  464. package/dist/node_modules/zod/v4/locales/fr.d.cts +4 -0
  465. package/dist/node_modules/zod/v4/locales/fr.d.ts +4 -0
  466. package/dist/node_modules/zod/v4/locales/fr.js +116 -0
  467. package/dist/node_modules/zod/v4/locales/he.cjs +143 -0
  468. package/dist/node_modules/zod/v4/locales/he.d.cts +4 -0
  469. package/dist/node_modules/zod/v4/locales/he.d.ts +4 -0
  470. package/dist/node_modules/zod/v4/locales/he.js +117 -0
  471. package/dist/node_modules/zod/v4/locales/hu.cjs +143 -0
  472. package/dist/node_modules/zod/v4/locales/hu.d.cts +4 -0
  473. package/dist/node_modules/zod/v4/locales/hu.d.ts +4 -0
  474. package/dist/node_modules/zod/v4/locales/hu.js +117 -0
  475. package/dist/node_modules/zod/v4/locales/id.cjs +142 -0
  476. package/dist/node_modules/zod/v4/locales/id.d.cts +4 -0
  477. package/dist/node_modules/zod/v4/locales/id.d.ts +4 -0
  478. package/dist/node_modules/zod/v4/locales/id.js +116 -0
  479. package/dist/node_modules/zod/v4/locales/index.cjs +84 -0
  480. package/dist/node_modules/zod/v4/locales/index.d.cts +39 -0
  481. package/dist/node_modules/zod/v4/locales/index.d.ts +39 -0
  482. package/dist/node_modules/zod/v4/locales/index.js +39 -0
  483. package/dist/node_modules/zod/v4/locales/it.cjs +143 -0
  484. package/dist/node_modules/zod/v4/locales/it.d.cts +4 -0
  485. package/dist/node_modules/zod/v4/locales/it.d.ts +4 -0
  486. package/dist/node_modules/zod/v4/locales/it.js +117 -0
  487. package/dist/node_modules/zod/v4/locales/ja.cjs +141 -0
  488. package/dist/node_modules/zod/v4/locales/ja.d.cts +4 -0
  489. package/dist/node_modules/zod/v4/locales/ja.d.ts +4 -0
  490. package/dist/node_modules/zod/v4/locales/ja.js +115 -0
  491. package/dist/node_modules/zod/v4/locales/kh.cjs +143 -0
  492. package/dist/node_modules/zod/v4/locales/kh.d.cts +4 -0
  493. package/dist/node_modules/zod/v4/locales/kh.d.ts +4 -0
  494. package/dist/node_modules/zod/v4/locales/kh.js +117 -0
  495. package/dist/node_modules/zod/v4/locales/ko.cjs +147 -0
  496. package/dist/node_modules/zod/v4/locales/ko.d.cts +4 -0
  497. package/dist/node_modules/zod/v4/locales/ko.d.ts +4 -0
  498. package/dist/node_modules/zod/v4/locales/ko.js +121 -0
  499. package/dist/node_modules/zod/v4/locales/mk.cjs +144 -0
  500. package/dist/node_modules/zod/v4/locales/mk.d.cts +4 -0
  501. package/dist/node_modules/zod/v4/locales/mk.d.ts +4 -0
  502. package/dist/node_modules/zod/v4/locales/mk.js +118 -0
  503. package/dist/node_modules/zod/v4/locales/ms.cjs +142 -0
  504. package/dist/node_modules/zod/v4/locales/ms.d.cts +4 -0
  505. package/dist/node_modules/zod/v4/locales/ms.d.ts +4 -0
  506. package/dist/node_modules/zod/v4/locales/ms.js +116 -0
  507. package/dist/node_modules/zod/v4/locales/nl.cjs +143 -0
  508. package/dist/node_modules/zod/v4/locales/nl.d.cts +4 -0
  509. package/dist/node_modules/zod/v4/locales/nl.d.ts +4 -0
  510. package/dist/node_modules/zod/v4/locales/nl.js +117 -0
  511. package/dist/node_modules/zod/v4/locales/no.cjs +142 -0
  512. package/dist/node_modules/zod/v4/locales/no.d.cts +4 -0
  513. package/dist/node_modules/zod/v4/locales/no.d.ts +4 -0
  514. package/dist/node_modules/zod/v4/locales/no.js +116 -0
  515. package/dist/node_modules/zod/v4/locales/ota.cjs +143 -0
  516. package/dist/node_modules/zod/v4/locales/ota.d.cts +4 -0
  517. package/dist/node_modules/zod/v4/locales/ota.d.ts +4 -0
  518. package/dist/node_modules/zod/v4/locales/ota.js +117 -0
  519. package/dist/node_modules/zod/v4/locales/pl.cjs +143 -0
  520. package/dist/node_modules/zod/v4/locales/pl.d.cts +4 -0
  521. package/dist/node_modules/zod/v4/locales/pl.d.ts +4 -0
  522. package/dist/node_modules/zod/v4/locales/pl.js +117 -0
  523. package/dist/node_modules/zod/v4/locales/ps.cjs +148 -0
  524. package/dist/node_modules/zod/v4/locales/ps.d.cts +4 -0
  525. package/dist/node_modules/zod/v4/locales/ps.d.ts +4 -0
  526. package/dist/node_modules/zod/v4/locales/ps.js +122 -0
  527. package/dist/node_modules/zod/v4/locales/pt.cjs +142 -0
  528. package/dist/node_modules/zod/v4/locales/pt.d.cts +4 -0
  529. package/dist/node_modules/zod/v4/locales/pt.d.ts +4 -0
  530. package/dist/node_modules/zod/v4/locales/pt.js +116 -0
  531. package/dist/node_modules/zod/v4/locales/ru.cjs +190 -0
  532. package/dist/node_modules/zod/v4/locales/ru.d.cts +4 -0
  533. package/dist/node_modules/zod/v4/locales/ru.d.ts +4 -0
  534. package/dist/node_modules/zod/v4/locales/ru.js +164 -0
  535. package/dist/node_modules/zod/v4/locales/sl.cjs +143 -0
  536. package/dist/node_modules/zod/v4/locales/sl.d.cts +4 -0
  537. package/dist/node_modules/zod/v4/locales/sl.d.ts +4 -0
  538. package/dist/node_modules/zod/v4/locales/sl.js +117 -0
  539. package/dist/node_modules/zod/v4/locales/sv.cjs +144 -0
  540. package/dist/node_modules/zod/v4/locales/sv.d.cts +4 -0
  541. package/dist/node_modules/zod/v4/locales/sv.d.ts +4 -0
  542. package/dist/node_modules/zod/v4/locales/sv.js +118 -0
  543. package/dist/node_modules/zod/v4/locales/ta.cjs +143 -0
  544. package/dist/node_modules/zod/v4/locales/ta.d.cts +4 -0
  545. package/dist/node_modules/zod/v4/locales/ta.d.ts +4 -0
  546. package/dist/node_modules/zod/v4/locales/ta.js +117 -0
  547. package/dist/node_modules/zod/v4/locales/th.cjs +143 -0
  548. package/dist/node_modules/zod/v4/locales/th.d.cts +4 -0
  549. package/dist/node_modules/zod/v4/locales/th.d.ts +4 -0
  550. package/dist/node_modules/zod/v4/locales/th.js +117 -0
  551. package/dist/node_modules/zod/v4/locales/tr.cjs +143 -0
  552. package/dist/node_modules/zod/v4/locales/tr.d.cts +5 -0
  553. package/dist/node_modules/zod/v4/locales/tr.d.ts +5 -0
  554. package/dist/node_modules/zod/v4/locales/tr.js +115 -0
  555. package/dist/node_modules/zod/v4/locales/ua.cjs +143 -0
  556. package/dist/node_modules/zod/v4/locales/ua.d.cts +4 -0
  557. package/dist/node_modules/zod/v4/locales/ua.d.ts +4 -0
  558. package/dist/node_modules/zod/v4/locales/ua.js +117 -0
  559. package/dist/node_modules/zod/v4/locales/ur.cjs +143 -0
  560. package/dist/node_modules/zod/v4/locales/ur.d.cts +4 -0
  561. package/dist/node_modules/zod/v4/locales/ur.d.ts +4 -0
  562. package/dist/node_modules/zod/v4/locales/ur.js +117 -0
  563. package/dist/node_modules/zod/v4/locales/vi.cjs +142 -0
  564. package/dist/node_modules/zod/v4/locales/vi.d.cts +4 -0
  565. package/dist/node_modules/zod/v4/locales/vi.d.ts +4 -0
  566. package/dist/node_modules/zod/v4/locales/vi.js +116 -0
  567. package/dist/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  568. package/dist/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  569. package/dist/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  570. package/dist/node_modules/zod/v4/locales/zh-CN.js +116 -0
  571. package/dist/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  572. package/dist/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  573. package/dist/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  574. package/dist/node_modules/zod/v4/locales/zh-TW.js +117 -0
  575. package/dist/node_modules/zod/v4/mini/checks.cjs +34 -0
  576. package/dist/node_modules/zod/v4/mini/checks.d.cts +1 -0
  577. package/dist/node_modules/zod/v4/mini/checks.d.ts +1 -0
  578. package/dist/node_modules/zod/v4/mini/checks.js +1 -0
  579. package/dist/node_modules/zod/v4/mini/coerce.cjs +47 -0
  580. package/dist/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  581. package/dist/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  582. package/dist/node_modules/zod/v4/mini/coerce.js +17 -0
  583. package/dist/node_modules/zod/v4/mini/external.cjs +62 -0
  584. package/dist/node_modules/zod/v4/mini/external.d.cts +11 -0
  585. package/dist/node_modules/zod/v4/mini/external.d.ts +11 -0
  586. package/dist/node_modules/zod/v4/mini/external.js +13 -0
  587. package/dist/node_modules/zod/v4/mini/index.cjs +32 -0
  588. package/dist/node_modules/zod/v4/mini/index.d.cts +3 -0
  589. package/dist/node_modules/zod/v4/mini/index.d.ts +3 -0
  590. package/dist/node_modules/zod/v4/mini/index.js +3 -0
  591. package/dist/node_modules/zod/v4/mini/iso.cjs +60 -0
  592. package/dist/node_modules/zod/v4/mini/iso.d.cts +22 -0
  593. package/dist/node_modules/zod/v4/mini/iso.d.ts +22 -0
  594. package/dist/node_modules/zod/v4/mini/iso.js +30 -0
  595. package/dist/node_modules/zod/v4/mini/parse.cjs +8 -0
  596. package/dist/node_modules/zod/v4/mini/parse.d.cts +1 -0
  597. package/dist/node_modules/zod/v4/mini/parse.d.ts +1 -0
  598. package/dist/node_modules/zod/v4/mini/parse.js +1 -0
  599. package/dist/node_modules/zod/v4/mini/schemas.cjs +839 -0
  600. package/dist/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  601. package/dist/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  602. package/dist/node_modules/zod/v4/mini/schemas.js +732 -0
  603. package/dist/node_modules/zod/v4-mini/index.cjs +17 -0
  604. package/dist/node_modules/zod/v4-mini/index.d.cts +1 -0
  605. package/dist/node_modules/zod/v4-mini/index.d.ts +1 -0
  606. package/dist/node_modules/zod/v4-mini/index.js +1 -0
  607. package/dist/server/collections/orchestrator-config.d.ts +2 -0
  608. package/dist/server/collections/orchestrator-config.js +79 -0
  609. package/dist/server/collections/orchestrator-logs.d.ts +8 -0
  610. package/dist/server/collections/orchestrator-logs.js +123 -0
  611. package/dist/server/index.d.ts +1 -0
  612. package/dist/server/index.js +41 -7
  613. package/dist/server/plugin.d.ts +11 -0
  614. package/dist/server/plugin.js +73 -42
  615. package/dist/server/resources/tracing.d.ts +7 -0
  616. package/dist/server/resources/tracing.js +104 -81
  617. package/dist/server/tools/delegate-task.d.ts +15 -0
  618. package/dist/server/tools/delegate-task.js +250 -298
  619. package/package.json +1 -1
  620. package/src/client/OrchestratorSettings.tsx +3 -19
  621. package/src/client/TracingTab.tsx +2 -12
  622. package/dist/client/AIEmployeeSelect.js +0 -29
  623. package/dist/client/AIEmployeesContext.js +0 -64
  624. package/dist/client/OrchestratorSettings.js +0 -32
  625. package/dist/client/RulesTab.js +0 -144
  626. package/dist/client/TracingTab.js +0 -88
  627. package/dist/client/plugin.js +0 -17
  628. /package/dist/{client/locale → locale}/en-US.json +0 -0
  629. /package/dist/{client/locale → locale}/vi-VN.json +0 -0
@@ -1,317 +1,269 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createDelegateToolsProvider = void 0;
4
- const zod_1 = require("zod");
5
- // @ts-ignore - subpath export types resolve at build time via NocoBase bundler
6
- const prebuilt_1 = require("@langchain/langgraph/prebuilt");
7
- const tools_1 = require("@langchain/core/tools");
8
- const messages_1 = require("@langchain/core/messages");
9
1
  /**
10
- * Maximum delegation depth key stored in ctx metadata.
11
- * Used to prevent circular/recursive delegation chains.
12
- */
13
- const ORCHESTRATOR_DEPTH_KEY = '__orchestratorDepth';
14
- /**
15
- * Creates one dynamic tool per configured sub-agent for a given leader.
16
- * Uses Strategy B (Per-SubAgent Tool): each sub-agent becomes a separate tool
17
- * with its own name and description, making LLM tool selection natural.
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
18
5
  *
19
- * Architecture:
20
- * - Uses createReactAgent (public LangGraph API) for agent execution
21
- * - Uses plugin-ai's getLLMService() for LLM model resolution
22
- * - Uses core app.aiManager.toolsManager.listTools() for tool resolution
23
- * (same manager that AIEmployee uses — see ai-employee.ts:1286)
24
- * - Depth enforcement via ctx metadata tracking
25
- * - Per-leader scoping via invoke-time check (core ToolsOptions has no
26
- * leaderUsername field, so scoping is enforced in the invoke callback)
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
27
8
  */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var delegate_task_exports = {};
28
+ __export(delegate_task_exports, {
29
+ createDelegateToolsProvider: () => createDelegateToolsProvider
30
+ });
31
+ module.exports = __toCommonJS(delegate_task_exports);
32
+ var import_zod = require("zod");
33
+ var import_prebuilt = require("@langchain/langgraph/prebuilt");
34
+ var import_tools = require("@langchain/core/tools");
35
+ var import_messages = require("@langchain/core/messages");
36
+ const ORCHESTRATOR_DEPTH_KEY = "__orchestratorDepth";
28
37
  function createDelegateToolsProvider(plugin) {
29
- return async (register) => {
30
- try {
31
- const configRepo = plugin.db.getRepository('orchestratorConfig');
32
- if (!configRepo)
33
- return;
34
- const configs = await configRepo.find({
35
- filter: { enabled: true },
36
- });
37
- if (!configs?.length)
38
- return;
39
- // Build a lookup: which leaders are allowed to use each delegate tool
40
- // Multiple leaders may share the same sub-agent, but each leader must
41
- // have an explicit rule.
42
- const leadersByTool = new Map();
43
- for (const config of configs) {
44
- const toolName = `delegate_to_${config.subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, '_')}`;
45
- if (!leadersByTool.has(toolName)) {
46
- leadersByTool.set(toolName, new Set());
47
- }
48
- leadersByTool.get(toolName).add(config.leaderUsername);
49
- }
50
- // De-duplicate: register one tool per sub-agent (not per config row)
51
- const seenSubAgents = new Set();
52
- for (const config of configs) {
53
- const { leaderUsername, subAgentUsername, maxDepth, timeout } = config;
54
- // Skip if we already registered this sub-agent's tool
55
- if (seenSubAgents.has(subAgentUsername))
56
- continue;
57
- seenSubAgents.add(subAgentUsername);
58
- // Fetch the sub-agent employee model for its description and LLM config
59
- const subAgentEmployee = await plugin.db.getRepository('aiEmployees').findOne({
60
- filter: { username: subAgentUsername },
61
- });
62
- if (!subAgentEmployee)
63
- continue;
64
- const toolName = `delegate_to_${subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, '_')}`;
65
- const toolDescription = [
66
- `Delegate a task to the AI Employee "${subAgentEmployee.nickname || subAgentUsername}".`,
67
- subAgentEmployee.about ? `Specialist profile: ${subAgentEmployee.about.substring(0, 200)}` : '',
68
- 'The sub-agent will execute the task independently and return its final answer.',
69
- ].filter(Boolean).join(' ');
70
- // Capture the allowed leaders for this tool (for invoke-time scoping)
71
- const allowedLeaders = leadersByTool.get(toolName);
72
- register.registerTools({
73
- scope: 'CUSTOM',
74
- execution: 'backend',
75
- defaultPermission: 'ALLOW',
76
- silence: false,
77
- introduction: {
78
- title: `[Sub-Agent] ${subAgentEmployee.nickname || subAgentUsername}`,
79
- about: toolDescription,
80
- },
81
- definition: {
82
- name: toolName,
83
- description: toolDescription,
84
- schema: zod_1.z.object({
85
- task: zod_1.z.string().describe('The detailed task description for the sub-agent to execute.'),
86
- context: zod_1.z.string().optional().describe('Optional additional context to help the sub-agent understand the task better.'),
87
- }),
88
- },
89
- invoke: async (ctx, args, id) => {
90
- // --- P2 FIX: Per-leader scoping at invoke time ---
91
- // Core ToolsOptions doesn't support leaderUsername field, so
92
- // we enforce scoping here by checking the calling employee.
93
- const callingEmployee = ctx._currentAIEmployee?.username
94
- || ctx.state?.currentAIEmployee;
95
- if (callingEmployee && !allowedLeaders.has(callingEmployee)) {
96
- return {
97
- status: 'error',
98
- content: `Employee "${callingEmployee}" is not authorized to delegate to "${subAgentUsername}". Configure an orchestration rule first.`,
99
- };
100
- }
101
- return invokeDelegateTask(ctx, plugin, {
102
- leaderUsername: callingEmployee || Array.from(allowedLeaders)[0] || '',
103
- subAgentUsername,
104
- subAgentEmployee,
105
- task: args.task,
106
- context: args.context,
107
- maxDepth: maxDepth ?? 1,
108
- timeout: timeout ?? 120000,
109
- toolCallId: id,
110
- });
111
- },
112
- });
113
- }
114
- }
115
- catch (e) {
116
- plugin.app.log.error('[AgentOrchestrator] Failed to register delegate tools', e);
117
- }
118
- };
119
- }
120
- exports.createDelegateToolsProvider = createDelegateToolsProvider;
121
- /**
122
- * Core execution logic using createReactAgent (public LangGraph API).
123
- *
124
- * This approach mirrors plugin-sub-agent's proven pattern:
125
- * 1. Get LLM model via aiPlugin.aiManager.getLLMService()
126
- * 2. Resolve sub-agent's tools via core app.aiManager.toolsManager.listTools()
127
- * 3. Build a standalone createReactAgent with the model + tools
128
- * 4. Stream results and extract final AI message
129
- *
130
- * Tool resolution uses the CORE toolsManager (app.aiManager.toolsManager) —
131
- * the same manager that AIEmployee.getToolsMap() uses (see ai-employee.ts:1286).
132
- * This ensures tool names in skillSettings.skills[].name match correctly.
133
- *
134
- * skillSettings.skills shape (verified against ai-employee.ts:1028):
135
- * { name: string, autoCall: boolean }[]
136
- */
137
- async function invokeDelegateTask(ctx, plugin, options) {
138
- const { leaderUsername, subAgentUsername, subAgentEmployee, task, context, maxDepth, timeout, toolCallId } = options;
139
- // --- P1: Depth enforcement ---
140
- const currentDepth = ctx[ORCHESTRATOR_DEPTH_KEY] ?? 0;
141
- if (currentDepth >= maxDepth) {
142
- return {
143
- status: 'error',
144
- content: `Delegation depth limit reached (${currentDepth}/${maxDepth}). Sub-agent "${subAgentUsername}" cannot delegate further.`,
145
- };
146
- }
147
- const startTime = Date.now();
38
+ return async (register) => {
148
39
  try {
149
- const aiPlugin = ctx.app.pm.get('ai');
150
- if (!aiPlugin) {
151
- throw new Error('Plugin AI is not installed or enabled');
152
- }
153
- // --- Step 1: Resolve LLM model from sub-agent's employee config ---
154
- const modelSettings = subAgentEmployee.modelSettings;
155
- if (!modelSettings?.llmService || !modelSettings?.model) {
156
- throw new Error(`Sub-agent "${subAgentUsername}" has no LLM model configured. Please configure a model in the AI Employee settings.`);
40
+ const configRepo = plugin.db.getRepository("orchestratorConfig");
41
+ if (!configRepo) return;
42
+ const configs = await configRepo.find({
43
+ filter: { enabled: true }
44
+ });
45
+ if (!(configs == null ? void 0 : configs.length)) return;
46
+ const leadersByTool = /* @__PURE__ */ new Map();
47
+ for (const config of configs) {
48
+ const toolName = `delegate_to_${config.subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
49
+ if (!leadersByTool.has(toolName)) {
50
+ leadersByTool.set(toolName, /* @__PURE__ */ new Set());
157
51
  }
158
- const { provider } = await aiPlugin.aiManager.getLLMService({
159
- llmService: modelSettings.llmService,
160
- model: modelSettings.model,
52
+ leadersByTool.get(toolName).add(config.leaderUsername);
53
+ }
54
+ const seenSubAgents = /* @__PURE__ */ new Set();
55
+ for (const config of configs) {
56
+ const { leaderUsername, subAgentUsername, maxDepth, timeout } = config;
57
+ if (seenSubAgents.has(subAgentUsername)) continue;
58
+ seenSubAgents.add(subAgentUsername);
59
+ const subAgentEmployee = await plugin.db.getRepository("aiEmployees").findOne({
60
+ filter: { username: subAgentUsername }
161
61
  });
162
- const chatModel = provider.createModel();
163
- // --- Step 2: Resolve tools via CORE toolsManager ---
164
- // Uses app.aiManager.toolsManager (same as AIEmployee.getToolsMap at ai-employee.ts:1286)
165
- // NOT plugin-ai's local toolManager (which has a different grouped format).
166
- const coreToolsManager = ctx.app.aiManager.toolsManager;
167
- const allTools = await coreToolsManager.listTools();
168
- // skillSettings.skills is { name: string, autoCall: boolean }[]
169
- // (verified at ai-employee.ts:1028-1029)
170
- const employeeSkills = (subAgentEmployee.skillSettings?.skills ?? [])
171
- .map((s) => (typeof s === 'string' ? s : s.name))
172
- .filter(Boolean);
173
- const langchainTools = [];
174
- for (const toolEntry of allTools) {
175
- const toolName = toolEntry.definition.name;
176
- if (!toolName)
177
- continue;
178
- // Only include tools that the sub-agent employee is configured to use.
179
- // Also skip our own delegate_to_* tools to prevent circular delegation
180
- // (belt-and-suspenders with the depth check above).
181
- if (!employeeSkills.includes(toolName) || toolName.startsWith('delegate_to_')) {
182
- continue;
62
+ if (!subAgentEmployee) continue;
63
+ const toolName = `delegate_to_${subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
64
+ const toolDescription = [
65
+ `Delegate a task to the AI Employee "${subAgentEmployee.nickname || subAgentUsername}".`,
66
+ subAgentEmployee.about ? `Specialist profile: ${subAgentEmployee.about.substring(0, 200)}` : "",
67
+ "The sub-agent will execute the task independently and return its final answer."
68
+ ].filter(Boolean).join(" ");
69
+ const allowedLeaders = leadersByTool.get(toolName);
70
+ register.registerTools({
71
+ scope: "CUSTOM",
72
+ execution: "backend",
73
+ defaultPermission: "ALLOW",
74
+ silence: false,
75
+ introduction: {
76
+ title: `[Sub-Agent] ${subAgentEmployee.nickname || subAgentUsername}`,
77
+ about: toolDescription
78
+ },
79
+ definition: {
80
+ name: toolName,
81
+ description: toolDescription,
82
+ schema: import_zod.z.object({
83
+ task: import_zod.z.string().describe("The detailed task description for the sub-agent to execute."),
84
+ context: import_zod.z.string().optional().describe("Optional additional context to help the sub-agent understand the task better.")
85
+ })
86
+ },
87
+ invoke: async (ctx, args, id) => {
88
+ var _a, _b;
89
+ const callingEmployee = ((_a = ctx._currentAIEmployee) == null ? void 0 : _a.username) || ((_b = ctx.state) == null ? void 0 : _b.currentAIEmployee);
90
+ if (callingEmployee && !allowedLeaders.has(callingEmployee)) {
91
+ return {
92
+ status: "error",
93
+ content: `Employee "${callingEmployee}" is not authorized to delegate to "${subAgentUsername}". Configure an orchestration rule first.`
94
+ };
183
95
  }
184
- langchainTools.push(new tools_1.DynamicStructuredTool({
185
- name: toolName.replace(/[^a-zA-Z0-9_-]/g, '_'),
186
- description: toolEntry.definition.description || toolName,
187
- schema: (toolEntry.definition.schema || zod_1.z.object({})),
188
- func: async (toolArgs) => {
189
- // Forward the invoke with depth tracking
190
- const invokeCtx = Object.create(ctx);
191
- invokeCtx[ORCHESTRATOR_DEPTH_KEY] = currentDepth + 1;
192
- const res = await toolEntry.invoke(invokeCtx, toolArgs, `orch-${toolCallId}`);
193
- if (res?.status === 'error') {
194
- throw new Error(`Tool <${toolName}> failed: ${res.content}`);
195
- }
196
- return typeof res?.content === 'string' ? res.content : JSON.stringify(res);
197
- },
198
- }));
199
- }
200
- // --- Step 3: Build the agent ---
201
- const abortController = new AbortController();
202
- const executor = (0, prebuilt_1.createReactAgent)({
203
- llm: chatModel,
204
- tools: langchainTools,
205
- });
206
- // --- Step 4: Construct messages ---
207
- const systemPrompt = subAgentEmployee.chatSettings?.systemPrompt
208
- || subAgentEmployee.bio
209
- || `You are an AI assistant named "${subAgentEmployee.nickname || subAgentUsername}". ${subAgentEmployee.about || ''}`;
210
- const combinedTask = context
211
- ? `Task: ${task}\n\nContext Provided:\n${context}`
212
- : `Task: ${task}`;
213
- // --- Step 5: Execute with timeout + abort ---
214
- // P3 FIX: AbortController signal cancels the in-flight stream on timeout,
215
- // preventing continued token consumption after the timeout fires.
216
- const invokePromise = executeAgent(executor, systemPrompt, combinedTask, abortController.signal);
217
- const result = await Promise.race([
218
- invokePromise,
219
- createTimeout(timeout, subAgentUsername, abortController),
220
- ]);
221
- const content = result || 'Sub-agent completed the task but produced no output.';
222
- // Log successful execution for tracing
223
- await logDelegation(ctx, plugin, {
224
- leaderUsername,
225
- subAgentUsername,
226
- task,
227
- result: content,
228
- status: 'success',
229
- depth: currentDepth,
230
- durationMs: Date.now() - startTime,
96
+ return invokeDelegateTask(ctx, plugin, {
97
+ leaderUsername: callingEmployee || Array.from(allowedLeaders)[0] || "",
98
+ subAgentUsername,
99
+ subAgentEmployee,
100
+ task: args.task,
101
+ context: args.context,
102
+ maxDepth: maxDepth ?? 1,
103
+ timeout: timeout ?? 12e4,
104
+ toolCallId: id
105
+ });
106
+ }
231
107
  });
232
- return {
233
- status: 'success',
234
- content,
235
- };
236
- }
237
- catch (e) {
238
- plugin.app.log.error(`[AgentOrchestrator] Sub-agent ${subAgentUsername} failed`, e);
239
- // Log failed execution for tracing
240
- await logDelegation(ctx, plugin, {
241
- leaderUsername,
242
- subAgentUsername,
243
- task,
244
- result: '',
245
- status: 'error',
246
- depth: currentDepth,
247
- durationMs: Date.now() - startTime,
248
- error: e.message,
249
- }).catch(() => { }); // Don't let logging errors mask the real error
250
- return {
251
- status: 'error',
252
- content: `Sub-agent "${subAgentUsername}" failed: ${e.message}`,
253
- };
108
+ }
109
+ } catch (e) {
110
+ plugin.app.log.error("[AgentOrchestrator] Failed to register delegate tools", e);
254
111
  }
112
+ };
255
113
  }
256
- /**
257
- * Log a delegation event to the orchestratorLogs collection for observability.
258
- */
259
- async function logDelegation(ctx, plugin, data) {
260
- try {
261
- const logsRepo = plugin.db.getRepository('orchestratorLogs');
262
- if (!logsRepo)
263
- return;
264
- await logsRepo.create({
265
- values: {
266
- leaderUsername: data.leaderUsername,
267
- subAgentUsername: data.subAgentUsername,
268
- toolName: `delegate_to_${data.subAgentUsername}`,
269
- task: data.task.substring(0, 2000),
270
- result: data.result.substring(0, 5000),
271
- status: data.status,
272
- depth: data.depth,
273
- durationMs: data.durationMs,
274
- error: data.error?.substring(0, 2000),
275
- userId: ctx.auth?.user?.id || ctx.state?.currentUser?.id,
276
- },
277
- });
114
+ async function invokeDelegateTask(ctx, plugin, options) {
115
+ var _a, _b;
116
+ const { leaderUsername, subAgentUsername, subAgentEmployee, task, context, maxDepth, timeout, toolCallId } = options;
117
+ const currentDepth = ctx[ORCHESTRATOR_DEPTH_KEY] ?? 0;
118
+ if (currentDepth >= maxDepth) {
119
+ return {
120
+ status: "error",
121
+ content: `Delegation depth limit reached (${currentDepth}/${maxDepth}). Sub-agent "${subAgentUsername}" cannot delegate further.`
122
+ };
123
+ }
124
+ const startTime = Date.now();
125
+ try {
126
+ const aiPlugin = ctx.app.pm.get("ai");
127
+ if (!aiPlugin) {
128
+ throw new Error("Plugin AI is not installed or enabled");
278
129
  }
279
- catch (e) {
280
- plugin.app.log.warn('[AgentOrchestrator] Failed to log delegation event', e);
130
+ const modelSettings = subAgentEmployee.modelSettings;
131
+ if (!(modelSettings == null ? void 0 : modelSettings.llmService) || !(modelSettings == null ? void 0 : modelSettings.model)) {
132
+ throw new Error(`Sub-agent "${subAgentUsername}" has no LLM model configured. Please configure a model in the AI Employee settings.`);
133
+ }
134
+ const { provider } = await aiPlugin.aiManager.getLLMService({
135
+ llmService: modelSettings.llmService,
136
+ model: modelSettings.model
137
+ });
138
+ const chatModel = provider.createModel();
139
+ const coreToolsManager = ctx.app.aiManager.toolsManager;
140
+ const allTools = await coreToolsManager.listTools();
141
+ const employeeSkills = (((_a = subAgentEmployee.skillSettings) == null ? void 0 : _a.skills) ?? []).map((s) => typeof s === "string" ? s : s.name).filter(Boolean);
142
+ const langchainTools = [];
143
+ for (const toolEntry of allTools) {
144
+ const toolName = toolEntry.definition.name;
145
+ if (!toolName) continue;
146
+ if (!employeeSkills.includes(toolName) || toolName.startsWith("delegate_to_")) {
147
+ continue;
148
+ }
149
+ langchainTools.push(
150
+ new import_tools.DynamicStructuredTool({
151
+ name: toolName.replace(/[^a-zA-Z0-9_-]/g, "_"),
152
+ description: toolEntry.definition.description || toolName,
153
+ schema: toolEntry.definition.schema || import_zod.z.object({}),
154
+ func: async (toolArgs) => {
155
+ const invokeCtx = Object.create(ctx);
156
+ invokeCtx[ORCHESTRATOR_DEPTH_KEY] = currentDepth + 1;
157
+ const res = await toolEntry.invoke(invokeCtx, toolArgs, `orch-${toolCallId}`);
158
+ if ((res == null ? void 0 : res.status) === "error") {
159
+ throw new Error(`Tool <${toolName}> failed: ${res.content}`);
160
+ }
161
+ return typeof (res == null ? void 0 : res.content) === "string" ? res.content : JSON.stringify(res);
162
+ }
163
+ })
164
+ );
281
165
  }
166
+ const abortController = new AbortController();
167
+ const executor = (0, import_prebuilt.createReactAgent)({
168
+ llm: chatModel,
169
+ tools: langchainTools
170
+ });
171
+ const systemPrompt = ((_b = subAgentEmployee.chatSettings) == null ? void 0 : _b.systemPrompt) || subAgentEmployee.bio || `You are an AI assistant named "${subAgentEmployee.nickname || subAgentUsername}". ${subAgentEmployee.about || ""}`;
172
+ const combinedTask = context ? `Task: ${task}
173
+
174
+ Context Provided:
175
+ ${context}` : `Task: ${task}`;
176
+ const invokePromise = executeAgent(executor, systemPrompt, combinedTask, abortController.signal);
177
+ const result = await Promise.race([
178
+ invokePromise,
179
+ createTimeout(timeout, subAgentUsername, abortController)
180
+ ]);
181
+ const content = result || "Sub-agent completed the task but produced no output.";
182
+ await logDelegation(ctx, plugin, {
183
+ leaderUsername,
184
+ subAgentUsername,
185
+ task,
186
+ result: content,
187
+ status: "success",
188
+ depth: currentDepth,
189
+ durationMs: Date.now() - startTime
190
+ });
191
+ return {
192
+ status: "success",
193
+ content
194
+ };
195
+ } catch (e) {
196
+ plugin.app.log.error(`[AgentOrchestrator] Sub-agent ${subAgentUsername} failed`, e);
197
+ await logDelegation(ctx, plugin, {
198
+ leaderUsername,
199
+ subAgentUsername,
200
+ task,
201
+ result: "",
202
+ status: "error",
203
+ depth: currentDepth,
204
+ durationMs: Date.now() - startTime,
205
+ error: e.message
206
+ }).catch(() => {
207
+ });
208
+ return {
209
+ status: "error",
210
+ content: `Sub-agent "${subAgentUsername}" failed: ${e.message}`
211
+ };
212
+ }
213
+ }
214
+ async function logDelegation(ctx, plugin, data) {
215
+ var _a, _b, _c, _d, _e;
216
+ try {
217
+ const logsRepo = plugin.db.getRepository("orchestratorLogs");
218
+ if (!logsRepo) return;
219
+ await logsRepo.create({
220
+ values: {
221
+ leaderUsername: data.leaderUsername,
222
+ subAgentUsername: data.subAgentUsername,
223
+ toolName: `delegate_to_${data.subAgentUsername}`,
224
+ task: data.task.substring(0, 2e3),
225
+ result: data.result.substring(0, 5e3),
226
+ status: data.status,
227
+ depth: data.depth,
228
+ durationMs: data.durationMs,
229
+ error: (_a = data.error) == null ? void 0 : _a.substring(0, 2e3),
230
+ userId: ((_c = (_b = ctx.auth) == null ? void 0 : _b.user) == null ? void 0 : _c.id) || ((_e = (_d = ctx.state) == null ? void 0 : _d.currentUser) == null ? void 0 : _e.id)
231
+ }
232
+ });
233
+ } catch (e) {
234
+ plugin.app.log.warn("[AgentOrchestrator] Failed to log delegation event", e);
235
+ }
282
236
  }
283
- /**
284
- * Execute the agent and extract the final AI message content.
285
- * Uses stream mode to collect all chunks, similar to plugin-sub-agent.
286
- * Accepts an AbortSignal so the stream can be cancelled on timeout.
287
- */
288
237
  async function executeAgent(executor, systemPrompt, task, signal) {
289
- const streamOptions = { recursionLimit: 50, streamMode: 'messages' };
290
- if (signal) {
291
- streamOptions.signal = signal;
292
- }
293
- const stream = await executor.stream({
294
- messages: [new messages_1.SystemMessage(systemPrompt), new messages_1.HumanMessage(task)],
295
- }, streamOptions);
296
- let aiContentCache = '';
297
- for await (const chunk of stream) {
298
- // Check abort between chunks
299
- if (signal?.aborted)
300
- break;
301
- const [message] = chunk;
302
- if (message.getType() === 'ai' && message.content) {
303
- aiContentCache += message.content.toString();
304
- }
238
+ const streamOptions = { recursionLimit: 50, streamMode: "messages" };
239
+ if (signal) {
240
+ streamOptions.signal = signal;
241
+ }
242
+ const stream = await executor.stream(
243
+ {
244
+ messages: [new import_messages.SystemMessage(systemPrompt), new import_messages.HumanMessage(task)]
245
+ },
246
+ streamOptions
247
+ );
248
+ let aiContentCache = "";
249
+ for await (const chunk of stream) {
250
+ if (signal == null ? void 0 : signal.aborted) break;
251
+ const [message] = chunk;
252
+ if (message.getType() === "ai" && message.content) {
253
+ aiContentCache += message.content.toString();
305
254
  }
306
- return aiContentCache || '';
255
+ }
256
+ return aiContentCache || "";
307
257
  }
308
- /**
309
- * Create a timeout promise that rejects after the specified duration.
310
- * P3 FIX: Also triggers AbortController to cancel the in-flight stream.
311
- */
312
258
  function createTimeout(ms, agentName, abortController) {
313
- return new Promise((_, reject) => setTimeout(() => {
314
- abortController?.abort();
315
- reject(new Error(`Sub-agent "${agentName}" timed out after ${ms / 1000}s`));
316
- }, ms));
259
+ return new Promise(
260
+ (_, reject) => setTimeout(() => {
261
+ abortController == null ? void 0 : abortController.abort();
262
+ reject(new Error(`Sub-agent "${agentName}" timed out after ${ms / 1e3}s`));
263
+ }, ms)
264
+ );
317
265
  }
266
+ // Annotate the CommonJS export names for ESM import in node:
267
+ 0 && (module.exports = {
268
+ createDelegateToolsProvider
269
+ });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "代理协调器",
5
5
  "displayName.vi-VN": "Điều phối Agent",
6
6
  "description": "Hierarchical Multi-Agent orchestration for NocoBase AI Employees. Enables Leader agents to delegate tasks to Sub-Agent employees without modifying core plugin-ai.",
7
- "version": "1.0.0",
7
+ "version": "1.0.5",
8
8
  "license": "Apache-2.0",
9
9
  "main": "dist/server/index.js",
10
10
  "keywords": [
@@ -5,37 +5,21 @@ import { RulesTab } from './RulesTab';
5
5
  import { TracingTab } from './TracingTab';
6
6
  import { AIEmployeesProvider } from './AIEmployeesContext';
7
7
 
8
- /**
9
- * Main settings page for the Agent Orchestrator plugin.
10
- * Contains two tabs:
11
- * - Rules: Configure which AI Employees can delegate tasks to others
12
- * - Tracing: View and debug delegation execution logs
13
- *
14
- * P3 FIX: Wraps with AIEmployeesProvider so both tabs share one API call.
15
- */
16
8
  export const OrchestratorSettings: React.FC = () => {
17
9
  return (
18
10
  <AIEmployeesProvider>
19
11
  <div style={{ padding: '0 24px 24px' }}>
20
- <Tabs
12
+ <Tabs
21
13
  defaultActiveKey="rules"
22
14
  items={[
23
15
  {
24
16
  key: 'rules',
25
- label: (
26
- <span>
27
- <ApartmentOutlined /> Orchestration Rules
28
- </span>
29
- ),
17
+ label: <span><ApartmentOutlined /> Orchestration Rules</span>,
30
18
  children: <RulesTab />,
31
19
  },
32
20
  {
33
21
  key: 'tracing',
34
- label: (
35
- <span>
36
- <MonitorOutlined /> Swarm Tracing
37
- </span>
38
- ),
22
+ label: <span><MonitorOutlined /> Swarm Tracing</span>,
39
23
  children: <TracingTab />,
40
24
  },
41
25
  ]}