@bastani/atomic 0.9.19-alpha.5 → 0.9.19-alpha.7
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/CHANGELOG.md +32 -0
- package/README.md +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/broker/client.ts +19 -1
- package/dist/builtin/intercom/index.bundle.mjs +8 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/README.md +3 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +7 -7
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +3 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +2 -1
- package/dist/builtin/web-access/CHANGELOG.md +13 -0
- package/dist/builtin/web-access/README.md +31 -24
- package/dist/builtin/web-access/index.bundle.mjs +16121 -80
- package/dist/builtin/web-access/package.json +2 -1
- package/dist/builtin/workflows/CHANGELOG.md +15 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
- package/dist/builtin/workflows/builtin/{chunk-vhmnzdj9.js → chunk-1jth021m.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-p8jjwfg6.js → chunk-2377r57g.js} +4 -2
- package/dist/builtin/workflows/builtin/{chunk-hbnwv56f.js → chunk-31j2gs7h.js} +2 -2
- package/dist/builtin/workflows/builtin/{chunk-n8zysf1t.js → chunk-ngkqkzej.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-1nbq96fh.js → chunk-nkrafh9s.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-1kx4aggw.js → chunk-wf741bv3.js} +2 -2
- package/dist/builtin/workflows/builtin/{chunk-t6x2d78s.js → chunk-z29qbehr.js} +1 -1
- package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +7 -7
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/builtin/tournament.js +2 -2
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +339 -31
- package/dist/builtin/workflows/src/index.js +67 -19
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -0
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +10 -0
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/tools/bash.d.ts +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +3 -2
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +91 -12
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/file-mutation-coordinator.d.ts +255 -0
- package/dist/core/tools/file-mutation-coordinator.d.ts.map +1 -0
- package/dist/core/tools/file-mutation-coordinator.js +300 -0
- package/dist/core/tools/file-mutation-coordinator.js.map +1 -0
- package/dist/core/tools/file-mutation-queue.d.ts +14 -1
- package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/dist/core/tools/file-mutation-queue.js +15 -3
- package/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/dist/core/tools/hashline.d.ts +9 -0
- package/dist/core/tools/hashline.d.ts.map +1 -1
- package/dist/core/tools/hashline.js +12 -1
- package/dist/core/tools/hashline.js.map +1 -1
- package/dist/core/tools/index.d.ts +9 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +67 -12
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/non-minting-snapshot-store.d.ts +49 -0
- package/dist/core/tools/non-minting-snapshot-store.d.ts.map +1 -0
- package/dist/core/tools/non-minting-snapshot-store.js +64 -0
- package/dist/core/tools/non-minting-snapshot-store.js.map +1 -0
- package/dist/core/tools/powershell.d.ts +2 -2
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js +2 -5
- package/dist/core/tools/powershell.js.map +1 -1
- package/dist/core/tools/read-document-extract.js.map +1 -1
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts +30 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +97 -8
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/task-live-transcript.d.ts +1 -1
- package/dist/modes/interactive/components/task-live-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/task-live-transcript.js +19 -11
- package/dist/modes/interactive/components/task-live-transcript.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +3 -1
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +28 -4
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +3 -0
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive-engine/activity-watchdog.d.ts +2 -2
- package/dist/modes/interactive-engine/activity-watchdog.d.ts.map +1 -1
- package/dist/modes/interactive-engine/activity-watchdog.js.map +1 -1
- package/dist/modes/interactive-engine/engine-diagnostic-view.d.ts +3 -1
- package/dist/modes/interactive-engine/engine-diagnostic-view.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-diagnostic-view.js +11 -0
- package/dist/modes/interactive-engine/engine-diagnostic-view.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +2 -1
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/rpc/rpc-client-process.d.ts +2 -0
- package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-process.js +23 -1
- package/dist/modes/rpc/rpc-client-process.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +20 -3
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/utils/markit.d.ts +2 -0
- package/dist/utils/markit.d.ts.map +1 -1
- package/dist/utils/markit.js +65 -5
- package/dist/utils/markit.js.map +1 -1
- package/docs/background-tasks.md +15 -11
- package/docs/build.md +51 -0
- package/docs/changelog.mdx +8 -8
- package/docs/compaction/reference.md +267 -0
- package/docs/compaction.md +36 -219
- package/docs/computer-use.md +35 -0
- package/docs/containerization.md +9 -5
- package/docs/custom-provider/api-reference.md +145 -0
- package/docs/custom-provider/oauth.md +131 -0
- package/docs/custom-provider/override.md +34 -0
- package/docs/custom-provider/registration.md +163 -0
- package/docs/custom-provider/streaming.md +214 -0
- package/docs/custom-provider.md +43 -607
- package/docs/development.md +87 -0
- package/docs/docs.json +199 -76
- package/docs/environment-variables.md +1 -1
- package/docs/extensions/api-reference.md +1001 -0
- package/docs/extensions/authoring.md +676 -0
- package/docs/extensions/events.md +793 -0
- package/docs/extensions/examples.md +94 -0
- package/docs/extensions/ui.md +470 -0
- package/docs/extensions.md +270 -2768
- package/docs/getting-started/authentication.md +55 -0
- package/docs/getting-started/first-session.md +172 -0
- package/docs/getting-started/installation.md +154 -0
- package/docs/getting-started/project-instructions.md +43 -0
- package/docs/guides/configuration.md +65 -0
- package/docs/guides/intercom.md +24 -0
- package/docs/guides/non-interactive.md +33 -0
- package/docs/guides/subagents.md +24 -0
- package/docs/guides/workflows.md +27 -0
- package/docs/guides.md +41 -0
- package/docs/index.md +13 -45
- package/docs/intercom/operations.md +178 -0
- package/docs/intercom/reference.md +146 -0
- package/docs/intercom.md +54 -259
- package/docs/json.md +17 -0
- package/docs/llama-cpp.md +5 -0
- package/docs/models/artificial-analysis-index.md +89 -0
- package/docs/models/evals.md +2 -2
- package/docs/models/model-selection.md +3 -3
- package/docs/models/pareto-efficiency.md +2 -2
- package/docs/models/reference.md +601 -0
- package/docs/models.md +45 -550
- package/docs/packages/authoring.md +88 -0
- package/docs/packages/reference.md +43 -0
- package/docs/packages.md +28 -107
- package/docs/programmatic.md +29 -0
- package/docs/prompt-templates.md +11 -0
- package/docs/providers/reference.md +23 -0
- package/docs/providers.md +10 -15
- package/docs/quickstart.md +44 -238
- package/docs/reference/cli.md +252 -0
- package/docs/reference.md +52 -0
- package/docs/rpc/examples.md +64 -0
- package/docs/rpc/extension-ui.md +198 -0
- package/docs/rpc/protocol.md +1341 -0
- package/docs/rpc.md +109 -1346
- package/docs/sdk/reference.md +1090 -0
- package/docs/sdk.md +56 -1002
- package/docs/session-format.md +2 -0
- package/docs/sessions.md +6 -10
- package/docs/settings.md +6 -45
- package/docs/skills/authoring.md +95 -0
- package/docs/skills/reference.md +60 -0
- package/docs/skills.md +20 -122
- package/docs/subagents/authoring.md +37 -0
- package/docs/subagents/reference.md +60 -0
- package/docs/subagents.md +42 -96
- package/docs/terminal-setup.md +1 -1
- package/docs/themes/reference.md +176 -0
- package/docs/themes.md +21 -135
- package/docs/tmux.md +5 -0
- package/docs/tools/edit.md +5 -0
- package/docs/tools.md +31 -0
- package/docs/tui/reference.md +343 -0
- package/docs/tui.md +23 -286
- package/docs/usage.md +26 -209
- package/docs/web-access.md +40 -0
- package/docs/windows.md +2 -1
- package/docs/workflows/api-reference.md +11 -4
- package/docs/workflows/authoring.md +4 -2
- package/docs/workflows/builtins.md +2 -2
- package/docs/workflows/operations.md +11 -7
- package/docs/workflows/reliable-design.md +21 -3
- package/docs/workflows/verification.md +8 -0
- package/examples/extensions/gondolin/index.ts +116 -148
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/ssh.ts +56 -34
- package/npm-shrinkwrap.json +33 -33
- package/package.json +4 -4
package/docs/intercom.md
CHANGED
|
@@ -25,34 +25,41 @@ Atomic bundles `@bastani/intercom`, a first-party extension for direct 1:1 messa
|
|
|
25
25
|
- Supervisor decisions and structured interviews for delegated subagents
|
|
26
26
|
- Pair debugging between sessions
|
|
27
27
|
|
|
28
|
+
## Where to go next
|
|
29
|
+
|
|
30
|
+
Intercom coordinates several Atomic sessions on one machine. Read this page for the quick start and the coordination patterns, then continue:
|
|
31
|
+
|
|
32
|
+
- [Intercom operations](/intercom/operations) — connection lifecycle, delivery behavior, notifications, shortcuts, internals, and limits.
|
|
33
|
+
- [Intercom reference](/intercom/reference) — the `intercom` tool contract and every intercom setting.
|
|
34
|
+
|
|
28
35
|
## Table of Contents
|
|
29
36
|
|
|
30
37
|
- [Quick Start](#quick-start)
|
|
31
38
|
- [From the Keyboard](#from-the-keyboard)
|
|
32
39
|
- [From the Agent](#from-the-agent)
|
|
33
40
|
- [Receiving Messages](#receiving-messages)
|
|
34
|
-
- [How Connection Works](#how-connection-works)
|
|
35
|
-
- [The intercom Tool](#the-intercom-tool)
|
|
36
|
-
- [Actions](#actions)
|
|
37
|
-
- [Targeting Sessions and Pending Workflow Stages](#targeting-sessions-and-pending-workflow-stages)
|
|
38
|
-
- [Deferred delivery to pending stages](#deferred-delivery-to-pending-stages)
|
|
39
|
-
- [send vs ask vs reply](#send-vs-ask-vs-reply)
|
|
40
|
-
- [Attachments](#attachments)
|
|
41
|
+
- [How Connection Works](/intercom/operations#how-connection-works)
|
|
42
|
+
- [The intercom Tool](/intercom/reference#the-intercom-tool)
|
|
43
|
+
- [Actions](/intercom/reference#actions)
|
|
44
|
+
- [Targeting Sessions and Pending Workflow Stages](/intercom/reference#targeting-sessions-and-pending-workflow-stages)
|
|
45
|
+
- [Deferred delivery to pending stages](/intercom/reference#deferred-delivery-to-pending-stages)
|
|
46
|
+
- [send vs ask vs reply](/intercom/reference#send-vs-ask-vs-reply)
|
|
47
|
+
- [Attachments](/intercom/reference#attachments)
|
|
41
48
|
- [Coordination Patterns](#coordination-patterns)
|
|
42
49
|
- [Subagent Escalation: contact_supervisor](#subagent-escalation-contact_supervisor)
|
|
43
50
|
- [When the Tool Appears](#when-the-tool-appears)
|
|
44
51
|
- [The Three Reasons](#the-three-reasons)
|
|
45
52
|
- [What the Supervisor Sees](#what-the-supervisor-sees)
|
|
46
53
|
- [Structured Interview Replies](#structured-interview-replies)
|
|
47
|
-
- [Workflow and Subagent Notifications](#workflow-and-subagent-notifications)
|
|
48
|
-
- [Workflow Delivery Modes](#workflow-delivery-modes)
|
|
49
|
-
- [Subagent Control Notices](#subagent-control-notices)
|
|
50
|
-
- [Delivery Ordering](#delivery-ordering)
|
|
51
|
-
- [Configuration](#configuration)
|
|
52
|
-
- [Keyboard Shortcuts](#keyboard-shortcuts)
|
|
53
|
-
- [How It Works](#how-it-works)
|
|
54
|
+
- [Workflow and Subagent Notifications](/intercom/operations#workflow-and-subagent-notifications)
|
|
55
|
+
- [Workflow Delivery Modes](/intercom/operations#workflow-delivery-modes)
|
|
56
|
+
- [Subagent Control Notices](/intercom/operations#subagent-control-notices)
|
|
57
|
+
- [Delivery Ordering](/intercom/operations#delivery-ordering)
|
|
58
|
+
- [Configuration](/intercom/reference#configuration)
|
|
59
|
+
- [Keyboard Shortcuts](/intercom/operations#keyboard-shortcuts)
|
|
60
|
+
- [How It Works](/intercom/operations#how-it-works)
|
|
54
61
|
- [Intercom vs Shared-Room Messengers](#intercom-vs-shared-room-messengers)
|
|
55
|
-
- [Limitations](#limitations)
|
|
62
|
+
- [Limitations](/intercom/operations#limitations)
|
|
56
63
|
- [Related Docs](#related-docs)
|
|
57
64
|
|
|
58
65
|
## Quick Start
|
|
@@ -127,122 +134,39 @@ Atomic treats ordinary `intercom` as a mandatory runtime tool in main chat and e
|
|
|
127
134
|
|
|
128
135
|
## How Connection Works
|
|
129
136
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
A session becomes intercom-connected when all of these are true:
|
|
133
|
-
|
|
134
|
-
- the mandatory bundled Intercom extension is loaded in that Atomic model session
|
|
135
|
-
- the model or user has invoked an Intercom surface in that session, **or** the parent runtime is authorizing an Intercom-enabled child supervisor relationship
|
|
136
|
-
- the local broker is running or can be auto-started
|
|
137
|
-
|
|
138
|
-
The session list and ALT+M picker show connected agent sessions, not every open Atomic process. Internal workflow routing/control connections, model-less `ctx.ui` prompts, and `ctx.tool` nodes are not recipients and do not contribute to session counts or presence events. Genuine agents remain visible and messageable while executing tools, including `tool:workflow`, or awaiting human input.
|
|
139
|
-
|
|
140
|
-
Name sessions with `/name` so they can target each other (for example `/name planner` and `/name worker`). If a session is unnamed, Intercom exposes a runtime-only fallback alias like `subagent-chat-1a2b3c4d-1111-4222-8333-123456789abc` so other sessions can still target it. That alias is not persisted as the session title, so resume pickers keep showing the transcript snippet instead of a generic name.
|
|
137
|
+
Moved to [Intercom operations](/intercom/operations#how-connection-works).
|
|
141
138
|
|
|
142
139
|
### Troubleshooting initialization
|
|
143
140
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
If initialization keeps failing, check the reported cause and `~/.atomic/agent/intercom/broker.log` (or the Intercom directory under `ATOMIC_CODING_AGENT_DIR`). Do not automatically resend an operation reported with an unknown delivery outcome; check with the recipient first.
|
|
141
|
+
Moved to [Intercom operations](/intercom/operations#troubleshooting-initialization).
|
|
147
142
|
|
|
148
143
|
## The intercom Tool
|
|
149
144
|
|
|
150
|
-
|
|
151
|
-
|-----------|------|-------------|
|
|
152
|
-
| `action` | string | `"list"`, `"groups"`, `"join"`, `"leave"`, `"send"`, `"ask"`, `"reply"`, `"pending"`, or `"status"` |
|
|
153
|
-
| `to` | string | Exact session name/full session ID, or `workflow:<rootRunId>/<segment>[/<segment>...]`; `*` matches one segment and `**` any depth. Sends support pending/future patterns and broadcast; `ask` requires a live target. |
|
|
154
|
-
| `message` | string | Message text (for send/ask/reply) |
|
|
155
|
-
| `attachments` | array | Optional `file`, `snippet`, or `context` attachments |
|
|
156
|
-
| `replyTo` | string | Optional message ID for threading or replying to an `ask` |
|
|
157
|
-
| `group` | string | Group name for `join` or an optional targeted `leave`; read-only group filter for `list`/`status`. `send`/`ask` remain limited to shared memberships. |
|
|
145
|
+
Moved to [Intercom reference](/intercom/reference#the-intercom-tool).
|
|
158
146
|
|
|
159
147
|
### Actions
|
|
160
148
|
|
|
161
|
-
|
|
162
|
-
|--------|----------|
|
|
163
|
-
| `join` | Adds a trimmed named group membership and creates the group if needed. The action waits for broker acknowledgement and reports the complete resulting membership set. `default` is shared; `true` and `auto` are reserved for subagent auto-groups. |
|
|
164
|
-
| `leave` | With `group`, removes only that membership and keeps all others. Without `group`, resets the session to its resolved startup home group. Both forms report the resulting membership set. |
|
|
165
|
-
| `groups` | Lists every group represented by a connected session, with its session count and a marker for each group this session belongs to. Use it to discover names rather than guessing. |
|
|
166
|
-
| `list` | Returns the current session, active sessions sharing a membership, materialized workflow stages labeled `PENDING` or `RUNNING` with canonical path targets, and possible future literals, globs, and child paths with queued counts. Pass `group` for a read-only view of one group. |
|
|
167
|
-
| `send` | Fire-and-forget delivery through ordinary Intercom. A live workflow-stage match receives the message immediately. A pending, future, name, or pattern path is persisted as sticky delivery and returns `queued`; valid paths outside the known set also return `notInKnownSet`. Requires `to` and `message`; cannot message the current session. |
|
|
168
|
-
| `ask` | Sends a message and blocks until a live recipient replies (10-minute timeout). An ask to a known workflow stage whose session has not initialized is refused with `pending_stage_ask_unsupported` and recommends ordinary `send`; holding a waiter until a stage eventually starts would be unbounded. A live recipient disconnect fails promptly. Parallel children continue in the same execution after a correlated reply; single-child parent handoffs remain unchanged. |
|
|
169
|
-
| `reply` | Replies to the intercom-triggered message of the current turn; otherwise falls back to the single unresolved inbound ask. With multiple pending asks, pass `to` or inspect with `pending` first. |
|
|
170
|
-
| `pending` | Lists unresolved inbound asks with sender, message ID, elapsed time, and a short preview. |
|
|
171
|
-
| `status` | Shows connection status, session ID, every group this session belongs to, and the count of active sessions visible through those memberships. A `group` filter remains a read-only peek. |
|
|
172
|
-
|
|
173
|
-
To give two plain chat sessions a private shared membership, have both call:
|
|
174
|
-
|
|
175
|
-
```typescript
|
|
176
|
-
intercom({ action: "join", group: "api-review" })
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Joining is additive: existing memberships remain active, and the broker updates presence without changing the session ID. Use `intercom({ action: "groups" })` to discover all available names and membership markers. `intercom({ action: "leave", group: "api-review" })` removes only that membership; `intercom({ action: "leave" })` resets to the home group resolved at startup. Rejected or unacknowledged changes leave client and inheritance state unchanged. Ordinary delivery requires a shared membership, while `contact_supervisor` retains its capability-based cross-group path.
|
|
180
|
-
|
|
181
|
-
An ordinary host session can join several workflow invocation groups and send to
|
|
182
|
-
each group's `workflow:<rootRunId>/**` target, including after a broker reconnect.
|
|
183
|
-
Reconnection preserves the session's startup identity separately from its joined
|
|
184
|
-
memberships; joining a workflow does not turn the host into a workflow worker.
|
|
185
|
-
Groups explicitly left stay absent after reconnect; the startup identity is not
|
|
186
|
-
automatically added back to the membership list.
|
|
187
|
-
Actual workflow workers retain their original invocation boundary across reconnects:
|
|
188
|
-
joining another group does not grant that invocation's parent-control authority.
|
|
189
|
-
|
|
190
|
-
Sent and received messages are recorded in session history as `intercom_sent` / `intercom_received` entries.
|
|
149
|
+
Moved to [Intercom reference](/intercom/reference#actions).
|
|
191
150
|
|
|
192
151
|
### Targeting Sessions and Pending Workflow Stages
|
|
193
152
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Known non-agent IDs, names, and workflow paths are refused rather than delivered or queued for a future agent. This includes run-level `ctx.ui` prompts, synthetic prompt stages (including retained completed prompts), and `ctx.tool` nodes. Knowing an internal connection's ID does not bypass this broker policy, and supervisor delivery cannot bypass it either. Workflow patterns and `workflow:<rootRunId>/**` still queue for future agent stages, but never deliver to prompt/tool nodes or routing connections.
|
|
197
|
-
|
|
198
|
-
This refusal also covers nested paths using boundary-stage names or IDs, mixed with materialized run-ID segments. The same spellings still resolve genuine agent stages.
|
|
199
|
-
|
|
200
|
-
A genuine agent's registered aliases remain valid when its pending-delivery capability is unavailable or its stage completes, even if a non-agent node shares its display name. The host retains that agent identity separately from discovery eligibility so aliases can be restored after an agent or broker reconnect. An agent's human-input wait is not a model-less `ctx.ui` node.
|
|
201
|
-
|
|
202
|
-
If several live agent stages share a workflow-stage name, `ask` remains ambiguous: use an exact stage-ID path from `intercom list`. Name-based `send` retains sticky delivery to matching agents. A prompt or tool with that same name does not turn genuine-agent matches into non-agent refusals.
|
|
203
|
-
|
|
204
|
-
Before steering a stage from the main chat, enter the workflow invocation context by joining `workflow:<rootRunId>` with `intercom({ action: "join", group: "workflow:<rootRunId>" })`; workflow-owned invocation sessions already start there. A member of that invocation group can list, `send` to, and live-`ask` exact stages in any invocation-owned subgroup (`workflow:<rootRunId>/<name>`), including intentionally isolated reviewer batches. This control is directional: a session registered as a subgroup stage cannot gain parent control by joining the invocation group, subgroup members cannot discover or reach sibling subgroups, and another workflow invocation remains refused. `PENDING` accepts queued `send` only; `RUNNING` accepts immediate `send` and correlated `ask`/`reply`.
|
|
153
|
+
Moved to [Intercom reference](/intercom/reference#targeting-sessions-and-pending-workflow-stages).
|
|
205
154
|
|
|
206
155
|
### Deferred delivery to pending stages
|
|
207
156
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
Name and pattern paths remain sticky for every future matching stage until the root terminates. When shared scope or acceptance criteria change, broadcast one authoritative update to `workflow:<rootRunId>/**` (or a narrower path pattern) rather than enumerating stages: `**` reaches every live stage now and every future descendant. A syntactically valid path outside the persisted known set still queues and returns `notInKnownSet`; if it never delivers, root-terminal settlement sends the correlated undeliverable notification. A sticky entry delivered at least once is not reported undeliverable.
|
|
211
|
-
|
|
212
|
-
The workflows extension persists up to **50 queued messages per target** with workflow state. Messages survive resume/replay and broker restart, and logical message IDs prevent redelivery to the same materialized stage across stage-attempt restarts. When a matching stage session initializes, it receives the FIFO entries through the ordinary Intercom inbound path before its first model turn, under the heading **Messages received before you started**, with sender identity and `Sent:` timestamps visible separately from the task prompt.
|
|
213
|
-
|
|
214
|
-
Only a workflow invocation member with eligible invocation-control authority can queue to its invocation-owned stages; this includes a main-chat session that explicitly joined `workflow:<rootRunId>`. Subgroup peers and another root run remain refused even if they add that membership. An explicit stage `group: "default"` is a shared-group escape, is not workflow-owned, and does not receive pending invocation delivery. An ineligible attempt is refused with `Target workflow run is in a different intercom group`. The 51st queued message is refused with `Pending stage message queue is full (limit 50)` rather than evicting an earlier entry.
|
|
215
|
-
|
|
216
|
-
If the destination stage is skipped, the run terminates, or the stage becomes terminal before its session initializes, Atomic marks the queued message undeliverable and sends the correlated failure notification when acknowledgment was requested. Use `ask` only on a live, reply-capable exact target. Pending, future, and pattern asks return `pending_stage_ask_unsupported`; use ordinary `send`, because a stage may start much later or never start.
|
|
157
|
+
Moved to [Intercom reference](/intercom/reference#deferred-delivery-to-pending-stages).
|
|
217
158
|
|
|
218
159
|
### Groups
|
|
219
160
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- `list` still lists sessions. Without a filter it returns the union of sessions visible through any of your memberships; with `group`, it gives a read-only view of that one group.
|
|
223
|
-
- `groups` lists every currently available group, its connected-session count, and whether this session is a member.
|
|
224
|
-
- `join` adds one membership. `leave` removes the named membership, while bare `leave` resets the complete set to the startup home group.
|
|
225
|
-
- `status` reports the complete membership set. `session_joined`/`session_left`/`presence_update` events are delivered whenever a membership change affects visibility.
|
|
226
|
-
|
|
227
|
-
A session's home group is resolved with this precedence: explicit stage/task/subagent group > runtime-owned workflow invocation group or inherited launching-session group > env `ATOMIC_INTERCOM_GROUP` (legacy `PI_INTERCOM_GROUP`) > Intercom `config.json` `"group"` > `"default"`. Workflow stage named groups and `group: true` are namespaced under `workflow:<rootRunId>/...`, preventing cross-run collisions while preserving sibling isolation. `group: "default"` remains the explicit non-owned escape. The invocation group has asymmetric exact-target control over its owned subgroups; ownership does not grant reverse or lateral access.
|
|
228
|
-
|
|
229
|
-
The broker, not the client, marks validated supervisor traffic. Ordinary `send` frames remain membership-isolated even if a raw client forges a supervisor marker, and replies cross back only through an exact broker-recorded `replyTo` match. Parent-held authorization state is restored after reconnects. During child admission, the parent wrapper may lazy-load and connect the broker provider to mint that exact child's capability. The child still connects only when it uses an Intercom delivery path. Single-child claimed decisions or interviews terminally hand off before child send or waiter admission; parallel requests use the broker and correlated reply wait. A claimed provider failure aborts launch, while runtimes with no provider omit supervisor metadata and do not expose a broken channel.
|
|
161
|
+
Moved to [Intercom reference](/intercom/reference#groups).
|
|
230
162
|
|
|
231
163
|
### send vs ask vs reply
|
|
232
164
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
**`ask`** sends the message and blocks until the recipient responds (10-minute timeout). If the recipient disconnects after delivery, only the exact ask to that peer fails promptly; the timeout remains the backstop for a connected but unresponsive recipient. Up to `maxPendingAsks` waits (default: 6) may run concurrently, including same-target and mixed-target fan-out. Exact sender/message correlation keeps out-of-order replies and selective disconnects from cross-settling another call. Parallel children use this path even when asking their launching parent: only the requester waits, siblings keep executing, and the reply returns from the waiting tool call in the original child execution. A single-child launch retains the exception that a claimed parent ask ends that child and returns a dynamic `[TASK_CONTEXT]` handoff.
|
|
236
|
-
|
|
237
|
-
An `idle` registration does not guarantee reply capability. Completed, failed, interrupted, or cancelled noninteractive subagent children reject new asks immediately with `Target noninteractive child is terminal and cannot reply`; launch a fresh child with explicit context instead. If termination wins after admission but before a reply, the exact pending ask fails explicitly too. Live interactive idle sessions remain askable, and completed workflow stages with a retained reply-capable post-mortem conversation keep their existing reopening behavior. `send` transport behavior is unchanged; a retained registration is not a promise that a terminal child's model will consume a send.
|
|
238
|
-
|
|
239
|
-
**`contact_supervisor`** keeps a narrower policy: one blocking decision/interview wait per child may coexist with ordinary peer asks, but a second concurrent supervisor wait receives `Already waiting for a supervisor reply`. Claimed foreground handoffs allocate no waiter. Mutual peer asks are supported, although both sessions must process inbound work to reply; the per-waiter timeout remains the backstop.
|
|
240
|
-
|
|
241
|
-
**`reply`** is receiver-side sugar for replying to an inbound ask. In the turn triggered by an incoming intercom message, `intercom({ action: "reply", message: "..." })` targets that exact sender and message automatically. If you reply later, it falls back to the single unresolved inbound ask; with multiple pending asks, use `pending` and pass `to`, or pass the listed message ID as `replyTo` to disambiguate multiple asks from the same sender. Under the hood this is still a normal `send` with the exact `replyTo` value.
|
|
165
|
+
Moved to [Intercom reference](/intercom/reference#send-vs-ask-vs-reply).
|
|
242
166
|
|
|
243
167
|
### Attachments
|
|
244
168
|
|
|
245
|
-
|
|
169
|
+
Moved to [Intercom reference](/intercom/reference#attachments).
|
|
246
170
|
|
|
247
171
|
## Coordination Patterns
|
|
248
172
|
|
|
@@ -345,6 +269,21 @@ For a parallel child, the supervisor receives the question with its child/run id
|
|
|
345
269
|
|
|
346
270
|
Single-child claimed handoffs instead include terminal run metadata, ordered attachments, the original delegated task, and an explicit fresh-start `[TASK_CONTEXT]` call. That legacy single-child path still requires a new run identity for follow-up work.
|
|
347
271
|
|
|
272
|
+
For a single-child claimed handoff, the fresh-start instruction has this form:
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
Subagent yielded for parent input (worker, child 1).
|
|
276
|
+
Previous run (terminal): 78f659a3
|
|
277
|
+
Question:
|
|
278
|
+
Which API should I use?
|
|
279
|
+
|
|
280
|
+
Start a fresh subagent with a new run identity, replacing <SUPERVISOR_ANSWER> with your answer:
|
|
281
|
+
subagent({
|
|
282
|
+
"agent": "worker",
|
|
283
|
+
"task": "[TASK_CONTEXT] ... Continue with this supervisor answer: <SUPERVISOR_ANSWER>"
|
|
284
|
+
})
|
|
285
|
+
```
|
|
286
|
+
|
|
348
287
|
### Structured Interview Replies
|
|
349
288
|
|
|
350
289
|
`interview_request` questions use the shape `{ id, type, question, options?, context? }` where `type` is `single`, `multi`, `text`, `image`, or `info` (`info` questions are context-only and need no response):
|
|
@@ -378,171 +317,31 @@ The parallel child's tool result preserves the raw reply text and includes `deta
|
|
|
378
317
|
|
|
379
318
|
## Workflow and Subagent Notifications
|
|
380
319
|
|
|
381
|
-
|
|
320
|
+
Moved to [Intercom operations](/intercom/operations#workflow-and-subagent-notifications).
|
|
382
321
|
|
|
383
322
|
### Workflow Delivery Modes
|
|
384
323
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
```typescript
|
|
388
|
-
workflow({
|
|
389
|
-
tasks: [{ agent: "worker", task: "..." }],
|
|
390
|
-
intercom: { delivery: "result" },
|
|
391
|
-
})
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
| Option | Values | Meaning |
|
|
395
|
-
|--------|--------|---------|
|
|
396
|
-
| `enabled` | boolean | `false` forces delivery off; `true` resolves to `control-and-result` |
|
|
397
|
-
| `delivery` | `"off"` \| `"notify"` \| `"result"` \| `"control-and-result"` | Explicit delivery mode; wins over `enabled` |
|
|
398
|
-
| `parentSession` | string | Target session for delivery; resolved from args or the Intercom port when omitted |
|
|
399
|
-
| `notifyOn` | array | Control events to deliver: `"active_long_running"`, `"needs_attention"`, `"completed"`, `"failed"` |
|
|
400
|
-
|
|
401
|
-
When neither `enabled` nor `delivery` is set, direct `parallel` runs default to `control-and-result` when Intercom is available; otherwise delivery is off. Treat Intercom payloads from direct runs as user-visible workflow output.
|
|
402
|
-
|
|
403
|
-
While a workflow stage generation is open, incoming Intercom messages are admitted as priority input: the stage's current model call or cancellable tool is cancelled and the message is processed next in the same stage generation. Parallel child asks, sends, and supervisor requests use destination-side reservation and the exact-child probe/commit observation-yield handshake before that cancellation, so a child's own message releases the parent's foreground observation rather than cancelling the child, and terminal stage close cannot overtake an admitted delivery. A destination-side admission failure returns a correlated actionable error to a blocking asker instead of waiting for the 10-minute reply timeout. Claimed single-child parent handoffs remain source-side terminal handoffs.
|
|
324
|
+
Moved to [Intercom operations](/intercom/operations#workflow-delivery-modes).
|
|
404
325
|
|
|
405
326
|
### Subagent Control Notices
|
|
406
327
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
- **`notifyOn`** — defaults to `["active_long_running", "needs_attention"]`
|
|
410
|
-
- **`notifyChannels`** — defaults to `["event", "intercom"]` (all that are available)
|
|
411
|
-
|
|
412
|
-
Detached subagent result delivery over Intercom is confirmation-based and preserves a successful delivery phase across watcher replacement. Each delegated child gets a deterministic Intercom target derived from its run/agent/index identity, and run results report those targets ("Run intercom target" / "Previous intercom target"; targets may be inactive after completion). `intercom({ action: "status" })` reports connection state and every membership for the current session.
|
|
413
|
-
|
|
414
|
-
If live peer coordination is needed, invoke `intercom({ action: "status" })` in the parent before launching; the child connects on its first ordinary Intercom call. A claimed single-child `contact_supervisor` decision or interview can yield before child broker connection because typed admission already identifies the launching parent. Fresh child sessions always receive the mandatory bundled Intercom wrapper, including when an explicit `extensions` allowlist is empty or omits it.
|
|
328
|
+
Moved to [Intercom operations](/intercom/operations#subagent-control-notices).
|
|
415
329
|
|
|
416
330
|
### Delivery Ordering
|
|
417
331
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
For delegated children, queued messages and terminal lifecycle notices remain ordered per child, including owner-bound background tasks. Before publishing completion, the notification outbox drains already-queued ordinary messages from that child's trusted run and Intercom target. Other children and pending asks stay separate. Each earlier message keeps its own admission identity; the completion ID belongs only to the terminal notice. A failed message or terminal delivery remains retryable without changing the task's outcome or rerunning it. Restored completions without a live source binding still deliver normally rather than guessing a child identity. See [Subagents](/subagents) for the full coordination contract.
|
|
332
|
+
Moved to [Intercom operations](/intercom/operations#delivery-ordering).
|
|
421
333
|
|
|
422
334
|
## Configuration
|
|
423
335
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
```json
|
|
427
|
-
{
|
|
428
|
-
"brokerCommand": "npx",
|
|
429
|
-
"brokerArgs": ["--no-install", "tsx"],
|
|
430
|
-
"confirmSend": false,
|
|
431
|
-
"replyHint": true,
|
|
432
|
-
"status": "researching",
|
|
433
|
-
"group": "default"
|
|
434
|
-
}
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
| Setting | Default | Description |
|
|
438
|
-
|---------|---------|-------------|
|
|
439
|
-
| `brokerCommand` | `"npx"` | Command used to start the local broker process; the default sentinel is hardened internally to avoid PATH lookup |
|
|
440
|
-
| `brokerArgs` | `["--no-install", "tsx"]` | Arguments passed to `brokerCommand` before the broker script path |
|
|
441
|
-
| `confirmSend` | `false` | Show a confirmation dialog before non-reply sends from an interactive session with UI |
|
|
442
|
-
| `replyHint` | `true` | Include reply instruction in incoming messages |
|
|
443
|
-
| `status` | — | Optional custom status suffix shown after the automatic lifecycle status, for example `thinking · researching` |
|
|
444
|
-
| `group` | `"default"` | Home intercom group for this session (see [Groups](#groups)). Overridden by env `ATOMIC_INTERCOM_GROUP` / `PI_INTERCOM_GROUP` and by workflow/orchestrator per-session injection. |
|
|
445
|
-
|
|
446
|
-
The default `npx --no-install tsx` pair is a compatibility sentinel: Intercom recognizes it and starts the broker through the current Atomic runtime (`process.execPath`). It never resolves or executes `tsx` — Node-based installs run the broker with Atomic's bundled `jiti` loader, which is dependency-free pure JavaScript; Bun source-checkout runs use the current Bun executable directly; standalone Atomic binaries re-enter the split launcher through a narrow internal broker handoff. Default startup therefore does not rely on `npx`, `tsx`, or `bun` being on `PATH`. Explicit custom broker commands still work — for example, to intentionally use Bun from `PATH`:
|
|
447
|
-
|
|
448
|
-
```json
|
|
449
|
-
{
|
|
450
|
-
"brokerCommand": "bun",
|
|
451
|
-
"brokerArgs": []
|
|
452
|
-
}
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
Config validation is strict: every field is checked, and if the file is not valid JSON or any field has an invalid value, the whole config is rejected — an error is logged and all defaults are used.
|
|
456
|
-
|
|
457
|
-
Intercom publishes live session status automatically: sessions register as `idle`, switch to `thinking` while the agent is running, show `tool:<name>` during tool execution, and return to `idle` on completion. A configured `status` is appended as context instead of replacing the lifecycle status.
|
|
458
|
-
|
|
459
|
-
Activity is not reply capability. Session rows include `replyCapability: live` or `terminal` when the host supplies it; terminal noninteractive children cannot answer asks even if activity says `idle`. Closed workflow generations show `closed · reply: post-mortem only` when a late-message router is present, or `closed · reply: unavailable` without one. Post-mortem routing still validates the retained conversation and can return a bounded error if it is unavailable; it never resumes workflow execution. Missing capability metadata is not a guarantee that an ask can succeed. Invocation/subgroup visibility and stale-ID rejection are unchanged.
|
|
460
|
-
|
|
461
|
-
For a retained post-mortem conversation, use its exact Intercom session ID or the previously listed canonical stage path, including its final-stage-name variant. Alternate materialized run-ID paths resolve active stages through the workflow owner; they are not retained aliases after the stage completes. A stage marked `reply: unavailable` rejects an ask with guidance to contact a live stage or start new work with explicit context.
|
|
336
|
+
Moved to [Intercom reference](/intercom/reference#configuration).
|
|
462
337
|
|
|
463
338
|
## Keyboard Shortcuts
|
|
464
339
|
|
|
465
|
-
|
|
466
|
-
|-----|--------|
|
|
467
|
-
| ALT+M | Open session list overlay |
|
|
468
|
-
| ↑/↓ | Navigate session list |
|
|
469
|
-
| Enter | Select session / Send message |
|
|
470
|
-
| Escape | Cancel / Close overlay |
|
|
340
|
+
Moved to [Intercom operations](/intercom/operations#keyboard-shortcuts).
|
|
471
341
|
|
|
472
342
|
## How It Works
|
|
473
343
|
|
|
474
|
-
|
|
475
|
-
graph TB
|
|
476
|
-
subgraph A["Atomic Session A"]
|
|
477
|
-
A1[Intercom Client]
|
|
478
|
-
A2[intercom tool]
|
|
479
|
-
A3[UI overlays]
|
|
480
|
-
end
|
|
481
|
-
|
|
482
|
-
subgraph Broker["Intercom Broker"]
|
|
483
|
-
B1[Session Registry]
|
|
484
|
-
B2[Message Router]
|
|
485
|
-
end
|
|
486
|
-
|
|
487
|
-
subgraph B["Atomic Session B"]
|
|
488
|
-
B3[Intercom Client]
|
|
489
|
-
B4[intercom tool]
|
|
490
|
-
B5[UI overlays]
|
|
491
|
-
end
|
|
492
|
-
|
|
493
|
-
A1 <-->|Local Socket/Pipe| B1
|
|
494
|
-
B1 --- B2
|
|
495
|
-
B2 <-->|Local Socket/Pipe| B3
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
The broker is a standalone process that manages session registration and message routing. It auto-spawns when the first session that invokes Intercom needs it and exits 5 seconds after it last has no registered sessions, including brokers that never received a connection and sockets that close before register; clients reconnect automatically if the broker restarts. A reconnect that fails schedules the next attempt on a bounded backoff (1s, 2s, 5s, 10s, then 30s) and keeps retrying until the session connects or shuts down, so recovery never waits for an explicit Intercom call. A failed explicit `intercom` or overlay connection surfaces its error to the caller and still leaves that background retry in place. A reconnect that fails after the broker already accepted it closes that connection first, so a session never appears twice in `intercom list`. A spawn lock keyed by PID and timestamp prevents duplicate brokers when multiple sessions start at once.
|
|
499
|
-
|
|
500
|
-
A recoverable disconnect is only reported where someone is waiting on it. Work Intercom starts on its own — eager workflow-stage warm-up during `session_start`, the background subagent and pending-stage event relays, and the advisory supervisor-authorization request made before a child launches — does not surface such a disconnect as a stage error; the stage keeps running, and a launch proceeds with supervisor metadata omitted rather than aborting. Recovery still has an owner in every case. Once the heavy module exists, the bounded reconnect backoff above owns it. Warm-up is the one point where no heavy module exists yet to run that backoff, so the wrapper itself retries the warm-up on the same bounded schedule — which matters because a stage holding queued messages waits for that first successful delivery.
|
|
501
|
-
|
|
502
|
-
When those warm-up attempts run out there is no owner left, and the stage decides its own outcome rather than the extension writing a diagnostic. The wrapper hands the stage's pending delivery a typed terminal reason through the `fail(reason)` member of `WorkflowPendingStageDelivery`; the workflow side turns it into a stage-scoped error naming the run, stage id, and stage name, so `pendingStageDelivery.ready()` settles exactly once instead of waiting forever and the stage ends `failed`. Nothing goes to the console, so no raw extension text reaches the root session's transcript. The queued messages are not consumed either: a delivery asked to drain after that point is a no-op, so the steering stays queued rather than being marked delivered to a stage that never read it. A stage with nothing queued is unaffected — `ready()` still short-circuits and the stage runs.
|
|
503
|
-
|
|
504
|
-
`fail` is part of the delivery contract rather than an optional extra, because `ready()` has no timeout: a delivery nobody can settle is a stage parked forever. The stage lifecycle also refuses that failure as a model failure — no same-model retry is spent, no fallback candidate is walked, and no `[fallback]` warning blames a model — because a stage refused its queued instructions would be refused them by every candidate. That refusal is by error type, not by message text, so it holds even where the shared model-failure classifier would read the underlying transport error as a retryable network problem. The delivery owner's own reason is kept on the error's `reason` property rather than chained as `cause` for the same reason.
|
|
505
|
-
|
|
506
|
-
Explicit `intercom` calls, `/intercom`, and the ALT+M overlay still fail visibly. Protocol, authentication, configuration, non-recoverable initialization, and terminal relay failures are reported on every path. An exhausted warm-up retry is terminal too, but it surfaces as the stage failure described above rather than as extension output. Classification is by the error type raised inside the broker client, not by message text, so an identically worded failure from anywhere else stays actionable. A drop that first surfaces as a socket error on an already-registered connection — `ECONNRESET`, `EPIPE`, and the rest — is a recoverable disconnect and enters the same bounded recovery, with the original transport error kept as the `cause` so the code is still there to read. A framing or protocol error keeps its own `Intercom protocol error: …` diagnosis even when a socket error follows it, and a failure before registration completes is never reclassified.
|
|
507
|
-
|
|
508
|
-
For `send`, `ask`, and `reply`, the tool owns reconnect recovery. One invocation makes the initial attempt and up to three retries, waiting 1, 2, then 5 seconds between attempts. Retries preserve the original message ID, caller arguments, attachment order and presence, and reply thread. The model neither supplies nor receives a retry token. Every new invocation is a fresh intentional operation, even with identical text. Existing integrations must stop passing `retryToken`; caller-supplied tokens are refused without sending.
|
|
509
|
-
|
|
510
|
-
Before delivery begins, lazy module initialization and startup replay have a separate limit of three reconnect retries on the same delay schedule. Exhaustion or cancellation there reports `outcome: "not_sent"`, since the heavy tool has not executed. This initialization wrapper never retries an already-executed delivery.
|
|
511
|
-
|
|
512
|
-
Only typed recoverable disconnects start automatic recovery. After one occurs, intermediate nondelivery or uncertain/capacity-bound authority retains the same identity for the remaining attempts. Delivered or queued success ends recovery. An unrelated error ends it without further retries. Cancellation stops new attempts, and the original 11-minute operation deadline bounds retry waits and reply waiting without renewal. A successful receipt remains success even if cancellation arrives while the send is in flight. If recovery cannot establish the outcome, or an accepted ask ends without a reply, the tool returns a terminal error with `outcome: "unknown"` and warns against automatically repeating the operation: delivery may already have occurred. Check with the recipient before intentionally sending a new message. Initial nondelivery and unrelated pre-delivery errors retain their existing classification.
|
|
513
|
-
|
|
514
|
-
Accepted-operation authority is stored for 12 minutes in `delivered-messages.sqlite`, but canonical payload signatures are never persisted. The broker stores only a fixed 32-byte keyed SHA-256 HMAC (hex encoded) and keeps its random key in the paired `delivered-messages.key`; this remains stable across broker replacement without exposing message or attachment text or enabling offline guesses for low-entropy payloads by users who cannot read the key. The Intercom directory is corrected to owner-only mode (`0700`) and the database, WAL, SHM, and key artifacts to `0600` on POSIX; Windows keeps its platform permission semantics. A missing/malformed database-key pair, malformed digest record, or truncated authority fails closed instead of starting empty.
|
|
515
|
-
|
|
516
|
-
The broker durably reserves identity before forwarding, then marks it accepted after the confirmed write and before acknowledging the sender. A crash after forwarding and acceptance can therefore return retained success without another delivery; a pre-forward reservation is refused as uncertain. After a deduplicated ask retry, public `reply` first uses the exact recorded sender ID while it remains live, even if another live session shares its name. Only after that ID departs may reconnect-oriented name/stable-route resolution run, and ambiguity, changed stable endpoint or groups, payload, or message ID is refused without sending. An implicit reply retry retains the original sender/question route internally, so a later ask cannot redirect it. Explicit `to` remains caller-controlled and broker `requirePendingReply` authorization remains mandatory. Legacy frames without logical-target metadata keep their transport-target behavior.
|
|
517
|
-
|
|
518
|
-
Both sides fail closed at memory or storage pressure instead of evicting authority that can still suppress a duplicate. A fresh client operation reserves one of 1,000 identity slots before consuming an ID, showing confirmation UI, resolving its target/reply route, or sending; existing internal retries remain available at full capacity. Confirmation occurs once per invocation. Client retry state is released when the invocation ends or its identity expires, without deleting broker acceptance records. The broker holds at most 10,000 live records and 64 MiB of digest and routing authority; it refuses new delivery until TTL cleanup makes room. The local subagent result relay also reserves before its chat side effect and accepts before positive acknowledgement, refusing its 10,001st live ID and uncertain replays without repeating delivery. SQLite transactions serialize concurrent broker access and stale rows are removed by TTL.
|
|
519
|
-
|
|
520
|
-
On the broker side, a session is retired as soon as its socket stops being able to accept a frame, rather than only when the connection finally closes. A peer that half-closes, or one whose connection the broker itself ended after refusing a registration, can hold its read side open indefinitely; leaving it in the routing table meant every later broadcast wrote into a socket whose writable side was gone, which destroys that socket and floods `broker.log`. Every broker write now checks writability as part of the write itself. Delivery-producing sends also wait for the socket write callback, so an immediate asynchronous reset cannot be recorded as a successful delivery. A write that fails is answered `Session not found`, the message id stays retryable rather than being recorded as delivered, and no reply authorization is opened for a message that was not sent.
|
|
521
|
-
|
|
522
|
-
Transport is local IPC only — a Unix domain socket on macOS/Linux or a named pipe on Windows — using length-prefixed JSON (4-byte length + payload) with request correlation for session listing, explicit delivery failures, and validation of malformed or out-of-order messages. `ask` stays client-side: the broker routes plain messages, and the client waits for the matching reply before returning it as the tool result.
|
|
523
|
-
|
|
524
|
-
Custom hosts may declare an optional `recipientPurpose` on session registration and workflow-stage roster entries. Only `"agent"` and `"control"` are accepted; omission preserves legacy agent behavior. Invalid strings, `null`, and non-string values are rejected, not silently treated as controls. Session purpose is immutable after registration; presence updates cannot change it. Workflow roster-update completion waits for a broker round trip on the announcing connection so subsequent discovery does not race an unprocessed update.
|
|
525
|
-
|
|
526
|
-
Runtime files live under the active agent directory — `~/.atomic/agent/intercom/` by default, or below `ATOMIC_CODING_AGENT_DIR` when set (the legacy `PI_CODING_AGENT_DIR` alias is honored when the Atomic variable is unset):
|
|
527
|
-
|
|
528
|
-
- `broker.sock` — Unix domain socket (macOS/Linux; Windows uses a named pipe instead)
|
|
529
|
-
- `broker-launch.vbs` — Windows helper script to launch the broker without a console window
|
|
530
|
-
- `broker.pid` — Broker process ID
|
|
531
|
-
- `broker.spawn.lock` — Short-lived lock used to avoid duplicate auto-spawns
|
|
532
|
-
- `broker.log` — Broker stderr, truncated on every spawn and capped at 8 KiB by the broker itself
|
|
533
|
-
- `delivered-messages.sqlite` — bounded 12-minute accepted-operation authority containing fixed keyed digests, never message or attachment text
|
|
534
|
-
- `delivered-messages.key` — random owner-only HMAC key paired with the authority database
|
|
535
|
-
- `config.json` — User configuration
|
|
536
|
-
|
|
537
|
-
The broker runs as a detached subprocess, so it does not share the host session's module graph: every module it loads resolves from Node built-ins and Intercom's own files only. Standalone Atomic binaries run it through the internal broker handoff of the same executable, with no external runtime package to resolve.
|
|
538
|
-
|
|
539
|
-
If the broker fails to start, its stderr is not lost. The parent hands the child an already-open descriptor on `broker.log` (a file, not a pipe, because the broker outlives the session that spawned it) and truncates the file on every spawn. Both the "exited before startup" error and the readiness-timeout error quote the log path and a bounded tail of that output, so `cat ~/.atomic/agent/intercom/broker.log` shows the same text after the fact. On Windows the hidden launcher appends the broker's stderr to the same file.
|
|
540
|
-
|
|
541
|
-
The file cannot grow without limit. The parent exits while the broker keeps running, so the cap is applied inside the broker, by the entrypoint's very first import — ESM evaluates a module's static dependencies before the importer's own body, so anything installed later would leave those dependencies free to write first. Three routes reach the log and each is capped: `process.stderr.write`, `console.error` / `console.warn`, and the default fatal printing for an uncaught exception or an unhandled rejection. Patching the stream alone would not be enough — Bun's console writes to the file descriptor directly, and neither runtime routes a fatal error through the stream. Anything past 8 KiB is discarded rather than written, on the direct launch and the Windows redirect alike.
|
|
542
|
-
|
|
543
|
-
What the cap cannot cover, stated plainly: diagnostics a runtime or loader emits before that first import evaluates, native code writing straight to file descriptor 2, a child process of the broker, and hard termination. The broker's own module graph contains no child-process or native-addon edge.
|
|
544
|
-
|
|
545
|
-
Async extension work (startup, inbound flushes, reconnects, overlays, and relays) no-ops if the session shuts down or reloads before it settles.
|
|
344
|
+
Moved to [Intercom operations](/intercom/operations#how-it-works).
|
|
546
345
|
|
|
547
346
|
## Intercom vs Shared-Room Messengers
|
|
548
347
|
|
|
@@ -558,11 +357,7 @@ Use a shared-room messenger for multi-agent swarms working on one shared task. U
|
|
|
558
357
|
|
|
559
358
|
## Limitations
|
|
560
359
|
|
|
561
|
-
|
|
562
|
-
- **No dedicated intercom log** — Messages are kept in session history; there is no separate intercom transcript or inbox
|
|
563
|
-
- **No attachments UI** — `file`, `snippet`, and `context` attachments are supported in the protocol, but not in the compose overlay
|
|
564
|
-
- **Only connected sessions appear** — The list shows sessions that have connected to the broker, not every open Atomic process
|
|
565
|
-
- **Broker lifecycle** — The broker auto-spawns on first use and exits when idle; sessions reconnect automatically if it restarts
|
|
360
|
+
Moved to [Intercom operations](/intercom/operations#limitations).
|
|
566
361
|
|
|
567
362
|
## Related Docs
|
|
568
363
|
|
package/docs/json.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "JSON event stream"
|
|
3
|
+
description: "Run one prompt and parse Atomic's output as newline-delimited events."
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# JSON Event Stream Mode
|
|
2
7
|
|
|
3
8
|
```bash
|
|
@@ -8,6 +13,18 @@ Outputs all session events as JSON lines to stdout. Useful for integrating Atomi
|
|
|
8
13
|
|
|
9
14
|
If a complete saved provider/model default names a provider that remains unsupported after provider registration, JSON mode writes the generic configuration diagnostic to stderr and exits nonzero before sending the prompt. It writes no human diagnostic to stdout, so any stdout records remain valid JSONL. This differs from ordinary supported-provider model or authentication fallback, which retains normal automatic model selection.
|
|
10
15
|
|
|
16
|
+
## Choosing an integration mode
|
|
17
|
+
|
|
18
|
+
JSON mode is one of three ways to drive Atomic from your own software. Pick the smallest one that does the job.
|
|
19
|
+
|
|
20
|
+
| You want | Use | Why |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| One prompt, structured output, then exit | **JSON event stream mode** (this page) | One process, one prompt, newline-delimited events on stdout. Nothing to keep alive. |
|
|
23
|
+
| A long-lived process you send more input to | [RPC mode](/rpc) | Send further prompts, interrupt, switch models, and answer tool permission prompts on a live process. |
|
|
24
|
+
| Atomic embedded inside a Node.js application | [SDK](/sdk) | The same engine as a library, with programmatic control over extensions, skills, tools, and session storage. |
|
|
25
|
+
|
|
26
|
+
If you need the event contract rather than a walkthrough, go to the [RPC protocol](/rpc/protocol) or the [SDK API reference](/sdk/reference). [Programmatic use](/programmatic) compares all three modes side by side.
|
|
27
|
+
|
|
11
28
|
## Event Types
|
|
12
29
|
|
|
13
30
|
Events are defined in [`AgentSessionEvent`](https://github.com/bastani-inc/atomic/blob/main/packages/coding-agent/src/core/agent-session.ts#L152):
|
package/docs/llama-cpp.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Local models"
|
|
3
|
+
description: "Run models locally with a llama.cpp server: discovery, load management, and downloads."
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# llama.cpp
|
|
2
7
|
|
|
3
8
|
Atomic supports the [llama.cpp](https://github.com/ggml-org/llama.cpp) router server. The router discovers multiple GGUF models and loads or unloads them on demand.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Benchmark Sources"
|
|
3
|
+
description: "The external benchmarks that inform Atomic model selection — Artificial Analysis and DeepSWE — broken down per benchmark: what each measures and when to reference it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Benchmark Sources
|
|
7
|
+
|
|
8
|
+
<Note>
|
|
9
|
+
This is the historical benchmark snapshot retained from the September 3, 2026 documentation baseline. It is not current model-selection guidance. For the latest dated measurements, methodology, and task-specific recommendations, use [Evals](/models/evals) and [Model selection](/models/model-selection).
|
|
10
|
+
</Note>
|
|
11
|
+
|
|
12
|
+
Atomic's model-selection docs are keyed to two live external benchmark sources rather than a hand-maintained table of scores. This page lists each benchmark, what it measures, and **when to reference it** for a given workflow role — so the docs stay useful as new models ship without a manual rewrite every time.
|
|
13
|
+
|
|
14
|
+
<Warning>
|
|
15
|
+
No single benchmark is the source of truth. Use these as inputs and validate against Atomic's own workflow evals — public suites test different task distributions than real engineering loops. When Atomic's numbers disagree with a public index, Atomic's evals win. The DeepSWE snapshot used by the linked model-selection pages was updated September 3, 2026 and was re-read from the live source on **2026-09-03**. The Artificial Analysis sections below were **last reviewed 2026-09-01** and were not re-fetched in that pass.
|
|
16
|
+
</Warning>
|
|
17
|
+
|
|
18
|
+
## The two sources at a glance
|
|
19
|
+
|
|
20
|
+
| Source | URL | What it is | Reference it for |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| DeepSWE | [deepswe.datacurve.ai](https://deepswe.datacurve.ai/) | Long-horizon, contamination-free software-engineering tasks (113 tasks, 91 repos, 5 languages), all run on `mini-swe-agent` for consistency | The primary signal for coding-agent routing: real `pass@1`, cost, output tokens, and agent steps on engineering-loop work |
|
|
23
|
+
| Artificial Analysis | [artificialanalysis.ai](https://artificialanalysis.ai/) | Cross-provider intelligence, coding, and agentic indices plus per-capability breakdowns | Cross-domain intelligence, tool use, knowledge reliability, long context, and non-coding capabilities |
|
|
24
|
+
|
|
25
|
+
## DeepSWE — coding-agent performance
|
|
26
|
+
|
|
27
|
+
DeepSWE is the closest public proxy for what Atomic actually does. Tasks are written from scratch (not scraped from PRs), so no model has seen the solutions; solutions require substantially more code than SWE-bench-style suites; and verifiers test behavior rather than implementation.
|
|
28
|
+
|
|
29
|
+
- **Current snapshot:** DeepSWE v1.1, 113 tasks across 91 repositories and 5 languages, updated September 3, 2026. The site reports 28 measured models and displays 21 leaderboard rows by default, out of 70 published model/effort configurations.
|
|
30
|
+
- **Metric:** `pass@1`, plus average cost per task, output tokens, and agent steps.
|
|
31
|
+
- **When to reference:** default weighting for debugger, worker, and any code-writing role. This is the table that drives [Model Selection](/models/model-selection) and [Pareto Efficiency](/models/pareto-efficiency).
|
|
32
|
+
- **Watch:** cost and step count, not just score — a model that passes but takes 268 steps (e.g. sonnet-5) is a poor worker even at a good pass rate, and the two accuracy leaders sit at opposite ends of that axis: Gemini 3.8 Flash leads the highest-published-effort reading the linked pages use at 166 average steps, while the live default Best view's leader, GPT-6 Astra [xhigh], averages 29.
|
|
33
|
+
|
|
34
|
+
## Artificial Analysis — intelligence and capability breakdown
|
|
35
|
+
|
|
36
|
+
Artificial Analysis separates performance by benchmark, which lets a workflow pick the model that is strong at the *specific* thing a role needs. Reference the individual evaluations, not just the composite index.
|
|
37
|
+
|
|
38
|
+
### Composite indices
|
|
39
|
+
|
|
40
|
+
- **Intelligence Index (v4.1.1)** — composite of the nine evaluations below, weighted across four categories: Agents 34%, Coding 24%, Scientific Reasoning 24%, General 18%. Use as a first-pass filter when a new model appears.
|
|
41
|
+
- **Coding Index** — coding-weighted sub-index. Cross-check against DeepSWE.
|
|
42
|
+
- **Agentic Index** — tool use, planning, autonomy, complex problem solving. The best AA signal for orchestrator and reviewer roles.
|
|
43
|
+
|
|
44
|
+
### Individual evaluations — what each measures and when to reference
|
|
45
|
+
|
|
46
|
+
| Benchmark | Measures | Reference it for |
|
|
47
|
+
| --- | --- | --- |
|
|
48
|
+
| GDPval-AA v2 | Agentic real-world work tasks | Orchestrator / planner roles doing economically realistic work |
|
|
49
|
+
| τ³-Banking | Agentic tool use | Tool-heavy workflows and function-calling reliability |
|
|
50
|
+
| Terminal-Bench v2.1 | Agentic coding & terminal use | Debugger and shell-driven workers |
|
|
51
|
+
| SciCode | Coding (scientific) | Code-writing roles in technical domains |
|
|
52
|
+
| Humanity's Last Exam | Reasoning & knowledge | Hard planning / judgment gates |
|
|
53
|
+
| GPQA Diamond | Scientific reasoning | Research roles in technical domains |
|
|
54
|
+
| CritPt | Physics reasoning | Physics/engineering-heavy tasks |
|
|
55
|
+
| AA-Omniscience | Knowledge accuracy & non-hallucination | Research and any role where a confident wrong answer is costly |
|
|
56
|
+
| AA-LCR | Long-context reasoning | Large-codebase research and long-session work |
|
|
57
|
+
|
|
58
|
+
### Capability indices
|
|
59
|
+
|
|
60
|
+
Artificial Analysis also publishes per-domain capability indices — **Agentic, Coding, Finance & Accounting, Strategy & Ops, Legal, Healthcare & Medical, Engineering, Economics**. When a workflow is domain-specific, pick by the matching capability index rather than the general Intelligence Index.
|
|
61
|
+
|
|
62
|
+
<a id="role-benchmark-map"></a>
|
|
63
|
+
|
|
64
|
+
## Role → benchmark map
|
|
65
|
+
|
|
66
|
+
A quick lookup for which benchmark to weight per role:
|
|
67
|
+
|
|
68
|
+
| Role | Primary benchmark | Secondary |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| Debugger | DeepSWE pass@1 | Terminal-Bench v2.1 |
|
|
71
|
+
| Worker / cheap loop | DeepSWE cost & steps | — |
|
|
72
|
+
| Reviewer / judgment gate | DeepSWE pass@1 | AA Agentic Index |
|
|
73
|
+
| Planner / orchestrator | AA Agentic Index, GDPval-AA v2 | τ³-Banking (tool use) |
|
|
74
|
+
| Research | AA-LCR (long context) | AA-Omniscience (reliability) |
|
|
75
|
+
| Domain-specific work | Matching AA capability index | — |
|
|
76
|
+
|
|
77
|
+
## Keeping the docs fresh
|
|
78
|
+
|
|
79
|
+
flora131's guidance on this issue: point the model at the live benchmark URLs and describe what each measures and when to reference it, rather than hardcoding scores that go stale on every release.
|
|
80
|
+
|
|
81
|
+
1. Treat the model-selection pages as timestamped snapshots that read *from* the live sources above.
|
|
82
|
+
2. When a new model appears on DeepSWE or Artificial Analysis, add it by pulling its numbers from the source — the frontier may move (as the gpt-5.6 family did).
|
|
83
|
+
3. Mark a model **unmeasured** only if it is absent from both sources; unmeasured models may still be operational defaults.
|
|
84
|
+
4. Prefer generating the docs and any future routing policy from the same underlying data, so documentation and routing cannot drift apart.
|
|
85
|
+
|
|
86
|
+
## Related
|
|
87
|
+
|
|
88
|
+
- [Model Selection](/models/model-selection)
|
|
89
|
+
- [Pareto Efficiency](/models/pareto-efficiency)
|
package/docs/models/evals.md
CHANGED
|
@@ -26,7 +26,7 @@ Practical workflow default: use `low` or `medium` for coding, and `high` or `xhi
|
|
|
26
26
|
|
|
27
27
|
| Task type | Benchmark to read | Selected measured candidates | Cost-conscious alternative |
|
|
28
28
|
| --- | --- | --- | --- |
|
|
29
|
-
| Implementing features and fixing bugs | September 3 Datacurve DeepSWE | Astra xhigh, Gemini 3.8 Flash high and Opus 5 max display 74% | Luna max 67% /
|
|
29
|
+
| Implementing features and fixing bugs | September 3 Datacurve DeepSWE | Astra xhigh, Gemini 3.8 Flash high and Opus 5 max display 74% | Luna max 67% / \$0.61; GLM-5.3-Flash max 63% / \$0.24 |
|
|
30
30
|
| Terminal work and shell debugging | Terminal-Bench v4.0 | Astra xhigh 60%, max 59%; Fable 5.1 xhigh with fallback 55% | GLM-5.3-Flash 33% at $0.25 per Index task; task-specific quality is materially lower |
|
|
31
31
|
| Knowledge-work deliverables | AA-Briefcase / GDPval-AA v2, normalized Elo, not pass rates | Fable 5.1 max with fallback 58% / 63%; Opus 5 max 57% / 62% | GLM-5.3-Flash 48% / 58% at $0.25 per Index task |
|
|
32
32
|
| SaaS workflows through REST APIs | AutomationBench-AA | Astra max 68%; Astra high and xhigh, Grok 4.6 high 67% | GLM-5.3-Flash 60%; Luna max 50% |
|
|
@@ -109,7 +109,7 @@ What the three charts say together:
|
|
|
109
109
|
- **Accuracy is flat at the top.** Three models display 74% and a fourth 73%, all inside each other's confidence intervals. Choose among them on cost and steps, not score.
|
|
110
110
|
- **The displayed 74% rows span about fivefold in cost.** Gemini 3.8 Flash [high] costs $2.36 and Opus 5 [max] $11.84. Luna [max] reaches 67% for $0.61. Sonnet 5 [max] costs $26.40 for 54% and 268 steps in this snapshot.
|
|
111
111
|
- **Steps predict wall time and tool-call load.** Astra [xhigh] (29) and Sol [max] (61) finish in a third of the steps that Gemini 3.8 Flash [high] (166) or DeepSeek V4 Pro [max] (155) need. For a worker loop that pays per tool call or that a reviewer must audit, prefer the low-step row at the same accuracy.
|
|
112
|
-
- **The cheap tier is honest about its ceiling.** GLM-5.3-Flash [max] 63% at
|
|
112
|
+
- **The cheap tier is honest about its ceiling.** GLM-5.3-Flash [max] 63% at \$0.24 and DeepSeek V4 Flash [max] 53% at \$0.46 are the only rows under \$1 besides Luna; they are budget workers, not judgment gates.
|
|
113
113
|
|
|
114
114
|
## Artificial Analysis: current measures
|
|
115
115
|
|