@bastani/atomic 0.10.4 → 0.10.5-alpha.1
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 +44 -0
- package/dist/_shared/compile-cache-warmup-host-RU5L7I7A.js +1 -1
- package/dist/_shared/dist-KOELCESV.js +48 -3
- package/dist/_shared/fork-row-index-UAUAQRD5.js +47 -2
- package/dist/_shared/http-YFAPTIZD.js +16 -4
- package/dist/_shared/http-YFAPTIZD.js.map +1 -1
- package/dist/_shared/lib-4PES5P4V.js +59 -14
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +1706 -258
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +317 -64
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/{mode-shared-HP7GUA7J.js → mode-shared-2QJSCUM6.js} +432 -81
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js +3482 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -0
- package/dist/_shared/p0-cli-GUFK7TPN.js +2 -2838
- package/dist/_shared/p0-cli-GUFK7TPN.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-YK3KDTLN.js → p1a-prewarm-UQY3X2UK.js} +270 -73
- package/dist/_shared/p1a-prewarm-UQY3X2UK.js.map +1 -0
- package/dist/_shared/{p1b-elig-PXQA2FYP.js → p1b-elig-ENCUPKKJ.js} +190 -121
- package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -0
- package/dist/_shared/p2-common-YLSYXMDQ.js +1 -3
- package/dist/_shared/p2-common-YLSYXMDQ.js.map +1 -1
- package/dist/_shared/p2-shell-TJBYQMCJ.js +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +500 -127
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +4 -4
- package/dist/_shared/sdk-WQIOHVKO.js +56 -11
- package/dist/_shared/session-data-AHTU7IS6.js +48 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +2 -2
- package/dist/_shared/settings-startup-65YEWRV2.js.map +1 -1
- package/dist/_shared/sql-session-store-5FD3WBMZ.js +57 -12
- package/dist/_shared/{startup-0-0-X4NF3GKM.js → startup-0-0-TYUFUOJZ.js} +519 -316
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -0
- package/dist/_shared/{startup-0-1-7QTG6VJZ.js → startup-0-1-D4LGGINF.js} +284 -81
- package/dist/_shared/startup-0-1-D4LGGINF.js.map +1 -0
- package/dist/_shared/{startup-0-2-KFDYPDJK.js → startup-0-2-SZGQIWHI.js} +483 -154
- package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +340 -110
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js +261 -59
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
- package/dist/_shared/startup-0-5-OHJNE6JH.js +421 -148
- package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +62 -11
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +12 -11
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +53 -158
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +231 -46
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +115 -35
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-KQJBDKRU.js → startup-8-1-SJW2GMAM.js} +203 -62
- package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +55 -10
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +47 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +48 -3
- package/dist/builtin/intercom/CHANGELOG.md +21 -0
- package/dist/builtin/intercom/README.md +0 -1
- package/dist/builtin/intercom/broker/broker-instance.ts +13 -57
- package/dist/builtin/intercom/broker/broker-process.ts +30 -10
- package/dist/builtin/intercom/broker/broker-routing.ts +12 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +2557 -498
- package/dist/builtin/intercom/broker/broker.ts +164 -55
- package/dist/builtin/intercom/broker/client.ts +36 -16
- package/dist/builtin/intercom/broker/control.ts +83 -20
- package/dist/builtin/intercom/broker/durable-ended-queue.ts +65 -19
- package/dist/builtin/intercom/broker/host-command-environment.ts +7 -2
- package/dist/builtin/intercom/broker/multinode-router.ts +1675 -387
- package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
- package/dist/builtin/intercom/broker/paths.ts +68 -6
- package/dist/builtin/intercom/broker/pending-send-registry.ts +5 -0
- package/dist/builtin/intercom/broker/registration-bounds.ts +38 -0
- package/dist/builtin/intercom/broker/retiring-broker-check.ts +178 -0
- package/dist/builtin/intercom/broker/return-paths.ts +268 -7
- package/dist/builtin/intercom/broker/send-handler.ts +253 -28
- package/dist/builtin/intercom/broker/send-order-gate.ts +410 -0
- package/dist/builtin/intercom/broker/spawn.ts +950 -202
- package/dist/builtin/intercom/broker/sql-lease-store.ts +37 -0
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +7 -0
- package/dist/builtin/intercom/broker/windows-cwd.ts +546 -0
- package/dist/builtin/intercom/index.bundle.mjs +3506 -2328
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/retry-policy.ts +4 -0
- package/dist/builtin/intercom/types.ts +2 -0
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +336 -86
- package/dist/builtin/web-access/index.bundle.mjs +23 -38
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/cli.js +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/internal-intercom-broker.js +119 -4
- package/dist/bun/internal-intercom-broker.js.map +1 -1
- package/dist/bun/register-theme-validator.js +6 -0
- package/dist/bun/register-theme-validator.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +1102 -0
- package/dist/cli/auth-cli.code.js.map +1 -0
- package/dist/cli/auth-cli.impl.js +30 -1096
- package/dist/cli/auth-cli.impl.js.map +1 -1
- package/dist/cli/auth-cli.js +11 -7
- package/dist/cli/blueprint-command.code.js +906 -0
- package/dist/cli/blueprint-command.code.js.map +1 -0
- package/dist/cli/blueprint-command.impl.js +30 -900
- package/dist/cli/blueprint-command.impl.js.map +1 -1
- package/dist/cli/blueprint-command.js +11 -7
- package/dist/cli/intercom-command.code.js +153 -0
- package/dist/cli/intercom-command.code.js.map +1 -0
- package/dist/cli/intercom-command.impl.js +33 -105
- package/dist/cli/intercom-command.impl.js.map +1 -1
- package/dist/cli/intercom-command.js +11 -7
- package/dist/cli/list-models.code.js +60 -0
- package/dist/cli/list-models.code.js.map +1 -0
- package/dist/cli/list-models.impl.js +33 -57
- package/dist/cli/list-models.impl.js.map +1 -1
- package/dist/cli/list-models.js +11 -7
- package/dist/cli/session-picker.code.js +55 -0
- package/dist/cli/session-picker.code.js.map +1 -0
- package/dist/cli/session-picker.impl.js +33 -52
- package/dist/cli/session-picker.impl.js.map +1 -1
- package/dist/cli/session-picker.js +11 -7
- package/dist/cli/startup-ui.code.js +5 -0
- package/dist/cli/startup-ui.code.js.map +1 -0
- package/dist/cli/startup-ui.impl.js +35 -4
- package/dist/cli/startup-ui.js +11 -7
- package/dist/cli/storage-command.code.js +3 -0
- package/dist/cli/storage-command.code.js.map +1 -0
- package/dist/cli/storage-command.impl.js +35 -2
- package/dist/cli/storage-command.js +11 -7
- package/dist/cli/storage-search-session.code.js +189 -0
- package/dist/cli/storage-search-session.code.js.map +1 -0
- package/dist/cli/storage-search-session.impl.js +33 -186
- package/dist/cli/storage-search-session.impl.js.map +1 -1
- package/dist/cli/storage-search-session.js +11 -7
- package/dist/cli/team-command.code.js +217 -0
- package/dist/cli/team-command.code.js.map +1 -0
- package/dist/cli/team-command.impl.js +32 -213
- package/dist/cli/team-command.impl.js.map +1 -1
- package/dist/cli/team-command.js +11 -7
- package/dist/cli.js +60 -11
- package/dist/cli.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/agent-session-methods.d.ts +4 -3
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -0
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/model-resolver.d.ts +1 -1
- package/dist/core/debug.code.js +3 -0
- package/dist/core/debug.code.js.map +1 -0
- package/dist/core/debug.impl.js +35 -2
- package/dist/core/debug.js +11 -7
- package/dist/core/default-model-api-prewarm.d.ts +5 -0
- package/dist/core/export-html/card-projection.code.js +257 -0
- package/dist/core/export-html/card-projection.code.js.map +1 -0
- package/dist/core/export-html/card-projection.impl.js +34 -255
- package/dist/core/export-html/card-projection.impl.js.map +1 -1
- package/dist/core/export-html/card-projection.js +11 -7
- package/dist/core/export-html/index.code.js +655 -0
- package/dist/core/export-html/index.code.js.map +1 -0
- package/dist/core/export-html/index.impl.js +30 -604
- package/dist/core/export-html/index.impl.js.map +1 -1
- package/dist/core/export-html/index.js +11 -7
- package/dist/core/export-html/json-spans.code.js +3 -0
- package/dist/core/export-html/json-spans.code.js.map +1 -0
- package/dist/core/export-html/json-spans.impl.js +35 -2
- package/dist/core/export-html/json-spans.js +11 -7
- package/dist/core/export-html/oversized-render-inputs.code.js +125 -0
- package/dist/core/export-html/oversized-render-inputs.code.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js +31 -120
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -1
- package/dist/core/export-html/oversized-render-inputs.js +11 -7
- package/dist/core/export-html/tool-renderer.code.js +350 -0
- package/dist/core/export-html/tool-renderer.code.js.map +1 -0
- package/dist/core/export-html/tool-renderer.impl.js +33 -347
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -1
- package/dist/core/export-html/tool-renderer.js +11 -7
- package/dist/core/extensions/jiti-loader.code.js +3 -0
- package/dist/core/extensions/jiti-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-loader.impl.js +35 -2
- package/dist/core/extensions/jiti-loader.js +11 -7
- package/dist/core/extensions/jiti-static-loader.code.js +3 -0
- package/dist/core/extensions/jiti-static-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.impl.js +35 -2
- package/dist/core/extensions/jiti-static-loader.js +11 -7
- package/dist/core/extensions/loader-host-modules.code.js +3 -0
- package/dist/core/extensions/loader-host-modules.code.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.impl.js +35 -2
- package/dist/core/extensions/loader-host-modules.js +11 -7
- package/dist/core/extensions/loader-virtual-modules.d.ts +1 -6
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +3 -3
- package/dist/core/extensions/session-events.d.ts +4 -0
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +5 -0
- package/dist/core/intercom-broker-control-host.code.js.map +1 -0
- package/dist/core/intercom-broker-control-host.impl.js +35 -4
- package/dist/core/intercom-broker-control-host.js +11 -7
- package/dist/core/intercom-broker-control.code.js +63 -0
- package/dist/core/intercom-broker-control.code.js.map +1 -0
- package/dist/core/intercom-broker-control.d.ts +21 -0
- package/dist/core/intercom-broker-control.impl.js +35 -17
- package/dist/core/intercom-broker-control.impl.js.map +1 -1
- package/dist/core/intercom-broker-control.js +11 -7
- package/dist/core/package-manager-storage-adapters.code.js +3 -0
- package/dist/core/package-manager-storage-adapters.code.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.impl.js +35 -2
- package/dist/core/package-manager-storage-adapters.js +11 -7
- package/dist/core/process-start-token.d.ts +8 -2
- package/dist/core/process-tree-containment.d.ts +27 -0
- package/dist/core/queued-message-delivery.d.ts +5 -2
- package/dist/core/resume/blueprint/process.d.ts +3 -1
- package/dist/core/sdk.code.js +9 -0
- package/dist/core/sdk.code.js.map +1 -0
- package/dist/core/sdk.impl.js +35 -8
- package/dist/core/sdk.js +11 -7
- package/dist/core/session-manager-core.d.ts +15 -5
- package/dist/core/session-manager-core.js +195 -38
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.code.js +3 -0
- package/dist/core/session-manager-list.code.js.map +1 -0
- package/dist/core/session-manager-list.impl.js +35 -2
- package/dist/core/session-manager-list.js +11 -7
- package/dist/core/session-manager-types.d.ts +20 -0
- package/dist/core/session-manager.code.js +8 -0
- package/dist/core/session-manager.code.js.map +1 -0
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.impl.js +35 -7
- package/dist/core/session-manager.js +11 -7
- package/dist/core/session-storage.code.js +3 -0
- package/dist/core/session-storage.code.js.map +1 -0
- package/dist/core/session-storage.impl.js +35 -2
- package/dist/core/session-storage.js +11 -7
- package/dist/core/storage/file-identity.d.ts +3 -0
- package/dist/core/storage/file-identity.js +296 -86
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +1 -1
- package/dist/core/storage/index.js +52 -7
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +47 -2
- package/dist/core/storage/node-sqlite.js +49 -4
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.code.js +37 -0
- package/dist/core/storage/offline-snapshot-file.code.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.impl.js +33 -34
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.js +11 -7
- package/dist/core/storage/provider.js +52 -7
- package/dist/core/storage/selection.js +49 -4
- package/dist/core/storage/session/branch-fork-source.code.js +146 -0
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.impl.js +32 -97
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.js +11 -7
- package/dist/core/storage/session/card-view.code.js +60 -0
- package/dist/core/storage/session/card-view.code.js.map +1 -0
- package/dist/core/storage/session/card-view.impl.js +34 -58
- package/dist/core/storage/session/card-view.impl.js.map +1 -1
- package/dist/core/storage/session/card-view.js +11 -7
- package/dist/core/storage/session/child-reader.code.js +139 -0
- package/dist/core/storage/session/child-reader.code.js.map +1 -0
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- package/dist/core/storage/session/child-reader.impl.js +33 -91
- package/dist/core/storage/session/child-reader.impl.js.map +1 -1
- package/dist/core/storage/session/child-reader.js +11 -7
- package/dist/core/storage/session/chunked-resume-projection.code.js +3 -0
- package/dist/core/storage/session/chunked-resume-projection.code.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js +35 -2
- package/dist/core/storage/session/chunked-resume-projection.js +11 -7
- package/dist/core/storage/session/expanded-child-details.code.js +684 -0
- package/dist/core/storage/session/expanded-child-details.code.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.impl.js +31 -634
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -1
- package/dist/core/storage/session/expanded-child-details.js +11 -7
- package/dist/core/storage/session/fork-row-bytes.code.js +3 -0
- package/dist/core/storage/session/fork-row-bytes.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js +35 -2
- package/dist/core/storage/session/fork-row-bytes.js +11 -7
- package/dist/core/storage/session/fork-row-index.code.js +3 -0
- package/dist/core/storage/session/fork-row-index.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.impl.js +35 -2
- package/dist/core/storage/session/fork-row-index.js +11 -7
- package/dist/core/storage/session/fork-staging.code.js +580 -0
- package/dist/core/storage/session/fork-staging.code.js.map +1 -0
- package/dist/core/storage/session/fork-staging.impl.js +30 -574
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -1
- package/dist/core/storage/session/fork-staging.js +11 -7
- package/dist/core/storage/session/fork-window.code.js +522 -0
- package/dist/core/storage/session/fork-window.code.js.map +1 -0
- package/dist/core/storage/session/fork-window.impl.js +30 -471
- package/dist/core/storage/session/fork-window.impl.js.map +1 -1
- package/dist/core/storage/session/fork-window.js +11 -7
- package/dist/core/storage/session/history-pages.code.js +3 -0
- package/dist/core/storage/session/history-pages.code.js.map +1 -0
- package/dist/core/storage/session/history-pages.impl.js +35 -2
- package/dist/core/storage/session/history-pages.js +11 -7
- package/dist/core/storage/session/jsonl-entry-projection.code.js +3 -0
- package/dist/core/storage/session/jsonl-entry-projection.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +35 -2
- package/dist/core/storage/session/jsonl-entry-projection.js +11 -7
- package/dist/core/storage/session/jsonl-session-store.code.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js +35 -2
- package/dist/core/storage/session/jsonl-session-store.js +11 -7
- package/dist/core/storage/session/memory-session-store.code.js +3 -0
- package/dist/core/storage/session/memory-session-store.code.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.impl.js +35 -2
- package/dist/core/storage/session/memory-session-store.js +11 -7
- package/dist/core/storage/session/pinned-branch-resume.code.js +117 -0
- package/dist/core/storage/session/pinned-branch-resume.code.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js +33 -69
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -1
- package/dist/core/storage/session/pinned-branch-resume.js +11 -7
- package/dist/core/storage/session/released-history-files.code.js +465 -0
- package/dist/core/storage/session/released-history-files.code.js.map +1 -0
- package/dist/core/storage/session/released-history-files.impl.js +32 -461
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -1
- package/dist/core/storage/session/released-history-files.js +11 -7
- package/dist/core/storage/session/resident-fork-rows.code.js +57 -0
- package/dist/core/storage/session/resident-fork-rows.code.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js +32 -53
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.js +11 -7
- package/dist/core/storage/session/session-resume.code.js +3 -0
- package/dist/core/storage/session/session-resume.code.js.map +1 -0
- package/dist/core/storage/session/session-resume.impl.js +35 -2
- package/dist/core/storage/session/session-resume.js +11 -7
- package/dist/core/storage/session/snapshot-cut.code.js +3 -0
- package/dist/core/storage/session/snapshot-cut.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.impl.js +35 -2
- package/dist/core/storage/session/snapshot-cut.js +11 -7
- package/dist/core/storage/session/snapshot-history.code.js +107 -0
- package/dist/core/storage/session/snapshot-history.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.impl.js +34 -60
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -1
- package/dist/core/storage/session/snapshot-history.js +11 -7
- package/dist/core/storage/session/sql-session-store.code.js +3 -0
- package/dist/core/storage/session/sql-session-store.code.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.impl.js +35 -2
- package/dist/core/storage/session/sql-session-store.js +11 -7
- package/dist/core/storage/session/tree-outline.code.js +3 -0
- package/dist/core/storage/session/tree-outline.code.js.map +1 -0
- package/dist/core/storage/session/tree-outline.impl.js +35 -2
- package/dist/core/storage/session/tree-outline.js +11 -7
- package/dist/core/storage/session/tree-presentation.code.js +342 -0
- package/dist/core/storage/session/tree-presentation.code.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.impl.js +31 -337
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -1
- package/dist/core/storage/session/tree-presentation.js +11 -7
- package/dist/core/storage/session/types.d.ts +26 -0
- package/dist/core/storage/storage-status.code.js +3 -0
- package/dist/core/storage/storage-status.code.js.map +1 -0
- package/dist/core/storage/storage-status.impl.js +35 -2
- package/dist/core/storage/storage-status.js +11 -7
- package/dist/core/storage/team.code.js +3 -0
- package/dist/core/storage/team.code.js.map +1 -0
- package/dist/core/storage/team.impl.js +35 -2
- package/dist/core/storage/team.js +11 -7
- package/dist/core/structured-output/index.code.js +3 -0
- package/dist/core/structured-output/index.code.js.map +1 -0
- package/dist/core/structured-output/index.impl.js +35 -2
- package/dist/core/structured-output/index.js +11 -7
- package/dist/core/tasks/command-output.d.ts +4 -1
- package/dist/core/tasks/supervisor.d.ts +2 -0
- package/dist/core/tasks/task-completion-entry.code.js +254 -0
- package/dist/core/tasks/task-completion-entry.code.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.impl.js +33 -251
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -1
- package/dist/core/tasks/task-completion-entry.js +11 -7
- package/dist/core/tasks/task-file-history.code.js +424 -0
- package/dist/core/tasks/task-file-history.code.js.map +1 -0
- package/dist/core/tasks/task-file-history.impl.js +32 -375
- package/dist/core/tasks/task-file-history.impl.js.map +1 -1
- package/dist/core/tasks/task-file-history.js +11 -7
- package/dist/core/tasks/{task-reference-archive.impl.js → task-reference-archive.code.js} +51 -6
- package/dist/core/tasks/{task-reference-archive.impl.js.map → task-reference-archive.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-archive.js +11 -7
- package/dist/core/tasks/{task-reference-identity.impl.js → task-reference-identity.code.js} +1 -1
- package/dist/core/tasks/{task-reference-identity.impl.js.map → task-reference-identity.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-identity.js +11 -7
- package/dist/core/tasks/task-reference-stream.code.js +3 -0
- package/dist/core/tasks/task-reference-stream.code.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.impl.js +35 -2
- package/dist/core/tasks/task-reference-stream.js +11 -7
- package/dist/core/tasks/task-unsaved-answer.code.js +3 -0
- package/dist/core/tasks/task-unsaved-answer.code.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js +35 -2
- package/dist/core/tasks/task-unsaved-answer.js +11 -7
- package/dist/core/tasks/task-view-source.code.js +3 -0
- package/dist/core/tasks/task-view-source.code.js.map +1 -0
- package/dist/core/tasks/task-view-source.d.ts +9 -0
- package/dist/core/tasks/task-view-source.impl.js +35 -2
- package/dist/core/tasks/task-view-source.js +12 -8
- package/dist/core/tools/read-url.code.js +1530 -0
- package/dist/core/tools/read-url.code.js.map +1 -0
- package/dist/core/tools/read-url.impl.js +30 -1524
- package/dist/core/tools/read-url.impl.js.map +1 -1
- package/dist/core/tools/read-url.js +11 -7
- package/dist/core/worktree-snapshot/blob-store.js +50 -5
- package/dist/core/worktree-snapshot/errors.code.js +6 -0
- package/dist/core/worktree-snapshot/errors.code.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.impl.js +35 -5
- package/dist/core/worktree-snapshot/errors.js +11 -7
- package/dist/core/worktree-snapshot/session-index-reset.code.js +136 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +34 -134
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.js +11 -7
- package/dist/extensions/codemode/execute.code.js +618 -0
- package/dist/extensions/codemode/execute.code.js.map +1 -0
- package/dist/extensions/codemode/execute.impl.js +30 -612
- package/dist/extensions/codemode/execute.impl.js.map +1 -1
- package/dist/extensions/codemode/execute.js +11 -7
- package/dist/extensions/codemode/renderer.code.js +110 -0
- package/dist/extensions/codemode/renderer.code.js.map +1 -0
- package/dist/extensions/codemode/renderer.impl.js +33 -107
- package/dist/extensions/codemode/renderer.impl.js.map +1 -1
- package/dist/extensions/codemode/renderer.js +11 -7
- package/dist/extensions/mcp/cli.code.js +565 -0
- package/dist/extensions/mcp/cli.code.js.map +1 -0
- package/dist/extensions/mcp/cli.impl.js +32 -561
- package/dist/extensions/mcp/cli.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.js +11 -7
- package/dist/extensions/mcp/cli.lazy.code.js +52 -0
- package/dist/extensions/mcp/cli.lazy.code.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.impl.js +36 -7
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.js +11 -7
- package/dist/extensions/mcp/client/transports/stdio.d.ts +2 -0
- package/dist/extensions/mcp/runtime.code.js +5 -0
- package/dist/extensions/mcp/runtime.code.js.map +1 -0
- package/dist/extensions/mcp/runtime.impl.js +35 -4
- package/dist/extensions/mcp/runtime.js +11 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +12 -0
- package/dist/main-first-time-setup.code.js.map +1 -0
- package/dist/main-first-time-setup.impl.js +35 -11
- package/dist/main-first-time-setup.impl.js.map +1 -1
- package/dist/main-first-time-setup.js +11 -7
- package/dist/main.d.ts +1 -1
- package/dist/main.js +2 -2
- package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +6 -1
- package/dist/modes/interactive/agent-view/contracts.d.ts +4 -0
- package/dist/modes/interactive/chat-reader-records.d.ts +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +338 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js +33 -290
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.js +11 -7
- package/dist/modes/interactive/components/task-selection-state.d.ts +8 -3
- package/dist/modes/interactive/components/task-transcript-page.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +191 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +34 -189
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector-archive.js +11 -7
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -0
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-queueing.d.ts +4 -0
- package/dist/modes/interactive/interactive-render-chat.d.ts +22 -0
- package/dist/modes/interactive/interactive-startup.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -1
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive/steering-queue-controller.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-schema-factory.d.ts +26 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +4 -5
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +30 -5
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
- package/dist/modes/interactive-engine/protocol.d.ts +32 -1
- package/dist/modes/rpc/agent-view-rpc-types.d.ts +12 -1
- package/dist/modes/rpc/agent-view-rpc-types.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/package-manager-cli.code.js +1140 -0
- package/dist/package-manager-cli.code.js.map +1 -0
- package/dist/package-manager-cli.impl.js +36 -1067
- package/dist/package-manager-cli.impl.js.map +1 -1
- package/dist/package-manager-cli.js +11 -7
- package/dist/rpc-entry.js +2 -2
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/13.js +1 -0
- package/dist/startup-stages/2.js +1 -7
- package/dist/startup-stages/3.js +6 -2
- package/dist/startup-stages/4.js +2 -1
- package/dist/startup-stages/5.js +1 -7
- package/dist/startup-stages/6.js +7 -10
- package/dist/startup-stages/7.js +10 -3
- package/dist/startup-stages/8.js +3 -6
- package/dist/startup-stages/9.js +6 -1
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/canonical-path.js +2 -0
- package/dist/utils/canonical-path.js.map +1 -1
- package/dist/utils/child-process.d.ts +41 -1
- package/dist/utils/compile-cache-warmup-host.js +63 -18
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/credential-redaction.d.ts +50 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
- package/dist/utils/interactive-engine-env.d.ts +2 -0
- package/dist/utils/memoize-async.d.ts +32 -0
- package/dist/utils/memoize-async.js +91 -0
- package/dist/utils/memoize-async.js.map +1 -0
- package/dist/utils/photon.js +19 -29
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +7 -4
- package/dist/utils/startup-database-spare.code.js +108 -0
- package/dist/utils/startup-database-spare.code.js.map +1 -0
- package/dist/utils/startup-database-spare.impl.js +33 -105
- package/dist/utils/startup-database-spare.impl.js.map +1 -1
- package/dist/utils/startup-database-spare.js +11 -7
- package/dist/utils/tools-manager.code.js +3 -0
- package/dist/utils/tools-manager.code.js.map +1 -0
- package/dist/utils/tools-manager.impl.js +35 -2
- package/dist/utils/tools-manager.js +11 -7
- package/dist/utils/windows-cwd.js +585 -0
- package/dist/utils/windows-cwd.js.map +1 -0
- package/docs/extensions.md +1 -1
- package/docs/getting-started/installation.md +2 -0
- package/docs/intercom/operations.md +1 -0
- package/docs/reference/cli.md +1 -1
- package/package.json +24 -24
- package/dist/_shared/mode-shared-HP7GUA7J.js.map +0 -1
- package/dist/_shared/p1a-prewarm-YK3KDTLN.js.map +0 -1
- package/dist/_shared/p1b-elig-PXQA2FYP.js.map +0 -1
- package/dist/_shared/startup-0-0-X4NF3GKM.js.map +0 -1
- package/dist/_shared/startup-0-1-7QTG6VJZ.js.map +0 -1
- package/dist/_shared/startup-0-2-KFDYPDJK.js.map +0 -1
- package/dist/_shared/startup-8-1-KQJBDKRU.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_DEBUG, ENV_OFFLINE, ENV_PACKAGE_DIR, ENV_SELF_UPDATE_COMMAND, ENV_SESSION_DIR, ENV_SHARE_VIEWER_URL, ENV_STDIN_TIMEOUT_MS, ENV_TELEMETRY, INSTALLED_EXTENSION_ENTRIES, SOURCE_EXTENSION_ENTRIES, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getEnvValue, getPackageDir, helperLaunchAsync, isBunBinary, isBundledBuild, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-
|
|
3
|
-
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, attachSessionClaim, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, setFunctionList, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, toError, trailingWs, uniquifyToolCallIds, validQuestionnaire, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-
|
|
2
|
+
import { APP_NAME, BUILTIN_PACKAGE_DIR_NAMES, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_DEBUG, ENV_OFFLINE, ENV_PACKAGE_DIR, ENV_SELF_UPDATE_COMMAND, ENV_SESSION_DIR, ENV_SHARE_VIEWER_URL, ENV_STDIN_TIMEOUT_MS, ENV_TELEMETRY, INSTALLED_EXTENSION_ENTRIES, SOURCE_EXTENSION_ENTRIES, VERSION, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getEnvValue, getPackageDir, helperLaunchAsync, isBunBinary, isBundledBuild, isChildProcessExitStatusUnknownError, missingHelperOptions, resolvePath, stripBom, waitForChildProcess } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { BUILTIN_HELP_TOOL_NAMES, BUILTIN_PATH_PREFIX, CountdownTimer, Diff, DynamicBorder, EventSourceError, FORKED_PACKAGE_NAMES, FileToolAbortedError, FramedSelector, GIT_MINIMUM_VERSION, GitProvisionConfigError, GitProvisionTimeoutError, GitUnavailableError, JSON_RPC_ERROR_CODES, LlamaServerRequestError, LlamaServerUnreachableError, MAX_POSITION_LENGTH, MAX_TOOL_DETACHMENT_AFTER_MS, ManagedToolDownloadError, ManagedToolTimeoutError, McpAbortError, McpConnectionClosedError, McpError, McpTimeoutError, ROW_INTENT_META, STALE_EXTENSION_CONTEXT_MESSAGE, SUPPORTED_PROTOCOL_VERSIONS, Stop, SubscriptionClosedError, SubscriptionConfigError, SubscriptionEventError, SubscriptionHandlerError, SubscriptionRecordError, TASK_MARKS, TaskCleanupError, TaskEvictedError, ToolDetachmentError, VALID_THINKING_LEVELS, abortSymbol, applyExifOrientation, applySessionSummaryEntries, asyncScope, attachCleanupCause as attachCleanupCause$1, attachGitCleanupFailure, attachSessionClaim, cancelReasonText, canonicalEventBusFor, captureHerdrEnvironment, combineUsage, compactTemplate, compactUrl, createGitEnvironment, createOwnedAbortController, decodeChatOrder, decodeChatRecord, defaultToolNamesFor, deserializeToolDetachmentError, encodeChatOrder, fetchWithRetry, fieldTone, firstChatOrders, flushable, formatSize, formatTodoId, formatTokenCount, getBuiltinPackageLocations, getDefaultCacheRetention, getDefaultSessionDirPath, getFinalValue, getFunctionList, getManyValues, getPiUserAgent, getProviderLoginHelp, getResourcePathKeyAsync, getTodoStatus, getTodoTitle, getToolListError, holdProcessDescendants, isEventSourceError, isExtensionStartupFailure, isFinalValue, isFlushable, isFunctionList, isGitProvisionError, isGitUnavailableError, isInstallTelemetryEnabled, isJsonRpcId, isJsonRpcNotification, isJsonRpcRequest, isJsonRpcResponse, isManagedToolError, isMandatoryRuntimeTool, isMany, isObject, isStop, isSyntheticPath, isTodoClosed, isTrustedMandatoryRuntimeTool, isValidThinkingLevel, leadingAndTrailingWs, leadingWs, longestCommonPrefix, longestCommonSuffix, materializeSessionSummaryMetadata, maximumOverlap, mergeReadRanges, none, normalizeDisplayText, normalizeTodoId, parseTranscriptFrameLayout, registerCanonicalEventBus, removePrefix, removeSuffix, renderToolPath, replacePrefix, replaceSuffix, replaceTabs, reportContained, require_constants, require_debug, require_identity, require_ignore, require_parse_url, require_sha256, require_stringifyNumber, require_util_contains_newline, rowTone, segment, setFunctionList, sharedClockNow, sharedWakeDispatcher, sleep as sleep$1, spanElapsedMs, spawnHostProcess, splitTodosByAssignment, stop, str as str$1, stripFenceMarkers, styleFieldTone, summarizeSession, toError, trailingWs, uniquifyToolCallIds, validQuestionnaire, withCleanup, withLegacyPackageNames, yieldToEventLoop, yieldTurn } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
4
|
import { CodeHighlighter, OVERLAY_ACTIVE_ROW_MARKER, getLanguageFromPath, graphemeAt, highlightCode, keyHint, loadPhoton, navActionText, navFirstKeyText, parenthesizedKeyHint, rawKeyHint, renderNavHintLine, singleLineDisplayText, terminalDisplayCursor, terminalDisplayText, theme } from "./p2-shell-main-B2WIALFD.js";
|
|
5
|
-
import { failureDebugFields, findInCauseChain, hasErrorIdentity, ownProcessStartToken, readProcessStartToken, reportDebugAsync, serializeErrorCause } from "./p1b-elig-
|
|
5
|
+
import { failureDebugFields, findInCauseChain, hasErrorIdentity, ownProcessStartToken, readProcessStartToken, reportDebugAsync, serializeErrorCause } from "./p1b-elig-ENCUPKKJ.js";
|
|
6
6
|
import { windowsPowerShellEnvironment } from "./p1-elig-shell-WWRO3L2R.js";
|
|
7
7
|
import { SessionOpenElsewhereError, parseSerializedDecisionError } from "./settings-startup-65YEWRV2.js";
|
|
8
8
|
import { SETTINGS_DEFAULTS } from "./p2-common-YLSYXMDQ.js";
|
|
9
|
+
import { interactiveEngineStartupEnv } from "./p1a-prewarm-UQY3X2UK.js";
|
|
9
10
|
import { access, lstat, mkdir, open, readFile, readdir, rename, rm, rmdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
10
11
|
import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
11
12
|
import { basename, delimiter, dirname, isAbsolute, join, relative, resolve, sep } from "path";
|
|
@@ -22,18 +23,19 @@ import chalk from "chalk";
|
|
|
22
23
|
import { SessionBlobError, StorageConfigError, StorageError, isStorageError, rehydrateStorageError, serializeStorageError } from "../core/storage/errors.js";
|
|
23
24
|
import { renderStorageIdentifiers, storageMigrationTable, validateStoragePrefix } from "../core/storage/prefix.js";
|
|
24
25
|
import { chmod as chmod$1, lstat as lstat$1, mkdir as mkdir$1, mkdtemp as mkdtemp$1, open as open$1, readFile as readFile$1, readdir as readdir$1, readlink as readlink$1, rename as rename$1, rm as rm$1, stat as stat$2, utimes as utimes$1, writeFile as writeFile$1 } from "fs/promises";
|
|
25
|
-
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
26
26
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
27
27
|
import lockfile from "proper-lockfile";
|
|
28
28
|
import { StringEnum, clampThinkingLevel, getApiProvider } from "@bastani/atomic-ai/compat";
|
|
29
29
|
import { createHash as createHash$1, randomUUID as randomUUID$1 } from "crypto";
|
|
30
30
|
import { setTimeout as setTimeout$1 } from "timers/promises";
|
|
31
31
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
32
|
+
import { memoizeAsync } from "../utils/memoize-async.js";
|
|
32
33
|
import { refreshGitHubCopilotAccountModelLists } from "@bastani/atomic-ai/providers/github-copilot";
|
|
33
34
|
import { clearTimeout as clearTimeout$1, setTimeout as setTimeout$2 } from "node:timers";
|
|
34
35
|
import { Buffer as Buffer$1, constants as constants$3 } from "node:buffer";
|
|
35
36
|
import { StringDecoder } from "node:string_decoder";
|
|
36
37
|
import { isProxy } from "node:util/types";
|
|
38
|
+
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
37
39
|
import { dialectOf } from "../core/storage/dialect.js";
|
|
38
40
|
import { applyStorageMigrations, withShortSchemaLockWaits } from "../core/storage/migrations.js";
|
|
39
41
|
import { sequenceRunner } from "../core/storage/statement-sequence.js";
|
|
@@ -4913,20 +4915,18 @@ async function loadPngTranscoder() {
|
|
|
4913
4915
|
return pngBytes ? Buffer.from(pngBytes).toString("base64") : null;
|
|
4914
4916
|
};
|
|
4915
4917
|
}
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
+
const registerPngTranscoder = memoizeAsync(async () => {
|
|
4919
|
+
const transcoder = await loadPngTranscoder();
|
|
4920
|
+
if (!transcoder) return false;
|
|
4921
|
+
setImageTranscoder(transcoder);
|
|
4922
|
+
return true;
|
|
4923
|
+
}, { shouldCache: (registered) => registered });
|
|
4918
4924
|
/** Register the PNG transcoder on Kitty terminals, then redraw callers' fallback images. */
|
|
4919
4925
|
function ensurePngTranscoder(onRegistered) {
|
|
4920
|
-
if (
|
|
4921
|
-
|
|
4922
|
-
if (!transcoder) return false;
|
|
4923
|
-
setImageTranscoder(transcoder);
|
|
4924
|
-
pngTranscoderRegistered = true;
|
|
4925
|
-
return true;
|
|
4926
|
-
});
|
|
4927
|
-
pngTranscoderLoad.then((registered) => {
|
|
4926
|
+
if (registerPngTranscoder.peek() === true || getCapabilities().images !== "kitty") return;
|
|
4927
|
+
registerPngTranscoder().then((registered) => {
|
|
4928
4928
|
if (registered) onRegistered();
|
|
4929
|
-
});
|
|
4929
|
+
}, () => {});
|
|
4930
4930
|
}
|
|
4931
4931
|
// dist/utils/image-resize-core.js
|
|
4932
4932
|
const IMAGE_RESIZE_WORKER_RESPONSE_TYPE = "pi:image-resize-response";
|
|
@@ -7038,7 +7038,8 @@ function createLazyBuiltinFactory(spec, loadImplementation) {
|
|
|
7038
7038
|
eventName: "session_start",
|
|
7039
7039
|
event: {
|
|
7040
7040
|
type: "session_start",
|
|
7041
|
-
reason: "startup"
|
|
7041
|
+
reason: "startup",
|
|
7042
|
+
...interactiveEngineStartupEnv().restarted ? { engineRestart: true } : {}
|
|
7042
7043
|
},
|
|
7043
7044
|
ctx,
|
|
7044
7045
|
generation: ++lifecycleGeneration,
|
|
@@ -7092,7 +7093,8 @@ function createLazyBuiltinFactory(spec, loadImplementation) {
|
|
|
7092
7093
|
eventName: "session_start",
|
|
7093
7094
|
event: {
|
|
7094
7095
|
type: "session_start",
|
|
7095
|
-
reason: "startup"
|
|
7096
|
+
reason: "startup",
|
|
7097
|
+
...interactiveEngineStartupEnv().restarted ? { engineRestart: true } : {}
|
|
7096
7098
|
},
|
|
7097
7099
|
ctx,
|
|
7098
7100
|
generation: ++lifecycleGeneration,
|
|
@@ -8483,9 +8485,11 @@ async function execCommand(command, args, cwd, options, onQuit) {
|
|
|
8483
8485
|
})();
|
|
8484
8486
|
return treeStop;
|
|
8485
8487
|
};
|
|
8488
|
+
const waitAbort = new AbortController();
|
|
8486
8489
|
const killProcess = (startedAborted = false) => {
|
|
8487
8490
|
if (killed) return;
|
|
8488
8491
|
killed = true;
|
|
8492
|
+
waitAbort.abort();
|
|
8489
8493
|
if (startedAborted) proc.kill("SIGTERM");
|
|
8490
8494
|
else endTree();
|
|
8491
8495
|
forceKillId = setTimeout(() => {
|
|
@@ -8537,11 +8541,12 @@ async function execCommand(command, args, cwd, options, onQuit) {
|
|
|
8537
8541
|
});
|
|
8538
8542
|
let code;
|
|
8539
8543
|
try {
|
|
8540
|
-
code = await waitForChildProcess(proc);
|
|
8544
|
+
code = await waitForChildProcess(proc, { signal: waitAbort.signal });
|
|
8541
8545
|
} catch (error) {
|
|
8542
8546
|
if (!(error instanceof Error)) throw error;
|
|
8543
8547
|
code = 1;
|
|
8544
|
-
if (!
|
|
8548
|
+
if (!killed && isChildProcessExitStatusUnknownError(error)) stderr = stderr ? `${stderr}\n${error.message}` : error.message;
|
|
8549
|
+
else if (!stderr) stderr = error.message;
|
|
8545
8550
|
} finally {
|
|
8546
8551
|
clearTimeout(timeoutId);
|
|
8547
8552
|
options?.signal?.removeEventListener("abort", abort);
|
|
@@ -9786,8 +9791,6 @@ async function deleteFileChatRecords(owner) {
|
|
|
9786
9791
|
}
|
|
9787
9792
|
// dist/core/extensions/loader-host-modules.js
|
|
9788
9793
|
const __atomicDistModuleUrl = new URL("../core/extensions/loader-host-modules.js", import.meta.url).href;
|
|
9789
|
-
let virtualModules = null;
|
|
9790
|
-
let virtualModulesPromise = null;
|
|
9791
9794
|
function loadOptionalAtomicNatives(requireFromHost, specifier) {
|
|
9792
9795
|
try {
|
|
9793
9796
|
return requireFromHost(specifier);
|
|
@@ -9798,38 +9801,38 @@ function loadOptionalAtomicNatives(requireFromHost, specifier) {
|
|
|
9798
9801
|
async function loadVirtualModules() {
|
|
9799
9802
|
const atomicNatives = loadOptionalAtomicNatives(createModuleRequire(__atomicDistModuleUrl), isBunBinary ? join$1(getPackageDir(), "node_modules", "@bastani", "atomic-natives", "native", "index.js") : "@bastani/atomic-natives");
|
|
9800
9803
|
const [typebox, typeboxCompile, typeboxError, typeboxFormat, typeboxGuard, typeboxSchema, typeboxSystem, typeboxType, typeboxValue, agentCore, tui, tuiLayout, tuiLayoutNode, ai, aiOauth, aiModels, aiProviders, aiCloudflareGatewayBinding, aiProviderEnv, aiOauthPage, codemode, codemodeDeclarations, codemodeSource, codemodePortable, codemodeNodeOptions, schema, schemaFormats, telemetry, telemetryRender, properLockfile, codingAgent, storage] = await Promise.all([
|
|
9801
|
-
import("@bastani/atomic-ai/utils/typebox/index"),
|
|
9802
|
-
import("@bastani/atomic-ai/utils/typebox/compile"),
|
|
9803
|
-
import("@bastani/atomic-ai/utils/typebox/error"),
|
|
9804
|
-
import("@bastani/atomic-ai/utils/typebox/format"),
|
|
9805
|
-
import("@bastani/atomic-ai/utils/typebox/guard"),
|
|
9806
|
-
import("@bastani/atomic-ai/utils/typebox/schema"),
|
|
9807
|
-
import("@bastani/atomic-ai/utils/typebox/system"),
|
|
9808
|
-
import("@bastani/atomic-ai/utils/typebox/type"),
|
|
9809
|
-
import("@bastani/atomic-ai/utils/typebox/value"),
|
|
9810
|
-
import("@bastani/atomic-agent-core"),
|
|
9811
|
-
import("@bastani/atomic-tui"),
|
|
9812
|
-
import("@bastani/atomic-tui/dist/layout.js"),
|
|
9813
|
-
import("@bastani/atomic-tui/dist/layout-node.js"),
|
|
9814
|
-
import("@bastani/atomic-ai/compat"),
|
|
9815
|
-
import("@bastani/atomic-ai/oauth"),
|
|
9816
|
-
import("@bastani/atomic-ai/models"),
|
|
9817
|
-
import("@bastani/atomic-ai/providers/all"),
|
|
9818
|
-
import("@bastani/atomic-ai/api/cloudflare-gateway-binding"),
|
|
9819
|
-
import("@bastani/atomic-ai/utils/provider-env"),
|
|
9820
|
-
import("@bastani/atomic-ai/utils/oauth-page"),
|
|
9821
|
-
import("@bastani/atomic-codemode"),
|
|
9822
|
-
import("@bastani/atomic-codemode/declarations"),
|
|
9823
|
-
import("@bastani/atomic-codemode/source"),
|
|
9824
|
-
import("@bastani/atomic-codemode/portable"),
|
|
9825
|
-
import("@bastani/atomic-codemode/node-options"),
|
|
9826
|
-
import("@bastani/atomic-schema"),
|
|
9827
|
-
import("@bastani/atomic-schema/formats"),
|
|
9828
|
-
import("@bastani/atomic-telemetry"),
|
|
9829
|
-
import("@bastani/atomic-telemetry/render"),
|
|
9804
|
+
import("@bastani/atomic-ai/utils/typebox/index").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9805
|
+
import("@bastani/atomic-ai/utils/typebox/compile").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9806
|
+
import("@bastani/atomic-ai/utils/typebox/error").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9807
|
+
import("@bastani/atomic-ai/utils/typebox/format").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9808
|
+
import("@bastani/atomic-ai/utils/typebox/guard").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9809
|
+
import("@bastani/atomic-ai/utils/typebox/schema").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9810
|
+
import("@bastani/atomic-ai/utils/typebox/system").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9811
|
+
import("@bastani/atomic-ai/utils/typebox/type").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9812
|
+
import("@bastani/atomic-ai/utils/typebox/value").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9813
|
+
import("@bastani/atomic-agent-core").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9814
|
+
import("@bastani/atomic-tui").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9815
|
+
import("@bastani/atomic-tui/dist/layout.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9816
|
+
import("@bastani/atomic-tui/dist/layout-node.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9817
|
+
import("@bastani/atomic-ai/compat").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9818
|
+
import("@bastani/atomic-ai/oauth").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9819
|
+
import("@bastani/atomic-ai/models").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9820
|
+
import("@bastani/atomic-ai/providers/all").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9821
|
+
import("@bastani/atomic-ai/api/cloudflare-gateway-binding").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9822
|
+
import("@bastani/atomic-ai/utils/provider-env").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9823
|
+
import("@bastani/atomic-ai/utils/oauth-page").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9824
|
+
import("@bastani/atomic-codemode").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9825
|
+
import("@bastani/atomic-codemode/declarations").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9826
|
+
import("@bastani/atomic-codemode/source").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9827
|
+
import("@bastani/atomic-codemode/portable").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9828
|
+
import("@bastani/atomic-codemode/node-options").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9829
|
+
import("@bastani/atomic-schema").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9830
|
+
import("@bastani/atomic-schema/formats").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9831
|
+
import("@bastani/atomic-telemetry").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9832
|
+
import("@bastani/atomic-telemetry/render").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9830
9833
|
import("proper-lockfile"),
|
|
9831
|
-
import("../index.js"),
|
|
9832
|
-
import("../core/storage/index.js")
|
|
9834
|
+
import("../index.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9835
|
+
import("../core/storage/index.js").catch((error) => __atomicOnDemandFailed(error, "session storage"))
|
|
9833
9836
|
]);
|
|
9834
9837
|
const typeboxModules = {
|
|
9835
9838
|
"": typebox,
|
|
@@ -9882,40 +9885,38 @@ function prefixedModules(name, modules) {
|
|
|
9882
9885
|
return Object.fromEntries(Object.entries(modules).map(([subpath, module]) => [`${name}${subpath}`, module]));
|
|
9883
9886
|
}
|
|
9884
9887
|
const loaderHostModulesTestHooks = { loadOptionalAtomicNatives };
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
virtualModules = modules;
|
|
9889
|
-
return modules;
|
|
9890
|
-
}, (error) => {
|
|
9891
|
-
virtualModulesPromise = null;
|
|
9892
|
-
throw error;
|
|
9893
|
-
});
|
|
9894
|
-
return virtualModulesPromise;
|
|
9888
|
+
const cachedVirtualModules = memoizeAsync(loadVirtualModules);
|
|
9889
|
+
function getVirtualModules() {
|
|
9890
|
+
return cachedVirtualModules();
|
|
9895
9891
|
}
|
|
9896
9892
|
async function getStorageAdapterHostModules() {
|
|
9897
|
-
const storage = await import("../core/storage/index.js");
|
|
9893
|
+
const storage = await import("../core/storage/index.js").catch((error) => __atomicOnDemandFailed(error, "session storage"));
|
|
9898
9894
|
if (!(isBunBinary || isBundledBuild)) return { "@bastani/atomic/storage": storage };
|
|
9899
9895
|
return {
|
|
9900
|
-
"@bastani/atomic": await import("../index.js"),
|
|
9896
|
+
"@bastani/atomic": await import("../index.js").catch((error) => __atomicOnDemandFailed(error, "this feature")),
|
|
9901
9897
|
"@bastani/atomic/storage": storage
|
|
9902
9898
|
};
|
|
9903
9899
|
}
|
|
9904
9900
|
// dist/core/extensions/native-builtin-entries.js
|
|
9905
|
-
|
|
9901
|
+
function candidateNativeBuiltinEntries() {
|
|
9902
|
+
return getBuiltinPackageLocations().map(({ distDirName, packageDir }) => resolve$1(packageDir, INSTALLED_EXTENSION_ENTRIES[distDirName]));
|
|
9903
|
+
}
|
|
9906
9904
|
async function findNativeBuiltinExtensionEntries() {
|
|
9907
|
-
const
|
|
9908
|
-
|
|
9909
|
-
|
|
9910
|
-
|
|
9911
|
-
|
|
9905
|
+
const candidates = candidateNativeBuiltinEntries();
|
|
9906
|
+
const found = await Promise.all(candidates.map((entryPath) => access(entryPath).then(() => [entryPath], () => [])));
|
|
9907
|
+
const entries = new Set(found.flat());
|
|
9908
|
+
return {
|
|
9909
|
+
entries,
|
|
9910
|
+
complete: candidates.length === BUILTIN_PACKAGE_DIR_NAMES.length && entries.size === candidates.length
|
|
9911
|
+
};
|
|
9912
9912
|
}
|
|
9913
|
+
const loadNativeBuiltinExtensionEntries = memoizeAsync(findNativeBuiltinExtensionEntries, { shouldCache: (result) => result.complete });
|
|
9913
9914
|
/** Exact installed entry paths belonging to identity-verified Atomic builtin packages. */
|
|
9914
|
-
function getNativeBuiltinExtensionEntries() {
|
|
9915
|
-
|
|
9916
|
-
return nativeBuiltinExtensionEntries;
|
|
9915
|
+
async function getNativeBuiltinExtensionEntries() {
|
|
9916
|
+
return (await loadNativeBuiltinExtensionEntries()).entries;
|
|
9917
9917
|
}
|
|
9918
9918
|
async function isNativeBuiltinExtensionPath(resolvedPath) {
|
|
9919
|
+
if (!candidateNativeBuiltinEntries().includes(resolvedPath)) return false;
|
|
9919
9920
|
return (await getNativeBuiltinExtensionEntries()).has(resolvedPath);
|
|
9920
9921
|
}
|
|
9921
9922
|
/**
|
|
@@ -13639,6 +13640,127 @@ function rejectMalformedToolArguments(tool, getMessages) {
|
|
|
13639
13640
|
}
|
|
13640
13641
|
};
|
|
13641
13642
|
}
|
|
13643
|
+
// dist/core/tools/session-history.js
|
|
13644
|
+
/** Characters one call may return; longer output is cut and says so. */
|
|
13645
|
+
const MAX_OUTPUT_CHARS = 5e4;
|
|
13646
|
+
const CURSOR_VALUE = /^\d+(?:\.\d+){0,3}$/;
|
|
13647
|
+
const sessionHistorySchema = Type$1.Object({
|
|
13648
|
+
pattern: Type$1.Optional(Type$1.String({ description: "Regular expression to search this session's history for. Keep it and set `lines` to a `?cursor=` URL to continue." })),
|
|
13649
|
+
lines: Type$1.Optional(Type$1.String({ description: "An entry range of this session's history to read, such as \"120-260\", or a `?cursor=` URL to continue." }))
|
|
13650
|
+
});
|
|
13651
|
+
function capped(text) {
|
|
13652
|
+
return text.length <= MAX_OUTPUT_CHARS ? text : `${text.slice(0, MAX_OUTPUT_CHARS)}\n[output cut at ${MAX_OUTPUT_CHARS} characters; narrow the search or the range]`;
|
|
13653
|
+
}
|
|
13654
|
+
function clampSpanEnd(start, end) {
|
|
13655
|
+
const maxEnd = Math.min(Number.MAX_SAFE_INTEGER, start + Math.min(399, Number.MAX_SAFE_INTEGER - start));
|
|
13656
|
+
return Math.min(end, maxEnd);
|
|
13657
|
+
}
|
|
13658
|
+
function parseEntryRange(value, label, capSpan) {
|
|
13659
|
+
const match = /^(\d+)(?:\s*-\s*(\d+))?$/.exec(value.trim());
|
|
13660
|
+
if (!match) throw new Error(`Invalid lines "${label}": use an entry range such as "120-260".`);
|
|
13661
|
+
const start = Number(match[1]);
|
|
13662
|
+
const end = match[2] === void 0 ? start : Number(match[2]);
|
|
13663
|
+
if (!Number.isSafeInteger(start) || !Number.isSafeInteger(end) || start < 1 || end < start) throw new Error(`Invalid lines "${label}": the entry range must start at 1 or later.`);
|
|
13664
|
+
return {
|
|
13665
|
+
start,
|
|
13666
|
+
end: capSpan ? clampSpanEnd(start, end) : end
|
|
13667
|
+
};
|
|
13668
|
+
}
|
|
13669
|
+
function parseCursorQuery(query, label) {
|
|
13670
|
+
const params = new URLSearchParams(query);
|
|
13671
|
+
const keys = [...params.keys()];
|
|
13672
|
+
const cursor = params.get("cursor");
|
|
13673
|
+
if (keys.length !== 1 || keys[0] !== "cursor" || !cursor || !CURSOR_VALUE.test(cursor)) throw new Error(`Invalid lines "${label}": only ?cursor= continuations for this session are allowed.`);
|
|
13674
|
+
const parts = cursor.split(".").map((part) => Number(part));
|
|
13675
|
+
const firstSeq = parts[0] ?? 0;
|
|
13676
|
+
if (parts.some((part) => !Number.isSafeInteger(part) || part < 0) || firstSeq < 1) throw new Error(`Invalid lines "${label}": cursor positions must be safe positive integers.`);
|
|
13677
|
+
return {
|
|
13678
|
+
query: `?cursor=${cursor}`,
|
|
13679
|
+
firstSeq
|
|
13680
|
+
};
|
|
13681
|
+
}
|
|
13682
|
+
function parseTarget(baseUrl, rawLines, capSpan) {
|
|
13683
|
+
const trimmed = rawLines.trim();
|
|
13684
|
+
let rest = trimmed;
|
|
13685
|
+
if (trimmed.startsWith("history://")) {
|
|
13686
|
+
if (!trimmed.startsWith(baseUrl)) throw new Error(`Invalid lines "${rawLines}": only this session's history (${baseUrl}) is reachable.`);
|
|
13687
|
+
rest = trimmed.slice(baseUrl.length);
|
|
13688
|
+
if (rest === "" || rest[0] !== "?" && rest[0] !== ":") throw new Error(`Invalid lines "${rawLines}": only this session's history (${baseUrl}) is reachable.`);
|
|
13689
|
+
}
|
|
13690
|
+
let query = "";
|
|
13691
|
+
let cursorStart = 1;
|
|
13692
|
+
if (rest.startsWith("?")) {
|
|
13693
|
+
const colon = rest.indexOf(":");
|
|
13694
|
+
const parsedCursor = parseCursorQuery(colon >= 0 ? rest.slice(1, colon) : rest.slice(1), rawLines);
|
|
13695
|
+
query = parsedCursor.query;
|
|
13696
|
+
cursorStart = parsedCursor.firstSeq;
|
|
13697
|
+
rest = colon >= 0 ? rest.slice(colon + 1) : "";
|
|
13698
|
+
} else if (rest.startsWith(":")) rest = rest.slice(1);
|
|
13699
|
+
if (rest === "" && query !== "") return capSpan ? {
|
|
13700
|
+
url: `${baseUrl}${query}`,
|
|
13701
|
+
range: {
|
|
13702
|
+
start: cursorStart,
|
|
13703
|
+
end: clampSpanEnd(cursorStart, Number.MAX_SAFE_INTEGER)
|
|
13704
|
+
}
|
|
13705
|
+
} : { url: `${baseUrl}${query}` };
|
|
13706
|
+
return {
|
|
13707
|
+
url: `${baseUrl}${query}`,
|
|
13708
|
+
range: parseEntryRange(rest, rawLines, capSpan)
|
|
13709
|
+
};
|
|
13710
|
+
}
|
|
13711
|
+
/**
|
|
13712
|
+
* Read-only access to this session's own history, for an agent whose tools do not include `read` and `search`. It
|
|
13713
|
+
* reaches only `history://sessions/<own id>`: no other session, file or project.
|
|
13714
|
+
*/
|
|
13715
|
+
function createSessionHistoryToolDefinition(name, options) {
|
|
13716
|
+
return {
|
|
13717
|
+
name,
|
|
13718
|
+
label: "Session history",
|
|
13719
|
+
description: "Search or read this session's own history after its context was cleared. When the context-cleared message tells you to `search` or `read` `history://sessions/<id>` and those tools are not available, use this tool instead: pass {\"pattern\": \"<regex>\"} to search (each match names its entry), then {\"lines\": \"N-M\"} to read a narrow entry range verbatim. Only this session's history is reachable.",
|
|
13720
|
+
parameters: sessionHistorySchema,
|
|
13721
|
+
promptSnippet: "Search and read this session's own history after a context clear (use in place of search/read on history://sessions/<id>)",
|
|
13722
|
+
execute: async (_toolCallId, { pattern, lines }, signal) => {
|
|
13723
|
+
const baseUrl = `history://sessions/${options.sessionId()}`;
|
|
13724
|
+
const router = options.router();
|
|
13725
|
+
if (pattern !== void 0 && pattern.trim() !== "") {
|
|
13726
|
+
const target = lines !== void 0 && lines.trim() !== "" ? parseTarget(baseUrl, lines, false) : void 0;
|
|
13727
|
+
const searchUrl = target ? target.url : baseUrl;
|
|
13728
|
+
if (!router.search) throw new Error(`Bounded history search is unavailable for ${baseUrl}.`);
|
|
13729
|
+
const found = await router.search(searchUrl, {
|
|
13730
|
+
pattern,
|
|
13731
|
+
ignoreCase: false,
|
|
13732
|
+
literal: false,
|
|
13733
|
+
contextBefore: 0,
|
|
13734
|
+
contextAfter: 0,
|
|
13735
|
+
...target?.range ? { ranges: [target.range] } : {},
|
|
13736
|
+
...signal === void 0 ? {} : { signal }
|
|
13737
|
+
});
|
|
13738
|
+
return {
|
|
13739
|
+
content: [{
|
|
13740
|
+
type: "text",
|
|
13741
|
+
text: capped(found?.trim() ? found : "No matches.")
|
|
13742
|
+
}],
|
|
13743
|
+
details: void 0
|
|
13744
|
+
};
|
|
13745
|
+
}
|
|
13746
|
+
if (lines === void 0) throw new Error("Pass {\"pattern\": \"<regex>\"} to search or {\"lines\": \"N-M\"} to read.");
|
|
13747
|
+
if (!router.readSelected) throw new Error(`Bounded history read is unavailable for ${baseUrl}.`);
|
|
13748
|
+
const { url, range } = parseTarget(baseUrl, lines, true);
|
|
13749
|
+
const transcript = await router.readSelected(url, {
|
|
13750
|
+
...range ? { ranges: [range] } : {},
|
|
13751
|
+
...signal === void 0 ? {} : { signal }
|
|
13752
|
+
});
|
|
13753
|
+
if (typeof transcript !== "string") throw new Error(`Bounded history read returned no transcript for ${baseUrl}.`);
|
|
13754
|
+
return {
|
|
13755
|
+
content: [{
|
|
13756
|
+
type: "text",
|
|
13757
|
+
text: capped(transcript)
|
|
13758
|
+
}],
|
|
13759
|
+
details: void 0
|
|
13760
|
+
};
|
|
13761
|
+
}
|
|
13762
|
+
};
|
|
13763
|
+
}
|
|
13642
13764
|
// dist/core/tools/tool-concurrency.js
|
|
13643
13765
|
function resolveToolConcurrency(concurrency, args) {
|
|
13644
13766
|
if (typeof concurrency !== "function") return concurrency ?? "shared";
|
|
@@ -16833,10 +16955,14 @@ function resolveCompactionModel(configured, models) {
|
|
|
16833
16955
|
function migrateCompactionModelSettings(settings, models) {
|
|
16834
16956
|
const migrated = [];
|
|
16835
16957
|
const scopes = settings.isProjectTrusted() ? ["global", "project"] : ["global"];
|
|
16958
|
+
let resolvedModels;
|
|
16836
16959
|
for (const scope of scopes) try {
|
|
16837
16960
|
const value = (scope === "global" ? settings.getGlobalSettings() : settings.getProjectSettings()).compactionModel;
|
|
16838
16961
|
if (typeof value !== "string") continue;
|
|
16839
|
-
const
|
|
16962
|
+
const trimmed = value.trim();
|
|
16963
|
+
if (trimmed === "" || trimmed === "auto") continue;
|
|
16964
|
+
resolvedModels ??= typeof models === "function" ? models() : models;
|
|
16965
|
+
const kind = classifyCompactionModel(trimmed, resolvedModels);
|
|
16840
16966
|
if (kind !== "chat" && kind !== "classifier") continue;
|
|
16841
16967
|
settings.setCompactionModel("auto", scope);
|
|
16842
16968
|
migrated.push({
|
|
@@ -18084,9 +18210,20 @@ function parseInteractiveEngineMessage(line) {
|
|
|
18084
18210
|
status
|
|
18085
18211
|
} : void 0;
|
|
18086
18212
|
}
|
|
18213
|
+
case "engine_agent_queue_invalidated": {
|
|
18214
|
+
const reason = value.reason;
|
|
18215
|
+
const validReason = reason === "stopped" || reason === "cleared" || reason === "session-ended" || reason === "sent-elsewhere";
|
|
18216
|
+
return typeof value.sessionId === "string" && value.sessionId.length > 0 && (value.sessionFile === void 0 || typeof value.sessionFile === "string" && value.sessionFile.length > 0) && validReason ? {
|
|
18217
|
+
type: value.type,
|
|
18218
|
+
sessionId: value.sessionId,
|
|
18219
|
+
...value.sessionFile === void 0 ? {} : { sessionFile: value.sessionFile },
|
|
18220
|
+
reason
|
|
18221
|
+
} : void 0;
|
|
18222
|
+
}
|
|
18087
18223
|
case "engine_view_agent": return typeof value.taskId === "string" || value.taskId === null ? {
|
|
18088
18224
|
type: value.type,
|
|
18089
18225
|
taskId: value.taskId,
|
|
18226
|
+
...typeof value.requestId === "number" && Number.isSafeInteger(value.requestId) && value.requestId > 0 ? { requestId: value.requestId } : {},
|
|
18090
18227
|
...value.keepScreen === true ? { keepScreen: true } : {},
|
|
18091
18228
|
...value.panel === true ? { panel: true } : {},
|
|
18092
18229
|
...value.panelOnView === true ? { panelOnView: true } : {}
|
|
@@ -18134,6 +18271,7 @@ function parseInteractiveEngineMessage(line) {
|
|
|
18134
18271
|
componentId: value.componentId,
|
|
18135
18272
|
overlay: value.overlay,
|
|
18136
18273
|
...value.purpose === "navigation" || value.purpose === "prompt" ? { purpose: value.purpose } : {},
|
|
18274
|
+
...value.acksClicks === true ? { acksClicks: true } : {},
|
|
18137
18275
|
deferInlineCustomUiFocus: value.deferInlineCustomUiFocus === true,
|
|
18138
18276
|
handlesCtrlC: value.handlesCtrlC === true,
|
|
18139
18277
|
handlesInternalUiAction: value.handlesInternalUiAction === true,
|
|
@@ -18165,6 +18303,7 @@ function parseInteractiveEngineMessage(line) {
|
|
|
18165
18303
|
...isCellCount(value.frame) ? { frame: value.frame } : {},
|
|
18166
18304
|
...Array.isArray(value.rowKeys) && value.rowKeys.every((key) => typeof key === "string") ? { rowKeys: value.rowKeys } : {},
|
|
18167
18305
|
...layoutField(value.layout),
|
|
18306
|
+
...typeof value.previewSeq === "number" && Number.isSafeInteger(value.previewSeq) && value.previewSeq > 0 ? { previewSeq: value.previewSeq } : {},
|
|
18168
18307
|
...isJsonObject(value.scrollRequest) && typeof value.scrollRequest.version === "number" && typeof value.scrollRequest.scrollTop === "number" ? { scrollRequest: {
|
|
18169
18308
|
version: value.scrollRequest.version,
|
|
18170
18309
|
scrollTop: value.scrollRequest.scrollTop
|
|
@@ -18176,6 +18315,11 @@ function parseInteractiveEngineMessage(line) {
|
|
|
18176
18315
|
requestId: value.requestId,
|
|
18177
18316
|
handled: value.handled
|
|
18178
18317
|
} : void 0;
|
|
18318
|
+
case "engine_custom_click_result": return typeof value.componentId === "string" && typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? {
|
|
18319
|
+
type: value.type,
|
|
18320
|
+
componentId: value.componentId,
|
|
18321
|
+
ackId: value.ackId
|
|
18322
|
+
} : void 0;
|
|
18179
18323
|
case "engine_custom_invalidate": return typeof value.componentId === "string" ? value.evictCache === true ? {
|
|
18180
18324
|
type: value.type,
|
|
18181
18325
|
componentId: value.componentId,
|
|
@@ -18331,12 +18475,19 @@ function parseInteractiveEngineCommand(line) {
|
|
|
18331
18475
|
...typeof value.rowKey === "string" ? { rowKey: value.rowKey } : {},
|
|
18332
18476
|
...isCellCount(value.clickId) ? { clickId: value.clickId } : {},
|
|
18333
18477
|
...value.cancelsClicks === true ? { cancelsClicks: true } : {},
|
|
18478
|
+
...typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? { ackId: value.ackId } : {},
|
|
18334
18479
|
x: value.x,
|
|
18335
18480
|
y: value.y,
|
|
18336
18481
|
width: value.width,
|
|
18337
18482
|
height: value.height
|
|
18338
18483
|
};
|
|
18339
|
-
if (
|
|
18484
|
+
if (value.type === "engine_custom_click_settle" && isCellCount(value.clickId)) return {
|
|
18485
|
+
type: value.type,
|
|
18486
|
+
componentId: value.componentId,
|
|
18487
|
+
clickId: value.clickId,
|
|
18488
|
+
...typeof value.ackId === "number" && Number.isSafeInteger(value.ackId) && value.ackId > 0 ? { ackId: value.ackId } : {}
|
|
18489
|
+
};
|
|
18490
|
+
if (value.type === "engine_custom_click_cancel" && isCellCount(value.clickId)) return {
|
|
18340
18491
|
type: value.type,
|
|
18341
18492
|
componentId: value.componentId,
|
|
18342
18493
|
clickId: value.clickId
|
|
@@ -18446,11 +18597,18 @@ function parseAgentViewStatus(value) {
|
|
|
18446
18597
|
if (value === void 0 || !isJsonObject(value)) return void 0;
|
|
18447
18598
|
const queued = value.queued;
|
|
18448
18599
|
if (!(typeof value.taskId === "string" && typeof value.agentKey === "string" && typeof value.name === "string" && typeof value.ruleLabel === "string" && typeof value.placeholder === "string" && typeof value.state === "string" && AGENT_VIEW_STATES.has(value.state) && typeof value.busy === "boolean" && typeof value.paused === "boolean" && typeof value.retrying === "boolean" && typeof value.heldPrompt === "boolean" && typeof value.gone === "boolean" && (value.readOnlyReason === void 0 || typeof value.readOnlyReason === "string") && (value.working === void 0 || value.working !== null && isJsonObject(value.working)) && queued !== void 0 && isJsonObject(queued) && isStringList(queued.steering) && isStringList(queued.followUp) && (value.unsaved === void 0 || isStringList(value.unsaved)))) return void 0;
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18600
|
+
let result = value;
|
|
18601
|
+
if (result.receipts !== void 0 && !isAgentViewReceipts(result.receipts)) {
|
|
18602
|
+
const { receipts: _receipts, ...rest } = result;
|
|
18603
|
+
result = rest;
|
|
18452
18604
|
}
|
|
18453
|
-
|
|
18605
|
+
const badSessionId = result.sessionId !== void 0 && (typeof result.sessionId !== "string" || result.sessionId.length === 0);
|
|
18606
|
+
const badSessionFile = result.sessionFile !== void 0 && (typeof result.sessionFile !== "string" || result.sessionFile.length === 0);
|
|
18607
|
+
if (badSessionId || badSessionFile) {
|
|
18608
|
+
const { sessionId: _sessionId, sessionFile: _sessionFile, ...rest } = result;
|
|
18609
|
+
result = rest;
|
|
18610
|
+
}
|
|
18611
|
+
return result;
|
|
18454
18612
|
}
|
|
18455
18613
|
function isAgentViewReceipts(value) {
|
|
18456
18614
|
if (!isJsonObject(value) || typeof value.sessionId !== "string" || !Array.isArray(value.taken)) return false;
|
|
@@ -18929,6 +19087,51 @@ async function readTransferDirectory(directory) {
|
|
|
18929
19087
|
function sessionScratchDir(agentDir, cwd, _sessionId) {
|
|
18930
19088
|
return getDefaultSessionDirPath(cwd, agentDir);
|
|
18931
19089
|
}
|
|
18932
|
-
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum$1 as StringEnum, TEAM_JOIN_COMMAND, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecord, assertSessionBlobStore, assertSessionNotOpenElsewhere, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, cleanupFailureSummary, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findSessionOpenHolder, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs$1 as getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, holdSessionOpenMarker, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, prepareSessionOpenMarkers, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reportDiagnostics, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionLifecycleCreation, sessionLifecycleScopes, sessionPosition, sessionScratchDir, setCallbackActivityReporter, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, splitSearchTextParts, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withoutCarriedToolOutput, withoutSearchPosition, writeChunksAtomically, writeLinesAtomically, writeRenderers };
|
|
19090
|
+
export { AgentRehydrateError, AgentReleaseConfigError, CacheWarmer, ChildCatalog, CommandDeliveries, DEFAULT_MAX_MESSAGE_BYTES, DEFAULT_SUBSCRIPTION_MAX_CONCURRENT, EMPTY_OUTPUT_TEXT, EngineHealthController, ExtensionInputComponent, ExtensionSelectorComponent, FirstTimeSetupComponent, GIT_RELEASE, HistorySearchPositions, IMAGE_RESIZE_WORKER_RESPONSE_TYPE, LEGACY_AZURE_PROVIDER, LlamaClient, MAX_INDEXED_ENTRY_CHARS, MULTI_SUBMIT_LABEL, MarkdownContentCache, McpClient, MultiSelectView, NestedGitignore, NestedToolCallRunner, NoUsableModelError, QuestionParamsSchema, RESERVED_LABELS, RESUME_TIMINGS_TYPE, RemoteModelCatalog, RemoteQueuePause, ReopenedCompletionHeaders, ResumeTimingsRecorder, SEARCH_PART_CHARS, SESSIONS_TRANSFER_DIRECTORY, SESSION_STORAGE_JOIN, STORAGE_JOIN_COMMAND, SUMMARY_COMPACTION_PREFIX, SessionKeyDigests, SessionStorageSelectionSchema, SettingsSchema, SqlSessionSearchIndex, StorageImportIncompleteError, StorageSelectionSchema, StorageTransferError, StringEnum$1 as StringEnum, TEAM_JOIN_COMMAND, TOOL_OUTPUT_ENTRY_TYPE, TRANSPILE_CACHE_WRITE_WAIT_MS, TaskElapsedClocks, TaskToolError, ToolExecutionScheduler, TransportEvents, UNORDERED_ADMISSION, VERBATIM_COMPACTION_PREFIX, VERIFICATION_PENDING_REASON, WorkspaceBindingError, WorkspaceCollectionError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceError, WorkspaceGitError, WorkspacePublicationError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, WrappingSelect, acceptsForkReplay, addResource, adoptCommandSession, appendFileChatRecord, assertSessionBlobStore, assertSessionNotOpenElsewhere, assertSettingsWrites, attachCleanupCause, bindRegistrationCallbacks, bindTaskClock, bindTaskClockSource, bodyWidths, buildDirectoryTree, buildDirectoryTreeFromOperations, buildToolStatusReport, cancelInitialBinding, cancelPausedOwnerTasks, cancelReceiptSentence, cancelReceiptStatus, captureForkReplayPair, captureRegistrationInvocation, carriedTransformedPrompt, carryCompletionEvidence, chatAnswerIntent, chatNumberingFor, childPresentationInput, claimInteractiveBind, cleanupFailureSummary, collectAgentTasks, collectCommandDeliveries, collectExtensionPackageWarnings, collectFlags, collectMarkdownTransformers, collectPackageInstallWarnings, collectRegisteredTools, collectSettingsDiagnostics, columnWidths, compareCreated, compareFrozen, computeFocusedOptionHasPreview, conflictEntries, convertImageBytesToPng, convertToLlm, convertToLlmWithForkBoundaries, convertToPng, copyRegistrations, copySessionBlobs, createAccumulator, createBranchSummaryMessage, createCustomMessage, createInvocationBindings, createLazyBuiltinFactory, createManagedTaskClocks, createProviderAlias, createSessionHistoryToolDefinition, createVerbatimCompactionMessage, crossTabLeftWidthWithDonation, currentResourceAdmission, decideLayout, deferCommandTurn, deferMessagesInterleavedWithToolBatch, deferRestorePhase, deleteFileChatRecords, describeToolSelection, detectLinuxLibc, diffLines, diffWords, discoverChatFile, drainProcessStdio, drainWindowsDirectorySecurityReads, dropDeferredCommandTurn, ensurePngTranscoder, ensureTool, errorMessage$1 as errorMessage, execCommand, extensionRefreshRejection, extensionSource, filterSupersededHerdrIntegrationPaths, findEntryRenderer, findMessageRenderer, findSessionOpenHolder, findToolDefinition, findWorkspaceError, fixUtf8Stream, flush, forkReplayFilter, forkToolDeclarations, formatAnswerScalar, formatBytes, formatNoUsableModelMessage, formatPackageInstallWarning, formatResumeTimings, formatTokenSegment, formatToolStatus, genBridge, getBuiltinExtensionEntryLabel, getClientIdentity, getCommandEnv, getGitDistributionTarget, getGitInstallDir, getGitReleaseMarker, getGitShellEnvironment, getGitShellEnvironmentAsync, getGitStatus, getGitStatusAsync, getLatestVersion, getLazyBuiltinSpec, getLoaderAgentDirs, getPromptCacheTtlMs$1 as getPromptCacheTtlMs, getStorageAdapterHostModules, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasExtensionHandlers, hasFileChatRecords, hasLazyBuiltinSpec, hasQuitStoppableCommands, hasRecordedTransformedPrompt, hasTaskPromptHost, hasTransformedPrompt, heldPromptInput, heldPrompts, holdSessionOpenMarker, initialBindScope, inlineToolOutput, insertForcedOptionsBeforeTerminator, invocationExtension, invocationRuntime, isAgentRehydrateError, isAgentReleaseConfigError, isBashToolResult, isContentFilterRefusal, isEditToolResult, isFindToolResult, isForkHeader, isHeldPromptInput, isInsideInputHook, isJsonValue, isLocalOnlySessionStorage, isLsToolResult, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isPowerShellToolResult, isPresentationHostInput, isProviderCredentialRejection, isReadToolResult, isRetryableAgentRehydrateError, isRetryableModelFailure, isRetryableSameModelFailure, isRetryableWorkspaceError, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isStorageImportIncompleteError, isStorageTransferError, isTaskToolError, isToolCallEventType, isTruthyEnvFlag, isUnrecognizedModelFailure, isVerbatimCompactionMessage, isWorkspaceBindingError, isWorkspaceCollectionError, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspacePublicationError, isWorkspaceRestoreError, isWorkspaceSandboxError, isWorkspaceSnapshotError, isWorkspaceTimeoutError, isWriteToolResult, joinCommandSend, joinCommandTurn, killQuitStoppableCommandsNow, latestLegacyMessageTime, latestResumeTimings, legacyCompletionTarget, lifecycleScopeForOwner, llamaInferenceUrl, loadVirtualModules, loaderHostModulesTestHooks, mergeExtensionWarnings, mergeResourcePaths, messageIsLlmVisible, messageStartsLlmUserTurn, migrateCompactionModelSettings, modelFailureMessage, next, nextTransformedPromptRecord, normalizeAzureSettings, normalizeLlamaServerUrl, normalizeMessageContent, normalizeModelFailureSignal, normalizeModelProvider, normalizeModelReference, normalizeProviderKeys, noteCommandAnswer, noteCommandTurnMessage, noteRestoreFetch, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseEngineExplicitQuitCommand, parseGitVersion, parseInteractiveEngineCommand, parseInteractiveEngineMessage, partitionByCredentials, plainStatMtimeMs, powershellCandidates, prepareRegistrationCallbacks, prepareSessionOpenMarkers, presentTaskError, presentationHostInput, prewarmModelApi, printHelp, projectTransformedPrompt, providerOfModelReference, publishEvent, readConflictUrl, readFileChatOrders, readFileChatRecords, readHostInputFormRequest, readInlineCaret, readInlineDraft, readLocalFileChunks, readPipedStdin, readTransferDirectory, reconcileRegistration, recordBlueprintStep, recordClosedStart, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, registerInitialBindings, registerLazyBuiltin, registrationFields, rehydrateAgentRehydrateError, rehydrateTaskToolError, rehydrateWorkspaceError, rejectMalformedToolArguments, rememberEarlierCompletion, renderTodoCall, renderTodoResult, reopenedCompletionName, repairOrphanToolResults, reportDiagnostics, requestedThinkingLevelForModelSwitch, requireTimerMs, require_from_url, require_int, require_int$1, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, reserveQueuedInputAdmission, resetGitProvisionStateForTest, resizeImageInProcess, resolveCompactionModel, resolveGit, resolveGitSync, resolveInlineDraftValue, resolveInstalledGit, resolveInvocationRuntime, resolveRegisteredCommands, resolveResourcePath, resolveToolConcurrency, resolvesCompletionHeader, routeKey, routeNamesPrompt, runCallback, runCommandHandler, runInputHook, runSynchronousCallback, runWithProgress, scheduleToolExecution, selectActivePreviewPaneIndex, selectActiveTabItems, selectConfirmedIndicator, selectReadLinesFromChunks, selectReadLinesFromList, serializeAgentRehydrateError, serializeInteractiveEngineFrame, serializeInteractiveEngineMessage, serializeTodoForAgent, serializeTodoListForAgent, serializeWorkspaceError, sessionBlobHashes, sessionBlobOutput, sessionLifecycleCreation, sessionLifecycleScopes, sessionPosition, sessionScratchDir, setCallbackActivityReporter, settingsWriteOwner, shareCompletionEvidence, showLlamaUi, shownSpanMs, splitSearchTextParts, startedAsFork, startupRegistrationTokens, startupSourceId, stopIndex, storeInlineToolOutputs, storeSessionBlobs, streamCutDurationMs, stripVerbatimCompactionPrefix, subagentsLazyBuiltinSpec, summarizeLegacySession, takeInlineToolOutput, takeInlineToolOutputEntry, taskClockOf, taskClockRunning, taskClocksFor, taskElapsedMs, taskPromptHost, thinkingLevelForModelSwitch, timeCheckoutRestore, timeRestorePhase, toResolvedPaths, tokenize, toolChangeSupport, toolOutputUrl, toolOutputUrlHash, trackAdmittedAgentTask, trackTranspileCacheWrite, trackWindowsDirectorySecurityWork, transferFile, transformedPromptOwner, transpileCacheWritesSettled, unpackIds, unreadablePathError, unreadableTrustSettingsDiagnostics, unwritablePathError, userLikeContentBlockIsLlmVisible, validateEventSource, validateSubscriptionAdmission, verbatimRecallHint, verifyWindowsDirectorySecurity, verifyWindowsDirectorySecurityAsync, waitResultTail, waitStatus, watchHeldPromptAttention, withGitProvisionSettingsForTest, withImagesBlocked, withInlineDraft, withOwnResourceAdmission, withResourceAdmission, withTranspileCacheWriteOwner, withWindowsDirectorySecurityOwner, withoutCarriedToolOutput, withoutSearchPosition, writeChunksAtomically, writeLinesAtomically, writeRenderers };
|
|
18933
19091
|
|
|
18934
|
-
//# sourceMappingURL=startup-0-1-
|
|
19092
|
+
//# sourceMappingURL=startup-0-1-D4LGGINF.js.map
|
|
19093
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
19094
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
19095
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
19096
|
+
return (async () => {
|
|
19097
|
+
const root = new URL("../", import.meta.url);
|
|
19098
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
19099
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
19100
|
+
let release = releases.get(key);
|
|
19101
|
+
if (release === undefined) {
|
|
19102
|
+
const current = (async () => {
|
|
19103
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
19104
|
+
try {
|
|
19105
|
+
const held = await import(new URL(path, root).href);
|
|
19106
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
19107
|
+
} catch {
|
|
19108
|
+
// Not a file this process can load: the next.
|
|
19109
|
+
}
|
|
19110
|
+
}
|
|
19111
|
+
return undefined;
|
|
19112
|
+
})().then((found) => {
|
|
19113
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
19114
|
+
return found;
|
|
19115
|
+
});
|
|
19116
|
+
releases.set(key, current);
|
|
19117
|
+
release = current;
|
|
19118
|
+
}
|
|
19119
|
+
const running = await release;
|
|
19120
|
+
let installed;
|
|
19121
|
+
try {
|
|
19122
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
19123
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
19124
|
+
} catch {
|
|
19125
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
19126
|
+
}
|
|
19127
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
|
|
19128
|
+
if (updatedTo === undefined) throw error;
|
|
19129
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
19130
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
19131
|
+
cause: error,
|
|
19132
|
+
});
|
|
19133
|
+
restart.name = "UpdatedInstallError";
|
|
19134
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
19135
|
+
throw restart;
|
|
19136
|
+
})();
|
|
19137
|
+
}
|