@llm-dev-ops/agentics-cli 1.4.58 → 1.4.68
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/README.md +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +227 -19
- package/dist/commands/agents.js.map +1 -1
- package/dist/pipeline/auto-chain.d.ts +1 -0
- package/dist/pipeline/auto-chain.d.ts.map +1 -1
- package/dist/pipeline/auto-chain.js +124 -37
- package/dist/pipeline/auto-chain.js.map +1 -1
- package/dist/pipeline/execution-context.d.ts.map +1 -1
- package/dist/pipeline/execution-context.js +12 -37
- package/dist/pipeline/execution-context.js.map +1 -1
- package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/adr-generator.js +160 -1
- package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-generator.js +400 -3
- package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts +43 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.js +413 -0
- package/dist/pipeline/phase2/phases/ddd-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/research-dossier.d.ts +0 -13
- package/dist/pipeline/phase2/phases/research-dossier.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/research-dossier.js +114 -1
- package/dist/pipeline/phase2/phases/research-dossier.js.map +1 -1
- package/dist/pipeline/phase2/phases/research-quality-gate.d.ts +48 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.js +322 -0
- package/dist/pipeline/phase2/phases/research-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts +41 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.js +350 -0
- package/dist/pipeline/phase2/phases/sparc-quality-gate.js.map +1 -0
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts +14 -0
- package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
- package/dist/pipeline/phase2/phases/sparc-specification.js +500 -10
- package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
- package/dist/pipeline/phase2/phases/tdd-plan-generator.js +1 -1
- package/dist/pipeline/phase2/phases/tdd-plan-generator.js.map +1 -1
- package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts +72 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.d.ts.map +1 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.js +332 -0
- package/dist/pipeline/phase2/phases/tech-stack-detector.js.map +1 -0
- package/dist/pipeline/phase2/types.d.ts +2 -0
- package/dist/pipeline/phase2/types.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/domain-codegen.js +169 -4
- package/dist/pipeline/phase3/phases/domain-codegen.js.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.d.ts.map +1 -1
- package/dist/pipeline/phase3/phases/test-generator.js +12 -2
- package/dist/pipeline/phase3/phases/test-generator.js.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js +99 -1
- package/dist/pipeline/phase3-sparc/phase3-sparc-coordinator.js.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.d.ts +17 -4
- package/dist/pipeline/phase4/phases/deployment-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/deployment-generator.js +364 -44
- package/dist/pipeline/phase4/phases/deployment-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/erp-client-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/erp-client-generator.js +27 -15
- package/dist/pipeline/phase4/phases/erp-client-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/erp-target-resolver.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/erp-target-resolver.js +49 -2
- package/dist/pipeline/phase4/phases/erp-target-resolver.js.map +1 -1
- package/dist/pipeline/phase4/phases/http-server-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/http-server-generator.js +263 -3
- package/dist/pipeline/phase4/phases/http-server-generator.js.map +1 -1
- package/dist/pipeline/phase4/phases/infra-adapter-generator.d.ts.map +1 -1
- package/dist/pipeline/phase4/phases/infra-adapter-generator.js +335 -37
- package/dist/pipeline/phase4/phases/infra-adapter-generator.js.map +1 -1
- package/dist/pipeline/phase4/types.d.ts +3 -1
- package/dist/pipeline/phase4/types.d.ts.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +211 -2
- package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts +54 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.d.ts.map +1 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js +417 -0
- package/dist/pipeline/phase5-build/phases/implementation-quality-gate.js.map +1 -0
- package/dist/pipeline/phases/prompt-generator.js +1 -1
- package/dist/pipeline/phases/prompt-generator.js.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts +116 -1
- package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
- package/dist/pipeline/ruflo-phase-executor.js +666 -159
- package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
- package/dist/pipeline/swarm-orchestrator.d.ts.map +1 -1
- package/dist/pipeline/swarm-orchestrator.js +62 -6
- package/dist/pipeline/swarm-orchestrator.js.map +1 -1
- package/dist/routing/capability-classifier.d.ts +43 -0
- package/dist/routing/capability-classifier.d.ts.map +1 -0
- package/dist/routing/capability-classifier.js +157 -0
- package/dist/routing/capability-classifier.js.map +1 -0
- package/dist/routing/composition-engine.d.ts +77 -0
- package/dist/routing/composition-engine.d.ts.map +1 -0
- package/dist/routing/composition-engine.js +249 -0
- package/dist/routing/composition-engine.js.map +1 -0
- package/dist/routing/graph-federation.d.ts +71 -0
- package/dist/routing/graph-federation.d.ts.map +1 -0
- package/dist/routing/graph-federation.js +210 -0
- package/dist/routing/graph-federation.js.map +1 -0
- package/dist/routing/graph-loader.d.ts +74 -0
- package/dist/routing/graph-loader.d.ts.map +1 -0
- package/dist/routing/graph-loader.js +383 -0
- package/dist/routing/graph-loader.js.map +1 -0
- package/dist/routing/graph-router.d.ts +103 -0
- package/dist/routing/graph-router.d.ts.map +1 -0
- package/dist/routing/graph-router.js +415 -0
- package/dist/routing/graph-router.js.map +1 -0
- package/dist/routing/graph-validator.d.ts +44 -0
- package/dist/routing/graph-validator.d.ts.map +1 -0
- package/dist/routing/graph-validator.js +329 -0
- package/dist/routing/graph-validator.js.map +1 -0
- package/dist/routing/index.d.ts +52 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/routing/index.js +68 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/routing/outcome-recorder.d.ts +71 -0
- package/dist/routing/outcome-recorder.d.ts.map +1 -0
- package/dist/routing/outcome-recorder.js +133 -0
- package/dist/routing/outcome-recorder.js.map +1 -0
- package/dist/routing/weight-adjuster.d.ts +59 -0
- package/dist/routing/weight-adjuster.d.ts.map +1 -0
- package/dist/routing/weight-adjuster.js +167 -0
- package/dist/routing/weight-adjuster.js.map +1 -0
- package/dist/routing/weighted-resolver.d.ts +55 -0
- package/dist/routing/weighted-resolver.d.ts.map +1 -0
- package/dist/routing/weighted-resolver.js +133 -0
- package/dist/routing/weighted-resolver.js.map +1 -0
- package/dist/synthesis/ask-artifact-writer.d.ts.map +1 -1
- package/dist/synthesis/ask-artifact-writer.js +8 -0
- package/dist/synthesis/ask-artifact-writer.js.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.d.ts +14 -0
- package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
- package/dist/synthesis/simulation-artifact-generator.js +224 -1
- package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
- package/dist/synthesis/simulation-renderers.d.ts.map +1 -1
- package/dist/synthesis/simulation-renderers.js +211 -40
- package/dist/synthesis/simulation-renderers.js.map +1 -1
- package/package.json +1 -1
- package/dist/bundled-agents/connector-hub-agents/package-lock.json +0 -11697
- package/dist/bundled-agents/connector-hub-agents/package.json +0 -75
- package/dist/bundled-agents/connector-hub-agents/tsconfig.build.json +0 -22
- package/dist/bundled-agents/connector-hub-agents/tsconfig.json +0 -57
- package/dist/bundled-agents/copilot-agents/functions/.gcloudignore +0 -17
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.d.ts +0 -14
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js +0 -35
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/cors.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.d.ts +0 -55
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js +0 -40
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/envelope.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.d.ts +0 -22
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js +0 -38
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/health.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.d.ts +0 -34
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js +0 -186
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.d.ts +0 -36
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js +0 -121
- package/dist/bundled-agents/copilot-agents/functions/dist/functions/src/router.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.d.ts +0 -157
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js +0 -948
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/config-validation-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/config-validation/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js +0 -50
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/agent-span-wrapper.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.d.ts +0 -214
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js +0 -91
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/base-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.d.ts +0 -1166
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js +0 -308
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/config-validation-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js +0 -62
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decision-event.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.d.ts +0 -400
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js +0 -113
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/decomposer-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.d.ts +0 -250
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js +0 -169
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/execution-graph.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.d.ts +0 -17
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js +0 -97
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intelligence-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1085
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js +0 -218
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -949
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js +0 -253
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -657
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js +0 -205
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.d.ts +0 -285
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js +0 -106
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/pipeline-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.d.ts +0 -581
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js +0 -136
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/planner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.d.ts +0 -791
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js +0 -225
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/contracts/reflection-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.d.ts +0 -120
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js +0 -535
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/decomposer-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js +0 -18
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/decomposer/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.d.ts +0 -4
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js +0 -9
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.d.ts +0 -10
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/meta-reasoner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.d.ts +0 -6
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js +0 -15
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/objective-clarifier/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.d.ts +0 -127
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js +0 -483
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/planner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/planner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.d.ts +0 -122
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js +0 -645
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/reflection-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js +0 -156
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.d.ts +0 -88
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/dist/services/agents/reflection/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/index.js +0 -4
- package/dist/bundled-agents/copilot-agents/functions/jest.config.js +0 -29
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.d.ts +0 -14
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js +0 -35
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/cors.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.d.ts +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js +0 -21
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/envelope.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.d.ts +0 -22
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js +0 -38
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/health.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.d.ts +0 -34
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js +0 -174
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.d.ts +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js +0 -107
- package/dist/bundled-agents/copilot-agents/functions/lib/functions/src/router.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.d.ts +0 -157
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js +0 -941
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/config-validation-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/config-validation/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.d.ts +0 -23
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js +0 -50
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/agent-span-wrapper.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.d.ts +0 -185
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js +0 -86
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/base-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.d.ts +0 -1081
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js +0 -305
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/config-validation-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js +0 -62
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decision-event.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.d.ts +0 -315
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js +0 -110
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/decomposer-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.d.ts +0 -250
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js +0 -169
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/execution-graph.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.d.ts +0 -16
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js +0 -88
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.d.ts +0 -1674
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intelligence-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.d.ts +0 -1000
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js +0 -215
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/intent-classifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.d.ts +0 -864
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js +0 -250
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/meta-reasoner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.d.ts +0 -572
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js +0 -202
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/objective-clarifier-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.d.ts +0 -496
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js +0 -133
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/planner-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.d.ts +0 -706
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js +0 -222
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/contracts/reflection-schemas.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.d.ts +0 -107
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js +0 -360
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/decomposer-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.d.ts +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js +0 -18
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/decomposer/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.d.ts +0 -4
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js +0 -9
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.d.ts +0 -123
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js +0 -609
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/intent-classifier/intent-classifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.d.ts +0 -10
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.d.ts +0 -111
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js +0 -686
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/meta-reasoner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/meta-reasoner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.d.ts +0 -6
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js +0 -15
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.d.ts +0 -126
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js +0 -780
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/objective-clarifier-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/objective-clarifier/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js +0 -25
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.d.ts +0 -119
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js +0 -421
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/planner-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.d.ts +0 -49
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js +0 -125
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.d.ts +0 -73
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js +0 -192
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/planner/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.d.ts +0 -11
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js +0 -27
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/index.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.d.ts +0 -122
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js +0 -645
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/reflection-agent.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.d.ts +0 -59
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js +0 -156
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/ruvector-persistence.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.d.ts +0 -88
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js +0 -246
- package/dist/bundled-agents/copilot-agents/functions/lib/services/agents/reflection/telemetry.js.map +0 -1
- package/dist/bundled-agents/copilot-agents/functions/package-lock.json +0 -5473
- package/dist/bundled-agents/copilot-agents/functions/package.json +0 -40
- package/dist/bundled-agents/copilot-agents/functions/src/claude.ts +0 -71
- package/dist/bundled-agents/copilot-agents/functions/src/cors.ts +0 -36
- package/dist/bundled-agents/copilot-agents/functions/src/envelope.ts +0 -77
- package/dist/bundled-agents/copilot-agents/functions/src/handler.test.ts +0 -340
- package/dist/bundled-agents/copilot-agents/functions/src/health.ts +0 -53
- package/dist/bundled-agents/copilot-agents/functions/src/index.ts +0 -201
- package/dist/bundled-agents/copilot-agents/functions/src/router.ts +0 -148
- package/dist/bundled-agents/copilot-agents/functions/tsconfig.json +0 -31
- package/dist/bundled-agents/copilot-agents/package-lock.json +0 -11825
- package/dist/bundled-agents/copilot-agents/package.json +0 -5
- package/dist/bundled-agents/governance-dashboard-agents/package-lock.json +0 -8282
- package/dist/bundled-agents/governance-dashboard-agents/package.json +0 -13
- package/dist/bundled-agents/orchestrator-agents/functions/contracts/index.js +0 -590
- package/dist/bundled-agents/orchestrator-agents/functions/index.js +0 -442
- package/dist/bundled-agents/orchestrator-agents/functions/test.js +0 -325
- package/dist/bundled-agents/orchestrator-agents/index.js +0 -6
- package/dist/bundled-agents/orchestrator-agents/package-lock.json +0 -13254
- package/dist/bundled-agents/orchestrator-agents/package.json +0 -20
- package/dist/bundled-agents/platform-agents/package-lock.json +0 -1723
- package/dist/bundled-agents/platform-agents/package.json +0 -22
- package/dist/bundled-agents/platform-agents/src/agents/decision-memo.ts +0 -463
- package/dist/bundled-agents/platform-agents/src/agents/decision.ts +0 -234
- package/dist/bundled-agents/platform-agents/src/agents/executive-summary.ts +0 -229
- package/dist/bundled-agents/platform-agents/src/agents/risk-score.ts +0 -327
- package/dist/bundled-agents/platform-agents/src/claude.ts +0 -71
- package/dist/bundled-agents/platform-agents/src/cors.ts +0 -24
- package/dist/bundled-agents/platform-agents/src/envelope.ts +0 -37
- package/dist/bundled-agents/platform-agents/src/health.ts +0 -20
- package/dist/bundled-agents/platform-agents/src/index.ts +0 -171
- package/dist/bundled-agents/platform-agents/src/router.ts +0 -38
- package/dist/bundled-agents/platform-agents/src/text-analysis.ts +0 -238
- package/dist/bundled-agents/platform-agents/tsconfig.json +0 -19
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js +0 -43
- package/dist/bundled-agents/sentinel-agents/lib/agents/alert.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js +0 -30
- package/dist/bundled-agents/sentinel-agents/lib/agents/anomaly.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js +0 -53
- package/dist/bundled-agents/sentinel-agents/lib/agents/correlation.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js +0 -51
- package/dist/bundled-agents/sentinel-agents/lib/agents/drift.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts +0 -3
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js +0 -36
- package/dist/bundled-agents/sentinel-agents/lib/agents/rca.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts +0 -2
- package/dist/bundled-agents/sentinel-agents/lib/index.d.ts.map +0 -1
- package/dist/bundled-agents/sentinel-agents/lib/index.js +0 -70
- package/dist/bundled-agents/sentinel-agents/lib/index.js.map +0 -1
- package/dist/bundled-agents/sentinel-agents/package-lock.json +0 -12591
- package/dist/bundled-agents/sentinel-agents/package.json +0 -62
- package/dist/bundled-agents/sentinel-agents/src/agents/alert.ts +0 -46
- package/dist/bundled-agents/sentinel-agents/src/agents/anomaly.ts +0 -33
- package/dist/bundled-agents/sentinel-agents/src/agents/correlation.ts +0 -56
- package/dist/bundled-agents/sentinel-agents/src/agents/drift.ts +0 -54
- package/dist/bundled-agents/sentinel-agents/src/agents/rca.ts +0 -38
- package/dist/bundled-agents/sentinel-agents/src/claude.ts +0 -71
- package/dist/bundled-agents/sentinel-agents/src/index.ts +0 -77
- package/dist/bundled-agents/sentinel-agents/tsconfig.json +0 -20
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "copilot-agents",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Cloud Function entry point for all 7 copilot agents",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"gcp-build": "",
|
|
9
|
-
"start": "functions-framework --target=handler --source=.",
|
|
10
|
-
"dev": "ts-node src/index.ts",
|
|
11
|
-
"test": "jest --config jest.config.js",
|
|
12
|
-
"typecheck": "tsc --noEmit",
|
|
13
|
-
"clean": "rm -rf dist",
|
|
14
|
-
"predeploy": "npm run clean && npm run build"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"agentics",
|
|
18
|
-
"cloud-function",
|
|
19
|
-
"copilot-agents"
|
|
20
|
-
],
|
|
21
|
-
"author": "Agentics",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@google-cloud/functions-framework": "^5.0.2",
|
|
25
|
-
"uuid": "^9.0.0",
|
|
26
|
-
"zod": "^3.22.0"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/jest": "^29.0.0",
|
|
30
|
-
"@types/node": "^20.0.0",
|
|
31
|
-
"@types/uuid": "^9.0.0",
|
|
32
|
-
"jest": "^29.0.0",
|
|
33
|
-
"ts-jest": "^29.0.0",
|
|
34
|
-
"ts-node": "^10.9.0",
|
|
35
|
-
"typescript": "^5.0.0"
|
|
36
|
-
},
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=20.0.0"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callClaude = callClaude;
|
|
4
|
-
exports.extractJson = extractJson;
|
|
5
|
-
|
|
6
|
-
const { execFileSync } = require("child_process");
|
|
7
|
-
|
|
8
|
-
function findClaudeBinary() {
|
|
9
|
-
for (const name of ["claude", "claude-code"]) {
|
|
10
|
-
try {
|
|
11
|
-
const result = execFileSync("which", [name], { encoding: "utf-8", timeout: 5000 }).trim();
|
|
12
|
-
if (result) return result;
|
|
13
|
-
} catch {}
|
|
14
|
-
}
|
|
15
|
-
throw new Error("Claude Code binary not found. Install: npm i -g @anthropic-ai/claude-code");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let _binary = null;
|
|
19
|
-
function getBinary() {
|
|
20
|
-
if (!_binary) _binary = findClaudeBinary();
|
|
21
|
-
return _binary;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async function callClaude(apiKey, systemPrompt, userMessage) {
|
|
25
|
-
const binary = getBinary();
|
|
26
|
-
const prompt = systemPrompt + "\n\n" + userMessage;
|
|
27
|
-
const env = Object.assign({}, process.env, { CI: "1" });
|
|
28
|
-
// Use short timeout when called from a child process (to avoid blocking the
|
|
29
|
-
// child's event loop for 120s). The parent will kill us anyway at timeoutMs.
|
|
30
|
-
const timeoutMs = process.env.AGENTICS_CHILD_PROCESS ? 8000 : 120000;
|
|
31
|
-
delete env.CLAUDECODE;
|
|
32
|
-
delete env.AGENTICS_DEV;
|
|
33
|
-
|
|
34
|
-
const raw = execFileSync(binary, [
|
|
35
|
-
"--print", "--output-format", "json", "--model", "claude-sonnet-4-20250514", prompt
|
|
36
|
-
], {
|
|
37
|
-
encoding: "utf-8",
|
|
38
|
-
timeout: timeoutMs,
|
|
39
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
40
|
-
env: env,
|
|
41
|
-
maxBuffer: 10 * 1024 * 1024,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
// Unwrap claude --output-format json envelope
|
|
45
|
-
try {
|
|
46
|
-
const parsed = JSON.parse(raw);
|
|
47
|
-
if (parsed.type === "result" && typeof parsed.result === "string") {
|
|
48
|
-
return parsed.result;
|
|
49
|
-
}
|
|
50
|
-
return raw;
|
|
51
|
-
} catch {
|
|
52
|
-
return raw;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function extractJson(text) {
|
|
57
|
-
const fenceMatch = text.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
58
|
-
if (fenceMatch) return JSON.parse(fenceMatch[1].trim());
|
|
59
|
-
const startIdx = text.search(/[{[]/);
|
|
60
|
-
if (startIdx >= 0) {
|
|
61
|
-
const startChar = text[startIdx];
|
|
62
|
-
const endChar = startChar === "{" ? "}" : "]";
|
|
63
|
-
let depth = 0;
|
|
64
|
-
for (let i = startIdx; i < text.length; i++) {
|
|
65
|
-
if (text[i] === startChar) depth++;
|
|
66
|
-
else if (text[i] === endChar) depth--;
|
|
67
|
-
if (depth === 0) return JSON.parse(text.slice(startIdx, i + 1));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return JSON.parse(text.trim());
|
|
71
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CORS Middleware for Cloud Functions
|
|
3
|
-
*
|
|
4
|
-
* Handles preflight requests and sets CORS headers on all responses.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { CfResponse } from './index';
|
|
8
|
-
|
|
9
|
-
const ALLOWED_ORIGINS = [
|
|
10
|
-
'https://agentics.dev',
|
|
11
|
-
'https://console.agentics.dev',
|
|
12
|
-
'https://us-central1-agentics-dev.cloudfunctions.net',
|
|
13
|
-
];
|
|
14
|
-
|
|
15
|
-
const ALLOWED_METHODS = 'GET, POST, OPTIONS';
|
|
16
|
-
const ALLOWED_HEADERS = 'Content-Type, Authorization, X-Correlation-Id, X-Request-Id';
|
|
17
|
-
const MAX_AGE = '3600';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Set CORS headers on the response
|
|
21
|
-
*/
|
|
22
|
-
export function setCorsHeaders(res: CfResponse): void {
|
|
23
|
-
// Allow any origin for now (can be restricted via ALLOWED_ORIGINS in production)
|
|
24
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
25
|
-
res.setHeader('Access-Control-Allow-Methods', ALLOWED_METHODS);
|
|
26
|
-
res.setHeader('Access-Control-Allow-Headers', ALLOWED_HEADERS);
|
|
27
|
-
res.setHeader('Access-Control-Max-Age', MAX_AGE);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Handle CORS preflight (OPTIONS) request
|
|
32
|
-
*/
|
|
33
|
-
export function handlePreflight(res: CfResponse): void {
|
|
34
|
-
res.writeHead(204);
|
|
35
|
-
res.end();
|
|
36
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response Envelope
|
|
3
|
-
*
|
|
4
|
-
* Every response from copilot-agents MUST include:
|
|
5
|
-
* - execution_metadata (trace_id, timestamp, service, execution_id)
|
|
6
|
-
* - layers_executed (routing + agent layer with status and duration)
|
|
7
|
-
*
|
|
8
|
-
* Agent responses additionally include per-agent execution_metadata inside
|
|
9
|
-
* the `result` wrapper (trace_id, agent, domain, timestamp, pipeline_context).
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { PipelineContext } from '../../services/agents/contracts';
|
|
13
|
-
|
|
14
|
-
export interface ExecutionMetadata {
|
|
15
|
-
trace_id: string;
|
|
16
|
-
timestamp: string;
|
|
17
|
-
service: 'copilot-agents';
|
|
18
|
-
execution_id: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface LayerExecuted {
|
|
22
|
-
layer: string;
|
|
23
|
-
status: 'completed' | 'error';
|
|
24
|
-
duration_ms?: number;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Per-agent execution metadata included in the result wrapper
|
|
29
|
-
* when routing to an agent.
|
|
30
|
-
*/
|
|
31
|
-
export interface AgentExecutionMetadata {
|
|
32
|
-
trace_id: string;
|
|
33
|
-
agent: string;
|
|
34
|
-
domain: string;
|
|
35
|
-
timestamp: string;
|
|
36
|
-
pipeline_context?: PipelineContext;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface EnvelopedResponse {
|
|
40
|
-
data: unknown;
|
|
41
|
-
execution_metadata: ExecutionMetadata;
|
|
42
|
-
layers_executed: LayerExecuted[];
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Wrap any response payload with execution_metadata and layers_executed
|
|
47
|
-
*/
|
|
48
|
-
export function wrapResponse(
|
|
49
|
-
data: unknown,
|
|
50
|
-
executionMetadata: ExecutionMetadata,
|
|
51
|
-
layersExecuted: LayerExecuted[]
|
|
52
|
-
): EnvelopedResponse {
|
|
53
|
-
return {
|
|
54
|
-
data,
|
|
55
|
-
execution_metadata: executionMetadata,
|
|
56
|
-
layers_executed: layersExecuted,
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Wrap an agent result with per-agent execution_metadata.
|
|
62
|
-
*
|
|
63
|
-
* Produces:
|
|
64
|
-
* {
|
|
65
|
-
* result: <agentResult>,
|
|
66
|
-
* execution_metadata: { trace_id, agent, domain, timestamp, pipeline_context? }
|
|
67
|
-
* }
|
|
68
|
-
*/
|
|
69
|
-
export function wrapAgentResult(
|
|
70
|
-
agentResult: unknown,
|
|
71
|
-
agentMeta: AgentExecutionMetadata
|
|
72
|
-
): { result: unknown; execution_metadata: AgentExecutionMetadata } {
|
|
73
|
-
return {
|
|
74
|
-
result: agentResult,
|
|
75
|
-
execution_metadata: agentMeta,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Function Handler Tests
|
|
3
|
-
*
|
|
4
|
-
* Tests for the copilot-agents Cloud Function entry point.
|
|
5
|
-
* Validates routing, CORS, health, execution_metadata, and layers_executed.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { handler, CfRequest, CfResponse } from './index';
|
|
9
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
10
|
-
|
|
11
|
-
// Helper to create mock request
|
|
12
|
-
function mockRequest(method: string, url: string, body?: unknown, headers?: Record<string, string>): CfRequest {
|
|
13
|
-
const req = {
|
|
14
|
-
method,
|
|
15
|
-
url,
|
|
16
|
-
headers: { host: 'localhost', ...headers },
|
|
17
|
-
body,
|
|
18
|
-
} as CfRequest;
|
|
19
|
-
return req;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Helper to create mock response and capture output
|
|
23
|
-
function mockResponse(): { res: CfResponse; getResult: () => { statusCode: number; headers: Record<string, string>; body: unknown } } {
|
|
24
|
-
const result = {
|
|
25
|
-
statusCode: 200,
|
|
26
|
-
headers: {} as Record<string, string>,
|
|
27
|
-
body: null as unknown,
|
|
28
|
-
ended: false,
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const res = {
|
|
32
|
-
writeHead(code: number, headers?: Record<string, string>) {
|
|
33
|
-
result.statusCode = code;
|
|
34
|
-
if (headers) {
|
|
35
|
-
Object.assign(result.headers, headers);
|
|
36
|
-
}
|
|
37
|
-
return this;
|
|
38
|
-
},
|
|
39
|
-
setHeader(key: string, value: string) {
|
|
40
|
-
result.headers[key] = value;
|
|
41
|
-
return this;
|
|
42
|
-
},
|
|
43
|
-
end(data?: string) {
|
|
44
|
-
result.ended = true;
|
|
45
|
-
if (data) {
|
|
46
|
-
try {
|
|
47
|
-
result.body = JSON.parse(data);
|
|
48
|
-
} catch {
|
|
49
|
-
result.body = data;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
} as unknown as CfResponse;
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
res,
|
|
57
|
-
getResult: () => ({ statusCode: result.statusCode, headers: result.headers, body: result.body }),
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
describe('Cloud Function Handler', () => {
|
|
62
|
-
describe('CORS', () => {
|
|
63
|
-
it('should set CORS headers on all responses', async () => {
|
|
64
|
-
const req = mockRequest('GET', '/health');
|
|
65
|
-
const { res, getResult } = mockResponse();
|
|
66
|
-
|
|
67
|
-
await handler(req, res);
|
|
68
|
-
const result = getResult();
|
|
69
|
-
|
|
70
|
-
expect(result.headers['Access-Control-Allow-Origin']).toBe('*');
|
|
71
|
-
expect(result.headers['Access-Control-Allow-Methods']).toContain('POST');
|
|
72
|
-
expect(result.headers['Access-Control-Allow-Headers']).toContain('X-Correlation-Id');
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('should handle OPTIONS preflight with 204', async () => {
|
|
76
|
-
const req = mockRequest('OPTIONS', '/v1/copilot/planner');
|
|
77
|
-
const { res, getResult } = mockResponse();
|
|
78
|
-
|
|
79
|
-
await handler(req, res);
|
|
80
|
-
const result = getResult();
|
|
81
|
-
|
|
82
|
-
expect(result.statusCode).toBe(204);
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
describe('Health Endpoint', () => {
|
|
87
|
-
it('should return health status with all 7 agents', async () => {
|
|
88
|
-
const req = mockRequest('GET', '/health');
|
|
89
|
-
const { res, getResult } = mockResponse();
|
|
90
|
-
|
|
91
|
-
await handler(req, res);
|
|
92
|
-
const result = getResult();
|
|
93
|
-
|
|
94
|
-
expect(result.statusCode).toBe(200);
|
|
95
|
-
const body = result.body as {
|
|
96
|
-
data: { status: string; agents: Array<{ agent: string }> };
|
|
97
|
-
execution_metadata: { service: string; trace_id: string };
|
|
98
|
-
layers_executed: Array<{ layer: string }>;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
expect(body.data.status).toBe('healthy');
|
|
102
|
-
expect(body.data.agents).toHaveLength(7);
|
|
103
|
-
|
|
104
|
-
const agentNames = body.data.agents.map(a => a.agent);
|
|
105
|
-
expect(agentNames).toContain('planner');
|
|
106
|
-
expect(agentNames).toContain('config');
|
|
107
|
-
expect(agentNames).toContain('decomposer');
|
|
108
|
-
expect(agentNames).toContain('clarifier');
|
|
109
|
-
expect(agentNames).toContain('intent');
|
|
110
|
-
expect(agentNames).toContain('reflection');
|
|
111
|
-
expect(agentNames).toContain('meta-reasoner');
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
it('should include execution_metadata in health response', async () => {
|
|
115
|
-
const req = mockRequest('GET', '/health');
|
|
116
|
-
const { res, getResult } = mockResponse();
|
|
117
|
-
|
|
118
|
-
await handler(req, res);
|
|
119
|
-
const body = getResult().body as {
|
|
120
|
-
execution_metadata: { service: string; trace_id: string; execution_id: string; timestamp: string };
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
expect(body.execution_metadata.service).toBe('copilot-agents');
|
|
124
|
-
expect(body.execution_metadata.trace_id).toBeDefined();
|
|
125
|
-
expect(body.execution_metadata.execution_id).toBeDefined();
|
|
126
|
-
expect(body.execution_metadata.timestamp).toBeDefined();
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
it('should include layers_executed in health response', async () => {
|
|
130
|
-
const req = mockRequest('GET', '/health');
|
|
131
|
-
const { res, getResult } = mockResponse();
|
|
132
|
-
|
|
133
|
-
await handler(req, res);
|
|
134
|
-
const body = getResult().body as {
|
|
135
|
-
layers_executed: Array<{ layer: string; status: string }>;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
expect(body.layers_executed).toHaveLength(2);
|
|
139
|
-
expect(body.layers_executed[0].layer).toBe('AGENT_ROUTING');
|
|
140
|
-
expect(body.layers_executed[1].layer).toBe('HEALTH_CHECK');
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
describe('Execution Metadata', () => {
|
|
145
|
-
it('should use x-correlation-id header as trace_id', async () => {
|
|
146
|
-
const traceId = '12345-abcde-67890';
|
|
147
|
-
const req = mockRequest('GET', '/health', undefined, { 'x-correlation-id': traceId });
|
|
148
|
-
const { res, getResult } = mockResponse();
|
|
149
|
-
|
|
150
|
-
await handler(req, res);
|
|
151
|
-
const body = getResult().body as {
|
|
152
|
-
execution_metadata: { trace_id: string };
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
expect(body.execution_metadata.trace_id).toBe(traceId);
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
it('should generate trace_id if x-correlation-id not provided', async () => {
|
|
159
|
-
const req = mockRequest('GET', '/health');
|
|
160
|
-
const { res, getResult } = mockResponse();
|
|
161
|
-
|
|
162
|
-
await handler(req, res);
|
|
163
|
-
const body = getResult().body as {
|
|
164
|
-
execution_metadata: { trace_id: string };
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
expect(body.execution_metadata.trace_id).toBeDefined();
|
|
168
|
-
expect(body.execution_metadata.trace_id.length).toBeGreaterThan(0);
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
describe('Agent Routing', () => {
|
|
173
|
-
it('should return 400 for POST without body', async () => {
|
|
174
|
-
const req = mockRequest('POST', '/v1/copilot/planner');
|
|
175
|
-
const { res, getResult } = mockResponse();
|
|
176
|
-
|
|
177
|
-
await handler(req, res);
|
|
178
|
-
const result = getResult();
|
|
179
|
-
|
|
180
|
-
expect(result.statusCode).toBe(400);
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
it('should return 404 for unknown routes', async () => {
|
|
184
|
-
const req = mockRequest('GET', '/unknown');
|
|
185
|
-
const { res, getResult } = mockResponse();
|
|
186
|
-
|
|
187
|
-
await handler(req, res);
|
|
188
|
-
const result = getResult();
|
|
189
|
-
|
|
190
|
-
expect(result.statusCode).toBe(404);
|
|
191
|
-
const body = result.body as { data: { available_routes: string[] } };
|
|
192
|
-
expect(body.data.available_routes).toHaveLength(8);
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
it('should include layers_executed on error responses', async () => {
|
|
196
|
-
const req = mockRequest('GET', '/not-found');
|
|
197
|
-
const { res, getResult } = mockResponse();
|
|
198
|
-
|
|
199
|
-
await handler(req, res);
|
|
200
|
-
const body = getResult().body as {
|
|
201
|
-
layers_executed: Array<{ layer: string; status: string }>;
|
|
202
|
-
execution_metadata: { service: string };
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
expect(body.layers_executed).toBeDefined();
|
|
206
|
-
expect(body.execution_metadata.service).toBe('copilot-agents');
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
it('should route POST /v1/copilot/planner to PlannerAgent', async () => {
|
|
210
|
-
const req = mockRequest('POST', '/v1/copilot/planner', {
|
|
211
|
-
objective: 'Build a test system',
|
|
212
|
-
});
|
|
213
|
-
const { res, getResult } = mockResponse();
|
|
214
|
-
|
|
215
|
-
await handler(req, res);
|
|
216
|
-
const result = getResult();
|
|
217
|
-
|
|
218
|
-
// Should succeed (200) or validation error (422) but NOT 404
|
|
219
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
220
|
-
const body = result.body as {
|
|
221
|
-
execution_metadata: { service: string };
|
|
222
|
-
layers_executed: Array<{ layer: string }>;
|
|
223
|
-
};
|
|
224
|
-
expect(body.execution_metadata.service).toBe('copilot-agents');
|
|
225
|
-
expect(body.layers_executed.some(l => l.layer === 'COPILOT_PLANNER')).toBe(true);
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
it('should route POST /v1/copilot/intent to IntentClassifierAgent', async () => {
|
|
229
|
-
const req = mockRequest('POST', '/v1/copilot/intent', {
|
|
230
|
-
text: 'Create a new user',
|
|
231
|
-
});
|
|
232
|
-
const { res, getResult } = mockResponse();
|
|
233
|
-
|
|
234
|
-
await handler(req, res);
|
|
235
|
-
const result = getResult();
|
|
236
|
-
|
|
237
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
238
|
-
const body = result.body as {
|
|
239
|
-
layers_executed: Array<{ layer: string }>;
|
|
240
|
-
};
|
|
241
|
-
expect(body.layers_executed.some(l => l.layer === 'COPILOT_INTENT')).toBe(true);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
it('should route POST /v1/copilot/decomposer to DecomposerAgent', async () => {
|
|
245
|
-
const req = mockRequest('POST', '/v1/copilot/decomposer', {
|
|
246
|
-
objective: 'Build and deploy a microservice',
|
|
247
|
-
});
|
|
248
|
-
const { res, getResult } = mockResponse();
|
|
249
|
-
|
|
250
|
-
await handler(req, res);
|
|
251
|
-
const result = getResult();
|
|
252
|
-
|
|
253
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
254
|
-
const body = result.body as {
|
|
255
|
-
layers_executed: Array<{ layer: string }>;
|
|
256
|
-
};
|
|
257
|
-
expect(body.layers_executed.some(l => l.layer === 'COPILOT_DECOMPOSER')).toBe(true);
|
|
258
|
-
});
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
describe('Pipeline Context', () => {
|
|
262
|
-
it('should include per-agent execution_metadata in agent response', async () => {
|
|
263
|
-
const req = mockRequest('POST', '/v1/copilot/intent', {
|
|
264
|
-
text: 'Create a new user',
|
|
265
|
-
});
|
|
266
|
-
const { res, getResult } = mockResponse();
|
|
267
|
-
|
|
268
|
-
await handler(req, res);
|
|
269
|
-
const result = getResult();
|
|
270
|
-
|
|
271
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
272
|
-
const body = result.body as {
|
|
273
|
-
data: {
|
|
274
|
-
result: unknown;
|
|
275
|
-
execution_metadata: { trace_id: string; agent: string; domain: string; timestamp: string };
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
// Agent response should be wrapped with result + execution_metadata
|
|
279
|
-
expect(body.data.execution_metadata).toBeDefined();
|
|
280
|
-
expect(body.data.execution_metadata.agent).toBe('intent');
|
|
281
|
-
expect(body.data.execution_metadata.domain).toBe('copilot');
|
|
282
|
-
expect(body.data.execution_metadata.trace_id).toBeDefined();
|
|
283
|
-
expect(body.data.execution_metadata.timestamp).toBeDefined();
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
it('should echo pipeline_context in agent execution_metadata when provided', async () => {
|
|
287
|
-
const pipelineContext = {
|
|
288
|
-
plan_id: 'test-plan-123',
|
|
289
|
-
step_id: '2',
|
|
290
|
-
previous_steps: [
|
|
291
|
-
{ step_id: '1', domain: 'copilot', agent: 'decomposer', output: {} }
|
|
292
|
-
],
|
|
293
|
-
execution_metadata: {
|
|
294
|
-
trace_id: 'trace-abc',
|
|
295
|
-
initiated_by: 'orchestrator-agents',
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
const req = mockRequest('POST', '/v1/copilot/intent', {
|
|
299
|
-
text: 'Create a new user',
|
|
300
|
-
pipeline_context: pipelineContext,
|
|
301
|
-
});
|
|
302
|
-
const { res, getResult } = mockResponse();
|
|
303
|
-
|
|
304
|
-
await handler(req, res);
|
|
305
|
-
const result = getResult();
|
|
306
|
-
|
|
307
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
308
|
-
const body = result.body as {
|
|
309
|
-
data: {
|
|
310
|
-
execution_metadata: {
|
|
311
|
-
pipeline_context?: { plan_id: string; step_id: string };
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
expect(body.data.execution_metadata.pipeline_context).toBeDefined();
|
|
316
|
-
expect(body.data.execution_metadata.pipeline_context?.plan_id).toBe('test-plan-123');
|
|
317
|
-
expect(body.data.execution_metadata.pipeline_context?.step_id).toBe('2');
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
it('should NOT include pipeline_context when not provided (backwards compatible)', async () => {
|
|
321
|
-
const req = mockRequest('POST', '/v1/copilot/intent', {
|
|
322
|
-
text: 'Create a new user',
|
|
323
|
-
});
|
|
324
|
-
const { res, getResult } = mockResponse();
|
|
325
|
-
|
|
326
|
-
await handler(req, res);
|
|
327
|
-
const result = getResult();
|
|
328
|
-
|
|
329
|
-
expect([200, 422, 500]).toContain(result.statusCode);
|
|
330
|
-
const body = result.body as {
|
|
331
|
-
data: {
|
|
332
|
-
execution_metadata: {
|
|
333
|
-
pipeline_context?: unknown;
|
|
334
|
-
};
|
|
335
|
-
};
|
|
336
|
-
};
|
|
337
|
-
expect(body.data.execution_metadata.pipeline_context).toBeUndefined();
|
|
338
|
-
});
|
|
339
|
-
});
|
|
340
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Health Check Handler
|
|
3
|
-
*
|
|
4
|
-
* Returns the status of all 7 copilot agents.
|
|
5
|
-
* Agents: planner, config, decomposer, clarifier, intent, reflection, meta-reasoner
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface AgentHealthStatus {
|
|
9
|
-
agent: string;
|
|
10
|
-
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
11
|
-
version: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface HealthResponse {
|
|
15
|
-
status: 'healthy' | 'degraded' | 'unhealthy';
|
|
16
|
-
service: string;
|
|
17
|
-
version: string;
|
|
18
|
-
agents: AgentHealthStatus[];
|
|
19
|
-
uptime_seconds: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const SERVICE_START_TIME = Date.now();
|
|
23
|
-
|
|
24
|
-
const AGENT_REGISTRY: Array<{ name: string; version: string }> = [
|
|
25
|
-
{ name: 'planner', version: '1.0.0' },
|
|
26
|
-
{ name: 'config', version: '1.0.0' },
|
|
27
|
-
{ name: 'decomposer', version: '1.0.0' },
|
|
28
|
-
{ name: 'clarifier', version: '1.0.0' },
|
|
29
|
-
{ name: 'intent', version: '1.0.0' },
|
|
30
|
-
{ name: 'reflection', version: '1.0.0' },
|
|
31
|
-
{ name: 'meta-reasoner', version: '1.0.0' },
|
|
32
|
-
];
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Build health check response for all agents
|
|
36
|
-
*/
|
|
37
|
-
export function handleHealth(): HealthResponse {
|
|
38
|
-
const agents: AgentHealthStatus[] = AGENT_REGISTRY.map(agent => ({
|
|
39
|
-
agent: agent.name,
|
|
40
|
-
status: 'healthy' as const,
|
|
41
|
-
version: agent.version,
|
|
42
|
-
}));
|
|
43
|
-
|
|
44
|
-
const allHealthy = agents.every(a => a.status === 'healthy');
|
|
45
|
-
|
|
46
|
-
return {
|
|
47
|
-
status: allHealthy ? 'healthy' : 'degraded',
|
|
48
|
-
service: 'copilot-agents',
|
|
49
|
-
version: '1.0.0',
|
|
50
|
-
agents,
|
|
51
|
-
uptime_seconds: Math.floor((Date.now() - SERVICE_START_TIME) / 1000),
|
|
52
|
-
};
|
|
53
|
-
}
|