@bastani/atomic 0.10.17 → 0.10.18-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.
Files changed (282) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/_shared/dist-KOELCESV.js +2 -2
  3. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  4. package/dist/_shared/lib-4PES5P4V.js +2 -2
  5. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +6 -6
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  7. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +16 -4
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  9. package/dist/_shared/mode-shared-2QJSCUM6.js +16 -9
  10. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  11. package/dist/_shared/p0-cli-BB45ZQY6.js +1 -0
  12. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  13. package/dist/_shared/p1a-prewarm-XIU57JHF.js +4 -3
  14. package/dist/_shared/p1a-prewarm-XIU57JHF.js.map +1 -1
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js +1 -1
  16. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  17. package/dist/_shared/runtime-O4KCSG4C.js +2 -2
  18. package/dist/_shared/sdk-OHKMDJ74.js +11 -7
  19. package/dist/_shared/sdk-OHKMDJ74.js.map +1 -1
  20. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  21. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  22. package/dist/_shared/{startup-0-0-ERMIDHQT.js → startup-0-0-OV6RAEAP.js} +338 -75
  23. package/dist/_shared/startup-0-0-OV6RAEAP.js.map +1 -0
  24. package/dist/_shared/{startup-0-1-RTASI3HG.js → startup-0-1-EZAJI6RE.js} +82 -5
  25. package/dist/_shared/startup-0-1-EZAJI6RE.js.map +1 -0
  26. package/dist/_shared/startup-0-2-YZZOC22D.js +4 -4
  27. package/dist/_shared/startup-0-3-DE2NCS6A.js +4 -4
  28. package/dist/_shared/startup-0-4-ZMJV547D.js +10 -6
  29. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -1
  30. package/dist/_shared/startup-0-5-HZX3ZPTP.js +41 -10
  31. package/dist/_shared/startup-0-5-HZX3ZPTP.js.map +1 -1
  32. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  33. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  34. package/dist/_shared/startup-12-0-55AAXBJZ.js +1 -1
  35. package/dist/_shared/startup-14-0-MLX36RBG.js +2 -2
  36. package/dist/_shared/startup-15-0-YUKGAC63.js +2 -2
  37. package/dist/_shared/startup-15-1-4S7FLMNG.js +261 -75
  38. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  39. package/dist/_shared/startup-8-0-34CBHPZH.js +23 -8
  40. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  41. package/dist/_shared/startup-8-1-LZFXSD3Z.js +328 -19
  42. package/dist/_shared/startup-8-1-LZFXSD3Z.js.map +1 -1
  43. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  44. package/dist/_shared/storage-status-K7PX2RXA.js +2 -2
  45. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  46. package/dist/_shared/team-DOQKICG2.js +1 -1
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  49. package/dist/builtin/intercom/package.json +1 -1
  50. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  51. package/dist/builtin/mcp/package.json +1 -1
  52. package/dist/builtin/subagents/package.json +1 -1
  53. package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
  54. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  55. package/dist/builtin/web-access/package.json +1 -1
  56. package/dist/cli/args.js +2 -2
  57. package/dist/cli/auth-cli.code.js +2 -2
  58. package/dist/cli/auth-cli.impl.js +3 -3
  59. package/dist/cli/auth-cli.js +3 -3
  60. package/dist/cli/blueprint-command.code.js +1 -1
  61. package/dist/cli/blueprint-command.impl.js +3 -3
  62. package/dist/cli/blueprint-command.js +3 -3
  63. package/dist/cli/intercom-command.code.js +2 -2
  64. package/dist/cli/intercom-command.impl.js +3 -3
  65. package/dist/cli/intercom-command.js +3 -3
  66. package/dist/cli/list-models.code.js +2 -2
  67. package/dist/cli/list-models.impl.js +3 -3
  68. package/dist/cli/list-models.js +3 -3
  69. package/dist/cli/session-picker.code.js +1 -1
  70. package/dist/cli/session-picker.impl.js +3 -3
  71. package/dist/cli/session-picker.js +3 -3
  72. package/dist/cli/startup-ui.code.js +1 -1
  73. package/dist/cli/startup-ui.impl.js +3 -3
  74. package/dist/cli/startup-ui.js +3 -3
  75. package/dist/cli/storage-command.impl.js +3 -3
  76. package/dist/cli/storage-command.js +3 -3
  77. package/dist/cli/storage-search-session.code.js +1 -1
  78. package/dist/cli/storage-search-session.impl.js +3 -3
  79. package/dist/cli/storage-search-session.js +3 -3
  80. package/dist/cli/team-command.code.js +1 -1
  81. package/dist/cli/team-command.impl.js +3 -3
  82. package/dist/cli/team-command.js +3 -3
  83. package/dist/cli.js +2 -2
  84. package/dist/core/debug.impl.js +3 -3
  85. package/dist/core/debug.js +3 -3
  86. package/dist/core/export-html/card-projection.impl.js +3 -3
  87. package/dist/core/export-html/card-projection.js +3 -3
  88. package/dist/core/export-html/index.code.js +2 -2
  89. package/dist/core/export-html/index.impl.js +3 -3
  90. package/dist/core/export-html/index.js +3 -3
  91. package/dist/core/export-html/json-spans.impl.js +3 -3
  92. package/dist/core/export-html/json-spans.js +3 -3
  93. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  94. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  95. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  96. package/dist/core/export-html/tool-renderer.js +3 -3
  97. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  98. package/dist/core/extensions/jiti-loader.js +3 -3
  99. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  100. package/dist/core/extensions/jiti-static-loader.js +3 -3
  101. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  102. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  103. package/dist/core/extensions/loader-host-modules.js +3 -3
  104. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  105. package/dist/core/extensions/runner-context.js +1 -1
  106. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  107. package/dist/core/intercom-broker-control-host.js +3 -3
  108. package/dist/core/intercom-broker-control.code.js +3 -3
  109. package/dist/core/intercom-broker-control.impl.js +3 -3
  110. package/dist/core/intercom-broker-control.js +3 -3
  111. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  112. package/dist/core/package-manager-storage-adapters.js +3 -3
  113. package/dist/core/sdk.code.js +2 -2
  114. package/dist/core/sdk.impl.js +3 -3
  115. package/dist/core/sdk.js +3 -3
  116. package/dist/core/session-append-recovery.d.ts +3 -3
  117. package/dist/core/session-manager-core.d.ts +1 -1
  118. package/dist/core/session-manager-core.js +14 -13
  119. package/dist/core/session-manager-core.js.map +1 -1
  120. package/dist/core/session-manager-list.impl.js +3 -3
  121. package/dist/core/session-manager-list.js +3 -3
  122. package/dist/core/session-manager.code.js +1 -1
  123. package/dist/core/session-manager.impl.js +3 -3
  124. package/dist/core/session-manager.js +3 -3
  125. package/dist/core/session-storage.impl.js +3 -3
  126. package/dist/core/session-storage.js +3 -3
  127. package/dist/core/storage/errors.d.ts +8 -5
  128. package/dist/core/storage/errors.js +5 -3
  129. package/dist/core/storage/errors.js.map +1 -1
  130. package/dist/core/storage/index.js +2 -2
  131. package/dist/core/storage/node-sqlite-thread.js +2 -2
  132. package/dist/core/storage/node-sqlite.js +2 -2
  133. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  134. package/dist/core/storage/offline-snapshot-file.js +3 -3
  135. package/dist/core/storage/provider.js +2 -2
  136. package/dist/core/storage/selection.js +2 -2
  137. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  138. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  139. package/dist/core/storage/session/branch-fork-source.js +3 -3
  140. package/dist/core/storage/session/card-view.impl.js +3 -3
  141. package/dist/core/storage/session/card-view.js +3 -3
  142. package/dist/core/storage/session/child-reader.code.js +3 -3
  143. package/dist/core/storage/session/child-reader.impl.js +3 -3
  144. package/dist/core/storage/session/child-reader.js +3 -3
  145. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  146. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  147. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  148. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  149. package/dist/core/storage/session/expanded-child-details.js +3 -3
  150. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  151. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  152. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  153. package/dist/core/storage/session/fork-row-index.js +3 -3
  154. package/dist/core/storage/session/fork-staging.code.js +1 -1
  155. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  156. package/dist/core/storage/session/fork-staging.js +3 -3
  157. package/dist/core/storage/session/fork-window.code.js +3 -3
  158. package/dist/core/storage/session/fork-window.impl.js +3 -3
  159. package/dist/core/storage/session/fork-window.js +3 -3
  160. package/dist/core/storage/session/history-pages.impl.js +3 -3
  161. package/dist/core/storage/session/history-pages.js +3 -3
  162. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  163. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  164. package/dist/core/storage/session/jsonl-session-store.d.ts +1 -0
  165. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  166. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  167. package/dist/core/storage/session/memory-session-store.d.ts +1 -0
  168. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  169. package/dist/core/storage/session/memory-session-store.js +3 -3
  170. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  171. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  172. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  173. package/dist/core/storage/session/released-history-files.code.js +2 -2
  174. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  175. package/dist/core/storage/session/released-history-files.js +3 -3
  176. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  177. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  178. package/dist/core/storage/session/session-resume.impl.js +3 -3
  179. package/dist/core/storage/session/session-resume.js +3 -3
  180. package/dist/core/storage/session/session-summary.d.ts +9 -1
  181. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  182. package/dist/core/storage/session/snapshot-cut.js +3 -3
  183. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  184. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  185. package/dist/core/storage/session/snapshot-history.js +3 -3
  186. package/dist/core/storage/session/sql-session-store.d.ts +1 -0
  187. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  188. package/dist/core/storage/session/sql-session-store.js +3 -3
  189. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  190. package/dist/core/storage/session/tree-outline.js +3 -3
  191. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  192. package/dist/core/storage/session/tree-presentation.js +3 -3
  193. package/dist/core/storage/session/types.d.ts +1 -0
  194. package/dist/core/storage/sqlite-facade.js +6 -1
  195. package/dist/core/storage/sqlite-facade.js.map +1 -1
  196. package/dist/core/storage/storage-status.impl.js +3 -3
  197. package/dist/core/storage/storage-status.js +3 -3
  198. package/dist/core/storage/team.impl.js +3 -3
  199. package/dist/core/storage/team.js +3 -3
  200. package/dist/core/structured-output/index.impl.js +3 -3
  201. package/dist/core/structured-output/index.js +3 -3
  202. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  203. package/dist/core/tasks/task-completion-entry.js +3 -3
  204. package/dist/core/tasks/task-file-history.code.js +3 -3
  205. package/dist/core/tasks/task-file-history.impl.js +3 -3
  206. package/dist/core/tasks/task-file-history.js +3 -3
  207. package/dist/core/tasks/task-reference-archive.code.js +3 -3
  208. package/dist/core/tasks/task-reference-archive.js +3 -3
  209. package/dist/core/tasks/task-reference-identity.js +3 -3
  210. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  211. package/dist/core/tasks/task-reference-stream.js +3 -3
  212. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  213. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  214. package/dist/core/tasks/task-view-source.impl.js +3 -3
  215. package/dist/core/tasks/task-view-source.js +3 -3
  216. package/dist/core/tools/history-session.d.ts +1 -1
  217. package/dist/core/tools/output-accumulator.d.ts +3 -0
  218. package/dist/core/tools/read-url.code.js +2 -2
  219. package/dist/core/tools/read-url.impl.js +3 -3
  220. package/dist/core/tools/read-url.js +3 -3
  221. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  222. package/dist/core/worktree-snapshot/errors.code.js +2 -2
  223. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  224. package/dist/core/worktree-snapshot/errors.js +3 -3
  225. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  226. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  227. package/dist/extensions/codemode/execute.code.js +1 -1
  228. package/dist/extensions/codemode/execute.impl.js +3 -3
  229. package/dist/extensions/codemode/execute.js +3 -3
  230. package/dist/extensions/codemode/renderer.code.js +1 -1
  231. package/dist/extensions/codemode/renderer.impl.js +3 -3
  232. package/dist/extensions/codemode/renderer.js +3 -3
  233. package/dist/extensions/mcp/cli.code.js +1 -1
  234. package/dist/extensions/mcp/cli.impl.js +3 -3
  235. package/dist/extensions/mcp/cli.js +3 -3
  236. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  237. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  238. package/dist/extensions/mcp/cli.lazy.js +3 -3
  239. package/dist/extensions/mcp/runtime.impl.js +3 -3
  240. package/dist/extensions/mcp/runtime.js +3 -3
  241. package/dist/index.js +2 -2
  242. package/dist/main-first-time-setup.code.js +1 -1
  243. package/dist/main-first-time-setup.impl.js +3 -3
  244. package/dist/main-first-time-setup.js +3 -3
  245. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  246. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  247. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  248. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  249. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  250. package/dist/modes/interactive/interactive-mode-helpers.d.ts +8 -1
  251. package/dist/modes/interactive-engine/isolated-runtime.d.ts +21 -0
  252. package/dist/modes/interactive-engine/protocol.d.ts +6 -0
  253. package/dist/modes/rpc/rpc-client.d.ts +2 -0
  254. package/dist/package-manager-cli.code.js +4 -4
  255. package/dist/package-manager-cli.impl.js +3 -3
  256. package/dist/package-manager-cli.js +3 -3
  257. package/dist/rpc-entry.js +1 -1
  258. package/dist/startup-files.json +1 -1
  259. package/dist/startup-stages/4.js +1 -1
  260. package/dist/startup-stages/6.js +1 -1
  261. package/dist/utils/interactive-engine-bootstrap.d.ts +2 -0
  262. package/dist/utils/interactive-engine-env.d.ts +2 -0
  263. package/dist/utils/startup-database-spare.code.js +2 -2
  264. package/dist/utils/startup-database-spare.impl.js +3 -3
  265. package/dist/utils/startup-database-spare.js +3 -3
  266. package/dist/utils/tools-manager.code.js +1 -1
  267. package/dist/utils/tools-manager.impl.js +3 -3
  268. package/dist/utils/tools-manager.js +3 -3
  269. package/docs/changelog.mdx +1 -1
  270. package/docs/guides/resume-on-any-machine.md +1 -1
  271. package/docs/reference/cli.md +1 -1
  272. package/docs/sdk.md +2 -1
  273. package/docs/sessions.md +5 -2
  274. package/docs/settings.md +1 -0
  275. package/docs/storage/custom-adapters.md +1 -1
  276. package/docs/storage/postgres/pgbouncer.md +3 -1
  277. package/docs/storage/postgres.md +41 -7
  278. package/docs/storage.md +4 -2
  279. package/docs/tools.md +1 -0
  280. package/package.json +8 -8
  281. package/dist/_shared/startup-0-0-ERMIDHQT.js.map +0 -1
  282. package/dist/_shared/startup-0-1-RTASI3HG.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { __name } from "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { APP_NAME, BUILTIN_PACKAGE_DIR_NAMES, CONFIG_DIR_NAME, ENV_CLEAR_ON_SHRINK, ENV_HARDWARE_CURSOR, INTERACTIVE_ENGINE_BOOTSTRAP_FLAG, addHostStorageAdapter, canonicalizePath as canonicalizePath$1, createChildProcessEnvironment, flushPersistentCompileCache, formatPathRelativeToCwdOrAbsolute, getAgentConfigPaths, getAgentDir, getAgentDirs, getBinDir, getBlueprintActionsDir, getCwdRelativePath, getEnvValue, getGlobalBlueprintPath, getHomeDir, getProjectBlueprintPath, getProjectConfigPaths, getReadmePath, hostStorageAdapter, isBunBinary, isBunRuntime, isChildProcessExitStatusUnknownError, isLocalPath, markLifecycleTiming, normalizePath, removeOwnedInteractiveEngineBootstrapAsync, resolvePath, shortenHomePath, splitBom, stripBom, waitForChildProcess, writeInteractiveEngineBootstrapAsync } from "./p0-cli-BB45ZQY6.js";
