Roo-Code/packages
davincidreams 4705627fe4 feat(swarm-p3): in-process mailbox + idle worker loop
Infrastructure:
- IMailboxService interface (abstraction over in-process and future file backends)
- InMemoryMailbox: EventEmitter-based, instant delivery, configurable timeout fallback
- MailboxManager: per-session mailbox lifecycle + assignTask/shutdownWorker/
  waitForNextMessage/notifyIdle helpers

Events:
- WorkerIdle [sessionId, taskId] — emitted when a persistent worker finishes a turn
- WorkerShutdown [sessionId, taskId] — emitted when a worker receives shutdown_request

Idle loop (opt-in via persistent:true on spawnConcurrentChildren):
- spawnConcurrentChildren gains persistent?: boolean param; creates/destroys mailbox
- AttemptCompletionTool concurrent path: if session has an active mailbox, sends
  idle_notification and awaits task_assignment or shutdown_request (5-min safety
  timeout). On task_assignment: pushes new task context and returns "reassigned"
  so the LLM loop continues without resolving the parent Promise. On shutdown or
  timeout: resolves normally. TaskCompleted is NOT emitted for reassigned workers.
- DelegationProvider interface gains swarmRegistry, mailboxManager, emit fields

Public API on ClineProvider:
- assignTaskToWorker(sessionId, workerId, message): sends task_assignment
- shutdownWorkers(sessionId): broadcasts shutdown_request to all session workers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 07:08:40 -04:00
..
build Custom tool calling (#10083) 2025-12-21 12:43:06 -08:00
cloud feat: port Claude Code CLI features and add parallel agent/worktree support 2026-04-24 23:50:56 -04:00
config-eslint Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
config-typescript Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
core Changeset version bump (#12085) 2026-04-08 15:16:12 -06:00
evals Changeset version bump (#12085) 2026-04-08 15:16:12 -06:00
ipc Changeset version bump (#12085) 2026-04-08 15:16:12 -06:00
telemetry feat: parallel task introspection, orphan detection, error handling, and telemetry 2026-04-25 02:23:38 -04:00
types feat(swarm-p3): in-process mailbox + idle worker loop 2026-04-25 07:08:40 -04:00
vscode-shim Some cleanup in ExtensionHost (#10600) 2026-01-10 02:29:33 -08:00