@bastani/atomic 0.10.10 → 0.10.11-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 +83 -0
- package/README.md +1 -1
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +8 -10
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +6 -6
- package/dist/_shared/mode-shared-2QJSCUM6.js +52 -15
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +3 -3
- package/dist/_shared/{sdk-RRLVN7ER.js → sdk-AVFII7NK.js} +757 -233
- package/dist/_shared/sdk-AVFII7NK.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +3 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/{startup-0-0-4VG2G44V.js → startup-0-0-57KF6LZH.js} +94 -42
- package/dist/_shared/startup-0-0-57KF6LZH.js.map +1 -0
- package/dist/_shared/{startup-0-1-XTIL65D4.js → startup-0-1-GIY75K46.js} +75 -13
- package/dist/_shared/startup-0-1-GIY75K46.js.map +1 -0
- package/dist/_shared/startup-0-2-27OWFHV6.js +72 -7
- package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -1
- package/dist/_shared/startup-0-3-T4DVFYWX.js +4 -4
- package/dist/_shared/startup-0-4-ZMJV547D.js +4 -4
- package/dist/_shared/{startup-0-5-FD2P735I.js → startup-0-5-YDW47QX6.js} +27 -69
- package/dist/_shared/startup-0-5-YDW47QX6.js.map +1 -0
- package/dist/_shared/startup-10-0-TDQNBDDL.js +6 -6
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
- package/dist/_shared/startup-15-0-YUKGAC63.js +31 -7
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +7 -6
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +4 -4
- package/dist/_shared/{startup-8-1-4KANEHRA.js → startup-8-1-X32CYSXB.js} +1219 -714
- package/dist/_shared/startup-8-1-X32CYSXB.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +14 -8
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/task-reference-stream-JWMUZSJX.js +1 -1
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/CHANGELOG.md +18 -0
- package/dist/builtin/intercom/broker/broker.bundle.mjs +993 -362
- package/dist/builtin/intercom/broker/database-wake-up-bus.ts +103 -24
- package/dist/builtin/intercom/broker/multinode-router.ts +42 -21
- package/dist/builtin/intercom/broker/multinode-state-store.ts +22 -1
- package/dist/builtin/intercom/broker/open-broker-state.ts +82 -31
- package/dist/builtin/intercom/broker/paths.ts +8 -4
- package/dist/builtin/intercom/broker/released-asker-remote-replies.ts +18 -6
- package/dist/builtin/intercom/broker/sql-add-column.ts +4 -1
- package/dist/builtin/intercom/broker/sql-ended-child-queue-store.ts +65 -44
- package/dist/builtin/intercom/broker/sql-held-send-store.ts +11 -3
- package/dist/builtin/intercom/broker/sql-known-session-store.ts +24 -12
- package/dist/builtin/intercom/broker/sql-lease-store.ts +375 -65
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +270 -101
- package/dist/builtin/intercom/broker/sql-pending-ask-store.ts +20 -9
- package/dist/builtin/intercom/broker/sql-released-ask-store.ts +14 -6
- package/dist/builtin/intercom/broker/sql-restoring-reservation-store.ts +27 -11
- package/dist/builtin/intercom/broker/sql-schema.ts +139 -1
- package/dist/builtin/intercom/broker/sql-sent-message-authority.ts +97 -34
- package/dist/builtin/intercom/index.bundle.mjs +11 -8
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/skill-creator/SKILL.md +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +62 -23
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +4 -4
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.code.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +2 -2
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +2 -2
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +3 -3
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +2 -2
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/agent-session-methods.d.ts +3 -0
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -0
- package/dist/core/compaction/compactor.d.ts +2 -0
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.code.js +1 -1
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.code.js +1 -1
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/extensions/loader-virtual-modules.js +2 -2
- package/dist/core/extensions/runner-context.js +3 -3
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +3 -3
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/model-registry.js +1 -1
- package/dist/core/model-resolver-defaults.d.ts +3 -2
- package/dist/core/package-manager-storage-adapters.code.js +1 -1
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +3 -4
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.d.ts +5 -2
- package/dist/core/session-manager-core.js +17 -13
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.code.js +1 -1
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.code.js +1 -1
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/added-exports.d.ts +6 -0
- package/dist/core/storage/added-exports.js +16 -0
- package/dist/core/storage/added-exports.js.map +1 -0
- package/dist/core/storage/database.d.ts +16 -0
- package/dist/core/storage/database.js.map +1 -1
- package/dist/core/storage/fenced-paths.d.ts +47 -0
- package/dist/core/storage/fenced-paths.js +53 -0
- package/dist/core/storage/fenced-paths.js.map +1 -1
- package/dist/core/storage/file-identity.js +31 -2
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +3 -0
- package/dist/core/storage/index.js +5 -2
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/migrations.d.ts +22 -0
- package/dist/core/storage/migrations.js +55 -0
- package/dist/core/storage/migrations.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +19 -6
- package/dist/core/storage/node-sqlite-thread.js.map +1 -1
- package/dist/core/storage/node-sqlite.js +53 -4
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/prefix.d.ts +3 -2
- package/dist/core/storage/prefix.js +18 -2
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/schema-catalog.d.ts +42 -0
- package/dist/core/storage/schema-catalog.js +141 -0
- package/dist/core/storage/schema-catalog.js.map +1 -0
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +41 -20
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +3 -3
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.code.js +1 -1
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +3 -3
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +176 -36
- package/dist/core/storage/session/fork-staging.code.js.map +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +3 -3
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +2 -2
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/session-search-index.d.ts +5 -0
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +3 -3
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-chat-records.d.ts +15 -0
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +102 -5
- package/dist/core/storage/session/sql-session-store.impl.js +4 -4
- package/dist/core/storage/session/sql-session-store.js +4 -4
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.code.js +1 -1
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/session/types.d.ts +14 -0
- package/dist/core/storage/sqlite-facade.d.ts +37 -5
- package/dist/core/storage/sqlite-facade.js +351 -18
- package/dist/core/storage/sqlite-facade.js.map +1 -1
- package/dist/core/storage/statement-sequence.d.ts +83 -0
- package/dist/core/storage/statement-sequence.js +21 -0
- package/dist/core/storage/statement-sequence.js.map +1 -1
- package/dist/core/storage/storage-status.code.js +1 -1
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.code.js +1 -1
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.code.js +1 -1
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +3 -3
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +4 -4
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.code.js +1 -1
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/bash.d.ts +8 -4
- package/dist/core/tools/history-session.d.ts +5 -0
- package/dist/core/tools/history-tasks.d.ts +123 -0
- package/dist/core/tools/kill.d.ts +5 -2
- package/dist/core/tools/powershell.d.ts +2 -2
- package/dist/core/tools/read-url.code.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/tools/read.d.ts +12 -2
- package/dist/core/tools/resource-selectors.d.ts +2 -0
- package/dist/core/tools/search.d.ts +12 -2
- package/dist/core/worktree-snapshot/blob-store.d.ts +14 -2
- package/dist/core/worktree-snapshot/blob-store.js +69 -16
- package/dist/core/worktree-snapshot/blob-store.js.map +1 -1
- package/dist/core/worktree-snapshot/errors.code.js +2 -2
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.code.js +2 -2
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.code.js +2 -2
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +3 -3
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.js +5 -5
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/main.js +1 -1
- package/dist/modes/interactive/components/agent-panel.d.ts +1 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/task-inspector.d.ts +2 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +1 -1
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/interactive/interactive-mode-helpers.d.ts +2 -2
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/agent-panel-bridge.d.ts +5 -0
- package/dist/package-manager-cli.code.js +6 -6
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/rpc-entry.js +1 -1
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/0.js +1 -1
- package/dist/startup-stages/1.js +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/2.js +8 -1
- package/dist/startup-stages/3.js +1 -6
- package/dist/startup-stages/5.js +1 -1
- package/dist/startup-stages/7.js +1 -5
- package/dist/utils/startup-database-spare.code.js +2 -2
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.code.js +1 -1
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks.md +123 -23
- package/docs/compaction.md +18 -0
- package/docs/docs.json +2 -0
- package/docs/environment-variables.md +1 -1
- package/docs/getting-started/installation.md +9 -2
- package/docs/guides/postgres-pgbouncer.md +339 -0
- package/docs/guides/postgres-tuning.md +311 -0
- package/docs/guides/resume-on-any-machine.md +2 -2
- package/docs/guides.md +2 -0
- package/docs/index.md +1 -1
- package/docs/libraries/agent-core.md +1 -1
- package/docs/libraries/ai.md +2 -2
- package/docs/libraries/codemode.md +1 -1
- package/docs/libraries/storage-libsql.md +6 -1
- package/docs/libraries/storage-postgres.md +11 -6
- package/docs/libraries/tui.md +1 -1
- package/docs/libraries.md +2 -2
- package/docs/programmatic.md +1 -1
- package/docs/quickstart.md +1 -1
- package/docs/sdk/storage.md +1 -1
- package/docs/sdk/web-server.md +1 -3
- package/docs/sdk.md +1 -7
- package/docs/sessions.md +58 -2
- package/docs/settings.md +20 -1
- package/docs/skills/authoring.md +1 -1
- package/docs/skills.md +79 -6
- package/docs/storage.md +262 -12
- package/docs/subagents/reference.md +2 -2
- package/docs/subagents.md +4 -3
- package/docs/tools.md +44 -10
- package/docs/windows.md +1 -1
- package/package.json +9 -9
- package/dist/_shared/sdk-RRLVN7ER.js.map +0 -1
- package/dist/_shared/startup-0-0-4VG2G44V.js.map +0 -1
- package/dist/_shared/startup-0-1-XTIL65D4.js.map +0 -1
- package/dist/_shared/startup-0-5-FD2P735I.js.map +0 -1
- package/dist/_shared/startup-8-1-4KANEHRA.js.map +0 -1
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { renderStorageIdentifiers } from "../core/storage/prefix.js";
|
|
4
|
-
import { SESSION_TABLES, SqlSessionStore } from "../_shared/sdk-
|
|
5
|
-
import { createHistoryRouter, createSearchToolDefinition } from "../_shared/startup-8-1-
|
|
4
|
+
import { SESSION_TABLES, SqlSessionStore } from "../_shared/sdk-AVFII7NK.js";
|
|
5
|
+
import { createHistoryRouter, createSearchToolDefinition } from "../_shared/startup-8-1-X32CYSXB.js";
|
|
6
6
|
import { lstat, realpath, stat } from "node:fs/promises";
|
|
7
7
|
import { pathToFileURL } from "node:url";
|
|
8
|
-
import { SqliteSelectorConnection } from "../_shared/startup-0-0-
|
|
8
|
+
import { SqliteSelectorConnection } from "../_shared/startup-0-0-57KF6LZH.js";
|
|
9
9
|
// dist/cli/storage-search-database.js
|
|
10
10
|
async function existingFile(path) {
|
|
11
11
|
try {
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session storage.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -3,8 +3,8 @@ import { APP_NAME } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
|
3
3
|
import { StorageError, TeamProfileConfigError, isTeamProfileConfigError, isTeamProfileError } from "../core/storage/errors.js";
|
|
4
4
|
import { processStorageEnvironment } from "../_shared/startup-0-2-27OWFHV6.js";
|
|
5
5
|
import { LIBSQL_ADAPTER_PACKAGE } from "../core/storage/selection.js";
|
|
6
|
-
import { collectStorageStatus, describeStorageError as describeStorageError$1, joinTeamWith, leaveTeamWith, selectTeamProfile } from "../_shared/startup-8-1-
|
|
7
|
-
import { createGitEnvironment } from "../_shared/startup-0-0-
|
|
6
|
+
import { collectStorageStatus, describeStorageError as describeStorageError$1, joinTeamWith, leaveTeamWith, selectTeamProfile } from "../_shared/startup-8-1-X32CYSXB.js";
|
|
7
|
+
import { createGitEnvironment } from "../_shared/startup-0-0-57KF6LZH.js";
|
|
8
8
|
import { failed, formatStorageStatus, loadBrokerControl } from "../_shared/storage-command-7MGXLJGZ.js";
|
|
9
9
|
// dist/cli/team-command.js
|
|
10
10
|
/**
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/cli/team-command.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/cli.js
CHANGED
|
@@ -107,7 +107,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
107
107
|
return (async () => {
|
|
108
108
|
const root = new URL("./", import.meta.url);
|
|
109
109
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
110
|
-
const key = `${root.href}#0.10.
|
|
110
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
111
111
|
let release = releases.get(key);
|
|
112
112
|
if (release === undefined) {
|
|
113
113
|
const current = (async () => {
|
|
@@ -135,7 +135,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
135
135
|
} catch {
|
|
136
136
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
137
137
|
}
|
|
138
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
138
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.1" ? installed : running !== undefined && running.version !== "0.10.11-alpha.1" ? "0.10.11-alpha.1" : undefined;
|
|
139
139
|
if (updatedTo === undefined) throw error;
|
|
140
140
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
141
141
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
@@ -160,6 +160,8 @@ export interface AgentSessionMethodSurface extends AgentSessionQueuePauseControl
|
|
|
160
160
|
dispose(): Promise<void>;
|
|
161
161
|
getAgentTaskHost(): import("./tasks/agent-adapter.js").AgentTaskHost;
|
|
162
162
|
_getCommandTaskOwner(): import("./tools/bash-pty-native.js").SupervisedCommandOwner | undefined;
|
|
163
|
+
/** This session's background history:// reads and searches; `undefined` while the session closes or reloads. */
|
|
164
|
+
_getHistoryTasks(): import("./tools/history-tasks.ts").HistoryTaskRegistry | undefined;
|
|
163
165
|
closeSessionTasks(): Promise<void>;
|
|
164
166
|
/** Cancel owned execution without closing message admission. */
|
|
165
167
|
pauseTasks(): Promise<void>;
|
|
@@ -586,5 +588,6 @@ export interface AgentSessionInternalSurface extends AgentSessionMethodSurface,
|
|
|
586
588
|
_childTaskWaits: import("./tasks/child-command-owner.js").ChildTaskWaits;
|
|
587
589
|
_taskCompletionOutbox: import("./tasks/completion.js").TaskCompletionOutbox | undefined;
|
|
588
590
|
_taskAdmission: import("./message-admission.js").MessageAdmissionBoundary | undefined;
|
|
591
|
+
_historyTasks: import("./tools/history-tasks.ts").HistoryTaskRegistry | undefined;
|
|
589
592
|
}
|
|
590
593
|
//# sourceMappingURL=agent-session-methods.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-session-methods.js","sourceRoot":"","sources":["../../src/core/agent-session-methods.ts"],"names":[],"mappings":"","sourcesContent":["import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLevel } from \"@bastani/atomic-agent-core\";\nimport type { ProviderHeaders } from \"@bastani/atomic-ai\";\nimport type {\n\tApi,\n\tAssistantMessage,\n\tImageContent,\n\tMessage,\n\tModel,\n\tTextContent,\n\tToolResultMessage,\n} from \"@bastani/atomic-ai/compat\";\nimport type { DetachedToolCall, DetachedToolResult, ToolDetachmentPolicy } from \"./agent-session-detached-tools.ts\";\nimport type { PersistenceFailure, UnsavedInput } from \"./agent-session-persistence-failures.ts\";\nimport type { PendingPostToolCompactionGuard } from \"./agent-session-post-tool-compaction.ts\";\nimport type { RecordedToolLoadout } from \"./agent-session-state.ts\";\nimport type {\n\tAgentSessionEvent,\n\tAgentSessionEventListener,\n\tAgentSessionReloadOptions,\n\tClearedQueue,\n\tClearQueueOptions,\n\tDrainedAgentQueues,\n\tExtensionBindings,\n\tInterruptQueueHold,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptDisposition,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionAbortOptions,\n\tSessionRecoveryReport,\n\tSessionStats,\n\tToolDefinitionEntry,\n} from \"./agent-session-types.js\";\nimport type { BashResult } from \"./bash-executor.ts\";\nimport type { VerbatimCompactionResult } from \"./compaction/index.ts\";\nimport type {\n\tAgentActivityOutcome,\n\tBoundaryContextPreview,\n\tContextUsage,\n\tExtensionCommandContextActions,\n\tExtensionErrorListener,\n\tExtensionMode,\n\tExtensionRunner,\n\tExtensionUIContext,\n\tReplacedSessionContext,\n\tSendMessageOptions,\n\tSendMessagesOptions,\n\tSessionBoundaryDraft,\n\tSessionRecoveryReason,\n\tSessionStartEvent,\n\tToolDefinition,\n\tToolInfo,\n} from \"./extensions/index.js\";\nimport type { BashExecutionMessage, CustomMessage } from \"./messages.ts\";\nimport type { ExtensionProviderTransaction, ModelRuntime } from \"./model-runtime.js\";\nimport type { PathMetadata } from \"./package-manager.ts\";\nimport type { PromptTemplate } from \"./prompt-templates.ts\";\nimport type { ResourceLoader } from \"./resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionManager, SessionSummaryEntry } from \"./session-manager.ts\";\nimport type { SettingsManager } from \"./settings-manager.ts\";\nimport type { NormalizedBuildSystemPromptOptions } from \"./system-prompt.ts\";\nimport type { ToolStatusReport } from \"./tool-status.js\";\nimport type { BashOperations } from \"./tools/bash.js\";\nimport type { ToolExecutionScheduler } from \"./tools/tool-concurrency.ts\";\nimport type { SystemMessageWithTransformedPrompt } from \"./transformed-system-prompt.ts\";\nimport type { WorktreeRootMapping } from \"./worktree-snapshot/types.ts\";\n\nexport interface SessionCompactOptions {\n\t/** Instructions for this compaction: what to recover first, and the compactor's query. */\n\tquery?: string;\n\t/**\n\t * `auto` or an exact compactor model `provider/model` for this run only; overrides the `compactionModel` setting\n\t * without saving it. Any other value clears the context with a notice.\n\t */\n\tcompactionModel?: string;\n}\n\nexport interface VerbatimCompactionApplyOptions {\n\tabortController: AbortController;\n\tbackupLabel: string;\n\tquery?: string;\n\tcompactionModel?: string;\n\treason: \"manual\" | \"threshold\" | \"overflow\";\n\t/** Reports when a session_before_compact override becomes the active compaction source. */\n\tonCompactionSource?: (fromExtension: boolean) => void;\n\t/** Last entry the boundary covers; the entries after it stay in the context as they are. Default: all of them. */\n\tcoveredThroughEntryId?: string;\n}\n\n/**\n * How much an automatic compaction is load-bearing: `load_bearing` when the turn cannot continue without it (a provider\n * overflow), `recoverable` otherwise. Only a load-bearing failure marks the overflow unresolved.\n */\nexport type AutoCompactionUrgency = \"recoverable\" | \"load_bearing\";\n\n/** Outcome of an automatic compaction admission and persistence attempt. */\nexport type AutoCompactionRunOutcome = \"compacted\" | \"not_compactable\" | \"deferred\" | \"failed\";\n\nexport interface ExtensionResourcePathEntry {\n\tpath: string;\n\textensionPath: string;\n}\n\nexport interface ExtensionResourcePathResult {\n\tpath: string;\n\tmetadata: PathMetadata;\n}\n\nexport interface RuntimeBuildOptions {\n\tactiveToolNames?: string[];\n\tflagValues?: Map<string, boolean | string>;\n\tincludeAllExtensionTools?: boolean;\n\tpreserveRunner?: boolean;\n\tpowerShellAvailable: boolean;\n}\n\n/** The settlement of the run a `pauseTurn` ended. Spelled out, as published declarations may predate `PromiseWithResolvers`. */\nexport interface TurnPause {\n\treadonly promise: Promise<void>;\n\tresolve(): void;\n}\n\nexport interface AgentSessionQueuePauseControl {\n\treadonly queuedMessagesPaused: boolean;\n\t/** Whether Esc in the session's chat paused it (`pauseTurn`): its queue is held until the user continues it. */\n\treadonly turnPaused: boolean;\n\tpauseQueuedMessages(): void;\n\t/** Release the hold without starting a turn; true means raw queued work was released. */\n\tresumeQueuedMessages(beforeRelease?: () => void): Promise<boolean>;\n}\n\nexport interface AgentSessionMethodSurface extends AgentSessionQueuePauseControl {\n\treadonly modelRuntime: ModelRuntime;\n\treadonly state: AgentState;\n\treadonly model: Model<Api> | undefined;\n\treadonly thinkingLevel: ThinkingLevel;\n\treadonly isStreaming: boolean;\n\treadonly systemPrompt: string;\n\treadonly retryAttempt: number;\n\treadonly retryStatus?: import(\"./session-retry-status.js\").SessionRetryStatus;\n\t/** Time of the current turn's first request, including waits and later attempts; absent between turns. */\n\treadonly turnStartedAt?: number;\n\treadonly isCompacting: boolean;\n\treadonly compactionReason?: import(\"./agent-session-types.js\").CompactionReason;\n\treadonly compactionStartedAt?: number;\n\treadonly messages: AgentMessage[];\n\t/** The settled chat rows, including admitted messages whose save is still in flight. */\n\treadonly transcriptMessages: AgentMessage[];\n\treadonly steeringMode: \"all\" | \"one-at-a-time\";\n\treadonly followUpMode: \"all\" | \"one-at-a-time\";\n\treadonly sessionFile: string | undefined;\n\treadonly sessionId: string;\n\treadonly sessionName: string | undefined;\n\treadonly sessionSummary: SessionSummaryEntry | undefined;\n\treadonly scopedModels: ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\treadonly promptTemplates: ReadonlyArray<PromptTemplate>;\n\treadonly pendingMessageCount: number;\n\treadonly resourceLoader: ResourceLoader;\n\treadonly autoCompactionEnabled: boolean;\n\treadonly isRetrying: boolean;\n\t/**\n\t * The session waits out a retry's backoff before its next attempt. A session with fallback models keeps its run\n\t * open through the wait, so it also reads as streaming then.\n\t */\n\treadonly isWaitingToRetry: boolean;\n\treadonly autoRetryEnabled: boolean;\n\treadonly isBashRunning: boolean;\n\treadonly hasPendingBashMessages: boolean;\n\treadonly extensionRunner: ExtensionRunner;\n\n\t_handleAgentEvent(event: AgentEvent): Promise<void> | void;\n\t_getRequiredRequestAuth(\n\t\tmodel: Model<Api>,\n\t\tsignal?: AbortSignal,\n\t): Promise<{ apiKey?: string; headers?: ProviderHeaders; baseUrl?: string }>;\n\t_installAgentToolHooks(): void;\n\t_installAgentNextTurnRefresh(): void;\n\t_installAgentRequestProjection(): void;\n\t_installAgentBoundaryHooks(): void;\n\t_refreshFinalizedContext(): void;\n\t_projectFinalizedMessages(): AgentMessage[];\n\trefreshContext(): void;\n\t_dispatchTurnEndBoundary(\n\t\tmessage: AssistantMessage,\n\t\ttoolResults: ToolResultMessage[],\n\t\tawaitPersistence?: boolean,\n\t): Promise<boolean>;\n\t_applyBoundaryDrafts(manager: SessionManager, drafts: SessionBoundaryDraft[]): Promise<SessionEntry[]>;\n\t_createBoundaryPreviewManager(drafts: SessionBoundaryDraft[]): Promise<SessionManager>;\n\t_getPendingBoundaryMessages(): AgentMessage[];\n\t_buildBoundaryContext(\n\t\tdrafts: SessionBoundaryDraft[],\n\t\tboundary: \"turn_end\" | \"agent_before_settle\",\n\t): Promise<BoundaryContextPreview>;\n\t_commitBoundaryDrafts(drafts: SessionBoundaryDraft[]): Promise<void>;\n\t_reportInvalidBoundaryContinuation(event: \"turn_end\" | \"agent_before_settle\"): void;\n\t_findPersistedMessageEntryId(message: AgentMessage): string | undefined;\n\t_omitRecoveryAttempt(message: AssistantMessage, toolResults?: AgentMessage[]): Promise<void>;\n\t_omitTrailingAssistantAttempt(accept?: (message: AssistantMessage) => boolean): Promise<boolean>;\n\t_runBeforeSettleBoundary(): Promise<boolean>;\n\t_emit(event: AgentSessionEvent): void;\n\t_emitQueueUpdate(): void;\n\t_createRetryPromiseForAgentEnd(event: AgentEvent): void;\n\t_findLastAssistantInMessages(messages: AgentMessage[]): AssistantMessage | undefined;\n\t_processAgentEvent(event: AgentEvent, retryGeneration?: number): Promise<void>;\n\t_applyInterruptAbortMessage(event: AgentEvent): void;\n\t_applyProviderErrorGuidance(event: AgentEvent): void;\n\t_resolveRetry(): void;\n\t_getUserMessageText(message: Message): string;\n\t_findLastAssistantMessage(): AssistantMessage | undefined;\n\t_replaceMessageInPlace(target: AgentMessage, replacement: AgentMessage): void;\n\t_emitExtensionEvent(event: AgentEvent): Promise<void>;\n\tsubscribe(\n\t\tsource: import(\"./event-subscriptions/types.js\").EventSource,\n\t\thandler: import(\"./event-subscriptions/session-subscription.js\").SessionEventHandler,\n\t\toptions?: import(\"./event-subscriptions/session-subscription.js\").SessionSubscribeOptions,\n\t): import(\"./event-subscriptions/types.js\").Subscription;\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t_disconnectFromAgent(): void;\n\tdispose(): Promise<void>;\n\tgetAgentTaskHost(): import(\"./tasks/agent-adapter.js\").AgentTaskHost;\n\t_getCommandTaskOwner(): import(\"./tools/bash-pty-native.js\").SupervisedCommandOwner | undefined;\n\tcloseSessionTasks(): Promise<void>;\n\t/** Cancel owned execution without closing message admission. */\n\tpauseTasks(): Promise<void>;\n\tresumeTasks(): void;\n\n\tgetActiveToolNames(): string[];\n\tgetCallableToolNames(): string[];\n\tgetAllTools(): ToolInfo[];\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Explain which tools are active, which are not (and why), and which selected names nothing registered. */\n\tgetToolStatus(): ToolStatusReport;\n\tgetToolStatusAsync(): Promise<ToolStatusReport>;\n\t/** The tool status without its Git section, so without running git. */\n\t_getToolStatusWithoutGit(): ToolStatusReport;\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t_setActiveTools(toolNames: string[]): void;\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t_normalizePromptSnippet(text: string | undefined): string | undefined;\n\t_normalizePromptGuidelines(guidelines: string[] | undefined): string[];\n\t_rebuildSystemPrompt(toolNames: string[]): void;\n\t_preparePromptAndToolLoadout(\n\t\toptions: NormalizedBuildSystemPromptOptions,\n\t\tmessages?: AgentMessage[],\n\t): SystemMessageWithTransformedPrompt | undefined;\n\t_restoreToolsFromTranscript(options?: { startup?: boolean }): void;\n\t_refreshBaseSystemPromptFromActiveTools(): void;\n\t_currentRunSystemPromptOptions(): NormalizedBuildSystemPromptOptions;\n\t_recordSystemPromptForModelSwitch(): Promise<void>;\n\t_recordTransformedPromptHead(): Promise<void> | undefined;\n\n\tprompt(text: string, options?: PromptOptions): Promise<void>;\n\t_runAgentPrompt(\n\t\tmessages: AgentMessage | AgentMessage[],\n\t\tpromptStarted?: () => void,\n\t\treportDispatch?: (disposition: PromptDisposition) => void,\n\t\tprepared?: boolean,\n\t\tcustomStarter?: CustomMessage,\n\t\tfallbackGeneration?: number,\n\t): Promise<void>;\n\t_runAgentContinue(): Promise<void>;\n\t_runAgentContinuation(beforeContinue: () => Promise<void>, mode?: \"continue\" | \"recovery\" | \"settle\"): Promise<void>;\n\t_continueQueuedAgentMessages(): Promise<void>;\n\t_tryExecuteExtensionCommand(text: string): Promise<boolean>;\n\t_expandSkillCommand(text: string): Promise<string>;\n\tsteer(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\toptions?: Pick<PromptOptions, \"source\" | \"expandPromptTemplates\">,\n\t): Promise<QueuedInputDisposition>;\n\tfollowUp(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\toptions?: Pick<PromptOptions, \"source\" | \"expandPromptTemplates\">,\n\t): Promise<QueuedInputDisposition>;\n\tsendUserMessage(\n\t\tcontent: string | (TextContent | ImageContent)[],\n\t\toptions?: { deliverAs?: \"steer\" | \"followUp\"; expandPromptTemplates?: boolean },\n\t): Promise<void>;\n\n\t_queueSteer(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\ttyped?: string,\n\t\trawText?: string,\n\t\treceiptId?: string,\n\t\toriginSendId?: string,\n\t): Promise<void>;\n\t_queueFollowUp(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\ttyped?: string,\n\t\trawText?: string,\n\t\treceiptId?: string,\n\t\toriginSendId?: string,\n\t): Promise<void>;\n\t_throwIfExtensionCommand(text: string): void;\n\tsendCustomMessage<T = unknown>(\n\t\tmessage: Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">,\n\t\toptions?: SendMessageOptions,\n\t): Promise<void>;\n\tsendCustomMessages<T = unknown>(\n\t\tmessages: Array<Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">>,\n\t\toptions?: SendMessagesOptions,\n\t): Promise<void>;\n\t_commitAdmittedCustomMessage<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_commitAdmittedCustomMessages<T>(messages: CustomMessage<T>[], options?: SendMessagesOptions): Promise<void>;\n\t_appendCustomMessage<T>(message: CustomMessage<T>): Promise<void>;\n\t_flushPendingCustomMessages(withinRun?: boolean): Promise<void>;\n\t_enqueueInterruptCustomMessage<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_sendInterruptCustomMessageNow<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_ensureActiveInterruptQueueHold(): InterruptQueueHold;\n\t_restoreAndClearActiveInterruptQueueHold(): void;\n\t_queueAgentMessage(message: AgentMessage, delivery: \"steer\" | \"followUp\" | \"interrupt\"): void;\n\t_drainQueuedAgentMessages(): DrainedAgentQueues;\n\t_restoreQueuedAgentMessages(queues: DrainedAgentQueues): void;\n\tclearQueue(options?: ClearQueueOptions): ClearedQueue;\n\tgetSteeringMessages(): readonly string[];\n\tgetFollowUpMessages(): readonly string[];\n\tabort(options?: SessionAbortOptions): Promise<void>;\n\t/** Ends the current turn without closing the session to further messages, as Esc does in a subagent's chat. */\n\tinterruptTurn(): Promise<void>;\n\t/**\n\t * Pauses the current turn as Esc does in a subagent's chat: returns the typed messages still queued, ends the turn,\n\t * and holds the rest of the queue until the next message continues the session.\n\t */\n\tpauseTurn(): Promise<ClearedQueue>;\n\t/** Continues a session `pauseTurn` paused: its hold is released, so the user's message sent next starts the turn. */\n\tresumeTurn(): Promise<void>;\n\t_sealMessageAdmissionIfDrained(): boolean;\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\n\t_emitModelChanged(\n\t\tnextModel: Model<Api>,\n\t\tpreviousModel: Model<Api> | undefined,\n\t\tsource: \"set\" | \"cycle\" | \"restore\" | \"fallback\",\n\t): void;\n\t_emitModelSelect(\n\t\tnextModel: Model<Api>,\n\t\tpreviousModel: Model<Api> | undefined,\n\t\tsource: \"set\" | \"cycle\" | \"restore\" | \"fallback\",\n\t): Promise<void>;\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions & { thinkingLevel?: ThinkingLevel }): Promise<void>;\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t_cycleScopedModel(\n\t\tdirection: \"forward\" | \"backward\",\n\t\toptions: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t_cycleAvailableModel(\n\t\tdirection: \"forward\" | \"backward\",\n\t\toptions: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): Promise<void>;\n\tcycleThinkingLevel(options?: ModelMutationOptions): Promise<ThinkingLevel | undefined>;\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\tsupportsThinking(): boolean;\n\t_getThinkingLevelForModelSwitch(targetModel?: Model<Api>, explicitLevel?: ThinkingLevel): ThinkingLevel;\n\t_clampThinkingLevel(level: ThinkingLevel, availableLevels: ThinkingLevel[]): ThinkingLevel;\n\t_recordThinkingLevel(): Promise<string> | undefined;\n\n\t_applyVerbatimCompaction(options: VerbatimCompactionApplyOptions): Promise<VerbatimCompactionResult | undefined>;\n\tcompact(options?: SessionCompactOptions): Promise<VerbatimCompactionResult>;\n\tabortCompaction(): void;\n\tabortBranchSummary(): void;\n\tabortSessionSummary(): void;\n\t_maybeGenerateSessionSummary(): Promise<void>;\n\t_checkCompaction(assistantMessage: AssistantMessage, skipAbortedCheck?: boolean): Promise<void>;\n\t_compactBeforeContinuation(input?: readonly AgentMessage[]): Promise<boolean>;\n\t_compactBeforeResumedPrompt(\n\t\tupdate: AgentMessage | undefined,\n\t\tinput: readonly AgentMessage[],\n\t\tsendsPrompt?: boolean,\n\t): Promise<boolean>;\n\t_continueAgentAfterCompactionCheck(): Promise<void>;\n\t_dropTrailingAutoCompactionRetryAssistantIfPresent(): Promise<void>;\n\t_schedulePostAutoCompactionContinuationProbe(reason: \"overflow\" | \"threshold\", willRetry: boolean): void;\n\t_awaitPendingPostCompactionContinuation(): Promise<void>;\n\t_resumeAfterAutoCompaction(): Promise<void>;\n\t_resumeAfterLengthTruncation(): Promise<void>;\n\t_runAutoCompaction(\n\t\treason: \"overflow\" | \"threshold\",\n\t\twillRetry: boolean,\n\t\turgency?: AutoCompactionUrgency,\n\t\tcoveredThroughEntryId?: string,\n\t): Promise<AutoCompactionRunOutcome>;\n\t_preflightPostToolContext(messages: AgentMessage[], signal?: AbortSignal): Promise<AgentMessage[]>;\n\t_finishPostToolCompactionPreflight(messages: AgentMessage[]): AgentMessage[];\n\tsetAutoCompactionEnabled(enabled: boolean): void;\n\tsetCompactionModel(model: string, scope?: \"global\" | \"project\", options?: { persist?: boolean }): void;\n\t/** Give an agent without `read` or `search` the read-only `session_history` tool after a compaction boundary. */\n\t_enableSessionHistoryTool(): void;\n\n\tbindExtensions(bindings: ExtensionBindings): Promise<void>;\n\tstartPendingRecovery(reason?: SessionRecoveryReason): Promise<SessionRecoveryReport>;\n\tstartPendingRecoveryRestore(reason?: SessionRecoveryReason): Promise<SessionRecoveryReport>;\n\t/** Keep only the stored history and let go of everything live; rehydrate with `AgentSessionRuntime.rehydrate`. */\n\trelease(): Promise<import(\"./agent-session-release.ts\").ReleasedAgentSession>;\n\t/** Let calls of `detachable` tools that run longer than `policy.afterMs` go on without the run; `undefined` runs them inline. */\n\tsetToolDetachment(policy: ToolDetachmentPolicy | undefined): void;\n\t/** The calls the session's runs detached and the host has not taken yet; taking them clears the list. */\n\ttakeDetachedToolCalls(): DetachedToolCall[];\n\t/** Whether the transcript ends on a turn that issued a detachable call and has no answer from the model yet. */\n\thasPendingDetachedTurn(): boolean;\n\t/** Whether the transcript still waits on the result of a call of a detachable tool: nothing may start a turn. */\n\tisWaitingOnDetachedResults(): boolean;\n\t/** Start again the detachable calls the transcript ends on without a result, with their original ids and arguments. */\n\tredispatchDetachedToolCalls(): DetachedToolCall[];\n\t/** Record detached calls' results; the turn that issued them continues once each of its detachable calls has one. */\n\tresumeDetachedTurn(\n\t\tresults: readonly DetachedToolResult[],\n\t\tonRecorded?: (toolCallIds: readonly string[]) => void,\n\t): Promise<void>;\n\t_waitForExtensionStart(): Promise<void>;\n\textendResourcesFromExtensions(reason: \"startup\" | \"reload\"): Promise<void>;\n\tbuildExtensionResourcePaths(entries: ExtensionResourcePathEntry[]): ExtensionResourcePathResult[];\n\tgetExtensionSourceLabel(extensionPath: string): string;\n\t_applyExtensionBindings(runner: ExtensionRunner): void;\n\t_refreshCurrentModelFromRegistry(): Promise<void>;\n\trefreshCurrentModelFromRegistry(): Promise<void>;\n\t_bindExtensionCore(\n\t\trunner: ExtensionRunner,\n\t\tpublication?: {\n\t\t\tresourceLoader: ResourceLoader;\n\t\t\tproviderTransaction: ExtensionProviderTransaction;\n\t\t\tproviderIds: Set<string>;\n\t\t\tdefer(effect: () => void | Promise<void>): void;\n\t\t},\n\t\tstartupToolNames?: readonly string[],\n\t\tstartupLoadout?: RecordedToolLoadout,\n\t): void;\n\t_refreshToolRegistry(options?: { activeToolNames?: string[]; includeAllExtensionTools?: boolean }): void;\n\t_buildRuntime(options: RuntimeBuildOptions): void;\n\treload(options?: AgentSessionReloadOptions): Promise<void>;\n\tcompleteStartupResources(resourceLoader: ResourceLoader): Promise<void>;\n\n\t_isRetryableError(message: AssistantMessage): boolean;\n\t_isFallbackableError(message: AssistantMessage): boolean;\n\t_isEmptyCompletion(message: AssistantMessage): boolean;\n\t_isSafetyRefusal(message: AssistantMessage): boolean;\n\t_handleRetryableError(message: AssistantMessage): Promise<boolean>;\n\t_trySwitchToFallbackModel(message: AssistantMessage): Promise<boolean>;\n\t_selectModelWithCredentials(): Promise<void>;\n\t_beginFallbackModelScope(): void;\n\t_clearFallbackModelScope(): void;\n\t_settleFallbackModelScope(): Promise<boolean>;\n\tabortRetry(): void;\n\twaitForRetry(): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): void;\n\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string, channel: \"stdout\" | \"stderr\") => void,\n\t\toptions?: {\n\t\t\texcludeFromContext?: boolean;\n\t\t\tid?: string;\n\t\t\toperations?: BashOperations;\n\t\t\tpty?: boolean;\n\t\t\temitEvent?: boolean;\n\t\t\trecordResult?: boolean;\n\t\t},\n\t): Promise<BashResult>;\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; persist?: boolean; defer?: boolean },\n\t): Promise<void>;\n\tabortBash(id?: string): void;\n\t_flushPendingBashMessages(): Promise<void>;\n\n\tsetSessionName(name: string): Promise<void>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\tgetUserMessagesForForking(): Array<{ entryId: string; text: string }>;\n\t_extractUserMessageText(content: string | Array<{ type: string; text?: string }>): string;\n\n\tgetSessionStats(): SessionStats;\n\tgetContextUsage(): ContextUsage | undefined;\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\t/**\n\t * `snapshotContent: false` leaves worktree snapshot patch and bundle content out of the file, and\n\t * `toolOutputContent: false` the tool outputs kept as session blobs.\n\t */\n\texportToJsonl(\n\t\toutputPath?: string,\n\t\toptions?: { includeShareContext?: boolean; snapshotContent?: boolean; toolOutputContent?: boolean },\n\t): Promise<string>;\n\tgetLastAssistantText(): string | undefined;\n\tcreateReplacedSessionContext(): ReplacedSessionContext;\n\thasExtensionHandlers(eventType: string): boolean;\n\tgetPersistenceFailure(): PersistenceFailure | undefined;\n\tgetUnsavedInput(): UnsavedInput | undefined;\n\tdiscardUnsavedInput(): void;\n}\n\nexport interface AgentSessionPublicSurface\n\textends Pick<\n\t\tAgentSessionMethodSurface,\n\t\t| \"getAgentTaskHost\"\n\t\t| \"closeSessionTasks\"\n\t\t| \"modelRuntime\"\n\t\t| \"state\"\n\t\t| \"model\"\n\t\t| \"thinkingLevel\"\n\t\t| \"isStreaming\"\n\t\t| \"systemPrompt\"\n\t\t| \"retryAttempt\"\n\t\t| \"retryStatus\"\n\t\t| \"turnStartedAt\"\n\t\t| \"isCompacting\"\n\t\t| \"compactionReason\"\n\t\t| \"compactionStartedAt\"\n\t\t| \"messages\"\n\t\t| \"transcriptMessages\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"sessionFile\"\n\t\t| \"sessionId\"\n\t\t| \"sessionName\"\n\t\t| \"sessionSummary\"\n\t\t| \"scopedModels\"\n\t\t| \"promptTemplates\"\n\t\t| \"pendingMessageCount\"\n\t\t| \"resourceLoader\"\n\t\t| \"autoCompactionEnabled\"\n\t\t| \"isRetrying\"\n\t\t| \"isWaitingToRetry\"\n\t\t| \"autoRetryEnabled\"\n\t\t| \"abortSessionSummary\"\n\t\t| \"isBashRunning\"\n\t\t| \"hasPendingBashMessages\"\n\t\t| \"extensionRunner\"\n\t\t| \"queuedMessagesPaused\"\n\t\t| \"pauseQueuedMessages\"\n\t\t| \"resumeQueuedMessages\"\n\t\t| \"subscribe\"\n\t\t| \"dispose\"\n\t\t| \"getActiveToolNames\"\n\t\t| \"getCallableToolNames\"\n\t\t| \"getAllTools\"\n\t\t| \"getToolDefinition\"\n\t\t| \"getToolStatus\"\n\t\t| \"getToolStatusAsync\"\n\t\t| \"setActiveToolsByName\"\n\t\t| \"setScopedModels\"\n\t\t| \"prompt\"\n\t\t| \"steer\"\n\t\t| \"followUp\"\n\t\t| \"sendCustomMessage\"\n\t\t| \"sendCustomMessages\"\n\t\t| \"sendUserMessage\"\n\t\t| \"clearQueue\"\n\t\t| \"getSteeringMessages\"\n\t\t| \"getFollowUpMessages\"\n\t\t| \"abort\"\n\t\t| \"interruptTurn\"\n\t\t| \"pauseTurn\"\n\t\t| \"resumeTurn\"\n\t\t| \"turnPaused\"\n\t\t| \"setModel\"\n\t\t| \"cycleModel\"\n\t\t| \"setThinkingLevel\"\n\t\t| \"cycleThinkingLevel\"\n\t\t| \"getAvailableThinkingLevels\"\n\t\t| \"supportsThinking\"\n\t\t| \"setSteeringMode\"\n\t\t| \"setFollowUpMode\"\n\t\t| \"compact\"\n\t\t| \"abortCompaction\"\n\t\t| \"abortBranchSummary\"\n\t\t| \"setAutoCompactionEnabled\"\n\t\t| \"setCompactionModel\"\n\t\t| \"bindExtensions\"\n\t\t| \"startPendingRecovery\"\n\t\t| \"startPendingRecoveryRestore\"\n\t\t| \"release\"\n\t\t| \"setToolDetachment\"\n\t\t| \"takeDetachedToolCalls\"\n\t\t| \"hasPendingDetachedTurn\"\n\t\t| \"isWaitingOnDetachedResults\"\n\t\t| \"redispatchDetachedToolCalls\"\n\t\t| \"resumeDetachedTurn\"\n\t\t| \"refreshCurrentModelFromRegistry\"\n\t\t| \"reload\"\n\t\t| \"completeStartupResources\"\n\t\t| \"abortRetry\"\n\t\t| \"setAutoRetryEnabled\"\n\t\t| \"executeBash\"\n\t\t| \"recordBashResult\"\n\t\t| \"abortBash\"\n\t\t| \"setSessionName\"\n\t\t| \"navigateTree\"\n\t\t| \"getUserMessagesForForking\"\n\t\t| \"getSessionStats\"\n\t\t| \"getContextUsage\"\n\t\t| \"refreshContext\"\n\t\t| \"exportToHtml\"\n\t\t| \"exportToJsonl\"\n\t\t| \"getLastAssistantText\"\n\t\t| \"createReplacedSessionContext\"\n\t\t| \"hasExtensionHandlers\"\n\t\t| \"getPersistenceFailure\"\n\t\t| \"getUnsavedInput\"\n\t\t| \"discardUnsavedInput\"\n\t> {\n\treadonly agent: Agent;\n\treadonly sessionManager: SessionManager;\n\treadonly settingsManager: SettingsManager;\n}\n\nexport interface AgentSessionInternalSurface extends AgentSessionMethodSurface, AgentSessionPublicSurface {\n\t_scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t_fallbackModels: string[];\n\t_isFallbackModelAllowed?: (model: Model<Api>, effort: string | undefined) => boolean;\n\t_fallbackAttemptedKeys: Set<string>;\n\t_fallbackBlockedModels: Array<Model<Api>>;\n\t_fallbackBlockedProviders: Set<string>;\n\t_fallbackOriginModel: Model<Api> | undefined;\n\t_fallbackOriginThinkingLevel: ThinkingLevel | undefined;\n\t_fallbackScopeGeneration: number;\n\t_fallbackOriginGeneration: number | undefined;\n\t_fallbackRestoreError: string | undefined;\n\n\t_unsubscribeAgent?: () => void;\n\t_eventListeners: AgentSessionEventListener[];\n\t_agentEventQueue: Promise<void>;\n\t_steeringMessages: string[];\n\t_followUpMessages: string[];\n\t_interruptDeliveryQueue: Promise<void>;\n\t_pendingPostCompactionContinuation: Promise<void> | undefined;\n\t_postCompactionContinuationToken: number;\n\t_lengthContinuationAttempts: number;\n\t_outputBudgetErrorContinuationAttempts: number;\n\t_postToolCompactionPreflightError: string | undefined;\n\t_pendingPostToolCompactionGuard: PendingPostToolCompactionGuard | undefined;\n\t/** Set once a compaction boundary gave this restricted agent the `session_history` tool. */\n\t_sessionHistoryToolEnabled: boolean;\n\t_terminatingToolCallIds: Set<string>;\n\t_stopAfterTurnBlockedContinuation: boolean;\n\t/** The current turn was ended by {@link interruptTurn}: a child's message admission stays open after it. */\n\t_turnInterruptedByUser: boolean;\n\t_abortPreparedRunAtStart: boolean;\n\t_startAbortedForInterrupt: boolean;\n\t_awaitingStartAfterInterrupt: boolean;\n\t_undeliveredAgentStarts: number;\n\t/** A child whose turn the user interrupted waits here: the next message it receives starts its next turn. */\n\t_awaitingMessageAfterInterrupt: boolean;\n\t/** A `pauseTurn` holds the queue: settles once its run did, and the user's continue releases the hold. */\n\t_turnPause: TurnPause | undefined;\n\t/** The release of a `pauseTurn` hold under way, which every next message waits for. */\n\t_turnPauseRelease: Promise<void> | undefined;\n\t_pendingInterruptDeliveries: number;\n\t_priorityInterruptPending: boolean;\n\t_activePromptCount: number;\n\t_isPreparingRun: false | \"user\" | \"custom\";\n\t_promptPreflightCount: number;\n\t_agentRunAbortRequested: boolean;\n\t_cacheWarmer?: import(\"./cache-warmer.ts\").CacheWarmer;\n\t_activeInterruptQueueHold: InterruptQueueHold | undefined;\n\t_queuedMessagesPaused: boolean;\n\t_queuedMessagesPauseAbortBoundary: Promise<void> | undefined;\n\t_admittedQueuedMessageAwaitingReply: string | undefined;\n\t_admittedRecoveryTurn: Promise<void> | undefined;\n\t_activeInterruptAbortMessage: string | undefined;\n\t_pendingNextTurnMessages: CustomMessage[];\n\t_pendingCustomMessages: CustomMessage[];\n\t_protectedStreamingCustomMessages: Array<{\n\t\tmessage: CustomMessage;\n\t\tdelivery: \"steer\" | \"followUp\";\n\t\tphase: \"queued\" | \"consumed-unpersisted\" | \"persistence-failed\";\n\t}>;\n\t_compactionAbortController: AbortController | undefined;\n\t_manualCompactionPromise: Promise<VerbatimCompactionResult> | undefined;\n\t_autoCompactionAbortController: AbortController | undefined;\n\t/** Stops the compactor request of the running compaction, which then clears the context instead. */\n\t_compactorAbortController: AbortController | undefined;\n\t_autoCompactionCompletion: Promise<void> | undefined;\n\t_compactionReason: import(\"./agent-session-types.js\").CompactionReason | undefined;\n\t_compactionStartedAt: number | undefined;\n\t_overflowRecoveryAttempted: boolean;\n\t_recoverableLengthRecoveryAttempted: boolean;\n\t_contextOverflowUnresolved: boolean;\n\t_branchSummaryAbortController: AbortController | undefined;\n\t_branchSummaryCompletion: Promise<void> | undefined;\n\t_retryAbortController: AbortController | undefined;\n\t_retryAttempt: number;\n\t_retryStatus?: import(\"./session-retry-status.js\").SessionRetryStatus;\n\t_turnStartedAt?: number;\n\t_longStreamCutRetries: number;\n\t_retryPromise: Promise<void> | undefined;\n\t_retryResolve: (() => void) | undefined;\n\t_retryGeneration: number;\n\t_agentRunRetryGeneration: number;\n\t_bashAbortControllers: Map<string | symbol, Set<AbortController>>;\n\t_pendingBashMessages: BashExecutionMessage[];\n\t_runOnlyBashMessages?: WeakSet<object>;\n\t_extensionRunner: ExtensionRunner;\n\t_turnIndex: number;\n\treadonly _entryIdsByMessage: WeakMap<object, string>;\n\treadonly _boundaryDispatchedMessages: WeakSet<object>;\n\treadonly _messagesAwaitingPersistence: WeakMap<object, Promise<void>>;\n\t_transcriptAppend: { message: AgentMessage; previousLeaf: string | null; owner?: object } | undefined;\n\treadonly _messagesWithFailedPersistence: WeakSet<object>;\n\t_persistenceFailure: string | undefined;\n\t_turnStopReason: string | undefined;\n\t_worktreeSnapshots: import(\"./session-worktree-snapshots.ts\").SessionWorktreeSnapshotRecorder;\n\treadonly _reissuedToolCallIds: Set<string>;\n\t_lastAssistantToolResults: AgentMessage[];\n\t_lastActivityOutcome: AgentActivityOutcome;\n\t_isBeforeSettle: boolean;\n\t_abortDuringBeforeSettle: boolean;\n\t_isEmittingAgentSettled: boolean;\n\treadonly _deferredSettledActions: Array<() => Promise<void>>;\n\t_callerReplacedNextRequestContext: boolean;\n\t_resourceLoader: ResourceLoader;\n\t_customTools: ToolDefinition[];\n\t_baseToolDefinitions: Map<string, ToolDefinition>;\n\t_cwd: string;\n\t_extensionRunnerRef?: { current?: ExtensionRunner };\n\t_initialActiveToolNames?: string[];\n\t_pendingToolNames: Set<string>;\n\t_restoredToolNames: Set<string>;\n\t_explicitToolDeactivations: Set<string>;\n\t_usesDefaultTools: boolean;\n\t_defaultToolModifiers: string[];\n\t_appliedDefaultTools: Set<string>;\n\t_allowedToolNames?: Set<string>;\n\t_excludedToolNames?: Set<string>;\n\t_allowedTools?: (name: string) => boolean;\n\t_excludedTools?: (name: string) => boolean;\n\t_childSessionOptions?: import(\"./child-session-options.ts\").ChildSessionOptionsResolver;\n\t_storageAgentDir?: string;\n\t_baseToolsOverride?: Record<string, AgentTool>;\n\t_sessionStartEvent: SessionStartEvent;\n\t_workspace?: import(\"./workspace/resolve.ts\").BoundWorkspace;\n\t_subagentPolicy?: import(\"./extensions/index.js\").SubagentChildPolicy;\n\t_intercomPolicy?: import(\"./intercom-policy.ts\").SessionIntercomPolicy;\n\t_subagentMessageAdmission?: import(\"./message-admission.js\").MessageAdmissionBoundary;\n\t_extensionUIContext?: ExtensionUIContext;\n\t_extensionHumanInput?: import(\"./extensions/host-input.js\").HostInput | null;\n\t_extensionDiagnosticListener?: (diagnostic: import(\"./extensions/host-input.js\").HostDiagnostic) => void;\n\t_extensionMode: ExtensionMode;\n\t_disposed: boolean;\n\t_close(event: import(\"./extensions/types.ts\").SessionShutdownEvent, beforeInvalidate?: () => void): Promise<void>;\n\t_sessionSummaryAbortController: AbortController | undefined;\n\t_sessionSummaryToken: number;\n\t_sessionSummaryRun: import(\"./agent-session-summary.ts\").SessionSummaryRun | undefined;\n\t_lastSummarizedMessageId: string | undefined;\n\t_extensionCommandContextActions?: ExtensionCommandContextActions;\n\t_extensionShutdownHandler?: () => void;\n\t_extensionErrorListener?: ExtensionErrorListener;\n\t_extensionErrorUnsubscriber?: () => void;\n\t_modelRuntime: ModelRuntime;\n\t_extensionProviderIds: Set<string>;\n\t_toolRegistry: Map<string, AgentTool>;\n\t_toolExecutionScheduler: ToolExecutionScheduler;\n\t_outerWorktreeRootMappings: readonly WorktreeRootMapping[];\n\t_worktreeRestoreNotices: readonly string[];\n\t_toolDefinitions: Map<string, ToolDefinitionEntry>;\n\t_toolPromptSnippets: Map<string, string>;\n\t_toolPromptGuidelines: Map<string, string[]>;\n\t_baseSystemPromptOptions: NormalizedBuildSystemPromptOptions;\n\t_systemPromptTransform?: (prompt: string) => string;\n\t_systemPromptSections?: import(\"./sdk-types.ts\").SystemPromptSectionsTransform;\n\t_transformedPromptHead?: import(\"./transformed-system-prompt.ts\").TransformedPrompt;\n\t_contextProjectionTransform?: (messages: AgentMessage[]) => AgentMessage[];\n\t_requestContextProjectionTransform?: (messages: AgentMessage[]) => AgentMessage[];\n\t/** The restored history's last message until the first request after a resume; see `_compactBeforeResumedPrompt`. */\n\t_resumeBudgetCheckpoint?: AgentMessage;\n\t/**\n\t * What the check of `_resumeBudgetCheckpoint` for a run that sends the session's prompt as it is now (a prompt, or a\n\t * run an extension starts) found that prompt to need: its update, or null when the prompt was current. Undefined\n\t * until such a run is checked. A conversation request retires the checkpoint once the transcript it sends holds that\n\t * update, at once when it is null; see `_compactBeforeResumedPrompt`.\n\t */\n\t_resumePromptUpdate?: AgentMessage | null;\n\t/**\n\t * The prompt update a resume needs, as the first check of a run that does not send the session's prompt (an\n\t * interrupt, queued input) found it while one was pending. Until the checkpoint retires, a later turn of such a run\n\t * leaves out what it changes or adds; see `withoutResumeUpdate`.\n\t */\n\t_resumeHeldUpdate?: SystemMessageWithTransformedPrompt;\n\t_runSystemPromptOptions?: NormalizedBuildSystemPromptOptions;\n\t/**\n\t * The prompt sections that the latest sent prompt's `before_agent_start` handlers set, replaced or removed relative\n\t * to the base options, such as the MCP servers' section, for the extensions of `runner` (held weakly, so a reload's\n\t * retired extensions can be collected). A run that starts without a prompt (an interrupt, queued input) keeps them\n\t * as the conversation last had them; see `_currentRunSystemPromptOptions`.\n\t */\n\t_promptSectionNames?: { runner: WeakRef<ExtensionRunner>; names: ReadonlySet<string> };\n\t_lastAssistantMessage: AssistantMessage | undefined;\n\t_tempStorageLease: import(\"./tools/session-temp-dir.ts\").ProtectedPathLease | undefined;\n\t_sessionOpenMarker: (() => Promise<void>) | undefined;\n\t_agentTaskHost: import(\"./tasks/agent-adapter.js\").AgentTaskHost | undefined;\n\t_parentCommandTaskOwner: import(\"./tasks/child-command-owner.js\").ChildCommandTaskOwner | undefined;\n\t_inheritedHistory: import(\"./tools/history-protocol.ts\").ProjectHistory | undefined;\n\t_resourceAdmission: import(\"./sdk-types.ts\").ResourceAdmission | undefined;\n\t_childTaskWaits: import(\"./tasks/child-command-owner.js\").ChildTaskWaits;\n\t_taskCompletionOutbox: import(\"./tasks/completion.js\").TaskCompletionOutbox | undefined;\n\t_taskAdmission: import(\"./message-admission.js\").MessageAdmissionBoundary | undefined;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"agent-session-methods.js","sourceRoot":"","sources":["../../src/core/agent-session-methods.ts"],"names":[],"mappings":"","sourcesContent":["import type { Agent, AgentEvent, AgentMessage, AgentState, AgentTool, ThinkingLevel } from \"@bastani/atomic-agent-core\";\nimport type { ProviderHeaders } from \"@bastani/atomic-ai\";\nimport type {\n\tApi,\n\tAssistantMessage,\n\tImageContent,\n\tMessage,\n\tModel,\n\tTextContent,\n\tToolResultMessage,\n} from \"@bastani/atomic-ai/compat\";\nimport type { DetachedToolCall, DetachedToolResult, ToolDetachmentPolicy } from \"./agent-session-detached-tools.ts\";\nimport type { PersistenceFailure, UnsavedInput } from \"./agent-session-persistence-failures.ts\";\nimport type { PendingPostToolCompactionGuard } from \"./agent-session-post-tool-compaction.ts\";\nimport type { RecordedToolLoadout } from \"./agent-session-state.ts\";\nimport type {\n\tAgentSessionEvent,\n\tAgentSessionEventListener,\n\tAgentSessionReloadOptions,\n\tClearedQueue,\n\tClearQueueOptions,\n\tDrainedAgentQueues,\n\tExtensionBindings,\n\tInterruptQueueHold,\n\tModelCycleResult,\n\tModelMutationOptions,\n\tPromptDisposition,\n\tPromptOptions,\n\tQueuedInputDisposition,\n\tSessionAbortOptions,\n\tSessionRecoveryReport,\n\tSessionStats,\n\tToolDefinitionEntry,\n} from \"./agent-session-types.js\";\nimport type { BashResult } from \"./bash-executor.ts\";\nimport type { VerbatimCompactionResult } from \"./compaction/index.ts\";\nimport type {\n\tAgentActivityOutcome,\n\tBoundaryContextPreview,\n\tContextUsage,\n\tExtensionCommandContextActions,\n\tExtensionErrorListener,\n\tExtensionMode,\n\tExtensionRunner,\n\tExtensionUIContext,\n\tReplacedSessionContext,\n\tSendMessageOptions,\n\tSendMessagesOptions,\n\tSessionBoundaryDraft,\n\tSessionRecoveryReason,\n\tSessionStartEvent,\n\tToolDefinition,\n\tToolInfo,\n} from \"./extensions/index.js\";\nimport type { BashExecutionMessage, CustomMessage } from \"./messages.ts\";\nimport type { ExtensionProviderTransaction, ModelRuntime } from \"./model-runtime.js\";\nimport type { PathMetadata } from \"./package-manager.ts\";\nimport type { PromptTemplate } from \"./prompt-templates.ts\";\nimport type { ResourceLoader } from \"./resource-loader.ts\";\nimport type { BranchSummaryEntry, SessionEntry, SessionManager, SessionSummaryEntry } from \"./session-manager.ts\";\nimport type { SettingsManager } from \"./settings-manager.ts\";\nimport type { NormalizedBuildSystemPromptOptions } from \"./system-prompt.ts\";\nimport type { ToolStatusReport } from \"./tool-status.js\";\nimport type { BashOperations } from \"./tools/bash.js\";\nimport type { ToolExecutionScheduler } from \"./tools/tool-concurrency.ts\";\nimport type { SystemMessageWithTransformedPrompt } from \"./transformed-system-prompt.ts\";\nimport type { WorktreeRootMapping } from \"./worktree-snapshot/types.ts\";\n\nexport interface SessionCompactOptions {\n\t/** Instructions for this compaction: what to recover first, and the compactor's query. */\n\tquery?: string;\n\t/**\n\t * `auto` or an exact compactor model `provider/model` for this run only; overrides the `compactionModel` setting\n\t * without saving it. Any other value clears the context with a notice.\n\t */\n\tcompactionModel?: string;\n}\n\nexport interface VerbatimCompactionApplyOptions {\n\tabortController: AbortController;\n\tbackupLabel: string;\n\tquery?: string;\n\tcompactionModel?: string;\n\treason: \"manual\" | \"threshold\" | \"overflow\";\n\t/** Reports when a session_before_compact override becomes the active compaction source. */\n\tonCompactionSource?: (fromExtension: boolean) => void;\n\t/** Last entry the boundary covers; the entries after it stay in the context as they are. Default: all of them. */\n\tcoveredThroughEntryId?: string;\n}\n\n/**\n * How much an automatic compaction is load-bearing: `load_bearing` when the turn cannot continue without it (a provider\n * overflow), `recoverable` otherwise. Only a load-bearing failure marks the overflow unresolved.\n */\nexport type AutoCompactionUrgency = \"recoverable\" | \"load_bearing\";\n\n/** Outcome of an automatic compaction admission and persistence attempt. */\nexport type AutoCompactionRunOutcome = \"compacted\" | \"not_compactable\" | \"deferred\" | \"failed\";\n\nexport interface ExtensionResourcePathEntry {\n\tpath: string;\n\textensionPath: string;\n}\n\nexport interface ExtensionResourcePathResult {\n\tpath: string;\n\tmetadata: PathMetadata;\n}\n\nexport interface RuntimeBuildOptions {\n\tactiveToolNames?: string[];\n\tflagValues?: Map<string, boolean | string>;\n\tincludeAllExtensionTools?: boolean;\n\tpreserveRunner?: boolean;\n\tpowerShellAvailable: boolean;\n}\n\n/** The settlement of the run a `pauseTurn` ended. Spelled out, as published declarations may predate `PromiseWithResolvers`. */\nexport interface TurnPause {\n\treadonly promise: Promise<void>;\n\tresolve(): void;\n}\n\nexport interface AgentSessionQueuePauseControl {\n\treadonly queuedMessagesPaused: boolean;\n\t/** Whether Esc in the session's chat paused it (`pauseTurn`): its queue is held until the user continues it. */\n\treadonly turnPaused: boolean;\n\tpauseQueuedMessages(): void;\n\t/** Release the hold without starting a turn; true means raw queued work was released. */\n\tresumeQueuedMessages(beforeRelease?: () => void): Promise<boolean>;\n}\n\nexport interface AgentSessionMethodSurface extends AgentSessionQueuePauseControl {\n\treadonly modelRuntime: ModelRuntime;\n\treadonly state: AgentState;\n\treadonly model: Model<Api> | undefined;\n\treadonly thinkingLevel: ThinkingLevel;\n\treadonly isStreaming: boolean;\n\treadonly systemPrompt: string;\n\treadonly retryAttempt: number;\n\treadonly retryStatus?: import(\"./session-retry-status.js\").SessionRetryStatus;\n\t/** Time of the current turn's first request, including waits and later attempts; absent between turns. */\n\treadonly turnStartedAt?: number;\n\treadonly isCompacting: boolean;\n\treadonly compactionReason?: import(\"./agent-session-types.js\").CompactionReason;\n\treadonly compactionStartedAt?: number;\n\treadonly messages: AgentMessage[];\n\t/** The settled chat rows, including admitted messages whose save is still in flight. */\n\treadonly transcriptMessages: AgentMessage[];\n\treadonly steeringMode: \"all\" | \"one-at-a-time\";\n\treadonly followUpMode: \"all\" | \"one-at-a-time\";\n\treadonly sessionFile: string | undefined;\n\treadonly sessionId: string;\n\treadonly sessionName: string | undefined;\n\treadonly sessionSummary: SessionSummaryEntry | undefined;\n\treadonly scopedModels: ReadonlyArray<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\treadonly promptTemplates: ReadonlyArray<PromptTemplate>;\n\treadonly pendingMessageCount: number;\n\treadonly resourceLoader: ResourceLoader;\n\treadonly autoCompactionEnabled: boolean;\n\treadonly isRetrying: boolean;\n\t/**\n\t * The session waits out a retry's backoff before its next attempt. A session with fallback models keeps its run\n\t * open through the wait, so it also reads as streaming then.\n\t */\n\treadonly isWaitingToRetry: boolean;\n\treadonly autoRetryEnabled: boolean;\n\treadonly isBashRunning: boolean;\n\treadonly hasPendingBashMessages: boolean;\n\treadonly extensionRunner: ExtensionRunner;\n\n\t_handleAgentEvent(event: AgentEvent): Promise<void> | void;\n\t_getRequiredRequestAuth(\n\t\tmodel: Model<Api>,\n\t\tsignal?: AbortSignal,\n\t): Promise<{ apiKey?: string; headers?: ProviderHeaders; baseUrl?: string }>;\n\t_installAgentToolHooks(): void;\n\t_installAgentNextTurnRefresh(): void;\n\t_installAgentRequestProjection(): void;\n\t_installAgentBoundaryHooks(): void;\n\t_refreshFinalizedContext(): void;\n\t_projectFinalizedMessages(): AgentMessage[];\n\trefreshContext(): void;\n\t_dispatchTurnEndBoundary(\n\t\tmessage: AssistantMessage,\n\t\ttoolResults: ToolResultMessage[],\n\t\tawaitPersistence?: boolean,\n\t): Promise<boolean>;\n\t_applyBoundaryDrafts(manager: SessionManager, drafts: SessionBoundaryDraft[]): Promise<SessionEntry[]>;\n\t_createBoundaryPreviewManager(drafts: SessionBoundaryDraft[]): Promise<SessionManager>;\n\t_getPendingBoundaryMessages(): AgentMessage[];\n\t_buildBoundaryContext(\n\t\tdrafts: SessionBoundaryDraft[],\n\t\tboundary: \"turn_end\" | \"agent_before_settle\",\n\t): Promise<BoundaryContextPreview>;\n\t_commitBoundaryDrafts(drafts: SessionBoundaryDraft[]): Promise<void>;\n\t_reportInvalidBoundaryContinuation(event: \"turn_end\" | \"agent_before_settle\"): void;\n\t_findPersistedMessageEntryId(message: AgentMessage): string | undefined;\n\t_omitRecoveryAttempt(message: AssistantMessage, toolResults?: AgentMessage[]): Promise<void>;\n\t_omitTrailingAssistantAttempt(accept?: (message: AssistantMessage) => boolean): Promise<boolean>;\n\t_runBeforeSettleBoundary(): Promise<boolean>;\n\t_emit(event: AgentSessionEvent): void;\n\t_emitQueueUpdate(): void;\n\t_createRetryPromiseForAgentEnd(event: AgentEvent): void;\n\t_findLastAssistantInMessages(messages: AgentMessage[]): AssistantMessage | undefined;\n\t_processAgentEvent(event: AgentEvent, retryGeneration?: number): Promise<void>;\n\t_applyInterruptAbortMessage(event: AgentEvent): void;\n\t_applyProviderErrorGuidance(event: AgentEvent): void;\n\t_resolveRetry(): void;\n\t_getUserMessageText(message: Message): string;\n\t_findLastAssistantMessage(): AssistantMessage | undefined;\n\t_replaceMessageInPlace(target: AgentMessage, replacement: AgentMessage): void;\n\t_emitExtensionEvent(event: AgentEvent): Promise<void>;\n\tsubscribe(\n\t\tsource: import(\"./event-subscriptions/types.js\").EventSource,\n\t\thandler: import(\"./event-subscriptions/session-subscription.js\").SessionEventHandler,\n\t\toptions?: import(\"./event-subscriptions/session-subscription.js\").SessionSubscribeOptions,\n\t): import(\"./event-subscriptions/types.js\").Subscription;\n\tsubscribe(listener: AgentSessionEventListener): () => void;\n\t_disconnectFromAgent(): void;\n\tdispose(): Promise<void>;\n\tgetAgentTaskHost(): import(\"./tasks/agent-adapter.js\").AgentTaskHost;\n\t_getCommandTaskOwner(): import(\"./tools/bash-pty-native.js\").SupervisedCommandOwner | undefined;\n\t/** This session's background history:// reads and searches; `undefined` while the session closes or reloads. */\n\t_getHistoryTasks(): import(\"./tools/history-tasks.ts\").HistoryTaskRegistry | undefined;\n\tcloseSessionTasks(): Promise<void>;\n\t/** Cancel owned execution without closing message admission. */\n\tpauseTasks(): Promise<void>;\n\tresumeTasks(): void;\n\n\tgetActiveToolNames(): string[];\n\tgetCallableToolNames(): string[];\n\tgetAllTools(): ToolInfo[];\n\tgetToolDefinition(name: string): ToolDefinition | undefined;\n\t/** Explain which tools are active, which are not (and why), and which selected names nothing registered. */\n\tgetToolStatus(): ToolStatusReport;\n\tgetToolStatusAsync(): Promise<ToolStatusReport>;\n\t/** The tool status without its Git section, so without running git. */\n\t_getToolStatusWithoutGit(): ToolStatusReport;\n\tsetActiveToolsByName(toolNames: string[]): void;\n\t_setActiveTools(toolNames: string[]): void;\n\tsetScopedModels(scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>): void;\n\t_normalizePromptSnippet(text: string | undefined): string | undefined;\n\t_normalizePromptGuidelines(guidelines: string[] | undefined): string[];\n\t_rebuildSystemPrompt(toolNames: string[]): void;\n\t_preparePromptAndToolLoadout(\n\t\toptions: NormalizedBuildSystemPromptOptions,\n\t\tmessages?: AgentMessage[],\n\t): SystemMessageWithTransformedPrompt | undefined;\n\t_restoreToolsFromTranscript(options?: { startup?: boolean }): void;\n\t_refreshBaseSystemPromptFromActiveTools(): void;\n\t_currentRunSystemPromptOptions(): NormalizedBuildSystemPromptOptions;\n\t_recordSystemPromptForModelSwitch(): Promise<void>;\n\t_recordTransformedPromptHead(): Promise<void> | undefined;\n\n\tprompt(text: string, options?: PromptOptions): Promise<void>;\n\t_runAgentPrompt(\n\t\tmessages: AgentMessage | AgentMessage[],\n\t\tpromptStarted?: () => void,\n\t\treportDispatch?: (disposition: PromptDisposition) => void,\n\t\tprepared?: boolean,\n\t\tcustomStarter?: CustomMessage,\n\t\tfallbackGeneration?: number,\n\t): Promise<void>;\n\t_runAgentContinue(): Promise<void>;\n\t_runAgentContinuation(beforeContinue: () => Promise<void>, mode?: \"continue\" | \"recovery\" | \"settle\"): Promise<void>;\n\t_continueQueuedAgentMessages(): Promise<void>;\n\t_tryExecuteExtensionCommand(text: string): Promise<boolean>;\n\t_expandSkillCommand(text: string): Promise<string>;\n\tsteer(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\toptions?: Pick<PromptOptions, \"source\" | \"expandPromptTemplates\">,\n\t): Promise<QueuedInputDisposition>;\n\tfollowUp(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\toptions?: Pick<PromptOptions, \"source\" | \"expandPromptTemplates\">,\n\t): Promise<QueuedInputDisposition>;\n\tsendUserMessage(\n\t\tcontent: string | (TextContent | ImageContent)[],\n\t\toptions?: { deliverAs?: \"steer\" | \"followUp\"; expandPromptTemplates?: boolean },\n\t): Promise<void>;\n\n\t_queueSteer(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\ttyped?: string,\n\t\trawText?: string,\n\t\treceiptId?: string,\n\t\toriginSendId?: string,\n\t): Promise<void>;\n\t_queueFollowUp(\n\t\ttext: string,\n\t\timages?: ImageContent[],\n\t\ttyped?: string,\n\t\trawText?: string,\n\t\treceiptId?: string,\n\t\toriginSendId?: string,\n\t): Promise<void>;\n\t_throwIfExtensionCommand(text: string): void;\n\tsendCustomMessage<T = unknown>(\n\t\tmessage: Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">,\n\t\toptions?: SendMessageOptions,\n\t): Promise<void>;\n\tsendCustomMessages<T = unknown>(\n\t\tmessages: Array<Pick<CustomMessage<T>, \"customType\" | \"content\" | \"display\" | \"details\">>,\n\t\toptions?: SendMessagesOptions,\n\t): Promise<void>;\n\t_commitAdmittedCustomMessage<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_commitAdmittedCustomMessages<T>(messages: CustomMessage<T>[], options?: SendMessagesOptions): Promise<void>;\n\t_appendCustomMessage<T>(message: CustomMessage<T>): Promise<void>;\n\t_flushPendingCustomMessages(withinRun?: boolean): Promise<void>;\n\t_enqueueInterruptCustomMessage<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_sendInterruptCustomMessageNow<T>(message: CustomMessage<T>, options?: SendMessageOptions): Promise<void>;\n\t_ensureActiveInterruptQueueHold(): InterruptQueueHold;\n\t_restoreAndClearActiveInterruptQueueHold(): void;\n\t_queueAgentMessage(message: AgentMessage, delivery: \"steer\" | \"followUp\" | \"interrupt\"): void;\n\t_drainQueuedAgentMessages(): DrainedAgentQueues;\n\t_restoreQueuedAgentMessages(queues: DrainedAgentQueues): void;\n\tclearQueue(options?: ClearQueueOptions): ClearedQueue;\n\tgetSteeringMessages(): readonly string[];\n\tgetFollowUpMessages(): readonly string[];\n\tabort(options?: SessionAbortOptions): Promise<void>;\n\t/** Ends the current turn without closing the session to further messages, as Esc does in a subagent's chat. */\n\tinterruptTurn(): Promise<void>;\n\t/**\n\t * Pauses the current turn as Esc does in a subagent's chat: returns the typed messages still queued, ends the turn,\n\t * and holds the rest of the queue until the next message continues the session.\n\t */\n\tpauseTurn(): Promise<ClearedQueue>;\n\t/** Continues a session `pauseTurn` paused: its hold is released, so the user's message sent next starts the turn. */\n\tresumeTurn(): Promise<void>;\n\t_sealMessageAdmissionIfDrained(): boolean;\n\tsetSteeringMode(mode: \"all\" | \"one-at-a-time\"): void;\n\tsetFollowUpMode(mode: \"all\" | \"one-at-a-time\"): void;\n\n\t_emitModelChanged(\n\t\tnextModel: Model<Api>,\n\t\tpreviousModel: Model<Api> | undefined,\n\t\tsource: \"set\" | \"cycle\" | \"restore\" | \"fallback\",\n\t): void;\n\t_emitModelSelect(\n\t\tnextModel: Model<Api>,\n\t\tpreviousModel: Model<Api> | undefined,\n\t\tsource: \"set\" | \"cycle\" | \"restore\" | \"fallback\",\n\t): Promise<void>;\n\tsetModel(model: Model<Api>, options?: ModelMutationOptions & { thinkingLevel?: ThinkingLevel }): Promise<void>;\n\tcycleModel(\n\t\tdirection?: \"forward\" | \"backward\",\n\t\toptions?: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t_cycleScopedModel(\n\t\tdirection: \"forward\" | \"backward\",\n\t\toptions: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\t_cycleAvailableModel(\n\t\tdirection: \"forward\" | \"backward\",\n\t\toptions: ModelMutationOptions,\n\t): Promise<ModelCycleResult | undefined>;\n\tsetThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): Promise<void>;\n\tcycleThinkingLevel(options?: ModelMutationOptions): Promise<ThinkingLevel | undefined>;\n\tgetAvailableThinkingLevels(): ThinkingLevel[];\n\tsupportsThinking(): boolean;\n\t_getThinkingLevelForModelSwitch(targetModel?: Model<Api>, explicitLevel?: ThinkingLevel): ThinkingLevel;\n\t_clampThinkingLevel(level: ThinkingLevel, availableLevels: ThinkingLevel[]): ThinkingLevel;\n\t_recordThinkingLevel(): Promise<string> | undefined;\n\n\t_applyVerbatimCompaction(options: VerbatimCompactionApplyOptions): Promise<VerbatimCompactionResult | undefined>;\n\tcompact(options?: SessionCompactOptions): Promise<VerbatimCompactionResult>;\n\tabortCompaction(): void;\n\tabortBranchSummary(): void;\n\tabortSessionSummary(): void;\n\t_maybeGenerateSessionSummary(): Promise<void>;\n\t_checkCompaction(assistantMessage: AssistantMessage, skipAbortedCheck?: boolean): Promise<void>;\n\t_compactBeforeContinuation(input?: readonly AgentMessage[]): Promise<boolean>;\n\t_compactBeforeResumedPrompt(\n\t\tupdate: AgentMessage | undefined,\n\t\tinput: readonly AgentMessage[],\n\t\tsendsPrompt?: boolean,\n\t): Promise<boolean>;\n\t_continueAgentAfterCompactionCheck(): Promise<void>;\n\t_dropTrailingAutoCompactionRetryAssistantIfPresent(): Promise<void>;\n\t_schedulePostAutoCompactionContinuationProbe(reason: \"overflow\" | \"threshold\", willRetry: boolean): void;\n\t_awaitPendingPostCompactionContinuation(): Promise<void>;\n\t_resumeAfterAutoCompaction(): Promise<void>;\n\t_resumeAfterLengthTruncation(): Promise<void>;\n\t_runAutoCompaction(\n\t\treason: \"overflow\" | \"threshold\",\n\t\twillRetry: boolean,\n\t\turgency?: AutoCompactionUrgency,\n\t\tcoveredThroughEntryId?: string,\n\t): Promise<AutoCompactionRunOutcome>;\n\t_preflightPostToolContext(messages: AgentMessage[], signal?: AbortSignal): Promise<AgentMessage[]>;\n\t_finishPostToolCompactionPreflight(messages: AgentMessage[]): AgentMessage[];\n\tsetAutoCompactionEnabled(enabled: boolean): void;\n\tsetCompactionModel(model: string, scope?: \"global\" | \"project\", options?: { persist?: boolean }): void;\n\t/** Give an agent without `read` or `search` the read-only `session_history` tool after a compaction boundary. */\n\t_enableSessionHistoryTool(): void;\n\n\tbindExtensions(bindings: ExtensionBindings): Promise<void>;\n\tstartPendingRecovery(reason?: SessionRecoveryReason): Promise<SessionRecoveryReport>;\n\tstartPendingRecoveryRestore(reason?: SessionRecoveryReason): Promise<SessionRecoveryReport>;\n\t/** Keep only the stored history and let go of everything live; rehydrate with `AgentSessionRuntime.rehydrate`. */\n\trelease(): Promise<import(\"./agent-session-release.ts\").ReleasedAgentSession>;\n\t/** Let calls of `detachable` tools that run longer than `policy.afterMs` go on without the run; `undefined` runs them inline. */\n\tsetToolDetachment(policy: ToolDetachmentPolicy | undefined): void;\n\t/** The calls the session's runs detached and the host has not taken yet; taking them clears the list. */\n\ttakeDetachedToolCalls(): DetachedToolCall[];\n\t/** Whether the transcript ends on a turn that issued a detachable call and has no answer from the model yet. */\n\thasPendingDetachedTurn(): boolean;\n\t/** Whether the transcript still waits on the result of a call of a detachable tool: nothing may start a turn. */\n\tisWaitingOnDetachedResults(): boolean;\n\t/** Start again the detachable calls the transcript ends on without a result, with their original ids and arguments. */\n\tredispatchDetachedToolCalls(): DetachedToolCall[];\n\t/** Record detached calls' results; the turn that issued them continues once each of its detachable calls has one. */\n\tresumeDetachedTurn(\n\t\tresults: readonly DetachedToolResult[],\n\t\tonRecorded?: (toolCallIds: readonly string[]) => void,\n\t): Promise<void>;\n\t_waitForExtensionStart(): Promise<void>;\n\textendResourcesFromExtensions(reason: \"startup\" | \"reload\"): Promise<void>;\n\tbuildExtensionResourcePaths(entries: ExtensionResourcePathEntry[]): ExtensionResourcePathResult[];\n\tgetExtensionSourceLabel(extensionPath: string): string;\n\t_applyExtensionBindings(runner: ExtensionRunner): void;\n\t_refreshCurrentModelFromRegistry(): Promise<void>;\n\trefreshCurrentModelFromRegistry(): Promise<void>;\n\t_bindExtensionCore(\n\t\trunner: ExtensionRunner,\n\t\tpublication?: {\n\t\t\tresourceLoader: ResourceLoader;\n\t\t\tproviderTransaction: ExtensionProviderTransaction;\n\t\t\tproviderIds: Set<string>;\n\t\t\tdefer(effect: () => void | Promise<void>): void;\n\t\t},\n\t\tstartupToolNames?: readonly string[],\n\t\tstartupLoadout?: RecordedToolLoadout,\n\t): void;\n\t_refreshToolRegistry(options?: { activeToolNames?: string[]; includeAllExtensionTools?: boolean }): void;\n\t_buildRuntime(options: RuntimeBuildOptions): void;\n\treload(options?: AgentSessionReloadOptions): Promise<void>;\n\tcompleteStartupResources(resourceLoader: ResourceLoader): Promise<void>;\n\n\t_isRetryableError(message: AssistantMessage): boolean;\n\t_isFallbackableError(message: AssistantMessage): boolean;\n\t_isEmptyCompletion(message: AssistantMessage): boolean;\n\t_isSafetyRefusal(message: AssistantMessage): boolean;\n\t_handleRetryableError(message: AssistantMessage): Promise<boolean>;\n\t_trySwitchToFallbackModel(message: AssistantMessage): Promise<boolean>;\n\t_selectModelWithCredentials(): Promise<void>;\n\t_beginFallbackModelScope(): void;\n\t_clearFallbackModelScope(): void;\n\t_settleFallbackModelScope(): Promise<boolean>;\n\tabortRetry(): void;\n\twaitForRetry(): Promise<void>;\n\tsetAutoRetryEnabled(enabled: boolean): void;\n\n\texecuteBash(\n\t\tcommand: string,\n\t\tonChunk?: (chunk: string, channel: \"stdout\" | \"stderr\") => void,\n\t\toptions?: {\n\t\t\texcludeFromContext?: boolean;\n\t\t\tid?: string;\n\t\t\toperations?: BashOperations;\n\t\t\tpty?: boolean;\n\t\t\temitEvent?: boolean;\n\t\t\trecordResult?: boolean;\n\t\t},\n\t): Promise<BashResult>;\n\trecordBashResult(\n\t\tcommand: string,\n\t\tresult: BashResult,\n\t\toptions?: { excludeFromContext?: boolean; persist?: boolean; defer?: boolean },\n\t): Promise<void>;\n\tabortBash(id?: string): void;\n\t_flushPendingBashMessages(): Promise<void>;\n\n\tsetSessionName(name: string): Promise<void>;\n\tnavigateTree(\n\t\ttargetId: string,\n\t\toptions?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string },\n\t): Promise<{ editorText?: string; cancelled: boolean; aborted?: boolean; summaryEntry?: BranchSummaryEntry }>;\n\tgetUserMessagesForForking(): Array<{ entryId: string; text: string }>;\n\t_extractUserMessageText(content: string | Array<{ type: string; text?: string }>): string;\n\n\tgetSessionStats(): SessionStats;\n\tgetContextUsage(): ContextUsage | undefined;\n\texportToHtml(outputPath?: string, options?: { themeName?: string }): Promise<string>;\n\t/**\n\t * `snapshotContent: false` leaves worktree snapshot patch and bundle content out of the file, and\n\t * `toolOutputContent: false` the tool outputs kept as session blobs.\n\t */\n\texportToJsonl(\n\t\toutputPath?: string,\n\t\toptions?: { includeShareContext?: boolean; snapshotContent?: boolean; toolOutputContent?: boolean },\n\t): Promise<string>;\n\tgetLastAssistantText(): string | undefined;\n\tcreateReplacedSessionContext(): ReplacedSessionContext;\n\thasExtensionHandlers(eventType: string): boolean;\n\tgetPersistenceFailure(): PersistenceFailure | undefined;\n\tgetUnsavedInput(): UnsavedInput | undefined;\n\tdiscardUnsavedInput(): void;\n}\n\nexport interface AgentSessionPublicSurface\n\textends Pick<\n\t\tAgentSessionMethodSurface,\n\t\t| \"getAgentTaskHost\"\n\t\t| \"closeSessionTasks\"\n\t\t| \"modelRuntime\"\n\t\t| \"state\"\n\t\t| \"model\"\n\t\t| \"thinkingLevel\"\n\t\t| \"isStreaming\"\n\t\t| \"systemPrompt\"\n\t\t| \"retryAttempt\"\n\t\t| \"retryStatus\"\n\t\t| \"turnStartedAt\"\n\t\t| \"isCompacting\"\n\t\t| \"compactionReason\"\n\t\t| \"compactionStartedAt\"\n\t\t| \"messages\"\n\t\t| \"transcriptMessages\"\n\t\t| \"steeringMode\"\n\t\t| \"followUpMode\"\n\t\t| \"sessionFile\"\n\t\t| \"sessionId\"\n\t\t| \"sessionName\"\n\t\t| \"sessionSummary\"\n\t\t| \"scopedModels\"\n\t\t| \"promptTemplates\"\n\t\t| \"pendingMessageCount\"\n\t\t| \"resourceLoader\"\n\t\t| \"autoCompactionEnabled\"\n\t\t| \"isRetrying\"\n\t\t| \"isWaitingToRetry\"\n\t\t| \"autoRetryEnabled\"\n\t\t| \"abortSessionSummary\"\n\t\t| \"isBashRunning\"\n\t\t| \"hasPendingBashMessages\"\n\t\t| \"extensionRunner\"\n\t\t| \"queuedMessagesPaused\"\n\t\t| \"pauseQueuedMessages\"\n\t\t| \"resumeQueuedMessages\"\n\t\t| \"subscribe\"\n\t\t| \"dispose\"\n\t\t| \"getActiveToolNames\"\n\t\t| \"getCallableToolNames\"\n\t\t| \"getAllTools\"\n\t\t| \"getToolDefinition\"\n\t\t| \"getToolStatus\"\n\t\t| \"getToolStatusAsync\"\n\t\t| \"setActiveToolsByName\"\n\t\t| \"setScopedModels\"\n\t\t| \"prompt\"\n\t\t| \"steer\"\n\t\t| \"followUp\"\n\t\t| \"sendCustomMessage\"\n\t\t| \"sendCustomMessages\"\n\t\t| \"sendUserMessage\"\n\t\t| \"clearQueue\"\n\t\t| \"getSteeringMessages\"\n\t\t| \"getFollowUpMessages\"\n\t\t| \"abort\"\n\t\t| \"interruptTurn\"\n\t\t| \"pauseTurn\"\n\t\t| \"resumeTurn\"\n\t\t| \"turnPaused\"\n\t\t| \"setModel\"\n\t\t| \"cycleModel\"\n\t\t| \"setThinkingLevel\"\n\t\t| \"cycleThinkingLevel\"\n\t\t| \"getAvailableThinkingLevels\"\n\t\t| \"supportsThinking\"\n\t\t| \"setSteeringMode\"\n\t\t| \"setFollowUpMode\"\n\t\t| \"compact\"\n\t\t| \"abortCompaction\"\n\t\t| \"abortBranchSummary\"\n\t\t| \"setAutoCompactionEnabled\"\n\t\t| \"setCompactionModel\"\n\t\t| \"bindExtensions\"\n\t\t| \"startPendingRecovery\"\n\t\t| \"startPendingRecoveryRestore\"\n\t\t| \"release\"\n\t\t| \"setToolDetachment\"\n\t\t| \"takeDetachedToolCalls\"\n\t\t| \"hasPendingDetachedTurn\"\n\t\t| \"isWaitingOnDetachedResults\"\n\t\t| \"redispatchDetachedToolCalls\"\n\t\t| \"resumeDetachedTurn\"\n\t\t| \"refreshCurrentModelFromRegistry\"\n\t\t| \"reload\"\n\t\t| \"completeStartupResources\"\n\t\t| \"abortRetry\"\n\t\t| \"setAutoRetryEnabled\"\n\t\t| \"executeBash\"\n\t\t| \"recordBashResult\"\n\t\t| \"abortBash\"\n\t\t| \"setSessionName\"\n\t\t| \"navigateTree\"\n\t\t| \"getUserMessagesForForking\"\n\t\t| \"getSessionStats\"\n\t\t| \"getContextUsage\"\n\t\t| \"refreshContext\"\n\t\t| \"exportToHtml\"\n\t\t| \"exportToJsonl\"\n\t\t| \"getLastAssistantText\"\n\t\t| \"createReplacedSessionContext\"\n\t\t| \"hasExtensionHandlers\"\n\t\t| \"getPersistenceFailure\"\n\t\t| \"getUnsavedInput\"\n\t\t| \"discardUnsavedInput\"\n\t> {\n\treadonly agent: Agent;\n\treadonly sessionManager: SessionManager;\n\treadonly settingsManager: SettingsManager;\n}\n\nexport interface AgentSessionInternalSurface extends AgentSessionMethodSurface, AgentSessionPublicSurface {\n\t_scopedModels: Array<{ model: Model<Api>; thinkingLevel?: ThinkingLevel }>;\n\t_fallbackModels: string[];\n\t_isFallbackModelAllowed?: (model: Model<Api>, effort: string | undefined) => boolean;\n\t_fallbackAttemptedKeys: Set<string>;\n\t_fallbackBlockedModels: Array<Model<Api>>;\n\t_fallbackBlockedProviders: Set<string>;\n\t_fallbackOriginModel: Model<Api> | undefined;\n\t_fallbackOriginThinkingLevel: ThinkingLevel | undefined;\n\t_fallbackScopeGeneration: number;\n\t_fallbackOriginGeneration: number | undefined;\n\t_fallbackRestoreError: string | undefined;\n\n\t_unsubscribeAgent?: () => void;\n\t_eventListeners: AgentSessionEventListener[];\n\t_agentEventQueue: Promise<void>;\n\t_steeringMessages: string[];\n\t_followUpMessages: string[];\n\t_interruptDeliveryQueue: Promise<void>;\n\t_pendingPostCompactionContinuation: Promise<void> | undefined;\n\t_postCompactionContinuationToken: number;\n\t_lengthContinuationAttempts: number;\n\t_outputBudgetErrorContinuationAttempts: number;\n\t_postToolCompactionPreflightError: string | undefined;\n\t_pendingPostToolCompactionGuard: PendingPostToolCompactionGuard | undefined;\n\t/** Set once a compaction boundary gave this restricted agent the `session_history` tool. */\n\t_sessionHistoryToolEnabled: boolean;\n\t_terminatingToolCallIds: Set<string>;\n\t_stopAfterTurnBlockedContinuation: boolean;\n\t/** The current turn was ended by {@link interruptTurn}: a child's message admission stays open after it. */\n\t_turnInterruptedByUser: boolean;\n\t_abortPreparedRunAtStart: boolean;\n\t_startAbortedForInterrupt: boolean;\n\t_awaitingStartAfterInterrupt: boolean;\n\t_undeliveredAgentStarts: number;\n\t/** A child whose turn the user interrupted waits here: the next message it receives starts its next turn. */\n\t_awaitingMessageAfterInterrupt: boolean;\n\t/** A `pauseTurn` holds the queue: settles once its run did, and the user's continue releases the hold. */\n\t_turnPause: TurnPause | undefined;\n\t/** The release of a `pauseTurn` hold under way, which every next message waits for. */\n\t_turnPauseRelease: Promise<void> | undefined;\n\t_pendingInterruptDeliveries: number;\n\t_priorityInterruptPending: boolean;\n\t_activePromptCount: number;\n\t_isPreparingRun: false | \"user\" | \"custom\";\n\t_promptPreflightCount: number;\n\t_agentRunAbortRequested: boolean;\n\t_cacheWarmer?: import(\"./cache-warmer.ts\").CacheWarmer;\n\t_activeInterruptQueueHold: InterruptQueueHold | undefined;\n\t_queuedMessagesPaused: boolean;\n\t_queuedMessagesPauseAbortBoundary: Promise<void> | undefined;\n\t_admittedQueuedMessageAwaitingReply: string | undefined;\n\t_admittedRecoveryTurn: Promise<void> | undefined;\n\t_activeInterruptAbortMessage: string | undefined;\n\t_pendingNextTurnMessages: CustomMessage[];\n\t_pendingCustomMessages: CustomMessage[];\n\t_protectedStreamingCustomMessages: Array<{\n\t\tmessage: CustomMessage;\n\t\tdelivery: \"steer\" | \"followUp\";\n\t\tphase: \"queued\" | \"consumed-unpersisted\" | \"persistence-failed\";\n\t}>;\n\t_compactionAbortController: AbortController | undefined;\n\t_manualCompactionPromise: Promise<VerbatimCompactionResult> | undefined;\n\t_autoCompactionAbortController: AbortController | undefined;\n\t/** Stops the compactor request of the running compaction, which then clears the context instead. */\n\t_compactorAbortController: AbortController | undefined;\n\t_autoCompactionCompletion: Promise<void> | undefined;\n\t_compactionReason: import(\"./agent-session-types.js\").CompactionReason | undefined;\n\t_compactionStartedAt: number | undefined;\n\t_overflowRecoveryAttempted: boolean;\n\t_recoverableLengthRecoveryAttempted: boolean;\n\t_contextOverflowUnresolved: boolean;\n\t_branchSummaryAbortController: AbortController | undefined;\n\t_branchSummaryCompletion: Promise<void> | undefined;\n\t_retryAbortController: AbortController | undefined;\n\t_retryAttempt: number;\n\t_retryStatus?: import(\"./session-retry-status.js\").SessionRetryStatus;\n\t_turnStartedAt?: number;\n\t_longStreamCutRetries: number;\n\t_retryPromise: Promise<void> | undefined;\n\t_retryResolve: (() => void) | undefined;\n\t_retryGeneration: number;\n\t_agentRunRetryGeneration: number;\n\t_bashAbortControllers: Map<string | symbol, Set<AbortController>>;\n\t_pendingBashMessages: BashExecutionMessage[];\n\t_runOnlyBashMessages?: WeakSet<object>;\n\t_extensionRunner: ExtensionRunner;\n\t_turnIndex: number;\n\treadonly _entryIdsByMessage: WeakMap<object, string>;\n\treadonly _boundaryDispatchedMessages: WeakSet<object>;\n\treadonly _messagesAwaitingPersistence: WeakMap<object, Promise<void>>;\n\t_transcriptAppend: { message: AgentMessage; previousLeaf: string | null; owner?: object } | undefined;\n\treadonly _messagesWithFailedPersistence: WeakSet<object>;\n\t_persistenceFailure: string | undefined;\n\t_turnStopReason: string | undefined;\n\t_worktreeSnapshots: import(\"./session-worktree-snapshots.ts\").SessionWorktreeSnapshotRecorder;\n\treadonly _reissuedToolCallIds: Set<string>;\n\t_lastAssistantToolResults: AgentMessage[];\n\t_lastActivityOutcome: AgentActivityOutcome;\n\t_isBeforeSettle: boolean;\n\t_abortDuringBeforeSettle: boolean;\n\t_isEmittingAgentSettled: boolean;\n\treadonly _deferredSettledActions: Array<() => Promise<void>>;\n\t_callerReplacedNextRequestContext: boolean;\n\t_resourceLoader: ResourceLoader;\n\t_customTools: ToolDefinition[];\n\t_baseToolDefinitions: Map<string, ToolDefinition>;\n\t_cwd: string;\n\t_extensionRunnerRef?: { current?: ExtensionRunner };\n\t_initialActiveToolNames?: string[];\n\t_pendingToolNames: Set<string>;\n\t_restoredToolNames: Set<string>;\n\t_explicitToolDeactivations: Set<string>;\n\t_usesDefaultTools: boolean;\n\t_defaultToolModifiers: string[];\n\t_appliedDefaultTools: Set<string>;\n\t_allowedToolNames?: Set<string>;\n\t_excludedToolNames?: Set<string>;\n\t_allowedTools?: (name: string) => boolean;\n\t_excludedTools?: (name: string) => boolean;\n\t_childSessionOptions?: import(\"./child-session-options.ts\").ChildSessionOptionsResolver;\n\t_storageAgentDir?: string;\n\t_baseToolsOverride?: Record<string, AgentTool>;\n\t_sessionStartEvent: SessionStartEvent;\n\t_workspace?: import(\"./workspace/resolve.ts\").BoundWorkspace;\n\t_subagentPolicy?: import(\"./extensions/index.js\").SubagentChildPolicy;\n\t_intercomPolicy?: import(\"./intercom-policy.ts\").SessionIntercomPolicy;\n\t_subagentMessageAdmission?: import(\"./message-admission.js\").MessageAdmissionBoundary;\n\t_extensionUIContext?: ExtensionUIContext;\n\t_extensionHumanInput?: import(\"./extensions/host-input.js\").HostInput | null;\n\t_extensionDiagnosticListener?: (diagnostic: import(\"./extensions/host-input.js\").HostDiagnostic) => void;\n\t_extensionMode: ExtensionMode;\n\t_disposed: boolean;\n\t_close(event: import(\"./extensions/types.ts\").SessionShutdownEvent, beforeInvalidate?: () => void): Promise<void>;\n\t_sessionSummaryAbortController: AbortController | undefined;\n\t_sessionSummaryToken: number;\n\t_sessionSummaryRun: import(\"./agent-session-summary.ts\").SessionSummaryRun | undefined;\n\t_lastSummarizedMessageId: string | undefined;\n\t_extensionCommandContextActions?: ExtensionCommandContextActions;\n\t_extensionShutdownHandler?: () => void;\n\t_extensionErrorListener?: ExtensionErrorListener;\n\t_extensionErrorUnsubscriber?: () => void;\n\t_modelRuntime: ModelRuntime;\n\t_extensionProviderIds: Set<string>;\n\t_toolRegistry: Map<string, AgentTool>;\n\t_toolExecutionScheduler: ToolExecutionScheduler;\n\t_outerWorktreeRootMappings: readonly WorktreeRootMapping[];\n\t_worktreeRestoreNotices: readonly string[];\n\t_toolDefinitions: Map<string, ToolDefinitionEntry>;\n\t_toolPromptSnippets: Map<string, string>;\n\t_toolPromptGuidelines: Map<string, string[]>;\n\t_baseSystemPromptOptions: NormalizedBuildSystemPromptOptions;\n\t_systemPromptTransform?: (prompt: string) => string;\n\t_systemPromptSections?: import(\"./sdk-types.ts\").SystemPromptSectionsTransform;\n\t_transformedPromptHead?: import(\"./transformed-system-prompt.ts\").TransformedPrompt;\n\t_contextProjectionTransform?: (messages: AgentMessage[]) => AgentMessage[];\n\t_requestContextProjectionTransform?: (messages: AgentMessage[]) => AgentMessage[];\n\t/** The restored history's last message until the first request after a resume; see `_compactBeforeResumedPrompt`. */\n\t_resumeBudgetCheckpoint?: AgentMessage;\n\t/**\n\t * What the check of `_resumeBudgetCheckpoint` for a run that sends the session's prompt as it is now (a prompt, or a\n\t * run an extension starts) found that prompt to need: its update, or null when the prompt was current. Undefined\n\t * until such a run is checked. A conversation request retires the checkpoint once the transcript it sends holds that\n\t * update, at once when it is null; see `_compactBeforeResumedPrompt`.\n\t */\n\t_resumePromptUpdate?: AgentMessage | null;\n\t/**\n\t * The prompt update a resume needs, as the first check of a run that does not send the session's prompt (an\n\t * interrupt, queued input) found it while one was pending. Until the checkpoint retires, a later turn of such a run\n\t * leaves out what it changes or adds; see `withoutResumeUpdate`.\n\t */\n\t_resumeHeldUpdate?: SystemMessageWithTransformedPrompt;\n\t_runSystemPromptOptions?: NormalizedBuildSystemPromptOptions;\n\t/**\n\t * The prompt sections that the latest sent prompt's `before_agent_start` handlers set, replaced or removed relative\n\t * to the base options, such as the MCP servers' section, for the extensions of `runner` (held weakly, so a reload's\n\t * retired extensions can be collected). A run that starts without a prompt (an interrupt, queued input) keeps them\n\t * as the conversation last had them; see `_currentRunSystemPromptOptions`.\n\t */\n\t_promptSectionNames?: { runner: WeakRef<ExtensionRunner>; names: ReadonlySet<string> };\n\t_lastAssistantMessage: AssistantMessage | undefined;\n\t_tempStorageLease: import(\"./tools/session-temp-dir.ts\").ProtectedPathLease | undefined;\n\t_sessionOpenMarker: (() => Promise<void>) | undefined;\n\t_agentTaskHost: import(\"./tasks/agent-adapter.js\").AgentTaskHost | undefined;\n\t_parentCommandTaskOwner: import(\"./tasks/child-command-owner.js\").ChildCommandTaskOwner | undefined;\n\t_inheritedHistory: import(\"./tools/history-protocol.ts\").ProjectHistory | undefined;\n\t_resourceAdmission: import(\"./sdk-types.ts\").ResourceAdmission | undefined;\n\t_childTaskWaits: import(\"./tasks/child-command-owner.js\").ChildTaskWaits;\n\t_taskCompletionOutbox: import(\"./tasks/completion.js\").TaskCompletionOutbox | undefined;\n\t_taskAdmission: import(\"./message-admission.js\").MessageAdmissionBoundary | undefined;\n\t_historyTasks: import(\"./tools/history-tasks.ts\").HistoryTaskRegistry | undefined;\n}\n"]}
|
|
@@ -248,6 +248,7 @@ declare class AgentSessionBase {
|
|
|
248
248
|
protected _resourceAdmission: import("./sdk-types.ts").ResourceAdmission | undefined;
|
|
249
249
|
protected _childTaskWaits: ChildTaskWaits;
|
|
250
250
|
protected _taskCompletionOutbox: import("./tasks/completion.js").TaskCompletionOutbox | undefined;
|
|
251
|
+
protected _historyTasks: import("./tools/history-tasks.ts").HistoryTaskRegistry | undefined;
|
|
251
252
|
protected _taskAdmission: MessageAdmissionBoundary | undefined;
|
|
252
253
|
protected _cacheWarmer?: import("./cache-warmer.ts").CacheWarmer;
|
|
253
254
|
protected _worktreeSnapshots: SessionWorktreeSnapshotRecorder;
|
|
@@ -51,6 +51,8 @@ export interface CompactorRequest {
|
|
|
51
51
|
readonly stop?: AbortSignal;
|
|
52
52
|
readonly timeoutMs?: number;
|
|
53
53
|
readonly fetchFn?: typeof fetch;
|
|
54
|
+
/** Resolves a host name to its addresses; used only to explain a network failure. */
|
|
55
|
+
readonly resolveHost?: (hostname: string) => Promise<readonly string[]>;
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Send the framed conversation to a compactor endpoint and return its text. Throws {@link CompactorFailure} (a
|
package/dist/core/debug.impl.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
package/dist/core/debug.js
CHANGED
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { read, skip, stringValue } from "../../_shared/startup-0-5-
|
|
3
|
+
import { read, skip, stringValue } from "../../_shared/startup-0-5-YDW47QX6.js";
|
|
4
4
|
// dist/core/export-html/card-projection.js
|
|
5
5
|
const obj = (v) => v !== null && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
6
6
|
const fields = (shape) => function* (t) {
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -614,7 +614,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
614
614
|
return (async () => {
|
|
615
615
|
const root = new URL("../../", import.meta.url);
|
|
616
616
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
617
|
-
const key = `${root.href}#0.10.
|
|
617
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
618
618
|
let release = releases.get(key);
|
|
619
619
|
if (release === undefined) {
|
|
620
620
|
const current = (async () => {
|
|
@@ -642,7 +642,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
642
642
|
} catch {
|
|
643
643
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
644
644
|
}
|
|
645
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
645
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.11-alpha.1" ? installed : running !== undefined && running.version !== "0.10.11-alpha.1" ? "0.10.11-alpha.1" : undefined;
|
|
646
646
|
if (updatedTo === undefined) throw error;
|
|
647
647
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
648
648
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { messageHeadIn, read, readValue, skip } from "../../_shared/startup-0-5-
|
|
2
|
+
import { messageHeadIn, read, readValue, skip } from "../../_shared/startup-0-5-YDW47QX6.js";
|
|
3
3
|
import { SESSION_HISTORY_CHUNK_BYTES } from "../../_shared/settings-startup-4QCVCI53.js";
|
|
4
4
|
import { jsonSpans, valueAt } from "../../_shared/json-spans-NW7ALLIY.js";
|
|
5
5
|
import { sliced } from "../../_shared/session-data-AHTU7IS6.js";
|
|
@@ -6,7 +6,7 @@ try {
|
|
|
6
6
|
} catch (error) {
|
|
7
7
|
const root = new URL("../../", import.meta.url);
|
|
8
8
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
9
|
-
const key = `${root.href}#0.10.
|
|
9
|
+
const key = `${root.href}#0.10.11-alpha.1`;
|
|
10
10
|
let release = releases.get(key);
|
|
11
11
|
if (release === undefined) {
|
|
12
12
|
const current = (async () => {
|
|
@@ -27,8 +27,8 @@ try {
|
|
|
27
27
|
release = current;
|
|
28
28
|
}
|
|
29
29
|
const running = await release;
|
|
30
|
-
if (running === undefined || running.version === "0.10.
|
|
31
|
-
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.
|
|
30
|
+
if (running === undefined || running.version === "0.10.11-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.11-alpha.1 while this session was running; restart it to keep using session export.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|