@bastani/atomic 0.10.18 → 0.10.19
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 +83 -0
- package/README.md +27 -5
- package/dist/_shared/config-binary-install-SNFYFXWB.js +70 -0
- package/dist/_shared/config-binary-install-SNFYFXWB.js.map +1 -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 → mode-interactive-sdk-JXBZ3H27.js} +434 -11
- package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -0
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +21 -6
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +7 -6
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p0-cli-BB45ZQY6.js +56 -3
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-OHKMDJ74.js → sdk-BHX35EPK.js} +40 -9
- package/dist/_shared/sdk-BHX35EPK.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-OV6RAEAP.js → startup-0-0-4EDVBK5P.js} +464 -7
- package/dist/_shared/startup-0-0-4EDVBK5P.js.map +1 -0
- package/dist/_shared/{startup-0-1-EZAJI6RE.js → startup-0-1-H5IXVRXQ.js} +85 -7
- package/dist/_shared/startup-0-1-H5IXVRXQ.js.map +1 -0
- package/dist/_shared/startup-0-2-YZZOC22D.js +4 -4
- package/dist/_shared/startup-0-3-DE2NCS6A.js +4 -4
- package/dist/_shared/startup-0-4-ZMJV547D.js +4 -4
- package/dist/_shared/startup-0-5-HZX3ZPTP.js +44 -11
- package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +3 -3
- package/dist/_shared/startup-15-0-YUKGAC63.js +3 -3
- package/dist/_shared/{startup-15-1-4S7FLMNG.js → startup-15-1-WQZBOTMZ.js} +70 -28
- package/dist/_shared/{startup-15-1-4S7FLMNG.js.map → startup-15-1-WQZBOTMZ.js.map} +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +4 -4
- package/dist/_shared/{startup-8-1-LZFXSD3Z.js → startup-8-1-QZMXUGHI.js} +242 -20
- package/dist/_shared/startup-8-1-QZMXUGHI.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +5 -5
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/binary-self-update.js +310 -0
- package/dist/binary-self-update.js.map +1 -0
- package/dist/builtin/intercom/index.bundle.mjs +2 -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/CHANGELOG.md +30 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/agent-browser/SKILL.md +1 -1
- package/dist/builtin/subagents/skills/impeccable/SKILL.md +3 -3
- package/dist/builtin/subagents/skills/impeccable/reference/audit.md +2 -2
- package/dist/builtin/subagents/skills/impeccable/reference/critique.md +3 -3
- package/dist/builtin/subagents/skills/impeccable/reference/generate.md +1 -1
- package/dist/builtin/subagents/skills/impeccable/reference/init.md +0 -2
- package/dist/builtin/subagents/skills/impeccable/reference/live.md +4 -2
- package/dist/builtin/subagents/skills/impeccable/reference/new-work-comp.md +1 -1
- package/dist/builtin/subagents/skills/impeccable/reference/new-work-world.md +1 -1
- package/dist/builtin/subagents/skills/impeccable/scripts/VERSION +1 -1
- package/dist/builtin/subagents/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/dist/builtin/subagents/skills/impeccable/scripts/impeccable +28 -5
- package/dist/builtin/subagents/skills/impeccable/scripts/impeccable.cmd +11 -2
- package/dist/builtin/subagents/skills/impeccable/scripts/live-browser.js +10 -6
- package/dist/builtin/subagents/skills/research-codebase/SKILL.md +13 -19
- package/dist/builtin/subagents/skills/skill-creator/SKILL.md +1 -1
- package/dist/builtin/subagents/skills/subagent/SKILL.md +7 -7
- package/dist/builtin/subagents/skills/workflow/SKILL.md +98 -0
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +2 -1
- package/dist/builtin/web-access/index.bundle.mjs +2 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +3 -3
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- 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.code.js +2 -2
- 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 +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.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli/usage-command.js +22 -0
- package/dist/cli/usage-command.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/config-binary-install.js +3 -0
- package/dist/config-binary-install.js.map +1 -0
- package/dist/core/agent-session-services.js +3 -0
- package/dist/core/agent-session-services.js.map +1 -0
- 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.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +2 -2
- 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 +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/{legacy-workflow-files.d.ts → legacy-workflows.d.ts} +1 -1
- package/dist/core/model-runtime.d.ts +8 -2
- package/dist/core/package-manager-storage-adapters.code.js +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/resource-loader-core.d.ts +1 -1
- package/dist/core/resource-loader-internals.d.ts +1 -1
- package/dist/core/resource-loader-types.d.ts +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/sdk.code.js +4 -4
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager.js +5 -0
- package/dist/core/settings-manager.js.map +1 -0
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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/subscription-usage-credential.d.ts +2 -0
- package/dist/core/subscription-usage-endpoints.d.ts +54 -0
- package/dist/core/subscription-usage.d.ts +55 -0
- package/dist/core/subscription-usage.js +3 -0
- package/dist/core/subscription-usage.js.map +1 -0
- 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 +3 -3
- 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 +4 -4
- 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.code.js +1 -1
- 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/edit-diff.d.ts +4 -6
- package/dist/core/tools/read-url.code.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 +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.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- 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 +3 -0
- package/dist/index.js +7 -7
- 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/main.js +2 -2
- 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/interactive/interactive-mode-surface.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +3 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -0
- package/dist/modes/rpc/rpc-types.d.ts +25 -0
- package/dist/package-manager-cli.code.js +31 -8
- package/dist/package-manager-cli.code.js.map +1 -1
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +2 -2
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/4.js +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/subscription-usage-sdk.d.ts +9 -0
- package/dist/utils/changelog.d.ts +1 -0
- package/dist/utils/startup-database-spare.code.js +2 -2
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/changelog.mdx +46 -6
- package/docs/containerization.md +17 -15
- package/docs/docs.json +1 -0
- package/docs/getting-started/installation.md +132 -80
- package/docs/guides/subscription-usage.md +133 -0
- package/docs/guides/team-setup.md +14 -3
- package/docs/guides.md +3 -0
- package/docs/index.md +18 -6
- package/docs/intercom/operations.md +1 -1
- package/docs/orchestration/migrating-workflows.md +16 -10
- package/docs/orchestration/patterns.md +8 -2
- package/docs/orchestration.md +17 -8
- package/docs/quickstart.md +7 -15
- package/docs/reference/cli.md +29 -22
- package/docs/rpc/protocol.md +9 -1
- package/docs/rpc.md +1 -1
- package/docs/sdk/reference.md +5 -1
- package/docs/skills.md +20 -4
- package/docs/slash-commands.md +3 -2
- package/docs/tools.md +57 -12
- package/docs/usage.md +1 -0
- package/docs/windows.md +4 -4
- package/package.json +9 -9
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +0 -1
- package/dist/_shared/sdk-OHKMDJ74.js.map +0 -1
- package/dist/_shared/startup-0-0-OV6RAEAP.js.map +0 -1
- package/dist/_shared/startup-0-1-EZAJI6RE.js.map +0 -1
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +0 -1
- package/dist/builtin/subagents/skills/workflow-files/SKILL.md +0 -28
package/docs/tools.md
CHANGED
|
@@ -163,26 +163,71 @@ Use colon and query selectors to inspect tables, filter rows, run read-only SQL,
|
|
|
163
163
|
|
|
164
164
|
## `edit`
|
|
165
165
|
|
|
166
|
-
`edit`
|
|
166
|
+
Use `edit` to replace part of an existing file without rewriting the whole file. Copy the text you want to change from the file so it matches in exactly one place. You don't have to call `read` first if you already know what's in the file.
|
|
167
|
+
|
|
168
|
+
Suppose `example.js` contains this function:
|
|
169
|
+
|
|
170
|
+
```js
|
|
171
|
+
function run() {
|
|
172
|
+
if (ready) {
|
|
173
|
+
start();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
This request adds `prepare();` before `start();`. The `oldText` block is less indented than it is in the file:
|
|
167
179
|
|
|
168
180
|
```json
|
|
169
181
|
{
|
|
170
|
-
"path": "
|
|
182
|
+
"path": "example.js",
|
|
171
183
|
"edits": [
|
|
172
|
-
{
|
|
173
|
-
|
|
184
|
+
{
|
|
185
|
+
"oldText": "if (ready) {\n start();\n}",
|
|
186
|
+
"newText": "if (ready) {\n prepare();\n start();\n}"
|
|
187
|
+
}
|
|
174
188
|
]
|
|
175
189
|
}
|
|
176
190
|
```
|
|
177
191
|
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
192
|
+
- `path` is the file to change, either an absolute path or one relative to the working directory.
|
|
193
|
+
- `edits` is the list of replacements to make in that file.
|
|
194
|
+
- `oldText` is the current text to find. In JSON, `\n` starts a new line.
|
|
195
|
+
- `newText` is what to put in its place. Use `""` to delete the matched text.
|
|
196
|
+
|
|
197
|
+
All replacements refer to the file before any edits. If two replacements overlap, combine them into one. If any replacement fails, `edit` leaves the whole file unchanged. For integrations that send an edit in another form, `edit` also accepts a single object in `edits`, an array or object encoded as a JSON string, or `oldText` and `newText` next to `path`.
|
|
198
|
+
|
|
199
|
+
### How `edit` finds the text
|
|
200
|
+
|
|
201
|
+
1. It looks for an exact match first.
|
|
202
|
+
2. If it finds none, it allows differences such as spaces at the end of a line, curly versus straight quotes, and some other equivalent characters.
|
|
203
|
+
3. If it still finds none, it tries to match whole lines with different indentation. The block can be indented more or less than the file, but the lines must nest in the same way. If one block matches and the indentation can be converted consistently, `edit` adjusts the replacement to fit the file's tabs or spaces. It does not ignore differences in spaces between words.
|
|
204
|
+
|
|
205
|
+
If a step finds multiple matches, `edit` stops and reports the ambiguity.
|
|
206
|
+
|
|
207
|
+
In this example, the `if` block has the same nesting in the request and the file. `edit` keeps the file's indentation:
|
|
208
|
+
|
|
209
|
+
```js
|
|
210
|
+
function run() {
|
|
211
|
+
if (ready) {
|
|
212
|
+
prepare();
|
|
213
|
+
start();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
In interactive mode, review the file preview. It shows the indentation that `edit` will write to the file.
|
|
219
|
+
|
|
220
|
+
### When an edit fails
|
|
221
|
+
|
|
222
|
+
If the text appears more than once, add nearby lines to `oldText` so it matches only one place. Keep those lines in `newText` too. If nothing matches in a nonempty file, `edit` points to the closest lines and shows where the text differs. For example, suppose you copy the block with its indentation but put `halt();` in `oldText` where the file says `start();`. The error points to line 3:
|
|
223
|
+
|
|
224
|
+
```text
|
|
225
|
+
Could not find the exact text in example.js. Closest match: lines 2–4. Line 3: oldText has "halt();", file has "start();".
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Reopen the file and copy the exact lines, including their indentation, into `oldText`. Make `newText` use the same indentation. Extensions and SDK integrations can check the [edit error codes](#edit-and-write-errors) instead of parsing the message.
|
|
184
229
|
|
|
185
|
-
|
|
230
|
+
`edit` works on UTF-8 text. It keeps the file's line endings and byte order mark, if present. To edit a Jupyter notebook (`.ipynb`), use the `# %% [code] cell:N` format that `read` shows. `edit` keeps the notebook's cell metadata, outputs, and execution counts. The notebook preview appears with the result.
|
|
186
231
|
|
|
187
232
|
## `write`
|
|
188
233
|
|
|
@@ -414,7 +459,7 @@ For extension and SDK integrations, `edit` and `write` failures are typed. Branc
|
|
|
414
459
|
| `EditInputError` | `edits-empty` | `edits` is empty or missing | `path`, `totalEdits` | Pass at least one replacement. |
|
|
415
460
|
| `EditInputError` | `old-text-empty` | An `oldText` is empty | `path`, `editIndex`, `totalEdits` | Provide at least one character from the file in `oldText`. |
|
|
416
461
|
| `EditInputError` | `text-splits-character` | `oldText` or `newText` splits a surrogate pair (for example half an emoji) | `path`, `editIndex`, `totalEdits` | Copy complete characters. |
|
|
417
|
-
| `EditMatchError` | `text-not-found` | `oldText`
|
|
462
|
+
| `EditMatchError` | `text-not-found` | `oldText` does not match, or its indentation cannot be applied safely | `path`, `editIndex`, `totalEdits` | Check the lines in the error and copy `oldText` verbatim. |
|
|
418
463
|
| `EditMatchError` | `text-not-unique` | `oldText` matches more than once | `path`, `editIndex`, `totalEdits`, `occurrences` | Include more surrounding lines. |
|
|
419
464
|
| `EditMatchError` | `edits-overlap` | Two edits touch the same region | `path`, `editIndex`, `overlapsEditIndex`, `totalEdits` | Merge them into one edit. |
|
|
420
465
|
| `EditMatchError` | `no-change` | Resulting file is identical | `path`, `totalEdits` | Make `newText` differ from `oldText`. |
|
package/docs/usage.md
CHANGED
|
@@ -90,6 +90,7 @@ Here are the everyday commands you will use most often:
|
|
|
90
90
|
| Command | Description |
|
|
91
91
|
| --- | --- |
|
|
92
92
|
| `/login [provider]` | Sign in with an OAuth account/subscription or save an API key ([Authentication](/getting-started/authentication)) |
|
|
93
|
+
| `/usage` | See [subscription usage](/guides/subscription-usage) for signed-in accounts while your reply keeps running |
|
|
93
94
|
| `/logout [provider]` | Remove stored credentials from `~/.atomic/agent/auth.json` (leaves env vars and `models.json` untouched) |
|
|
94
95
|
| `/model [provider/model]` | Switch models and save the startup default ([Choose a model](/models/choose-a-model)). Exact matches switch immediately; other text pre-filters the picker. Inside the picker, press `←`/`→` to adjust effort level and `Tab` to toggle scoped vs. all models |
|
|
95
96
|
| `/thinking [level]` | Set the thinking level and save the startup default (rejects levels unsupported by the current model) |
|
package/docs/windows.md
CHANGED
|
@@ -4,9 +4,9 @@ sidebarTitle: "Run on Windows"
|
|
|
4
4
|
description: "Install Atomic on Windows, configure Bash and PowerShell, choose a terminal, and troubleshoot Windows or WSL."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Native install with PowerShell (recommended) {#install-with-powershell}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Run the native installer in PowerShell 5.1 or newer:
|
|
10
10
|
|
|
11
11
|
```powershell
|
|
12
12
|
irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
|
|
@@ -20,7 +20,7 @@ To pin an exact release (`MAJOR.MINOR.PATCH` or `MAJOR.MINOR.PATCH-alpha.REVISIO
|
|
|
20
20
|
|
|
21
21
|
By default, the installer verifies `SHA256SUMS`, stores versioned payloads under `%LOCALAPPDATA%\atomic`, and creates an ASCII-only `atomic.cmd` launcher plus an `atomic-current` junction in `%LOCALAPPDATA%\atomic\bin`. The relative shim supports Unicode install paths and custom bin directories.
|
|
22
22
|
|
|
23
|
-
Override defaults with `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR` (defaults to `<ATOMIC_INSTALL_DIR>\bin`, so changing `ATOMIC_INSTALL_DIR` moves the default bin directory too), `ATOMIC_VERSION` (`-Ref` takes precedence), or optional `GITHUB_TOKEN`/`GH_TOKEN` (used only if release resolution falls back to the GitHub API).
|
|
23
|
+
Override defaults with `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR` (defaults to `<ATOMIC_INSTALL_DIR>\bin`, so changing `ATOMIC_INSTALL_DIR` moves the default bin directory too), `ATOMIC_VERSION` (`-Ref` takes precedence), or optional `GITHUB_TOKEN`/`GH_TOKEN` (used only if release resolution falls back to the GitHub API). If you use WSL, run the [macOS/Linux/WSL installer](/getting-started/installation#release-archive) inside your WSL terminal instead. If you installed with npm, pnpm, or Bun, see [Switch to the native installer](/getting-started/installation#switch-to-the-native-installer).
|
|
24
24
|
|
|
25
25
|
### Installer rules and edge cases
|
|
26
26
|
|
|
@@ -119,7 +119,7 @@ Run `atomic update` or `atomic update --self` to update Atomic (add `--force` to
|
|
|
119
119
|
|
|
120
120
|
For writable global package-manager installs on Windows, Atomic handles loaded native add-ons during self-update so Windows file locks do not block replacement. For custom or wrapped installations, configure `selfUpdateCommand` in global settings or `ATOMIC_SELF_UPDATE_COMMAND` (see [Custom update command](/reference/cli#custom-update-command)).
|
|
121
121
|
|
|
122
|
-
If
|
|
122
|
+
If `atomic update` can't update a native install, rerun the [PowerShell installer](#install-with-powershell). If another tool installed Atomic, use that tool to update it. For standalone binaries, see the latest [Atomic release](https://github.com/bastani-inc/atomic/releases/latest).
|
|
123
123
|
|
|
124
124
|
## Headless skills and file watchers
|
|
125
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.19",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"copy-binary-assets": "node ../../scripts/package-files.mjs copy package.json dist/ && node ../../scripts/package-files.mjs copy README.md dist/ && node ../../scripts/package-files.mjs copy CHANGELOG.md dist/ && node ../../scripts/package-files.mjs copy src/modes/interactive/theme/*.json dist/theme/ && node ../../scripts/package-files.mjs copy src/modes/interactive/assets/*.png dist/assets/ && node ../../scripts/package-files.mjs copy src/core/export-html/template.html src/core/export-html/template.css src/core/export-html/template.js src/core/export-html/saved-agent-viewer.js dist/export-html/ && node ../../scripts/package-files.mjs copy src/core/export-html/vendor/*.js dist/export-html/vendor/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-modifiers.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-module-path.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/dist/native-platform.js dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@bastani/atomic-tui/native/win32/prebuilds/win32-* dist/native/win32/prebuilds/ && node ../../scripts/package-files.mjs copy docs dist/ && node ../../scripts/package-files.mjs copy examples dist/ && node ../../scripts/package-files.mjs copy ../../node_modules/@silvia-odwyer/photon-node/photon_rs_bg.wasm dist/ && bun run copy-builtin-packages",
|
|
111
111
|
"copy-builtin-packages": "bun run scripts/copy-builtin-packages.ts",
|
|
112
112
|
"assert-binary-assets": "bun run scripts/assert-pi-runtime-assets.ts --app dist/app.js",
|
|
113
|
-
"docs:check": "bun run scripts/
|
|
113
|
+
"docs:check": "bun run ../../scripts/sync-changelog-docs.ts --check && bun run scripts/validate-docs-links.ts",
|
|
114
114
|
"generate:schemas": "bun run scripts/generate-schemas.ts",
|
|
115
115
|
"generate:references": "bun run scripts/generate-references.ts",
|
|
116
116
|
"test": "vitest --run",
|
|
@@ -118,13 +118,13 @@
|
|
|
118
118
|
"prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@bastani/atomic-natives": "0.10.
|
|
122
|
-
"@bastani/atomic-ai": "0.10.
|
|
123
|
-
"@bastani/atomic-agent-core": "0.10.
|
|
124
|
-
"@bastani/atomic-codemode": "0.10.
|
|
125
|
-
"@bastani/atomic-tui": "0.10.
|
|
126
|
-
"@bastani/atomic-schema": "0.10.
|
|
127
|
-
"@bastani/atomic-telemetry": "0.10.
|
|
121
|
+
"@bastani/atomic-natives": "0.10.19",
|
|
122
|
+
"@bastani/atomic-ai": "0.10.19",
|
|
123
|
+
"@bastani/atomic-agent-core": "0.10.19",
|
|
124
|
+
"@bastani/atomic-codemode": "0.10.19",
|
|
125
|
+
"@bastani/atomic-tui": "0.10.19",
|
|
126
|
+
"@bastani/atomic-schema": "0.10.19",
|
|
127
|
+
"@bastani/atomic-telemetry": "0.10.19",
|
|
128
128
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
129
129
|
"chalk": "6.0.0",
|
|
130
130
|
"glob": "14.0.6",
|