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