@bastani/atomic 0.9.43 → 0.9.44-alpha.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.
Files changed (137) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +22 -0
  3. package/dist/builtin/intercom/broker/broker.ts +31 -7
  4. package/dist/builtin/intercom/broker/client-message-validation.ts +6 -0
  5. package/dist/builtin/intercom/broker/client.ts +69 -0
  6. package/dist/builtin/intercom/broker/send-signature.ts +4 -1
  7. package/dist/builtin/intercom/index.bundle.mjs +309 -109
  8. package/dist/builtin/intercom/live-route-refusal.ts +20 -0
  9. package/dist/builtin/intercom/package.json +1 -1
  10. package/dist/builtin/intercom/skills/intercom/SKILL.md +11 -6
  11. package/dist/builtin/intercom/types.ts +28 -1
  12. package/dist/builtin/mcp/CHANGELOG.md +7 -0
  13. package/dist/builtin/mcp/package.json +1 -1
  14. package/dist/builtin/subagents/CHANGELOG.md +9 -0
  15. package/dist/builtin/subagents/README.md +8 -8
  16. package/dist/builtin/subagents/agents/worker.md +1 -1
  17. package/dist/builtin/subagents/package.json +1 -1
  18. package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
  19. package/dist/builtin/subagents/skills/cua-driver/EMBEDDING.md +21 -2
  20. package/dist/builtin/subagents/skills/cua-driver/LINUX.md +2 -2
  21. package/dist/builtin/subagents/skills/cua-driver/MACOS.md +342 -10
  22. package/dist/builtin/subagents/skills/cua-driver/README.md +4 -3
  23. package/dist/builtin/subagents/skills/cua-driver/RUNTIME.md +3 -1
  24. package/dist/builtin/subagents/skills/cua-driver/SKILL.md +7 -4
  25. package/dist/builtin/subagents/skills/cua-driver/WINDOWS.md +6 -5
  26. package/dist/builtin/subagents/skills/cua-driver/WORKFLOW.md +15 -0
  27. package/dist/builtin/subagents/skills/herdr/SKILL.md +22 -10
  28. package/dist/builtin/subagents/skills/subagent/SKILL.md +8 -5
  29. package/dist/builtin/subagents/src/extension/index.bundle.mjs +6 -6
  30. package/dist/builtin/web-access/package.json +1 -1
  31. package/dist/builtin/workflows/CHANGELOG.md +20 -0
  32. package/dist/builtin/workflows/README.md +1 -1
  33. package/dist/builtin/workflows/builtin/{chunk-frqxd4d1.js → chunk-k8d7ehjx.js} +22 -0
  34. package/dist/builtin/workflows/builtin/{chunk-3s95f7ry.js → chunk-qxpymnaf.js} +1 -1
  35. package/dist/builtin/workflows/builtin/{chunk-edhf30ef.js → chunk-zjecnjxx.js} +1 -1
  36. package/dist/builtin/workflows/builtin/goal.js +2 -2
  37. package/dist/builtin/workflows/builtin/index.js +3 -3
  38. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  39. package/dist/builtin/workflows/package.json +1 -1
  40. package/dist/builtin/workflows/src/extension/index.bundle.mjs +1844 -603
  41. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +1880 -605
  42. package/dist/builtin/workflows/src/index.js +1896 -655
  43. package/dist/builtin/workflows/src/local-worker-entry.mjs +1880 -605
  44. package/dist/cli/args.js +1 -1
  45. package/dist/cli/args.js.map +1 -1
  46. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
  47. package/dist/core/agent-session-custom-message-commit.js +59 -0
  48. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  49. package/dist/core/agent-session-methods.d.ts +1 -0
  50. package/dist/core/agent-session-methods.d.ts.map +1 -1
  51. package/dist/core/agent-session-methods.js.map +1 -1
  52. package/dist/core/agent-session-prompt.d.ts +4 -0
  53. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  54. package/dist/core/agent-session-prompt.js +10 -2
  55. package/dist/core/agent-session-prompt.js.map +1 -1
  56. package/dist/core/agent-session.d.ts +2 -0
  57. package/dist/core/agent-session.d.ts.map +1 -1
  58. package/dist/core/agent-session.js +9 -0
  59. package/dist/core/agent-session.js.map +1 -1
  60. package/dist/core/builtin-packages.d.ts.map +1 -1
  61. package/dist/core/builtin-packages.js +13 -13
  62. package/dist/core/builtin-packages.js.map +1 -1
  63. package/dist/core/exec.d.ts.map +1 -1
  64. package/dist/core/exec.js +11 -2
  65. package/dist/core/exec.js.map +1 -1
  66. package/dist/core/package-manager-resolver.d.ts.map +1 -1
  67. package/dist/core/package-manager-resolver.js +25 -14
  68. package/dist/core/package-manager-resolver.js.map +1 -1
  69. package/dist/core/package-manager-types.d.ts +8 -0
  70. package/dist/core/package-manager-types.d.ts.map +1 -1
  71. package/dist/core/package-manager-types.js.map +1 -1
  72. package/dist/core/package-manager.d.ts +1 -1
  73. package/dist/core/package-manager.d.ts.map +1 -1
  74. package/dist/core/package-manager.js.map +1 -1
  75. package/dist/core/resource-loader-extension-warnings.d.ts +4 -1
  76. package/dist/core/resource-loader-extension-warnings.d.ts.map +1 -1
  77. package/dist/core/resource-loader-extension-warnings.js +15 -0
  78. package/dist/core/resource-loader-extension-warnings.js.map +1 -1
  79. package/dist/core/resource-loader-package-resources.d.ts.map +1 -1
  80. package/dist/core/resource-loader-package-resources.js +1 -0
  81. package/dist/core/resource-loader-package-resources.js.map +1 -1
  82. package/dist/core/resource-loader-reload.d.ts.map +1 -1
  83. package/dist/core/resource-loader-reload.js +5 -3
  84. package/dist/core/resource-loader-reload.js.map +1 -1
  85. package/dist/extensions/mcp/client/oauth/flow.d.ts.map +1 -1
  86. package/dist/extensions/mcp/client/oauth/flow.js +4 -1
  87. package/dist/extensions/mcp/client/oauth/flow.js.map +1 -1
  88. package/dist/extensions/mcp/client/oauth/types.d.ts +1 -0
  89. package/dist/extensions/mcp/client/oauth/types.d.ts.map +1 -1
  90. package/dist/extensions/mcp/client/oauth/types.js +8 -4
  91. package/dist/extensions/mcp/client/oauth/types.js.map +1 -1
  92. package/dist/extensions/mcp/client/transports/streamable-http.d.ts.map +1 -1
  93. package/dist/extensions/mcp/client/transports/streamable-http.js +2 -1
  94. package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -1
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.d.ts.map +1 -1
  97. package/dist/index.js.map +1 -1
  98. package/dist/main.d.ts.map +1 -1
  99. package/dist/main.js +20 -10
  100. package/dist/main.js.map +1 -1
  101. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  102. package/dist/modes/interactive/components/model-selector.js +4 -2
  103. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  104. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  105. package/dist/modes/interactive/components/scoped-models-selector.js +4 -2
  106. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  107. package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
  108. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  109. package/dist/modes/interactive/components/tool-execution.js +11 -1
  110. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  111. package/dist/modes/interactive/model-search.d.ts +10 -0
  112. package/dist/modes/interactive/model-search.d.ts.map +1 -1
  113. package/dist/modes/interactive/model-search.js +21 -0
  114. package/dist/modes/interactive/model-search.js.map +1 -1
  115. package/dist/package-manager-cli.d.ts.map +1 -1
  116. package/dist/package-manager-cli.js +5 -0
  117. package/dist/package-manager-cli.js.map +1 -1
  118. package/dist/utils/tools-manager.d.ts.map +1 -1
  119. package/dist/utils/tools-manager.js +30 -35
  120. package/dist/utils/tools-manager.js.map +1 -1
  121. package/docs/computer-use.md +5 -5
  122. package/docs/custom-provider/streaming.md +9 -14
  123. package/docs/environment-variables.md +1 -0
  124. package/docs/intercom/operations.md +1 -1
  125. package/docs/intercom.md +16 -2
  126. package/docs/packages.md +2 -0
  127. package/docs/settings.md +2 -2
  128. package/docs/skills.md +2 -2
  129. package/docs/subagents.md +47 -10
  130. package/docs/workflows/api-reference.md +1 -1
  131. package/docs/workflows/authoring.md +1 -1
  132. package/docs/workflows/operations.md +8 -6
  133. package/docs/workflows/reliable-design.md +23 -5
  134. package/examples/extensions/custom-provider-anthropic/index.ts +31 -31
  135. package/examples/extensions/todo.ts +7 -0
  136. package/npm-shrinkwrap.json +32 -32
  137. package/package.json +3 -3
