@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,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud Function Entry Point: copilot-agents
|
|
3
|
+
*
|
|
4
|
+
* Unified HTTP handler for all 7 copilot agents.
|
|
5
|
+
* Deploy: gcloud functions deploy copilot-agents --runtime nodejs20 --trigger-http
|
|
6
|
+
* --region us-central1 --project agentics-dev --entry-point handler
|
|
7
|
+
* --memory 512MB --timeout 120s --no-allow-unauthenticated
|
|
8
|
+
*
|
|
9
|
+
* Routes:
|
|
10
|
+
* POST /v1/copilot/planner → Planner Agent
|
|
11
|
+
* POST /v1/copilot/config → Config Validation Agent
|
|
12
|
+
* POST /v1/copilot/decomposer → Decomposer Agent
|
|
13
|
+
* POST /v1/copilot/clarifier → Objective Clarifier Agent
|
|
14
|
+
* POST /v1/copilot/intent → Intent Classifier Agent
|
|
15
|
+
* POST /v1/copilot/reflection → Reflection Agent
|
|
16
|
+
* POST /v1/copilot/meta-reasoner → Meta-Reasoner Agent
|
|
17
|
+
* GET /health → Health check
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { IncomingMessage, ServerResponse } from 'http';
|
|
21
|
+
import * as crypto from 'crypto';
|
|
22
|
+
import { routeRequest } from './router';
|
|
23
|
+
import { handleHealth } from './health';
|
|
24
|
+
import { setCorsHeaders, handlePreflight } from './cors';
|
|
25
|
+
import {
|
|
26
|
+
ExecutionMetadata,
|
|
27
|
+
LayerExecuted,
|
|
28
|
+
wrapResponse,
|
|
29
|
+
wrapAgentResult,
|
|
30
|
+
AgentExecutionMetadata,
|
|
31
|
+
} from './envelope';
|
|
32
|
+
|
|
33
|
+
export interface CfRequest extends IncomingMessage {
|
|
34
|
+
body?: unknown;
|
|
35
|
+
rawBody?: Buffer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CfResponse extends ServerResponse {
|
|
39
|
+
status?: (code: number) => CfResponse;
|
|
40
|
+
json?: (data: unknown) => void;
|
|
41
|
+
send?: (data: string | Buffer) => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Parse JSON body from request
|
|
46
|
+
*/
|
|
47
|
+
function parseBody(req: CfRequest): unknown {
|
|
48
|
+
// Cloud Functions automatically parse JSON bodies into req.body
|
|
49
|
+
if (req.body !== undefined) {
|
|
50
|
+
return req.body;
|
|
51
|
+
}
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Send JSON response
|
|
57
|
+
*/
|
|
58
|
+
function sendJson(res: CfResponse, statusCode: number, data: unknown): void {
|
|
59
|
+
res.writeHead(statusCode, { 'Content-Type': 'application/json' });
|
|
60
|
+
res.end(JSON.stringify(data));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Main Cloud Function handler
|
|
65
|
+
*
|
|
66
|
+
* Entry point name: handler
|
|
67
|
+
*/
|
|
68
|
+
export async function handler(req: CfRequest, res: CfResponse): Promise<void> {
|
|
69
|
+
const startTime = Date.now();
|
|
70
|
+
|
|
71
|
+
// CORS headers on every response
|
|
72
|
+
setCorsHeaders(res);
|
|
73
|
+
|
|
74
|
+
// Handle CORS preflight
|
|
75
|
+
if (req.method === 'OPTIONS') {
|
|
76
|
+
handlePreflight(res);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const url = new URL(req.url || '/', `https://${req.headers.host || 'localhost'}`);
|
|
81
|
+
const pathname = url.pathname;
|
|
82
|
+
|
|
83
|
+
// Build execution metadata
|
|
84
|
+
const traceId = (req.headers['x-correlation-id'] as string) || crypto.randomUUID();
|
|
85
|
+
const executionId = crypto.randomUUID();
|
|
86
|
+
|
|
87
|
+
const executionMetadata: ExecutionMetadata = {
|
|
88
|
+
trace_id: traceId,
|
|
89
|
+
timestamp: new Date().toISOString(),
|
|
90
|
+
service: 'copilot-agents',
|
|
91
|
+
execution_id: executionId,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
// Health endpoint
|
|
95
|
+
if (pathname === '/health' && (req.method === 'GET' || req.method === 'HEAD')) {
|
|
96
|
+
const healthResult = handleHealth();
|
|
97
|
+
const layers: LayerExecuted[] = [
|
|
98
|
+
{ layer: 'AGENT_ROUTING', status: 'completed' },
|
|
99
|
+
{ layer: 'HEALTH_CHECK', status: 'completed', duration_ms: Date.now() - startTime },
|
|
100
|
+
];
|
|
101
|
+
sendJson(res, 200, wrapResponse(healthResult, executionMetadata, layers));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Agent routes: POST /v1/copilot/{agent}
|
|
106
|
+
if (req.method === 'POST' && pathname.startsWith('/v1/copilot/')) {
|
|
107
|
+
// Require end-user Anthropic API key via header
|
|
108
|
+
const anthropicApiKey = req.headers['x-anthropic-api-key'] as string | undefined;
|
|
109
|
+
if (!anthropicApiKey) {
|
|
110
|
+
const layers: LayerExecuted[] = [
|
|
111
|
+
{ layer: 'AGENT_ROUTING', status: 'error' },
|
|
112
|
+
];
|
|
113
|
+
sendJson(res, 400, wrapResponse(
|
|
114
|
+
{ error: 'Missing Anthropic API key. Set it via `agentics login` or the ANTHROPIC_API_KEY environment variable.' },
|
|
115
|
+
executionMetadata,
|
|
116
|
+
layers
|
|
117
|
+
));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
const agentSlug = pathname.replace('/v1/copilot/', '').replace(/\/$/, '');
|
|
122
|
+
const body = parseBody(req);
|
|
123
|
+
|
|
124
|
+
if (!body || typeof body !== 'object') {
|
|
125
|
+
const layers: LayerExecuted[] = [
|
|
126
|
+
{ layer: 'AGENT_ROUTING', status: 'completed' },
|
|
127
|
+
];
|
|
128
|
+
sendJson(res, 400, wrapResponse(
|
|
129
|
+
{ error: 'Request body must be a JSON object' },
|
|
130
|
+
executionMetadata,
|
|
131
|
+
layers
|
|
132
|
+
));
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
const routingLayerStart = Date.now();
|
|
138
|
+
const routeResult = await routeRequest(agentSlug, body);
|
|
139
|
+
const routingDuration = Date.now() - routingLayerStart;
|
|
140
|
+
|
|
141
|
+
const agentName = agentSlug.toUpperCase().replace(/-/g, '_');
|
|
142
|
+
const layers: LayerExecuted[] = [
|
|
143
|
+
{ layer: 'AGENT_ROUTING', status: 'completed' },
|
|
144
|
+
{ layer: `COPILOT_${agentName}`, status: 'completed', duration_ms: routingDuration },
|
|
145
|
+
];
|
|
146
|
+
|
|
147
|
+
// Build per-agent execution_metadata
|
|
148
|
+
const agentMeta: AgentExecutionMetadata = {
|
|
149
|
+
trace_id: traceId,
|
|
150
|
+
agent: agentSlug,
|
|
151
|
+
domain: 'copilot',
|
|
152
|
+
timestamp: new Date().toISOString(),
|
|
153
|
+
};
|
|
154
|
+
if (routeResult.pipelineContext) {
|
|
155
|
+
agentMeta.pipeline_context = routeResult.pipelineContext;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Wrap the agent result with per-agent execution_metadata
|
|
159
|
+
const wrappedResult = wrapAgentResult(routeResult.agentResult, agentMeta);
|
|
160
|
+
|
|
161
|
+
const statusCode = routeResult.agentResult.status === 'success' ? 200 : 422;
|
|
162
|
+
sendJson(res, statusCode, wrapResponse(wrappedResult, executionMetadata, layers));
|
|
163
|
+
return;
|
|
164
|
+
} catch (err) {
|
|
165
|
+
const agentName = agentSlug.toUpperCase().replace(/-/g, '_');
|
|
166
|
+
const layers: LayerExecuted[] = [
|
|
167
|
+
{ layer: 'AGENT_ROUTING', status: 'completed' },
|
|
168
|
+
{ layer: `COPILOT_${agentName}`, status: 'error', duration_ms: Date.now() - startTime },
|
|
169
|
+
];
|
|
170
|
+
const errorMessage = err instanceof Error ? err.message : 'Internal server error';
|
|
171
|
+
sendJson(res, 500, wrapResponse(
|
|
172
|
+
{ error: errorMessage },
|
|
173
|
+
executionMetadata,
|
|
174
|
+
layers
|
|
175
|
+
));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// 404 for unmatched routes
|
|
181
|
+
const layers: LayerExecuted[] = [
|
|
182
|
+
{ layer: 'AGENT_ROUTING', status: 'error' },
|
|
183
|
+
];
|
|
184
|
+
sendJson(res, 404, wrapResponse(
|
|
185
|
+
{
|
|
186
|
+
error: 'Not found',
|
|
187
|
+
available_routes: [
|
|
188
|
+
'POST /v1/copilot/planner',
|
|
189
|
+
'POST /v1/copilot/config',
|
|
190
|
+
'POST /v1/copilot/decomposer',
|
|
191
|
+
'POST /v1/copilot/clarifier',
|
|
192
|
+
'POST /v1/copilot/intent',
|
|
193
|
+
'POST /v1/copilot/reflection',
|
|
194
|
+
'POST /v1/copilot/meta-reasoner',
|
|
195
|
+
'GET /health',
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
executionMetadata,
|
|
199
|
+
layers
|
|
200
|
+
));
|
|
201
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Router
|
|
3
|
+
*
|
|
4
|
+
* Maps URL slugs to agent invocations.
|
|
5
|
+
* Does NOT create new agents or modify business logic.
|
|
6
|
+
* Instantiates existing agents with persistence/telemetry from env
|
|
7
|
+
* and routes HTTP bodies to agent.invoke().
|
|
8
|
+
*
|
|
9
|
+
* Routes:
|
|
10
|
+
* planner → PlannerAgent
|
|
11
|
+
* config → ConfigValidationAgent
|
|
12
|
+
* decomposer → DecomposerAgent
|
|
13
|
+
* clarifier → ObjectiveClarifierAgent
|
|
14
|
+
* intent → IntentClassifierAgent
|
|
15
|
+
* reflection → ReflectionAgent
|
|
16
|
+
* meta-reasoner → MetaReasonerAgent
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
20
|
+
import { AgentResult, PipelineContext, PipelineContextSchema } from '../../services/agents/contracts';
|
|
21
|
+
|
|
22
|
+
// Agent imports
|
|
23
|
+
import { PlannerAgent } from '../../services/agents/planner';
|
|
24
|
+
import { ConfigValidationAgent } from '../../services/agents/config-validation';
|
|
25
|
+
import { DecomposerAgent } from '../../services/agents/decomposer';
|
|
26
|
+
import { ObjectiveClarifierAgent } from '../../services/agents/objective-clarifier';
|
|
27
|
+
import { IntentClassifierAgent } from '../../services/agents/intent-classifier';
|
|
28
|
+
import { ReflectionAgent } from '../../services/agents/reflection';
|
|
29
|
+
import { MetaReasonerAgent } from '../../services/agents/meta-reasoner';
|
|
30
|
+
|
|
31
|
+
// Each agent uses its own persistence/telemetry module (they have identical APIs
|
|
32
|
+
// but TypeScript treats separate class declarations as distinct types)
|
|
33
|
+
import { createRuvectorFromEnv as createPlannerPersistence } from '../../services/agents/planner/ruvector-persistence';
|
|
34
|
+
import { createTelemetryFromEnv as createPlannerTelemetry } from '../../services/agents/planner/telemetry';
|
|
35
|
+
import { createRuvectorFromEnv as createClarifierPersistence } from '../../services/agents/objective-clarifier/ruvector-persistence';
|
|
36
|
+
import { createTelemetryFromEnv as createClarifierTelemetry } from '../../services/agents/objective-clarifier/telemetry';
|
|
37
|
+
import { createRuvectorFromEnv as createReflectionPersistence } from '../../services/agents/reflection/ruvector-persistence';
|
|
38
|
+
import { createTelemetryFromEnv as createReflectionTelemetry } from '../../services/agents/reflection/telemetry';
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Generic agent interface for routing purposes
|
|
42
|
+
*/
|
|
43
|
+
interface RoutableAgent {
|
|
44
|
+
validateInput(input: unknown): unknown;
|
|
45
|
+
invoke(input: any, executionRef: string): Promise<AgentResult>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Agent factory: instantiate the correct agent for the given slug
|
|
50
|
+
*/
|
|
51
|
+
function createAgent(slug: string): RoutableAgent | null {
|
|
52
|
+
switch (slug) {
|
|
53
|
+
case 'planner': {
|
|
54
|
+
const p = createPlannerPersistence();
|
|
55
|
+
const t = createPlannerTelemetry();
|
|
56
|
+
return new PlannerAgent(p, t);
|
|
57
|
+
}
|
|
58
|
+
case 'config': {
|
|
59
|
+
const p = createPlannerPersistence();
|
|
60
|
+
const t = createPlannerTelemetry();
|
|
61
|
+
return new ConfigValidationAgent(p, t);
|
|
62
|
+
}
|
|
63
|
+
case 'decomposer': {
|
|
64
|
+
const p = createPlannerPersistence();
|
|
65
|
+
const t = createPlannerTelemetry();
|
|
66
|
+
return new DecomposerAgent(p, t);
|
|
67
|
+
}
|
|
68
|
+
case 'clarifier': {
|
|
69
|
+
const p = createClarifierPersistence();
|
|
70
|
+
const t = createClarifierTelemetry();
|
|
71
|
+
return new ObjectiveClarifierAgent(p, t);
|
|
72
|
+
}
|
|
73
|
+
case 'intent': {
|
|
74
|
+
// IntentClassifier imports from planner persistence/telemetry
|
|
75
|
+
const p = createPlannerPersistence();
|
|
76
|
+
const t = createPlannerTelemetry();
|
|
77
|
+
return new IntentClassifierAgent(p, t);
|
|
78
|
+
}
|
|
79
|
+
case 'reflection': {
|
|
80
|
+
const p = createReflectionPersistence();
|
|
81
|
+
const t = createReflectionTelemetry();
|
|
82
|
+
return new ReflectionAgent(p, t);
|
|
83
|
+
}
|
|
84
|
+
case 'meta-reasoner': {
|
|
85
|
+
// MetaReasoner imports from planner persistence/telemetry
|
|
86
|
+
const p = createPlannerPersistence();
|
|
87
|
+
const t = createPlannerTelemetry();
|
|
88
|
+
return new MetaReasonerAgent(p, t);
|
|
89
|
+
}
|
|
90
|
+
default:
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Result of routing a request to an agent.
|
|
97
|
+
* Includes the AgentResult plus metadata needed for the response envelope.
|
|
98
|
+
*/
|
|
99
|
+
export interface RouteResult {
|
|
100
|
+
agentResult: AgentResult;
|
|
101
|
+
agentSlug: string;
|
|
102
|
+
pipelineContext?: PipelineContext;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Route a request to the appropriate agent
|
|
107
|
+
*
|
|
108
|
+
* @param slug - The agent slug from the URL path
|
|
109
|
+
* @param body - The parsed JSON request body
|
|
110
|
+
* @returns RouteResult with agent result and metadata
|
|
111
|
+
* @throws If the slug is unknown
|
|
112
|
+
*/
|
|
113
|
+
export async function routeRequest(slug: string, body: unknown): Promise<RouteResult> {
|
|
114
|
+
const agent = createAgent(slug);
|
|
115
|
+
|
|
116
|
+
if (!agent) {
|
|
117
|
+
throw new Error(
|
|
118
|
+
`Unknown agent: "${slug}". Valid agents: planner, config, decomposer, clarifier, intent, reflection, meta-reasoner`
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Extract execution_ref from body or generate one
|
|
123
|
+
const bodyObj = body as Record<string, unknown>;
|
|
124
|
+
const executionRef = (typeof bodyObj.execution_ref === 'string' && bodyObj.execution_ref)
|
|
125
|
+
? bodyObj.execution_ref
|
|
126
|
+
: uuidv4();
|
|
127
|
+
|
|
128
|
+
// Extract pipeline_context if present (safe parse — don't fail if malformed)
|
|
129
|
+
let pipelineContext: PipelineContext | undefined;
|
|
130
|
+
if (bodyObj.pipeline_context !== undefined) {
|
|
131
|
+
const parsed = PipelineContextSchema.safeParse(bodyObj.pipeline_context);
|
|
132
|
+
if (parsed.success) {
|
|
133
|
+
pipelineContext = parsed.data;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Validate input through the agent's schema
|
|
138
|
+
const validatedInput = agent.validateInput(body);
|
|
139
|
+
|
|
140
|
+
// Invoke the agent
|
|
141
|
+
const agentResult = await agent.invoke(validatedInput, executionRef);
|
|
142
|
+
|
|
143
|
+
return {
|
|
144
|
+
agentResult,
|
|
145
|
+
agentSlug: slug,
|
|
146
|
+
pipelineContext,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"sourceMap": true,
|
|
8
|
+
"outDir": "./dist",
|
|
9
|
+
"rootDir": "..",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"noImplicitAny": false
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src/**/*.ts",
|
|
20
|
+
"../services/agents/**/*.ts"
|
|
21
|
+
],
|
|
22
|
+
"exclude": [
|
|
23
|
+
"node_modules",
|
|
24
|
+
"dist",
|
|
25
|
+
"**/*.test.ts",
|
|
26
|
+
"**/*.spec.ts",
|
|
27
|
+
"../services/agents/**/*.test.ts",
|
|
28
|
+
"../services/agents/**/cli.ts",
|
|
29
|
+
"../services/agents/intelligence-layer/**"
|
|
30
|
+
]
|
|
31
|
+
}
|