@bastani/atomic 0.10.10-alpha.1 → 0.10.10-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +22 -15
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +2 -2
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +2 -2
- package/dist/_shared/mode-shared-2QJSCUM6.js +2 -2
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/sdk-RRLVN7ER.js +2 -2
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-4VG2G44V.js +2 -2
- package/dist/_shared/startup-0-1-XTIL65D4.js +2 -2
- package/dist/_shared/startup-0-2-27OWFHV6.js +7 -6
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.js +2 -2
- package/dist/_shared/startup-0-4-ZMJV547D.js +2 -2
- package/dist/_shared/startup-0-5-FD2P735I.js +2 -2
- package/dist/_shared/startup-10-0-TDQNBDDL.js +2 -2
- package/dist/_shared/startup-15-1-4S7FLMNG.js +2 -2
- package/dist/_shared/startup-8-0-34CBHPZH.js +2 -2
- package/dist/_shared/startup-8-1-4KANEHRA.js +2 -2
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/README.md +4 -4
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +28 -4
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/README.md +2 -2
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +2 -2
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +2 -2
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +8 -5
- package/docs/build.md +11 -6
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +10 -2
- package/docs/compaction/reference.md +6 -4
- package/docs/compaction.md +3 -3
- package/docs/containerization.md +13 -5
- package/docs/custom-provider/api-reference.md +8 -6
- package/docs/custom-provider/oauth.md +4 -4
- package/docs/custom-provider/registration.md +3 -3
- package/docs/custom-provider.md +8 -8
- package/docs/development.md +40 -5
- package/docs/docs.json +21 -5
- package/docs/environment-variables.md +20 -18
- package/docs/extensions/api-reference.md +8 -6
- package/docs/extensions/authoring.md +4 -4
- package/docs/extensions.md +43 -6
- package/docs/guides/configuration.md +21 -1
- package/docs/guides/intercom.md +4 -0
- package/docs/guides/non-interactive.md +4 -2
- package/docs/guides/orchestration.md +4 -2
- package/docs/guides/resume-on-any-machine.md +12 -6
- package/docs/guides/subagents.md +4 -0
- package/docs/guides/team-setup.md +13 -2
- package/docs/guides.md +10 -4
- package/docs/herdr.md +4 -4
- package/docs/index.md +12 -4
- package/docs/intercom/operations.md +26 -4
- package/docs/intercom/reference.md +25 -3
- package/docs/intercom.md +13 -5
- package/docs/json.md +2 -0
- package/docs/keybindings.md +17 -4
- package/docs/libraries/agent-core.md +4 -2
- package/docs/libraries/ai.md +71 -53
- package/docs/libraries/codemode.md +3 -2
- package/docs/libraries/schema.md +5 -2
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +35 -2
- package/docs/libraries.md +23 -6
- package/docs/llama-cpp.md +2 -2
- package/docs/mcp-servers.md +50 -4
- package/docs/models/reference.md +13 -9
- package/docs/models-configuration.md +7 -7
- package/docs/models.md +18 -8
- package/docs/orchestration/migrating-workflows.md +2 -2
- package/docs/orchestration/patterns.md +8 -8
- package/docs/orchestration.md +5 -3
- package/docs/packages/authoring.md +3 -1
- package/docs/packages/reference.md +3 -1
- package/docs/packages.md +5 -3
- package/docs/programmatic.md +14 -8
- package/docs/prompt-templates.md +5 -3
- package/docs/providers/reference.md +7 -7
- package/docs/providers.md +22 -10
- package/docs/quickstart.md +13 -11
- package/docs/reference/cli.md +10 -5
- package/docs/reference.md +8 -4
- package/docs/rpc/examples.md +47 -0
- package/docs/rpc/extension-ui.md +7 -1
- package/docs/rpc/protocol.md +3 -2
- package/docs/rpc.md +3 -1
- package/docs/sdk/reference.md +144 -38
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +77 -4
- package/docs/sdk/web-server.md +3 -2
- package/docs/sdk.md +26 -115
- package/docs/security.md +17 -7
- package/docs/session-format.md +38 -24
- package/docs/sessions.md +21 -15
- package/docs/settings.md +17 -14
- package/docs/skills.md +47 -3
- package/docs/storage.md +38 -24
- package/docs/subagents/authoring.md +3 -1
- package/docs/subagents/reference.md +8 -2
- package/docs/subagents.md +35 -6
- package/docs/terminal-setup.md +1 -1
- package/docs/themes.md +5 -3
- package/docs/tmux.md +4 -4
- package/docs/tools.md +11 -0
- package/docs/usage.md +25 -15
- package/docs/web-access.md +35 -0
- package/docs/windows.md +9 -6
- package/docs/worktree-snapshots.md +22 -11
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +7 -7
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("./", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.10-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.10-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.10-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.10-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/startup-files.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":2,"self":"@bastani/atomic","packages":[["@bastani/atomic",-1],["@bastani/atomic-tui",0],["@bastani/atomic-codemode",0],["proper-lockfile",0],["graceful-fs",3],["retry",3],["signal-exit",3],["chalk",0],["get-east-asian-width",1],["marked",1],["marked-cjk-friendly",1],["@bastani/atomic-ai",0],["@bastani/atomic-agent-core",0],["glob",0],["@bastani/atomic-schema",11]],"files":[[0,"dist/modes/interactive-engine/engine-prewarm.js"],[0,"dist/_shared/rolldown-runtime-BGM3D5V3.js"],[0,"dist/_shared/p1a-prewarm-XIU57JHF.js"],[0,"dist/_shared/p0-cli-BB45ZQY6.js"],[0,"dist/_shared/p1-shared-RG5I5LJ6.js"],[1,"dist/helper-programs/index.js"],[0,"dist/utils/canonical-path.js"],[0,"dist/utils/path-exists.js"],[0,"dist/utils/worker-threads.js"],[2,"dist/node-options.js"],[1,"dist/_main-ea49a2e6.js"],[1,"dist/_lazy-eb232bf4.js"],[1,"dist/_rolldown-runtime-e937a250.js"],[0,"dist/core/storage/node-sqlite-thread.js"],[0,"dist/core/storage/dialect.js"],[0,"dist/modes/interactive/startup-shell-eligibility.js"],[0,"dist/_shared/p1b-elig-ENCUPKKJ.js"],[3,"index.js"],[0,"dist/_shared/p1-elig-shell-WWRO3L2R.js"],[3,"lib/lockfile.js"],[4,"graceful-fs.js"],[4,"polyfills.js"],[4,"legacy-streams.js"],[4,"clone.js"],[5,"index.js"],[5,"lib/retry.js"],[5,"lib/retry_operation.js"],[6,"index.js"],[6,"signals.js"],[3,"lib/mtime-precision.js"],[3,"lib/adapter.js"],[0,"dist/modes/interactive/startup-shell.js"],[0,"dist/_shared/p2-shell-TJBYQMCJ.js"],[1,"dist/index.js"],[0,"dist/_shared/p2-shell-main-B2WIALFD.js"],[0,"dist/_shared/p2-common-YLSYXMDQ.js"],[1,"dist/_main-eb08764b.js"],[1,"dist/_main-e8b70ad5.js"],[1,"dist/_main-ee570765.js"],[1,"dist/_main-e3d2c0ee.js"],[1,"dist/_main-e6811217.js"],[1,"dist/_main-eb967ea2.js"],[1,"dist/_main-eadbd863.js"],[1,"dist/_main-ec392c93.js"],[1,"dist/_main-e6ce3ee9.js"],[1,"dist/_main-ee2a1713.js"],[7,"source/index.js"],[0,"dist/utils/memoize-async.js"],[8,"index.js"],[9,"lib/marked.esm.js"],[10,"dist/index.js"],[1,"dist/native-modifiers.js"],[1,"dist/native-platform.js"],[7,"source/utilities.js"],[7,"source/vendor/ansi-styles/index.js"],[7,"source/vendor/supports-color/index.js"],[8,"lookup.js"],[1,"dist/native-module-path.js"],[8,"lookup-data.js"],[8,"utilities.js"],[0,"dist/utils/startup-stages.js"],[0,"dist/_shared/p3a-stages-66VAGJL3.js"],[0,"dist/core/http-dispatcher.js"],[0,"dist/_shared/http-undici-FVPTZA4G.js"],[0,"dist/_shared/http-YFAPTIZD.js"],[11,"dist/utils/node-http-proxy.js"],[11,"dist/utils/tls-certificate.js"],[11,"dist/utils/request-admission.js"],[11,"dist/_main-
|
|
1
|
+
{"version":2,"self":"@bastani/atomic","packages":[["@bastani/atomic",-1],["@bastani/atomic-tui",0],["@bastani/atomic-codemode",0],["proper-lockfile",0],["graceful-fs",3],["retry",3],["signal-exit",3],["chalk",0],["get-east-asian-width",1],["marked",1],["marked-cjk-friendly",1],["@bastani/atomic-ai",0],["@bastani/atomic-agent-core",0],["glob",0],["@bastani/atomic-schema",11]],"files":[[0,"dist/modes/interactive-engine/engine-prewarm.js"],[0,"dist/_shared/rolldown-runtime-BGM3D5V3.js"],[0,"dist/_shared/p1a-prewarm-XIU57JHF.js"],[0,"dist/_shared/p0-cli-BB45ZQY6.js"],[0,"dist/_shared/p1-shared-RG5I5LJ6.js"],[1,"dist/helper-programs/index.js"],[0,"dist/utils/canonical-path.js"],[0,"dist/utils/path-exists.js"],[0,"dist/utils/worker-threads.js"],[2,"dist/node-options.js"],[1,"dist/_main-ea49a2e6.js"],[1,"dist/_lazy-eb232bf4.js"],[1,"dist/_rolldown-runtime-e937a250.js"],[0,"dist/core/storage/node-sqlite-thread.js"],[0,"dist/core/storage/dialect.js"],[0,"dist/modes/interactive/startup-shell-eligibility.js"],[0,"dist/_shared/p1b-elig-ENCUPKKJ.js"],[3,"index.js"],[0,"dist/_shared/p1-elig-shell-WWRO3L2R.js"],[3,"lib/lockfile.js"],[4,"graceful-fs.js"],[4,"polyfills.js"],[4,"legacy-streams.js"],[4,"clone.js"],[5,"index.js"],[5,"lib/retry.js"],[5,"lib/retry_operation.js"],[6,"index.js"],[6,"signals.js"],[3,"lib/mtime-precision.js"],[3,"lib/adapter.js"],[0,"dist/modes/interactive/startup-shell.js"],[0,"dist/_shared/p2-shell-TJBYQMCJ.js"],[1,"dist/index.js"],[0,"dist/_shared/p2-shell-main-B2WIALFD.js"],[0,"dist/_shared/p2-common-YLSYXMDQ.js"],[1,"dist/_main-eb08764b.js"],[1,"dist/_main-e8b70ad5.js"],[1,"dist/_main-ee570765.js"],[1,"dist/_main-e3d2c0ee.js"],[1,"dist/_main-e6811217.js"],[1,"dist/_main-eb967ea2.js"],[1,"dist/_main-eadbd863.js"],[1,"dist/_main-ec392c93.js"],[1,"dist/_main-e6ce3ee9.js"],[1,"dist/_main-ee2a1713.js"],[7,"source/index.js"],[0,"dist/utils/memoize-async.js"],[8,"index.js"],[9,"lib/marked.esm.js"],[10,"dist/index.js"],[1,"dist/native-modifiers.js"],[1,"dist/native-platform.js"],[7,"source/utilities.js"],[7,"source/vendor/ansi-styles/index.js"],[7,"source/vendor/supports-color/index.js"],[8,"lookup.js"],[1,"dist/native-module-path.js"],[8,"lookup-data.js"],[8,"utilities.js"],[0,"dist/utils/startup-stages.js"],[0,"dist/_shared/p3a-stages-66VAGJL3.js"],[0,"dist/core/http-dispatcher.js"],[0,"dist/_shared/http-undici-FVPTZA4G.js"],[0,"dist/_shared/http-YFAPTIZD.js"],[11,"dist/utils/node-http-proxy.js"],[11,"dist/utils/tls-certificate.js"],[11,"dist/utils/request-admission.js"],[11,"dist/_main-edaad0eb.js"],[11,"dist/_rolldown-runtime-ee51c298.js"],[0,"dist/main.js"],[0,"dist/_shared/startup-8-1-4KANEHRA.js"],[0,"dist/_shared/startup-15-1-4S7FLMNG.js"],[0,"dist/_shared/startup-0-0-4VG2G44V.js"],[0,"dist/_shared/startup-0-1-XTIL65D4.js"],[0,"dist/_shared/startup-0-2-27OWFHV6.js"],[0,"dist/_shared/startup-0-3-T4DVFYWX.js"],[0,"dist/_shared/settings-startup-4QCVCI53.js"],[0,"dist/_shared/startup-8-0-34CBHPZH.js"],[0,"dist/_shared/startup-0-5-FD2P735I.js"],[0,"dist/_shared/startup-0-4-ZMJV547D.js"],[11,"dist/index.js"],[0,"dist/core/storage/errors.js"],[11,"dist/compat.js"],[0,"dist/core/worktree-snapshot/blob-store.js"],[0,"dist/core/storage/provider.js"],[0,"dist/core/storage/file-identity.js"],[11,"dist/utils/typebox/index.js"],[11,"dist/providers/all.js"],[11,"dist/utils/typebox/value.js"],[0,"dist/core/storage/selection.js"],[0,"dist/_shared/startup-15-0-YUKGAC63.js"],[0,"dist/_shared/startup-10-0-TDQNBDDL.js"],[0,"dist/_shared/startup-12-0-55AAXBJZ.js"],[0,"dist/_shared/startup-14-0-MLX36RBG.js"],[12,"dist/index.js"],[0,"dist/core/session-manager-core.js"],[0,"dist/core/extensions/runner-context.js"],[0,"dist/core/model-registry.js"],[11,"dist/api/anthropic-serialized-body.js"],[11,"dist/utils/provider-env.js"],[1,"dist/builtin-command-names.js"],[0,"dist/core/storage/prefix.js"],[11,"dist/providers/github-copilot.js"],[0,"dist/core/storage/migrations.js"],[0,"dist/core/storage/statement-sequence.js"],[11,"dist/providers/model-schema.js"],[11,"dist/api/transform-messages.js"],[11,"dist/api/llama-cpp-classify.lazy.js"],[11,"dist/api/typesafe-system-one.lazy.js"],[11,"dist/providers/compat-schema.js"],[11,"dist/utils/typebox/compile.js"],[11,"dist/utils/models-dev-catalog.js"],[11,"dist/utils/retry-hints.js"],[11,"dist/api/anthropic-assistant-content.js"],[2,"dist/declarations.js"],[2,"dist/source.js"],[11,"dist/utils/provider-retry.js"],[11,"dist/utils/retry-sleep.js"],[0,"dist/core/storage/session/errors.js"],[0,"dist/core/storage/node-sqlite.js"],[0,"dist/core/storage/write-ahead-log.js"],[13,"dist/esm/index.min.js"],[11,"dist/providers/openrouter.js"],[11,"dist/api/openai-codex-responses.js"],[11,"dist/providers/github-copilot-env.js"],[11,"dist/_main-e2ef4720.js"],[11,"dist/_main-e1febd93.js"],[11,"dist/_main-e19a4fd4.js"],[11,"dist/_main-e86630a4.js"],[11,"dist/_main-e9f56bba.js"],[11,"dist/_main-eb50a044.js"],[11,"dist/_main-efb566d7.js"],[11,"dist/_main-ee9d05d2.js"],[11,"dist/_main-eba93bef.js"],[11,"dist/_main-e66c63b1.js"],[11,"dist/_main-ec6a4bc9.js"],[11,"dist/_main-ed807bff.js"],[11,"dist/_main-e4a075c4.js"],[0,"dist/core/storage/statement-batches.js"],[11,"dist/_lazy-e41faaec.js"],[11,"dist/_main-eb91f765.js"],[12,"dist/_main-e87dd55a.js"],[12,"dist/_main-ebff8f0f.js"],[11,"dist/api/strict-tool-limits.js"],[0,"dist/_shared/session-manager-list-2BLEEZVG.js"],[11,"dist/_lazy-e8d1c37a.js"],[11,"dist/_main-ebcdada8.js"],[2,"dist/identifier.js"],[0,"dist/core/storage/node-sqlite-file-gate.js"],[11,"dist/_main-e68ac8e6.js"],[11,"dist/_lazy-e80a27de.js"],[11,"dist/_main-efb2d8b1.js"],[14,"dist/index.js"],[14,"dist/formats/index.js"],[11,"dist/_main-e35ad503.js"],[12,"dist/_rolldown-runtime-e937a250.js"],[11,"dist/_lazy-ea3b042f.js"],[14,"dist/_main-ed41ae74.js"],[0,"dist/cli/settings-startup.js"],[0,"dist/_shared/settings-startup-8-DNZ2RIHM.js"],[0,"dist/modes/interactive/interactive-mode.js"],[0,"dist/_shared/mode-shared-2QJSCUM6.js"],[0,"dist/_shared/mode-interactive-sdk-7KXUFI2F.js"],[1,"dist/layout-node.js"],[0,"dist/modes/rpc/rpc-mode.js"],[0,"dist/_shared/mode-rpc-sdk-IOPGDYR4.js"],[0,"dist/index.js"],[0,"dist/_shared/sdk-RRLVN7ER.js"],[0,"dist/core/storage/index.js"],[0,"dist/core/storage/schema.js"],[11,"dist/api/cloudflare-gateway-binding.js"],[0,"dist/core/storage/sqlite-facade.js"],[11,"dist/utils/oauth-page.js"],[0,"dist/core/storage/fenced-paths.js"],[0,"dist/core/extensions/loader-virtual-modules.js"],[0,"dist/builtin/intercom/index.bundle.mjs"],[0,"dist/builtin/subagents/src/extension/index.bundle.mjs"],[0,"dist/builtin/mcp/index.bundle.mjs"],[0,"dist/builtin/web-access/index.bundle.mjs"]]}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.10-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.10-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.10-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.10-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.10-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.10-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.10-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.10-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.10-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.10-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.10-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.10-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.10-alpha.
|
|
9
|
+
const key = `${root.href}#0.10.10-alpha.2`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.10-alpha.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.
|
|
30
|
+
if (running === undefined || running.version === "0.10.10-alpha.2") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.10-alpha.2 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/docs/background-tasks.md
CHANGED
|
@@ -34,7 +34,7 @@ subagent({
|
|
|
34
34
|
|
|
35
35
|
Parallel tasks get independent IDs, and tasks beyond the concurrency limit wait in the queue. Run `/agents` to browse bundled and custom specialists before choosing one.
|
|
36
36
|
|
|
37
|
-
Intercom messaging never cancels a parallel batch. An `intercom` `ask` returns as soon as it is delivered and delivers late replies as messages, while a blocking `contact_supervisor` decision waits only inside the requesting subagent and continues that subagent once answered. Sends and progress updates never block. A parent's `subagent({ action: "wait", id })` yields so the parent can reply while keeping running subagents, concurrency slots, and queued siblings intact.
|
|
37
|
+
[Intercom](/intercom) messaging never cancels a parallel batch. An `intercom` `ask` returns as soon as it is delivered and delivers late replies as messages, while a blocking `contact_supervisor` decision waits only inside the requesting subagent and continues that subagent once answered. Sends and progress updates never block. A parent's `subagent({ action: "wait", id })` yields so the parent can reply while keeping running subagents, concurrency slots, and queued siblings intact.
|
|
38
38
|
|
|
39
39
|
A launch result says **Launched in background**. That records that the subagent started, not its live state. Check the agent panel or `/tasks` for current status.
|
|
40
40
|
|
|
@@ -85,7 +85,7 @@ Main chat and subagent views render the same notice format. Long titles shorten
|
|
|
85
85
|
|
|
86
86
|
## Background shells
|
|
87
87
|
|
|
88
|
-
Model `bash` calls on POSIX and native Windows, and `powershell` calls on native Windows, run under your session's background task manager. Subagent shells are managed by the launching main session; see [Shells started by subagents](#shells-started-by-subagents). A command that runs past its foreground observation budget returns a task ID and keeps running in the background while its execution timeout keeps counting.
|
|
88
|
+
Model [`bash`](/tools#bash) calls on POSIX and native Windows, and `powershell` calls on native Windows, run under your session's background task manager. Subagent shells are managed by the launching main session; see [Shells started by subagents](#shells-started-by-subagents). A command that runs past its foreground observation budget returns a task ID and keeps running in the background while its execution timeout keeps counting.
|
|
89
89
|
|
|
90
90
|
```ts
|
|
91
91
|
// Ordinary commands wait for the session's default observation budget (10 seconds).
|
|
@@ -165,7 +165,7 @@ Keep immediately blocking work inline unless specialist focus, isolated context,
|
|
|
165
165
|
|
|
166
166
|
If a task finishes during observation, the call returns its final result directly. Automatic backgrounding means the observation budget elapsed, not a timeout failure, restart, or second run. If a wait for a dependency ends early, wait for actual completion before using the result.
|
|
167
167
|
|
|
168
|
-
Shell `budgetMs` accepts finite non-negative milliseconds, where `0` returns immediately without cancelling the task. On command launches, put `budgetMs` inside a foreground `wait`; on existing-task `action: "wait"` calls, pass `budgetMs` at the top level. Custom SDK sessions can override default budgets or set `tasks.wait.kind: "until-settled"` so omitted foreground budgets wait until completion, while explicit per-call budgets still take precedence.
|
|
168
|
+
Shell `budgetMs` accepts finite non-negative milliseconds, where `0` returns immediately without cancelling the task. On command launches, put `budgetMs` inside a foreground `wait`; on existing-task `action: "wait"` calls, pass `budgetMs` at the top level. Custom SDK sessions can override default budgets or set `tasks.wait.kind: "until-settled"` so omitted foreground budgets wait until completion, while explicit per-call budgets still take precedence (see [Supervised command SDK](/sdk/reference#supervised-command-sdk)).
|
|
169
169
|
|
|
170
170
|
## The agent panel
|
|
171
171
|
|
|
@@ -380,11 +380,14 @@ Background means independent of the current wait, not independent of the launchi
|
|
|
380
380
|
- **Task retention.** Each session keeps its 256 most recently finished tasks in `/tasks`, along with all running, queued, stopping, and pending-cleanup tasks. When newer tasks finish, the oldest finished task leaves `/tasks` once its completion notice has been delivered. Its result stays in its completion notice or tool result, and subagent transcripts stay in their saved sessions (`subagent({ action: "resume", id })` still works). Evicted shell full output is deleted, and waiting on, stopping, or reading an evicted task reports `Task "<id>" finished and is no longer kept in this session` (code `TaskEvicted`).
|
|
381
381
|
- **Temporary worktree cleanup on close.** A temporary-worktree subagent can finish its session while Atomic is still saving or releasing its Git worktree. Closing or switching sessions waits for execution, output, and recovery notices, while remaining batch Git cleanup continues in the background. Check [temporary worktrees](/subagents#temporary-worktrees) before removing any worktree directory manually.
|
|
382
382
|
- **Shell process-tree cleanup.** On Linux and macOS, each shell runs in its own session so cleanup stops child processes across process groups, while leaving detached processes (such as `setsid`) alone once they close output. On Linux with a user-owned cgroup v2 hierarchy, Atomic also uses cgroups for tighter process-tree containment; set `ATOMIC_TASK_CGROUP=0` to disable cgroup containment. On Windows, Job objects clean up process trees. If Atomic terminates unexpectedly, remaining shell process trees are cleaned up automatically.
|
|
383
|
-
- **Unconfirmed shell cleanup and SDK errors.** If a shell finishes while a descendant still holds its output open, Atomic keeps the command's exit code and output (discarding any later writes) and waits up to 15 seconds in the background (and up to 15 seconds more on session close) to confirm teardown. While waiting for cleanup confirmation, that shell keeps its process slot; new launches blocked only by pending-cleanup slots wait up to 5 seconds before failing with `TaskCleanupAdmissionTimeoutError` (a subclass of `TaskCleanupError`). If cleanup remains unconfirmed on session close, Atomic reports a retryable `TaskCleanupError` (`code: "task_cleanup_unconfirmed"`) naming the affected tasks and process groups, and `isRetryableTaskError(error)` from `@bastani/atomic` returns `true`.
|
|
384
|
-
- **Bounded previews.** UI previews are bounded and do not replace retained output. Gaps and truncation are labelled, and unavailable history is reported instead of reconstructed. Custom SDK shell adapters receive `wait` and implement observation themselves.
|
|
383
|
+
- **Unconfirmed shell cleanup and SDK errors.** If a shell finishes while a descendant still holds its output open, Atomic keeps the command's exit code and output (discarding any later writes) and waits up to 15 seconds in the background (and up to 15 seconds more on session close) to confirm teardown. While waiting for cleanup confirmation, that shell keeps its process slot; new launches blocked only by pending-cleanup slots wait up to 5 seconds before failing with `TaskCleanupAdmissionTimeoutError` (a subclass of `TaskCleanupError`). If cleanup remains unconfirmed on session close, Atomic reports a retryable `TaskCleanupError` (`code: "task_cleanup_unconfirmed"`) naming the affected tasks and process groups, and `isRetryableTaskError(error)` from `@bastani/atomic` returns `true`. See [Owner-bound task supervisor](/sdk/reference#owner-bound-task-supervisor) and [Finished task retention and eviction](/sdk/reference#finished-task-retention-and-eviction).
|
|
384
|
+
- **Bounded previews.** UI previews are bounded and do not replace retained output. Gaps and truncation are labelled, and unavailable history is reported instead of reconstructed. Custom SDK shell adapters receive `wait` and implement observation themselves ([Supervised command SDK](/sdk/reference#supervised-command-sdk)).
|
|
385
385
|
|
|
386
386
|
## Related documentation
|
|
387
387
|
|
|
388
388
|
- [Run subagents](/subagents) covers bundled agents, models, context, worktrees, and delegation boundaries.
|
|
389
|
+
- [Coordinate sessions with Intercom](/intercom) covers cross-session messaging, steering, and supervisor escalation.
|
|
390
|
+
- [`bash` in Built-in tools](/tools#bash) covers `bash`, `powershell`, and `kill` parameters and output limits.
|
|
391
|
+
- [Owner-bound task supervisor](/sdk/reference#owner-bound-task-supervisor), [Finished task retention and eviction](/sdk/reference#finished-task-retention-and-eviction), and [Supervised command SDK](/sdk/reference#supervised-command-sdk) cover SDK task supervision and shell factories.
|
|
389
392
|
- [Keybindings](/keybindings) covers task-action remapping.
|
|
390
393
|
- [Orchestrate with codemode and subagents](/orchestration) explains how the main session coordinates multi-step work from results.
|
package/docs/build.md
CHANGED
|
@@ -18,13 +18,15 @@ Work down this list and stop at the first mechanism that solves your problem.
|
|
|
18
18
|
4. [Subagents](/subagents). Delegate a focused, bounded task to a child agent.
|
|
19
19
|
5. [Intercom](/intercom). Coordinate sessions on the same machine or across machines sharing a database.
|
|
20
20
|
6. [Orchestration](/orchestration). Use codemode to launch children, check results, and pick up after an interruption.
|
|
21
|
-
7. [
|
|
22
|
-
8. [
|
|
21
|
+
7. [Environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint). Define `.atomic/blueprint.yaml` so restored worktrees rebuild dependencies and caches automatically on any machine or CI runner.
|
|
22
|
+
8. [Extensions](/extensions). Write TypeScript that adds tools, commands, events, and custom UI when nothing lighter fits.
|
|
23
|
+
9. [Atomic packages](/packages). Bundle and distribute your extensions, skills, prompt templates, themes, subagents, MCP servers, or [storage adapters](/storage#adapters-from-atomic-packages).
|
|
23
24
|
|
|
24
25
|
## Change the model layer
|
|
25
26
|
|
|
26
27
|
- [Custom models](/models). Add model entries for a supported provider API.
|
|
27
|
-
- [
|
|
28
|
+
- [Remote compaction models](/models#remote-compaction-models). Configure custom `type: "compactor"` endpoints or override `morph/morph-compactor` parameters (see [Compaction](/compaction#customize-morph-or-add-a-remote-compactor)).
|
|
29
|
+
- [Custom providers](/custom-provider). Implement a provider API, classifier, remote compactor, or OAuth flow that Atomic does not ship.
|
|
28
30
|
|
|
29
31
|
## Customize appearance and controls
|
|
30
32
|
|
|
@@ -33,10 +35,13 @@ Work down this list and stop at the first mechanism that solves your problem.
|
|
|
33
35
|
|
|
34
36
|
## Embed Atomic in your own software
|
|
35
37
|
|
|
36
|
-
[Programmatic
|
|
38
|
+
[Programmatic modes](/programmatic) compares JSON mode, RPC, and the SDK, and links each one to its protocol or API reference.
|
|
37
39
|
|
|
38
|
-
- [SDK](/sdk). Embed Atomic in Node.js applications.
|
|
40
|
+
- [TypeScript SDK](/sdk). Embed Atomic in Node.js applications.
|
|
41
|
+
- [SDK storage backends](/sdk/storage). Wire local SQLite, JSONL, in-memory, libSQL/Turso, or PostgreSQL into `createAgentSession()` and `createAgentSessionRuntime()`.
|
|
42
|
+
- [Structured decisions](/sdk/structured-decisions). Run typed classifier or chat decisions with `decide()` and `generateStructuredOutput()`.
|
|
43
|
+
- [Web server guide](/sdk/web-server). Stream agent runs from an HTTP server or Next.js App Router endpoint.
|
|
39
44
|
- [RPC mode](/rpc). Integrate over stdin and stdout JSONL.
|
|
40
45
|
- [JSON event stream mode](/json). Run print mode with structured events.
|
|
41
46
|
- [TUI components](/tui). Build custom terminal UI for extensions.
|
|
42
|
-
- [
|
|
47
|
+
- [Standalone libraries](/libraries). Use Atomic's six core packages (`ai`, `tui`, `agent-core`, `codemode`, `schema`, `telemetry`) and optional storage adapters ([`@bastani/atomic-storage-postgres`](/libraries/storage-postgres) and [`@bastani/atomic-storage-libsql`](/libraries/storage-libsql)) directly.
|
package/docs/changelog.mdx
CHANGED
|
@@ -8,7 +8,7 @@ description: "What's new in Atomic"
|
|
|
8
8
|
## Pi 0.83.0 parity
|
|
9
9
|
|
|
10
10
|
- **One door prints a stored credential.** `atomic auth print-api-key --model <model>` and `atomic auth print-bearer-token --model <model>` hand a configured credential to an external client. The credential is all that reaches stdout — warnings, provider selection, refresh notices, and help go to stderr — `--model` is required, and each failure has its own exit code, with stdout empty on every non-zero exit. `--min-expiry` accepts `ms`, `s`, `m`, or `h`, defaults to `30m`, and is a usage error on `print-api-key`, which has no expiry to wait for. See [Usage](/reference/cli#credential-commands) and [Security](/security#credential-export).
|
|
11
|
-
- **Extensions can read the session's model scope.** `ctx.scopedModels` reports the models scoped to the current session — the set `/scoped-models` shows — resolved at access time and correct under the isolated engine. It reports the scope and cannot widen it: the accessor is read-only, and every read hands back a frozen copy of the array, its entries, and their models, so neither pushing an entry nor swapping one in place reaches the session. `ScopedModel` and `ExtensionScopedModels` are exported so an extension can name what it read. See [Extensions](/extensions/api-reference#ctx-modelregistry
|
|
11
|
+
- **Extensions can read the session's model scope.** `ctx.scopedModels` reports the models scoped to the current session — the set `/scoped-models` shows — resolved at access time and correct under the isolated engine. It reports the scope and cannot widen it: the accessor is read-only, and every read hands back a frozen copy of the array, its entries, and their models, so neither pushing an entry nor swapping one in place reaches the session. `ScopedModel` and `ExtensionScopedModels` are exported so an extension can name what it read. See [Extensions](/extensions/api-reference#ctx-modelregistry-ctx-model-ctx-scopedmodels).
|
|
12
12
|
- **An unrecognised stop reason is now an error.** A provider that ends a turn with a terminal reason the mapping does not know surfaces a provider error naming the raw value instead of an ordinary successful stop, so a new truncation or safety signal is visible rather than silent. Streaming partials carry the new `pending` reason until the terminal event replaces it; a stream that ends still `pending` is an error. See [Providers](/providers/reference#stop-reasons) and [Custom Providers](/custom-provider/streaming#stop-reasons).
|
|
13
13
|
- **OAuth tokens refresh before they expire.** A stored token with under five minutes of validity left is refreshed rather than used, so a long turn does not start on a credential that dies mid-request. The refresh runs under the `auth.json` lock and re-checks expiry inside it, so concurrent sessions sharing one credential file refresh it once between them. See [Providers](/providers#token-refresh).
|
|
14
14
|
- **Remote OpenRouter logins have a way through.** When the browser cannot reach the loopback callback — over SSH, or on a headless host — the OpenRouter login accepts the final redirect URL, or the authorization code alone, pasted into the prompt. See [Providers](/providers#subscriptions).
|
package/docs/codemode.md
CHANGED
|
@@ -4,12 +4,20 @@ sidebarTitle: "Codemode"
|
|
|
4
4
|
description: "Write JavaScript scripts inside Atomic's sandbox to compose tool calls, persist state across turns, and call classifier or image models."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
`codemode` lets the model run a JavaScript script that calls Atomic tools and non-LLM models (classifiers and image generators) and returns only the filtered result. It is enabled by default
|
|
7
|
+
`codemode` lets the model run a JavaScript script that calls Atomic tools and non-LLM models (classifiers and image generators) and returns only the filtered result. It is enabled by default. Toggle it from the CLI or settings ([`codemode` in Built-in tools](/tools#codemode)), or from the SDK with `tools: ["-codemode"]`, `noTools: "builtin"`, or `DefaultResourceLoader({ disabledBuiltinExtensions: ["codemode"] })` ([SDK extensions](/sdk/reference#extensions)). For multi-step subagent workflows in codemode, see [Orchestrate with codemode and subagents](/orchestration). To embed the sandbox in your own application, see [`@bastani/atomic-codemode`](/libraries/codemode).
|
|
8
8
|
|
|
9
9
|
## Scripts
|
|
10
10
|
|
|
11
11
|
Pass raw JavaScript source with no JSON wrapper or markdown code fences. Code runs as an async function body inside a sandboxed JavaScript runtime, so top-level `await` and `return` work. The sandbox has no Node or Bun APIs, filesystem, network, or timers; all external access goes through `tools` and `models`.
|
|
12
12
|
|
|
13
|
+
```javascript
|
|
14
|
+
const [readme, pkg] = await Promise.all([
|
|
15
|
+
tools.read({ path: "README.md:1-40" }),
|
|
16
|
+
tools.read({ path: "package.json" }),
|
|
17
|
+
]);
|
|
18
|
+
return { name: JSON.parse(pkg).name, excerpt: readme.slice(0, 400) };
|
|
19
|
+
```
|
|
20
|
+
|
|
13
21
|
An optional first-line directive sets the output budget and timeout. It must be line 1 followed by JavaScript code; unknown keys or a script with no code after the directive fail immediately:
|
|
14
22
|
|
|
15
23
|
```javascript
|
|
@@ -233,7 +241,7 @@ type ImageBlock = { type: "image"; data: string; mimeType: string; role?: "marku
|
|
|
233
241
|
- **OpenAI option validation.** `outputCompression` accepts integers `0` to `100` and is valid only with `outputFormat: "jpeg"` or `"webp"`. `background: "transparent"` is valid only with `"png"`, `"webp"`, or the default format. `safetyIdentifier` has a 128-character limit. `complexity` (`"low"`, `"medium"`, or `"high"`, API default `"high"`) applies to GPT Image 2.6 only.
|
|
234
242
|
- **GIF and SVG.** `outputFormat: "gif"` and `"svg"` require a GPT Image 2.6 model with text-only input. For GIF, `frameCount` (`2` to `16`, API default `9`) and `frameDurationMs` (`20` to `2000`, API default `200`, rounded to 10 ms) are rejected unless `outputFormat` is `"gif"`. For SVG, `n` must be `1` or omitted, and the `svg` option is rejected unless `outputFormat` is `"svg"`.
|
|
235
243
|
- **SVG authoring model.** `{ outputFormat: "svg" }` works without extra options. If an account requires `svg.model` and you omitted `svg`, Atomic retries once with `gpt-6.1-sol` (reported in `result.svgModel`), and retries once without `svg` if rejected as unsupported. An explicit `svg: { model, reasoning }` is sent verbatim without automatic fallback. Allow at least `timeout_ms: 180000` for SVG requests (Atomic's own request timeout is at least 10 minutes).
|
|
236
|
-
- **Structured errors.** Invalid options fail locally with `stopReason: "error"`, `error.code: "invalid-option"`, and `error.fields.field` (plus `error.fields.reason`: `required-by-api`, `rejected-by-api`, or `unsupported-by-api` for SVG). Other codes are `moderation-blocked`, `user-error`, `quota-exceeded`, `rate-limited`, `server-error`, `timeout`, and `api-error`. Branch on `error.code` and `error.retryable` (see [Image generation](/
|
|
244
|
+
- **Structured errors.** Invalid options fail locally with `stopReason: "error"`, `error.code: "invalid-option"`, and `error.fields.field` (plus `error.fields.reason`: `required-by-api`, `rejected-by-api`, or `unsupported-by-api` for SVG). Other codes are `moderation-blocked`, `user-error`, `quota-exceeded`, `rate-limited`, `server-error`, `timeout`, and `api-error`. Branch on `error.code` and `error.retryable` (see [Image generation](/libraries/ai#image-generation)).
|
|
237
245
|
- **Displaying and saving output.** Call `image(block)` for PNG, JPEG, GIF, and WebP (never print base64 `data` via `text()` or `return`; scripts that generate images without showing any receive a note). `image()` also saves each image to a private temp file and prints its path. For SVG (`image/svg+xml`), Atomic automatically saves a private temp `.svg` file (`[SVG saved to <path> (image/svg+xml, <size>)]`), and scripts can inspect XML text via `atob(block.data)`.
|
|
238
246
|
|
|
239
247
|
```javascript
|
|
@@ -39,7 +39,7 @@ Long lines sent to a compactor wrap at 2,000 characters. Compaction resets Claud
|
|
|
39
39
|
|
|
40
40
|
## Persistence and resume
|
|
41
41
|
|
|
42
|
-
A successful compaction appends a `type: "compaction"` entry:
|
|
42
|
+
A successful compaction appends a `type: "compaction"` entry (see [`CompactionEntry`](/session-format#compactionentry)):
|
|
43
43
|
|
|
44
44
|
```json
|
|
45
45
|
{
|
|
@@ -77,7 +77,7 @@ A successful compaction appends a `type: "compaction"` entry:
|
|
|
77
77
|
| `details.history` | Boundary location in `history://sessions/<sessionId>`: `rangeUnit: "entries"`, `entriesBefore`, `boundaryEntry`, and `totalEntries` |
|
|
78
78
|
| `details.historyAccess` | `"read-search"` or `"session-history-tool"`. Resumed sessions receive `session_history` whenever `read` or `search` is absent from resumed tools |
|
|
79
79
|
| `details.stats` | Heuristic estimates: `tokensAfter` counts the system prompt and boundary message, `linesBefore` counts replaced context lines, `linesKept` counts compacted lines (`0` on a clear), and `rangeCount` is `0` |
|
|
80
|
-
| `details.backupPath` | Path to the pre-compaction backup (`<sessionFile>.<timestamp>.<label>.bak`, never auto-deleted). Populated only for JSONL stores, never SQLite, libSQL, PostgreSQL, or memory stores. |
|
|
80
|
+
| `details.backupPath` | Path to the pre-compaction backup (`<sessionFile>.<timestamp>.<label>.bak`, never auto-deleted). Populated only for JSONL stores, never SQLite, libSQL, PostgreSQL, or memory stores (see [Storage backends](/storage)). |
|
|
81
81
|
|
|
82
82
|
Only `compaction` entries with `details.strategy: "verbatim-lines"` affect active context. Resuming uses the saved boundary text directly without another model request, and messages appended after the boundary stay ordinary messages. Inactive legacy formats do not reapply historical omissions, so content they previously hid may reappear on resume.
|
|
83
83
|
|
|
@@ -137,6 +137,8 @@ atomic.on("session_compact_failed", async (event) => {
|
|
|
137
137
|
|
|
138
138
|
## SDK concurrency and message queuing
|
|
139
139
|
|
|
140
|
+
For `session.compact()` usage and return types, see [Compaction and tree navigation](/sdk#compaction-and-tree-navigation).
|
|
141
|
+
|
|
140
142
|
- **Shared manual runs.** Concurrent manual SDK `session.compact()` calls share one run and resolve to the same result. Calling `abortCompaction()` cancels the run for all waiters, or falls back to clearing context if a compactor request is already in flight.
|
|
141
143
|
- **Manual takeover.** A manual compaction request arriving during automatic compaction cancels the automatic work and its continuation, then runs once the active work settles (or follows the automatic boundary if it already committed).
|
|
142
144
|
- **Automatic continuations.** Automatic continuations, including output-cap continuations, belong to the original prompt. Both the `prompt()` promise and `agent_settled` finish only after the full continuation chain completes.
|
|
@@ -146,7 +148,7 @@ atomic.on("session_compact_failed", async (event) => {
|
|
|
146
148
|
|
|
147
149
|
## Compaction errors
|
|
148
150
|
|
|
149
|
-
|
|
151
|
+
`setCompactionModel()`, RPC `set_compaction_model`, session compaction calls, and direct `requestCompactorOutput()` calls throw subclasses of `CompactionError`. Branch on the class or `error.code`, not on the message string. Reading an invalid `compactionModel` or `compaction.reserveTokens` value from `settings.json` throws a plain `Error` instead of `CompactionConfigError`.
|
|
150
152
|
|
|
151
153
|
| Class | `code` | `retryable` | When |
|
|
152
154
|
| --- | --- | --- | --- |
|
|
@@ -215,7 +217,7 @@ path/to/changed.ts
|
|
|
215
217
|
|
|
216
218
|
### `BranchSummaryEntry` structure
|
|
217
219
|
|
|
218
|
-
`BranchSummaryEntry` is exported from `@bastani/atomic
|
|
220
|
+
`BranchSummaryEntry` is exported from `@bastani/atomic` (see [`BranchSummaryEntry`](/session-format#branchsummaryentry)). Default branch summarization stores cumulative file lists in `details`, while extensions can store custom metadata:
|
|
219
221
|
|
|
220
222
|
```typescript
|
|
221
223
|
interface BranchSummaryEntry<T = unknown> {
|
package/docs/compaction.md
CHANGED
|
@@ -35,13 +35,13 @@ A compaction boundary never lands mid-stream or between a tool call and its resu
|
|
|
35
35
|
|
|
36
36
|
When nothing new has entered context since the last boundary, compaction does nothing and `/compact` reports `Nothing to compact`. Automatic compaction also skips when the system prompt and boundary message together would reach or exceed the automatic trigger (`systemPrompt + boundary >= trigger`), letting [`fallbackModels`](/settings#fallbackmodels) handle any provider overflow.
|
|
37
37
|
|
|
38
|
-
**Pre-compaction backups (JSONL stores only).** Before writing a boundary in a JSONL session store, Atomic saves a best-effort backup alongside the session file at `<sessionFile>.<timestamp>.<label>.bak`. These backup files are not deleted automatically. If a backup cannot be written (for example on a full disk), Atomic still writes the boundary without `backupPath`. SQLite, libSQL, PostgreSQL, and in-memory stores do not write separate backup files.
|
|
38
|
+
**Pre-compaction backups (JSONL stores only).** Before writing a boundary in a JSONL session store, Atomic saves a best-effort backup alongside the session file at `<sessionFile>.<timestamp>.<label>.bak`. These backup files are not deleted automatically. If a backup cannot be written (for example on a full disk), Atomic still writes the boundary without `backupPath`. SQLite, libSQL, PostgreSQL, and in-memory stores do not write separate backup files (see [Storage backends](/storage)).
|
|
39
39
|
|
|
40
40
|
**Cancellation and queuing.** Pressing `Escape` cancels compaction before the boundary commits and leaves the session unchanged. If a compactor request is already running, `Escape` stops that request and clears the context instead. Queued user messages wait in arrival order and resume automatically once compaction ends.
|
|
41
41
|
|
|
42
42
|
Automatic continuations remain part of the original prompt until the chain finishes, so status monitors such as [Herdr](/herdr) stay active across continuations. In the TUI, `/compact` takes over automatic compaction, refuses a second manual compaction or branch summary, lets non-prompt commands (`/settings`, `/tasks`) run immediately, and lets session-switching commands (`/new`) cancel compaction immediately.
|
|
43
43
|
|
|
44
|
-
For SDK concurrency, `abortCompaction()`, message queuing callbacks, and turn hooks during compaction, see [SDK concurrency and message queuing](/compaction/reference#sdk-concurrency-and-message-queuing).
|
|
44
|
+
For SDK compaction calls, concurrency, `abortCompaction()`, message queuing callbacks, and turn hooks during compaction, see [Compaction and tree navigation](/sdk#compaction-and-tree-navigation) and [SDK concurrency and message queuing](/compaction/reference#sdk-concurrency-and-message-queuing).
|
|
45
45
|
|
|
46
46
|
### Compaction instructions
|
|
47
47
|
|
|
@@ -233,7 +233,7 @@ Omitted entries do not count toward compaction or token estimates, and usage fro
|
|
|
233
233
|
|
|
234
234
|
## Branch summaries
|
|
235
235
|
|
|
236
|
-
When `/tree` switches away from a branch, Atomic can optionally summarize the abandoned branch and attach that summary at the new position. This preserves work from the path you left without replaying the entire branch.
|
|
236
|
+
When [`/tree`](/sessions#branching-with-tree) switches away from a branch, Atomic can optionally summarize the abandoned branch and attach that summary at the new position. This preserves work from the path you left without replaying the entire branch.
|
|
237
237
|
|
|
238
238
|
When prompted, choose one of three options:
|
|
239
239
|
|
package/docs/containerization.md
CHANGED
|
@@ -19,7 +19,7 @@ Containerization is the outer boundary, not the only one. Read [Security and pro
|
|
|
19
19
|
| Docker | Whole `atomic` process in a local container | Simple local isolation | Provider API keys enter the container. |
|
|
20
20
|
| NVIDIA OpenShell | Whole `atomic` process in a policy-controlled sandbox | Local or remote managed sandboxes with upstream credential injection | Requires an OpenShell gateway. |
|
|
21
21
|
|
|
22
|
-
Extensions run wherever the `atomic` process runs. If you run host `atomic` with a tool-routing extension, other loaded extensions still run on your host unless they also route their work into the VM.
|
|
22
|
+
Extensions run wherever the `atomic` process runs. If you run host `atomic` with a tool-routing extension, other loaded extensions still run on your host unless they also route their work into the VM. To route built-in file tools and `!` commands to a remote machine over SSH instead of a local micro-VM, see `examples/extensions/ssh.ts` in [Extension examples](/extensions/examples#remote-execution-and-sandboxes).
|
|
23
23
|
|
|
24
24
|
## Gondolin micro-VM
|
|
25
25
|
|
|
@@ -56,7 +56,7 @@ To expose only the routed built-in tools in a session:
|
|
|
56
56
|
atomic --tools read,write,edit,bash,find,ls -e ~/.local/share/atomic-gondolin
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
`ls` is a built-in tool that is off by default unless listed. Restricting `--tools` to this allowlist also disables `intercom`, `subagent`, and other extension tools; MCP tools stay hidden unless a `mcp__*` pattern is listed. Other loaded host extensions can still run code on the host, so use whole-process isolation when host filesystem access must be prevented completely.
|
|
59
|
+
`ls` is a built-in tool that is off by default unless listed. Restricting [`--tools`](/reference/cli#tool-options) to this allowlist also disables `intercom`, `subagent`, and other extension tools; MCP tools stay hidden unless a `mcp__*` pattern is listed. Other loaded host extensions can still run code on the host, so use whole-process isolation when host filesystem access must be prevented completely.
|
|
60
60
|
|
|
61
61
|
**Requirements:** npm to install dependencies, Node.js 23.6.0 or newer for `@earendil-works/gondolin`, and QEMU installed through your system package manager.
|
|
62
62
|
|
|
@@ -95,6 +95,8 @@ ENTRYPOINT ["atomic"]
|
|
|
95
95
|
|
|
96
96
|
The archive installer unpacks a self-contained bundle with no JavaScript runtime required. If you adapt this Dockerfile to a smaller base image, make sure `install.sh` has `uname`, `tar` with `gzip`, core file utilities (`mkdir`, `mv`, `chmod`, `ln`, `rm`, `rmdir`), `curl` or `wget`, `sha256sum` (or `shasum` or `openssl`), and `ldd` on non-Alpine Linux. `debian:bookworm-slim` already includes these tools.
|
|
97
97
|
|
|
98
|
+
For Alpine Linux (`musl`), `install.sh` detects `/etc/alpine-release` and downloads the musl release archive (`atomic-linux-x64-musl.tar.gz` or `atomic-linux-arm64-musl.tar.gz`). Those archives bundle `libgcc` and `libstdc++`, so stock Alpine needs no extra C++ runtime libraries; install `bash`, `ca-certificates`, `curl`, `git`, and `ripgrep` for the installer and built-in tools. See [Alpine and musl Linux archives](/getting-started/installation#alpine-and-musl-linux-archives).
|
|
99
|
+
|
|
98
100
|
Build and run the container:
|
|
99
101
|
|
|
100
102
|
```bash
|
|
@@ -117,11 +119,17 @@ If you mount only `/root/.atomic/agent`, setting `ATOMIC_CODING_AGENT_DIR=/root/
|
|
|
117
119
|
|
|
118
120
|
When mounting only `/root/.atomic/agent`, persist sessions with one of these options:
|
|
119
121
|
|
|
120
|
-
- Pass `--session-store /root/.atomic/agent/journal.sqlite
|
|
121
|
-
- Set `ATOMIC_CODING_AGENT_DIR` to a non-default subdirectory inside the volume, such as `/root/.atomic/agent/state`, so Atomic stores sessions at `/root/.atomic/agent/state/workflows/journal.sqlite`.
|
|
122
|
+
- Pass `--session-store /root/.atomic/agent/journal.sqlite`, or set `ATOMIC_STORAGE` or `ATOMIC_SESSIONS_STORAGE` to point inside `/root/.atomic/agent` ([Selecting storage per process](/storage#selecting-storage-per-process)).
|
|
123
|
+
- Set [`ATOMIC_CODING_AGENT_DIR`](/environment-variables) to a non-default subdirectory inside the volume, such as `/root/.atomic/agent/state`, so Atomic stores sessions at `/root/.atomic/agent/state/workflows/journal.sqlite`.
|
|
122
124
|
- Mount `/root/.atomic` instead of only `/root/.atomic/agent`.
|
|
123
125
|
|
|
124
|
-
|
|
126
|
+
Do not bind-mount your host `~/.atomic` or `~/.atomic/agent` into a running container. Beyond exposing host credentials, settings, and sessions, OS file locks on `settings.json`, `auth.json`, `trust.json`, and session claims do not coordinate safely across a host path and a container mount of the same directory ([Locks in the agent directory](/storage#locks-in-the-agent-directory)). Give each container its own agent directory and share sessions through a remote database instead ([Sharing storage across hosts](/storage#sharing-storage-across-hosts), [SDK storage](/sdk/storage)).
|
|
127
|
+
|
|
128
|
+
### Container runtime, network, and CI options
|
|
129
|
+
|
|
130
|
+
- **Memory and cgroup controls.** For npm and Node.js installs, Atomic sizes the Node.js heap automatically to half of the container's cgroup memory limit when that exceeds Node's default; override with `ATOMIC_HEAP_MB` (`0` keeps Node's default). On Linux with a user-owned cgroup v2 hierarchy, Atomic also uses cgroups to contain background shell process trees; set `ATOMIC_TASK_CGROUP=0` if container cgroup policies block it ([Background tasks](/background-tasks#lifetime-retention-and-cleanup), [Environment variables](/environment-variables#diagnostics-and-performance)).
|
|
131
|
+
- **Restricted networks, proxies, and private CAs.** Pass `--offline` or set `ATOMIC_OFFLINE=1` in restricted-egress containers to disable automatic update checks, telemetry, and binary downloads. Configure `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` (or `httpProxy` in [Network proxy settings](/settings#network-proxy)), point `NODE_EXTRA_CA_CERTS` at private CA bundles ([Environment variables](/environment-variables#tls-certificates)), and set `ATOMIC_ALLOW_PRIVATE_URL_READS=1` only if `read` needs to reach container-local services. For PostgreSQL over an HTTP `CONNECT` proxy, see [Through an HTTP proxy](/storage#through-an-http-proxy).
|
|
132
|
+
- **Unattended and CI containers.** For headless runs without `-it`, use print mode (`-p`), `--mode json`, or `--mode rpc`, and combine `--no-session` (or shared storage) with explicit `--approve` or `--no-approve` trust flags ([Non-interactive usage](/guides/non-interactive)). In CI or multi-container runs, set `ATOMIC_PROFILE=ci` with `ATOMIC_TEAM_*` variables ([Team and CI setup](/guides/team-setup#ci-and-swarms)), and use `.atomic/blueprint.yaml` with `atomic blueprint prebuild` to pre-install project dependencies and warm caches ([Resume on any machine](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint)).
|
|
125
133
|
|
|
126
134
|
## NVIDIA OpenShell
|
|
127
135
|
|
|
@@ -6,7 +6,7 @@ description: "TypeScript interfaces and methods for registerProvider(), register
|
|
|
6
6
|
|
|
7
7
|
## Extension methods
|
|
8
8
|
|
|
9
|
-
Extensions register, alias, and unregister providers through `ExtensionAPI
|
|
9
|
+
Extensions register, alias, and unregister providers through `ExtensionAPI` (including inline `extensionFactories` in SDK hosts; see [SDK extensions](/sdk/reference#extensions)):
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
interface ExtensionAPI {
|
|
@@ -36,7 +36,7 @@ interface ProviderConfig {
|
|
|
36
36
|
/** Optional API key literal or config value ("$ENV_VAR", "${ENV_VAR}", or "!command"). Omitting it lets users authenticate via /login <provider> in auth.json. */
|
|
37
37
|
apiKey?: string;
|
|
38
38
|
|
|
39
|
-
/** Default
|
|
39
|
+
/** Default API for chat and compactor models. Required at provider level when supplying streamSimple, and at provider or model level when defining chat or compactor models. */
|
|
40
40
|
api?: Api;
|
|
41
41
|
|
|
42
42
|
/** Custom streaming implementation for non-standard chat APIs. */
|
|
@@ -58,7 +58,7 @@ interface ProviderConfig {
|
|
|
58
58
|
/** When true, sends Authorization: Bearer <apiKey>. Fails if no API key resolves. */
|
|
59
59
|
authHeader?: boolean;
|
|
60
60
|
|
|
61
|
-
/** Models to register. Replaces all existing chat, image, and
|
|
61
|
+
/** Models to register. Replaces all existing chat, image, classifier, and compactor models for this provider. */
|
|
62
62
|
models?: ProviderModelConfig[];
|
|
63
63
|
|
|
64
64
|
/** Refresh this provider's catalog. Returned definitions replace extension-provided models. */
|
|
@@ -72,7 +72,7 @@ interface ProviderConfig {
|
|
|
72
72
|
login(callbacks: OAuthLoginCallbacks, signal: AbortSignal): Promise<OAuthCredentials>;
|
|
73
73
|
refreshToken(credentials: OAuthCredentials, signal: AbortSignal): Promise<OAuthCredentials>;
|
|
74
74
|
getApiKey(credentials: OAuthCredentials): string;
|
|
75
|
-
/** Adjust chat models based on credentials (image and
|
|
75
|
+
/** Adjust chat models based on credentials (image, classifier, and compactor models pass through unchanged). */
|
|
76
76
|
modifyModels?(models: Model<Api>[], credentials: OAuthCredentials): Model<Api>[];
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -80,7 +80,7 @@ interface ProviderConfig {
|
|
|
80
80
|
|
|
81
81
|
## Model definition reference
|
|
82
82
|
|
|
83
|
-
`ProviderModelConfig` is a discriminated union of chat (`type?: "chat"`), image (`type: "image"`),
|
|
83
|
+
`ProviderModelConfig` is a discriminated union of chat (`type?: "chat"`), image (`type: "image"`), classifier (`type: "classifier"`), and compactor (`type: "compactor"`) model definitions:
|
|
84
84
|
|
|
85
85
|
```typescript
|
|
86
86
|
interface ProviderModelConfigBase {
|
|
@@ -179,13 +179,15 @@ type ProviderModelConfig =
|
|
|
179
179
|
| ProviderCompactorModelConfig;
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
+
For how Atomic sends requests to `ProviderCompactorModelConfig` endpoints, see [Compactor request contract](/compaction/reference#compactor-request-contract).
|
|
183
|
+
|
|
182
184
|
### Cost and pricing tiers
|
|
183
185
|
|
|
184
186
|
`cost` matches `Model<Api>["cost"]`. Base rates and every tier must specify all four fields (`input`, `output`, `cacheRead`, and `cacheWrite`). When multiple thresholds match `input + cacheRead + cacheWrite`, `calculateCost()` applies the highest matching tier to all four buckets.
|
|
185
187
|
|
|
186
188
|
### Compatibility and capability flags
|
|
187
189
|
|
|
188
|
-
For the complete list of per-API `compat` fields (`thinkingFormat`, `chatTemplateKwargs`, `chatTemplateArgs`, `thinkingTokenBudgetField`, `vllmPriority`, `cacheControlFormat`, `supportsToolSearch`, `supportsAdditionalTools`, `supportsExplicitPromptCacheMode`, `supportsMidConvoEffort`, and more), see [`models.json`
|
|
190
|
+
For the complete list of per-API `compat` fields (`thinkingFormat`, `chatTemplateKwargs`, `chatTemplateArgs`, `thinkingTokenBudgetField`, `vllmPriority`, `cacheControlFormat`, `supportsToolSearch`, `supportsAdditionalTools`, `supportsExplicitPromptCacheMode`, `supportsMidConvoEffort`, and more), see [`models.json` field reference](/models-configuration#compatibility).
|
|
189
191
|
|
|
190
192
|
Keep these rules in mind when declaring capabilities on custom providers:
|
|
191
193
|
|
|
@@ -57,7 +57,7 @@ await atomic.registerProvider("corporate-ai", {
|
|
|
57
57
|
return credentials.access;
|
|
58
58
|
},
|
|
59
59
|
|
|
60
|
-
// Optional: adjust chat models based on the user's token (image and
|
|
60
|
+
// Optional: adjust chat models based on the user's token (image, classifier, and compactor models pass through unchanged)
|
|
61
61
|
modifyModels(models, credentials) {
|
|
62
62
|
const region = decodeRegionFromToken(credentials.access);
|
|
63
63
|
return models.map((model) => ({
|
|
@@ -69,9 +69,9 @@ await atomic.registerProvider("corporate-ai", {
|
|
|
69
69
|
});
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Users can then sign in with `/login corporate-ai`.
|
|
72
|
+
Users can then sign in with `/login corporate-ai`. Note that shell [`atomic auth login`](/reference/cli#credential-commands) does not load extensions; use interactive `/login` for extension providers.
|
|
73
73
|
|
|
74
|
-
Refresh and callback behavior:
|
|
74
|
+
Refresh and callback behavior (see also [Token refresh](/providers#token-refresh) and [Credential resolution order](/providers/reference#resolution-order)):
|
|
75
75
|
|
|
76
76
|
- **Refresh timing and locking.** Atomic refreshes stored OAuth tokens when fewer than **5 minutes** of validity remain and serializes concurrent refreshes across sessions under a credential lock held for up to **2 minutes**. Catalog refreshes wait up to **60 seconds**, while chat requests allow **15 seconds** for pre-request authentication preparation. Atomic never aborts the `signal` passed to `refreshToken` on caller timeout because the provider may have already rotated the refresh token; a late response still saves, and normal exit waits up to **3 seconds** for it. Do not add a shorter abort timeout to your token refresh call.
|
|
77
77
|
- **Callback isolation.** Always use the provided callbacks for user prompts and notices instead of reading stdin or writing directly to stdout or stderr, because login callbacks may run in a separate background process.
|
|
@@ -141,7 +141,7 @@ await atomic.registerProvider("corporate-ai", {
|
|
|
141
141
|
});
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
- **Config-object registration (`registerProvider(id, config)`):** `refreshModels(context)` returns `ProviderModelConfig[]` definitions (chat, image, or
|
|
144
|
+
- **Config-object registration (`registerProvider(id, config)`):** `refreshModels(context)` returns `ProviderModelConfig[]` definitions (chat, image, classifier, or compactor) that replace that registration's live models. When `allowNetwork` is `false` (offline or cache-only startup restore), return cached models to populate initial availability without making network requests.
|
|
145
145
|
- **Native `Provider` registration (`registerProvider(provider)`):** `refreshModels(context)` calls `await context.publish({ persist, update })` to persist an optional `ModelsStoreEntry` in `models-store.json` and install provider-owned state, then exposes the latest models from `getModels()` (or `getAllModels()` for mixed-operation providers).
|
|
146
146
|
|
|
147
147
|
The existing catalog stays usable while a refresh runs. Each provider's refresh settles independently; if one fails, times out, or sees an aborted `signal`, it keeps its previous list. For all `RefreshModelsContext` fields (`credential`, `stored`, `publish`, `allowNetwork`, `force`, `signal`, `baseUrl`, and `updateCredential`), see [`RefreshModelsContext`](/custom-provider/api-reference#refreshmodelscontext).
|
|
@@ -65,9 +65,9 @@ await atomic.registerProvider("my-llm", {
|
|
|
65
65
|
});
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Providing `models` replaces all existing chat, image, and
|
|
68
|
+
Providing `models` replaces all existing chat, image, classifier, and compactor models for that provider. Omitting `type` registers a chat model; image and classifier models require `type: "image"` or `type: "classifier"` plus handlers in `images` or `classifiers`; compactor models use `type: "compactor"` (`ProviderCompactorModelConfig`, see [Compactor request contract](/compaction/reference#compactor-request-contract)). See the [mixed-operation provider example](/custom-provider#mixed-operation-providers).
|
|
69
69
|
|
|
70
|
-
Registered providers appear in `/login` like built-in providers: `/login my-llm` prompts for an API key and stores it in `auth.json`, and the selector shows configured status (such as `✓ env: MY_LLM_API_KEY`). Once configured, `/model` lists its models; without credentials, selecting one reports `No API key found for my-llm` with the `/login` hint.
|
|
70
|
+
Registered providers appear in `/login` like built-in providers: `/login my-llm` prompts for an API key and stores it in `auth.json`, and the selector shows configured status (such as `✓ env: MY_LLM_API_KEY`). See [Credential resolution order](/providers/reference#resolution-order) for how stored keys, extension `apiKey`, and environment variables interact. Once configured, `/model` lists its models; without credentials, selecting one reports `No API key found for my-llm` with the `/login` hint.
|
|
71
71
|
|
|
72
72
|
### API types
|
|
73
73
|
|
|
@@ -86,7 +86,7 @@ The `api` field selects the built-in chat streaming implementation:
|
|
|
86
86
|
| `bedrock-converse-stream` | Amazon Bedrock Converse API |
|
|
87
87
|
| `pi-messages` | Custom gateways speaking the `pi-messages` protocol |
|
|
88
88
|
|
|
89
|
-
Image (`images`) and classifier (`classifiers`) handlers use their own operation-specific `api` keys independent of this chat streaming table.
|
|
89
|
+
Image (`images`) and classifier (`classifiers`) handlers use their own operation-specific `api` keys independent of this chat streaming table. Compactor models (`type: "compactor"`) declare a compactor `api` string at model or provider level and follow the [Compactor request contract](/compaction/reference#compactor-request-contract).
|
|
90
90
|
|
|
91
91
|
Most OpenAI-compatible servers use `openai-completions`. Configure model-specific thinking controls with `thinkingLevelMap` and endpoint quirks with `compat`:
|
|
92
92
|
|
package/docs/custom-provider.md
CHANGED
|
@@ -9,9 +9,9 @@ Extensions can register custom model providers with `atomic.registerProvider()`,
|
|
|
9
9
|
- **Proxies:** Route requests through corporate proxies or API gateways.
|
|
10
10
|
- **Custom endpoints:** Connect self-hosted or private model deployments.
|
|
11
11
|
- **OAuth and SSO:** Add custom login flows for enterprise providers.
|
|
12
|
-
- **Custom APIs:** Implement streaming, image generation, or
|
|
12
|
+
- **Custom APIs:** Implement streaming, image generation, classification, or remote compaction for non-standard APIs.
|
|
13
13
|
|
|
14
|
-
If you only need to add models for an API Atomic already supports, use [Configure custom models](/models) instead.
|
|
14
|
+
If you only need to add chat or compactor models for an API Atomic already supports, use [Configure custom models](/models) instead. SDK hosts can also register providers inline through `extensionFactories`; see [SDK extensions](/sdk/reference#extensions).
|
|
15
15
|
|
|
16
16
|
## Where to go next
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ Start with the quick reference below, then use the focused guides for your scena
|
|
|
21
21
|
- [Register a custom provider](/custom-provider/registration): add static or dynamically discovered models, choose a streaming API, set up [multi-account aliases](/custom-provider/registration#multiple-accounts-for-one-provider), or unregister providers.
|
|
22
22
|
- [Add OAuth login to a provider](/custom-provider/oauth): implement login callbacks, credential storage, rejected-login handling, and dynamic catalog refresh.
|
|
23
23
|
- [Implement provider streaming](/custom-provider/streaming): build a custom `streamSimple` handler with stream events, tool calls, stop reasons, and cost calculation.
|
|
24
|
-
- [Custom provider API reference](/custom-provider/api-reference): TypeScript interfaces for `ProviderConfig`, `ProviderModelConfig`, `ProviderAliasConfig`, `RefreshModelsContext`, and native `Provider` registrations.
|
|
24
|
+
- [Custom provider API reference](/custom-provider/api-reference): TypeScript interfaces for `ProviderConfig`, `ProviderModelConfig`, `ProviderCompactorModelConfig`, `ProviderAliasConfig`, `RefreshModelsContext`, and native `Provider` registrations.
|
|
25
25
|
|
|
26
26
|
## Example extensions
|
|
27
27
|
|
|
@@ -67,13 +67,13 @@ export default async function (atomic: ExtensionAPI) {
|
|
|
67
67
|
- **Await registration inside the extension factory.** For dynamic model discovery, fetch and register models inside the async extension factory rather than `session_start`. Atomic waits for the factory before startup completes, making the provider available at interactive startup and in `atomic --list-models`.
|
|
68
68
|
- **Two `registerProvider` overloads.** Pass `(id, config)` for config-object registration, or pass a native `Provider` instance from `@bastani/atomic-ai` (`await atomic.registerProvider(provider)`) for full control over auth, filtering, and catalog persistence. See [Custom provider API reference](/custom-provider/api-reference).
|
|
69
69
|
- **Repeated registrations merge defined fields.** Calling `atomic.registerProvider(id, config)` again for the same `id` merges defined fields over the previous registration while keeping `undefined` fields intact, except when registering or replacing an alias (`aliasOf`), which resets the previous registration.
|
|
70
|
-
- **Interaction with `models.json
|
|
71
|
-
- **Partial vs full model registration.** Passing only `baseUrl` or `headers` for an existing provider keeps its built-in models. Supplying `models` replaces that provider's models across chat, image, and
|
|
72
|
-
- **Required fields.** When defining `models`, `baseUrl` is required at provider or model level (unless overriding a built-in provider that already has one), and `api` is required at model level (or provider level for chat models) unless overriding a built-in provider that supplies defaults. When supplying `streamSimple`, `api` is required at provider level. Every model requires `id`, `name`, `input`, and `cost`; chat and classifier models require `contextWindow`; chat models also require `maxTokens` and `reasoning`; image models require `output
|
|
70
|
+
- **Interaction with `models.json` and credentials.** Extension `headers` merge over `models.json` `headers` (extension values win on key collision). `models.json` `modelOverrides` still apply on top of extension-registered chat and compactor models. See [Credential resolution order](/providers/reference#resolution-order) for how extension `apiKey` interacts with `auth.json` and environment variables.
|
|
71
|
+
- **Partial vs full model registration.** Passing only `baseUrl` or `headers` for an existing provider keeps its built-in models. Supplying `models` replaces that provider's models across chat, image, classifier, and compactor operations.
|
|
72
|
+
- **Required fields.** When defining `models`, `baseUrl` is required at provider or model level (unless overriding a built-in provider that already has one), and `api` is required at model level (or provider level for chat and compactor models) unless overriding a built-in provider that supplies defaults. When supplying `streamSimple`, `api` is required at provider level. Every model requires `id`, `name`, `input`, and `cost`; chat and classifier models require `contextWindow`; chat models also require `maxTokens` and `reasoning`; image models require `output`; compactor models (`type: "compactor"`, `ProviderCompactorModelConfig`) accept optional `endpointPath`, `compactionParams`, `timeoutMs`, and `maxTokens` (see [Compactor request contract](/compaction/reference#compactor-request-contract)).
|
|
73
73
|
|
|
74
74
|
### Mixed-operation providers
|
|
75
75
|
|
|
76
|
-
An omitted `type` defaults to `"chat"`. Image and classifier entries require explicit `type` discriminants and matching handlers in `images` or `classifiers` keyed by each model's `api
|
|
76
|
+
An omitted `type` defaults to `"chat"`. Image and classifier entries require explicit `type` discriminants and matching handlers in `images` or `classifiers` keyed by each model's `api`. Compactor entries use `type: "compactor"` and follow the HTTP [compactor request contract](/compaction/reference#compactor-request-contract):
|
|
77
77
|
|
|
78
78
|
```typescript
|
|
79
79
|
await atomic.registerProvider("media-tools", {
|
|
@@ -109,7 +109,7 @@ await atomic.registerProvider("media-tools", {
|
|
|
109
109
|
});
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Model-level `baseUrl` overrides the provider endpoint. Equal model IDs across different operations (chat, image, classifier) stay distinct, including model-specific headers.
|
|
112
|
+
Model-level `baseUrl` overrides the provider endpoint. Equal model IDs across different operations (chat, image, classifier, compactor) stay distinct, including model-specific headers.
|
|
113
113
|
|
|
114
114
|
## Testing your implementation
|
|
115
115
|
|