@@ -54,9 +54,9 @@ Choose the primitive that matches the job:
54
54
 
55
55
  A pane exists whether or not it contains an agent. `agent start` requires an existing available shell pane and never creates, splits, or moves layout. Use pane commands for ordinary processes. Use agent commands when Herdr must validate agent identity or interpret `idle`, `working`, `blocked`, `done`, and `unknown` lifecycle states.
56
56
 
57
- Agent commands accept either a unique live agent name or the pane ID currently hosting that agent. They do not accept terminal IDs or bare agent-kind labels. Names must match `[a-z][a-z0-9_-]{0,31}` and be unique among live agents. A name follows the current pane occupant and is cleared when that agent exits, is released, or is replaced.
57
+ Agent commands accept either a unique live agent name or the pane ID currently hosting that agent. They do not accept terminal IDs or bare agent-kind labels. Names must match `[a-z][a-z0-9_-]{0,31}` and be unique among live agents. A name follows the current pane occupant and is cleared when that agent exits, is released, or is replaced. Suspending an agent with Ctrl+Z and running a non-agent command preserves its identity while the exact process remains alive. This does not preserve the original identity across another recognized agent taking over. A retained identity does not mean the agent is in the foreground; inspect the pane before sending input.
58
58
 
59
- `idle` and `done` both mean the agent is ready for input. The CLI/API uses the server's seen state to distinguish them; explicit focus commands mark the target seen, while reads do not. Each TUI client tracks viewed completions independently, so its Done badge can differ from the CLI or another client's badge. `blocked` means Herdr recognized an approval or question UI. `unknown` means an agent is present but Herdr cannot classify it confidently; it does not prove completion.
59
+ `idle` and `done` normally indicate the agent is ready for input; neither guarantees that an unfamiliar approval dialog was recognized or that a retained agent is in the foreground. The CLI/API uses the server's seen state to distinguish them; explicit focus commands mark the target seen, while reads do not. Each TUI client tracks viewed completions independently, so its Done badge can differ from the CLI or another client's badge. Antigravity and Grok can be idle while background tasks or subagents keep running, so a settled-state wait is not proof those jobs have finished. `blocked` means Herdr recognized an approval or question UI. `unknown` means an agent is present but Herdr cannot classify it confidently; it does not prove completion.
60
60
 
