@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/extensions.md
CHANGED
|
@@ -1,37 +1,44 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "Build TypeScript extensions that add tools, slash commands, lifecycle hooks, and
|
|
2
|
+
title: "Build extensions"
|
|
3
|
+
sidebarTitle: "Overview"
|
|
4
|
+
description: "Build TypeScript extensions that add custom tools, slash commands, lifecycle hooks, and terminal UI to Atomic."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Extensions are TypeScript or JavaScript modules that customize how Atomic
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
7
|
+
Extensions are TypeScript or JavaScript modules that customize how Atomic works. Use them to add custom tools, intercept lifecycle events, register slash commands, persist session state, or render custom terminal UI.
|
|
8
|
+
|
|
9
|
+
<Columns cols={2}>
|
|
10
|
+
<Card title="Write an extension" href="/extensions/authoring">
|
|
11
|
+
Structure an extension, manage state across reloads, register custom tools, and customize terminal rendering.
|
|
12
|
+
</Card>
|
|
13
|
+
<Card title="Extension events" href="/extensions/events">
|
|
14
|
+
Look up every lifecycle event, payload shape, handler chaining rule, and return contract.
|
|
15
|
+
</Card>
|
|
16
|
+
<Card title="Build custom UI" href="/extensions/ui">
|
|
17
|
+
Build dialogs, widgets, host-native pickers and forms, custom components, overlays, and message renderers.
|
|
18
|
+
</Card>
|
|
19
|
+
<Card title="Extension API reference" href="/extensions/api-reference">
|
|
20
|
+
Reference `ExtensionContext`, `ExtensionToolContext`, `ExtensionCommandContext`, `ExtensionAPI` methods, and typed errors.
|
|
21
|
+
</Card>
|
|
22
|
+
<Card title="Extension examples" href="/extensions/examples">
|
|
23
|
+
Browse runnable extensions shipped with Atomic for tools, gates, UI, sandboxes, and providers.
|
|
24
|
+
</Card>
|
|
25
|
+
<Card title="SDK extensions" href="/sdk/reference#extensions">
|
|
26
|
+
Load extensions programmatically with `DefaultResourceLoader`, pass inline factories, or register standalone `customTools`.
|
|
27
|
+
</Card>
|
|
28
|
+
</Columns>
|
|
29
|
+
|
|
30
|
+
If an extension is heavier than you need, compare skills, prompt templates, and themes on [Build with Atomic](/build). Before enabling project-local extensions in an unfamiliar repo, review Atomic's project-trust boundary in [Security](/security).
|
|
31
|
+
|
|
32
|
+
## What extensions can do
|
|
33
|
+
|
|
34
|
+
| Goal | Primary API |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| Add or override model-callable tools | `atomic.registerTool()` |
|
|
37
|
+
| Gate tool calls, edit context, or customize compaction | `atomic.on("tool_call" \| "context" \| "session_before_compact", ...)` |
|
|
38
|
+
| Prompt the user or show status and widgets | `ctx.ui.select()`, `confirm()`, `input()`, `custom()`, `setStatus()`, `setWidget()` |
|
|
39
|
+
| Add interactive slash commands and keyboard shortcuts | `atomic.registerCommand()`, `atomic.registerShortcut()` |
|
|
40
|
+
| Persist durable data or keep objects alive across `/reload` | `atomic.appendEntry()`, `sessionScopedExtensionState()` |
|
|
41
|
+
| Register custom model providers or runtime MCP servers | `atomic.registerProvider()`, `atomic.registerMcpServer()` |
|
|
35
42
|
|
|
36
43
|
## Quick start
|
|
37
44
|
|
|
@@ -42,7 +49,7 @@ import type { ExtensionAPI } from "@bastani/atomic";
|
|
|
42
49
|
import { Type } from "typebox";
|
|
43
50
|
|
|
44
51
|
export default function (atomic: ExtensionAPI) {
|
|
45
|
-
// React to events
|
|
52
|
+
// React to lifecycle events
|
|
46
53
|
atomic.on("session_start", async (_event, ctx) => {
|
|
47
54
|
ctx.ui.notify("Extension loaded!", "info");
|
|
48
55
|
});
|
|
@@ -70,7 +77,7 @@ export default function (atomic: ExtensionAPI) {
|
|
|
70
77
|
},
|
|
71
78
|
});
|
|
72
79
|
|
|
73
|
-
// Register a command
|
|
80
|
+
// Register a slash command
|
|
74
81
|
atomic.registerCommand("hello", {
|
|
75
82
|
description: "Say hello",
|
|
76
83
|
handler: async (args, ctx) => {
|
|
@@ -80,7 +87,7 @@ export default function (atomic: ExtensionAPI) {
|
|
|
80
87
|
}
|
|
81
88
|
```
|
|
82
89
|
|
|
83
|
-
Test
|
|
90
|
+
Test an extension for one session without installing it globally using `-e` (or `--extension`):
|
|
84
91
|
|
|
85
92
|
```bash
|
|
86
93
|
atomic -e ./my-extension.ts
|
|
@@ -120,11 +127,13 @@ const { session } = await createAgentSession({
|
|
|
120
127
|
});
|
|
121
128
|
```
|
|
122
129
|
|
|
123
|
-
See [SDK extensions](/sdk/reference#extensions)
|
|
130
|
+
See [SDK extensions](/sdk/reference#extensions), [SDK custom tools](/sdk/reference#custom-tools), and [Structured decisions](/sdk/structured-decisions).
|
|
124
131
|
|
|
125
132
|
## Extension locations
|
|
126
133
|
|
|
127
|
-
>
|
|
134
|
+
<Warning>
|
|
135
|
+
Extensions run with your full system permissions and can execute arbitrary code. Install and trust extensions only from sources you control or verify.
|
|
136
|
+
</Warning>
|
|
128
137
|
|
|
129
138
|
Atomic auto-discovers extensions from these locations:
|
|
130
139
|
|
|
@@ -135,13 +144,13 @@ Atomic auto-discovers extensions from these locations:
|
|
|
135
144
|
| `~/.atomic/agent/extensions/*/package.json` | Global subdirectories declaring `atomic.extensions` (or legacy `pi.extensions`) |
|
|
136
145
|
| `.atomic/extensions/*.{ts,js}` | Project single-file extensions (trusted projects only) |
|
|
137
146
|
| `.atomic/extensions/*/index.{ts,js}` | Project subdirectory extensions (trusted projects only) |
|
|
138
|
-
| `.atomic/extensions/*/package.json` | Project subdirectories declaring `atomic.extensions` (trusted projects only) |
|
|
147
|
+
| `.atomic/extensions/*/package.json` | Project subdirectories declaring `atomic.extensions` (or legacy `pi.extensions`; trusted projects only) |
|
|
139
148
|
|
|
140
149
|
Discovery rules:
|
|
141
150
|
|
|
142
151
|
- Scanning respects `.gitignore`, `.ignore`, and `.fdignore` inside extension directories, and skips dotfiles, dot-directories, and `node_modules`.
|
|
143
|
-
- Disable
|
|
144
|
-
- Atomic also discovers extensions and packages inherited from legacy `~/.pi/agent` and `.pi` directories. If an inherited legacy extension registers the
|
|
152
|
+
- Disable auto-discovery with `--no-extensions` (`-ne`). Explicit `-e` paths and the mandatory bundled Intercom extension still load.
|
|
153
|
+
- Atomic also discovers extensions and packages inherited from legacy `~/.pi/agent` and `.pi` directories. If an inherited legacy extension registers the same tool, command, prompt, flag, or shortcut name as a bundled Atomic extension, Atomic keeps the bundled registration and skips only the conflicting registration (summarized in yellow on interactive startup). Extensions configured under `.atomic` or passed with `-e` follow normal override rules.
|
|
145
154
|
|
|
146
155
|
Configure extra paths or packages in `settings.json`:
|
|
147
156
|
|
|
@@ -158,7 +167,7 @@ Configure extra paths or packages in `settings.json`:
|
|
|
158
167
|
}
|
|
159
168
|
```
|
|
160
169
|
|
|
161
|
-
To
|
|
170
|
+
To share extensions over npm or git, see [Install and manage packages](/packages).
|
|
162
171
|
|
|
163
172
|
### Built-in extension resources
|
|
164
173
|
|
|
@@ -168,7 +177,7 @@ Atomic exposes `builtin:llama.cpp` ([llama.cpp](/llama-cpp)), `builtin:codemode`
|
|
|
168
177
|
{ "extensions": ["-builtin:codemode"] }
|
|
169
178
|
```
|
|
170
179
|
|
|
171
|
-
|
|
180
|
+
In global `settings.json`, `extensions` entries follow operator precedence (`!` < `+` < `-`); in a trusted project's `settings.json`, override entries are evaluated in array order (last match wins), so `"+builtin:codemode"` re-enables a globally excluded built-in. You can also load a built-in explicitly alongside `--no-extensions` (`-ne`):
|
|
172
181
|
|
|
173
182
|
```bash
|
|
174
183
|
atomic --no-extensions -e builtin:codemode --tools read,codemode
|
|
@@ -178,7 +187,7 @@ Passing an unrecognized `builtin:<name>` with `-e` stops with `Unknown built-in
|
|
|
178
187
|
|
|
179
188
|
Loading a built-in resource registers its tool. `codemode` is enabled in the default tool list (so a custom `--tools` list must name it), while `tool_search` is opt-in. Both `codemode` and `tool-search` are replaceable: a custom extension that registers the same tool, command, or flag takes over, and Atomic reports the replacement. Disable that extension in `atomic config` to restore the built-in version.
|
|
180
189
|
|
|
181
|
-
These built-in names do not replace Atomic's bundled MCP, subagent, web-access, or Intercom packages. There are no `builtin:mcp` or `builtin:subagents` aliases; configure those through package settings and MCP
|
|
190
|
+
These built-in names do not replace Atomic's bundled MCP, subagent, web-access, or Intercom packages. There are no `builtin:mcp` or `builtin:subagents` aliases; configure those through package settings and [MCP servers](/mcp-servers).
|
|
182
191
|
|
|
183
192
|
## Available imports
|
|
184
193
|
|
|
@@ -186,12 +195,12 @@ Extensions can import Atomic's bundled packages without installing them in `node
|
|
|
186
195
|
|
|
187
196
|
| Package | Purpose |
|
|
188
197
|
| --- | --- |
|
|
189
|
-
| [`@bastani/atomic`](/sdk) | Extension types (`ExtensionAPI`, `ExtensionContext`, events), helpers (`StringEnum`, `defineTool`), and built-in tool factories |
|
|
198
|
+
| [`@bastani/atomic`](/sdk) | Extension types (`ExtensionAPI`, `ExtensionContext`, events), helpers (`StringEnum`, `defineTool`, `boundOversizedText`, `installReactiveWidget`), and built-in tool factories |
|
|
190
199
|
| [`@bastani/atomic/storage`](/sdk/storage) | Storage adapter interfaces, `createSqliteDatabase()`, and storage errors |
|
|
191
200
|
| `@bastani/atomic/typebox` | Atomic's copy of TypeBox plus subpaths (`/compile`, `/error`, `/format`, `/guard`, `/schema`, `/system`, `/type`, `/value`) |
|
|
192
201
|
| `typebox` and `@sinclair/typebox` | Direct schema imports (including `typebox/*`, `@sinclair/typebox/compile`, and `@sinclair/typebox/value`) resolve to Atomic's copy so formats registered with `Format.Set()` apply to tool validation |
|
|
193
|
-
| [`@bastani/atomic-ai`](/libraries/ai) | AI utilities, provider APIs, image generation, and subpaths (`/oauth`, `/models`, `/providers/all`) |
|
|
194
|
-
| [`@bastani/atomic-tui`](/libraries/tui) | Terminal UI components for custom rendering |
|
|
202
|
+
| [`@bastani/atomic-ai`](/libraries/ai) | AI utilities, provider APIs, image generation, and subpaths (`/compat`, `/oauth`, `/models`, `/providers/all`) |
|
|
203
|
+
| [`@bastani/atomic-tui`](/libraries/tui) | Terminal UI components and layout helpers for custom rendering |
|
|
195
204
|
| [`@bastani/atomic-agent-core`](/libraries/agent-core) | Agent loop types and helpers |
|
|
196
205
|
| [`@bastani/atomic-codemode`](/libraries/codemode) | Codemode sandbox and declaration helpers (`@bastani/atomic-codemode/*`) |
|
|
197
206
|
| [`@bastani/atomic-schema`](/libraries/schema) | JSON Schema builders, validation, and `/formats` |
|
|
@@ -201,15 +210,11 @@ Atomic maintains these packages directly; [Libraries](/libraries) documents each
|
|
|
201
210
|
|
|
202
211
|
Node.js built-ins (`node:fs`, `node:path`, and the rest of `node:*`) are always available.
|
|
203
212
|
|
|
204
|
-
|
|
213
|
+
<Tip>
|
|
214
|
+
**Sharing TypeBox from separate dependencies or SDK apps:** Direct `typebox` imports inside an extension file map to Atomic's copy automatically. If a separate dependency or SDK app registers custom TypeBox formats, settings, or locales that must reach Atomic's tool validation, import from `@bastani/atomic/typebox` rather than from an independent `typebox` dependency. See [Sharing Atomic's TypeBox registry](/sdk#sharing-atomics-typebox-registry).
|
|
215
|
+
</Tip>
|
|
205
216
|
|
|
206
|
-
**Third-party npm dependencies
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
npm install
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Imports from `node_modules/` resolve automatically. For distributed packages installed with `atomic install` (npm or git), declare runtime dependencies in `dependencies`; `devDependencies` are omitted by default. When `npmCommand` is configured in `settings.json`, git package installs still detect `npm`, `pnpm`, or `bun` inside wrapper commands (such as `["mise", "exec", "node@20", "--", "npm"]`) and pass manager-specific flags to skip dev and peer dependencies. Plain `install` runs only for unrecognized package manager commands.
|
|
217
|
+
**Third-party npm dependencies:** Add a `package.json` next to your extension (or in a parent directory) and install dependencies with `npm install` (or your package manager). Imports from `node_modules/` resolve automatically. For distributed packages installed with `atomic install`, declare runtime dependencies in `dependencies` (`devDependencies` are omitted by default; see [Install and manage packages](/packages) for `npmCommand` details).
|
|
213
218
|
|
|
214
219
|
### Tool parameter schemas
|
|
215
220
|
|
|
@@ -220,14 +225,17 @@ A tool's `parameters` can be a TypeBox schema or any plain JSON Schema object. A
|
|
|
220
225
|
|
|
221
226
|
## Mode behavior
|
|
222
227
|
|
|
223
|
-
|
|
224
|
-
| --- | --- | --- |
|
|
225
|
-
| Interactive | Full TUI | Extensions run in a background worker so slow callbacks do not freeze the terminal |
|
|
226
|
-
| RPC (`--mode rpc`) | JSON protocol | Host handles UI; see [RPC mode](/rpc) |
|
|
227
|
-
| JSON (`--mode json`) | No-op | Event stream to stdout; see [JSON mode](/json) |
|
|
228
|
-
| Print (`-p`) | No-op | Extensions run without interactive prompts |
|
|
228
|
+
Extensions run in every Atomic mode, but UI availability differs:
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
| Mode | Display UI (`notify`, `setStatus`, `setWidget`, `setTitle`) | Prompts (`select`, `confirm`, `input`, `editor`) and `custom()` | Notes |
|
|
231
|
+
| --- | --- | --- | --- |
|
|
232
|
+
| Interactive CLI (default) | Supported (worker-isolated) | Supported (worker-isolated) | Extensions run in a background worker; some synchronous TUI APIs are unavailable. See [UI API compatibility matrix](/extensions/ui#ui-api-compatibility-matrix). |
|
|
233
|
+
| Embedded in-process TUI (SDK) | Full TUI | Full TUI | Extensions share the terminal UI process, enabling every `ctx.ui` API. |
|
|
234
|
+
| RPC (`--mode rpc`) | JSON protocol requests | Dialogs via JSON protocol; `custom()` resolves `undefined` | Host handles UI; component-factory `setWidget()` throws. See [RPC mode](/rpc). |
|
|
235
|
+
| JSON (`--mode json`) | No-op | Rejects with `HumanInputUnavailable` (unless a `humanInput` adapter is attached) | Event stream to stdout; `setTheme()` returns `{ success: false, error: "UI not available" }`. See [JSON mode](/json). |
|
|
236
|
+
| Print (`-p`) | No-op | Rejects with `HumanInputUnavailable` (unless a `humanInput` adapter is attached) | Single-run non-interactive execution; `setTheme()` returns `{ success: false, error: "UI not available" }`. |
|
|
237
|
+
|
|
238
|
+
Check `ctx.hasUI` (or `ctx.mode === "tui"`) before showing terminal UI, and check `ctx.hasHumanInput` before calling dialog methods in extensions that may run in print or JSON modes.
|
|
231
239
|
|
|
232
240
|
## Reloading and startup behavior
|
|
233
241
|
|
|
@@ -235,27 +243,18 @@ Auto-discovered extensions hot-reload when you run `/reload`. Atomic transpiles
|
|
|
235
243
|
|
|
236
244
|
- **Module format.** ESM files keep `import.meta.url`, strict mode, top-level `await`, and package or Node built-in imports. CommonJS files keep `require`, `module.exports`, `__filename`, and `__dirname`.
|
|
237
245
|
- **Caching on `/reload`.** Named npm packages, files under `node_modules` outside the extension's own package, and modules loaded via `createRequire()` are loaded once per process. Restart Atomic after editing those files.
|
|
238
|
-
- **Bun and `globalThis`.** Under Bun, extensions load through Atomic's loader on initial startup as well as `/reload`, keeping `typebox` and `@bastani/atomic-*` imports pinned to Atomic's own copies. Modules that declare a top-level variable named `globalThis` cannot be loaded under either Node or Bun.
|
|
239
246
|
- **Load failures.** If an optional extension fails to import or initialize during interactive startup or `/reload`, Atomic skips it, lists its path and error under `[Extension issues]`, and keeps the session open. Fix the issue and run `/reload`. In print (`-p`) and standalone RPC (`--mode rpc`) modes, any extension load failure prints the error and exits with code 1. Required built-in failures and cleanup failures stop startup in every mode.
|
|
240
|
-
- **
|
|
241
|
-
- **Built-in Herdr status reporter.** Inside a Herdr pane, Atomic automatically reports parent session status and resume commands with its built-in [Herdr integration](/herdr) and skips Herdr's legacy `herdr-agent-state.ts` or `.js` file (outside a Herdr pane, that legacy file loads normally). If you installed a separate `herdr-atomic-reporter` extension, disable either that extension or `herdr.enabled` in `settings.json` to prevent flickering status updates. See [Herdr setup](/herdr#setup).
|
|
242
|
-
|
|
243
|
-
## Startup and lazy discovery
|
|
244
|
-
|
|
245
|
-
Built-in [MCP](/mcp-servers), [subagent](/subagents), [web-access](/web-access), and [Intercom](/intercom) commands are available immediately at startup. Their first call may wait for background discovery or connection to finish:
|
|
246
|
-
|
|
247
|
-
- Enabled MCP servers connect in the background at startup. Your first prompt waits up to 10 seconds for servers that expose direct tools.
|
|
248
|
-
- Codemode waits for the MCP namespaces a script names; `searchTools()` and `ALL_TOOLS` wait for all enabled servers. Tool search and resource tools wait for discovery too.
|
|
249
|
-
- `/mcp` manages servers, and `/mcp login`, `/mcp logout`, and `/mcp reconnect` accept an optional server name. If lazy discovery fails, autocomplete falls back to currently known commands.
|
|
250
|
-
- Dropped MCP connections reconnect on the next call, and failed connections can be retried with `/mcp reconnect`. Web-access batches report a tool error when every item fails and keep completed items on partial success.
|
|
247
|
+
- **Cleanup failures on `/reload`.** If a retiring extension's `session_shutdown` handler fails during `/reload`, Atomic reports the failing handler while keeping the replacement extensions and updated settings active. Fix the cleanup error before reloading again.
|
|
251
248
|
|
|
252
|
-
|
|
249
|
+
<Note>
|
|
250
|
+
Inside a [Herdr](/herdr) pane, Atomic reports parent session status automatically with its built-in integration. See [Herdr setup](/herdr#setup) if you previously installed a separate Herdr status extension.
|
|
251
|
+
</Note>
|
|
253
252
|
|
|
254
253
|
<div id="interactive-callback-isolation" />
|
|
255
254
|
|
|
256
255
|
## Responsive UI and crash recovery
|
|
257
256
|
|
|
258
|
-
In default interactive mode, Atomic runs extensions in a separate background worker process so slow or stuck extension code does not freeze keyboard input or terminal spinners.
|
|
257
|
+
In default interactive CLI mode, Atomic runs extensions in a separate background worker process so slow or stuck extension code does not freeze keyboard input or terminal spinners.
|
|
259
258
|
|
|
260
259
|
### Cancellation and Ctrl+C safety
|
|
261
260
|
|
|
@@ -285,40 +284,12 @@ If the extension worker crashes unexpectedly, Atomic closes open custom UI and a
|
|
|
285
284
|
|
|
286
285
|
### UI APIs in default interactive mode
|
|
287
286
|
|
|
288
|
-
Dialogs, `ctx.ui.custom()` components,
|
|
289
|
-
|
|
290
|
-
APIs that require synchronous access inside the terminal UI process (`ctx.ui.onTerminalInput`, synchronous `ctx.ui.getEditorText`, `ctx.ui.setEditorComponent`, `ctx.ui.addAutocompleteProvider`, `ctx.ui.setHeader`, and `ctx.ui.setFooter`) do not run in default interactive mode and emit a warning instead. For interactive pickers and structured forms that work natively in default interactive mode, use `ctx.ui.hostSessionPicker()` and `ctx.ui.hostInputForm()`. See [Host-native pickers and forms](/extensions/ui#host-native-pickers-and-forms).
|
|
291
|
-
|
|
292
|
-
## Moved sections
|
|
293
|
-
|
|
294
|
-
<div id="session-scoped-in-memory-state" />
|
|
295
|
-
|
|
296
|
-
<div id="custom-rendering" />
|
|
297
|
-
|
|
298
|
-
- Extension structure, state management, custom tools, overrides, remote execution, truncation, and custom rendering moved to [Write an extension](/extensions/authoring).
|
|
299
|
-
|
|
300
|
-
<div id="before_agent_start" />
|
|
301
|
-
|
|
302
|
-
<div id="message_start--message_update--message_end" />
|
|
303
|
-
|
|
304
|
-
<div id="before_provider_request" />
|
|
305
|
-
|
|
306
|
-
<div id="thinking_level_select" />
|
|
307
|
-
|
|
308
|
-
<div id="tool-call-events" />
|
|
309
|
-
|
|
310
|
-
<div id="user_bash" />
|
|
311
|
-
|
|
312
|
-
- Lifecycle diagrams, event payloads, and return contracts moved to [Extension events](/extensions/events).
|
|
313
|
-
|
|
314
|
-
<div id="widgets-status-and-footer" />
|
|
315
|
-
|
|
316
|
-
<div id="autocomplete-providers" />
|
|
317
|
-
|
|
318
|
-
- Dialogs, widgets, autocomplete providers, custom components, overlays, custom editors, and theme helpers moved to [Extension UI](/extensions/ui).
|
|
287
|
+
Dialogs, `ctx.ui.custom()` components, widget factories, status text, notifications, `setTitle()`, `setEditorText()`, and host-native pickers and forms (`hostSessionPicker()`, `hostInputForm()`) all work in default interactive CLI mode. Values returned from `ctx.ui.custom()` must be JSON-serializable because they cross the worker boundary.
|
|
319
288
|
|
|
320
|
-
|
|
289
|
+
Because extensions run outside the terminal UI process in default interactive mode, several `ctx.ui` APIs are unavailable or behave differently:
|
|
321
290
|
|
|
322
|
-
|
|
291
|
+
- **Warn and skip:** `onTerminalInput()`, `getEditorText()`, `setEditorComponent()`, `addAutocompleteProvider()`, `setHeader()`, and `setFooter()`.
|
|
292
|
+
- **Silent no-ops or stubs:** `setWorkingMessage()`, `setWorkingVisible()`, `setWorkingIndicator()`, `setHiddenThinkingLabel()`, `getAllThemes()`, `getTheme()`, `setTheme()` (returns `{ success: false, error: "Theme switching not supported in RPC mode" }`), and `atomic.registerMarkdownTransformer()`.
|
|
293
|
+
- **Degraded behavior:** `pasteToEditor()` falls back to `setEditorText()` (replacing text without paste collapse), `getToolsExpanded()`/`setToolsExpanded()` track only a worker-local boolean, `editor()` omits `timeout` countdowns, and `getChatRenderSettings()` returns static defaults for some display fields.
|
|
323
294
|
|
|
324
|
-
-
|
|
295
|
+
See the complete [UI API compatibility matrix](/extensions/ui#ui-api-compatibility-matrix) before designing interactive UI, and prefer [Host-native pickers and forms](/extensions/ui#host-native-pickers-and-forms) for fast lists and structured input.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Authenticate a provider"
|
|
3
|
-
sidebarTitle: "
|
|
3
|
+
sidebarTitle: "Authenticate a provider"
|
|
4
4
|
description: "Connect Atomic to a model provider using a subscription login, the CLI auth command, or an API key."
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,61 +10,92 @@ description: "Connect Atomic to a model provider using a subscription login, the
|
|
|
10
10
|
|
|
11
11
|
## Choose an authentication method
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
| What you want | Use this |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| Sign in with a subscription or account inside Atomic | Run `/login` in interactive mode |
|
|
16
|
+
| Sign in from a terminal, SSH session, or setup script | Run `atomic auth login <provider>` |
|
|
17
|
+
| Use an API key for the current shell only | Export the provider's environment variable (such as `ANTHROPIC_API_KEY`) |
|
|
18
|
+
| Save an API key for all future sessions | Run `/login` → **Use an API key** (or `atomic auth login <provider> --api-key`) |
|
|
19
|
+
| Connect Bedrock, Vertex AI, Azure, or local `llama.cpp` | See [Model providers](/providers) or [Local models with llama.cpp](/llama-cpp) |
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
<Tabs>
|
|
22
|
+
<Tab title="Interactive /login">
|
|
23
|
+
Start Atomic and run `/login`:
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
```bash
|
|
26
|
+
atomic
|
|
27
|
+
```
|
|
18
28
|
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
```
|
|
29
|
+
```text
|
|
30
|
+
/login
|
|
31
|
+
```
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
/login
|
|
25
|
-
```
|
|
33
|
+
Choose **Use a subscription** (for subscriptions and OAuth accounts) or **Use an API key**, then select your provider. Supported subscription and account logins include OpenRouter, OpenAI (Sign in with ChatGPT), ChatGPT Plus/Pro (Codex), Claude Pro/Max, GitHub Copilot, Kimi Code, Meta (Muse), and xAI.
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
You can also jump directly to a provider:
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
- `/login anthropic` — Sign in with Claude Pro/Max or store an Anthropic API key.
|
|
38
|
+
- `/login openai` — Sign in with ChatGPT or store an API key for OpenAI's Responses API.
|
|
39
|
+
- `/login openai-codex` — Sign in to the ChatGPT Plus/Pro Codex backend.
|
|
40
|
+
- `/login openrouter` — Sign in with your OpenRouter account or store an OpenRouter API key.
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
<Tip>
|
|
43
|
+
**Remote or SSH sessions:** If your browser cannot reach Atomic's local callback port, copy the final redirect URL (or authorization code) from your browser and paste it into the login prompt. Choosing Amazon Bedrock inside `/login` opens a guided Bedrock setup dialog rather than a plain API-key prompt.
|
|
44
|
+
</Tip>
|
|
45
|
+
</Tab>
|
|
32
46
|
|
|
33
|
-
|
|
47
|
+
<Tab title="Shell (atomic auth login)">
|
|
48
|
+
Sign in without starting an interactive session:
|
|
34
49
|
|
|
35
|
-
```bash
|
|
36
|
-
atomic auth login anthropic
|
|
37
|
-
```
|
|
50
|
+
```bash
|
|
51
|
+
atomic auth login anthropic
|
|
52
|
+
```
|
|
38
53
|
|
|
39
|
-
Pass `--no-browser` on SSH or headless machines to use a non-browser flow such as a device code
|
|
54
|
+
- Pass `--no-browser` on SSH or headless machines to use a non-browser flow such as a device code.
|
|
55
|
+
- Pass `--api-key` to enter and store an API key without echoing it to the terminal.
|
|
40
56
|
|
|
41
|
-
|
|
57
|
+
See [Credential commands](/reference/cli#credential-commands) for `atomic auth check`, `atomic auth logout`, and scripting options.
|
|
58
|
+
</Tab>
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
<Tab title="API key">
|
|
61
|
+
Export a provider environment variable before launching Atomic:
|
|
44
62
|
|
|
45
|
-
```bash
|
|
46
|
-
export ANTHROPIC_API_KEY=sk-ant-...
|
|
47
|
-
atomic
|
|
48
|
-
```
|
|
63
|
+
```bash
|
|
64
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
65
|
+
atomic
|
|
66
|
+
```
|
|
49
67
|
|
|
50
|
-
|
|
68
|
+
To persist an API key across shells instead, run `/login`, choose **Use an API key**, and select a provider. Atomic saves stored keys and OAuth tokens in `~/.atomic/agent/auth.json` with owner-only `0600` permissions.
|
|
51
69
|
|
|
52
|
-
See [
|
|
70
|
+
See [Model providers](/providers) for every provider's environment variable name and cloud setup (Amazon Bedrock, Google Vertex AI, Azure, and NVIDIA NIM).
|
|
71
|
+
</Tab>
|
|
72
|
+
</Tabs>
|
|
53
73
|
|
|
54
74
|
## Verify authentication
|
|
55
75
|
|
|
56
|
-
|
|
57
|
-
|
|
76
|
+
<Steps>
|
|
77
|
+
<Step title="Check available models">
|
|
78
|
+
Start Atomic and run `/model`. Confirm your provider's models appear with an active selection marked. If the list is empty, rerun `/login` or confirm your API key is exported in the same shell.
|
|
58
79
|
|
|
59
|
-
|
|
80
|
+
You can also verify credentials from your shell without starting a session:
|
|
60
81
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
82
|
+
```bash
|
|
83
|
+
atomic auth check --provider anthropic
|
|
84
|
+
```
|
|
85
|
+
</Step>
|
|
86
|
+
<Step title="Send a live test prompt">
|
|
87
|
+
Select a model and send a short prompt such as `Reply with hello.` A listed model or stored credential does not verify live connectivity or account quota—a completed reply confirms end-to-end access.
|
|
88
|
+
</Step>
|
|
89
|
+
</Steps>
|
|
90
|
+
|
|
91
|
+
## How `/login` and `/logout` work
|
|
92
|
+
|
|
93
|
+
- Running bare `/login` opens **Select authentication method:** with **Use a subscription** and **Use an API key**.
|
|
94
|
+
- Running `/login <provider>` jumps straight to sign-in when the provider supports only one method, opens the method chooser when both OAuth and API key exist, or pre-fills the provider search filter otherwise. For OAuth providers not backed by a subscription (such as OpenRouter), the method chooser labels the OAuth choice **Use an account** instead of **Use a subscription**, and provider lists label it **account**.
|
|
95
|
+
- Provider status indicates whether credentials exist (`auth.json`, an environment variable, `--api-key`, or `models.json`); it does not test live connectivity.
|
|
96
|
+
- Pressing `Esc` or `Ctrl+C` cancels a sign-in and returns to the previous menu without altering previously saved credentials.
|
|
97
|
+
- `/logout [provider]` removes only credentials stored in `~/.atomic/agent/auth.json` (and legacy `~/.pi/agent/auth.json`). It does not clear environment variables, CLI flags, or `models.json` entries.
|
|
67
98
|
|
|
68
99
|
## Next step
|
|
69
100
|
|
|
70
|
-
Continue to [Run your first session](/getting-started/first-session).
|
|
101
|
+
Continue to [Run your first session](/getting-started/first-session), or see [Choose a model](/models/choose-a-model) to compare providers and set up model cycling.
|
|
@@ -1,64 +1,78 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Run your first session"
|
|
3
|
-
sidebarTitle: "
|
|
4
|
-
description: "
|
|
3
|
+
sidebarTitle: "Run your first session"
|
|
4
|
+
description: "Complete first-time setup, run your first task in a repository, inspect background work, and verify saved sessions."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
**Outcome:** You complete one interactive task and verify
|
|
7
|
+
**Outcome:** You complete first-time setup, finish one interactive task in a repository, and verify that the session was saved.
|
|
8
8
|
|
|
9
9
|
**Prerequisites:** [Authenticate a provider](/getting-started/authentication) is complete.
|
|
10
10
|
|
|
11
|
-
## Start Atomic
|
|
11
|
+
## Start Atomic and finish first-time setup
|
|
12
12
|
|
|
13
|
-
Start Atomic
|
|
13
|
+
Start Atomic inside a repository directory:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
cd /path/to/project
|
|
17
17
|
atomic
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
### First-Time Setup wizard
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
On a fresh install (when using the default `~/.atomic/agent/` directory before `settings.json` exists), interactive mode opens a two-step **First-Time Setup** screen before the prompt:
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
1. **Pick a theme:** Choose **Dark**, **Light**, or **System** (matching your terminal colors). Atomic pre-selects the option matching your detected terminal appearance and updates the theme live as you move through the list.
|
|
25
|
+
2. **Anonymous usage analytics:** Choose **Share anonymous usage data** or **Don't share**. Your choice and a local random tracking ID are written to `~/.atomic/agent/settings.json`. Atomic does not transmit analytics data in this release, and you can change this setting anytime in `/settings`.
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
Use `↑`/`↓` or `j`/`k` to move between choices, `Enter` to continue or finish, and `Esc` or `Ctrl+C` to skip setup without writing `settings.json`.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
List the top-level directories in this repository and say what each one holds.
|
|
30
|
-
```
|
|
29
|
+
### Your first prompt
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
After setup finishes—on your first empty interactive session launched with no CLI prompt—Atomic displays a brief one-time welcome overview above the input box. Returning users skip both setup and the welcome overview automatically.
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
Type any request to start working, run `/login` to connect a provider, or run `/agents` to browse available subagents.
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
## Verify the session
|
|
36
|
+
|
|
37
|
+
<Steps>
|
|
38
|
+
<Step title="Run a bounded repository task">
|
|
39
|
+
Ask Atomic to inspect a repository you know:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
List the top-level directories in this repository and say what each one holds.
|
|
43
|
+
```
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
Atomic streams its response and calls tools such as `read`, `find`, or `bash` inline as it works, then summarizes the directories in your checkout. If it mentions nothing from your repository, exit, `cd` into the repository, and launch `atomic` again.
|
|
46
|
+
</Step>
|
|
47
|
+
<Step title="Confirm the session saved">
|
|
48
|
+
Exit Atomic with `/exit`, then open the session picker:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
atomic -r
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Your completed session appears at the top of the list. Select it with `Enter`, or run `atomic -c` next time to continue the most recent session immediately.
|
|
55
|
+
</Step>
|
|
56
|
+
</Steps>
|
|
41
57
|
|
|
42
58
|
## Explore built-in capabilities
|
|
43
59
|
|
|
44
|
-
Once your first session works, reach for these capabilities as
|
|
60
|
+
Once your first session works, reach for these capabilities as your tasks grow.
|
|
45
61
|
|
|
46
62
|
### Delegate a larger task
|
|
47
63
|
|
|
48
|
-
Ask Atomic to split independent work across [subagents](/subagents):
|
|
64
|
+
Ask Atomic to split independent work across background [subagents](/subagents):
|
|
49
65
|
|
|
50
66
|
```text
|
|
51
67
|
Ask one subagent to trace the retry logic and another to find its tests. Compare their findings and show me any gaps.
|
|
52
68
|
```
|
|
53
69
|
|
|
54
|
-
- Run `/tasks` to inspect background subagents and
|
|
55
|
-
- Run `/resume` to return to
|
|
56
|
-
|
|
57
|
-
Converting an older Atomic workflow file? Give Atomic its path in a trusted project and ask it to convert the file into a skill. See [Migrating workflows](/orchestration/migrating-workflows).
|
|
70
|
+
- Run `/tasks` to inspect background subagents and shells, peek at their output, or send them follow-up instructions.
|
|
71
|
+
- Run `/resume` to return to any saved session.
|
|
58
72
|
|
|
59
73
|
### Top skills to invoke directly
|
|
60
74
|
|
|
61
|
-
Skills are reusable
|
|
75
|
+
Skills are reusable procedures invoked with `/skill:<name>`:
|
|
62
76
|
|
|
63
77
|
| Skill | When to use | Example |
|
|
64
78
|
| --- | --- | --- |
|
|
@@ -71,34 +85,30 @@ Skills are reusable instructions invoked with `/skill:<name>`:
|
|
|
71
85
|
| `agent-desktop` | Drive a native desktop app through its accessibility tree: snapshot, act on a ref, wait for postcondition. | `/skill:agent-desktop` |
|
|
72
86
|
| `qlty` | Lint, auto-format, and measure complexity, duplication, and code smells across languages. | `/skill:qlty check this branch before I hand it off` |
|
|
73
87
|
| `liteparse` | Extract text, tables, or values from PDF, DOCX, PPTX, XLSX, and images locally. | `/skill:liteparse` |
|
|
74
|
-
| `show-me` | Explain topics visually with diagrams, code sketches, or focused HTML views
|
|
75
|
-
|
|
76
|
-
Atomic bundles these skills with every release, and you can also add your own project or user skills. Note that `agent-browser`, `agent-desktop`, `qlty`, and `liteparse` require their external CLI binaries to be installed on your machine. See [Skills](/skills) for skill discovery, requirements, and authoring details.
|
|
88
|
+
| `show-me` | Explain topics visually with diagrams, code sketches, or focused HTML views. | `/skill:show-me` |
|
|
77
89
|
|
|
78
|
-
|
|
90
|
+
Atomic bundles these skills with every release, and you can add your own user or project skills. `agent-browser`, `agent-desktop`, `qlty`, and `liteparse` require their corresponding external CLI tools to be installed on your machine. See [Skills](/skills) for discovery and authoring details.
|
|
79
91
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
Summarize this repository and tell me how to run its checks.
|
|
84
|
-
```
|
|
92
|
+
### Built-in tools
|
|
85
93
|
|
|
86
|
-
By default, Atomic gives the model these
|
|
94
|
+
By default, Atomic gives the model these core coding tools (see [Built-in tools](/tools) for full inputs and options):
|
|
87
95
|
|
|
88
|
-
- **`read`:** Read files, directories, images, archives, URLs, and SQLite selectors.
|
|
96
|
+
- **`read`:** Read files, directories, images, archives, URLs, and SQLite databases (using table/row selectors).
|
|
89
97
|
- **`bash`:** Run shell commands.
|
|
90
|
-
- **`kill`:**
|
|
98
|
+
- **`kill`:** Stop background shell tasks by task ID.
|
|
91
99
|
- **`edit`:** Patch files with exact text replacement.
|
|
92
100
|
- **`write`:** Create or overwrite files.
|
|
93
|
-
- **`find`:**
|
|
101
|
+
- **`find`:** Find files by glob pattern.
|
|
94
102
|
- **`search`:** Search file contents with regular expressions.
|
|
95
|
-
- **`ask_user_question`:**
|
|
96
|
-
- **`todo`:**
|
|
97
|
-
- **`codemode`:** Compose permitted tool calls
|
|
103
|
+
- **`ask_user_question`:** Prompt you with structured choices or text questions in the terminal UI.
|
|
104
|
+
- **`todo`:** Track file-based todos for multi-step work.
|
|
105
|
+
- **`codemode`:** Compose permitted tool calls inside a sandboxed JavaScript runtime (see [Codemode](/codemode)).
|
|
98
106
|
|
|
99
|
-
On native Windows, `powershell` is also enabled when a PowerShell executable is available. Bundled integration tools
|
|
107
|
+
On native Windows, `powershell` is also enabled when a PowerShell executable is available. Bundled integration tools—including `subagent`, `intercom`, `web_search`, and `fetch_content`—are enabled alongside the coding tools by default. Run `/tools` anytime to see every active tool.
|
|
100
108
|
|
|
101
|
-
|
|
109
|
+
<Note>
|
|
110
|
+
Atomic runs in your current working directory and can edit files or run shell commands with your OS permissions. Work inside a Git repository (or rely on [Worktree snapshots](/worktree-snapshots)) for easy rollback, and see [Security](/security) for trust boundaries.
|
|
111
|
+
</Note>
|
|
102
112
|
|
|
103
113
|
## Next step
|
|
104
114
|
|