macro-agent 0.2.4 → 0.2.6
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/LICENSE +1 -1
- package/README.md +30 -56
- package/dist/acp/websocket-server.d.ts +6 -0
- package/dist/acp/websocket-server.d.ts.map +1 -1
- package/dist/acp/websocket-server.js +13 -0
- package/dist/acp/websocket-server.js.map +1 -1
- package/dist/acp/websocket-stream.d.ts +30 -0
- package/dist/acp/websocket-stream.d.ts.map +1 -0
- package/dist/acp/websocket-stream.js +118 -0
- package/dist/acp/websocket-stream.js.map +1 -0
- package/dist/activity/deduplication.d.ts +85 -0
- package/dist/activity/deduplication.d.ts.map +1 -0
- package/dist/activity/deduplication.js +149 -0
- package/dist/activity/deduplication.js.map +1 -0
- package/dist/activity/index.d.ts +16 -0
- package/dist/activity/index.d.ts.map +1 -0
- package/dist/activity/index.js +17 -0
- package/dist/activity/index.js.map +1 -0
- package/dist/activity/relevance.d.ts +81 -0
- package/dist/activity/relevance.d.ts.map +1 -0
- package/dist/activity/relevance.js +161 -0
- package/dist/activity/relevance.js.map +1 -0
- package/dist/activity/types.d.ts +169 -0
- package/dist/activity/types.d.ts.map +1 -0
- package/dist/activity/types.js +33 -0
- package/dist/activity/types.js.map +1 -0
- package/dist/activity/watcher.d.ts +64 -0
- package/dist/activity/watcher.d.ts.map +1 -0
- package/dist/activity/watcher.js +212 -0
- package/dist/activity/watcher.js.map +1 -0
- package/dist/adapters/federation.d.ts +8 -1
- package/dist/adapters/federation.d.ts.map +1 -1
- package/dist/adapters/federation.js +33 -2
- package/dist/adapters/federation.js.map +1 -1
- package/dist/agent/agent-manager-v2.d.ts.map +1 -1
- package/dist/agent/agent-manager-v2.js +189 -67
- package/dist/agent/agent-manager-v2.js.map +1 -1
- package/dist/agent/agent-manager.d.ts +17 -0
- package/dist/agent/agent-manager.d.ts.map +1 -1
- package/dist/agent/agent-manager.js.map +1 -1
- package/dist/agent/types.d.ts +21 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/agent/wake.d.ts +85 -0
- package/dist/agent/wake.d.ts.map +1 -0
- package/dist/agent/wake.js +278 -0
- package/dist/agent/wake.js.map +1 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +41 -25
- package/dist/api/server.js.map +1 -1
- package/dist/api/types.d.ts +6 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/auth/server-auth.d.ts +43 -0
- package/dist/auth/server-auth.d.ts.map +1 -0
- package/dist/auth/server-auth.js +80 -0
- package/dist/auth/server-auth.js.map +1 -0
- package/dist/auth/token.d.ts +4 -0
- package/dist/auth/token.d.ts.map +1 -1
- package/dist/auth/token.js +7 -6
- package/dist/auth/token.js.map +1 -1
- package/dist/boot-v2.d.ts +6 -3
- package/dist/boot-v2.d.ts.map +1 -1
- package/dist/boot-v2.js +44 -25
- package/dist/boot-v2.js.map +1 -1
- package/dist/cognitive/macro-agent-backend.d.ts.map +1 -1
- package/dist/cognitive/macro-agent-backend.js +37 -8
- package/dist/cognitive/macro-agent-backend.js.map +1 -1
- package/dist/cognitive/team-lifecycle.d.ts +82 -0
- package/dist/cognitive/team-lifecycle.d.ts.map +1 -0
- package/dist/cognitive/team-lifecycle.js +121 -0
- package/dist/cognitive/team-lifecycle.js.map +1 -0
- package/dist/cognitive/trajectory-extractor.d.ts +25 -0
- package/dist/cognitive/trajectory-extractor.d.ts.map +1 -0
- package/dist/cognitive/trajectory-extractor.js +134 -0
- package/dist/cognitive/trajectory-extractor.js.map +1 -0
- package/dist/cognitive/types.d.ts +24 -0
- package/dist/cognitive/types.d.ts.map +1 -1
- package/dist/control/control-server.d.ts.map +1 -1
- package/dist/control/control-server.js +10 -0
- package/dist/control/control-server.js.map +1 -1
- package/dist/dispatch/mail-inbound-consumer.d.ts.map +1 -1
- package/dist/dispatch/mail-inbound-consumer.js +43 -10
- package/dist/dispatch/mail-inbound-consumer.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/lifecycle/handlers/generic.d.ts +27 -0
- package/dist/lifecycle/handlers/generic.d.ts.map +1 -0
- package/dist/lifecycle/handlers/generic.js +56 -0
- package/dist/lifecycle/handlers/generic.js.map +1 -0
- package/dist/lifecycle/handlers/index.d.ts +51 -0
- package/dist/lifecycle/handlers/index.d.ts.map +1 -0
- package/dist/lifecycle/handlers/index.js +110 -0
- package/dist/lifecycle/handlers/index.js.map +1 -0
- package/dist/lifecycle/handlers/integrator.d.ts +81 -0
- package/dist/lifecycle/handlers/integrator.d.ts.map +1 -0
- package/dist/lifecycle/handlers/integrator.js +451 -0
- package/dist/lifecycle/handlers/integrator.js.map +1 -0
- package/dist/lifecycle/handlers/monitor.d.ts +29 -0
- package/dist/lifecycle/handlers/monitor.d.ts.map +1 -0
- package/dist/lifecycle/handlers/monitor.js +79 -0
- package/dist/lifecycle/handlers/monitor.js.map +1 -0
- package/dist/lifecycle/handlers/worker.d.ts +56 -0
- package/dist/lifecycle/handlers/worker.d.ts.map +1 -0
- package/dist/lifecycle/handlers/worker.js +381 -0
- package/dist/lifecycle/handlers/worker.js.map +1 -0
- package/dist/lifecycle/handlers-v2.d.ts +0 -2
- package/dist/lifecycle/handlers-v2.d.ts.map +1 -1
- package/dist/lifecycle/handlers-v2.js +4 -55
- package/dist/lifecycle/handlers-v2.js.map +1 -1
- package/dist/mail/conversation-map.d.ts +33 -0
- package/dist/mail/conversation-map.d.ts.map +1 -0
- package/dist/mail/conversation-map.js +61 -0
- package/dist/mail/conversation-map.js.map +1 -0
- package/dist/mail/index.d.ts +11 -0
- package/dist/mail/index.d.ts.map +1 -0
- package/dist/mail/index.js +11 -0
- package/dist/mail/index.js.map +1 -0
- package/dist/mail/mail-service.d.ts +85 -0
- package/dist/mail/mail-service.d.ts.map +1 -0
- package/dist/mail/mail-service.js +121 -0
- package/dist/mail/mail-service.js.map +1 -0
- package/dist/mail/stores/eventstore-conversation-store.d.ts +40 -0
- package/dist/mail/stores/eventstore-conversation-store.d.ts.map +1 -0
- package/dist/mail/stores/eventstore-conversation-store.js +131 -0
- package/dist/mail/stores/eventstore-conversation-store.js.map +1 -0
- package/dist/mail/stores/eventstore-participant-store.d.ts +43 -0
- package/dist/mail/stores/eventstore-participant-store.d.ts.map +1 -0
- package/dist/mail/stores/eventstore-participant-store.js +145 -0
- package/dist/mail/stores/eventstore-participant-store.js.map +1 -0
- package/dist/mail/stores/eventstore-thread-store.d.ts +46 -0
- package/dist/mail/stores/eventstore-thread-store.d.ts.map +1 -0
- package/dist/mail/stores/eventstore-thread-store.js +118 -0
- package/dist/mail/stores/eventstore-thread-store.js.map +1 -0
- package/dist/mail/stores/eventstore-turn-store.d.ts +47 -0
- package/dist/mail/stores/eventstore-turn-store.d.ts.map +1 -0
- package/dist/mail/stores/eventstore-turn-store.js +153 -0
- package/dist/mail/stores/eventstore-turn-store.js.map +1 -0
- package/dist/mail/stores/index.d.ts +12 -0
- package/dist/mail/stores/index.d.ts.map +1 -0
- package/dist/mail/stores/index.js +12 -0
- package/dist/mail/stores/index.js.map +1 -0
- package/dist/mail/stores/types.d.ts +146 -0
- package/dist/mail/stores/types.d.ts.map +1 -0
- package/dist/mail/stores/types.js +13 -0
- package/dist/mail/stores/types.js.map +1 -0
- package/dist/mail/turn-recorder.d.ts +30 -0
- package/dist/mail/turn-recorder.d.ts.map +1 -0
- package/dist/mail/turn-recorder.js +98 -0
- package/dist/mail/turn-recorder.js.map +1 -0
- package/dist/map/adapter/acp-over-map.d.ts +115 -0
- package/dist/map/adapter/acp-over-map.d.ts.map +1 -0
- package/dist/map/adapter/acp-over-map.js +1024 -0
- package/dist/map/adapter/acp-over-map.js.map +1 -0
- package/dist/map/adapter/connection-manager.d.ts +150 -0
- package/dist/map/adapter/connection-manager.d.ts.map +1 -0
- package/dist/map/adapter/connection-manager.js +207 -0
- package/dist/map/adapter/connection-manager.js.map +1 -0
- package/dist/map/adapter/event-log.d.ts +87 -0
- package/dist/map/adapter/event-log.d.ts.map +1 -0
- package/dist/map/adapter/event-log.js +122 -0
- package/dist/map/adapter/event-log.js.map +1 -0
- package/dist/map/adapter/event-translator.d.ts +85 -0
- package/dist/map/adapter/event-translator.d.ts.map +1 -0
- package/dist/map/adapter/event-translator.js +295 -0
- package/dist/map/adapter/event-translator.js.map +1 -0
- package/dist/map/adapter/extensions/agent-detection.d.ts +49 -0
- package/dist/map/adapter/extensions/agent-detection.d.ts.map +1 -0
- package/dist/map/adapter/extensions/agent-detection.js +91 -0
- package/dist/map/adapter/extensions/agent-detection.js.map +1 -0
- package/dist/map/adapter/extensions/agent-lifecycle.d.ts +82 -0
- package/dist/map/adapter/extensions/agent-lifecycle.d.ts.map +1 -0
- package/dist/map/adapter/extensions/agent-lifecycle.js +164 -0
- package/dist/map/adapter/extensions/agent-lifecycle.js.map +1 -0
- package/dist/map/adapter/extensions/cognitive.d.ts +27 -0
- package/dist/map/adapter/extensions/cognitive.d.ts.map +1 -0
- package/dist/map/adapter/extensions/cognitive.js +158 -0
- package/dist/map/adapter/extensions/cognitive.js.map +1 -0
- package/dist/map/adapter/extensions/index.d.ts +95 -0
- package/dist/map/adapter/extensions/index.d.ts.map +1 -0
- package/dist/map/adapter/extensions/index.js +228 -0
- package/dist/map/adapter/extensions/index.js.map +1 -0
- package/dist/map/adapter/extensions/mcp-bridge.d.ts +57 -0
- package/dist/map/adapter/extensions/mcp-bridge.d.ts.map +1 -0
- package/dist/map/adapter/extensions/mcp-bridge.js +745 -0
- package/dist/map/adapter/extensions/mcp-bridge.js.map +1 -0
- package/dist/map/adapter/extensions/resume.d.ts +47 -0
- package/dist/map/adapter/extensions/resume.d.ts.map +1 -0
- package/dist/map/adapter/extensions/resume.js +59 -0
- package/dist/map/adapter/extensions/resume.js.map +1 -0
- package/dist/map/adapter/extensions/streams.d.ts +95 -0
- package/dist/map/adapter/extensions/streams.d.ts.map +1 -0
- package/dist/map/adapter/extensions/streams.js +515 -0
- package/dist/map/adapter/extensions/streams.js.map +1 -0
- package/dist/map/adapter/extensions/task.d.ts +40 -0
- package/dist/map/adapter/extensions/task.d.ts.map +1 -0
- package/dist/map/adapter/extensions/task.js +197 -0
- package/dist/map/adapter/extensions/task.js.map +1 -0
- package/dist/map/adapter/extensions/update-metadata.d.ts +29 -0
- package/dist/map/adapter/extensions/update-metadata.d.ts.map +1 -0
- package/dist/map/adapter/extensions/update-metadata.js +67 -0
- package/dist/map/adapter/extensions/update-metadata.js.map +1 -0
- package/dist/map/adapter/extensions/wake.d.ts +60 -0
- package/dist/map/adapter/extensions/wake.d.ts.map +1 -0
- package/dist/map/adapter/extensions/wake.js +144 -0
- package/dist/map/adapter/extensions/wake.js.map +1 -0
- package/dist/map/adapter/extensions/workspace-files.d.ts +42 -0
- package/dist/map/adapter/extensions/workspace-files.d.ts.map +1 -0
- package/dist/map/adapter/extensions/workspace-files.js +338 -0
- package/dist/map/adapter/extensions/workspace-files.js.map +1 -0
- package/dist/map/adapter/extensions/workspace.d.ts +57 -0
- package/dist/map/adapter/extensions/workspace.d.ts.map +1 -0
- package/dist/map/adapter/extensions/workspace.js +81 -0
- package/dist/map/adapter/extensions/workspace.js.map +1 -0
- package/dist/map/adapter/index.d.ts +20 -0
- package/dist/map/adapter/index.d.ts.map +1 -0
- package/dist/map/adapter/index.js +40 -0
- package/dist/map/adapter/index.js.map +1 -0
- package/dist/map/adapter/interface.d.ts +450 -0
- package/dist/map/adapter/interface.d.ts.map +1 -0
- package/dist/map/adapter/interface.js +24 -0
- package/dist/map/adapter/interface.js.map +1 -0
- package/dist/map/adapter/mail-handler-adapter.d.ts +27 -0
- package/dist/map/adapter/mail-handler-adapter.d.ts.map +1 -0
- package/dist/map/adapter/mail-handler-adapter.js +292 -0
- package/dist/map/adapter/mail-handler-adapter.js.map +1 -0
- package/dist/map/adapter/map-adapter.d.ts +200 -0
- package/dist/map/adapter/map-adapter.d.ts.map +1 -0
- package/dist/map/adapter/map-adapter.js +1199 -0
- package/dist/map/adapter/map-adapter.js.map +1 -0
- package/dist/map/adapter/rpc-handler.d.ts +263 -0
- package/dist/map/adapter/rpc-handler.d.ts.map +1 -0
- package/dist/map/adapter/rpc-handler.js +365 -0
- package/dist/map/adapter/rpc-handler.js.map +1 -0
- package/dist/map/adapter/subscription-manager.d.ts +174 -0
- package/dist/map/adapter/subscription-manager.d.ts.map +1 -0
- package/dist/map/adapter/subscription-manager.js +248 -0
- package/dist/map/adapter/subscription-manager.js.map +1 -0
- package/dist/map/adapter/types.d.ts +194 -0
- package/dist/map/adapter/types.d.ts.map +1 -0
- package/dist/map/adapter/types.js +27 -0
- package/dist/map/adapter/types.js.map +1 -0
- package/dist/map/adapter/websocket-integration.d.ts +113 -0
- package/dist/map/adapter/websocket-integration.d.ts.map +1 -0
- package/dist/map/adapter/websocket-integration.js +134 -0
- package/dist/map/adapter/websocket-integration.js.map +1 -0
- package/dist/map/cascade-action-handler.d.ts.map +1 -1
- package/dist/map/cascade-action-handler.js +19 -5
- package/dist/map/cascade-action-handler.js.map +1 -1
- package/dist/map/federation/envelope.d.ts +98 -0
- package/dist/map/federation/envelope.d.ts.map +1 -0
- package/dist/map/federation/envelope.js +160 -0
- package/dist/map/federation/envelope.js.map +1 -0
- package/dist/map/federation/federation-handler.d.ts +50 -0
- package/dist/map/federation/federation-handler.d.ts.map +1 -0
- package/dist/map/federation/federation-handler.js +306 -0
- package/dist/map/federation/federation-handler.js.map +1 -0
- package/dist/map/federation/index.d.ts +14 -0
- package/dist/map/federation/index.d.ts.map +1 -0
- package/dist/map/federation/index.js +13 -0
- package/dist/map/federation/index.js.map +1 -0
- package/dist/map/federation/types.d.ts +239 -0
- package/dist/map/federation/types.d.ts.map +1 -0
- package/dist/map/federation/types.js +23 -0
- package/dist/map/federation/types.js.map +1 -0
- package/dist/map/mail-bridge.d.ts +7 -0
- package/dist/map/mail-bridge.d.ts.map +1 -1
- package/dist/map/mail-bridge.js +39 -9
- package/dist/map/mail-bridge.js.map +1 -1
- package/dist/map/server.d.ts.map +1 -1
- package/dist/map/server.js +17 -2
- package/dist/map/server.js.map +1 -1
- package/dist/map/types.d.ts +6 -0
- package/dist/map/types.d.ts.map +1 -1
- package/dist/mcp/map-client.d.ts +39 -0
- package/dist/mcp/map-client.d.ts.map +1 -0
- package/dist/mcp/map-client.js +129 -0
- package/dist/mcp/map-client.js.map +1 -0
- package/dist/mcp/mcp-server.d.ts +72 -0
- package/dist/mcp/mcp-server.d.ts.map +1 -0
- package/dist/mcp/mcp-server.js +1027 -0
- package/dist/mcp/mcp-server.js.map +1 -0
- package/dist/mcp/tools/claim_task.d.ts +35 -0
- package/dist/mcp/tools/claim_task.d.ts.map +1 -0
- package/dist/mcp/tools/claim_task.js +58 -0
- package/dist/mcp/tools/claim_task.js.map +1 -0
- package/dist/mcp/tools/done-v2.d.ts +0 -1
- package/dist/mcp/tools/done-v2.d.ts.map +1 -1
- package/dist/mcp/tools/done-v2.js +0 -1
- package/dist/mcp/tools/done-v2.js.map +1 -1
- package/dist/mcp/tools/done.d.ts +102 -0
- package/dist/mcp/tools/done.d.ts.map +1 -0
- package/dist/mcp/tools/done.js +253 -0
- package/dist/mcp/tools/done.js.map +1 -0
- package/dist/mcp/tools/inject_context.d.ts +61 -0
- package/dist/mcp/tools/inject_context.d.ts.map +1 -0
- package/dist/mcp/tools/inject_context.js +123 -0
- package/dist/mcp/tools/inject_context.js.map +1 -0
- package/dist/mcp/tools/list_claimable_tasks.d.ts +38 -0
- package/dist/mcp/tools/list_claimable_tasks.d.ts.map +1 -0
- package/dist/mcp/tools/list_claimable_tasks.js +63 -0
- package/dist/mcp/tools/list_claimable_tasks.js.map +1 -0
- package/dist/mcp/tools/unclaim_task.d.ts +31 -0
- package/dist/mcp/tools/unclaim_task.d.ts.map +1 -0
- package/dist/mcp/tools/unclaim_task.js +47 -0
- package/dist/mcp/tools/unclaim_task.js.map +1 -0
- package/dist/mcp/tools/wait_for_activity.d.ts +60 -0
- package/dist/mcp/tools/wait_for_activity.d.ts.map +1 -0
- package/dist/mcp/tools/wait_for_activity.js +135 -0
- package/dist/mcp/tools/wait_for_activity.js.map +1 -0
- package/dist/monitor/health-check-service.d.ts +143 -0
- package/dist/monitor/health-check-service.d.ts.map +1 -0
- package/dist/monitor/health-check-service.js +240 -0
- package/dist/monitor/health-check-service.js.map +1 -0
- package/dist/monitor/index.d.ts +14 -0
- package/dist/monitor/index.d.ts.map +1 -0
- package/dist/monitor/index.js +14 -0
- package/dist/monitor/index.js.map +1 -0
- package/dist/monitor/stall-detector.d.ts +109 -0
- package/dist/monitor/stall-detector.d.ts.map +1 -0
- package/dist/monitor/stall-detector.js +152 -0
- package/dist/monitor/stall-detector.js.map +1 -0
- package/dist/peer/capability-manager.d.ts +56 -0
- package/dist/peer/capability-manager.d.ts.map +1 -0
- package/dist/peer/capability-manager.js +186 -0
- package/dist/peer/capability-manager.js.map +1 -0
- package/dist/peer/encapsulation-manager.d.ts +190 -0
- package/dist/peer/encapsulation-manager.d.ts.map +1 -0
- package/dist/peer/encapsulation-manager.js +486 -0
- package/dist/peer/encapsulation-manager.js.map +1 -0
- package/dist/peer/federation-manager.d.ts +223 -0
- package/dist/peer/federation-manager.d.ts.map +1 -0
- package/dist/peer/federation-manager.js +528 -0
- package/dist/peer/federation-manager.js.map +1 -0
- package/dist/peer/hierarchy-errors.d.ts +208 -0
- package/dist/peer/hierarchy-errors.d.ts.map +1 -0
- package/dist/peer/hierarchy-errors.js +268 -0
- package/dist/peer/hierarchy-errors.js.map +1 -0
- package/dist/peer/hierarchy-protocol.d.ts +159 -0
- package/dist/peer/hierarchy-protocol.d.ts.map +1 -0
- package/dist/peer/hierarchy-protocol.js +142 -0
- package/dist/peer/hierarchy-protocol.js.map +1 -0
- package/dist/peer/index.d.ts +15 -0
- package/dist/peer/index.d.ts.map +1 -0
- package/dist/peer/index.js +15 -0
- package/dist/peer/index.js.map +1 -0
- package/dist/peer/peer-manager.d.ts +99 -0
- package/dist/peer/peer-manager.d.ts.map +1 -0
- package/dist/peer/peer-manager.js +333 -0
- package/dist/peer/peer-manager.js.map +1 -0
- package/dist/peer/task-delegation.d.ts +189 -0
- package/dist/peer/task-delegation.d.ts.map +1 -0
- package/dist/peer/task-delegation.js +303 -0
- package/dist/peer/task-delegation.js.map +1 -0
- package/dist/peer/transports/index.d.ts +8 -0
- package/dist/peer/transports/index.d.ts.map +1 -0
- package/dist/peer/transports/index.js +8 -0
- package/dist/peer/transports/index.js.map +1 -0
- package/dist/peer/transports/local-transport.d.ts +56 -0
- package/dist/peer/transports/local-transport.d.ts.map +1 -0
- package/dist/peer/transports/local-transport.js +263 -0
- package/dist/peer/transports/local-transport.js.map +1 -0
- package/dist/peer/transports/websocket-transport.d.ts +86 -0
- package/dist/peer/transports/websocket-transport.d.ts.map +1 -0
- package/dist/peer/transports/websocket-transport.js +338 -0
- package/dist/peer/transports/websocket-transport.js.map +1 -0
- package/dist/peer/types.d.ts +268 -0
- package/dist/peer/types.d.ts.map +1 -0
- package/dist/peer/types.js +36 -0
- package/dist/peer/types.js.map +1 -0
- package/dist/router/address-resolver.d.ts +102 -0
- package/dist/router/address-resolver.d.ts.map +1 -0
- package/dist/router/address-resolver.js +198 -0
- package/dist/router/address-resolver.js.map +1 -0
- package/dist/router/broadcast.d.ts +53 -0
- package/dist/router/broadcast.d.ts.map +1 -0
- package/dist/router/broadcast.js +75 -0
- package/dist/router/broadcast.js.map +1 -0
- package/dist/router/channels.d.ts +148 -0
- package/dist/router/channels.d.ts.map +1 -0
- package/dist/router/channels.js +126 -0
- package/dist/router/channels.js.map +1 -0
- package/dist/router/index.d.ts +21 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +18 -0
- package/dist/router/index.js.map +1 -0
- package/dist/router/message-router.d.ts +197 -0
- package/dist/router/message-router.d.ts.map +1 -0
- package/dist/router/message-router.js +903 -0
- package/dist/router/message-router.js.map +1 -0
- package/dist/router/message-types.d.ts +183 -0
- package/dist/router/message-types.d.ts.map +1 -0
- package/dist/router/message-types.js +79 -0
- package/dist/router/message-types.js.map +1 -0
- package/dist/router/role-resolver.d.ts +67 -0
- package/dist/router/role-resolver.d.ts.map +1 -0
- package/dist/router/role-resolver.js +106 -0
- package/dist/router/role-resolver.js.map +1 -0
- package/dist/router/signals.d.ts +253 -0
- package/dist/router/signals.d.ts.map +1 -0
- package/dist/router/signals.js +53 -0
- package/dist/router/signals.js.map +1 -0
- package/dist/router/types.d.ts +191 -0
- package/dist/router/types.d.ts.map +1 -0
- package/dist/router/types.js +34 -0
- package/dist/router/types.js.map +1 -0
- package/dist/router/wake.d.ts +111 -0
- package/dist/router/wake.d.ts.map +1 -0
- package/dist/router/wake.js +180 -0
- package/dist/router/wake.js.map +1 -0
- package/dist/server/combined-server.d.ts +95 -0
- package/dist/server/combined-server.d.ts.map +1 -0
- package/dist/server/combined-server.js +335 -0
- package/dist/server/combined-server.js.map +1 -0
- package/dist/steering/index.d.ts +11 -0
- package/dist/steering/index.d.ts.map +1 -0
- package/dist/steering/index.js +11 -0
- package/dist/steering/index.js.map +1 -0
- package/dist/steering/inject.d.ts +39 -0
- package/dist/steering/inject.d.ts.map +1 -0
- package/dist/steering/inject.js +197 -0
- package/dist/steering/inject.js.map +1 -0
- package/dist/steering/types.d.ts +100 -0
- package/dist/steering/types.d.ts.map +1 -0
- package/dist/steering/types.js +11 -0
- package/dist/steering/types.js.map +1 -0
- package/dist/store/backends/index.d.ts +11 -0
- package/dist/store/backends/index.d.ts.map +1 -0
- package/dist/store/backends/index.js +15 -0
- package/dist/store/backends/index.js.map +1 -0
- package/dist/store/backends/json-backend.d.ts +23 -0
- package/dist/store/backends/json-backend.d.ts.map +1 -0
- package/dist/store/backends/json-backend.js +220 -0
- package/dist/store/backends/json-backend.js.map +1 -0
- package/dist/store/backends/memory-backend.d.ts +12 -0
- package/dist/store/backends/memory-backend.d.ts.map +1 -0
- package/dist/store/backends/memory-backend.js +205 -0
- package/dist/store/backends/memory-backend.js.map +1 -0
- package/dist/store/backends/sqlite-backend.d.ts +27 -0
- package/dist/store/backends/sqlite-backend.d.ts.map +1 -0
- package/dist/store/backends/sqlite-backend.js +231 -0
- package/dist/store/backends/sqlite-backend.js.map +1 -0
- package/dist/store/backends/tinybase-backend.d.ts +22 -0
- package/dist/store/backends/tinybase-backend.d.ts.map +1 -0
- package/dist/store/backends/tinybase-backend.js +203 -0
- package/dist/store/backends/tinybase-backend.js.map +1 -0
- package/dist/store/backends/types.d.ts +175 -0
- package/dist/store/backends/types.d.ts.map +1 -0
- package/dist/store/backends/types.js +28 -0
- package/dist/store/backends/types.js.map +1 -0
- package/dist/store/event-store.d.ts +128 -0
- package/dist/store/event-store.d.ts.map +1 -0
- package/dist/store/event-store.js +1751 -0
- package/dist/store/event-store.js.map +1 -0
- package/dist/store/instance.d.ts +290 -0
- package/dist/store/instance.d.ts.map +1 -0
- package/dist/store/instance.js +363 -0
- package/dist/store/instance.js.map +1 -0
- package/dist/store/migrations.d.ts +41 -0
- package/dist/store/migrations.d.ts.map +1 -0
- package/dist/store/migrations.js +79 -0
- package/dist/store/migrations.js.map +1 -0
- package/dist/store/test-utils.d.ts +63 -0
- package/dist/store/test-utils.d.ts.map +1 -0
- package/dist/store/test-utils.js +63 -0
- package/dist/store/test-utils.js.map +1 -0
- package/dist/store/types/config.d.ts +16 -0
- package/dist/store/types/config.d.ts.map +1 -0
- package/dist/store/types/config.js +8 -0
- package/dist/store/types/config.js.map +1 -0
- package/dist/store/types/conversations.d.ts +91 -0
- package/dist/store/types/conversations.d.ts.map +1 -0
- package/dist/store/types/conversations.js +8 -0
- package/dist/store/types/conversations.js.map +1 -0
- package/dist/store/types/sessions.d.ts +44 -0
- package/dist/store/types/sessions.d.ts.map +1 -0
- package/dist/store/types/sessions.js +9 -0
- package/dist/store/types/sessions.js.map +1 -0
- package/dist/store/types.d.ts +115 -0
- package/dist/store/types.d.ts.map +1 -0
- package/dist/store/types.js +6 -0
- package/dist/store/types.js.map +1 -0
- package/dist/task/backend/index.d.ts +93 -0
- package/dist/task/backend/index.d.ts.map +1 -0
- package/dist/task/backend/index.js +178 -0
- package/dist/task/backend/index.js.map +1 -0
- package/dist/task/backend/memory.d.ts +70 -0
- package/dist/task/backend/memory.d.ts.map +1 -0
- package/dist/task/backend/memory.js +621 -0
- package/dist/task/backend/memory.js.map +1 -0
- package/dist/task/backend/opentasks/backend.d.ts +140 -0
- package/dist/task/backend/opentasks/backend.d.ts.map +1 -0
- package/dist/task/backend/opentasks/backend.js +1023 -0
- package/dist/task/backend/opentasks/backend.js.map +1 -0
- package/dist/task/backend/opentasks/client.d.ts +337 -0
- package/dist/task/backend/opentasks/client.d.ts.map +1 -0
- package/dist/task/backend/opentasks/client.js +225 -0
- package/dist/task/backend/opentasks/client.js.map +1 -0
- package/dist/task/backend/opentasks/daemon-manager.d.ts +89 -0
- package/dist/task/backend/opentasks/daemon-manager.d.ts.map +1 -0
- package/dist/task/backend/opentasks/daemon-manager.js +195 -0
- package/dist/task/backend/opentasks/daemon-manager.js.map +1 -0
- package/dist/task/backend/opentasks/index.d.ts +21 -0
- package/dist/task/backend/opentasks/index.d.ts.map +1 -0
- package/dist/task/backend/opentasks/index.js +21 -0
- package/dist/task/backend/opentasks/index.js.map +1 -0
- package/dist/task/backend/opentasks/mapping.d.ts +48 -0
- package/dist/task/backend/opentasks/mapping.d.ts.map +1 -0
- package/dist/task/backend/opentasks/mapping.js +77 -0
- package/dist/task/backend/opentasks/mapping.js.map +1 -0
- package/dist/task/backend/sudocode/__tests__/integration/test-utils.d.ts +54 -0
- package/dist/task/backend/sudocode/__tests__/integration/test-utils.d.ts.map +1 -0
- package/dist/task/backend/sudocode/__tests__/integration/test-utils.js +88 -0
- package/dist/task/backend/sudocode/__tests__/integration/test-utils.js.map +1 -0
- package/dist/task/backend/sudocode/backend.d.ts +155 -0
- package/dist/task/backend/sudocode/backend.d.ts.map +1 -0
- package/dist/task/backend/sudocode/backend.js +942 -0
- package/dist/task/backend/sudocode/backend.js.map +1 -0
- package/dist/task/backend/sudocode/client.d.ts +303 -0
- package/dist/task/backend/sudocode/client.d.ts.map +1 -0
- package/dist/task/backend/sudocode/client.js +101 -0
- package/dist/task/backend/sudocode/client.js.map +1 -0
- package/dist/task/backend/sudocode/index.d.ts +19 -0
- package/dist/task/backend/sudocode/index.d.ts.map +1 -0
- package/dist/task/backend/sudocode/index.js +17 -0
- package/dist/task/backend/sudocode/index.js.map +1 -0
- package/dist/task/backend/sudocode/mapping.d.ts +51 -0
- package/dist/task/backend/sudocode/mapping.d.ts.map +1 -0
- package/dist/task/backend/sudocode/mapping.js +86 -0
- package/dist/task/backend/sudocode/mapping.js.map +1 -0
- package/dist/task/backend/sudocode/server-client.d.ts +56 -0
- package/dist/task/backend/sudocode/server-client.d.ts.map +1 -0
- package/dist/task/backend/sudocode/server-client.js +367 -0
- package/dist/task/backend/sudocode/server-client.js.map +1 -0
- package/dist/task/backend/sudocode/standalone-client.d.ts +91 -0
- package/dist/task/backend/sudocode/standalone-client.d.ts.map +1 -0
- package/dist/task/backend/sudocode/standalone-client.js +476 -0
- package/dist/task/backend/sudocode/standalone-client.js.map +1 -0
- package/dist/task/backend/sudocode/sync-policy.d.ts +166 -0
- package/dist/task/backend/sudocode/sync-policy.d.ts.map +1 -0
- package/dist/task/backend/sudocode/sync-policy.js +221 -0
- package/dist/task/backend/sudocode/sync-policy.js.map +1 -0
- package/dist/task/backend/sudocode/tools.d.ts +87 -0
- package/dist/task/backend/sudocode/tools.d.ts.map +1 -0
- package/dist/task/backend/sudocode/tools.js +743 -0
- package/dist/task/backend/sudocode/tools.js.map +1 -0
- package/dist/task/backend/tool-provider.d.ts +56 -0
- package/dist/task/backend/tool-provider.d.ts.map +1 -0
- package/dist/task/backend/tool-provider.js +424 -0
- package/dist/task/backend/tool-provider.js.map +1 -0
- package/dist/task/backend/types.d.ts +297 -0
- package/dist/task/backend/types.d.ts.map +1 -0
- package/dist/task/backend/types.js +27 -0
- package/dist/task/backend/types.js.map +1 -0
- package/dist/task/backend/unified-tool-provider.d.ts +57 -0
- package/dist/task/backend/unified-tool-provider.d.ts.map +1 -0
- package/dist/task/backend/unified-tool-provider.js +623 -0
- package/dist/task/backend/unified-tool-provider.js.map +1 -0
- package/dist/task/index.d.ts +7 -0
- package/dist/task/index.d.ts.map +1 -0
- package/dist/task/index.js +7 -0
- package/dist/task/index.js.map +1 -0
- package/dist/task/retry-policy.d.ts +89 -0
- package/dist/task/retry-policy.d.ts.map +1 -0
- package/dist/task/retry-policy.js +160 -0
- package/dist/task/retry-policy.js.map +1 -0
- package/dist/task/task-manager.d.ts +70 -0
- package/dist/task/task-manager.d.ts.map +1 -0
- package/dist/task/task-manager.js +319 -0
- package/dist/task/task-manager.js.map +1 -0
- package/dist/task/types.d.ts +72 -0
- package/dist/task/types.d.ts.map +1 -0
- package/dist/task/types.js +33 -0
- package/dist/task/types.js.map +1 -0
- package/dist/teams/team-loader.d.ts +2 -1
- package/dist/teams/team-loader.d.ts.map +1 -1
- package/dist/teams/team-loader.js +2 -1
- package/dist/teams/team-loader.js.map +1 -1
- package/dist/teams/team-manager.d.ts +101 -0
- package/dist/teams/team-manager.d.ts.map +1 -0
- package/dist/teams/team-manager.js +260 -0
- package/dist/teams/team-manager.js.map +1 -0
- package/dist/teams/team-runtime-v2.d.ts +0 -3
- package/dist/teams/team-runtime-v2.d.ts.map +1 -1
- package/dist/teams/team-runtime-v2.js +31 -93
- package/dist/teams/team-runtime-v2.js.map +1 -1
- package/dist/teams/team-runtime.d.ts +245 -0
- package/dist/teams/team-runtime.d.ts.map +1 -0
- package/dist/teams/team-runtime.js +1023 -0
- package/dist/teams/team-runtime.js.map +1 -0
- package/dist/trigger/router/index.d.ts +11 -0
- package/dist/trigger/router/index.d.ts.map +1 -0
- package/dist/trigger/router/index.js +10 -0
- package/dist/trigger/router/index.js.map +1 -0
- package/dist/trigger/router/strategies/ai-router-strategy.d.ts +34 -0
- package/dist/trigger/router/strategies/ai-router-strategy.d.ts.map +1 -0
- package/dist/trigger/router/strategies/ai-router-strategy.js +359 -0
- package/dist/trigger/router/strategies/ai-router-strategy.js.map +1 -0
- package/dist/trigger/router/strategies/direct-strategy.d.ts +32 -0
- package/dist/trigger/router/strategies/direct-strategy.d.ts.map +1 -0
- package/dist/trigger/router/strategies/direct-strategy.js +119 -0
- package/dist/trigger/router/strategies/direct-strategy.js.map +1 -0
- package/dist/trigger/router/strategies/index.d.ts +11 -0
- package/dist/trigger/router/strategies/index.d.ts.map +1 -0
- package/dist/trigger/router/strategies/index.js +11 -0
- package/dist/trigger/router/strategies/index.js.map +1 -0
- package/dist/trigger/router/strategies/role-strategy.d.ts +39 -0
- package/dist/trigger/router/strategies/role-strategy.d.ts.map +1 -0
- package/dist/trigger/router/strategies/role-strategy.js +207 -0
- package/dist/trigger/router/strategies/role-strategy.js.map +1 -0
- package/dist/trigger/router/trigger-router.d.ts +54 -0
- package/dist/trigger/router/trigger-router.d.ts.map +1 -0
- package/dist/trigger/router/trigger-router.js +362 -0
- package/dist/trigger/router/trigger-router.js.map +1 -0
- package/dist/trigger/router/types.d.ts +225 -0
- package/dist/trigger/router/types.d.ts.map +1 -0
- package/dist/trigger/router/types.js +10 -0
- package/dist/trigger/router/types.js.map +1 -0
- package/dist/trigger/sources/cron/cron-service.d.ts.map +1 -1
- package/dist/trigger/sources/cron/cron-service.js +6 -3
- package/dist/trigger/sources/cron/cron-service.js.map +1 -1
- package/dist/trigger/trigger-system.d.ts +77 -0
- package/dist/trigger/trigger-system.d.ts.map +1 -0
- package/dist/trigger/trigger-system.js +84 -0
- package/dist/trigger/trigger-system.js.map +1 -0
- package/dist/util/git-safety.d.ts +33 -0
- package/dist/util/git-safety.d.ts.map +1 -0
- package/dist/util/git-safety.js +94 -0
- package/dist/util/git-safety.js.map +1 -0
- package/dist/workspace/index.d.ts +0 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +0 -2
- package/dist/workspace/index.js.map +1 -1
- package/dist/workspace/landing/direct-push.d.ts.map +1 -1
- package/dist/workspace/landing/direct-push.js +22 -7
- package/dist/workspace/landing/direct-push.js.map +1 -1
- package/dist/workspace/landing/queue-to-branch.d.ts.map +1 -1
- package/dist/workspace/landing/queue-to-branch.js +1 -3
- package/dist/workspace/landing/queue-to-branch.js.map +1 -1
- package/dist/workspace/types.d.ts +0 -13
- package/dist/workspace/types.d.ts.map +1 -1
- package/dist/workspace/workspace-manager.d.ts +0 -11
- package/dist/workspace/workspace-manager.d.ts.map +1 -1
- package/dist/workspace/workspace-manager.js +0 -30
- package/dist/workspace/workspace-manager.js.map +1 -1
- package/package.json +28 -2
- package/templates/teams/self-driving/prompts/grinder.md +1 -0
- package/templates/teams/self-driving/prompts/judge.md +1 -0
- package/templates/teams/self-driving/prompts/planner.md +1 -0
- package/templates/teams/self-driving/roles/grinder.yaml +15 -0
- package/templates/teams/self-driving/roles/judge.yaml +10 -0
- package/templates/teams/self-driving/roles/planner.yaml +16 -0
- package/.claude/commands/openspec/apply.md +0 -23
- package/.claude/commands/openspec/archive.md +0 -27
- package/.claude/commands/openspec/proposal.md +0 -28
- package/.claude/settings.json +0 -133
- package/.gitattributes +0 -3
- package/.opentasks/config.json +0 -9
- package/.opentasks/graph.jsonl +0 -0
- package/.sessionlog/settings.json +0 -4
- package/.sudocode/issues.jsonl +0 -183
- package/.sudocode/specs.jsonl +0 -56
- package/AGENTS.md +0 -18
- package/CLAUDE.md +0 -923
- package/docs/architecture.md +0 -508
- package/docs/configuration.md +0 -323
- package/docs/conflict-recovery.md +0 -472
- package/docs/design/task-dispatcher.md +0 -880
- package/docs/design-subsystem-extraction.md +0 -627
- package/docs/git-cascade-integration-gaps.md +0 -678
- package/docs/implementation-details.md +0 -1127
- package/docs/implementation-summary.md +0 -448
- package/docs/lifecycle-events-design.md +0 -111
- package/docs/mail-integration.md +0 -608
- package/docs/openhive-capability-summary.md +0 -415
- package/docs/openhive-integration.md +0 -415
- package/docs/plan-self-driving-support.md +0 -433
- package/docs/roadmap-v2-gaps.md +0 -216
- package/docs/spec-self-driving-support.md +0 -462
- package/docs/team-templates.md +0 -860
- package/docs/teams.md +0 -306
- package/docs/trigger-system-design.md +0 -333
- package/docs/troubleshooting.md +0 -489
- package/docs/workspace-interfaces.md +0 -731
- package/docs/workspace-redesign-plan.md +0 -302
- package/examples/distributed-peer-communication.ts +0 -202
- package/examples/local-peer-communication.ts +0 -165
- package/index.js +0 -2
- package/mvp_docs/agent-execution-system.md +0 -347
- package/mvp_docs/agent-interface.md +0 -580
- package/mvp_docs/data-structures.md +0 -701
- package/mvp_docs/dynamic-meta-orchestration.md +0 -116
- package/mvp_docs/multi-agent-interaction-design.md +0 -779
- package/mvp_docs/mvp-implementation-plan.md +0 -1148
- package/renovate.json5 +0 -6
- package/scripts/test-acp-integration.ts +0 -422
- package/src/__tests__/boot-v2.test.ts +0 -631
- package/src/__tests__/e2e/acp-over-map-live.e2e.test.ts +0 -496
- package/src/__tests__/e2e/acp-over-map.e2e.test.ts +0 -457
- package/src/__tests__/e2e/agent-lifecycle.e2e.test.ts +0 -770
- package/src/__tests__/e2e/auto-sync.e2e.test.ts +0 -257
- package/src/__tests__/e2e/bootstrap.e2e.test.ts +0 -319
- package/src/__tests__/e2e/cascade-rebase.e2e.test.ts +0 -254
- package/src/__tests__/e2e/cc-swarm-bridge.e2e.test.ts +0 -253
- package/src/__tests__/e2e/cli-run.e2e.test.ts +0 -167
- package/src/__tests__/e2e/cognitive-workspace.e2e.test.ts +0 -282
- package/src/__tests__/e2e/dispatch-coordination.e2e.test.ts +0 -495
- package/src/__tests__/e2e/dispatch-live.e2e.test.ts +0 -564
- package/src/__tests__/e2e/dispatch-opentasks.e2e.test.ts +0 -496
- package/src/__tests__/e2e/dispatch-phase2-live.e2e.test.ts +0 -456
- package/src/__tests__/e2e/dispatch-phase2.e2e.test.ts +0 -386
- package/src/__tests__/e2e/dispatch.e2e.test.ts +0 -376
- package/src/__tests__/e2e/done-scenarios.e2e.test.ts +0 -322
- package/src/__tests__/e2e/live-agent.e2e.test.ts +0 -1330
- package/src/__tests__/e2e/map-server.e2e.test.ts +0 -128
- package/src/__tests__/e2e/map-sidecar.e2e.test.ts +0 -139
- package/src/__tests__/e2e/opentasks-integration.e2e.test.ts +0 -280
- package/src/__tests__/e2e/pull-mode.e2e.test.ts +0 -632
- package/src/__tests__/e2e/resume-continue.e2e.test.ts +0 -312
- package/src/__tests__/e2e/self-driving-v3.e2e.test.ts +0 -197
- package/src/__tests__/e2e/spawn-resolver.e2e.test.ts +0 -200
- package/src/__tests__/e2e/swarmkit-integration.e2e.test.ts +0 -562
- package/src/__tests__/e2e/swarmkit-live.e2e.test.ts +0 -1049
- package/src/__tests__/e2e/trajectory-tracking.e2e.test.ts +0 -258
- package/src/__tests__/e2e/trigger-wake.e2e.test.ts +0 -257
- package/src/__tests__/e2e/workspace-lifecycle.e2e.test.ts +0 -383
- package/src/__tests__/e2e/workspace-v3.e2e.test.ts +0 -413
- package/src/acp/__tests__/claude-code-replay.test.ts +0 -225
- package/src/acp/__tests__/macro-agent.test.ts +0 -387
- package/src/acp/__tests__/session-mapper.test.ts +0 -152
- package/src/acp/__tests__/websocket-server.test.ts +0 -194
- package/src/acp/claude-code-replay.ts +0 -208
- package/src/acp/index.ts +0 -32
- package/src/acp/macro-agent.ts +0 -995
- package/src/acp/map-bridge.ts +0 -193
- package/src/acp/session-mapper.ts +0 -116
- package/src/acp/types.ts +0 -99
- package/src/acp/websocket-server.ts +0 -213
- package/src/adapters/__tests__/federation.test.ts +0 -256
- package/src/adapters/__tests__/inbox-adapter.test.ts +0 -316
- package/src/adapters/__tests__/tasks-adapter.test.ts +0 -270
- package/src/adapters/federation.ts +0 -185
- package/src/adapters/inbox-adapter.ts +0 -292
- package/src/adapters/inbox-client-adapter.ts +0 -173
- package/src/adapters/index.ts +0 -44
- package/src/adapters/opentasks-daemon.ts +0 -252
- package/src/adapters/tasks-adapter.ts +0 -330
- package/src/adapters/types.ts +0 -286
- package/src/agent/__tests__/agent-manager-topology.test.ts +0 -73
- package/src/agent/__tests__/agent-manager-v2.permission-interception.test.ts +0 -296
- package/src/agent/__tests__/agent-manager-v2.permissions.test.ts +0 -233
- package/src/agent/__tests__/agent-manager-v2.test.ts +0 -614
- package/src/agent/__tests__/agent-store.test.ts +0 -465
- package/src/agent/__tests__/task-ref-resolution.test.ts +0 -231
- package/src/agent/agent-manager-v2.ts +0 -2021
- package/src/agent/agent-manager.ts +0 -386
- package/src/agent/agent-store.ts +0 -409
- package/src/agent/index.ts +0 -7
- package/src/agent/prompts/coordinator-signals.ts +0 -115
- package/src/agent/prompts/index.ts +0 -7
- package/src/agent/system-prompt.ts +0 -298
- package/src/agent/types.ts +0 -459
- package/src/agent-detection/__tests__/command-builder.test.ts +0 -336
- package/src/agent-detection/__tests__/detector.test.ts +0 -768
- package/src/agent-detection/__tests__/registry.test.ts +0 -254
- package/src/agent-detection/command-builder.ts +0 -90
- package/src/agent-detection/detector.ts +0 -307
- package/src/agent-detection/index.ts +0 -36
- package/src/agent-detection/registry.ts +0 -200
- package/src/agent-detection/types.ts +0 -184
- package/src/api/__tests__/server.test.ts +0 -292
- package/src/api/index.ts +0 -8
- package/src/api/server.ts +0 -380
- package/src/api/types.ts +0 -39
- package/src/auth/__tests__/token.test.ts +0 -100
- package/src/auth/index.ts +0 -1
- package/src/auth/token.ts +0 -82
- package/src/boot-v2.ts +0 -1343
- package/src/cli/__tests__/stable-instance-id.test.ts +0 -57
- package/src/cli/acp.ts +0 -101
- package/src/cli/inbox-mcp-proxy.ts +0 -56
- package/src/cli/index.ts +0 -566
- package/src/cli/mcp.ts +0 -305
- package/src/cli/parse-args.ts +0 -54
- package/src/cli/stable-instance-id.ts +0 -14
- package/src/cognitive/__tests__/macro-agent-backend.test.ts +0 -520
- package/src/cognitive/__tests__/session-converter.test.ts +0 -423
- package/src/cognitive/__tests__/workspace-handler.test.ts +0 -221
- package/src/cognitive/analyst-role.ts +0 -59
- package/src/cognitive/index.ts +0 -49
- package/src/cognitive/macro-agent-backend.ts +0 -370
- package/src/cognitive/session-converter.ts +0 -151
- package/src/cognitive/types.ts +0 -163
- package/src/cognitive/workspace-handler.ts +0 -163
- package/src/config/index.ts +0 -9
- package/src/config/project-config.ts +0 -294
- package/src/control/__tests__/control-resilience.test.ts +0 -251
- package/src/control/__tests__/control-socket.test.ts +0 -240
- package/src/control/control-client.ts +0 -337
- package/src/control/control-server.ts +0 -298
- package/src/control/index.ts +0 -17
- package/src/control/types.ts +0 -95
- package/src/dispatch/CLAUDE.md +0 -129
- package/src/dispatch/__tests__/loadout-translation.test.ts +0 -141
- package/src/dispatch/__tests__/mail-inbound-consumer.integration.test.ts +0 -519
- package/src/dispatch/__tests__/mail-inbound-consumer.test.ts +0 -800
- package/src/dispatch/__tests__/mail-inbound-reuse-consumer.test.ts +0 -575
- package/src/dispatch/__tests__/permission-evaluator.test.ts +0 -196
- package/src/dispatch/__tests__/permission-overlay.test.ts +0 -56
- package/src/dispatch/__tests__/permissions-handler.test.ts +0 -168
- package/src/dispatch/__tests__/spawn-agent-handler.test.ts +0 -282
- package/src/dispatch/loadout-translation.ts +0 -138
- package/src/dispatch/mail-inbound-consumer.ts +0 -560
- package/src/dispatch/mail-inbound-reuse-consumer.ts +0 -479
- package/src/dispatch/permission-evaluator.ts +0 -191
- package/src/dispatch/permission-overlay.ts +0 -89
- package/src/dispatch/permissions-handler.ts +0 -112
- package/src/dispatch/spawn-agent-handler.ts +0 -160
- package/src/index.ts +0 -115
- package/src/integrations/__tests__/context-builder.test.ts +0 -218
- package/src/integrations/__tests__/sessionlog.test.ts +0 -498
- package/src/integrations/__tests__/skilltree.test.ts +0 -136
- package/src/integrations/context-builder.ts +0 -280
- package/src/integrations/sessionlog.ts +0 -194
- package/src/integrations/skilltree.ts +0 -184
- package/src/lifecycle/__tests__/cascade-consolidation.test.ts +0 -240
- package/src/lifecycle/__tests__/handlers-v2.test.ts +0 -565
- package/src/lifecycle/cascade.ts +0 -335
- package/src/lifecycle/cleanup.ts +0 -373
- package/src/lifecycle/handlers-v2.ts +0 -508
- package/src/lifecycle/index.ts +0 -76
- package/src/lifecycle/types.ts +0 -260
- package/src/map/__tests__/cascade-bridge.test.ts +0 -229
- package/src/map/__tests__/cascade-diff-server.test.ts +0 -434
- package/src/map/__tests__/emit-event.test.ts +0 -71
- package/src/map/__tests__/lifecycle-bridge.test.ts +0 -430
- package/src/map/__tests__/mail-bridge.test.ts +0 -284
- package/src/map/__tests__/permission-forwarding.test.ts +0 -143
- package/src/map/__tests__/sidecar-diff-install-smoke.test.ts +0 -90
- package/src/map/__tests__/sidecar-integration.test.ts +0 -190
- package/src/map/__tests__/task-bridge.test.ts +0 -153
- package/src/map/__tests__/trajectory-reporter.test.ts +0 -173
- package/src/map/acp-bridge.ts +0 -293
- package/src/map/cascade-action-handler.ts +0 -205
- package/src/map/cascade-bridge.ts +0 -339
- package/src/map/cascade-diff-server.ts +0 -404
- package/src/map/cc-swarm-hooks.ts +0 -242
- package/src/map/coordination-handler.ts +0 -232
- package/src/map/index.ts +0 -18
- package/src/map/lifecycle-bridge.ts +0 -236
- package/src/map/mail-bridge.ts +0 -215
- package/src/map/repo-workspace.ts +0 -82
- package/src/map/server.ts +0 -758
- package/src/map/sidecar.ts +0 -826
- package/src/map/task-bridge.ts +0 -89
- package/src/map/trajectory-reporter.ts +0 -124
- package/src/map/types.ts +0 -304
- package/src/mcp/__tests__/mcp-server-v2.test.ts +0 -236
- package/src/mcp/index.ts +0 -6
- package/src/mcp/mcp-server-v2.ts +0 -485
- package/src/mcp/tools/done-v2.ts +0 -213
- package/src/mcp/types.ts +0 -432
- package/src/metrics/__tests__/metrics.test.ts +0 -205
- package/src/metrics/index.ts +0 -13
- package/src/metrics/metrics.ts +0 -151
- package/src/metrics/types.ts +0 -63
- package/src/roles/__tests__/config-loader.test.ts +0 -540
- package/src/roles/builtin/coordinator.ts +0 -75
- package/src/roles/builtin/generic.ts +0 -39
- package/src/roles/builtin/index.ts +0 -51
- package/src/roles/builtin/integrator.ts +0 -62
- package/src/roles/builtin/monitor.ts +0 -65
- package/src/roles/builtin/worker.ts +0 -134
- package/src/roles/capabilities.ts +0 -257
- package/src/roles/config-loader.ts +0 -405
- package/src/roles/index.ts +0 -141
- package/src/roles/registry.ts +0 -713
- package/src/roles/types.ts +0 -344
- package/src/store/index.ts +0 -8
- package/src/store/types/agents.ts +0 -69
- package/src/store/types/events.ts +0 -91
- package/src/store/types/index.ts +0 -9
- package/src/store/types/messages.ts +0 -32
- package/src/store/types/primitives.ts +0 -9
- package/src/store/types/tasks.ts +0 -124
- package/src/teams/__tests__/team-manager-v2.test.ts +0 -425
- package/src/teams/__tests__/team-runtime-v2.test.ts +0 -402
- package/src/teams/index.ts +0 -29
- package/src/teams/seed-defaults.ts +0 -83
- package/src/teams/team-loader.ts +0 -476
- package/src/teams/team-manager-v2.ts +0 -343
- package/src/teams/team-runtime-v2.ts +0 -920
- package/src/teams/types.ts +0 -276
- package/src/trigger/__tests__/cron-service.test.ts +0 -548
- package/src/trigger/__tests__/scheduler.test.ts +0 -371
- package/src/trigger/__tests__/system-event-queue.test.ts +0 -147
- package/src/trigger/__tests__/trigger-system-v2.test.ts +0 -257
- package/src/trigger/__tests__/wake-manager.test.ts +0 -356
- package/src/trigger/__tests__/webhook-handler.test.ts +0 -567
- package/src/trigger/index.ts +0 -110
- package/src/trigger/queue/index.ts +0 -21
- package/src/trigger/queue/system-event-queue.ts +0 -232
- package/src/trigger/queue/types.ts +0 -149
- package/src/trigger/sources/cron/cron-service.ts +0 -499
- package/src/trigger/sources/cron/index.ts +0 -41
- package/src/trigger/sources/cron/scheduler.ts +0 -344
- package/src/trigger/sources/cron/types.ts +0 -333
- package/src/trigger/sources/index.ts +0 -10
- package/src/trigger/sources/webhook/index.ts +0 -25
- package/src/trigger/sources/webhook/types.ts +0 -205
- package/src/trigger/sources/webhook/webhook-handler.ts +0 -410
- package/src/trigger/strategies/ai-router.ts +0 -170
- package/src/trigger/trigger-system-v2.ts +0 -536
- package/src/trigger/types.ts +0 -228
- package/src/trigger/wake/index.ts +0 -22
- package/src/trigger/wake/types.ts +0 -162
- package/src/trigger/wake/wake-manager.ts +0 -390
- package/src/workspace/__tests__/git-cascade-adapter.test.ts +0 -563
- package/src/workspace/__tests__/land-dispatch.test.ts +0 -214
- package/src/workspace/__tests__/self-driving-yaml.test.ts +0 -122
- package/src/workspace/__tests__/shared-worktree-refcount.test.ts +0 -154
- package/src/workspace/__tests__/standalone-mode.test.ts +0 -118
- package/src/workspace/__tests__/workspace-manager-v3.test.ts +0 -245
- package/src/workspace/__tests__/yaml-schema.test.ts +0 -210
- package/src/workspace/config.ts +0 -165
- package/src/workspace/git-cascade-adapter.ts +0 -1213
- package/src/workspace/index.ts +0 -110
- package/src/workspace/landing/__tests__/strategies.test.ts +0 -184
- package/src/workspace/landing/direct-push.ts +0 -91
- package/src/workspace/landing/index.ts +0 -40
- package/src/workspace/landing/merge-to-parent.ts +0 -229
- package/src/workspace/landing/optimistic-push.ts +0 -36
- package/src/workspace/landing/queue-to-branch.ts +0 -108
- package/src/workspace/merge-queue/__tests__/conflict-resolution-git.e2e.test.ts +0 -641
- package/src/workspace/merge-queue/__tests__/conflict-resolution.test.ts +0 -707
- package/src/workspace/merge-queue/__tests__/merge-queue-concurrent.test.ts +0 -628
- package/src/workspace/merge-queue/__tests__/merge-queue-edge-cases.test.ts +0 -1217
- package/src/workspace/merge-queue/__tests__/merge-queue.test.ts +0 -506
- package/src/workspace/merge-queue/__tests__/real-git-operations.e2e.test.ts +0 -556
- package/src/workspace/merge-queue/__tests__/resolver-flow.test.ts +0 -472
- package/src/workspace/merge-queue/index.ts +0 -38
- package/src/workspace/merge-queue/merge-queue.ts +0 -585
- package/src/workspace/merge-queue/schema.ts +0 -98
- package/src/workspace/merge-queue/types.ts +0 -316
- package/src/workspace/pool/__tests__/worktree-pool.integration.test.ts +0 -1281
- package/src/workspace/pool/__tests__/worktree-pool.test.ts +0 -590
- package/src/workspace/pool/index.ts +0 -26
- package/src/workspace/pool/types.ts +0 -276
- package/src/workspace/pool/worktree-pool.ts +0 -659
- package/src/workspace/recovery/__tests__/auto-resolve-integration.test.ts +0 -127
- package/src/workspace/recovery/__tests__/spawn-resolver.test.ts +0 -139
- package/src/workspace/recovery/__tests__/strategies.test.ts +0 -145
- package/src/workspace/recovery/abandon.ts +0 -51
- package/src/workspace/recovery/auto-resolve.ts +0 -119
- package/src/workspace/recovery/defer.ts +0 -23
- package/src/workspace/recovery/escalate.ts +0 -30
- package/src/workspace/recovery/index.ts +0 -58
- package/src/workspace/recovery/spawn-resolver.ts +0 -152
- package/src/workspace/recovery/types.ts +0 -54
- package/src/workspace/strategies/index.ts +0 -18
- package/src/workspace/strategies/optimistic.ts +0 -139
- package/src/workspace/strategies/queue.ts +0 -81
- package/src/workspace/strategies/registry.ts +0 -89
- package/src/workspace/strategies/trunk.ts +0 -123
- package/src/workspace/strategies/types.ts +0 -145
- package/src/workspace/topology/__tests__/yaml-driven.test.ts +0 -345
- package/src/workspace/topology/index.ts +0 -18
- package/src/workspace/topology/no-workspace.ts +0 -39
- package/src/workspace/topology/types.ts +0 -116
- package/src/workspace/topology/yaml-driven.ts +0 -316
- package/src/workspace/types-v3.ts +0 -162
- package/src/workspace/types.ts +0 -541
- package/src/workspace/workspace-manager.ts +0 -1577
- package/src/workspace/yaml-schema.ts +0 -216
- package/test_fixtures/README.md +0 -425
- package/test_fixtures/fixtures/behaviors/coordinators.ts +0 -196
- package/test_fixtures/fixtures/behaviors/index.ts +0 -62
- package/test_fixtures/fixtures/behaviors/integrators.ts +0 -143
- package/test_fixtures/fixtures/behaviors/monitors.ts +0 -199
- package/test_fixtures/fixtures/behaviors/workers.ts +0 -348
- package/test_fixtures/fixtures/index.ts +0 -7
- package/test_fixtures/fixtures/projects/index.ts +0 -23
- package/test_fixtures/fixtures/projects/project-with-specs.ts +0 -44
- package/test_fixtures/fixtures/projects/typescript-project.ts +0 -200
- package/test_fixtures/fixtures/repos/index.ts +0 -6
- package/test_fixtures/fixtures/repos/temp-repo-factory.ts +0 -299
- package/test_fixtures/fixtures/repos/types.ts +0 -174
- package/test_fixtures/harness/assertions/harness-assertions.ts +0 -752
- package/test_fixtures/harness/assertions/index.ts +0 -8
- package/test_fixtures/harness/index.ts +0 -15
- package/test_fixtures/harness/simulator/agent-simulator.ts +0 -768
- package/test_fixtures/harness/simulator/behavior-executor.ts +0 -580
- package/test_fixtures/harness/simulator/index.ts +0 -14
- package/test_fixtures/harness/simulator/types.ts +0 -459
- package/test_fixtures/harness/test-harness.ts +0 -770
- package/test_fixtures/harness/timing/event-stepper.ts +0 -344
- package/test_fixtures/harness/timing/index.ts +0 -8
- package/tsconfig.json +0 -21
- package/vitest.config.ts +0 -30
- package/vitest.e2e.config.ts +0 -28
- package/vitest.setup.ts +0 -12
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* YAML Zod schema for `macro_agent.workspace`.
|
|
3
|
-
*
|
|
4
|
-
* Teams declare workspace topology via `macro_agent.workspace` in their
|
|
5
|
-
* `team.yaml`. This module validates that section and exposes typed config
|
|
6
|
-
* objects that the TopologyPolicy compiler (Phase 3) consumes.
|
|
7
|
-
*
|
|
8
|
-
* @module workspace/yaml-schema
|
|
9
|
-
* @see docs/workspace-interfaces.md §8
|
|
10
|
-
* @see docs/workspace-redesign-plan.md Phase 2
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { z } from 'zod';
|
|
14
|
-
|
|
15
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
16
|
-
// Enums
|
|
17
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
18
|
-
|
|
19
|
-
export const StreamLineageSchema = z.enum([
|
|
20
|
-
'from_team_root', // attach to the team's root stream (no new stream)
|
|
21
|
-
'fork_from_team_root', // fork a new stream off the team root
|
|
22
|
-
'fork_from_parent', // fork a new stream off the spawner's stream
|
|
23
|
-
'independent', // fork a new stream off a branch (no parent stream)
|
|
24
|
-
'track_existing_branch', // track an existing branch (no new stream/<id>)
|
|
25
|
-
]);
|
|
26
|
-
|
|
27
|
-
export const LandingStrategyNameSchema = z.enum([
|
|
28
|
-
'merge_to_parent_stream',
|
|
29
|
-
'queue_to_branch',
|
|
30
|
-
'cherry_pick_stack',
|
|
31
|
-
'direct_push',
|
|
32
|
-
'optimistic_push',
|
|
33
|
-
'none',
|
|
34
|
-
]);
|
|
35
|
-
|
|
36
|
-
export const ConflictStrategyNameSchema = z.enum([
|
|
37
|
-
'abort',
|
|
38
|
-
'ours',
|
|
39
|
-
'theirs',
|
|
40
|
-
'defer',
|
|
41
|
-
'agent',
|
|
42
|
-
]);
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Recovery strategies for landing conflicts.
|
|
46
|
-
* See docs/conflict-recovery.md §4.
|
|
47
|
-
*/
|
|
48
|
-
export const ConflictRecoveryStrategyNameSchema = z.enum([
|
|
49
|
-
'auto-resolve',
|
|
50
|
-
'defer',
|
|
51
|
-
'spawn-resolver',
|
|
52
|
-
'abandon',
|
|
53
|
-
'escalate',
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
export const WorkspaceKindSchema = z.enum([
|
|
57
|
-
'new_stream', // agent gets its own stream
|
|
58
|
-
'attach_to_team_root', // agent works on team root stream
|
|
59
|
-
'share_with_agent', // agent shares another agent's worktree (ref-counted)
|
|
60
|
-
'share_parent_cwd', // agent inherits spawner's cwd (no isolation)
|
|
61
|
-
'none', // no workspace; agent has no streaming concerns
|
|
62
|
-
]);
|
|
63
|
-
|
|
64
|
-
export const AllocationSchema = z.enum([
|
|
65
|
-
'new_worktree',
|
|
66
|
-
'inherit_parent_cwd',
|
|
67
|
-
'pooled_worktree',
|
|
68
|
-
]);
|
|
69
|
-
|
|
70
|
-
export const OnParentAdvancedSchema = z.enum([
|
|
71
|
-
'sync_with_parent',
|
|
72
|
-
'none',
|
|
73
|
-
]);
|
|
74
|
-
|
|
75
|
-
export const OnTeamCompleteSchema = z.enum([
|
|
76
|
-
'keep',
|
|
77
|
-
'merge_to_main',
|
|
78
|
-
'abandon',
|
|
79
|
-
]);
|
|
80
|
-
|
|
81
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
82
|
-
// Schemas
|
|
83
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
84
|
-
|
|
85
|
-
export const RoleWorkspaceConfigSchema = z.object({
|
|
86
|
-
workspace: WorkspaceKindSchema,
|
|
87
|
-
stream_lineage: StreamLineageSchema.optional(),
|
|
88
|
-
allocation: AllocationSchema.optional(),
|
|
89
|
-
|
|
90
|
-
// Landing
|
|
91
|
-
landing: LandingStrategyNameSchema.optional(),
|
|
92
|
-
landing_config: z.record(z.string(), z.unknown()).optional(),
|
|
93
|
-
|
|
94
|
-
// Conflict handling at landing time
|
|
95
|
-
on_conflict: ConflictStrategyNameSchema.optional(),
|
|
96
|
-
on_conflict_recovery: ConflictRecoveryStrategyNameSchema.optional(),
|
|
97
|
-
conflict_recovery_config: z.record(z.string(), z.unknown()).optional(),
|
|
98
|
-
|
|
99
|
-
// Cascade behavior
|
|
100
|
-
cascade_on_parent_update: z.boolean().optional(),
|
|
101
|
-
on_parent_advanced: OnParentAdvancedSchema.optional(),
|
|
102
|
-
|
|
103
|
-
// Cross-role references
|
|
104
|
-
share_with: z.string().optional(), // role name (for workspace: share_with_agent)
|
|
105
|
-
track_branch: z.string().optional(), // branch name (for stream_lineage: track_existing_branch)
|
|
106
|
-
|
|
107
|
-
// Capabilities granted to this role for MCP tool gating
|
|
108
|
-
capabilities: z.array(z.string()).optional(),
|
|
109
|
-
}).superRefine((val, ctx) => {
|
|
110
|
-
if (val.workspace === 'share_with_agent' && !val.share_with) {
|
|
111
|
-
ctx.addIssue({
|
|
112
|
-
code: 'custom',
|
|
113
|
-
path: ['share_with'],
|
|
114
|
-
message: 'share_with is required when workspace = share_with_agent',
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
if (val.stream_lineage === 'track_existing_branch' && !val.track_branch) {
|
|
118
|
-
ctx.addIssue({
|
|
119
|
-
code: 'custom',
|
|
120
|
-
path: ['track_branch'],
|
|
121
|
-
message: 'track_branch is required when stream_lineage = track_existing_branch',
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
if (val.workspace === 'new_stream' && !val.stream_lineage) {
|
|
125
|
-
ctx.addIssue({
|
|
126
|
-
code: 'custom',
|
|
127
|
-
path: ['stream_lineage'],
|
|
128
|
-
message: 'stream_lineage is required when workspace = new_stream',
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
export const PoolConfigSchema = z.object({
|
|
134
|
-
enabled: z.boolean().default(true),
|
|
135
|
-
max_size: z.number().int().positive().default(10),
|
|
136
|
-
reuse_across_streams: z.boolean().default(false),
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
export const DefaultStreamConfigSchema = z.object({
|
|
140
|
-
fork_from: z.string().default('main'),
|
|
141
|
-
name_template: z.string().default('{team}'),
|
|
142
|
-
change_id_tracking: z.boolean().default(true),
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
export const ConflictRecoveryTeamConfigSchema = z.object({
|
|
146
|
-
default_strategy: ConflictRecoveryStrategyNameSchema.default('defer'),
|
|
147
|
-
default_config: z.record(z.string(), z.unknown()).optional(),
|
|
148
|
-
escalation_target: z.string().optional(),
|
|
149
|
-
max_recovery_depth: z.number().int().positive().default(3),
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
export const TeamWorkspaceConfigSchema = z.object({
|
|
153
|
-
default_stream: DefaultStreamConfigSchema.optional(),
|
|
154
|
-
on_team_complete: OnTeamCompleteSchema.default('keep'),
|
|
155
|
-
pool: PoolConfigSchema.optional(),
|
|
156
|
-
roles: z.record(z.string(), RoleWorkspaceConfigSchema),
|
|
157
|
-
conflict_recovery: ConflictRecoveryTeamConfigSchema.optional(),
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
161
|
-
// Types (inferred)
|
|
162
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
163
|
-
|
|
164
|
-
export type StreamLineage = z.infer<typeof StreamLineageSchema>;
|
|
165
|
-
export type LandingStrategyName = z.infer<typeof LandingStrategyNameSchema>;
|
|
166
|
-
export type ConflictStrategyName = z.infer<typeof ConflictStrategyNameSchema>;
|
|
167
|
-
export type ConflictRecoveryStrategyName = z.infer<typeof ConflictRecoveryStrategyNameSchema>;
|
|
168
|
-
export type WorkspaceKind = z.infer<typeof WorkspaceKindSchema>;
|
|
169
|
-
export type Allocation = z.infer<typeof AllocationSchema>;
|
|
170
|
-
export type OnParentAdvanced = z.infer<typeof OnParentAdvancedSchema>;
|
|
171
|
-
export type OnTeamComplete = z.infer<typeof OnTeamCompleteSchema>;
|
|
172
|
-
export type RoleWorkspaceConfig = z.infer<typeof RoleWorkspaceConfigSchema>;
|
|
173
|
-
export type PoolConfig = z.infer<typeof PoolConfigSchema>;
|
|
174
|
-
export type DefaultStreamConfig = z.infer<typeof DefaultStreamConfigSchema>;
|
|
175
|
-
export type ConflictRecoveryTeamConfig = z.infer<typeof ConflictRecoveryTeamConfigSchema>;
|
|
176
|
-
export type TeamWorkspaceConfig = z.infer<typeof TeamWorkspaceConfigSchema>;
|
|
177
|
-
|
|
178
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
179
|
-
// Parsing helpers
|
|
180
|
-
// ─────────────────────────────────────────────────────────────────────────────
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Parse and validate a `macro_agent.workspace` block from a team manifest.
|
|
184
|
-
*
|
|
185
|
-
* Returns `null` when the block is absent (indicating no workspace isolation
|
|
186
|
-
* is configured for the team). Throws on validation failure with a helpful
|
|
187
|
-
* error message.
|
|
188
|
-
*/
|
|
189
|
-
export function parseTeamWorkspaceConfig(
|
|
190
|
-
raw: unknown
|
|
191
|
-
): TeamWorkspaceConfig | null {
|
|
192
|
-
if (raw === undefined || raw === null) return null;
|
|
193
|
-
const result = TeamWorkspaceConfigSchema.safeParse(raw);
|
|
194
|
-
if (!result.success) {
|
|
195
|
-
const issues = result.error.issues
|
|
196
|
-
.map((i) => ` • ${i.path.join('.')}: ${i.message}`)
|
|
197
|
-
.join('\n');
|
|
198
|
-
throw new Error(
|
|
199
|
-
`Invalid macro_agent.workspace configuration:\n${issues}`
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
return result.data;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Extract the workspace block from a loaded openteams `TeamManifest`.
|
|
207
|
-
*
|
|
208
|
-
* openteams treats `macro_agent` as `Record<string, unknown>` — macro-agent
|
|
209
|
-
* owns the schema inside.
|
|
210
|
-
*/
|
|
211
|
-
export function extractWorkspaceConfig(
|
|
212
|
-
manifest: { macro_agent?: Record<string, unknown> }
|
|
213
|
-
): TeamWorkspaceConfig | null {
|
|
214
|
-
const workspaceRaw = manifest.macro_agent?.workspace;
|
|
215
|
-
return parseTeamWorkspaceConfig(workspaceRaw);
|
|
216
|
-
}
|
package/test_fixtures/README.md
DELETED
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
# Test Fixtures
|
|
2
|
-
|
|
3
|
-
Testing infrastructure for multi-agent orchestration scenarios.
|
|
4
|
-
|
|
5
|
-
> Multi-Agent Orchestration Testing Strategy
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
This directory provides a complete testing framework for:
|
|
10
|
-
- **Simulated agents** that execute behavior scripts without real LLM calls
|
|
11
|
-
- **Temporary repositories** for isolated git operations
|
|
12
|
-
- **Event-driven stepping** for deterministic test execution
|
|
13
|
-
- **Built-in assertions** for common test scenarios
|
|
14
|
-
|
|
15
|
-
## Directory Structure
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
test_fixtures/
|
|
19
|
-
├── fixtures/ # Reusable test data and configurations
|
|
20
|
-
│ ├── behaviors/ # Agent behavior scripts
|
|
21
|
-
│ │ ├── workers.ts # Worker behaviors (successful, failing, stuck, etc.)
|
|
22
|
-
│ │ ├── coordinators.ts # Coordinator behaviors
|
|
23
|
-
│ │ ├── integrators.ts # Integrator behaviors
|
|
24
|
-
│ │ └── monitors.ts # Monitor behaviors
|
|
25
|
-
│ ├── projects/ # Project templates
|
|
26
|
-
│ │ └── typescript-project.ts
|
|
27
|
-
│ ├── repos/ # Repository utilities
|
|
28
|
-
│ │ └── temp-repo-factory.ts
|
|
29
|
-
│ └── opentasks/ # OpenTasks fixtures
|
|
30
|
-
│ └── issues.ts
|
|
31
|
-
│
|
|
32
|
-
├── harness/ # Test harness implementation
|
|
33
|
-
│ ├── test-harness.ts # Main TestHarness class
|
|
34
|
-
│ ├── simulator/ # Agent simulation
|
|
35
|
-
│ │ ├── agent-simulator.ts # Simulated agent
|
|
36
|
-
│ │ ├── behavior-executor.ts # Step execution
|
|
37
|
-
│ │ └── types.ts # Type definitions
|
|
38
|
-
│ ├── timing/ # Execution control
|
|
39
|
-
│ │ └── event-stepper.ts # Deterministic stepping
|
|
40
|
-
│ ├── assertions/ # Test assertions
|
|
41
|
-
│ │ └── harness-assertions.ts
|
|
42
|
-
│ └── __tests__/ # Self-tests for harness
|
|
43
|
-
│
|
|
44
|
-
└── README.md # This file
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Quick Start
|
|
48
|
-
|
|
49
|
-
### Basic Test Setup
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { describe, it, expect, afterEach } from "vitest";
|
|
53
|
-
import { createTestHarness, SUCCESSFUL_WORKER } from "../test_fixtures";
|
|
54
|
-
|
|
55
|
-
describe("my test", () => {
|
|
56
|
-
let harness: TestHarness;
|
|
57
|
-
|
|
58
|
-
afterEach(async () => {
|
|
59
|
-
await harness?.cleanup();
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it("should run a worker", async () => {
|
|
63
|
-
harness = await createTestHarness();
|
|
64
|
-
await harness.createTempRepo();
|
|
65
|
-
|
|
66
|
-
const worker = await harness.spawnSimulator({
|
|
67
|
-
role: "worker",
|
|
68
|
-
behavior: SUCCESSFUL_WORKER,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
await harness.waitForSimulator(worker.agentId);
|
|
72
|
-
|
|
73
|
-
harness.assertSimulatorComplete(worker.agentId);
|
|
74
|
-
harness.assertAgentTerminated(worker.agentId);
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## TestHarness
|
|
80
|
-
|
|
81
|
-
The `TestHarness` is the main orchestrator for multi-agent tests. It manages:
|
|
82
|
-
- Services (EventStore, MessageRouter, TaskManager)
|
|
83
|
-
- Repositories (temporary git repos, worktrees)
|
|
84
|
-
- Simulators (spawning, stepping, waiting)
|
|
85
|
-
- Assertions (agent state, task status, git state)
|
|
86
|
-
|
|
87
|
-
### Creating a Harness
|
|
88
|
-
|
|
89
|
-
```typescript
|
|
90
|
-
// Basic harness
|
|
91
|
-
const harness = await createTestHarness();
|
|
92
|
-
|
|
93
|
-
// With merge queue support
|
|
94
|
-
const harness = await createTestHarness({ withMergeQueue: true });
|
|
95
|
-
|
|
96
|
-
// With workspace/worktree support
|
|
97
|
-
const harness = await createTestHarness({ withWorkspaces: true });
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Harness Options
|
|
101
|
-
|
|
102
|
-
| Option | Type | Default | Description |
|
|
103
|
-
|--------|------|---------|-------------|
|
|
104
|
-
| `inMemory` | `boolean` | `true` | Use in-memory EventStore |
|
|
105
|
-
| `withMergeQueue` | `boolean` | `false` | Enable merge queue support |
|
|
106
|
-
| `withWorkspaces` | `boolean` | `false` | Enable worktree management |
|
|
107
|
-
|
|
108
|
-
## Agent Simulator
|
|
109
|
-
|
|
110
|
-
Simulates agent behavior without LLM calls. Executes a behavior script step-by-step.
|
|
111
|
-
|
|
112
|
-
### SimulatedBehavior
|
|
113
|
-
|
|
114
|
-
```typescript
|
|
115
|
-
interface SimulatedBehavior {
|
|
116
|
-
/** Steps to execute when agent starts */
|
|
117
|
-
onStart: BehaviorStep[];
|
|
118
|
-
|
|
119
|
-
/** Event handlers (keyed by event name) */
|
|
120
|
-
onEvent?: Record<string, BehaviorStep[]>;
|
|
121
|
-
|
|
122
|
-
/** Conditional behaviors evaluated continuously */
|
|
123
|
-
conditions?: ConditionalBehavior[];
|
|
124
|
-
|
|
125
|
-
/** Fail after N steps (for testing error handling) */
|
|
126
|
-
failAfter?: number;
|
|
127
|
-
failWith?: Error | string;
|
|
128
|
-
|
|
129
|
-
/** Delay between steps */
|
|
130
|
-
stepDelayMs?: number;
|
|
131
|
-
|
|
132
|
-
/** Maximum execution time */
|
|
133
|
-
timeoutMs?: number;
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Behavior Steps
|
|
138
|
-
|
|
139
|
-
| Step Type | Description | Example |
|
|
140
|
-
|-----------|-------------|---------|
|
|
141
|
-
| `log` | Log a message | `{ type: "log", message: "Starting" }` |
|
|
142
|
-
| `write_file` | Write content to file | `{ type: "write_file", path: "foo.txt", content: "bar" }` |
|
|
143
|
-
| `read_file` | Read file into variable | `{ type: "read_file", path: "foo.txt", into: "content" }` |
|
|
144
|
-
| `commit` | Git commit | `{ type: "commit", message: "Add feature" }` |
|
|
145
|
-
| `done` | Complete with status | `{ type: "done", status: "completed", summary: "Done" }` |
|
|
146
|
-
| `emit_signal` | Emit a signal | `{ type: "emit_signal", signal: "progress", payload: { pct: 50 } }` |
|
|
147
|
-
| `wait_for_event` | Wait for event | `{ type: "wait_for_event", event: "ASSIGNED" }` |
|
|
148
|
-
| `wait_for_condition` | Wait for condition | `{ type: "wait_for_condition", condition: (ctx) => ctx.stepCount > 5 }` |
|
|
149
|
-
| `call_tool` | Call MCP tool | `{ type: "call_tool", tool: "done", params: { status: "completed" } }` |
|
|
150
|
-
| `spawn_child` | Spawn child agent | `{ type: "spawn_child", role: "worker", behavior: WORKER }` |
|
|
151
|
-
| `sleep` | Sleep for duration | `{ type: "sleep", ms: 100 }` |
|
|
152
|
-
| `conditional` | Conditional branching | `{ type: "conditional", if: fn, then: [...], else: [...] }` |
|
|
153
|
-
| `assert` | Runtime assertion | `{ type: "assert", condition: fn, message: "failed" }` |
|
|
154
|
-
|
|
155
|
-
### Done Status Values
|
|
156
|
-
|
|
157
|
-
| Status | Description |
|
|
158
|
-
|--------|-------------|
|
|
159
|
-
| `completed` | Work finished successfully |
|
|
160
|
-
| `failed` | Work failed with error |
|
|
161
|
-
| `blocked` | Waiting on external dependency |
|
|
162
|
-
| `deferred` | Work postponed for later |
|
|
163
|
-
|
|
164
|
-
## Pre-built Behaviors
|
|
165
|
-
|
|
166
|
-
### Workers
|
|
167
|
-
|
|
168
|
-
```typescript
|
|
169
|
-
import {
|
|
170
|
-
SUCCESSFUL_WORKER, // Writes file, commits, completes
|
|
171
|
-
FAILING_WORKER, // Starts then fails
|
|
172
|
-
STUCK_WORKER, // Waits forever (timeout testing)
|
|
173
|
-
BLOCKED_WORKER, // Completes with blocked status
|
|
174
|
-
DEFERRED_WORKER, // Defers work
|
|
175
|
-
SIGNALING_WORKER, // Emits progress signals
|
|
176
|
-
MULTI_COMMIT_WORKER, // Creates multiple commits
|
|
177
|
-
HELP_EMITTING_WORKER, // Emits HELP signal
|
|
178
|
-
RESOLVER_WORKER, // Resolves conflicts
|
|
179
|
-
} from "../test_fixtures";
|
|
180
|
-
|
|
181
|
-
// Factory functions
|
|
182
|
-
createWorker(steps, options)
|
|
183
|
-
createConflictingWorker(filePath, content, commitMessage)
|
|
184
|
-
createUniqueFileWorker(workerId, content)
|
|
185
|
-
createResolverWorker(filePath, resolvedContent, commitMessage)
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Coordinators
|
|
189
|
-
|
|
190
|
-
```typescript
|
|
191
|
-
import {
|
|
192
|
-
PLANNING_COORDINATOR, // Plans and spawns workers
|
|
193
|
-
WAITING_COORDINATOR, // Waits for workers
|
|
194
|
-
CONDITIONAL_COORDINATOR, // Conditional logic
|
|
195
|
-
EVENT_HANDLING_COORDINATOR, // Handles events
|
|
196
|
-
TASK_CREATING_COORDINATOR, // Creates tasks
|
|
197
|
-
SIMPLE_COORDINATOR, // Minimal coordinator
|
|
198
|
-
} from "../test_fixtures";
|
|
199
|
-
|
|
200
|
-
createMultiWorkerCoordinator(workerCount)
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
### Integrators
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
import {
|
|
207
|
-
BASIC_INTEGRATOR, // Simple merge processing
|
|
208
|
-
CONFLICT_RESOLVER, // Handles conflicts
|
|
209
|
-
BATCH_INTEGRATOR, // Batch merge processing
|
|
210
|
-
VALIDATING_INTEGRATOR, // Validates before merge
|
|
211
|
-
CONTINUOUS_INTEGRATOR, // Continuous processing
|
|
212
|
-
FAILING_INTEGRATOR, // Fails during merge
|
|
213
|
-
} from "../test_fixtures";
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
### Monitors
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
import {
|
|
220
|
-
HEALTH_CHECK_MONITOR, // Health checking
|
|
221
|
-
GUPP_MONITOR, // Global Update Progress Protocol
|
|
222
|
-
PROGRESS_MONITOR, // Progress tracking
|
|
223
|
-
TIMEOUT_MONITOR, // Timeout detection
|
|
224
|
-
RESOURCE_MONITOR, // Resource monitoring
|
|
225
|
-
PERSISTENT_MONITOR, // Long-running monitor
|
|
226
|
-
} from "../test_fixtures";
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## Execution Control
|
|
230
|
-
|
|
231
|
-
### Stepping
|
|
232
|
-
|
|
233
|
-
The harness uses deterministic stepping for reliable tests:
|
|
234
|
-
|
|
235
|
-
```typescript
|
|
236
|
-
// Step all simulators once
|
|
237
|
-
await harness.stepAll();
|
|
238
|
-
|
|
239
|
-
// Run until all simulators are idle
|
|
240
|
-
await harness.runUntilIdle();
|
|
241
|
-
|
|
242
|
-
// Wait for specific simulator
|
|
243
|
-
await harness.waitForSimulator(agentId);
|
|
244
|
-
|
|
245
|
-
// Wait for all simulators
|
|
246
|
-
await harness.waitForAll();
|
|
247
|
-
|
|
248
|
-
// Wait for custom condition
|
|
249
|
-
await harness.waitForCondition(() => harness.getSimulatorCount() >= 3);
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Options
|
|
253
|
-
|
|
254
|
-
```typescript
|
|
255
|
-
await harness.waitForSimulator(agentId, {
|
|
256
|
-
timeoutMs: 5000, // Max wait time
|
|
257
|
-
maxIterations: 100, // Max step iterations
|
|
258
|
-
});
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
## Assertions
|
|
262
|
-
|
|
263
|
-
### Agent Assertions
|
|
264
|
-
|
|
265
|
-
```typescript
|
|
266
|
-
harness.assertAgentTerminated(agentId);
|
|
267
|
-
harness.assertAgentState(agentId, "running" | "stopped" | "paused");
|
|
268
|
-
harness.assertSimulatorComplete(agentId);
|
|
269
|
-
harness.assertExecutedStep(agentId, "commit");
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
### Task Assertions
|
|
273
|
-
|
|
274
|
-
```typescript
|
|
275
|
-
harness.assertTaskStatus(taskId, "pending" | "assigned" | "in_progress" | "completed" | "failed");
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Message Assertions
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
harness.assertMessagesReceived(agentId, minCount);
|
|
282
|
-
harness.assertMessageReceived(agentId, "pattern" | /regex/);
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Git Assertions
|
|
286
|
-
|
|
287
|
-
```typescript
|
|
288
|
-
harness.assertBranchExists("feature/foo");
|
|
289
|
-
harness.assertBranchMerged("feature/foo", "main");
|
|
290
|
-
harness.assertCleanWorkingTree();
|
|
291
|
-
harness.assertCommitCount("main", 5);
|
|
292
|
-
harness.assertFileExists("src/index.ts");
|
|
293
|
-
harness.assertFileContains("src/index.ts", "export");
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Merge Queue Assertions (requires `withMergeQueue: true`)
|
|
297
|
-
|
|
298
|
-
```typescript
|
|
299
|
-
harness.assertMergeRequestStatus(mrId, "pending" | "processing" | "merged" | "conflict");
|
|
300
|
-
harness.assertTaskMergeRequestStatus(taskId, status);
|
|
301
|
-
harness.assertMergeQueueDepth(streamId, expectedDepth);
|
|
302
|
-
harness.assertMergeRequestMerged(mrId);
|
|
303
|
-
harness.assertMergeRequestConflict(mrId, expectedFiles);
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### Worktree Assertions (requires `withWorkspaces: true`)
|
|
307
|
-
|
|
308
|
-
```typescript
|
|
309
|
-
harness.assertWorktreeExists(worktreePath);
|
|
310
|
-
harness.assertAgentHasWorktree(agentId);
|
|
311
|
-
harness.assertWorktreeBranch(worktreePath, "feature/foo");
|
|
312
|
-
harness.assertWorktreeClean(worktreePath);
|
|
313
|
-
harness.assertWorktreeFileExists(worktreePath, "src/index.ts");
|
|
314
|
-
harness.assertWorktreeFileContains(worktreePath, "src/index.ts", "export");
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
## Repository Management
|
|
318
|
-
|
|
319
|
-
### Temporary Repositories
|
|
320
|
-
|
|
321
|
-
```typescript
|
|
322
|
-
const repo = await harness.createTempRepo();
|
|
323
|
-
|
|
324
|
-
// With initial files
|
|
325
|
-
const repo = await harness.createTempRepo({
|
|
326
|
-
files: {
|
|
327
|
-
"src/index.ts": "export const x = 1;",
|
|
328
|
-
"package.json": '{ "name": "test" }',
|
|
329
|
-
},
|
|
330
|
-
});
|
|
331
|
-
|
|
332
|
-
// Access repo
|
|
333
|
-
const repo = harness.getRepo();
|
|
334
|
-
repo.git("status");
|
|
335
|
-
repo.writeFile("foo.txt", "content");
|
|
336
|
-
repo.path; // Absolute path to repo
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### Worktrees (requires `withWorkspaces: true`)
|
|
340
|
-
|
|
341
|
-
```typescript
|
|
342
|
-
const worktreePath = harness.createWorktreeForAgent(agentId, "feature/foo", {
|
|
343
|
-
baseBranch: "main",
|
|
344
|
-
streamId: "stream-1",
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
harness.getWorktreePath(agentId);
|
|
348
|
-
harness.removeWorktree(agentId);
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
## Merge Queue (requires `withMergeQueue: true`)
|
|
352
|
-
|
|
353
|
-
```typescript
|
|
354
|
-
// Submit merge request
|
|
355
|
-
const mrId = harness.submitMergeRequest({
|
|
356
|
-
streamId: "stream-1",
|
|
357
|
-
taskId: "task-1",
|
|
358
|
-
agentId: "agent-1",
|
|
359
|
-
branch: "feature/foo",
|
|
360
|
-
targetBranch: "main",
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
// Process next request
|
|
364
|
-
harness.processNextMergeRequest("stream-1");
|
|
365
|
-
|
|
366
|
-
// Process with simulated conflict
|
|
367
|
-
harness.processNextMergeRequest("stream-1", {
|
|
368
|
-
simulateConflict: true,
|
|
369
|
-
conflictFiles: ["shared.ts"],
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
// Process all requests
|
|
373
|
-
harness.processAllMergeRequests("stream-1");
|
|
374
|
-
|
|
375
|
-
// Check queue depth
|
|
376
|
-
harness.getMergeQueueDepth("stream-1");
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
## Example: Multi-Worker Test
|
|
380
|
-
|
|
381
|
-
```typescript
|
|
382
|
-
it("should coordinate multiple workers", async () => {
|
|
383
|
-
harness = await createTestHarness({ withMergeQueue: true });
|
|
384
|
-
await harness.createTempRepo();
|
|
385
|
-
|
|
386
|
-
// Spawn coordinator
|
|
387
|
-
const coordinator = await harness.spawnSimulator({
|
|
388
|
-
role: "coordinator",
|
|
389
|
-
behavior: createMultiWorkerCoordinator(3),
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
// Run until all complete
|
|
393
|
-
await harness.waitForAll({ maxIterations: 500 });
|
|
394
|
-
|
|
395
|
-
// Verify all workers completed
|
|
396
|
-
const workers = harness.getAllSimulators()
|
|
397
|
-
.filter(s => s.role === "worker");
|
|
398
|
-
|
|
399
|
-
expect(workers).toHaveLength(3);
|
|
400
|
-
workers.forEach(w => {
|
|
401
|
-
harness.assertSimulatorComplete(w.agentId);
|
|
402
|
-
});
|
|
403
|
-
|
|
404
|
-
// Verify all merge requests processed
|
|
405
|
-
harness.assertMergeQueueDepth("default", 0);
|
|
406
|
-
});
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
## Running Harness Tests
|
|
410
|
-
|
|
411
|
-
```bash
|
|
412
|
-
# Run harness self-tests
|
|
413
|
-
npm test -- test_fixtures/harness/__tests__
|
|
414
|
-
|
|
415
|
-
# Run specific test file
|
|
416
|
-
npm test -- test_fixtures/harness/__tests__/test-harness-and-assertions.test.ts
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
## Best Practices
|
|
420
|
-
|
|
421
|
-
1. **Always call `cleanup()`** in `afterEach` to avoid resource leaks
|
|
422
|
-
2. **Use pre-built behaviors** when possible for consistency
|
|
423
|
-
3. **Use deterministic stepping** instead of timers for reliable tests
|
|
424
|
-
4. **Create custom behaviors** with factory functions for parameterization
|
|
425
|
-
5. **Check assertions in order** - agent state before task state before git state
|