@bastani/atomic 0.10.10-alpha.1 → 0.10.10-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +22 -15
- 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 +2 -2
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +2 -2
- package/dist/_shared/mode-shared-2QJSCUM6.js +2 -2
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/sdk-RRLVN7ER.js +2 -2
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-4VG2G44V.js +2 -2
- package/dist/_shared/startup-0-1-XTIL65D4.js +2 -2
- package/dist/_shared/startup-0-2-27OWFHV6.js +7 -6
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.js +2 -2
- package/dist/_shared/startup-0-4-ZMJV547D.js +2 -2
- package/dist/_shared/startup-0-5-FD2P735I.js +2 -2
- package/dist/_shared/startup-10-0-TDQNBDDL.js +2 -2
- package/dist/_shared/startup-15-1-4S7FLMNG.js +2 -2
- package/dist/_shared/startup-8-0-34CBHPZH.js +2 -2
- package/dist/_shared/startup-8-1-4KANEHRA.js +2 -2
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/README.md +4 -4
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +28 -4
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/README.md +2 -2
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +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 +2 -2
- 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.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- 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.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- 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/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.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.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +2 -2
- 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.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.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.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.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.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.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.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- 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/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/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.md +8 -5
- package/docs/build.md +11 -6
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +10 -2
- package/docs/compaction/reference.md +6 -4
- package/docs/compaction.md +3 -3
- package/docs/containerization.md +13 -5
- package/docs/custom-provider/api-reference.md +8 -6
- package/docs/custom-provider/oauth.md +4 -4
- package/docs/custom-provider/registration.md +3 -3
- package/docs/custom-provider.md +8 -8
- package/docs/development.md +40 -5
- package/docs/docs.json +21 -5
- package/docs/environment-variables.md +20 -18
- package/docs/extensions/api-reference.md +8 -6
- package/docs/extensions/authoring.md +4 -4
- package/docs/extensions.md +43 -6
- package/docs/guides/configuration.md +21 -1
- package/docs/guides/intercom.md +4 -0
- package/docs/guides/non-interactive.md +4 -2
- package/docs/guides/orchestration.md +4 -2
- package/docs/guides/resume-on-any-machine.md +12 -6
- package/docs/guides/subagents.md +4 -0
- package/docs/guides/team-setup.md +13 -2
- package/docs/guides.md +10 -4
- package/docs/herdr.md +4 -4
- package/docs/index.md +12 -4
- package/docs/intercom/operations.md +26 -4
- package/docs/intercom/reference.md +25 -3
- package/docs/intercom.md +13 -5
- package/docs/json.md +2 -0
- package/docs/keybindings.md +17 -4
- package/docs/libraries/agent-core.md +4 -2
- package/docs/libraries/ai.md +71 -53
- package/docs/libraries/codemode.md +3 -2
- package/docs/libraries/schema.md +5 -2
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +35 -2
- package/docs/libraries.md +23 -6
- package/docs/llama-cpp.md +2 -2
- package/docs/mcp-servers.md +50 -4
- package/docs/models/reference.md +13 -9
- package/docs/models-configuration.md +7 -7
- package/docs/models.md +18 -8
- package/docs/orchestration/migrating-workflows.md +2 -2
- package/docs/orchestration/patterns.md +8 -8
- package/docs/orchestration.md +5 -3
- package/docs/packages/authoring.md +3 -1
- package/docs/packages/reference.md +3 -1
- package/docs/packages.md +5 -3
- package/docs/programmatic.md +14 -8
- package/docs/prompt-templates.md +5 -3
- package/docs/providers/reference.md +7 -7
- package/docs/providers.md +22 -10
- package/docs/quickstart.md +13 -11
- package/docs/reference/cli.md +10 -5
- package/docs/reference.md +8 -4
- package/docs/rpc/examples.md +47 -0
- package/docs/rpc/extension-ui.md +7 -1
- package/docs/rpc/protocol.md +3 -2
- package/docs/rpc.md +3 -1
- package/docs/sdk/reference.md +144 -38
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +77 -4
- package/docs/sdk/web-server.md +3 -2
- package/docs/sdk.md +26 -115
- package/docs/security.md +17 -7
- package/docs/session-format.md +38 -24
- package/docs/sessions.md +21 -15
- package/docs/settings.md +17 -14
- package/docs/skills.md +47 -3
- package/docs/storage.md +38 -24
- package/docs/subagents/authoring.md +3 -1
- package/docs/subagents/reference.md +8 -2
- package/docs/subagents.md +35 -6
- package/docs/terminal-setup.md +1 -1
- package/docs/themes.md +5 -3
- package/docs/tmux.md +4 -4
- package/docs/tools.md +11 -0
- package/docs/usage.md +25 -15
- package/docs/web-access.md +35 -0
- package/docs/windows.md +9 -6
- package/docs/worktree-snapshots.md +22 -11
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +7 -7
package/docs/development.md
CHANGED
|
@@ -6,9 +6,13 @@ description: "Enable debug logs, capture UI snapshots, profile event-loop stalls
|
|
|
6
6
|
|
|
7
7
|
Use these tools to inspect failures, diagnose slow startup or UI stalls, and gather bug-report diagnostics. To build extensions, custom providers, or SDK integrations, start with [Build with Atomic](/build). To install the CLI, see [Installation](/getting-started/installation).
|
|
8
8
|
|
|
9
|
+
<Note>
|
|
10
|
+
Building Atomic from source or contributing to the repository? See [DEV_SETUP.md](https://github.com/bastani-inc/atomic/blob/main/DEV_SETUP.md) and [CONTRIBUTING.md](https://github.com/bastani-inc/atomic/blob/main/CONTRIBUTING.md).
|
|
11
|
+
</Note>
|
|
12
|
+
|
|
9
13
|
## Debugging
|
|
10
14
|
|
|
11
|
-
Enable debug mode from **Debug mode** in `/settings` (the global [`debug` setting](/settings#debug-mode)), by passing `--debug`,
|
|
15
|
+
Enable debug mode from **Debug mode** in `/settings` (the global [`debug` setting](/settings#debug-mode)), by passing `--debug`, by setting `ATOMIC_DEBUG=1` (legacy `PI_DEBUG=1`; see [Environment variables](/environment-variables#diagnostics-and-performance)), or over RPC with [`set_debug`](/rpc/protocol#set_debug) (`{"type": "set_debug", "enabled": true}`, which leaves saved settings unchanged). The footer displays a `debug` badge while debug mode is active.
|
|
12
16
|
|
|
13
17
|
Only the exact value `"1"` enables debug mode via environment variable (`true` and `yes` are ignored). If `"debug": true` is saved in `~/.atomic/agent/settings.json`, setting `ATOMIC_DEBUG=0` does not turn debug mode off for that run; toggle **Debug mode** in `/settings` or edit `settings.json` instead.
|
|
14
18
|
|
|
@@ -70,6 +74,35 @@ ATOMIC_EVENT_LOOP_BLOCK_MS=100 ATOMIC_EVENT_LOOP_BLOCK_STACKS=0 atomic
|
|
|
70
74
|
|
|
71
75
|
In delay-only mode, `start` records report `stacks: "disabled"` and `block` records have zero samples, while every stall duration and delay summary is still recorded.
|
|
72
76
|
|
|
77
|
+
## Terminal rendering diagnostics
|
|
78
|
+
|
|
79
|
+
Capture raw TUI output and redraw logs with three environment variables (legacy `PI_*` aliases work when the `ATOMIC_*` variable is unset; see [TUI debug logging](/tui/reference#debug-logging) and [Environment variables](/environment-variables#diagnostics-and-performance)):
|
|
80
|
+
|
|
81
|
+
- **`ATOMIC_TUI_WRITE_LOG`** writes the raw ANSI stdout stream to a file path, or to one `tui-<timestamp>-<pid>.log` file per process inside a directory path.
|
|
82
|
+
- **`ATOMIC_TUI_DEBUG=1`** writes main-screen render snapshots to `/tmp/tui/render-<timestamp>-<random>.log`.
|
|
83
|
+
- **`ATOMIC_TUI_DEBUG_REDRAW=1`** logs full-redraw triggers to `pi-tui-debug.log` in the TUI log directory.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
ATOMIC_TUI_WRITE_LOG=/tmp/tui-ansi.log atomic
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Review captured terminal logs for sensitive content before sharing them.
|
|
90
|
+
|
|
91
|
+
## Subsystem status and native troubleshooting
|
|
92
|
+
|
|
93
|
+
Check subsystem health and logs before collecting full traces:
|
|
94
|
+
|
|
95
|
+
- **`atomic storage status`** verifies active storage selection, adapter loading, database connectivity, and peer brokers ([Checking the selected storage](/storage#checking-the-selected-storage)).
|
|
96
|
+
- **`atomic intercom status`** inspects the local Intercom broker; broker logs live at `~/.atomic/agent/intercom/broker.log` and `broker-watchdog.log` ([Intercom operations](/intercom/operations#local-files-logs-and-locks)).
|
|
97
|
+
- **`atomic mcp list`** validates MCP configuration and tests enabled server connections ([MCP servers](/mcp-servers#shell-commands)).
|
|
98
|
+
- **`/tools`** lists active and inactive tools plus which `git` binary Atomic selected ([Tools](/tools)).
|
|
99
|
+
- **`/session snapshot`** shows [worktree snapshots](/worktree-snapshots) and the `Last resume` timing breakdown ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
|
|
100
|
+
|
|
101
|
+
For process-spawning or native-addon errors:
|
|
102
|
+
|
|
103
|
+
- Set `ATOMIC_HOST_SPAWN=child-process` to launch helper processes (Git snapshots, `rg`, `fd`, worktree setup, and standalone shell commands) through standard Node child spawning instead of Atomic's native spawner ([Environment variables](/environment-variables#diagnostics-and-performance)).
|
|
104
|
+
- If startup fails with `NativeModuleUnavailableError`, check [Package manager troubleshooting](/getting-started/installation#package-manager-troubleshooting) or point `NAPI_RS_NATIVE_LIBRARY_PATH` at a locally built `.node` binary (which bypasses Atomic's exact release version check).
|
|
105
|
+
|
|
73
106
|
## Document conversion diagnostics
|
|
74
107
|
|
|
75
108
|
Diagnostics from document conversion (`.pdf`, `.doc`, `.docx`, `.ppt`, `.pptx`, `.xls`, `.xlsx`, `.rtf`, and `.epub`) and background session workers appear as status messages in interactive sessions and on stderr or console output in other modes. Conversion failures also include diagnostic details in the tool error result.
|
|
@@ -78,15 +111,17 @@ Long or noisy diagnostics may truncate, and interactive sessions keep only recen
|
|
|
78
111
|
|
|
79
112
|
## Startup timing and bug reports
|
|
80
113
|
|
|
81
|
-
To profile slow startup or session resume:
|
|
114
|
+
To profile slow startup or session resume (see [Environment variables](/environment-variables#diagnostics-and-performance)):
|
|
82
115
|
|
|
83
|
-
- Set `ATOMIC_TIMING=1` (legacy `PI_TIMING=1`) to print startup timings and `atomic --session` resume timings to stderr.
|
|
116
|
+
- Set `ATOMIC_TIMING=1` (legacy `PI_TIMING=1`) to print startup timings and `atomic --session` resume timings to stderr ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
|
|
84
117
|
- Set `ATOMIC_STARTUP_TRACE=/tmp/atomic-startup.jsonl` (legacy `PI_STARTUP_TRACE`) to append JSONL startup milestones with wall-clock timestamps.
|
|
85
118
|
|
|
86
|
-
|
|
119
|
+
To draft a bug report from inside Atomic, run `/skill:feedback <summary>`. It runs a debugger investigation, privacy-scrubs the Markdown draft, and lets you review it before posting to GitHub through your authenticated `gh` CLI ([Bundled skills](/skills#setup-notes-for-specific-bundled-skills)).
|
|
120
|
+
|
|
121
|
+
When reporting a bug or startup problem manually, include:
|
|
87
122
|
|
|
88
123
|
- Your OS and version
|
|
89
|
-
- Your terminal emulator (and tmux or Herdr version if applicable)
|
|
124
|
+
- Your [terminal emulator](/terminal-setup) (and [tmux](/tmux) or [Herdr](/herdr) version if applicable)
|
|
90
125
|
- Your installation method (npm/package manager, self-contained release archive, or standalone binary)
|
|
91
126
|
- Output of `atomic --version`
|
|
92
127
|
- Relevant redacted diagnostic logs
|
package/docs/docs.json
CHANGED
|
@@ -143,8 +143,15 @@
|
|
|
143
143
|
"group": "Embed and integrate",
|
|
144
144
|
"pages": [
|
|
145
145
|
"programmatic",
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
{
|
|
147
|
+
"group": "TypeScript SDK",
|
|
148
|
+
"pages": [
|
|
149
|
+
"sdk",
|
|
150
|
+
"sdk/storage",
|
|
151
|
+
"sdk/structured-decisions",
|
|
152
|
+
"sdk/web-server"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
148
155
|
"rpc",
|
|
149
156
|
"rpc/extension-ui",
|
|
150
157
|
"rpc/examples",
|
|
@@ -159,7 +166,9 @@
|
|
|
159
166
|
"libraries/agent-core",
|
|
160
167
|
"libraries/codemode",
|
|
161
168
|
"libraries/schema",
|
|
162
|
-
"libraries/telemetry"
|
|
169
|
+
"libraries/telemetry",
|
|
170
|
+
"libraries/storage-postgres",
|
|
171
|
+
"libraries/storage-libsql"
|
|
163
172
|
]
|
|
164
173
|
}
|
|
165
174
|
]
|
|
@@ -210,7 +219,6 @@
|
|
|
210
219
|
"extensions/api-reference",
|
|
211
220
|
"custom-provider/api-reference",
|
|
212
221
|
"sdk/reference",
|
|
213
|
-
"sdk/structured-decisions",
|
|
214
222
|
"rpc/protocol",
|
|
215
223
|
"tui/reference"
|
|
216
224
|
]
|
|
@@ -301,6 +309,14 @@
|
|
|
301
309
|
{
|
|
302
310
|
"source": "/models/model-selection",
|
|
303
311
|
"destination": "/models"
|
|
304
|
-
}
|
|
312
|
+
},
|
|
313
|
+
{ "source": "/postgres", "destination": "/storage#postgresql" },
|
|
314
|
+
{ "source": "/postgresql", "destination": "/storage#postgresql" },
|
|
315
|
+
{ "source": "/libsql", "destination": "/storage#turso-and-libsql" },
|
|
316
|
+
{ "source": "/turso", "destination": "/storage#turso-and-libsql" },
|
|
317
|
+
{ "source": "/decisions", "destination": "/sdk/structured-decisions" },
|
|
318
|
+
{ "source": "/structured-decisions", "destination": "/sdk/structured-decisions" },
|
|
319
|
+
{ "source": "/compactors", "destination": "/compaction#customize-morph-or-add-a-remote-compactor" },
|
|
320
|
+
{ "source": "/blueprints", "destination": "/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint" }
|
|
305
321
|
]
|
|
306
322
|
}
|
|
@@ -10,24 +10,23 @@ Atomic reads environment variables for configuration, provider credentials, term
|
|
|
10
10
|
|
|
11
11
|
Variables use different parsing rules depending on their category:
|
|
12
12
|
|
|
13
|
-
- **Exact `"1"` only** (`"true"` and `"yes"` do not enable): `ATOMIC_DEBUG`, `ATOMIC_TIMING`, `ATOMIC_REDUCED_MOTION`, `ATOMIC_EXPERIMENTAL`, `ATOMIC_NO_PTY`, `ATOMIC_HARDWARE_CURSOR`, `ATOMIC_CLEAR_ON_SHRINK`, `ATOMIC_CLIPBOARD_OSC52`, `ATOMIC_ALLOW_BROWSER_COOKIES`, `ATOMIC_ALLOW_PRIVATE_URL_READS`, `ATOMIC_TUI_DEBUG`, and `
|
|
14
|
-
- **`"1"`, `"true"`, or `"yes"` (case-insensitive):** `ATOMIC_OFFLINE` (`"0"` and `"false"` keep Atomic online) and `ATOMIC_TELEMETRY` (any other defined value, including `"0"`, `"false"`, `"no"`, or `""`, disables version-adoption pings and disables provider attribution headers for OpenRouter, NVIDIA, and OpenCode).
|
|
13
|
+
- **Exact `"1"` only** (`"true"` and `"yes"` do not enable): `ATOMIC_DEBUG`, `ATOMIC_TIMING`, `ATOMIC_REDUCED_MOTION`, `ATOMIC_EXPERIMENTAL`, `ATOMIC_NO_PTY`, `ATOMIC_HARDWARE_CURSOR`, `ATOMIC_CLEAR_ON_SHRINK`, `ATOMIC_CLIPBOARD_OSC52`, `ATOMIC_ALLOW_BROWSER_COOKIES`, `ATOMIC_ALLOW_PRIVATE_URL_READS`, `ATOMIC_TUI_DEBUG`, `ATOMIC_TUI_DEBUG_REDRAW`, and `HERDR_ENV`.
|
|
14
|
+
- **`"1"`, `"true"`, or `"yes"` (case-insensitive):** `ATOMIC_OFFLINE` (`"0"` and `"false"` keep Atomic online), `ATOMIC_SKIP_VERSION_CHECK` (`"0"` and `"false"` keep startup version checks enabled), and `ATOMIC_TELEMETRY` (any other defined value, including `"0"`, `"false"`, `"no"`, or `""`, disables version-adoption pings and disables provider attribution headers for OpenRouter, NVIDIA, and OpenCode).
|
|
15
15
|
- **`"1"`/`"true"` or `"0"`/`"false"` (case-insensitive, trimmed):** `ATOMIC_INTERCOM_JOIN_AT_STARTUP` (other values are ignored).
|
|
16
|
-
- **Any
|
|
17
|
-
- **
|
|
18
|
-
- **Exact `"0"` (trimmed):** `ATOMIC_EVENT_LOOP_BLOCK_STACKS`.
|
|
16
|
+
- **Any defined value (including empty string `""`):** `NO_COLOR` and `NODE_DISABLE_COMPILE_CACHE`. Unset these variables instead of setting them to `"0"`.
|
|
17
|
+
- **Exact `"0"`:** `ATOMIC_EVENT_LOOP_BLOCK_STACKS` (trimmed) and `ATOMIC_TASK_CGROUP` (exact `"0"`, not trimmed).
|
|
19
18
|
- **Numeric values:** Invalid or negative values silently fall back to the default (or disable stall logging for `ATOMIC_EVENT_LOOP_BLOCK_MS`).
|
|
20
19
|
|
|
21
20
|
## Core and session variables
|
|
22
21
|
|
|
23
22
|
| Atomic variable | Legacy alias | Accepted values and behavior |
|
|
24
23
|
| --- | --- | --- |
|
|
25
|
-
| `ATOMIC_CODING_AGENT_DIR` | `PI_CODING_AGENT_DIR` | Path to the agent and config directory (default `~/.atomic/agent`). Read each time a session or extension load starts, so caches follow the active value. An SDK session's `agentDir` option takes precedence |
|
|
24
|
+
| `ATOMIC_CODING_AGENT_DIR` | `PI_CODING_AGENT_DIR` | Path to the agent and config directory (default `~/.atomic/agent`). Read each time a session or extension load starts, so caches follow the active value. An [SDK](/sdk) session's `agentDir` option ([SDK directories](/sdk/reference#directories)) takes precedence |
|
|
26
25
|
| `ATOMIC_OFFLINE` | `PI_OFFLINE` | `1`, `true`, or `yes` (case-insensitive) disables automatic network activity: update checks, package updates, telemetry, model catalog refreshes, and downloads of `fd`, `rg`, and [Git](/getting-started/installation#git). `0` and `false` keep Atomic online |
|
|
27
|
-
| `ATOMIC_CACHE_RETENTION` | `PI_CACHE_RETENTION` | Case-sensitive `long` (default), `short`, or `none`. Unrecognized non-empty values
|
|
28
|
-
| `ATOMIC_MODEL_CATALOG_URL` | `PI_MODEL_CATALOG_URL` | Base URL for `<url>/api.json` model catalog refreshes (default `https://models.dev`). Refreshes run at most once every four hours per provider (or on `atomic update --models`), keeping the bundled catalog if download fails |
|
|
26
|
+
| `ATOMIC_CACHE_RETENTION` | `PI_CACHE_RETENTION` | Case-sensitive `long` (default in Atomic CLI and SDK sessions), `short`, or `none`. Unrecognized non-empty values fall back to `short`. Standalone [`@bastani/atomic-ai`](/libraries/ai) defaults to `short`. See [Prompt-cache retention](#prompt-cache-retention) |
|
|
27
|
+
| `ATOMIC_MODEL_CATALOG_URL` | `PI_MODEL_CATALOG_URL` | Base URL for `<url>/api.json` model catalog refreshes (default `https://models.dev`). Refreshes run at most once every four hours per provider (or on `atomic update --models`), keeping the bundled catalog if download fails. See [Configure custom models](/models) |
|
|
29
28
|
| `ATOMIC_SHARE_VIEWER_URL` | `PI_SHARE_VIEWER_URL` | Base URL of the viewer that `/share` links open (default `https://bastani.ai/session/`; the gist ID is appended after `#`) |
|
|
30
|
-
| `ATOMIC_SKIP_VERSION_CHECK` | `PI_SKIP_VERSION_CHECK` |
|
|
29
|
+
| `ATOMIC_SKIP_VERSION_CHECK` | `PI_SKIP_VERSION_CHECK` | `1`, `true`, or `yes` (case-insensitive) skips automatic startup version checks; `0` and `false` keep checks enabled. Explicit self-update still checks |
|
|
31
30
|
| `ATOMIC_SELF_UPDATE_COMMAND` | `PI_SELF_UPDATE_COMMAND` | Command `atomic update` runs to update Atomic itself, split on whitespace, with `{packageName}`, `{version}`, and `{installSpec}` placeholders. Takes precedence over `selfUpdateCommand`. See [Custom update command](/reference/cli#custom-update-command) |
|
|
32
31
|
| `ATOMIC_TELEMETRY` | `PI_TELEMETRY` | `1`/`true`/`yes` enables version-adoption pings; any other defined value (including `0`, `false`, `no`, or `""`) disables pings and disables provider attribution headers for OpenRouter, NVIDIA, and OpenCode. Does not disable update checks |
|
|
33
32
|
| `ATOMIC_OAUTH_CALLBACK_HOST` | `PI_OAUTH_CALLBACK_HOST` | Bind host for the local OAuth callback server during `/login` (default `127.0.0.1`) |
|
|
@@ -42,9 +41,9 @@ Variables use different parsing rules depending on their category:
|
|
|
42
41
|
|
|
43
42
|
| Atomic variable | Legacy alias | Accepted values and behavior |
|
|
44
43
|
| --- | --- | --- |
|
|
45
|
-
| `ATOMIC_CODING_AGENT_SESSION_DIR` | None | Non-empty path selects a JSONL session directory (`--session-dir` and `--no-session` take precedence). Relative paths resolve from the working directory; empty values leave settings in effect |
|
|
46
|
-
| `ATOMIC_STORAGE` | None | Shared storage selection JSON for sessions without their own selection and for Intercom. Overrides settings but not `--storage`, session flags, or session-specific env vars. See [Selecting storage per process](/storage#selecting-storage-per-process) |
|
|
47
|
-
| `ATOMIC_SESSIONS_STORAGE` | None | Session-only storage selection JSON in the same form as `sessions.storage
|
|
44
|
+
| `ATOMIC_CODING_AGENT_SESSION_DIR` | None | Non-empty path selects a JSONL session directory (`--session-dir` and `--no-session` take precedence; see [CLI session options](/reference/cli#session-options)). Relative paths resolve from the working directory; empty values leave [session settings](/settings#sessions) in effect. Combining a non-empty value with `--storage`, `--storage-file`, or `ATOMIC_SESSIONS_STORAGE` fails startup with `StorageConfigError` (`conflicting-overrides`) |
|
|
45
|
+
| `ATOMIC_STORAGE` | None | Shared storage selection JSON for sessions without their own selection and for Intercom (`{ "dir": "..." }` is forbidden here). Overrides [settings](/settings#sessions) but not `--storage`, session flags, or session-specific env vars. See [Selecting storage per process](/storage#selecting-storage-per-process) and [SDK storage](/sdk/storage) |
|
|
46
|
+
| `ATOMIC_SESSIONS_STORAGE` | None | Session-only storage selection JSON in the same form as [`sessions.storage`](/settings#sessions) (accepts `{ "dir": "..." }`). Conflicts with a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` |
|
|
48
47
|
| `ATOMIC_PROFILE` | None | `ci` selects the team database for sessions and Intercom from `ATOMIC_TEAM_*` without writing settings. See [Team and CI setup](/guides/team-setup#ci-and-swarms) |
|
|
49
48
|
| `ATOMIC_TEAM_URL`, `ATOMIC_TEAM_TOKEN`, `ATOMIC_TEAM_TOKEN_FILE`, `ATOMIC_TEAM_PREFIX` | None | Team database settings for `ATOMIC_PROFILE=ci`. Setting any without `ATOMIC_PROFILE=ci` fails startup. `ATOMIC_TEAM_TOKEN_FILE` must be an absolute path, and `ATOMIC_TEAM_TOKEN` cannot be combined with `ATOMIC_TEAM_TOKEN_FILE` |
|
|
50
49
|
| `ATOMIC_INTERCOM_GROUP` | `PI_INTERCOM_GROUP` | Static home Intercom group for this session. See [Intercom reference](/intercom/reference#configuration) |
|
|
@@ -65,6 +64,8 @@ Variables use different parsing rules depending on their category:
|
|
|
65
64
|
| `ATOMIC_TRUE_COLOR` | `PI_TRUE_COLOR` | `1`, `0`, or `auto` overrides 24-bit color detection; explicit `terminal.trueColor` in settings takes precedence |
|
|
66
65
|
| `ATOMIC_IMAGE_PROTOCOL` | `PI_IMAGE_PROTOCOL` | Case-insensitive `kitty`, `iterm2`, `none` (or `0`), or `auto` overrides inline image detection; explicit `terminal.images` in settings takes precedence |
|
|
67
66
|
| `ATOMIC_PROGRAM_STATUS` | `PI_PROGRAM_STATUS` | Exact `1` forces OSC 7501 program-status reports; exact `0` disables them; any other value or unset reports only after terminal confirmation ([Program status](/terminal-setup#program-status)) |
|
|
67
|
+
| `COLORFGBG` | None | Fallback terminal background hint when OSC 11 background queries are unavailable. Uses the last `;`-separated integer. Indices `0` to `6` and `8` map to dark, and other integers map to light. See [Themes](/themes) |
|
|
68
|
+
| `HERDR_ENV`, `HERDR_BIN_PATH`, `HERDR_PANE_ID`, `HERDR_SOCKET_PATH` | None | Set by Herdr inside managed panes. Exact `HERDR_ENV=1` with non-empty `HERDR_BIN_PATH`, `HERDR_PANE_ID`, and `HERDR_SOCKET_PATH` enables built-in pane status reporting; `HERDR_ENV=1` is also required for Herdr automation. See [Herdr](/herdr) |
|
|
68
69
|
|
|
69
70
|
## Diagnostics and performance
|
|
70
71
|
|
|
@@ -85,8 +86,9 @@ Variables use different parsing rules depending on their category:
|
|
|
85
86
|
| `ATOMIC_TOOL_ABORT_GRACE_MS` | None | Milliseconds (digits only) an interrupted tool call may keep running before the turn moves on with `Operation aborted` (default `10000`, max `2147483647`, `0` stops waiting immediately; invalid values fall back to `10000`). See [Message queue](/usage#message-queue) |
|
|
86
87
|
| `ATOMIC_CODEMODE_MAX_WORKERS` | `PI_CODEMODE_MAX_WORKERS` | Positive integer maximum live codemode workers per Atomic process (default `2`, each capped at 256 MiB; invalid values fall back to `2`). Extra scripts queue until a slot opens. See [Codemode](/codemode) |
|
|
87
88
|
| `ATOMIC_HOST_SPAWN` | None | Set to `child-process` to launch helper processes (Git snapshots, `rg`, `fd`, worktree setup, and standalone shell commands) through standard Node child spawning instead of Atomic's native spawner. Useful for troubleshooting process-spawning issues on Linux or Windows |
|
|
89
|
+
| `ATOMIC_TASK_CGROUP` | None | Exact `0` disables Linux cgroup v2 process-tree containment for background shell tasks. See [Lifetime, retention, and cleanup](/background-tasks#lifetime-retention-and-cleanup) |
|
|
88
90
|
| `NODE_COMPILE_CACHE` | None | Override the directory for Node's persistent compile cache, enabled automatically on Node 22.8+ to speed up startup. On Windows, a cold default cache warms in a background helper during interactive runs; setting `NODE_COMPILE_CACHE` lets Node write it on exit instead |
|
|
89
|
-
| `NODE_DISABLE_COMPILE_CACHE` | None | Any
|
|
91
|
+
| `NODE_DISABLE_COMPILE_CACHE` | None | Any defined value (including empty string `""`) prevents Node from enabling the compile cache |
|
|
90
92
|
| `NAPI_RS_NATIVE_LIBRARY_PATH` | None | Path to a custom `@bastani/atomic-natives` `.node` addon binary; bypasses the release version check |
|
|
91
93
|
|
|
92
94
|
## Retired workflow variables
|
|
@@ -97,9 +99,9 @@ Unset `ATOMIC_WORKFLOWS_JOURNAL`, `ATOMIC_WORKFLOW_JOURNAL_PATH`, and `ATOMIC_WO
|
|
|
97
99
|
|
|
98
100
|
Sessions default to `~/.atomic/workflows/journal.sqlite`. With a custom `ATOMIC_CODING_AGENT_DIR`, they default to `<agentDir>/workflows/journal.sqlite` (unless an eligible custom directory adopted an existing parent store; see [Storage home](/storage#storage-home)).
|
|
99
101
|
|
|
100
|
-
`ATOMIC_CODING_AGENT_SESSION_DIR` selects JSONL session files. Relative paths resolve against the working directory, and an empty value leaves settings in effect.
|
|
102
|
+
`ATOMIC_CODING_AGENT_SESSION_DIR` selects JSONL session files. Relative paths resolve against the working directory, and an empty value leaves settings in effect. Combining a non-empty value with `--storage`, `--storage-file`, or `ATOMIC_SESSIONS_STORAGE` fails startup with `StorageConfigError` (`conflicting-overrides`).
|
|
101
103
|
|
|
102
|
-
`ATOMIC_STORAGE` and `ATOMIC_SESSIONS_STORAGE` accept the same JSON selections as `storage` and `sessions.storage
|
|
104
|
+
`ATOMIC_STORAGE` and `ATOMIC_SESSIONS_STORAGE` accept the same JSON selections as [`storage` and `sessions.storage`](/settings#sessions), including adapters, with relative paths resolving from the storage home (`{ "dir": "..." }` is allowed in `ATOMIC_SESSIONS_STORAGE` and forbidden in `ATOMIC_STORAGE`). Use `{ "memory": true }` for process-local memory (never selected automatically after a storage failure). See [Selecting storage per process](/storage#selecting-storage-per-process), [CLI session options](/reference/cli#session-options), and [SDK storage](/sdk/storage).
|
|
103
105
|
|
|
104
106
|
## Prompt-cache retention
|
|
105
107
|
|
|
@@ -113,9 +115,9 @@ Values are **case-sensitive** (`"long"`, `"short"`, or `"none"`). Any unrecogniz
|
|
|
113
115
|
|
|
114
116
|
Use `short` for shorter caching (five minutes on Anthropic), `none` to disable Atomic's optional cache controls where supported, or `long` to request extended retention (one hour on Anthropic). Providers can still apply automatic caching depending on the model.
|
|
115
117
|
|
|
116
|
-
When unset, OpenAI models without known extended-retention support (such as GPT-4o) use ordinary caching, and Bedrock Claude models without known one-hour support (such as Claude 3.7) use five-minute caching. Supported OpenAI models and Bedrock Claude 4.5+ keep extended caching. For Bedrock application inference profiles, set an accurate model name in `models.json` so Atomic recognizes its capabilities. Custom OpenAI-compatible models can set `compat.supportsLongCacheRetention` in `models.json
|
|
118
|
+
When unset, OpenAI models without known extended-retention support (such as GPT-4o) use ordinary caching, and Bedrock Claude models without known one-hour support (such as Claude 3.7) use five-minute caching. Supported OpenAI models and Bedrock Claude 4.5+ keep extended caching. For Bedrock application inference profiles, set an accurate model name in [`models.json`](/models) so Atomic recognizes its capabilities. Custom OpenAI-compatible models can set `compat.supportsLongCacheRetention` in `models.json` (see [`models.json` field reference](/models-configuration)).
|
|
117
119
|
|
|
118
|
-
In SDK requests, explicit `cacheRetention` takes precedence over `ATOMIC_CACHE_RETENTION`, and request-scoped `env` overrides credential-scoped and process environments. Requests that disable caching (such as branch summaries) stay uncached.
|
|
120
|
+
In [SDK](/sdk) requests, explicit `cacheRetention` takes precedence over `ATOMIC_CACHE_RETENTION`, and request-scoped `env` overrides credential-scoped and process environments. Requests that disable caching (such as branch summaries) stay uncached. Direct calls to standalone [`@bastani/atomic-ai`](/libraries/ai) APIs default an unset `ATOMIC_CACHE_RETENTION` to `short` and enable `long` only when set to `"long"`, so disabling caching there requires passing `cacheRetention: "none"` explicitly.
|
|
119
121
|
|
|
120
122
|
[Anthropic's prompt-caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pricing) charges **2x base input price for one-hour writes** versus **1.25x for five-minute writes**. Extended retention helps when prompts are reused after five minutes; `short` can cost less when cache hits happen within five minutes or prompts are rarely reused.
|
|
121
123
|
|
|
@@ -150,6 +152,6 @@ Every `bash` and `powershell` tool call (including in subagents, RPC, and SDK se
|
|
|
150
152
|
|
|
151
153
|
Before overlaying those eight current snapshot values, Atomic clears all ten reserved names: the eight names in the table above plus the two retired session-file names `ATOMIC_SESSION_FILE` and `PI_SESSION_FILE`. Clearing all ten guarantees stale metadata from another session never leaks into a shell command. Unrelated inherited and caller-supplied variables remain intact.
|
|
152
154
|
|
|
153
|
-
`ATOMIC_SESSION_FILE` and `PI_SESSION_FILE` are no longer populated because session IDs identify records inside the active store rather than assuming a file path. The snapshot is captured when each command runs, so resumed sessions and model changes are always reflected. SDK `createBashTool()` and `createPowerShellTool()` expose these variables by default; pass `exposeSessionEnvironment: false` to omit them.
|
|
155
|
+
`ATOMIC_SESSION_FILE` and `PI_SESSION_FILE` are no longer populated because session IDs identify records inside the active store rather than assuming a file path. The snapshot is captured when each command runs, so resumed sessions and model changes are always reflected. SDK [`createBashTool()` and `createPowerShellTool()`](/sdk/reference#tools) expose these variables by default; pass `exposeSessionEnvironment: false` to omit them.
|
|
154
156
|
|
|
155
157
|
See [CLI environment variables](/reference/cli#environment-variables) and [RPC direct bash](/rpc/protocol#bash) for execution and streaming behavior.
|
|
@@ -4,6 +4,8 @@ sidebarTitle: "Extension API"
|
|
|
4
4
|
description: "Reference for ExtensionContext, ExtensionToolContext, ExtensionCommandContext, ExtensionAPI methods, and typed errors."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
This page documents `ExtensionContext`, `ExtensionToolContext`, `ExtensionCommandContext`, `ExtensionAPI` methods, and typed errors. For setup and discovery, see [Extensions overview](/extensions). For patterns and custom tools, see [Write an extension](/extensions/authoring). For embedding Atomic and loading inline extension factories, see [SDK overview](/sdk), [SDK extensions](/sdk/reference#extensions), and [Structured decisions](/sdk/structured-decisions).
|
|
8
|
+
|
|
7
9
|
## ExtensionContext
|
|
8
10
|
|
|
9
11
|
All event handlers, tool callbacks, and command handlers receive `ctx: ExtensionContext`.
|
|
@@ -81,7 +83,7 @@ To inspect older history without loading the entire session into memory:
|
|
|
81
83
|
- `for await (const page of ctx.sessionManager.readHistory({ fromSeq, toSeq }))` iterates entries in append order. Oversized items (`kind: "oversized"`) stream via `ctx.sessionManager.readHistoryChunks(item)`.
|
|
82
84
|
- `await ctx.sessionManager.loadFullHistory()` loads every stored entry into memory; prefer paged reads for large sessions.
|
|
83
85
|
|
|
84
|
-
### ctx.modelRegistry / ctx.model / ctx.scopedModels
|
|
86
|
+
### ctx.modelRegistry / ctx.model / ctx.scopedModels {#ctx-modelregistry-ctx-model-ctx-scopedmodels}
|
|
85
87
|
|
|
86
88
|
Access models, authentication state, and provider-aware requests.
|
|
87
89
|
|
|
@@ -114,7 +116,7 @@ if (logo.stopReason !== "stop") throw new Error(logo.errorMessage);
|
|
|
114
116
|
|
|
115
117
|
When image generation fails, rebuild `result.error` (`ImageGenerationErrorData`) with `imageGenerationErrorFromData()` from `@bastani/atomic-ai` and branch on its class, type guards (`isImageGenerationError`, `isImageGenerationConfigError`, `findImageGenerationError`, `isRetryableImageGenerationError`), or `code`. Cancelled requests resolve with `stopReason: "aborted"` and no `error`. See [Image generation](/libraries/ai#image-generation).
|
|
116
118
|
|
|
117
|
-
Use `getApiKeyAndHeaders()` only when inspecting credentials before dispatch. `await ctx.modelRegistry.refresh(options)` returns `{ aborted, errors }` with per-provider errors. Calling `ModelRuntime.setRuntimeApiKey(providerId, apiKey, options)` stores a runtime credential without refreshing the catalog; call `refresh({ providers: [providerId], signal })` explicitly if needed.
|
|
119
|
+
Use `getApiKeyAndHeaders()` only when inspecting credentials before dispatch. `await ctx.modelRegistry.refresh(options)` returns `{ aborted, errors }` with per-provider errors. Calling `ModelRuntime.setRuntimeApiKey(providerId, apiKey, options)` stores a runtime credential without refreshing the catalog; call `refresh({ providers: [providerId], signal })` explicitly if needed (see [API keys and OAuth in the SDK](/sdk/reference#api-keys-and-oauth)).
|
|
118
120
|
|
|
119
121
|
OpenRouter Chat Completions and Anthropic Messages requests send `x-session-id` by default when `sessionId` is supplied and prompt caching is active; set `compat.sendSessionAffinityHeaders: false` or `cacheRetention: "none"` to opt out.
|
|
120
122
|
|
|
@@ -137,7 +139,7 @@ Current `ThinkingLevel` (`"off" | "minimal" | "low" | "medium" | "high" | "xhigh
|
|
|
137
139
|
|
|
138
140
|
### ctx.getDecisionModel()
|
|
139
141
|
|
|
140
|
-
Returns the session's configured `decisionModel` (`"provider/model"`, `"auto"`, or `""`). Atomic uses this for `structured_output` calls that omit `model`, steer readiness checks, and `decide()`, without changing the chat model. Throws `DecisionModelUnavailableError` (`reason: "host-unsupported"`) if the host does not support decision models.
|
|
142
|
+
Returns the session's configured `decisionModel` (`"provider/model"`, `"auto"`, or `""`). Atomic uses this for `structured_output` calls that omit `model`, steer readiness checks, and `decide()`, without changing the chat model (see [Structured decisions](/sdk/structured-decisions)). Throws `DecisionModelUnavailableError` (`reason: "host-unsupported"`) if the host does not support decision models.
|
|
141
143
|
|
|
142
144
|
### ctx.signal
|
|
143
145
|
|
|
@@ -694,7 +696,7 @@ unsubscribe();
|
|
|
694
696
|
|
|
695
697
|
Do not retain `atomic.events` across `/reload` (calling `on()` or `emit()` on a retired handle throws). Pass `atomic.events` to [`sessionScopedExtensionState`](/extensions/authoring#session-scoped-in-memory-state) to preserve in-memory state across reloads.
|
|
696
698
|
|
|
697
|
-
Embedded hosts implementing `ExtensionRuntime` must implement `trackEventBusSubscription(unsubscribe)` and return `markdownTransformers` (plus optional `renderLatex`, `fullscreenScrollbar`, `fullscreenWheelScrollLines`) from `ExtensionUIContext.getChatRenderSettings()`.
|
|
699
|
+
Embedded hosts implementing `ExtensionRuntime` must implement `trackEventBusSubscription(unsubscribe)` and return `markdownTransformers` (plus optional `renderLatex`, `fullscreenScrollbar`, `fullscreenWheelScrollLines`) from `ExtensionUIContext.getChatRenderSettings()`. See [SDK extensions](/sdk/reference#extensions).
|
|
698
700
|
|
|
699
701
|
### Native providers
|
|
700
702
|
|
|
@@ -819,7 +821,7 @@ See [examples/extensions/provider-accounts.ts](https://github.com/bastani-inc/at
|
|
|
819
821
|
|
|
820
822
|
Remove a previously registered provider and its models, restoring any built-in models it overrode. No-op for unknown names. Takes effect immediately without `/reload`.
|
|
821
823
|
|
|
822
|
-
### atomic.registerMcpServer(name, config)
|
|
824
|
+
### atomic.registerMcpServer(name, config) {#atomic-registermcpserver-name-config}
|
|
823
825
|
|
|
824
826
|
Contribute an MCP server whose configuration is computed at runtime (for example, a dynamically bound local port). `name` must match `^[A-Za-z0-9_-]+$`, and `config` follows the [`mcp.json`](/mcp-servers#configure-servers) schema (`url`, `command`, `args`, `env`, `cwd`, `headers`, OAuth settings, `exposure`, positive `timeout` in seconds, `${VAR}` / `$env:VAR` URL interpolation). `type: "sse"` is rejected (use streamable HTTP).
|
|
825
827
|
|
|
@@ -848,7 +850,7 @@ Call from the extension factory or `session_start`; servers connect immediately
|
|
|
848
850
|
|
|
849
851
|
### Typed errors from built-in tools and providers
|
|
850
852
|
|
|
851
|
-
These error classes and type guards are exported from `@bastani/atomic
|
|
853
|
+
These error classes and type guards are exported from `@bastani/atomic` (see [Session and storage errors](/sdk/reference#session-and-storage-errors) for session, storage, and startup errors). Branch on the class, its type guard, or `code` rather than `message`. Each tool/provider error includes `hint`, `retryable`, and `toJSON()` for cross-process serialization (credentials in URLs are stripped). Use `rehydrateShellToolError()` and `rehydrateLlamaServerError()` to rebuild serialized instances.
|
|
852
854
|
|
|
853
855
|
| Class | `code` | When | Key fields / notes |
|
|
854
856
|
| --- | --- | --- | --- |
|
|
@@ -199,7 +199,7 @@ export default function (atomic: ExtensionAPI) {
|
|
|
199
199
|
|
|
200
200
|
## Custom tools
|
|
201
201
|
|
|
202
|
-
Register tools the model can call with `atomic.registerTool()`. Use the `defineTool(tool)` helper from `@bastani/atomic` when storing tool definitions in variables or arrays so TypeScript preserves parameter type inference.
|
|
202
|
+
Register tools the model can call with `atomic.registerTool()`. Use the `defineTool(tool)` helper from `@bastani/atomic` when storing tool definitions in variables or arrays so TypeScript preserves parameter type inference. Standalone tools built with `defineTool()` can also be passed directly to `createAgentSession({ customTools })` without writing a full extension ([SDK custom tools](/sdk/reference#custom-tools)).
|
|
203
203
|
|
|
204
204
|
Tool name collisions follow two rules:
|
|
205
205
|
|
|
@@ -321,7 +321,7 @@ async execute(_toolCallId, params) {
|
|
|
321
321
|
|
|
322
322
|
#### Structured output tool helper
|
|
323
323
|
|
|
324
|
-
For a schema-backed decision, use `createStructuredOutputTool({ schema, name?, capture?, output?, timeoutMs? })
|
|
324
|
+
For a schema-backed decision, use `createStructuredOutputTool({ schema, name?, capture?, output?, timeoutMs? })` (see [Structured decisions](/sdk/structured-decisions)). Atomic does not register `structured_output` in normal sessions by default. Include any custom `name` (such as `"final_decision"`) in explicit tool allowlists.
|
|
325
325
|
|
|
326
326
|
- **`capture`:** Pass `createStructuredOutputCapture()` to inspect `{ called, value }` in memory after the call finishes.
|
|
327
327
|
- **`output`:** Pass `{ outputPath }` to write the validated JSON result to disk with `0o600` file permissions.
|
|
@@ -335,7 +335,7 @@ When the model calls the tool, it supplies `instructions`, nonempty named `state
|
|
|
335
335
|
|
|
336
336
|
#### Constrained sampling
|
|
337
337
|
|
|
338
|
-
`ToolDefinition.constrainedSampling` is preserved for extension tools, SDK `customTools
|
|
338
|
+
`ToolDefinition.constrainedSampling` is preserved for extension tools, [SDK `customTools`](/sdk/reference#custom-tools), wrappers, and default interactive mode. It accepts `false` or a `ConstrainedSamplingConfig`:
|
|
339
339
|
|
|
340
340
|
```typescript
|
|
341
341
|
atomic.registerTool({
|
|
@@ -421,7 +421,7 @@ Nested execution events and the nested tool's `ctx` include `parentToolCallId`.
|
|
|
421
421
|
- Set `writesFiles: true` on tools that modify files so turns calling them record a [worktree snapshot](/worktree-snapshots) like `bash`, `edit`, and `write`.
|
|
422
422
|
- An active orchestrator tool can implement `prepareLoadout(loadout)` to adjust how tools are described or hidden from the model (returning `descriptions` or `hiddenDeclarations`). This changes model presentation only, not authorization.
|
|
423
423
|
|
|
424
|
-
**Fireworks deferred tool loading
|
|
424
|
+
**Fireworks deferred tool loading.** Extensions calling `@bastani/atomic-ai` directly can use native deferred tool loading on Fireworks `anthropic-messages` models. See [Fireworks deferred tools](/libraries/ai#fireworks-deferred-tools).
|
|
425
425
|
|
|
426
426
|
### Overriding built-in tools
|
|
427
427
|
|
package/docs/extensions.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Extensions overview"
|
|
3
|
-
sidebarTitle: "
|
|
3
|
+
sidebarTitle: "Extensions overview"
|
|
4
4
|
description: "Build TypeScript extensions that add tools, slash commands, lifecycle hooks, and custom terminal UI to Atomic."
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -28,6 +28,7 @@ Read this overview for a working first extension, discovery locations, imports,
|
|
|
28
28
|
- [Extension UI](/extensions/ui). Build dialogs, widgets, host-native pickers and forms, custom components, and message renderers.
|
|
29
29
|
- [Extension API reference](/extensions/api-reference). Reference `ExtensionContext`, `ExtensionToolContext`, `ExtensionCommandContext`, `ExtensionAPI` methods, and error handling.
|
|
30
30
|
- [Extension examples](/extensions/examples). Browse runnable extensions shipped with Atomic.
|
|
31
|
+
- [SDK extensions](/sdk/reference#extensions) and [Structured decisions](/sdk/structured-decisions). Load extensions programmatically with `DefaultResourceLoader`, pass standalone `customTools`, or run schema-validated decisions.
|
|
31
32
|
- [Security](/security). Review the project-trust boundary that controls whether a project's extensions load.
|
|
32
33
|
|
|
33
34
|
If an extension is heavier than you need, compare lighter options on [Build with Atomic](/build).
|
|
@@ -85,6 +86,42 @@ Test it for one run with `-e` (or `--extension`):
|
|
|
85
86
|
atomic -e ./my-extension.ts
|
|
86
87
|
```
|
|
87
88
|
|
|
89
|
+
### Loading in the SDK
|
|
90
|
+
|
|
91
|
+
Embedded apps can load extension files, pass inline factories through `DefaultResourceLoader`, or register standalone tools directly with `createAgentSession({ customTools })`:
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
import { createAgentSession, DefaultResourceLoader, defineTool } from "@bastani/atomic";
|
|
95
|
+
import { Type } from "@bastani/atomic/typebox";
|
|
96
|
+
|
|
97
|
+
const loader = new DefaultResourceLoader({
|
|
98
|
+
additionalExtensionPaths: ["./my-extension.ts"],
|
|
99
|
+
extensionFactories: [
|
|
100
|
+
(atomic) => {
|
|
101
|
+
atomic.on("agent_start", () => console.log("Starting run"));
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
});
|
|
105
|
+
await loader.reload();
|
|
106
|
+
|
|
107
|
+
const pingTool = defineTool({
|
|
108
|
+
name: "ping",
|
|
109
|
+
label: "Ping",
|
|
110
|
+
description: "Return pong",
|
|
111
|
+
parameters: Type.Object({}),
|
|
112
|
+
async execute() {
|
|
113
|
+
return { content: [{ type: "text", text: "pong" }], details: {} };
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const { session } = await createAgentSession({
|
|
118
|
+
resourceLoader: loader,
|
|
119
|
+
customTools: [pingTool],
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
See [SDK extensions](/sdk/reference#extensions) and [SDK custom tools](/sdk/reference#custom-tools).
|
|
124
|
+
|
|
88
125
|
## Extension locations
|
|
89
126
|
|
|
90
127
|
> **Security:** Extensions run with your full system permissions and can execute arbitrary code. Install only from sources you trust.
|
|
@@ -125,7 +162,7 @@ To distribute extensions over npm or git, see [Install and manage packages](/pac
|
|
|
125
162
|
|
|
126
163
|
### Built-in extension resources
|
|
127
164
|
|
|
128
|
-
Atomic exposes `builtin:llama.cpp
|
|
165
|
+
Atomic exposes `builtin:llama.cpp` ([llama.cpp](/llama-cpp)), `builtin:codemode` ([Codemode](/codemode)), and `builtin:tool-search` (which registers the [`tool_search`](/tools#tool_search) tool) as built-in extension resources rather than filesystem paths. Toggle them interactively in `atomic config`, or disable one in `settings.json`:
|
|
129
166
|
|
|
130
167
|
```json
|
|
131
168
|
{ "extensions": ["-builtin:codemode"] }
|
|
@@ -149,8 +186,8 @@ Extensions can import Atomic's bundled packages without installing them in `node
|
|
|
149
186
|
|
|
150
187
|
| Package | Purpose |
|
|
151
188
|
| --- | --- |
|
|
152
|
-
| `@bastani/atomic` | Extension types (`ExtensionAPI`, `ExtensionContext`, events), helpers (`StringEnum`, `defineTool`), and built-in tool factories |
|
|
153
|
-
| `@bastani/atomic/storage` | Storage adapter interfaces, `createSqliteDatabase()`, and storage errors |
|
|
189
|
+
| [`@bastani/atomic`](/sdk) | Extension types (`ExtensionAPI`, `ExtensionContext`, events), helpers (`StringEnum`, `defineTool`), and built-in tool factories |
|
|
190
|
+
| [`@bastani/atomic/storage`](/sdk/storage) | Storage adapter interfaces, `createSqliteDatabase()`, and storage errors |
|
|
154
191
|
| `@bastani/atomic/typebox` | Atomic's copy of TypeBox plus subpaths (`/compile`, `/error`, `/format`, `/guard`, `/schema`, `/system`, `/type`, `/value`) |
|
|
155
192
|
| `typebox` and `@sinclair/typebox` | Direct schema imports (including `typebox/*`, `@sinclair/typebox/compile`, and `@sinclair/typebox/value`) resolve to Atomic's copy so formats registered with `Format.Set()` apply to tool validation |
|
|
156
193
|
| [`@bastani/atomic-ai`](/libraries/ai) | AI utilities, provider APIs, image generation, and subpaths (`/oauth`, `/models`, `/providers/all`) |
|
|
@@ -164,7 +201,7 @@ Atomic maintains these packages directly; [Libraries](/libraries) documents each
|
|
|
164
201
|
|
|
165
202
|
Node.js built-ins (`node:fs`, `node:path`, and the rest of `node:*`) are always available.
|
|
166
203
|
|
|
167
|
-
**Sharing TypeBox from dependencies and SDK apps.** Direct `typebox` imports inside an extension file map to Atomic's copy automatically. If a separate dependency or SDK app registers custom TypeBox formats, settings, or locales that must reach Atomic's tool validation, import from `@bastani/atomic/typebox` and its subpaths rather than from a separate `typebox` dependency.
|
|
204
|
+
**Sharing TypeBox from dependencies and SDK apps.** Direct `typebox` imports inside an extension file map to Atomic's copy automatically. If a separate dependency or SDK app registers custom TypeBox formats, settings, or locales that must reach Atomic's tool validation, import from `@bastani/atomic/typebox` and its subpaths rather than from a separate `typebox` dependency. See [Sharing Atomic's TypeBox registry](/sdk#sharing-atomics-typebox-registry).
|
|
168
205
|
|
|
169
206
|
**Third-party npm dependencies.** Add a `package.json` next to your extension (or in a parent directory) and install dependencies with npm, pnpm, or Bun:
|
|
170
207
|
|
|
@@ -205,7 +242,7 @@ Auto-discovered extensions hot-reload when you run `/reload`. Atomic transpiles
|
|
|
205
242
|
|
|
206
243
|
## Startup and lazy discovery
|
|
207
244
|
|
|
208
|
-
Built-in MCP, subagent, web-access, and Intercom commands are available immediately at startup. Their first call may wait for background discovery or connection to finish:
|
|
245
|
+
Built-in [MCP](/mcp-servers), [subagent](/subagents), [web-access](/web-access), and [Intercom](/intercom) commands are available immediately at startup. Their first call may wait for background discovery or connection to finish:
|
|
209
246
|
|
|
210
247
|
- Enabled MCP servers connect in the background at startup. Your first prompt waits up to 10 seconds for servers that expose direct tools.
|
|
211
248
|
- Codemode waits for the MCP namespaces a script names; `searchTools()` and `ALL_TOOLS` wait for all enabled servers. Tool search and resource tools wait for discovery too.
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Configure Atomic"
|
|
3
3
|
sidebarTitle: "Configuration"
|
|
4
|
-
description: "
|
|
4
|
+
description: "Choose the right configuration file, set global preferences in settings.json, and override settings per project."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
After your [first session](/getting-started/first-session), save global preferences in `~/.atomic/agent/settings.json`. Use `.atomic/settings.json` for overrides that apply only to the current project.
|
|
8
8
|
|
|
9
9
|
You can edit either file directly or run `/settings` inside an interactive session to change common options. Both files use strict JSON (no `//` comments or trailing commas).
|
|
10
10
|
|
|
11
|
+
## Where to configure what
|
|
12
|
+
|
|
13
|
+
Atomic splits configuration by scope and purpose:
|
|
14
|
+
|
|
15
|
+
| What you want to configure | Where to put it | Guide |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| Subscriptions, API keys, and cloud credentials | `/login`, `~/.atomic/agent/auth.json`, or provider env vars | [Model providers](/providers) |
|
|
18
|
+
| Custom models, local servers, proxies, overrides, and remote compactors | `~/.atomic/agent/models.json` | [Configure custom models](/models) |
|
|
19
|
+
| Custom provider APIs, OAuth flows, dynamic catalogs, and account aliases | Extension calling `atomic.registerProvider()` | [Build custom providers](/custom-provider) |
|
|
20
|
+
| Persistent defaults, `enabledModels`, `fallbackModels`, `decisionModel`, `compactionModel`, tools, and storage | `~/.atomic/agent/settings.json` and `.atomic/settings.json` | [Settings reference](/settings) |
|
|
21
|
+
| Local SQLite, JSONL, PostgreSQL, or libSQL/Turso session and Intercom backends | `storage` / `sessions.storage`, `atomic storage join`, or SDK storage options | [Storage](/storage) and [SDK storage](/sdk/storage) |
|
|
22
|
+
| One-run overrides for a single command | CLI flags (`--model`, `--models`, `--tools`, `--storage`) | [CLI reference](/reference/cli) |
|
|
23
|
+
| Process, CI, terminal, and diagnostic overrides | `ATOMIC_*` environment variables | [Environment variables](/environment-variables) |
|
|
24
|
+
| Programmatic session setup in TypeScript | `createAgentSession()` and `SettingsManager` options | [SDK](/sdk) |
|
|
25
|
+
|
|
11
26
|
## Create a global settings file {#example}
|
|
12
27
|
|
|
13
28
|
Add `"$schema"` for editor autocomplete and validation, then set the provider, model, and preferences you want:
|
|
@@ -36,6 +51,8 @@ Add `"$schema"` for editor autocomplete and validation, then set the provider, m
|
|
|
36
51
|
}
|
|
37
52
|
```
|
|
38
53
|
|
|
54
|
+
In this example, `enabledModels` restricts startup fallback, `Ctrl+P` cycling, `/model`, and child subagents to authenticated models matching `"claude-*"` or `"gpt-5*"`. Omit it or set `[]` to leave all authenticated models active. See [Model scope (`enabledModels`)](/settings#enabledmodels).
|
|
55
|
+
|
|
39
56
|
## Project overrides
|
|
40
57
|
|
|
41
58
|
Project settings in `.atomic/settings.json` (and legacy `.pi/settings.json`) load only when the project is trusted. Interactive sessions prompt once before trusting a project; non-interactive runs skip untrusted project settings unless you pass `--approve` or set global `defaultProjectTrust` to `"always"`. See [Project trust](/security#project-trust).
|
|
@@ -89,3 +106,6 @@ Effective settings for the project:
|
|
|
89
106
|
|
|
90
107
|
- Review every supported key and default in the [Settings reference](/settings).
|
|
91
108
|
- Connect subscription logins or API keys in [Model providers](/providers).
|
|
109
|
+
- Add local servers, proxies, overrides, or remote compactors in [Configure custom models](/models), or register custom APIs and OAuth in [Build custom providers](/custom-provider).
|
|
110
|
+
- Choose local or shared databases in [Storage](/storage) and [SDK storage](/sdk/storage).
|
|
111
|
+
- Override settings for one run with [CLI reference](/reference/cli) flags or [Environment variables](/environment-variables), or configure hosts programmatically with the [SDK](/sdk).
|
package/docs/guides/intercom.md
CHANGED
|
@@ -6,6 +6,8 @@ description: "Coordinate multiple Atomic sessions on one machine or across a sha
|
|
|
6
6
|
|
|
7
7
|
Intercom is a message channel between Atomic sessions running on the same machine, or across several machines that share a storage database ([Running Intercom across machines](/intercom/operations#running-intercom-across-machines)). Sessions in the same group send messages, ask questions, and coordinate directly without routing everything through you.
|
|
8
8
|
|
|
9
|
+
This page introduces Intercom at a high level. For quick-start commands, patterns, and `contact_supervisor`, see [Coordinate sessions with Intercom](/intercom). For multi-machine setup, broker upgrades, and troubleshooting, see [Operate Intercom](/intercom/operations). For the tool schema, `config.json`, and error classes, see [Intercom reference](/intercom/reference). For team databases or embedded apps, see [Set up teams and CI](/guides/team-setup) and [Intercom group and reach in the SDK](/sdk#intercom-group-and-reach).
|
|
10
|
+
|
|
9
11
|
## When to use Intercom
|
|
10
12
|
|
|
11
13
|
Use Intercom when two or more sessions work on related tasks and need to share context: a planner handing work to a worker, a long-running session reporting a finding, or an orchestrator steering a subagent while it runs. You do not need Intercom for a single session working alone.
|
|
@@ -25,4 +27,6 @@ Interactive sessions connect to Intercom automatically 3 seconds after startup.
|
|
|
25
27
|
- [Coordinate sessions with Intercom](/intercom) covers the quick start, coordination patterns, and supervisor escalation.
|
|
26
28
|
- [Operate Intercom](/intercom/operations) covers connection lifecycles, multi-machine routing, upgrades, and recovery.
|
|
27
29
|
- [Intercom reference](/intercom/reference) documents every `intercom` tool action, targeting rule, error class, and setting.
|
|
30
|
+
- [Sharing storage across hosts](/storage#sharing-storage-across-hosts) and [Set up teams and CI](/guides/team-setup) explain how to share a database across machines or CI fleets.
|
|
31
|
+
- [Intercom group and reach in the SDK](/sdk#intercom-group-and-reach) shows how to configure groups and reach policies from `@bastani/atomic`.
|
|
28
32
|
- [Subagents overview](/guides/subagents) explains when delegation fits better than session-to-session coordination.
|
|
@@ -18,9 +18,10 @@ You can run Atomic without the terminal UI in three ways, or embed it directly i
|
|
|
18
18
|
`atomic --print "..."` (or `-p`) runs prompts without launching the terminal UI and exits when done.
|
|
19
19
|
|
|
20
20
|
- **Automatic print mode on pipes and redirects:** If standard input or standard output is not a TTY (for example piping text into `atomic` or redirecting `atomic > out.txt`), Atomic enters print mode automatically even without `-p`.
|
|
21
|
-
- **Piped stdin and prompt merging:** Atomic reads piped stdin and separates it from CLI prompt text with a newline, so it composes cleanly with shell pipelines. When a prompt argument or `@file` is present, Atomic waits up to 2 seconds for the first piped byte before continuing without stdin (override with `ATOMIC_STDIN_TIMEOUT_MS
|
|
21
|
+
- **Piped stdin and prompt merging:** Atomic reads piped stdin and separates it from CLI prompt text with a newline, so it composes cleanly with shell pipelines. When a prompt argument or `@file` is present, Atomic waits up to 2 seconds for the first piped byte before continuing without stdin (override with [`ATOMIC_STDIN_TIMEOUT_MS`](/environment-variables#diagnostics-and-performance), or set `0` to always wait for EOF).
|
|
22
22
|
- **Multiple prompts:** Passing multiple positional prompts (such as `atomic -p "step 1" "step 2"`) runs them sequentially in the same session. Plain-text print mode prints only the final prompt's answer to stdout, while `--mode json` emits events for every turn.
|
|
23
|
-
- **Disabled interactive tools and project trust:** Both print mode and `--mode json` automatically disable `ask_user_question` because no interactive terminal UI is available. Non-interactive runs never show project trust prompts; untrusted projects ignore project settings, extensions, and context files unless you pass `--approve` (`-a`) or set global `defaultProjectTrust` to `"always"`.
|
|
23
|
+
- **Disabled interactive tools and project trust:** Both print mode and `--mode json` automatically disable `ask_user_question` because no interactive terminal UI is available. Non-interactive runs never show project trust prompts; untrusted projects ignore project settings, extensions, and context files unless you pass `--approve` (`-a`) or set global `defaultProjectTrust` to `"always"`. See [Project trust](/settings#project-trust).
|
|
24
|
+
- **Pre-flight checks and structured output:** Before starting an automated run, verify provider credentials with `atomic auth check` ([Verify readiness before a session](/providers#verify-readiness-before-a-session)). For typed classification or terminating structured-output payloads in scripts and SDK hosts, see [Structured decisions](/sdk/structured-decisions).
|
|
24
25
|
- **Truncated responses:** If a text response hits the model's output token limit, print mode keeps the partial text on stdout, writes a truncation warning to stderr, and exits with code `1`. Check the exit code before treating redirected output as complete.
|
|
25
26
|
- **Extension commands as prompts:** Running `atomic --session <id> -p "/curator off"` prints the command's reply. If the command sends a message or starts a turn, print mode waits for that response and prints it before running the next prompt or exiting.
|
|
26
27
|
|
|
@@ -48,5 +49,6 @@ Use `--mode rpc` to keep a session alive so another process can send prompts, an
|
|
|
48
49
|
## Next steps
|
|
49
50
|
|
|
50
51
|
- [CLI reference](/reference/cli) for every flag, model-matching rule, and exit code.
|
|
52
|
+
- [Environment variables](/environment-variables) for `ATOMIC_STDIN_TIMEOUT_MS`, `ATOMIC_STORAGE`, `ATOMIC_PROFILE=ci`, and CI overrides.
|
|
51
53
|
- [Programmatic use](/programmatic) to choose between the SDK, RPC, and the JSON event stream.
|
|
52
54
|
- [Background tasks](/background-tasks) when work should continue while you keep chatting interactively.
|
|
@@ -6,14 +6,16 @@ description: "Delegate multi-step work in plain language, monitor background sub
|
|
|
6
6
|
|
|
7
7
|
Give Atomic a goal, a way to verify completion, and any limits on edits, cost, or time. You do not need to write JavaScript to split work across agents.
|
|
8
8
|
|
|
9
|
+
This page covers plain-language delegation. For codemode JavaScript orchestration and interruption recovery APIs, see [Orchestrate with codemode and subagents](/orchestration).
|
|
10
|
+
|
|
9
11
|
> Review the installation guide for Linux and Windows. Give each platform to a separate read-only agent. Check disputed commands against the CLI, then report discrepancies by platform. Do not edit files.
|
|
10
12
|
|
|
11
|
-
Your main session launches the subagents in the background and continues as each subagent reports back. To check which subagents are queued, running, or finished, run `/tasks` or focus the agent panel below the prompt (press `↓` on an empty prompt, or click a row in fullscreen mode). Select any subagent to read its live transcript or send it a message on the same screen without interrupting the others.
|
|
13
|
+
Your main session launches the subagents in the background and continues as each subagent reports back. To check which subagents are queued, running, or finished, run `/tasks` or focus the agent panel below the prompt (press `↓` on an empty prompt, or click a row in fullscreen mode; see [Manage background tasks](/background-tasks)). Select any subagent to read its live transcript or send it a message on the same screen without interrupting the others.
|
|
12
14
|
|
|
13
15
|
If you close Atomic while subagents are running, reopen the same main session to restore them and collect their results:
|
|
14
16
|
|
|
15
17
|
- Running subagents relaunch automatically when you reopen the session.
|
|
16
|
-
- Paused and quit subagents stay awaiting manual resume unless you set `resumeInFlight` to `"ask"` or `"auto"` in `~/.atomic/agent/extensions/subagent/config.json
|
|
18
|
+
- Paused and quit subagents stay awaiting manual resume unless you set `resumeInFlight` to `"ask"` or `"auto"` in `~/.atomic/agent/extensions/subagent/config.json` ([Subagent config.json reference](/subagents/reference#subagent-config-json-reference)).
|
|
17
19
|
- Forking a session (`/fork` or `--fork`) never restores the original session's subagents.
|
|
18
20
|
- Sessions started with `--no-session` are not saved, so their subagents cannot be restored after Atomic closes.
|
|
19
21
|
|