61
61
  ## Use IDs and caller context
62
62
 
@@ -74,7 +74,7 @@ Herdr injects the caller's context into each managed pane:
74
74
  printf '%s\n' "$HERDR_WORKSPACE_ID" "$HERDR_TAB_ID" "$HERDR_PANE_ID"
75
75
  ```
76
76
 
77
- Prefer `--current` when a pane command should target the calling pane. Omitting a target may use the UI-focused pane, which can belong to the user or another client.
77
+ Prefer `--current` when a pane command should target the calling pane. An omitted `pane split` target uses the calling pane when `HERDR_PANE_ID` is available, otherwise the focused pane. Other commands may use the UI-focused pane, which can belong to the user or another client.
78
78
 
79
79
  Discover live state with:
80
80
 
@@ -88,9 +88,21 @@ herdr agent list
88
88
 
89
89
  Creation responses expose the IDs to use next. `workspace create` returns `.result.workspace`, `.result.tab`, and `.result.root_pane`. `tab create` returns `.result.tab` and `.result.root_pane`. `pane split` returns the new pane as `.result.pane`.
90
90
 
91
- IDs and live agent names are scoped to one server. Two saved SSH machines can both have `w1:p1` or an agent named `reviewer`. Selecting a machine in the TUI does not retarget commands running in your pane: they still use the inherited session and socket context. Run remote control commands on the intended host with its explicit session, and rediscover IDs there.
91
+ IDs and live agent names are scoped to one server. Two saved SSH machines can both have `w1:p1` or an agent named `reviewer`. Selecting a machine in the TUI does not retarget commands running in your pane: without `--machine`, they still use the inherited session and socket context.
92
92
 
93
- `herdr machine list` lists saved connection profiles, not a cross-machine pane inventory; add `--json` for scripts. Only add, remove, enable, or disable profiles when the user asks. Removing a profile disconnects the client but does not stop remote sessions. Adding a machine uses the remote default session unless `--remote-session` is explicitly supplied. Setup asks before stopping an incompatible server and defaults to No; do not approve replacement without the user's consent. Experimental handoff is not part of `machine add`.
93
+ To control a saved SSH machine, use the same global prefix for discovery and every later command:
94
+
95
+ ```bash
96
+ herdr --machine <label-or-id> agent list
97
+ herdr --machine <label-or-id> pane list
98
+ herdr --machine <label-or-id> agent prompt <remote-agent-name> "Reply with your current status." --wait --timeout 120000
99
+ ```
100
+
101
+ The selector must be an enabled saved profile ID or a unique, case-sensitive label, not an arbitrary SSH hostname. Commands use that profile's remote session without an open TUI. Do not combine `--machine` with `--session` or `--remote`. Discover IDs on that machine; inherited local IDs and `--current` do not identify remote panes.
102
+
103
+ Both installations must support machine API forwarding, and the remote server must already be running and API-compatible. Forwarding never installs, starts, or restarts a server and never falls back to Local. Local configuration, session management, installation commands, and interactive attachment are not forwarded. Remote worktree paths must be absolute, `~`, or start with `~/`; plugin link paths must be absolute. A connection failure does not prove a mutation was not applied: inspect remote state before retrying.
104
+
105
+ `herdr machine list` lists saved connection profiles, not a cross-machine pane inventory; add `--json` for scripts. Only add, remove, enable, or disable profiles when the user asks. Removing a profile disconnects the client but does not stop remote sessions. Interactive `machine add` discovers running remote sessions and may ask the user to pick one; non-interactive setup uses the remote default session unless `--remote-session` is explicitly supplied. Use `herdr machine status [<label-or-id>] --json` to diagnose a failing machine. `herdr machine reconnect` needs the user to complete SSH authentication in their terminal; do not run it for them. Setup asks before stopping an incompatible server and defaults to No; do not approve replacement without the user's consent. Experimental handoff is not part of `machine add`.
94
106
 
95
107
  ## Start and coordinate an agent
96
108
 
@@ -130,7 +142,7 @@ Submit work through the agent surface:
130
142
  herdr agent prompt reviewer "Review the current diff and report only actionable findings." --wait --timeout 120000
131
143
  ```
132
144
 
133
- `agent prompt` honors the pane's live bracketed-paste mode and sends text followed by encoded Enter as one ordered submission. It reports successful submission only after both have been written; that alone does not prove the agent started a turn. The submit delay grows with prompt size for Codex on Windows. It rejects an agent already waiting at an approval or question dialog with `agent_blocked` before sending any input. Inspect the blocked UI and ask the user before answering it. For normal agent work, `--wait` is enough: it waits for the first settled `idle`, `done`, or `blocked` state. Do not repeat those defaults with `--until`.
145
+ `agent prompt` honors the pane's live bracketed-paste mode and sends text followed by encoded Enter as one ordered submission. It reports successful submission only after both have been written; that alone does not prove the agent started a turn. For Codex on Windows, Herdr sends a paste boundary before Enter so submission does not depend on prompt size. It rejects an agent already waiting at an approval or question dialog with `agent_blocked` before sending any input. Inspect the blocked UI and ask the user before answering it. For normal agent work, `--wait` is enough: it waits for the first settled `idle`, `done`, or `blocked` state. Do not repeat those defaults with `--until`.
134
146
 
