@bastani/atomic 0.10.9 → 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 +83 -0
- package/README.md +226 -163
- 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 +27 -12
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
- package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
- package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
- package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
- package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
- package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
- package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
- package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
- package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
- package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
- package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
- package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +87 -116
- package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
- package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
- package/dist/builtin/intercom/group.ts +7 -3
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/README.md +61 -27
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/README.md +74 -141
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
- package/dist/builtin/web-access/CHANGELOG.md +9 -0
- package/dist/builtin/web-access/README.md +61 -88
- package/dist/builtin/web-access/index.bundle.mjs +387 -351
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +2 -2
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/agent-session-methods.d.ts +4 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/compaction/compactor.d.ts +20 -14
- package/dist/core/compaction/errors.d.ts +120 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/model-resolver.d.ts +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.code.js +1 -1
- 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/api-types.d.ts +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -1
- 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/provider-types.d.ts +18 -6
- package/dist/core/extensions/provider-types.js.map +1 -1
- package/dist/core/extensions/runner-context.js +1 -1
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-config.d.ts +40 -0
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-scope.d.ts +4 -4
- package/dist/core/model-runtime.d.ts +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/provider-composer-internal.d.ts +11 -2
- package/dist/core/sdk.code.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 +5 -5
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +2 -2
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +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 +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.code.js +1 -1
- 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.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.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +1 -1
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +2 -2
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +7 -7
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- 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/theme/color-utils.d.ts +5 -5
- package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
- package/dist/modes/rpc/rpc-types.d.ts +29 -2
- package/dist/package-manager-cli.code.js +5 -5
- 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/5.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -2
- package/dist/startup-stages/9.js +2 -1
- package/dist/utils/native-module.d.ts +44 -0
- package/dist/utils/startup-database-spare.code.js +3 -3
- 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.md +238 -243
- package/docs/build.md +21 -15
- package/docs/changelog.mdx +1 -1
- package/docs/codemode.md +68 -51
- package/docs/compaction/reference.md +65 -26
- package/docs/compaction.md +118 -66
- package/docs/computer-use.md +179 -146
- package/docs/containerization.md +87 -33
- package/docs/custom-provider/api-reference.md +152 -13
- package/docs/custom-provider/oauth.md +45 -28
- package/docs/custom-provider/override.md +14 -7
- package/docs/custom-provider/registration.md +77 -67
- package/docs/custom-provider/streaming.md +42 -19
- package/docs/custom-provider.md +26 -62
- package/docs/development.md +81 -42
- package/docs/docs.json +54 -38
- package/docs/environment-variables.md +92 -64
- package/docs/extensions/api-reference.md +326 -735
- package/docs/extensions/authoring.md +186 -269
- package/docs/extensions/events.md +308 -375
- package/docs/extensions/examples.md +122 -74
- package/docs/extensions/ui.md +217 -197
- package/docs/extensions.md +189 -259
- package/docs/getting-started/authentication.md +27 -14
- package/docs/getting-started/first-session.md +25 -26
- package/docs/getting-started/installation.md +62 -84
- package/docs/getting-started/project-instructions.md +39 -14
- package/docs/guides/configuration.md +62 -20
- package/docs/guides/intercom.md +20 -12
- package/docs/guides/non-interactive.md +31 -16
- package/docs/guides/orchestration.md +17 -9
- package/docs/guides/resume-on-any-machine.md +63 -52
- package/docs/guides/subagents.md +26 -14
- package/docs/guides/team-setup.md +49 -27
- package/docs/guides.md +30 -23
- package/docs/herdr.md +22 -17
- package/docs/index.md +24 -17
- package/docs/intercom/operations.md +90 -66
- package/docs/intercom/reference.md +219 -192
- package/docs/intercom.md +111 -92
- package/docs/json.md +73 -71
- package/docs/keybindings.md +74 -48
- package/docs/libraries/agent-core.md +52 -9
- package/docs/libraries/ai.md +90 -63
- package/docs/libraries/codemode.md +31 -8
- package/docs/libraries/schema.md +12 -9
- package/docs/libraries/storage-libsql.md +92 -0
- package/docs/libraries/storage-postgres.md +119 -0
- package/docs/libraries/telemetry.md +42 -9
- package/docs/libraries/tui.md +74 -94
- package/docs/libraries.md +25 -8
- package/docs/llama-cpp.md +38 -33
- package/docs/mcp-servers.md +140 -88
- package/docs/models/reference.md +53 -36
- package/docs/models-configuration.md +19 -13
- package/docs/models.md +102 -87
- package/docs/orchestration/migrating-workflows.md +22 -20
- package/docs/orchestration/patterns.md +36 -21
- package/docs/orchestration.md +24 -21
- package/docs/packages/authoring.md +29 -18
- package/docs/packages/reference.md +77 -16
- package/docs/packages.md +34 -34
- package/docs/programmatic.md +28 -21
- package/docs/prompt-templates.md +65 -41
- package/docs/providers/reference.md +36 -20
- package/docs/providers.md +78 -76
- package/docs/quickstart.md +42 -54
- package/docs/reference/cli.md +256 -254
- package/docs/reference.md +30 -23
- package/docs/rpc/examples.md +121 -17
- package/docs/rpc/extension-ui.md +86 -63
- package/docs/rpc/protocol.md +817 -358
- package/docs/rpc.md +78 -152
- package/docs/sdk/reference.md +309 -73
- package/docs/sdk/storage.md +614 -0
- package/docs/sdk/structured-decisions.md +168 -65
- package/docs/sdk/web-server.md +80 -46
- package/docs/sdk.md +168 -215
- package/docs/security.md +117 -44
- package/docs/session-format.md +127 -76
- package/docs/sessions.md +155 -113
- package/docs/settings.md +293 -205
- package/docs/shell-aliases.md +15 -6
- package/docs/skills/authoring.md +17 -9
- package/docs/skills/reference.md +23 -21
- package/docs/skills.md +148 -97
- package/docs/storage.md +172 -260
- package/docs/subagents/authoring.md +148 -15
- package/docs/subagents/reference.md +105 -29
- package/docs/subagents.md +247 -250
- package/docs/terminal-setup.md +97 -69
- package/docs/termux.md +51 -85
- package/docs/themes/reference.md +51 -37
- package/docs/themes.md +52 -55
- package/docs/tmux.md +38 -21
- package/docs/tools.md +209 -147
- package/docs/tui/reference.md +64 -32
- package/docs/tui.md +38 -66
- package/docs/usage.md +94 -86
- package/docs/verification.md +25 -25
- package/docs/web-access.md +106 -54
- package/docs/windows.md +55 -57
- package/docs/worktree-snapshots.md +82 -74
- package/examples/sdk/11-sessions.ts +4 -4
- package/package.json +8 -8
- package/schemas/models.schema.json +58 -7
- package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
- package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
- package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
package/docs/sessions.md
CHANGED
|
@@ -1,101 +1,64 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
|
|
2
|
+
title: "Manage sessions"
|
|
3
|
+
sidebarTitle: "Sessions"
|
|
4
|
+
description: "Resume, search, name, branch, fork, share, and export conversation sessions in Atomic."
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
+
Atomic saves every conversation as an append-only tree in a local SQLite database (`~/.atomic/workflows/journal.sqlite` by default). You can resume past work, jump back to earlier turns, and branch without losing history. For branch summaries and context clearing, see [Context and compaction](/compaction#branch-summarization).
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
- To configure SQLite, PostgreSQL, Turso/libSQL, or custom adapters, see [Storage backends](/storage).
|
|
10
|
+
- To resume sessions across machines with worktree snapshots and blueprints, see [Resume sessions on any machine](/guides/resume-on-any-machine).
|
|
11
|
+
- To open and pass session stores from Node.js or TypeScript, see [SDK session storage](/sdk/storage).
|
|
12
|
+
- For JSONL schemas, entry types, and the `SessionManager` API, see [Session file format](/session-format).
|
|
9
13
|
|
|
10
|
-
## Session
|
|
14
|
+
## Session commands
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
Start, resume, fork, or import sessions from the command line:
|
|
13
17
|
|
|
14
18
|
```bash
|
|
15
|
-
atomic -c # Continue the most recent session
|
|
16
|
-
atomic -r #
|
|
17
|
-
atomic --no-session #
|
|
18
|
-
atomic --name "my task" # Set display name at startup
|
|
19
|
+
atomic -c # Continue the most recent session in this folder
|
|
20
|
+
atomic -r # Open the interactive session picker
|
|
21
|
+
atomic --no-session # Run without saving a resumable session
|
|
22
|
+
atomic --name "my task" # Set a display name at startup
|
|
19
23
|
atomic --session <id|prefix> # Open by exact ID or unique 8-hex UUID prefix
|
|
20
|
-
atomic --
|
|
24
|
+
atomic --session-id <id> # Start a new project-local session with an exact ID
|
|
21
25
|
atomic --fork <id|prefix> # Fork by exact ID or unique 8-hex UUID prefix
|
|
26
|
+
atomic --import <file> # Import a format-4 JSONL export into storage
|
|
22
27
|
```
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
- **UUID prefixes and exact IDs.** `--session` and `--fork` accept a full UUID or a unique 8-hex prefix. Atomic searches the current project first and then all projects, and it lists matches on a collision. `--session-id` always uses an exact project-local ID.
|
|
26
|
-
- **Project trust and resume hints.** Project-local storage settings apply after project trust approval. New conversations switch before saving, while resumed conversations stay in their original store. Keep generated `--session-dir`, `--session-store`, or `--session-prefix` flags when reopening non-default stores, such as `atomic --session-store "/data/project A/sessions.sqlite" --session-prefix project_ --session <id>`.
|
|
27
|
-
- **Import and export.** `--import <file>` or `/import <file>` imports a JSONL export verbatim, including [worktree snapshots](/worktree-snapshots) written by `/export <file>.jsonl`. Import upgrades older supported formats automatically and raises `SessionExistsError` if the ID already exists. Combine `--import` with `--no-session` to inspect a file without saving it. `--import` cannot be paired with `--session`, `--fork`, `--session-id`, `-c`, or `-r`. Empty imported IDs reopen through `atomic --session ""` or the picker.
|
|
28
|
-
- **Ephemeral runs (`--no-session`).** Nothing is saved to a resumable store. Idle released sessions, such as released subagents, temporarily page history to private files in your agent directory and remove them on exit; stale files left after a crash are cleaned up on a later startup on the same host. See [Releasing idle sessions](/sdk#releasing-idle-sessions).
|
|
29
|
-
- **Session stats (`/session`).** Displays the session ID, message count, tokens, and cost. Counts update after each completed message, and per-model cost and cache breakdowns appear once history matches totals.
|
|
30
|
-
|
|
31
|
-
### Choosing a store
|
|
32
|
-
|
|
33
|
-
Configure `sessions.storage` (session-only) or `storage` (shared default) in `settings.json`:
|
|
34
|
-
|
|
35
|
-
```json
|
|
36
|
-
{ "sessions": { "storage": { "dir": "sessions" } } }
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Supported store objects are `{ "path": "sessions.sqlite" }` for SQLite, `{ "dir": "sessions" }` for JSONL, `{ "memory": true }` for ephemeral runs, or a database [adapter](/storage#selecting-an-adapter). Legacy `sessionDir` has been removed.
|
|
40
|
-
|
|
41
|
-
Store selection follows this precedence order, from highest to lowest:
|
|
42
|
-
|
|
43
|
-
1. SDK `sessionStore`
|
|
44
|
-
2. `--no-session`
|
|
45
|
-
3. `--session-dir` or `--session-store`
|
|
46
|
-
4. `--storage` or `--storage-file`
|
|
47
|
-
5. `ATOMIC_SESSIONS_STORAGE` or `ATOMIC_CODING_AGENT_SESSION_DIR`
|
|
48
|
-
6. `ATOMIC_STORAGE`
|
|
49
|
-
7. `sessions.storage`
|
|
50
|
-
8. `storage`
|
|
51
|
-
9. Default SQLite
|
|
52
|
-
|
|
53
|
-
Each selection replaces lower-precedence settings as a whole object rather than merging fields. Settings, JSON flags, and JSON environment variables resolve relative paths from [storage home](/storage#storage-home). `--session-dir`, `--session-store`, and `ATOMIC_CODING_AGENT_SESSION_DIR` resolve relative paths from `cwd`.
|
|
54
|
-
|
|
55
|
-
`--session-store` conflicts with `--session-dir` and `--no-session`. `--session-prefix` requires `--session-store` and must match `[A-Za-z_][A-Za-z0-9_]*` without starting with `sqlite_`. Invalid or unavailable stores always raise a typed error instead of falling back to memory. See [Selecting storage per process](/storage#selecting-storage-per-process).
|
|
56
|
-
|
|
57
|
-
From the SDK, pass `sessionStore` with `{ kind: "sqlite", path }`, `{ kind: "jsonl", dir }`, or `{ kind: "memory" }`. Passing an explicit `sessionManager` bypasses store selection:
|
|
58
|
-
|
|
59
|
-
```ts
|
|
60
|
-
const { session } = await createAgentSession({
|
|
61
|
-
sessionStore: { kind: "sqlite", path: "/data/sessions.sqlite" },
|
|
62
|
-
});
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
See [Session format](/session-format) for JSONL schemas and the `SessionManager` API.
|
|
66
|
-
|
|
67
|
-
## Session commands
|
|
29
|
+
Inside an interactive session, use these slash commands:
|
|
68
30
|
|
|
69
31
|
| Command | Action |
|
|
70
32
|
| --- | --- |
|
|
71
|
-
| `/resume [id]` | Open the session picker, or resume directly by exact ID or unique 8-hex prefix |
|
|
33
|
+
| `/resume [id]` | Open the session picker, or resume directly by exact ID or unique 8-hex UUID prefix |
|
|
72
34
|
| `/new` | Start a fresh session |
|
|
73
35
|
| `/name <name>` | Set the display name |
|
|
74
|
-
| `/session [snapshot]` | Show session ID, counts, tokens, and cost; pass `snapshot` to inspect worktree snapshots and diff them against the current tree |
|
|
75
|
-
| `/tree` | Navigate and branch
|
|
36
|
+
| `/session [snapshot]` | Show session ID, message counts, tokens, and cost; pass `snapshot` to inspect worktree snapshots and diff them against the current tree |
|
|
37
|
+
| `/tree` | Navigate and branch inside the session tree |
|
|
76
38
|
| `/fork` | Copy history up to a chosen user message into a new session |
|
|
77
39
|
| `/clone` | Duplicate the active branch into a new session |
|
|
78
|
-
| `/compact [instructions]` | Clear context, or compact with `compactionModel`; see [
|
|
79
|
-
| `/export [file]` | Export to HTML by default, or to a format-4 `.jsonl` file with inline snapshots when the path ends in `.jsonl` (
|
|
40
|
+
| `/compact [instructions]` | Clear context, or compact with `compactionModel`; see [Context and compaction](/compaction) |
|
|
41
|
+
| `/export [file]` | Export to HTML by default, or export the **active branch** to a format-4 `.jsonl` file (with inline worktree snapshots) when the path ends in `.jsonl` (case-insensitive). Wrap paths containing spaces in matching `'...'` or `"..."` quotes; unclosed quotes return an error. Use `atomic storage export` for raw backups of every branch across sessions. |
|
|
80
42
|
| `/import <file>` | Import and resume a session from a format-4 JSONL file |
|
|
81
|
-
| `/share` |
|
|
43
|
+
| `/share` | Export the session as `session.jsonl` and upload it as a secret GitHub gist (`gh gist create --public=false`). Requires the GitHub CLI (`gh`) installed and logged in (`gh auth login`). Omits worktree snapshot blobs and session tool-output blobs, and cancels automatically if you switch sessions during upload. |
|
|
82
44
|
|
|
83
45
|
## Resuming and deleting sessions
|
|
84
46
|
|
|
85
|
-
Run `/resume` or `atomic -r` to open the **Resume** picker. Run `/resume <id>` with an exact ID or unique 8-hex prefix
|
|
47
|
+
Run `/resume` or `atomic -r` to open the **Resume** picker. Run `/resume <id>` with an exact session ID or unique 8-hex UUID prefix to jump directly into that session.
|
|
86
48
|
|
|
87
|
-
Every session binds to its original working directory so tools, `@path` references, and project
|
|
49
|
+
Every session binds to its original working directory so tools, `@path` references, and project settings resolve there:
|
|
88
50
|
|
|
89
51
|
| Entry point | Working directory |
|
|
90
52
|
| --- | --- |
|
|
91
|
-
| `--continue` | Current directory |
|
|
92
|
-
| `--resume
|
|
53
|
+
| `--continue` (`-c`) | Current directory |
|
|
54
|
+
| `--resume` (`-r`), `/resume`, `--session` | Session's recorded directory |
|
|
93
55
|
| `--fork`, or choosing to fork a cross-directory `--session` | Current directory (new session) |
|
|
94
56
|
|
|
95
|
-
- **
|
|
96
|
-
- **
|
|
97
|
-
- **
|
|
98
|
-
- **
|
|
57
|
+
- **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 rather than not found.
|
|
58
|
+
- **Custom IDs and flag conflicts.** `--session-id <id>` sets an exact project-local ID matching ASCII letters, digits, `.`, `_`, and `-`, starting and ending with a letter or digit. `--fork` cannot be combined with `--session`, `--continue`, `--resume`, or `--no-session`, though you can combine `--fork` with `--session-id <id>` to name the forked 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`.
|
|
59
|
+
- **Snapshots on resume.** When a session recorded [worktree snapshots](/worktree-snapshots), `atomic --session <id>` from another directory reopens it directly. Atomic reuses a matching local checkout or restores the files into `~/.atomic/agent/worktree-snapshots/` with a one-line notice. When exact restoration fails, Atomic opens the closest state and reports what is missing. Inspect snapshots with `/session snapshot` ([Inspecting snapshots](/worktree-snapshots#inspecting-snapshots)).
|
|
60
|
+
- **Missing working directory.** When a session's directory no longer exists, interactive mode offers **Continue** (run in `cwd` without saving the new path), **Fork** (copy into `cwd` as a new session), or **Cancel**. Print mode, RPC mode, and extension calls to `ctx.switchSession()` in interactive mode reject with `MissingSessionCwdError`. At CLI startup in interactive mode, choose **Fork** instead of **Continue**, or open from an existing directory through `/resume` where **Continue** works.
|
|
61
|
+
- **Fast resume and progress.** Compacted sessions open from the latest compaction boundary instead of loading the full history upfront. Commands that inspect older entries (`/tree`, `/fork`, `/clone`, `/export`, `/share`, and `/session`) read earlier history on demand in pages. `/session` shows totals immediately and fills in per-model cost, cache hit rate, and wasted cache cost once that scan finishes, while `history://` covers the full session. Extensions start with the active context window (including `atomic.appendEntry()` records on the active branch) and can read older entries through `ctx.sessionManager.readHistory()`. Slow resumes or sessions with 100,000 or more entries print step timings before opening the TUI.
|
|
99
62
|
- **Draft preservation.** Text typed before a startup picker or prompt appears waits as a draft without confirming pickers or `Fork this session? [y/N]`.
|
|
100
63
|
- **Tool restoration.** Plain resume restores the session's recorded tool selection along with newly available extension tools. Tools explicitly disabled through `--tools`, `--no-tools`, `--exclude-tools`, or `setActiveTools` stay off, and `--tools +name,-name` adjusts the restored set. Missing previously used tools appear below startup resources and under **Missing** in `/tools`. Forked subagents keep their own configured tools subject to parent restrictions.
|
|
101
64
|
|
|
@@ -104,13 +67,27 @@ Every session binds to its original working directory so tools, `@path` referenc
|
|
|
104
67
|
When you reopen an interactive session (`--session`, `-c`, `-r`, or `/resume`) after an abrupt exit or session switch, the transcript renders first and recovery runs visibly:
|
|
105
68
|
|
|
106
69
|
- Running background subagents relaunch and reconnect to Intercom. Paused, quit, completed, and failed children stay as they were, and forked sessions never relaunch original children (see [Run control](/subagents#run-control)).
|
|
107
|
-
- Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one
|
|
70
|
+
- Undelivered user or peer messages replay in a turn (`Replaying N interrupted deliveries`). Messages from gone peers post one notice without starting a turn. Messages that cannot deliver because Intercom is unreachable or a relaunched subagent has not reconnected yet wait until the next resume.
|
|
108
71
|
- Unseen background task results render as cards without starting a turn, followed by a recovery summary line.
|
|
109
72
|
- Non-interactive runs (`atomic -p`) leave interrupted work pending until the next interactive resume.
|
|
110
73
|
|
|
111
|
-
###
|
|
74
|
+
### Session picker search and shortcuts
|
|
75
|
+
|
|
76
|
+
Each row in the **Resume** picker shows the session name or first message, age, message count, folder (in all-folders scope), and summary.
|
|
77
|
+
|
|
78
|
+
Type to filter sessions using three query modes:
|
|
79
|
+
|
|
80
|
+
- **Word tokens (default).** Space-separated words match with logical AND (case-insensitive). Each word checks for a literal substring match first across name, title, ID, detail, summary, message text, and folder. If no literal match is found, it falls back to fuzzy matching across metadata fields only (name, title, detail, summary, and folder, never message bodies or IDs).
|
|
81
|
+
- **Exact phrases.** Wrap multiple words in double quotes (`"auth token refresh"`) for case-insensitive phrase matching across all fields with normalized whitespace. An unclosed quote falls back to whitespace-separated word tokens.
|
|
82
|
+
- **Regular expressions.** Prefix a query with `re:` (such as `re:error\s+50[23]`) for case-insensitive JavaScript regex matching. An invalid regex returns no matches.
|
|
83
|
+
|
|
84
|
+
Press `Ctrl+S` to cycle through three sort modes:
|
|
112
85
|
|
|
113
|
-
|
|
86
|
+
- **Threaded (default).** Groups forked sessions under their parent session, ordered by most recent activity.
|
|
87
|
+
- **Recent.** Flat list ordered by most recent modification time.
|
|
88
|
+
- **Relevance.** Ranked by match quality (name matches first, then text matches, then fuzzy matches), tie-broken by modification time.
|
|
89
|
+
|
|
90
|
+
Bottom hints display active shortcuts (`space preview · enter resume · type to search · esc cancel`, plus `? keys` or `f1 keys` while searching):
|
|
114
91
|
|
|
115
92
|
| Key | Action |
|
|
116
93
|
| --- | --- |
|
|
@@ -119,63 +96,38 @@ Each row displays the session name or first message, age, message count, folder
|
|
|
119
96
|
| Type / `Esc` | Filter list or clear search; a second `Esc` closes the picker |
|
|
120
97
|
| `Space` | Toggle preview when search is empty |
|
|
121
98
|
| `Tab` | Toggle current folder vs. all folders |
|
|
122
|
-
| `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode, or named-only filter |
|
|
99
|
+
| `Ctrl+P` / `Ctrl+S` / `Ctrl+N` | Toggle paths, sort mode (`threaded`, `recent`, `relevance`), or named-only filter |
|
|
123
100
|
| `Ctrl+R` | Rename session |
|
|
124
|
-
| `Ctrl+D`, then `Enter` | Delete session (`trash` CLI for JSONL when available, record delete for database stores; the active session cannot be deleted) |
|
|
101
|
+
| `Ctrl+D`, then `Enter` | Delete session with confirmation (`trash` CLI for JSONL when available, record delete for database stores; the active session cannot be deleted) |
|
|
102
|
+
| `Ctrl+Backspace` | Delete selected session when the search box is empty |
|
|
125
103
|
| `Ctrl+C` | Close picker from any state |
|
|
126
104
|
|
|
127
105
|
### Session summaries
|
|
128
106
|
|
|
129
|
-
Once the agent goes idle, Atomic generates a one-line `session_summary` using the session's active model.
|
|
107
|
+
Once the agent goes idle, Atomic generates a one-line `session_summary` using the session's active model. Summaries run for saved interactive and RPC sessions, and skip `--no-session`, `-p`, JSON mode, internal sessions, and sessions with fewer than 4 entries on the active branch.
|
|
130
108
|
|
|
131
|
-
|
|
109
|
+
Summary generation feeds up to 4,000 tokens of recent conversation, caps the stored line at 160 characters (truncated with `...`), counts toward session usage, cancels on new input or exit, and retires on a later branch summary. Disable summaries with `"sessionSummary": { "enabled": false }`.
|
|
132
110
|
|
|
133
111
|
### Internal sessions
|
|
134
112
|
|
|
135
|
-
Sessions marked **internal** are hidden from `/resume`, `atomic -r`, `-c`, and
|
|
136
|
-
|
|
137
|
-
When an 8-character ID prefix passed to `--session` or `--fork` matches both a listed session and internal sessions, such as its subagents' sessions created around the same time, Atomic selects the listed session.
|
|
138
|
-
|
|
139
|
-
## Recalling earlier work
|
|
140
|
-
|
|
141
|
-
The agent can inspect past project sessions from any session or subagent using read-only `history://` URLs with `read` and `search`. These URLs work across SQLite, JSONL, memory, and custom stores:
|
|
142
|
-
|
|
143
|
-
| URL | Returns |
|
|
144
|
-
| --- | --- |
|
|
145
|
-
| `history://sessions` | Recent project sessions, newest first (`?limit=N` up to 200, `?offset=N`; add `?project=all` or `?project=<dir>` only when asked to search other projects). Uncached JSONL and legacy sessions may show estimated counts. |
|
|
146
|
-
| `history://sessions/<id>` | Full transcript, or an outline with counts and `:N-M` turn links for sessions with more than 2,000 entries, oversized bodies, or cold JSONL files. Lines over 4,000 characters split cleanly. |
|
|
147
|
-
| `history://sessions/<id>:N-M` | 1-based entry ranges (`:N`, `:N+C`, `:N-M,P-Q`; `:raw` omits the heading). |
|
|
148
|
-
|
|
149
|
-
- **Search behavior.** Searching `history://sessions` or `history://` scans the newest 25 sessions per page, excludes the current session (search it through its own ID URL), and caps output at 10 matches per session. Extra matches include a `?cursor=<seq>.<match>` continuation. Multi-line patterns match across up to 16 KiB or 256 entries, with the same window for lookbehind, and matches crossing that boundary note the cutoff. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Context cleared](/compaction#context-cleared)).
|
|
150
|
-
- **Budgets and continuations.** Every `history://` call enforces roughly a 40 KB output cap, a fixed entry cap, and a 3-second nominal time budget. When a call stops early, it returns a `continue with` URL containing `cursor`, `after=<activityMs>.<createdMs>[.<id>]`, and an optional `session=<id>`. Pass that URL unchanged; list continuations expire after 1 minute.
|
|
151
|
-
- **Indexing and storage.** SQLite, libSQL, and PostgreSQL build a trigram index on first search. PostgreSQL installs `pg_trgm` during `atomic storage migrate` or on open when permissions allow. Multi-line patterns scan linearly. The index roughly doubles text-heavy session storage and clears automatically when sessions are deleted or rewritten (`VACUUM` or `VACUUM FULL` reclaims space). Never edit active JSONL files in place outside Atomic's storage APIs.
|
|
152
|
-
|
|
153
|
-
### Searching a stored session in the background
|
|
154
|
-
|
|
155
|
-
Run a read-only CLI search against a local unprefixed SQLite session database without creating indexes, updating indexes, or taking writer locks:
|
|
156
|
-
|
|
157
|
-
```json
|
|
158
|
-
{"command":"atomic storage search-session ./sessions.sqlite my-session 'connection refused'","wait":{"kind":"background"}}
|
|
159
|
-
```
|
|
113
|
+
Sessions marked **internal** are hidden from `/resume`, `atomic -r`, `-c`, and `history://sessions`, while remaining openable by exact session ID. A fresh subagent's own session is internal, whereas a `context: "fork"` subagent's session is a fork of its parent and appears in normal listings.
|
|
160
114
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
This command writes no `-wal` or `-shm` files on cleanly closed databases, stops cleanly if the session's write revision changes mid-scan, and pairs with `bash({ action: "wait", id })` and `kill({ id })`. For JSONL, memory, remote stores, or multi-session listings, use `read` and `search` on `history://`.
|
|
115
|
+
When an 8-character ID prefix passed to `--session` or `--fork` matches both a listed session and internal sessions (such as subagent sessions created around the same time), Atomic selects the listed session.
|
|
164
116
|
|
|
165
117
|
## Naming sessions
|
|
166
118
|
|
|
167
|
-
Set a
|
|
119
|
+
Set a display name interactively with `/name <name>` or at startup with `--name` / `-n`:
|
|
168
120
|
|
|
169
121
|
```bash
|
|
170
122
|
atomic --name "Refactor auth module"
|
|
171
123
|
atomic --name "CI audit" -p "Review this build failure"
|
|
172
124
|
```
|
|
173
125
|
|
|
174
|
-
## Branching with `/tree`
|
|
126
|
+
## Branching with `/tree` {#branching-with-tree}
|
|
175
127
|
|
|
176
|
-
Every session entry carries `id` and `parentId`. `/tree`
|
|
128
|
+
Every session entry carries `id` and `parentId`. Run `/tree` to jump to any earlier entry and start a new branch in place:
|
|
177
129
|
|
|
178
|
-
<p align="center"><img src="images/tree-view.png" alt="Tree
|
|
130
|
+
<p align="center"><img src="images/tree-view.png" alt="Atomic terminal UI showing the interactive Session Tree panel opened by /tree, listing user messages, assistant replies, and tool calls with keyboard filter shortcuts and an inline search bar." width="600" /></p>
|
|
179
131
|
|
|
180
132
|
```text
|
|
181
133
|
├─ user: "Hello, can you help..."
|
|
@@ -189,13 +141,16 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
|
|
|
189
141
|
|
|
190
142
|
### Tree controls
|
|
191
143
|
|
|
144
|
+
Type anywhere in `/tree` to filter entries through the inline search bar.
|
|
145
|
+
|
|
192
146
|
| Key | Action |
|
|
193
147
|
| --- | --- |
|
|
194
148
|
| `↑` / `↓` | Move selection |
|
|
195
149
|
| `←` / `→` | Page up or down |
|
|
196
150
|
| `Ctrl+←` / `Ctrl+→` or `Alt+←` / `Alt+→` | Fold, unfold, or jump between branches |
|
|
197
151
|
| `Shift+L` / `Shift+T` | Set or clear a bookmark label, or toggle label timestamps |
|
|
198
|
-
| `Ctrl+O` | Cycle filter (`default`, `no-tools`, `user-only`, `labeled-only`, `all`; default set by `treeFilterMode`) |
|
|
152
|
+
| `Ctrl+O` / `Shift+Ctrl+O` | Cycle filter forward or backward (`default`, `no-tools`, `user-only`, `labeled-only`, `all`; default set by `treeFilterMode`) |
|
|
153
|
+
| `Ctrl+D` / `Ctrl+T` / `Ctrl+U` / `Ctrl+L` / `Ctrl+A` | Jump directly to `default`, `no-tools`, `user-only`, `labeled-only`, or `all` filter |
|
|
199
154
|
| `Enter` / `Esc` | Select entry or cancel |
|
|
200
155
|
|
|
201
156
|
### Selection behavior
|
|
@@ -204,7 +159,7 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
|
|
|
204
159
|
- **Assistant, tool, or compaction entry.** Moves the active leaf to that entry with an empty editor to continue from there.
|
|
205
160
|
- Navigation persists immediately, so quitting or resuming before sending a message stays on the chosen branch. Pressing `Esc` during branch-summary generation cancels it and reopens `/tree`.
|
|
206
161
|
|
|
207
|
-
## `/tree`, `/fork`, and `/clone`
|
|
162
|
+
## Compare `/tree`, `/fork`, and `/clone` {#tree-fork-and-clone}
|
|
208
163
|
|
|
209
164
|
| Feature | `/tree` | `/fork` | `/clone` |
|
|
210
165
|
| --- | --- | --- | --- |
|
|
@@ -215,12 +170,99 @@ Every session entry carries `id` and `parentId`. `/tree` lets you jump to any en
|
|
|
215
170
|
|
|
216
171
|
`/fork` and `/clone` copy the active path, including worktree snapshots, into a new session.
|
|
217
172
|
|
|
218
|
-
`atomic --fork <id>`, missing-cwd **Fork**, and same-store SDK `forkTo` copy all branches. Cross-store forks copy only current context without retired turns or private task records, and reopening warns `Parent history is in its original store or is no longer available.`. For full portable backups, use `atomic storage export` and `atomic storage import`.
|
|
173
|
+
`atomic --fork <id>`, missing-cwd **Fork**, and same-store SDK `forkTo()` copy all branches. Cross-store forks copy only current context without retired turns or private task records, and reopening warns `Parent history is in its original store or is no longer available.`. For full portable backups of all branches, use `atomic storage export` and `atomic storage import`.
|
|
219
174
|
|
|
220
175
|
## Branch summaries
|
|
221
176
|
|
|
222
177
|
When `/tree` switches away from a branch, Atomic can optionally summarize the abandoned branch. You can choose no summary, the default summary, or custom focus instructions. When `branchSummary.skipPrompt` is enabled, Atomic skips the prompt and defaults to no summary. See [Branch summaries](/compaction#branch-summaries).
|
|
223
178
|
|
|
224
|
-
##
|
|
179
|
+
## Recalling earlier work
|
|
180
|
+
|
|
181
|
+
The agent can inspect past project sessions from any session or subagent using read-only `history://` URLs with `read` and `search`. These URLs work across SQLite, JSONL, memory, and custom stores:
|
|
182
|
+
|
|
183
|
+
| URL | Returns |
|
|
184
|
+
| --- | --- |
|
|
185
|
+
| `history://sessions` | Recent project sessions, newest first (`?limit=N` up to 200, default 25; `?offset=N`; add `?project=all` or `?project=<dir>` only when searching other projects). Uncached JSONL and legacy sessions may show estimated counts. |
|
|
186
|
+
| `history://sessions/<id>` | Full transcript, or an outline with counts and `:N-M` turn links for sessions with more than 2,000 entries, oversized bodies, or cold JSONL files. Lines over 4,000 characters split cleanly. |
|
|
187
|
+
| `history://sessions/<id>:N-M` | 1-based entry ranges (`:N`, `:N+C`, `:N-M,P-Q`; `:raw` omits the heading). |
|
|
188
|
+
|
|
189
|
+
- **Search behavior.** Searching `history://sessions` or `history://` scans the newest 25 sessions per page, excludes the current session (search the current session through its own ID URL), skips `custom` and `worktree_snapshot` entries, and caps output at 10 matches per session. Extra matches include a `?cursor=<seq>.<match>` continuation. Multi-line patterns match across up to 16,384 characters or 256 entries, with the same window for lookbehind, and matches crossing that boundary note the cutoff. After compaction, the boundary message gives the exact session URL and range to recover earlier details ([Context cleared](/compaction#context-cleared)).
|
|
190
|
+
- **Budgets and continuations.** Every `history://` call enforces a 40,000-byte output cap, a 250,000-entry scan cap, and a 3-second nominal time budget. When a call stops early, it returns a `continue with` URL containing `cursor`, `after=<activityMs>.<createdMs>[.<id>]`, and an optional `session=<id>`. Pass that URL unchanged; list continuations expire after 60 seconds.
|
|
191
|
+
- **Indexing and storage.** SQLite, libSQL, and PostgreSQL build a trigram index on first search. PostgreSQL installs `pg_trgm` during `atomic storage migrate` or on open when permissions allow. Multi-line patterns scan linearly. The index roughly doubles text-heavy session storage and clears automatically when sessions are deleted or rewritten (`VACUUM` or `VACUUM FULL` reclaims disk space). Never edit active JSONL files in place outside Atomic's storage APIs.
|
|
192
|
+
|
|
193
|
+
### Searching a stored session in the background
|
|
194
|
+
|
|
195
|
+
Run a read-only CLI search against an existing, unprefixed local SQLite session file without creating indexes, updating indexes, or taking writer locks:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
atomic storage search-session ./sessions.sqlite my-session 'connection refused'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
The full command syntax is `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`. The command requires an existing local SQLite file (it refuses `:memory:`, URLs, and UNC paths). Session IDs must use ASCII `[A-Za-z0-9_-]` (periods `.` are not accepted here, unlike `--session-id`), and an optional numeric cursor such as `6` or `6.2` resumes an earlier scan.
|
|
202
|
+
|
|
203
|
+
This command writes no `-wal` or `-shm` files on cleanly closed databases and stops cleanly if the session's write revision changes mid-scan. Agents can also run it through `bash` with `wait: { kind: "background" }` and monitor it with `bash({ action: "wait", id })` or cancel it with `kill({ id })`. For JSONL, memory, remote stores, or multi-session listings, use `read` and `search` on `history://`.
|
|
204
|
+
|
|
205
|
+
## Session storage
|
|
206
|
+
|
|
207
|
+
Sessions auto-save to `~/.atomic/workflows/journal.sqlite` unless you configure a different store.
|
|
208
|
+
|
|
209
|
+
- **Legacy sessions.** Under the default SQLite store, earlier JSONL sessions in `~/.atomic/agent/sessions` (formats 1 through 3 and older format-4 files) still appear in `/resume` and `--continue`. Opening one imports a copy into SQLite without modifying the original file. If sync conflict copies exist, the newest message wins. Unopened files over 32 KiB display an estimated summary until opened. Selecting a custom store shows only that store.
|
|
210
|
+
- **Project trust and resume hints.** Project-local storage settings apply after project trust approval. New conversations switch before saving, while resumed conversations stay in their original store. Keep generated `--session-dir`, `--session-store`, or `--session-prefix` flags when reopening non-default stores, such as `atomic --session-store "/data/project A/sessions.sqlite" --session-prefix project_ --session <id>`.
|
|
211
|
+
- **Import and export.** `--import <file>` or `/import <file>` imports a JSONL export verbatim, including [worktree snapshots](/worktree-snapshots) written by `/export <file>.jsonl`. Import upgrades older supported formats automatically and raises `SessionExistsError` if the ID already exists. Empty imported IDs reopen through `atomic --session ""` or the picker.
|
|
212
|
+
- **Ephemeral runs (`--no-session`).** Nothing is saved to a resumable store. When an idle subagent is unloaded from memory during `--no-session`, its history is temporarily saved to a private file in your agent directory and removed on exit; stale files left after a crash are cleaned up on a later startup on the same host. See [Releasing idle sessions](/sdk#releasing-idle-sessions).
|
|
213
|
+
- **Session stats (`/session`).** Displays the session ID, message count, tokens, and cost. Counts update after each completed message, and per-model cost and cache breakdowns appear once history matches totals.
|
|
214
|
+
|
|
215
|
+
### Choosing a store
|
|
216
|
+
|
|
217
|
+
Configure `sessions.storage` (sessions only) or top-level `storage` (shared default for sessions and Intercom) in `settings.json`:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"sessions": {
|
|
222
|
+
"storage": { "dir": "sessions" }
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Supported store objects:
|
|
228
|
+
|
|
229
|
+
- `{ "path": "sessions.sqlite" }`: local SQLite database. Works in both `sessions.storage` and `storage`.
|
|
230
|
+
- `{ "dir": "sessions" }`: JSONL directory store. Allowed **only** in `sessions.storage` and `ATOMIC_SESSIONS_STORAGE`. Passing `"dir"` in top-level `storage`, `--storage`, `--storage-file`, or `ATOMIC_STORAGE` fails with `StorageConfigError`.
|
|
231
|
+
- `{ "memory": true }`: ephemeral in-memory store.
|
|
232
|
+
- `{}` (empty object): selects the default session SQLite file (`<storageHome>/workflows/journal.sqlite`) in `sessions.storage` (overriding any shared `storage`), or `<storageHome>/storage.sqlite` in top-level `storage`.
|
|
233
|
+
- Database adapter: [PostgreSQL](/storage#postgresql), [Turso and libSQL](/storage#turso-and-libsql), or a [custom adapter](/storage#selecting-an-adapter).
|
|
234
|
+
|
|
235
|
+
Legacy `sessionDir` has been removed.
|
|
236
|
+
|
|
237
|
+
Store selection follows this precedence order, from highest to lowest:
|
|
238
|
+
|
|
239
|
+
1. Explicit SDK `sessionManager` (bypasses store selection)
|
|
240
|
+
2. SDK `sessionStore`
|
|
241
|
+
3. SDK `createAgentSession({ storage })`
|
|
242
|
+
4. `--session-store`, `--no-session`, or `--session-dir`
|
|
243
|
+
5. `--storage` or `--storage-file`
|
|
244
|
+
6. `ATOMIC_SESSIONS_STORAGE` or `ATOMIC_CODING_AGENT_SESSION_DIR`
|
|
245
|
+
7. `ATOMIC_STORAGE`
|
|
246
|
+
8. `ATOMIC_PROFILE=ci`
|
|
247
|
+
9. `sessions.storage` in `settings.json`
|
|
248
|
+
10. `storage` in `settings.json`
|
|
249
|
+
11. Default local SQLite (`~/.atomic/workflows/journal.sqlite`)
|
|
250
|
+
|
|
251
|
+
Each selection replaces lower-precedence settings as a whole object rather than merging fields. Settings, JSON flags, and JSON environment variables resolve relative paths from [storage home](/storage#storage-home). `--session-dir`, `--session-store`, and `ATOMIC_CODING_AGENT_SESSION_DIR` resolve relative paths from `cwd`.
|
|
252
|
+
|
|
253
|
+
Flag validation rules:
|
|
254
|
+
|
|
255
|
+
- `--session-store` conflicts with `--session-dir` and `--no-session`.
|
|
256
|
+
- Combining a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` with `ATOMIC_SESSIONS_STORAGE`, `--storage`, or `--storage-file` fails startup with `StorageConfigError` (`conflicting-overrides`).
|
|
257
|
+
- `--session-prefix` requires `--session-store` (local SQLite only) and must match `[A-Za-z_][A-Za-z0-9_]*` without starting with `sqlite_` (case-insensitive, so `SQLITE_` is also rejected). Shared databases use `storage.prefix` or `atomic storage join --prefix` with the same pattern; PostgreSQL also requires lowercase ASCII and at most 24 characters.
|
|
258
|
+
- Invalid CLI storage flags exit cleanly with `Error: ...` (exit code `1`). Invalid or unavailable stores always raise a typed error instead of falling back to memory. See [Selecting storage per process](/storage#selecting-storage-per-process).
|
|
259
|
+
|
|
260
|
+
From the SDK, `sessionStore` accepts all five selection kinds (`{ kind: "sqlite", path, prefix? }`, `{ kind: "jsonl", dir }`, `{ kind: "memory" }`, `{ kind: "database", database, prefix? }`, and `{ kind: "adapter", module, options?, secrets?, prefix? }`) or a concrete `SessionStore` instance (`SqlSessionStore`, `JsonlSessionStore`, or `MemorySessionStore`). Passing an explicit `sessionManager` bypasses store selection:
|
|
261
|
+
|
|
262
|
+
```typescript
|
|
263
|
+
const { session } = await createAgentSession({
|
|
264
|
+
sessionStore: { kind: "sqlite", path: "/data/sessions.sqlite" },
|
|
265
|
+
});
|
|
266
|
+
```
|
|
225
267
|
|
|
226
|
-
|
|
268
|
+
See [SDK session storage](/sdk/storage) for PostgreSQL, libSQL, direct `SessionStore`, and store-closing recipes, [SDK and local SQLite API](/storage#sdk-and-local-sqlite-api) for low-level SQLite handles, and [Session file format](/session-format) for JSONL schemas, entry types, and the `SessionManager` API.
|