3
- import { BLUEPRINT_CONTEXT_TYPE, BlueprintBuildFailedError, BlueprintError, BlueprintInvalidError, BlueprintStepFailedError, BlueprintStepTimedOutError, BlueprintUsesUnsupportedError, CACHE_WARMING_MODES, COMMAND_FOREGROUND_BUDGET_MS, CompactionConfigError, DEFAULT_BUILTIN_SELECTION_EXTRA_TOOLS, DEFAULT_MAX_BYTES, EditInputError, EditMatchError, EditTargetError, FileToolAbortedError, HostListenerFailures, LONG_LIVED_COMMANDS, Minimatch, RESTART_CANCELLED_MESSAGE, STALE_EXTENSION_CONTEXT_MESSAGE, ShellTimeoutError, SqliteSelectorConnection, SubscriptionChildUnavailableError, SubscriptionClosedError, SubscriptionConfigError, TASK_MARKS, TaskMessageError, TaskMessageTimeoutError, WriteSelectorError, activeToolExecutionStarts, allToolNames, announceBlueprintBuildWaiting, applyBashSessionEnvironment, asyncScope, attachJsonlLineReader, attachLineReader, bindSavedTaskOrigins, blueprintBuildShared, canonicalEventBusFor, chatPosition, clearAssignmentIfClosed, clearLockHolder, clearLockHolderAsync, convertBufferWithMarkit, convertFileWithMarkit, createGitEnvironment, defaultToolNamesFor, defineTool, detectSupportedImageMimeTypeFromFile, displayTodoId, entryLines, expandSearchUrl, experimentalToolSamplingProperty, filterSearchOutputByLineRange, formatReadLineRange as formatReadLineRange$1, formatSelectedLines, formatSize, formatTimeoutSeconds as formatTimeoutSeconds$1, formatTodoId, frozenClocks, getManifestFromPackageJson, getTextOutput, getTodoPath, getTodoStatus, getTodoTitle, getTodosDir, getTodosDirLabel, getToolListError, handOverBuildTimings, holdDeprecationWarnings, holdToolsUntilBuilt, hostInputError, invalidArgText, invalidateNativeSearchCache, isBlueprintError, isGitProvisionError, isGitUnavailableError, isPathInside, isPlainObject as isPlainObject$1, isReadResourceSelector, isReadableUrlPath, isTodoClosed, isToolModifier, isValidBudgetMs, keptTaskHint, linkPath, literalPathLike, loadNativeSearchBinding, mergeReadRanges, nativeModuleProblem, normalizePathLikeInput, normalizeTodoId, normalizeWaitPolicy, noteSavedSeq, originalHistoryNote, prepareLockTakeover, prepareWaitableToolInput, projectTrustHandlerRegistered, projectTrustedBeforeExtensions, readTaskOutputTail, receiveChatReceipt, recordLockHolder, recordLockHolderAsync, registerCanonicalEventBus, releaseDeprecationWarnings, renderBlueprintContext, renderToolPath, replaceTabs, reportContained, resolvePhysicalPathAsync, savedReadLines, scopedBackgroundTasks, searchPosition, selectExactReadRanges, selectReadRanges, serializeJsonLine, settingsFileNoticeKey, settingsInternals, shortenPath, sleep, sliceHead, snapshotBashSessionEnvironment, sortTodos, spawnHostProcess, splitLineRangeSelector, splitPathLikeGlob, splitReadLineSelector, splitTodosByAssignment, startShellDeadline, startToolTimer, str, stringEntries, takeOverDeadHolder, takeOverDeadHolderAsync, takeQueuedDeliveryChange, taskResumer, timestamp, toolTimerText, transcriptHeaderLines, truncateHead, truncateLine, validateTodoId, warnDeprecation, withFileMutationQueue, withResolvingFileMutationQueue } from "./startup-0-0-ERMIDHQT.js";
4
- import { EMPTY_OUTPUT_TEXT, HistorySearchPositions, MAX_INDEXED_ENTRY_CHARS, ResumeTimingsRecorder, SEARCH_PART_CHARS, SessionStorageSelectionSchema, TaskElapsedClocks, TaskToolError, WorkspaceDriftError, WorkspaceRestoreError, WorkspaceSnapshotError, bindTaskClock, bindTaskClockSource, blueprintDigest, buildDirectoryTree, buildDirectoryTreeFromOperations, cancelReceiptSentence, captureRegistrationInvocation, compareCreated, compareFrozen, conflictEntries, convertToLlm, createBranchSummaryMessage, createCustomMessage, diffLines, ensureTool, execCommand, findWorkspaceError, formatResumeTimings, invocationExtension, invocationRuntime, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspaceSnapshotError, lifecycleScopeForOwner, normalizeAzureSettings, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseInteractiveEngineMessage, parseSkillUri, presentTaskError, prewarmModelApi, readConflictUrl, readLedger, readLocalFileChunks, recordBlueprintStep, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, renderTodoCall, renderTodoResult, repositoryKey, resolveInstalledGit, resolveInvocationRuntime, rootKey, selectReadLinesFromChunks, selectReadLinesFromList, serializeInteractiveEngineFrame, serializeTodoForAgent, serializeTodoListForAgent, sessionPosition, settingsWriteOwner, splitSearchTextParts, startupSourceId, taskClockOf, taskClockRunning, timeCheckoutRestore, unpackIds, unreadablePathError, updateLedger, validateEventSource, validateSubscriptionAdmission, waitResultTail, waitStatus, withWorktreeLockProgress, withoutSearchPosition, workspaceKey, writeRenderers } from "./startup-0-1-RTASI3HG.js";
3
+ import { BLUEPRINT_CONTEXT_TYPE, BlueprintBuildFailedError, BlueprintError, BlueprintInvalidError, BlueprintStepFailedError, BlueprintStepTimedOutError, BlueprintUsesUnsupportedError, CACHE_WARMING_MODES, COMMAND_FOREGROUND_BUDGET_MS, CompactionConfigError, DEFAULT_BUILTIN_SELECTION_EXTRA_TOOLS, DEFAULT_MAX_BYTES, EditInputError, EditMatchError, EditTargetError, FileToolAbortedError, HostListenerFailures, LONG_LIVED_COMMANDS, Minimatch, RESTART_CANCELLED_MESSAGE, STALE_EXTENSION_CONTEXT_MESSAGE, ShellTimeoutError, SqliteSelectorConnection, SubscriptionChildUnavailableError, SubscriptionClosedError, SubscriptionConfigError, TASK_MARKS, TaskMessageError, TaskMessageTimeoutError, WriteSelectorError, activeToolExecutionStarts, allToolNames, announceBlueprintBuildWaiting, applyBashSessionEnvironment, asyncScope, attachJsonlLineReader, attachLineReader, bindSavedTaskOrigins, blueprintBuildShared, canonicalEventBusFor, chatPosition, clearAssignmentIfClosed, clearLockHolder, clearLockHolderAsync, convertBufferWithMarkit, convertFileWithMarkit, createGitEnvironment, defaultToolNamesFor, defineTool, detectSupportedImageMimeTypeFromFile, displayTodoId, expandSearchUrl, experimentalToolSamplingProperty, filterSearchOutputByLineRange, formatReadLineRange as formatReadLineRange$1, formatSelectedLines, formatSize, formatTimeoutSeconds as formatTimeoutSeconds$1, formatTodoId, frozenClocks, getManifestFromPackageJson, getTextOutput, getTodoPath, getTodoStatus, getTodoTitle, getTodosDir, getTodosDirLabel, getToolListError, handOverBuildTimings, holdDeprecationWarnings, holdToolsUntilBuilt, hostInputError, invalidArgText, invalidateNativeSearchCache, isBlueprintError, isGitProvisionError, isGitUnavailableError, isPathInside, isPlainObject as isPlainObject$1, isReadResourceSelector, isReadableUrlPath, isTodoClosed, isToolModifier, isValidBudgetMs, keptTaskHint, linkPath, literalPathLike, loadNativeSearchBinding, mergeReadRanges, nativeModuleProblem, normalizePathLikeInput, normalizeTodoId, normalizeWaitPolicy, noteSavedSeq, originalHistoryNote, prepareLockTakeover, prepareWaitableToolInput, projectTrustHandlerRegistered, projectTrustedBeforeExtensions, readTaskOutputTail, receiveChatReceipt, recordLockHolder, recordLockHolderAsync, registerCanonicalEventBus, releaseDeprecationWarnings, renderBlueprintContext, renderToolPath, replaceTabs, reportContained, resolvePhysicalPathAsync, savedReadLines, scopedBackgroundTasks, searchPosition, selectExactReadRanges, selectReadRanges, serializeJsonLine, settingsFileNoticeKey, settingsInternals, shortenPath, sleep, sliceHead, snapshotBashSessionEnvironment, sortTodos, spawnHostProcess, splitLineRangeSelector, splitPathLikeGlob, splitReadLineSelector, splitTodosByAssignment, startShellDeadline, startToolTimer, str, stringEntries, takeOverDeadHolder, takeOverDeadHolderAsync, takeQueuedDeliveryChange, taskResumer, toolTimerText, truncateHead, truncateLine, validateTodoId, warnDeprecation, withFileMutationQueue, withResolvingFileMutationQueue } from "./startup-0-0-OV6RAEAP.js";
4
+ import { EMPTY_OUTPUT_TEXT, HistorySearchPositions, MAX_INDEXED_ENTRY_CHARS, ResumeTimingsRecorder, SEARCH_PART_CHARS, SessionStorageSelectionSchema, TaskElapsedClocks, TaskToolError, WorkspaceDriftError, WorkspaceRestoreError, WorkspaceSnapshotError, bindTaskClock, bindTaskClockSource, blueprintDigest, buildDirectoryTree, buildDirectoryTreeFromOperations, cancelReceiptSentence, captureRegistrationInvocation, compareCreated, compareFrozen, conflictEntries, convertToLlm, createBranchSummaryMessage, createCustomMessage, diffLines, ensureTool, entryLines, execCommand, findWorkspaceError, formatResumeTimings, invocationExtension, invocationRuntime, isWorkspaceConfigError, isWorkspaceDriftError, isWorkspaceError, isWorkspaceGitError, isWorkspaceSnapshotError, lifecycleScopeForOwner, normalizeAzureSettings, openEventSubscription, originalRegistrationCallback, ownedSettingsManagers, parseArgs, parseConflictBytes, parseInteractiveEngineMessage, parseSkillUri, presentTaskError, prewarmModelApi, readConflictUrl, readLedger, readLocalFileChunks, recordBlueprintStep, recordResumeTimings, recordSettingsWrite, refreshConflictFile, registerConflictBlocks, registerFactoryStartupHandler, renderTodoCall, renderTodoResult, repositoryKey, resolveInstalledGit, resolveInvocationRuntime, rootKey, selectReadLinesFromChunks, selectReadLinesFromList, serializeInteractiveEngineFrame, serializeTodoForAgent, serializeTodoListForAgent, sessionPosition, settingsWriteOwner, splitSearchTextParts, startupSourceId, taskClockOf, taskClockRunning, timeCheckoutRestore, timestamp, transcriptHeaderLines, unpackIds, unreadablePathError, updateLedger, validateEventSource, validateSubscriptionAdmission, waitResultTail, waitStatus, withWorktreeLockProgress, withoutSearchPosition, workspaceKey, writeRenderers } from "./startup-0-1-EZAJI6RE.js";
5
5
  import { CodeHighlighter, FS_WATCH_RETRY_DELAY_MS, applyEarlyInputChunk, closeWatcher, getLanguageFromPath, graphemeAt, highlightCode, isSafeFsWatchPathError, keepStartupDialogDraft, migrateKeybindingsConfig, parenthesizedKeyHint, recordTimingLines, sanitizeTerminalText, singleLineDisplayText, slashCommandHint, terminalDisplayText, theme, watchWithErrorHandlerAsync, withEarlyInputHeldForStartupDialog } from "./p2-shell-main-B2WIALFD.js";
