@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
|
@@ -6957,7 +6957,7 @@ function createStructuredOutputTool(options) {
|
|
|
6957
6957
|
maxResultSizeChars: Infinity,
|
|
6958
6958
|
structuredOutput: true,
|
|
6959
6959
|
async execute(_toolCallId, params, signal, _onUpdate, ctx) {
|
|
6960
|
-
const { generateStructuredOutput } = await import("../core/structured-output/index.js");
|
|
6960
|
+
const { generateStructuredOutput } = await import("../core/structured-output/index.impl.js");
|
|
6961
6961
|
const value = (await generateStructuredOutput({
|
|
6962
6962
|
schema: options.schema,
|
|
6963
6963
|
instructions: params.instructions,
|
|
@@ -3938,7 +3938,7 @@ let loadingCodemodeRenderers;
|
|
|
3938
3938
|
/** Load the rich codemode result renderer (syntax highlighter + nested ToolBlock group) on first use. */
|
|
3939
3939
|
function loadCodemodeRenderers() {
|
|
3940
3940
|
if (loadedCodemodeRenderers) return Promise.resolve(loadedCodemodeRenderers);
|
|
3941
|
-
loadingCodemodeRenderers ??= import("../extensions/codemode/renderer.js").then((mod) => {
|
|
3941
|
+
loadingCodemodeRenderers ??= import("../extensions/codemode/renderer.impl.js").then((mod) => {
|
|
3942
3942
|
loadedCodemodeRenderers = mod.codemodeRenderers;
|
|
3943
3943
|
return mod.codemodeRenderers;
|
|
3944
3944
|
}, (error) => {
|
|
@@ -3979,7 +3979,7 @@ function createCodemodeToolDefinition(options = {}) {
|
|
|
3979
3979
|
variants: { openai_lark: CODEMODE_SOURCE_GRAMMAR }
|
|
3980
3980
|
},
|
|
3981
3981
|
execute: async (id, input, signal, update, ctx) => {
|
|
3982
|
-
const [{ executeCodemode }] = await Promise.all([import("../extensions/codemode/execute.js"), ctx?.hasUI ? loadCodemodeRenderers().catch(() => void 0) : Promise.resolve(void 0)]);
|
|
3982
|
+
const [{ executeCodemode }] = await Promise.all([import("../extensions/codemode/execute.impl.js"), ctx?.hasUI ? loadCodemodeRenderers().catch(() => void 0) : Promise.resolve(void 0)]);
|
|
3983
3983
|
return executeCodemode(id, input, signal, update, ctx, options);
|
|
3984
3984
|
},
|
|
3985
3985
|
renderCall(args, theme, context) {
|
|
@@ -4438,7 +4438,7 @@ async function redirectOversizedToolResult(input) {
|
|
|
4438
4438
|
// dist/core/workspace/git.js
|
|
4439
4439
|
/** Git provisioning's git (#4322): a system git when it is recent enough, else a portable one it downloads. */
|
|
4440
4440
|
const PROVISIONED_GIT = async (signal) => {
|
|
4441
|
-
const { resolveGit } = await import("../utils/tools-manager.js");
|
|
4441
|
+
const { resolveGit } = await import("../utils/tools-manager.impl.js");
|
|
4442
4442
|
const git = await resolveGit({ signal });
|
|
4443
4443
|
const env = {};
|
|
4444
4444
|
for (const [key, value] of Object.entries(git.env)) if (value !== void 0) env[key] = value;
|
|
@@ -53,7 +53,7 @@ function worktreeSnapshotExcludedRoots() {
|
|
|
53
53
|
}
|
|
54
54
|
// dist/core/worktree-snapshot/git.js
|
|
55
55
|
const provisionedGit = async (signal) => {
|
|
56
|
-
const { resolveGit } = await import("../utils/tools-manager.js");
|
|
56
|
+
const { resolveGit } = await import("../utils/tools-manager.impl.js");
|
|
57
57
|
return resolveGit({ signal });
|
|
58
58
|
};
|
|
59
59
|
let resolveExecutable = provisionedGit;
|
|
@@ -72,7 +72,7 @@ function withWorktreeSnapshotGit(executable, action) {
|
|
|
72
72
|
*/
|
|
73
73
|
async function installedGitUnavailable() {
|
|
74
74
|
if (resolveExecutable !== provisionedGit) return void 0;
|
|
75
|
-
const { resolveInstalledGit } = await import("../utils/tools-manager.js");
|
|
75
|
+
const { resolveInstalledGit } = await import("../utils/tools-manager.impl.js");
|
|
76
76
|
try {
|
|
77
77
|
await resolveInstalledGit();
|
|
78
78
|
return;
|
|
@@ -15792,7 +15792,7 @@ const TRANSPILE_CACHE_USE_MARK_MS = 36e5;
|
|
|
15792
15792
|
const transpileCacheUseMarks = /* @__PURE__ */ new Map();
|
|
15793
15793
|
const transpileCachePrunes = /* @__PURE__ */ new Map();
|
|
15794
15794
|
function getCreateJiti() {
|
|
15795
|
-
createJitiPromise ??= (isBunBinary || isBundledBuild ? import("../core/extensions/jiti-static-loader.js") : import("../core/extensions/jiti-loader.js")).then((module) => process.versions.bun === void 0 ? module.createJiti : ((id, options) => module.createJiti(id, {
|
|
15795
|
+
createJitiPromise ??= (isBunBinary || isBundledBuild ? import("../core/extensions/jiti-static-loader.impl.js") : import("../core/extensions/jiti-loader.impl.js")).then((module) => process.versions.bun === void 0 ? module.createJiti : ((id, options) => module.createJiti(id, {
|
|
15796
15796
|
tryNative: false,
|
|
15797
15797
|
...options
|
|
15798
15798
|
})));
|
|
@@ -246,7 +246,7 @@ function getContextUsage() {
|
|
|
246
246
|
*/
|
|
247
247
|
async function exportToHtml(outputPath, options = {}) {
|
|
248
248
|
const themeName = [options.themeName, this.settingsManager.getTheme()].find((candidate) => candidate !== void 0 && getThemeByName(candidate) !== void 0);
|
|
249
|
-
const [{ exportSessionToHtml }, { createToolHtmlRenderer }] = await loadOnDemand("session export", () => Promise.all([import("../core/export-html/index.js"), import("../core/export-html/tool-renderer.js")]));
|
|
249
|
+
const [{ exportSessionToHtml }, { createToolHtmlRenderer }] = await loadOnDemand("session export", () => Promise.all([import("../core/export-html/index.impl.js"), import("../core/export-html/tool-renderer.impl.js")]));
|
|
250
250
|
const toolRenderer = createToolHtmlRenderer({
|
|
251
251
|
getToolRenderers: (name) => this.extensionRunner.resolveToolRenderers(name, () => this.getToolDefinition(name)),
|
|
252
252
|
theme,
|
|
@@ -931,7 +931,7 @@ async function createSessionManagerWithStore(parsed, cwd, settingsManager, store
|
|
|
931
931
|
if (parsed.resume) {
|
|
932
932
|
initTheme(settingsManager.getTheme(), true);
|
|
933
933
|
try {
|
|
934
|
-
const { selectSession } = await import("../cli/session-picker.js");
|
|
934
|
+
const { selectSession } = await import("../cli/session-picker.impl.js");
|
|
935
935
|
const selected = await selectSession((onProgress) => SessionManager.list(cwd, store, onProgress), (onProgress) => SessionManager.listAll(store, onProgress), settingsManager, store.descriptor.adapter === "jsonl" ? void 0 : (id) => deleteSessionFromPicker(store, id));
|
|
936
936
|
if (selected === null) {
|
|
937
937
|
console.log(chalk.dim("No session selected"));
|
|
@@ -954,7 +954,7 @@ async function createSessionManagerWithStore(parsed, cwd, settingsManager, store
|
|
|
954
954
|
return createProvisionalSession(store, cwd, parsed.sessionId);
|
|
955
955
|
}
|
|
956
956
|
async function promptStartupSelector(title, options, settingsManager) {
|
|
957
|
-
const { showStartupSelector } = await import("../cli/startup-ui.js");
|
|
957
|
+
const { showStartupSelector } = await import("../cli/startup-ui.impl.js");
|
|
958
958
|
return showStartupSelector(settingsManager, title, options.map((option) => ({
|
|
959
959
|
label: option,
|
|
960
960
|
value: option
|
|
@@ -7636,7 +7636,7 @@ var IsolatedInteractiveRuntime = class extends AgentSessionRuntime {
|
|
|
7636
7636
|
let local = archive.copyPrivateMirror(sessionId, true);
|
|
7637
7637
|
const complete = await SessionManager.openLinearPrivateMirror(local, sessionId, cwd, changes, decoded);
|
|
7638
7638
|
if (!complete && changes.size) {
|
|
7639
|
-
const { readSessionHistory, readSessionHistoryChunks } = await import("../core/storage/session/history-pages.js");
|
|
7639
|
+
const { readSessionHistory, readSessionHistoryChunks } = await import("../core/storage/session/history-pages.impl.js");
|
|
7640
7640
|
local = await fresh();
|
|
7641
7641
|
let position = 1;
|
|
7642
7642
|
for await (const p of readSessionHistory(archive, sessionId, { pageEntries: SESSION_HISTORY_SCAN_ENTRIES })) position = await appendPage(local, p, position, (item) => readSessionHistoryChunks(archive, item), changes);
|
|
@@ -8054,25 +8054,25 @@ async function main(argv, options) {
|
|
|
8054
8054
|
await exitAfterCommand();
|
|
8055
8055
|
return;
|
|
8056
8056
|
}
|
|
8057
|
-
const { handlePackageCommand } = await import("../package-manager-cli.js");
|
|
8057
|
+
const { handlePackageCommand } = await import("../package-manager-cli.impl.js");
|
|
8058
8058
|
if (await handlePackageCommand(args, { extensionFactories })) {
|
|
8059
8059
|
await exitAfterCommand();
|
|
8060
8060
|
return;
|
|
8061
8061
|
}
|
|
8062
8062
|
}
|
|
8063
8063
|
if (args[0] === "config") {
|
|
8064
|
-
const { handleConfigCommand } = await import("../package-manager-cli.js");
|
|
8064
|
+
const { handleConfigCommand } = await import("../package-manager-cli.impl.js");
|
|
8065
8065
|
if (await handleConfigCommand(args, { extensionFactories })) return;
|
|
8066
8066
|
}
|
|
8067
8067
|
if (args[0] === "auth") {
|
|
8068
|
-
const { runAuthCommand } = await import("../cli/auth-cli.js");
|
|
8068
|
+
const { runAuthCommand } = await import("../cli/auth-cli.impl.js");
|
|
8069
8069
|
if (await runAuthCommand(args)) {
|
|
8070
8070
|
await exitAfterCommand();
|
|
8071
8071
|
return;
|
|
8072
8072
|
}
|
|
8073
8073
|
}
|
|
8074
8074
|
if (args[0] === "mcp") {
|
|
8075
|
-
const { loadMcpCommand } = await import("../extensions/mcp/cli.lazy.js");
|
|
8075
|
+
const { loadMcpCommand } = await import("../extensions/mcp/cli.lazy.impl.js");
|
|
8076
8076
|
const { runMcpCommand } = await loadMcpCommand();
|
|
8077
8077
|
process.exitCode = await runMcpCommand(args.slice(1), {
|
|
8078
8078
|
cwd,
|
|
@@ -8082,7 +8082,7 @@ async function main(argv, options) {
|
|
|
8082
8082
|
return;
|
|
8083
8083
|
}
|
|
8084
8084
|
if (args[0] === "storage") {
|
|
8085
|
-
const { runStorageCommand } = await import("../cli/storage-command.js");
|
|
8085
|
+
const { runStorageCommand } = await import("../cli/storage-command.impl.js");
|
|
8086
8086
|
process.exitCode = await runStorageCommand(args.slice(1), {
|
|
8087
8087
|
cwd,
|
|
8088
8088
|
agentDir
|
|
@@ -8091,7 +8091,7 @@ async function main(argv, options) {
|
|
|
8091
8091
|
return;
|
|
8092
8092
|
}
|
|
8093
8093
|
if (args[0] === "blueprint") {
|
|
8094
|
-
const { runBlueprintCommand } = await import("../cli/blueprint-command.js");
|
|
8094
|
+
const { runBlueprintCommand } = await import("../cli/blueprint-command.impl.js");
|
|
8095
8095
|
process.exitCode = await runBlueprintCommand(args.slice(1), {
|
|
8096
8096
|
cwd,
|
|
8097
8097
|
agentDir
|
|
@@ -8100,7 +8100,7 @@ async function main(argv, options) {
|
|
|
8100
8100
|
return;
|
|
8101
8101
|
}
|
|
8102
8102
|
if (args[0] === "team") {
|
|
8103
|
-
const { runTeamCommand } = await import("../cli/team-command.js");
|
|
8103
|
+
const { runTeamCommand } = await import("../cli/team-command.impl.js");
|
|
8104
8104
|
process.exitCode = await runTeamCommand(args.slice(1), {
|
|
8105
8105
|
cwd,
|
|
8106
8106
|
agentDir
|
|
@@ -8109,7 +8109,7 @@ async function main(argv, options) {
|
|
|
8109
8109
|
return;
|
|
8110
8110
|
}
|
|
8111
8111
|
if (args[0] === "intercom") {
|
|
8112
|
-
const { runIntercomCommand } = await import("../cli/intercom-command.js");
|
|
8112
|
+
const { runIntercomCommand } = await import("../cli/intercom-command.impl.js");
|
|
8113
8113
|
process.exitCode = await runIntercomCommand(args.slice(1), { agentDir });
|
|
8114
8114
|
await exitAfterCommand();
|
|
8115
8115
|
return;
|
|
@@ -8133,7 +8133,7 @@ async function main(argv, options) {
|
|
|
8133
8133
|
let result;
|
|
8134
8134
|
try {
|
|
8135
8135
|
const outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
|
|
8136
|
-
const { exportFromFile } = await import("../core/export-html/index.js");
|
|
8136
|
+
const { exportFromFile } = await import("../core/export-html/index.impl.js");
|
|
8137
8137
|
result = await exportFromFile(parsed.export, outputPath);
|
|
8138
8138
|
} catch (error) {
|
|
8139
8139
|
const message = error instanceof Error ? error.message : "Failed to export session";
|
|
@@ -8254,7 +8254,7 @@ async function main(argv, options) {
|
|
|
8254
8254
|
if (shouldRestoreStdoutForMetadata) restoreStdout();
|
|
8255
8255
|
if (parsed.help) printHelp(resourceLoader.getExtensions().extensions.flatMap((extension) => Array.from(extension.flags.values())));
|
|
8256
8256
|
else {
|
|
8257
|
-
const { listModels } = await import("../cli/list-models.js");
|
|
8257
|
+
const { listModels } = await import("../cli/list-models.impl.js");
|
|
8258
8258
|
await listModels(modelRuntime, typeof parsed.listModels === "string" ? parsed.listModels : void 0, startupSettingsManager);
|
|
8259
8259
|
}
|
|
8260
8260
|
process.exit(0);
|
|
@@ -8263,7 +8263,7 @@ async function main(argv, options) {
|
|
|
8263
8263
|
setCliStorageSelection(parsed.storage, cwd);
|
|
8264
8264
|
selectProcessStorage("shared", agentDir, cwd);
|
|
8265
8265
|
if (engineEnv.child !== "1") {
|
|
8266
|
-
const { assertTeamAdapterInstalled } = await import("../core/storage/team.js");
|
|
8266
|
+
const { assertTeamAdapterInstalled } = await import("../core/storage/team.impl.js");
|
|
8267
8267
|
await assertTeamAdapterInstalled(agentDir);
|
|
8268
8268
|
}
|
|
8269
8269
|
} catch (error) {
|
|
@@ -8272,7 +8272,7 @@ async function main(argv, options) {
|
|
|
8272
8272
|
process.exit(1);
|
|
8273
8273
|
}
|
|
8274
8274
|
const globalStorage = bootstrapSettingsManager.getGlobalSettings().storage;
|
|
8275
|
-
const sharedStorageWarning = engineEnv.child !== "1" && (processSharedStorageSelection() !== void 0 || globalStorage !== void 0 && "adapter" in globalStorage) ? import("../core/storage/storage-status.js").then(({ checkSharedStorageAdapter }) => checkSharedStorageAdapter(agentDir, globalStorage)).catch(() => void 0) : void 0;
|
|
8275
|
+
const sharedStorageWarning = engineEnv.child !== "1" && (processSharedStorageSelection() !== void 0 || globalStorage !== void 0 && "adapter" in globalStorage) ? import("../core/storage/storage-status.impl.js").then(({ checkSharedStorageAdapter }) => checkSharedStorageAdapter(agentDir, globalStorage)).catch(() => void 0) : void 0;
|
|
8276
8276
|
const builtinPackagePaths = options?.builtinPackagePaths;
|
|
8277
8277
|
const trustPromptMode = appMode;
|
|
8278
8278
|
const projectTrustByCwd = new Map(Object.entries(engineEnv.trustDecisions?.projects ?? {}));
|
|
@@ -8837,7 +8837,7 @@ async function main(argv, options) {
|
|
|
8837
8837
|
const { initialMessage, initialImages } = await prepareInitialMessage(parsed, stdinContent);
|
|
8838
8838
|
time("prepareInitialMessage");
|
|
8839
8839
|
if (appMode === "interactive" && shouldRunFirstTimeSetup()) {
|
|
8840
|
-
const { runFirstTimeSetup } = await import("../main-first-time-setup.js");
|
|
8840
|
+
const { runFirstTimeSetup } = await import("../main-first-time-setup.impl.js");
|
|
8841
8841
|
startupEarlyInputCapture = await runFirstTimeSetup(appMode, settingsManager, startupEarlyInputCapture);
|
|
8842
8842
|
}
|
|
8843
8843
|
initTheme(settingsManager.getTheme(), appMode === "interactive");
|
|
@@ -984,7 +984,7 @@ async function readSessionTail(store, sessionId, fromSeq) {
|
|
|
984
984
|
async function readSessionRange(store, sessionId, startSeq, endSeq, expectedEpoch) {
|
|
985
985
|
if (store.readRange) return expectedEpoch === void 0 ? store.readRange(sessionId, startSeq, endSeq) : store.readRange(sessionId, startSeq, endSeq, expectedEpoch);
|
|
986
986
|
const snapshot = await store.load(sessionId);
|
|
987
|
-
const { assertSnapshotCut } = await import("../core/storage/session/snapshot-history.js");
|
|
987
|
+
const { assertSnapshotCut } = await import("../core/storage/session/snapshot-history.impl.js");
|
|
988
988
|
assertSnapshotCut(snapshot, expectedEpoch, Math.min(endSeq, snapshot.lastSeq));
|
|
989
989
|
return {
|
|
990
990
|
...sessionRangeOf(snapshot.entries, startSeq, endSeq),
|
|
@@ -1306,7 +1306,7 @@ function storeSnapshotIndex(store, sessionId, epoch, through) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
/** The whole entry behind `reference`, when it is a snapshot entry; its type is read first, without its body. */
|
|
1308
1308
|
async function oversizedSnapshotEntry(cut, reference, signal) {
|
|
1309
|
-
const { chunkedBranchState } = await import("../core/storage/session/chunked-resume-projection.js");
|
|
1309
|
+
const { chunkedBranchState } = await import("../core/storage/session/chunked-resume-projection.impl.js");
|
|
1310
1310
|
const { type } = await chunkedBranchState(() => cut.chunks(reference, signal));
|
|
1311
1311
|
if (type !== "worktree_snapshot") return void 0;
|
|
1312
1312
|
const decoder = new TextDecoder();
|
|
@@ -2113,7 +2113,7 @@ async function* historyPages(store, sessionId, epoch, watermark, options, packet
|
|
|
2113
2113
|
end: pinned.end,
|
|
2114
2114
|
older: true,
|
|
2115
2115
|
newer: pinned.newer
|
|
2116
|
-
} : store.readBranchSpan ? await store.readBranchSpan(sessionId, branchCut) : await (await import("../core/storage/session/snapshot-history.js")).snapshotBranchSpan(snapshotSource(store), sessionId, branchCut);
|
|
2116
|
+
} : store.readBranchSpan ? await store.readBranchSpan(sessionId, branchCut) : await (await import("../core/storage/session/snapshot-history.impl.js")).snapshotBranchSpan(snapshotSource(store), sessionId, branchCut);
|
|
2117
2117
|
if (scan && !reverse) pinned = span;
|
|
2118
2118
|
if (leaf !== void 0) {
|
|
2119
2119
|
options.signal?.throwIfAborted();
|
|
@@ -2244,7 +2244,7 @@ async function findInSessionHistory(pages, id, chunks, signal) {
|
|
|
2244
2244
|
if (item.entry.id === id) return item.seq;
|
|
2245
2245
|
} else {
|
|
2246
2246
|
if (!chunks) return void 0;
|
|
2247
|
-
if (await (await import("../core/storage/session/chunked-resume-projection.js")).chunkedEntryHasId(chunks(item), id)) return item.seq;
|
|
2247
|
+
if (await (await import("../core/storage/session/chunked-resume-projection.impl.js")).chunkedEntryHasId(chunks(item), id)) return item.seq;
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
@@ -3704,8 +3704,8 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
3704
3704
|
try {
|
|
3705
3705
|
const spans = [];
|
|
3706
3706
|
const ids = [];
|
|
3707
|
-
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.js");
|
|
3708
|
-
const { foldForkRow, findForkRow } = await import("../core/storage/session/fork-row-index.js");
|
|
3707
|
+
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.impl.js");
|
|
3708
|
+
const { foldForkRow, findForkRow } = await import("../core/storage/session/fork-row-index.impl.js");
|
|
3709
3709
|
const staging = Buffer.allocUnsafe(SESSION_HISTORY_PAGE_BYTES);
|
|
3710
3710
|
let staged = 0;
|
|
3711
3711
|
const flush = async () => {
|
|
@@ -4153,7 +4153,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
readChildDisplayCut(sessionId, launch) {
|
|
4155
4155
|
return this.run(async () => {
|
|
4156
|
-
const { childDisplayCut } = await import("../core/storage/session/card-view.js");
|
|
4156
|
+
const { childDisplayCut } = await import("../core/storage/session/card-view.impl.js");
|
|
4157
4157
|
const { path, jsonl } = await this.indexed(sessionId);
|
|
4158
4158
|
const found = typeof launch.launchLeafId === "string" ? await this.seqInFile(path, jsonl, launch.launchLeafId) : void 0;
|
|
4159
4159
|
return childDisplayCut(jsonl.index, launch, found);
|
|
@@ -4322,7 +4322,7 @@ var JsonlSessionStore = class JsonlSessionStore {
|
|
|
4322
4322
|
}
|
|
4323
4323
|
readForkWindow(sessionId, entryId, options) {
|
|
4324
4324
|
return this.run(async () => {
|
|
4325
|
-
const { indexedForkWindow, rangedForkMetadata, scanForkRecords } = await import("../core/storage/session/fork-window.js");
|
|
4325
|
+
const { indexedForkWindow, rangedForkMetadata, scanForkRecords } = await import("../core/storage/session/fork-window.impl.js");
|
|
4326
4326
|
for (;;) {
|
|
4327
4327
|
const { path, header, jsonl } = await this.indexed(sessionId);
|
|
4328
4328
|
const file = await open(path, "r");
|
|
@@ -5817,8 +5817,8 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
5817
5817
|
validateSessionHeader(header);
|
|
5818
5818
|
if (this.records.has(header.id)) throw new SessionExistsError(header.id);
|
|
5819
5819
|
const record = this.encodeSession(header, []);
|
|
5820
|
-
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.js");
|
|
5821
|
-
const { foldForkRow, findForkRow, forkIdHash } = await import("../core/storage/session/fork-row-index.js");
|
|
5820
|
+
const { encodedForkRow } = await import("../core/storage/session/fork-row-bytes.impl.js");
|
|
5821
|
+
const { foldForkRow, findForkRow, forkIdHash } = await import("../core/storage/session/fork-row-index.impl.js");
|
|
5822
5822
|
const ids = [];
|
|
5823
5823
|
const lookup = (id) => findForkRow(id, ids, async function* (seq) {
|
|
5824
5824
|
const data = record.entries[seq - 1];
|
|
@@ -6100,7 +6100,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6100
6100
|
async appendPrivateMirrorChunks(id, seq, size, chunks) {
|
|
6101
6101
|
const record = this.privateMirrorRecord(id);
|
|
6102
6102
|
if (record.lastSeq + 1 !== seq) throw new SessionConflictError(id, seq - 1, record.lastSeq);
|
|
6103
|
-
const bytes = new Uint8Array(size), { entryProjector } = await import("../core/storage/session/jsonl-entry-projection.js");
|
|
6103
|
+
const bytes = new Uint8Array(size), { entryProjector } = await import("../core/storage/session/jsonl-entry-projection.impl.js");
|
|
6104
6104
|
const project = entryProjector();
|
|
6105
6105
|
let at = 0;
|
|
6106
6106
|
for await (const chunk of chunks) {
|
|
@@ -6237,7 +6237,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6237
6237
|
}
|
|
6238
6238
|
}
|
|
6239
6239
|
async readChildDisplayCut(sessionId, launch) {
|
|
6240
|
-
const { childDisplayCut } = await import("../core/storage/session/card-view.js");
|
|
6240
|
+
const { childDisplayCut } = await import("../core/storage/session/card-view.impl.js");
|
|
6241
6241
|
for (;;) {
|
|
6242
6242
|
const record = await this.settledRecord(sessionId);
|
|
6243
6243
|
const index = await this.resumeIndex(sessionId, record);
|
|
@@ -6322,7 +6322,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6322
6322
|
}
|
|
6323
6323
|
}
|
|
6324
6324
|
async readForkWindow(sessionId, entryId, options) {
|
|
6325
|
-
const { indexedForkWindow, rangedForkMetadata, scanForkRecords, locateFork, fullForkWindow } = await import("../core/storage/session/fork-window.js");
|
|
6325
|
+
const { indexedForkWindow, rangedForkMetadata, scanForkRecords, locateFork, fullForkWindow } = await import("../core/storage/session/fork-window.impl.js");
|
|
6326
6326
|
for (;;) {
|
|
6327
6327
|
const record = await this.settledRecord(sessionId);
|
|
6328
6328
|
if (record.directory && !record.directory.readRange) {
|
|
@@ -6651,7 +6651,7 @@ var MemorySessionStore = class MemorySessionStore {
|
|
|
6651
6651
|
while (last >= 1) {
|
|
6652
6652
|
const [low, high] = this.spanOf(held, last, last);
|
|
6653
6653
|
if (high - low > SCAN_WINDOW_BYTES && (!held.directory || held.directory.readRange)) {
|
|
6654
|
-
const { chunkedEntryHasId } = await import("../core/storage/session/chunked-resume-projection.js");
|
|
6654
|
+
const { chunkedEntryHasId } = await import("../core/storage/session/chunked-resume-projection.impl.js");
|
|
6655
6655
|
const read = (start, end) => this.bytesOf(sessionId, held, start, end);
|
|
6656
6656
|
async function* parts() {
|
|
6657
6657
|
for (let start = low; start < high; start += SESSION_HISTORY_CHUNK_BYTES) yield await read(start, Math.min(high, start + SESSION_HISTORY_CHUNK_BYTES));
|
|
@@ -7566,7 +7566,7 @@ async function archivedAnswerAt(store, id, epoch, through, firstSeq, parent, edi
|
|
|
7566
7566
|
const replacement = async (seq) => {
|
|
7567
7567
|
for await (const { items } of pages(seq, seq)) {
|
|
7568
7568
|
const item = items[0];
|
|
7569
|
-
if (!("entry" in item)) return (await import("../core/storage/session/chunked-resume-projection.js")).chunkedAnswerContent(chunks(item), true);
|
|
7569
|
+
if (!("entry" in item)) return (await import("../core/storage/session/chunked-resume-projection.impl.js")).chunkedAnswerContent(chunks(item), true);
|
|
7570
7570
|
if (item.entry.type === "context_edit") return item.entry.replacement === null ? null : contentText(item.entry.replacement.content);
|
|
7571
7571
|
}
|
|
7572
7572
|
};
|
|
@@ -7583,13 +7583,13 @@ async function archivedAnswerAt(store, id, epoch, through, firstSeq, parent, edi
|
|
|
7583
7583
|
role: raw.type === "message" ? raw.message.role : void 0,
|
|
7584
7584
|
stop: raw.type === "message" && raw.message.role === "assistant" && raw.message.stopReason === "stop"
|
|
7585
7585
|
};
|
|
7586
|
-
} else entry = await (await import("../core/storage/session/chunked-resume-projection.js")).chunkedAnswerHeader(chunks(item));
|
|
7586
|
+
} else entry = await (await import("../core/storage/session/chunked-resume-projection.impl.js")).chunkedAnswerHeader(chunks(item));
|
|
7587
7587
|
if (entry.id !== parent) continue;
|
|
7588
7588
|
parent = entry.parentId;
|
|
7589
7589
|
if (entry.targetId !== void 0 && !latest.has(entry.targetId)) latest.set(entry.targetId, item.seq);
|
|
7590
7590
|
if (entry.type === "message" && entry.role === "assistant") {
|
|
7591
7591
|
const edited = latest.get(entry.id);
|
|
7592
|
-
const text = overlay?.targetId === entry.id ? overlay.replacement === null ? null : contentText(overlay.replacement.content) : edited !== void 0 ? await replacement(edited) : "entry" in item ? contentText(item.entry.type === "message" && item.entry.message.role === "assistant" && item.entry.message.content) : await (await import("../core/storage/session/chunked-resume-projection.js")).chunkedAnswerContent(chunks(item), false);
|
|
7592
|
+
const text = overlay?.targetId === entry.id ? overlay.replacement === null ? null : contentText(overlay.replacement.content) : edited !== void 0 ? await replacement(edited) : "entry" in item ? contentText(item.entry.type === "message" && item.entry.message.role === "assistant" && item.entry.message.content) : await (await import("../core/storage/session/chunked-resume-projection.impl.js")).chunkedAnswerContent(chunks(item), false);
|
|
7593
7593
|
if (text !== null && (text || entry.stop)) return text ? { text } : {};
|
|
7594
7594
|
}
|
|
7595
7595
|
if (parent === null) return;
|
|
@@ -7721,7 +7721,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7721
7721
|
}
|
|
7722
7722
|
async updateHeader(header, options) {
|
|
7723
7723
|
await this.convert(header.id);
|
|
7724
|
-
return (await import("../core/storage/session/snapshot-history.js")).updateStoredHeader(this.inner, header, options);
|
|
7724
|
+
return (await import("../core/storage/session/snapshot-history.impl.js")).updateStoredHeader(this.inner, header, options);
|
|
7725
7725
|
}
|
|
7726
7726
|
async load(sessionId) {
|
|
7727
7727
|
await this.convert(sessionId);
|
|
@@ -7735,7 +7735,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7735
7735
|
await this.convert(sessionId);
|
|
7736
7736
|
if (this.inner.readRange) return this.inner.readRange(sessionId, startSeq, endSeq, expectedEpoch);
|
|
7737
7737
|
const snapshot = await this.inner.load(sessionId);
|
|
7738
|
-
const { assertSnapshotCut, snapshotStamp } = await import("../core/storage/session/snapshot-history.js");
|
|
7738
|
+
const { assertSnapshotCut, snapshotStamp } = await import("../core/storage/session/snapshot-history.impl.js");
|
|
7739
7739
|
assertSnapshotCut(snapshot, expectedEpoch, Math.min(endSeq, snapshot.lastSeq));
|
|
7740
7740
|
return {
|
|
7741
7741
|
...sessionRangeOf(snapshot.entries, startSeq, endSeq),
|
|
@@ -7745,13 +7745,13 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7745
7745
|
async readBranchSpan(sessionId, cut) {
|
|
7746
7746
|
await this.convert(sessionId);
|
|
7747
7747
|
if (this.inner.readBranchSpan) return this.inner.readBranchSpan(sessionId, cut);
|
|
7748
|
-
return (await import("../core/storage/session/snapshot-history.js")).snapshotBranchSpan(this.inner, sessionId, cut);
|
|
7748
|
+
return (await import("../core/storage/session/snapshot-history.impl.js")).snapshotBranchSpan(this.inner, sessionId, cut);
|
|
7749
7749
|
}
|
|
7750
7750
|
async readEntrySizes(sessionId, startSeq, endSeq, limit) {
|
|
7751
7751
|
await this.convert(sessionId);
|
|
7752
7752
|
if (this.inner.readEntrySizes) return limit === void 0 ? this.inner.readEntrySizes(sessionId, startSeq, endSeq) : this.inner.readEntrySizes(sessionId, startSeq, endSeq, limit);
|
|
7753
7753
|
const snapshot = await this.inner.load(sessionId);
|
|
7754
|
-
const { snapshotStamp } = await import("../core/storage/session/snapshot-history.js");
|
|
7754
|
+
const { snapshotStamp } = await import("../core/storage/session/snapshot-history.impl.js");
|
|
7755
7755
|
const start = Math.max(startSeq, 1);
|
|
7756
7756
|
return {
|
|
7757
7757
|
epoch: snapshotStamp(snapshot),
|
|
@@ -7765,7 +7765,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7765
7765
|
async readEntryChunk(reference, offset, bytes) {
|
|
7766
7766
|
await this.convert(reference.sessionId);
|
|
7767
7767
|
if (this.inner.readEntryChunk) return bytes === void 0 ? this.inner.readEntryChunk(reference, offset) : this.inner.readEntryChunk(reference, offset, bytes);
|
|
7768
|
-
return (await import("../core/storage/session/snapshot-history.js")).snapshotChunk(this.inner, reference, offset);
|
|
7768
|
+
return (await import("../core/storage/session/snapshot-history.impl.js")).snapshotChunk(this.inner, reference, offset);
|
|
7769
7769
|
}
|
|
7770
7770
|
async findLatestCompaction(sessionId, leafId) {
|
|
7771
7771
|
await this.convert(sessionId);
|
|
@@ -7774,7 +7774,7 @@ var LegacySessionStore = class LegacySessionStore {
|
|
|
7774
7774
|
async readResume(sessionId, leafId, options) {
|
|
7775
7775
|
await this.convert(sessionId);
|
|
7776
7776
|
if (this.inner.readResume) return options ? this.inner.readResume(sessionId, leafId, options) : this.inner.readResume(sessionId, leafId);
|
|
7777
|
-
return (await import("../core/storage/session/snapshot-history.js")).snapshotWindow(this.inner, sessionId, leafId, void 0, void 0, isProxy);
|
|
7777
|
+
return (await import("../core/storage/session/snapshot-history.impl.js")).snapshotWindow(this.inner, sessionId, leafId, void 0, void 0, isProxy);
|
|
7778
7778
|
}
|
|
7779
7779
|
async findEntrySeq(sessionId, entryId) {
|
|
7780
7780
|
await this.convert(sessionId);
|
|
@@ -5755,7 +5755,7 @@ function ownerTaskViewSource(store) {
|
|
|
5755
5755
|
if (source.ok) {
|
|
5756
5756
|
const { session, inheritedThroughId } = source.value;
|
|
5757
5757
|
const file = fileArchives.get(session);
|
|
5758
|
-
if (file && archiveReader(session)) return import("../core/tasks/task-file-history.js").then(({ taskFileDetail }) => taskFileDetail(file.path, file.sessionId, inheritedThroughId, messageText$1, signal)).then((value) => file.unsaved?.type === "message" && file.unsaved.message.role === "assistant" ? {
|
|
5758
|
+
if (file && archiveReader(session)) return import("../core/tasks/task-file-history.impl.js").then(({ taskFileDetail }) => taskFileDetail(file.path, file.sessionId, inheritedThroughId, messageText$1, signal)).then((value) => file.unsaved?.type === "message" && file.unsaved.message.role === "assistant" ? {
|
|
5759
5759
|
...value,
|
|
5760
5760
|
output: messageText$1(file.unsaved.message)
|
|
5761
5761
|
} : value).catch(() => detailText(session.getFallbackEntries?.()));
|
|
@@ -5786,7 +5786,7 @@ function ownerTaskViewSource(store) {
|
|
|
5786
5786
|
};
|
|
5787
5787
|
const { session, taskId } = bound.value;
|
|
5788
5788
|
const file = fileArchives.get(session);
|
|
5789
|
-
if (file && archiveReader(session) && !session.subscribe) return import("../core/tasks/task-file-history.js").then(({ taskFilePages, taskFileUnavailable }) => savedTranscriptView(session, taskId, (opts) => taskFilePages(file.path, file.sessionId, {
|
|
5789
|
+
if (file && archiveReader(session) && !session.subscribe) return import("../core/tasks/task-file-history.impl.js").then(({ taskFilePages, taskFileUnavailable }) => savedTranscriptView(session, taskId, (opts) => taskFilePages(file.path, file.sessionId, {
|
|
5790
5790
|
...opts ?? {},
|
|
5791
5791
|
...chatPageRequest.getStore() ? { identify: true } : {}
|
|
5792
5792
|
}), cursor, file, signal).catch(async (error) => {
|
|
@@ -6104,7 +6104,7 @@ async function savedTaskDetailText(session, throughId) {
|
|
|
6104
6104
|
if (entry.message.role === "assistant") output = messageText$1(entry.message);
|
|
6105
6105
|
} else {
|
|
6106
6106
|
if (!session.readHistoryChunks) throw new TypeError("The task history source must implement readHistoryChunks for oversized entries");
|
|
6107
|
-
const { chunkedTaskDetailFields } = await import("../core/storage/session/chunked-resume-projection.js");
|
|
6107
|
+
const { chunkedTaskDetailFields } = await import("../core/storage/session/chunked-resume-projection.impl.js");
|
|
6108
6108
|
const info = await chunkedTaskDetailFields(() => session.readHistoryChunks(item), own ? void 0 : throughId);
|
|
6109
6109
|
if (!own) {
|
|
6110
6110
|
if (info.inheritedEnd) own = true;
|
|
@@ -6186,7 +6186,7 @@ async function oversizedToolResult(session, item, file, current, signal) {
|
|
|
6186
6186
|
let chunks;
|
|
6187
6187
|
if (file) {
|
|
6188
6188
|
if (current === void 0) return void 0;
|
|
6189
|
-
const { taskFileEntryChunks } = await import("../core/tasks/task-file-history.js");
|
|
6189
|
+
const { taskFileEntryChunks } = await import("../core/tasks/task-file-history.impl.js");
|
|
6190
6190
|
chunks = taskFileEntryChunks(file.path, file.sessionId, current, item.seq, item.bytes, signal);
|
|
6191
6191
|
} else if ("kind" in item && session.readHistoryChunks) chunks = session.readHistoryChunks(item, signal ? { signal } : {});
|
|
6192
6192
|
else return void 0;
|
|
@@ -6288,13 +6288,13 @@ async function savedTranscriptView(session, taskId, read, cursor, file, signal)
|
|
|
6288
6288
|
});
|
|
6289
6289
|
const unsaved = taskTranscriptUnsavedAnswer(session);
|
|
6290
6290
|
if (!page.adjacent?.newer && unsaved?.type === "message") {
|
|
6291
|
-
const { taskAnswerMissing } = await import("../core/tasks/task-unsaved-answer.js");
|
|
6291
|
+
const { taskAnswerMissing } = await import("../core/tasks/task-unsaved-answer.impl.js");
|
|
6292
6292
|
const records = async function* (span) {
|
|
6293
6293
|
for (let i = span.items.length - 1; i >= 0; i--) {
|
|
6294
6294
|
const row = span.items[i];
|
|
6295
6295
|
if ("entry" in row) yield row;
|
|
6296
6296
|
else if (file) {
|
|
6297
|
-
const { taskFileEntryChunks } = await import("../core/tasks/task-file-history.js");
|
|
6297
|
+
const { taskFileEntryChunks } = await import("../core/tasks/task-file-history.impl.js");
|
|
6298
6298
|
yield { chunks: () => taskFileEntryChunks(file.path, file.sessionId, span.adjacent.current, row.seq, row.bytes, signal) };
|
|
6299
6299
|
} else if ("epoch" in row && session.readHistoryChunks) yield { chunks: () => session.readHistoryChunks(row, { signal }) };
|
|
6300
6300
|
}
|
|
@@ -17778,7 +17778,7 @@ function createReadToolDefinition(cwd, options) {
|
|
|
17778
17778
|
const archive = parseArchiveSelector(effectivePath);
|
|
17779
17779
|
const sqlite = await sqliteSelectorForPath(effectivePath, executionCwd);
|
|
17780
17780
|
if (isReadableUrlPath(effectivePath)) {
|
|
17781
|
-
const { readUrlBranch } = await import("../core/tools/read-url.js");
|
|
17781
|
+
const { readUrlBranch } = await import("../core/tools/read-url.impl.js");
|
|
17782
17782
|
resolve(await readUrlBranch({
|
|
17783
17783
|
effectivePath,
|
|
17784
17784
|
rawOutput: rawOutput === true,
|
|
@@ -20304,7 +20304,7 @@ async function runThenDispose(work, dispose) {
|
|
|
20304
20304
|
}
|
|
20305
20305
|
async function runChildSession(options, prompt, signal) {
|
|
20306
20306
|
signal.throwIfAborted();
|
|
20307
|
-
const { createAgentSession } = await import("../core/sdk.js");
|
|
20307
|
+
const { createAgentSession } = await import("../core/sdk.impl.js");
|
|
20308
20308
|
const { session: child } = await createAgentSession(options);
|
|
20309
20309
|
let aborting = Promise.resolve();
|
|
20310
20310
|
let abortFailure;
|
|
@@ -20392,7 +20392,7 @@ function subscribeSession(session, source, handler, options = {}) {
|
|
|
20392
20392
|
task: async (taskOptions) => {
|
|
20393
20393
|
const resolve = session._childSessionOptions;
|
|
20394
20394
|
if (resolve === void 0) throw new SubscriptionChildUnavailableError(id, session.sessionId);
|
|
20395
|
-
const { SessionManager } = await import("../core/session-manager.js");
|
|
20395
|
+
const { SessionManager } = await import("../core/session-manager.impl.js");
|
|
20396
20396
|
const { prompt, ...childOptions } = taskOptions;
|
|
20397
20397
|
const inherited = resolve({
|
|
20398
20398
|
...childOptions,
|
|
@@ -24546,7 +24546,7 @@ async function resolveSessionStore(cwd, options = {}) {
|
|
|
24546
24546
|
await mkdir(agentDir, { recursive: true });
|
|
24547
24547
|
selection = await select();
|
|
24548
24548
|
}
|
|
24549
|
-
import("../core/storage/session/released-history-files.js").then(({ sweepReleasedHistoryOnce }) => sweepReleasedHistoryOnce(agentDir), () => void 0);
|
|
24549
|
+
import("../core/storage/session/released-history-files.impl.js").then(({ sweepReleasedHistoryOnce }) => sweepReleasedHistoryOnce(agentDir), () => void 0);
|
|
24550
24550
|
try {
|
|
24551
24551
|
const opened = await provider.openSessionStore(selection, {
|
|
24552
24552
|
agentDir,
|
|
@@ -24665,7 +24665,7 @@ async function probeSelection(selection, context, inspect, timeoutMs) {
|
|
|
24665
24665
|
}
|
|
24666
24666
|
};
|
|
24667
24667
|
}
|
|
24668
|
-
const { resolvePackageStorageAdapter } = await import("../core/package-manager-storage-adapters.js");
|
|
24668
|
+
const { resolvePackageStorageAdapter } = await import("../core/package-manager-storage-adapters.impl.js");
|
|
24669
24669
|
const resolved = await resolvePackageStorageAdapter(module, context.agentDir);
|
|
24670
24670
|
const loaded = {
|
|
24671
24671
|
module,
|
|
@@ -25390,7 +25390,7 @@ function describePrevious(select) {
|
|
|
25390
25390
|
}
|
|
25391
25391
|
async function restartBroker(agentDir, context, onProgress) {
|
|
25392
25392
|
try {
|
|
25393
|
-
return await (context.loadControl ? await context.loadControl() : await (await import("../core/intercom-broker-control.js")).loadIntercomBrokerControl()).restartIntercomBroker(agentDir, onProgress === void 0 ? {} : { onProgress });
|
|
25393
|
+
return await (context.loadControl ? await context.loadControl() : await (await import("../core/intercom-broker-control.impl.js")).loadIntercomBrokerControl()).restartIntercomBroker(agentDir, onProgress === void 0 ? {} : { onProgress });
|
|
25394
25394
|
} catch (error) {
|
|
25395
25395
|
return {
|
|
25396
25396
|
status: "failed",
|
|
@@ -681,7 +681,7 @@ const errorText = describeStorageError$1;
|
|
|
681
681
|
async function loadBrokerControl(options) {
|
|
682
682
|
try {
|
|
683
683
|
if (options.loadControl) return await options.loadControl();
|
|
684
|
-
const { loadIntercomBrokerControl } = await import("../core/intercom-broker-control.js");
|
|
684
|
+
const { loadIntercomBrokerControl } = await import("../core/intercom-broker-control.impl.js");
|
|
685
685
|
return await loadIntercomBrokerControl();
|
|
686
686
|
} catch (error) {
|
|
687
687
|
return error instanceof Error ? error : new Error(String(error));
|
|
@@ -798,7 +798,7 @@ async function runStorageCommand(args, options) {
|
|
|
798
798
|
return 0;
|
|
799
799
|
}
|
|
800
800
|
if (command.kind === "search-session") {
|
|
801
|
-
const { searchStoredSession } = await import("../cli/storage-search-session.js");
|
|
801
|
+
const { searchStoredSession } = await import("../cli/storage-search-session.impl.js");
|
|
802
802
|
await searchStoredSession(command, options.cwd, options.log);
|
|
803
803
|
return 0;
|
|
804
804
|
}
|
|
@@ -826,7 +826,7 @@ async function loadBrokerStateModule() {
|
|
|
826
826
|
if (intercom === void 0) throw new Error("The bundled Intercom package was not found.");
|
|
827
827
|
const modulePath = ["broker/open-broker-state.ts", "broker/open-broker-state.js"].map((path) => join(intercom.packageDir, path)).find((path) => existsSync(path));
|
|
828
828
|
if (modulePath === void 0) throw new Error("The bundled Intercom package has no broker state module.");
|
|
829
|
-
const [{ createHostModuleJiti }, { getVirtualModules }] = await Promise.all([import("../core/extensions/loader-virtual-modules.js"), import("../core/extensions/loader-host-modules.js")]);
|
|
829
|
+
const [{ createHostModuleJiti }, { getVirtualModules }] = await Promise.all([import("../core/extensions/loader-virtual-modules.js"), import("../core/extensions/loader-host-modules.impl.js")]);
|
|
830
830
|
return (await createHostModuleJiti(pathToFileURL(modulePath).href, await getVirtualModules())).import(modulePath);
|
|
831
831
|
}
|
|
832
832
|
/** Select an explicit migration target without reading credentials into settings or command output. */
|
|
@@ -880,7 +880,7 @@ async function migrate(command, options, log) {
|
|
|
880
880
|
domain: "sessions"
|
|
881
881
|
});
|
|
882
882
|
try {
|
|
883
|
-
const { SqlSessionStore } = await import("../core/storage/session/sql-session-store.js");
|
|
883
|
+
const { SqlSessionStore } = await import("../core/storage/session/sql-session-store.impl.js");
|
|
884
884
|
if (sessions instanceof SqlSessionStore) await sessions.prepareForkStaging();
|
|
885
885
|
} finally {
|
|
886
886
|
await sessions.close();
|
|
@@ -3,7 +3,7 @@ import "./rolldown-runtime-BGM3D5V3.js";
|
|
|
3
3
|
/** An acknowledgement can be lost after the store has written the final reply. Compare only the newest saved
|
|
4
4
|
* message (ignoring bookkeeping after it); never append an already-saved answer twice. */
|
|
5
5
|
async function taskAnswerMissing(unsaved, records) {
|
|
6
|
-
const { compareTaskAnswer } = await import("../core/tasks/task-reference-stream.js");
|
|
6
|
+
const { compareTaskAnswer } = await import("../core/tasks/task-reference-stream.impl.js");
|
|
7
7
|
for await (const row of records) {
|
|
8
8
|
if (row.entry) {
|
|
9
9
|
if (row.entry.type !== "message") continue;
|
|
@@ -50,7 +50,7 @@ async function* treeOutlinePages(store, id, epoch, through, signal) {
|
|
|
50
50
|
streamed: true
|
|
51
51
|
}));
|
|
52
52
|
else {
|
|
53
|
-
const { snapshotOutline } = await import("../core/storage/session/snapshot-history.js");
|
|
53
|
+
const { snapshotOutline } = await import("../core/storage/session/snapshot-history.impl.js");
|
|
54
54
|
rows = await snapshotOutline(store, id, from, end, epoch);
|
|
55
55
|
}
|
|
56
56
|
const page = [];
|
|
@@ -72,7 +72,7 @@ async function* treeOutlinePages(store, id, epoch, through, signal) {
|
|
|
72
72
|
epoch: sizes.epoch,
|
|
73
73
|
bytes: size.bytes
|
|
74
74
|
}, { signal });
|
|
75
|
-
page.push(await (await import("../core/storage/session/chunked-resume-projection.js")).chunkedTreeOutline(row.seq, chunks));
|
|
75
|
+
page.push(await (await import("../core/storage/session/chunked-resume-projection.impl.js")).chunkedTreeOutline(row.seq, chunks));
|
|
76
76
|
}
|
|
77
77
|
signal?.throwIfAborted();
|
|
78
78
|
yield page;
|