@llm-dev-ops/agentics-cli 1.4.53 → 1.4.54
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/bundled-agents/connector-hub-agents/package-lock.json +11697 -0
- package/dist/bundled-agents/connector-hub-agents/package.json +75 -0
- package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +22 -0
- package/dist/bundled-agents/connector-hub-agents/tsconfig.json +57 -0
- package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +17 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +14 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +35 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +55 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +40 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +22 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +38 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +34 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +186 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +36 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +121 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +157 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +948 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +23 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +50 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +214 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +91 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +1166 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +308 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +62 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +400 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +113 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +250 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +169 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +17 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +97 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +1674 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +1085 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +218 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +949 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +253 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +657 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +205 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +285 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +106 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +581 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +136 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +791 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +225 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +120 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +535 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +18 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +4 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +123 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +609 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +10 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +111 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +686 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +6 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +15 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +126 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +780 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +127 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +483 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +122 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +645 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +156 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +88 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/index.js +4 -0
- package/dist/bundled-agents/copilot-agents/functions/jest.config.js +29 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +14 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +35 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +21 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +22 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +38 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +34 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +174 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +107 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +157 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +941 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +23 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +50 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +185 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +86 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +1081 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +305 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +62 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +315 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +110 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +250 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +169 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +16 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +88 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +1674 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +1000 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +215 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +864 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +250 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +572 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +202 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +496 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +133 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +706 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +222 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +107 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +360 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +18 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +4 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +123 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +609 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +10 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +111 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +686 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +6 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +15 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +126 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +780 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +119 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +421 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +122 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +645 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +156 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +88 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/package-lock.json +5473 -0
- package/dist/bundled-agents/copilot-agents/functions/package.json +40 -0
- package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +71 -0
- package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +36 -0
- package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +77 -0
- package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +340 -0
- package/dist/bundled-agents/copilot-agents/functions/src/health.ts +53 -0
- package/dist/bundled-agents/copilot-agents/functions/src/index.ts +201 -0
- package/dist/bundled-agents/copilot-agents/functions/src/router.ts +148 -0
- package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +31 -0
- package/dist/bundled-agents/copilot-agents/package-lock.json +11825 -0
- package/dist/bundled-agents/copilot-agents/package.json +5 -0
- package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +8282 -0
- package/dist/bundled-agents/governance-dashboard-agents/package.json +13 -0
- package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +590 -0
- package/dist/bundled-agents/orchestrator-agents/functions/index.js +442 -0
- package/dist/bundled-agents/orchestrator-agents/functions/test.js +325 -0
- package/dist/bundled-agents/orchestrator-agents/index.js +6 -0
- package/dist/bundled-agents/orchestrator-agents/package-lock.json +13254 -0
- package/dist/bundled-agents/orchestrator-agents/package.json +20 -0
- package/dist/bundled-agents/platform-agents/package-lock.json +1723 -0
- package/dist/bundled-agents/platform-agents/package.json +22 -0
- package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +463 -0
- package/dist/bundled-agents/platform-agents/src/agents/decision.ts +234 -0
- package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +229 -0
- package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +327 -0
- package/dist/bundled-agents/platform-agents/src/claude.ts +71 -0
- package/dist/bundled-agents/platform-agents/src/cors.ts +24 -0
- package/dist/bundled-agents/platform-agents/src/envelope.ts +37 -0
- package/dist/bundled-agents/platform-agents/src/health.ts +20 -0
- package/dist/bundled-agents/platform-agents/src/index.ts +171 -0
- package/dist/bundled-agents/platform-agents/src/router.ts +38 -0
- package/dist/bundled-agents/platform-agents/src/text-analysis.ts +238 -0
- package/dist/bundled-agents/platform-agents/tsconfig.json +19 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +43 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +30 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +53 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +51 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +36 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +2 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.js +70 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/package-lock.json +12591 -0
- package/dist/bundled-agents/sentinel-agents/package.json +62 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +46 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +33 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +56 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +54 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +38 -0
- package/dist/bundled-agents/sentinel-agents/src/claude.ts +71 -0
- package/dist/bundled-agents/sentinel-agents/src/index.ts +77 -0
- package/dist/bundled-agents/sentinel-agents/tsconfig.json +20 -0
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +52 -0
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js +15 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.js +9 -0
- package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.js +41 -0
- package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// Tests for orchestrator-agents Cloud Function
|
|
5
|
+
// =============================================================================
|
|
6
|
+
|
|
7
|
+
const { handler } = require('./index');
|
|
8
|
+
const { AGENT_CONTRACTS } = require('./contracts');
|
|
9
|
+
|
|
10
|
+
let passed = 0;
|
|
11
|
+
let failed = 0;
|
|
12
|
+
|
|
13
|
+
function assert(condition, message) {
|
|
14
|
+
if (!condition) {
|
|
15
|
+
console.error(` FAIL: ${message}`);
|
|
16
|
+
failed++;
|
|
17
|
+
} else {
|
|
18
|
+
console.log(` PASS: ${message}`);
|
|
19
|
+
passed++;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function mockReq(method, path, body, headers) {
|
|
24
|
+
return {
|
|
25
|
+
method: method || 'GET',
|
|
26
|
+
path: path || '/',
|
|
27
|
+
body: body || {},
|
|
28
|
+
headers: headers || {},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function mockRes() {
|
|
33
|
+
const res = {
|
|
34
|
+
_status: null,
|
|
35
|
+
_body: null,
|
|
36
|
+
_headers: {},
|
|
37
|
+
status(code) { res._status = code; return res; },
|
|
38
|
+
json(body) { res._body = body; return res; },
|
|
39
|
+
send(body) { res._body = body; return res; },
|
|
40
|
+
set(key, value) { res._headers[key] = value; return res; },
|
|
41
|
+
};
|
|
42
|
+
return res;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function assertMetadata(res, testName) {
|
|
46
|
+
const body = res._body;
|
|
47
|
+
assert(body.execution_metadata !== undefined, `${testName}: has execution_metadata`);
|
|
48
|
+
assert(body.execution_metadata.trace_id !== undefined, `${testName}: has trace_id`);
|
|
49
|
+
assert(body.execution_metadata.timestamp !== undefined, `${testName}: has timestamp`);
|
|
50
|
+
assert(body.execution_metadata.service === 'orchestrator-agents', `${testName}: service is orchestrator-agents`);
|
|
51
|
+
assert(body.execution_metadata.execution_id !== undefined, `${testName}: has execution_id`);
|
|
52
|
+
assert(Array.isArray(body.layers_executed), `${testName}: has layers_executed array`);
|
|
53
|
+
assert(body.layers_executed.length >= 2, `${testName}: layers_executed has >= 2 entries`);
|
|
54
|
+
assert(body.layers_executed[0].layer === 'AGENT_ROUTING', `${testName}: first layer is AGENT_ROUTING`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// =============================================================================
|
|
58
|
+
// Test: Root endpoint
|
|
59
|
+
// =============================================================================
|
|
60
|
+
console.log('\n--- Root Endpoint ---');
|
|
61
|
+
{
|
|
62
|
+
const req = mockReq('GET', '/');
|
|
63
|
+
const res = mockRes();
|
|
64
|
+
handler(req, res);
|
|
65
|
+
assert(res._status === 200, 'Root returns 200');
|
|
66
|
+
assert(res._body.service === 'orchestrator-agents', 'Root returns correct service');
|
|
67
|
+
assert(res._body.version === '0.1.5', 'Root returns correct version');
|
|
68
|
+
assert(Array.isArray(res._body.agents), 'Root lists agents');
|
|
69
|
+
assert(res._body.agents.length === 7, 'Root lists 7 agents');
|
|
70
|
+
assertMetadata(res, 'Root');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// =============================================================================
|
|
74
|
+
// Test: Health endpoint
|
|
75
|
+
// =============================================================================
|
|
76
|
+
console.log('\n--- Health Endpoint ---');
|
|
77
|
+
{
|
|
78
|
+
const req = mockReq('GET', '/health');
|
|
79
|
+
const res = mockRes();
|
|
80
|
+
handler(req, res);
|
|
81
|
+
assert(res._status === 200, 'Health returns 200');
|
|
82
|
+
assert(res._body.status === 'healthy', 'Health status is healthy');
|
|
83
|
+
assert(res._body.service === 'orchestrator-agents', 'Health service correct');
|
|
84
|
+
const agents = res._body.agents_list;
|
|
85
|
+
assert(Array.isArray(agents), 'Health agents_list is array');
|
|
86
|
+
assert(agents.length === 7, 'Health lists 7 agents');
|
|
87
|
+
assert(agents.includes('workflow'), 'Health includes workflow');
|
|
88
|
+
assert(agents.includes('scheduler'), 'Health includes scheduler');
|
|
89
|
+
assert(agents.includes('dependencies'), 'Health includes dependencies');
|
|
90
|
+
assert(agents.includes('retry'), 'Health includes retry');
|
|
91
|
+
assert(agents.includes('parallel'), 'Health includes parallel');
|
|
92
|
+
assert(agents.includes('state-machine'), 'Health includes state-machine');
|
|
93
|
+
assert(agents.includes('swarm'), 'Health includes swarm');
|
|
94
|
+
assertMetadata(res, 'Health');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// =============================================================================
|
|
98
|
+
// Test: Ready endpoint
|
|
99
|
+
// =============================================================================
|
|
100
|
+
console.log('\n--- Ready Endpoint ---');
|
|
101
|
+
{
|
|
102
|
+
const req = mockReq('GET', '/ready');
|
|
103
|
+
const res = mockRes();
|
|
104
|
+
handler(req, res);
|
|
105
|
+
assert(res._status === 200, 'Ready returns 200');
|
|
106
|
+
assert(res._body.ready === true, 'Ready is true');
|
|
107
|
+
assert(res._body.checks.agents_registered === true, 'All agents registered');
|
|
108
|
+
assert(res._body.checks.contracts_loaded === true, 'All contracts loaded');
|
|
109
|
+
assert(res._body.checks.handlers_available === true, 'All handlers available');
|
|
110
|
+
assertMetadata(res, 'Ready');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// =============================================================================
|
|
114
|
+
// Test: CORS preflight
|
|
115
|
+
// =============================================================================
|
|
116
|
+
console.log('\n--- CORS ---');
|
|
117
|
+
{
|
|
118
|
+
const req = mockReq('OPTIONS', '/v1/orchestrator/workflow');
|
|
119
|
+
const res = mockRes();
|
|
120
|
+
handler(req, res);
|
|
121
|
+
assert(res._status === 204, 'OPTIONS returns 204');
|
|
122
|
+
assert(res._headers['Access-Control-Allow-Origin'] === '*', 'CORS origin header set');
|
|
123
|
+
assert(res._headers['Access-Control-Allow-Methods'].includes('POST'), 'CORS methods include POST');
|
|
124
|
+
assert(res._headers['Access-Control-Allow-Headers'].includes('X-Correlation-ID'), 'CORS headers include X-Correlation-ID');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// =============================================================================
|
|
128
|
+
// Test: X-Correlation-ID propagation
|
|
129
|
+
// =============================================================================
|
|
130
|
+
console.log('\n--- Correlation ID ---');
|
|
131
|
+
{
|
|
132
|
+
const traceId = 'test-trace-12345';
|
|
133
|
+
const req = mockReq('GET', '/health', {}, { 'x-correlation-id': traceId });
|
|
134
|
+
const res = mockRes();
|
|
135
|
+
handler(req, res);
|
|
136
|
+
assert(res._body.execution_metadata.trace_id === traceId, 'trace_id matches X-Correlation-ID header');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// =============================================================================
|
|
140
|
+
// Test: Contracts endpoint
|
|
141
|
+
// =============================================================================
|
|
142
|
+
console.log('\n--- Contracts ---');
|
|
143
|
+
{
|
|
144
|
+
const req = mockReq('GET', '/v1/orchestrator/contracts');
|
|
145
|
+
const res = mockRes();
|
|
146
|
+
handler(req, res);
|
|
147
|
+
assert(res._status === 200, 'Contracts returns 200');
|
|
148
|
+
assert(Object.keys(res._body).length > 7, 'Contracts returns all agents (+ metadata)');
|
|
149
|
+
assertMetadata(res, 'Contracts');
|
|
150
|
+
}
|
|
151
|
+
{
|
|
152
|
+
const req = mockReq('GET', '/v1/orchestrator/contracts/workflow');
|
|
153
|
+
const res = mockRes();
|
|
154
|
+
handler(req, res);
|
|
155
|
+
assert(res._status === 200, 'Single contract returns 200');
|
|
156
|
+
assert(res._body.agent_id === 'workflow-orchestrator', 'Workflow contract agent_id correct');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// =============================================================================
|
|
160
|
+
// Test: All 7 Agent Routes
|
|
161
|
+
// =============================================================================
|
|
162
|
+
|
|
163
|
+
const agentTests = [
|
|
164
|
+
{
|
|
165
|
+
name: 'Workflow Orchestrator',
|
|
166
|
+
path: '/v1/orchestrator/workflow',
|
|
167
|
+
body: { workflow_id: 'wf-1', workflow_name: 'test-workflow', tasks: [{ task_id: 't1', name: 'step1', task_type: 'transform' }] },
|
|
168
|
+
agentId: 'workflow-orchestrator',
|
|
169
|
+
layerPrefix: 'ORCHESTRATOR_WORKFLOW',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: 'Task Scheduler',
|
|
173
|
+
path: '/v1/orchestrator/scheduler',
|
|
174
|
+
body: { schedule_id: 'sch-1', tasks: [{ task_id: 't1', name: 'job1', schedule_type: 'immediate' }] },
|
|
175
|
+
agentId: 'task-scheduler',
|
|
176
|
+
layerPrefix: 'ORCHESTRATOR_SCHEDULER',
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: 'Dependency Resolver',
|
|
180
|
+
path: '/v1/orchestrator/dependencies',
|
|
181
|
+
body: { request_id: 'req-1', workflow_id: 'wf-1', tasks: [{ task_id: 't1', name: 'step1' }] },
|
|
182
|
+
agentId: 'dependency-resolver',
|
|
183
|
+
layerPrefix: 'ORCHESTRATOR_DEPENDENCIES',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: 'Retry & Recovery',
|
|
187
|
+
path: '/v1/orchestrator/retry',
|
|
188
|
+
body: { request_id: 'req-1', failure: { task_id: 't1', error_category: 'transient' } },
|
|
189
|
+
agentId: 'retry-recovery',
|
|
190
|
+
layerPrefix: 'ORCHESTRATOR_RETRY',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: 'Parallelization',
|
|
194
|
+
path: '/v1/orchestrator/parallel',
|
|
195
|
+
body: { request_id: 'req-1', workflow_id: 'wf-1', tasks: [{ task_id: 't1', name: 'step1' }] },
|
|
196
|
+
agentId: 'parallelization-agent',
|
|
197
|
+
layerPrefix: 'ORCHESTRATOR_PARALLEL',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: 'State Machine',
|
|
201
|
+
path: '/v1/orchestrator/state-machine',
|
|
202
|
+
body: {
|
|
203
|
+
request_id: 'req-1', execution_id: 'exec-1', entity_type: 'workflow',
|
|
204
|
+
current_state: 'pending', target_state: 'running', reason: 'start execution', initiated_by: 'test',
|
|
205
|
+
},
|
|
206
|
+
agentId: 'state-machine-agent',
|
|
207
|
+
layerPrefix: 'ORCHESTRATOR_STATE_MACHINE',
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: 'Swarm Coordinator',
|
|
211
|
+
path: '/v1/orchestrator/swarm',
|
|
212
|
+
body: {
|
|
213
|
+
request_id: 'req-1', workflow_id: 'wf-1',
|
|
214
|
+
objective: { id: 'obj-1', description: 'test', objective_type: 'analysis' },
|
|
215
|
+
workers: [{ worker_id: 'w1', agent_type: 'workflow_orchestrator', task: { task_id: 't1', description: 'test' } }],
|
|
216
|
+
},
|
|
217
|
+
agentId: 'swarm-coordinator-agent',
|
|
218
|
+
layerPrefix: 'ORCHESTRATOR_SWARM',
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
|
|
222
|
+
for (const test of agentTests) {
|
|
223
|
+
console.log(`\n--- ${test.name} Agent ---`);
|
|
224
|
+
|
|
225
|
+
// Valid POST
|
|
226
|
+
{
|
|
227
|
+
const req = mockReq('POST', test.path, test.body);
|
|
228
|
+
const res = mockRes();
|
|
229
|
+
handler(req, res);
|
|
230
|
+
assert(res._status === 200, `${test.name}: valid POST returns 200`);
|
|
231
|
+
assert(res._body.agent === test.agentId, `${test.name}: agent_id is ${test.agentId}`);
|
|
232
|
+
assertMetadata(res, test.name);
|
|
233
|
+
assert(res._body.layers_executed[1].layer === test.layerPrefix, `${test.name}: layer is ${test.layerPrefix}`);
|
|
234
|
+
assert(res._body.layers_executed[1].status === 'completed', `${test.name}: layer status is completed`);
|
|
235
|
+
assert(typeof res._body.layers_executed[1].duration_ms === 'number', `${test.name}: duration_ms is number`);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Missing required fields
|
|
239
|
+
{
|
|
240
|
+
const req = mockReq('POST', test.path, {});
|
|
241
|
+
const res = mockRes();
|
|
242
|
+
handler(req, res);
|
|
243
|
+
assert(res._status === 400, `${test.name}: empty body returns 400`);
|
|
244
|
+
assert(res._body.error !== undefined, `${test.name}: error message present`);
|
|
245
|
+
assertMetadata(res, `${test.name} (400)`);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Wrong method
|
|
249
|
+
{
|
|
250
|
+
const req = mockReq('GET', test.path);
|
|
251
|
+
const res = mockRes();
|
|
252
|
+
handler(req, res);
|
|
253
|
+
assert(res._status === 405, `${test.name}: GET returns 405`);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// =============================================================================
|
|
258
|
+
// Test: State Machine validation logic
|
|
259
|
+
// =============================================================================
|
|
260
|
+
console.log('\n--- State Machine Transition Validation ---');
|
|
261
|
+
{
|
|
262
|
+
const req = mockReq('POST', '/v1/orchestrator/state-machine', {
|
|
263
|
+
request_id: 'req-1', execution_id: 'exec-1', entity_type: 'workflow',
|
|
264
|
+
current_state: 'completed', target_state: 'running', reason: 'invalid', initiated_by: 'test',
|
|
265
|
+
});
|
|
266
|
+
const res = mockRes();
|
|
267
|
+
handler(req, res);
|
|
268
|
+
assert(res._status === 200, 'Invalid transition still returns 200');
|
|
269
|
+
assert(res._body.success === false, 'Invalid transition reports success=false');
|
|
270
|
+
assert(res._body.status === 'invalid', 'Invalid transition reports status=invalid');
|
|
271
|
+
assert(res._body.new_state === 'completed', 'Invalid transition preserves current state');
|
|
272
|
+
}
|
|
273
|
+
{
|
|
274
|
+
const req = mockReq('POST', '/v1/orchestrator/state-machine', {
|
|
275
|
+
request_id: 'req-2', execution_id: 'exec-2', entity_type: 'workflow',
|
|
276
|
+
current_state: 'completed', target_state: 'running', reason: 'forced', initiated_by: 'admin',
|
|
277
|
+
force: true,
|
|
278
|
+
});
|
|
279
|
+
const res = mockRes();
|
|
280
|
+
handler(req, res);
|
|
281
|
+
assert(res._body.success === true, 'Forced transition reports success=true');
|
|
282
|
+
assert(res._body.new_state === 'running', 'Forced transition changes state');
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// =============================================================================
|
|
286
|
+
// Test: 404
|
|
287
|
+
// =============================================================================
|
|
288
|
+
console.log('\n--- 404 ---');
|
|
289
|
+
{
|
|
290
|
+
const req = mockReq('GET', '/v1/orchestrator/nonexistent');
|
|
291
|
+
const res = mockRes();
|
|
292
|
+
handler(req, res);
|
|
293
|
+
assert(res._status === 404, 'Unknown route returns 404');
|
|
294
|
+
assert(Array.isArray(res._body.available_routes), '404 includes available_routes');
|
|
295
|
+
assertMetadata(res, '404');
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// =============================================================================
|
|
299
|
+
// Test: Contract schemas completeness
|
|
300
|
+
// =============================================================================
|
|
301
|
+
console.log('\n--- Contract Schemas ---');
|
|
302
|
+
{
|
|
303
|
+
const expectedAgents = ['workflow', 'scheduler', 'dependencies', 'retry', 'parallel', 'state-machine', 'swarm'];
|
|
304
|
+
for (const agent of expectedAgents) {
|
|
305
|
+
const contract = AGENT_CONTRACTS[agent];
|
|
306
|
+
assert(contract !== undefined, `Contract exists for ${agent}`);
|
|
307
|
+
assert(contract.agent_id !== undefined, `${agent} contract has agent_id`);
|
|
308
|
+
assert(contract.agent_version !== undefined, `${agent} contract has agent_version`);
|
|
309
|
+
assert(contract.classification !== undefined, `${agent} contract has classification`);
|
|
310
|
+
assert(contract.description !== undefined, `${agent} contract has description`);
|
|
311
|
+
assert(contract.input !== undefined, `${agent} contract has input schema`);
|
|
312
|
+
assert(contract.output !== undefined, `${agent} contract has output schema`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// =============================================================================
|
|
317
|
+
// Summary
|
|
318
|
+
// =============================================================================
|
|
319
|
+
console.log('\n========================================');
|
|
320
|
+
console.log(`Results: ${passed} passed, ${failed} failed, ${passed + failed} total`);
|
|
321
|
+
console.log('========================================\n');
|
|
322
|
+
|
|
323
|
+
if (failed > 0) {
|
|
324
|
+
process.exit(1);
|
|
325
|
+
}
|