6
6
  import { parseJsonFileContent } from "./p1-shared-RG5I5LJ6.js";
7
7
  import { ProjectTrustStore, failureDebugFields, hasProjectTrustInputsAsync, inLockTurn, matchesOnSameLineCI, redactUrlCredentials, releaseLock, releaseLockSync, renameReplacing, renameReplacingAsync, renameWithRetry, reportDebugAsync, waitForLock, waitForLockSync } from "./p1b-elig-BY2G5BUE.js";
@@ -12618,7 +12618,9 @@ function createBashToolDefinition(cwd, options, presentation = BASH_SHELL_PRESEN
12618
12618
  const executionContext = strippedCdContext ?? spawnContext;
12619
12619
  const output = new OutputAccumulator({
12620
12620
  tempFilePrefix: presentation.tempFilePrefix,
12621
- tempDir: resolveSessionTempDir()
12621
+ tempDir: resolveSessionTempDir(),
12622
+ sanitizeTerminalOutput: bashCommand.pty === true,
12623
+ normalizeCr: bashCommand.pty === true
12622
12624
  });
12623
12625
  let acceptingOutput = true;
12624
12626
  let updateTimer;
@@ -12636,7 +12638,7 @@ function createBashToolDefinition(cwd, options, presentation = BASH_SHELL_PRESEN
12636
12638
  }],
