@bastani/atomic 0.10.17 → 0.10.18
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 +63 -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 +6 -6
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +16 -4
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +16 -9
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p0-cli-BB45ZQY6.js +1 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +4 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/sdk-OHKMDJ74.js +18 -15
- package/dist/_shared/sdk-OHKMDJ74.js.map +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-ERMIDHQT.js → startup-0-0-OV6RAEAP.js} +338 -75
- package/dist/_shared/startup-0-0-OV6RAEAP.js.map +1 -0
- package/dist/_shared/{startup-0-1-RTASI3HG.js → startup-0-1-EZAJI6RE.js} +82 -5
- package/dist/_shared/startup-0-1-EZAJI6RE.js.map +1 -0
- package/dist/_shared/startup-0-2-YZZOC22D.js +4 -4
- package/dist/_shared/startup-0-3-DE2NCS6A.js +4 -4
- package/dist/_shared/startup-0-4-ZMJV547D.js +12 -7
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
- package/dist/_shared/startup-0-5-HZX3ZPTP.js +41 -12
- package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +2 -2
- package/dist/_shared/startup-15-0-YUKGAC63.js +2 -2
- package/dist/_shared/startup-15-1-4S7FLMNG.js +261 -75
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +23 -8
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +328 -19
- package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +74 -10
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/storage-status-K7PX2RXA.js +2 -2
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/team-DOQKICG2.js +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +158 -78
- package/dist/builtin/intercom/broker/multinode-router.ts +41 -8
- package/dist/builtin/intercom/broker/multinode-state-store.ts +6 -1
- package/dist/builtin/intercom/broker/sql-lease-store.ts +89 -80
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +65 -6
- 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/args.js +2 -2
- package/dist/cli/auth-cli.code.js +2 -2
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +1 -1
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +2 -2
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +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/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +2 -2
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-append-recovery.d.ts +3 -3
- package/dist/core/session-manager-core.d.ts +1 -1
- package/dist/core/session-manager-core.js +14 -13
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/database.d.ts +6 -2
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/errors.d.ts +8 -5
- package/dist/core/storage/errors.js +5 -3
- package/dist/core/storage/errors.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +15 -0
- package/dist/core/storage/fenced-paths.js +25 -0
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/migrations.d.ts +2 -11
- package/dist/core/storage/migrations.js +2 -9
- package/dist/core/storage/migrations.js.map +1 -1
- 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/postgres-locks.d.ts +11 -0
- package/dist/core/storage/postgres-locks.js +9 -0
- package/dist/core/storage/postgres-locks.js.map +1 -0
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +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 +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.d.ts +1 -0
- 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.d.ts +1 -0
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +2 -2
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/session-summary.d.ts +9 -1
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.d.ts +2 -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/session/types.d.ts +1 -0
- package/dist/core/storage/sqlite-facade.js +12 -5
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- 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/heartbeat-notice.d.ts +0 -1
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +3 -3
- 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/history-session.d.ts +1 -1
- package/dist/core/tools/output-accumulator.d.ts +3 -0
- package/dist/core/tools/read-url.code.js +2 -2
- 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.d.ts +14 -16
- package/dist/core/worktree-snapshot/blob-store.js +194 -81
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/collection-claim.js +8 -0
- package/dist/core/worktree-snapshot/collection-claim.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/core/worktree-snapshot/snapshot-epoch-migration.js +209 -0
- package/dist/core/worktree-snapshot/snapshot-epoch-migration.js.map +1 -0
- package/dist/core/worktree-snapshot/snapshot-epoch.js +100 -0
- package/dist/core/worktree-snapshot/snapshot-epoch.js.map +1 -0
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +1 -1
- 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.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- 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/interactive/interactive-mode-helpers.d.ts +8 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +21 -0
- package/dist/modes/interactive-engine/protocol.d.ts +6 -0
- package/dist/modes/rpc/rpc-client.d.ts +2 -0
- package/dist/package-manager-cli.code.js +4 -4
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/4.js +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
- package/dist/utils/interactive-engine-env.d.ts +2 -0
- package/dist/utils/startup-database-spare.code.js +2 -2
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +1 -1
- package/docs/background-tasks.md +1 -1
- package/docs/changelog.mdx +18 -1
- package/docs/guides/resume-on-any-machine.md +1 -1
- package/docs/reference/cli.md +4 -3
- package/docs/sdk.md +2 -1
- package/docs/sessions.md +5 -2
- package/docs/settings.md +1 -0
- package/docs/storage/custom-adapters.md +1 -1
- package/docs/storage/postgres/pgbouncer.md +3 -1
- package/docs/storage/postgres/tuning.md +2 -0
- package/docs/storage/postgres.md +58 -7
- package/docs/storage.md +4 -2
- package/docs/tools.md +1 -0
- package/docs/worktree-snapshots/reference.md +1 -1
- package/package.json +8 -8
- package/dist/_shared/startup-0-0-ERMIDHQT.js.map +0 -1
- package/dist/_shared/startup-0-1-RTASI3HG.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { parseArgs } from "../_shared/startup-0-1-
|
|
4
|
+
import { parseArgs } from "../_shared/startup-0-1-EZAJI6RE.js";
|
|
5
5
|
import { CONFIG_DIR_NAME, ENV_AGENT_DIR, INTERACTIVE_ENGINE_PREWARM_NO_DATABASE, getEnvNames, isPlainInteractiveSessionInvocation, normalizePath, stripBom } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
6
6
|
import { parseConfigCommand } from "../_shared/config-command-parser-XRBNVMBV.js";
|
|
7
7
|
import { previewProcessStorageSelection, previewSessionSettingSelection } from "../_shared/startup-0-2-YZZOC22D.js";
|
|
8
|
-
import { parsePackageCommand } from "../_shared/startup-0-0-
|
|
8
|
+
import { parsePackageCommand } from "../_shared/startup-0-0-OV6RAEAP.js";
|
|
9
9
|
// dist/utils/startup-database-spare.js
|
|
10
10
|
const DIRECT_SUBCOMMANDS = /* @__PURE__ */ new Set([
|
|
11
11
|
"auth",
|
|
@@ -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.
|
|
9
|
+
const key = `${root.href}#0.10.18`;
|
|
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.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.18") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.18 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.
|
|
9
|
+
const key = `${root.href}#0.10.18`;
|
|
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.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.18") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.18 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
export { GIT_RELEASE, detectLinuxLibc, ensureTool, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getToolEnv, getToolPath, parseGitVersion, plainStatMtimeMs, resetGitProvisionStateForTest, resolveGit, resolveGitSync, resolveInstalledGit, withGitProvisionSettingsForTest } from "../_shared/startup-0-1-
|
|
2
|
+
export { GIT_RELEASE, detectLinuxLibc, ensureTool, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getToolEnv, getToolPath, parseGitVersion, plainStatMtimeMs, resetGitProvisionStateForTest, resolveGit, resolveGitSync, resolveInstalledGit, withGitProvisionSettingsForTest } from "../_shared/startup-0-1-EZAJI6RE.js";
|
|
3
3
|
//# sourceMappingURL=tools-manager.code.js.map
|
|
@@ -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.
|
|
9
|
+
const key = `${root.href}#0.10.18`;
|
|
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.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.18") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.18 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.
|
|
9
|
+
const key = `${root.href}#0.10.18`;
|
|
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.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.18") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.18 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -94,7 +94,7 @@ Extensions can contribute custom rows to the agent panel and `/tasks` via [`atom
|
|
|
94
94
|
- **Eligible states.** Only **running** shells and subagents emit heartbeats. Queued, stopping, completed, failed, killed, paused, quit, and `history://` tasks never emit heartbeats.
|
|
95
95
|
- **Cadence rules.** The interval (`heartbeatMs`, default `tasks.heartbeatMs` = `900000` ms / 15 minutes; `0` disables; minimum `60000` ms) counts from when the task started running. In parallel `subagent` calls, a per-task `heartbeatMs` overrides the top-level value. Resumed subagents keep their original launch's `heartbeatMs` (falling back to the chat default only if omitted originally).
|
|
96
96
|
- **Shell sampling.** Shell output is sampled every **30 seconds** from the trailing **2 KiB** of output, reporting total output size, time since last output, and up to **6** non-empty trailing lines (each capped at **160 characters**).
|
|
97
|
-
- **Subagent fields.** Subagent heartbeats report agent name, elapsed time, time since last activity, current or last tool call, turn count, tool-call count,
|
|
97
|
+
- **Subagent fields.** Subagent heartbeats report agent name, elapsed time, time since last activity, current or last tool call, turn count, tool-call count, **active model** (and fallback mismatch `model <ran>, not the requested <requested>` when fallback occurred), and attention states (`input-needed` or `no recent activity`).
|
|
98
98
|
- **Batching and caps.** Tasks coming due within `min(1 minute, cadence / 4)` share one heartbeat (for example, 15 seconds on a 1-minute cadence). One heartbeat describes up to **8** tasks in full, lists up to **20** more by name, and summarizes any beyond 28 as `; and N more`. In chat, a collapsed heartbeat card lists up to 5 tasks and counts the rest.
|
|
99
99
|
- **Backpressure and idle wake.** Each chat holds at most **1** unread heartbeat. While an unread heartbeat waits, due tasks recheck every **30 seconds**; missed intervals never stack or replay. Heartbeats queue without interrupting streaming text and wake an idle chat (including after an `Esc` interrupt) unless `tasks.heartbeatWakesIdleSession` is `false` or you queued a draft and interrupted with `Ctrl+C`. Heartbeats also yield an active `action: "wait"` call while the task continues.
|
|
100
100
|
- **Routing.** Subagent-launched shells are managed by the launching main session, so their heartbeats go to the main session.
|
package/docs/background-tasks.md
CHANGED
|
@@ -162,7 +162,7 @@ Run `/tasks` (or `/tasks <id>`) to view all running and recent subagents and mai
|
|
|
162
162
|
|
|
163
163
|
## Task heartbeats
|
|
164
164
|
|
|
165
|
-
Running shells and subagents send a periodic heartbeat to the launching chat every 15 minutes by default. A heartbeat is a routine status check, never a failure signal or stop trigger: press `Ctrl+O` on a heartbeat card to expand recent shell lines or subagent
|
|
165
|
+
Running shells and subagents send a periodic heartbeat to the launching chat every 15 minutes by default. A heartbeat is a routine status check, never a failure signal or stop trigger: press `Ctrl+O` on a heartbeat card to expand recent shell lines or subagent status (elapsed time, last activity, current or last tool, turns, tool calls, and model).
|
|
166
166
|
|
|
167
167
|
Override the interval per call with `heartbeatMs` (`0` disables; minimum `60000` ms / 1 minute):
|
|
168
168
|
|
package/docs/changelog.mdx
CHANGED
|
@@ -10,7 +10,24 @@ description: "What's new in Atomic"
|
|
|
10
10
|
After each release, the publish-release skill regenerates this page in its own docs PR.
|
|
11
11
|
*/}
|
|
12
12
|
|
|
13
|
-
<Update label="November 28, 2026" description="0.10.
|
|
13
|
+
<Update label="November 28, 2026" description="0.10.18-alpha.1">
|
|
14
|
+
|
|
15
|
+
Atomic makes it easier to resume the right session, keeps live sessions open through PostgreSQL stalls, and makes terminal output easier to read.
|
|
16
|
+
|
|
17
|
+
**Sessions and storage**
|
|
18
|
+
|
|
19
|
+
- **Resume the right conversation.** `atomic --continue` prefers a conversation you can pick up over a newer empty session. The resume command follows the session you switched to, and you can continue in another folder if the original is gone ([#6828](https://github.com/bastani-inc/atomic/pull/6828)).
|
|
20
|
+
- **Keep working through PostgreSQL stalls.** A stalled database call no longer ends a live session. Atomic tells you it’s waiting and retries pending saves in order, including subagent records ([#6830](https://github.com/bastani-inc/atomic/pull/6830)).
|
|
21
|
+
- **Treat PostgreSQL timeouts as failures.** Once a call times out, a late reply cannot turn it into a success, and a stalled cancellation no longer holds up later calls ([#6830](https://github.com/bastani-inc/atomic/pull/6830)).
|
|
22
|
+
|
|
23
|
+
**Terminal and workspace tools**
|
|
24
|
+
|
|
25
|
+
- **Read more useful terminal output.** History and the initial results from terminal-mode shell commands omit formatting codes, so more readable text fits without changing raw output files ([#6828](https://github.com/bastani-inc/atomic/pull/6828)).
|
|
26
|
+
- **Retry interrupted worktree creation.** Atomic clears stale Git locks left by its own interrupted SDK worktree setup without removing unrelated locks ([#6828](https://github.com/bastani-inc/atomic/pull/6828)).
|
|
27
|
+
|
|
28
|
+
</Update>
|
|
29
|
+
|
|
30
|
+
<Update label="November 28, 2026" description="0.10.17">
|
|
14
31
|
|
|
15
32
|
Atomic opens large existing session databases without upfront migration stalls and speeds up continuing recent sessions.
|
|
16
33
|
|
|
@@ -51,7 +51,7 @@ Resume as usual with `atomic --session <id>`, `atomic --resume`, or `/resume` (s
|
|
|
51
51
|
|
|
52
52
|
Absolute paths from the earlier machine keep working in built-in file tools because Atomic maps paths under the old checkout to the restored worktree. Shell commands run as written, so commands containing old absolute paths need the new worktree path.
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
If the recorded directory is missing, `atomic --session <id>` first tries to restore the recorded checkout. If no checkout can be restored, an interactive run lets you continue in the directory you launched from or fork a new session there ([Missing working directory](/sessions#resuming-and-deleting-sessions)). If shared storage does not respond within 15 seconds, `atomic --session`, `--resume`, `--continue`, and `/resume` stop without modifying anything; verify connectivity with `atomic storage status` and try again.
|
|
55
55
|
|
|
56
56
|
For SDK resume behavior with `createAgentSession({ sessionManager })`, see [Worktree snapshots in the SDK](/sdk#worktree-snapshots) and [SDK session storage](/sdk/storage).
|
|
57
57
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -88,7 +88,7 @@ In print mode, all fallback notices go to **stderr** (keeping stdout clean for s
|
|
|
88
88
|
|
|
89
89
|
| Option | Description |
|
|
90
90
|
| --- | --- |
|
|
91
|
-
| `-c`, `--continue` | Continue the
|
|
91
|
+
| `-c`, `--continue` | Continue in the current directory, preferring a session with messages, a name, or a summary over a newer empty session. Start a new session if none exists. |
|
|
92
92
|
| `-r`, `--resume` | Browse and select a session (cancelling prints `No session selected` and exits `0`; renaming is available in interactive `/resume`, not in `atomic -r`) |
|
|
93
93
|
| `--session <id\|prefix>` | Open by exact ID or unique 8-hex UUID prefix in its working directory. If it matches only another directory, Atomic offers to fork it here. Exits `75` if another live process holds the session open ([When the session is already open](/guides/resume-on-any-machine#when-the-session-is-already-open)) |
|
|
94
94
|
| `--import <file>` | Import an exported JSONL session into session storage |
|
|
@@ -408,7 +408,7 @@ Passing `--help` or `-h` after `--` (for example `atomic mcp add srv -- cmd --he
|
|
|
408
408
|
```bash
|
|
409
409
|
atomic storage status [--json] # Selection, source, adapter, and connection per domain
|
|
410
410
|
atomic storage join <postgres-url> --password-file <path>|--token-file <path>|--auth azure|aws|gcp [--prefix <prefix>]
|
|
411
|
-
atomic storage migrate [--db <url> [--password-file <path> | --token-file <path> | --auth azure|aws|gcp]] [--prefix <prefix>]
|
|
411
|
+
atomic storage migrate [--db <url> [--password-file <path> | --token-file <path> | --auth azure|aws|gcp]] [--prefix <prefix>] [--snapshot-cleanup status|enable|disable]
|
|
412
412
|
atomic storage move-snapshot-chunks <sqlite-file> [--prefix <prefix>]
|
|
413
413
|
atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]
|
|
414
414
|
atomic storage export <dir> [--sessions] [--limit <n>] [--since <time>] [--storage <json> | --storage-file <path>]
|
|
@@ -425,7 +425,8 @@ atomic intercom upgrade # Replace a
|
|
|
425
425
|
- **`atomic storage join <postgres-url> ...`:** Verifies the credential and connection (`SELECT 1` with a 15-second timeout) using `@bastani/atomic-storage-postgres` (for `postgres://` or `postgresql://` URLs), writes only the global `storage` setting, and reports any environment variables or settings that override it. Creates no tables and prints the install command if the adapter package is missing. Pass exactly one of `--password-file` (copied to a mode `600` `storage-token.<id>` file), `--token-file` (referenced in place and re-read on every new connection), or `--auth azure|aws|gcp`. Passwords in the URL are rejected.
|
|
426
426
|
- **`atomic storage migrate ...`:** Creates or upgrades session and Intercom tables in the selected shared database (or `--db`). Run it as the database owner after joining or upgrading Atomic so runtime roles do not need schema-creation privileges (DDL).
|
|
427
427
|
- `--password-file`, `--token-file`, `--auth`, and `--prefix` are rejected unless `--db` is also passed.
|
|
428
|
-
-
|
|
428
|
+
- `--snapshot-cleanup status` reports whether faster worktree snapshot cleanup is on. After upgrading and restarting all clients, the PostgreSQL database owner can turn it on with `enable` or switch back with `disable`. See [Enable faster worktree snapshot cleanup](/storage/postgres#enable-faster-worktree-snapshot-cleanup).
|
|
429
|
+
- When no shared adapter storage is configured (or local SQLite/JSONL is selected), ordinary `migrate` exits `0` with a no-op message. The cleanup option applies only to shared PostgreSQL storage.
|
|
429
430
|
- On PostgreSQL (when no explicit `schema` option is set), `migrate` moves legacy tables from `public` into schema `atomic` (older Atomic processes still using `public` are refused until upgraded), rebuilds the worktree snapshot-links index concurrently without blocking writes (6-hour statement timeout), creates lazy fork/chat/Intercom tables, tunes autovacuum and `lz4` compression, warns if `pg_trgm` is unavailable, and **exits `1`** if stray Atomic tables are found in `public` after the move.
|
|
430
431
|
- **`atomic storage move-snapshot-chunks <sqlite-file> [--prefix <prefix>]`:** Migrates the snapshot chunk table in a closed local SQLite file using exclusive access, checkpointing after each batch so the write-ahead log does not need space for the entire copy.
|
|
431
432
|
- **`atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`:** Searches entries of a stored session in an existing local SQLite database by regex pattern. Rejects `:memory:` and URLs, restricts `<session-id>` to ASCII letters, digits, `-`, and `_`, accepts a numeric entry cursor (`seq`, `seq.match`, or `seq.match.line`), and fails if the session changes during the search. See [Recalling earlier work](/sessions#recalling-earlier-work).
|
package/docs/sdk.md
CHANGED
|
@@ -121,7 +121,8 @@ const { session, workspace: binding } = await createAgentSession({ workspace: ap
|
|
|
121
121
|
const reviewer = await createAgentSession({ workspace: api.readOnly() });
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
- **Resolution:** Local `repo` must point to a repository root. Remote repositories clone once under `<storageHome>/repos/` ([storage home](/storage#storage-home)) and create worktrees after fetching. Missing branches start from `base`; existing worktrees must match repository and branch
|
|
124
|
+
- **Resolution:** Local `repo` must point to a repository root. Remote repositories clone once under `<storageHome>/repos/` ([storage home](/storage#storage-home)) and create worktrees after fetching. Missing branches start from `base`; existing worktrees must match the repository and branch. Explicit `cwd` must stay inside the worktree, and an explicit `sessionManager` must already point inside it (`WorkspaceConfigError` otherwise).
|
|
125
|
+
- **Interrupted setup:** If Atomic stopped while creating a worktree, retry `createAgentSession({ workspace: api })` with the same workspace. Atomic can recreate the incomplete checkout and clear the stale branch lock it left behind. It leaves unrelated Git locks alone; if another Git operation is still running, let it finish before retrying.
|
|
125
126
|
- **Read-only (`api.readOnly()`):** Removes and blocks `write`, `edit`, and `todo` even if listed in `tools`. Child sessions stay read-only even with their own workspace.
|
|
126
127
|
- **Persistence and PRs:** Bindings persist as a `workspace_binding` entry and restore on reopen (call `bindSessionWorkspace(workspace, sessionManager, signal?)` beforehand if you need the resolved path early). Inspect commits with `workspaceChangeSet(binding)` and open pull requests via `publishPullRequest(changeSet, { draft: true })`.
|
|
127
128
|
- **Errors:** Invalid options throw `WorkspaceConfigError`. Binding failures throw `WorkspaceBindingError` with `code` set to `wrong-repository`, `wrong-branch`, `conflicting-worktree-input`, `invalid-repository`, `unknown-base`, `cwd-outside-worktree`, `git-unavailable`, `git-failed`, `filesystem-failed`, `drift`, `writer-conflict`, or `incomplete-worktree`. See [Workspace](/sdk/reference#workspace) for the full helper and error-class list.
|
package/docs/sessions.md
CHANGED
|
@@ -55,7 +55,9 @@ Inside an interactive session, use these slash commands (see [Slash commands](/s
|
|
|
55
55
|
|
|
56
56
|
## Resuming and deleting sessions {#resuming-and-deleting-sessions}
|
|
57
57
|
|
|
58
|
-
Run
|
|
58
|
+
Run `atomic -c` to pick up your most recent conversation in the current directory. A session with messages, a name, or a summary takes precedence over a newer empty session. If all saved sessions are empty, Atomic opens the newest one; if there are none, it starts a new session.
|
|
59
|
+
|
|
60
|
+
To open a specific session, run `/resume` or `atomic -r` to open the **Resume** picker, or use `atomic --session <id>` with an exact ID or unique 8-hex UUID prefix. If you switch sessions before quitting, the resume command Atomic prints points to the session you switched to.
|
|
59
61
|
|
|
60
62
|
Every session binds to its original working directory so tools, `@path` references, and project settings resolve there:
|
|
61
63
|
|
|
@@ -68,7 +70,7 @@ Every session binds to its original working directory so tools, `@path` referenc
|
|
|
68
70
|
- **Session IDs and prefix matching.** `--session` and `--fork` check for an exact, case-sensitive session ID match first. If none matches, an 8-character hexadecimal prefix (case-insensitive, such as `019f6a2e`) matches UUID-backed sessions only, never custom non-UUID IDs. Atomic checks the current project first, then all projects, and lists matching sessions on a collision. Any other hex-and-hyphen fragment (such as 6 or 12 characters, or `019f6a2e-1234`) is rejected as malformed.
|
|
69
71
|
- **Custom IDs and flag conflicts.** `--session-id <id>` opens an existing project-local session with that exact ID in the current directory, or creates a new one (printing a notice on stderr) if none exists. IDs use ASCII letters, digits, `.`, `_`, and `-`, starting and ending with a letter or digit. Combining `--fork` with `--session-id <id>` names the new forked session and fails if that ID already exists. `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-session`; `--session-id` cannot be combined with `--session`, `--continue`, or `--resume`; `--import` cannot be combined with `--session`, `--fork`, `--session-id`, `--continue`, or `--resume` (combining `--import` with `--no-session` inspects the file without saving it). Conflicting flags exit with code `1`.
|
|
70
72
|
- **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly—reusing a matching local checkout or restoring files into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
|
|
71
|
-
- **Missing working directory.**
|
|
73
|
+
- **Missing working directory.** If the recorded directory is gone and Atomic cannot restore a checkout from a snapshot, start `atomic --session <id>` from the directory you want to use, or select the session with `/resume`. At the interactive prompt, choose **Continue** to use the current directory without changing the saved path, **Fork** to create a separate session in the current directory, or **Cancel** to leave the session alone. Non-interactive modes (`-p`, RPC) and programmatic session switches report a missing-directory error rather than prompting.
|
|
72
74
|
- **Fast resume.** Compacted sessions open from the latest compaction boundary instead of loading the entire history upfront. Commands that inspect earlier entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) page older history on demand. `/session` shows totals immediately and fills in per-model cost and cache stats once that scan finishes. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
|
|
73
75
|
- **Draft preservation.** Text typed before a startup picker or prompt appears waits as a draft without confirming pickers or `Fork this session? [y/N]`.
|
|
74
76
|
- **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools. Explicitly disabled tools stay off, `--tools +name,-name` adjusts the restored set, and previously used tools that are no longer installed appear under **Missing** in `/tools`.
|
|
@@ -196,6 +198,7 @@ From any session or subagent, the agent can read and search past project session
|
|
|
196
198
|
|
|
197
199
|
- **Project isolation.** Reading or searching a session ID from another project fails with a project-isolation error unless `?project=<dir>` or `?project=all` is passed explicitly.
|
|
198
200
|
- **What is indexed and omitted.** History search scans the newest 25 sessions per page, excludes the current session unless targeted by its own ID URL (`history://sessions/<current-id>`), and caps output at 10 matches per session. It omits non-conversation metadata—thinking blocks, system/model/thinking-level changes, usage records, labels, context edits, internal extension state, and worktree snapshots. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Memory compaction](/compaction/memory-compaction)).
|
|
201
|
+
- **Terminal output.** History reads and searches ignore color and other terminal formatting codes in tool output, so you can search for the text you saw without matching escape codes. User and assistant text is unchanged. This is automatic and does not rewrite saved sessions.
|
|
199
202
|
- **Output caps and continuations.** Every `history://` call caps output at 40,000 bytes and scans at most 250,000 entries, stopping cleanly with a `continue with` URL when either limit is hit (multi-session list continuations expire after 60 seconds). Multi-line regex patterns match across up to 16,384 characters or 256 entries.
|
|
200
203
|
- **Offline SQLite search.** To run a read-only regex search against a local SQLite session file from the shell without taking writer locks, run `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]` (see [CLI reference](/reference/cli#storage-and-intercom-commands)).
|
|
201
204
|
|
package/docs/settings.md
CHANGED
|
@@ -488,6 +488,7 @@ Install an adapter [Atomic package](/storage/custom-adapters#adapters-from-atomi
|
|
|
488
488
|
|
|
489
489
|
- An empty shared `storage: {}` uses `<storageHome>/storage.sqlite`.
|
|
490
490
|
- `secrets` accepts `{ "env": "VAR" }` or `{ "file": "token.txt" }` (relative paths resolve from [storage home](/storage#storage-home), falling back to parent if an existing file lives there; one trailing `\n` or `\r\n` is stripped).
|
|
491
|
+
- For PostgreSQL, set `connectTimeoutMs` (default `10000`), `statementTimeoutMs` (default `30000`), and PgBouncer endpoints under the adapter's `options`. These timeouts control individual requests, not how long a live session waits for PostgreSQL to come back. See [Wait settings and PgBouncer example](/storage/postgres#set-the-wait-times-and-pgbouncer-endpoints).
|
|
491
492
|
|
|
492
493
|
<Warning>
|
|
493
494
|
Storage adapter modules execute code with Atomic's permissions. Review any adapter configured in `.atomic/settings.json` before trusting a project. See [Selecting an adapter](/storage/custom-adapters#selecting-an-adapter).
|
|
@@ -140,7 +140,7 @@ When Atomic calls `beginTransaction(options)`, `options` (`SqliteDriverTransacti
|
|
|
140
140
|
- **Transient retries:** Recognized transient failures reject with `StorageTransientError`. Statements and batches that failed before writing make up to `STORAGE_TRANSIENT_RETRY_ATTEMPTS` (**5**) total attempts—1 initial attempt plus up to 4 retries—starting at 250 ms with exponential backoff and up to 20% jitter. Writes with `outcome: "unknown"` never retry automatically.
|
|
141
141
|
- **Transaction retries:** Transactions re-run their callback only when called with `{ retryTransientFailures: true }` (use only for side-effect-free callbacks; non-boolean values throw `StorageConfigError`). The first retry on a database emits a one-time process warning.
|
|
142
142
|
- **Call queue scheduling:** Without `concurrentTransactions`, calls execute one at a time. With `concurrentTransactions`, a call waits only for earlier unfinished calls it conflicts with: standalone statements/batches and whole-database `serial` transactions (no `domain`) conflict with all calls; `serial` transactions with a `domain` conflict only with matching domains (and whole-database calls); read-only transactions wait for earlier writes but run in parallel with other reads and later writes.
|
|
143
|
-
- **Stuck-call bounds:** While an active call stalls without settling, queued priority batches (`{ priority: true }`) fail after `STORAGE_PRIORITY_CALL_MAX_WAIT_MS` (10 seconds) and ordinary queued calls fail after `STORAGE_QUEUED_CALL_MAX_WAIT_MS` (60 seconds)
|
|
143
|
+
- **Stuck-call bounds:** While an active call stalls without settling, queued priority batches (`{ priority: true }`) fail after `STORAGE_PRIORITY_CALL_MAX_WAIT_MS` (10 seconds) and ordinary queued calls fail after `STORAGE_QUEUED_CALL_MAX_WAIT_MS` (60 seconds). These calls did not run and return `StorageTransientError` (`code: "call-queue-stalled"`, `outcome: "not-applied"`, `attempts: 0`). With `concurrentTransactions`, only calls blocked behind the stalled call fail.
|
|
144
144
|
- **WAL helper for local SQLite files:** Call `switchToWriteAheadLog(exec, busyTimeoutMs)` from `@bastani/atomic/storage` to enable WAL with retries on `SQLITE_BUSY` and Windows `SQLITE_IOERR_TRUNCATE` (up to `min(5000, busyTimeoutMs)` ms).
|
|
145
145
|
|
|
146
146
|
You can also implement `SqliteDatabase` directly. Either way, validate your implementation with the [conformance suite](#adapter-conformance).
|
|
@@ -211,7 +211,9 @@ If PgBouncer runs on the PostgreSQL host and connects via `127.0.0.1`, PostgreSQ
|
|
|
211
211
|
|
|
212
212
|
## Configure Atomic
|
|
213
213
|
|
|
214
|
-
Point `url` at PgBouncer and `listenUrl` directly at PostgreSQL (both use `atomic_runtime` and the same password).
|
|
214
|
+
Point `url` at PgBouncer and `listenUrl` directly at PostgreSQL (both use `atomic_runtime` and the same password). For what Atomic shows during an outage and how to set timeouts, see [When a live session is waiting for PostgreSQL](/storage/postgres#when-a-live-session-is-waiting-for-postgresql).
|
|
215
|
+
|
|
216
|
+
On each agent machine:
|
|
215
217
|
|
|
216
218
|
<Steps>
|
|
217
219
|
<Step title="Join the database through PgBouncer">
|
|
@@ -48,6 +48,8 @@ WHERE backend_type = 'client backend';
|
|
|
48
48
|
|
|
49
49
|
On the database host itself, check `uptime`: if load average sits well below CPU core count while agents feel slow, the workload is waiting on network latency or locks rather than CPU.
|
|
50
50
|
|
|
51
|
+
If agents sharing a database frequently pause while other agents check in or recover unanswered messages, update Atomic on every machine using that database. A busy check-in should not delay unrelated sessions. The improvement also works through PgBouncer in transaction mode and needs no settings change.
|
|
52
|
+
|
|
51
53
|
## Put the database close to the agents
|
|
52
54
|
|
|
53
55
|
Every save waits for at least one network round trip, and transactions hold their locks across those round trips:
|
package/docs/storage/postgres.md
CHANGED
|
@@ -110,6 +110,23 @@ Run `atomic storage migrate` once as the owner role after upgrading Atomic and b
|
|
|
110
110
|
|
|
111
111
|
Running `atomic storage migrate` on an already up-to-date database is a no-op.
|
|
112
112
|
|
|
113
|
+
### Enable faster worktree snapshot cleanup
|
|
114
|
+
|
|
115
|
+
By default, shared databases keep the cleanup behavior that works with older Atomic releases. After all clients are upgraded and restarted, you can enable faster cleanup so it no longer pauses unrelated session saves across the database. Snapshots still needed by sessions, forks, or older saved workflow runs are kept. Local SQLite storage needs no change.
|
|
116
|
+
|
|
117
|
+
1. Upgrade and restart every Atomic client using this storage, including automated jobs and long-running sessions. Run the usual `atomic storage migrate` as the database owner.
|
|
118
|
+
2. Check the cleanup mode. Atomic reports recently seen clients on other or unknown versions. This check cannot see paused or disconnected clients, so confirm those are upgraded too.
|
|
119
|
+
3. As the database owner, enable the new mode. Run it at a quiet time; if the database is busy, the switch leaves the mode unchanged so you can retry.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
atomic storage migrate --db 'postgresql://atomic_owner@db.example.com:5432/atomic' \
|
|
123
|
+
--password-file ~/atomic-owner-password --snapshot-cleanup status
|
|
124
|
+
atomic storage migrate --db 'postgresql://atomic_owner@db.example.com:5432/atomic' \
|
|
125
|
+
--password-file ~/atomic-owner-password --snapshot-cleanup enable
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If your storage uses a prefix, include the same `--prefix` here. The mode is saved for that storage, not per machine. Older clients that return after the switch cannot save or change snapshot references; upgrade and restart them. If you need to run an older client again, run the same owner command with `--snapshot-cleanup disable` **before** you start it. Disabling restores the older cleanup behavior without changing stored snapshots, sessions, or forks. It does not reverse other storage upgrades.
|
|
129
|
+
|
|
113
130
|
### Share one database between teams
|
|
114
131
|
|
|
115
132
|
Isolate teams or projects either in separate databases or with a table `prefix` (no prefix by default). Pass the same `--prefix` to `atomic storage migrate` and to every `atomic storage join` in that group; hosts with a different prefix cannot see those sessions.
|
|
@@ -206,7 +223,7 @@ Configure these under `options` (defaults suit small deployments; see [Tuning fo
|
|
|
206
223
|
| `auth` | `"password"` | `"azure-entra"`, `"aws-iam"`, or `"gcp-iam"` for [cloud identities](#cloud-identities). |
|
|
207
224
|
| `maxConnections` | `8` | Maximum main-pool connections opened by one Atomic process (positive integer). |
|
|
208
225
|
| `readerMaxConnections` | `2` | Maximum dedicated read-only connections per process (capped at `maxConnections`; `0` disables the read pool). |
|
|
209
|
-
| `statementTimeoutMs` | `30000` |
|
|
226
|
+
| `statementTimeoutMs` | `30000` | How long PostgreSQL lets a single command run (ms). Ordinary session writes also use this value for how long to wait for a database lock. |
|
|
210
227
|
| `connectTimeoutMs` | `10000` | Timeout for establishing a connection or waiting for a free pool slot (ms). |
|
|
211
228
|
| `idleTimeoutMs` | `300000` | How long the last idle connection in a pool stays open (ms). Burst connections close after 10 seconds idle. |
|
|
212
229
|
| `keepAliveIdleMs` | `60000` | Idle period before sending TCP keepalive probes (ms). |
|
|
@@ -217,6 +234,43 @@ Configure these under `options` (defaults suit small deployments; see [Tuning fo
|
|
|
217
234
|
|
|
218
235
|
For SDK apps using `openPostgresDatabase()`, see [`@bastani/atomic-storage-postgres`](/libraries/storage-postgres) and [SDK session storage](/sdk/storage).
|
|
219
236
|
|
|
237
|
+
## When a live session is waiting for PostgreSQL
|
|
238
|
+
|
|
239
|
+
If a save takes about 10 seconds, Atomic shows **Waiting for PostgreSQL to save this session**. If it knows the connection was lost, the notice says it is waiting to reconnect. You'll see another notice about once a minute until the save finishes. In print and `--mode json`, these notices go to stderr. When the save completes, Atomic tells you it saved the changes and continues the session.
|
|
240
|
+
|
|
241
|
+
Leave the session running during a stall, restart, or temporary disconnection. Atomic keeps pending messages and subagent records in order, checks what the database already saved, and continues without dropping or duplicating those records. There is no overall recovery timeout for a live session. The wait ends early if you stop Atomic, or if another process actually writes to the same session and takes over. If you stop Atomic before the recovery notice, changes that haven't been saved may not be available when you resume. If you see **Another process wrote to session**, continue with that process or reopen the session after it stops; don't start a second copy just to clear a waiting notice.
|
|
242
|
+
|
|
243
|
+
### Set the wait times and PgBouncer endpoints
|
|
244
|
+
|
|
245
|
+
The defaults below are usually enough. Change them under `storage.options` in `~/.atomic/agent/settings.json` (or `sessions.storage.options` if you share only sessions):
|
|
246
|
+
|
|
247
|
+
- **`connectTimeoutMs`: 10 seconds (`10000`)** to connect or get a free connection. A timeout limits one attempt, not the live session's recovery.
|
|
248
|
+
- **`statementTimeoutMs`: 30 seconds (`30000`)** for a PostgreSQL command to finish. Ordinary session writes also allow up to 30 seconds to get a database lock before the command runs. That lock wait follows `statementTimeoutMs`; there is no separate session setting. If the connection itself stops answering, Atomic allows time for the command and any initial lock wait, plus five seconds for the reply, before trying to cancel and drop the connection.
|
|
249
|
+
|
|
250
|
+
For PgBouncer, set `pool_mode = transaction` in `pgbouncer.ini` (not `statement`). In Atomic, point `url` at PgBouncer and `listenUrl` directly at PostgreSQL for instant Intercom notifications. You can leave out the direct endpoint if polling is enough and your pooler uses port `6432` or `6543`. Use the same database and login on both routes. If you joined using `atomic storage join`, keep the `secrets` entry it created. This example uses the `ATOMIC_DB_PASSWORD` environment variable instead:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"storage": {
|
|
255
|
+
"adapter": "@bastani/atomic-storage-postgres",
|
|
256
|
+
"options": {
|
|
257
|
+
"url": "postgresql://atomic_runtime@pgbouncer.example.com:6432/atomic",
|
|
258
|
+
"listenUrl": "postgresql://atomic_runtime@db.example.com:5432/atomic",
|
|
259
|
+
"connectTimeoutMs": 10000,
|
|
260
|
+
"statementTimeoutMs": 30000
|
|
261
|
+
},
|
|
262
|
+
"secrets": { "password": { "env": "ATOMIC_DB_PASSWORD" } }
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
See [Configure Atomic for PgBouncer](/storage/postgres/pgbouncer#configure-atomic) for the full setup and TLS options.
|
|
268
|
+
|
|
269
|
+
### Tell a stall from a failure
|
|
270
|
+
|
|
271
|
+
- **The waiting notice keeps appearing:** the session is still trying to save. From a separate terminal on the same machine, run `atomic storage status` to check whether the database answers now. A successful check doesn't rule out a single stuck query. If waits keep recurring, check the network, PgBouncer's connection limits, and [what active PostgreSQL connections are waiting on](#check-the-effect). Don't raise the timeouts just to hide lock contention or a broken network path.
|
|
272
|
+
- **Atomic reports a specific error and stops instead of waiting:** fix the named problem. Invalid credentials, a TLS certificate error, or missing permissions won't get better by waiting. See [Troubleshooting](#troubleshooting).
|
|
273
|
+
|
|
220
274
|
## TLS
|
|
221
275
|
|
|
222
276
|
Atomic encrypts every remote connection and verifies both the server's certificate and hostname (`sslmode=verify-full`) by default. Connections to `localhost`, loopback addresses, and Unix sockets skip TLS unless `sslmode` is specified in the URL. When the URL omits a host, Atomic reads `PGHOST`.
|
|
@@ -463,8 +517,7 @@ Tune these under `options` (all timeouts are integers in milliseconds):
|
|
|
463
517
|
|
|
464
518
|
- **Colocate database and agents.** Every save waits for at least one network round trip—run PostgreSQL in the same region as your agents, and run `atomic storage migrate` after upgrades so saves use the single-round-trip append path.
|
|
465
519
|
- **`idleTimeoutMs`** (default `300000`): lower (for example `30000`) when idle processes hold connections on a busy server.
|
|
466
|
-
-
|
|
467
|
-
- **`connectTimeoutMs`** (default `10000`): raise for high-latency or slow-accepting servers.
|
|
520
|
+
- **Connection and command timeouts:** keep the defaults unless your server regularly needs more time for healthy connections or commands. See [Set the wait times and PgBouncer endpoints](#set-the-wait-times-and-pgbouncer-endpoints).
|
|
468
521
|
- **`keepAliveIdleMs`** (default `60000`): lower if connections fail with `connection-lost` after idle periods (NAT, firewall, or load balancer dropping idle TCP sockets).
|
|
469
522
|
- **`maxPreparedStatements`** (default `256`, or `0` behind unsupported poolers): lower if server per-connection memory is tight. Atomic auto-detects poolers on ports `6432` and `6543`; behind a pooler on another port, set `listenUrl` or `maxPreparedStatements: 0`. See [Prepared statements](/storage/postgres/pgbouncer#how-atomic-works-with-pgbouncer).
|
|
470
523
|
|
|
@@ -504,13 +557,11 @@ WHERE backend_type = 'client backend';
|
|
|
504
557
|
| --- | --- | --- |
|
|
505
558
|
| `sorry, too many clients already`, `remaining connection slots are reserved…`, or `too many connections for role "<role>"` | Processes exceeded server or role connection limits. | Lower `maxConnections`/`readerMaxConnections`, raise `max_connections` or role `CONNECTION LIMIT`, or deploy [PgBouncer](/storage/postgres/pgbouncer). |
|
|
506
559
|
| `timeout exceeded when trying to connect` | All connections in a process's pool stayed busy for `connectTimeoutMs`. | Raise `maxConnections` if server capacity allows, or raise `connectTimeoutMs`. |
|
|
507
|
-
| `the call was queued behind an earlier call that ran 60 seconds without settling…` |
|
|
560
|
+
| `the call was queued behind an earlier call that ran 60 seconds without settling…` | A previous request did not finish, so the queued request did not run and wrote nothing. | A live session automatically retries its saves. For other commands, check database and network health before retrying. Adding connections will not resolve lock contention. |
|
|
508
561
|
| Many connections waiting on `wait_event_type = 'Lock'` | Multiple agents writing to the same session simultaneously. | Spread concurrent agents across distinct sessions. |
|
|
509
562
|
| Mostly `idle` `atomic` connections near server limit | Idle processes holding warm pool slots. | Lower `idleTimeoutMs`. |
|
|
510
563
|
| `wake-ups: polling only, the listen connection failed` | Broker could not open its `atomic-listen` connection (often out of slots). | Recount connections above and check `listenUrl`. |
|
|
511
564
|
|
|
512
|
-
The first two rows surface as `StorageTransientError` (`connection-refused`) with the quoted message as `cause`; the third surfaces as `StorageUnavailableError`.
|
|
513
|
-
|
|
514
565
|
## Troubleshooting
|
|
515
566
|
|
|
516
567
|
| Error | Fix |
|
|
@@ -523,7 +574,7 @@ The first two rows surface as `StorageTransientError` (`connection-refused`) wit
|
|
|
523
574
|
| `missing-privilege` (PG `42501` or `3F000`) | Run the named `GRANT` (see [Set up the database](#set-up-the-database)) or run `atomic storage migrate` as the owner role. |
|
|
524
575
|
| `This database was upgraded since this process started` | `atomic storage migrate` moved tables from `public` to `atomic` while this process was open; restart the process. |
|
|
525
576
|
| Password/token refused (PG `28P01`, or `28000` on Azure) | Check username, token expiry, or token format. On Azure, use `--auth azure` or request a token for `https://ossrdbms-aad.database.windows.net` (`az account get-access-token --resource-type oss-rdbms`). |
|
|
526
|
-
|
|
|
577
|
+
| Could not open the database | Check credentials (`28P01`/`28000`), whether the database exists (`3D000`), and whether the server is PostgreSQL 16 or newer. |
|
|
527
578
|
| `self-signed certificate in certificate chain` / `unable to get local issuer certificate` | Add `?sslrootcert=/path/to/root.crt` (see [TLS](#tls)). |
|
|
528
579
|
| `INVALID_PURPOSE` | Certificate in `sslrootcert` is not a CA (`basicConstraints=CA:TRUE`) or is client-only; supply the signing CA certificate. |
|
|
529
580
|
| `PATH_LENGTH_EXCEEDED` | Certificate chain exceeds the root CA's path length constraint; reissue or sign directly with the root CA. |
|
package/docs/storage.md
CHANGED
|
@@ -438,7 +438,7 @@ This reference covers the typed errors Atomic raises from storage operations. In
|
|
|
438
438
|
| `StoragePrefixError` | Invalid `prefix` (`prefix`, `reason`: `pattern`, `reserved`, `too-long` with `maxLength`, `identifier-collision` with `identifier`, or `uppercase` on PostgreSQL). | Choose a valid prefix (at most 24 lowercase characters on PostgreSQL). |
|
|
439
439
|
| `StorageSchemaVersionError` | Store was upgraded by a newer Atomic release (`domain`: `sessions` \| `intercom`, `found`, `supported`). | Upgrade Atomic. See [Upgrading older stores](#upgrading-older-stores). |
|
|
440
440
|
| `StoragePayloadTooLargeError` | Value or response exceeded backend limits (`code: "payload-too-large"`, `kind`: `value` \| `response`, `limitBytes`, `actualBytes`, `adapter`, `location`, `retryable: false`, `hint`, `cause`). | Do not retry. Reduce value size or raise custom backend limits. See [Size limits](#size-limits). |
|
|
441
|
-
| `StorageTransientError` | Temporary network, lock, or server failure (`code`: `stream-expired`, `transaction-timeout`, `connection-refused`, `connection-lost`, `lock-conflict`, `read-only-server`; fields: `adapter`, `location`, `outcome`, `attempts`, `retryable: true`, `cause`, optional `hop` and `hopFailure`).
|
|
441
|
+
| `StorageTransientError` | Temporary network, lock, or server failure (`code`: `stream-expired`, `transaction-timeout`, `connection-refused`, `connection-lost`, `lock-conflict`, `read-only-server`; fields: `adapter`, `location`, `outcome`, `attempts`, `retryable: true`, `cause`, optional `hop` and `hopFailure`). It also covers a call that did not run because an earlier one stalled (`call-queue-stalled`, `attempts: 0`). Atomic can retry a call up to 5 total attempts if nothing was written. | Check server or proxy (`hop`) health and retry. If `outcome` is `"unknown"`, read state back before repeating a write. |
|
|
442
442
|
| `StorageOutcomeUnknownError` | Driver could not confirm whether a write committed (`domain`, `id`, `key`). | Read the record back before retrying. |
|
|
443
443
|
| `StorageTransferError` | Export or import failed before writing anything (`path`, optional `line`, `id`, `reason`, `cause`). Exported from `@bastani/atomic`. | Fix the reported file or line and re-run export/import. |
|
|
444
444
|
| `StorageImportIncompleteError` | Import failed after writing some sessions (`written`, `notWritten`, `cause`). Exported from `@bastani/atomic`. | Fix the underlying storage error and re-run `atomic storage import` to finish remaining sessions. |
|
|
@@ -458,7 +458,9 @@ This reference covers the typed errors Atomic raises from storage operations. In
|
|
|
458
458
|
Other session errors: `SessionNotFoundError` (`sessionId`), `SessionExistsError` (`sessionId`), `SessionIdMismatchError` (`requested`, `found`), `SessionConflictError` (`sessionId`, `expectedSeq`, `actualSeq`), `SessionFormatVersionError` (`path`, `found`, `supported`), `SessionInvalidTextError` (`field`, `reason`), `SessionInvalidTimestampError` (`field`, `reason`, `value`), and `JsonlStoragePoisonedError` (`location`, `cause`, `rollbackCause`). After `SessionConflictError`, another process wrote first—reopen the session before writing again.
|
|
459
459
|
|
|
460
460
|
<Note>
|
|
461
|
-
**When a
|
|
461
|
+
**When a live PostgreSQL session is waiting to save:** Leave it running if you see **Waiting for PostgreSQL to save this session**. Atomic keeps retrying pending saves in order, even in print and JSON modes. See [What to do while PostgreSQL is unavailable](/storage/postgres#when-a-live-session-is-waiting-for-postgresql) for notices, wait settings, and a PgBouncer example.
|
|
462
|
+
|
|
463
|
+
**When a save fails instead of waiting:** Atomic reports `could not persist the <role> message` along with the reason and stops the current run. Print and JSON modes exit `1`. Interactive mode stays open so you can fix the reported problem and try again.
|
|
462
464
|
</Note>
|
|
463
465
|
|
|
464
466
|
### Database handle errors
|
package/docs/tools.md
CHANGED
|
@@ -224,6 +224,7 @@ Interactive mode previews file diffs as soon as arguments arrive (notebook diffs
|
|
|
224
224
|
- **Concurrency cap (64 commands).** A session runs up to **64** shell commands concurrently (including subagents' shells). Additional commands fail with an error until an active command finishes or is stopped; nothing running is stopped to make room.
|
|
225
225
|
- **`pty: true`.** Runs the command in the bundled native PTY. In interactive and standard sessions, native PTY errors fail the call rather than silently falling back to pipes; unbound standalone SDK sessions fall back to pipes if the native PTY is unavailable. Set `ATOMIC_NO_PTY=1` to force pipes (see [Environment variables](/environment-variables)). On Windows with a WSL stdin-transport bash shell, supervised execution fails with `ContainmentUnavailable: run Atomic inside WSL to supervise Linux guest commands`.
|
|
226
226
|
- **`heartbeatMs`.** Background task heartbeat interval in milliseconds (defaults to `tasks.heartbeatMs` or 15 minutes; `0` disables; minimum `60000`). See [Background tasks reference](/background-tasks/reference).
|
|
227
|
+
- **Terminal formatting.** With `pty: true`, Atomic removes color and cursor codes from the initial result sent to the model. This also applies to `powershell`. Those codes are still available in the full-output file (when present), structured output returned to codemode, or output retrieved in a later `action: "wait"` call. For ordinary pipe output, omit `pty` or set it to `false`.
|
|
227
228
|
- **Tail truncation.** Model-facing output keeps the **last** 3,000 lines or 50 KiB (truncating an oversized trailing line to its final 50 KiB) and writes `[Showing lines ... Full output: <path>]`. Structured output returned to codemode keeps up to 1 MiB (first and last 512 KiB around an omission marker if longer).
|
|
228
229
|
|
|
229
230
|
### Long-running servers and watchers
|
|
@@ -127,7 +127,7 @@ git for-each-ref --format='delete %(refname)' refs/atomic/snapshots/ | git updat
|
|
|
127
127
|
Snapshot blobs live in one shared table per database and are garbage-collected automatically when no retained session references them:
|
|
128
128
|
|
|
129
129
|
- **Retained snapshots.** For every branch of every session (including internal subagent sessions), Atomic retains the latest snapshot of each checkout on that branch. Deleting a session releases its snapshots. A partly restored snapshot remains retained for up to 30 days. Unfinished workflow runs left from earlier releases retain their snapshots until removed.
|
|
130
|
-
- **Background schedule.** When `snapshots.autoCollect` is `true`, Atomic triggers collection in the background 10 seconds after an interactive or RPC session starts and 10 seconds after it closes, at most once per `snapshots.collectIntervalSeconds` per database (measured on the database clock).
|
|
130
|
+
- **Background schedule.** When `snapshots.autoCollect` is `true`, Atomic triggers collection in the background 10 seconds after an interactive or RPC session starts and 10 seconds after it closes, at most once per `snapshots.collectIntervalSeconds` per database (measured on the database clock). When the database is busy, cleanup backs off and tries again instead of joining the queue ahead of session writes. Cleanup works in short batches. It can briefly pause writes in compatibility mode; on shared PostgreSQL databases the owner can [enable faster cleanup](/storage/postgres#enable-faster-worktree-snapshot-cleanup) after all clients are upgraded. On PostgreSQL, cleanup limits each database operation within a batch to 250 ms and, on PostgreSQL 17 or later, the whole batch to one second. If an operation takes too long, cleanup rolls that batch back and tries again later. Cleanup stops when the last store on the database closes and resumes later if interrupted.
|
|
131
131
|
- **Grace window.** Blobs stored or reused within `snapshots.graceSeconds` (default 1 hour) are never deleted, protecting captures in progress. Reusing an earlier patch refreshes its age; if a blob is collected before its snapshot commits, Atomic retries storing it or reports `blobs-collected` without recording a broken snapshot. Raise `snapshots.graceSeconds` if `blobs-collected` repeats.
|
|
132
132
|
- **Failures and disk space.** Collection errors never fail an active session; they are recorded in the `snapshot_collection` table (`finished_at`, `deleted`, `error_code`) and retried after the configured interval. SQLite reuses freed pages internally without shrinking the file; run `VACUUM` while no Atomic process uses the database to reclaim disk space.
|
|
133
133
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.18",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -118,13 +118,13 @@
|
|
|
118
118
|
"prepack": "node -e \"require('node:fs').existsSync('scripts/split-dist.mjs') && import('./scripts/split-dist.mjs').then(() => import('./scripts/write-startup-files.mjs')).then(() => import('./scripts/write-startup-stages.mjs'))\""
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@bastani/atomic-natives": "0.10.
|
|
122
|
-
"@bastani/atomic-ai": "0.10.
|
|
123
|
-
"@bastani/atomic-agent-core": "0.10.
|
|
124
|
-
"@bastani/atomic-codemode": "0.10.
|
|
125
|
-
"@bastani/atomic-tui": "0.10.
|
|
126
|
-
"@bastani/atomic-schema": "0.10.
|
|
127
|
-
"@bastani/atomic-telemetry": "0.10.
|
|
121
|
+
"@bastani/atomic-natives": "0.10.18",
|
|
122
|
+
"@bastani/atomic-ai": "0.10.18",
|
|
123
|
+
"@bastani/atomic-agent-core": "0.10.18",
|
|
124
|
+
"@bastani/atomic-codemode": "0.10.18",
|
|
125
|
+
"@bastani/atomic-tui": "0.10.18",
|
|
126
|
+
"@bastani/atomic-schema": "0.10.18",
|
|
127
|
+
"@bastani/atomic-telemetry": "0.10.18",
|
|
128
128
|
"@silvia-odwyer/photon-node": "0.3.4",
|
|
129
129
|
"chalk": "6.0.0",
|
|
130
130
|
"glob": "14.0.6",
|