@llm-dev-ops/agentics-cli 1.4.52 → 1.4.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled-agents/connector-hub-agents/package-lock.json +11697 -0
- package/dist/bundled-agents/connector-hub-agents/package.json +75 -0
- package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +22 -0
- package/dist/bundled-agents/connector-hub-agents/tsconfig.json +57 -0
- package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +17 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +14 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +35 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +55 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +40 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +22 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +38 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +34 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +186 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +36 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +121 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +157 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +948 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +23 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +50 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +214 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +91 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +1166 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +308 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +62 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +400 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +113 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +250 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +169 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +17 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +97 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +1674 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +1085 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +218 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +949 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +253 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +657 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +205 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +285 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +106 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +581 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +136 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +791 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +225 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +120 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +535 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +18 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +4 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +9 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +123 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +609 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +10 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +111 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +686 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +6 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +15 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +126 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +780 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +127 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +483 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +122 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +645 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +156 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +88 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/index.js +4 -0
- package/dist/bundled-agents/copilot-agents/functions/jest.config.js +29 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +14 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +35 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +21 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +22 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +38 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +34 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +174 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +107 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +157 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +941 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +23 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +50 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +185 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +86 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +1081 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +305 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +62 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +315 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +110 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +250 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +169 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +16 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +88 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +1674 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +1000 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +215 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +864 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +250 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +572 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +202 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +496 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +133 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +706 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +222 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +107 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +360 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +18 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +4 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +9 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +123 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +609 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +10 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +111 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +686 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +6 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +15 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +126 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +780 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +25 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +119 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +421 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +49 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +125 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +73 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +192 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +11 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +27 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +122 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +645 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +59 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +156 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +88 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +246 -0
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +1 -0
- package/dist/bundled-agents/copilot-agents/functions/package-lock.json +5473 -0
- package/dist/bundled-agents/copilot-agents/functions/package.json +40 -0
- package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +71 -0
- package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +36 -0
- package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +77 -0
- package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +340 -0
- package/dist/bundled-agents/copilot-agents/functions/src/health.ts +53 -0
- package/dist/bundled-agents/copilot-agents/functions/src/index.ts +201 -0
- package/dist/bundled-agents/copilot-agents/functions/src/router.ts +148 -0
- package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +31 -0
- package/dist/bundled-agents/copilot-agents/package-lock.json +11825 -0
- package/dist/bundled-agents/copilot-agents/package.json +5 -0
- package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +8282 -0
- package/dist/bundled-agents/governance-dashboard-agents/package.json +13 -0
- package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +590 -0
- package/dist/bundled-agents/orchestrator-agents/functions/index.js +442 -0
- package/dist/bundled-agents/orchestrator-agents/functions/test.js +325 -0
- package/dist/bundled-agents/orchestrator-agents/index.js +6 -0
- package/dist/bundled-agents/orchestrator-agents/package-lock.json +13254 -0
- package/dist/bundled-agents/orchestrator-agents/package.json +20 -0
- package/dist/bundled-agents/platform-agents/package-lock.json +1723 -0
- package/dist/bundled-agents/platform-agents/package.json +22 -0
- package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +463 -0
- package/dist/bundled-agents/platform-agents/src/agents/decision.ts +234 -0
- package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +229 -0
- package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +327 -0
- package/dist/bundled-agents/platform-agents/src/claude.ts +71 -0
- package/dist/bundled-agents/platform-agents/src/cors.ts +24 -0
- package/dist/bundled-agents/platform-agents/src/envelope.ts +37 -0
- package/dist/bundled-agents/platform-agents/src/health.ts +20 -0
- package/dist/bundled-agents/platform-agents/src/index.ts +171 -0
- package/dist/bundled-agents/platform-agents/src/router.ts +38 -0
- package/dist/bundled-agents/platform-agents/src/text-analysis.ts +238 -0
- package/dist/bundled-agents/platform-agents/tsconfig.json +19 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +43 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +30 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +53 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +51 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +3 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +36 -0
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +2 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +1 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.js +70 -0
- package/dist/bundled-agents/sentinel-agents/lib/index.js.map +1 -0
- package/dist/bundled-agents/sentinel-agents/package-lock.json +12591 -0
- package/dist/bundled-agents/sentinel-agents/package.json +62 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +46 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +33 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +56 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +54 -0
- package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +38 -0
- package/dist/bundled-agents/sentinel-agents/src/claude.ts +71 -0
- package/dist/bundled-agents/sentinel-agents/src/index.ts +77 -0
- package/dist/bundled-agents/sentinel-agents/tsconfig.json +20 -0
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +52 -0
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js +15 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.js +9 -0
- package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.js +41 -0
- package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.js +109 -19
- package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
- package/package.json +1 -1
package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planner Agent
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Translate clarified objectives into structured execution plans
|
|
5
|
+
* Classification: PLANNING, STRUCTURAL_SYNTHESIS
|
|
6
|
+
* decision_type: plan_generation
|
|
7
|
+
*
|
|
8
|
+
* Scope:
|
|
9
|
+
* - Generate ordered plan steps
|
|
10
|
+
* - Identify dependencies
|
|
11
|
+
* - Define sequencing
|
|
12
|
+
*
|
|
13
|
+
* CONSTITUTION COMPLIANCE:
|
|
14
|
+
* ✓ Stateless at runtime
|
|
15
|
+
* ✓ Emits exactly ONE DecisionEvent per invocation
|
|
16
|
+
* ✓ Persists ONLY via ruvector-service
|
|
17
|
+
* ✓ NEVER connects directly to databases
|
|
18
|
+
* ✓ NEVER executes SQL
|
|
19
|
+
* ✓ NEVER modifies runtime behavior
|
|
20
|
+
* ✓ NEVER orchestrates other agents
|
|
21
|
+
* ✓ NEVER enforces policy
|
|
22
|
+
* ✓ NEVER intercepts execution paths
|
|
23
|
+
*
|
|
24
|
+
* Must Never:
|
|
25
|
+
* - Execute steps
|
|
26
|
+
* - Assign agents
|
|
27
|
+
* - Allocate resources
|
|
28
|
+
* - Schedule execution
|
|
29
|
+
*/
|
|
30
|
+
import { BaseAgent, AgentMetadata, AgentResult, PlannerInput, PlannerOutput } from '../contracts';
|
|
31
|
+
import { RuvectorPersistence } from './ruvector-persistence';
|
|
32
|
+
import { Telemetry } from './telemetry';
|
|
33
|
+
/**
|
|
34
|
+
* Planner Agent Implementation
|
|
35
|
+
*
|
|
36
|
+
* This agent analyzes objectives and produces structured execution plans.
|
|
37
|
+
* It is purely analytical - it NEVER executes, assigns, or schedules anything.
|
|
38
|
+
*/
|
|
39
|
+
export declare class PlannerAgent implements BaseAgent<PlannerInput, PlannerOutput> {
|
|
40
|
+
readonly metadata: AgentMetadata;
|
|
41
|
+
private readonly persistence;
|
|
42
|
+
private readonly telemetry;
|
|
43
|
+
constructor(persistence: RuvectorPersistence, telemetry: Telemetry);
|
|
44
|
+
/**
|
|
45
|
+
* Validate input against PlannerInputSchema
|
|
46
|
+
*/
|
|
47
|
+
validateInput(input: unknown): PlannerInput;
|
|
48
|
+
/**
|
|
49
|
+
* Invoke the planner agent
|
|
50
|
+
*
|
|
51
|
+
* DETERMINISTIC: Same input always produces same output structure
|
|
52
|
+
* STATELESS: No internal state modified
|
|
53
|
+
* NON-BLOCKING: Fully async
|
|
54
|
+
*/
|
|
55
|
+
invoke(input: PlannerInput, executionRef: string): Promise<AgentResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Generate structured execution plan from objective
|
|
58
|
+
*
|
|
59
|
+
* This is the core planning logic - purely analytical.
|
|
60
|
+
* NEVER executes, assigns agents, or schedules anything.
|
|
61
|
+
*/
|
|
62
|
+
private generatePlan;
|
|
63
|
+
/**
|
|
64
|
+
* Decompose objective into ordered steps
|
|
65
|
+
*/
|
|
66
|
+
private decomposeObjective;
|
|
67
|
+
/**
|
|
68
|
+
* Create a plan step
|
|
69
|
+
*/
|
|
70
|
+
private createStep;
|
|
71
|
+
/**
|
|
72
|
+
* Build dependency graph as adjacency list
|
|
73
|
+
*/
|
|
74
|
+
private buildDependencyGraph;
|
|
75
|
+
/**
|
|
76
|
+
* Find critical path (longest dependency chain)
|
|
77
|
+
*/
|
|
78
|
+
private findCriticalPath;
|
|
79
|
+
/**
|
|
80
|
+
* Identify groups of steps that can run in parallel
|
|
81
|
+
*/
|
|
82
|
+
private identifyParallelGroups;
|
|
83
|
+
/**
|
|
84
|
+
* Resequence steps based on dependency order
|
|
85
|
+
*/
|
|
86
|
+
private resequenceSteps;
|
|
87
|
+
/**
|
|
88
|
+
* Calculate maximum dependency depth
|
|
89
|
+
*/
|
|
90
|
+
private calculateMaxDepth;
|
|
91
|
+
/**
|
|
92
|
+
* Identify potential risks based on plan structure
|
|
93
|
+
*/
|
|
94
|
+
private identifyRisks;
|
|
95
|
+
/**
|
|
96
|
+
* Extract assumptions made during planning
|
|
97
|
+
*/
|
|
98
|
+
private extractAssumptions;
|
|
99
|
+
/**
|
|
100
|
+
* Summarize objective for output
|
|
101
|
+
*/
|
|
102
|
+
private summarizeObjective;
|
|
103
|
+
/**
|
|
104
|
+
* Calculate confidence score based on plan quality
|
|
105
|
+
*/
|
|
106
|
+
private calculateConfidence;
|
|
107
|
+
/**
|
|
108
|
+
* Get constraints applied during planning
|
|
109
|
+
*/
|
|
110
|
+
private getAppliedConstraints;
|
|
111
|
+
/**
|
|
112
|
+
* Classify error for proper error code
|
|
113
|
+
*/
|
|
114
|
+
private classifyError;
|
|
115
|
+
/**
|
|
116
|
+
* Helper: Check if text contains any of the keywords
|
|
117
|
+
*/
|
|
118
|
+
private containsAny;
|
|
119
|
+
}
|
package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Planner Agent
|
|
4
|
+
*
|
|
5
|
+
* Purpose: Translate clarified objectives into structured execution plans
|
|
6
|
+
* Classification: PLANNING, STRUCTURAL_SYNTHESIS
|
|
7
|
+
* decision_type: plan_generation
|
|
8
|
+
*
|
|
9
|
+
* Scope:
|
|
10
|
+
* - Generate ordered plan steps
|
|
11
|
+
* - Identify dependencies
|
|
12
|
+
* - Define sequencing
|
|
13
|
+
*
|
|
14
|
+
* CONSTITUTION COMPLIANCE:
|
|
15
|
+
* ✓ Stateless at runtime
|
|
16
|
+
* ✓ Emits exactly ONE DecisionEvent per invocation
|
|
17
|
+
* ✓ Persists ONLY via ruvector-service
|
|
18
|
+
* ✓ NEVER connects directly to databases
|
|
19
|
+
* ✓ NEVER executes SQL
|
|
20
|
+
* ✓ NEVER modifies runtime behavior
|
|
21
|
+
* ✓ NEVER orchestrates other agents
|
|
22
|
+
* ✓ NEVER enforces policy
|
|
23
|
+
* ✓ NEVER intercepts execution paths
|
|
24
|
+
*
|
|
25
|
+
* Must Never:
|
|
26
|
+
* - Execute steps
|
|
27
|
+
* - Assign agents
|
|
28
|
+
* - Allocate resources
|
|
29
|
+
* - Schedule execution
|
|
30
|
+
*/
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.PlannerAgent = void 0;
|
|
33
|
+
const uuid_1 = require("uuid");
|
|
34
|
+
const contracts_1 = require("../contracts");
|
|
35
|
+
const AGENT_ID = 'planner-agent';
|
|
36
|
+
const AGENT_VERSION = '1.0.0';
|
|
37
|
+
const DECISION_TYPE = 'plan_generation';
|
|
38
|
+
/**
|
|
39
|
+
* Planner Agent Implementation
|
|
40
|
+
*
|
|
41
|
+
* This agent analyzes objectives and produces structured execution plans.
|
|
42
|
+
* It is purely analytical - it NEVER executes, assigns, or schedules anything.
|
|
43
|
+
*/
|
|
44
|
+
class PlannerAgent {
|
|
45
|
+
metadata = {
|
|
46
|
+
id: AGENT_ID,
|
|
47
|
+
name: 'Planner Agent',
|
|
48
|
+
version: AGENT_VERSION,
|
|
49
|
+
classifications: [
|
|
50
|
+
contracts_1.AgentClassification.PLANNING,
|
|
51
|
+
contracts_1.AgentClassification.STRUCTURAL_SYNTHESIS,
|
|
52
|
+
],
|
|
53
|
+
decision_type: DECISION_TYPE,
|
|
54
|
+
description: 'Translates clarified objectives into structured execution plans with dependencies and sequencing.',
|
|
55
|
+
};
|
|
56
|
+
persistence;
|
|
57
|
+
telemetry;
|
|
58
|
+
constructor(persistence, telemetry) {
|
|
59
|
+
this.persistence = persistence;
|
|
60
|
+
this.telemetry = telemetry;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Validate input against PlannerInputSchema
|
|
64
|
+
*/
|
|
65
|
+
validateInput(input) {
|
|
66
|
+
return contracts_1.PlannerInputSchema.parse(input);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Invoke the planner agent
|
|
70
|
+
*
|
|
71
|
+
* DETERMINISTIC: Same input always produces same output structure
|
|
72
|
+
* STATELESS: No internal state modified
|
|
73
|
+
* NON-BLOCKING: Fully async
|
|
74
|
+
*/
|
|
75
|
+
async invoke(input, executionRef) {
|
|
76
|
+
const startTime = Date.now();
|
|
77
|
+
try {
|
|
78
|
+
// Emit telemetry start
|
|
79
|
+
this.telemetry.recordStart(AGENT_ID, executionRef, input);
|
|
80
|
+
// Generate the plan (pure analysis, no side effects)
|
|
81
|
+
const output = this.generatePlan(input);
|
|
82
|
+
// Validate output
|
|
83
|
+
const validatedOutput = contracts_1.PlannerOutputSchema.parse(output);
|
|
84
|
+
// Calculate confidence based on plan quality metrics
|
|
85
|
+
const confidence = this.calculateConfidence(validatedOutput);
|
|
86
|
+
// Constraints applied during planning
|
|
87
|
+
const constraintsApplied = this.getAppliedConstraints(input);
|
|
88
|
+
// Create the DecisionEvent
|
|
89
|
+
const event = (0, contracts_1.createDecisionEvent)(AGENT_ID, AGENT_VERSION, DECISION_TYPE, input, validatedOutput, confidence, constraintsApplied, executionRef);
|
|
90
|
+
// Persist via ruvector-service (best-effort, non-blocking)
|
|
91
|
+
let persistence_status;
|
|
92
|
+
try {
|
|
93
|
+
await this.persistence.store(event);
|
|
94
|
+
persistence_status = { status: 'persisted' };
|
|
95
|
+
}
|
|
96
|
+
catch (persistError) {
|
|
97
|
+
const persistMessage = persistError instanceof Error ? persistError.message : 'Unknown persistence error';
|
|
98
|
+
console.error(`[${AGENT_ID}] RuVector persistence failed (non-blocking): ${persistMessage}`);
|
|
99
|
+
persistence_status = { status: 'skipped', error: persistMessage };
|
|
100
|
+
}
|
|
101
|
+
// Emit telemetry success
|
|
102
|
+
this.telemetry.recordSuccess(AGENT_ID, executionRef, Date.now() - startTime);
|
|
103
|
+
return {
|
|
104
|
+
status: 'success',
|
|
105
|
+
event,
|
|
106
|
+
persistence_status,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
111
|
+
const errorCode = this.classifyError(error);
|
|
112
|
+
// Emit telemetry failure
|
|
113
|
+
this.telemetry.recordFailure(AGENT_ID, executionRef, errorCode, errorMessage);
|
|
114
|
+
return (0, contracts_1.createErrorResult)(errorCode, errorMessage, executionRef);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Generate structured execution plan from objective
|
|
119
|
+
*
|
|
120
|
+
* This is the core planning logic - purely analytical.
|
|
121
|
+
* NEVER executes, assigns agents, or schedules anything.
|
|
122
|
+
*/
|
|
123
|
+
generatePlan(input) {
|
|
124
|
+
const planId = (0, uuid_1.v4)();
|
|
125
|
+
const steps = this.decomposeObjective(input);
|
|
126
|
+
const dependencyGraph = this.buildDependencyGraph(steps);
|
|
127
|
+
const criticalPath = this.findCriticalPath(steps, dependencyGraph);
|
|
128
|
+
const parallelGroups = this.identifyParallelGroups(steps, dependencyGraph);
|
|
129
|
+
return {
|
|
130
|
+
plan_id: planId,
|
|
131
|
+
objective_summary: this.summarizeObjective(input.objective),
|
|
132
|
+
steps,
|
|
133
|
+
dependency_graph: dependencyGraph,
|
|
134
|
+
critical_path: criticalPath,
|
|
135
|
+
parallel_groups: parallelGroups,
|
|
136
|
+
analysis: {
|
|
137
|
+
total_steps: steps.length,
|
|
138
|
+
max_depth: this.calculateMaxDepth(dependencyGraph),
|
|
139
|
+
parallel_opportunities: parallelGroups.filter(g => g.length > 1).length,
|
|
140
|
+
risks: this.identifyRisks(steps, input),
|
|
141
|
+
assumptions: this.extractAssumptions(input),
|
|
142
|
+
},
|
|
143
|
+
version: '1.0.0',
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Decompose objective into ordered steps
|
|
148
|
+
*/
|
|
149
|
+
decomposeObjective(input) {
|
|
150
|
+
const objective = input.objective.toLowerCase();
|
|
151
|
+
const steps = [];
|
|
152
|
+
// Pattern-based decomposition
|
|
153
|
+
// This is a deterministic analysis based on objective structure
|
|
154
|
+
// Always start with analysis/understanding phase
|
|
155
|
+
steps.push(this.createStep('analyze-requirements', 'Analyze Requirements', 'Analyze and validate the requirements from the objective', 0, [], ['requirements', 'analysis'], 'high'));
|
|
156
|
+
// Design phase
|
|
157
|
+
steps.push(this.createStep('design-solution', 'Design Solution', 'Design the solution architecture and approach', 1, [{ depends_on: 'analyze-requirements', type: 'blocking' }], ['design', 'architecture'], 'high'));
|
|
158
|
+
// Implementation planning based on objective keywords
|
|
159
|
+
if (this.containsAny(objective, ['build', 'create', 'implement', 'develop'])) {
|
|
160
|
+
steps.push(this.createStep('plan-implementation', 'Plan Implementation', 'Define implementation steps and technical approach', 2, [{ depends_on: 'design-solution', type: 'blocking' }], ['implementation', 'planning'], 'high'));
|
|
161
|
+
}
|
|
162
|
+
// Validation phase
|
|
163
|
+
if (this.containsAny(objective, ['test', 'validate', 'verify', 'check'])) {
|
|
164
|
+
steps.push(this.createStep('plan-validation', 'Plan Validation', 'Define validation criteria and test approach', steps.length, [{ depends_on: steps[steps.length - 1]?.step_id || 'design-solution', type: 'data' }], ['validation', 'testing'], 'medium'));
|
|
165
|
+
}
|
|
166
|
+
// Integration consideration
|
|
167
|
+
if (this.containsAny(objective, ['integrate', 'connect', 'api', 'service'])) {
|
|
168
|
+
steps.push(this.createStep('plan-integration', 'Plan Integration', 'Define integration points and interface contracts', steps.length, [{ depends_on: 'design-solution', type: 'data' }], ['integration', 'interfaces'], 'medium', true // parallelizable
|
|
169
|
+
));
|
|
170
|
+
}
|
|
171
|
+
// Documentation
|
|
172
|
+
steps.push(this.createStep('plan-documentation', 'Plan Documentation', 'Define documentation requirements and structure', steps.length, [{ depends_on: 'design-solution', type: 'data' }], ['documentation'], 'low', true));
|
|
173
|
+
// Completion/Review phase
|
|
174
|
+
steps.push(this.createStep('define-completion-criteria', 'Define Completion Criteria', 'Establish clear criteria for plan completion', steps.length, steps.slice(0, -1).map(s => ({ depends_on: s.step_id, type: 'data' })), ['completion', 'criteria'], 'high'));
|
|
175
|
+
// Re-sequence based on dependencies
|
|
176
|
+
return this.resequenceSteps(steps);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Create a plan step
|
|
180
|
+
*/
|
|
181
|
+
createStep(stepId, name, description, sequenceOrder, dependencies, tags, criticality, parallelizable = false) {
|
|
182
|
+
return {
|
|
183
|
+
step_id: stepId,
|
|
184
|
+
name,
|
|
185
|
+
description,
|
|
186
|
+
sequence_order: sequenceOrder,
|
|
187
|
+
dependencies,
|
|
188
|
+
expected_inputs: [],
|
|
189
|
+
expected_outputs: [{
|
|
190
|
+
name: `${stepId}-output`,
|
|
191
|
+
type: 'artifact',
|
|
192
|
+
description: `Output from ${name}`,
|
|
193
|
+
}],
|
|
194
|
+
tags,
|
|
195
|
+
constraints: [],
|
|
196
|
+
parallelizable,
|
|
197
|
+
criticality,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Build dependency graph as adjacency list
|
|
202
|
+
*/
|
|
203
|
+
buildDependencyGraph(steps) {
|
|
204
|
+
const graph = {};
|
|
205
|
+
for (const step of steps) {
|
|
206
|
+
graph[step.step_id] = step.dependencies.map(d => d.depends_on);
|
|
207
|
+
}
|
|
208
|
+
return graph;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Find critical path (longest dependency chain)
|
|
212
|
+
*/
|
|
213
|
+
findCriticalPath(steps, graph) {
|
|
214
|
+
const memo = new Map();
|
|
215
|
+
const findLongestPath = (stepId) => {
|
|
216
|
+
if (memo.has(stepId)) {
|
|
217
|
+
return memo.get(stepId);
|
|
218
|
+
}
|
|
219
|
+
const dependencies = graph[stepId] || [];
|
|
220
|
+
if (dependencies.length === 0) {
|
|
221
|
+
memo.set(stepId, [stepId]);
|
|
222
|
+
return [stepId];
|
|
223
|
+
}
|
|
224
|
+
let longestDep = [];
|
|
225
|
+
for (const dep of dependencies) {
|
|
226
|
+
const path = findLongestPath(dep);
|
|
227
|
+
if (path.length > longestDep.length) {
|
|
228
|
+
longestDep = path;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const result = [...longestDep, stepId];
|
|
232
|
+
memo.set(stepId, result);
|
|
233
|
+
return result;
|
|
234
|
+
};
|
|
235
|
+
let criticalPath = [];
|
|
236
|
+
for (const step of steps) {
|
|
237
|
+
const path = findLongestPath(step.step_id);
|
|
238
|
+
if (path.length > criticalPath.length) {
|
|
239
|
+
criticalPath = path;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return criticalPath;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Identify groups of steps that can run in parallel
|
|
246
|
+
*/
|
|
247
|
+
identifyParallelGroups(steps, graph) {
|
|
248
|
+
const groups = [];
|
|
249
|
+
const completed = new Set();
|
|
250
|
+
while (completed.size < steps.length) {
|
|
251
|
+
const currentGroup = [];
|
|
252
|
+
for (const step of steps) {
|
|
253
|
+
if (completed.has(step.step_id))
|
|
254
|
+
continue;
|
|
255
|
+
const deps = graph[step.step_id] || [];
|
|
256
|
+
const allDepsComplete = deps.every(d => completed.has(d));
|
|
257
|
+
if (allDepsComplete) {
|
|
258
|
+
currentGroup.push(step.step_id);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (currentGroup.length === 0)
|
|
262
|
+
break; // Circular dependency protection
|
|
263
|
+
groups.push(currentGroup);
|
|
264
|
+
currentGroup.forEach(id => completed.add(id));
|
|
265
|
+
}
|
|
266
|
+
return groups;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Resequence steps based on dependency order
|
|
270
|
+
*/
|
|
271
|
+
resequenceSteps(steps) {
|
|
272
|
+
const graph = this.buildDependencyGraph(steps);
|
|
273
|
+
const groups = this.identifyParallelGroups(steps, graph);
|
|
274
|
+
let order = 0;
|
|
275
|
+
const stepMap = new Map(steps.map(s => [s.step_id, s]));
|
|
276
|
+
for (const group of groups) {
|
|
277
|
+
for (const stepId of group) {
|
|
278
|
+
const step = stepMap.get(stepId);
|
|
279
|
+
if (step) {
|
|
280
|
+
step.sequence_order = order;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
order++;
|
|
284
|
+
}
|
|
285
|
+
return steps.sort((a, b) => a.sequence_order - b.sequence_order);
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Calculate maximum dependency depth
|
|
289
|
+
*/
|
|
290
|
+
calculateMaxDepth(graph) {
|
|
291
|
+
const memo = new Map();
|
|
292
|
+
const getDepth = (stepId, visited) => {
|
|
293
|
+
if (visited.has(stepId))
|
|
294
|
+
return 0; // Cycle protection
|
|
295
|
+
if (memo.has(stepId))
|
|
296
|
+
return memo.get(stepId);
|
|
297
|
+
visited.add(stepId);
|
|
298
|
+
const deps = graph[stepId] || [];
|
|
299
|
+
if (deps.length === 0) {
|
|
300
|
+
memo.set(stepId, 0);
|
|
301
|
+
return 0;
|
|
302
|
+
}
|
|
303
|
+
const maxDepDep = Math.max(...deps.map(d => getDepth(d, new Set(visited))));
|
|
304
|
+
const depth = maxDepDep + 1;
|
|
305
|
+
memo.set(stepId, depth);
|
|
306
|
+
return depth;
|
|
307
|
+
};
|
|
308
|
+
return Math.max(0, ...Object.keys(graph).map(id => getDepth(id, new Set())));
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Identify potential risks based on plan structure
|
|
312
|
+
*/
|
|
313
|
+
identifyRisks(steps, input) {
|
|
314
|
+
const risks = [];
|
|
315
|
+
// Check for critical path bottlenecks
|
|
316
|
+
const criticalSteps = steps.filter(s => s.criticality === 'critical' || s.criticality === 'high');
|
|
317
|
+
if (criticalSteps.length > steps.length * 0.5) {
|
|
318
|
+
risks.push({
|
|
319
|
+
description: 'High concentration of critical steps may indicate plan complexity risk',
|
|
320
|
+
severity: 'medium',
|
|
321
|
+
affected_steps: criticalSteps.map(s => s.step_id),
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
// Check for steps with many dependencies
|
|
325
|
+
const highDependencySteps = steps.filter(s => s.dependencies.length > 3);
|
|
326
|
+
if (highDependencySteps.length > 0) {
|
|
327
|
+
risks.push({
|
|
328
|
+
description: 'Steps with many dependencies may create coordination complexity',
|
|
329
|
+
severity: 'low',
|
|
330
|
+
affected_steps: highDependencySteps.map(s => s.step_id),
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
return risks;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Extract assumptions made during planning
|
|
337
|
+
*/
|
|
338
|
+
extractAssumptions(input) {
|
|
339
|
+
const assumptions = [
|
|
340
|
+
'Objective has been clarified and validated',
|
|
341
|
+
'All implicit requirements have been captured',
|
|
342
|
+
];
|
|
343
|
+
if (!input.context?.constraints?.length) {
|
|
344
|
+
assumptions.push('No explicit constraints provided - using default planning constraints');
|
|
345
|
+
}
|
|
346
|
+
if (!input.context?.existing_components?.length) {
|
|
347
|
+
assumptions.push('No existing components specified - planning as greenfield');
|
|
348
|
+
}
|
|
349
|
+
return assumptions;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Summarize objective for output
|
|
353
|
+
*/
|
|
354
|
+
summarizeObjective(objective) {
|
|
355
|
+
// Truncate and clean for summary
|
|
356
|
+
const cleaned = objective.trim().replace(/\s+/g, ' ');
|
|
357
|
+
return cleaned.length > 200 ? cleaned.substring(0, 197) + '...' : cleaned;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Calculate confidence score based on plan quality
|
|
361
|
+
*/
|
|
362
|
+
calculateConfidence(output) {
|
|
363
|
+
let confidence = 0.7; // Base confidence
|
|
364
|
+
// Boost for well-structured plans
|
|
365
|
+
if (output.steps.length >= 3 && output.steps.length <= 15) {
|
|
366
|
+
confidence += 0.1;
|
|
367
|
+
}
|
|
368
|
+
// Boost for clear critical path
|
|
369
|
+
if (output.critical_path.length > 0) {
|
|
370
|
+
confidence += 0.05;
|
|
371
|
+
}
|
|
372
|
+
// Boost for parallel opportunities
|
|
373
|
+
if (output.analysis.parallel_opportunities > 0) {
|
|
374
|
+
confidence += 0.05;
|
|
375
|
+
}
|
|
376
|
+
// Reduce for many risks
|
|
377
|
+
if (output.analysis.risks.length > 3) {
|
|
378
|
+
confidence -= 0.1;
|
|
379
|
+
}
|
|
380
|
+
return Math.min(1.0, Math.max(0.0, confidence));
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Get constraints applied during planning
|
|
384
|
+
*/
|
|
385
|
+
getAppliedConstraints(input) {
|
|
386
|
+
const constraints = [
|
|
387
|
+
'read_only_analysis',
|
|
388
|
+
'no_execution',
|
|
389
|
+
'no_agent_assignment',
|
|
390
|
+
'no_resource_allocation',
|
|
391
|
+
'no_scheduling',
|
|
392
|
+
'deterministic_output',
|
|
393
|
+
];
|
|
394
|
+
if (input.context?.constraints) {
|
|
395
|
+
constraints.push(...input.context.constraints.map(c => `user_constraint:${c}`));
|
|
396
|
+
}
|
|
397
|
+
return constraints;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Classify error for proper error code
|
|
401
|
+
*/
|
|
402
|
+
classifyError(error) {
|
|
403
|
+
if (error instanceof Error) {
|
|
404
|
+
if (error.name === 'ZodError') {
|
|
405
|
+
return contracts_1.AgentErrorCodes.VALIDATION_FAILED;
|
|
406
|
+
}
|
|
407
|
+
if (error.message.includes('persistence') || error.message.includes('ruvector')) {
|
|
408
|
+
return contracts_1.AgentErrorCodes.PERSISTENCE_ERROR;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return contracts_1.AgentErrorCodes.PROCESSING_ERROR;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Helper: Check if text contains any of the keywords
|
|
415
|
+
*/
|
|
416
|
+
containsAny(text, keywords) {
|
|
417
|
+
return keywords.some(kw => text.includes(kw));
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
exports.PlannerAgent = PlannerAgent;
|
|
421
|
+
//# sourceMappingURL=planner-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner-agent.js","sourceRoot":"","sources":["../../../../../services/agents/planner/planner-agent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAEH,+BAAoC;AACpC,4CAcsB;AAItB,M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AW,CAAC;IACrB,CAAC;IAED;;OAEG;IACK,aAAa,CAAC,KAAc;QAClC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBAC9B,OAAO,2BAAe,CAAC,iBAAiB,CAAC;YAC3C,CAAC;YACD,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChF,OAAO,2BAAe,CAAC,iBAAiB,CAAC;YAC3C,CAAC;QACH,CAAC;QACD,OAAO,2BAAe,CAAC,gBAAgB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACK,WAAW,CAAC,IAAY,EAAE,QAAkB;QAClD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;CACF;AAvgBD,oCAugBC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RuVector Persistence Layer
|
|
3
|
+
*
|
|
4
|
+
* Per Constitution: Agents persist ONLY via ruvector-service.
|
|
5
|
+
* NEVER connect directly to Google SQL.
|
|
6
|
+
* NEVER execute SQL.
|
|
7
|
+
*/
|
|
8
|
+
import { DecisionEvent } from '../contracts';
|
|
9
|
+
export interface RuvectorConfig {
|
|
10
|
+
endpoint: string;
|
|
11
|
+
apiKey?: string;
|
|
12
|
+
namespace: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* RuVector Persistence Service
|
|
17
|
+
*
|
|
18
|
+
* Handles all persistence operations through the ruvector-service.
|
|
19
|
+
* This is the ONLY allowed persistence mechanism per constitution.
|
|
20
|
+
*/
|
|
21
|
+
export declare class RuvectorPersistence {
|
|
22
|
+
private readonly config;
|
|
23
|
+
constructor(config: RuvectorConfig);
|
|
24
|
+
/**
|
|
25
|
+
* Store a DecisionEvent in ruvector
|
|
26
|
+
*/
|
|
27
|
+
store(event: DecisionEvent): Promise<{
|
|
28
|
+
id: string;
|
|
29
|
+
stored: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve a DecisionEvent by execution reference
|
|
33
|
+
*/
|
|
34
|
+
retrieve(executionRef: string): Promise<DecisionEvent | null>;
|
|
35
|
+
/**
|
|
36
|
+
* Search for DecisionEvents by agent and decision type
|
|
37
|
+
*/
|
|
38
|
+
search(params: {
|
|
39
|
+
agentId?: string;
|
|
40
|
+
decisionType?: string;
|
|
41
|
+
fromTimestamp?: string;
|
|
42
|
+
toTimestamp?: string;
|
|
43
|
+
limit?: number;
|
|
44
|
+
}): Promise<DecisionEvent[]>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create RuVector persistence from environment
|
|
48
|
+
*/
|
|
49
|
+
export declare function createRuvectorFromEnv(): RuvectorPersistence;
|