claude-flow-novice 1.6.1 → 1.6.3
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/.claude/agents/cfn-loop/product-owner.md +54 -4
- package/.claude/commands/cfn-claude-sync.md +303 -0
- package/.claude/commands/cfn-loop-epic.md +290 -0
- package/.claude/commands/cfn-loop-single.md +168 -0
- package/.claude/commands/cfn-loop-sprints.md +384 -0
- package/.claude/commands/cfn-loop.md +180 -0
- package/.claude/commands/metrics-summary.md +58 -0
- package/.claude/commands/parse-epic.md +357 -0
- package/.claude/settings.json +5 -4
- package/.claude/settings.local.json +9 -2
- package/.claude-flow-novice/.claude/agents/cfn-loop/product-owner.md +792 -0
- package/.claude-flow-novice/dist/mcp/server.js +21 -2
- package/.claude-flow-novice/dist/src/api/auth-service.js +84 -38
- package/.claude-flow-novice/dist/src/api/auth-service.js.map +1 -1
- package/.claude-flow-novice/dist/src/api/claude-client.js +138 -3
- package/.claude-flow-novice/dist/src/api/claude-client.js.map +1 -1
- package/.claude-flow-novice/dist/src/cfn-loop/phase-orchestrator-example.js +1 -1
- package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js +247 -0
- package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +32 -15
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/transparency.js +455 -0
- package/.claude-flow-novice/dist/src/cli/commands/transparency.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +129 -13
- package/.claude-flow-novice/dist/src/components/visualizations/index.js +9 -0
- package/.claude-flow-novice/dist/src/components/visualizations/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +462 -0
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/config-translator.js +248 -0
- package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +287 -0
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js +68 -9
- package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/feature-flags.js +166 -0
- package/.claude-flow-novice/dist/src/coordination/feature-flags.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/queen-agent.js +18 -4
- package/.claude-flow-novice/dist/src/coordination/queen-agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/role-assignment.js +6 -110
- package/.claude-flow-novice/dist/src/coordination/role-assignment.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js +632 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js +11 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js +318 -0
- package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js +364 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js +492 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js +786 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js +342 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js +601 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js +211 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/index.js +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js +365 -6
- package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js +478 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js +5 -2
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js +189 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js +669 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js +451 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js +271 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js +335 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js +439 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js +92 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js +21 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js +223 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js +436 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js +278 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js +317 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js +273 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js +15 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js +512 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/index.js +6 -0
- package/.claude-flow-novice/dist/src/coordination/v2/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js +557 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js +212 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js +552 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js +367 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js +371 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js +355 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js +295 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js +411 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js +387 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js +589 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js +444 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js +29 -8
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js +470 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js +450 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js +5 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js +545 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js +44 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js +415 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js +615 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js +259 -0
- package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js +17 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js +357 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js +679 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/core/agent-manager.js +30 -0
- package/.claude-flow-novice/dist/src/core/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/mcp/server.js +21 -2
- package/.claude-flow-novice/dist/src/mcp/server.js.map +1 -1
- package/.claude-flow-novice/dist/src/monitoring/apm/apm-integration.js +719 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/apm-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/datadog-collector.js +363 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/datadog-collector.js.map +1 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/index.js +97 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/newrelic-collector.js +384 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/newrelic-collector.js.map +1 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/performance-optimizer.js +612 -0
- package/.claude-flow-novice/dist/src/monitoring/apm/performance-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/monitoring/metrics-collector.js +282 -0
- package/.claude-flow-novice/dist/src/monitoring/metrics-collector.js.map +1 -0
- package/.claude-flow-novice/dist/src/observability/metrics-counter.js +268 -0
- package/.claude-flow-novice/dist/src/observability/metrics-counter.js.map +1 -0
- package/.claude-flow-novice/dist/src/observability/metrics-storage.js +265 -0
- package/.claude-flow-novice/dist/src/observability/metrics-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/observability/telemetry.js +26 -0
- package/.claude-flow-novice/dist/src/observability/telemetry.js.map +1 -1
- package/.claude-flow-novice/dist/src/providers/tiered-router.js +64 -10
- package/.claude-flow-novice/dist/src/providers/tiered-router.js.map +1 -1
- package/.claude-flow-novice/dist/src/providers/zai-provider.js +196 -97
- package/.claude-flow-novice/dist/src/providers/zai-provider.js.map +1 -1
- package/.claude-flow-novice/dist/src/slash-commands/cfn-claude-sync.js +533 -0
- package/.claude-flow-novice/dist/src/slash-commands/index.js +5 -0
- package/.claude-flow-novice/dist/src/slash-commands/metrics-summary-class.js +74 -0
- package/.claude-flow-novice/dist/src/slash-commands/metrics-summary.js +335 -0
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +12 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js +96 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js +406 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js +35 -5
- package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/web/api/apm-routes.js +355 -0
- package/.claude-flow-novice/dist/src/web/api/apm-routes.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/config/api-config.js +186 -0
- package/.claude-flow-novice/dist/src/web/api/config/api-config.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/auth.js +205 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/auth.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/cache.js +262 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/cache.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js +250 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js +217 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/validation.js +325 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/validation.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/events.js +465 -0
- package/.claude-flow-novice/dist/src/web/api/routes/events.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js +302 -0
- package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/index.js +14 -0
- package/.claude-flow-novice/dist/src/web/api/routes/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/metrics.js +561 -0
- package/.claude-flow-novice/dist/src/web/api/routes/metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/status.js +450 -0
- package/.claude-flow-novice/dist/src/web/api/routes/status.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/server.js +451 -0
- package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js +385 -0
- package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/index.js +87 -0
- package/.claude-flow-novice/dist/src/web/dashboard/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/types.js +6 -0
- package/.claude-flow-novice/dist/src/web/dashboard/types.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/frontend/src/utils/security.js +425 -0
- package/.claude-flow-novice/dist/src/web/frontend/src/utils/security.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/security/security-middleware.js +379 -0
- package/.claude-flow-novice/dist/src/web/security/security-middleware.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/websocket/apm-websocket-handler.js +441 -0
- package/.claude-flow-novice/dist/src/web/websocket/apm-websocket-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/websocket/websocket-manager.js +255 -1
- package/.claude-flow-novice/dist/src/web/websocket/websocket-manager.js.map +1 -1
- package/.claude-flow-novice/metrics.db +0 -0
- package/.claude-flow-novice/metrics.db-shm +0 -0
- package/.claude-flow-novice/metrics.db-wal +0 -0
- package/AGENT_PERFORMANCE_GUIDELINES.md +88 -0
- package/CLAUDE.md +60 -3
- package/MEMORY_LEAK_ROOT_CAUSE.md +149 -0
- package/README.md +27 -0
- package/config/hooks/post-edit-pipeline.js +36 -2
- package/examples/metrics-counter-demo.ts +106 -0
- package/examples/persistent-metrics-demo.ts +83 -0
- package/examples/phase-5-multi-level-control.ts +282 -0
- package/examples/session-pool-optimizer-example.ts +311 -0
- package/package.json +18 -4
- package/scripts/check-routing-stats.cjs +122 -0
- package/scripts/monitor-loop.sh +65 -0
- package/scripts/monitor-memory.sh +47 -0
- package/scripts/monitor.py +43 -0
- package/scripts/pre-publish-validation.cjs +212 -0
- package/scripts/test-provider-routing.cjs +228 -0
- package/scripts/test-routing-telemetry.cjs +147 -0
- package/scripts/test-zai-10k.cjs +81 -0
- package/scripts/test-zai-api.cjs +191 -0
- package/scripts/test-zai-diagnostic.cjs +151 -0
- package/scripts/test-zai-final.cjs +128 -0
- package/scripts/test-zai-with-env.cjs +85 -0
- package/scripts/validate-coordination-cli.js +69 -0
- package/scripts/validate-coordination-toggle-integration.cjs +501 -0
- package/src/cli/simple-commands/init/templates/CLAUDE.md +29 -0
- package/src/observability/metrics-counter.ts +347 -0
- package/src/observability/metrics-storage.ts +356 -0
- package/src/observability/telemetry.ts +658 -0
- package/src/slash-commands/cfn-claude-sync.js +533 -0
- package/src/slash-commands/index.js +5 -0
- package/src/slash-commands/metrics-summary-class.js +74 -0
- package/src/slash-commands/metrics-summary.js +335 -0
- package/src/slash-commands/register-all-commands.js +12 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Channel Abstraction
|
|
3
|
+
*
|
|
4
|
+
* Channel abstraction for isolated message communication paths.
|
|
5
|
+
* Provides ordering guarantees, backpressure handling, and channel-specific policies.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Channel isolation (messages don't cross channels)
|
|
9
|
+
* - Message ordering guarantees per channel
|
|
10
|
+
* - Backpressure handling (subscriber overflow protection)
|
|
11
|
+
* - Configurable channel policies (drop, block, buffered)
|
|
12
|
+
* - Channel-specific statistics and monitoring
|
|
13
|
+
*
|
|
14
|
+
* @module coordination/v2/messaging/channel
|
|
15
|
+
*/ import { EventEmitter } from 'events';
|
|
16
|
+
/**
|
|
17
|
+
* Channel backpressure policy.
|
|
18
|
+
* Defines behavior when channel capacity is exceeded.
|
|
19
|
+
*/ export var BackpressurePolicy = /*#__PURE__*/ function(BackpressurePolicy) {
|
|
20
|
+
/** Drop oldest messages when full (default) */ BackpressurePolicy["DROP_OLDEST"] = "drop-oldest";
|
|
21
|
+
/** Drop newest messages when full */ BackpressurePolicy["DROP_NEWEST"] = "drop-newest";
|
|
22
|
+
/** Block publisher until space available */ BackpressurePolicy["BLOCK"] = "block";
|
|
23
|
+
/** Dynamically expand buffer (no limit) */ BackpressurePolicy["UNBOUNDED"] = "unbounded";
|
|
24
|
+
return BackpressurePolicy;
|
|
25
|
+
}({});
|
|
26
|
+
/**
|
|
27
|
+
* Channel events.
|
|
28
|
+
*/ export var ChannelEvent = /*#__PURE__*/ function(ChannelEvent) {
|
|
29
|
+
/** Message published to channel */ ChannelEvent["MESSAGE_PUBLISHED"] = "message-published";
|
|
30
|
+
/** Message delivered to subscriber */ ChannelEvent["MESSAGE_DELIVERED"] = "message-delivered";
|
|
31
|
+
/** Message dropped due to backpressure */ ChannelEvent["MESSAGE_DROPPED"] = "message-dropped";
|
|
32
|
+
/** Channel capacity reached */ ChannelEvent["CAPACITY_REACHED"] = "capacity-reached";
|
|
33
|
+
/** Subscriber added */ ChannelEvent["SUBSCRIBER_ADDED"] = "subscriber-added";
|
|
34
|
+
/** Subscriber removed */ ChannelEvent["SUBSCRIBER_REMOVED"] = "subscriber-removed";
|
|
35
|
+
/** Channel error */ ChannelEvent["ERROR"] = "error";
|
|
36
|
+
return ChannelEvent;
|
|
37
|
+
}({});
|
|
38
|
+
/**
|
|
39
|
+
* Channel - Isolated message communication path.
|
|
40
|
+
*
|
|
41
|
+
* Provides:
|
|
42
|
+
* - Isolated message streams (no cross-channel contamination)
|
|
43
|
+
* - Ordering guarantees (FIFO within channel)
|
|
44
|
+
* - Backpressure handling (configurable policies)
|
|
45
|
+
* - Event-driven notifications
|
|
46
|
+
* - Performance monitoring
|
|
47
|
+
*
|
|
48
|
+
* Performance:
|
|
49
|
+
* - publish(): O(1) amortized
|
|
50
|
+
* - subscribe(): O(1)
|
|
51
|
+
* - deliver(): O(n) where n is subscriber count
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const channel = new Channel({
|
|
56
|
+
* channelId: 'coordination',
|
|
57
|
+
* name: 'Coordination Channel',
|
|
58
|
+
* capacity: 500,
|
|
59
|
+
* backpressurePolicy: BackpressurePolicy.DROP_OLDEST
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* // Subscribe to channel
|
|
63
|
+
* const sub = channel.subscribe(async (message) => {
|
|
64
|
+
* console.log('Received:', message.payload);
|
|
65
|
+
* });
|
|
66
|
+
*
|
|
67
|
+
* // Publish messages
|
|
68
|
+
* channel.publish({
|
|
69
|
+
* topic: 'agent.status',
|
|
70
|
+
* payload: { agentId: 'agent-1', status: 'online' },
|
|
71
|
+
* priority: 5
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/ export class Channel extends EventEmitter {
|
|
75
|
+
/** Channel configuration */ config;
|
|
76
|
+
/** Message buffer (FIFO queue) */ buffer;
|
|
77
|
+
/** Subscribed message handlers */ subscribers;
|
|
78
|
+
/** Next subscription ID counter */ nextSubscriptionId;
|
|
79
|
+
/** Channel statistics */ stats;
|
|
80
|
+
/** Channel creation timestamp */ createdAt;
|
|
81
|
+
/** Channel closed flag */ isClosed;
|
|
82
|
+
constructor(config){
|
|
83
|
+
super();
|
|
84
|
+
this.config = {
|
|
85
|
+
channelId: config.channelId,
|
|
86
|
+
name: config.name,
|
|
87
|
+
capacity: config.capacity ?? 1000,
|
|
88
|
+
backpressurePolicy: config.backpressurePolicy ?? "drop-oldest",
|
|
89
|
+
strictOrdering: config.strictOrdering ?? true,
|
|
90
|
+
priority: config.priority ?? 5,
|
|
91
|
+
enableStats: config.enableStats ?? true
|
|
92
|
+
};
|
|
93
|
+
this.buffer = [];
|
|
94
|
+
this.subscribers = new Map();
|
|
95
|
+
this.nextSubscriptionId = 1;
|
|
96
|
+
this.createdAt = Date.now();
|
|
97
|
+
this.isClosed = false;
|
|
98
|
+
this.stats = {
|
|
99
|
+
totalPublished: 0,
|
|
100
|
+
totalDelivered: 0,
|
|
101
|
+
totalDropped: 0,
|
|
102
|
+
peakBufferSize: 0,
|
|
103
|
+
latencies: [],
|
|
104
|
+
createdAt: this.createdAt
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get channel identifier.
|
|
109
|
+
*/ get channelId() {
|
|
110
|
+
return this.config.channelId;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get channel name.
|
|
114
|
+
*/ get name() {
|
|
115
|
+
return this.config.name;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get channel priority.
|
|
119
|
+
*/ get priority() {
|
|
120
|
+
return this.config.priority;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Check if channel is closed.
|
|
124
|
+
*/ get closed() {
|
|
125
|
+
return this.isClosed;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Publish a message to the channel.
|
|
129
|
+
*
|
|
130
|
+
* @param message - Message to publish
|
|
131
|
+
* @throws Error if channel is closed
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```typescript
|
|
135
|
+
* channel.publish({
|
|
136
|
+
* id: 'msg-123',
|
|
137
|
+
* topic: 'task.completed',
|
|
138
|
+
* payload: { taskId: 'task-1' },
|
|
139
|
+
* priority: 5,
|
|
140
|
+
* timestamp: Date.now()
|
|
141
|
+
* });
|
|
142
|
+
* ```
|
|
143
|
+
*/ publish(message) {
|
|
144
|
+
if (this.isClosed) {
|
|
145
|
+
throw new Error(`Channel ${this.config.channelId} is closed`);
|
|
146
|
+
}
|
|
147
|
+
// Check capacity and apply backpressure policy
|
|
148
|
+
if (this.buffer.length >= this.config.capacity) {
|
|
149
|
+
this.handleBackpressure(message);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
// Add to buffer (FIFO)
|
|
153
|
+
this.buffer.push(message);
|
|
154
|
+
// Update statistics
|
|
155
|
+
this.stats.totalPublished++;
|
|
156
|
+
this.stats.peakBufferSize = Math.max(this.stats.peakBufferSize, this.buffer.length);
|
|
157
|
+
// Emit event
|
|
158
|
+
this.emit("message-published", {
|
|
159
|
+
channelId: this.config.channelId,
|
|
160
|
+
messageId: message.id,
|
|
161
|
+
topic: message.topic,
|
|
162
|
+
bufferSize: this.buffer.length
|
|
163
|
+
});
|
|
164
|
+
// Auto-deliver if we have subscribers
|
|
165
|
+
if (this.subscribers.size > 0) {
|
|
166
|
+
setImmediate(()=>this.processBuffer());
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Subscribe to channel messages.
|
|
171
|
+
*
|
|
172
|
+
* @param handler - Message handler function
|
|
173
|
+
* @param priority - Handler priority (default: 0)
|
|
174
|
+
* @returns Subscription handle
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* const sub = channel.subscribe(async (message) => {
|
|
179
|
+
* console.log('Received:', message.payload);
|
|
180
|
+
* }, 10);
|
|
181
|
+
* ```
|
|
182
|
+
*/ subscribe(handler, priority = 0) {
|
|
183
|
+
if (this.isClosed) {
|
|
184
|
+
throw new Error(`Channel ${this.config.channelId} is closed`);
|
|
185
|
+
}
|
|
186
|
+
const subscriptionId = `${this.config.channelId}-sub-${this.nextSubscriptionId++}`;
|
|
187
|
+
this.subscribers.set(subscriptionId, {
|
|
188
|
+
handler,
|
|
189
|
+
priority,
|
|
190
|
+
messagesReceived: 0,
|
|
191
|
+
createdAt: Date.now()
|
|
192
|
+
});
|
|
193
|
+
// Emit event
|
|
194
|
+
this.emit("subscriber-added", {
|
|
195
|
+
channelId: this.config.channelId,
|
|
196
|
+
subscriptionId,
|
|
197
|
+
totalSubscribers: this.subscribers.size
|
|
198
|
+
});
|
|
199
|
+
return {
|
|
200
|
+
id: subscriptionId,
|
|
201
|
+
channelId: this.config.channelId,
|
|
202
|
+
topic: this.config.name,
|
|
203
|
+
createdAt: Date.now(),
|
|
204
|
+
messagesReceived: 0,
|
|
205
|
+
priority,
|
|
206
|
+
unsubscribe: ()=>this.unsubscribe(subscriptionId)
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Unsubscribe from channel.
|
|
211
|
+
*
|
|
212
|
+
* @param subscriptionId - Subscription ID to remove
|
|
213
|
+
*/ unsubscribe(subscriptionId) {
|
|
214
|
+
const removed = this.subscribers.delete(subscriptionId);
|
|
215
|
+
if (removed) {
|
|
216
|
+
this.emit("subscriber-removed", {
|
|
217
|
+
channelId: this.config.channelId,
|
|
218
|
+
subscriptionId,
|
|
219
|
+
totalSubscribers: this.subscribers.size
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Process buffered messages and deliver to subscribers.
|
|
225
|
+
* Maintains FIFO ordering within channel.
|
|
226
|
+
*
|
|
227
|
+
* @returns Number of messages delivered
|
|
228
|
+
*/ async processBuffer() {
|
|
229
|
+
if (this.isClosed || this.buffer.length === 0 || this.subscribers.size === 0) {
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
232
|
+
let deliveredCount = 0;
|
|
233
|
+
// Get subscribers sorted by priority (highest first)
|
|
234
|
+
const sortedSubscribers = Array.from(this.subscribers.entries()).sort(([, a], [, b])=>b.priority - a.priority);
|
|
235
|
+
// Process messages in FIFO order (strict ordering)
|
|
236
|
+
while(this.buffer.length > 0){
|
|
237
|
+
const message = this.buffer.shift();
|
|
238
|
+
const startTime = performance.now();
|
|
239
|
+
// Deliver to all subscribers
|
|
240
|
+
for (const [subId, subscriber] of sortedSubscribers){
|
|
241
|
+
try {
|
|
242
|
+
await subscriber.handler(message);
|
|
243
|
+
subscriber.messagesReceived++;
|
|
244
|
+
deliveredCount++;
|
|
245
|
+
this.emit("message-delivered", {
|
|
246
|
+
channelId: this.config.channelId,
|
|
247
|
+
messageId: message.id,
|
|
248
|
+
subscriptionId: subId
|
|
249
|
+
});
|
|
250
|
+
} catch (error) {
|
|
251
|
+
this.emit("error", {
|
|
252
|
+
channelId: this.config.channelId,
|
|
253
|
+
subscriptionId: subId,
|
|
254
|
+
messageId: message.id,
|
|
255
|
+
error
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Update statistics
|
|
260
|
+
this.stats.totalDelivered++;
|
|
261
|
+
const latency = performance.now() - startTime;
|
|
262
|
+
this.stats.latencies.push(latency);
|
|
263
|
+
// Keep only last 1000 latencies for stats
|
|
264
|
+
if (this.stats.latencies.length > 1000) {
|
|
265
|
+
this.stats.latencies.shift();
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return deliveredCount;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Handle backpressure when channel capacity is exceeded.
|
|
272
|
+
*
|
|
273
|
+
* @param newMessage - New message attempting to publish
|
|
274
|
+
*/ handleBackpressure(newMessage) {
|
|
275
|
+
this.emit("capacity-reached", {
|
|
276
|
+
channelId: this.config.channelId,
|
|
277
|
+
capacity: this.config.capacity,
|
|
278
|
+
bufferSize: this.buffer.length
|
|
279
|
+
});
|
|
280
|
+
switch(this.config.backpressurePolicy){
|
|
281
|
+
case "drop-oldest":
|
|
282
|
+
// Remove oldest message and add new one
|
|
283
|
+
this.buffer.shift();
|
|
284
|
+
this.buffer.push(newMessage);
|
|
285
|
+
this.stats.totalDropped++;
|
|
286
|
+
this.emit("message-dropped", {
|
|
287
|
+
channelId: this.config.channelId,
|
|
288
|
+
reason: 'capacity-exceeded',
|
|
289
|
+
policy: "drop-oldest"
|
|
290
|
+
});
|
|
291
|
+
break;
|
|
292
|
+
case "drop-newest":
|
|
293
|
+
// Drop the new message
|
|
294
|
+
this.stats.totalDropped++;
|
|
295
|
+
this.emit("message-dropped", {
|
|
296
|
+
channelId: this.config.channelId,
|
|
297
|
+
messageId: newMessage.id,
|
|
298
|
+
reason: 'capacity-exceeded',
|
|
299
|
+
policy: "drop-newest"
|
|
300
|
+
});
|
|
301
|
+
break;
|
|
302
|
+
case "unbounded":
|
|
303
|
+
// Always accept (no capacity limit)
|
|
304
|
+
this.buffer.push(newMessage);
|
|
305
|
+
break;
|
|
306
|
+
case "block":
|
|
307
|
+
// NOTE: In async JS, blocking is simulated via rejection
|
|
308
|
+
throw new Error(`Channel ${this.config.channelId} capacity exceeded (${this.config.capacity}). ` + 'Message blocked due to BLOCK policy.');
|
|
309
|
+
default:
|
|
310
|
+
throw new Error(`Unknown backpressure policy: ${this.config.backpressurePolicy}`);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Get channel statistics.
|
|
315
|
+
*
|
|
316
|
+
* @returns Channel statistics
|
|
317
|
+
*/ getStats() {
|
|
318
|
+
const avgLatencyMs = this.stats.latencies.length > 0 ? this.stats.latencies.reduce((sum, l)=>sum + l, 0) / this.stats.latencies.length : 0;
|
|
319
|
+
return {
|
|
320
|
+
channelId: this.config.channelId,
|
|
321
|
+
totalPublished: this.stats.totalPublished,
|
|
322
|
+
totalDelivered: this.stats.totalDelivered,
|
|
323
|
+
totalDropped: this.stats.totalDropped,
|
|
324
|
+
currentBufferSize: this.buffer.length,
|
|
325
|
+
peakBufferSize: this.stats.peakBufferSize,
|
|
326
|
+
totalSubscriptions: this.subscribers.size,
|
|
327
|
+
avgLatencyMs,
|
|
328
|
+
createdAt: this.stats.createdAt,
|
|
329
|
+
uptimeMs: Date.now() - this.createdAt
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Get current buffer size.
|
|
334
|
+
*/ getBufferSize() {
|
|
335
|
+
return this.buffer.length;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Get current subscriber count.
|
|
339
|
+
*/ getSubscriberCount() {
|
|
340
|
+
return this.subscribers.size;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Clear all buffered messages.
|
|
344
|
+
* Does not affect active subscriptions.
|
|
345
|
+
*/ clearBuffer() {
|
|
346
|
+
const droppedCount = this.buffer.length;
|
|
347
|
+
this.buffer = [];
|
|
348
|
+
this.stats.totalDropped += droppedCount;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Close the channel.
|
|
352
|
+
* Prevents new publications and deliveries, but does not clear buffer.
|
|
353
|
+
*/ close() {
|
|
354
|
+
this.isClosed = true;
|
|
355
|
+
this.removeAllListeners();
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Reset channel statistics.
|
|
359
|
+
*/ resetStats() {
|
|
360
|
+
this.stats = {
|
|
361
|
+
totalPublished: 0,
|
|
362
|
+
totalDelivered: 0,
|
|
363
|
+
totalDropped: 0,
|
|
364
|
+
peakBufferSize: 0,
|
|
365
|
+
latencies: [],
|
|
366
|
+
createdAt: Date.now()
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
//# sourceMappingURL=channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/coordination/v2/messaging/channel.ts"],"names":["EventEmitter","BackpressurePolicy","ChannelEvent","Channel","config","buffer","subscribers","nextSubscriptionId","stats","createdAt","isClosed","channelId","name","capacity","backpressurePolicy","strictOrdering","priority","enableStats","Map","Date","now","totalPublished","totalDelivered","totalDropped","peakBufferSize","latencies","closed","publish","message","Error","length","handleBackpressure","push","Math","max","emit","messageId","id","topic","bufferSize","size","setImmediate","processBuffer","subscribe","handler","subscriptionId","set","messagesReceived","totalSubscribers","unsubscribe","removed","delete","deliveredCount","sortedSubscribers","Array","from","entries","sort","a","b","shift","startTime","performance","subId","subscriber","error","latency","newMessage","reason","policy","getStats","avgLatencyMs","reduce","sum","l","currentBufferSize","totalSubscriptions","uptimeMs","getBufferSize","getSubscriberCount","clearBuffer","droppedCount","close","removeAllListeners","resetStats"],"mappings":"AAAA;;;;;;;;;;;;;;CAcC,GAGD,SAASA,YAAY,QAAQ,SAAS;AAEtC;;;CAGC,GACD,OAAO,IAAA,AAAKC,4CAAAA;IACV,6CAA6C;IAG7C,mCAAmC;IAGnC,0CAA0C;IAG1C,yCAAyC;WAV/BA;MAYX;AA6ED;;CAEC,GACD,OAAO,IAAA,AAAKC,sCAAAA;IACV,iCAAiC;IAGjC,oCAAoC;IAGpC,wCAAwC;IAGxC,6BAA6B;IAG7B,qBAAqB;IAGrB,uBAAuB;IAGvB,kBAAkB;WAnBRA;MAqBX;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCC,GACD,OAAO,MAAMC,gBAAgBH;IAC3B,0BAA0B,GAC1B,AAAiBI,OAAgC;IAEjD,gCAAgC,GAChC,AAAQC,OAAkB;IAE1B,gCAAg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