claude-flow-novice 1.6.1 → 1.6.2
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 +4 -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/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/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/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/metrics.db +0 -0
- package/.claude-flow-novice/metrics.db-shm +0 -0
- package/.claude-flow-novice/metrics.db-wal +0 -0
- package/CLAUDE.md +29 -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 +15 -3
- package/scripts/check-routing-stats.cjs +122 -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,424 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Help Channel
|
|
3
|
+
*
|
|
4
|
+
* Specialized channel for help request routing and capability matching.
|
|
5
|
+
* Enables blocked agents to request assistance from capable peers.
|
|
6
|
+
*
|
|
7
|
+
* @module coordination/v2/messaging/channels/help-channel
|
|
8
|
+
*/ import { MessagePriority } from '../../core/message.js';
|
|
9
|
+
/**
|
|
10
|
+
* Help request status for lifecycle tracking.
|
|
11
|
+
*/ export var HelpRequestStatus = /*#__PURE__*/ function(HelpRequestStatus) {
|
|
12
|
+
/** Help request created and awaiting response */ HelpRequestStatus["PENDING"] = "pending";
|
|
13
|
+
/** Help request accepted by helper agent */ HelpRequestStatus["ACCEPTED"] = "accepted";
|
|
14
|
+
/** Help request in progress */ HelpRequestStatus["IN_PROGRESS"] = "in_progress";
|
|
15
|
+
/** Help request completed successfully */ HelpRequestStatus["RESOLVED"] = "resolved";
|
|
16
|
+
/** Help request timed out without resolution */ HelpRequestStatus["TIMEOUT"] = "timeout";
|
|
17
|
+
/** Help request cancelled by requester */ HelpRequestStatus["CANCELLED"] = "cancelled";
|
|
18
|
+
return HelpRequestStatus;
|
|
19
|
+
}({});
|
|
20
|
+
/**
|
|
21
|
+
* Help channel validation error.
|
|
22
|
+
*/ export class HelpChannelError extends Error {
|
|
23
|
+
constructor(message){
|
|
24
|
+
super(message);
|
|
25
|
+
this.name = 'HelpChannelError';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Help Channel Implementation.
|
|
30
|
+
*
|
|
31
|
+
* Specialized messaging channel for help requests with:
|
|
32
|
+
* - Type-safe help request/response/completion payloads
|
|
33
|
+
* - Capability-based matching
|
|
34
|
+
* - Request/reply pattern for help coordination
|
|
35
|
+
* - Timeout handling for unresolved requests
|
|
36
|
+
* - Integration with Phase 7 help system
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const helpChannel = new HelpChannel(messageBroker);
|
|
41
|
+
*
|
|
42
|
+
* // Request help
|
|
43
|
+
* await helpChannel.publishHelpRequest({
|
|
44
|
+
* requestId: 'help-1',
|
|
45
|
+
* requesterId: 'agent-1',
|
|
46
|
+
* capability: 'data-processing',
|
|
47
|
+
* description: 'Need help processing large dataset',
|
|
48
|
+
* timeout: 30000
|
|
49
|
+
* });
|
|
50
|
+
*
|
|
51
|
+
* // Respond to help request
|
|
52
|
+
* await helpChannel.publishHelpResponse({
|
|
53
|
+
* requestId: 'help-1',
|
|
54
|
+
* helperId: 'agent-2',
|
|
55
|
+
* requesterId: 'agent-1',
|
|
56
|
+
* status: HelpRequestStatus.ACCEPTED,
|
|
57
|
+
* estimatedDuration: 5000
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* // Complete help request
|
|
61
|
+
* await helpChannel.publishHelpCompletion({
|
|
62
|
+
* requestId: 'help-1',
|
|
63
|
+
* helperId: 'agent-2',
|
|
64
|
+
* requesterId: 'agent-1',
|
|
65
|
+
* status: HelpRequestStatus.RESOLVED,
|
|
66
|
+
* result: { processed: true }
|
|
67
|
+
* });
|
|
68
|
+
* ```
|
|
69
|
+
*/ export class HelpChannel {
|
|
70
|
+
/** Base topic for all help messages */ static BASE_TOPIC = 'help';
|
|
71
|
+
/** Topic for help requests */ static REQUEST_TOPIC = 'help.request';
|
|
72
|
+
/** Topic for help responses */ static RESPONSE_TOPIC = 'help.response';
|
|
73
|
+
/** Topic for help completions */ static COMPLETION_TOPIC = 'help.completion';
|
|
74
|
+
broker;
|
|
75
|
+
/**
|
|
76
|
+
* Creates a new help channel instance.
|
|
77
|
+
*
|
|
78
|
+
* @param broker - Message broker for publishing/subscribing
|
|
79
|
+
*/ constructor(broker){
|
|
80
|
+
if (!broker) {
|
|
81
|
+
throw new HelpChannelError('Message broker is required');
|
|
82
|
+
}
|
|
83
|
+
this.broker = broker;
|
|
84
|
+
}
|
|
85
|
+
// ============================================
|
|
86
|
+
// Publishing - Help Requests
|
|
87
|
+
// ============================================
|
|
88
|
+
/**
|
|
89
|
+
* Publishes a help request.
|
|
90
|
+
*
|
|
91
|
+
* @param config - Help request configuration
|
|
92
|
+
* @returns Promise resolving to published message
|
|
93
|
+
* @throws {HelpChannelError} If validation fails
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* await helpChannel.publishHelpRequest({
|
|
98
|
+
* requestId: 'help-1',
|
|
99
|
+
* requesterId: 'agent-1',
|
|
100
|
+
* capability: 'authentication',
|
|
101
|
+
* description: 'Need help implementing OAuth2 flow',
|
|
102
|
+
* timeout: 60000
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*/ async publishHelpRequest(config) {
|
|
106
|
+
this.validateHelpRequest(config);
|
|
107
|
+
const payload = {
|
|
108
|
+
requestId: config.requestId,
|
|
109
|
+
requesterId: config.requesterId,
|
|
110
|
+
capability: config.capability,
|
|
111
|
+
description: config.description,
|
|
112
|
+
blockedTaskId: config.blockedTaskId,
|
|
113
|
+
timeout: config.timeout,
|
|
114
|
+
timestamp: Date.now(),
|
|
115
|
+
metadata: config.metadata
|
|
116
|
+
};
|
|
117
|
+
const topic = `${HelpChannel.REQUEST_TOPIC}.${config.capability}`;
|
|
118
|
+
const messageConfig = {
|
|
119
|
+
topic,
|
|
120
|
+
payload,
|
|
121
|
+
priority: MessagePriority.HIGH,
|
|
122
|
+
senderId: config.requesterId,
|
|
123
|
+
metadata: {
|
|
124
|
+
channel: 'help',
|
|
125
|
+
type: 'request',
|
|
126
|
+
requestId: config.requestId,
|
|
127
|
+
capability: config.capability
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return this.broker.publish(messageConfig);
|
|
131
|
+
}
|
|
132
|
+
// ============================================
|
|
133
|
+
// Publishing - Help Responses
|
|
134
|
+
// ============================================
|
|
135
|
+
/**
|
|
136
|
+
* Publishes a help response.
|
|
137
|
+
*
|
|
138
|
+
* @param config - Help response configuration
|
|
139
|
+
* @returns Promise resolving to published message
|
|
140
|
+
* @throws {HelpChannelError} If validation fails
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* await helpChannel.publishHelpResponse({
|
|
145
|
+
* requestId: 'help-1',
|
|
146
|
+
* helperId: 'agent-2',
|
|
147
|
+
* requesterId: 'agent-1',
|
|
148
|
+
* status: HelpRequestStatus.ACCEPTED,
|
|
149
|
+
* estimatedDuration: 10000,
|
|
150
|
+
* message: 'I can help with OAuth2 implementation'
|
|
151
|
+
* });
|
|
152
|
+
* ```
|
|
153
|
+
*/ async publishHelpResponse(config) {
|
|
154
|
+
this.validateHelpResponse(config);
|
|
155
|
+
const payload = {
|
|
156
|
+
requestId: config.requestId,
|
|
157
|
+
helperId: config.helperId,
|
|
158
|
+
requesterId: config.requesterId,
|
|
159
|
+
status: config.status,
|
|
160
|
+
estimatedDuration: config.estimatedDuration,
|
|
161
|
+
message: config.message,
|
|
162
|
+
timestamp: Date.now(),
|
|
163
|
+
metadata: config.metadata
|
|
164
|
+
};
|
|
165
|
+
const topic = `${HelpChannel.RESPONSE_TOPIC}.${config.requestId}`;
|
|
166
|
+
const messageConfig = {
|
|
167
|
+
topic,
|
|
168
|
+
payload,
|
|
169
|
+
priority: MessagePriority.HIGH,
|
|
170
|
+
senderId: config.helperId,
|
|
171
|
+
recipientId: config.requesterId,
|
|
172
|
+
metadata: {
|
|
173
|
+
channel: 'help',
|
|
174
|
+
type: 'response',
|
|
175
|
+
requestId: config.requestId,
|
|
176
|
+
status: config.status
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
return this.broker.publish(messageConfig);
|
|
180
|
+
}
|
|
181
|
+
// ============================================
|
|
182
|
+
// Publishing - Help Completions
|
|
183
|
+
// ============================================
|
|
184
|
+
/**
|
|
185
|
+
* Publishes a help completion.
|
|
186
|
+
*
|
|
187
|
+
* @param config - Help completion configuration
|
|
188
|
+
* @returns Promise resolving to published message
|
|
189
|
+
* @throws {HelpChannelError} If validation fails
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* await helpChannel.publishHelpCompletion({
|
|
194
|
+
* requestId: 'help-1',
|
|
195
|
+
* helperId: 'agent-2',
|
|
196
|
+
* requesterId: 'agent-1',
|
|
197
|
+
* status: HelpRequestStatus.RESOLVED,
|
|
198
|
+
* result: { implementationCode: '...' },
|
|
199
|
+
* duration: 8500
|
|
200
|
+
* });
|
|
201
|
+
* ```
|
|
202
|
+
*/ async publishHelpCompletion(config) {
|
|
203
|
+
this.validateHelpCompletion(config);
|
|
204
|
+
const payload = {
|
|
205
|
+
requestId: config.requestId,
|
|
206
|
+
helperId: config.helperId,
|
|
207
|
+
requesterId: config.requesterId,
|
|
208
|
+
status: config.status,
|
|
209
|
+
result: config.result,
|
|
210
|
+
duration: config.duration,
|
|
211
|
+
timestamp: Date.now(),
|
|
212
|
+
metadata: config.metadata
|
|
213
|
+
};
|
|
214
|
+
const topic = `${HelpChannel.COMPLETION_TOPIC}.${config.requestId}`;
|
|
215
|
+
const messageConfig = {
|
|
216
|
+
topic,
|
|
217
|
+
payload,
|
|
218
|
+
priority: MessagePriority.NORMAL,
|
|
219
|
+
senderId: config.helperId,
|
|
220
|
+
recipientId: config.requesterId,
|
|
221
|
+
metadata: {
|
|
222
|
+
channel: 'help',
|
|
223
|
+
type: 'completion',
|
|
224
|
+
requestId: config.requestId,
|
|
225
|
+
status: config.status
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
return this.broker.publish(messageConfig);
|
|
229
|
+
}
|
|
230
|
+
// ============================================
|
|
231
|
+
// Subscribing
|
|
232
|
+
// ============================================
|
|
233
|
+
/**
|
|
234
|
+
* Subscribes to help requests for a specific capability.
|
|
235
|
+
*
|
|
236
|
+
* @param capability - Capability to monitor
|
|
237
|
+
* @param handler - Callback function for requests
|
|
238
|
+
* @returns Subscription handle
|
|
239
|
+
*
|
|
240
|
+
* @example
|
|
241
|
+
* ```typescript
|
|
242
|
+
* const sub = await helpChannel.subscribeToCapability('authentication', async (payload) => {
|
|
243
|
+
* console.log(`Help needed for auth: ${payload.description}`);
|
|
244
|
+
* });
|
|
245
|
+
* ```
|
|
246
|
+
*/ async subscribeToCapability(capability, handler) {
|
|
247
|
+
this.validateCapability(capability);
|
|
248
|
+
return this.broker.subscribe({
|
|
249
|
+
topic: `${HelpChannel.REQUEST_TOPIC}.${capability}`,
|
|
250
|
+
handler: async (message)=>{
|
|
251
|
+
await handler(message.payload);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Subscribes to all help requests.
|
|
257
|
+
*
|
|
258
|
+
* @param handler - Callback function for requests
|
|
259
|
+
* @returns Subscription handle
|
|
260
|
+
*/ async subscribeToAllRequests(handler) {
|
|
261
|
+
return this.broker.subscribe({
|
|
262
|
+
topic: `${HelpChannel.REQUEST_TOPIC}.*`,
|
|
263
|
+
handler: async (message)=>{
|
|
264
|
+
await handler(message.payload);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Subscribes to help responses for a specific request.
|
|
270
|
+
*
|
|
271
|
+
* @param requestId - Request ID to monitor
|
|
272
|
+
* @param handler - Callback function for responses
|
|
273
|
+
* @returns Subscription handle
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* ```typescript
|
|
277
|
+
* const sub = await helpChannel.subscribeToResponses('help-1', async (payload) => {
|
|
278
|
+
* console.log(`Help response: ${payload.status}`);
|
|
279
|
+
* });
|
|
280
|
+
* ```
|
|
281
|
+
*/ async subscribeToResponses(requestId, handler) {
|
|
282
|
+
this.validateId(requestId, 'Request ID');
|
|
283
|
+
return this.broker.subscribe({
|
|
284
|
+
topic: `${HelpChannel.RESPONSE_TOPIC}.${requestId}`,
|
|
285
|
+
handler: async (message)=>{
|
|
286
|
+
await handler(message.payload);
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Subscribes to help completions for a specific request.
|
|
292
|
+
*
|
|
293
|
+
* @param requestId - Request ID to monitor
|
|
294
|
+
* @param handler - Callback function for completions
|
|
295
|
+
* @returns Subscription handle
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```typescript
|
|
299
|
+
* const sub = await helpChannel.subscribeToCompletion('help-1', async (payload) => {
|
|
300
|
+
* console.log(`Help completed: ${payload.status}`);
|
|
301
|
+
* });
|
|
302
|
+
* ```
|
|
303
|
+
*/ async subscribeToCompletion(requestId, handler) {
|
|
304
|
+
this.validateId(requestId, 'Request ID');
|
|
305
|
+
return this.broker.subscribe({
|
|
306
|
+
topic: `${HelpChannel.COMPLETION_TOPIC}.${requestId}`,
|
|
307
|
+
handler: async (message)=>{
|
|
308
|
+
await handler(message.payload);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Subscribes to all help completions.
|
|
314
|
+
*
|
|
315
|
+
* @param handler - Callback function for completions
|
|
316
|
+
* @returns Subscription handle
|
|
317
|
+
*/ async subscribeToAllCompletions(handler) {
|
|
318
|
+
return this.broker.subscribe({
|
|
319
|
+
topic: `${HelpChannel.COMPLETION_TOPIC}.*`,
|
|
320
|
+
handler: async (message)=>{
|
|
321
|
+
await handler(message.payload);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
// ============================================
|
|
326
|
+
// Validation
|
|
327
|
+
// ============================================
|
|
328
|
+
/**
|
|
329
|
+
* Validates help request configuration.
|
|
330
|
+
*/ validateHelpRequest(config) {
|
|
331
|
+
this.validateId(config.requestId, 'Request ID');
|
|
332
|
+
this.validateId(config.requesterId, 'Requester ID');
|
|
333
|
+
this.validateCapability(config.capability);
|
|
334
|
+
if (!config.description || typeof config.description !== 'string') {
|
|
335
|
+
throw new HelpChannelError('Description must be a non-empty string');
|
|
336
|
+
}
|
|
337
|
+
if (config.timeout !== undefined) {
|
|
338
|
+
if (typeof config.timeout !== 'number' || config.timeout <= 0) {
|
|
339
|
+
throw new HelpChannelError('Timeout must be a positive number');
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
if (config.blockedTaskId !== undefined) {
|
|
343
|
+
this.validateId(config.blockedTaskId, 'Blocked task ID');
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Validates help response configuration.
|
|
348
|
+
*/ validateHelpResponse(config) {
|
|
349
|
+
this.validateId(config.requestId, 'Request ID');
|
|
350
|
+
this.validateId(config.helperId, 'Helper ID');
|
|
351
|
+
this.validateId(config.requesterId, 'Requester ID');
|
|
352
|
+
if (!Object.values(HelpRequestStatus).includes(config.status)) {
|
|
353
|
+
throw new HelpChannelError(`Invalid status: ${config.status}`);
|
|
354
|
+
}
|
|
355
|
+
if (config.estimatedDuration !== undefined) {
|
|
356
|
+
if (typeof config.estimatedDuration !== 'number' || config.estimatedDuration < 0) {
|
|
357
|
+
throw new HelpChannelError('Estimated duration must be a non-negative number');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Validates help completion configuration.
|
|
363
|
+
*/ validateHelpCompletion(config) {
|
|
364
|
+
this.validateId(config.requestId, 'Request ID');
|
|
365
|
+
this.validateId(config.helperId, 'Helper ID');
|
|
366
|
+
this.validateId(config.requesterId, 'Requester ID');
|
|
367
|
+
if (!Object.values(HelpRequestStatus).includes(config.status)) {
|
|
368
|
+
throw new HelpChannelError(`Invalid status: ${config.status}`);
|
|
369
|
+
}
|
|
370
|
+
if (config.duration !== undefined) {
|
|
371
|
+
if (typeof config.duration !== 'number' || config.duration < 0) {
|
|
372
|
+
throw new HelpChannelError('Duration must be a non-negative number');
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Validates capability string.
|
|
378
|
+
*/ validateCapability(capability) {
|
|
379
|
+
if (!capability || typeof capability !== 'string') {
|
|
380
|
+
throw new HelpChannelError('Capability must be a non-empty string');
|
|
381
|
+
}
|
|
382
|
+
if (capability.length > 128) {
|
|
383
|
+
throw new HelpChannelError('Capability exceeds 128 characters');
|
|
384
|
+
}
|
|
385
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(capability)) {
|
|
386
|
+
throw new HelpChannelError('Capability must contain only alphanumeric characters, underscores, and hyphens');
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Validates an ID field.
|
|
391
|
+
*/ validateId(id, fieldName) {
|
|
392
|
+
if (!id || typeof id !== 'string') {
|
|
393
|
+
throw new HelpChannelError(`${fieldName} must be a non-empty string`);
|
|
394
|
+
}
|
|
395
|
+
if (id.length > 256) {
|
|
396
|
+
throw new HelpChannelError(`${fieldName} exceeds 256 characters`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// ============================================
|
|
400
|
+
// Utility Methods
|
|
401
|
+
// ============================================
|
|
402
|
+
/**
|
|
403
|
+
* Gets the base topic for all help messages.
|
|
404
|
+
*/ static getBaseTopic() {
|
|
405
|
+
return HelpChannel.BASE_TOPIC;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Gets the topic for help requests.
|
|
409
|
+
*/ static getRequestTopic() {
|
|
410
|
+
return HelpChannel.REQUEST_TOPIC;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Gets the topic for help responses.
|
|
414
|
+
*/ static getResponseTopic() {
|
|
415
|
+
return HelpChannel.RESPONSE_TOPIC;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Gets the topic for help completions.
|
|
419
|
+
*/ static getCompletionTopic() {
|
|
420
|
+
return HelpChannel.COMPLETION_TOPIC;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
//# sourceMappingURL=help-channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/coordination/v2/messaging/channels/help-channel.ts"],"names":["MessagePriority","HelpRequestStatus","HelpChannelError","Error","message","name","HelpChannel","BASE_TOPIC","REQUEST_TOPIC","RESPONSE_TOPIC","COMPLETION_TOPIC","broker","publishHelpRequest","config","validateHelpRequest","payload","requestId","requesterId","capability","description","blockedTaskId","timeout","timestamp","Date","now","metadata","topic","messageConfig","priority","HIGH","senderId","channel","type","publish","publishHelpResponse","validateHelpResponse","helperId","status","estimatedDuration","recipientId","publishHelpCompletion","validateHelpCompletion","result","duration","NORMAL","subscribeToCapability","handler","validateCapability","subscribe","subscribeToAllRequests","subscribeToResponses","validateId","subscribeToCompletion","subscribeToAllCompletions","undefined","Object","values","includes","length","test","id","fieldName","getBaseTopic","getRequestTopic","getResponseTopic","getCompletionTopic"],"mappings":"AAAA;;;;;;;CAOC,GAED,SAAiCA,eAAe,QAAQ,wBAAwB;AAGhF;;CAEC,GACD,OAAO,IAAA,AAAKC,2CAAAA;IACV,+CAA+C;IAG/C,0CAA0C;IAG1C,6BAA6B;IAG7B,wCAAwC;IAGxC,8CAA8C;IAG9C,wCAAwC;WAhB9BA;MAkBX;AA0KD;;CAEC,GACD,OAAO,MAAMC,yBAAyBC;IACpC,YAAYC,OAAe,CAAE;QAC3B,KAAK,CAACA;QACN,IAAI,CAACC,IAAI,GAAG;IACd;AACF;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCC,GACD,OAAO,MAAMC;IACX,qCAAqC,GACrC,OAAwBC,aAAa,OAAO;IAE5C,4BAA4B,GAC5B,OAAwBC,gBAAgB,eAAe;IAEvD,6BAA6B,GAC7B,OAAwBC,iBAAiB,gBAAgB;IAEzD,+BAA+B,GAC/B,OAAwBC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KAAK;YACnB,MAAM,IAAIxD,iBAAiB,GAAG2D,UAAU,uBAAuB,CAAC;QAClE;IACF;IAEA,+CAA+C;IAC/C,kBAAkB;IAClB,+CAA+C;IAE/C;;GAEC,GACD,OAAOC,eAAuB;QAC5B,OAAOxD,YAAYC,UAAU;IAC/B;IAEA;;GAEC,GACD,OAAOwD,kBAA0B;QAC/B,OAAOzD,YAAYE,aAAa;IAClC;IAEA;;GAEC,GACD,OAAOwD,mBAA2B;QAChC,OAAO1D,YAAYG,cAAc;IACnC;IAEA;;GAEC,GACD,OAAOwD,qBAA6B;QAClC,OAAO3D,YAAYI,gBAAgB;IACrC;AACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Coordination V2 - Specialized Channels
|
|
3
|
+
*
|
|
4
|
+
* Export module for all specialized messaging channels.
|
|
5
|
+
*
|
|
6
|
+
* @module coordination/v2/messaging/channels
|
|
7
|
+
*/ // State Channel
|
|
8
|
+
export { StateChannel, StateChannelError } from './state-channel.js';
|
|
9
|
+
// Dependency Channel
|
|
10
|
+
export { DependencyChannel, DependencyChannelError } from './dependency-channel.js';
|
|
11
|
+
// Task Channel
|
|
12
|
+
export { TaskChannel, TaskChannelError, TaskPriority, TaskStatus } from './task-channel.js';
|
|
13
|
+
// Help Channel
|
|
14
|
+
export { HelpChannel, HelpChannelError, HelpRequestStatus } from './help-channel.js';
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../src/coordination/v2/messaging/channels/index.ts"],"names":["StateChannel","StateChannelError","DependencyChannel","DependencyChannelError","TaskChannel","TaskChannelError","TaskPriority","TaskStatus","HelpChannel","HelpChannelError","HelpRequestStatus"],"mappings":"AAAA;;;;;;CAMC,GAED,gBAAgB;AAChB,SACEA,YAAY,EACZC,iBAAiB,QAGZ,qBAAqB;AAE5B,qBAAqB;AACrB,SACEC,iBAAiB,EACjBC,sBAAsB,QAOjB,0BAA0B;AAEjC,eAAe;AACf,SACEC,WAAW,EACXC,gBAAgB,EAChBC,YAAY,EACZC,UAAU,QAOL,oBAAoB;AAE3B,eAAe;AACf,SACEC,WAAW,EACXC,gBAAgB,EAChBC,iBAAiB,QAOZ,oBAAoB"}
|