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,411 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Task Channel
|
|
3
|
+
*
|
|
4
|
+
* Specialized channel for task assignment and completion messages.
|
|
5
|
+
* Coordinates task distribution and status updates across agents.
|
|
6
|
+
*
|
|
7
|
+
* @module coordination/v2/messaging/channels/task-channel
|
|
8
|
+
*/ import { MessagePriority } from '../../core/message.js';
|
|
9
|
+
/**
|
|
10
|
+
* Task priority levels for execution ordering.
|
|
11
|
+
*/ export var TaskPriority = /*#__PURE__*/ function(TaskPriority) {
|
|
12
|
+
/** Critical task requiring immediate execution */ TaskPriority[TaskPriority["CRITICAL"] = 10] = "CRITICAL";
|
|
13
|
+
/** High priority task */ TaskPriority[TaskPriority["HIGH"] = 8] = "HIGH";
|
|
14
|
+
/** Normal priority task (default) */ TaskPriority[TaskPriority["NORMAL"] = 5] = "NORMAL";
|
|
15
|
+
/** Low priority background task */ TaskPriority[TaskPriority["LOW"] = 2] = "LOW";
|
|
16
|
+
return TaskPriority;
|
|
17
|
+
}({});
|
|
18
|
+
/**
|
|
19
|
+
* Task status for lifecycle tracking.
|
|
20
|
+
*/ export var TaskStatus = /*#__PURE__*/ function(TaskStatus) {
|
|
21
|
+
/** Task assigned but not started */ TaskStatus["ASSIGNED"] = "assigned";
|
|
22
|
+
/** Task currently executing */ TaskStatus["IN_PROGRESS"] = "in_progress";
|
|
23
|
+
/** Task completed successfully */ TaskStatus["COMPLETED"] = "completed";
|
|
24
|
+
/** Task failed with error */ TaskStatus["FAILED"] = "failed";
|
|
25
|
+
/** Task cancelled before completion */ TaskStatus["CANCELLED"] = "cancelled";
|
|
26
|
+
return TaskStatus;
|
|
27
|
+
}({});
|
|
28
|
+
/**
|
|
29
|
+
* Task channel validation error.
|
|
30
|
+
*/ export class TaskChannelError extends Error {
|
|
31
|
+
constructor(message){
|
|
32
|
+
super(message);
|
|
33
|
+
this.name = 'TaskChannelError';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Task Channel Implementation.
|
|
38
|
+
*
|
|
39
|
+
* Specialized messaging channel for task coordination with:
|
|
40
|
+
* - Type-safe task assignment/completion payloads
|
|
41
|
+
* - Priority-based task routing
|
|
42
|
+
* - Progress tracking support
|
|
43
|
+
* - Task lifecycle management
|
|
44
|
+
* - Integration with dependency graph
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const taskChannel = new TaskChannel(messageBroker);
|
|
49
|
+
*
|
|
50
|
+
* // Assign task to agent
|
|
51
|
+
* await taskChannel.publishTaskAssignment({
|
|
52
|
+
* taskId: 'task-1',
|
|
53
|
+
* agentId: 'agent-1',
|
|
54
|
+
* description: 'Process user data',
|
|
55
|
+
* priority: TaskPriority.HIGH,
|
|
56
|
+
* input: { userId: '123' }
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* // Report task completion
|
|
60
|
+
* await taskChannel.publishTaskCompletion({
|
|
61
|
+
* taskId: 'task-1',
|
|
62
|
+
* agentId: 'agent-1',
|
|
63
|
+
* status: TaskStatus.COMPLETED,
|
|
64
|
+
* result: { processed: true }
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*/ export class TaskChannel {
|
|
68
|
+
/** Base topic for all task messages */ static BASE_TOPIC = 'task';
|
|
69
|
+
/** Topic for task assignments */ static ASSIGNMENT_TOPIC = 'task.assignment';
|
|
70
|
+
/** Topic for task completions */ static COMPLETION_TOPIC = 'task.completion';
|
|
71
|
+
/** Topic for task progress */ static PROGRESS_TOPIC = 'task.progress';
|
|
72
|
+
broker;
|
|
73
|
+
/**
|
|
74
|
+
* Creates a new task channel instance.
|
|
75
|
+
*
|
|
76
|
+
* @param broker - Message broker for publishing/subscribing
|
|
77
|
+
*/ constructor(broker){
|
|
78
|
+
if (!broker) {
|
|
79
|
+
throw new TaskChannelError('Message broker is required');
|
|
80
|
+
}
|
|
81
|
+
this.broker = broker;
|
|
82
|
+
}
|
|
83
|
+
// ============================================
|
|
84
|
+
// Publishing - Task Assignments
|
|
85
|
+
// ============================================
|
|
86
|
+
/**
|
|
87
|
+
* Publishes a task assignment to an agent.
|
|
88
|
+
*
|
|
89
|
+
* @param config - Task assignment configuration
|
|
90
|
+
* @returns Promise resolving to published message
|
|
91
|
+
* @throws {TaskChannelError} If validation fails
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* await taskChannel.publishTaskAssignment({
|
|
96
|
+
* taskId: 'task-1',
|
|
97
|
+
* agentId: 'agent-1',
|
|
98
|
+
* description: 'Analyze dataset',
|
|
99
|
+
* priority: TaskPriority.HIGH,
|
|
100
|
+
* input: { datasetId: 'ds-123' },
|
|
101
|
+
* timeout: 60000
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/ async publishTaskAssignment(config) {
|
|
105
|
+
this.validateTaskAssignment(config);
|
|
106
|
+
const payload = {
|
|
107
|
+
taskId: config.taskId,
|
|
108
|
+
agentId: config.agentId,
|
|
109
|
+
description: config.description,
|
|
110
|
+
priority: config.priority ?? 5,
|
|
111
|
+
input: config.input,
|
|
112
|
+
timeout: config.timeout,
|
|
113
|
+
timestamp: Date.now(),
|
|
114
|
+
metadata: config.metadata
|
|
115
|
+
};
|
|
116
|
+
const topic = `${TaskChannel.ASSIGNMENT_TOPIC}.${config.agentId}`;
|
|
117
|
+
const priority = this.mapTaskPriorityToMessagePriority(payload.priority);
|
|
118
|
+
const messageConfig = {
|
|
119
|
+
topic,
|
|
120
|
+
payload,
|
|
121
|
+
priority,
|
|
122
|
+
recipientId: config.agentId,
|
|
123
|
+
metadata: {
|
|
124
|
+
channel: 'task',
|
|
125
|
+
type: 'assignment',
|
|
126
|
+
taskId: config.taskId,
|
|
127
|
+
agentId: config.agentId
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return this.broker.publish(messageConfig);
|
|
131
|
+
}
|
|
132
|
+
// ============================================
|
|
133
|
+
// Publishing - Task Completions
|
|
134
|
+
// ============================================
|
|
135
|
+
/**
|
|
136
|
+
* Publishes a task completion event.
|
|
137
|
+
*
|
|
138
|
+
* @param config - Task completion configuration
|
|
139
|
+
* @returns Promise resolving to published message
|
|
140
|
+
* @throws {TaskChannelError} If validation fails
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* await taskChannel.publishTaskCompletion({
|
|
145
|
+
* taskId: 'task-1',
|
|
146
|
+
* agentId: 'agent-1',
|
|
147
|
+
* status: TaskStatus.COMPLETED,
|
|
148
|
+
* result: { output: 'success' },
|
|
149
|
+
* duration: 5000
|
|
150
|
+
* });
|
|
151
|
+
* ```
|
|
152
|
+
*/ async publishTaskCompletion(config) {
|
|
153
|
+
this.validateTaskCompletion(config);
|
|
154
|
+
const payload = {
|
|
155
|
+
taskId: config.taskId,
|
|
156
|
+
agentId: config.agentId,
|
|
157
|
+
status: config.status,
|
|
158
|
+
result: config.result,
|
|
159
|
+
duration: config.duration,
|
|
160
|
+
timestamp: Date.now(),
|
|
161
|
+
metadata: config.metadata
|
|
162
|
+
};
|
|
163
|
+
const topic = `${TaskChannel.COMPLETION_TOPIC}.${config.taskId}`;
|
|
164
|
+
const priority = config.status === "failed" ? MessagePriority.HIGH : MessagePriority.NORMAL;
|
|
165
|
+
const messageConfig = {
|
|
166
|
+
topic,
|
|
167
|
+
payload,
|
|
168
|
+
priority,
|
|
169
|
+
senderId: config.agentId,
|
|
170
|
+
metadata: {
|
|
171
|
+
channel: 'task',
|
|
172
|
+
type: 'completion',
|
|
173
|
+
taskId: config.taskId,
|
|
174
|
+
status: config.status
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
return this.broker.publish(messageConfig);
|
|
178
|
+
}
|
|
179
|
+
// ============================================
|
|
180
|
+
// Publishing - Task Progress
|
|
181
|
+
// ============================================
|
|
182
|
+
/**
|
|
183
|
+
* Publishes a task progress update.
|
|
184
|
+
*
|
|
185
|
+
* @param config - Task progress configuration
|
|
186
|
+
* @returns Promise resolving to published message
|
|
187
|
+
* @throws {TaskChannelError} If validation fails
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```typescript
|
|
191
|
+
* await taskChannel.publishTaskProgress({
|
|
192
|
+
* taskId: 'task-1',
|
|
193
|
+
* agentId: 'agent-1',
|
|
194
|
+
* progress: 50,
|
|
195
|
+
* message: 'Processing halfway complete'
|
|
196
|
+
* });
|
|
197
|
+
* ```
|
|
198
|
+
*/ async publishTaskProgress(config) {
|
|
199
|
+
this.validateTaskProgress(config);
|
|
200
|
+
const payload = {
|
|
201
|
+
taskId: config.taskId,
|
|
202
|
+
agentId: config.agentId,
|
|
203
|
+
progress: config.progress,
|
|
204
|
+
message: config.message,
|
|
205
|
+
timestamp: Date.now(),
|
|
206
|
+
metadata: config.metadata
|
|
207
|
+
};
|
|
208
|
+
const topic = `${TaskChannel.PROGRESS_TOPIC}.${config.taskId}`;
|
|
209
|
+
const messageConfig = {
|
|
210
|
+
topic,
|
|
211
|
+
payload,
|
|
212
|
+
priority: MessagePriority.LOW,
|
|
213
|
+
senderId: config.agentId,
|
|
214
|
+
metadata: {
|
|
215
|
+
channel: 'task',
|
|
216
|
+
type: 'progress',
|
|
217
|
+
taskId: config.taskId
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
return this.broker.publish(messageConfig);
|
|
221
|
+
}
|
|
222
|
+
// ============================================
|
|
223
|
+
// Subscribing
|
|
224
|
+
// ============================================
|
|
225
|
+
/**
|
|
226
|
+
* Subscribes to task assignments for a specific agent.
|
|
227
|
+
*
|
|
228
|
+
* @param agentId - Agent ID to monitor
|
|
229
|
+
* @param handler - Callback function for assignments
|
|
230
|
+
* @returns Subscription handle
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* ```typescript
|
|
234
|
+
* const sub = await taskChannel.subscribeToAssignments('agent-1', async (payload) => {
|
|
235
|
+
* console.log(`Received task: ${payload.taskId}`);
|
|
236
|
+
* });
|
|
237
|
+
* ```
|
|
238
|
+
*/ async subscribeToAssignments(agentId, handler) {
|
|
239
|
+
this.validateId(agentId, 'Agent ID');
|
|
240
|
+
return this.broker.subscribe({
|
|
241
|
+
topic: `${TaskChannel.ASSIGNMENT_TOPIC}.${agentId}`,
|
|
242
|
+
handler: async (message)=>{
|
|
243
|
+
await handler(message.payload);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Subscribes to all task assignments.
|
|
249
|
+
*
|
|
250
|
+
* @param handler - Callback function for assignments
|
|
251
|
+
* @returns Subscription handle
|
|
252
|
+
*/ async subscribeToAllAssignments(handler) {
|
|
253
|
+
return this.broker.subscribe({
|
|
254
|
+
topic: `${TaskChannel.ASSIGNMENT_TOPIC}.*`,
|
|
255
|
+
handler: async (message)=>{
|
|
256
|
+
await handler(message.payload);
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Subscribes to task completions for a specific task.
|
|
262
|
+
*
|
|
263
|
+
* @param taskId - Task ID to monitor
|
|
264
|
+
* @param handler - Callback function for completions
|
|
265
|
+
* @returns Subscription handle
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* ```typescript
|
|
269
|
+
* const sub = await taskChannel.subscribeToCompletion('task-1', async (payload) => {
|
|
270
|
+
* console.log(`Task completed with status: ${payload.status}`);
|
|
271
|
+
* });
|
|
272
|
+
* ```
|
|
273
|
+
*/ async subscribeToCompletion(taskId, handler) {
|
|
274
|
+
this.validateId(taskId, 'Task ID');
|
|
275
|
+
return this.broker.subscribe({
|
|
276
|
+
topic: `${TaskChannel.COMPLETION_TOPIC}.${taskId}`,
|
|
277
|
+
handler: async (message)=>{
|
|
278
|
+
await handler(message.payload);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Subscribes to all task completions.
|
|
284
|
+
*
|
|
285
|
+
* @param handler - Callback function for completions
|
|
286
|
+
* @returns Subscription handle
|
|
287
|
+
*/ async subscribeToAllCompletions(handler) {
|
|
288
|
+
return this.broker.subscribe({
|
|
289
|
+
topic: `${TaskChannel.COMPLETION_TOPIC}.*`,
|
|
290
|
+
handler: async (message)=>{
|
|
291
|
+
await handler(message.payload);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Subscribes to task progress updates for a specific task.
|
|
297
|
+
*
|
|
298
|
+
* @param taskId - Task ID to monitor
|
|
299
|
+
* @param handler - Callback function for progress updates
|
|
300
|
+
* @returns Subscription handle
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```typescript
|
|
304
|
+
* const sub = await taskChannel.subscribeToProgress('task-1', async (payload) => {
|
|
305
|
+
* console.log(`Task progress: ${payload.progress}%`);
|
|
306
|
+
* });
|
|
307
|
+
* ```
|
|
308
|
+
*/ async subscribeToProgress(taskId, handler) {
|
|
309
|
+
this.validateId(taskId, 'Task ID');
|
|
310
|
+
return this.broker.subscribe({
|
|
311
|
+
topic: `${TaskChannel.PROGRESS_TOPIC}.${taskId}`,
|
|
312
|
+
handler: async (message)=>{
|
|
313
|
+
await handler(message.payload);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
// ============================================
|
|
318
|
+
// Validation
|
|
319
|
+
// ============================================
|
|
320
|
+
/**
|
|
321
|
+
* Validates task assignment configuration.
|
|
322
|
+
*/ validateTaskAssignment(config) {
|
|
323
|
+
this.validateId(config.taskId, 'Task ID');
|
|
324
|
+
this.validateId(config.agentId, 'Agent ID');
|
|
325
|
+
if (!config.description || typeof config.description !== 'string') {
|
|
326
|
+
throw new TaskChannelError('Task description must be a non-empty string');
|
|
327
|
+
}
|
|
328
|
+
if (config.priority !== undefined && !Object.values(TaskPriority).includes(config.priority)) {
|
|
329
|
+
throw new TaskChannelError(`Invalid task priority: ${config.priority}`);
|
|
330
|
+
}
|
|
331
|
+
if (config.timeout !== undefined) {
|
|
332
|
+
if (typeof config.timeout !== 'number' || config.timeout <= 0) {
|
|
333
|
+
throw new TaskChannelError('Timeout must be a positive number');
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Validates task completion configuration.
|
|
339
|
+
*/ validateTaskCompletion(config) {
|
|
340
|
+
this.validateId(config.taskId, 'Task ID');
|
|
341
|
+
this.validateId(config.agentId, 'Agent ID');
|
|
342
|
+
if (!Object.values(TaskStatus).includes(config.status)) {
|
|
343
|
+
throw new TaskChannelError(`Invalid task status: ${config.status}`);
|
|
344
|
+
}
|
|
345
|
+
if (config.duration !== undefined) {
|
|
346
|
+
if (typeof config.duration !== 'number' || config.duration < 0) {
|
|
347
|
+
throw new TaskChannelError('Duration must be a non-negative number');
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Validates task progress configuration.
|
|
353
|
+
*/ validateTaskProgress(config) {
|
|
354
|
+
this.validateId(config.taskId, 'Task ID');
|
|
355
|
+
this.validateId(config.agentId, 'Agent ID');
|
|
356
|
+
if (typeof config.progress !== 'number' || config.progress < 0 || config.progress > 100) {
|
|
357
|
+
throw new TaskChannelError('Progress must be a number between 0 and 100');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Validates an ID field.
|
|
362
|
+
*/ validateId(id, fieldName) {
|
|
363
|
+
if (!id || typeof id !== 'string') {
|
|
364
|
+
throw new TaskChannelError(`${fieldName} must be a non-empty string`);
|
|
365
|
+
}
|
|
366
|
+
if (id.length > 256) {
|
|
367
|
+
throw new TaskChannelError(`${fieldName} exceeds 256 characters`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// ============================================
|
|
371
|
+
// Utility Methods
|
|
372
|
+
// ============================================
|
|
373
|
+
/**
|
|
374
|
+
* Maps task priority to message priority.
|
|
375
|
+
*/ mapTaskPriorityToMessagePriority(taskPriority) {
|
|
376
|
+
switch(taskPriority){
|
|
377
|
+
case 10:
|
|
378
|
+
return MessagePriority.CRITICAL;
|
|
379
|
+
case 8:
|
|
380
|
+
return MessagePriority.HIGH;
|
|
381
|
+
case 5:
|
|
382
|
+
return MessagePriority.NORMAL;
|
|
383
|
+
case 2:
|
|
384
|
+
return MessagePriority.LOW;
|
|
385
|
+
default:
|
|
386
|
+
return MessagePriority.NORMAL;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Gets the base topic for all task messages.
|
|
391
|
+
*/ static getBaseTopic() {
|
|
392
|
+
return TaskChannel.BASE_TOPIC;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Gets the topic for task assignments.
|
|
396
|
+
*/ static getAssignmentTopic() {
|
|
397
|
+
return TaskChannel.ASSIGNMENT_TOPIC;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Gets the topic for task completions.
|
|
401
|
+
*/ static getCompletionTopic() {
|
|
402
|
+
return TaskChannel.COMPLETION_TOPIC;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Gets the topic for task progress.
|
|
406
|
+
*/ static getProgressTopic() {
|
|
407
|
+
return TaskChannel.PROGRESS_TOPIC;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
//# sourceMappingURL=task-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/coordination/v2/messaging/channels/task-channel.ts"],"names":["MessagePriority","TaskPriority","TaskStatus","TaskChannelError","Error","message","name","TaskChannel","BASE_TOPIC","ASSIGNMENT_TOPIC","COMPLETION_TOPIC","PROGRESS_TOPIC","broker","publishTaskAssignment","config","validateTaskAssignment","payload","taskId","agentId","description","priority","input","timeout","timestamp","Date","now","metadata","topic","mapTaskPriorityToMessagePriority","messageConfig","recipientId","channel","type","publish","publishTaskCompletion","validateTaskCompletion","status","result","duration","HIGH","NORMAL","senderId","publishTaskProgress","validateTaskProgress","progress","LOW","subscribeToAssignments","handler","validateId","subscribe","subscribeToAllAssignments","subscribeToCompletion","subscribeToAllCompletions","subscribeToProgress","undefined","Object","values","includes","id","fieldName","length","taskPriority","CRITICAL","getBaseTopic","getAssignmentTopic","getCompletionTopic","getProgressTopic"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAAiCA,eAAe,QAAQ,wBAAwB;AAGhF;;CAEC,GACD,OAAO,IAAA,AAAKC,sCAAAA;IACV,gDAAgD;IAGhD,uBAAuB;IAGvB,mCAAmC;IAGnC,iCAAiC;WAVvBA;MAYX;AAED;;CAEC,GACD,OAAO,IAAA,AAAKC,oCAAAA;IACV,kCAAkC;IAGlC,6BAA6B;IAG7B,gCAAgC;IAGhC,2BAA2B;IAG3B,qCAAqC;WAb3BA;MAeX;AAwJD;;CAEC,GACD,OAAO,MAAMC,yBAAyBC;IACpC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BC,GACD,OAAO,MAAMC;IACX,qCAAqC,GACrC,OAAwBC,aAAa,OAAO;IAE5C,+BAA+B,GAC/B,OAAwBC,mBAAmB,kBAAkB;IAE7D,+BAA+B,GAC/B,OAAwBC,mBAAmB,kBAAkB;IAE7D,4BAA4B,GAC5B,OAAwBC,iBAAiB,gBAAgB;IAExCC,OAAsB;IAEvC;;;;GAIC,GACD,YAAYA,MAAqB,CAAE;QACjC,IAAI,CAACA,QAAQ;YACX,MAAM,IAAIT,iBAAiB;QAC7B;QACA,IAAI,CAACS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.
|
|
5
|
+
*
|
|
6
|
+
* @module coordination/v2/messaging
|
|
7
|
+
*/ // Core message bus
|
|
8
|
+
export { MessageBus, MessageBusEvent } from './message-bus.js';
|
|
9
|
+
// Channel abstraction
|
|
10
|
+
export { Channel, ChannelEvent, BackpressurePolicy } from './channel.js';
|
|
11
|
+
// Message router
|
|
12
|
+
export { MessageRouter, ChannelType, RouterEvent } from './message-router.js';
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/coordination/v2/messaging/index.ts"],"names":["MessageBus","MessageBusEvent","Channel","ChannelEvent","BackpressurePolicy","MessageRouter","ChannelType","RouterEvent"],"mappings":"AAAA;;;;;;CAMC,GAED,mBAAmB;AACnB,SAASA,UAAU,EAAEC,eAAe,QAAqD,mBAAmB;AAE5G,sBAAsB;AACtB,SACEC,OAAO,EACPC,YAAY,EACZC,kBAAkB,QAIb,eAAe;AAEtB,iBAAiB;AACjB,SACEC,aAAa,EACbC,WAAW,EACXC,WAAW,QAIN,sBAAsB"}
|