@bastani/atomic 0.10.4-alpha.2 → 0.10.4
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 +194 -0
- package/dist/_shared/chunk-CDOYTDYM.js +4 -0
- package/dist/_shared/chunk-CDOYTDYM.js.map +1 -0
- package/dist/_shared/fork-row-index-UAUAQRD5.js +1 -1
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +2 -2
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +1 -1
- package/dist/_shared/mode-shared-HP7GUA7J.js +4 -4
- package/dist/_shared/sdk-WQIOHVKO.js +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/sql-session-store-5FD3WBMZ.js +9 -9
- package/dist/_shared/startup-0-0-X4NF3GKM.js +9 -5
- package/dist/_shared/startup-0-0-X4NF3GKM.js.map +1 -1
- package/dist/_shared/startup-0-2-KFDYPDJK.js +1 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.js +2 -2
- package/dist/_shared/startup-0-4-HN5EB4K7.js +1 -1
- package/dist/_shared/startup-0-5-OHJNE6JH.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-15-1-4S7FLMNG.js +14 -14
- package/dist/_shared/startup-8-0-34CBHPZH.js +23 -23
- package/dist/_shared/startup-8-1-KQJBDKRU.js +12 -12
- package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +38 -0
- 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/CHANGELOG.md +40 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/CHANGELOG.md +12 -0
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.impl.js +1102 -0
- package/dist/cli/auth-cli.impl.js.map +1 -0
- package/dist/cli/auth-cli.js +28 -1098
- package/dist/cli/auth-cli.js.map +1 -1
- package/dist/cli/blueprint-command.impl.js +906 -0
- package/dist/cli/blueprint-command.impl.js.map +1 -0
- package/dist/cli/blueprint-command.js +27 -901
- package/dist/cli/blueprint-command.js.map +1 -1
- package/dist/cli/intercom-command.impl.js +108 -0
- package/dist/cli/intercom-command.impl.js.map +1 -0
- package/dist/cli/intercom-command.js +29 -105
- package/dist/cli/intercom-command.js.map +1 -1
- package/dist/cli/list-models.impl.js +60 -0
- package/dist/cli/list-models.impl.js.map +1 -0
- package/dist/cli/list-models.js +29 -57
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/session-picker.impl.js +55 -0
- package/dist/cli/session-picker.impl.js.map +1 -0
- package/dist/cli/session-picker.js +30 -53
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.impl.js +5 -0
- package/dist/cli/startup-ui.impl.js.map +1 -0
- package/dist/cli/startup-ui.js +31 -4
- package/dist/cli/storage-command.impl.js +3 -0
- package/dist/cli/storage-command.impl.js.map +1 -0
- package/dist/cli/storage-command.js +31 -2
- package/dist/cli/storage-search-session.impl.js +189 -0
- package/dist/cli/storage-search-session.impl.js.map +1 -0
- package/dist/cli/storage-search-session.js +29 -186
- package/dist/cli/storage-search-session.js.map +1 -1
- package/dist/cli/team-command.impl.js +217 -0
- package/dist/cli/team-command.impl.js.map +1 -0
- package/dist/cli/team-command.js +29 -214
- package/dist/cli/team-command.js.map +1 -1
- package/dist/core/debug.impl.js +3 -0
- package/dist/core/debug.impl.js.map +1 -0
- package/dist/core/debug.js +31 -2
- package/dist/core/export-html/card-projection.impl.js +257 -0
- package/dist/core/export-html/card-projection.impl.js.map +1 -0
- package/dist/core/export-html/card-projection.js +30 -255
- package/dist/core/export-html/card-projection.js.map +1 -1
- package/dist/core/export-html/index.impl.js +610 -0
- package/dist/core/export-html/index.impl.js.map +1 -0
- package/dist/core/export-html/index.js +28 -606
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/json-spans.impl.js +3 -0
- package/dist/core/export-html/json-spans.impl.js.map +1 -0
- package/dist/core/export-html/json-spans.js +31 -2
- package/dist/core/export-html/oversized-render-inputs.impl.js +125 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.js +28 -121
- package/dist/core/export-html/oversized-render-inputs.js.map +1 -1
- package/dist/core/export-html/tool-renderer.impl.js +350 -0
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -0
- package/dist/core/export-html/tool-renderer.js +29 -347
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/jiti-loader.impl.js +3 -0
- package/dist/core/extensions/jiti-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-loader.js +31 -2
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -0
- package/dist/core/extensions/jiti-static-loader.impl.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.js +31 -2
- package/dist/core/extensions/loader-host-modules.impl.js +3 -0
- package/dist/core/extensions/loader-host-modules.impl.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.js +31 -2
- package/dist/core/intercom-broker-control-host.impl.js +5 -0
- package/dist/core/intercom-broker-control-host.impl.js.map +1 -0
- package/dist/core/intercom-broker-control-host.js +31 -4
- package/dist/core/intercom-broker-control.impl.js +18 -0
- package/dist/core/intercom-broker-control.impl.js.map +1 -0
- package/dist/core/intercom-broker-control.js +31 -17
- package/dist/core/intercom-broker-control.js.map +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -0
- package/dist/core/package-manager-storage-adapters.impl.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.js +31 -2
- package/dist/core/sdk.impl.js +9 -0
- package/dist/core/sdk.impl.js.map +1 -0
- package/dist/core/sdk.js +31 -8
- package/dist/core/session-manager-core.js +21 -21
- package/dist/core/session-manager-list.impl.js +3 -0
- package/dist/core/session-manager-list.impl.js.map +1 -0
- package/dist/core/session-manager-list.js +31 -2
- package/dist/core/session-manager.impl.js +8 -0
- package/dist/core/session-manager.impl.js.map +1 -0
- package/dist/core/session-manager.js +31 -7
- package/dist/core/session-storage.impl.js +3 -0
- package/dist/core/session-storage.impl.js.map +1 -0
- package/dist/core/session-storage.js +31 -2
- package/dist/core/storage/index.js +6 -6
- package/dist/core/storage/node-sqlite-thread.js +1 -1
- package/dist/core/storage/node-sqlite.js +1 -1
- package/dist/core/storage/offline-snapshot-file.impl.js +37 -0
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.js +30 -35
- package/dist/core/storage/offline-snapshot-file.js.map +1 -1
- package/dist/core/storage/provider.js +5 -5
- package/dist/core/storage/selection.js +3 -3
- package/dist/core/storage/session/branch-fork-source.impl.js +101 -0
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.js +29 -98
- package/dist/core/storage/session/branch-fork-source.js.map +1 -1
- package/dist/core/storage/session/card-view.impl.js +60 -0
- package/dist/core/storage/session/card-view.impl.js.map +1 -0
- package/dist/core/storage/session/card-view.js +30 -58
- package/dist/core/storage/session/card-view.js.map +1 -1
- package/dist/core/storage/session/child-reader.impl.js +94 -0
- package/dist/core/storage/session/child-reader.impl.js.map +1 -0
- package/dist/core/storage/session/child-reader.js +29 -91
- package/dist/core/storage/session/child-reader.js.map +1 -1
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.js +31 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +639 -0
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.js +28 -635
- package/dist/core/storage/session/expanded-child-details.js.map +1 -1
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.js +31 -2
- package/dist/core/storage/session/fork-row-index.impl.js +3 -0
- package/dist/core/storage/session/fork-row-index.impl.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.js +31 -2
- package/dist/core/storage/session/fork-staging.impl.js +580 -0
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -0
- package/dist/core/storage/session/fork-staging.js +27 -575
- package/dist/core/storage/session/fork-staging.js.map +1 -1
- package/dist/core/storage/session/fork-window.impl.js +477 -0
- package/dist/core/storage/session/fork-window.impl.js.map +1 -0
- package/dist/core/storage/session/fork-window.js +27 -472
- package/dist/core/storage/session/fork-window.js.map +1 -1
- package/dist/core/storage/session/history-pages.impl.js +3 -0
- package/dist/core/storage/session/history-pages.impl.js.map +1 -0
- package/dist/core/storage/session/history-pages.js +31 -2
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.js +31 -2
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.js +31 -2
- package/dist/core/storage/session/memory-session-store.impl.js +3 -0
- package/dist/core/storage/session/memory-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.js +31 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +72 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.js +29 -69
- package/dist/core/storage/session/pinned-branch-resume.js.map +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +465 -0
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -0
- package/dist/core/storage/session/released-history-files.js +29 -462
- package/dist/core/storage/session/released-history-files.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.impl.js +57 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.js +28 -53
- package/dist/core/storage/session/resident-fork-rows.js.map +1 -1
- package/dist/core/storage/session/session-resume.impl.js +3 -0
- package/dist/core/storage/session/session-resume.impl.js.map +1 -0
- package/dist/core/storage/session/session-resume.js +31 -2
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -0
- package/dist/core/storage/session/snapshot-cut.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.js +31 -2
- package/dist/core/storage/session/snapshot-history.impl.js +62 -0
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.js +30 -60
- package/dist/core/storage/session/snapshot-history.js.map +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -0
- package/dist/core/storage/session/sql-session-store.impl.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.js +31 -2
- package/dist/core/storage/session/tree-outline.impl.js +3 -0
- package/dist/core/storage/session/tree-outline.impl.js.map +1 -0
- package/dist/core/storage/session/tree-outline.js +31 -2
- package/dist/core/storage/session/tree-presentation.impl.js +342 -0
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.js +30 -340
- package/dist/core/storage/session/tree-presentation.js.map +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -0
- package/dist/core/storage/storage-status.impl.js.map +1 -0
- package/dist/core/storage/storage-status.js +31 -2
- package/dist/core/storage/team.impl.js +3 -0
- package/dist/core/storage/team.impl.js.map +1 -0
- package/dist/core/storage/team.js +31 -2
- package/dist/core/structured-output/index.impl.js +3 -0
- package/dist/core/structured-output/index.impl.js.map +1 -0
- package/dist/core/structured-output/index.js +31 -2
- package/dist/core/tasks/task-completion-entry.impl.js +254 -0
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.js +30 -252
- package/dist/core/tasks/task-completion-entry.js.map +1 -1
- package/dist/core/tasks/task-file-history.impl.js +379 -0
- package/dist/core/tasks/task-file-history.impl.js.map +1 -0
- package/dist/core/tasks/task-file-history.js +28 -375
- package/dist/core/tasks/task-file-history.js.map +1 -1
- package/dist/core/tasks/task-reference-archive.impl.js +469 -0
- package/dist/core/tasks/task-reference-archive.impl.js.map +1 -0
- package/dist/core/tasks/task-reference-archive.js +31 -468
- package/dist/core/tasks/task-reference-archive.js.map +1 -1
- package/dist/core/tasks/task-reference-identity.impl.js +164 -0
- package/dist/core/tasks/task-reference-identity.impl.js.map +1 -0
- package/dist/core/tasks/task-reference-identity.js +28 -160
- package/dist/core/tasks/task-reference-identity.js.map +1 -1
- package/dist/core/tasks/task-reference-stream.impl.js +3 -0
- package/dist/core/tasks/task-reference-stream.impl.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.js +31 -2
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.js +31 -2
- package/dist/core/tasks/task-view-source.impl.js +3 -0
- package/dist/core/tasks/task-view-source.impl.js.map +1 -0
- package/dist/core/tasks/task-view-source.js +31 -2
- package/dist/core/tools/read-url.impl.js +1530 -0
- package/dist/core/tools/read-url.impl.js.map +1 -0
- package/dist/core/tools/read-url.js +27 -1525
- package/dist/core/tools/read-url.js.map +1 -1
- package/dist/core/worktree-snapshot/blob-store.js +4 -4
- package/dist/core/worktree-snapshot/errors.impl.js +6 -0
- package/dist/core/worktree-snapshot/errors.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.js +31 -5
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +136 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.js +30 -134
- package/dist/core/worktree-snapshot/session-index-reset.js.map +1 -1
- package/dist/extensions/codemode/execute.impl.js +618 -0
- package/dist/extensions/codemode/execute.impl.js.map +1 -0
- package/dist/extensions/codemode/execute.js +28 -614
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/renderer.impl.js +110 -0
- package/dist/extensions/codemode/renderer.impl.js.map +1 -0
- package/dist/extensions/codemode/renderer.js +29 -107
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/mcp/cli.impl.js +565 -0
- package/dist/extensions/mcp/cli.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.js +30 -563
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.impl.js +7 -0
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.js +32 -7
- package/dist/extensions/mcp/cli.lazy.js.map +1 -1
- package/dist/extensions/mcp/runtime.impl.js +5 -0
- package/dist/extensions/mcp/runtime.impl.js.map +1 -0
- package/dist/extensions/mcp/runtime.js +31 -4
- package/dist/main-first-time-setup.impl.js +12 -0
- package/dist/main-first-time-setup.impl.js.map +1 -0
- package/dist/main-first-time-setup.js +31 -11
- package/dist/main-first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.impl.js +293 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.js +30 -291
- package/dist/modes/interactive/components/stored-tree-view.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +191 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.js +30 -189
- package/dist/modes/interactive/components/user-message-selector-archive.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +4 -0
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -0
- package/dist/package-manager-cli.impl.js +1067 -0
- package/dist/package-manager-cli.impl.js.map +1 -0
- package/dist/package-manager-cli.js +32 -1067
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/startup-database-spare.impl.js +108 -0
- package/dist/utils/startup-database-spare.impl.js.map +1 -0
- package/dist/utils/startup-database-spare.js +30 -106
- package/dist/utils/startup-database-spare.js.map +1 -1
- package/dist/utils/tools-manager.impl.js +3 -0
- package/dist/utils/tools-manager.impl.js.map +1 -0
- package/dist/utils/tools-manager.js +31 -2
- package/docs/reference/cli.md +1 -1
- package/package.json +8 -8
|
@@ -1,18 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./intercom-broker-control.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using intercom.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
15
30
|
}
|
|
16
|
-
export { loadIntercomBrokerControl };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=intercom-broker-control.js.map
|
|
31
|
+
export const { loadIntercomBrokerControl } = module;
|
|
32
|
+
//# sourceMappingURL=intercom-broker-control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intercom-broker-control.js","
|
|
1
|
+
{"version":3,"file":"intercom-broker-control.js","sources":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
export { hostStoragePackagesRegistered, registerHostStoragePackages, registerHostStoragePackagesAsync, resolvePackageStorageAdapter } from "../_shared/startup-8-1-KQJBDKRU.js";
|
|
3
|
+
//# sourceMappingURL=package-manager-storage-adapters.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager-storage-adapters.impl.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./package-manager-storage-adapters.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using this feature.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const { hostStoragePackagesRegistered, registerHostStoragePackages, registerHostStoragePackagesAsync, resolvePackageStorageAdapter } = module;
|
|
3
32
|
//# sourceMappingURL=package-manager-storage-adapters.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
import { withFileMutationQueue } from "../_shared/startup-0-0-X4NF3GKM.js";
|
|
3
|
+
import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-7QTG6VJZ.js";
|
|
4
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-KFDYPDJK.js";
|
|
5
|
+
import { createKillTool } from "../_shared/startup-0-5-OHJNE6JH.js";
|
|
6
|
+
import { BASH_SHELL_PRESENTATION, createBashTool, createCodingTools, createEditTool, createFindTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createWriteTool } from "../_shared/startup-8-1-KQJBDKRU.js";
|
|
7
|
+
import { AgentSessionRuntime, HOST_STARTED_SESSION, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createUnstartedAgentSession } from "../_shared/startup-15-1-4S7FLMNG.js";
|
|
8
|
+
export { AgentSessionRuntime, BASH_SHELL_PRESENTATION, HOST_STARTED_SESSION, STRUCTURED_OUTPUT_TOOL_NAME, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createStructuredOutputCapture, createStructuredOutputTool, createUnstartedAgentSession, createWriteTool, getPowerShellConfig, isPowerShellToolResult, withFileMutationQueue, withResourceAdmission };
|
|
9
|
+
//# sourceMappingURL=sdk.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.impl.js","sources":[],"names":[],"mappings":""}
|
package/dist/core/sdk.js
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./sdk.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using this feature.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const { AgentSessionRuntime, BASH_SHELL_PRESENTATION, HOST_STARTED_SESSION, STRUCTURED_OUTPUT_TOOL_NAME, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createStructuredOutputCapture, createStructuredOutputTool, createUnstartedAgentSession, createWriteTool, getPowerShellConfig, isPowerShellToolResult, withFileMutationQueue, withResourceAdmission } = module;
|
|
9
32
|
//# sourceMappingURL=sdk.js.map
|
|
@@ -48,7 +48,7 @@ async function includeNamedForkOutputs(entries, store, sessionId, leaf, epoch, t
|
|
|
48
48
|
id: item.entry.id,
|
|
49
49
|
parentId: item.entry.parentId,
|
|
50
50
|
hash: hashOf(item.entry)
|
|
51
|
-
} : await (await import("./storage/session/chunked-resume-projection.js")).chunkedForkLink(() => historyChunks(store, sessionId, epoch, item, {}));
|
|
51
|
+
} : await (await import("./storage/session/chunked-resume-projection.impl.js")).chunkedForkLink(() => historyChunks(store, sessionId, epoch, item, {}));
|
|
52
52
|
if (links.id !== void 0 && positions.has(links.id)) positions.set(links.id, item.seq);
|
|
53
53
|
const ancestor = links.id === next;
|
|
54
54
|
if (!ancestor && scope === "branch") continue;
|
|
@@ -561,10 +561,10 @@ async function exactDirectoryRelation(source, target) {
|
|
|
561
561
|
/** How many times one append reads the store's new tail and tries again before its failure stands (#4970). */
|
|
562
562
|
const MAX_APPEND_RECONCILES = 3;
|
|
563
563
|
async function resolveSessionStore(cwd) {
|
|
564
|
-
return (await import("./session-storage.js")).resolveSessionStore(cwd);
|
|
564
|
+
return (await import("./session-storage.impl.js")).resolveSessionStore(cwd);
|
|
565
565
|
}
|
|
566
566
|
async function withPriorAnswer(store, resume) {
|
|
567
|
-
const selected = resume.deferredChildren ? await (await import("./storage/session/child-reader.js")).resolveDeferredChildren(store, resume) : resume;
|
|
567
|
+
const selected = resume.deferredChildren ? await (await import("./storage/session/child-reader.impl.js")).resolveDeferredChildren(store, resume) : resume;
|
|
568
568
|
return Object.hasOwn(resume, "priorAnswer") ? selected : {
|
|
569
569
|
...selected,
|
|
570
570
|
priorAnswer: await savedWindowAnswer(store, selected)
|
|
@@ -572,7 +572,7 @@ async function withPriorAnswer(store, resume) {
|
|
|
572
572
|
}
|
|
573
573
|
async function readStoredSession(store, sessionId, options) {
|
|
574
574
|
if (options?.history === "full") return { snapshot: await store.load(sessionId) };
|
|
575
|
-
if (!store.readResume || !store.readRange) return { resume: await (await import("./storage/session/snapshot-history.js")).snapshotWindow(store, sessionId, options?.leafId, void 0, void 0, isProxy) };
|
|
575
|
+
if (!store.readResume || !store.readRange) return { resume: await (await import("./storage/session/snapshot-history.impl.js")).snapshotWindow(store, sessionId, options?.leafId, void 0, void 0, isProxy) };
|
|
576
576
|
return { resume: await withPriorAnswer(store, await store.readResume(sessionId, options?.leafId, { deferChildRecords: true })) };
|
|
577
577
|
}
|
|
578
578
|
async function openSessionFileWindow(path, cwd, options) {
|
|
@@ -636,7 +636,7 @@ function exportedSessionStream(source, outputs, finish) {
|
|
|
636
636
|
return {
|
|
637
637
|
kind: "complete-session",
|
|
638
638
|
async *read() {
|
|
639
|
-
const { forkSeedFields } = await import("./storage/session/chunked-resume-projection.js");
|
|
639
|
+
const { forkSeedFields } = await import("./storage/session/chunked-resume-projection.impl.js");
|
|
640
640
|
for await (const { items } of historyPages(history, id, file.epoch, file.lastSeq, { pageEntries: SESSION_HISTORY_SCAN_ENTRIES })) for (const item of items) {
|
|
641
641
|
let row = "entry" in item ? { entry: item.entry } : file.legacy ? { entry: await readExportedEntry(source, item.seq) } : {
|
|
642
642
|
...await forkSeedFields(() => historyChunks(history, id, file.epoch, item, {})),
|
|
@@ -1039,7 +1039,7 @@ var SessionManager = class SessionManager {
|
|
|
1039
1039
|
if (typeof data?.runId === "string") ids.push(data.runId);
|
|
1040
1040
|
}
|
|
1041
1041
|
} else {
|
|
1042
|
-
const { readChunkedWorkflowRunId } = await import("./storage/session/chunked-resume-projection.js");
|
|
1042
|
+
const { readChunkedWorkflowRunId } = await import("./storage/session/chunked-resume-projection.impl.js");
|
|
1043
1043
|
const id = await readChunkedWorkflowRunId(historyChunks(store, sessionId, historyEpoch, item, {}));
|
|
1044
1044
|
if (id !== void 0) ids.push(id);
|
|
1045
1045
|
}
|
|
@@ -1283,7 +1283,7 @@ var SessionManager = class SessionManager {
|
|
|
1283
1283
|
async legacyForkEntries() {
|
|
1284
1284
|
const snap = await this.store.load(this.sessionId);
|
|
1285
1285
|
if (snap.header.id !== this.sessionId) throw new SessionIdMismatchError(this.sessionId, snap.header.id);
|
|
1286
|
-
const { assertSnapshotCut } = await import("./storage/session/snapshot-cut.js");
|
|
1286
|
+
const { assertSnapshotCut } = await import("./storage/session/snapshot-cut.impl.js");
|
|
1287
1287
|
assertSnapshotCut(snap, this.archiveOnlyEpoch || snap.epoch !== void 0 ? this.historyEpoch : void 0, this.lastSeq);
|
|
1288
1288
|
if (this.lastSeq > 0 && snap.entries[this.lastSeq - 1]?.id !== this.lastEntryId) throw new SessionConflictError(this.sessionId, this.lastSeq, snap.lastSeq);
|
|
1289
1289
|
return snap.entries.slice(0, this.lastSeq);
|
|
@@ -1756,7 +1756,7 @@ var SessionManager = class SessionManager {
|
|
|
1756
1756
|
if (!item) throw new SessionEntryError(targetId, "inactive");
|
|
1757
1757
|
if ("entry" in item) targetRole = item.entry.type === "message" ? item.entry.message.role : item.entry.type === "custom_message" ? "custom" : void 0;
|
|
1758
1758
|
else {
|
|
1759
|
-
const hint = await (await import("./storage/session/chunked-resume-projection.js")).chunkedAnswerHeader(this.readHistoryChunks(item));
|
|
1759
|
+
const hint = await (await import("./storage/session/chunked-resume-projection.impl.js")).chunkedAnswerHeader(this.readHistoryChunks(item));
|
|
1760
1760
|
targetRole = hint.type === "message" ? hint.role : hint.type === "custom_message" ? "custom" : void 0;
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
@@ -2090,7 +2090,7 @@ var SessionManager = class SessionManager {
|
|
|
2090
2090
|
pivot,
|
|
2091
2091
|
epoch: historyEpoch
|
|
2092
2092
|
};
|
|
2093
|
-
return store.readBranchSpan ? store.readBranchSpan(sessionId, cut) : import("./storage/session/snapshot-history.js").then(({ snapshotBranchSpan }) => snapshotBranchSpan(store, sessionId, cut));
|
|
2093
|
+
return store.readBranchSpan ? store.readBranchSpan(sessionId, cut) : import("./storage/session/snapshot-history.impl.js").then(({ snapshotBranchSpan }) => snapshotBranchSpan(store, sessionId, cut));
|
|
2094
2094
|
};
|
|
2095
2095
|
let common = 0;
|
|
2096
2096
|
for (let pivot = Math.min(old, target); pivot > 0;) {
|
|
@@ -2110,7 +2110,7 @@ var SessionManager = class SessionManager {
|
|
|
2110
2110
|
toSeq: old
|
|
2111
2111
|
})) for (const item of items) {
|
|
2112
2112
|
if (item.seq === common && !("entry" in item)) {
|
|
2113
|
-
commonAncestorId = (await (await import("./storage/session/chunked-resume-projection.js")).chunkedAnswerHeader(historyChunks(store, sessionId, historyEpoch, item, {}))).id;
|
|
2113
|
+
commonAncestorId = (await (await import("./storage/session/chunked-resume-projection.impl.js")).chunkedAnswerHeader(historyChunks(store, sessionId, historyEpoch, item, {}))).id;
|
|
2114
2114
|
continue;
|
|
2115
2115
|
}
|
|
2116
2116
|
const entry = "entry" in item ? item.entry : (await readSessionRange(store, sessionId, item.seq, item.seq, historyEpoch)).entries[0];
|
|
@@ -2133,7 +2133,7 @@ var SessionManager = class SessionManager {
|
|
|
2133
2133
|
through: lastSeq,
|
|
2134
2134
|
held,
|
|
2135
2135
|
async *outline(signal) {
|
|
2136
|
-
const { treeOutlineEntry, treeOutlinePages } = await import("./storage/session/tree-outline.js");
|
|
2136
|
+
const { treeOutlineEntry, treeOutlinePages } = await import("./storage/session/tree-outline.impl.js");
|
|
2137
2137
|
for await (const page of treeOutlinePages(store, sessionId, historyEpoch, lastSeq, signal)) yield page.map((row) => {
|
|
2138
2138
|
const local = held.get(row.seq);
|
|
2139
2139
|
return local ? treeOutlineEntry(row.seq, local) : row;
|
|
@@ -2186,7 +2186,7 @@ var SessionManager = class SessionManager {
|
|
|
2186
2186
|
if (from >= 0 && (!boundary || from >= path.indexOf(boundary)) && !path.slice(from + 1).some((entry) => entry.type === "context_edit")) return void 0;
|
|
2187
2187
|
}
|
|
2188
2188
|
if (!this.store.readResume || !this.store.readRange) {
|
|
2189
|
-
const target = await (await import("./storage/session/snapshot-history.js")).snapshotWindow(this.store, this.sessionId, id, this.lastSeq, this.historyEpoch);
|
|
2189
|
+
const target = await (await import("./storage/session/snapshot-history.impl.js")).snapshotWindow(this.store, this.sessionId, id, this.lastSeq, this.historyEpoch);
|
|
2190
2190
|
if (target.leafId !== id) throw new SessionEntryError(id, "missing");
|
|
2191
2191
|
return target;
|
|
2192
2192
|
}
|
|
@@ -2196,7 +2196,7 @@ var SessionManager = class SessionManager {
|
|
|
2196
2196
|
resume = await this.store.readResume(this.sessionId, id, { deferChildRecords: true });
|
|
2197
2197
|
if (resume.lastSeq > this.lastSeq && (this.historyEpoch === void 0 || resume.epoch === this.historyEpoch)) {
|
|
2198
2198
|
if (this.store.readEntrySizes && this.store.readEntryChunk) {
|
|
2199
|
-
const { pinnedBranchResume } = await import("./storage/session/pinned-branch-resume.js");
|
|
2199
|
+
const { pinnedBranchResume } = await import("./storage/session/pinned-branch-resume.impl.js");
|
|
2200
2200
|
resume = await pinnedBranchResume(this.store, this.recordHeader(), this.historyEpoch ?? resume.epoch, this.lastSeq, id);
|
|
2201
2201
|
} else {
|
|
2202
2202
|
const snapshot = await this.store.load(this.sessionId);
|
|
@@ -2269,7 +2269,7 @@ var SessionManager = class SessionManager {
|
|
|
2269
2269
|
}
|
|
2270
2270
|
const leaf = await this.findEntrySeq(leafId);
|
|
2271
2271
|
if (leaf === void 0) throw new SessionEntryError(leafId, "missing");
|
|
2272
|
-
const { humanForkStream } = await import("./storage/session/branch-fork-source.js");
|
|
2272
|
+
const { humanForkStream } = await import("./storage/session/branch-fork-source.impl.js");
|
|
2273
2273
|
const seed = humanForkStream(this.sessionId, this.historyEpoch, this.lastSeq, leaf, leafId, this.labelsById, this.labelTimestampsById);
|
|
2274
2274
|
const record = this.recordHeader(createSessionHeader(createSessionId(), this.cwd, (/* @__PURE__ */ new Date()).toISOString(), this.sessionId));
|
|
2275
2275
|
const store = await this.storeForNewSession();
|
|
@@ -2344,7 +2344,7 @@ var SessionManager = class SessionManager {
|
|
|
2344
2344
|
static capturedFork(store, sessionId, cwd, sessionDir, epoch, watermark, leafId) {
|
|
2345
2345
|
return async () => {
|
|
2346
2346
|
const bounded = store.readForkWindow;
|
|
2347
|
-
const window = bounded ? await bounded.call(store, sessionId, leafId, { archivedReceipts: true }) : (await import("./storage/session/fork-window.js")).fullForkWindow(await store.load(sessionId), leafId);
|
|
2347
|
+
const window = bounded ? await bounded.call(store, sessionId, leafId, { archivedReceipts: true }) : (await import("./storage/session/fork-window.impl.js")).fullForkWindow(await store.load(sessionId), leafId);
|
|
2348
2348
|
if (!window || !leafId) throw new SessionEntryError(leafId, "missing");
|
|
2349
2349
|
if (window.header.id !== sessionId) throw new SessionIdMismatchError(sessionId, window.header.id);
|
|
2350
2350
|
if (epoch !== void 0 && window.epoch !== void 0 && window.epoch !== epoch || watermark !== void 0 && window.lastSeq < watermark) throw new SessionConflictError(sessionId, watermark ?? 0, window.lastSeq);
|
|
@@ -2359,7 +2359,7 @@ var SessionManager = class SessionManager {
|
|
|
2359
2359
|
source.labelsById = labels.labelsById;
|
|
2360
2360
|
source.labelTimestampsById = labels.labelTimestampsById;
|
|
2361
2361
|
const receipts = /* @__PURE__ */ new Map();
|
|
2362
|
-
const entries = bounded ? await includeNamedForkOutputs(forkContextPath(window.entries, sessionId, (await import("./storage/session/fork-window.js")).forkDisplayEvidence(window.entries)), store, sessionId, leafId, window.epoch, watermark ?? window.lastSeq, "branch", receipts) : window.entries;
|
|
2362
|
+
const entries = bounded ? await includeNamedForkOutputs(forkContextPath(window.entries, sessionId, (await import("./storage/session/fork-window.impl.js")).forkDisplayEvidence(window.entries)), store, sessionId, leafId, window.epoch, watermark ?? window.lastSeq, "branch", receipts) : window.entries;
|
|
2363
2363
|
await source.installFork(leafId, entries, receipts, !!bounded);
|
|
2364
2364
|
return source;
|
|
2365
2365
|
};
|
|
@@ -2395,13 +2395,13 @@ var SessionManager = class SessionManager {
|
|
|
2395
2395
|
const held = this.hasFullHistory() && this.fileEntries.length === through + 1 ? this.fileEntries.slice() : void 0;
|
|
2396
2396
|
const relation = await resolveForkStoreRelation(source, store);
|
|
2397
2397
|
const a = forkScope(source);
|
|
2398
|
-
const captured = relation !== "different" && held && a && forkScope(store) && store.readEntrySizes ? await (await import("./storage/session/resident-fork-rows.js")).residentForkRows(held, through) : void 0;
|
|
2398
|
+
const captured = relation !== "different" && held && a && forkScope(store) && store.readEntrySizes ? await (await import("./storage/session/resident-fork-rows.impl.js")).residentForkRows(held, through) : void 0;
|
|
2399
2399
|
const manager = new SessionManager(store, cwd, directory, {
|
|
2400
2400
|
...options,
|
|
2401
2401
|
parentSession: sessionId
|
|
2402
2402
|
});
|
|
2403
2403
|
const receipts = /* @__PURE__ */ new Map();
|
|
2404
|
-
const data = relation === "different" ? await this.forkWindow(this.getBranch(), this.getLeafId(), "session", receipts) : !source.readEntrySizes || !source.readRange || !source.readEntryChunk ? await this.legacyForkEntries() : (await import("./storage/session/branch-fork-source.js")).completeSessionForkStream(sessionId, epoch, through, captured);
|
|
2404
|
+
const data = relation === "different" ? await this.forkWindow(this.getBranch(), this.getLeafId(), "session", receipts) : !source.readEntrySizes || !source.readRange || !source.readEntryChunk ? await this.legacyForkEntries() : (await import("./storage/session/branch-fork-source.impl.js")).completeSessionForkStream(sessionId, epoch, through, captured);
|
|
2405
2405
|
if (relation === "different") manager.markForkOrigin(source);
|
|
2406
2406
|
const hashes = "read" in data ? [] : sessionBlobHashes(source, data);
|
|
2407
2407
|
assertSessionBlobStore(store, manager.sessionId, hashes.length);
|
|
@@ -2417,7 +2417,7 @@ var SessionManager = class SessionManager {
|
|
|
2417
2417
|
const head = await store.readEntrySizes(manager.sessionId, 1, 0);
|
|
2418
2418
|
if (head.epoch !== created.epoch) throw new SessionConflictError(manager.sessionId, created.lastSeq, head.lastSeq);
|
|
2419
2419
|
if (head.lastSeq === created.lastSeq) {
|
|
2420
|
-
const { windowFromSnapshot } = await import("./storage/session/snapshot-history.js");
|
|
2420
|
+
const { windowFromSnapshot } = await import("./storage/session/snapshot-history.impl.js");
|
|
2421
2421
|
manager.restoreOpened({ resume: windowFromSnapshot({
|
|
2422
2422
|
header: manager.recordHeader(),
|
|
2423
2423
|
entries: captured,
|
|
@@ -2429,7 +2429,7 @@ var SessionManager = class SessionManager {
|
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
2431
|
const opened = await readStoredSession(store, manager.sessionId, void 0);
|
|
2432
|
-
const stamp = opened.resume.archiveOnlyEpoch && !("read" in data) ? (await import("./storage/session/snapshot-cut.js")).snapshotStamp({
|
|
2432
|
+
const stamp = opened.resume.archiveOnlyEpoch && !("read" in data) ? (await import("./storage/session/snapshot-cut.impl.js")).snapshotStamp({
|
|
2433
2433
|
header: manager.recordHeader(),
|
|
2434
2434
|
entries: data,
|
|
2435
2435
|
lastSeq: created.lastSeq
|
|
@@ -2692,7 +2692,7 @@ var SessionManager = class SessionManager {
|
|
|
2692
2692
|
if (!supplied) await store.close();
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
|
-
const { listAllSessions } = await import("./session-manager-list.js");
|
|
2695
|
+
const { listAllSessions } = await import("./session-manager-list.impl.js");
|
|
2696
2696
|
return listAllSessions(directoryOrProgress, typeof progressOrSignal === "function" ? progressOrSignal : void 0, options !== void 0 && "includeInternal" in options && options.includeInternal === true, options && "aborted" in options ? options : options?.signal ?? (typeof progressOrSignal === "object" ? progressOrSignal : void 0));
|
|
2697
2697
|
}
|
|
2698
2698
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-manager-list.impl.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./session-manager-list.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using session storage.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const { listAllSessions, listProjectSessions, listSessionsFromDir, resolveParentSessionPaths } = module;
|
|
3
32
|
//# sourceMappingURL=session-manager-list.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
import { CURRENT_SESSION_VERSION, getDefaultSessionDir, getDefaultSessionDirPath } from "../_shared/startup-0-0-X4NF3GKM.js";
|
|
3
|
+
import { buildContextEntries, buildSessionContext, buildSessionProjection, getLatestCompactionBoundaryEntry, getSessionLeafId, sessionEntryToContextMessages } from "../_shared/startup-0-3-T4DVFYWX.js";
|
|
4
|
+
import { SESSION_ALREADY_OPEN_EXIT_CODE, SessionAlreadyOpenError, SessionDeletedError, SessionEntryError, SessionHistoryNotLoadedError, SessionIdError, SessionOpenElsewhereError } from "../_shared/settings-startup-65YEWRV2.js";
|
|
5
|
+
import { assertValidSessionId, findMostRecentSession, isInternalHeader, loadEntriesFromFile, parseSessionEntries } from "../_shared/startup-8-0-34CBHPZH.js";
|
|
6
|
+
import { SessionManager } from "../_shared/startup-10-0-TDQNBDDL.js";
|
|
7
|
+
export { CURRENT_SESSION_VERSION, SESSION_ALREADY_OPEN_EXIT_CODE, SessionAlreadyOpenError, SessionDeletedError, SessionEntryError, SessionHistoryNotLoadedError, SessionIdError, SessionManager, SessionOpenElsewhereError, assertValidSessionId, buildContextEntries, buildSessionContext, buildSessionProjection, findMostRecentSession, getDefaultSessionDir, getDefaultSessionDirPath, getLatestCompactionBoundaryEntry, getSessionLeafId, isInternalHeader, loadEntriesFromFile, parseSessionEntries, sessionEntryToContextMessages };
|
|
8
|
+
//# sourceMappingURL=session-manager.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-manager.impl.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1,8 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./session-manager.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using session storage.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const { CURRENT_SESSION_VERSION, SESSION_ALREADY_OPEN_EXIT_CODE, SessionAlreadyOpenError, SessionDeletedError, SessionEntryError, SessionHistoryNotLoadedError, SessionIdError, SessionManager, SessionOpenElsewhereError, assertValidSessionId, buildContextEntries, buildSessionContext, buildSessionProjection, findMostRecentSession, getDefaultSessionDir, getDefaultSessionDirPath, getLatestCompactionBoundaryEntry, getSessionLeafId, isInternalHeader, loadEntriesFromFile, parseSessionEntries, sessionEntryToContextMessages } = module;
|
|
8
32
|
//# sourceMappingURL=session-manager.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
export { ENGINE_SESSION_STORAGE_FLAG, canIsolateSessionStore, getEngineSessionStorage, projectSettingsChooseSessionStorage, resolveSessionStore, selectSessionSetting, selectSessionStorage, selectSessionStorageWithSettings, selectSessionStorageWithSettingsAsync, sessionStorageSettingsDiffer, takeEngineSessionStorageArg } from "../_shared/startup-8-1-KQJBDKRU.js";
|
|
3
|
+
//# sourceMappingURL=session-storage.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-storage.impl.js","sources":[],"names":[],"mappings":""}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Written by the build (scripts/in-place-update-gate.mjs): when this module's code cannot load in a process of an earlier release
|
|
2
|
+
// that an in-place update left running, the process is told to restart.
|
|
3
|
+
let module;
|
|
4
|
+
try {
|
|
5
|
+
module = await import("./session-storage.impl.js");
|
|
6
|
+
} catch (error) {
|
|
7
|
+
const root = new URL("../", import.meta.url);
|
|
8
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
+
const key = `${root.href}#0.10.4`;
|
|
10
|
+
let release = releases.get(key);
|
|
11
|
+
if (release === undefined) {
|
|
12
|
+
release = (async () => {
|
|
13
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
14
|
+
try {
|
|
15
|
+
const held = await import(new URL(path, root).href);
|
|
16
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
17
|
+
} catch {
|
|
18
|
+
// Not a file this process can load: the next.
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
})();
|
|
23
|
+
releases.set(key, release);
|
|
24
|
+
}
|
|
25
|
+
const running = await release;
|
|
26
|
+
if (running === undefined || running.version === "0.10.4") throw error;
|
|
27
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.4 while this session was running; restart it to keep using session storage.", {
|
|
28
|
+
cause: error,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
export const { ENGINE_SESSION_STORAGE_FLAG, canIsolateSessionStore, getEngineSessionStorage, projectSettingsChooseSessionStorage, resolveSessionStore, selectSessionSetting, selectSessionStorage, selectSessionStorageWithSettings, selectSessionStorageWithSettingsAsync, sessionStorageSettingsDiffer, takeEngineSessionStorageArg } = module;
|
|
3
32
|
//# sourceMappingURL=session-storage.js.map
|
|
@@ -10,23 +10,23 @@ export * from "./provider.js";
|
|
|
10
10
|
export { assertStorageSchemaVersion, assertStoredSchemaVersion } from "./schema.js";
|
|
11
11
|
export { getTeamProfile, inMemorySecret, isPostgresUrl, joinTeam, LIBSQL_ADAPTER_PACKAGE, LOCAL_SESSIONS_STORAGE, leaveTeam, POSTGRES_ADAPTER_PACKAGE, REDACTED_SECRET, selectStorage, selectStorageAsync, TEAM_PREFIX_ENV, TEAM_PROFILE_ENV, TEAM_TOKEN_ENV, TEAM_TOKEN_FILE_ENV, TEAM_URL_ENV, teamProfileSelection, } from "./selection.js";
|
|
12
12
|
export async function readExpandedChildDetails(...args) {
|
|
13
|
-
return (await import("./session/expanded-child-details.js")).readExpandedChildDetails(...args);
|
|
13
|
+
return (await import("./session/expanded-child-details.impl.js")).readExpandedChildDetails(...args);
|
|
14
14
|
}
|
|
15
15
|
export async function readSavedChildLaunch(...args) {
|
|
16
|
-
return (await import("./session/expanded-child-details.js")).readSavedChildLaunch(...args);
|
|
16
|
+
return (await import("./session/expanded-child-details.impl.js")).readSavedChildLaunch(...args);
|
|
17
17
|
}
|
|
18
18
|
export async function readSessionChildCatalog(...args) {
|
|
19
|
-
return (await import("./session/child-reader.js")).readSessionChildCatalog(...args);
|
|
19
|
+
return (await import("./session/child-reader.impl.js")).readSessionChildCatalog(...args);
|
|
20
20
|
}
|
|
21
21
|
export async function findInSessionHistory(...args) {
|
|
22
|
-
return (await import("./session/history-pages.js")).findInSessionHistory(...args);
|
|
22
|
+
return (await import("./session/history-pages.impl.js")).findInSessionHistory(...args);
|
|
23
23
|
}
|
|
24
24
|
// Ordinary storage setup does not open a transcript reader or import its encoders.
|
|
25
25
|
export async function* readSessionHistory(...args) {
|
|
26
|
-
yield* (await import("./session/history-pages.js")).readSessionHistory(...args);
|
|
26
|
+
yield* (await import("./session/history-pages.impl.js")).readSessionHistory(...args);
|
|
27
27
|
}
|
|
28
28
|
export async function* readSessionHistoryChunks(...args) {
|
|
29
|
-
yield* (await import("./session/history-pages.js")).readSessionHistoryChunks(...args);
|
|
29
|
+
yield* (await import("./session/history-pages.impl.js")).readSessionHistoryChunks(...args);
|
|
30
30
|
}
|
|
31
31
|
export * from "./sqlite-facade.js";
|
|
32
32
|
export { switchToWriteAheadLog } from "./write-ahead-log.js";
|
|
@@ -446,7 +446,7 @@ export class ThreadConnection {
|
|
|
446
446
|
* invocation only when the real CLI/storage resolvers select a SQLite store.
|
|
447
447
|
*/
|
|
448
448
|
static async startSpareIfSqlNeeded(args, terminal, stillBeforeMain) {
|
|
449
|
-
const { shouldStartSpareDatabaseThread } = await import("../../utils/startup-database-spare.js");
|
|
449
|
+
const { shouldStartSpareDatabaseThread } = await import("../../utils/startup-database-spare.impl.js");
|
|
450
450
|
if (stillBeforeMain() && shouldStartSpareDatabaseThread(args, false, terminal)) {
|
|
451
451
|
ThreadConnection.startSpare();
|
|
452
452
|
}
|
|
@@ -17,7 +17,7 @@ import { configureConnection, isSqliteBusy, switchToWriteAheadLogSync } from "./
|
|
|
17
17
|
let debugOutput;
|
|
18
18
|
function reportDegradationInDebugMode(degradation) {
|
|
19
19
|
const errno = degradation.cause?.code;
|
|
20
|
-
debugOutput ??= import("../debug.js");
|
|
20
|
+
debugOutput ??= import("../debug.impl.js");
|
|
21
21
|
void debugOutput.then(({ reportDebugAsync: reportDebug }) => reportDebug("storage", "writer-queue-degraded", {
|
|
22
22
|
code: degradation.code,
|
|
23
23
|
reason: degradation.reason,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import "../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
+
import { realpath, stat } from "node:fs/promises";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
import { wrapNodeSqliteDatabase } from "./node-sqlite.js";
|
|
5
|
+
import { DatabaseSync } from "node:sqlite";
|
|
6
|
+
// dist/core/storage/offline-snapshot-file.js
|
|
7
|
+
/** A dedicated connection, never a live application's facade. The relaxed space check requires exclusive access across commits. */
|
|
8
|
+
async function withOfflineSnapshotFile(file, move) {
|
|
9
|
+
const path = await realpath(file);
|
|
10
|
+
async function requireCleanWal() {
|
|
11
|
+
const wal = await stat(`${path}-wal`).catch((error) => {
|
|
12
|
+
if (error.code !== "ENOENT") throw error;
|
|
13
|
+
});
|
|
14
|
+
if (wal && wal.size > 0) throw new Error("Close all database users cleanly before offline chunk maintenance; the existing write-ahead log is not empty.");
|
|
15
|
+
}
|
|
16
|
+
await requireCleanWal();
|
|
17
|
+
const url = pathToFileURL(path);
|
|
18
|
+
url.searchParams.set("mode", "rw");
|
|
19
|
+
const raw = new DatabaseSync(url.href);
|
|
20
|
+
try {
|
|
21
|
+
raw.exec("PRAGMA busy_timeout=0; PRAGMA locking_mode=EXCLUSIVE; BEGIN EXCLUSIVE; COMMIT");
|
|
22
|
+
await requireCleanWal();
|
|
23
|
+
if (raw.prepare("PRAGMA journal_mode").get()?.journal_mode !== "wal") throw new Error("Offline chunk maintenance requires a local SQLite database already in WAL mode.");
|
|
24
|
+
if (raw.prepare("PRAGMA auto_vacuum").get()?.auto_vacuum === 1) throw new Error("Offline chunk maintenance cannot bound the log with auto_vacuum=FULL.");
|
|
25
|
+
const database = wrapNodeSqliteDatabase(raw);
|
|
26
|
+
try {
|
|
27
|
+
await move(database);
|
|
28
|
+
} finally {
|
|
29
|
+
await database.close();
|
|
30
|
+
}
|
|
31
|
+
} finally {
|
|
32
|
+
raw.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export { withOfflineSnapshotFile };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=offline-snapshot-file.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline-snapshot-file.impl.js","names":[],"sources":["../../../src/core/storage/offline-snapshot-file.ts"],"mappings":";;;;;;;AAOA,eAAsB,wBACrB,MACA,MAAiD;CAEjD,MAAM,OAAO,MAAM,SAAS,IAAI;CAChC,eAAe,kBAAe;EAC7B,MAAM,MAAM,MAAM,KAAK,GAAG,KAAI,KAAM,CAAC,CAAC,OAAO,UAAgC;GAC5E,IAAI,MAAM,SAAS,UAAU,MAAM;EAEpC,CAAC;EACD,IAAI,OAAO,IAAI,OAAO,GACrB,MAAM,IAAI,MACT,+GAA+G;CAElH;CACA,MAAM,gBAAe;CACrB,MAAM,MAAM,cAAc,IAAI;CAC9B,IAAI,aAAa,IAAI,QAAQ,IAAI;CACjC,MAAM,MAAM,IAAI,aAAa,IAAI,IAAI;CACrC,IAAI;EAEH,IAAI,KAAK,+EAA+E;EACxF,MAAM,gBAAe;EACrB,IAAI,IAAI,QAAQ,qBAAqB,CAAC,CAAC,IAAG,CAAE,EAAE,iBAAiB,OAC9D,MAAM,IAAI,MAAM,iFAAiF;EAClG,IAAI,IAAI,QAAQ,oBAAoB,CAAC,CAAC,IAAG,CAAE,EAAE,gBAAgB,GAC5D,MAAM,IAAI,MAAM,uEAAuE;EACxF,MAAM,WAAW,uBAAuB,GAAG;EAC3C,IAAI;GACH,MAAM,KAAK,QAAQ;EACpB,UAAU;GACT,MAAM,SAAS,MAAK;EACrB;CACD,UAAU;EACT,IAAI,MAAK;CACV;AACD"}
|