12637
12639
  details: {
12638
12640
  truncation: snapshot.truncation.truncated ? snapshot.truncation : void 0,
12639
- fullOutputPath: snapshot.fullOutputPath
12641
+ fullOutputPath: snapshot.truncation.truncated ? snapshot.fullOutputPath : void 0
12640
12642
  }
12641
12643
  });
12642
12644
  };
@@ -13078,10 +13080,315 @@ function wrapLine(line) {
13078
13080
  return parts;
13079
13081
  }
13080
13082
 
13083
+ const MAX_VT_CONTROL_STRING_LENGTH = 4096;
13084
+
13085
+ function isControlStringIntroducer8Bit(code) {
13086
+ return code === 0x90 || code === 0x98 || code === 0x9d || code === 0x9e || code === 0x9f;
13087
+ }
13088
+
13089
+ function isControlStringIntroducer7Bit(code) {
13090
+ return code === 0x50 || code === 0x58 || code === 0x5d || code === 0x5e || code === 0x5f;
13091
+ }
13092
+
13093
+ function isControlStringTerminator(code) {
13094
+ return code === 0x07 || code === 0x9c || code === 0x18 || code === 0x1a;
13095
+ }
13096
+
13097
+ function isEscIntermediate(code) {
13098
+ return code >= 0x20 && code <= 0x2f;
13099
+ }
13100
+
13101
+ function isEscapeFinal(code) {
13102
+ return (
13103
+ code === 0x5c ||
13104
+ (code >= 0x30 && code <= 0x39) ||
13105
+ (code >= 0x41 && code <= 0x50) ||
13106
+ (code >= 0x52 && code <= 0x54) ||
13107
+ code === 0x5a ||
13108
+ code === 0x63 ||
13109
+ (code >= 0x66 && code <= 0x6e) ||
13110
+ (code >= 0x71 && code <= 0x75) ||
13111
+ code === 0x79 ||
13112
+ code === 0x3c ||
13113
+ code === 0x3d ||
13114
+ code === 0x3e ||
13115
+ code === 0x7e
13116
+ );
13117
+ }
13118
+
13119
+ function isCsiBody(code) {
13120
+ return code >= 0x20 && code <= 0x3f;
13121
+ }
13122
+
13123
+ function isCsiFinal(code) {
13124
+ return code >= 0x40 && code <= 0x7e;
13125
+ }
13126
+
13127
+ function isCsiRowBreakFinal(code) {
13128
+ return code === 0x48 || code === 0x66 || code === 0x4a || code === 0x45;
13129
+ }
13130
+
13131
+ function isEscInterFinal(code) {
13132
+ return code >= 0x30 && code <= 0x7e;
13133
+ }
13134
+
13135
+ function containsVtIntroducer(text) {
13136
+ for (let i = 0; i < text.length; i++) {
13137
+ const code = text.charCodeAt(i);
13138
+ if (code === 0x1b || code === 0x9b || isControlStringIntroducer8Bit(code)) return true;
13139
+ }
13140
+ return false;
13141
+ }
13142
+
13143
+ function normalizeVtText(text) {
13144
+ if (!containsVtIntroducer(text)) return text;
13145
+ let vtState = 0;
13146
+ let ctrlLen = 0;
13147
+ let ctrlHighSurrogate = false;
13148
+ let lineHadVt = false;
13149
+ let lineHasContent = false;
13150
+ let trailingSpaces = 0;
13151
+ let skipNextLf = false;
13152
+ let vtBlankCap = false;
13153
+ let blankRun = 0;
13154
+ let hasEmitted = false;
13155
+ let output = "";
13156
+ const len = text.length;
13157
+
13158
+ const endLineByNewline = (setSkipLf) => {
13159
+ if (lineHadVt) {
13160
+ const hadContent = lineHasContent;
13161
+ const prevBlankRun = blankRun;
13162
+ lineHadVt = false;
13163
+ lineHasContent = false;
13164
+ trailingSpaces = 0;
13165
+ skipNextLf = setSkipLf;
13166
+ vtBlankCap = true;
13167
+ if (hadContent) {
13168
+ blankRun = 0;
13169
+ hasEmitted = true;
13170
+ return "\\n";
13171
+ }
13172
+ if (prevBlankRun === 0) {
13173
+ blankRun = 1;
13174
+ hasEmitted = true;
13175
+ return "\\n";
13176
+ }
13177
+ return "";
13178
+ }
13179
+ const spaces = trailingSpaces;
13180
+ const effContent = lineHasContent || spaces > 0;
13181
+ lineHadVt = false;
13182
+ lineHasContent = false;
13183
+ trailingSpaces = 0;
13184
+ skipNextLf = setSkipLf;
13185
+ if (effContent) {
13186
+ vtBlankCap = false;
13187
+ blankRun = 0;
13188
+ hasEmitted = true;
13189
+ return spaces > 0 ? " ".repeat(spaces) + "\\n" : "\\n";
13190
+ }
13191
+ if (vtBlankCap) {
13192
+ if (blankRun === 0) {
13193
+ blankRun = 1;
13194
+ hasEmitted = true;
13195
+ return "\\n";
13196
+ }
13197
+ return "";
13198
+ }
13199
+ vtBlankCap = false;
13200
+ blankRun = 1;
13201
+ hasEmitted = true;
13202
+ return "\\n";
13203
+ };
13204
+
13205
+ const endLineByCsiRow = () => {
13206
+ const hadContent = lineHasContent;
13207
+ vtState = 0;
13208
+ lineHadVt = true;
13209
+ lineHasContent = false;
13210
+ trailingSpaces = 0;
13211
+ vtBlankCap = true;
13212
+ if (hadContent) {
13213
+ blankRun = 0;
13214
+ hasEmitted = true;
13215
+ return "\\n";
13216
+ }
13217
+ if (hasEmitted && blankRun === 0) {
13218
+ blankRun = 1;
13219
+ return "\\n";
13220
+ }
13221
+ return "";
13222
+ };
13223
+
13224
+ const stepGround = (code, index) => {
13225
+ vtState = 0;
13226
+ if (code === 0x1b) {
13227
+ vtState = 1;
13228
+ lineHadVt = true;
13229
+ return "";
13230
+ }
13231
+ if (code === 0x9b) {
13232
+ vtState = 3;
13233
+ lineHadVt = true;
13234
+ return "";
13235
+ }
13236
+ if (isControlStringIntroducer8Bit(code)) {
13237
+ vtState = 4;
13238
+ ctrlLen = 0;
13239
+ ctrlHighSurrogate = false;
13240
+ lineHadVt = true;
13241
+ return "";
13242
+ }
13243
+ if (code === 0x0a) return endLineByNewline(false);
13244
+ if (code === 0x0d) {
13245
+ if (lineHadVt) return endLineByNewline(true);
13246
+ const prefix = trailingSpaces > 0 ? " ".repeat(trailingSpaces) : "";
13247
+ trailingSpaces = 0;
13248
+ lineHasContent = true;
13249
+ hasEmitted = true;
13250
+ blankRun = 0;
13251
+ return prefix + "\\r";
13252
+ }
13253
+ if (code === 0x20) {
13254
+ trailingSpaces++;
13255
+ return "";
13256
+ }
13257
+ const prefix = trailingSpaces > 0 ? " ".repeat(trailingSpaces) : "";
13258
+ trailingSpaces = 0;
13259
+ lineHasContent = true;
13260
+ hasEmitted = true;
13261
+ blankRun = 0;
13262
+ return prefix + text[index];
13263
+ };
13264
+
13265
+ const stepEscape = (code, index) => {
13266
+ if (code === 0x5b) {
13267
+ vtState = 3;
13268
+ return "";
13269
+ }
13270
+ if (isControlStringIntroducer7Bit(code)) {
13271
+ vtState = 4;
13272
+ ctrlLen = 0;
13273
+ ctrlHighSurrogate = false;
13274
+ return "";
13275
+ }
13276
+ if (isEscIntermediate(code)) {
13277
+ vtState = 2;
13278
+ return "";
13279
+ }
13280
+ if (isEscapeFinal(code)) {
13281
+ vtState = 0;
13282
+ return "";
13283
+ }
13284
+ return stepGround(code, index);
13285
+ };
13286
+
13287
+ for (let i = 0; i < len; i++) {
13288
+ const code = text.charCodeAt(i);
13289
+ if (vtState === 0) {
13290
+ if (skipNextLf) {
13291
+ skipNextLf = false;
13292
+ if (code === 0x0a) continue;
13293
+ }
13294
+ if (
13295
+ code !== 0x1b &&
13296
+ code !== 0x9b &&
13297
+ !isControlStringIntroducer8Bit(code) &&
13298
+ code !== 0x20 &&
13299
+ code !== 0x0a &&
13300
+ code !== 0x0d
13301
+ ) {
13302
+ if (trailingSpaces > 0) {
13303
+ output += " ".repeat(trailingSpaces);
13304
+ trailingSpaces = 0;
13305
+ }
13306
+ const runStart = i;
13307
+ let j = i + 1;
13308
+ while (j < len) {
13309
+ const next = text.charCodeAt(j);
13310
+ if (
13311
+ next === 0x1b ||
13312
+ next === 0x9b ||
13313
+ isControlStringIntroducer8Bit(next) ||
13314
+ next === 0x20 ||
13315
+ next === 0x0a ||
13316
+ next === 0x0d
13317
+ )
13318
+ break;
13319
+ j++;
13320
+ }
13321
+ output += text.slice(runStart, j);
13322
+ lineHasContent = true;
13323
+ hasEmitted = true;
13324
+ blankRun = 0;
13325
+ i = j - 1;
13326
+ continue;
13327
+ }
13328
+ output += stepGround(code, i);
13329
+ continue;
13330
+ }
13331
+ switch (vtState) {
13332
+ case 1:
13333
+ output += stepEscape(code, i);
13334
+ break;
13335
+ case 2:
13336
+ if (isEscIntermediate(code)) break;
13337
+ if (isEscInterFinal(code)) vtState = 0;
13338
+ else output += stepGround(code, i);
13339
+ break;
13340
+ case 3:
13341
+ if (isCsiBody(code)) break;
13342
+ if (isCsiRowBreakFinal(code)) output += endLineByCsiRow();
13343
+ else if (isCsiFinal(code)) vtState = 0;
13344
+ else output += stepGround(code, i);
13345
+ break;
13346
+ case 4:
13347
+ if (isControlStringTerminator(code)) {
13348
+ vtState = 0;
13349
+ ctrlLen = 0;
13350
+ ctrlHighSurrogate = false;
13351
+ } else if (code === 0x1b) {
13352
+ vtState = 5;
13353
+ } else if (ctrlLen >= MAX_VT_CONTROL_STRING_LENGTH) {
13354
+ if (ctrlHighSurrogate && code >= 0xdc00 && code <= 0xdfff) {
13355
+ ctrlHighSurrogate = false;
13356
+ } else {
13357
+ ctrlLen = 0;
13358
+ ctrlHighSurrogate = false;
13359
+ output += stepGround(code, i);
13360
+ }
13361
+ } else {
13362
+ ctrlLen++;
13363
+ ctrlHighSurrogate = code >= 0xd800 && code <= 0xdbff;
13364
+ }
13365
+ break;
13366
+ case 5:
13367
+ if (code === 0x5c) {
13368
+ vtState = 0;
13369
+ ctrlLen = 0;
13370
+ ctrlHighSurrogate = false;
13371
+ } else {
13372
+ ctrlLen = 0;
13373
+ ctrlHighSurrogate = false;
13374
+ vtState = 1;
13375
+ output += stepEscape(code, i);
13376
+ }
13377
+ break;
13378
+ }
13379
+ }
13380
+ if (!lineHadVt && trailingSpaces > 0) output += " ".repeat(trailingSpaces);
13381
+ return output;
13382
+ }
13383
+
13081
13384
  function textLines(text) {
13082
13385
  return String(text ?? "").split("\\n").flatMap(wrapLine);
13083
13386
  }
