plugin-agent-orchestrator 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.js +1 -8
- package/dist/externalVersion.js +13 -0
- package/dist/index.js +39 -0
- package/dist/node_modules/zod/LICENSE +21 -0
- package/dist/node_modules/zod/index.cjs +1 -0
- package/dist/node_modules/zod/index.d.cts +4 -0
- package/dist/node_modules/zod/index.d.ts +4 -0
- package/dist/node_modules/zod/index.js +4 -0
- package/dist/node_modules/zod/package.json +1 -0
- package/dist/node_modules/zod/src/index.ts +4 -0
- package/dist/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/dist/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/dist/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/dist/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/dist/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/dist/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/dist/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/dist/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/dist/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/dist/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/dist/node_modules/zod/src/v3/errors.ts +13 -0
- package/dist/node_modules/zod/src/v3/external.ts +6 -0
- package/dist/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/dist/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/dist/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/dist/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/dist/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/dist/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/dist/node_modules/zod/src/v3/index.ts +4 -0
- package/dist/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/dist/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/dist/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/dist/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/dist/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/dist/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/dist/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/dist/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/dist/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/dist/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/dist/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/dist/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/dist/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/dist/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/dist/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/dist/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/dist/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/dist/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/dist/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/dist/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/dist/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/dist/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/dist/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/dist/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/dist/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/dist/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/dist/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/dist/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/dist/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/dist/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/dist/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/dist/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/dist/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/dist/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/dist/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/dist/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/dist/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/dist/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/dist/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/dist/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/dist/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/dist/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/dist/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/dist/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/dist/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/dist/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/dist/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/dist/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/dist/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/dist/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/dist/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/dist/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/dist/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/dist/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/dist/node_modules/zod/src/v3/types.ts +5136 -0
- package/dist/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/dist/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/dist/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/dist/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/dist/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/dist/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/dist/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/dist/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/dist/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/dist/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/dist/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/dist/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/dist/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/dist/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/dist/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/dist/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/dist/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/dist/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/dist/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/dist/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/dist/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/dist/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/dist/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/dist/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/dist/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/dist/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/dist/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/dist/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/dist/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/dist/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/dist/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/dist/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/dist/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/dist/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/dist/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/dist/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/dist/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/dist/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/dist/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/dist/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/dist/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/dist/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/dist/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/dist/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/dist/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/dist/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/dist/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/dist/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/dist/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/dist/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/dist/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/dist/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/dist/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/dist/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/dist/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/dist/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/dist/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/dist/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/dist/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/dist/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/dist/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/dist/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/dist/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/dist/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/dist/node_modules/zod/src/v4/core/config.ts +15 -0
- package/dist/node_modules/zod/src/v4/core/core.ts +134 -0
- package/dist/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/dist/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/dist/node_modules/zod/src/v4/core/function.ts +176 -0
- package/dist/node_modules/zod/src/v4/core/index.ts +15 -0
- package/dist/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/dist/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/dist/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/dist/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/dist/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/dist/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/dist/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/dist/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/dist/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/dist/node_modules/zod/src/v4/core/util.ts +775 -0
- package/dist/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/dist/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/dist/node_modules/zod/src/v4/index.ts +4 -0
- package/dist/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/dist/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/dist/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/dist/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/dist/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/dist/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/dist/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/dist/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/dist/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/dist/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/dist/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/dist/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/dist/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/dist/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/dist/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/dist/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/dist/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/dist/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/dist/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/dist/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/dist/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/dist/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/dist/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/dist/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/dist/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/dist/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/dist/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/dist/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/dist/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/dist/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/dist/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/dist/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/dist/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/dist/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/dist/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/dist/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/dist/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/dist/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/dist/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/dist/node_modules/zod/v3/ZodError.cjs +138 -0
- package/dist/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/dist/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/dist/node_modules/zod/v3/ZodError.js +133 -0
- package/dist/node_modules/zod/v3/errors.cjs +17 -0
- package/dist/node_modules/zod/v3/errors.d.cts +5 -0
- package/dist/node_modules/zod/v3/errors.d.ts +5 -0
- package/dist/node_modules/zod/v3/errors.js +9 -0
- package/dist/node_modules/zod/v3/external.cjs +22 -0
- package/dist/node_modules/zod/v3/external.d.cts +6 -0
- package/dist/node_modules/zod/v3/external.d.ts +6 -0
- package/dist/node_modules/zod/v3/external.js +6 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/dist/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/dist/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/dist/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/dist/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/dist/node_modules/zod/v3/helpers/util.js +133 -0
- package/dist/node_modules/zod/v3/index.cjs +33 -0
- package/dist/node_modules/zod/v3/index.d.cts +4 -0
- package/dist/node_modules/zod/v3/index.d.ts +4 -0
- package/dist/node_modules/zod/v3/index.js +4 -0
- package/dist/node_modules/zod/v3/locales/en.cjs +111 -0
- package/dist/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/dist/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/dist/node_modules/zod/v3/locales/en.js +109 -0
- package/dist/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/dist/node_modules/zod/v3/standard-schema.js +1 -0
- package/dist/node_modules/zod/v3/types.cjs +3775 -0
- package/dist/node_modules/zod/v3/types.d.cts +1031 -0
- package/dist/node_modules/zod/v3/types.d.ts +1031 -0
- package/dist/node_modules/zod/v3/types.js +3693 -0
- package/dist/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/dist/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/classic/checks.js +1 -0
- package/dist/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/dist/node_modules/zod/v4/classic/coerce.js +17 -0
- package/dist/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/dist/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/dist/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/dist/node_modules/zod/v4/classic/compat.js +27 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/dist/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/dist/node_modules/zod/v4/classic/errors.js +41 -0
- package/dist/node_modules/zod/v4/classic/external.cjs +70 -0
- package/dist/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/dist/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/dist/node_modules/zod/v4/classic/external.js +18 -0
- package/dist/node_modules/zod/v4/classic/index.cjs +33 -0
- package/dist/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/dist/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/dist/node_modules/zod/v4/classic/index.js +4 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/dist/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/classic/iso.js +30 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/dist/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/dist/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/dist/node_modules/zod/v4/classic/parse.js +6 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/dist/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/dist/node_modules/zod/v4/core/api.cjs +1039 -0
- package/dist/node_modules/zod/v4/core/api.d.cts +284 -0
- package/dist/node_modules/zod/v4/core/api.d.ts +284 -0
- package/dist/node_modules/zod/v4/core/api.js +906 -0
- package/dist/node_modules/zod/v4/core/checks.cjs +591 -0
- package/dist/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/dist/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/dist/node_modules/zod/v4/core/checks.js +565 -0
- package/dist/node_modules/zod/v4/core/core.cjs +67 -0
- package/dist/node_modules/zod/v4/core/core.d.cts +49 -0
- package/dist/node_modules/zod/v4/core/core.d.ts +49 -0
- package/dist/node_modules/zod/v4/core/core.js +61 -0
- package/dist/node_modules/zod/v4/core/doc.cjs +39 -0
- package/dist/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/dist/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/dist/node_modules/zod/v4/core/doc.js +35 -0
- package/dist/node_modules/zod/v4/core/errors.cjs +226 -0
- package/dist/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/dist/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/dist/node_modules/zod/v4/core/errors.js +195 -0
- package/dist/node_modules/zod/v4/core/function.cjs +102 -0
- package/dist/node_modules/zod/v4/core/function.d.cts +52 -0
- package/dist/node_modules/zod/v4/core/function.d.ts +52 -0
- package/dist/node_modules/zod/v4/core/function.js +75 -0
- package/dist/node_modules/zod/v4/core/index.cjs +44 -0
- package/dist/node_modules/zod/v4/core/index.d.cts +15 -0
- package/dist/node_modules/zod/v4/core/index.d.ts +15 -0
- package/dist/node_modules/zod/v4/core/index.js +15 -0
- package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/dist/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/dist/node_modules/zod/v4/core/json-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/parse.cjs +87 -0
- package/dist/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/dist/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/dist/node_modules/zod/v4/core/parse.js +57 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/dist/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/dist/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/dist/node_modules/zod/v4/core/regexes.js +95 -0
- package/dist/node_modules/zod/v4/core/registries.cjs +56 -0
- package/dist/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/dist/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/dist/node_modules/zod/v4/core/registries.js +51 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/dist/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/dist/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/dist/node_modules/zod/v4/core/schemas.js +1717 -0
- package/dist/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/dist/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/dist/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/dist/node_modules/zod/v4/core/util.cjs +539 -0
- package/dist/node_modules/zod/v4/core/util.d.cts +183 -0
- package/dist/node_modules/zod/v4/core/util.d.ts +183 -0
- package/dist/node_modules/zod/v4/core/util.js +493 -0
- package/dist/node_modules/zod/v4/core/versions.cjs +8 -0
- package/dist/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/dist/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/dist/node_modules/zod/v4/core/versions.js +5 -0
- package/dist/node_modules/zod/v4/index.cjs +22 -0
- package/dist/node_modules/zod/v4/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/index.js +3 -0
- package/dist/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ar.js +116 -0
- package/dist/node_modules/zod/v4/locales/az.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/az.js +115 -0
- package/dist/node_modules/zod/v4/locales/be.cjs +190 -0
- package/dist/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/be.js +164 -0
- package/dist/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/dist/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ca.js +118 -0
- package/dist/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/dist/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/cs.js +135 -0
- package/dist/node_modules/zod/v4/locales/de.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/de.js +116 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +145 -0
- package/dist/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/en.js +117 -0
- package/dist/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/dist/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/eo.js +116 -0
- package/dist/node_modules/zod/v4/locales/es.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/es.js +117 -0
- package/dist/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/dist/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fa.js +122 -0
- package/dist/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/dist/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fi.js +122 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/dist/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/fr.js +116 -0
- package/dist/node_modules/zod/v4/locales/he.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/he.js +117 -0
- package/dist/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/hu.js +117 -0
- package/dist/node_modules/zod/v4/locales/id.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/id.js +116 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +84 -0
- package/dist/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/dist/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/dist/node_modules/zod/v4/locales/index.js +39 -0
- package/dist/node_modules/zod/v4/locales/it.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/it.js +117 -0
- package/dist/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/dist/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ja.js +115 -0
- package/dist/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/kh.js +117 -0
- package/dist/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/dist/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ko.js +121 -0
- package/dist/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/dist/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/mk.js +118 -0
- package/dist/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ms.js +116 -0
- package/dist/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/nl.js +117 -0
- package/dist/node_modules/zod/v4/locales/no.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/no.js +116 -0
- package/dist/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ota.js +117 -0
- package/dist/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pl.js +117 -0
- package/dist/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/dist/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ps.js +122 -0
- package/dist/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/pt.js +116 -0
- package/dist/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/dist/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ru.js +164 -0
- package/dist/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sl.js +117 -0
- package/dist/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/dist/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/sv.js +118 -0
- package/dist/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ta.js +117 -0
- package/dist/node_modules/zod/v4/locales/th.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/th.js +117 -0
- package/dist/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/dist/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/dist/node_modules/zod/v4/locales/tr.js +115 -0
- package/dist/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ua.js +117 -0
- package/dist/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/ur.js +117 -0
- package/dist/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/vi.js +116 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/dist/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/dist/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/checks.js +1 -0
- package/dist/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/dist/node_modules/zod/v4/mini/coerce.js +17 -0
- package/dist/node_modules/zod/v4/mini/external.cjs +62 -0
- package/dist/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/dist/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/dist/node_modules/zod/v4/mini/external.js +13 -0
- package/dist/node_modules/zod/v4/mini/index.cjs +32 -0
- package/dist/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/dist/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/dist/node_modules/zod/v4/mini/index.js +3 -0
- package/dist/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/dist/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/dist/node_modules/zod/v4/mini/iso.js +30 -0
- package/dist/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/dist/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/dist/node_modules/zod/v4/mini/parse.js +1 -0
- package/dist/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/dist/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/dist/node_modules/zod/v4/mini/schemas.js +732 -0
- package/dist/node_modules/zod/v4-mini/index.cjs +17 -0
- package/dist/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/dist/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/dist/node_modules/zod/v4-mini/index.js +1 -0
- package/dist/server/collections/orchestrator-config.js +70 -0
- package/dist/server/collections/orchestrator-logs.js +114 -0
- package/dist/server/index.js +32 -7
- package/dist/server/plugin.js +64 -42
- package/dist/server/resources/tracing.js +97 -83
- package/dist/server/tools/delegate-task.js +244 -301
- package/package.json +1 -1
- package/dist/client/AIEmployeeSelect.js +0 -29
- package/dist/client/AIEmployeesContext.js +0 -64
- package/dist/client/OrchestratorSettings.js +0 -32
- package/dist/client/RulesTab.js +0 -144
- package/dist/client/TracingTab.js +0 -88
- package/dist/client/plugin.js +0 -17
- /package/dist/{client/locale → locale}/en-US.json +0 -0
- /package/dist/{client/locale → locale}/vi-VN.json +0 -0
|
@@ -1,317 +1,260 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var delegate_task_exports = {};
|
|
19
|
+
__export(delegate_task_exports, {
|
|
20
|
+
createDelegateToolsProvider: () => createDelegateToolsProvider
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(delegate_task_exports);
|
|
23
|
+
var import_zod = require("zod");
|
|
24
|
+
var import_prebuilt = require("@langchain/langgraph/prebuilt");
|
|
25
|
+
var import_tools = require("@langchain/core/tools");
|
|
26
|
+
var import_messages = require("@langchain/core/messages");
|
|
27
|
+
const ORCHESTRATOR_DEPTH_KEY = "__orchestratorDepth";
|
|
28
28
|
function createDelegateToolsProvider(plugin) {
|
|
29
|
-
|
|
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();
|
|
29
|
+
return async (register) => {
|
|
148
30
|
try {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
31
|
+
const configRepo = plugin.db.getRepository("orchestratorConfig");
|
|
32
|
+
if (!configRepo) return;
|
|
33
|
+
const configs = await configRepo.find({
|
|
34
|
+
filter: { enabled: true }
|
|
35
|
+
});
|
|
36
|
+
if (!(configs == null ? void 0 : configs.length)) return;
|
|
37
|
+
const leadersByTool = /* @__PURE__ */ new Map();
|
|
38
|
+
for (const config of configs) {
|
|
39
|
+
const toolName = `delegate_to_${config.subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
40
|
+
if (!leadersByTool.has(toolName)) {
|
|
41
|
+
leadersByTool.set(toolName, /* @__PURE__ */ new Set());
|
|
152
42
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
43
|
+
leadersByTool.get(toolName).add(config.leaderUsername);
|
|
44
|
+
}
|
|
45
|
+
const seenSubAgents = /* @__PURE__ */ new Set();
|
|
46
|
+
for (const config of configs) {
|
|
47
|
+
const { leaderUsername, subAgentUsername, maxDepth, timeout } = config;
|
|
48
|
+
if (seenSubAgents.has(subAgentUsername)) continue;
|
|
49
|
+
seenSubAgents.add(subAgentUsername);
|
|
50
|
+
const subAgentEmployee = await plugin.db.getRepository("aiEmployees").findOne({
|
|
51
|
+
filter: { username: subAgentUsername }
|
|
161
52
|
});
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
53
|
+
if (!subAgentEmployee) continue;
|
|
54
|
+
const toolName = `delegate_to_${subAgentUsername.replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
55
|
+
const toolDescription = [
|
|
56
|
+
`Delegate a task to the AI Employee "${subAgentEmployee.nickname || subAgentUsername}".`,
|
|
57
|
+
subAgentEmployee.about ? `Specialist profile: ${subAgentEmployee.about.substring(0, 200)}` : "",
|
|
58
|
+
"The sub-agent will execute the task independently and return its final answer."
|
|
59
|
+
].filter(Boolean).join(" ");
|
|
60
|
+
const allowedLeaders = leadersByTool.get(toolName);
|
|
61
|
+
register.registerTools({
|
|
62
|
+
scope: "CUSTOM",
|
|
63
|
+
execution: "backend",
|
|
64
|
+
defaultPermission: "ALLOW",
|
|
65
|
+
silence: false,
|
|
66
|
+
introduction: {
|
|
67
|
+
title: `[Sub-Agent] ${subAgentEmployee.nickname || subAgentUsername}`,
|
|
68
|
+
about: toolDescription
|
|
69
|
+
},
|
|
70
|
+
definition: {
|
|
71
|
+
name: toolName,
|
|
72
|
+
description: toolDescription,
|
|
73
|
+
schema: import_zod.z.object({
|
|
74
|
+
task: import_zod.z.string().describe("The detailed task description for the sub-agent to execute."),
|
|
75
|
+
context: import_zod.z.string().optional().describe("Optional additional context to help the sub-agent understand the task better.")
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
invoke: async (ctx, args, id) => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
const callingEmployee = ((_a = ctx._currentAIEmployee) == null ? void 0 : _a.username) || ((_b = ctx.state) == null ? void 0 : _b.currentAIEmployee);
|
|
81
|
+
if (callingEmployee && !allowedLeaders.has(callingEmployee)) {
|
|
82
|
+
return {
|
|
83
|
+
status: "error",
|
|
84
|
+
content: `Employee "${callingEmployee}" is not authorized to delegate to "${subAgentUsername}". Configure an orchestration rule first.`
|
|
85
|
+
};
|
|
183
86
|
}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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,
|
|
87
|
+
return invokeDelegateTask(ctx, plugin, {
|
|
88
|
+
leaderUsername: callingEmployee || Array.from(allowedLeaders)[0] || "",
|
|
89
|
+
subAgentUsername,
|
|
90
|
+
subAgentEmployee,
|
|
91
|
+
task: args.task,
|
|
92
|
+
context: args.context,
|
|
93
|
+
maxDepth: maxDepth ?? 1,
|
|
94
|
+
timeout: timeout ?? 12e4,
|
|
95
|
+
toolCallId: id
|
|
96
|
+
});
|
|
97
|
+
}
|
|
231
98
|
});
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
};
|
|
99
|
+
}
|
|
100
|
+
} catch (e) {
|
|
101
|
+
plugin.app.log.error("[AgentOrchestrator] Failed to register delegate tools", e);
|
|
254
102
|
}
|
|
103
|
+
};
|
|
255
104
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
userId: ctx.auth?.user?.id || ctx.state?.currentUser?.id,
|
|
276
|
-
},
|
|
277
|
-
});
|
|
105
|
+
async function invokeDelegateTask(ctx, plugin, options) {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
const { leaderUsername, subAgentUsername, subAgentEmployee, task, context, maxDepth, timeout, toolCallId } = options;
|
|
108
|
+
const currentDepth = ctx[ORCHESTRATOR_DEPTH_KEY] ?? 0;
|
|
109
|
+
if (currentDepth >= maxDepth) {
|
|
110
|
+
return {
|
|
111
|
+
status: "error",
|
|
112
|
+
content: `Delegation depth limit reached (${currentDepth}/${maxDepth}). Sub-agent "${subAgentUsername}" cannot delegate further.`
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
const startTime = Date.now();
|
|
116
|
+
try {
|
|
117
|
+
const aiPlugin = ctx.app.pm.get("ai");
|
|
118
|
+
if (!aiPlugin) {
|
|
119
|
+
throw new Error("Plugin AI is not installed or enabled");
|
|
120
|
+
}
|
|
121
|
+
const modelSettings = subAgentEmployee.modelSettings;
|
|
122
|
+
if (!(modelSettings == null ? void 0 : modelSettings.llmService) || !(modelSettings == null ? void 0 : modelSettings.model)) {
|
|
123
|
+
throw new Error(`Sub-agent "${subAgentUsername}" has no LLM model configured. Please configure a model in the AI Employee settings.`);
|
|
278
124
|
}
|
|
279
|
-
|
|
280
|
-
|
|
125
|
+
const { provider } = await aiPlugin.aiManager.getLLMService({
|
|
126
|
+
llmService: modelSettings.llmService,
|
|
127
|
+
model: modelSettings.model
|
|
128
|
+
});
|
|
129
|
+
const chatModel = provider.createModel();
|
|
130
|
+
const coreToolsManager = ctx.app.aiManager.toolsManager;
|
|
131
|
+
const allTools = await coreToolsManager.listTools();
|
|
132
|
+
const employeeSkills = (((_a = subAgentEmployee.skillSettings) == null ? void 0 : _a.skills) ?? []).map((s) => typeof s === "string" ? s : s.name).filter(Boolean);
|
|
133
|
+
const langchainTools = [];
|
|
134
|
+
for (const toolEntry of allTools) {
|
|
135
|
+
const toolName = toolEntry.definition.name;
|
|
136
|
+
if (!toolName) continue;
|
|
137
|
+
if (!employeeSkills.includes(toolName) || toolName.startsWith("delegate_to_")) {
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
langchainTools.push(
|
|
141
|
+
new import_tools.DynamicStructuredTool({
|
|
142
|
+
name: toolName.replace(/[^a-zA-Z0-9_-]/g, "_"),
|
|
143
|
+
description: toolEntry.definition.description || toolName,
|
|
144
|
+
schema: toolEntry.definition.schema || import_zod.z.object({}),
|
|
145
|
+
func: async (toolArgs) => {
|
|
146
|
+
const invokeCtx = Object.create(ctx);
|
|
147
|
+
invokeCtx[ORCHESTRATOR_DEPTH_KEY] = currentDepth + 1;
|
|
148
|
+
const res = await toolEntry.invoke(invokeCtx, toolArgs, `orch-${toolCallId}`);
|
|
149
|
+
if ((res == null ? void 0 : res.status) === "error") {
|
|
150
|
+
throw new Error(`Tool <${toolName}> failed: ${res.content}`);
|
|
151
|
+
}
|
|
152
|
+
return typeof (res == null ? void 0 : res.content) === "string" ? res.content : JSON.stringify(res);
|
|
153
|
+
}
|
|
154
|
+
})
|
|
155
|
+
);
|
|
281
156
|
}
|
|
157
|
+
const abortController = new AbortController();
|
|
158
|
+
const executor = (0, import_prebuilt.createReactAgent)({
|
|
159
|
+
llm: chatModel,
|
|
160
|
+
tools: langchainTools
|
|
161
|
+
});
|
|
162
|
+
const systemPrompt = ((_b = subAgentEmployee.chatSettings) == null ? void 0 : _b.systemPrompt) || subAgentEmployee.bio || `You are an AI assistant named "${subAgentEmployee.nickname || subAgentUsername}". ${subAgentEmployee.about || ""}`;
|
|
163
|
+
const combinedTask = context ? `Task: ${task}
|
|
164
|
+
|
|
165
|
+
Context Provided:
|
|
166
|
+
${context}` : `Task: ${task}`;
|
|
167
|
+
const invokePromise = executeAgent(executor, systemPrompt, combinedTask, abortController.signal);
|
|
168
|
+
const result = await Promise.race([
|
|
169
|
+
invokePromise,
|
|
170
|
+
createTimeout(timeout, subAgentUsername, abortController)
|
|
171
|
+
]);
|
|
172
|
+
const content = result || "Sub-agent completed the task but produced no output.";
|
|
173
|
+
await logDelegation(ctx, plugin, {
|
|
174
|
+
leaderUsername,
|
|
175
|
+
subAgentUsername,
|
|
176
|
+
task,
|
|
177
|
+
result: content,
|
|
178
|
+
status: "success",
|
|
179
|
+
depth: currentDepth,
|
|
180
|
+
durationMs: Date.now() - startTime
|
|
181
|
+
});
|
|
182
|
+
return {
|
|
183
|
+
status: "success",
|
|
184
|
+
content
|
|
185
|
+
};
|
|
186
|
+
} catch (e) {
|
|
187
|
+
plugin.app.log.error(`[AgentOrchestrator] Sub-agent ${subAgentUsername} failed`, e);
|
|
188
|
+
await logDelegation(ctx, plugin, {
|
|
189
|
+
leaderUsername,
|
|
190
|
+
subAgentUsername,
|
|
191
|
+
task,
|
|
192
|
+
result: "",
|
|
193
|
+
status: "error",
|
|
194
|
+
depth: currentDepth,
|
|
195
|
+
durationMs: Date.now() - startTime,
|
|
196
|
+
error: e.message
|
|
197
|
+
}).catch(() => {
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
status: "error",
|
|
201
|
+
content: `Sub-agent "${subAgentUsername}" failed: ${e.message}`
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function logDelegation(ctx, plugin, data) {
|
|
206
|
+
var _a, _b, _c, _d, _e;
|
|
207
|
+
try {
|
|
208
|
+
const logsRepo = plugin.db.getRepository("orchestratorLogs");
|
|
209
|
+
if (!logsRepo) return;
|
|
210
|
+
await logsRepo.create({
|
|
211
|
+
values: {
|
|
212
|
+
leaderUsername: data.leaderUsername,
|
|
213
|
+
subAgentUsername: data.subAgentUsername,
|
|
214
|
+
toolName: `delegate_to_${data.subAgentUsername}`,
|
|
215
|
+
task: data.task.substring(0, 2e3),
|
|
216
|
+
result: data.result.substring(0, 5e3),
|
|
217
|
+
status: data.status,
|
|
218
|
+
depth: data.depth,
|
|
219
|
+
durationMs: data.durationMs,
|
|
220
|
+
error: (_a = data.error) == null ? void 0 : _a.substring(0, 2e3),
|
|
221
|
+
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)
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
} catch (e) {
|
|
225
|
+
plugin.app.log.warn("[AgentOrchestrator] Failed to log delegation event", e);
|
|
226
|
+
}
|
|
282
227
|
}
|
|
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
228
|
async function executeAgent(executor, systemPrompt, task, signal) {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
229
|
+
const streamOptions = { recursionLimit: 50, streamMode: "messages" };
|
|
230
|
+
if (signal) {
|
|
231
|
+
streamOptions.signal = signal;
|
|
232
|
+
}
|
|
233
|
+
const stream = await executor.stream(
|
|
234
|
+
{
|
|
235
|
+
messages: [new import_messages.SystemMessage(systemPrompt), new import_messages.HumanMessage(task)]
|
|
236
|
+
},
|
|
237
|
+
streamOptions
|
|
238
|
+
);
|
|
239
|
+
let aiContentCache = "";
|
|
240
|
+
for await (const chunk of stream) {
|
|
241
|
+
if (signal == null ? void 0 : signal.aborted) break;
|
|
242
|
+
const [message] = chunk;
|
|
243
|
+
if (message.getType() === "ai" && message.content) {
|
|
244
|
+
aiContentCache += message.content.toString();
|
|
305
245
|
}
|
|
306
|
-
|
|
246
|
+
}
|
|
247
|
+
return aiContentCache || "";
|
|
307
248
|
}
|
|
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
249
|
function createTimeout(ms, agentName, abortController) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
250
|
+
return new Promise(
|
|
251
|
+
(_, reject) => setTimeout(() => {
|
|
252
|
+
abortController == null ? void 0 : abortController.abort();
|
|
253
|
+
reject(new Error(`Sub-agent "${agentName}" timed out after ${ms / 1e3}s`));
|
|
254
|
+
}, ms)
|
|
255
|
+
);
|
|
317
256
|
}
|
|
257
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
258
|
+
0 && (module.exports = {
|
|
259
|
+
createDelegateToolsProvider
|
|
260
|
+
});
|
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.
|
|
7
|
+
"version": "1.0.1",
|
|
8
8
|
"license": "Apache-2.0",
|
|
9
9
|
"main": "dist/server/index.js",
|
|
10
10
|
"keywords": [
|
|
@@ -1,29 +0,0 @@
|
|
|
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.AIEmployeeSelect = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const antd_1 = require("antd");
|
|
10
|
-
const AIEmployeesContext_1 = require("./AIEmployeesContext");
|
|
11
|
-
/**
|
|
12
|
-
* Reusable Select component for AI Employees.
|
|
13
|
-
* P3 FIX: Uses shared AIEmployeesContext instead of making its own API call.
|
|
14
|
-
*/
|
|
15
|
-
const AIEmployeeSelect = ({ value, onChange, exclude, placeholder = 'Select AI Employee...' }) => {
|
|
16
|
-
const { employees, loading } = (0, AIEmployeesContext_1.useAIEmployees)();
|
|
17
|
-
const options = react_1.default.useMemo(() => {
|
|
18
|
-
return employees
|
|
19
|
-
.filter((emp) => !exclude || emp.username !== exclude)
|
|
20
|
-
.map((emp) => ({
|
|
21
|
-
label: emp.nickname,
|
|
22
|
-
value: emp.username,
|
|
23
|
-
description: emp.about,
|
|
24
|
-
}));
|
|
25
|
-
}, [employees, exclude]);
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(antd_1.Select, { loading: loading, options: options, value: value, onChange: onChange, placeholder: placeholder, showSearch: true, filterOption: (input, option) => (option?.label ?? '').toString().toLowerCase().includes(input.toLowerCase()) ||
|
|
27
|
-
(option?.value ?? '').toString().toLowerCase().includes(input.toLowerCase()), optionRender: (option) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { style: { fontWeight: 500 }, children: option.label }), option.data.description && ((0, jsx_runtime_1.jsx)("div", { style: { fontSize: 12, color: '#888' }, children: option.data.description }))] })) }));
|
|
28
|
-
};
|
|
29
|
-
exports.AIEmployeeSelect = AIEmployeeSelect;
|