@llm-dev-ops/agentics-cli 1.4.53 → 1.4.55
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 +194 -2
- 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 +42 -33
- 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 +438 -0
- package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const crypto = require('crypto');
|
|
4
|
+
const { AGENT_CONTRACTS } = require('./contracts');
|
|
5
|
+
|
|
6
|
+
// =============================================================================
|
|
7
|
+
// orchestrator-agents Cloud Function
|
|
8
|
+
// Entry point: handler
|
|
9
|
+
// Runtime: nodejs20
|
|
10
|
+
// =============================================================================
|
|
11
|
+
|
|
12
|
+
const SERVICE_NAME = 'orchestrator-agents';
|
|
13
|
+
const SERVICE_VERSION = '0.1.5';
|
|
14
|
+
const BASE_URL = 'https://us-central1-agentics-dev.cloudfunctions.net/orchestrator-agents';
|
|
15
|
+
|
|
16
|
+
const AGENTS = ['workflow', 'scheduler', 'dependencies', 'retry', 'parallel', 'state-machine', 'swarm'];
|
|
17
|
+
|
|
18
|
+
const AGENT_DISPLAY_NAMES = {
|
|
19
|
+
workflow: 'Workflow Orchestrator Agent',
|
|
20
|
+
scheduler: 'Task Scheduler Agent',
|
|
21
|
+
dependencies: 'Dependency Resolver Agent',
|
|
22
|
+
retry: 'Retry & Recovery Agent',
|
|
23
|
+
parallel: 'Parallelization Agent',
|
|
24
|
+
'state-machine': 'State Machine Agent',
|
|
25
|
+
swarm: 'Swarm Coordinator Agent',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const AGENT_ROUTES = {
|
|
29
|
+
workflow: '/v1/orchestrator/workflow',
|
|
30
|
+
scheduler: '/v1/orchestrator/scheduler',
|
|
31
|
+
dependencies: '/v1/orchestrator/dependencies',
|
|
32
|
+
retry: '/v1/orchestrator/retry',
|
|
33
|
+
parallel: '/v1/orchestrator/parallel',
|
|
34
|
+
'state-machine': '/v1/orchestrator/state-machine',
|
|
35
|
+
swarm: '/v1/orchestrator/swarm',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// =============================================================================
|
|
39
|
+
// CORS
|
|
40
|
+
// =============================================================================
|
|
41
|
+
|
|
42
|
+
function setCorsHeaders(res) {
|
|
43
|
+
res.set('Access-Control-Allow-Origin', '*');
|
|
44
|
+
res.set('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
|
45
|
+
res.set('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Correlation-ID');
|
|
46
|
+
res.set('Access-Control-Max-Age', '3600');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// =============================================================================
|
|
50
|
+
// Execution Metadata Builder
|
|
51
|
+
// =============================================================================
|
|
52
|
+
|
|
53
|
+
function buildExecutionMetadata(req) {
|
|
54
|
+
return {
|
|
55
|
+
trace_id: req.headers['x-correlation-id'] || crypto.randomUUID(),
|
|
56
|
+
timestamp: new Date().toISOString(),
|
|
57
|
+
service: SERVICE_NAME,
|
|
58
|
+
execution_id: crypto.randomUUID(),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function buildResponse(req, agentName, status, data, startTime) {
|
|
63
|
+
const durationMs = Date.now() - startTime;
|
|
64
|
+
const layers = [
|
|
65
|
+
{ layer: 'AGENT_ROUTING', status: 'completed' },
|
|
66
|
+
{ layer: `ORCHESTRATOR_${agentName.toUpperCase().replace(/-/g, '_')}`, status, duration_ms: durationMs },
|
|
67
|
+
];
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
...data,
|
|
71
|
+
execution_metadata: buildExecutionMetadata(req),
|
|
72
|
+
layers_executed: layers,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// =============================================================================
|
|
77
|
+
// Validation
|
|
78
|
+
// =============================================================================
|
|
79
|
+
|
|
80
|
+
function validateRequiredFields(body, required) {
|
|
81
|
+
const missing = required.filter((f) => body[f] === undefined || body[f] === null);
|
|
82
|
+
if (missing.length > 0) {
|
|
83
|
+
return `Missing required fields: ${missing.join(', ')}`;
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// =============================================================================
|
|
89
|
+
// Agent Handlers (routing layer — business logic lives in Rust crates)
|
|
90
|
+
// =============================================================================
|
|
91
|
+
|
|
92
|
+
function handleWorkflow(body) {
|
|
93
|
+
const contract = AGENT_CONTRACTS.workflow;
|
|
94
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
95
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
statusCode: 200,
|
|
99
|
+
data: {
|
|
100
|
+
agent: contract.agent_id,
|
|
101
|
+
agent_version: contract.agent_version,
|
|
102
|
+
classification: contract.classification,
|
|
103
|
+
status: 'accepted',
|
|
104
|
+
workflow_id: body.workflow_id,
|
|
105
|
+
workflow_name: body.workflow_name,
|
|
106
|
+
tasks_count: Array.isArray(body.tasks) ? body.tasks.length : 0,
|
|
107
|
+
strategy: (body.config && body.config.strategy) || 'sequential',
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function handleScheduler(body) {
|
|
113
|
+
const contract = AGENT_CONTRACTS.scheduler;
|
|
114
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
115
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
statusCode: 200,
|
|
119
|
+
data: {
|
|
120
|
+
agent: contract.agent_id,
|
|
121
|
+
agent_version: contract.agent_version,
|
|
122
|
+
classification: contract.classification,
|
|
123
|
+
status: 'scheduled',
|
|
124
|
+
schedule_id: body.schedule_id,
|
|
125
|
+
tasks_count: Array.isArray(body.tasks) ? body.tasks.length : 0,
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function handleDependencies(body) {
|
|
131
|
+
const contract = AGENT_CONTRACTS.dependencies;
|
|
132
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
133
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
statusCode: 200,
|
|
137
|
+
data: {
|
|
138
|
+
agent: contract.agent_id,
|
|
139
|
+
agent_version: contract.agent_version,
|
|
140
|
+
classification: contract.classification,
|
|
141
|
+
status: 'resolved',
|
|
142
|
+
request_id: body.request_id,
|
|
143
|
+
workflow_id: body.workflow_id,
|
|
144
|
+
tasks_count: Array.isArray(body.tasks) ? body.tasks.length : 0,
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function handleRetry(body) {
|
|
150
|
+
const contract = AGENT_CONTRACTS.retry;
|
|
151
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
152
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
statusCode: 200,
|
|
156
|
+
data: {
|
|
157
|
+
agent: contract.agent_id,
|
|
158
|
+
agent_version: contract.agent_version,
|
|
159
|
+
classification: contract.classification,
|
|
160
|
+
status: 'analyzed',
|
|
161
|
+
request_id: body.request_id,
|
|
162
|
+
failure_category: body.failure && body.failure.error_category,
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function handleParallel(body) {
|
|
168
|
+
const contract = AGENT_CONTRACTS.parallel;
|
|
169
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
170
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
171
|
+
|
|
172
|
+
return {
|
|
173
|
+
statusCode: 200,
|
|
174
|
+
data: {
|
|
175
|
+
agent: contract.agent_id,
|
|
176
|
+
agent_version: contract.agent_version,
|
|
177
|
+
classification: contract.classification,
|
|
178
|
+
status: 'analyzed',
|
|
179
|
+
request_id: body.request_id,
|
|
180
|
+
workflow_id: body.workflow_id,
|
|
181
|
+
tasks_count: Array.isArray(body.tasks) ? body.tasks.length : 0,
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function handleStateMachine(body) {
|
|
187
|
+
const contract = AGENT_CONTRACTS['state-machine'];
|
|
188
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
189
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
190
|
+
|
|
191
|
+
const sm = contract.state_machine[body.entity_type] || contract.state_machine.workflow;
|
|
192
|
+
const validTargets = sm.transitions[body.current_state] || [];
|
|
193
|
+
const isValid = body.force || validTargets.includes(body.target_state);
|
|
194
|
+
|
|
195
|
+
return {
|
|
196
|
+
statusCode: 200,
|
|
197
|
+
data: {
|
|
198
|
+
agent: contract.agent_id,
|
|
199
|
+
agent_version: contract.agent_version,
|
|
200
|
+
classification: contract.classification,
|
|
201
|
+
status: isValid ? 'completed' : 'invalid',
|
|
202
|
+
request_id: body.request_id,
|
|
203
|
+
execution_id: body.execution_id,
|
|
204
|
+
entity_type: body.entity_type,
|
|
205
|
+
success: isValid,
|
|
206
|
+
previous_state: body.current_state,
|
|
207
|
+
new_state: isValid ? body.target_state : body.current_state,
|
|
208
|
+
validation: {
|
|
209
|
+
valid: isValid,
|
|
210
|
+
source_state_matches: true,
|
|
211
|
+
target_state_exists: validTargets.length > 0,
|
|
212
|
+
valid_targets: validTargets,
|
|
213
|
+
rule_violations: [],
|
|
214
|
+
warnings: [],
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function handleSwarm(body) {
|
|
221
|
+
const contract = AGENT_CONTRACTS.swarm;
|
|
222
|
+
const error = validateRequiredFields(body, contract.input.required);
|
|
223
|
+
if (error) return { statusCode: 400, data: { error, agent: contract.agent_id } };
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
statusCode: 200,
|
|
227
|
+
data: {
|
|
228
|
+
agent: contract.agent_id,
|
|
229
|
+
agent_version: contract.agent_version,
|
|
230
|
+
classification: contract.classification,
|
|
231
|
+
status: 'accepted',
|
|
232
|
+
request_id: body.request_id,
|
|
233
|
+
workflow_id: body.workflow_id,
|
|
234
|
+
workers_count: Array.isArray(body.workers) ? body.workers.length : 0,
|
|
235
|
+
objective_type: body.objective && body.objective.objective_type,
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const AGENT_HANDLERS = {
|
|
241
|
+
workflow: handleWorkflow,
|
|
242
|
+
scheduler: handleScheduler,
|
|
243
|
+
dependencies: handleDependencies,
|
|
244
|
+
retry: handleRetry,
|
|
245
|
+
parallel: handleParallel,
|
|
246
|
+
'state-machine': handleStateMachine,
|
|
247
|
+
swarm: handleSwarm,
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// =============================================================================
|
|
251
|
+
// Health Endpoint
|
|
252
|
+
// =============================================================================
|
|
253
|
+
|
|
254
|
+
function handleHealth(req) {
|
|
255
|
+
const agentStatuses = {};
|
|
256
|
+
for (const agent of AGENTS) {
|
|
257
|
+
agentStatuses[agent] = {
|
|
258
|
+
status: 'healthy',
|
|
259
|
+
route: AGENT_ROUTES[agent],
|
|
260
|
+
name: AGENT_DISPLAY_NAMES[agent],
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return {
|
|
265
|
+
status: 'healthy',
|
|
266
|
+
service: SERVICE_NAME,
|
|
267
|
+
version: SERVICE_VERSION,
|
|
268
|
+
agents: agentStatuses,
|
|
269
|
+
agents_list: AGENTS,
|
|
270
|
+
base_url: BASE_URL,
|
|
271
|
+
timestamp: new Date().toISOString(),
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// =============================================================================
|
|
276
|
+
// Contract Endpoint
|
|
277
|
+
// =============================================================================
|
|
278
|
+
|
|
279
|
+
function handleContracts(agentName) {
|
|
280
|
+
if (agentName) {
|
|
281
|
+
const contract = AGENT_CONTRACTS[agentName];
|
|
282
|
+
if (!contract) {
|
|
283
|
+
return { statusCode: 404, data: { error: `Unknown agent: ${agentName}` } };
|
|
284
|
+
}
|
|
285
|
+
return { statusCode: 200, data: contract };
|
|
286
|
+
}
|
|
287
|
+
return { statusCode: 200, data: AGENT_CONTRACTS };
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// =============================================================================
|
|
291
|
+
// Router
|
|
292
|
+
// =============================================================================
|
|
293
|
+
|
|
294
|
+
function parseRoute(path) {
|
|
295
|
+
const normalized = path.replace(/\/+$/, '') || '/';
|
|
296
|
+
|
|
297
|
+
if (normalized === '/' || normalized === '') return { type: 'root' };
|
|
298
|
+
if (normalized === '/health') return { type: 'health' };
|
|
299
|
+
if (normalized === '/ready') return { type: 'ready' };
|
|
300
|
+
|
|
301
|
+
// /v1/orchestrator/contracts/:agent?
|
|
302
|
+
const contractMatch = normalized.match(/^\/v1\/orchestrator\/contracts(?:\/([a-z-]+))?$/);
|
|
303
|
+
if (contractMatch) return { type: 'contracts', agent: contractMatch[1] || null };
|
|
304
|
+
|
|
305
|
+
// /v1/orchestrator/:agent
|
|
306
|
+
const agentMatch = normalized.match(/^\/v1\/orchestrator\/([a-z-]+)$/);
|
|
307
|
+
if (agentMatch && AGENTS.includes(agentMatch[1])) {
|
|
308
|
+
return { type: 'agent', agent: agentMatch[1] };
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
return { type: 'not_found' };
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// =============================================================================
|
|
315
|
+
// Entry Point
|
|
316
|
+
// =============================================================================
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Cloud Function HTTP handler.
|
|
320
|
+
*
|
|
321
|
+
* @param {import('express').Request} req
|
|
322
|
+
* @param {import('express').Response} res
|
|
323
|
+
*/
|
|
324
|
+
const handler = (req, res) => {
|
|
325
|
+
const startTime = Date.now();
|
|
326
|
+
|
|
327
|
+
// CORS preflight
|
|
328
|
+
setCorsHeaders(res);
|
|
329
|
+
if (req.method === 'OPTIONS') {
|
|
330
|
+
res.status(204).send('');
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const route = parseRoute(req.path);
|
|
335
|
+
|
|
336
|
+
switch (route.type) {
|
|
337
|
+
// ------------------------------------------------------------------
|
|
338
|
+
// Root
|
|
339
|
+
// ------------------------------------------------------------------
|
|
340
|
+
case 'root': {
|
|
341
|
+
const body = buildResponse(req, 'ROUTER', 'completed', {
|
|
342
|
+
service: SERVICE_NAME,
|
|
343
|
+
version: SERVICE_VERSION,
|
|
344
|
+
description: 'Orchestrator Agents Cloud Function — routes to 7 orchestration agents.',
|
|
345
|
+
agents: AGENTS.map((a) => ({
|
|
346
|
+
name: AGENT_DISPLAY_NAMES[a],
|
|
347
|
+
route: AGENT_ROUTES[a],
|
|
348
|
+
contract: `/v1/orchestrator/contracts/${a}`,
|
|
349
|
+
})),
|
|
350
|
+
endpoints: {
|
|
351
|
+
health: '/health',
|
|
352
|
+
ready: '/ready',
|
|
353
|
+
contracts: '/v1/orchestrator/contracts',
|
|
354
|
+
},
|
|
355
|
+
}, startTime);
|
|
356
|
+
res.status(200).json(body);
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// ------------------------------------------------------------------
|
|
361
|
+
// Health
|
|
362
|
+
// ------------------------------------------------------------------
|
|
363
|
+
case 'health': {
|
|
364
|
+
const health = handleHealth(req);
|
|
365
|
+
const body = buildResponse(req, 'HEALTH', 'completed', health, startTime);
|
|
366
|
+
res.status(200).json(body);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// ------------------------------------------------------------------
|
|
371
|
+
// Ready
|
|
372
|
+
// ------------------------------------------------------------------
|
|
373
|
+
case 'ready': {
|
|
374
|
+
const body = buildResponse(req, 'READY', 'completed', {
|
|
375
|
+
ready: true,
|
|
376
|
+
service: SERVICE_NAME,
|
|
377
|
+
version: SERVICE_VERSION,
|
|
378
|
+
checks: {
|
|
379
|
+
agents_registered: AGENTS.length === 7,
|
|
380
|
+
contracts_loaded: Object.keys(AGENT_CONTRACTS).length === 7,
|
|
381
|
+
handlers_available: Object.keys(AGENT_HANDLERS).length === 7,
|
|
382
|
+
},
|
|
383
|
+
}, startTime);
|
|
384
|
+
res.status(200).json(body);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// ------------------------------------------------------------------
|
|
389
|
+
// Contracts
|
|
390
|
+
// ------------------------------------------------------------------
|
|
391
|
+
case 'contracts': {
|
|
392
|
+
const result = handleContracts(route.agent);
|
|
393
|
+
const body = buildResponse(req, 'CONTRACTS', 'completed', result.data, startTime);
|
|
394
|
+
res.status(result.statusCode).json(body);
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// ------------------------------------------------------------------
|
|
399
|
+
// Agent routes
|
|
400
|
+
// ------------------------------------------------------------------
|
|
401
|
+
case 'agent': {
|
|
402
|
+
if (req.method !== 'POST') {
|
|
403
|
+
const body = buildResponse(req, route.agent, 'error', {
|
|
404
|
+
error: `Method ${req.method} not allowed. Use POST.`,
|
|
405
|
+
agent: route.agent,
|
|
406
|
+
}, startTime);
|
|
407
|
+
res.status(405).json(body);
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const agentHandler = AGENT_HANDLERS[route.agent];
|
|
412
|
+
if (!agentHandler) {
|
|
413
|
+
const body = buildResponse(req, route.agent, 'error', {
|
|
414
|
+
error: `No handler for agent: ${route.agent}`,
|
|
415
|
+
}, startTime);
|
|
416
|
+
res.status(500).json(body);
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
const reqBody = req.body || {};
|
|
421
|
+
const result = agentHandler(reqBody);
|
|
422
|
+
const body = buildResponse(req, route.agent, result.statusCode === 200 ? 'completed' : 'error', result.data, startTime);
|
|
423
|
+
res.status(result.statusCode).json(body);
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// ------------------------------------------------------------------
|
|
428
|
+
// Not found
|
|
429
|
+
// ------------------------------------------------------------------
|
|
430
|
+
default: {
|
|
431
|
+
const body = buildResponse(req, 'ROUTER', 'error', {
|
|
432
|
+
error: 'Route not found',
|
|
433
|
+
path: req.path,
|
|
434
|
+
available_routes: Object.values(AGENT_ROUTES).concat(['/health', '/ready', '/v1/orchestrator/contracts']),
|
|
435
|
+
}, startTime);
|
|
436
|
+
res.status(404).json(body);
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
module.exports = { handler };
|