@bastani/atomic 0.10.19-alpha.1 → 0.10.20-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 +82 -0
- package/dist/_shared/adapter-open-DXXV6ATH.js +22 -0
- package/dist/_shared/adapter-open-DXXV6ATH.js.map +1 -0
- 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-JXBZ3H27.js +439 -217
- package/dist/_shared/mode-interactive-sdk-JXBZ3H27.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +19 -11
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/mode-shared-2QJSCUM6.js +9 -9
- package/dist/_shared/p0-cli-BB45ZQY6.js +2 -2
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +5 -5
- package/dist/_shared/{sdk-BHX35EPK.js → sdk-5ZFNDXUJ.js} +119 -40
- package/dist/_shared/sdk-5ZFNDXUJ.js.map +1 -0
- package/dist/_shared/session-data-AHTU7IS6.js +5 -4
- package/dist/_shared/session-data-AHTU7IS6.js.map +1 -1
- package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
- package/dist/_shared/settings-startup-HXQLSUWM.js.map +1 -1
- package/dist/_shared/{startup-0-0-4EDVBK5P.js → startup-0-0-FPPQF42L.js} +69 -26
- package/dist/_shared/startup-0-0-FPPQF42L.js.map +1 -0
- package/dist/_shared/{startup-0-1-H5IXVRXQ.js → startup-0-1-Q7GBLBEL.js} +158 -37
- package/dist/_shared/startup-0-1-Q7GBLBEL.js.map +1 -0
- package/dist/_shared/{startup-0-2-YZZOC22D.js → startup-0-2-JNYN24UI.js} +40 -6
- package/dist/_shared/startup-0-2-JNYN24UI.js.map +1 -0
- package/dist/_shared/startup-0-3-DE2NCS6A.js +26 -41
- package/dist/_shared/startup-0-3-DE2NCS6A.js.map +1 -1
- package/dist/_shared/{startup-0-4-ZMJV547D.js → startup-0-4-ZZXFKE55.js} +85 -19
- package/dist/_shared/startup-0-4-ZZXFKE55.js.map +1 -0
- package/dist/_shared/{startup-0-5-HZX3ZPTP.js → startup-0-5-WN2IYA25.js} +112 -15
- package/dist/_shared/startup-0-5-WN2IYA25.js.map +1 -0
- package/dist/_shared/{startup-10-0-TDQNBDDL.js → startup-10-0-O6DAT7U4.js} +65 -117
- package/dist/_shared/startup-10-0-O6DAT7U4.js.map +1 -0
- package/dist/_shared/startup-12-0-55AAXBJZ.js +2 -2
- package/dist/_shared/startup-14-0-MLX36RBG.js +8 -5
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/{startup-15-0-YUKGAC63.js → startup-15-0-E7RYG5YF.js} +8 -8
- package/dist/_shared/{startup-15-0-YUKGAC63.js.map → startup-15-0-E7RYG5YF.js.map} +1 -1
- package/dist/_shared/startup-15-1-WQZBOTMZ.js +73 -28
- package/dist/_shared/startup-15-1-WQZBOTMZ.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +31 -21
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/startup-8-1-QZMXUGHI.js +34 -24
- package/dist/_shared/startup-8-1-QZMXUGHI.js.map +1 -1
- package/dist/_shared/storage-command-7MGXLJGZ.js +9 -5
- package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
- package/dist/_shared/{storage-status-K7PX2RXA.js → storage-status-T6FUXRIM.js} +7 -23
- package/dist/_shared/{storage-status-K7PX2RXA.js.map → storage-status-T6FUXRIM.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/team-DOQKICG2.js +3 -2
- package/dist/_shared/team-DOQKICG2.js.map +1 -1
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/binary-self-update.js +47 -18
- package/dist/binary-self-update.js.map +1 -1
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +15 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/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 +5 -5
- 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 +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.code.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +2 -2
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +2 -2
- 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 +2 -2
- 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 +3 -3
- 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-runtime.d.ts +2 -1
- 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 +44 -41
- package/dist/core/export-html/index.code.js.map +1 -1
- 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/template.js +12 -25
- package/dist/core/export-html/tool-renderer.code.js +1 -1
- 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/context-types.d.ts +3 -0
- package/dist/core/extensions/context-types.js.map +1 -1
- 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.d.ts +1 -0
- package/dist/core/extensions/runner-context.js +17 -1
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runtime-types.d.ts +1 -0
- package/dist/core/extensions/runtime-types.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 +2 -2
- package/dist/core/model-runtime-streaming.d.ts +3 -1
- package/dist/core/model-runtime.d.ts +2 -0
- 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 -3
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.d.ts +4 -0
- package/dist/core/session-manager-core.js +46 -18
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-history.d.ts +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 +2 -2
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/storage/adapter-open.js +3 -0
- package/dist/core/storage/adapter-open.js.map +1 -0
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/prefix.js +1 -0
- package/dist/core/storage/prefix.js.map +1 -1
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +7 -7
- package/dist/core/storage/session/child-reader.code.js.map +1 -1
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- 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 +2 -2
- 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 +5 -4
- package/dist/core/storage/session/fork-window.code.js.map +1 -1
- 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 +3 -3
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +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-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.d.ts +3 -17
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.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 +2 -0
- package/dist/core/storage/session/usage-observations.d.ts +27 -0
- package/dist/core/storage/session/usage-observations.js +3 -0
- package/dist/core/storage/session/usage-observations.js.map +1 -0
- 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.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/subscription-usage-identity.d.ts +9 -0
- package/dist/core/subscription-usage-observations.d.ts +15 -0
- package/dist/core/subscription-usage-storage.js +3 -0
- package/dist/core/subscription-usage-storage.js.map +1 -0
- package/dist/core/subscription-usage.d.ts +20 -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.code.js +1 -1
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.code.js +2 -2
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +3 -3
- 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.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +2 -2
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.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-engine/isolated-runtime.d.ts +1 -0
- package/dist/modes/interactive-engine/protocol.d.ts +4 -0
- package/dist/modes/print-mode.js +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +1 -1
- package/dist/modes/rpc/rpc-types.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/10.js +1 -1
- package/dist/startup-stages/4.js +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/startup-stages/7.js +1 -1
- package/dist/startup-stages/8.js +1 -1
- package/dist/utils/startup-database-spare.code.js +3 -3
- 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/changelog.mdx +31 -3
- package/docs/extensions/api-reference.md +6 -0
- package/docs/getting-started/installation.md +3 -3
- package/docs/guides/subscription-usage.md +28 -82
- package/docs/reference/cli.md +4 -2
- package/docs/rpc/protocol.md +30 -2
- package/docs/sdk/reference.md +26 -1
- package/docs/sessions.md +3 -1
- package/docs/slash-commands.md +1 -1
- package/docs/usage.md +1 -1
- package/package.json +8 -8
- package/dist/_shared/sdk-BHX35EPK.js.map +0 -1
- package/dist/_shared/startup-0-0-4EDVBK5P.js.map +0 -1
- package/dist/_shared/startup-0-1-H5IXVRXQ.js.map +0 -1
- package/dist/_shared/startup-0-2-YZZOC22D.js.map +0 -1
- package/dist/_shared/startup-0-4-ZMJV547D.js.map +0 -1
- package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +0 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +0 -1
package/dist/core/sdk.code.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_shared/rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { withFileMutationQueue } from "../_shared/startup-0-0-
|
|
3
|
-
import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-
|
|
4
|
-
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-
|
|
2
|
+
import { withFileMutationQueue } from "../_shared/startup-0-0-FPPQF42L.js";
|
|
3
|
+
import { isPowerShellToolResult, withResourceAdmission } from "../_shared/startup-0-1-Q7GBLBEL.js";
|
|
4
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputCapture, createStructuredOutputTool, getPowerShellConfig } from "../_shared/startup-0-2-JNYN24UI.js";
|
|
5
5
|
import { BASH_SHELL_PRESENTATION, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createWriteTool } from "../_shared/startup-8-1-QZMXUGHI.js";
|
|
6
6
|
import { AgentSessionRuntime, HOST_STARTED_SESSION, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createUnstartedAgentSession } from "../_shared/startup-15-1-WQZBOTMZ.js";
|
|
7
7
|
export { AgentSessionRuntime, BASH_SHELL_PRESENTATION, HOST_STARTED_SESSION, STRUCTURED_OUTPUT_TOOL_NAME, SessionImportFileNotFoundError, createAgentSession, createAgentSessionFromServices, createAgentSessionRuntime, createAgentSessionServices, createBashTool, createCodingTools, createEditTool, createFindTool, createKillTool, createLocalPowerShellOperations, createLsTool, createPowerShellTool, createPowerShellToolDefinition, createReadOnlyTools, createReadTool, createSearchTool, createStructuredOutputCapture, createStructuredOutputTool, createUnstartedAgentSession, createWriteTool, getPowerShellConfig, isPowerShellToolResult, withFileMutationQueue, withResourceAdmission };
|
package/dist/core/sdk.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.20-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.20-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-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/sdk.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.20-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.20-alpha.1") throw error;
|
|
31
|
+
throw new Error((typeof running.name === "string" ? running.name : "atomic") + " was updated to 0.10.20-alpha.1 while this session was running; restart it to keep using this feature.", {
|
|
32
32
|
cause: error,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -57,6 +57,7 @@ export declare class SessionManager {
|
|
|
57
57
|
private projectedEdits;
|
|
58
58
|
private leafId;
|
|
59
59
|
private historyIndex;
|
|
60
|
+
private warnedHistoryLinksFor;
|
|
60
61
|
private historyStartSeq;
|
|
61
62
|
private answerWindowStart;
|
|
62
63
|
private branchSettingsVouchedFrom;
|
|
@@ -93,6 +94,7 @@ export declare class SessionManager {
|
|
|
93
94
|
private runMutation;
|
|
94
95
|
private recordHeader;
|
|
95
96
|
private restore;
|
|
97
|
+
private warnHistoryLinks;
|
|
96
98
|
private restoreOpened;
|
|
97
99
|
private restoreHistory;
|
|
98
100
|
hasFullHistory(): boolean;
|
|
@@ -376,6 +378,8 @@ export declare class SessionManager {
|
|
|
376
378
|
/** A label, summary anchor or boundary pointer names an entry; it does not read that entry's body. */
|
|
377
379
|
private requireEntryExists;
|
|
378
380
|
private requireEntry;
|
|
381
|
+
/** @internal The effective parent for a "before this entry" navigation or fork, even off the held branch. */
|
|
382
|
+
readParentId(entry: SessionEntry): Promise<string | null>;
|
|
379
383
|
getLeafId(): string | null;
|
|
380
384
|
getLeafEntry(): SessionEntry | undefined;
|
|
381
385
|
getEntry(id: string): SessionEntry | undefined;
|
|
@@ -5,8 +5,8 @@ import { isProxy } from "node:util/types";
|
|
|
5
5
|
import { getCurrentSystemMessage } from "@bastani/atomic-ai";
|
|
6
6
|
import { recordsStrictToolLimits } from "@bastani/atomic-ai/api/strict-tool-limits";
|
|
7
7
|
import { createSessionCwdMatcherAsync, getAgentDir, normalizePath, pathsEqual, resolvePath } from "../_shared/p0-cli-BB45ZQY6.js";
|
|
8
|
-
import { SessionAppendRecovery, TOOL_DEACTIVATION_ENTRY_TYPE, chatEpoch, classifiedWorkflowMetadata, findMostRecentResumable, forkScope, forkStoreRelation, getDefaultSessionDirPath, postgresAppendRetryableFailure, storedRows, yieldToEventLoop } from "../_shared/startup-0-0-
|
|
9
|
-
import { ChildCatalog, SessionKeyDigests, TOOL_OUTPUT_ENTRY_TYPE, WorkspaceConfigError, assertSessionBlobStore, carriedTransformedPrompt, carryCompletionEvidence, convertToLlm, copySessionBlobs, sessionBlobHashes, shareCompletionEvidence, storeInlineToolOutputs, storeSessionBlobs, takeInlineToolOutput, takeInlineToolOutputEntry, writeChunksAtomically } from "../_shared/startup-0-1-
|
|
8
|
+
import { SessionAppendRecovery, TOOL_DEACTIVATION_ENTRY_TYPE, chatEpoch, classifiedWorkflowMetadata, findMostRecentResumable, forkScope, forkStoreRelation, getDefaultSessionDirPath, hasDamagedHistoryLinks, isEarlierSessionEntry, parentIdInEarlierRows, postgresAppendRetryableFailure, storedRows, warnDamagedHistoryLinks, yieldToEventLoop } from "../_shared/startup-0-0-FPPQF42L.js";
|
|
9
|
+
import { ChildCatalog, SessionKeyDigests, TOOL_OUTPUT_ENTRY_TYPE, WorkspaceConfigError, assertSessionBlobStore, carriedTransformedPrompt, carryCompletionEvidence, convertToLlm, copySessionBlobs, sessionBlobHashes, shareCompletionEvidence, storeInlineToolOutputs, storeSessionBlobs, takeInlineToolOutput, takeInlineToolOutputEntry, writeChunksAtomically } from "../_shared/startup-0-1-Q7GBLBEL.js";
|
|
10
10
|
import { LEAF_MOVE_ENTRY_TYPE, applyContextEdit, assertSessionNotOpenElsewhere, buildContextEntries, buildSessionIndex, buildSessionProjection, buildSessionTree, collectContextEdits, getBranchPath, getLatestCompactionBoundaryEntry, holdSessionOpenMarker, isLeafMoveEntry } from "../_shared/startup-0-3-DE2NCS6A.js";
|
|
11
11
|
import { SessionConflictError, SessionFormatVersionError, SessionIdMismatchError, SessionNotFoundError, StorageUnavailableError } from "./storage/session/errors.js";
|
|
12
12
|
import { EMPTY_SESSION_HISTORY_TOTALS, JsonlSessionStore, MemorySessionStore, addEntryToHistoryTotals, appendFailureWroteNothing, archivedAnswerAt, assertValidSessionId, bindSessionFile, createBranchSummaryEntry, createCompactionEntry, createContextEditEntry, createCustomEntry, createCustomMessageEntry, createLabelEntry, createMessageEntry, createModelChangeEntry, createSessionFilePath, createSessionHeader, createSessionId, createSessionInfoEntry, createSessionSummaryEntry, createThinkingLevelChangeEntry, createWorktreeSnapshotEntry, earlierTranscriptCursor, findInSessionHistory, findWorktreeSnapshotRecords, firstHistoryCursor, generateId, getEntriesWithoutHeader, getLatestSessionName, historyChunks, historyPages, isExtensionCustomState, lastBranchAnswer, markPrivateMemorySessionStore, readSessionRange, recoveryWitnessesOf, savedWindowAnswer, sessionResumeOf, storeSnapshotIndex, updateWorkflowStarts, validateSessionEntryStructure, validateSessionFileEntries, withForkFileWindow, witnessedIn, worktreeSnapshotPages } from "../_shared/startup-8-0-34CBHPZH.js";
|
|
@@ -14,7 +14,7 @@ import { SESSION_HISTORY_SCAN_ENTRIES, SessionDeletedError, SessionEntryError }
|
|
|
14
14
|
import { listProjectSessions, resolveParentSessionPaths } from "../_shared/session-manager-list-2BLEEZVG.js";
|
|
15
15
|
import { adoptInlineSnapshotBlobs, deleteSessionWithSnapshotRefs } from "../_shared/startup-8-1-QZMXUGHI.js";
|
|
16
16
|
import { SessionBlobError, StorageRollbackError, isStorageTransientError } from "./storage/errors.js";
|
|
17
|
-
import "../_shared/startup-0-2-
|
|
17
|
+
import "../_shared/startup-0-2-JNYN24UI.js";
|
|
18
18
|
// dist/core/fork-context-path.js
|
|
19
19
|
const forkSettings = /* @__PURE__ */ new Set([
|
|
20
20
|
"workspace_binding",
|
|
@@ -96,7 +96,7 @@ async function includeNamedForkOutputs(entries, store, sessionId, leaf, epoch, t
|
|
|
96
96
|
wanted.delete(links.hash);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
if (ancestor) next = links
|
|
99
|
+
if (ancestor) next = parentIdInEarlierRows(links);
|
|
100
100
|
if (!wanted.size || !next && scope === "branch") break search;
|
|
101
101
|
}
|
|
102
102
|
if (!found.length) return entries;
|
|
@@ -270,6 +270,10 @@ function within(parent, child) {
|
|
|
270
270
|
var SessionHistoryIndex = class {
|
|
271
271
|
view;
|
|
272
272
|
scan;
|
|
273
|
+
positions;
|
|
274
|
+
constructor(positions) {
|
|
275
|
+
this.positions = positions;
|
|
276
|
+
}
|
|
273
277
|
/** The branch from the root to `leafId`, which the caller must not change. */
|
|
274
278
|
branch(leafId, byId, links) {
|
|
275
279
|
return this.viewOf(leafId, byId, links).path;
|
|
@@ -277,7 +281,7 @@ var SessionHistoryIndex = class {
|
|
|
277
281
|
/** Extends the cached branch when `entry` was appended at its leaf; anything else drops it. */
|
|
278
282
|
appended(entry, byId) {
|
|
279
283
|
const view = this.view;
|
|
280
|
-
if (view === void 0 || view.byId !== byId || view.leafId !== entry.parentId) {
|
|
284
|
+
if (view === void 0 || view.byId !== byId || view.leafId !== entry.parentId || entry.parentId !== null && !isEarlierSessionEntry(this.positions().get(entry.parentId), this.positions().get(entry.id))) {
|
|
281
285
|
this.view = void 0;
|
|
282
286
|
return;
|
|
283
287
|
}
|
|
@@ -344,7 +348,7 @@ var SessionHistoryIndex = class {
|
|
|
344
348
|
byId,
|
|
345
349
|
links,
|
|
346
350
|
leafId,
|
|
347
|
-
path: getBranchPath(leafId, byId, links),
|
|
351
|
+
path: getBranchPath(leafId, byId, links, this.positions()),
|
|
348
352
|
mappings: void 0,
|
|
349
353
|
continuations: void 0,
|
|
350
354
|
snapshots: void 0
|
|
@@ -731,7 +735,8 @@ var SessionManager = class SessionManager {
|
|
|
731
735
|
/** Whether a retained row at this leaf differs between the transcript and model projections. */
|
|
732
736
|
projectedEdits;
|
|
733
737
|
leafId = null;
|
|
734
|
-
historyIndex = new SessionHistoryIndex();
|
|
738
|
+
historyIndex = new SessionHistoryIndex(() => this.entrySeqs);
|
|
739
|
+
warnedHistoryLinksFor;
|
|
735
740
|
historyStartSeq = 1;
|
|
736
741
|
answerWindowStart = 1;
|
|
737
742
|
branchSettingsVouchedFrom = {
|
|
@@ -799,6 +804,12 @@ var SessionManager = class SessionManager {
|
|
|
799
804
|
restore(snapshot, location) {
|
|
800
805
|
this.restoreHistory(snapshot.header, snapshot.entries, snapshot.lastSeq, location);
|
|
801
806
|
this.historyEpoch = snapshot.epoch;
|
|
807
|
+
if (hasDamagedHistoryLinks(snapshot.entries, this.entrySeqs)) this.warnHistoryLinks();
|
|
808
|
+
}
|
|
809
|
+
warnHistoryLinks() {
|
|
810
|
+
if (this.warnedHistoryLinksFor === this.sessionId) return;
|
|
811
|
+
this.warnedHistoryLinksFor = this.sessionId;
|
|
812
|
+
warnDamagedHistoryLinks(this.sessionId);
|
|
802
813
|
}
|
|
803
814
|
restoreOpened(opened, location) {
|
|
804
815
|
if ("snapshot" in opened) {
|
|
@@ -838,6 +849,7 @@ var SessionManager = class SessionManager {
|
|
|
838
849
|
thinkingLevel: vouchedFromForResumeAxis("thinking_level_change", resume.retainedSettings?.thinkingLevel, path, resume.leafId, this.hasFullHistory(), resume.lastSeq, tailFrom)
|
|
839
850
|
};
|
|
840
851
|
Object.assign(this.byId, { preferFullIds: !this.hasFullHistory() });
|
|
852
|
+
if (resume.damagedHistoryLinks) this.warnHistoryLinks();
|
|
841
853
|
}
|
|
842
854
|
restoreHistory(header, entries, lastSeq, location, partial) {
|
|
843
855
|
this.childArchive = new ChildCatalog();
|
|
@@ -845,6 +857,7 @@ var SessionManager = class SessionManager {
|
|
|
845
857
|
type: "session",
|
|
846
858
|
...header
|
|
847
859
|
}, ...entries];
|
|
860
|
+
if (this.sessionId !== header.id) this.warnedHistoryLinksFor = void 0;
|
|
848
861
|
this.sessionId = header.id;
|
|
849
862
|
this.lastSeq = lastSeq;
|
|
850
863
|
this.deletedFromStore = false;
|
|
@@ -1301,7 +1314,7 @@ var SessionManager = class SessionManager {
|
|
|
1301
1314
|
});
|
|
1302
1315
|
}
|
|
1303
1316
|
_buildIndex() {
|
|
1304
|
-
this.historyIndex = new SessionHistoryIndex();
|
|
1317
|
+
this.historyIndex = new SessionHistoryIndex(() => this.entrySeqs);
|
|
1305
1318
|
validateSessionFileEntries(this.fileEntries, this.sessionFile ?? "in-memory session");
|
|
1306
1319
|
const index = buildSessionIndex(this.fileEntries);
|
|
1307
1320
|
this.byId = index.byId;
|
|
@@ -1480,7 +1493,8 @@ var SessionManager = class SessionManager {
|
|
|
1480
1493
|
if (this.appendHalt !== void 0) throw this.appendHalt;
|
|
1481
1494
|
if (this.deletedFromStore) {
|
|
1482
1495
|
if (target) this.restoreOpened({ resume: target }, this.sessionFile);
|
|
1483
|
-
|
|
1496
|
+
const previous = this.lastEntryId === null ? void 0 : this.entrySeqs.get(this.lastEntryId);
|
|
1497
|
+
return this.applyAppended(entries, previous ?? this.lastSeq);
|
|
1484
1498
|
}
|
|
1485
1499
|
const recovery = this.store.descriptor.adapter === "postgres" ? new SessionAppendRecovery(this.liveAppendRecovery) : void 0;
|
|
1486
1500
|
this.pendingAppendRecovery = recovery;
|
|
@@ -1525,11 +1539,12 @@ var SessionManager = class SessionManager {
|
|
|
1525
1539
|
recovery?.finish(saved);
|
|
1526
1540
|
}
|
|
1527
1541
|
}
|
|
1528
|
-
applyAppended(entries) {
|
|
1542
|
+
applyAppended(entries, after = this.lastSeq - entries.length) {
|
|
1529
1543
|
for (const [position, entry] of entries.entries()) {
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
this.
|
|
1544
|
+
const seq = after + position + 1;
|
|
1545
|
+
this.entrySeqs.set(entry.id, seq);
|
|
1546
|
+
updateWorkflowStarts(this.workflowStarts, entry, seq);
|
|
1547
|
+
this.childArchive.noteResident(entry, seq);
|
|
1533
1548
|
this.lastEntryId = entry.id;
|
|
1534
1549
|
this.fileEntries.push(entry);
|
|
1535
1550
|
this.byId.set(entry.id, entry);
|
|
@@ -2121,6 +2136,13 @@ var SessionManager = class SessionManager {
|
|
|
2121
2136
|
if (entry === void 0) throw new SessionEntryError(id, "missing");
|
|
2122
2137
|
return entry;
|
|
2123
2138
|
}
|
|
2139
|
+
/** @internal The effective parent for a "before this entry" navigation or fork, even off the held branch. */
|
|
2140
|
+
async readParentId(entry) {
|
|
2141
|
+
const parentId = parentIdInEarlierRows(entry);
|
|
2142
|
+
if (parentId === null) return null;
|
|
2143
|
+
const [parent, child] = await Promise.all([this.findEntrySeq(parentId), this.findEntrySeq(entry.id)]);
|
|
2144
|
+
return child !== void 0 && isEarlierSessionEntry(parent, child) ? parentId : null;
|
|
2145
|
+
}
|
|
2124
2146
|
getLeafId() {
|
|
2125
2147
|
return this.leafId;
|
|
2126
2148
|
}
|
|
@@ -2133,7 +2155,8 @@ var SessionManager = class SessionManager {
|
|
|
2133
2155
|
/** Get all direct children of an entry. Like `getTree()`, omits recorded leaf moves. */
|
|
2134
2156
|
getChildren(parentId) {
|
|
2135
2157
|
const children = [];
|
|
2136
|
-
|
|
2158
|
+
const parentSeq = this.entrySeqs.get(parentId);
|
|
2159
|
+
for (const entry of this.byId.values()) if (entry.parentId === parentId && isEarlierSessionEntry(parentSeq, this.entrySeqs.get(entry.id)) && !isLeafMoveEntry(entry)) children.push(entry);
|
|
2137
2160
|
return children;
|
|
2138
2161
|
}
|
|
2139
2162
|
/** Get the label for an entry, if any. */
|
|
@@ -2162,7 +2185,7 @@ var SessionManager = class SessionManager {
|
|
|
2162
2185
|
/** Walk from entry to root, returning all entries in path order. */
|
|
2163
2186
|
getBranch(fromId) {
|
|
2164
2187
|
const leafId = fromId ?? this.leafId;
|
|
2165
|
-
return leafId === this.leafId ? this.historyIndex.branch(leafId, this.byId, this.branchLinks).slice() : getBranchPath(leafId, this.byId, this.branchLinks);
|
|
2188
|
+
return leafId === this.leafId ? this.historyIndex.branch(leafId, this.byId, this.branchLinks).slice() : getBranchPath(leafId, this.byId, this.branchLinks, this.entrySeqs);
|
|
2166
2189
|
}
|
|
2167
2190
|
/** Return the active branch entries after applying the latest compaction boundary. */
|
|
2168
2191
|
buildContextEntries() {
|
|
@@ -2697,8 +2720,13 @@ var SessionManager = class SessionManager {
|
|
|
2697
2720
|
if (!header) throw new Error("Session header is missing");
|
|
2698
2721
|
const links = this.branchLinks;
|
|
2699
2722
|
const path = this.getBranch().map((entry) => {
|
|
2723
|
+
const rawParent = entry.parentId === null ? void 0 : this.entrySeqs.get(entry.parentId);
|
|
2724
|
+
if (rawParent !== void 0 && !isEarlierSessionEntry(rawParent, this.entrySeqs.get(entry.id))) return {
|
|
2725
|
+
...entry,
|
|
2726
|
+
parentId: null
|
|
2727
|
+
};
|
|
2700
2728
|
const parent = links?.get(entry.id);
|
|
2701
|
-
return parent &&
|
|
2729
|
+
return parent && rawParent === void 0 ? {
|
|
2702
2730
|
...entry,
|
|
2703
2731
|
parentId: parent
|
|
2704
2732
|
} : entry;
|
|
@@ -2878,7 +2906,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
2878
2906
|
return (async () => {
|
|
2879
2907
|
const root = new URL("../", import.meta.url);
|
|
2880
2908
|
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
2881
|
-
const key = `${root.href}#0.10.
|
|
2909
|
+
const key = `${root.href}#0.10.20-alpha.1`;
|
|
2882
2910
|
let release = releases.get(key);
|
|
2883
2911
|
if (release === undefined) {
|
|
2884
2912
|
const current = (async () => {
|
|
@@ -2906,7 +2934,7 @@ function __atomicOnDemandFailed(error, feature) {
|
|
|
2906
2934
|
} catch {
|
|
2907
2935
|
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
2908
2936
|
}
|
|
2909
|
-
const updatedTo = typeof installed === "string" && installed !== "0.10.
|
|
2937
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.20-alpha.1" ? installed : running !== undefined && running.version !== "0.10.20-alpha.1" ? "0.10.20-alpha.1" : undefined;
|
|
2910
2938
|
if (updatedTo === undefined) throw error;
|
|
2911
2939
|
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
2912
2940
|
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|