@bastani/atomic 0.10.4 → 0.10.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/_shared/compile-cache-warmup-host-RU5L7I7A.js +1 -1
- package/dist/_shared/dist-KOELCESV.js +48 -3
- package/dist/_shared/fork-row-index-UAUAQRD5.js +47 -2
- package/dist/_shared/http-YFAPTIZD.js +16 -4
- package/dist/_shared/http-YFAPTIZD.js.map +1 -1
- package/dist/_shared/lib-4PES5P4V.js +59 -14
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +1706 -258
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +317 -64
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
- package/dist/_shared/{mode-shared-HP7GUA7J.js → mode-shared-2QJSCUM6.js} +432 -81
- package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js +3482 -0
- package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -0
- package/dist/_shared/p0-cli-GUFK7TPN.js +2 -2838
- package/dist/_shared/p0-cli-GUFK7TPN.js.map +1 -1
- package/dist/_shared/{p1a-prewarm-YK3KDTLN.js → p1a-prewarm-UQY3X2UK.js} +270 -73
- package/dist/_shared/p1a-prewarm-UQY3X2UK.js.map +1 -0
- package/dist/_shared/{p1b-elig-PXQA2FYP.js → p1b-elig-ENCUPKKJ.js} +190 -121
- package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -0
- package/dist/_shared/p2-common-YLSYXMDQ.js +1 -3
- package/dist/_shared/p2-common-YLSYXMDQ.js.map +1 -1
- package/dist/_shared/p2-shell-TJBYQMCJ.js +1 -1
- package/dist/_shared/p2-shell-main-B2WIALFD.js +500 -127
- package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
- package/dist/_shared/runtime-O4KCSG4C.js +4 -4
- package/dist/_shared/sdk-WQIOHVKO.js +56 -11
- package/dist/_shared/session-data-AHTU7IS6.js +48 -3
- package/dist/_shared/session-manager-list-2BLEEZVG.js +2 -2
- package/dist/_shared/settings-startup-65YEWRV2.js.map +1 -1
- package/dist/_shared/sql-session-store-5FD3WBMZ.js +57 -12
- package/dist/_shared/{startup-0-0-X4NF3GKM.js → startup-0-0-TYUFUOJZ.js} +519 -316
- package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -0
- package/dist/_shared/{startup-0-1-7QTG6VJZ.js → startup-0-1-D4LGGINF.js} +284 -81
- package/dist/_shared/startup-0-1-D4LGGINF.js.map +1 -0
- package/dist/_shared/{startup-0-2-KFDYPDJK.js → startup-0-2-SZGQIWHI.js} +483 -154
- package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -0
- package/dist/_shared/startup-0-3-T4DVFYWX.js +340 -110
- package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
- package/dist/_shared/startup-0-4-HN5EB4K7.js +261 -59
- package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
- package/dist/_shared/startup-0-5-OHJNE6JH.js +421 -148
- package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
- package/dist/_shared/startup-10-0-TDQNBDDL.js +62 -11
- package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
- package/dist/_shared/startup-12-0-55AAXBJZ.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +12 -11
- package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +53 -158
- package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +231 -46
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +115 -35
- package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
- package/dist/_shared/{startup-8-1-KQJBDKRU.js → startup-8-1-SJW2GMAM.js} +203 -62
- package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -0
- package/dist/_shared/storage-command-7MGXLJGZ.js +55 -10
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +47 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +48 -3
- package/dist/builtin/intercom/CHANGELOG.md +21 -0
- package/dist/builtin/intercom/README.md +0 -1
- package/dist/builtin/intercom/broker/broker-instance.ts +13 -57
- package/dist/builtin/intercom/broker/broker-process.ts +30 -10
- package/dist/builtin/intercom/broker/broker-routing.ts +12 -2
- package/dist/builtin/intercom/broker/broker.bundle.mjs +2557 -498
- package/dist/builtin/intercom/broker/broker.ts +164 -55
- package/dist/builtin/intercom/broker/client.ts +36 -16
- package/dist/builtin/intercom/broker/control.ts +83 -20
- package/dist/builtin/intercom/broker/durable-ended-queue.ts +65 -19
- package/dist/builtin/intercom/broker/host-command-environment.ts +7 -2
- package/dist/builtin/intercom/broker/multinode-router.ts +1675 -387
- package/dist/builtin/intercom/broker/multinode-state-store.ts +10 -0
- package/dist/builtin/intercom/broker/paths.ts +68 -6
- package/dist/builtin/intercom/broker/pending-send-registry.ts +5 -0
- package/dist/builtin/intercom/broker/registration-bounds.ts +38 -0
- package/dist/builtin/intercom/broker/retiring-broker-check.ts +178 -0
- package/dist/builtin/intercom/broker/return-paths.ts +268 -7
- package/dist/builtin/intercom/broker/send-handler.ts +253 -28
- package/dist/builtin/intercom/broker/send-order-gate.ts +410 -0
- package/dist/builtin/intercom/broker/spawn.ts +950 -202
- package/dist/builtin/intercom/broker/sql-lease-store.ts +37 -0
- package/dist/builtin/intercom/broker/sql-outbox-store.ts +7 -0
- package/dist/builtin/intercom/broker/windows-cwd.ts +546 -0
- package/dist/builtin/intercom/index.bundle.mjs +3506 -2328
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/retry-policy.ts +4 -0
- package/dist/builtin/intercom/types.ts +2 -0
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +336 -86
- package/dist/builtin/web-access/index.bundle.mjs +23 -38
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/bun/cli.js +1 -1
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/internal-intercom-broker.js +119 -4
- package/dist/bun/internal-intercom-broker.js.map +1 -1
- package/dist/bun/register-theme-validator.js +6 -0
- package/dist/bun/register-theme-validator.js.map +1 -0
- package/dist/cli/args.js +2 -2
- package/dist/cli/auth-cli.code.js +1102 -0
- package/dist/cli/auth-cli.code.js.map +1 -0
- package/dist/cli/auth-cli.impl.js +30 -1096
- package/dist/cli/auth-cli.impl.js.map +1 -1
- package/dist/cli/auth-cli.js +11 -7
- package/dist/cli/blueprint-command.code.js +906 -0
- package/dist/cli/blueprint-command.code.js.map +1 -0
- package/dist/cli/blueprint-command.impl.js +30 -900
- package/dist/cli/blueprint-command.impl.js.map +1 -1
- package/dist/cli/blueprint-command.js +11 -7
- package/dist/cli/intercom-command.code.js +153 -0
- package/dist/cli/intercom-command.code.js.map +1 -0
- package/dist/cli/intercom-command.impl.js +33 -105
- package/dist/cli/intercom-command.impl.js.map +1 -1
- package/dist/cli/intercom-command.js +11 -7
- package/dist/cli/list-models.code.js +60 -0
- package/dist/cli/list-models.code.js.map +1 -0
- package/dist/cli/list-models.impl.js +33 -57
- package/dist/cli/list-models.impl.js.map +1 -1
- package/dist/cli/list-models.js +11 -7
- package/dist/cli/session-picker.code.js +55 -0
- package/dist/cli/session-picker.code.js.map +1 -0
- package/dist/cli/session-picker.impl.js +33 -52
- package/dist/cli/session-picker.impl.js.map +1 -1
- package/dist/cli/session-picker.js +11 -7
- package/dist/cli/startup-ui.code.js +5 -0
- package/dist/cli/startup-ui.code.js.map +1 -0
- package/dist/cli/startup-ui.impl.js +35 -4
- package/dist/cli/startup-ui.js +11 -7
- package/dist/cli/storage-command.code.js +3 -0
- package/dist/cli/storage-command.code.js.map +1 -0
- package/dist/cli/storage-command.impl.js +35 -2
- package/dist/cli/storage-command.js +11 -7
- package/dist/cli/storage-search-session.code.js +189 -0
- package/dist/cli/storage-search-session.code.js.map +1 -0
- package/dist/cli/storage-search-session.impl.js +33 -186
- package/dist/cli/storage-search-session.impl.js.map +1 -1
- package/dist/cli/storage-search-session.js +11 -7
- package/dist/cli/team-command.code.js +217 -0
- package/dist/cli/team-command.code.js.map +1 -0
- package/dist/cli/team-command.impl.js +32 -213
- package/dist/cli/team-command.impl.js.map +1 -1
- package/dist/cli/team-command.js +11 -7
- package/dist/cli.js +60 -11
- package/dist/cli.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/core/agent-session-methods.d.ts +4 -3
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +5 -0
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/model-resolver.d.ts +1 -1
- package/dist/core/debug.code.js +3 -0
- package/dist/core/debug.code.js.map +1 -0
- package/dist/core/debug.impl.js +35 -2
- package/dist/core/debug.js +11 -7
- package/dist/core/default-model-api-prewarm.d.ts +5 -0
- package/dist/core/export-html/card-projection.code.js +257 -0
- package/dist/core/export-html/card-projection.code.js.map +1 -0
- package/dist/core/export-html/card-projection.impl.js +34 -255
- package/dist/core/export-html/card-projection.impl.js.map +1 -1
- package/dist/core/export-html/card-projection.js +11 -7
- package/dist/core/export-html/index.code.js +655 -0
- package/dist/core/export-html/index.code.js.map +1 -0
- package/dist/core/export-html/index.impl.js +30 -604
- package/dist/core/export-html/index.impl.js.map +1 -1
- package/dist/core/export-html/index.js +11 -7
- package/dist/core/export-html/json-spans.code.js +3 -0
- package/dist/core/export-html/json-spans.code.js.map +1 -0
- package/dist/core/export-html/json-spans.impl.js +35 -2
- package/dist/core/export-html/json-spans.js +11 -7
- package/dist/core/export-html/oversized-render-inputs.code.js +125 -0
- package/dist/core/export-html/oversized-render-inputs.code.js.map +1 -0
- package/dist/core/export-html/oversized-render-inputs.impl.js +31 -120
- package/dist/core/export-html/oversized-render-inputs.impl.js.map +1 -1
- package/dist/core/export-html/oversized-render-inputs.js +11 -7
- package/dist/core/export-html/tool-renderer.code.js +350 -0
- package/dist/core/export-html/tool-renderer.code.js.map +1 -0
- package/dist/core/export-html/tool-renderer.impl.js +33 -347
- package/dist/core/export-html/tool-renderer.impl.js.map +1 -1
- package/dist/core/export-html/tool-renderer.js +11 -7
- package/dist/core/extensions/jiti-loader.code.js +3 -0
- package/dist/core/extensions/jiti-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-loader.impl.js +35 -2
- package/dist/core/extensions/jiti-loader.js +11 -7
- package/dist/core/extensions/jiti-static-loader.code.js +3 -0
- package/dist/core/extensions/jiti-static-loader.code.js.map +1 -0
- package/dist/core/extensions/jiti-static-loader.impl.js +35 -2
- package/dist/core/extensions/jiti-static-loader.js +11 -7
- package/dist/core/extensions/loader-host-modules.code.js +3 -0
- package/dist/core/extensions/loader-host-modules.code.js.map +1 -0
- package/dist/core/extensions/loader-host-modules.impl.js +35 -2
- package/dist/core/extensions/loader-host-modules.js +11 -7
- package/dist/core/extensions/loader-virtual-modules.d.ts +1 -6
- package/dist/core/extensions/loader-virtual-modules.js +1 -1
- package/dist/core/extensions/runner-context.js +3 -3
- package/dist/core/extensions/session-events.d.ts +4 -0
- package/dist/core/extensions/session-events.js.map +1 -1
- package/dist/core/intercom-broker-control-host.code.js +5 -0
- package/dist/core/intercom-broker-control-host.code.js.map +1 -0
- package/dist/core/intercom-broker-control-host.impl.js +35 -4
- package/dist/core/intercom-broker-control-host.js +11 -7
- package/dist/core/intercom-broker-control.code.js +63 -0
- package/dist/core/intercom-broker-control.code.js.map +1 -0
- package/dist/core/intercom-broker-control.d.ts +21 -0
- package/dist/core/intercom-broker-control.impl.js +35 -17
- package/dist/core/intercom-broker-control.impl.js.map +1 -1
- package/dist/core/intercom-broker-control.js +11 -7
- package/dist/core/package-manager-storage-adapters.code.js +3 -0
- package/dist/core/package-manager-storage-adapters.code.js.map +1 -0
- package/dist/core/package-manager-storage-adapters.impl.js +35 -2
- package/dist/core/package-manager-storage-adapters.js +11 -7
- package/dist/core/process-start-token.d.ts +8 -2
- package/dist/core/process-tree-containment.d.ts +27 -0
- package/dist/core/queued-message-delivery.d.ts +5 -2
- package/dist/core/resume/blueprint/process.d.ts +3 -1
- package/dist/core/sdk.code.js +9 -0
- package/dist/core/sdk.code.js.map +1 -0
- package/dist/core/sdk.impl.js +35 -8
- package/dist/core/sdk.js +11 -7
- package/dist/core/session-manager-core.d.ts +15 -5
- package/dist/core/session-manager-core.js +195 -38
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-list.code.js +3 -0
- package/dist/core/session-manager-list.code.js.map +1 -0
- package/dist/core/session-manager-list.impl.js +35 -2
- package/dist/core/session-manager-list.js +11 -7
- package/dist/core/session-manager-types.d.ts +20 -0
- package/dist/core/session-manager.code.js +8 -0
- package/dist/core/session-manager.code.js.map +1 -0
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.impl.js +35 -7
- package/dist/core/session-manager.js +11 -7
- package/dist/core/session-storage.code.js +3 -0
- package/dist/core/session-storage.code.js.map +1 -0
- package/dist/core/session-storage.impl.js +35 -2
- package/dist/core/session-storage.js +11 -7
- package/dist/core/storage/file-identity.d.ts +3 -0
- package/dist/core/storage/file-identity.js +296 -86
- package/dist/core/storage/file-identity.js.map +1 -1
- package/dist/core/storage/index.d.ts +1 -1
- package/dist/core/storage/index.js +52 -7
- package/dist/core/storage/index.js.map +1 -1
- package/dist/core/storage/node-sqlite-thread.js +47 -2
- package/dist/core/storage/node-sqlite.js +49 -4
- package/dist/core/storage/node-sqlite.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.code.js +37 -0
- package/dist/core/storage/offline-snapshot-file.code.js.map +1 -0
- package/dist/core/storage/offline-snapshot-file.impl.js +33 -34
- package/dist/core/storage/offline-snapshot-file.impl.js.map +1 -1
- package/dist/core/storage/offline-snapshot-file.js +11 -7
- package/dist/core/storage/provider.js +52 -7
- package/dist/core/storage/selection.js +49 -4
- package/dist/core/storage/session/branch-fork-source.code.js +146 -0
- package/dist/core/storage/session/branch-fork-source.code.js.map +1 -0
- package/dist/core/storage/session/branch-fork-source.impl.js +32 -97
- package/dist/core/storage/session/branch-fork-source.impl.js.map +1 -1
- package/dist/core/storage/session/branch-fork-source.js +11 -7
- package/dist/core/storage/session/card-view.code.js +60 -0
- package/dist/core/storage/session/card-view.code.js.map +1 -0
- package/dist/core/storage/session/card-view.impl.js +34 -58
- package/dist/core/storage/session/card-view.impl.js.map +1 -1
- package/dist/core/storage/session/card-view.js +11 -7
- package/dist/core/storage/session/child-reader.code.js +139 -0
- package/dist/core/storage/session/child-reader.code.js.map +1 -0
- package/dist/core/storage/session/child-reader.d.ts +1 -0
- package/dist/core/storage/session/child-reader.impl.js +33 -91
- package/dist/core/storage/session/child-reader.impl.js.map +1 -1
- package/dist/core/storage/session/child-reader.js +11 -7
- package/dist/core/storage/session/chunked-resume-projection.code.js +3 -0
- package/dist/core/storage/session/chunked-resume-projection.code.js.map +1 -0
- package/dist/core/storage/session/chunked-resume-projection.impl.js +35 -2
- package/dist/core/storage/session/chunked-resume-projection.js +11 -7
- package/dist/core/storage/session/expanded-child-details.code.js +684 -0
- package/dist/core/storage/session/expanded-child-details.code.js.map +1 -0
- package/dist/core/storage/session/expanded-child-details.impl.js +31 -634
- package/dist/core/storage/session/expanded-child-details.impl.js.map +1 -1
- package/dist/core/storage/session/expanded-child-details.js +11 -7
- package/dist/core/storage/session/fork-row-bytes.code.js +3 -0
- package/dist/core/storage/session/fork-row-bytes.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-bytes.impl.js +35 -2
- package/dist/core/storage/session/fork-row-bytes.js +11 -7
- package/dist/core/storage/session/fork-row-index.code.js +3 -0
- package/dist/core/storage/session/fork-row-index.code.js.map +1 -0
- package/dist/core/storage/session/fork-row-index.impl.js +35 -2
- package/dist/core/storage/session/fork-row-index.js +11 -7
- package/dist/core/storage/session/fork-staging.code.js +580 -0
- package/dist/core/storage/session/fork-staging.code.js.map +1 -0
- package/dist/core/storage/session/fork-staging.impl.js +30 -574
- package/dist/core/storage/session/fork-staging.impl.js.map +1 -1
- package/dist/core/storage/session/fork-staging.js +11 -7
- package/dist/core/storage/session/fork-window.code.js +522 -0
- package/dist/core/storage/session/fork-window.code.js.map +1 -0
- package/dist/core/storage/session/fork-window.impl.js +30 -471
- package/dist/core/storage/session/fork-window.impl.js.map +1 -1
- package/dist/core/storage/session/fork-window.js +11 -7
- package/dist/core/storage/session/history-pages.code.js +3 -0
- package/dist/core/storage/session/history-pages.code.js.map +1 -0
- package/dist/core/storage/session/history-pages.impl.js +35 -2
- package/dist/core/storage/session/history-pages.js +11 -7
- package/dist/core/storage/session/jsonl-entry-projection.code.js +3 -0
- package/dist/core/storage/session/jsonl-entry-projection.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +35 -2
- package/dist/core/storage/session/jsonl-entry-projection.js +11 -7
- package/dist/core/storage/session/jsonl-session-store.code.js +3 -0
- package/dist/core/storage/session/jsonl-session-store.code.js.map +1 -0
- package/dist/core/storage/session/jsonl-session-store.impl.js +35 -2
- package/dist/core/storage/session/jsonl-session-store.js +11 -7
- package/dist/core/storage/session/memory-session-store.code.js +3 -0
- package/dist/core/storage/session/memory-session-store.code.js.map +1 -0
- package/dist/core/storage/session/memory-session-store.impl.js +35 -2
- package/dist/core/storage/session/memory-session-store.js +11 -7
- package/dist/core/storage/session/pinned-branch-resume.code.js +117 -0
- package/dist/core/storage/session/pinned-branch-resume.code.js.map +1 -0
- package/dist/core/storage/session/pinned-branch-resume.impl.js +33 -69
- package/dist/core/storage/session/pinned-branch-resume.impl.js.map +1 -1
- package/dist/core/storage/session/pinned-branch-resume.js +11 -7
- package/dist/core/storage/session/released-history-files.code.js +465 -0
- package/dist/core/storage/session/released-history-files.code.js.map +1 -0
- package/dist/core/storage/session/released-history-files.impl.js +32 -461
- package/dist/core/storage/session/released-history-files.impl.js.map +1 -1
- package/dist/core/storage/session/released-history-files.js +11 -7
- package/dist/core/storage/session/resident-fork-rows.code.js +57 -0
- package/dist/core/storage/session/resident-fork-rows.code.js.map +1 -0
- package/dist/core/storage/session/resident-fork-rows.impl.js +32 -53
- package/dist/core/storage/session/resident-fork-rows.impl.js.map +1 -1
- package/dist/core/storage/session/resident-fork-rows.js +11 -7
- package/dist/core/storage/session/session-resume.code.js +3 -0
- package/dist/core/storage/session/session-resume.code.js.map +1 -0
- package/dist/core/storage/session/session-resume.impl.js +35 -2
- package/dist/core/storage/session/session-resume.js +11 -7
- package/dist/core/storage/session/snapshot-cut.code.js +3 -0
- package/dist/core/storage/session/snapshot-cut.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-cut.impl.js +35 -2
- package/dist/core/storage/session/snapshot-cut.js +11 -7
- package/dist/core/storage/session/snapshot-history.code.js +107 -0
- package/dist/core/storage/session/snapshot-history.code.js.map +1 -0
- package/dist/core/storage/session/snapshot-history.impl.js +34 -60
- package/dist/core/storage/session/snapshot-history.impl.js.map +1 -1
- package/dist/core/storage/session/snapshot-history.js +11 -7
- package/dist/core/storage/session/sql-session-store.code.js +3 -0
- package/dist/core/storage/session/sql-session-store.code.js.map +1 -0
- package/dist/core/storage/session/sql-session-store.impl.js +35 -2
- package/dist/core/storage/session/sql-session-store.js +11 -7
- package/dist/core/storage/session/tree-outline.code.js +3 -0
- package/dist/core/storage/session/tree-outline.code.js.map +1 -0
- package/dist/core/storage/session/tree-outline.impl.js +35 -2
- package/dist/core/storage/session/tree-outline.js +11 -7
- package/dist/core/storage/session/tree-presentation.code.js +342 -0
- package/dist/core/storage/session/tree-presentation.code.js.map +1 -0
- package/dist/core/storage/session/tree-presentation.impl.js +31 -337
- package/dist/core/storage/session/tree-presentation.impl.js.map +1 -1
- package/dist/core/storage/session/tree-presentation.js +11 -7
- package/dist/core/storage/session/types.d.ts +26 -0
- package/dist/core/storage/storage-status.code.js +3 -0
- package/dist/core/storage/storage-status.code.js.map +1 -0
- package/dist/core/storage/storage-status.impl.js +35 -2
- package/dist/core/storage/storage-status.js +11 -7
- package/dist/core/storage/team.code.js +3 -0
- package/dist/core/storage/team.code.js.map +1 -0
- package/dist/core/storage/team.impl.js +35 -2
- package/dist/core/storage/team.js +11 -7
- package/dist/core/structured-output/index.code.js +3 -0
- package/dist/core/structured-output/index.code.js.map +1 -0
- package/dist/core/structured-output/index.impl.js +35 -2
- package/dist/core/structured-output/index.js +11 -7
- package/dist/core/tasks/command-output.d.ts +4 -1
- package/dist/core/tasks/supervisor.d.ts +2 -0
- package/dist/core/tasks/task-completion-entry.code.js +254 -0
- package/dist/core/tasks/task-completion-entry.code.js.map +1 -0
- package/dist/core/tasks/task-completion-entry.impl.js +33 -251
- package/dist/core/tasks/task-completion-entry.impl.js.map +1 -1
- package/dist/core/tasks/task-completion-entry.js +11 -7
- package/dist/core/tasks/task-file-history.code.js +424 -0
- package/dist/core/tasks/task-file-history.code.js.map +1 -0
- package/dist/core/tasks/task-file-history.impl.js +32 -375
- package/dist/core/tasks/task-file-history.impl.js.map +1 -1
- package/dist/core/tasks/task-file-history.js +11 -7
- package/dist/core/tasks/{task-reference-archive.impl.js → task-reference-archive.code.js} +51 -6
- package/dist/core/tasks/{task-reference-archive.impl.js.map → task-reference-archive.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-archive.js +11 -7
- package/dist/core/tasks/{task-reference-identity.impl.js → task-reference-identity.code.js} +1 -1
- package/dist/core/tasks/{task-reference-identity.impl.js.map → task-reference-identity.code.js.map} +1 -1
- package/dist/core/tasks/task-reference-identity.js +11 -7
- package/dist/core/tasks/task-reference-stream.code.js +3 -0
- package/dist/core/tasks/task-reference-stream.code.js.map +1 -0
- package/dist/core/tasks/task-reference-stream.impl.js +35 -2
- package/dist/core/tasks/task-reference-stream.js +11 -7
- package/dist/core/tasks/task-unsaved-answer.code.js +3 -0
- package/dist/core/tasks/task-unsaved-answer.code.js.map +1 -0
- package/dist/core/tasks/task-unsaved-answer.impl.js +35 -2
- package/dist/core/tasks/task-unsaved-answer.js +11 -7
- package/dist/core/tasks/task-view-source.code.js +3 -0
- package/dist/core/tasks/task-view-source.code.js.map +1 -0
- package/dist/core/tasks/task-view-source.d.ts +9 -0
- package/dist/core/tasks/task-view-source.impl.js +35 -2
- package/dist/core/tasks/task-view-source.js +12 -8
- package/dist/core/tools/read-url.code.js +1530 -0
- package/dist/core/tools/read-url.code.js.map +1 -0
- package/dist/core/tools/read-url.impl.js +30 -1524
- package/dist/core/tools/read-url.impl.js.map +1 -1
- package/dist/core/tools/read-url.js +11 -7
- package/dist/core/worktree-snapshot/blob-store.js +50 -5
- package/dist/core/worktree-snapshot/errors.code.js +6 -0
- package/dist/core/worktree-snapshot/errors.code.js.map +1 -0
- package/dist/core/worktree-snapshot/errors.impl.js +35 -5
- package/dist/core/worktree-snapshot/errors.js +11 -7
- package/dist/core/worktree-snapshot/session-index-reset.code.js +136 -0
- package/dist/core/worktree-snapshot/session-index-reset.code.js.map +1 -0
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +34 -134
- package/dist/core/worktree-snapshot/session-index-reset.impl.js.map +1 -1
- package/dist/core/worktree-snapshot/session-index-reset.js +11 -7
- package/dist/extensions/codemode/execute.code.js +618 -0
- package/dist/extensions/codemode/execute.code.js.map +1 -0
- package/dist/extensions/codemode/execute.impl.js +30 -612
- package/dist/extensions/codemode/execute.impl.js.map +1 -1
- package/dist/extensions/codemode/execute.js +11 -7
- package/dist/extensions/codemode/renderer.code.js +110 -0
- package/dist/extensions/codemode/renderer.code.js.map +1 -0
- package/dist/extensions/codemode/renderer.impl.js +33 -107
- package/dist/extensions/codemode/renderer.impl.js.map +1 -1
- package/dist/extensions/codemode/renderer.js +11 -7
- package/dist/extensions/mcp/cli.code.js +565 -0
- package/dist/extensions/mcp/cli.code.js.map +1 -0
- package/dist/extensions/mcp/cli.impl.js +32 -561
- package/dist/extensions/mcp/cli.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.js +11 -7
- package/dist/extensions/mcp/cli.lazy.code.js +52 -0
- package/dist/extensions/mcp/cli.lazy.code.js.map +1 -0
- package/dist/extensions/mcp/cli.lazy.impl.js +36 -7
- package/dist/extensions/mcp/cli.lazy.impl.js.map +1 -1
- package/dist/extensions/mcp/cli.lazy.js +11 -7
- package/dist/extensions/mcp/client/transports/stdio.d.ts +2 -0
- package/dist/extensions/mcp/runtime.code.js +5 -0
- package/dist/extensions/mcp/runtime.code.js.map +1 -0
- package/dist/extensions/mcp/runtime.impl.js +35 -4
- package/dist/extensions/mcp/runtime.js +11 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/main-first-time-setup.code.js +12 -0
- package/dist/main-first-time-setup.code.js.map +1 -0
- package/dist/main-first-time-setup.impl.js +35 -11
- package/dist/main-first-time-setup.impl.js.map +1 -1
- package/dist/main-first-time-setup.js +11 -7
- package/dist/main.d.ts +1 -1
- package/dist/main.js +2 -2
- package/dist/modes/interactive/agent-view/agent-view-switcher.d.ts +6 -1
- package/dist/modes/interactive/agent-view/contracts.d.ts +4 -0
- package/dist/modes/interactive/chat-reader-records.d.ts +1 -1
- package/dist/modes/interactive/components/stored-tree-view.code.js +338 -0
- package/dist/modes/interactive/components/stored-tree-view.code.js.map +1 -0
- package/dist/modes/interactive/components/stored-tree-view.impl.js +33 -290
- package/dist/modes/interactive/components/stored-tree-view.impl.js.map +1 -1
- package/dist/modes/interactive/components/stored-tree-view.js +11 -7
- package/dist/modes/interactive/components/task-selection-state.d.ts +8 -3
- package/dist/modes/interactive/components/task-transcript-page.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js +191 -0
- package/dist/modes/interactive/components/user-message-selector-archive.code.js.map +1 -0
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +34 -189
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector-archive.js +11 -7
- package/dist/modes/interactive/interactive-mode-base.d.ts +6 -0
- package/dist/modes/interactive/interactive-mode.js +1 -1
- package/dist/modes/interactive/interactive-queueing.d.ts +4 -0
- package/dist/modes/interactive/interactive-render-chat.d.ts +22 -0
- package/dist/modes/interactive/interactive-startup.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -1
- package/dist/modes/interactive/startup-shell-eligibility.js +1 -1
- package/dist/modes/interactive/steering-queue-controller.d.ts +4 -0
- package/dist/modes/interactive/theme/theme-schema-factory.d.ts +26 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts +4 -5
- package/dist/modes/interactive-engine/engine-prewarm.d.ts +30 -5
- package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +7 -0
- package/dist/modes/interactive-engine/protocol.d.ts +32 -1
- package/dist/modes/rpc/agent-view-rpc-types.d.ts +12 -1
- package/dist/modes/rpc/agent-view-rpc-types.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +3 -1
- package/dist/modes/rpc/rpc-types.d.ts +12 -0
- package/dist/package-manager-cli.code.js +1140 -0
- package/dist/package-manager-cli.code.js.map +1 -0
- package/dist/package-manager-cli.impl.js +36 -1067
- package/dist/package-manager-cli.impl.js.map +1 -1
- package/dist/package-manager-cli.js +11 -7
- package/dist/rpc-entry.js +2 -2
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/10.js +1 -1
- package/dist/startup-stages/11.js +1 -1
- package/dist/startup-stages/12.js +1 -1
- package/dist/startup-stages/13.js +1 -0
- package/dist/startup-stages/2.js +1 -7
- package/dist/startup-stages/3.js +6 -2
- package/dist/startup-stages/4.js +2 -1
- package/dist/startup-stages/5.js +1 -7
- package/dist/startup-stages/6.js +7 -10
- package/dist/startup-stages/7.js +10 -3
- package/dist/startup-stages/8.js +3 -6
- package/dist/startup-stages/9.js +6 -1
- package/dist/startup-stages/stages.json +1 -1
- package/dist/utils/canonical-path.js +2 -0
- package/dist/utils/canonical-path.js.map +1 -1
- package/dist/utils/child-process.d.ts +41 -1
- package/dist/utils/compile-cache-warmup-host.js +63 -18
- package/dist/utils/compile-cache-warmup-host.js.map +1 -1
- package/dist/utils/credential-redaction.d.ts +50 -1
- package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
- package/dist/utils/interactive-engine-env.d.ts +2 -0
- package/dist/utils/memoize-async.d.ts +32 -0
- package/dist/utils/memoize-async.js +91 -0
- package/dist/utils/memoize-async.js.map +1 -0
- package/dist/utils/photon.js +19 -29
- package/dist/utils/photon.js.map +1 -1
- package/dist/utils/shell.d.ts +7 -4
- package/dist/utils/startup-database-spare.code.js +108 -0
- package/dist/utils/startup-database-spare.code.js.map +1 -0
- package/dist/utils/startup-database-spare.impl.js +33 -105
- package/dist/utils/startup-database-spare.impl.js.map +1 -1
- package/dist/utils/startup-database-spare.js +11 -7
- package/dist/utils/tools-manager.code.js +3 -0
- package/dist/utils/tools-manager.code.js.map +1 -0
- package/dist/utils/tools-manager.impl.js +35 -2
- package/dist/utils/tools-manager.js +11 -7
- package/dist/utils/windows-cwd.js +585 -0
- package/dist/utils/windows-cwd.js.map +1 -0
- package/docs/extensions.md +1 -1
- package/docs/getting-started/installation.md +2 -0
- package/docs/intercom/operations.md +1 -0
- package/docs/reference/cli.md +1 -1
- package/package.json +24 -24
- package/dist/_shared/mode-shared-HP7GUA7J.js.map +0 -1
- package/dist/_shared/p1a-prewarm-YK3KDTLN.js.map +0 -1
- package/dist/_shared/p1b-elig-PXQA2FYP.js.map +0 -1
- package/dist/_shared/startup-0-0-X4NF3GKM.js.map +0 -1
- package/dist/_shared/startup-0-1-7QTG6VJZ.js.map +0 -1
- package/dist/_shared/startup-0-2-KFDYPDJK.js.map +0 -1
- package/dist/_shared/startup-8-1-KQJBDKRU.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __commonJSMin, __name, __require, __toESM } from "./rolldown-runtime-BGM3D5V3.js";
|
|
2
|
-
import { APP_NAME, BLUEPRINT_FILE_NAME, CONFIG_DIR_NAME, ENV_MODEL_CATALOG_URL, canonicalizePath as canonicalizePath$1, canonicalizePathAsync as canonicalizePathAsync$1, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getDocsPath, getEnvValue, getExamplesPath, getExtensionTranspileCacheDir, getPathComparisonKey, getProjectConfigDirs, getReadmePath, isBunBinary, isBundledBuild, isLocalPath, isPathWithin, markPathIgnoredByCloudSync, moduleDirFromMetaUrl, normalizePath, pathsEqual, processLaunch, processLaunchAsync, rehydrateDebugError, resolutionBaseUrl, resolvePath, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom, updatedInstallError } from "./p0-cli-
|
|
3
|
-
import { BUILTIN_PATH_PREFIX, BlueprintInvalidError, COMMAND_DETAIL_TAIL_BYTES, DEFAULT_THINKING_LEVEL, FILE_KINDS, FILE_PATTERNS, FORKED_PACKAGE_WORKSPACE_DIRS, GitUnavailableError, HOST, NETWORK_TIMEOUT_MS, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, RESOURCE_TYPES, ROW_INTENT_META, THINKING_LEVELS, TYPEBOX_SUBPATHS, TaskCleanupError, VisualLinePreview, asyncScope, bindSavedReadLines, cancelReasonText, containProcessTree, conventionDirsForResource, createGitEnvironment, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, emitProgress, experimentalToolSamplingProperty, findPreferredAvailableModel, forkedPackageExportAliases, formatNoApiKeyFoundMessage, formatSize, formatTimeoutSeconds, formatTokenCount, formatToolCallWithArgs, getDefaultSessionDirPath, getHostQuestionnaire, getManifestFromPackageJson, getResourcePathKey,
|
|
4
|
-
import { NestedGitignore, NoUsableModelError, QuestionParamsSchema, STORAGE_JOIN_COMMAND, TaskToolError, WorkspaceBindingError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceGitError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, addResource, attachCleanupCause, cancelPausedOwnerTasks, cancelReceiptSentence, computeFocusedOptionHasPreview, createAccumulator, createProviderAlias, deferRestorePhase, formatAnswerScalar, getBuiltinExtensionEntryLabel, getCommandEnv, getLoaderAgentDirs, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasLazyBuiltinSpec, isContentFilterRefusal, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isProviderCredentialRejection, isRetryableModelFailure, isRetryableSameModelFailure, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isUnrecognizedModelFailure, isWorkspaceBindingError, isWorkspaceError, isWorkspaceGitError, isWorkspaceRestoreError, isWorkspaceSnapshotError, loadVirtualModules, normalizeModelFailureSignal, normalizeModelProvider, normalizeProviderKeys, noteRestoreFetch, prewarmModelApi, readInlineCaret, readInlineDraft, registerLazyBuiltin, requestedThinkingLevelForModelSwitch, require_int as require_int$1, require_int$1 as require_int, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, resolveResourcePath, routeKey, runCallback, sessionLifecycleCreation, settingsWriteOwner, startupRegistrationTokens, subagentsLazyBuiltinSpec, timeRestorePhase, toResolvedPaths, trackAdmittedAgentTask, trackTranspileCacheWrite, unreadablePathError, unwritablePathError, waitResultTail, withInlineDraft } from "./startup-0-1-
|
|
2
|
+
import { APP_NAME, BLUEPRINT_FILE_NAME, CONFIG_DIR_NAME, ENV_MODEL_CATALOG_URL, canonicalizePath as canonicalizePath$1, canonicalizePathAsync as canonicalizePathAsync$1, createChildProcessEnvironment, createModuleRequire, findHelperExecutableAsync, getAgentDir, getAgentDirs, getBinDir, getDocsPath, getEnvValue, getExamplesPath, getExtensionTranspileCacheDir, getPathComparisonKey, getProjectConfigDirs, getReadmePath, isBunBinary, isBundledBuild, isLocalPath, isPathWithin, markPathIgnoredByCloudSync, moduleDirFromMetaUrl, normalizePath, pathsEqual, processLaunch, processLaunchAsync, rehydrateDebugError, resolutionBaseUrl, resolvePath, resolveSafeWindowsWorkingDirectoryAsync, spawnLaunchedProcess, spawnLaunchedProcessSync, stripBom, updatedInstallError } from "./p0-cli-BB45ZQY6.js";
|
|
3
|
+
import { BUILTIN_PATH_PREFIX, BlueprintInvalidError, COMMAND_DETAIL_TAIL_BYTES, DEFAULT_THINKING_LEVEL, FILE_KINDS, FILE_PATTERNS, FORKED_PACKAGE_WORKSPACE_DIRS, GitUnavailableError, HOST, NETWORK_TIMEOUT_MS, POST_LOGOUT_AUTH_CHECK_TIMEOUT_MS, RESOURCE_TYPES, ROW_INTENT_META, THINKING_LEVELS, TYPEBOX_SUBPATHS, TaskCleanupError, VisualLinePreview, asyncScope, bindSavedReadLines, cancelReasonText, containProcessTree, conventionDirsForResource, createBatchedCanonicalizePathAsync, createGitEnvironment, createSyntheticSourceInfo, createTypeScriptSourceSpecifierTransform, emitProgress, experimentalToolSamplingProperty, findPreferredAvailableModel, forkedPackageExportAliases, formatNoApiKeyFoundMessage, formatSize, formatTimeoutSeconds, formatTokenCount, formatToolCallWithArgs, getDefaultSessionDirPath, getHostQuestionnaire, getManifestFromPackageJson, getResourcePathKey, getTextOutput, holdProcessDescendants, holdProcessDescendantsResult, holderRuns as holderRuns$1, isCodexTokenInvalidationError, isGitProvisionError, isGitUnavailableError, isSerializedMissingSessionCwdError, isStaleExtensionContextError, isStdoutTakenOver, isSyntheticPath, legacyWorkflowFilePaths, legacyWorkflowFilePatterns, loadConfig, loadedConfig, lockShared, longerRunAdvice, operationSignal, parseSlashCommand, raceWithAbortSignal, readTaskOutputTail, redactCredentials, redactOAuthErrorText, rehydrateMissingSessionCwdError, removedProviderMessage, replaceTabs, require_applyReviver, require_constants, require_debug, require_errors, require_identifiers, require_identity, require_ignore, require_line_counter, require_parse_options, require_resolve_end, require_resolve_props, require_stringifyComment, require_util_contains_newline, resolvePhysicalPath, resolvePhysicalPathAsync, resolveSchemaRef, resourceInternals, sanitizeMcpServers, sentinelsToAppend, serializeSessionMutation, sharedClockNow, sleep, spanElapsedMs, spawnHostProcess, taskOutcomeStatus, taskOutputText, taskStoppedForResume, thisProcess, truncateMiddle, validateGuidanceFields, windowsTemporaryFiles, withInstallLock, withLegacyPackageNames, withProgress, writeOutputFile, yieldToEventLoopIfSlow } from "./startup-0-0-TYUFUOJZ.js";
|
|
4
|
+
import { NestedGitignore, NoUsableModelError, QuestionParamsSchema, STORAGE_JOIN_COMMAND, TaskToolError, WorkspaceBindingError, WorkspaceConfigError, WorkspaceDriftError, WorkspaceGitError, WorkspaceRestoreError, WorkspaceSandboxError, WorkspaceSnapshotError, WorkspaceTimeoutError, addResource, attachCleanupCause, cancelPausedOwnerTasks, cancelReceiptSentence, computeFocusedOptionHasPreview, createAccumulator, createProviderAlias, deferRestorePhase, formatAnswerScalar, getBuiltinExtensionEntryLabel, getCommandEnv, getLoaderAgentDirs, getToolEnv, getToolPath, getVirtualModules, gitInstallCommand, gitignoreMatcher, hasLazyBuiltinSpec, isContentFilterRefusal, isNativeBuiltinExtensionPath, isOfflineModeEnabled, isProviderCredentialRejection, isRetryableModelFailure, isRetryableSameModelFailure, isSafetyRefusalFailure, isSourceBuiltinExtensionPath, isUnrecognizedModelFailure, isWorkspaceBindingError, isWorkspaceError, isWorkspaceGitError, isWorkspaceRestoreError, isWorkspaceSnapshotError, loadVirtualModules, normalizeModelFailureSignal, normalizeModelProvider, normalizeProviderKeys, noteRestoreFetch, prewarmModelApi, readInlineCaret, readInlineDraft, registerLazyBuiltin, requestedThinkingLevelForModelSwitch, require_int as require_int$1, require_int$1 as require_int, require_log, require_re, require_timestamp, require_toJS, require_util_flow_indent_check, require_util_map_includes, require_visit, resolveResourcePath, routeKey, runCallback, sessionLifecycleCreation, settingsWriteOwner, startupRegistrationTokens, subagentsLazyBuiltinSpec, timeRestorePhase, toResolvedPaths, trackAdmittedAgentTask, trackTranspileCacheWrite, unreadablePathError, unwritablePathError, waitResultTail, withInlineDraft } from "./startup-0-1-D4LGGINF.js";
|
|
5
5
|
import { TerminalTextSanitizer, graphemeAt, keyHint, loadThemeFromContent, resolveColorMode, singleLineDisplayText, terminalDisplayText } from "./p2-shell-main-B2WIALFD.js";
|
|
6
|
-
import { failureDebugFields, redactUrlCredentials, releaseLock, renameReplacingAsync, renameWithRetry, reportDebugAsync, takeTakeoverMutexAsync } from "./p1b-elig-
|
|
7
|
-
import { LONG_STREAM_CUT_ADVICE, ModelConfig, ResumePreconditionError, TaskSupervisor, assertSessionOpen, assertWorkspace, automaticWaitBudgetMs, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, classifyRepository, findSourceInfoForPath, formatKillCall, getCallableTools, getDefaultSourceInfoForPath, getShellConfigAsync, getShellEnvAsync, importAfterEvaluation, installHostModuleBridge, isLongStreamCut, isWorkspace, nextRetryDecision, observeAccountCatalog, prepareSourceEntries, prepareSourceEntry, rebuildKillResult, recordProviderSuccess, recordedRepo, reduce, registerSourceBuiltinLoad, repeatsLongStreamCut, require_Node, require_anchors, require_directives, require_semver as require_semver$1, runCommand, runCommandCapture, runCommandSync, runWithConcurrency, sessionGenerationClosing, sessionLifetime, summarizeQuestions, taskOwnTranscriptEntries, trackSessionWork, transformTemplate, validateQuestionnaire, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, wrapToolDefinition } from "./startup-0-2-
|
|
6
|
+
import { failureDebugFields, redactUrlCredentials, releaseLock, renameReplacingAsync, renameWithRetry, reportDebugAsync, takeTakeoverMutexAsync } from "./p1b-elig-ENCUPKKJ.js";
|
|
7
|
+
import { LONG_STREAM_CUT_ADVICE, ModelConfig, ResumePreconditionError, TaskSupervisor, assertSessionOpen, assertWorkspace, automaticWaitBudgetMs, buildFallbackModel, buildQuestionnaireResponse, buildToolResult, classifyRepository, findSourceInfoForPath, formatKillCall, getCallableTools, getDefaultSourceInfoForPath, getShellConfigAsync, getShellEnvAsync, importAfterEvaluation, installHostModuleBridge, isLongStreamCut, isWorkspace, nextRetryDecision, observeAccountCatalog, prepareSourceEntries, prepareSourceEntry, rebuildKillResult, recordProviderSuccess, recordedRepo, reduce, registerSourceBuiltinLoad, repeatsLongStreamCut, require_Node, require_anchors, require_directives, require_semver as require_semver$1, runCommand, runCommandCapture, runCommandSync, runWithConcurrency, sessionGenerationClosing, sessionLifetime, summarizeQuestions, taskOwnTranscriptEntries, trackSessionWork, transformTemplate, validateQuestionnaire, withDiscoveredModels, withPersonalizedCatalog, withRemoteCatalog, wrapToolDefinition } from "./startup-0-2-SZGQIWHI.js";
|
|
8
8
|
import { DEFAULT_WORKTREE_SNAPSHOT_SETTINGS, FileModelsStore, InMemoryCodingAgentModelsStore, admitProviderStream, completeUtf8PrefixLength, computeEnvironmentHash, fallbackKey, getBaseDirForScope, getBaseDirsForScope, getConfigValueEnvVarNames, getGitInstallPath, getGitInstallRoot, getHomeDir, getInstalledGitInstallPath, getNpmInstallRoot, isCommandConfigValue, isConfigValueConfigured, llamaExtension, parseGitUrl, require_Alias, require_Scalar, require_compare, require_compare_build, require_inc, require_major, require_minor, require_parse, require_patch, resolveCliModel, resolveConfigValue, resolveFallbackModel as resolveFallbackModel$1, resolveFallbackModelWithoutCredentials, resolveHeadersOrThrow, resolveHeadersOrThrowAsync, resolveManagerPath, resolvePathFromBase, resolveWorktreeSnapshotSettings, sha256Hex as sha256Hex$1, snapshotBlob, splitFallbackModel, waitFor } from "./startup-0-3-T4DVFYWX.js";
|
|
9
9
|
import { SESSION_HISTORY_PAGE_BYTES } from "./settings-startup-65YEWRV2.js";
|
|
10
10
|
import { AuthStorage, OutputAccumulator, ReadOnlyAuthStorage, TOOL_BLOCK_LIMITS, ToolBlock, ToolBlockMarkdown, ToolBlockRecords, accountSnapshotVersion, applyAutoloadDisabledNamePatterns, applyAutoloadDisabledPatterns, applyExtension, applyModelOverride, applyModelsJson, applyNamePatterns, applyPatterns, assertRestorePathBudget, assertWorkspaceGitAvailable, buildQuestionnaire, canonicalizeWorktreePathAsync, captureIndexPath, checkoutStoreIdOf, codemode_default, collapseToolBlockLines, composeApiKeyAuth, composeOAuthAuth, configuredApiKey, configuredHeaders, containsAuthConfig, containsCredential, containsCredentialValue, defaultWorktreeSnapshotStoreDir, formatModelLabel, formatModelReferenceLabel, gitOutput, hasGlobPattern, isEnabledByOverrides, isOverridePattern, jsonParser, pathExists as pathExists$1, rawModelHeaders, repositoryIdOf, repositoryIdsOf, require_bool as require_bool$1, require_bool$1 as require_bool, require_clean, require_coerce, require_compare_loose, require_createNode, require_diff, require_eq, require_float as require_float$1, require_float$1 as require_float, require_gt, require_gte, require_lt, require_lte, require_merge, require_neq, require_null, require_prerelease, require_rcompare, require_resolve_block_scalar, require_resolve_flow_scalar, require_rsort, require_sort, require_stringifyString, require_truncate, require_valid as require_valid$1, runWorkspaceGit, sameRemote, sharedRepositoryIdOf, sharedRepositoryIdsOf, splitPatterns, stagingWorktreeName, toLlmContent, toPosixPath as toPosixPath$2 } from "./startup-0-4-HN5EB4K7.js";
|
|
@@ -27,7 +27,6 @@ import { ModelsError, Type, assertChatModel, classifierErrorResult, createModels
|
|
|
27
27
|
import { Container, Spacer, Text, decodeKittyPrintable, getKeybindings, stripTerminalSequences, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "@bastani/atomic-tui";
|
|
28
28
|
import chalk from "chalk";
|
|
29
29
|
import { StorageAdapterLoadError, findStorageWriteLockTimeoutError } from "../core/storage/errors.js";
|
|
30
|
-
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
31
30
|
import * as crypto$2 from "node:crypto";
|
|
32
31
|
import { createHash, randomUUID } from "node:crypto";
|
|
33
32
|
import { isDeepStrictEqual, promisify, stripVTControlCharacters } from "node:util";
|
|
@@ -36,8 +35,10 @@ import { clampThinkingLevel, getApiProvider, getSupportedThinkingLevels, isConte
|
|
|
36
35
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
37
36
|
import { snapshotBlobHashes } from "../core/worktree-snapshot/blob-store.js";
|
|
38
37
|
import { loadStorageAdapter, secretFilePath } from "../core/storage/provider.js";
|
|
38
|
+
import { memoizeAsync, memoizeAsyncByKey } from "../utils/memoize-async.js";
|
|
39
39
|
import { discoverGitHubCopilotModels, parseGitHubCopilotDiscoveredModels, readGitHubCopilotAccountModelList } from "@bastani/atomic-ai/providers/github-copilot";
|
|
40
40
|
import { defaultSessionDatabasePath, storageHomeDir } from "../core/storage/file-identity.js";
|
|
41
|
+
import { Type as Type$1 } from "@bastani/atomic-ai/utils/typebox/index";
|
|
41
42
|
import { openNodeSqliteDatabase } from "../core/storage/node-sqlite.js";
|
|
42
43
|
import { isSqliteBusy } from "../core/storage/write-ahead-log.js";
|
|
43
44
|
import { glob } from "glob";
|
|
@@ -53,7 +54,7 @@ function worktreeSnapshotExcludedRoots() {
|
|
|
53
54
|
}
|
|
54
55
|
// dist/core/worktree-snapshot/git.js
|
|
55
56
|
const provisionedGit = async (signal) => {
|
|
56
|
-
const { resolveGit } = await import("../utils/tools-manager.
|
|
57
|
+
const { resolveGit } = await import("../utils/tools-manager.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature"));
|
|
57
58
|
return resolveGit({ signal });
|
|
58
59
|
};
|
|
59
60
|
let resolveExecutable = provisionedGit;
|
|
@@ -72,7 +73,7 @@ function withWorktreeSnapshotGit(executable, action) {
|
|
|
72
73
|
*/
|
|
73
74
|
async function installedGitUnavailable() {
|
|
74
75
|
if (resolveExecutable !== provisionedGit) return void 0;
|
|
75
|
-
const { resolveInstalledGit } = await import("../utils/tools-manager.
|
|
76
|
+
const { resolveInstalledGit } = await import("../utils/tools-manager.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature"));
|
|
76
77
|
try {
|
|
77
78
|
await resolveInstalledGit();
|
|
78
79
|
return;
|
|
@@ -177,19 +178,27 @@ function treeRunning(tree) {
|
|
|
177
178
|
return false;
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
|
-
function taskkillTree(pid, deadline) {
|
|
181
|
+
async function taskkillTree(pid, deadline, isAlive) {
|
|
182
|
+
const systemRoot = process.env.SystemRoot || process.env.windir || "C:\\Windows";
|
|
183
|
+
const taskkillPath = join$1(systemRoot, "System32", "taskkill.exe");
|
|
184
|
+
const budgetMs = Math.min(100, Math.max(0, deadline - Date.now()));
|
|
185
|
+
const cwd = await resolveSafeWindowsWorkingDirectoryAsync({
|
|
186
|
+
commandPath: taskkillPath,
|
|
187
|
+
preferCommandDir: true,
|
|
188
|
+
timeoutMs: budgetMs
|
|
189
|
+
});
|
|
190
|
+
if (!isAlive()) return [];
|
|
181
191
|
return new Promise((resolve) => {
|
|
182
192
|
let output = "";
|
|
183
193
|
let taskkill;
|
|
184
|
-
const systemRoot = process.env.SystemRoot || "C:\\Windows";
|
|
185
194
|
try {
|
|
186
|
-
taskkill = spawn(
|
|
195
|
+
taskkill = spawn(taskkillPath, [
|
|
187
196
|
"/F",
|
|
188
197
|
"/T",
|
|
189
198
|
"/PID",
|
|
190
199
|
String(pid)
|
|
191
200
|
], {
|
|
192
|
-
cwd:
|
|
201
|
+
...cwd === void 0 ? {} : { cwd },
|
|
193
202
|
stdio: [
|
|
194
203
|
"ignore",
|
|
195
204
|
"pipe",
|
|
@@ -214,6 +223,14 @@ function taskkillTree(pid, deadline) {
|
|
|
214
223
|
taskkill.once("error", done);
|
|
215
224
|
});
|
|
216
225
|
}
|
|
226
|
+
function holdDescendantsStatus(pid) {
|
|
227
|
+
if (holdProcessDescendantsResult !== void 0) return holdProcessDescendantsResult(pid);
|
|
228
|
+
const held = holdProcessDescendants?.(pid);
|
|
229
|
+
return held === void 0 ? { kind: "unavailable" } : {
|
|
230
|
+
kind: "held",
|
|
231
|
+
held
|
|
232
|
+
};
|
|
233
|
+
}
|
|
217
234
|
async function stopCommand(child, detached, tree) {
|
|
218
235
|
const deadline = Date.now() + ABORTED_GIT_EXIT_WAIT_MS;
|
|
219
236
|
let closed = false;
|
|
@@ -223,9 +240,21 @@ async function stopCommand(child, detached, tree) {
|
|
|
223
240
|
child.once("close", close);
|
|
224
241
|
child.once("error", close);
|
|
225
242
|
let killed = [];
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
243
|
+
let hold = { kind: "unavailable" };
|
|
244
|
+
let holdEnded = false;
|
|
245
|
+
if (process.platform === "win32" && child.pid !== void 0 && child.exitCode === null && child.signalCode === null) {
|
|
246
|
+
hold = holdDescendantsStatus(child.pid);
|
|
247
|
+
holdEnded = hold.kind === "held" && hold.held.endAll();
|
|
248
|
+
}
|
|
249
|
+
if (!(tree?.terminate() === true)) {
|
|
250
|
+
if (process.platform === "win32") {
|
|
251
|
+
if (!holdEnded && child.pid !== void 0 && child.exitCode === null && child.signalCode === null) {
|
|
252
|
+
if (hold.kind === "unavailable") {
|
|
253
|
+
killed = await taskkillTree(child.pid, deadline, () => child.exitCode === null && child.signalCode === null);
|
|
254
|
+
if (child.exitCode === null && child.signalCode === null) child.kill("SIGKILL");
|
|
255
|
+
} else child.kill("SIGKILL");
|
|
256
|
+
}
|
|
257
|
+
} else killChild(child, detached);
|
|
229
258
|
}
|
|
230
259
|
while (Date.now() < deadline && !(closed && !treeRunning(tree) && !killed.some(running))) await setTimeout$1(PROCESS_TREE_POLL_MS);
|
|
231
260
|
tree?.close();
|
|
@@ -5492,7 +5521,7 @@ async function worktreeSetAside(storeDir, path) {
|
|
|
5492
5521
|
if (note === "unreadable") return true;
|
|
5493
5522
|
return sameSetAsideNote(path, note);
|
|
5494
5523
|
}
|
|
5495
|
-
async function exists(path) {
|
|
5524
|
+
async function exists$1(path) {
|
|
5496
5525
|
try {
|
|
5497
5526
|
await stat(path);
|
|
5498
5527
|
return true;
|
|
@@ -5501,6 +5530,7 @@ async function exists(path) {
|
|
|
5501
5530
|
throw error;
|
|
5502
5531
|
}
|
|
5503
5532
|
}
|
|
5533
|
+
__name(exists$1, "exists");
|
|
5504
5534
|
function refusedForAMoment$1(error, since) {
|
|
5505
5535
|
return error.code === "EPERM" && process.platform === "win32" && Date.now() - since < 1e4;
|
|
5506
5536
|
}
|
|
@@ -5829,7 +5859,7 @@ async function admitPooledWorktree(admission, owner) {
|
|
|
5829
5859
|
const slot = n;
|
|
5830
5860
|
const file = recordFile(storeDir, repository, slot);
|
|
5831
5861
|
const path = pooledWorktreePath(storeDir, repository, slot);
|
|
5832
|
-
if (await exists(file) || await exists(path)) continue;
|
|
5862
|
+
if (await exists$1(file) || await exists$1(path)) continue;
|
|
5833
5863
|
const record = {
|
|
5834
5864
|
version: 1,
|
|
5835
5865
|
repository,
|
|
@@ -5847,13 +5877,13 @@ async function admitPooledWorktree(admission, owner) {
|
|
|
5847
5877
|
held = await withSlotLock(file, false, async (lock) => {
|
|
5848
5878
|
if (repositoryLost !== void 0) throw repositoryLost;
|
|
5849
5879
|
if (!await lock.held()) throw lockLostError(file);
|
|
5850
|
-
if (await exists(file) || await exists(path)) return void 0;
|
|
5880
|
+
if (await exists$1(file) || await exists$1(path)) return void 0;
|
|
5851
5881
|
const taken = await takeSlot(file, owner, record, admission.signal);
|
|
5852
5882
|
let published = false;
|
|
5853
5883
|
try {
|
|
5854
5884
|
if (repositoryLost !== void 0) throw repositoryLost;
|
|
5855
5885
|
if (!await lock.held()) throw lockLostError(file);
|
|
5856
|
-
if (await exists(file) || await exists(path)) {
|
|
5886
|
+
if (await exists$1(file) || await exists$1(path)) {
|
|
5857
5887
|
await taken.unlease().catch(() => {});
|
|
5858
5888
|
return;
|
|
5859
5889
|
}
|
|
@@ -6168,7 +6198,7 @@ async function evictSlot(storeDir, record, options) {
|
|
|
6168
6198
|
const current = await readRecord(file, storeDir, record.repository, record.slot);
|
|
6169
6199
|
if (current === void 0 || await otherLeases(file, true) > 0) return false;
|
|
6170
6200
|
let store;
|
|
6171
|
-
if (await exists(current.path)) {
|
|
6201
|
+
if (await exists$1(current.path)) {
|
|
6172
6202
|
if (!(current.resetting !== void 0) && !await holdsRecordedStateOnly(current, options.settings, options.signal)) return false;
|
|
6173
6203
|
store = await pooledWorktreeStore(storeDir, current.path, options.signal);
|
|
6174
6204
|
}
|
|
@@ -6204,7 +6234,7 @@ async function removeSlot(file, current, store, lock) {
|
|
|
6204
6234
|
await giveBackRecord(file, taken);
|
|
6205
6235
|
throw error;
|
|
6206
6236
|
}
|
|
6207
|
-
if (await exists(file) || !await lock.held()) {
|
|
6237
|
+
if (await exists$1(file) || !await lock.held()) {
|
|
6208
6238
|
if (removed !== void 0) await renameWithRetry(removed, current.path);
|
|
6209
6239
|
await giveBackRecord(file, taken);
|
|
6210
6240
|
return false;
|
|
@@ -11682,7 +11712,7 @@ async function readSelectedAccountModel(id, caller, source, localModel) {
|
|
|
11682
11712
|
const controller = new AbortController();
|
|
11683
11713
|
deadline = controller;
|
|
11684
11714
|
const signal = caller ? AbortSignal.any([caller, controller.signal]) : controller.signal;
|
|
11685
|
-
timer = setTimeout(() => controller.abort(), 15e3)
|
|
11715
|
+
timer = setTimeout(() => controller.abort(), 15e3);
|
|
11686
11716
|
const request = await raceWithAbortSignal(accountRequest(initial, signal), signal);
|
|
11687
11717
|
if (!request || !sameSource(initial, source()) || signal.aborted) return void 0;
|
|
11688
11718
|
let selected;
|
|
@@ -13074,6 +13104,7 @@ const intercomLazyBuiltinSpec = {
|
|
|
13074
13104
|
}
|
|
13075
13105
|
});
|
|
13076
13106
|
atomic.on("session_recovery_restore", async (event, ctx) => {
|
|
13107
|
+
if (event.engineRestart === true) return void 0;
|
|
13077
13108
|
let needsIntercom = false;
|
|
13078
13109
|
try {
|
|
13079
13110
|
needsIntercom = hasIntercomHistory(ctx.sessionManager.getEntries());
|
|
@@ -13549,7 +13580,8 @@ function taskNoticeLine(envelope, task) {
|
|
|
13549
13580
|
...(task?.metrics?.elapsedMs ?? envelope.elapsedMs) === void 0 ? {} : { elapsedMs: task?.metrics?.elapsedMs ?? envelope.elapsedMs }
|
|
13550
13581
|
};
|
|
13551
13582
|
const label = kind === "agent" ? "Agent" : kind === "command" ? "Background command" : "Task";
|
|
13552
|
-
const
|
|
13583
|
+
const unknownCommandExit = kind === "command" && result.kind === "completed" && result.exitCode === void 0;
|
|
13584
|
+
const exitCode = result.kind !== "cancelled" && result.exitCode !== void 0 ? ` (exit code ${result.exitCode})` : unknownCommandExit ? " (exit status unknown)" : "";
|
|
13553
13585
|
if (result.kind !== "cancelled" && taskOutcomeStatus(result, kind) === "completed") return {
|
|
13554
13586
|
status: "success",
|
|
13555
13587
|
label,
|
|
@@ -13631,15 +13663,16 @@ function completionExcerpt(text, side, omissions, outputOffset = 0) {
|
|
|
13631
13663
|
return tail ? text.slice(cut) : text.slice(0, cut);
|
|
13632
13664
|
}
|
|
13633
13665
|
function taskCompletionNotice(envelope, task, output, omissions) {
|
|
13634
|
-
const
|
|
13666
|
+
const kind = task?.kind ?? envelope.taskKind;
|
|
13667
|
+
const exitCode = kind === "command" && envelope.result.kind !== "cancelled" ? envelope.result.exitCode : void 0;
|
|
13635
13668
|
const preview = [envelope.result.kind === "failed" ? envelope.result.message : "", output ?? ""].filter(Boolean).join("\n");
|
|
13636
13669
|
const resumable = noticeResumeId(envelope, task);
|
|
13637
13670
|
return {
|
|
13638
13671
|
title: formatTaskCompletion(envelope, task).split("\n")[0] + (exitCode === void 0 ? "" : ` · exit ${exitCode}`),
|
|
13639
|
-
preview:
|
|
13640
|
-
status: taskOutcomeStatus(envelope.result,
|
|
13672
|
+
preview: kind === "command" ? completionExcerpt(preview, "tail", omissions, preview.length - (output?.length ?? 0)) : completionExcerpt(preview, "head"),
|
|
13673
|
+
status: taskOutcomeStatus(envelope.result, kind),
|
|
13641
13674
|
taskId: envelope.taskId,
|
|
13642
|
-
...
|
|
13675
|
+
...kind === void 0 ? {} : { taskKind: kind },
|
|
13643
13676
|
...task?.kind === "agent" && task.agentName !== void 0 ? { agentName: task.agentName } : {},
|
|
13644
13677
|
...task?.kind === "agent" && task.model !== void 0 ? { model: task.model } : {},
|
|
13645
13678
|
...task?.kind === "agent" && task.thinking !== void 0 ? { thinking: task.thinking } : {},
|
|
@@ -13878,6 +13911,7 @@ function formatTaskCompletion(envelope, task, output, omissions, intercomTarget)
|
|
|
13878
13911
|
if (ranOn) lines.push(ranOn);
|
|
13879
13912
|
if (result.kind === "failed") lines.push(`Error: ${result.message}`);
|
|
13880
13913
|
if (result.kind !== "cancelled" && result.exitCode !== void 0) lines.push(`Exit code: ${result.exitCode}`);
|
|
13914
|
+
else if (kind === "command" && result.kind === "completed") lines.push("Exit status: unknown (ended without an exit code)");
|
|
13881
13915
|
if (result.kind === "cancelled") lines.push(`Stop reason: ${waitingOn ? "released" : result.cause}${stopReason === void 0 ? "" : ` (${stopReason})`}`);
|
|
13882
13916
|
if (output?.trim()) {
|
|
13883
13917
|
const excerpt = completionExcerpt(output, "head", kind === "command" ? omissions : void 0);
|
|
@@ -14057,6 +14091,176 @@ function pendingTaskCompletionIntents(session) {
|
|
|
14057
14091
|
}
|
|
14058
14092
|
// dist/utils/frontmatter.js
|
|
14059
14093
|
const normalizeNewlines = (value) => value.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
14094
|
+
const YAML_RESERVED_PLAIN_SCALARS = /* @__PURE__ */ new Set([
|
|
14095
|
+
"null",
|
|
14096
|
+
"Null",
|
|
14097
|
+
"NULL",
|
|
14098
|
+
"~",
|
|
14099
|
+
"True",
|
|
14100
|
+
"TRUE",
|
|
14101
|
+
"False",
|
|
14102
|
+
"FALSE"
|
|
14103
|
+
]);
|
|
14104
|
+
const YAML_RESERVED_KEY_NAMES = /* @__PURE__ */ new Set([
|
|
14105
|
+
"null",
|
|
14106
|
+
"Null",
|
|
14107
|
+
"NULL",
|
|
14108
|
+
"true",
|
|
14109
|
+
"True",
|
|
14110
|
+
"TRUE",
|
|
14111
|
+
"false",
|
|
14112
|
+
"False",
|
|
14113
|
+
"FALSE",
|
|
14114
|
+
"__proto__"
|
|
14115
|
+
]);
|
|
14116
|
+
function isSimpleKey(key) {
|
|
14117
|
+
if (key.length === 0 || YAML_RESERVED_KEY_NAMES.has(key)) return false;
|
|
14118
|
+
const first = key.charCodeAt(0);
|
|
14119
|
+
if (!(first >= 97 && first <= 122 || first >= 65 && first <= 90 || first === 95)) return false;
|
|
14120
|
+
for (let i = 1; i < key.length; i++) {
|
|
14121
|
+
const c = key.charCodeAt(i);
|
|
14122
|
+
if (!(c >= 97 && c <= 122 || c >= 65 && c <= 90 || c >= 48 && c <= 57 || c === 45 || c === 95)) return false;
|
|
14123
|
+
}
|
|
14124
|
+
return true;
|
|
14125
|
+
}
|
|
14126
|
+
function isSpaceOnlyPipeHeader(rest) {
|
|
14127
|
+
if (rest.length === 0 || rest.charCodeAt(0) !== 124) return false;
|
|
14128
|
+
for (let i = 1; i < rest.length; i++) if (rest.charCodeAt(i) !== 32) return false;
|
|
14129
|
+
return true;
|
|
14130
|
+
}
|
|
14131
|
+
function isDisallowedPlainStart(code) {
|
|
14132
|
+
if (code >= 48 && code <= 57) return true;
|
|
14133
|
+
return code === 45 || code === 43 || code === 46 || code === 63 || code === 58 || code === 44 || code === 91 || code === 93 || code === 123 || code === 125 || code === 35 || code === 38 || code === 42 || code === 33 || code === 124 || code === 62 || code === 39 || code === 34 || code === 37 || code === 64 || code === 96;
|
|
14134
|
+
}
|
|
14135
|
+
/**
|
|
14136
|
+
* Matches lowercase hex strings (e.g. git commit/tree SHAs) starting with a digit that YAML 1.2 always parses as
|
|
14137
|
+
* plain strings: length >= 7, all `[0-9a-f]`, containing at least one `[a-df]` (excluding `e` alone so scientific
|
|
14138
|
+
* notation like `1e50000` falls back to `yaml.parse`, and no `x` so `0x...` hex literals fall back).
|
|
14139
|
+
*/
|
|
14140
|
+
function isLowerHexGitShaScalar(value) {
|
|
14141
|
+
if (value.length < 7) return false;
|
|
14142
|
+
let hasNonEHexLetter = false;
|
|
14143
|
+
for (let i = 0; i < value.length; i++) {
|
|
14144
|
+
const c = value.charCodeAt(i);
|
|
14145
|
+
if (c >= 48 && c <= 57) continue;
|
|
14146
|
+
if (c >= 97 && c <= 102) {
|
|
14147
|
+
if (c !== 101) hasNonEHexLetter = true;
|
|
14148
|
+
continue;
|
|
14149
|
+
}
|
|
14150
|
+
return false;
|
|
14151
|
+
}
|
|
14152
|
+
return hasNonEHexLetter;
|
|
14153
|
+
}
|
|
14154
|
+
/**
|
|
14155
|
+
* Parse a single scalar value in the proven YAML 1.2 simple subset:
|
|
14156
|
+
* lowercase booleans (`true`/`false`), JSON-compatible double-quoted strings, or safe plain strings.
|
|
14157
|
+
* Returns `undefined` to fall back to the full `yaml` parser for any other syntax.
|
|
14158
|
+
*/
|
|
14159
|
+
function parseSimpleScalar(raw) {
|
|
14160
|
+
let end = raw.length;
|
|
14161
|
+
while (end > 0 && raw.charCodeAt(end - 1) === 32) end--;
|
|
14162
|
+
const value = end === raw.length ? raw : raw.slice(0, end);
|
|
14163
|
+
if (value.length === 0) return void 0;
|
|
14164
|
+
if (value === "true") return true;
|
|
14165
|
+
if (value === "false") return false;
|
|
14166
|
+
if (value.charCodeAt(0) === 34) {
|
|
14167
|
+
if (value.length < 2 || value.charCodeAt(value.length - 1) !== 34) return void 0;
|
|
14168
|
+
try {
|
|
14169
|
+
const parsed = JSON.parse(value);
|
|
14170
|
+
return typeof parsed === "string" ? parsed : void 0;
|
|
14171
|
+
} catch {
|
|
14172
|
+
return;
|
|
14173
|
+
}
|
|
14174
|
+
}
|
|
14175
|
+
if (YAML_RESERVED_PLAIN_SCALARS.has(value)) return void 0;
|
|
14176
|
+
const first = value.charCodeAt(0);
|
|
14177
|
+
if (first >= 48 && first <= 57) return isLowerHexGitShaScalar(value) ? value : void 0;
|
|
14178
|
+
if (isDisallowedPlainStart(first)) return void 0;
|
|
14179
|
+
if (value.charCodeAt(value.length - 1) === 58) return void 0;
|
|
14180
|
+
for (let i = 0; i < value.length; i++) {
|
|
14181
|
+
const c = value.charCodeAt(i);
|
|
14182
|
+
if (c < 32) return void 0;
|
|
14183
|
+
if (c === 35 && i > 0 && value.charCodeAt(i - 1) === 32) return void 0;
|
|
14184
|
+
if (c === 58 && i + 1 < value.length && value.charCodeAt(i + 1) === 32) return void 0;
|
|
14185
|
+
}
|
|
14186
|
+
return value;
|
|
14187
|
+
}
|
|
14188
|
+
/**
|
|
14189
|
+
* Fast exact parser for simple flat, 1-level nested scalar, and simple literal-block (`|`) YAML frontmatter
|
|
14190
|
+
* (such as bundled SKILL.md files). Falls back to `yaml.parse` (returning `undefined`) for any other syntax.
|
|
14191
|
+
*/
|
|
14192
|
+
function tryParseSimpleFrontmatter(yamlString) {
|
|
14193
|
+
const result = {};
|
|
14194
|
+
let currentMap;
|
|
14195
|
+
let currentMapIndent = 0;
|
|
14196
|
+
let currentMapHasEntries = false;
|
|
14197
|
+
let hasEntries = false;
|
|
14198
|
+
const lines = yamlString.split("\n");
|
|
14199
|
+
for (let i = 0; i < lines.length; i++) {
|
|
14200
|
+
const line = lines[i];
|
|
14201
|
+
let indent = 0;
|
|
14202
|
+
while (indent < line.length && line.charCodeAt(indent) === 32) indent++;
|
|
14203
|
+
if (indent === line.length) continue;
|
|
14204
|
+
if (line.charCodeAt(indent) === 9 || line.charCodeAt(indent) === 35) return void 0;
|
|
14205
|
+
const colon = line.indexOf(":", indent);
|
|
14206
|
+
if (colon === -1) return void 0;
|
|
14207
|
+
const key = line.slice(indent, colon);
|
|
14208
|
+
if (!isSimpleKey(key)) return void 0;
|
|
14209
|
+
let restStart = colon + 1;
|
|
14210
|
+
if (!(restStart === line.length || line.charCodeAt(restStart) === 32)) return void 0;
|
|
14211
|
+
while (restStart < line.length && line.charCodeAt(restStart) === 32) restStart++;
|
|
14212
|
+
const rest = line.slice(restStart);
|
|
14213
|
+
if (indent === 0) {
|
|
14214
|
+
if (currentMap !== void 0 && !currentMapHasEntries) return void 0;
|
|
14215
|
+
currentMap = void 0;
|
|
14216
|
+
currentMapIndent = 0;
|
|
14217
|
+
currentMapHasEntries = false;
|
|
14218
|
+
if (Object.hasOwn(result, key)) return void 0;
|
|
14219
|
+
if (rest.length === 0) {
|
|
14220
|
+
const nested = {};
|
|
14221
|
+
result[key] = nested;
|
|
14222
|
+
currentMap = nested;
|
|
14223
|
+
hasEntries = true;
|
|
14224
|
+
} else if (isSpaceOnlyPipeHeader(rest)) {
|
|
14225
|
+
let blockIndent = 0;
|
|
14226
|
+
const blockLines = [];
|
|
14227
|
+
let j = i + 1;
|
|
14228
|
+
for (; j < lines.length; j++) {
|
|
14229
|
+
const nextLine = lines[j];
|
|
14230
|
+
let nextIndent = 0;
|
|
14231
|
+
while (nextIndent < nextLine.length && nextLine.charCodeAt(nextIndent) === 32) nextIndent++;
|
|
14232
|
+
if (nextIndent === nextLine.length) return void 0;
|
|
14233
|
+
if (nextLine.charCodeAt(nextIndent) === 9) return void 0;
|
|
14234
|
+
if (nextIndent === 0) break;
|
|
14235
|
+
if (blockIndent === 0) blockIndent = nextIndent;
|
|
14236
|
+
else if (nextIndent < blockIndent) return void 0;
|
|
14237
|
+
blockLines.push(nextLine.slice(blockIndent));
|
|
14238
|
+
}
|
|
14239
|
+
if (blockLines.length === 0) return void 0;
|
|
14240
|
+
result[key] = `${blockLines.join("\n")}\n`;
|
|
14241
|
+
hasEntries = true;
|
|
14242
|
+
i = j - 1;
|
|
14243
|
+
} else {
|
|
14244
|
+
const scalar = parseSimpleScalar(rest);
|
|
14245
|
+
if (scalar === void 0) return void 0;
|
|
14246
|
+
result[key] = scalar;
|
|
14247
|
+
hasEntries = true;
|
|
14248
|
+
}
|
|
14249
|
+
} else {
|
|
14250
|
+
if (currentMap === void 0) return void 0;
|
|
14251
|
+
if (currentMapIndent === 0) currentMapIndent = indent;
|
|
14252
|
+
else if (indent !== currentMapIndent) return void 0;
|
|
14253
|
+
if (Object.hasOwn(currentMap, key)) return void 0;
|
|
14254
|
+
if (rest.length === 0) return void 0;
|
|
14255
|
+
const scalar = parseSimpleScalar(rest);
|
|
14256
|
+
if (scalar === void 0) return void 0;
|
|
14257
|
+
currentMap[key] = scalar;
|
|
14258
|
+
currentMapHasEntries = true;
|
|
14259
|
+
}
|
|
14260
|
+
}
|
|
14261
|
+
if (!hasEntries || currentMap !== void 0 && !currentMapHasEntries) return void 0;
|
|
14262
|
+
return result;
|
|
14263
|
+
}
|
|
14060
14264
|
const extractFrontmatter = (content) => {
|
|
14061
14265
|
const normalized = normalizeNewlines(stripBom(content));
|
|
14062
14266
|
if (!normalized.startsWith("---")) return {
|
|
@@ -14079,6 +14283,11 @@ const parseFrontmatter = (content) => {
|
|
|
14079
14283
|
frontmatter: {},
|
|
14080
14284
|
body
|
|
14081
14285
|
};
|
|
14286
|
+
const fast = tryParseSimpleFrontmatter(yamlString);
|
|
14287
|
+
if (fast !== void 0) return {
|
|
14288
|
+
frontmatter: fast,
|
|
14289
|
+
body
|
|
14290
|
+
};
|
|
14082
14291
|
return {
|
|
14083
14292
|
frontmatter: (0, import_dist.parse)(yamlString) ?? {},
|
|
14084
14293
|
body
|
|
@@ -15785,19 +15994,14 @@ var __rewriteRelativeImportExtension = function(path2, preserveJsx) {
|
|
|
15785
15994
|
return path2;
|
|
15786
15995
|
};
|
|
15787
15996
|
const requireFromHere = createRequire(__atomicDistModuleUrl$1);
|
|
15788
|
-
let _aliases = null;
|
|
15789
|
-
let createJitiPromise;
|
|
15790
15997
|
const UNUSED_TRANSPILE_CACHE_MS = 6048e5;
|
|
15791
15998
|
const TRANSPILE_CACHE_USE_MARK_MS = 36e5;
|
|
15792
15999
|
const transpileCacheUseMarks = /* @__PURE__ */ new Map();
|
|
15793
16000
|
const transpileCachePrunes = /* @__PURE__ */ new Map();
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
})));
|
|
15799
|
-
return createJitiPromise;
|
|
15800
|
-
}
|
|
16001
|
+
const getCreateJiti = memoizeAsync(() => (isBunBinary || isBundledBuild ? import("../core/extensions/jiti-static-loader.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature")) : import("../core/extensions/jiti-loader.code.js").catch((error) => __atomicOnDemandFailed(error, "this feature"))).then((module) => process.versions.bun === void 0 ? module.createJiti : ((id, options) => module.createJiti(id, {
|
|
16002
|
+
tryNative: false,
|
|
16003
|
+
...options
|
|
16004
|
+
}))));
|
|
15801
16005
|
const HOST_TYPEBOX = "@bastani/atomic-ai";
|
|
15802
16006
|
const sharesHostTypeboxByDir = /* @__PURE__ */ new Map();
|
|
15803
16007
|
function bunImportsNatively(extensionPath) {
|
|
@@ -15806,8 +16010,12 @@ function bunImportsNatively(extensionPath) {
|
|
|
15806
16010
|
const dir = path$1.dirname(extensionPath);
|
|
15807
16011
|
let shares = sharesHostTypeboxByDir.get(dir);
|
|
15808
16012
|
if (shares === void 0) {
|
|
15809
|
-
|
|
15810
|
-
|
|
16013
|
+
const pending = Promise.all([bun.resolve(HOST_TYPEBOX, dir), bun.resolve(HOST_TYPEBOX, currentModuleDir())]).then(([fromPackage, fromHost]) => fromPackage === fromHost, () => {
|
|
16014
|
+
if (sharesHostTypeboxByDir.get(dir) === pending) sharesHostTypeboxByDir.delete(dir);
|
|
16015
|
+
return false;
|
|
16016
|
+
});
|
|
16017
|
+
shares = pending;
|
|
16018
|
+
sharesHostTypeboxByDir.set(dir, pending);
|
|
15811
16019
|
}
|
|
15812
16020
|
return shares;
|
|
15813
16021
|
}
|
|
@@ -16059,7 +16267,6 @@ let extensionCacheGeneration = 0;
|
|
|
16059
16267
|
const extensionCache = /* @__PURE__ */ new Map();
|
|
16060
16268
|
const nativeBuiltinFactories = /* @__PURE__ */ new Map();
|
|
16061
16269
|
const nativeBuiltinLoads = /* @__PURE__ */ new Map();
|
|
16062
|
-
const nativeBuiltinRootChecks = /* @__PURE__ */ new Map();
|
|
16063
16270
|
const NATIVE_BUILTIN_HOST_PACKAGES = [
|
|
16064
16271
|
"@bastani/atomic-ai",
|
|
16065
16272
|
"@bastani/atomic-tui",
|
|
@@ -16081,35 +16288,30 @@ async function resolveOptionalPackageRoot(packageName, searchPaths) {
|
|
|
16081
16288
|
return;
|
|
16082
16289
|
}
|
|
16083
16290
|
}
|
|
16291
|
+
const nativeBuiltinRootChecks = memoizeAsyncByKey(async (extensionPath) => {
|
|
16292
|
+
try {
|
|
16293
|
+
const hostPackageRoot = path$1.resolve(currentModuleDir(), "../../..");
|
|
16294
|
+
if (!await pathExists(path$1.join(hostPackageRoot, "dist", "index.js"))) return false;
|
|
16295
|
+
const hostAtomicReal = await realpathJs(hostPackageRoot);
|
|
16296
|
+
const requireFromExt = createRequire(extensionPath);
|
|
16297
|
+
const extAtomicReal = await resolveOptionalPackageRoot("@bastani/atomic", requireFromExt.resolve.paths("@bastani/atomic") ?? []);
|
|
16298
|
+
if (extAtomicReal === void 0 || !pathsEqual(extAtomicReal, hostAtomicReal)) return false;
|
|
16299
|
+
if ((await Promise.all(NATIVE_BUILTIN_HOST_PACKAGES.map(async (pkg) => {
|
|
16300
|
+
const [hostRoot, extRoot] = await Promise.all([resolveOptionalPackageRoot(pkg), resolveOptionalPackageRoot(pkg, requireFromExt.resolve.paths(pkg) ?? [])]);
|
|
16301
|
+
return hostRoot !== void 0 && extRoot !== void 0 && pathsEqual(hostRoot, extRoot);
|
|
16302
|
+
}))).some((matched) => !matched)) return false;
|
|
16303
|
+
return (await Promise.all(OPTIONAL_NATIVE_BUILTIN_HOST_PACKAGES.map(async (pkg) => {
|
|
16304
|
+
const [hostRoot, extRoot] = await Promise.all([resolveOptionalPackageRoot(pkg), resolveOptionalPackageRoot(pkg, requireFromExt.resolve.paths(pkg) ?? [])]);
|
|
16305
|
+
if (hostRoot === void 0 && extRoot === void 0) return true;
|
|
16306
|
+
return hostRoot !== void 0 && extRoot !== void 0 && pathsEqual(hostRoot, extRoot);
|
|
16307
|
+
}))).every(Boolean);
|
|
16308
|
+
} catch {
|
|
16309
|
+
return false;
|
|
16310
|
+
}
|
|
16311
|
+
}, { shouldCache: (matched) => matched });
|
|
16084
16312
|
async function sharesHostPackageRoots(extensionPath) {
|
|
16085
16313
|
if (!hostRunsCompiledDist()) return false;
|
|
16086
|
-
|
|
16087
|
-
let pending = nativeBuiltinRootChecks.get(dir);
|
|
16088
|
-
if (pending === void 0) {
|
|
16089
|
-
pending = (async () => {
|
|
16090
|
-
try {
|
|
16091
|
-
const hostPackageRoot = path$1.resolve(currentModuleDir(), "../../..");
|
|
16092
|
-
if (!await pathExists(path$1.join(hostPackageRoot, "dist", "index.js"))) return false;
|
|
16093
|
-
const hostAtomicReal = await realpathJs(hostPackageRoot);
|
|
16094
|
-
const requireFromExt = createRequire(extensionPath);
|
|
16095
|
-
const extAtomicReal = await resolveOptionalPackageRoot("@bastani/atomic", requireFromExt.resolve.paths("@bastani/atomic") ?? []);
|
|
16096
|
-
if (extAtomicReal === void 0 || !pathsEqual(extAtomicReal, hostAtomicReal)) return false;
|
|
16097
|
-
if ((await Promise.all(NATIVE_BUILTIN_HOST_PACKAGES.map(async (pkg) => {
|
|
16098
|
-
const [hostRoot, extRoot] = await Promise.all([resolveOptionalPackageRoot(pkg), resolveOptionalPackageRoot(pkg, requireFromExt.resolve.paths(pkg) ?? [])]);
|
|
16099
|
-
return hostRoot !== void 0 && extRoot !== void 0 && pathsEqual(hostRoot, extRoot);
|
|
16100
|
-
}))).some((matched) => !matched)) return false;
|
|
16101
|
-
return (await Promise.all(OPTIONAL_NATIVE_BUILTIN_HOST_PACKAGES.map(async (pkg) => {
|
|
16102
|
-
const [hostRoot, extRoot] = await Promise.all([resolveOptionalPackageRoot(pkg), resolveOptionalPackageRoot(pkg, requireFromExt.resolve.paths(pkg) ?? [])]);
|
|
16103
|
-
if (hostRoot === void 0 && extRoot === void 0) return true;
|
|
16104
|
-
return hostRoot !== void 0 && extRoot !== void 0 && pathsEqual(hostRoot, extRoot);
|
|
16105
|
-
}))).every(Boolean);
|
|
16106
|
-
} catch {
|
|
16107
|
-
return false;
|
|
16108
|
-
}
|
|
16109
|
-
})();
|
|
16110
|
-
nativeBuiltinRootChecks.set(dir, pending);
|
|
16111
|
-
}
|
|
16112
|
-
return pending;
|
|
16314
|
+
return nativeBuiltinRootChecks(extensionPath);
|
|
16113
16315
|
}
|
|
16114
16316
|
async function canLoadNativeBuiltinExtension(extensionPath, isSingleFileBuild) {
|
|
16115
16317
|
if (!await isNativeBuiltinExtensionPath(extensionPath)) return false;
|
|
@@ -16142,7 +16344,7 @@ async function loadNativeBuiltinExtensionModule(extensionPath, cacheToken) {
|
|
|
16142
16344
|
try {
|
|
16143
16345
|
factory = await pending;
|
|
16144
16346
|
} finally {
|
|
16145
|
-
nativeBuiltinLoads.delete(extensionPath);
|
|
16347
|
+
if (nativeBuiltinLoads.get(extensionPath) === pending) nativeBuiltinLoads.delete(extensionPath);
|
|
16146
16348
|
}
|
|
16147
16349
|
}
|
|
16148
16350
|
if (factory && isCurrentCacheToken(cacheToken)) extensionCache.set(extensionPath, factory);
|
|
@@ -16186,13 +16388,7 @@ const realpathJs = promisify(fs$1.realpath);
|
|
|
16186
16388
|
function currentModuleDir() {
|
|
16187
16389
|
return moduleDirFromMetaUrl(__atomicDistModuleUrl$1, "dist", "core", "extensions");
|
|
16188
16390
|
}
|
|
16189
|
-
|
|
16190
|
-
_aliases ??= computeAliases().then(normalizeJitiAliases, (error) => {
|
|
16191
|
-
_aliases = null;
|
|
16192
|
-
throw error;
|
|
16193
|
-
});
|
|
16194
|
-
return _aliases;
|
|
16195
|
-
}
|
|
16391
|
+
const getAliases = memoizeAsync(() => computeAliases().then(normalizeJitiAliases));
|
|
16196
16392
|
async function computeAliases() {
|
|
16197
16393
|
const __dirname = currentModuleDir();
|
|
16198
16394
|
const packageIndex = path$1.resolve(__dirname, "../..", "index.js");
|
|
@@ -24141,7 +24337,7 @@ var DefaultPackageManager = class {
|
|
|
24141
24337
|
}
|
|
24142
24338
|
};
|
|
24143
24339
|
// dist/core/prompt-templates-async.js
|
|
24144
|
-
const YIELD_AFTER_MS
|
|
24340
|
+
const YIELD_AFTER_MS = 8;
|
|
24145
24341
|
async function loadTemplateFromFile(filePath, sourceInfo) {
|
|
24146
24342
|
const diagnostics = [];
|
|
24147
24343
|
let rawContent;
|
|
@@ -24205,7 +24401,7 @@ async function loadTemplatesFromDir(dir, getSourceInfo) {
|
|
|
24205
24401
|
try {
|
|
24206
24402
|
const entries = await readdir(dir, { withFileTypes: true });
|
|
24207
24403
|
for (const entry of entries) {
|
|
24208
|
-
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS
|
|
24404
|
+
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS);
|
|
24209
24405
|
const fullPath = join$1(dir, entry.name);
|
|
24210
24406
|
let isFile = entry.isFile();
|
|
24211
24407
|
if (entry.isSymbolicLink()) try {
|
|
@@ -24260,7 +24456,7 @@ async function loadPromptTemplatesAsync(options) {
|
|
|
24260
24456
|
}
|
|
24261
24457
|
const startedAt = Date.now();
|
|
24262
24458
|
for (const rawPath of promptPaths) {
|
|
24263
|
-
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS
|
|
24459
|
+
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS);
|
|
24264
24460
|
const resolvedPath = resolvePath(rawPath, resolvedCwd, { trim: true });
|
|
24265
24461
|
if (!await pathExists(resolvedPath)) continue;
|
|
24266
24462
|
try {
|
|
@@ -24293,15 +24489,22 @@ const IGNORE_FILE_NAMES = [
|
|
|
24293
24489
|
".ignore",
|
|
24294
24490
|
".fdignore"
|
|
24295
24491
|
];
|
|
24296
|
-
|
|
24492
|
+
async function exists(path) {
|
|
24493
|
+
try {
|
|
24494
|
+
await access(path);
|
|
24495
|
+
return true;
|
|
24496
|
+
} catch {
|
|
24497
|
+
return false;
|
|
24498
|
+
}
|
|
24499
|
+
}
|
|
24297
24500
|
function toPosixPath(path) {
|
|
24298
24501
|
return path.split(sep$1).join("/");
|
|
24299
24502
|
}
|
|
24300
|
-
async function withIgnoreRules(rules, dir, rootDir) {
|
|
24301
|
-
const
|
|
24302
|
-
|
|
24303
|
-
|
|
24304
|
-
|
|
24503
|
+
async function withIgnoreRules(rules, dir, rootDir, entries) {
|
|
24504
|
+
const present = IGNORE_FILE_NAMES.filter((filename) => entries.some((entry) => entry.name.toLowerCase() === filename));
|
|
24505
|
+
if (present.length === 0) return rules;
|
|
24506
|
+
const contents = (await Promise.all(present.map((filename) => readFile(join$1(dir, filename), "utf-8").catch(() => null)))).filter((content) => content !== null);
|
|
24507
|
+
if (contents.length === 0) return rules;
|
|
24305
24508
|
return rules.within(toPosixPath(relative$1(rootDir, dir)), contents);
|
|
24306
24509
|
}
|
|
24307
24510
|
function createSkillSourceInfo(filePath, baseDir, source) {
|
|
@@ -24387,16 +24590,19 @@ async function loadSkillFromFile(filePath, source) {
|
|
|
24387
24590
|
async function loadSkillsFromDirInternal(dir, source, includeRootFiles, ignoreMatcher, rootDir) {
|
|
24388
24591
|
const skills = [];
|
|
24389
24592
|
const diagnostics = [];
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
|
|
24393
|
-
|
|
24394
|
-
|
|
24395
|
-
|
|
24593
|
+
let entries;
|
|
24594
|
+
try {
|
|
24595
|
+
entries = await readdir(dir, { withFileTypes: true });
|
|
24596
|
+
} catch {
|
|
24597
|
+
return {
|
|
24598
|
+
skills,
|
|
24599
|
+
candidates: skills,
|
|
24600
|
+
diagnostics
|
|
24601
|
+
};
|
|
24602
|
+
}
|
|
24396
24603
|
const root = rootDir ?? dir;
|
|
24397
|
-
const ig = await withIgnoreRules(ignoreMatcher ?? NestedGitignore.empty(), dir, root);
|
|
24604
|
+
const ig = await withIgnoreRules(ignoreMatcher ?? NestedGitignore.empty(), dir, root, entries);
|
|
24398
24605
|
try {
|
|
24399
|
-
const entries = await readdir(dir, { withFileTypes: true });
|
|
24400
24606
|
for (const entry of entries) {
|
|
24401
24607
|
if (entry.name !== "SKILL.md") continue;
|
|
24402
24608
|
const fullPath = join$1(dir, entry.name);
|
|
@@ -24417,31 +24623,37 @@ async function loadSkillsFromDirInternal(dir, source, includeRootFiles, ignoreMa
|
|
|
24417
24623
|
diagnostics
|
|
24418
24624
|
};
|
|
24419
24625
|
}
|
|
24626
|
+
const childTasks = [];
|
|
24420
24627
|
for (const entry of entries) {
|
|
24421
|
-
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS);
|
|
24422
24628
|
if (entry.name.startsWith(".") || entry.name === "node_modules") continue;
|
|
24423
24629
|
const fullPath = join$1(dir, entry.name);
|
|
24424
|
-
|
|
24425
|
-
|
|
24426
|
-
|
|
24427
|
-
|
|
24428
|
-
|
|
24429
|
-
|
|
24430
|
-
|
|
24431
|
-
|
|
24432
|
-
|
|
24433
|
-
|
|
24434
|
-
|
|
24435
|
-
|
|
24436
|
-
|
|
24437
|
-
|
|
24438
|
-
|
|
24439
|
-
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
|
|
24443
|
-
|
|
24444
|
-
|
|
24630
|
+
childTasks.push((async () => {
|
|
24631
|
+
let isDirectory = entry.isDirectory();
|
|
24632
|
+
let isFile = entry.isFile();
|
|
24633
|
+
if (entry.isSymbolicLink()) try {
|
|
24634
|
+
const stats = await stat(fullPath);
|
|
24635
|
+
isDirectory = stats.isDirectory();
|
|
24636
|
+
isFile = stats.isFile();
|
|
24637
|
+
} catch {
|
|
24638
|
+
return;
|
|
24639
|
+
}
|
|
24640
|
+
const relPath = toPosixPath(relative$1(root, fullPath));
|
|
24641
|
+
if (ig.ignores(isDirectory ? `${relPath}/` : relPath)) return void 0;
|
|
24642
|
+
if (isDirectory) return loadSkillsFromDirInternal(fullPath, source, false, ig, root);
|
|
24643
|
+
if (!isFile || !includeRootFiles || !entry.name.endsWith(".md")) return void 0;
|
|
24644
|
+
const result = await loadSkillFromFile(fullPath, source);
|
|
24645
|
+
return {
|
|
24646
|
+
skills: result.skill ? [result.skill] : [],
|
|
24647
|
+
candidates: result.skill ? [result.skill] : [],
|
|
24648
|
+
diagnostics: result.diagnostics
|
|
24649
|
+
};
|
|
24650
|
+
})());
|
|
24651
|
+
}
|
|
24652
|
+
const childResults = await Promise.all(childTasks);
|
|
24653
|
+
for (const subResult of childResults) {
|
|
24654
|
+
if (!subResult) continue;
|
|
24655
|
+
skills.push(...subResult.skills);
|
|
24656
|
+
diagnostics.push(...subResult.diagnostics);
|
|
24445
24657
|
}
|
|
24446
24658
|
} catch {}
|
|
24447
24659
|
return {
|
|
@@ -24461,9 +24673,15 @@ async function loadSkillsAsync(options) {
|
|
|
24461
24673
|
const collisionDiagnostics = [];
|
|
24462
24674
|
const userSkillsDir = join$1(resolvedAgentDir, "skills");
|
|
24463
24675
|
const projectSkillsDir = resolve$1(resolvedCwd, CONFIG_DIR_NAME, "skills");
|
|
24676
|
+
const canonicalize = createBatchedCanonicalizePathAsync();
|
|
24677
|
+
const resolveSkillPathKey = async (filePath) => {
|
|
24678
|
+
if (isSyntheticPath(filePath)) return filePath;
|
|
24679
|
+
return getPathComparisonKey(await canonicalize(filePath));
|
|
24680
|
+
};
|
|
24464
24681
|
const addSkills = async (result) => {
|
|
24465
24682
|
allDiagnostics.push(...result.diagnostics);
|
|
24466
|
-
|
|
24683
|
+
if (result.skills.length === 0) return;
|
|
24684
|
+
const realPaths = await Promise.all(result.skills.map((skill) => resolveSkillPathKey(skill.filePath)));
|
|
24467
24685
|
for (const [index, skill] of result.skills.entries()) {
|
|
24468
24686
|
const realPath = realPaths[index];
|
|
24469
24687
|
if (realPathSet.has(realPath)) continue;
|
|
@@ -24484,10 +24702,6 @@ async function loadSkillsAsync(options) {
|
|
|
24484
24702
|
else skillMap.set(skill.name, skill);
|
|
24485
24703
|
}
|
|
24486
24704
|
};
|
|
24487
|
-
if (includeDefaults) {
|
|
24488
|
-
await addSkills(await loadSkillsFromDirInternal(userSkillsDir, "user", true));
|
|
24489
|
-
await addSkills(await loadSkillsFromDirInternal(projectSkillsDir, "project", true));
|
|
24490
|
-
}
|
|
24491
24705
|
const getSource = (resolvedPath) => {
|
|
24492
24706
|
if (!includeDefaults) {
|
|
24493
24707
|
if (isPathWithin(userSkillsDir, resolvedPath)) return "user";
|
|
@@ -24495,44 +24709,58 @@ async function loadSkillsAsync(options) {
|
|
|
24495
24709
|
}
|
|
24496
24710
|
return "path";
|
|
24497
24711
|
};
|
|
24498
|
-
const
|
|
24499
|
-
for (const rawPath of skillPaths) {
|
|
24500
|
-
await yieldToEventLoopIfSlow(startedAt, YIELD_AFTER_MS);
|
|
24712
|
+
const loadExplicitPath = async (rawPath) => {
|
|
24501
24713
|
const resolvedPath = resolvePath(rawPath, resolvedCwd, { trim: true });
|
|
24502
|
-
if (!await pathExists(resolvedPath)) {
|
|
24503
|
-
allDiagnostics.push({
|
|
24504
|
-
type: "warning",
|
|
24505
|
-
message: "skill path does not exist",
|
|
24506
|
-
path: resolvedPath
|
|
24507
|
-
});
|
|
24508
|
-
continue;
|
|
24509
|
-
}
|
|
24510
24714
|
try {
|
|
24511
24715
|
const stats = await stat(resolvedPath);
|
|
24512
24716
|
const source = getSource(resolvedPath);
|
|
24513
|
-
if (stats.isDirectory())
|
|
24514
|
-
|
|
24717
|
+
if (stats.isDirectory()) return loadSkillsFromDirInternal(resolvedPath, source, true);
|
|
24718
|
+
if (stats.isFile() && resolvedPath.endsWith(".md")) {
|
|
24515
24719
|
const result = await loadSkillFromFile(resolvedPath, source);
|
|
24516
|
-
|
|
24517
|
-
skills: [result.skill],
|
|
24518
|
-
candidates: [result.skill],
|
|
24720
|
+
return {
|
|
24721
|
+
skills: result.skill ? [result.skill] : [],
|
|
24722
|
+
candidates: result.skill ? [result.skill] : [],
|
|
24519
24723
|
diagnostics: result.diagnostics
|
|
24520
|
-
}
|
|
24521
|
-
|
|
24522
|
-
|
|
24523
|
-
|
|
24524
|
-
|
|
24525
|
-
|
|
24526
|
-
|
|
24724
|
+
};
|
|
24725
|
+
}
|
|
24726
|
+
return {
|
|
24727
|
+
skills: [],
|
|
24728
|
+
candidates: [],
|
|
24729
|
+
diagnostics: [{
|
|
24730
|
+
type: "warning",
|
|
24731
|
+
message: "skill path is not a markdown file",
|
|
24732
|
+
path: resolvedPath
|
|
24733
|
+
}]
|
|
24734
|
+
};
|
|
24527
24735
|
} catch (error) {
|
|
24528
|
-
|
|
24529
|
-
|
|
24530
|
-
|
|
24531
|
-
|
|
24532
|
-
|
|
24533
|
-
|
|
24736
|
+
if (!await exists(resolvedPath)) return {
|
|
24737
|
+
skills: [],
|
|
24738
|
+
candidates: [],
|
|
24739
|
+
diagnostics: [{
|
|
24740
|
+
type: "warning",
|
|
24741
|
+
message: "skill path does not exist",
|
|
24742
|
+
path: resolvedPath
|
|
24743
|
+
}]
|
|
24744
|
+
};
|
|
24745
|
+
return {
|
|
24746
|
+
skills: [],
|
|
24747
|
+
candidates: [],
|
|
24748
|
+
diagnostics: [{
|
|
24749
|
+
type: "warning",
|
|
24750
|
+
message: error instanceof Error ? error.message : "failed to read skill path",
|
|
24751
|
+
path: resolvedPath
|
|
24752
|
+
}]
|
|
24753
|
+
};
|
|
24534
24754
|
}
|
|
24755
|
+
};
|
|
24756
|
+
const tasks = [];
|
|
24757
|
+
if (includeDefaults) {
|
|
24758
|
+
tasks.push(loadSkillsFromDirInternal(userSkillsDir, "user", true));
|
|
24759
|
+
tasks.push(loadSkillsFromDirInternal(projectSkillsDir, "project", true));
|
|
24535
24760
|
}
|
|
24761
|
+
for (const rawPath of skillPaths) tasks.push(loadExplicitPath(rawPath));
|
|
24762
|
+
const results = await Promise.all(tasks);
|
|
24763
|
+
for (const result of results) await addSkills(result);
|
|
24536
24764
|
return {
|
|
24537
24765
|
skills: Array.from(skillMap.values()),
|
|
24538
24766
|
candidates,
|
|
@@ -27896,4 +28124,49 @@ function assertRpcSuccess(response) {
|
|
|
27896
28124
|
}
|
|
27897
28125
|
export { ANTHROPIC_FAST_MODE_MODEL_IDS, AgentTaskHost, BLUEPRINT_RULES, Bm25Ranker, CredentialSynchronizationError, DEFAULT_TASK_HEARTBEAT_MS, DefaultPackageManager, FAST_MODEL_ID_SUFFIX, FAST_MODEL_SERVICE_TIER, FAST_MODEL_SPEED, LIST_MCP_RESOURCES_TOOL, LIST_MCP_RESOURCE_TEMPLATES_TOOL, MIN_TASK_HEARTBEAT_MS, ModelRuntime, QuestionnaireSession, READ_MCP_RESOURCE_TOOL, SNAPSHOT_DENY_PATTERNS, SNAPSHOT_IGNORE_FILE, SNAPSHOT_KEY_FILE_PATTERNS, TASK_COMPLETION_MESSAGE_TYPE, TASK_HEARTBEAT_MESSAGE_TYPE, TOOL_SEARCH_TOOL_NAME, TaskCompletionOutbox, WORKSPACE_BINDING_ENTRY_TYPE, WORKSPACE_WRITE_TOOL_NAMES, abortTurnRetries, acquireWorkspaceWriterLease, activatesOnRegistration, admitPooledWorktree, adoptPrebuiltSeed, agentSessionModelsMethods, agentSessionRetryMethods, applyToolLoadout, assertRpcSuccess, assertSessionManagerInWorktreeAsync, authForStream, bindSessionWorkspace, bindingOf, blueprintPlatformOf, buildItemsForQuestion, buildSessionMemoryGuideline, buildSessionOptions, buildSkillCatalog, buildSkillCatalogAsync, buildSkillCatalogWith, buildSystemPrompt, buildSystemPromptSections, cancelFirstPromptModel, captureLocatedCheckout, captureWorktreeSnapshot, carryOverDegradedWork, checkResumeStoragePreconditions, childOfAttempt, chunkedAnswerContent, chunkedAnswerHeader, chunkedBranchState, chunkedChildHeading, chunkedEntryHasId, chunkedForkLink, chunkedPrefixFields, chunkedResumeProjection, chunkedTaskDetailFields, chunkedToolResult, chunkedToolResultEntry, chunkedTreeOutline, claimIdleWorktree, clearExtensionCache, commandOutputExcerpt, completionTitleDescription, completionTitleText, computeDeferExtensions, computeInteractiveEngineResourceDeferral, computeStartupInputCaptureEnabled, computeStartupTrustPromptPossible, confirmPooledWorktreeLease, copilotAdvertisedFastModelIds, createAskUserQuestionToolDefinition, createAuthInteraction, createHostModuleJiti, createKillTool, createKillToolDefinition, createLoadedAskUserQuestionToolDefinition, createMcpResourceToolDefinitions, createMcpToolDefinition, createMcpToolName, createMcpToolRenderers, createToolNameMatcher, createToolSearchDocument, createToolSearchExtension, createToolSearchToolDefinition, defaultBuiltinExtensions, defaultResumePreflightIo, deferFirstPromptModel, deriveFastModelVariants, diffSystemPromptSections, discardPooledWorktree, emitProjectTrustEvent, emptySkillCatalog, enablePrintModelSelection, engineExtensionsCanDecide, ensureDefaultLazyBuiltinsRegistered, ensureRetryPromise, evictIdleWorktrees, executeNativePty, executeSupervisedCommand, expandPromptTemplate, expandSkillCommand, extensionLoaderTestHooks, extensionsCanDecideProjectTrust, fastModelId, findInitialModel, finishedSubagentResumeText, firstSubagentAttempt, forkSeedFields, formatScopedModelList, formatSkillsForPrompt, formatTaskHeartbeatDuration, formatTaskHeartbeatStatus, getExistingGitInstallPathAsync, getManagedNpmInstallPath, getModelFastRoute, getSkillCatalog, gitText, gitUnavailableProblem, hasPrintModelSelection, holdRestoredWorktree, holdsSessionSnapshotRef, hostPlatform, inheritWorkspace, insideThroughDirectories, isBoundWorkspace, isDegradableRestoreFailure, isDeniedSnapshotPath, isHeadOnlyAdvance, isMcpToolName, isNativeFastRouteApi, isOAuthLoginCancelled, isRecoverableRestoreFailure, isRegisteredToolAllowed, isResumableStop, isRetiredToolName, isToolActivatable, isToolDeclarationHidden, keepSessionSnapshotCommit, latestSubagentAttempt, latestSubagentAttempts, loadExtensionModule, loadPromptsStageAsync, loadSkills, loadSkillsFromDir, loadSkillsStageAsync, loadSnapshotPathPolicy, loadThemesStageAsync, locateCheckout, loginIsolatedApiKeyProvider, loginIsolatedOAuthProvider, loginRuntimeOAuthProvider, markRuntimeStreamFunction, mergeHeaders, messageHeadIn, messageRoleIn, namesSessionFolderInGuidelines, nextCaptureTick, normalizeBuildSystemPromptOptions, normalizeOAuthLoginError, nulFields, objectStorePath, openWorkspaceRepository, parseBlueprint, parseFrontmatter, parseSource, pendingLfsDownload, pendingTaskCompletionIntents, pooledWorktreeHolder, prepareExtensionEntries, preparePromptsCommitAsync, prepareSkillsCommitAsync, prepareThemesCommitAsync, presentQuestionnaire, projectForkMetadata, projectToolLoadout, ranOnModelLine, read, readChunkedWorkflowRunId, readExtensionGraphManifest, readRepositoryConfig, readValue, recordPooledWorktreeState, recordSessionWorkspace, recordWorktreeCapture, releaseRestoredWorktree, releaseSessionSnapshotRefs, releasedWaitingOn, removeRestoredWorktree, require_dist, require_semver, resolveDeferredStartupModel, resolveRestoredModelReference, resolveToolNames, resolveUpstreamModelId, resolveWorkspace, restoreBestWorktree, restoreDegradedWorktree, restoreDegradedWorktreeAt, restoreWorkspace, restoreWorktree, restoreWorktreeAt, restoreWorktreeSnapshot, resumableSubagentResult, retireSessionSnapshotRefs, retryIsCurrent, runBeforeAgentStartHandlers, runBeforeProviderRequestHandlers, runBoundaryHandlers, runContextHandlers, runGenericHandlers, runGit, runInputHandlers, runMessageEndHandlers, runResourcesDiscoverHandlers, runSessionRecoveryHandlers, runToolCallHandlers, runToolResultHandlers, runUserBashHandlers, seedDirectory, seedManifestPath, seedPathSegments, selectDocument, selectedToolNames, sessionAccountCheckpoint, setAsideWorktree, setWorktreeSnapshotGit, settledTaskResumeId, skip, snapshotEventHandlers, snapshotRestoreWarnings, startupErrorHandlerTokens, storagePreconditionProblems, storeCheckoutHead, streamWithFastRoute, stringValue, stripFrontmatter, subagentResumeId, supersededSettledAttempts, taskCompletionMessage, taskHeartbeatKindLabel, taskNoticeLine, uncachedCopilotModelHint, unresolvedFallbackModelDiagnostics, unrestoredRecord, updatePromptsFromPathsAsync, updateSkillsFromPathsAsync, updateThemesFromPathsAsync, useExtensionCacheCwd, usesAnthropicFastMode, usesChatGptCodexTransport, usesFirstPartyCodexRouting, usesOpenAIFastServiceTier, usesXaiFastServiceTier, validateBashWait, validateTaskHeartbeatMs, verifyWorktree$1 as verifyWorktree, waitForSupervisedCommand, waitingReleasedShells, waitingReleasedTools, withCodexFastRouteHeaders, withDefaultBuiltinExtensions, withFastModelVariants, withFastRouteStreamOptions, withScratchDirectory, withSeedLock, withoutSupersededAttempts, workspaceSandboxDenial, workspaceSessionCwd, workspaceSessionCwdAsync, worktreeSetAside, writeSeedManifest, writeWorkingTree };
|
|
27898
28126
|
|
|
27899
|
-
//# sourceMappingURL=startup-0-5-OHJNE6JH.js.map
|
|
28127
|
+
//# sourceMappingURL=startup-0-5-OHJNE6JH.js.map
|
|
28128
|
+
// __atomicOnDemandFailed: written by the build (scripts/in-place-update-gate.mjs). An import of this release's code on
|
|
28129
|
+
// demand that fails in a process an in-place update left running says to restart.
|
|
28130
|
+
function __atomicOnDemandFailed(error, feature) {
|
|
28131
|
+
return (async () => {
|
|
28132
|
+
const root = new URL("../", import.meta.url);
|
|
28133
|
+
const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
|
|
28134
|
+
const key = `${root.href}#0.10.5-alpha.1`;
|
|
28135
|
+
let release = releases.get(key);
|
|
28136
|
+
if (release === undefined) {
|
|
28137
|
+
const current = (async () => {
|
|
28138
|
+
for (const path of ["modes/interactive/interactive-mode-deps.js","_shared/chunk-CDOYTDYM.js","_shared/p0-cli-GUFK7TPN.js"]) {
|
|
28139
|
+
try {
|
|
28140
|
+
const held = await import(new URL(path, root).href);
|
|
28141
|
+
if (typeof held.VERSION === "string") return { version: held.VERSION, name: held.APP_NAME };
|
|
28142
|
+
} catch {
|
|
28143
|
+
// Not a file this process can load: the next.
|
|
28144
|
+
}
|
|
28145
|
+
}
|
|
28146
|
+
return undefined;
|
|
28147
|
+
})().then((found) => {
|
|
28148
|
+
if (found === undefined && releases.get(key) === current) releases.delete(key);
|
|
28149
|
+
return found;
|
|
28150
|
+
});
|
|
28151
|
+
releases.set(key, current);
|
|
28152
|
+
release = current;
|
|
28153
|
+
}
|
|
28154
|
+
const running = await release;
|
|
28155
|
+
let installed;
|
|
28156
|
+
try {
|
|
28157
|
+
const { readFile } = process.getBuiltinModule("node:fs/promises");
|
|
28158
|
+
installed = JSON.parse(await readFile(new URL("../package.json", root), "utf8")).version;
|
|
28159
|
+
} catch {
|
|
28160
|
+
// No installation to read, as in a bundle of the package: the release the process runs decides.
|
|
28161
|
+
}
|
|
28162
|
+
const updatedTo = typeof installed === "string" && installed !== "0.10.5-alpha.1" ? installed : running !== undefined && running.version !== "0.10.5-alpha.1" ? "0.10.5-alpha.1" : undefined;
|
|
28163
|
+
if (updatedTo === undefined) throw error;
|
|
28164
|
+
const application = typeof running?.name === "string" ? running.name : "atomic";
|
|
28165
|
+
const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {
|
|
28166
|
+
cause: error,
|
|
28167
|
+
});
|
|
28168
|
+
restart.name = "UpdatedInstallError";
|
|
28169
|
+
restart[Symbol.for("atomic.on-demand-restart.v1")] = { application, updatedTo, feature };
|
|
28170
|
+
throw restart;
|
|
28171
|
+
})();
|
|
28172
|
+
}
|