@bastani/atomic 0.10.14 → 0.10.15-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 +31 -0
- package/README.md +1 -1
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +11 -1
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +80 -67
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +117 -90
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +16 -17
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -19
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +51 -39
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
- package/docs/termux.md +0 -118
package/docs/session-format.md
CHANGED
|
@@ -27,11 +27,9 @@ Do not mix both layouts on the same directory. Files stored under `--<encoded-cw
|
|
|
27
27
|
|
|
28
28
|
Resume and fork selection match by session ID rather than file path. Local artifacts and tool-result files stay on the filesystem even when a session is stored in a database.
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
To delete individual sessions from `/resume`, select a session, press `Ctrl+D`, and confirm. Database stores delete the session record, and JSONL stores use the `trash` CLI when available.
|
|
30
|
+
<Note>
|
|
31
|
+
**Deleting sessions.** To delete individual sessions safely across any store, use `/resume` (`Ctrl+D`) or `SessionManager.deleteSession()` (see [Resuming and deleting sessions](/sessions#resuming-and-deleting-sessions)). Never delete a shared SQLite database file to remove one session; deleting a `.jsonl` file manually in a JSONL store leaves its `<session>.jsonl.idx` index sidecar behind.
|
|
32
|
+
</Note>
|
|
35
33
|
|
|
36
34
|
## Session version
|
|
37
35
|
|
|
@@ -185,7 +183,7 @@ interface BranchSummaryMessage {
|
|
|
185
183
|
}
|
|
186
184
|
```
|
|
187
185
|
|
|
188
|
-
|
|
186
|
+
Active compaction boundaries appear in rebuilt context as visible `custom` messages with `customType: "compaction"`.
|
|
189
187
|
|
|
190
188
|
### AgentMessage union
|
|
191
189
|
|
|
@@ -197,7 +195,6 @@ type AgentMessage =
|
|
|
197
195
|
| BashExecutionMessage
|
|
198
196
|
| CustomMessage
|
|
199
197
|
| BranchSummaryMessage;
|
|
200
|
-
// compactionSummary appears only in older session files and is not part of the active union.
|
|
201
198
|
```
|
|
202
199
|
|
|
203
200
|
`SystemMessage` objects are saved inside `SessionMessageEntry` entries to track prompt and tool changes on each branch, but they are replayed into the session's system prompt and tool set separately rather than appearing in `AgentMessage`.
|
|
@@ -241,7 +238,7 @@ Any session with `internal: true` in its header is excluded from `/resume`, `ato
|
|
|
241
238
|
{"type":"session","version":4,"id":"uuid","createdAt":"2024-12-03T14:00:00.000Z","cwd":"/path/to/project","internal":true}
|
|
242
239
|
```
|
|
243
240
|
|
|
244
|
-
|
|
241
|
+
Atomic does not infer internal status from `parentSessionId`, so ordinary user forks remain listed.
|
|
245
242
|
|
|
246
243
|
### SessionMessageEntry
|
|
247
244
|
|
|
@@ -286,9 +283,9 @@ Records auxiliary model usage (such as prompt cache warming with `kind: "cache_w
|
|
|
286
283
|
|
|
287
284
|
Fields: `kind` (string category), `provider`, `model`, `usage` (`Usage`), and optional `note`.
|
|
288
285
|
|
|
289
|
-
### CompactionEntry
|
|
286
|
+
### CompactionEntry {#compactionentry}
|
|
290
287
|
|
|
291
|
-
Created by `/compact`, RPC `compact`, and automatic compaction. The `summary` field holds the boundary message the model sees next
|
|
288
|
+
Created by `/compact`, RPC `compact`, and automatic compaction. The `summary` field holds the boundary message the model sees next—either a `Context cleared` message or a `Context compacted` message with compacted text, followed by recovery instructions. `firstKeptEntryId` is `null` because no earlier message stays in context.
|
|
292
289
|
|
|
293
290
|
An entry is active only when `details.strategy` is `"verbatim-lines"`:
|
|
294
291
|
|
|
@@ -296,9 +293,15 @@ An entry is active only when `details.strategy` is `"verbatim-lines"`:
|
|
|
296
293
|
{"type":"compaction","id":"c1","parentId":"m9","timestamp":"2026-11-17T10:00:00.000Z","summary":"Context cleared. Your earlier conversation (51,234 tokens) is no longer in your context window. ...","firstKeptEntryId":null,"tokensBefore":51234,"details":{"strategy":"verbatim-lines","promptVersion":7,"parameters":{"query":"fix the test"},"stats":{"linesBefore":812,"linesDeleted":812,"linesKept":0,"rangeCount":0,"tokensBefore":51234,"tokensAfter":2210,"percentReduction":95.7},"form":"cleared","history":{"sessionId":"019f6a2e-...","rangeUnit":"entries","entriesBefore":4210,"boundaryEntry":4211,"totalEntries":4211}}}
|
|
297
294
|
```
|
|
298
295
|
|
|
296
|
+
<Note>
|
|
297
|
+
**Schema compatibility markers.** `"strategy": "verbatim-lines"`, `promptVersion: 7`, and `stats.rangeCount: 0` are retained from earlier line-based compaction versions as stable schema discriminators. They mark an active compaction boundary even on a memory-compaction clear (`form: "cleared"`).
|
|
298
|
+
</Note>
|
|
299
|
+
|
|
299
300
|
Rebuilt context contains one visible `custom` message with `customType: "compaction"` holding `summary`. Messages appended after the boundary stay ordinary messages, and resuming requires no model request.
|
|
300
301
|
|
|
301
|
-
Optional top-level fields on `CompactionEntry` include `usage` (compactor usage), `fromHook` (`true` when an extension supplied compacted text), `systemMessage` (replayed system prompt and tool checkpoint), `coveredThroughEntryId
|
|
302
|
+
Optional top-level fields on `CompactionEntry` include `usage` (compactor usage), `fromHook` (`true` when an extension supplied compacted text), `systemMessage` (replayed system prompt and tool checkpoint), `coveredThroughEntryId`, and `recallSessionId` (legacy fork history link source).
|
|
303
|
+
|
|
304
|
+
- **`coveredThroughEntryId`.** Actively written during resume-budget compaction on Claude models with fixed thinking budgets so newly added resume context (updated instructions, blueprint context, or recovery notices) replays after the boundary. Also present on boundaries written by earlier versions while a tool call waited for its result (current Atomic never writes a boundary while a tool call waits).
|
|
302
305
|
|
|
303
306
|
Key `details` fields include:
|
|
304
307
|
|
|
@@ -311,19 +314,7 @@ Key `details` fields include:
|
|
|
311
314
|
|
|
312
315
|
See [Persistence and resume](/compaction/reference#persistence-and-resume) for every field.
|
|
313
316
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
### ContextCompactionEntry (retired)
|
|
317
|
-
|
|
318
|
-
Older Atomic versions stored logical entry and content-block deletions in `type: "context_compaction"` records:
|
|
319
|
-
|
|
320
|
-
```json
|
|
321
|
-
{"type":"context_compaction","id":"ctx12345","parentId":"f6g7h8i9","timestamp":"2024-12-03T14:12:00.000Z","promptVersion":1,"deletedTargets":[{"kind":"entry","entryId":"b2c3d4e5"}],"protectedEntryIds":["a1b2c3d4"],"stats":{"objectsBefore":20,"objectsAfter":19,"objectsDeleted":1,"tokensBefore":50000,"tokensAfter":43000,"percentReduction":14}}
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
Current Atomic never writes or applies these records. When an old session resumes, content hidden by these records may reappear in context until a new compaction writes an active boundary.
|
|
325
|
-
|
|
326
|
-
### ContextEditEntry
|
|
317
|
+
### ContextEditEntry {#contexteditentry}
|
|
327
318
|
|
|
328
319
|
Append-only edit of one earlier context-producing entry. It changes only future model context; raw history, UI display, exports, and session accounting keep the original entry intact.
|
|
329
320
|
|
|
@@ -335,7 +326,7 @@ Targets may be user, assistant, tool-result, or custom-message entries. `replace
|
|
|
335
326
|
|
|
336
327
|
Atomic writes `context_edit` entries when omitting failed attempts from model context, such as provider retries, model fallbacks, overflow or length recoveries, and interrupted empty replies. Extensions can append them from `turn_end` and `agent_before_settle`.
|
|
337
328
|
|
|
338
|
-
### BranchSummaryEntry
|
|
329
|
+
### BranchSummaryEntry {#branchsummaryentry}
|
|
339
330
|
|
|
340
331
|
Created when `/tree` switches away from a branch with a summary of the abandoned path up to the common ancestor:
|
|
341
332
|
|
|
@@ -371,7 +362,7 @@ Use a unique `customType` to identify your extension's entries on reload. Atomic
|
|
|
371
362
|
{"type":"custom","id":"j0k1l2m3","parentId":"c3d4e5f6","timestamp":"2024-12-03T14:22:00.000Z","customType":"atomic.leaf"}
|
|
372
363
|
```
|
|
373
364
|
|
|
374
|
-
- `resume_timings`: records millisecond restore and blueprint durations for `/session snapshot`. `phases` holds only the phases that ran (`fetch`, `reconstruct`, `materialize`, `lfs`, `verify`, `publish`, `seed`), `mode` is `fresh`, `claimed`, `in-place`, or `degraded`, `fetch` is `none`, `shallow`, `full`, or `bundle`, and `exit` is `ok`, `failed`, or `timed-out`. Read it with `latestResumeTimings(sessionManager)` and format it with `formatResumeTimings()`.
|
|
365
|
+
- `resume_timings`: records millisecond restore and blueprint durations for `/session snapshot`. `phases` holds only the phases that ran (`fetch`, `reconstruct`, `materialize`, `lfs`, `verify`, `publish`, `seed`), `mode` is `"fresh"`, `"claimed"`, `"seeded"`, `"in-place"`, or `"degraded"`, `fetch` is `"none"`, `"shallow"`, `"full"`, or `"bundle"`, and `exit` is `"ok"`, `"failed"`, or `"timed-out"`. Read it with `latestResumeTimings(sessionManager)` and format it with `formatResumeTimings()`.
|
|
375
366
|
|
|
376
367
|
```json
|
|
377
368
|
{"type":"custom","id":"k1l2m3n4","parentId":"j0k1l2m3","timestamp":"2024-12-03T14:23:00.000Z","customType":"resume_timings","data":{"version":1,"startedAt":"2024-12-03T14:22:00.000Z","restores":[{"root":"/home/me/project","mode":"fresh","fetch":"full","ms":18520,"phases":{"fetch":9900,"materialize":1400,"verify":210,"publish":12}}],"blueprint":[{"section":"maintenance","name":"npm install","ms":8600,"exit":"ok"}],"firstPromptReadyMs":28400,"blueprintReadyMs":28300}}
|
|
@@ -420,13 +411,13 @@ Generated one-line session summary written when the agent goes idle and shown in
|
|
|
420
411
|
{"type":"session_summary","id":"l2m3n4o5","parentId":"k1l2m3n4","timestamp":"2024-12-03T14:36:00.000Z","summary":"Refactored auth module token refresh and added retry tests","summarizedThroughId":"j0k1l2m3","usage":{"input":812,"output":21}}
|
|
421
412
|
```
|
|
422
413
|
|
|
423
|
-
- `summary`: stored one-line text with collapsed whitespace and bounded length (up to 160 characters).
|
|
414
|
+
- `summary`: stored one-line text with collapsed whitespace and bounded length (up to 160 characters, truncated with `…`).
|
|
424
415
|
- `summarizedThroughId`: entry ID of the latest user or assistant message covered by the summary. Tool results do not invalidate it, but any newer user or assistant message or a later `branch_summary` retires it.
|
|
425
416
|
- `usage`: optional token usage from the summary request, counted toward session totals.
|
|
426
417
|
|
|
427
|
-
### WorktreeSnapshotEntry
|
|
418
|
+
### WorktreeSnapshotEntry {#worktreesnapshotentry}
|
|
428
419
|
|
|
429
|
-
Repository state of one checkout at the end of a turn that ran a file-writing tool. Never sent to the LLM. See [Worktree snapshots](/worktree-snapshots).
|
|
420
|
+
Repository state of one checkout at the end of a turn that ran a file-writing tool. Never sent to the LLM. See [Worktree snapshots](/worktree-snapshots) and [Worktree snapshots reference](/worktree-snapshots/reference).
|
|
430
421
|
|
|
431
422
|
```json
|
|
432
423
|
{"type":"worktree_snapshot","id":"m3n4o5p6","parentId":"l2m3n4o5","timestamp":"2024-12-03T14:37:00.000Z","root":"/home/me/project","snapshotId":"3f9a...","snapshot":{"version":1,"id":"3f9a...","root":"/home/me/project","remotes":["https://github.com/me/project.git"],"branch":"main","head":"...","tree":"...","envHash":"...","delta":{"base":"head","patch":"...","bytes":412},"chain":[{"tree":"...","patch":"...","bytes":412}],"bundle":null,"omitted":[],"filters":null,"capturedAt":"2024-12-03T14:37:00.000Z","snapshot":"..."}}
|
|
@@ -435,6 +426,7 @@ Repository state of one checkout at the end of a turn that ran a file-writing to
|
|
|
435
426
|
- `snapshot`: present when the state changed; an entry without `snapshot` references an earlier entry with the same `snapshotId`.
|
|
436
427
|
- `restore`: present when a resume restored the snapshot into a new worktree (`{ from, to, snapshotId, tree, restoredAt }`). Later resumes map `from` to `to`.
|
|
437
428
|
- `restore.degraded`: present when a resume restored less than the full snapshot (`{ stage, head, tree, basis?, missingLinks, missingPaths, missingCommits, cause, causeReason?, hint }`). `stage` is `"partial-changes"` or `"closest-commit"`, and `basis` (`"pushed-base"`, `"earlier-snapshot"`, or `"branch-tip"`) identifies the commit source for a closest-commit restore.
|
|
429
|
+
- `restore.degradedWork`: present on a full restore that followed a partial restore in which the session modified files (`{ snapshotId, root, outcome, paths, base?, commit?, ref?, reason? }`). `outcome` is `"applied"` (edits applied cleanly on top), `"kept"` (conflicting edits saved at `commit` / `ref` from `base`), or `"unavailable"` (partial-restore edits could not be read on this machine, with `reason`).
|
|
438
430
|
- `degradedFrom`: present on entries captured in a partly restored worktree to pin the original snapshot ID as the checkout's restore target until a full restore succeeds, `discardDegradedRestore()` releases it, or 30 days pass. On a full restore that carried over edits from a partly restored worktree, `degradedFrom` names the snapshot of those carried-over edits until the merged worktree is recorded or released.
|
|
439
431
|
- `unrestored`: present instead of `restore` when a resume continued without restoring `root` (`{ snapshotId, continuedIn, place, from?, cause, causeReason?, detail, hint, at }`). `place` is `"recorded"` or `"launch"`. When `from` is set on the active checkout, file tools map paths under `from` to `continuedIn` until a later resume restores the checkout.
|
|
440
432
|
- `restoreWarnings`: optional host warnings paired with `restore`, such as `{ code: "lfs-objects-unavailable", paths }` or `{ code: "stale-restore-retained", path, kind }`. Fresh-worktree LFS downloads run after the restore entry is written, so their warnings appear in resume notices instead.
|
|
@@ -468,10 +460,18 @@ It returns model-visible messages paired with their source entries (`entries[].s
|
|
|
468
460
|
|
|
469
461
|
- Without an active boundary, message, custom-message, and branch-summary entries emit verbatim.
|
|
470
462
|
- With `firstKeptEntryId: null`, Atomic emits the boundary message and post-boundary messages only.
|
|
463
|
+
- With `coveredThroughEntryId`, entries between `coveredThroughEntryId` and the compaction boundary replay as ordinary messages after the boundary message (used both for resume-budget additions on Claude models with fixed thinking budgets and for older mid-tool-call boundaries).
|
|
471
464
|
- With a legacy string `firstKeptEntryId`, Atomic emits one `customType: "compaction"` message combining the boundary text and the kept tail (with context edits applied and retained images kept), followed by post-boundary messages. If that entry ID is missing, Atomic omits pre-boundary entries rather than resurrecting older history.
|
|
472
|
-
- With a legacy `coveredThroughEntryId`, entries between that entry and the boundary replay as ordinary messages after the compaction message.
|
|
473
465
|
- Retired `context_compaction` entries and non-verbatim `compaction` entries are skipped as archival records.
|
|
474
466
|
|
|
467
|
+
## Legacy and retired entry types
|
|
468
|
+
|
|
469
|
+
Older session files may contain archival fields and entry types that current Atomic parses for export and audit without reapplying to active context:
|
|
470
|
+
|
|
471
|
+
- **`ContextCompactionEntry` (`type: "context_compaction"`).** Earlier versions stored logical entry and content-block deletions in `context_compaction` records (`deletedTargets`, `protectedEntryIds`, `stats`). Current Atomic never writes or applies them, so content they previously hid may reappear on resume until a new compaction writes an active boundary.
|
|
472
|
+
- **Non-verbatim `compaction` entries and `compactionSummary` messages.** Older `compaction` entries without `details.strategy: "verbatim-lines"`, legacy `compactionSummary` messages, and `custom` entries with `customType: "atomic:background-compaction-result"` remain parseable but are inert in active context.
|
|
473
|
+
- **Legacy `workflow` header metadata.** Older workflow-stage sessions carried `workflow` (`runId`, `stageId`, `stageName`) on `SessionHeader`. Current Atomic does not write new `workflow` metadata and preserves existing fields read-only during export and import.
|
|
474
|
+
|
|
475
475
|
## Parsing example
|
|
476
476
|
|
|
477
477
|
```typescript
|
|
@@ -536,13 +536,15 @@ for (const line of lines) {
|
|
|
536
536
|
}
|
|
537
537
|
```
|
|
538
538
|
|
|
539
|
-
## SessionManager API
|
|
539
|
+
## SessionManager API {#sessionmanager-api}
|
|
540
540
|
|
|
541
541
|
Await `create`, `open`, `continueRecent`, `forkFrom`, and every session mutation. A resolved mutation has committed to its store, and a failed write rejects with a typed storage error without publishing the entry. There is no `flush` method.
|
|
542
542
|
|
|
543
543
|
`inMemory()` selects memory storage explicitly without filesystem I/O. Factories without an explicit store or directory resolve configured storage, defaulting to the shared local SQLite database. Passing a directory selects JSONL explicitly. Store-open failures never fall back to memory. To open SQLite, PostgreSQL, JSONL, or memory stores, see [SDK session storage](/sdk/storage), [Storage](/storage), and [Session management](/sdk/reference#session-management).
|
|
544
544
|
|
|
545
|
-
|
|
545
|
+
<Note>
|
|
546
|
+
**Store ownership and closing.** `SessionManager` has no `close()` method. Calling `SessionManager.create(cwd)`, `SessionManager.continueRecent(cwd)`, or `SessionManager.open(filePath)` without passing a `SessionStore` opens an internal store that `createAgentSession({ sessionManager })` does **not** close during `session.dispose()`. Close `sessionManager.getSessionStore().close()` when finished, or open and close a `SessionStore` explicitly and pass it to `SessionManager.create(store, cwd)` or `SessionManager.open(store, sessionId)`. Calling `close()` twice on a direct `SqlSessionStore`, `JsonlSessionStore`, or `MemorySessionStore` throws `StoreClosedError`, and `SqlSessionStore.close()` leaves a caller-owned `database` open. See [SDK session storage](/sdk/storage).
|
|
547
|
+
</Note>
|
|
546
548
|
|
|
547
549
|
By default, opening an existing session loads only the active tail window (entries from the latest compaction boundary onward, plus required branch metadata) into memory rather than the entire history. Methods below note whether they inspect only entries loaded in memory or read older entries from storage on demand.
|
|
548
550
|
|
|
@@ -550,7 +552,7 @@ By default, opening an existing session loads only the active tail window (entri
|
|
|
550
552
|
|
|
551
553
|
- `SessionManager.create(cwd, sessionDir?, options?)`: create a new session in configured storage, or in flat-layout JSONL when `sessionDir` is provided.
|
|
552
554
|
- `SessionManager.create(store, cwd, options?)`: create a new session in a supplied `SessionStore`.
|
|
553
|
-
- `SessionManager.open(store, sessionId, cwdOverride?, options?)`: open an existing session by exact ID in any `SessionStore` (required for SQLite and PostgreSQL sessions), raising `SessionNotFoundError` if missing.
|
|
555
|
+
- `SessionManager.open(store, sessionId, cwdOverride?, options?)`: open an existing session by exact ID in any `SessionStore` (required for SQLite and PostgreSQL sessions), raising `SessionNotFoundError` if missing. `SessionOpenOptions` accepts `{ history?: "tail" | "full", leafId?: string }`: `"tail"` (default) loads from the latest compaction window; `"full"` loads every stored entry into memory; `leafId` resumes from a specific entry instead of the current leaf. `continueRecent(store, cwd, options?)` and `openSessionById()` share the same options.
|
|
554
556
|
- `SessionManager.open(path, sessionDir?, cwdOverride?, options?)`: open a JSONL file directly by filesystem path, creating it if missing. This is a JSONL file API only and cannot open a SQLite or PostgreSQL session ID.
|
|
555
557
|
- `SessionManager.continueRecent(cwd, sessionDir?, options?)` or `continueRecent(store, cwd, options?)`: continue the most recent regular session or create a new one. Pass `{ includeInternal: true }` to include internal sessions.
|
|
556
558
|
- `SessionManager.inMemory(cwd?, options?)`: create an empty memory-only session synchronously. To seed entries, await `SessionManager.inMemory(cwd, options, entries)` without mutating the supplied array until it resolves.
|
|
@@ -567,11 +569,11 @@ Both methods accept `{ includeInternal: true, signal }`. Select sessions by `Ses
|
|
|
567
569
|
### Session management methods
|
|
568
570
|
|
|
569
571
|
- `newSession(options?)`: start a new session. `NewSessionOptions` accepts `id`, `parentSession`, and `internal` (`internal: true` hides the session from `/resume`, `atomic -r`, `-c`, and `history://sessions` while keeping it openable by ID).
|
|
570
|
-
- `openSessionById(sessionId, cwdOverride?, sessionDirectory?, options?)`: open an existing session by exact ID from this manager's active store (or from a flat-layout JSONL directory when `sessionDirectory` is passed), returning a new `SessionManager`.
|
|
572
|
+
- `openSessionById(sessionId, cwdOverride?, sessionDirectory?, options?)`: open an existing session by exact ID from this manager's active store (or from a flat-layout JSONL directory when `sessionDirectory` is passed), returning a new `SessionManager`. Accepts `SessionOpenOptions` (`{ history?, leafId? }`).
|
|
571
573
|
- `setSessionFile(path)`: switch directly to a JSONL file. For ID-based loading, create a new manager with `SessionManager.open(store, sessionId)` or `manager.openSessionById(sessionId)`.
|
|
572
574
|
- `createBranchedSession(leafId)`: extract a branch into a new session in the same store.
|
|
573
575
|
- `forkTo(cwd, targetStoreOrDir?, options?)`: copy the session into a new session at the destination.
|
|
574
|
-
- `deleteSession(sessionId)`: delete another session and its entries from the active store. Deleting a missing ID is a no-op. Rejects for the currently open session, and raises `SessionOpenElsewhereError` if another live Atomic session holds
|
|
576
|
+
- `deleteSession(sessionId)`: delete another session and its entries from the active store. Deleting a missing ID is a no-op. Rejects for the currently open session, and raises `SessionOpenElsewhereError` if another live Atomic session holds an open-session marker for it (stored in SQL `session_open_markers` or `<agentDir>/open-sessions/<id>/<token>.json`, refreshed every 15 seconds, expiring after 60 seconds on another host or 24 hours without a refresh on a same-host marker lacking a process start time such as macOS—distinct from the per-agent-dir `session-claims/` resume lock). A session deleted while running fails its next save once with `SessionDeletedError`. `SessionStore.delete(sessionId)` is the unguarded store-level operation underneath.
|
|
575
577
|
|
|
576
578
|
### Appending methods
|
|
577
579
|
|
|
@@ -617,7 +619,16 @@ Await `branch`, `resetLeaf`, `recordBranch`, and `branchWithSummary`. All read m
|
|
|
617
619
|
- `getEntries()`: return raw entries loaded in memory, excluding the header. System tool-change messages and `atomic.appendEntry()` extension entries on the active branch stay loaded here; use `readHistory()` or `readEntry(id)` for older retired entries.
|
|
618
620
|
- `hasFullHistory()`: return whether every stored entry is loaded in memory.
|
|
619
621
|
- `loadFullHistory()`: load every stored entry on every branch into memory. Prefer `readHistory()` so large sessions stay bounded; Atomic itself never calls `loadFullHistory()`.
|
|
620
|
-
- `readHistory(
|
|
622
|
+
- `readHistory(options?)`: iterate pages of `{ seq, entry }` with `SessionHistoryReadOptions`:
|
|
623
|
+
- `fromSeq` / `toSeq`: inclusive stored sequence bounds.
|
|
624
|
+
- `direction`: `"forward"` (default) or `"backward"` (starts from the latest page while keeping entries inside each page chronological).
|
|
625
|
+
- `cursor`: resume from `page.nextCursor` without passing new bounds.
|
|
626
|
+
- `limit`: cap entries returned per page.
|
|
627
|
+
- `adjacent`: when `true`, populate `page.adjacent` (`{ older?, newer?, current? }`) cursors for bidirectional navigation without maintaining a cursor stack.
|
|
628
|
+
- `branchLeafSeq`: walk only entries on the path from that stored sequence to the root, including pre-compaction history.
|
|
629
|
+
- `pageEntries`: larger page size for full-session scans (such as exports), still bounded by page byte limits.
|
|
630
|
+
- `signal`: optional `AbortSignal`.
|
|
631
|
+
- Entries over 1 MiB appear as `{ kind: "oversized", seq, bytes }` references instead of truncated objects. Replaced or recreated sessions reject rather than mixing generations.
|
|
621
632
|
- `readHistoryChunks(reference, { offset?, signal? }?)`: read an oversized entry's encoded UTF-8 bytes in chunks of at most 64 KiB. Track consumed bytes to resume at an offset and decode with a streaming UTF-8 decoder.
|
|
622
633
|
- `readSessionHistory(store, sessionId, options?)` and `readSessionHistoryChunks(store, reference, options?)`: imported from `@bastani/atomic/storage` for read-only paged and chunked access directly from a `SessionStore` without opening a `SessionManager`.
|
|
623
634
|
- `readEntry(id)`: read one entry by ID, including entries outside the loaded window, or return `undefined` if absent.
|
|
@@ -628,8 +639,21 @@ Await `branch`, `resetLeaf`, `recordBranch`, and `branchWithSummary`. All read m
|
|
|
628
639
|
- `getWorktreeSnapshotRecords()` and `getLatestWorktreeSnapshots()`: return loaded snapshot records (`getWorktreeSnapshotRecords`) or the latest snapshot per checkout root on the active branch (`getLatestWorktreeSnapshots`).
|
|
629
640
|
- `loadWorktreeSnapshotRecords(ids, { signal? }?)`: resolve snapshot records by ID across any branch, reading the store for records outside the loaded window and omitting unknown IDs.
|
|
630
641
|
- `readWorktreeSnapshotPages({ branch?, direction?, signal? }?)`: iterate `worktree_snapshot` entries in pages of `{ seq, entry }` across all branches or the active branch (`branch: true`) without retaining them in memory.
|
|
631
|
-
- `getAdmissionKeys().has(key)
|
|
632
|
-
- `getSessionRecoveryState()`: return persisted recovery state (admission keys and delivered Intercom message IDs) used to prevent duplicate deliveries after resume.
|
|
642
|
+
- `getAdmissionKeys()` and `getSessionRecoveryState()`: inspect persisted deduplication state used when recovering interrupted sessions. An **admission key** is a durable deduplication token recorded for delivered peer messages, queued prompts, or subagent completions so replaying interrupted deliveries after a crash never processes the same event twice. `getAdmissionKeys().has(key)` checks synchronously whether a key is already recorded; `getSessionRecoveryState()` returns the persisted admission keys and delivered Intercom message IDs.
|
|
633
643
|
- `getHeader()`: return the session header metadata.
|
|
634
644
|
- `getSessionName()` and `getSessionNameState()`: return the display name (`undefined` if unset or cleared), or the durable name state (`{ hasName: false }`, `{ hasName: true }`, or `{ hasName: true, name }`).
|
|
635
645
|
- `getCwd()`, `getSessionDir()`, `getSessionId()`, `getSessionStore()`, `getSessionFile()`, and `isPersisted()`: inspect the session's working directory, JSONL directory (empty string for non-JSONL stores), exact ID, active `SessionStore`, optional JSONL file path, and whether the store is persisted rather than in-memory.
|
|
646
|
+
|
|
647
|
+
### SessionManager and transfer errors
|
|
648
|
+
|
|
649
|
+
| Class | Fields | When |
|
|
650
|
+
| --- | --- | --- |
|
|
651
|
+
| `SessionEntryError` | `entryId`, `reason` (`"missing"`, `"inactive"`, `"not-editable"`, `"not-forkable"`, `"invalid-replacement"`) | Target entry is missing, off the active branch, or invalid for context edits or forking |
|
|
652
|
+
| `SessionHistoryNotLoadedError` | `sessionId` | A full-history operation ran on a tail-loaded `SessionManager` (use `readHistory()` or `loadFullHistory()`) |
|
|
653
|
+
| `SessionIdError` | `sessionId` | Custom session ID is empty or violates `[A-Za-z0-9][A-Za-z0-9._-]*[A-Za-z0-9]` |
|
|
654
|
+
| `SessionDeletedError` | `sessionId` | The currently open session was deleted from its store; fails the next append once, then stops saving |
|
|
655
|
+
| `SessionOpenElsewhereError` | `sessionId`, `pid`, `host` | `deleteSession()` refused because another live process holds an open-session marker for the session |
|
|
656
|
+
| `SessionAlreadyOpenError` | `sessionId`, `pid`, `host`, `exitCode` (`75`) | Resume refused because another live process on the same agent directory already holds the session claim |
|
|
657
|
+
| `ForkSourceIncompleteError` | `sessionId`, `sourceId`, `sourceSeq` | Copying a shared-history fork failed because a parent row or chunk is missing; nothing was written |
|
|
658
|
+
| `StorageTransferError` | `path`, `line?`, `id?`, `reason` | Export or import failed validation before writing anything |
|
|
659
|
+
| `StorageImportIncompleteError` | `written`, `notWritten` | Multi-session import failed partway through; re-running the import writes only `notWritten` sessions |
|