13084
13387
 
13388
+ function sanitizedTextLines(text) {
13389
+ return textLines(normalizeVtText(String(text ?? "")));
13390
+ }
13391
+
13085
13392
  function timestamp(value) {
13086
13393
  if (value === undefined) return "unknown time";
13087
13394
  const date = new Date(value);
@@ -13166,13 +13473,14 @@ function classify(entry, previewChars) {
13166
13473
  }
13167
13474
  }
13168
13475
 
13169
- function contentLines(content) {
13170
- if (typeof content === "string") return textLines(content);
13476
+ function contentLines(content, sanitize = false) {
13477
+ const toLines = sanitize ? sanitizedTextLines : textLines;
13478
+ if (typeof content === "string") return toLines(content);
13171
13479
  if (!Array.isArray(content)) return [];
13172
13480
  const lines = [];
13173
13481
  for (const block of content) {
13174
13482
  if (!block) continue;
13175
- if (block.type === "text" && typeof block.text === "string") lines.push(...textLines(block.text));
13483
+ if (block.type === "text" && typeof block.text === "string") lines.push(...toLines(block.text));
13176
13484
  else if (block.type === "toolCall")
13177
13485
  lines.push(...wrapLine("[tool call] " + (block.name ?? "unknown") + " " + JSON.stringify(block.arguments ?? {})));
13178
13486
  else if (block.type === "image") lines.push("[image]");
@@ -13191,11 +13499,11 @@ function entryLines(entry) {
13191
13499
  case "assistant":
13192
13500
  return [...heading("assistant"), ...contentLines(message.content)];
13193
13501
  case "toolResult":
13194
- return [...heading("tool result " + message.toolName), ...contentLines(message.content)];
13502
+ return [...heading("tool result " + message.toolName), ...contentLines(message.content, true)];
13195
13503
  case "bashExecution":
13196
- return [...heading("bash"), ...textLines("$ " + message.command), ...textLines(message.output)];
13504
+ return [...heading("bash"), ...textLines("$ " + message.command), ...sanitizedTextLines(message.output)];
13197
13505
  case "custom":
13198
- return [...heading("custom " + message.customType), ...contentLines(message.content)];
13506
+ return [...heading("custom " + message.customType), ...contentLines(message.content, true)];
13199
13507
  case "branchSummary":
13200
13508
  return [...heading("branch summary"), ...textLines(message.summary)];
13201
13509
  default:
@@ -13203,7 +13511,7 @@ function entryLines(entry) {
13203
13511
  }
13204
13512
  }
13205
13513
  case "custom_message":
13206
- return [...heading("custom " + entry.customType), ...contentLines(entry.content)];
13514
+ return [...heading("custom " + entry.customType), ...contentLines(entry.content, true)];
13207
13515
  case "compaction":
13208
13516
  case "branch_summary":
13209
13517
  case "session_summary":
@@ -14558,7 +14866,7 @@ var SessionSearcher = class {
14558
14866
  async start() {
14559
14867
  const { place, budget } = this.search;
14560
14868
  if (this.index !== void 0) try {
14561
- const found = await budget.race(this.index.coverage(place.sessionId, 2));
14869
+ const found = await budget.race(this.index.coverage(place.sessionId, 3));
14562
14870
  this.coverage = found ? {
14563
14871
  indexedSeq: found.indexedSeq,
14564
14872
  lastSeq: found.lastSeq,
@@ -14902,7 +15210,7 @@ var SessionSearcher = class {
14902
15210
  }
14903
15211
  if (this.lastSeq <= 1 && texts.every((item) => !item.oversized && (item.parts?.length ?? 0) <= 1)) return "ok";
14904
15212
  let timedOut = false;
14905
- if (await this.search.budget.race(this.index.extend(this.search.place.sessionId, 2, this.coverage.indexedSeq, throughSeq, texts, {
15213
+ if (await this.search.budget.race(this.index.extend(this.search.place.sessionId, 3, this.coverage.indexedSeq, throughSeq, texts, {
14906
15214
  generation: this.coverage.generation,
14907
15215
  revision: this.coverage.revision,
14908
15216
  signal: this.search.budget.storeSignal
@@ -26422,7 +26730,7 @@ var RpcClientApi = class {
26422
26730
  // dist/modes/rpc/rpc-client-process.js
26423
26731
  const guardianFiles = /* @__PURE__ */ new WeakMap();
26424
26732
  const bootstrapHandles = /* @__PURE__ */ new WeakMap();
26425
- async function prepareRpcClientBootstrap(interactiveEngineApiKey, trustDecisions, startedSessionId, startupExtensionCheck, restarted) {
26733
+ async function prepareRpcClientBootstrap(interactiveEngineApiKey, trustDecisions, startedSessionId, startupExtensionCheck, restarted, sessionCwdOverride) {
26426
26734
  const guardianFile = join$1(tmpdir(), `atomic-engine-guardian-${process.pid}-${crypto.randomUUID()}`);
26427
26735
  const waitForPrewarm = waitForPrewarmedEngineReady;
26428
26736
  const [bootstrap] = await Promise.all([writeInteractiveEngineBootstrapAsync({
@@ -26433,6 +26741,7 @@ async function prepareRpcClientBootstrap(interactiveEngineApiKey, trustDecisions
26433
26741
  ...interactiveEngineApiKey ? { apiKey: interactiveEngineApiKey } : {},
26434
26742
  ...trustDecisions ? { trustDecisions } : {},
26435
26743
  ...startedSessionId !== void 0 ? { startedSessionId } : {},
26744
+ ...sessionCwdOverride !== void 0 ? { sessionCwdOverride } : {},
26436
26745
  ...startupExtensionCheck ? { startupExtensionCheck } : {},
26437
26746
  ...restarted === true ? { restarted: true } : {}
26438
26747
  }), typeof waitForPrewarm === "function" ? waitForPrewarm() : Promise.resolve()]);
@@ -26978,7 +27287,7 @@ var RpcClient = class extends RpcClientApi {
26978
27287
  };
26979
27288
  let preparedBootstrap;
26980
27289
  try {
26981
- preparedBootstrap = this.options.interactiveEngine ? await prepareRpcClientBootstrap(this.options.interactiveEngine.apiKey, this.options.interactiveEngine.trustDecisions, this.generation === 0 ? this.options.interactiveEngine.startedSessionId : void 0, this.options.interactiveEngine.startupExtensionCheck, this.generation > 0) : void 0;
27290
+ preparedBootstrap = this.options.interactiveEngine ? await prepareRpcClientBootstrap(this.options.interactiveEngine.apiKey, this.options.interactiveEngine.trustDecisions, this.generation === 0 ? this.options.interactiveEngine.startedSessionId : void 0, this.options.interactiveEngine.startupExtensionCheck, this.generation > 0, this.options.interactiveEngine.sessionCwdOverride) : void 0;
26982
27291
  if (this.stopPromise) await this.stopPromise.catch(() => {});
26983
27292
  if (this.restartRevision !== startRevision) {
26984
27293
  await removeOwnedInteractiveEngineBootstrapAsync(preparedBootstrap?.bootstrap);
@@ -27353,7 +27662,7 @@ var RpcClient = class extends RpcClientApi {
27353
27662
  if (message) {
27354
27663
  if (message.type === "engine_request_accepted") this.pendingRequests.markAccepted(message.requestId);
27355
27664
  else if (message.type === "engine_shutdown_complete") shutdownComplete.resolve();
27356
- else if (message.type === "engine_console_closed") this.emitInteractiveEngineMessage(message, generation);
27665
+ else if (message.type === "engine_console_closed" || message.type === "engine_session_changed") this.emitInteractiveEngineMessage(message, generation);
27357
27666
  return;
27358
27667
  }
27359
27668
  try {
@@ -27379,7 +27688,7 @@ var RpcClient = class extends RpcClientApi {
27379
27688
  if (engine?.onActivityChange) this.notify((value) => engine.onActivityChange?.(value), active, message ? "message" : "end", message, engine.onActivityChange);
27380
27689
  }
27381
27690
  emitInteractiveEngineMessage(message, generation) {
27382
- if (this.engineMessageListeners.length === 0 && (message.type.startsWith("engine_custom_") || message.type.startsWith("engine_resources_"))) this.pendingEngineMessages.push(generation, message);
27691
+ if (this.engineMessageListeners.length === 0 && (message.type.startsWith("engine_custom_") || message.type.startsWith("engine_resources_") || message.type === "engine_session_changed")) this.pendingEngineMessages.push(generation, message);
27383
27692
  for (const listener of this.engineMessageListeners) this.notify(listener, message, "message");
27384
27693
  }
27385
27694
  createProcessExitError(code, signal) {
@@ -27749,7 +28058,7 @@ function __atomicOnDemandFailed(error, feature) {
27749
28058
  return (async () => {
27750
28059
  const root = new URL("../", import.meta.url);
27751
28060
  const releases = (globalThis[Symbol.for("atomic.in-place-update-release.v1")] ??= new Map());
27752
- const key = `${root.href}#0.10.17`;
28061
+ const key = `${root.href}#0.10.18-alpha.1`;
27753
28062
  let release = releases.get(key);
27754
28063
  if (release === undefined) {
27755
28064
  const current = (async () => {
@@ -27777,7 +28086,7 @@ function __atomicOnDemandFailed(error, feature) {
27777
28086
  } catch {
27778
28087
  // No installation to read, as in a bundle of the package: the release the process runs decides.
27779
28088
  }
27780
- const updatedTo = typeof installed === "string" && installed !== "0.10.17" ? installed : running !== undefined && running.version !== "0.10.17" ? "0.10.17" : undefined;
28089
+ const updatedTo = typeof installed === "string" && installed !== "0.10.18-alpha.1" ? installed : running !== undefined && running.version !== "0.10.18-alpha.1" ? "0.10.18-alpha.1" : undefined;
27781
28090
  if (updatedTo === undefined) throw error;
27782
28091
  const application = typeof running?.name === "string" ? running.name : "atomic";
27783
28092
  const restart = new Error(`${application} was updated to ${updatedTo} while this session was running; restart it to keep using ${feature}.`, {