135
147
  With `--wait`, a prompt sent from a non-working state must produce observed `working` or `blocked` activity. After submission, Herdr waits up to five seconds for that activity; unrelated `idle`, `done`, or session changes do not satisfy this gate. It returns `agent_prompt_stalled` if no activity is observed, or `timeout` if the caller's timeout expires first. The caller timeout includes submission time. Without a timeout, the settled-state wait is indefinite after activity is observed. This wait tracks lifecycle state, not an individual turn; if the agent is already working, completion of the active turn may satisfy it.
136
148
 
@@ -174,7 +186,7 @@ herdr pane wait-output <returned-pane-id> --match "test result" --timeout 120000
174
186
  herdr pane read <returned-pane-id> --source recent-unwrapped --lines 120
175
187
  ```
176
188
 
177
- `pane run` atomically sends command text and Enter. `pane wait-output` searches the selected snapshot immediately, so output that already exists can match. Use `--match <text>` for a literal substring or `--regex <pattern>` for a Rust regular expression. Omitting `--timeout` allows an indefinite wait.
189
+ `pane run` queues command text and Enter together; success acknowledges admission, not command execution. On macOS, `pane run` and `agent start` reject a command that exceeds the terminal's current canonical line-input limit before queuing it. Wait for the interactive shell prompt before retrying. The check covers this submission, not an earlier incomplete line or a later terminal-mode change. `pane wait-output` searches the selected snapshot immediately, so output that already exists can match. Use `--match <text>` for a literal substring or `--regex <pattern>` for a Rust regular expression. Omitting `--timeout` allows an indefinite wait.
178
190
 
179
191
  Use the read source that matches the task:
180
192
 
@@ -185,16 +197,16 @@ Use the read source that matches the task:
185
197
 
186
198
  Use `--format ansi` when colors and terminal styling are evidence. Otherwise use text.
187
199
 
188
- `--lines` asks Herdr for more rows from the pane's available screen and host scrollback. If increasing it does not reveal more of a completed response, the pane is probably running the agent on the terminal's alternate screen. Rows that leave the alternate screen do not enter Herdr's host scrollback, so a larger line count cannot recover them.
200
+ `--lines` asks Herdr for more rows from the pane's available screen and host scrollback. Alternate-screen rows do not enter ordinary host scrollback. For supported idle agents, Herdr can collect application-owned history and restore the viewport afterward, but not every application or response can be recovered this way.
189
201
 
190
- After that failed read, ask the agent to write its complete response as Markdown in a temporary directory and reply only with the file path, then read the file directly. Use this only as a fallback; do not request file output in the initial prompt.
202
+ If a larger recent read still does not reveal the completed response, ask the agent to write it as Markdown in a temporary directory and reply only with the file path, then read that file on the same machine. Use this only as a fallback; do not request file output in the initial prompt.
191
203
 
192
204
  ## Safety and coordination rules
193
205
 
194
206
  - Use `--no-focus` for background work unless the user asked to switch context.
195
207
  - Use `--current`, an explicit pane ID, or a unique agent name. Do not rely on another client's focused pane.
196
208
  - Parse IDs from JSON responses. Do not derive them from sidebar order or examples.
197
- - Do not close workspaces, tabs, panes, or sessions you did not create unless the user explicitly asked. `workspace close --group` closes the primary workspace and its linked worktree workspaces; never add it merely to bypass `workspace_group_close_required`.
209
+ - Do not close workspaces, tabs, panes, or sessions you did not create unless the user explicitly asked. Ordinary CLI/API closes do not inherit the TUI's last-pane confirmation. `workspace close --group` closes the primary workspace and its linked worktree workspaces; never add it merely to bypass `workspace_group_close_required`.
198
210
  - Use `--trust-repository` only after the user has verified the repository. It grants per-request Git trust; it is not a routine retry for a failed worktree command.
199
211
  - Client and server versions can differ after an update. Check `herdr status` before relying on new server features. A missing method is not permission to stop or upgrade a server.
200
212
  - Never run `herdr server stop` from an active session unless the user explicitly intends to stop the server and its pane processes.
@@ -317,14 +317,15 @@ For supervisor requests, prefer `contact_supervisor`; use generic `intercom` tow
317
317
 
318
318
  ### Peer coordination
319
319
 
320
- Coordination is not only vertical. Children launched in the same parallel set, or in the same explicit `group`, share one Intercom group, and workflow stages share their invocation group. Any of them can run `intercom({ action: "list" })`, see live siblings, and `send` or `ask` them directly. `contact_supervisor` is reserved for the supervisor; everything peer-to-peer goes through ordinary `intercom`.
320
+ Default to peer-to-peer (swarm) coordination. There are no limits on communication between agents; it is encouraged whenever you need to. The supervisor is not a message relay: relaying adds latency, loses detail, and bloats the supervisor's context, while direct exchange converges faster. Children launched in the same parallel set, or in the same explicit `group`, share one Intercom group, and workflow stages share their invocation group. Any of them can run `intercom({ action: "list" })`, see live siblings, and `send` or `ask` them directly. `contact_supervisor` is reserved for the supervisor; everything peer-to-peer goes through ordinary `intercom`.
321
321
 
322
- Use peer messaging when a sibling is the better source than the supervisor:
322
+ Use peer messaging whenever a sibling is the better source than the supervisor:
323
323
 
324
324
  - **Debate**: a reviewer challenges another reviewer's blocking finding with concrete evidence; each still returns its own verdict (see the constructive-quorum pattern in `/skill:intercom`).
325
325
  - **Connect**: a locator hands file paths and line ranges straight to the analyzer working the same question instead of round-tripping through the parent.
326
326
  - **Learn**: a worker asks the sibling that already reproduced the bug for the exact command and environment rather than rediscovering it.
327
327
  - **Coordinate**: parallel writers claim ownership of shared files, serialize expensive suites or builds, and announce when a shared step is done.
328
+ - **Broadcast and hand off**: share a confirmed finding with every sibling at once, or pass work along a chain of siblings without a parent hop.
328
329
 
329
330
  ```typescript
