@bastani/atomic 0.10.14 → 0.10.15-alpha.1
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 +17 -0
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +76 -63
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +116 -89
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +15 -16
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -18
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +50 -38
- package/docs/termux.md +67 -41
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
package/docs/json.md
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "JSON event
|
|
2
|
+
title: "Parse JSON event streams"
|
|
3
3
|
sidebarTitle: "JSON event stream"
|
|
4
|
-
description: "Run one or more prompts
|
|
4
|
+
description: "Run one or more prompts with atomic --mode json and parse newline-delimited JSON session events in scripts and CI."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
atomic --mode json "Your prompt"
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
JSON mode runs one or more positional prompts in sequence (`atomic --mode json "First prompt" "Second prompt"`), writes every session event as
|
|
11
|
+
JSON mode runs one or more positional prompts in sequence (`atomic --mode json "First prompt" "Second prompt"`), writes every session event as one JSON line to stdout, and exits. Use it for shell scripts, CI pipelines, and batch jobs that need structured output without interactive follow-up commands.
|
|
12
12
|
|
|
13
|
-
Need to send follow-up commands to a live process or embed Atomic
|
|
13
|
+
Need to send follow-up commands to a live process or embed Atomic in Node.js? Compare Print mode, JSON mode, [RPC mode](/rpc), and the [TypeScript SDK](/sdk) on [Choose an integration mode](/programmatic).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## Input, prompts, and storage isolation
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
- **Piped stdin and `@file` attachments:** Like [Print mode](/guides/non-interactive), JSON mode accepts piped stdin (`git diff | atomic --mode json "Review this diff"`) and `@file` or image arguments, merging piped stdin ahead of positional prompt text.
|
|
18
|
+
- **Extension commands as prompts:** Positional prompts may invoke extension commands (such as `"/mycommand"`). If an extension command queues turns through `atomic.sendMessage()`, JSON mode waits for those queued turns to settle before continuing to the next prompt or exiting.
|
|
19
|
+
- **Per-process storage isolation:** Pass `--storage '<json>'`, `--storage-file <path>`, or `--session-store <path>` (with optional `--session-prefix <prefix>`), or set `ATOMIC_STORAGE` or `ATOMIC_SESSIONS_STORAGE` in the environment, to isolate script or CI runs without changing saved settings. See [Selecting storage per process](/storage#selecting-storage-per-process).
|
|
20
|
+
|
|
21
|
+
<Note>
|
|
22
|
+
If a saved default `provider/model` names an unsupported provider or a storage override fails with `StorageConfigError`, JSON mode writes the diagnostic to stderr, leaves stdout completely empty so downstream JSON parsers never see non-JSON text, and exits with code `1`. Supported providers with an unknown model or missing credentials fall back through normal model selection.
|
|
23
|
+
</Note>
|
|
18
24
|
|
|
19
25
|
## Output format
|
|
20
26
|
|
|
21
|
-
Each line on stdout is
|
|
27
|
+
Each line on stdout is one JSON object terminated by `\n`. Atomic emits the session header before session events (including when `--no-session` is passed, which emits the in-memory session header):
|
|
22
28
|
|
|
23
29
|
```json
|
|
24
30
|
{"type":"session","version":4,"id":"uuid","createdAt":"2026-01-01T00:00:00.000Z","cwd":"/path"}
|
|
25
31
|
```
|
|
26
32
|
|
|
33
|
+
When resuming a session whose worktree blueprint build is running in another process, a runner-level `blueprint_build_waiting` event can arrive **before** the session header.
|
|
34
|
+
|
|
27
35
|
Session events follow as they occur:
|
|
28
36
|
|
|
29
37
|
```json
|
|
@@ -34,25 +42,97 @@ Session events follow as they occur:
|
|
|
34
42
|
{"type":"message_end","message":{"role":"assistant","content":[{"type":"text","text":"Hello"}]}}
|
|
35
43
|
{"type":"turn_end","message":{"role":"assistant","content":[{"type":"text","text":"Hello"}]},"toolResults":[]}
|
|
36
44
|
{"type":"agent_end","messages":[]}
|
|
45
|
+
{"type":"agent_settled","aborted":false}
|
|
37
46
|
```
|
|
38
47
|
|
|
39
48
|
Unlike RPC mode, JSON mode does not add `entryId` or `seq` fields to `message_end`.
|
|
40
49
|
|
|
41
50
|
### Streaming `message_update` wire format
|
|
42
51
|
|
|
43
|
-
On the wire, `message_update` omits
|
|
52
|
+
On the wire, `message_update` omits cumulative snapshots to keep streaming lines compact:
|
|
44
53
|
|
|
45
|
-
- The top-level `message` property is **stripped**
|
|
54
|
+
- The top-level `message` property is **stripped** (unlike the in-memory `AgentSessionEvent` delivered to SDK subscribers). Read the final message from `message_end`.
|
|
46
55
|
- `assistantMessageEvent.partial` is **stripped**.
|
|
56
|
+
- `parentToolCallId` is **omitted** on `message_update` wire lines (`message_update` carries only `type`, `usage`, `assistantMessageEvent`, and optional `endTurn`).
|
|
47
57
|
- When `assistantMessageEvent.type` is `"toolcall_start"`, Atomic injects `id` and `toolName` directly on `assistantMessageEvent`.
|
|
48
58
|
- Top-level `usage` carries the latest cumulative provider-reported token usage (which may stay zero until completion if the provider reports usage only at the end).
|
|
49
|
-
- Top-level `endTurn` is included only when the provider reported an explicit end-of-turn signal (`AssistantMessage.endTurn
|
|
59
|
+
- Top-level `endTurn` is included only when the provider reported an explicit end-of-turn signal (`AssistantMessage.endTurn`, such as OpenAI Codex `end_turn`).
|
|
60
|
+
|
|
61
|
+
A non-assistant message on `message_update` is treated as a protocol violation; Atomic throws instead of emitting fabricated usage.
|
|
62
|
+
|
|
63
|
+
## Event reference
|
|
64
|
+
|
|
65
|
+
### Session and agent events
|
|
66
|
+
|
|
67
|
+
| `type` | When emitted | Key JSON fields |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `session` | Once at startup (session header) | `version`, `id`, `createdAt`, `cwd` |
|
|
70
|
+
| `agent_start` | An agent attempt begins | `turnStartedAt?`, `parentToolCallId?` |
|
|
71
|
+
| `agent_end` | One low-level agent loop finishes (retries or continuations may still follow) | `messages`, `retryPending?`, `parentToolCallId?` |
|
|
72
|
+
| `agent_settled` | No automatic retries, compaction continuations, or queued turns remain | `aborted` |
|
|
73
|
+
| `turn_start` | One assistant turn begins | `parentToolCallId?` |
|
|
74
|
+
| `turn_end` | One assistant turn finishes | `message`, `toolResults`, `parentToolCallId?` |
|
|
75
|
+
| `message_start` | A message begins streaming or is recorded | `message`, `parentToolCallId?` |
|
|
76
|
+
| `message_update` | Streaming text, thinking, or tool-call delta | `usage`, `assistantMessageEvent`, `endTurn?` |
|
|
77
|
+
| `message_end` | A message completes (authoritative final message) | `message`, `parentToolCallId?` |
|
|
78
|
+
| `tool_execution_start` | A tool call begins | `toolCallId`, `toolName`, `args`, `parentToolCallId?` |
|
|
79
|
+
| `tool_execution_update` | A tool emits accumulated partial output | `toolCallId`, `toolName`, `args`, `partialResult`, `parentToolCallId?` |
|
|
80
|
+
| `tool_execution_end` | A tool call finishes | `toolCallId`, `toolName`, `result`, `isError`, `durationMs?`, `parentToolCallId?` |
|
|
81
|
+
| `queue_update` | Pending steering or follow-up queues change | `steering`, `followUp` |
|
|
82
|
+
| `entry_appended` | A durable session entry is appended | `entry` |
|
|
83
|
+
| `session_released` | An idle session is released to storage | `released` |
|
|
84
|
+
| `session_storage_reconnect` | An ordered PostgreSQL session save is waiting to reconnect (~10 s, then every 60 s) or recovered after a reported wait | `state` (`"waiting" \| "recovered"`), `elapsedMs`, `reconnecting` |
|
|
85
|
+
| `session_info_changed` | Session display name changes | `name` |
|
|
86
|
+
| `model_changed` | Active model changes | `model`, `previousModel`, `source` (`"set" \| "cycle" \| "restore" \| "fallback"`) |
|
|
87
|
+
| `thinking_level_changed` | Active thinking level changes | `level` |
|
|
88
|
+
| `compaction_start` | Manual or automatic compaction starts | `reason` (`"manual" \| "threshold" \| "overflow"`), `midTurn?` |
|
|
89
|
+
| `compaction_end` | Compaction completes, fails, or aborts | `reason`, `result`, `aborted`, `willRetry`, `unresolvedOverflow?`, `errorMessage?`, `midTurn?`, `manualTakeoverPending?` |
|
|
90
|
+
| `compaction_usage` | Compactor model returns token usage (emitted once per request, even if the run fails) | `reason`, `usage` |
|
|
91
|
+
| `child_session_usage` | A child session (such as a subagent) completes one model call | `usage` |
|
|
92
|
+
| `agent_continue_error` | Post-compaction continuation failed to start | `source` (`"post_compaction"`), `errorMessage` |
|
|
93
|
+
| `auto_retry_start` | Automatic retry scheduled after a transient provider error | `attempt`, `maxAttempts`, `delayMs`, `errorMessage` |
|
|
94
|
+
| `auto_retry_end` | Automatic retry loop completes or exhausts retries | `success`, `attempt`, `finalError?` |
|
|
95
|
+
| `model_fallback_start` | Automatic fallback to another model is scheduled | `from`, `to`, `fromThinkingLevel?`, `toThinkingLevel?`, `reason`, `attempt` |
|
|
96
|
+
| `model_fallback_end` | Model fallback loop succeeds or exhausts fallbacks | `success`, `from?`, `to?`, `finalError?` |
|
|
97
|
+
| `summarization_retry_scheduled` | Branch-summary retry scheduled | `attempt`, `maxAttempts`, `delayMs`, `errorMessage` |
|
|
98
|
+
| `summarization_retry_attempt_start` | Retried branch-summary request starts | `source` (`"branchSummary"` or `"compaction"` + `reason`) |
|
|
99
|
+
| `summarization_retry_finished` | Branch-summary retry loop ends | — |
|
|
100
|
+
| `bash_execution_update` | Direct user bash stdout/stderr delta | `id?`, `channel` (`"stdout" \| "stderr"`), `delta` |
|
|
101
|
+
| `task_cleanup_quarantined` | Background task cleanup failed and was quarantined | `taskId`, `resources` |
|
|
102
|
+
| `worktree_snapshot_unavailable` | A worktree snapshot could not be captured | `reason` |
|
|
103
|
+
|
|
104
|
+
Final assistant messages and tool results include optional `durationMs` timing. On `tool_execution_end`, `durationMs` measures how long `execute()` ran with a monotonic clock and is omitted when the tool did not execute.
|
|
105
|
+
|
|
106
|
+
### PostgreSQL storage reconnection (`session_storage_reconnect`)
|
|
107
|
+
|
|
108
|
+
When session storage is backed by PostgreSQL and a connection drops or refuses writes, Atomic holds the session's ordered write queue until PostgreSQL reconnects. After 10 seconds (and every 60 seconds thereafter), it emits `session_storage_reconnect` with `state: "waiting"`; once saved after a reported wait, it emits `state: "recovered"`:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{"type":"session_storage_reconnect","state":"waiting","elapsedMs":10012,"reconnecting":true}
|
|
112
|
+
{"type":"session_storage_reconnect","state":"recovered","elapsedMs":14380,"reconnecting":true}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
In `--mode json`, Atomic also writes a human-readable `Warning:` or `Info:` line to stderr while keeping stdout strictly JSONL.
|
|
116
|
+
|
|
117
|
+
### Runner-level blueprint build events
|
|
118
|
+
|
|
119
|
+
When resuming a session whose worktree blueprint build is running in the background (see [Start the first turn while the build runs](/guides/resume-on-any-machine#start-the-first-turn-while-the-build-runs)), the CLI runner emits two events outside `AgentSessionEvent`:
|
|
50
120
|
|
|
51
|
-
|
|
121
|
+
```json
|
|
122
|
+
{"type":"blueprint_build_waiting","root":"/path/to/worktree","message":"Waiting for ..."}
|
|
123
|
+
{"type":"blueprint_build_finished","sessionId":"uuid","roots":["/home/u/.atomic/agent/worktree-snapshots/worktrees/..."],"notices":[{"type":"warning","message":"Partial build: ..."}]}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
`blueprint_build_waiting` can arrive before the session header when waiting on another process's build of the same worktree. `notices` is empty when the build completes cleanly (in `-p` text mode, those warnings go to stderr as `Warning: ...`).
|
|
52
127
|
|
|
53
|
-
|
|
128
|
+
### Compaction and retry details
|
|
54
129
|
|
|
55
|
-
|
|
130
|
+
- **Automatic compaction:** `compaction_end.result.form` is `"cleared"` when the context window was cleared and `"compacted"` when a compactor model or extension replaced it. `willRetry: true` means Atomic will automatically retry the interrupted turn (for example after context overflow). If overflow recovery is exhausted, `unresolvedOverflow: true` and `errorMessage` are set; check `result` and `errorMessage` independently because both can appear when a boundary saved before the next request still exceeded the provider's input limit.
|
|
131
|
+
- **Branch summaries vs. compaction:** Branch summaries use the retry policy and emit `summarization_retry_*` events. Compaction does not retry a failing compactor call; it clears context instead and emits no `compaction_usage` when clearing.
|
|
132
|
+
- **`agent_end` vs. `agent_settled`:** `agent_end` finishes one low-level agent loop while automatic retries (`retryPending: true`), compaction recovery, or queued messages may still continue. Wait for `agent_settled` when tracking full turn-chain completion.
|
|
133
|
+
|
|
134
|
+
<Accordion title="TypeScript AgentSessionEvent union (SDK reference)">
|
|
135
|
+
In-memory SDK events follow `AgentSessionEvent` exported from `@bastani/atomic`. On the `--mode json` wire, `message_update` is rewritten to `{ type: "message_update", usage, assistantMessageEvent, endTurn? }` (stripping `message`, `assistantMessageEvent.partial`, and `parentToolCallId`):
|
|
56
136
|
|
|
57
137
|
```typescript
|
|
58
138
|
type AgentSessionEvent =
|
|
@@ -64,6 +144,7 @@ type AgentSessionEvent =
|
|
|
64
144
|
| { type: "agent_settled"; aborted: boolean }
|
|
65
145
|
| { type: "session_released"; released: ReleasedAgentSession }
|
|
66
146
|
| { type: "entry_appended"; entry: SessionEntry }
|
|
147
|
+
| { type: "session_storage_reconnect"; state: "waiting" | "recovered"; elapsedMs: number; reconnecting: boolean }
|
|
67
148
|
| { type: "queue_update"; steering: readonly string[]; followUp: readonly string[] }
|
|
68
149
|
| { type: "compaction_start"; reason: "manual" | "threshold" | "overflow"; midTurn?: boolean }
|
|
69
150
|
| { type: "session_info_changed"; name: string | undefined }
|
|
@@ -85,71 +166,43 @@ type AgentSessionEvent =
|
|
|
85
166
|
| { type: "task_cleanup_quarantined"; taskId: TaskId; resources: readonly ResourceFailure[] }
|
|
86
167
|
| { type: "worktree_snapshot_unavailable"; reason: SerializedWorkspaceError };
|
|
87
168
|
```
|
|
169
|
+
</Accordion>
|
|
88
170
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
type AgentEvent =
|
|
93
|
-
| { type: "agent_start" }
|
|
94
|
-
| { type: "agent_end"; messages: AgentMessage[] }
|
|
95
|
-
| { type: "turn_start" }
|
|
96
|
-
| { type: "turn_end"; message: AgentMessage; toolResults: ToolResultMessage[] }
|
|
97
|
-
| { type: "message_start"; message: AgentMessage }
|
|
98
|
-
| { type: "message_update"; message: AgentMessage; assistantMessageEvent: AssistantMessageEvent }
|
|
99
|
-
| { type: "message_end"; message: AgentMessage }
|
|
100
|
-
| { type: "tool_execution_start"; toolCallId: string; toolName: string; args: unknown }
|
|
101
|
-
| { type: "tool_execution_update"; toolCallId: string; toolName: string; args: unknown; partialResult: unknown }
|
|
102
|
-
| { type: "tool_execution_end"; toolCallId: string; toolName: string; result: unknown; isError: boolean; durationMs?: number };
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Final assistant messages and tool results include optional `durationMs` timing. On `tool_execution_end`, `durationMs` records how long the tool's `execute()` ran using a monotonic clock and is omitted when the tool did not execute.
|
|
106
|
-
|
|
107
|
-
### Key session events
|
|
108
|
-
|
|
109
|
-
- `queue_update`: reports the full pending steering and follow-up queues whenever they change.
|
|
110
|
-
- `session_info_changed`, `model_changed`, and `thinking_level_changed`: report session metadata updates.
|
|
111
|
-
- `compaction_start` and `compaction_end`: bracket manual and automatic compaction. `compaction_end.result.form` is `"cleared"` when the context window was cleared and `"compacted"` when a compactor model or extension replaced it.
|
|
112
|
-
- `compaction_usage`: reports compactor model token usage when the request returns, even if the run later fails. Clearing context makes no model call.
|
|
113
|
-
- `child_session_usage`: reports one model call made by a child session (such as a subagent or nested subagent).
|
|
114
|
-
- `agent_end` and `agent_settled`: `agent_end` finishes one low-level agent loop while retries, compaction recovery, or queued messages may still continue. `agent_settled` fires once no automatic work remains, with `aborted: true` if cancelled.
|
|
115
|
-
- `blueprint_build_waiting` and `blueprint_build_finished`: emitted when resuming a session whose worktree blueprint build is running in the background (see [Start the first turn while the build runs](/guides/resume-on-any-machine#start-the-first-turn-while-the-build-runs)).
|
|
116
|
-
|
|
117
|
-
```json
|
|
118
|
-
{"type":"blueprint_build_waiting","root":"...","message":"Waiting for ..."}
|
|
119
|
-
{"type":"blueprint_build_finished","sessionId":"...","roots":["/home/u/.atomic/agent/worktree-snapshots/worktrees/..."],"notices":[{"type":"warning","message":"Partial build: ..."}]}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
`blueprint_build_waiting` can arrive before the session header when waiting on another process's build of the same worktree. `notices` is empty when the build completes cleanly (in `-p` text mode, those warnings go to stderr as `Warning: ...`).
|
|
171
|
+
## Message types
|
|
123
172
|
|
|
124
|
-
|
|
173
|
+
Base messages come from `@bastani/atomic-ai`: `UserMessage`, `AssistantMessage`, and `ToolResultMessage`.
|
|
125
174
|
|
|
126
|
-
|
|
175
|
+
Atomic extends `AgentMessage` with three additional roles (documented with full JSON shapes in [RPC protocol types](/rpc/protocol#types) and [Session format](/session-format)):
|
|
127
176
|
|
|
128
|
-
|
|
177
|
+
- `BashExecutionMessage` (`role: "bashExecution"`)
|
|
178
|
+
- `CustomMessage` (`role: "custom"`)
|
|
179
|
+
- `BranchSummaryMessage` (`role: "branchSummary"`)
|
|
129
180
|
|
|
130
|
-
|
|
181
|
+
## Exit codes and signals
|
|
131
182
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
- `
|
|
183
|
+
| Exit code | Meaning |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| `0` | All prompts finished without fatal errors. Unlike `-p` text mode, an assistant response ending with `stopReason: "length"`, a lost queued extension-command answer, or an error in a non-command extension hook (written to stderr) still exits `0`. |
|
|
186
|
+
| `1` | Unsupported configured provider, invalid storage selection (`StorageConfigError`), extension command error, session save (`message_end`) failure or writer conflict, final assistant `stopReason` of `"error"` or `"aborted"`, or an uncaught error. |
|
|
187
|
+
| `75` | Target `--session` is already open in another live Atomic process. |
|
|
188
|
+
| `129` | Stopped by `SIGHUP` (skipped on Windows and when inherited as `SIG_IGN`, such as under `nohup`). |
|
|
189
|
+
| `130` | Stopped by `SIGINT`. |
|
|
190
|
+
| `143` | Stopped by `SIGTERM`. |
|
|
135
191
|
|
|
136
|
-
|
|
192
|
+
A second termination signal forces immediate exit. JSON mode waits for in-progress background worktree blueprint builds to settle before exiting.
|
|
137
193
|
|
|
138
|
-
|
|
139
|
-
- `CustomMessage`
|
|
140
|
-
- `BranchSummaryMessage`
|
|
194
|
+
## Filtering examples
|
|
141
195
|
|
|
142
|
-
|
|
196
|
+
Extract final assistant text with `jq`:
|
|
143
197
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
## Example
|
|
198
|
+
```bash
|
|
199
|
+
atomic --mode json "List the packages in this repo" 2>/dev/null \
|
|
200
|
+
| jq -r 'select(.type == "message_end" and .message.role == "assistant") | .message.content[] | select(.type == "text") | .text'
|
|
201
|
+
```
|
|
150
202
|
|
|
151
|
-
|
|
203
|
+
Stream text deltas live as they arrive:
|
|
152
204
|
|
|
153
205
|
```bash
|
|
154
|
-
atomic --mode json "
|
|
206
|
+
atomic --mode json "Explain this error" 2>/dev/null \
|
|
207
|
+
| jq -r --unbuffered 'select(.type == "message_update" and .assistantMessageEvent.type == "text_delta") | .assistantMessageEvent.delta'
|
|
155
208
|
```
|
package/docs/keybindings.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Keybindings"
|
|
3
3
|
sidebarTitle: "Keybindings"
|
|
4
|
-
description: "Default keyboard shortcuts and
|
|
4
|
+
description: "Default keyboard shortcuts, selector controls, extension shortcut rules, and ~/.atomic/agent/keybindings.json configuration."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Customize keyboard shortcuts in `~/.atomic/agent/keybindings.json` (relocated by `ATOMIC_CODING_AGENT_DIR`; see [Environment variables](/environment-variables)). Run `/reload` after editing the file to apply changes without restarting. Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/keybindings.schema.json"` for editor completion and validation (Atomic ignores `$schema` at load time). See [
|
|
7
|
+
Customize keyboard shortcuts in `~/.atomic/agent/keybindings.json` (relocated by `ATOMIC_CODING_AGENT_DIR`; see [Environment variables](/environment-variables)). Run `/reload` after editing the file to apply changes without restarting. Add `"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/schemas/keybindings.schema.json"` for editor completion and validation (Atomic ignores `$schema` at load time). See [Use interactive mode](/usage) for editor and queue workflows, and [tmux setup](/tmux) if `Shift+Enter` or `Escape` behaves unexpectedly inside tmux.
|
|
8
8
|
|
|
9
9
|
## Key format
|
|
10
10
|
|
|
@@ -20,11 +20,14 @@ Examples: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+super+x`, `ctr
|
|
|
20
20
|
|
|
21
21
|
**Key syntax rules:**
|
|
22
22
|
|
|
23
|
-
- Key names and modifiers are **case-insensitive** (`pageUp` and `pageup`, `CTRL+P` and `ctrl+p` are equivalent).
|
|
24
23
|
- Modifier order does not matter (`ctrl+shift+p` and `shift+ctrl+p` are equivalent), but duplicate modifiers (such as `ctrl+ctrl+x`) are invalid and never match.
|
|
25
24
|
- **`escape` and `esc` never match with any modifier.** Bind plain `escape` or `esc` only.
|
|
26
25
|
- Binding `+` with modifiers works (`ctrl++`, `alt++`).
|
|
27
26
|
|
|
27
|
+
<Note>
|
|
28
|
+
**Case sensitivity with `$schema`:** At runtime, key names and modifiers are case-insensitive (`CTRL+P` and `pageup` work). However, the published JSON Schema (`keybindings.schema.json`) validates lowercase modifiers and camelCase special keys (`ctrl+p`, `pageUp`, `pageDown`). Use lowercase modifiers and camelCase special keys if your editor validates against `$schema`.
|
|
29
|
+
</Note>
|
|
30
|
+
|
|
28
31
|
## Custom configuration
|
|
29
32
|
|
|
30
33
|
Create `~/.atomic/agent/keybindings.json`:
|
|
@@ -42,10 +45,28 @@ Create `~/.atomic/agent/keybindings.json`:
|
|
|
42
45
|
**Configuration rules:**
|
|
43
46
|
|
|
44
47
|
- **Replacement semantics:** Setting an action in `keybindings.json` **completely replaces** its default keys rather than appending to them. Pass an array to keep defaults alongside a new key, or pass `[]` to unbind the action.
|
|
45
|
-
- **Invalid config fallback:** Malformed JSON or a non-object top-level value is
|
|
46
|
-
- **Legacy migration:** If your file contains older pre-namespaced action names (such as `cursorUp`, `expandTools`, `app.tasks.inspect`, or `app.tasks.cancel`), Atomic migrates them automatically on startup and **rewrites `~/.atomic/agent/keybindings.json` in place** (sorting known keys and dropping any legacy key whose current namespaced equivalent is already present).
|
|
48
|
+
- **Invalid config fallback:** Malformed JSON or a non-object top-level value is ignored and all defaults apply with no warning. Unknown action IDs and entries whose value is not a string or string array are also ignored, leaving defaults intact.
|
|
47
49
|
- **Windows and WSL defaults:** WSL defaults apply on Linux whenever `WSL_DISTRO_NAME` or `WSL_INTEROP` is set. On native Windows, `app.suspend` defaults to `alt+z` and opens an interactive PowerShell subshell (leaving `ctrl+z` for editor undo; type `exit` to return while background tasks keep running). On WSL, standard Linux `ctrl+z`/`fg` suspension applies and `tui.editor.undo` defaults to `alt+z`. See [Windows](/windows).
|
|
48
50
|
|
|
51
|
+
<Warning>
|
|
52
|
+
**Two gotchas in `keybindings.json`:**
|
|
53
|
+
- **Unrecognized key strings unbind defaults.** Setting a valid action ID to an unrecognized key string (such as `"bogus"` or `"ctrl+ctrl+p"`) replaces its default keys and effectively unbinds the action, with no warning, because the string never matches any keypress.
|
|
54
|
+
- **Legacy names rewrite the file in place.** If your file contains older pre-namespaced action names (such as `cursorUp`, `expandTools`, `app.tasks.inspect`, or `app.tasks.cancel`), Atomic migrates them automatically on startup and **rewrites `~/.atomic/agent/keybindings.json` in place** (sorting known keys and dropping any legacy key whose current namespaced equivalent is already present).
|
|
55
|
+
</Warning>
|
|
56
|
+
|
|
57
|
+
### Reserved built-in actions and extension shortcuts
|
|
58
|
+
|
|
59
|
+
Extensions can register custom shortcuts, which interact with built-in actions and `keybindings.json` as follows:
|
|
60
|
+
|
|
61
|
+
- **17 reserved built-in actions block extension shortcuts.** If an extension registers a key currently bound to any of these actions, Atomic skips the extension shortcut and logs a warning:
|
|
62
|
+
- `app.interrupt`, `app.clear`, `app.exit`, `app.suspend`
|
|
63
|
+
- `app.thinking.cycle`, `app.thinking.toggle`, `app.model.cycleForward`, `app.model.cycleBackward`, `app.model.select`
|
|
64
|
+
- `app.tools.expand`, `app.editor.external`, `app.message.followUp`
|
|
65
|
+
- `tui.input.submit`, `tui.select.confirm`, `tui.select.cancel`, `tui.input.copy`, `tui.editor.deleteToLineEnd`
|
|
66
|
+
- **Remapping moves the reservation.** Rebinding a reserved action in `keybindings.json` moves the reservation to its newly bound key and frees the old key for extensions.
|
|
67
|
+
- **Non-reserved built-in actions can be overridden.** If an extension claims a key bound to a non-reserved built-in action, Atomic logs a warning and activates the extension's shortcut. When two extensions claim the same key, the later extension wins with a warning.
|
|
68
|
+
- **Duplicate bindings in `keybindings.json` do not warn.** Atomic does not display a UI warning if you assign the same key to two actions in `keybindings.json`, so avoid overlapping keys within the same view.
|
|
69
|
+
|
|
49
70
|
## All actions
|
|
50
71
|
|
|
51
72
|
### TUI editor cursor movement
|
|
@@ -86,7 +107,7 @@ Dedicated history actions switch prompt history entries regardless of cursor lin
|
|
|
86
107
|
| --- | --- | --- |
|
|
87
108
|
| `tui.input.newLine` | `shift+enter`, `ctrl+j` | Insert new line |
|
|
88
109
|
| `tui.input.submit` | `enter` | Submit input |
|
|
89
|
-
| `tui.input.tab` | `tab` | Tab / autocomplete |
|
|
110
|
+
| `tui.input.tab` | `tab` | Tab / autocomplete (also toggles scope in `/model` and `/resume`) |
|
|
90
111
|
|
|
91
112
|
### TUI kill ring
|
|
92
113
|
|
|
@@ -100,7 +121,7 @@ Dedicated history actions switch prompt history entries regardless of cursor lin
|
|
|
100
121
|
|
|
101
122
|
| Keybinding id | Default | Description |
|
|
102
123
|
| --- | --- | --- |
|
|
103
|
-
| `tui.input.copy` | `ctrl+c` |
|
|
124
|
+
| `tui.input.copy` | `ctrl+c` | Reserved editor `Ctrl+C` binding (hands `Ctrl+C` to clear/interrupt/exit rather than editing; does not copy selected text—mouse selection copies automatically in fullscreen mode, and `/copy` copies the last assistant message) |
|
|
104
125
|
| `tui.select.up` | `up` | Move selection up |
|
|
105
126
|
| `tui.select.down` | `down` | Move selection down |
|
|
106
127
|
| `tui.select.pageUp` | `pageUp` | Page up in list |
|
|
@@ -108,35 +129,15 @@ Dedicated history actions switch prompt history entries regardless of cursor lin
|
|
|
108
129
|
| `tui.select.confirm` | `enter` | Confirm selection |
|
|
109
130
|
| `tui.select.cancel` | `escape`, `ctrl+c` | Cancel selection |
|
|
110
131
|
|
|
111
|
-
Local copy requires a working clipboard utility (`wl-clipboard` on Wayland, `xclip` or `xsel` on X11, or Termux:API on Termux). Atomic forwards copies through OSC 52 over SSH, Mosh, and Rex and as a headless Linux fallback; set `ATOMIC_CLIPBOARD_OSC52=1` (legacy `PI_CLIPBOARD_OSC52=1`) to force OSC 52 after local copy. See [Terminal setup](/terminal-setup)
|
|
112
|
-
|
|
113
|
-
<div id="tui-fullscreen-viewport" />
|
|
114
|
-
|
|
115
|
-
### Transcript scrolling and mouse
|
|
116
|
-
|
|
117
|
-
Interactive sessions run in fullscreen with a scrollable transcript above the docked input box. `app.tools.expand` (`Ctrl+O` by default) expands or collapses all tool and summary blocks in the displayed transcript.
|
|
118
|
-
|
|
119
|
-
**Clicking blocks:**
|
|
120
|
-
|
|
121
|
-
- Clicking any expandable block (title, preview, `... +N lines`, or its inline `(ctrl+o to expand)` hint) opens or folds that single block on `main` or a subagent, including grouped-call summaries, finished-agent cards, `!` shell blocks, Intercom messages, task notices, skill blocks, branch summaries, and compaction boundaries.
|
|
122
|
-
- Single clicks wait half a second after release so double-clicks, triple-clicks, and drags select text without toggling blocks. Clicking a link opens the link.
|
|
123
|
-
- A block stays in its clicked state until `Ctrl+O` resets every block together. Thinking blocks toggle separately with `app.thinking.toggle`.
|
|
124
|
-
|
|
125
|
-
**Clicking key hints:**
|
|
126
|
-
|
|
127
|
-
- Clicking a key hint under the prompt, at the bottom of `/tasks`, in dialogs or pickers, in the `?` overlay, or inside notices triggers that key for the active view (except inline `(ctrl+o to expand)` inside a block, which toggles only that block).
|
|
128
|
-
- In multi-key hints (`pgup/pgdn scroll`, `↑↓ select`, `1-4 pick`), click the specific key; the trailing label triggers the last key. Slash-command hints such as `/tasks to manage` run the command while preserving your prompt draft.
|
|
129
|
-
- Empty-prompt keys such as `?` and `↓` work when clicked even if the prompt holds text. Dragging across a hint selects text; hints behind an open dialog stay inactive.
|
|
132
|
+
Local copy (for `/copy` and mouse auto-copy) requires a working clipboard utility (`wl-clipboard` on Wayland, `xclip` or `xsel` on X11, or Termux:API on Termux). Atomic forwards copies through OSC 52 over SSH, Mosh, and Rex and as a headless Linux fallback; set `ATOMIC_CLIPBOARD_OSC52=1` (legacy `PI_CLIPBOARD_OSC52=1`) to force OSC 52 after local copy. See [Terminal setup](/terminal-setup).
|
|
130
133
|
|
|
131
|
-
|
|
134
|
+
### Fullscreen transcript scrolling {#tui-fullscreen-viewport}
|
|
132
135
|
|
|
133
|
-
|
|
134
|
-
- When scrolled up, a centered `↓ jump to bottom · ctrl+end` pill appears above the editor (counting new messages as they arrive) and the current turn's opening prompt stays pinned at the top. Viewed subagent transcripts and `/tasks` shell views scroll independently without moving `main`.
|
|
135
|
-
- Drag to select characters, double-click for a word or path, and triple-click for a line. Selection copies automatically unless `fullscreenCopyOnSelect` is `false`. On Windows, pressing the secondary mouse button pastes clipboard text into the focused component. See [Terminal setup](/terminal-setup) for mouse and trackpad behavior.
|
|
136
|
+
Actions under the `tui.altScreen.*` namespace control scrolling in the fullscreen transcript viewport above the prompt editor. For mouse clicks, text selection, auto-copy, and `ask_user_question` dialog controls, see [Transcript scrolling and mouse](#transcript-scrolling-and-mouse).
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
While the main editor has focus, `home` and `end` stay with the editor, `ctrl+home` and `ctrl+end` jump to the transcript top and bottom, `pageUp` and `pageDown` scroll the transcript, and `ctrl+pageUp` and `ctrl+pageDown` scroll the editor. Focused overlays and scrollable lists (autocomplete, `/settings`, `/model`) capture scrolling keys first.
|
|
138
139
|
|
|
139
|
-
| Key | Editor
|
|
140
|
+
| Key | Editor focus | Transcript focus |
|
|
140
141
|
| --- | --- | --- |
|
|
141
142
|
| `home`, `end` | Editor | Editor |
|
|
142
143
|
| `ctrl+home`, `ctrl+end` | *(none)* | Transcript |
|
|
@@ -145,8 +146,6 @@ Interactive sessions run in fullscreen with a scrollable transcript above the do
|
|
|
145
146
|
|
|
146
147
|
Rebind these like any other action: for example `"tui.altScreen.pageUp": "ctrl+pageUp"` keeps `pageUp` in the editor and moves transcript paging to `ctrl+pageUp`, and `[]` unbinds a shortcut. Focused custom components may consume viewport keys first; see the [input handling contract](/extensions/ui#custom-components).
|
|
147
148
|
|
|
148
|
-
**[`ask_user_question`](/tools) controls:** Transcript scroll keys also work while the bottom-pinned `ask_user_question` dialog or Notes is open. Inside `ask_user_question`, use `↑`/`↓` to move between options, `Enter` to pick (`Enter` or `Space` to toggle multi-select boxes), type on **Type something.** for a custom answer, `n` to add a note, `Tab` or `←`/`→` to switch questions, and `Esc` to cancel.
|
|
149
|
-
|
|
150
149
|
| Keybinding id | Default | Description |
|
|
151
150
|
| --- | --- | --- |
|
|
152
151
|
| `tui.altScreen.pageUp` | `pageUp` | Scroll the transcript up by one page |
|
|
@@ -155,12 +154,14 @@ Rebind these like any other action: for example `"tui.altScreen.pageUp": "ctrl+p
|
|
|
155
154
|
| `tui.altScreen.halfPageDown` | *(none)* | Scroll the transcript down by half a page |
|
|
156
155
|
| `tui.altScreen.lineUp` | *(none)* | Scroll the transcript up by one line |
|
|
157
156
|
| `tui.altScreen.lineDown` | *(none)* | Scroll the transcript down by one line |
|
|
158
|
-
| `tui.altScreen.previousPrompt` | `ctrl+shift+up`, `ctrl+up` (`ctrl+up` alone on Windows and WSL) | Jump to the previous
|
|
159
|
-
| `tui.altScreen.nextPrompt` | `ctrl+shift+down`, `ctrl+down` (`ctrl+down` alone on Windows and WSL) | Jump to the next
|
|
157
|
+
| `tui.altScreen.previousPrompt` | `ctrl+shift+up`, `ctrl+up` (`ctrl+up` alone on Windows and WSL) | Jump to the previous message turn (user or assistant message) |
|
|
158
|
+
| `tui.altScreen.nextPrompt` | `ctrl+shift+down`, `ctrl+down` (`ctrl+down` alone on Windows and WSL) | Jump to the next message turn (user or assistant message) |
|
|
160
159
|
| `tui.altScreen.top` | `ctrl+home` | Scroll to the beginning of the transcript |
|
|
161
160
|
| `tui.altScreen.bottom` | `ctrl+end` | Scroll to the transcript end and follow new output |
|
|
162
161
|
|
|
163
|
-
|
|
162
|
+
<Note>
|
|
163
|
+
Atomic does not ship a find-in-transcript shortcut. Four compatibility action IDs—`tui.altScreen.search`, `tui.altScreen.searchNext`, `tui.altScreen.searchPrevious`, and `tui.altScreen.searchClose`—remain recognized so existing `keybindings.json` files stay valid, but they have no default keys and do nothing.
|
|
164
|
+
</Note>
|
|
164
165
|
|
|
165
166
|
### Application
|
|
166
167
|
|
|
@@ -193,25 +194,38 @@ Atomic does not ship a find-in-transcript shortcut. The four `tui.altScreen.sear
|
|
|
193
194
|
| `app.session.tree` | *(none)* | Open session tree navigator (`/tree`) |
|
|
194
195
|
| `app.session.fork` | *(none)* | Fork current session (`/fork`) |
|
|
195
196
|
| `app.session.resume` | *(none)* | Open session resume picker (`/resume`) |
|
|
196
|
-
| `app.session.togglePath` | `ctrl+p` | Toggle path display |
|
|
197
|
-
| `app.session.toggleSort` | `ctrl+s` | Toggle sort mode |
|
|
198
|
-
| `app.session.toggleNamedFilter` | `ctrl+n` | Toggle named-only filter |
|
|
199
|
-
| `app.session.rename` | `ctrl+r` | Rename session |
|
|
200
|
-
| `app.session.delete` | `ctrl+d` | Delete session |
|
|
201
|
-
| `app.session.deleteNoninvasive` | `ctrl+backspace` | Delete session when query is empty |
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
| `app.session.togglePath` | `ctrl+p` | Toggle path display in the session picker |
|
|
198
|
+
| `app.session.toggleSort` | `ctrl+s` | Toggle sort mode in the session picker |
|
|
199
|
+
| `app.session.toggleNamedFilter` | `ctrl+n` | Toggle named-only filter in the session picker |
|
|
200
|
+
| `app.session.rename` | `ctrl+r` | Rename the selected session (interactive `/resume` only) |
|
|
201
|
+
| `app.session.delete` | `ctrl+d` | Delete the selected session |
|
|
202
|
+
| `app.session.deleteNoninvasive` | `ctrl+backspace` | Delete the selected session when the search query is empty |
|
|
203
|
+
|
|
204
|
+
**Session picker controls and limits (`/resume` and `atomic -r`):**
|
|
205
|
+
|
|
206
|
+
- `Tab` (`tui.input.tab`) switches between sessions in the current directory and sessions across all directories.
|
|
207
|
+
- `Space` (when the search box is empty) toggles a preview pane for the selected session. Press `Esc` to close the preview before cancelling the picker.
|
|
208
|
+
- `?` (`app.keys.help`) opens the picker's key overview.
|
|
209
|
+
- **Deleting sessions (`Ctrl+D` or `Ctrl+Backspace`):** Requires confirmation (`Enter` confirms; `Esc` or `Ctrl+C` cancels), cannot delete the currently open session, and is **disabled for JSONL session storage**.
|
|
210
|
+
- **Renaming sessions (`Ctrl+R`):** Available in interactive `/resume`, **not** in CLI `atomic -r` / `--resume`.
|
|
211
|
+
- Cancelling `atomic -r` prints `No session selected` and exits `0`.
|
|
212
|
+
- While viewing a subagent, `app.session.new`, `app.session.tree`, and `app.session.fork` ask for confirmation before acting on `main`; `app.session.resume` opens its picker in place.
|
|
204
213
|
|
|
205
214
|
### Models and thinking
|
|
206
215
|
|
|
207
216
|
| Keybinding id | Default | Description |
|
|
208
217
|
| --- | --- | --- |
|
|
209
|
-
| `app.model.select` | `ctrl+l` | Open model selector |
|
|
218
|
+
| `app.model.select` | `ctrl+l` | Open model selector (`/model`) |
|
|
210
219
|
| `app.model.cycleForward` | `ctrl+p` | Cycle to next model |
|
|
211
220
|
| `app.model.cycleBackward` | `shift+ctrl+p` (`alt+p` on Windows and WSL) | Cycle to previous model |
|
|
212
221
|
| `app.thinking.cycle` | `shift+tab` | Cycle thinking level |
|
|
213
222
|
| `app.thinking.toggle` | `ctrl+t` | Collapse or expand thinking blocks |
|
|
214
223
|
|
|
224
|
+
**`/model` (`Ctrl+L`) selector controls:**
|
|
225
|
+
|
|
226
|
+
- **`←` / `→`:** Adjust the thinking/effort level of the highlighted reasoning model before selecting it.
|
|
227
|
+
- **`Tab` (`tui.input.tab`):** Switch between scoped models and all available models when a model scope (`enabledModels` or `--models`) is active.
|
|
228
|
+
|
|
215
229
|
Interactive model and thinking choices save automatically as startup defaults; there is no separate save-default shortcut. While viewing a subagent, model and thinking-level changes are refused with a notice (switch to `main` to change them); `app.thinking.toggle` applies to the viewed transcript.
|
|
216
230
|
|
|
217
231
|
### Display and message queue
|
|
@@ -240,16 +254,18 @@ Atomic shares one chat screen across `main` and its subagents, with the [agent p
|
|
|
240
254
|
| `app.agents.focus` | `down` | Focus the agent panel from an empty prompt |
|
|
241
255
|
| `app.agents.chord` | `ctrl+x` | Start a background-work chord in the main chat |
|
|
242
256
|
| `app.agents.stopAll` | `ctrl+k` | After the chord key: stop all background subagents and shells (press twice to confirm) |
|
|
243
|
-
| `app.tasks.open` | *(none)* |
|
|
244
|
-
| `app.tasks.input` | *(none)* |
|
|
257
|
+
| `app.tasks.open` | *(none)* | Reserved for opening the task list (currently has no key handler; use `/tasks` instead) |
|
|
258
|
+
| `app.tasks.input` | *(none)* | Open the input box to send standard input to an interactive background shell task in `/tasks` (only when the selected task accepts input) |
|
|
245
259
|
| `app.tasks.openWaited` | `alt+w` | Open the output of the shell a waiting subagent waits on, while viewing that subagent or from its `/tasks` row |
|
|
246
260
|
|
|
247
261
|
On macOS, `Alt+W` requires your terminal to send Option as Meta (enable **Use Option as Meta key** in Terminal.app, set Option to **Esc+** in iTerm2, set `macos-option-as-alt` in Ghostty, or set `macos_option_as_alt both` in kitty). Otherwise remap `app.tasks.openWaited`. Avoid binding `alt+w` to another editor action because `app.tasks.openWaited` takes priority while viewing a waiting subagent or its `/tasks` row.
|
|
248
262
|
|
|
249
|
-
Open question prompts and the main input box keep keyboard priority; `Esc` leaves stdin or task detail before leaving task focus, and unbound actions show no key hint.
|
|
263
|
+
Open question prompts and the main input box keep keyboard priority; `Esc` leaves task stdin or task detail before leaving task focus, and unbound actions show no key hint.
|
|
250
264
|
|
|
251
265
|
### Tree navigation
|
|
252
266
|
|
|
267
|
+
Inside `/tree`, typing filters entries live (automatically unfolding branches), `Backspace` edits the search query, `Esc` clears the search before closing the picker, and `←`/`→` (`tui.editor.cursorLeft` / `tui.editor.cursorRight`) page up and down alongside `PageUp`/`PageDown`.
|
|
268
|
+
|
|
253
269
|
| Keybinding id | Default | Description |
|
|
254
270
|
| --- | --- | --- |
|
|
255
271
|
| `app.tree.foldOrUp` | `ctrl+left`, `alt+left` | Fold current branch segment, or jump to the previous segment start |
|
|
@@ -288,6 +304,26 @@ These shortcuts are not configured through `keybindings.json`:
|
|
|
288
304
|
| `Ctrl+Shift+S` | Bundled [Web access](/web-access#slash-commands-and-shortcuts) extension | Open the browser search curator while a search runs (configure via `shortcuts.curate` in `~/.atomic/web-search.json`) |
|
|
289
305
|
| `Ctrl+Shift+W` | Bundled [Web access](/web-access#slash-commands-and-shortcuts) extension | Toggle the live web-search activity monitor (configure via `shortcuts.activity` in `~/.atomic/web-search.json`) |
|
|
290
306
|
|
|
307
|
+
## Transcript scrolling and mouse
|
|
308
|
+
|
|
309
|
+
Interactive sessions run fullscreen with a scrollable transcript above the docked editor. See [Fullscreen transcript scrolling](#tui-fullscreen-viewport) for keyboard paging and jump bindings.
|
|
310
|
+
|
|
311
|
+
- **Clicking blocks:** Single-click any expandable block (title, preview, `... +N lines`, or its inline `(ctrl+o to expand)` hint) to open or fold that single block on `main` or a subagent—including grouped-call summaries, finished-agent cards, `!` shell blocks, Intercom messages, task notices, skill blocks, branch summaries, and compaction boundaries. Single clicks wait half a second after release so double-clicks, triple-clicks, and drags select text without toggling blocks; clicking a link opens the link. A block keeps its clicked state until `Ctrl+O` resets every block together (thinking blocks toggle separately with `Ctrl+T`).
|
|
312
|
+
- **Clicking key hints:** Click a key hint under the prompt, at the bottom of `/tasks`, in dialogs or pickers, in the `?` overlay, or inside notices to trigger that key for the active view. In multi-key hints (`pgup/pgdn scroll`, `↑↓ select`, `1-4 pick`), click the specific key; the trailing label triggers the last key. Slash-command hints such as `/tasks to manage` run the command while preserving your prompt draft, and empty-prompt keys (`?`, `↓`) work when clicked even if the editor holds text. Dragging across a hint selects text; hints behind an open dialog stay inactive.
|
|
313
|
+
- **Mouse scrolling and selection:** The mouse wheel scrolls the region under the pointer (and scrolls the transcript when over the editor or footer). Hold `Alt` while scrolling to move five times as far when your terminal forwards Alt with wheel events. While scrolled up, a centered `↓ jump to bottom · ctrl+end` pill appears above the editor and the current turn's opening prompt stays pinned at the top. Viewed subagent transcripts and `/tasks` shell views scroll independently without moving `main`.
|
|
314
|
+
- **Auto-copy and Windows right-click paste:** Drag to select characters, double-click for a word or path, and triple-click for a line. Selection copies automatically unless `fullscreenCopyOnSelect` is `false`. On native Windows, pressing the secondary mouse button pastes clipboard text into the focused component, except inside VS Code's integrated terminal (`TERM_PROGRAM=vscode`). See [Terminal setup](/terminal-setup) for mouse and trackpad behavior.
|
|
315
|
+
|
|
316
|
+
### Dialog controls (`ask_user_question`)
|
|
317
|
+
|
|
318
|
+
Transcript scroll keys remain active while the bottom-pinned [`ask_user_question`](/tools) dialog or Notes view is open:
|
|
319
|
+
|
|
320
|
+
- `↑` / `↓` — move between options
|
|
321
|
+
- `Enter` — pick an option (`Enter` or `Space` toggles multi-select checkboxes)
|
|
322
|
+
- Type on **Type something.** — enter a custom free-text answer
|
|
323
|
+
- `n` — add a note
|
|
324
|
+
- `Tab` or `←` / `→` — switch between questions
|
|
325
|
+
- `Esc` — cancel the dialog
|
|
326
|
+
|
|
291
327
|
## Preset examples
|
|
292
328
|
|
|
293
329
|
### Emacs example
|