@bastani/atomic 0.10.14-alpha.1 → 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 +29 -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 +9 -0
- 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/tools.md
CHANGED
|
@@ -4,22 +4,50 @@ sidebarTitle: "Built-in tools"
|
|
|
4
4
|
description: "Reference for Atomic's default coding tools, path and resource selectors, background shell execution, task tracking, and output persistence."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Atomic ships a default set of coding tools for reading, editing, running commands, searching files, tracking tasks, and scripting multi-step operations. Two additional built-in tools (`ls` and `tool_search`) are off by default and can be enabled per run or in settings.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
| Tool | Default | Purpose |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| [`read`](#read-and-path-selectors) | Enabled | Read files, directories, images, documents, archives, SQLite databases, internal resources, and public URLs. |
|
|
12
|
+
| [`edit`](#edit) | Enabled | Apply exact-text replacements to an existing file. |
|
|
13
|
+
| [`write`](#write) | Enabled | Create or overwrite files, archive members, SQLite rows, and merge-conflict resolutions. |
|
|
14
|
+
| [`bash`](#bash) | Enabled | Run shell commands and observe background shell tasks. |
|
|
15
|
+
| [`powershell`](#powershell) | Windows only | Run PowerShell commands on native Windows when `pwsh.exe` or `powershell.exe` is on `PATH`. |
|
|
16
|
+
| [`kill`](#kill) | Enabled | Stop a running background shell or history task started in this session. |
|
|
17
|
+
| [`find`](#find-and-search) | Enabled | Locate filesystem paths by glob. |
|
|
18
|
+
| [`search`](#find-and-search) | Enabled | Search file and resource contents with a regular expression. |
|
|
19
|
+
| [`todo`](#todo) | Enabled | Manage file-based tasks in `.atomic/todos`. |
|
|
20
|
+
| [`ask_user_question`](#ask_user_question) | Enabled | Ask interactive multiple-choice or confirmation questions in the terminal UI. |
|
|
21
|
+
| [`codemode`](#codemode) | Enabled | Run sandboxed JavaScript to compose tool calls and return filtered output. |
|
|
22
|
+
| [`ls`](#ls) | Off | List directory entries alphabetically. |
|
|
23
|
+
| [`tool_search`](#tool_search) | Off | Activate deferred tools on demand for direct calls. |
|
|
24
|
+
|
|
25
|
+
Bundled integrations also add [`code_search`](#code_search), web search and fetching, MCP servers, subagents, and Intercom:
|
|
26
|
+
|
|
27
|
+
<Columns cols={2}>
|
|
28
|
+
<Card title="Codemode" href="/codemode">
|
|
29
|
+
Sandbox globals, return shapes, branch storage, classifiers, image generation, and limits.
|
|
30
|
+
</Card>
|
|
31
|
+
<Card title="Background tasks" href="/background-tasks">
|
|
32
|
+
Observe, steer, and stop long-running shells, subagents, and slow history reads.
|
|
33
|
+
</Card>
|
|
34
|
+
<Card title="Web access" href="/web-access">
|
|
35
|
+
Search the web, fetch webpages, PDFs, GitHub repos, and videos, and query DeepWiki.
|
|
36
|
+
</Card>
|
|
37
|
+
<Card title="MCP servers" href="/mcp-servers">
|
|
38
|
+
Connect external stdio and streamable HTTP tools, resources, and OAuth logins.
|
|
39
|
+
</Card>
|
|
40
|
+
</Columns>
|
|
41
|
+
|
|
42
|
+
### Execution rules and diagnostics
|
|
43
|
+
|
|
44
|
+
- **Tool concurrency.** Within a single assistant turn, tools fall into three modes:
|
|
45
|
+
- **Exclusive:** `codemode` acts as a turn barrier—it waits for earlier tool calls to finish and blocks later calls until it completes.
|
|
46
|
+
- **Sequential:** `edit`, `write`, `todo`, `ask_user_question`, and `bash` or `powershell` with `pty: true` run one at a time in call order.
|
|
47
|
+
- **Parallel:** `read`, `find`, `search`, `ls`, `kill`, `tool_search`, non-PTY shell commands, MCP tools, and web-access tools can run in parallel.
|
|
48
|
+
- **Interrupting stuck tools.** When you interrupt a turn (for example with `Esc`), Atomic waits up to **10 seconds** for a tool call that ignores cancellation to stop before abandoning it with an `Operation aborted` error and discarding any late return. Override this grace period in milliseconds with `ATOMIC_TOOL_ABORT_GRACE_MS` (up to `2147483647`; `0` skips waiting).
|
|
49
|
+
- **Inspecting active tools.** Run `/tools` to see active tools, why inactive tools are off, and any unrecognized names in `defaultTools`. Its **Git** section reports which `git` binary Atomic uses (`system`, `provisioned` portable Git, or `unavailable` with an install command) and any failed portable Git update. See [Git](/getting-started/installation#git). SDK and RPC clients get the same report from [`session.getToolStatus()`](/sdk/reference#checking-tool-status) and [`get_tools`](/rpc/protocol#get_tools).
|
|
50
|
+
- **Malformed tool arguments.** If a model produces invalid or truncated JSON arguments, Atomic rejects the call without executing a partial request and returns the original arguments so the model can retry.
|
|
23
51
|
|
|
24
52
|
## Enabling and restricting tools
|
|
25
53
|
|
|
@@ -38,8 +66,8 @@ Control which tools a session exposes from the CLI, settings, SDK, or extensions
|
|
|
38
66
|
|
|
39
67
|
It supports two mutually exclusive call modes:
|
|
40
68
|
|
|
41
|
-
1. **Read a target:** pass `path` (required), plus optional `wait` (used for `history://` URLs; ignored for local files, directories, archives, SQLite, and web URLs).
|
|
42
|
-
2. **Wait on
|
|
69
|
+
1. **Read a target:** pass `path` (required), plus optional `wait` (used only for `history://` URLs; ignored for local files, directories, archives, SQLite, and web URLs).
|
|
70
|
+
2. **Wait on a background history read:** pass `action: "wait"`, `id` (the task ID returned earlier, such as `"history-3"`), and optional `budgetMs` (milliseconds; omit for the default 10-second wait, or pass `0` to check immediately). Do not combine `action: "wait"` with `path` or `wait`.
|
|
43
71
|
|
|
44
72
|
```json
|
|
45
73
|
{ "path": "src/example.ts:10-40" }
|
|
@@ -57,7 +85,11 @@ It supports two mutually exclusive call modes:
|
|
|
57
85
|
{ "action": "wait", "id": "history-3", "budgetMs": 15000 }
|
|
58
86
|
```
|
|
59
87
|
|
|
60
|
-
|
|
88
|
+
On a `history://` read, omitting `wait` (or passing `wait: { kind: "foreground" }` without `budgetMs`) waits up to 10 seconds before continuing in the background and returning a `history-N` task ID. Pass `wait: { kind: "background" }` to return a task ID immediately, or `wait: { kind: "foreground", budgetMs }` to wait up to `budgetMs` milliseconds (`budgetMs` inside `wait` is valid only with `kind: "foreground"`). Passing `null` for optional fields works the same as omitting them.
|
|
89
|
+
|
|
90
|
+
<Note>
|
|
91
|
+
Background `history-N` tasks are process-local: unlike shell tasks, they do not appear in `/tasks`, and they are cancelled without a completion notice if the session closes or `/reload` runs. See [Slow history searches](/sessions#slow-history-searches) and [Background tasks](/background-tasks).
|
|
92
|
+
</Note>
|
|
61
93
|
|
|
62
94
|
Reading a directory returns a depth-2 tree sorted by most-recent modification time (with sizes and ages). It prunes `.git` and `node_modules` and caps each child directory at 12 entries while preserving the oldest shown entry with an elision marker.
|
|
63
95
|
|
|
@@ -66,10 +98,14 @@ Reading a directory returns a depth-2 tree sorted by most-recent modification ti
|
|
|
66
98
|
For local text files, `read` returns plain text with LF line endings, no per-line numbers, and no trailing newline. Existing file or directory names take priority over selector parsing (so `notes:0` or `build:12` reads that literal file when it exists). Otherwise, a trailing `:...` is parsed as a selector:
|
|
67
99
|
|
|
68
100
|
- **Line selectors.** Supported forms are `file.ts:5-16`, `file.ts:L5-L16`, `file.ts:5..16`, `file.ts:5+3` (start plus count), `file.ts:5-` or `file.ts:5` (line 5 to end of file without widening), `file.ts:5:16` (colon range or grep-style `file:LINE:COL`), comma-separated ranges (`file.ts:5-16,960-973`), and URL line ranges (`https://example.test/page:5-8`). Line numbers are 1-indexed (`:0` fails with an error), and adjacent or overlapping ranges sort and merge automatically. Bounded reads add 1 leading and 3 trailing context lines, prefix each slice with `[Lines 9-14 of 40]`, and end limited reads with the continuation selector. Append `:raw` for exact bytes, CRLF endings, or raw notebook JSON without labels. Out-of-range selectors report beyond EOF. On `history://sessions/<id>:A-B`, numbers select 1-indexed session entries rather than lines.
|
|
69
|
-
- **Oversized
|
|
70
|
-
- **Images.** `read` detects supported image files, resizes them automatically by default
|
|
71
|
-
- **Archives (`read`, `search`, `write`).** Supports `.zip`, `.jar`, `.tar`, `.tgz`, `.tar.gz`, and `.gz`
|
|
72
|
-
- **SQLite (`read`, `search`, `write`).** Supports `.sqlite`, `.sqlite3`, `.db`, and `.db3` files (including Windows drive paths).
|
|
101
|
+
- **Oversized reads (blocking vs. truncation).** Local text reads—both unselected whole-file reads and explicit line ranges—stop with an error when the output exceeds **50,000 characters**, asking for a narrower line range or byte slice rather than silently truncating. Head truncation at 3,000 lines or 50 KiB applies only when the read stays within 50,000 characters (for example, more than 3,000 short lines or multi-byte UTF-8 exceeding 50 KiB inside 50,000 characters). Archive, SQLite, document, and internal-URL reads also stop with an error whenever the unselected or selected text exceeds 50,000 characters or 50 KiB. Only unselected HTTP(S) URL reads truncate automatically (see [Documents and URLs](#documents-and-urls)).
|
|
102
|
+
- **Images.** `read` detects supported image files, resizes them automatically by default to match the active model's resize profile, and returns an image block. If the active model does not accept images, Atomic warns you and sends a placeholder instead.
|
|
103
|
+
- **Archives (`read`, `search`, `write`).** Supports `.zip`, `.jar`, `.tar`, `.tgz`, `.tar.gz`, and `.gz` (gzipped tar archives only—not standalone single-file `.gz` streams) without Python. Limits are 256 MiB per tar archive, 64 MiB per member, and 500 entries per directory listing. ZIP reading supports stored and deflate entries; ZIP selective writes reject entries with data descriptors. Tar rejects sparse files and base-256 numeric fields, and tar writes preserve other members and file modes while refusing to overwrite links, directories, duplicate members, or damaged headers. Member names may contain `raw`, `conflicts`, `1`, `L1`, or `raw:notes.txt`. Archive writes reject directory targets ending in `/`.
|
|
104
|
+
- **SQLite (`read`, `search`, `write`).** Supports `.sqlite`, `.sqlite3`, `.db`, and `.db3` files (including Windows drive paths). Non-SQLite files with those extensions are treated as plain files. See [SQLite limits and writes](#sqlite-limits-and-writes) for syntax and examples.
|
|
105
|
+
|
|
106
|
+
<Note>
|
|
107
|
+
**Workspace containment.** Archive selectors (`archive.zip:member`) and SQLite selectors (`app.db:users`)—like `local://`—must stay inside the current working directory and reject any path outside it, even through symlinks. Ordinary file paths in `read`, `write`, and `search` are not restricted to the working directory.
|
|
108
|
+
</Note>
|
|
73
109
|
|
|
74
110
|
### Internal URLs and web schemes
|
|
75
111
|
|
|
@@ -78,20 +114,35 @@ Each URL scheme has a fixed set of supported tools and permissions:
|
|
|
78
114
|
| Scheme | Supported tools | Access | Purpose |
|
|
79
115
|
| --- | --- | --- | --- |
|
|
80
116
|
| `local://` | `read`, `search`, `write`, `find`, `bash` | Read and write | Workspace-relative local resources mapped to their underlying filesystem paths. |
|
|
81
|
-
| `skill://` | `read`, `search`, `find`, `bash` | Read-only | Loaded skills by name
|
|
82
|
-
| `artifact://<id>` | `read`, `search`, `find`, `bash` | Read-only | Saved tool output artifacts. |
|
|
117
|
+
| `skill://` | `read`, `search`, `find`, `bash` | Read-only | Loaded skills by name: `skill://tdd` reads the skill's `SKILL.md`, `skill://tdd/references/guide.md` reads a bundled file, and `skill://tdd:10-40` selects lines. A plain name resolves the winning skill; `skill://tdd@user` picks a specific scope. Whole reads of `skill://<name>` (no subpath, range, or `:raw`) prepend `Base directory for this skill: skill://<name>/`. See [Skill addresses](/skills#skill-addresses). |
|
|
118
|
+
| `artifact://<id>` | `read`, `search`, `find`, `bash` | Read-only | Saved tool output artifacts (such as full text from truncated URL reads). |
|
|
83
119
|
| `conflict://` | `read`, `search`, `write` | Read and write | Inspect and resolve Git merge conflicts under the working directory (individual sides are read-only; rejected by `find`; stays literal in `bash`). |
|
|
84
|
-
| `history://` | `read`, `search` | Read-only | Past sessions for this project ([Recalling earlier work](/sessions#recalling-earlier-work)
|
|
85
|
-
| `tool-output://<sha256>` | `read`, `search` | Read-only | Persisted
|
|
120
|
+
| `history://` | `read`, `search` | Read-only | Past sessions for this project ([Recalling earlier work](/sessions#recalling-earlier-work); rejected by `find` and `write`; stays literal in `bash`). |
|
|
121
|
+
| `tool-output://<sha256>` | `read`, `search` | Read-only | Persisted tool output stored in a blob-capable session store, including line ranges like `tool-output://<sha256>:1-200` (rejected by `find` and `write`; stays literal in `bash`). |
|
|
86
122
|
| `http://`, `https://` | `read` | Read-only | Public web pages (rejected by `search` and `write`; stays literal in `bash`). |
|
|
87
123
|
|
|
88
|
-
Any other `scheme://` is rejected by `read`, `search`, and `write`, and stays literal text in `bash`. `local://` paths cannot leave the workspace
|
|
124
|
+
Any other `scheme://` is rejected by `read`, `search`, and `write`, and stays literal text in `bash`. `local://` paths cannot leave the workspace (even through symlinks), and `skill://` paths cannot leave the skill's folder.
|
|
89
125
|
|
|
90
126
|
### SQLite limits and writes
|
|
91
127
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
128
|
+
Use colon and query selectors to inspect tables, filter rows, run read-only SQL, or write individual rows:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{ "path": "data/app.db:users?where=active=1&order=created_at:desc&limit=10" }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
```json
|
|
135
|
+
{ "path": "data/app.db?q=SELECT id, email FROM users WHERE active = 1 LIMIT 20" }
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```json
|
|
139
|
+
{ "path": "data/app.db:users:42" }
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
- **Read limits.** Reading a table (`app.db:users`) returns its schema plus 5 sample rows by default. Supported query parameters are `limit` (max `500`), `offset`, `where`, `order` (`col:asc,col2:desc`, defaulting to `asc`), `schema=true` (or `1`), `sampleRows` / `sample_rows` (clamped `0` to `100`), and `id` (aliases `:rowId`). Query reads default to 20 rows (max `500`). Table listings cap at 500 (excluding `sqlite_%`); row counts probe up to 50,001 rows.
|
|
143
|
+
- **Query and filter safety.** Raw `?q=` accepts a single `SELECT` statement (max `1,000` rows). Both `?q=` and `where=` block `sqlite_%`, `pragma_*`, `ATTACH`, `DETACH`, `UNION`, `INTERSECT`, `EXCEPT`, `load_extension`, comments (`--`, `/*`, `*/`), and `;`. Raw `?q=` also blocks mutating DDL/DML (`INSERT`, `UPDATE`, `DELETE`, `DROP`, `ALTER`, `CREATE`, `REPLACE`, `VACUUM`, `REINDEX`), and `where=` also blocks `SELECT`, `LIMIT`, `OFFSET`, and `PRAGMA`.
|
|
144
|
+
- **Writes.** Table writes (`write` to `app.db:users`) accept `{}` (`INSERT DEFAULT VALUES`) or a JSON5 object (unquoted keys, single quotes, comments, trailing commas, `+`, and hex numbers) with valid column names and scalar values. On table inserts, a JSON `"id"` key automatically maps to a single primary key column of another name. Row writes (`app.db:users:42`) update that row; empty content deletes the row only when a row ID is specified. SQLite writes reply `Inserted row into <table>`, `Updated row ...`, or `Deleted row ...`.
|
|
145
|
+
- **Row addressing.** Target a row by primary key (`data.sqlite:users:42`), `rowid` (tables without a primary key), or a JSON array for composite keys (`data.sqlite:members:["acme",2]`; partial keys are rejected). Row IDs are never misread as line ranges (`data.sqlite:events:2024-01-05`), untyped key columns match numeric IDs numerically, and any update or delete affecting more than 1 row is aborted.
|
|
95
146
|
|
|
96
147
|
### Conflict resolution and file writes
|
|
97
148
|
|
|
@@ -102,9 +153,13 @@ Any other `scheme://` is rejected by `read`, `search`, and `write`, and stays li
|
|
|
102
153
|
### Documents and URLs
|
|
103
154
|
|
|
104
155
|
- **Formats.** Extracts readable text from HTML URLs, Jupyter notebooks (0-based `cell:N` IDs, preserving unknown fields), and PDF, `.doc`, `.docx`, `.ppt`, `.pptx`, `.xls`, `.xlsx`, `.rtf`, and `.epub` documents (including extensionless downloads identified by `Content-Type`).
|
|
105
|
-
- **URL fetching.**
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
156
|
+
- **URL normalization and fetching.** `read` accepts `http://`, `https://`, bare `www.*` URLs (defaulting to `https://`), and repairs collapsed single-slash schemes (`https:/example.com`). Fetches use a 10-second timeout, follow up to 5 redirects, cap response bodies at 10 MiB, and keep a session-scoped cache of 100 entries.
|
|
157
|
+
- **Markdown discovery.** For HTML pages, `read` first checks for a native markdown representation via an alternate `<link>` tag, a `.md` URL suffix, or `Accept: text/markdown` content negotiation. Otherwise it converts the HTML to markdown; only if conversion yields 100 characters or fewer or looks low-quality does it probe `llms.txt` / `llms.md` endpoints (including `/.well-known/llms.txt` and parent path segments).
|
|
158
|
+
- **Output caps and line ranges on URLs.** Unselected HTTP(S) URL reads cap at **300 rendered lines or 50 KiB** and truncate rather than blocking, saving the full output as an artifact (`Full output: artifact://<id>`). Passing a line range on a URL (`https://example.com/page:5-20`) bypasses the session cache, markdown discovery, and HTML-to-markdown conversion (falling back to plain HTML stripping), and blocks with an error if the selected range exceeds 50,000 characters or 50 KiB.
|
|
159
|
+
|
|
160
|
+
<Warning>
|
|
161
|
+
**Network safety.** `read` blocks private, `localhost`, `.localhost`, cloud-metadata, multicast, and reserved IP targets (including alternate numeric IPv4/IPv6 forms and redirects). Set `ATOMIC_ALLOW_PRIVATE_URL_READS=1` only when a workflow must read private URLs. By contrast, [`fetch_content`](/web-access#fetch-pages-and-media) allows direct local/private HTTP fetches while keeping private URLs out of third-party fallbacks.
|
|
162
|
+
</Warning>
|
|
108
163
|
|
|
109
164
|
## `edit`
|
|
110
165
|
|
|
@@ -122,12 +177,12 @@ Any other `scheme://` is rejected by `read`, `search`, and `write`, and stays li
|
|
|
122
177
|
|
|
123
178
|
- **Unique, non-overlapping matches.** Each `oldText` must match exactly once against the current file (overlapping occurrences count: `}\n}` occurs twice in `}\n}\n}`). Edits match against the original file simultaneously and cannot overlap; merge adjacent changes into one edit.
|
|
124
179
|
- **No prior `read` required.** Matches against the file's current bytes on disk, even if changed by `bash` or another process.
|
|
125
|
-
- **Fallback normalization.** If no exact match exists, `edit` retries after
|
|
126
|
-
- **Encoding and line endings.** UTF-8 text only (invalid UTF-8 fails
|
|
180
|
+
- **Fallback normalization.** If no exact match exists, `edit` retries after normalizing compatible Unicode variants (such as full-width characters, while keeping multi-code-point characters intact), stripping trailing whitespace per line, and mapping smart single quotes (`U+2018`–`U+201B` to `'`), smart double quotes (`U+201C`–`U+201F` to `"`), Unicode dashes (`U+2010`–`U+2015`, `U+2212` to `-`), and Unicode spaces (`U+00A0`, `U+2002`–`U+200A`, `U+202F`, `U+205F`, `U+3000` to ASCII space). Normalization locates the region only; `newText` replaces that exact slice and leaves surrounding bytes untouched. A single exact match always wins over normalized matches.
|
|
181
|
+
- **Encoding and line endings.** UTF-8 text only (invalid UTF-8 fails without modifying the file). `oldText` and `newText` cannot split surrogate pairs. Preserves UTF-8 BOM and surrounding line endings (LF, CRLF, or lone CR when the file contains no LF at all); newlines in `newText` adopt the line ending where the match starts.
|
|
127
182
|
- **Atomicity.** Either all edits apply or the file stays unchanged.
|
|
128
183
|
- **Notebooks.** `.ipynb` files are edited using the `# %% [code] cell:N` format shown by `read`, preserving cell metadata, outputs, and execution counts.
|
|
129
184
|
|
|
130
|
-
|
|
185
|
+
Interactive mode previews file diffs as soon as arguments arrive (notebook diffs appear with the result). See [Edit and write errors](#edit-and-write-errors) for typed error codes.
|
|
131
186
|
|
|
132
187
|
## `write`
|
|
133
188
|
|
|
@@ -154,90 +209,74 @@ Returns the replacement count plus `details` (`diff`, unified `patch`, and `firs
|
|
|
154
209
|
{ "action": "wait", "id": "task-1234", "budgetMs": 15000 }
|
|
155
210
|
```
|
|
156
211
|
|
|
157
|
-
- **Observation and background yield (`wait`, `action: "wait"`).** `wait` controls how long the tool observes output and never changes the execution `timeout`. When `wait` is omitted (or `wait: { kind: "foreground" }` omits `budgetMs`) in interactive and standard sessions, Atomic yields automatically after 10 seconds
|
|
212
|
+
- **Observation and background yield (`wait`, `action: "wait"`).** `wait` controls how long the tool observes output and never changes the execution `timeout`. When `wait` is omitted (or `wait: { kind: "foreground" }` omits `budgetMs`) in interactive and standard sessions, Atomic yields automatically after 10 seconds while the command keeps running in the background. Pass `wait: { kind: "background" }` (without `budgetMs`) to return immediately with the task ID after the command starts, or `wait: { kind: "foreground", budgetMs }` to wait up to `budgetMs` milliseconds before yielding. Passing `null` for optional fields works the same as omitting them; non-null conflicting fields or invalid values are rejected. Background mode and task waits require a session with background task support (standalone SDK sessions without a task supervisor wait until the command finishes).
|
|
213
|
+
- **Incremental paging on `action: "wait"`.** Calling `{ action: "wait", id, budgetMs? }` (`0` checks immediately) on a **still-running** task reads incremental output from the last observed byte offset in **8 KiB pages** (printing `[Additional output not shown; wait again to retrieve retained output.]` if more output is already buffered). Once the task finishes, waiting reads the full retained output from byte 0.
|
|
158
214
|
- **`cwd` and leading `cd`.** Sets the working directory for the command. If `cwd` is omitted, a leading `cd <path> && ...` or `cd <path>; ...` sets the working directory when `<path>` is a single literal word (optionally single- or double-quoted, with no variables, globs, or leading `-`). Unquoted `~` and `~/` expand to your home directory. Atomic skips stripping when `CDPATH` applies to a non-dot relative path or the local directory cannot be entered.
|
|
159
|
-
- **`env` and session variables.** Adds or overrides environment variables for the command. Every key
|
|
160
|
-
- **
|
|
215
|
+
- **`env` and session variables.** Adds or overrides environment variables for the command. Every key must match `^[A-Za-z_][A-Za-z0-9_]*$`; invalid names fail before spawning. Atomic automatically sets `ATOMIC_SESSION_ID`, `ATOMIC_PROVIDER`, `ATOMIC_MODEL`, and `ATOMIC_REASONING_LEVEL` (and legacy `PI_*` aliases) and strips caller-supplied overrides for those keys plus `ATOMIC_SESSION_FILE` / `PI_SESSION_FILE`.
|
|
216
|
+
- **Execution `timeout`.** Commands have no time limit by default and run until they finish, someone stops them (`kill` or `/tasks`), or the session closes. `wait` never stops a command. Pass `timeout` in seconds to set a hard execution deadline:
|
|
161
217
|
|
|
162
|
-
| `timeout` |
|
|
218
|
+
| `timeout` | Behavior |
|
|
163
219
|
| --- | --- |
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
| `0` or
|
|
220
|
+
| Omitted | No time limit. Runs until completion, `kill` / `/tasks`, or session close. |
|
|
221
|
+
| Positive number (e.g. `7200`) | Stops the command after that many seconds. No upper limit. |
|
|
222
|
+
| `0` or negative number | Refused before starting (`Invalid timeout ...`). Omit `timeout` for no limit. |
|
|
167
223
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
- **
|
|
172
|
-
- **`pty: true`.** Runs the command in the bundled native PTY. In interactive and standard sessions, native PTY errors fail the call rather than silently falling back to pipes; standalone SDK sessions without background task support fall back to pipes if the native PTY is unavailable. Set `ATOMIC_NO_PTY=1` to force pipes (`ATOMIC_NO_PTY=0` overrides a legacy `PI_NO_PTY=1`).
|
|
173
|
-
- **`heartbeatMs`.** Background [task heartbeat](/background-tasks#task-heartbeats) interval in milliseconds (defaults to `tasks.heartbeatMs` or 15 minutes; `0` disables; minimum `60000`).
|
|
174
|
-
|
|
175
|
-
Model-facing output truncates at 3,000 lines or 50 KiB with `Full output: <path>`. Structured output (used by codemode) keeps up to 1 MiB (the first and last 512 KiB around an omission marker if longer). Foreground results include `timeoutSeconds` (only when `timeout` was set), `requestedTimeoutSeconds`, `wallTimeMs`, non-zero `exitCode`, and `fullOutputPath` when truncated.
|
|
224
|
+
- **Concurrency cap (64 commands).** A session runs up to **64** shell commands concurrently (including subagents' shells). Additional commands fail with an error until an active command finishes or is stopped; nothing running is stopped to make room.
|
|
225
|
+
- **`pty: true`.** Runs the command in the bundled native PTY. In interactive and standard sessions, native PTY errors fail the call rather than silently falling back to pipes; unbound standalone SDK sessions fall back to pipes if the native PTY is unavailable. Set `ATOMIC_NO_PTY=1` to force pipes (see [Environment variables](/environment-variables)). On Windows with a WSL stdin-transport bash shell, supervised execution fails with `ContainmentUnavailable: run Atomic inside WSL to supervise Linux guest commands`.
|
|
226
|
+
- **`heartbeatMs`.** Background task heartbeat interval in milliseconds (defaults to `tasks.heartbeatMs` or 15 minutes; `0` disables; minimum `60000`). See [Background tasks reference](/background-tasks/reference).
|
|
227
|
+
- **Tail truncation.** Model-facing output keeps the **last** 3,000 lines or 50 KiB (truncating an oversized trailing line to its final 50 KiB) and writes `[Showing lines ... Full output: <path>]`. Structured output returned to codemode keeps up to 1 MiB (first and last 512 KiB around an omission marker if longer).
|
|
176
228
|
|
|
177
229
|
### Long-running servers and watchers
|
|
178
230
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
```json
|
|
182
|
-
{ "command": "npm run dev", "wait": { "kind": "background" } }
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
The call returns at once with a task ID such as `task-1-0-5`. Nothing stops the server on a timer: it runs until you stop it with `kill`, it exits on its own, or the session ends.
|
|
186
|
-
|
|
187
|
-
- **Check its output** with a short wait, which leaves it running: `{ "action": "wait", "id": "task-1-0-5", "budgetMs": 1000 }`.
|
|
188
|
-
- **Stop it** with `kill({ id: "task-1-0-5" })`, or from `/tasks`.
|
|
189
|
-
- **It counts toward the 64 commands** a session runs at once, for as long as it runs.
|
|
190
|
-
- **When the session ends**, Atomic stops it and the processes it started. Resuming the session does not start it again; the chat shows `Background shell stopped (session closed)` for it, and you run it again if you still need it.
|
|
191
|
-
|
|
192
|
-
See [Long-running servers and watchers](/background-tasks#long-running-servers-and-watchers).
|
|
231
|
+
Start dev servers, file watchers, local databases, or tunnels with `wait: { kind: "background" }`. They run with no timeout until you stop them with `kill({ id })` or `/tasks`, they exit, or the session closes (resuming a session does not restart prior servers). They count toward the 64-command limit while active. See [Background tasks](/background-tasks) for day-to-day management and `/tasks` controls.
|
|
193
232
|
|
|
194
233
|
**Internal URL expansion (`skill://`, `local://`, `artifact://`):**
|
|
195
|
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
234
|
+
|
|
235
|
+
- Only unquoted URLs starting a plain shell word expand to shell-quoted filesystem paths (for example `bash skill://my-skill/scripts/check.sh` or `printf %s local://notes.txt`). Other schemes (`conflict://`, `history://`, `tool-output://`, `http://`, `https://`) stay literal text.
|
|
236
|
+
- URLs inside quotes, heredocs, comments, escapes, command substitutions, or directly after `$`, `[`, or quotes stay verbatim. Expansion also stops after the first `((`, `=(`, or non-test `[`. In PowerShell, typographic single quotes (`U+2018`–`U+201B`), typographic double quotes (`U+201C`–`U+201E`), `<#...#>` block comments, and anything after `--%` are not expanded.
|
|
237
|
+
- Structured `cwd` and `env` values always expand supported URLs. When using custom command prefixes or spawn wrappers, pass URLs in `cwd` or `env` instead of relying on inline command expansion.
|
|
199
238
|
|
|
200
239
|
### PowerShell
|
|
201
240
|
|
|
202
|
-
On native Windows, Atomic enables
|
|
241
|
+
On native Windows, Atomic enables `powershell` automatically when `pwsh.exe` or `powershell.exe` resolves on `PATH`, preferring PowerShell 7 and falling back to Windows PowerShell 5.1. It takes the same parameters, wait modes, optional `timeout`, and 64-command concurrency pool as `bash`.
|
|
203
242
|
|
|
204
|
-
- Resolved paths use PowerShell single-quoted literals (doubling ASCII apostrophes and `U+2018
|
|
205
|
-
- Redirected stderr on a successful native command (such as `git push 2>&1 | Select-Object -Last 3`) still reports success
|
|
243
|
+
- Resolved paths use PowerShell single-quoted literals (doubling ASCII apostrophes and `U+2018`–`U+201B` smart single quotes). `bash` always uses POSIX quoting, even on Windows.
|
|
244
|
+
- PowerShell commands force UTF-8 console output (`[Console]::OutputEncoding`). Redirected stderr on a successful native command (such as `git push 2>&1 | Select-Object -Last 3`) still reports success; on Windows PowerShell 5.1, this exit-status handling is skipped if the command ends with a trailing backtick (`` ` ``).
|
|
245
|
+
- Unlike `bash`, standalone SDK PowerShell sessions do **not** fall back to pipes if the native PTY fails.
|
|
206
246
|
|
|
207
247
|
## `kill`
|
|
208
248
|
|
|
209
|
-
`kill({ id: taskId })` stops a task
|
|
249
|
+
`kill({ id: taskId })` stops a background task started in the current session:
|
|
210
250
|
|
|
211
|
-
- A shell command started by `bash` or `powershell`, including one that
|
|
212
|
-
- A slow `read` or `search`
|
|
251
|
+
- A shell command started by `bash` or `powershell`, including one that yielded to the background after the default wait.
|
|
252
|
+
- A slow `history://` `read` or `search` task (with an ID such as `history-3`).
|
|
213
253
|
|
|
214
|
-
Pass the task ID
|
|
254
|
+
Pass the task ID returned by the tool, not an OS process ID. `kill` never stops subagents or another session's tasks. Stopping a history task replies `History search <id> was stopped; it no longer reads the session store.` and sends no completion notice.
|
|
215
255
|
|
|
216
|
-
For a shell task, `kill` returns the cancellation decision plus execution and cleanup state. A cancellation request does not guarantee immediate termination; repeated calls preserve the first decision, finished tasks keep their outcome, and cleanup errors are reported explicitly. See [
|
|
256
|
+
For a shell task, `kill` returns the cancellation decision plus execution and cleanup state. A cancellation request does not guarantee immediate termination; repeated calls preserve the first decision, finished tasks keep their outcome, and cleanup errors are reported explicitly. See [Background tasks](/background-tasks).
|
|
217
257
|
|
|
218
258
|
## `find` and `search`
|
|
219
259
|
|
|
220
|
-
Use `find` to locate paths by glob and `search` to match file contents by regular expression.
|
|
260
|
+
Use `find` to locate paths by glob and `search` to match file and resource contents by regular expression.
|
|
221
261
|
|
|
222
262
|
### Finding paths
|
|
223
263
|
|
|
224
|
-
`find`
|
|
264
|
+
`find` requires a non-empty `paths` string array (unlike `search`, it does not accept a bare string), plus optional `hidden` (default `true`), `gitignore` (default `true`), `limit` (default `200`, clamped `1`–`200`), and `timeout` (default `5` seconds, clamped `0.5`–`60`).
|
|
225
265
|
|
|
226
|
-
Entries in `paths` can be files, directories (including filesystem roots), globs, or `local://`, `skill://`, and `artifact://` selectors. A `skill://<name>` selector with a glob (such as `skill://tmux/**/*.sh`) searches the skill
|
|
266
|
+
Entries in `paths` can be files, directories (including filesystem roots), globs, or `local://`, `skill://`, and `artifact://` selectors. A `skill://<name>` selector with a glob (such as `skill://tmux/**/*.sh`) searches the skill folder rather than `SKILL.md`. Virtual schemes (`history://`, `conflict://`, `tool-output://`) are rejected with an error directing you to `read` or `search`.
|
|
227
267
|
|
|
228
268
|
- **Anchoring and case.** Relative globs start at `cwd` (`src/**/*.ts` searches `src/`; `**/src/**/*.ts` searches any nested `src/`). Rooted globs (`/**/*.ts`, `C:\**\*.ts`, `\\server\share\**\*.ts`) search that root. Glob matching is case-sensitive on every platform (`*.ts` never matches `A.TS`).
|
|
229
269
|
- **Defaults and pruning.** Includes hidden files and respects nested `.gitignore` rules by default. Prunes `.git` and `node_modules` even with `gitignore: false` (name `node_modules` explicitly to scan it).
|
|
230
270
|
- **Literal glob characters.** If a path exists verbatim on disk (such as `app/[id]/page.tsx`), it matches literally. Otherwise escape `[`, `]`, `*`, `?`, `{`, or `}` with `\` (`app/\[id\]/*.tsx`); on Windows and UNC paths `\` is always a separator, so only the exact-path rule applies.
|
|
231
|
-
- **Path splitting.** Strips surrounding quotes. Existing paths with spaces, commas, or semicolons stay intact; otherwise comma or semicolon lists split if any part resolves, and whitespace lists split only if every part resolves.
|
|
232
|
-
|
|
233
|
-
Returns `scopePath`, `fileCount`, `files`, truncation and missing-path metadata, and streaming progress snapshots.
|
|
271
|
+
- **Path splitting and missing paths.** Strips surrounding quotes. Existing paths with spaces, commas, or semicolons stay intact; otherwise comma or semicolon lists split if any part resolves, and whitespace lists split only if every part resolves. When multiple targets are passed, missing paths are skipped and noted instead of failing the call; a single missing target errors.
|
|
272
|
+
- **Output and sorting.** Formats results as a Markdown heading tree with collapsed single-child directories (`# a/b/\nfile.ts`), sorts native results by most-recent modification time before applying `limit`, and caps output at 50 KiB.
|
|
234
273
|
|
|
235
274
|
### Searching contents
|
|
236
275
|
|
|
237
276
|
`search` searches file and resource contents with a regular expression and can observe background `history://` searches using the same `wait` and `action: "wait"` model as `bash` and `read`. It supports two mutually exclusive call modes:
|
|
238
277
|
|
|
239
278
|
1. **Search contents:** pass `pattern` (required), plus optional `paths` (string or string array; omitted or empty searches `.`), `i` (boolean), `case` (boolean), `gitignore` (default `true`), `skip` (non-negative integer or `null`, floored; ignored in single-file mode), and `wait` (used when `paths` includes a `history://` URL). Hidden files are searched by default.
|
|
240
|
-
2. **Wait on
|
|
279
|
+
2. **Wait on a background history search:** pass `action: "wait"`, `id` (such as `"history-3"`), and optional `budgetMs` (omit for the default 10-second wait, or pass `0` to check immediately). Do not combine `action: "wait"` with search fields (`pattern`, `paths`, `i`, `case`, `gitignore`, `skip`, or `wait`).
|
|
241
280
|
|
|
242
281
|
```json
|
|
243
282
|
{ "pattern": "connection refused", "paths": "history://sessions" }
|
|
@@ -247,20 +286,16 @@ Returns `scopePath`, `fileCount`, `files`, truncation and missing-path metadata,
|
|
|
247
286
|
{ "pattern": "connection refused", "paths": "history://sessions", "wait": { "kind": "background" } }
|
|
248
287
|
```
|
|
249
288
|
|
|
250
|
-
```json
|
|
251
|
-
{ "pattern": "connection refused", "paths": "history://sessions", "wait": { "kind": "foreground", "budgetMs": 30000 } }
|
|
252
|
-
```
|
|
253
|
-
|
|
254
289
|
```json
|
|
255
290
|
{ "action": "wait", "id": "history-3", "budgetMs": 15000 }
|
|
256
291
|
```
|
|
257
292
|
|
|
258
|
-
- **Slow history searches and reads.**
|
|
259
|
-
- **Targets.** Searches files, directories, globs, archive members, SQLite selectors (`.sqlite`, `.sqlite3`, `.db`, `.db3`), and supported internal URLs (`local://`, `skill://`, `artifact://`, `conflict://`, `history://`, `tool-output://`). Rejects `http://` and `https://`.
|
|
293
|
+
- **Slow history searches and reads.** On `history://` targets, `wait` works identically to `bash` and `read`: omitting `wait` waits 10 seconds before yielding, `wait: { kind: "background" }` returns a task ID immediately, and `wait: { kind: "foreground", budgetMs }` waits up to `budgetMs` ms. Running history tasks have **no time limit** and return a completion notice when finished. You can wait via either `search({ action: "wait", id })` or `read({ action: "wait", id })` (both share the session's history tasks, retaining the 16 most recently finished tasks for late waits) or stop one with `kill({ id })`. A session runs at most **4** active history searches/reads at once (separate from the 64 shell commands). History tasks are process-local, do not appear in `/tasks`, and cancel without completion notices on session close or `/reload`. See [Slow history searches](/sessions#slow-history-searches).
|
|
294
|
+
- **Targets and path splitting.** Searches files, directories, globs, archive members, SQLite selectors (`.sqlite`, `.sqlite3`, `.db`, `.db3`), and supported internal URLs (`local://`, `skill://`, `artifact://`, `conflict://`, `history://`, `tool-output://`). Rejects `http://` and `https://`. String `paths` values use the same comma, semicolon, and whitespace splitting rules as `find`; missing paths are skipped when multiple targets are supplied (a single missing target errors).
|
|
260
295
|
- **Patterns and case sensitivity.** Whitespace-only patterns are rejected; all other patterns pass verbatim, including inline `(?i)`, `(?m)`, `(?s)`, and `(?x)` flags at the start of patterns on resource-backed selectors. Setting `i: true` or `case: false` enables case-insensitive matching (if both `i: true` and `case: true` are passed, case-insensitive matching wins).
|
|
261
|
-
- **Line selectors.** Line-range selectors
|
|
262
|
-
- **Paging and context.** Multi-file searches return 20 files per page (up to 20 matches per file), and `skip` paginates files in multi-file mode. Single-file searches return up to 200 matches.
|
|
263
|
-
- **Limits and format.** Local files cap at 4 MiB
|
|
296
|
+
- **Line selectors.** Line-range selectors work on single files only (directories and globs fail with an error) and restrict matches before adding context lines. Unlike `read`, `search` supports only `:N` (matches **only line N**, not N-to-EOF), `:A-B`, `:A..B`, `:A+C`, and comma-separated combinations; open-ended `:N-`, `L`-prefixed `:L5-L10`, and colon `:5:10` forms are rejected.
|
|
297
|
+
- **Paging, caps, and context.** Multi-file searches return 20 files per page (up to 20 matches per file), and `skip` paginates files in multi-file mode. Single-file searches return up to 200 matches. **Regular filesystem searches collect at most 2,000 matches before `skip` pagination** (refine the pattern or path if that cap is hit). Archive, SQLite, and internal-URL searches do not use the 2,000-match cap (SQLite tables default to 1,000 rows; `history://` uses its own byte/row/time budgets and cursor pagination). Context defaults to 1 line before and 3 after (`search.contextBefore` and `search.contextAfter`).
|
|
298
|
+
- **Limits and format.** Local files cap at 4 MiB, lines truncate at 512 characters, combined output caps at 50 KiB, and native filesystem grep uses a 30-second timeout. Output is plain text (`path:LINE: text` for matches, `path-LINE- text` for context).
|
|
264
299
|
|
|
265
300
|
## `ls`
|
|
266
301
|
|
|
@@ -271,19 +306,20 @@ Returns `scopePath`, `fileCount`, `files`, truncation and missing-path metadata,
|
|
|
271
306
|
|
|
272
307
|
## `todo`
|
|
273
308
|
|
|
274
|
-
`todo` manages file-based task lists stored in `.atomic/todos` (override the directory with `ATOMIC_TODO_PATH`
|
|
309
|
+
`todo` manages file-based task lists stored in `.atomic/todos` (override the directory with `ATOMIC_TODO_PATH`). Each task is a standalone `<hex>.md` file starting with a JSON frontmatter object (`id`, `title`, `tags`, `status`, `created_at`, and optional `assigned_to_session`) followed by optional markdown notes.
|
|
275
310
|
|
|
276
311
|
- **IDs.** Task IDs are 8 lowercase hex characters (`^[a-f0-9]{8}$`, matched case-insensitively). Tasks display as `TODO-<hex>`, and `id` accepts `TODO-<hex>`, `#<hex>`, or the raw 8-hex string.
|
|
277
312
|
- **Statuses and ordering.** New tasks default to `"open"`. Only `"closed"` and `"done"` (case-insensitive) count as closed; updating a task to `"closed"` or `"done"` clears `assigned_to_session` automatically. `list` returns open tasks sorted with assigned tasks first, then unassigned tasks by `created_at` ascending. `list-all` returns every task including closed ones.
|
|
278
313
|
- **Locking.** While a session edits a task, Atomic creates a `<hex>.lock` file with a 30-minute lifetime. Within 30 minutes, conflicting writes fail immediately. After 30 minutes, interactive mode prompts to take over the stale lock while non-interactive mode fails with an error.
|
|
279
|
-
- **Actions and parameters.** Required `action`: `list`, `list-all`, `get`, `create`, `update` (replaces `body` and updates fields), `append` (appends to `body`), `delete`, `claim` (assigns
|
|
314
|
+
- **Actions and parameters.** Required `action`: `list`, `list-all`, `get`, `create`, `update` (replaces `body` and updates fields), `append` (appends to `body`), `delete`, `claim` (assigns an open task to the current session—fails on closed tasks; pass `force: true` to override another session's assignment), and `release` (clears assignment; pass `force: true` to release another session's assignment). Optional parameters: `id`, `title`, `body`, `status`, `tags`, and `force`. Validation and lock errors return plain text error messages in the tool result rather than throwing.
|
|
280
315
|
|
|
281
316
|
## `ask_user_question`
|
|
282
317
|
|
|
283
318
|
When `ask_user_question` is enabled, the agent displays interactive multiple-choice and free-text prompts in the TUI for clarifications, preferences, and explicit confirmations instead of asking in plain chat text. `ask_user_question` is model-only and cannot be called inside codemode scripts.
|
|
284
319
|
|
|
285
|
-
- **Limits and validation.** Each call accepts 1 to 4 questions with 2 to 4 options per question, `header` up to 16 characters, and option `label` up to 60 characters. Duplicate questions and duplicate option labels are rejected. Reserved labels (`"Other"`, `"Type something."`, `"Chat about this"`, and
|
|
320
|
+
- **Limits and validation.** Each call accepts 1 to 4 questions with 2 to 4 options per question, `header` up to 16 characters, and option `label` up to 60 characters. Duplicate questions and duplicate option labels are rejected. Reserved labels (`"Other"`, `"Type something."`, `"Chat about this"`, and `"Next"`) are rejected even on `multiSelect: true`.
|
|
286
321
|
- **Multi-select and previews.** Pass `multiSelect: true` to let the user choose multiple options (this hides the custom `"Type something."` choice). On single-select questions, options can include a markdown `preview` rendered side by side (which also hides `"Type something."` while keeping `"Chat about this"`). See [Keybindings](/keybindings#tui-fullscreen-viewport) for dialog controls.
|
|
322
|
+
- **Custom prompt guidance.** Machine-level overrides in `~/.config/rpiv-ask-user-question/config.json` can customize `guidance.promptSnippet` and `guidance.promptGuidelines`.
|
|
287
323
|
- **Scoped approvals.** A confirmation question should name the exact action, identify the target PRs or resources, and offer explicit proceed and decline choices:
|
|
288
324
|
|
|
289
325
|
```json
|
|
@@ -313,8 +349,6 @@ Disable it in `~/.atomic/agent/settings.json` or `.atomic/settings.json`:
|
|
|
313
349
|
|
|
314
350
|
Disable it for one run with `atomic --tools -codemode`. Explicit allowlists must name every desired tool (for example `atomic --tools read,search,find,codemode`). MCP servers configured for codemode exposure activate `codemode` if `defaultTools` omits it, but not after an explicit `-codemode`.
|
|
315
351
|
|
|
316
|
-
Example call (`codemode({ code: "..." })` supports top-level `await` and `return`):
|
|
317
|
-
|
|
318
352
|
```javascript
|
|
319
353
|
// @options: {"max_output_tokens": 2000, "timeout_ms": 60000}
|
|
320
354
|
const files = await Promise.all([
|
|
@@ -328,7 +362,7 @@ return files.map((text) => text.slice(0, 1000));
|
|
|
328
362
|
- **Sandbox and permissions.** Runs with no Node, filesystem, network, timer, or credential globals. Tool calls run with the session's permissions, and side effects are not rolled back if a script fails.
|
|
329
363
|
- **Settings and MCP.** Configure `codemode.inlineBudget` (default `3000` estimated tokens) and `codemode.mode` in [tool settings](/settings#tools). Atomic's [MCP host](/mcp-servers) remains the sole MCP connection owner.
|
|
330
364
|
|
|
331
|
-
See
|
|
365
|
+
See [Codemode](/codemode) for globals, return shapes, `store()` and `load()`, `models.classify()`, `models.generateImages()`, subagent and Intercom access, and limits.
|
|
332
366
|
|
|
333
367
|
## `tool_search`
|
|
334
368
|
|
|
@@ -353,22 +387,25 @@ code_search({ repoName: "facebook/react", query: "How does useEffect cleanup wor
|
|
|
353
387
|
|
|
354
388
|
## Persisted tool output
|
|
355
389
|
|
|
356
|
-
Text tool results over 50,000 characters are saved automatically and replaced inline with a 2,000-byte preview inside `<persisted-output>` tags
|
|
390
|
+
Text tool results over 50,000 characters are saved automatically and replaced inline with a 2,000-byte head preview inside `<persisted-output>` tags referencing `Full output saved to: <path>`. Tool results containing images are not redirected. `bash` and `read` opt out of `<persisted-output>` (`bash` applies its own tail truncation with `Full output: <path>`, and `read` blocks oversized local/resource reads or saves URL reads as `artifact://<id>`).
|
|
357
391
|
|
|
358
|
-
|
|
359
|
-
- **Blob-capable session stores.** When a background subagent or detached tool result runs on SQLite, PostgreSQL, or an in-memory store, output is saved as a session blob addressed by `tool-output://<sha256>` (readable via `read` with line ranges such as `tool-output://<sha256>:1-200`, or `search`). Blobs share across hosts and branches, export with the session, and delete when the session is deleted. Custom stores without blob storage fall back to the temp tree below.
|
|
360
|
-
- **Bash overflow, spill files, and sessions without a session directory.** Stored in a session-scoped temp tree (POSIX `0700` directories and `0600` files; unsafe shared or symlinked temp paths are refused; Windows uses an account-specific name instead of `<uid>`):
|
|
392
|
+
Where persisted output is stored depends on the session store and execution context:
|
|
361
393
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
394
|
+
| Where it ran | Saved location | How to read it |
|
|
395
|
+
| --- | --- | --- |
|
|
396
|
+
| Local session with a session directory | `<sessionDir>/tool-results/` (content-addressed by SHA-256) | `read` or `search` the printed path. |
|
|
397
|
+
| Background subagent or detached tool result on SQLite, PostgreSQL, or in-memory store | Stored as a session blob (`tool-output://<sha256>`) | `read` (including line ranges like `tool-output://<sha256>:1-200`) or `search`. Blobs share across hosts/branches, export with the session, and delete with the session. |
|
|
398
|
+
| `bash` overflow, spill files, custom stores without blobs, or sessions without a session directory | `<tmpdir>/atomic-<uid>/<session-id>/` (POSIX `0700` dirs / `0600` files; account-scoped on Windows; unsafe shared or symlinked temp paths are refused) | `read` or `search` the printed path. |
|
|
399
|
+
|
|
400
|
+
Each persisted file caps at **64 MiB**; excess bytes are replaced with `[Output truncated: persisted-output cap of 67108864 bytes reached]` without splitting UTF-8 characters.
|
|
365
401
|
|
|
366
|
-
|
|
367
|
-
-
|
|
402
|
+
<Note>
|
|
403
|
+
**30-day automatic cleanup.** Ten seconds after startup (at most once every 24 hours), Atomic deletes temp trees and `tool-results/` directories (including custom `--session-dir` and `ATOMIC_CODING_AGENT_SESSION_DIR` roots) whose newest file is more than 30 days old. Active sessions are protected, session `.jsonl` transcripts are never deleted, and symlinks are never followed. Copy output you need long-term elsewhere.
|
|
404
|
+
</Note>
|
|
368
405
|
|
|
369
406
|
## Edit and write errors
|
|
370
407
|
|
|
371
|
-
`edit` and `write` failures are typed.
|
|
408
|
+
For extension and SDK integrations, `edit` and `write` failures are typed. Branch on the error class or `code` rather than message text. Every error sets `hint` (next step) and `retryable: false`.
|
|
372
409
|
|
|
373
410
|
| Class | `code` | When | Fields | What to do |
|
|
374
411
|
| --- | --- | --- | --- | --- |
|
|
@@ -394,3 +431,4 @@ Text tool results over 50,000 characters are saved automatically and replaced in
|
|
|
394
431
|
|
|
395
432
|
- **Inheritance and cross-process helpers (SDK).** `EditInputError`, `EditMatchError`, and `EditTargetError` extend `EditToolError`. Type guards (`isEditToolError`, `isEditInputError`, `isEditMatchError`, `isEditTargetError`, and `isWriteSelectorError`) also match cross-process copies by `name` and `code`. Use `serializeFileToolError` (which strips URL credentials from causes) with `rehydrateEditToolError` and `rehydrateWriteSelectorError` across process boundaries.
|
|
396
433
|
- **Aborts and OS errors.** Cancelling `read`, `find`, `edit`, or `write` throws `FileToolAbortedError` (`name: "AbortError"`, `code: "aborted"`, `cause` set to the abort reason). OS write errors (`EACCES`, `EISDIR`, and similar) propagate directly.
|
|
434
|
+
- **SDK tool details.** Extension hooks and SDK consumers can inspect structured `details` returned by built-in tools: `read` populates `meta` (`source`, `sourcePath`, `truncation`, `limits`) and `imageUnsupportedByModel`; `edit` returns `diff`, unified `patch`, and `firstChangedLine`; `bash` returns `wallTimeMs`, non-zero `exitCode`, `timeoutSeconds` (and `requestedTimeoutSeconds` when a fractional timeout was rounded to milliseconds), and `fullOutputPath`; `find` returns `scopePath`, `fileCount`, and `files`; `search` sets `fileLimitReached` and `meta.limits.fileLimit`.
|