@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
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Reflection Agent
|
|
4
|
+
*
|
|
5
|
+
* Purpose: Analyze DecisionEvents to extract learning and quality signals
|
|
6
|
+
* Classification: POST_EXECUTION_ANALYSIS, QUALITY_ASSESSMENT
|
|
7
|
+
* decision_type: reflection_analysis
|
|
8
|
+
*
|
|
9
|
+
* Scope:
|
|
10
|
+
* - Evaluate outcomes
|
|
11
|
+
* - Identify gaps and inefficiencies
|
|
12
|
+
* - Produce improvement insights
|
|
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
|
+
* - Modify behavior
|
|
27
|
+
* - Trigger retries
|
|
28
|
+
* - Apply optimizations
|
|
29
|
+
*/
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.ReflectionAgent = void 0;
|
|
32
|
+
const uuid_1 = require("uuid");
|
|
33
|
+
const contracts_1 = require("../contracts");
|
|
34
|
+
const AGENT_ID = 'reflection-agent';
|
|
35
|
+
const AGENT_VERSION = '1.0.0';
|
|
36
|
+
const DECISION_TYPE = 'reflection_analysis';
|
|
37
|
+
/**
|
|
38
|
+
* Reflection Agent Implementation
|
|
39
|
+
*
|
|
40
|
+
* This agent analyzes DecisionEvents and produces quality/learning signals.
|
|
41
|
+
* It is purely analytical - it NEVER modifies behavior, triggers retries, or applies optimizations.
|
|
42
|
+
*/
|
|
43
|
+
class ReflectionAgent {
|
|
44
|
+
metadata = {
|
|
45
|
+
id: AGENT_ID,
|
|
46
|
+
name: 'Reflection Agent',
|
|
47
|
+
version: AGENT_VERSION,
|
|
48
|
+
classifications: [
|
|
49
|
+
contracts_1.AgentClassification.POST_EXECUTION_ANALYSIS,
|
|
50
|
+
contracts_1.AgentClassification.QUALITY_ASSESSMENT,
|
|
51
|
+
],
|
|
52
|
+
decision_type: DECISION_TYPE,
|
|
53
|
+
description: 'Analyzes DecisionEvents to extract learning and quality signals for continuous improvement insights.',
|
|
54
|
+
};
|
|
55
|
+
persistence;
|
|
56
|
+
telemetry;
|
|
57
|
+
constructor(persistence, telemetry) {
|
|
58
|
+
this.persistence = persistence;
|
|
59
|
+
this.telemetry = telemetry;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Validate input against ReflectionInputSchema
|
|
63
|
+
*/
|
|
64
|
+
validateInput(input) {
|
|
65
|
+
return contracts_1.ReflectionInputSchema.parse(input);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Invoke the reflection agent
|
|
69
|
+
*
|
|
70
|
+
* DETERMINISTIC: Same input always produces same output structure
|
|
71
|
+
* STATELESS: No internal state modified
|
|
72
|
+
* NON-BLOCKING: Fully async
|
|
73
|
+
*/
|
|
74
|
+
async invoke(input, executionRef) {
|
|
75
|
+
const startTime = Date.now();
|
|
76
|
+
try {
|
|
77
|
+
// Emit telemetry start
|
|
78
|
+
this.telemetry.recordStart(AGENT_ID, executionRef, input);
|
|
79
|
+
// Perform reflection analysis (pure analysis, no side effects)
|
|
80
|
+
const output = this.analyzeDecisionEvents(input);
|
|
81
|
+
// Validate output
|
|
82
|
+
const validatedOutput = contracts_1.ReflectionOutputSchema.parse(output);
|
|
83
|
+
// Calculate confidence based on analysis quality
|
|
84
|
+
const confidence = this.calculateConfidence(validatedOutput, input);
|
|
85
|
+
// Constraints applied during reflection
|
|
86
|
+
const constraintsApplied = this.getAppliedConstraints(input);
|
|
87
|
+
// Create the DecisionEvent
|
|
88
|
+
const event = (0, contracts_1.createDecisionEvent)(AGENT_ID, AGENT_VERSION, DECISION_TYPE, input, validatedOutput, confidence, constraintsApplied, executionRef);
|
|
89
|
+
// Persist via ruvector-service (best-effort, non-blocking)
|
|
90
|
+
let persistence_status;
|
|
91
|
+
try {
|
|
92
|
+
await this.persistence.store(event);
|
|
93
|
+
persistence_status = { status: 'persisted' };
|
|
94
|
+
}
|
|
95
|
+
catch (persistError) {
|
|
96
|
+
const persistMessage = persistError instanceof Error ? persistError.message : 'Unknown persistence error';
|
|
97
|
+
console.error(`[${AGENT_ID}] RuVector persistence failed (non-blocking): ${persistMessage}`);
|
|
98
|
+
persistence_status = { status: 'skipped', error: persistMessage };
|
|
99
|
+
}
|
|
100
|
+
// Emit telemetry success
|
|
101
|
+
this.telemetry.recordSuccess(AGENT_ID, executionRef, Date.now() - startTime);
|
|
102
|
+
return {
|
|
103
|
+
status: 'success',
|
|
104
|
+
event,
|
|
105
|
+
persistence_status,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
110
|
+
const errorCode = this.classifyError(error);
|
|
111
|
+
// Emit telemetry failure
|
|
112
|
+
this.telemetry.recordFailure(AGENT_ID, executionRef, errorCode, errorMessage);
|
|
113
|
+
return (0, contracts_1.createErrorResult)(errorCode, errorMessage, executionRef);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Analyze DecisionEvents and produce reflection output
|
|
118
|
+
*
|
|
119
|
+
* This is the core reflection logic - purely analytical.
|
|
120
|
+
* NEVER modifies behavior, triggers retries, or applies optimizations.
|
|
121
|
+
*/
|
|
122
|
+
analyzeDecisionEvents(input) {
|
|
123
|
+
const reflectionId = (0, uuid_1.v4)();
|
|
124
|
+
const events = input.decision_events;
|
|
125
|
+
const focusAreas = input.context?.focus_areas || ['all'];
|
|
126
|
+
const preferences = input.preferences;
|
|
127
|
+
const minConfidence = preferences?.min_confidence ?? 0.5;
|
|
128
|
+
const maxSignalsPerCategory = preferences?.max_signals_per_category ?? 10;
|
|
129
|
+
// Extract unique agents analyzed
|
|
130
|
+
const agentsAnalyzed = [...new Set(events.map(e => e.agent_id))];
|
|
131
|
+
// Determine time range
|
|
132
|
+
const timestamps = events.map(e => new Date(e.timestamp).getTime());
|
|
133
|
+
const analysisTimeRange = {
|
|
134
|
+
earliest: new Date(Math.min(...timestamps)).toISOString(),
|
|
135
|
+
latest: new Date(Math.max(...timestamps)).toISOString(),
|
|
136
|
+
};
|
|
137
|
+
// Perform analysis based on focus areas
|
|
138
|
+
const includeAll = focusAreas.includes('all');
|
|
139
|
+
const outcomeEvaluations = (includeAll || focusAreas.includes('outcomes'))
|
|
140
|
+
? this.evaluateOutcomes(events)
|
|
141
|
+
: [];
|
|
142
|
+
const qualitySignals = (includeAll || focusAreas.includes('quality'))
|
|
143
|
+
? this.extractQualitySignals(events, minConfidence).slice(0, maxSignalsPerCategory)
|
|
144
|
+
: [];
|
|
145
|
+
const learningSignals = (includeAll || focusAreas.includes('learning'))
|
|
146
|
+
? this.extractLearningSignals(events, minConfidence).slice(0, maxSignalsPerCategory)
|
|
147
|
+
: [];
|
|
148
|
+
const gapAnalysis = (includeAll || focusAreas.includes('gaps'))
|
|
149
|
+
? this.identifyGaps(events, outcomeEvaluations).slice(0, maxSignalsPerCategory)
|
|
150
|
+
: [];
|
|
151
|
+
// Find correlations if enabled
|
|
152
|
+
const correlations = (preferences?.correlate_events ?? true)
|
|
153
|
+
? this.findCorrelations(events)
|
|
154
|
+
: [];
|
|
155
|
+
// Generate summary
|
|
156
|
+
const summary = this.generateSummary(outcomeEvaluations, qualitySignals, learningSignals, gapAnalysis);
|
|
157
|
+
return {
|
|
158
|
+
reflection_id: reflectionId,
|
|
159
|
+
events_analyzed: events.length,
|
|
160
|
+
agents_analyzed: agentsAnalyzed,
|
|
161
|
+
analysis_time_range: analysisTimeRange,
|
|
162
|
+
outcome_evaluations: outcomeEvaluations,
|
|
163
|
+
quality_signals: qualitySignals,
|
|
164
|
+
learning_signals: learningSignals,
|
|
165
|
+
gap_analysis: gapAnalysis,
|
|
166
|
+
correlations,
|
|
167
|
+
summary,
|
|
168
|
+
version: '1.0.0',
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Evaluate outcomes for each decision event
|
|
173
|
+
*/
|
|
174
|
+
evaluateOutcomes(events) {
|
|
175
|
+
return events.map(event => {
|
|
176
|
+
const dimensions = this.assessDimensions(event);
|
|
177
|
+
const outcomeScore = dimensions.reduce((sum, d) => sum + d.score, 0) / dimensions.length;
|
|
178
|
+
const metExpectations = outcomeScore >= 0.7 && event.confidence >= 0.6;
|
|
179
|
+
return {
|
|
180
|
+
decision_ref: event.execution_ref,
|
|
181
|
+
agent_id: event.agent_id,
|
|
182
|
+
decision_type: event.decision_type,
|
|
183
|
+
outcome_score: Math.round(outcomeScore * 100) / 100,
|
|
184
|
+
summary: this.generateOutcomeSummary(event, outcomeScore),
|
|
185
|
+
dimensions,
|
|
186
|
+
met_expectations: metExpectations,
|
|
187
|
+
deviation_notes: metExpectations
|
|
188
|
+
? undefined
|
|
189
|
+
: this.generateDeviationNotes(event, outcomeScore),
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Assess quality dimensions for a decision event
|
|
195
|
+
*/
|
|
196
|
+
assessDimensions(event) {
|
|
197
|
+
const dimensions = [];
|
|
198
|
+
// Confidence dimension
|
|
199
|
+
dimensions.push({
|
|
200
|
+
name: 'confidence',
|
|
201
|
+
score: event.confidence,
|
|
202
|
+
notes: event.confidence < 0.5 ? 'Low confidence indicates uncertainty' : undefined,
|
|
203
|
+
});
|
|
204
|
+
// Completeness dimension (based on constraints applied)
|
|
205
|
+
const completenessScore = Math.min(1, event.constraints_applied.length / 5);
|
|
206
|
+
dimensions.push({
|
|
207
|
+
name: 'completeness',
|
|
208
|
+
score: completenessScore,
|
|
209
|
+
notes: completenessScore < 0.5 ? 'Few constraints applied' : undefined,
|
|
210
|
+
});
|
|
211
|
+
// Determinism dimension (based on inputs_hash presence and validity)
|
|
212
|
+
const determinismScore = event.inputs_hash.length === 64 ? 1.0 : 0.5;
|
|
213
|
+
dimensions.push({
|
|
214
|
+
name: 'determinism',
|
|
215
|
+
score: determinismScore,
|
|
216
|
+
notes: determinismScore < 1 ? 'Input hashing may be incomplete' : undefined,
|
|
217
|
+
});
|
|
218
|
+
// Output quality dimension (analyze output structure)
|
|
219
|
+
const outputScore = this.assessOutputQuality(event.outputs);
|
|
220
|
+
dimensions.push({
|
|
221
|
+
name: 'output_quality',
|
|
222
|
+
score: outputScore,
|
|
223
|
+
notes: outputScore < 0.6 ? 'Output structure may be incomplete' : undefined,
|
|
224
|
+
});
|
|
225
|
+
return dimensions;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Assess quality of event outputs
|
|
229
|
+
*/
|
|
230
|
+
assessOutputQuality(outputs) {
|
|
231
|
+
if (!outputs)
|
|
232
|
+
return 0.3;
|
|
233
|
+
if (typeof outputs !== 'object')
|
|
234
|
+
return 0.5;
|
|
235
|
+
const obj = outputs;
|
|
236
|
+
const keys = Object.keys(obj);
|
|
237
|
+
// More structured outputs get higher scores
|
|
238
|
+
if (keys.length === 0)
|
|
239
|
+
return 0.4;
|
|
240
|
+
if (keys.length < 3)
|
|
241
|
+
return 0.6;
|
|
242
|
+
if (keys.length < 6)
|
|
243
|
+
return 0.8;
|
|
244
|
+
return 0.9;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Generate outcome summary
|
|
248
|
+
*/
|
|
249
|
+
generateOutcomeSummary(event, score) {
|
|
250
|
+
const quality = score >= 0.8 ? 'high' : score >= 0.6 ? 'acceptable' : 'needs improvement';
|
|
251
|
+
return `${event.decision_type} from ${event.agent_id} produced ${quality} quality output with ${(event.confidence * 100).toFixed(0)}% confidence`;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Generate deviation notes
|
|
255
|
+
*/
|
|
256
|
+
generateDeviationNotes(event, score) {
|
|
257
|
+
const issues = [];
|
|
258
|
+
if (event.confidence < 0.6)
|
|
259
|
+
issues.push('low confidence');
|
|
260
|
+
if (score < 0.7)
|
|
261
|
+
issues.push('suboptimal outcome score');
|
|
262
|
+
return `Decision deviated from expectations due to: ${issues.join(', ')}`;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Extract quality signals from events
|
|
266
|
+
*/
|
|
267
|
+
extractQualitySignals(events, minConfidence) {
|
|
268
|
+
const signals = [];
|
|
269
|
+
let signalCounter = 0;
|
|
270
|
+
// Aggregate confidence analysis
|
|
271
|
+
const avgConfidence = events.reduce((sum, e) => sum + e.confidence, 0) / events.length;
|
|
272
|
+
if (avgConfidence >= minConfidence) {
|
|
273
|
+
signals.push({
|
|
274
|
+
signal_id: `qs-${++signalCounter}`,
|
|
275
|
+
type: 'accuracy',
|
|
276
|
+
value: avgConfidence,
|
|
277
|
+
description: `Average decision confidence across ${events.length} events`,
|
|
278
|
+
evidence: [`Calculated from ${events.length} DecisionEvents`],
|
|
279
|
+
severity: avgConfidence < 0.5 ? 'warning' : undefined,
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
// Performance signal based on constraint coverage
|
|
283
|
+
const avgConstraints = events.reduce((sum, e) => sum + e.constraints_applied.length, 0) / events.length;
|
|
284
|
+
const constraintScore = Math.min(1, avgConstraints / 6);
|
|
285
|
+
if (constraintScore >= minConfidence) {
|
|
286
|
+
signals.push({
|
|
287
|
+
signal_id: `qs-${++signalCounter}`,
|
|
288
|
+
type: 'completeness',
|
|
289
|
+
value: constraintScore,
|
|
290
|
+
description: `Average constraint coverage across decisions`,
|
|
291
|
+
evidence: [`Average ${avgConstraints.toFixed(1)} constraints per decision`],
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
// Consistency signal - check for similar decision types
|
|
295
|
+
const decisionTypeCounts = new Map();
|
|
296
|
+
events.forEach(e => {
|
|
297
|
+
decisionTypeCounts.set(e.decision_type, (decisionTypeCounts.get(e.decision_type) || 0) + 1);
|
|
298
|
+
});
|
|
299
|
+
const consistencyScore = Math.min(1, 1 / decisionTypeCounts.size);
|
|
300
|
+
signals.push({
|
|
301
|
+
signal_id: `qs-${++signalCounter}`,
|
|
302
|
+
type: 'consistency',
|
|
303
|
+
value: consistencyScore,
|
|
304
|
+
description: `Decision type consistency across analyzed events`,
|
|
305
|
+
evidence: [`${decisionTypeCounts.size} unique decision types found`],
|
|
306
|
+
});
|
|
307
|
+
// Reliability signal based on agent version consistency
|
|
308
|
+
const agentVersions = new Set(events.map(e => `${e.agent_id}@${e.agent_version}`));
|
|
309
|
+
const reliabilityScore = events.length / agentVersions.size / events.length;
|
|
310
|
+
signals.push({
|
|
311
|
+
signal_id: `qs-${++signalCounter}`,
|
|
312
|
+
type: 'reliability',
|
|
313
|
+
value: Math.min(1, reliabilityScore),
|
|
314
|
+
description: `Agent version stability across decisions`,
|
|
315
|
+
evidence: [`${agentVersions.size} unique agent versions`],
|
|
316
|
+
});
|
|
317
|
+
return signals;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Extract learning signals from events
|
|
321
|
+
*/
|
|
322
|
+
extractLearningSignals(events, minConfidence) {
|
|
323
|
+
const signals = [];
|
|
324
|
+
let learningCounter = 0;
|
|
325
|
+
// Pattern: High-confidence decisions
|
|
326
|
+
const highConfidenceEvents = events.filter(e => e.confidence >= 0.8);
|
|
327
|
+
if (highConfidenceEvents.length > 0) {
|
|
328
|
+
signals.push({
|
|
329
|
+
learning_id: `ls-${++learningCounter}`,
|
|
330
|
+
category: 'pattern',
|
|
331
|
+
title: 'High-Confidence Decision Pattern',
|
|
332
|
+
description: `${highConfidenceEvents.length} decisions achieved high confidence (>=0.8)`,
|
|
333
|
+
confidence: highConfidenceEvents.length / events.length,
|
|
334
|
+
affected_agents: [...new Set(highConfidenceEvents.map(e => e.agent_id))],
|
|
335
|
+
recommendations: [
|
|
336
|
+
'Study common characteristics of high-confidence decisions',
|
|
337
|
+
'Identify input patterns that lead to confident outputs',
|
|
338
|
+
],
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
// Anti-pattern: Low-confidence decisions
|
|
342
|
+
const lowConfidenceEvents = events.filter(e => e.confidence < 0.5);
|
|
343
|
+
if (lowConfidenceEvents.length > 0 && lowConfidenceEvents.length / events.length >= minConfidence * 0.5) {
|
|
344
|
+
signals.push({
|
|
345
|
+
learning_id: `ls-${++learningCounter}`,
|
|
346
|
+
category: 'anti_pattern',
|
|
347
|
+
title: 'Low-Confidence Decision Pattern',
|
|
348
|
+
description: `${lowConfidenceEvents.length} decisions had low confidence (<0.5)`,
|
|
349
|
+
confidence: Math.min(1, lowConfidenceEvents.length / events.length + 0.3),
|
|
350
|
+
affected_agents: [...new Set(lowConfidenceEvents.map(e => e.agent_id))],
|
|
351
|
+
recommendations: [
|
|
352
|
+
'Investigate causes of low confidence',
|
|
353
|
+
'Review input quality for affected decisions',
|
|
354
|
+
],
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
// Optimization: Constraint utilization
|
|
358
|
+
const constraintPatterns = this.analyzeConstraintPatterns(events);
|
|
359
|
+
if (constraintPatterns.underutilized.length > 0) {
|
|
360
|
+
signals.push({
|
|
361
|
+
learning_id: `ls-${++learningCounter}`,
|
|
362
|
+
category: 'optimization',
|
|
363
|
+
title: 'Constraint Utilization Opportunity',
|
|
364
|
+
description: `Some decisions apply fewer constraints than optimal`,
|
|
365
|
+
confidence: 0.7,
|
|
366
|
+
affected_agents: constraintPatterns.underutilized,
|
|
367
|
+
recommendations: [
|
|
368
|
+
'Review constraint application consistency',
|
|
369
|
+
'Ensure all relevant constraints are considered',
|
|
370
|
+
],
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
// Edge case detection
|
|
374
|
+
const outlierEvents = this.detectOutliers(events);
|
|
375
|
+
if (outlierEvents.length > 0) {
|
|
376
|
+
signals.push({
|
|
377
|
+
learning_id: `ls-${++learningCounter}`,
|
|
378
|
+
category: 'edge_case',
|
|
379
|
+
title: 'Outlier Decision Detection',
|
|
380
|
+
description: `${outlierEvents.length} decisions exhibited unusual characteristics`,
|
|
381
|
+
confidence: 0.65,
|
|
382
|
+
affected_agents: [...new Set(outlierEvents.map(e => e.agent_id))],
|
|
383
|
+
recommendations: [
|
|
384
|
+
'Review outlier decisions for edge cases',
|
|
385
|
+
'Consider adding handling for unusual input patterns',
|
|
386
|
+
],
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
return signals;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Analyze constraint usage patterns
|
|
393
|
+
*/
|
|
394
|
+
analyzeConstraintPatterns(events) {
|
|
395
|
+
const agentConstraintCounts = new Map();
|
|
396
|
+
events.forEach(e => {
|
|
397
|
+
const counts = agentConstraintCounts.get(e.agent_id) || [];
|
|
398
|
+
counts.push(e.constraints_applied.length);
|
|
399
|
+
agentConstraintCounts.set(e.agent_id, counts);
|
|
400
|
+
});
|
|
401
|
+
const underutilized = [];
|
|
402
|
+
agentConstraintCounts.forEach((counts, agentId) => {
|
|
403
|
+
const avg = counts.reduce((a, b) => a + b, 0) / counts.length;
|
|
404
|
+
if (avg < 3)
|
|
405
|
+
underutilized.push(agentId);
|
|
406
|
+
});
|
|
407
|
+
return { underutilized };
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Detect outlier events
|
|
411
|
+
*/
|
|
412
|
+
detectOutliers(events) {
|
|
413
|
+
if (events.length < 3)
|
|
414
|
+
return [];
|
|
415
|
+
const confidences = events.map(e => e.confidence);
|
|
416
|
+
const mean = confidences.reduce((a, b) => a + b, 0) / confidences.length;
|
|
417
|
+
const stdDev = Math.sqrt(confidences.reduce((sum, c) => sum + Math.pow(c - mean, 2), 0) / confidences.length);
|
|
418
|
+
// Outliers are more than 2 standard deviations from mean
|
|
419
|
+
return events.filter(e => Math.abs(e.confidence - mean) > 2 * stdDev);
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Identify gaps in the analyzed events
|
|
423
|
+
*/
|
|
424
|
+
identifyGaps(events, outcomes) {
|
|
425
|
+
const gaps = [];
|
|
426
|
+
let gapCounter = 0;
|
|
427
|
+
// Check for coverage gaps - decision types that should exist
|
|
428
|
+
const decisionTypes = new Set(events.map(e => e.decision_type));
|
|
429
|
+
if (decisionTypes.size === 1 && events.length > 5) {
|
|
430
|
+
gaps.push({
|
|
431
|
+
gap_id: `gap-${++gapCounter}`,
|
|
432
|
+
type: 'coverage',
|
|
433
|
+
title: 'Limited Decision Type Coverage',
|
|
434
|
+
description: 'Only one decision type analyzed, limiting cross-functional insights',
|
|
435
|
+
impact: 'medium',
|
|
436
|
+
affected_steps: [],
|
|
437
|
+
evidence: [`Single decision type: ${[...decisionTypes][0]}`],
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
// Check for process gaps - low outcome scores
|
|
441
|
+
const lowOutcomes = outcomes.filter(o => o.outcome_score < 0.6);
|
|
442
|
+
if (lowOutcomes.length > outcomes.length * 0.3) {
|
|
443
|
+
gaps.push({
|
|
444
|
+
gap_id: `gap-${++gapCounter}`,
|
|
445
|
+
type: 'process',
|
|
446
|
+
title: 'High Rate of Suboptimal Outcomes',
|
|
447
|
+
description: `${lowOutcomes.length} of ${outcomes.length} decisions had low outcome scores`,
|
|
448
|
+
impact: 'high',
|
|
449
|
+
affected_steps: lowOutcomes.map(o => o.decision_ref),
|
|
450
|
+
evidence: [`${((lowOutcomes.length / outcomes.length) * 100).toFixed(0)}% suboptimal rate`],
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
// Check for data gaps - missing or incomplete outputs
|
|
454
|
+
const incompleteEvents = events.filter(e => !e.outputs || Object.keys(e.outputs).length < 2);
|
|
455
|
+
if (incompleteEvents.length > 0) {
|
|
456
|
+
gaps.push({
|
|
457
|
+
gap_id: `gap-${++gapCounter}`,
|
|
458
|
+
type: 'data',
|
|
459
|
+
title: 'Incomplete Decision Outputs',
|
|
460
|
+
description: `${incompleteEvents.length} decisions have minimal or missing outputs`,
|
|
461
|
+
impact: incompleteEvents.length > events.length * 0.5 ? 'high' : 'medium',
|
|
462
|
+
affected_steps: incompleteEvents.map(e => e.execution_ref),
|
|
463
|
+
evidence: [`${incompleteEvents.length} events with sparse outputs`],
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
// Check for expectations gap
|
|
467
|
+
const unmetExpectations = outcomes.filter(o => !o.met_expectations);
|
|
468
|
+
if (unmetExpectations.length > outcomes.length * 0.2) {
|
|
469
|
+
gaps.push({
|
|
470
|
+
gap_id: `gap-${++gapCounter}`,
|
|
471
|
+
type: 'capability',
|
|
472
|
+
title: 'Expectations Gap',
|
|
473
|
+
description: 'Significant portion of decisions did not meet expectations',
|
|
474
|
+
impact: 'high',
|
|
475
|
+
affected_steps: unmetExpectations.map(o => o.decision_ref),
|
|
476
|
+
evidence: [`${unmetExpectations.length} decisions below expectations`],
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
return gaps;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Find correlations between events
|
|
483
|
+
*/
|
|
484
|
+
findCorrelations(events) {
|
|
485
|
+
const correlations = [];
|
|
486
|
+
let corrCounter = 0;
|
|
487
|
+
if (events.length < 2)
|
|
488
|
+
return correlations;
|
|
489
|
+
// Temporal correlation - events close in time
|
|
490
|
+
const sortedByTime = [...events].sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
491
|
+
for (let i = 0; i < sortedByTime.length - 1; i++) {
|
|
492
|
+
const timeDiff = new Date(sortedByTime[i + 1].timestamp).getTime() -
|
|
493
|
+
new Date(sortedByTime[i].timestamp).getTime();
|
|
494
|
+
// If events are within 1 minute, they may be related
|
|
495
|
+
if (timeDiff < 60000 && sortedByTime[i].agent_id !== sortedByTime[i + 1].agent_id) {
|
|
496
|
+
correlations.push({
|
|
497
|
+
correlation_id: `corr-${++corrCounter}`,
|
|
498
|
+
type: 'temporal',
|
|
499
|
+
event_refs: [sortedByTime[i].execution_ref, sortedByTime[i + 1].execution_ref],
|
|
500
|
+
description: `Sequential decisions by different agents within ${(timeDiff / 1000).toFixed(0)}s`,
|
|
501
|
+
strength: Math.min(1, 1 - (timeDiff / 60000)),
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
// Similarity correlation - same decision type, similar confidence
|
|
506
|
+
const byDecisionType = new Map();
|
|
507
|
+
events.forEach(e => {
|
|
508
|
+
const existing = byDecisionType.get(e.decision_type) || [];
|
|
509
|
+
existing.push(e);
|
|
510
|
+
byDecisionType.set(e.decision_type, existing);
|
|
511
|
+
});
|
|
512
|
+
byDecisionType.forEach((typeEvents, decisionType) => {
|
|
513
|
+
if (typeEvents.length >= 2) {
|
|
514
|
+
const confidences = typeEvents.map(e => e.confidence);
|
|
515
|
+
const avgConfidence = confidences.reduce((a, b) => a + b, 0) / confidences.length;
|
|
516
|
+
const variance = confidences.reduce((sum, c) => sum + Math.pow(c - avgConfidence, 2), 0) / confidences.length;
|
|
517
|
+
// Low variance indicates similarity
|
|
518
|
+
if (variance < 0.05) {
|
|
519
|
+
correlations.push({
|
|
520
|
+
correlation_id: `corr-${++corrCounter}`,
|
|
521
|
+
type: 'similarity',
|
|
522
|
+
event_refs: typeEvents.map(e => e.execution_ref),
|
|
523
|
+
description: `${typeEvents.length} ${decisionType} decisions with consistent confidence patterns`,
|
|
524
|
+
strength: 1 - Math.sqrt(variance),
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
return correlations.slice(0, 10); // Limit to top 10 correlations
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Generate summary statistics
|
|
533
|
+
*/
|
|
534
|
+
generateSummary(outcomes, qualitySignals, learningSignals, gaps) {
|
|
535
|
+
const outcomeScores = outcomes.map(o => o.outcome_score);
|
|
536
|
+
const overallQuality = outcomeScores.length > 0
|
|
537
|
+
? outcomeScores.reduce((a, b) => a + b, 0) / outcomeScores.length
|
|
538
|
+
: 0.5;
|
|
539
|
+
const expectationsMetCount = outcomes.filter(o => o.met_expectations).length;
|
|
540
|
+
const expectationsMetRate = outcomes.length > 0
|
|
541
|
+
? expectationsMetCount / outcomes.length
|
|
542
|
+
: 0;
|
|
543
|
+
const keyFindings = [];
|
|
544
|
+
const improvementSuggestions = [];
|
|
545
|
+
// Generate key findings
|
|
546
|
+
if (overallQuality >= 0.8) {
|
|
547
|
+
keyFindings.push('Overall decision quality is high');
|
|
548
|
+
}
|
|
549
|
+
else if (overallQuality < 0.6) {
|
|
550
|
+
keyFindings.push('Decision quality needs attention');
|
|
551
|
+
improvementSuggestions.push('Review low-scoring decisions for common issues');
|
|
552
|
+
}
|
|
553
|
+
if (expectationsMetRate >= 0.9) {
|
|
554
|
+
keyFindings.push('Decisions consistently meet expectations');
|
|
555
|
+
}
|
|
556
|
+
else if (expectationsMetRate < 0.7) {
|
|
557
|
+
keyFindings.push('Expectations gap detected in decision outcomes');
|
|
558
|
+
improvementSuggestions.push('Calibrate expectation thresholds or improve decision confidence');
|
|
559
|
+
}
|
|
560
|
+
// Add findings from signals
|
|
561
|
+
const highValuePatterns = learningSignals.filter(s => s.category === 'pattern' && s.confidence >= 0.7);
|
|
562
|
+
if (highValuePatterns.length > 0) {
|
|
563
|
+
keyFindings.push(`${highValuePatterns.length} high-value patterns identified for replication`);
|
|
564
|
+
}
|
|
565
|
+
const criticalGaps = gaps.filter(g => g.impact === 'critical' || g.impact === 'high');
|
|
566
|
+
if (criticalGaps.length > 0) {
|
|
567
|
+
keyFindings.push(`${criticalGaps.length} high-impact gaps require attention`);
|
|
568
|
+
criticalGaps.forEach(g => {
|
|
569
|
+
improvementSuggestions.push(`Address ${g.type} gap: ${g.title}`);
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
return {
|
|
573
|
+
overall_quality_score: Math.round(overallQuality * 100) / 100,
|
|
574
|
+
total_quality_signals: qualitySignals.length,
|
|
575
|
+
total_learning_signals: learningSignals.length,
|
|
576
|
+
total_gaps: gaps.length,
|
|
577
|
+
expectations_met_rate: Math.round(expectationsMetRate * 100) / 100,
|
|
578
|
+
key_findings: keyFindings,
|
|
579
|
+
improvement_suggestions: improvementSuggestions,
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Calculate confidence score for reflection analysis
|
|
584
|
+
*/
|
|
585
|
+
calculateConfidence(output, input) {
|
|
586
|
+
let confidence = 0.6; // Base confidence
|
|
587
|
+
// More events analyzed = more confident in patterns
|
|
588
|
+
if (output.events_analyzed >= 10)
|
|
589
|
+
confidence += 0.1;
|
|
590
|
+
if (output.events_analyzed >= 50)
|
|
591
|
+
confidence += 0.05;
|
|
592
|
+
// Multiple agents analyzed = broader perspective
|
|
593
|
+
if (output.agents_analyzed.length > 1)
|
|
594
|
+
confidence += 0.05;
|
|
595
|
+
// Found signals = meaningful analysis
|
|
596
|
+
if (output.quality_signals.length > 0)
|
|
597
|
+
confidence += 0.05;
|
|
598
|
+
if (output.learning_signals.length > 0)
|
|
599
|
+
confidence += 0.05;
|
|
600
|
+
// Found correlations = deeper insights
|
|
601
|
+
if (output.correlations.length > 0)
|
|
602
|
+
confidence += 0.05;
|
|
603
|
+
// Reduce for too few events
|
|
604
|
+
if (output.events_analyzed < 3)
|
|
605
|
+
confidence -= 0.1;
|
|
606
|
+
return Math.min(1.0, Math.max(0.0, confidence));
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Get constraints applied during reflection
|
|
610
|
+
*/
|
|
611
|
+
getAppliedConstraints(input) {
|
|
612
|
+
const constraints = [
|
|
613
|
+
'read_only_analysis',
|
|
614
|
+
'no_behavior_modification',
|
|
615
|
+
'no_retry_triggering',
|
|
616
|
+
'no_optimization_application',
|
|
617
|
+
'informational_output_only',
|
|
618
|
+
'deterministic_analysis',
|
|
619
|
+
];
|
|
620
|
+
// Add context-specific constraints
|
|
621
|
+
if (input.context?.focus_areas) {
|
|
622
|
+
constraints.push(`focus_areas:${input.context.focus_areas.join(',')}`);
|
|
623
|
+
}
|
|
624
|
+
if (input.preferences?.min_confidence) {
|
|
625
|
+
constraints.push(`min_confidence:${input.preferences.min_confidence}`);
|
|
626
|
+
}
|
|
627
|
+
return constraints;
|
|
628
|
+
}
|
|
629
|
+
/**
|
|
630
|
+
* Classify error for proper error code
|
|
631
|
+
*/
|
|
632
|
+
classifyError(error) {
|
|
633
|
+
if (error instanceof Error) {
|
|
634
|
+
if (error.name === 'ZodError') {
|
|
635
|
+
return contracts_1.AgentErrorCodes.VALIDATION_FAILED;
|
|
636
|
+
}
|
|
637
|
+
if (error.message.includes('persistence') || error.message.includes('ruvector')) {
|
|
638
|
+
return contracts_1.AgentErrorCodes.PERSISTENCE_ERROR;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return contracts_1.AgentErrorCodes.PROCESSING_ERROR;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
exports.ReflectionAgent = ReflectionAgent;
|
|
645
|
+
//# sourceMappingURL=reflection-agent.js.map
|