330
331
  // In a child: find who else is in the group, then talk to them
@@ -333,9 +334,11 @@ intercom({ action: "send", to: "worker-2", message: "I own src/api/*; leave thos
333
334
  intercom({ action: "ask", to: "reviewer-1", message: "You flagged the retry loop as unbounded. I read a max of 5 attempts at client.ts:88 — what did you see?" })
334
335
  ```
335
336
 
336
- Peer asks and one blocking supervisor request may wait concurrently in the same child; a peer reply returns to the asking child with its context intact. Mutual asks work as long as both sides process inbound work. Keep exchanges bounded and evidence-driven, do not defer to a peer's conclusion without inspecting the evidence, and still return your own complete result. Peer messages do not replace the supervisor for scope, product, or architecture decisions.
337
+ Peer asks and one blocking supervisor request may wait concurrently in the same child; a peer reply returns to the asking child with its context intact. Mutual asks work as long as both sides process inbound work. Decide on evidence rather than deferring to a peer's conclusion, and still return your own complete result. `contact_supervisor` is for supervisor decisions; explicit user approval gates and authorization for destructive or external actions still apply.
337
338
 
338
- To enable this from the parent, launch related work as one parallel set (or an explicit `group`) and say in each task prompt who the peers are and what they should exchange; children do not coordinate spontaneously without that instruction. Use `group: true` to give one parallel set its own private group, or a named group to let later launches join the same conversation.
339
+ Children coordinate spontaneously: they discover peers with `list` and talk to them without waiting for the parent to name them. Launch related work as one parallel set (or an explicit `group`) so the children share a group. Use `group: true` to give one parallel set its own private group, or a named group to let later launches join the same conversation.
340
+
341
+ Scale the swarm with the task. For very complex work or requested heavy parallelism, run hundreds or thousands of agents that self-organize into teams and coordinate peer-to-peer like an organization. A child cannot call `subagent`, so nest teams through workflow stages (each runs its own parallel set) and child workflows up to `maxDepth`. `parallel.maxTasks`, `parallel.concurrency` and `parallel.runningCapacity` each default to 1000; to run more than 1000 children at once, raise all three; see the Scaling a swarm section of the user subagents guide.
339
342
 
340
343
  If intercom messages do not show up, check the bridge from the intercom side with `intercom({ action: "status" })`.
341
344
 
@@ -465,7 +468,7 @@ Give subagents specific tasks rather than vague mandates.
465
468
 
466
469
  All builtin specialists can use Intercom when permitted by the parent. Use `contact_supervisor` for parent decisions when the active bridge supplies it. Resolve known scope, product, and architecture questions before launching any writer. If the parent realizes mid-run that the scope is wrong, steer a reachable child, or `quit` it and `resume` it later with a corrected `message`.
467
470
 
468
- When several children work related angles, tell them to use ordinary `intercom` with each other for findings, ownership, and challenges so the parent is not the bottleneck for information that a sibling already holds. See [Peer coordination](#peer-coordination).
471
+ When several children work related angles, they use ordinary `intercom` with each other for findings, ownership, and challenges so the parent is not the bottleneck for information that a sibling already holds. See [Peer coordination](#peer-coordination).
469
472
 
470
473
  ### Intervene only on clear control signals
471
474
 
@@ -8215,7 +8215,7 @@ Use contact_supervisor for the supervisor. It resolves the supervisor session "{
8215
8215
  - Meaningful progress or unexpected discoveries that change the plan: contact_supervisor({ reason: "progress_update", message: "UPDATE: <summary>" })
8216
8216
  - Toward the supervisor, generic intercom is the fallback only when contact_supervisor is unavailable: intercom({ action: "ask", to: "{orchestratorTarget}", message: "<question>" })
8217
8217
 
8218
- Use ordinary intercom for peers. Sibling agents launched with you, and workflow stages in your invocation, share your Intercom group; intercom({ action: "list" }) shows who is live. Send or ask them directly to share findings and file locations, divide ownership of files or expensive steps, challenge a conclusion with evidence, or learn what a sibling already verified, instead of routing that through the supervisor. Peer asks and one blocking supervisor request may wait at the same time; keep exchanges bounded, decide on evidence rather than deference, and still return your own complete result. Scope, product, and architecture decisions remain supervisor decisions. Do not invent targets.
8218
+ Use ordinary intercom for peers. Sibling agents launched with you, and workflow stages in your invocation, share your Intercom group; intercom({ action: "list" }) shows who is live. Send or ask them directly to share findings and file locations, divide ownership of files or expensive steps, challenge a conclusion with evidence, or learn what a sibling already verified, instead of routing that through the supervisor. There are no limits on communication between agents; it is encouraged whenever you need to. Peer asks and one blocking supervisor request may wait at the same time; decide on evidence rather than deference, and still return your own complete result. Scope, product, and architecture decisions remain supervisor decisions. Do not invent targets.
8219
8219
 
8220
8220
  Do not use contact_supervisor or intercom for routine completion handoffs. If no coordination is needed, return a focused task result.`;
8221
8221
  function resolveIntercomSessionTarget(sessionName, sessionId) {
@@ -8538,9 +8538,9 @@ function resolveTempScopeId(options) {
8538
8538
  } catch {}
8539
8539
  return "shared";
8540
8540
  }
8541
- var MAX_PARALLEL_TASKS = 50;
8542
- var MAX_CONCURRENCY = 3;
8543
- var DEFAULT_RUNNING_CAPACITY = 4;
8541
+ var MAX_PARALLEL_TASKS = 1000;
8542
+ var MAX_CONCURRENCY = 1000;
8543
+ var DEFAULT_RUNNING_CAPACITY = 1000;
8544
8544
  var TEMP_ROOT_DIR = path6.join(os4.tmpdir(), `${APP_NAME2}-subagents-${resolveTempScopeId()}`);
8545
8545
  var TEMP_ARTIFACTS_DIR = path6.join(TEMP_ROOT_DIR, "artifacts");
8546
8546
  var SLASH_RESULT_TYPE = "subagent-slash-result";
@@ -19568,7 +19568,7 @@ var DEFAULT_PROMPT_GUIDANCE = [
19568
19568
  - Let each named agent use its declared model and fallback policy: omit the explicit model argument unless the user requests an exact model or a documented task requirement needs one, and record the reason for any override before launch. Do not choose an ad hoc model merely for diversity.
19569
19569
  - If an agent has no declared model or fallback policy, consult packages/coding-agent/docs/models/model-selection.md for general role and effort guidance and packages/coding-agent/docs/models/evals.md for factual per-evaluation benchmark records, then use workflow({ action: "models" }) when available to inspect the configured catalog. Pin only a returned fullId and only append a thinking level listed for that entry. If the catalog tool is unavailable, the catalog is empty, or no catalog model matches the documented evidence and role constraints, leave the child unpinned and state the limitation rather than inventing a model. Do not inspect credentials or infer why a model is absent.
19570
19570
  - Workflow stages automatically receive their invocation-scoped Intercom group, and delegated children inherit the launching session's group across single, parallel, and follow-up work. Do not create or propagate group identifiers for ordinary workflow-stage delegation; use an explicit group only for an intentional topology override. Keep contact_supervisor available for cross-group escalation.
19571
- - Coordination is not only vertical. Same-group children and sibling workflow stages can discover each other with intercom list and send/ask each other directly to debate findings with evidence, hand off file locations and reproductions, claim ownership of shared files or expensive steps, and learn what a sibling already verified, instead of routing everything through the supervisor. contact_supervisor stays reserved for supervisor decisions. Children do not coordinate spontaneously: when parallel work is related, name the peers and the expected exchange in each task prompt, keep the exchange bounded, and require each child to return its own result.`
19571
+ - Default to peer-to-peer (swarm) coordination; the supervisor is not a message relay. There are no limits on communication between agents; it is encouraged whenever you need to. Same-group children and sibling workflow stages discover each other with intercom list and send/ask each other directly to broadcast findings, debate, claim work, hand off paths and reproductions, and self-organize. contact_supervisor is for supervisor decisions, and each child still returns its own result. Scale the swarm with the task: for very complex work or when the user asks for heavy parallelism, run hundreds or thousands of agents that self-organize into teams (named Intercom groups, per-stage subagent sets, child workflows) and coordinate peer-to-peer like an organization.`
19572
19572
  ];
19573
19573
 
19574
19574
  // dist/builtin/subagents/src/extension/schemas.ts
@@ -19682,7 +19682,7 @@ var SubagentParams = Type.Object({
19682
19682
  })),
19683
19683
  concurrency: Type.Optional(Type.Integer({
19684
19684
  minimum: 1,
19685
- description: "Top-level PARALLEL mode only: max concurrent tasks. Defaults to config.parallel.concurrency or 3."
19685
+ description: "Top-level PARALLEL mode only: max concurrent tasks. Defaults to config.parallel.concurrency or 1000."
19686
19686
  })),
19687
19687
  group: Type.Optional(GroupSchema),
19688
19688
  worktree: Type.Optional(Type.Boolean({
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/web-access",
3
- "version": "0.9.43",
3
+ "version": "0.9.44-alpha.2",
4
4
  "private": true,
5
5
  "description": "Atomic extension for web search, URL fetching, GitHub repo cloning, PDF/video extraction. Fork of: https://github.com/nicobailon/pi-web-access",
6
6
  "contributors": [
@@ -6,6 +6,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.9.44-alpha.2] - 2026-10-24
10
+
11
+ ### Fixed
12
+
13
+ - A sticky Intercom broadcast, such as `workflow:<rootRunId>/**`, that reaches many workflow stages no longer makes the workflow journal grow quadratically. Recording one more delivery used to rewrite every stage's deliveries in the run's queued-message event; each event now stores only the deliveries that changed since the run's previous event. In a 160-worker run this shrinks those events from about 160 MB to about 9 MB. Journals written by earlier versions read and resume unchanged ([#3920](https://github.com/bastani-inc/atomic/issues/3920))
14
+
15
+ ## [0.9.44-alpha.1] - 2026-10-24
16
+
17
+ ### Changed
18
+
19
+ - Workflow stages now default to peer-to-peer (swarm) exchange with no limits on communication between agents: stages coordinate with each other directly instead of relaying through the supervisor, and each stage still returns its own structured result. Workflow guidance now scales swarms to hundreds or thousands of agents for very complex work or requested heavy parallelism, organized into named subgroups, per-stage subagent sets and child workflows. The `defaultConcurrency` setting, which bounds how many workflow stages and `ctx.parallel(...)` tasks run at once when no per-call `concurrency` is given, now defaults to 1000 instead of 3; set it lower to limit concurrency.
20
+ - The `maxDepth` setting, which limits how many workflow levels `ctx.workflow(...)` can nest, now defaults to 3 instead of 4. Set it higher in the workflow config to allow deeper nesting.
21
+
22
+ ### Fixed
23
+
24
+ - Running many local workers at once no longer freezes the interactive TUI. A local worker pool now runs its workers under a separate pool coordinator process, which handles worker messages, heartbeats, pool journal writes and the Intercom routes of pooled children. The root process only receives periodic progress summaries. If the coordinator process dies, its workers exit with it and `ctx.workflow(child)` throws a retryable `WorkflowInfrastructureError` with code `worker_lost` and the message `Local worker pool coordinator exited (…)` ([#3903](https://github.com/bastani-inc/atomic/issues/3903))
25
+ - Local worker heartbeats and session appends no longer grow the workflow journal on every renewal or entry. Lease renewals update the child's work entry in place instead of adding a row, and session appends no longer repeat the stage checkpoint and the full request with each entry. The first time a pool opens an existing journal, it removes the stored renewal rows and keeps only a digest of each recorded pool request; older runs stay readable and resumable ([#3903](https://github.com/bastani-inc/atomic/issues/3903))
26
+ - `/workflow status` no longer reports `durable checkpoint topology is malformed or incomplete` for a running or crashed root, for example one that was killed, whose child workflow had failed or been skipped while the root kept going. Resuming such a root also replays its completed children from their checkpoints again instead of failing ([#3903](https://github.com/bastani-inc/atomic/issues/3903))
27
+ - Stages of child workflows that run on local workers no longer fail every Intercom call (`join`, `list`, `status`, `send`) with `Live workflow-stage route has no registered workflow owner` when a root fans out many children at once. A pooled stage now starts only after the broker holds its run's Intercom route, and a stage whose route is registering again after a dropped connection waits for it instead of failing. All pooled runs of one root invocation share one route connection, one per invocation rather than per host because the broker grants route ownership per invocation group. A run whose route the broker refuses moves to a connection of its own, so it no longer takes the other runs' routes down with it; only refused runs get one, so the number of extra connections is bounded by the refused runs, not by the number of runs. Pausing, resuming or stopping the root while a stage waits for its route still takes effect at once ([#3904](https://github.com/bastani-inc/atomic/issues/3904))
28
+
9
29
  ## [0.9.43] - 2026-10-24
10
30
 
11
31
  ### Added
@@ -457,7 +457,7 @@ When an item configures both `schema` and `output`, its successful `structured_o
457
457
 
458
458
  Send material updates through Intercom to every affected workflow stage, including stages that have not started. Join `workflow:<rootRunId>` and use `intercom list` to see live, pending, and possible future targets, then send to `workflow:<rootRunId>/<segment>[/<segment>...]`; segments may be stage names, run ids, or globs (`*` matches one segment, `**` any depth). Name and pattern sends remain sticky for every future match until root termination. When shared scope or acceptance criteria change, broadcast one authoritative update to `workflow:<rootRunId>/**` (or a narrower pattern) rather than enumerating stages; live matches receive it immediately and future matches receive it before their first model turn. A valid target outside the known set queues with a `notInKnownSet` warning and settles undeliverable at terminal only if never delivered. Use `ask` only once the target is live and can reply. Workflow `answer` handles pending human-input prompts, and workflow `resume` handles paused run control.
459
459
 
460
- Stages are also peers of one another. Every stage in an invocation shares the `workflow:<rootRunId>` group with its siblings and with the subagents they delegate, so a live stage can `intercom list` the others and `send`/`ask` them directly to debate a finding with evidence, hand off paths and reproductions, claim shared files or an expensive step, or learn what a sibling already verified. A `send` to a known pending sibling queues until it starts; an `ask` to a completed sibling that retains a valid conversation reopens it for a post-mortem turn. Named subgroups isolate their members from sibling subgroups. Stages do not coordinate spontaneously: when parallel stages should exchange evidence, the prompt names the peers or how to discover them, bounds the exchange, and requires each stage to return its own result. See [peer coordination between stages](../coding-agent/docs/workflows/reliable-design.md#peer-coordination-between-stages).
460
+ Stages are also peers of one another. Every stage in an invocation shares the `workflow:<rootRunId>` group with its siblings and with the subagents they delegate, so a live stage can `intercom list` the others and `send`/`ask` them directly to debate a finding with evidence, hand off paths and reproductions, claim shared files or an expensive step, or learn what a sibling already verified. A `send` to a known pending sibling queues until it starts; an `ask` to a completed sibling that retains a valid conversation reopens it for a post-mortem turn. Named subgroups isolate their members from sibling subgroups. Peer-to-peer (swarm) exchange is the default, and the supervisor is not a message relay. There are no limits on communication between agents; it is encouraged whenever you need to. Stages coordinate spontaneously and each still returns its own result. For very complex work or requested heavy parallelism, swarms scale to hundreds or thousands of agents organized into teams; see [Scaling a swarm](../coding-agent/docs/subagents.md#scaling-a-swarm) for the limits. See [peer coordination between stages](../coding-agent/docs/workflows/reliable-design.md#peer-coordination-between-stages).
461
461
 
462
462
  ### Model fallbacks
463
463
 
@@ -1368,7 +1368,13 @@ function createStoreContext(state = createStoreState()) {
1368
1368
  }
1369
1369
  return cachedGraphSnapshot;
1370
1370
  }
1371
+ let batchDepth = 0;
1372
+ let batchedNotification = false;
1371
1373
  function notify() {
1374
+ if (batchDepth > 0) {
1375
+ batchedNotification = true;
1376
+ return;
1377
+ }
1372
1378
  observation.capture();
1373
1379
  for (const fn of state.invalidationListeners) {
1374
1380
  try {
@@ -1388,6 +1394,18 @@ function createStoreContext(state = createStoreState()) {
1388
1394
  state.version++;
1389
1395
  notify();
1390
1396
  }
1397
+ function batch(update) {
1398
+ batchDepth++;
1399
+ try {
1400
+ return update();
1401
+ } finally {
1402
+ batchDepth--;
1403
+ if (batchDepth === 0 && batchedNotification) {
1404
+ batchedNotification = false;
1405
+ notify();
1406
+ }
1407
+ }
1408
+ }
1391
1409
  function findRun(runId) {
1392
1410
  return state.runs.find((r) => r.id === runId);
1393
1411
  }
@@ -1441,6 +1459,7 @@ function createStoreContext(state = createStoreState()) {
1441
1459
  snapshot,
1442
1460
  graphSnapshot,
1443
1461
  notify,
1462
+ batch,
1444
1463
  bumpAndNotify,
1445
1464
  findRun,
1446
1465
  findStage,
@@ -2261,6 +2280,9 @@ function createRunStoreMethods(context) {
2261
2280
  subscribeInvalidation(fn) {
2262
2281
  state.invalidationListeners.add(fn);
2263
2282
  return () => state.invalidationListeners.delete(fn);
2283
+ },
2284
+ batch(update) {
2285
+ return context.batch(update);
2264
2286
  }
2265
2287
  };
2266
2288
  }
@@ -37,7 +37,7 @@ import {
37
37
  parseFailureDiagnostics,
38
38
  summarizeReviewConvergence,
39
39
  reverify_consolidated_batch
40
- } from "./chunk-frqxd4d1.js";
40
+ } from "./chunk-k8d7ehjx.js";
41
41
  import {
42
42
  VERIFICATION_SCALE
43
43
  } from "./chunk-n1910xc4.js";
@@ -39,7 +39,7 @@ import {
39
39
  reviewerFailureText,
40
40
  summarizeReviewConvergence,
41
41
  reverify_consolidated_batch
42
- } from "./chunk-frqxd4d1.js";
42
+ } from "./chunk-k8d7ehjx.js";
43
43
  import {
44
44
  fold_usage
45
45
  } from "./chunk-tgt0s5e5.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  goal_default
3
- } from "./chunk-3s95f7ry.js";
4
- import"./chunk-frqxd4d1.js";
3
+ } from "./chunk-qxpymnaf.js";
4
+ import"./chunk-k8d7ehjx.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
@@ -16,8 +16,8 @@ import {
16
16
  } from "./chunk-z3pajrfs.js";
17
17
  import {
18
18
  goal_default
19
- } from "./chunk-3s95f7ry.js";
20
- import"./chunk-frqxd4d1.js";
19
+ } from "./chunk-qxpymnaf.js";
20
+ import"./chunk-k8d7ehjx.js";
21
21
  import"./chunk-z0d03ktm.js";
22
22
  import {
23
23
  open_claude_design_default
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-dcxscfnb.js";
28
28
  import {
29
29
  ralph_default
30
- } from "./chunk-edhf30ef.js";
30
+ } from "./chunk-zjecnjxx.js";
31
31
  import {
32
32
  tournament_default
33
33
  } from "./chunk-49kkbdpr.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ralph_default
3
- } from "./chunk-edhf30ef.js";
4
- import"./chunk-frqxd4d1.js";
3
+ } from "./chunk-zjecnjxx.js";
4
+ import"./chunk-k8d7ehjx.js";
5
5
  import"./chunk-2377r57g.js";
6
6
  import"./chunk-z0d03ktm.js";
7
7
  import"./chunk-n1910xc4.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bastani/workflows",
3
- "version": "0.9.43",
3
+ "version": "0.9.44-alpha.2",
4
4
  "private": true,
5
5
  "description": "Atomic extension for multi-stage workflow authoring and execution.",
6
6
  "contributors": [