@bastani/atomic 0.10.5 → 0.10.6-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 (315) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/_shared/APEv2Parser-APXNTTFS.js.map +1 -1
  4. package/dist/_shared/AsfParser-AP272OWG.js +1 -1
  5. package/dist/_shared/DsfParser-FTOZZCZP.js +2 -2
  6. package/dist/_shared/FlacParser-WJATCQT6.js +2 -2
  7. package/dist/_shared/FlacParser-WJATCQT6.js.map +1 -1
  8. package/dist/_shared/ID3v1Parser-XVX6XPGB.js +1 -1
  9. package/dist/_shared/ID3v2Parser-DB2T4Z6M.js +2 -2
  10. package/dist/_shared/MP4Parser-2TZWZV4K.js +3 -3
  11. package/dist/_shared/MP4Parser-2TZWZV4K.js.map +1 -1
  12. package/dist/_shared/MatroskaParser-V22CGP72.js.map +1 -1
  13. package/dist/_shared/MusepackParser-XEUVYWNQ.js +2 -2
  14. package/dist/_shared/MusepackParser-XEUVYWNQ.js.map +1 -1
  15. package/dist/_shared/OggParser-Y7FSZNTO.js +1 -1
  16. package/dist/_shared/OggParser-Y7FSZNTO.js.map +1 -1
  17. package/dist/_shared/ParseError-VXOGXIIE.js +2 -2
  18. package/dist/_shared/ParseError-VXOGXIIE.js.map +1 -1
  19. package/dist/_shared/WavPackParser-ZYK4CLSW.js +1 -1
  20. package/dist/_shared/WaveParser-VA3P7P3H.js +2 -2
  21. package/dist/_shared/dist-KOELCESV.js +55 -63
  22. package/dist/_shared/dist-KOELCESV.js.map +1 -1
  23. package/dist/_shared/fork-row-index-UAUAQRD5.js +3 -3
  24. package/dist/_shared/full.umd-CBF7UGXV.js +7 -6
  25. package/dist/_shared/full.umd-CBF7UGXV.js.map +1 -1
  26. package/dist/_shared/http-YFAPTIZD.js +2 -2
  27. package/dist/_shared/http-YFAPTIZD.js.map +1 -1
  28. package/dist/_shared/http-undici-FVPTZA4G.js +19 -20
  29. package/dist/_shared/http-undici-FVPTZA4G.js.map +1 -1
  30. package/dist/_shared/lib-4PES5P4V.js +8 -8
  31. package/dist/_shared/lib-4PES5P4V.js.map +1 -1
  32. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +5 -4
  33. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  34. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +20 -20
  35. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  36. package/dist/_shared/mode-shared-2QJSCUM6.js +441 -341
  37. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  38. package/dist/_shared/p0-cli-BB45ZQY6.js +8 -12
  39. package/dist/_shared/p0-cli-BB45ZQY6.js.map +1 -1
  40. package/dist/_shared/p1a-prewarm-UQY3X2UK.js +8 -8
  41. package/dist/_shared/p1b-elig-ENCUPKKJ.js +17 -17
  42. package/dist/_shared/p1b-elig-ENCUPKKJ.js.map +1 -1
  43. package/dist/_shared/p2-shell-TJBYQMCJ.js +27 -28
  44. package/dist/_shared/p2-shell-TJBYQMCJ.js.map +1 -1
  45. package/dist/_shared/p2-shell-main-B2WIALFD.js +44 -47
  46. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  47. package/dist/_shared/rolldown-runtime-BGM3D5V3.js +4 -4
  48. package/dist/_shared/runtime-O4KCSG4C.js +7 -7
  49. package/dist/_shared/runtime-O4KCSG4C.js.map +1 -1
  50. package/dist/_shared/sdk-WQIOHVKO.js +24 -24
  51. package/dist/_shared/sdk-WQIOHVKO.js.map +1 -1
  52. package/dist/_shared/session-data-AHTU7IS6.js +4 -4
  53. package/dist/_shared/session-manager-list-2BLEEZVG.js +3 -3
  54. package/dist/_shared/{settings-startup-65YEWRV2.js → settings-startup-4QCVCI53.js} +2 -32
  55. package/dist/_shared/settings-startup-4QCVCI53.js.map +1 -0
  56. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +35 -0
  57. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -0
  58. package/dist/_shared/sql-session-store-5FD3WBMZ.js +12 -12
  59. package/dist/_shared/startup-0-0-TYUFUOJZ.js +143 -115
  60. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +1 -1
  61. package/dist/_shared/{startup-0-1-D4LGGINF.js → startup-0-1-W2G2UY7R.js} +365 -27
  62. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +1 -0
  63. package/dist/_shared/startup-0-2-SZGQIWHI.js +19 -24
  64. package/dist/_shared/startup-0-2-SZGQIWHI.js.map +1 -1
  65. package/dist/_shared/startup-0-3-T4DVFYWX.js +7 -7
  66. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  67. package/dist/_shared/startup-0-4-HN5EB4K7.js +7 -7
  68. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +1 -1
  69. package/dist/_shared/startup-0-5-OHJNE6JH.js +157 -92
  70. package/dist/_shared/startup-0-5-OHJNE6JH.js.map +1 -1
  71. package/dist/_shared/startup-10-0-TDQNBDDL.js +4 -4
  72. package/dist/_shared/startup-10-0-TDQNBDDL.js.map +1 -1
  73. package/dist/_shared/startup-14-0-MLX36RBG.js +19 -19
  74. package/dist/_shared/startup-14-0-MLX36RBG.js.map +1 -1
  75. package/dist/_shared/startup-15-0-YUKGAC63.js +17 -16
  76. package/dist/_shared/startup-15-0-YUKGAC63.js.map +1 -1
  77. package/dist/_shared/startup-15-1-4S7FLMNG.js +5 -5
  78. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  79. package/dist/_shared/startup-8-0-34CBHPZH.js +23 -23
  80. package/dist/_shared/startup-8-0-34CBHPZH.js.map +1 -1
  81. package/dist/_shared/startup-8-1-SJW2GMAM.js +113 -114
  82. package/dist/_shared/startup-8-1-SJW2GMAM.js.map +1 -1
  83. package/dist/_shared/storage-command-7MGXLJGZ.js +15 -14
  84. package/dist/_shared/storage-command-7MGXLJGZ.js.map +1 -1
  85. package/dist/_shared/task-reference-stream-JWMUZSJX.js +7 -7
  86. package/dist/_shared/task-reference-stream-JWMUZSJX.js.map +1 -1
  87. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  88. package/dist/_shared/tree-outline-MUEPK5B7.js +4 -4
  89. package/dist/_shared/turndown.cjs-7Z43JOED.js +7 -10
  90. package/dist/_shared/turndown.cjs-7Z43JOED.js.map +1 -1
  91. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  92. package/dist/builtin/intercom/index.bundle.mjs +2 -2
  93. package/dist/builtin/intercom/package.json +1 -1
  94. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  95. package/dist/builtin/mcp/package.json +1 -1
  96. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  97. package/dist/builtin/subagents/package.json +1 -1
  98. package/dist/builtin/subagents/src/extension/index.bundle.mjs +15 -12
  99. package/dist/builtin/web-access/index.bundle.mjs +1 -1
  100. package/dist/builtin/web-access/package.json +1 -1
  101. package/dist/cli/args.js +1 -1
  102. package/dist/cli/auth-cli.code.js +10 -13
  103. package/dist/cli/auth-cli.code.js.map +1 -1
  104. package/dist/cli/auth-cli.impl.js +3 -3
  105. package/dist/cli/auth-cli.js +3 -3
  106. package/dist/cli/blueprint-command.code.js +8 -8
  107. package/dist/cli/blueprint-command.impl.js +3 -3
  108. package/dist/cli/blueprint-command.js +3 -3
  109. package/dist/cli/intercom-command.code.js +2 -2
  110. package/dist/cli/intercom-command.impl.js +3 -3
  111. package/dist/cli/intercom-command.js +3 -3
  112. package/dist/cli/list-models.code.js +3 -3
  113. package/dist/cli/list-models.impl.js +3 -3
  114. package/dist/cli/list-models.js +3 -3
  115. package/dist/cli/session-picker.code.js +3 -3
  116. package/dist/cli/session-picker.impl.js +3 -3
  117. package/dist/cli/session-picker.js +3 -3
  118. package/dist/cli/settings-startup.js +1 -1
  119. package/dist/cli/startup-ui.impl.js +3 -3
  120. package/dist/cli/startup-ui.js +3 -3
  121. package/dist/cli/storage-command.impl.js +3 -3
  122. package/dist/cli/storage-command.js +3 -3
  123. package/dist/cli/storage-search-session.code.js +4 -4
  124. package/dist/cli/storage-search-session.impl.js +3 -3
  125. package/dist/cli/storage-search-session.js +3 -3
  126. package/dist/cli/team-command.code.js +3 -3
  127. package/dist/cli/team-command.impl.js +3 -3
  128. package/dist/cli/team-command.js +3 -3
  129. package/dist/cli.js +2 -2
  130. package/dist/cli.js.map +1 -1
  131. package/dist/core/debug.impl.js +3 -3
  132. package/dist/core/debug.js +3 -3
  133. package/dist/core/export-html/card-projection.code.js +2 -2
  134. package/dist/core/export-html/card-projection.code.js.map +1 -1
  135. package/dist/core/export-html/card-projection.impl.js +3 -3
  136. package/dist/core/export-html/card-projection.js +3 -3
  137. package/dist/core/export-html/index.code.js +9 -9
  138. package/dist/core/export-html/index.code.js.map +1 -1
  139. package/dist/core/export-html/index.impl.js +3 -3
  140. package/dist/core/export-html/index.js +3 -3
  141. package/dist/core/export-html/json-spans.impl.js +3 -3
  142. package/dist/core/export-html/json-spans.js +3 -3
  143. package/dist/core/export-html/oversized-render-inputs.code.js +1 -1
  144. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  145. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  146. package/dist/core/export-html/tool-renderer.code.js +1 -1
  147. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  148. package/dist/core/export-html/tool-renderer.js +3 -3
  149. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  150. package/dist/core/extensions/jiti-loader.js +3 -3
  151. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  152. package/dist/core/extensions/jiti-static-loader.js +3 -3
  153. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  154. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  155. package/dist/core/extensions/loader-host-modules.js +3 -3
  156. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  157. package/dist/core/extensions/runner-context.js +5 -5
  158. package/dist/core/extensions/runner-context.js.map +1 -1
  159. package/dist/core/http-dispatcher.js +2 -0
  160. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  161. package/dist/core/intercom-broker-control-host.js +3 -3
  162. package/dist/core/intercom-broker-control.code.js +3 -3
  163. package/dist/core/intercom-broker-control.impl.js +3 -3
  164. package/dist/core/intercom-broker-control.js +3 -3
  165. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  166. package/dist/core/package-manager-storage-adapters.js +3 -3
  167. package/dist/core/sdk.code.js +1 -1
  168. package/dist/core/sdk.impl.js +3 -3
  169. package/dist/core/sdk.js +3 -3
  170. package/dist/core/session-manager-core.js +15 -15
  171. package/dist/core/session-manager-core.js.map +1 -1
  172. package/dist/core/session-manager-list.impl.js +3 -3
  173. package/dist/core/session-manager-list.js +3 -3
  174. package/dist/core/session-manager.code.js +1 -1
  175. package/dist/core/session-manager.impl.js +3 -3
  176. package/dist/core/session-manager.js +3 -3
  177. package/dist/core/session-storage.impl.js +3 -3
  178. package/dist/core/session-storage.js +3 -3
  179. package/dist/core/storage/index.js +2 -2
  180. package/dist/core/storage/node-sqlite-thread.js +2 -2
  181. package/dist/core/storage/node-sqlite.js +2 -2
  182. package/dist/core/storage/offline-snapshot-file.code.js +1 -1
  183. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  184. package/dist/core/storage/offline-snapshot-file.js +3 -3
  185. package/dist/core/storage/provider.js +2 -2
  186. package/dist/core/storage/selection.js +2 -2
  187. package/dist/core/storage/session/branch-fork-source.code.js +3 -3
  188. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  189. package/dist/core/storage/session/branch-fork-source.js +3 -3
  190. package/dist/core/storage/session/card-view.impl.js +3 -3
  191. package/dist/core/storage/session/card-view.js +3 -3
  192. package/dist/core/storage/session/child-reader.code.js +5 -4
  193. package/dist/core/storage/session/child-reader.code.js.map +1 -1
  194. package/dist/core/storage/session/child-reader.impl.js +3 -3
  195. package/dist/core/storage/session/child-reader.js +3 -3
  196. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  197. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  198. package/dist/core/storage/session/errors.js +1 -0
  199. package/dist/core/storage/session/errors.js.map +1 -1
  200. package/dist/core/storage/session/expanded-child-details.code.js +4 -4
  201. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  202. package/dist/core/storage/session/expanded-child-details.js +3 -3
  203. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  204. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  205. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  206. package/dist/core/storage/session/fork-row-index.js +3 -3
  207. package/dist/core/storage/session/fork-staging.code.js +5 -4
  208. package/dist/core/storage/session/fork-staging.code.js.map +1 -1
  209. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  210. package/dist/core/storage/session/fork-staging.js +3 -3
  211. package/dist/core/storage/session/fork-window.code.js +3 -3
  212. package/dist/core/storage/session/fork-window.impl.js +3 -3
  213. package/dist/core/storage/session/fork-window.js +3 -3
  214. package/dist/core/storage/session/history-pages.impl.js +3 -3
  215. package/dist/core/storage/session/history-pages.js +3 -3
  216. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  217. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  218. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  219. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  220. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  221. package/dist/core/storage/session/memory-session-store.js +3 -3
  222. package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
  223. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  224. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  225. package/dist/core/storage/session/released-history-files.code.js +12 -12
  226. package/dist/core/storage/session/released-history-files.code.js.map +1 -1
  227. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  228. package/dist/core/storage/session/released-history-files.js +3 -3
  229. package/dist/core/storage/session/resident-fork-rows.code.js +1 -1
  230. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  231. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  232. package/dist/core/storage/session/session-resume.impl.js +3 -3
  233. package/dist/core/storage/session/session-resume.js +3 -3
  234. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  235. package/dist/core/storage/session/snapshot-cut.js +3 -3
  236. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  237. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  238. package/dist/core/storage/session/snapshot-history.js +3 -3
  239. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  240. package/dist/core/storage/session/sql-session-store.js +3 -3
  241. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  242. package/dist/core/storage/session/tree-outline.js +3 -3
  243. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  244. package/dist/core/storage/session/tree-presentation.js +3 -3
  245. package/dist/core/storage/storage-status.impl.js +3 -3
  246. package/dist/core/storage/storage-status.js +3 -3
  247. package/dist/core/storage/team.impl.js +3 -3
  248. package/dist/core/storage/team.js +3 -3
  249. package/dist/core/structured-output/index.impl.js +3 -3
  250. package/dist/core/structured-output/index.js +3 -3
  251. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  252. package/dist/core/tasks/task-completion-entry.js +3 -3
  253. package/dist/core/tasks/task-file-history.code.js +5 -5
  254. package/dist/core/tasks/task-file-history.code.js.map +1 -1
  255. package/dist/core/tasks/task-file-history.impl.js +3 -3
  256. package/dist/core/tasks/task-file-history.js +3 -3
  257. package/dist/core/tasks/task-reference-archive.code.js +11 -11
  258. package/dist/core/tasks/task-reference-archive.code.js.map +1 -1
  259. package/dist/core/tasks/task-reference-archive.js +3 -3
  260. package/dist/core/tasks/task-reference-identity.code.js +2 -2
  261. package/dist/core/tasks/task-reference-identity.js +3 -3
  262. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  263. package/dist/core/tasks/task-reference-stream.js +3 -3
  264. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  265. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  266. package/dist/core/tasks/task-view-source.impl.js +3 -3
  267. package/dist/core/tasks/task-view-source.js +3 -3
  268. package/dist/core/tools/read-url.code.js +9 -9
  269. package/dist/core/tools/read-url.impl.js +3 -3
  270. package/dist/core/tools/read-url.js +3 -3
  271. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  272. package/dist/core/worktree-snapshot/errors.code.js +1 -1
  273. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  274. package/dist/core/worktree-snapshot/errors.js +3 -3
  275. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  276. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  277. package/dist/extensions/codemode/execute.code.js +3 -3
  278. package/dist/extensions/codemode/execute.impl.js +3 -3
  279. package/dist/extensions/codemode/execute.js +3 -3
  280. package/dist/extensions/codemode/renderer.code.js +1 -1
  281. package/dist/extensions/codemode/renderer.impl.js +3 -3
  282. package/dist/extensions/codemode/renderer.js +3 -3
  283. package/dist/extensions/mcp/cli.code.js +7 -7
  284. package/dist/extensions/mcp/cli.impl.js +3 -3
  285. package/dist/extensions/mcp/cli.js +3 -3
  286. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  287. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  288. package/dist/extensions/mcp/cli.lazy.js +3 -3
  289. package/dist/extensions/mcp/runtime.impl.js +3 -3
  290. package/dist/extensions/mcp/runtime.js +3 -3
  291. package/dist/index.js +2 -2
  292. package/dist/main-first-time-setup.impl.js +3 -3
  293. package/dist/main-first-time-setup.js +3 -3
  294. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  295. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  296. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  297. package/dist/modes/interactive/components/task-inspector.d.ts +10 -2
  298. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  299. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  300. package/dist/package-manager-cli.code.js +14 -14
  301. package/dist/package-manager-cli.impl.js +3 -3
  302. package/dist/package-manager-cli.js +3 -3
  303. package/dist/rpc-entry.js +3 -3
  304. package/dist/startup-files.json +1 -1
  305. package/dist/startup-stages/7.js +1 -1
  306. package/dist/utils/startup-database-spare.code.js +5 -5
  307. package/dist/utils/startup-database-spare.impl.js +3 -3
  308. package/dist/utils/startup-database-spare.js +3 -3
  309. package/dist/utils/tools-manager.code.js +1 -1
  310. package/dist/utils/tools-manager.impl.js +3 -3
  311. package/dist/utils/tools-manager.js +3 -3
  312. package/docs/background-tasks.md +2 -2
  313. package/package.json +9 -9
  314. package/dist/_shared/settings-startup-65YEWRV2.js.map +0 -1
  315. package/dist/_shared/startup-0-1-D4LGGINF.js.map +0 -1
@@ -1,14 +1,14 @@
1
- import { __name } from "./rolldown-runtime-BGM3D5V3.js";
1
+ import "./rolldown-runtime-BGM3D5V3.js";
2
2
  import { ENV_TIMING, createModuleRequire, getAgentDir, getCustomThemesDir, getEnvValue, getThemesDir, stripBom } from "./p0-cli-BB45ZQY6.js";
3
3
  import { readFile, realpath } from "node:fs/promises";
4
4
  import { existsSync, readFileSync } from "fs";
5
- import * as path$1 from "path";
5
+ import * as path from "path";
6
6
  import { join } from "path";
7
- import * as path$2 from "node:path";
7
+ import * as path$1 from "node:path";
8
8
  import { dirname as dirname$1, resolve as resolve$1 } from "node:path";
9
- import * as fs$2 from "node:fs";
9
+ import * as fs$1 from "node:fs";
10
10
  import { realpathSync as realpathSync$1, watch } from "node:fs";
11
- import { KeybindingsManager, TUI_KEYBINDINGS, clickableHintText, clickableKeyTextHint, clickableKeysHint, colorToHex, colorToOkhsl, colorToOklch, colorToRgb, getKeybindings, hintKeyParts, hintKeyParts as hintKeyParts$1, okhslColor, oklabToOkhslLightness, oklchColor, parseColor, rgbColor, slashCommandHint, truncateToWidth, visibleWidth } from "@bastani/atomic-tui";
11
+ import { KeybindingsManager as KeybindingsManager$1, TUI_KEYBINDINGS, clickableHintText, clickableKeyTextHint, clickableKeysHint, colorToHex, colorToOkhsl, colorToOklch, colorToRgb, getKeybindings, hintKeyParts, hintKeyParts as hintKeyParts$1, okhslColor, oklabToOkhslLightness, oklchColor, parseColor, rgbColor, slashCommandHint, truncateToWidth, visibleWidth } from "@bastani/atomic-tui";
12
12
  import { Chalk } from "chalk";
13
13
  import { access as access$1, readFile as readFile$1 } from "fs/promises";
14
14
  import { memoizeAsync } from "../utils/memoize-async.js";
@@ -399,10 +399,7 @@ function parseRawConfig(content) {
399
399
  const parsed = JSON.parse(stripBom(content));
400
400
  return isRecord(parsed) ? parsed : void 0;
401
401
  }
402
- var KeybindingsManager$1 = class KeybindingsManager$1 extends KeybindingsManager {
403
- static {
404
- __name(this, "KeybindingsManager");
405
- }
402
+ var KeybindingsManager = class KeybindingsManager extends KeybindingsManager$1 {
406
403
  configPath;
407
404
  constructor(userBindings = {}, configPath) {
408
405
  super(KEYBINDINGS, userBindings);
@@ -410,22 +407,22 @@ var KeybindingsManager$1 = class KeybindingsManager$1 extends KeybindingsManager
410
407
  }
411
408
  static create(agentDir = getAgentDir()) {
412
409
  const configPath = join(agentDir, "keybindings.json");
413
- const userBindings = KeybindingsManager$1.loadFromFile(configPath);
414
- return new KeybindingsManager$1(userBindings, configPath);
410
+ const userBindings = KeybindingsManager.loadFromFile(configPath);
411
+ return new KeybindingsManager(userBindings, configPath);
415
412
  }
416
413
  reload() {
417
414
  if (!this.configPath) return;
418
- this.setUserBindings(KeybindingsManager$1.loadFromFile(this.configPath));
415
+ this.setUserBindings(KeybindingsManager.loadFromFile(this.configPath));
419
416
  }
420
417
  async reloadAsync() {
421
418
  if (!this.configPath) return;
422
- this.setUserBindings(KeybindingsManager$1.toUserBindings(await loadRawConfigAsync(this.configPath)));
419
+ this.setUserBindings(KeybindingsManager.toUserBindings(await loadRawConfigAsync(this.configPath)));
423
420
  }
424
421
  getEffectiveConfig() {
425
422
  return this.getResolvedBindings();
426
423
  }
427
424
  static loadFromFile(path) {
428
- return KeybindingsManager$1.toUserBindings(loadRawConfig(path));
425
+ return KeybindingsManager.toUserBindings(loadRawConfig(path));
429
426
  }
430
427
  static toUserBindings(rawConfig) {
431
428
  if (!rawConfig) return {};
@@ -943,7 +940,7 @@ const CUBE_VALUES = [
943
940
  ];
944
941
  const GRAY_VALUES = Array.from({ length: 24 }, (_, i) => 8 + i * 10);
945
942
  function findClosestCubeIndex(value) {
946
- let minDist = Infinity;
943
+ let minDist = 1e400;
947
944
  let minIdx = 0;
948
945
  for (let i = 0; i < CUBE_VALUES.length; i++) {
949
946
  const dist = Math.abs(value - CUBE_VALUES[i]);
@@ -955,7 +952,7 @@ function findClosestCubeIndex(value) {
955
952
  return minIdx;
956
953
  }
957
954
  function findClosestGrayIndex(r, g, b) {
958
- let minDist = Infinity;
955
+ let minDist = 1e400;
959
956
  let minIdx = 0;
960
957
  for (let i = 0; i < GRAY_VALUES.length; i++) {
961
958
  const value = GRAY_VALUES[i];
@@ -1005,7 +1002,7 @@ function strongestChannels(r, g, b) {
1005
1002
  }
1006
1003
  function rgbTo256PreservingHue(r, g, b) {
1007
1004
  const channels = strongestChannels(r, g, b);
1008
- let minDist = Infinity;
1005
+ let minDist = 1e400;
1009
1006
  let minIndex = 16;
1010
1007
  for (const entry of PALETTE_256) {
1011
1008
  if (strongestChannels(entry.r, entry.g, entry.b) !== channels) continue;
@@ -2870,10 +2867,10 @@ function loadedBuiltinThemes() {
2870
2867
  function readBuiltinThemes() {
2871
2868
  const themesDir = getThemesDir();
2872
2869
  const themes = {};
2873
- for (const file of fs$2.readdirSync(themesDir).sort()) {
2870
+ for (const file of fs$1.readdirSync(themesDir).sort()) {
2874
2871
  if (!file.endsWith(".json")) continue;
2875
- const themePath = path$2.join(themesDir, file);
2876
- const themeJson = parseThemeJsonContent(themePath, fs$2.readFileSync(themePath, "utf-8"));
2872
+ const themePath = path$1.join(themesDir, file);
2873
+ const themeJson = parseThemeJsonContent(themePath, fs$1.readFileSync(themePath, "utf-8"));
2877
2874
  themes[themeJson.name] = themeJson;
2878
2875
  }
2879
2876
  return {
@@ -2893,17 +2890,17 @@ function readCustomThemeFiles(customThemesDir) {
2893
2890
  const files = /* @__PURE__ */ new Map();
2894
2891
  let entries;
2895
2892
  try {
2896
- entries = fs$2.readdirSync(customThemesDir);
2893
+ entries = fs$1.readdirSync(customThemesDir);
2897
2894
  } catch {
2898
2895
  return files;
2899
2896
  }
2900
2897
  for (const file of entries) {
2901
2898
  if (!file.endsWith(".json")) continue;
2902
- const themePath = path$2.join(customThemesDir, file);
2899
+ const themePath = path$1.join(customThemesDir, file);
2903
2900
  try {
2904
2901
  files.set(file, {
2905
2902
  path: themePath,
2906
- content: fs$2.readFileSync(themePath, "utf-8")
2903
+ content: fs$1.readFileSync(themePath, "utf-8")
2907
2904
  });
2908
2905
  } catch {}
2909
2906
  }
@@ -2918,15 +2915,15 @@ async function refreshCustomThemes() {
2918
2915
  const files = /* @__PURE__ */ new Map();
2919
2916
  let entries = [];
2920
2917
  try {
2921
- entries = await fs$2.promises.readdir(customThemesDir);
2918
+ entries = await fs$1.promises.readdir(customThemesDir);
2922
2919
  } catch {}
2923
2920
  for (const file of entries) {
2924
2921
  if (!file.endsWith(".json")) continue;
2925
- const themePath = path$2.join(customThemesDir, file);
2922
+ const themePath = path$1.join(customThemesDir, file);
2926
2923
  try {
2927
2924
  files.set(file, {
2928
2925
  path: themePath,
2929
- content: await fs$2.promises.readFile(themePath, "utf-8")
2926
+ content: await fs$1.promises.readFile(themePath, "utf-8")
2930
2927
  });
2931
2928
  } catch {}
2932
2929
  }
@@ -2938,7 +2935,7 @@ async function refreshCustomThemes() {
2938
2935
  function hasCustomThemeFile(name) {
2939
2936
  const fileName = `${name}.json`;
2940
2937
  if (getCustomThemeFiles().has(fileName)) return true;
2941
- return registeredThemes.get(name)?.sourcePath === path$2.join(getCustomThemesDir(), fileName);
2938
+ return registeredThemes.get(name)?.sourcePath === path$1.join(getCustomThemesDir(), fileName);
2942
2939
  }
2943
2940
  function getAvailableThemes() {
2944
2941
  return getAvailableThemesWithPaths().map(({ name }) => name);
@@ -2958,7 +2955,7 @@ function getAvailableThemesWithPaths() {
2958
2955
  });
2959
2956
  for (const name of Object.keys(builtinThemes.themes)) addTheme({
2960
2957
  name,
2961
- path: path$2.join(builtinThemes.directory, `${name}.json`)
2958
+ path: path$1.join(builtinThemes.directory, `${name}.json`)
2962
2959
  });
2963
2960
  for (const info of getCustomThemeInfos()) addTheme(info);
2964
2961
  for (const [name, theme] of registeredThemes.entries()) addTheme({
@@ -3117,13 +3114,13 @@ function startThemeWatcher() {
3117
3114
  const customThemesDir = getCustomThemesDir();
3118
3115
  const watchedThemeName = currentThemeName;
3119
3116
  const watchedFileName = `${watchedThemeName}.json`;
3120
- const themeFile = path$2.join(customThemesDir, watchedFileName);
3117
+ const themeFile = path$1.join(customThemesDir, watchedFileName);
3121
3118
  const generation = themeWatcherGeneration;
3122
3119
  if (!hasCustomThemeFile(watchedThemeName)) return;
3123
3120
  const reload = async () => {
3124
3121
  let content;
3125
3122
  try {
3126
- content = await fs$2.promises.readFile(themeFile, "utf-8");
3123
+ content = await fs$1.promises.readFile(themeFile, "utf-8");
3127
3124
  } catch {
3128
3125
  return;
3129
3126
  }
@@ -3150,7 +3147,7 @@ function startThemeWatcher() {
3150
3147
  themeWatchFileListener = (current, previous) => {
3151
3148
  if (current.mtimeMs !== previous.mtimeMs || current.ctimeMs !== previous.ctimeMs || current.size !== previous.size) scheduleReload();
3152
3149
  };
3153
- fs$2.watchFile(themeFile, { interval: 1e3 }, themeWatchFileListener);
3150
+ fs$1.watchFile(themeFile, { interval: 1e3 }, themeWatchFileListener);
3154
3151
  };
3155
3152
  let failed = false;
3156
3153
  watchWithErrorHandlerAsync(customThemesDir, (_eventType, filename) => {
@@ -3183,7 +3180,7 @@ function stopThemeWatcher() {
3183
3180
  }
3184
3181
  closeWatcher(themeWatcher);
3185
3182
  themeWatcher = void 0;
3186
- if (themeWatchFilePath && themeWatchFileListener) fs$2.unwatchFile(themeWatchFilePath, themeWatchFileListener);
3183
+ if (themeWatchFilePath && themeWatchFileListener) fs$1.unwatchFile(themeWatchFilePath, themeWatchFileListener);
3187
3184
  themeWatchFilePath = void 0;
3188
3185
  themeWatchFileListener = void 0;
3189
3186
  }
@@ -3778,7 +3775,7 @@ function navEntryKeys(keybindings, entry, taken) {
3778
3775
  }
3779
3776
  /** {@link navEntryKeys} split by key, each part with the key a click on it presses. */
3780
3777
  function navEntryKeyParts(keybindings, entry, taken) {
3781
- if (entry.action === void 0) return hintKeyParts(entry.keys ?? "");
3778
+ if (entry.action === void 0) return hintKeyParts$1(entry.keys ?? "");
3782
3779
  const keys = (keybindings?.getKeys?.(entry.action) ?? []).filter((key) => !taken?.has(key));
3783
3780
  for (const key of keys) taken?.add(key);
3784
3781
  return boundKeyParts(keys);
@@ -4132,7 +4129,7 @@ function getSettingsListTheme() {
4132
4129
  label: (text, selected) => selected ? theme.fg("accent", text) : text,
4133
4130
  value: (text, selected) => selected ? theme.fg("accent", text) : theme.fg("muted", text),
4134
4131
  description: (text) => theme.fg("dim", text),
4135
- cursor: theme.fg("accent", "→ "),
4132
+ cursor: theme.fg("accent", theme.bold("∀ ")),
4136
4133
  hint: (text) => theme.fg("dim", text)
4137
4134
  };
4138
4135
  }
@@ -4247,7 +4244,7 @@ function parenthesizedKeyHint(keybinding, description, prefix) {
4247
4244
  }
4248
4245
  /** A hint for a key that is not a keybinding, such as `↑↓ navigate`. A click on a key's text presses that key. */
4249
4246
  function rawKeyHint(key, description) {
4250
- const parts = hintKeyParts$1(formatKeyText(key)).map((part) => ({
4247
+ const parts = hintKeyParts(formatKeyText(key)).map((part) => ({
4251
4248
  ...part,
4252
4249
  text: theme.fg("dim", part.text)
4253
4250
  }));
@@ -4256,8 +4253,8 @@ function rawKeyHint(key, description) {
4256
4253
  // dist/utils/photon.js
4257
4254
  const __atomicDistModuleUrl = new URL("../utils/photon.js", import.meta.url).href;
4258
4255
  const requireFromHere = createRequire(__atomicDistModuleUrl);
4259
- const fs$1 = requireFromHere("fs");
4260
- const unpatchedReadFile = fs$1.readFileSync.bind(fs$1);
4256
+ const fs = requireFromHere("fs");
4257
+ const unpatchedReadFile = fs.readFileSync.bind(fs);
4261
4258
  const WASM_FILENAME = "photon_rs_bg.wasm";
4262
4259
  function pathOrNull(file) {
4263
4260
  if (typeof file === "string") return file;
@@ -4265,18 +4262,18 @@ function pathOrNull(file) {
4265
4262
  return null;
4266
4263
  }
4267
4264
  function getFallbackWasmPaths() {
4268
- const execDir = path$1.dirname(process.execPath);
4265
+ const execDir = path.dirname(process.execPath);
4269
4266
  return [
4270
- path$1.join(execDir, WASM_FILENAME),
4271
- path$1.join(execDir, "photon", WASM_FILENAME),
4272
- path$1.join(process.cwd(), WASM_FILENAME)
4267
+ path.join(execDir, WASM_FILENAME),
4268
+ path.join(execDir, "photon", WASM_FILENAME),
4269
+ path.join(process.cwd(), WASM_FILENAME)
4273
4270
  ];
4274
4271
  }
4275
4272
  function getCandidateWasmPaths() {
4276
4273
  const candidates = [];
4277
4274
  try {
4278
4275
  const entryPath = requireFromHere.resolve("@silvia-odwyer/photon-node");
4279
- candidates.push(path$1.join(path$1.dirname(entryPath), WASM_FILENAME));
4276
+ candidates.push(path.join(path.dirname(entryPath), WASM_FILENAME));
4280
4277
  } catch {}
4281
4278
  candidates.push(...getFallbackWasmPaths());
4282
4279
  return candidates;
@@ -4305,9 +4302,9 @@ function installPhotonWasmRead(wasmBytes) {
4305
4302
  return unpatchedReadFile(...args);
4306
4303
  };
4307
4304
  try {
4308
- fs$1.readFileSync = interceptedReadFile;
4305
+ fs.readFileSync = interceptedReadFile;
4309
4306
  } catch {
4310
- Object.defineProperty(fs$1, "readFileSync", {
4307
+ Object.defineProperty(fs, "readFileSync", {
4311
4308
  value: interceptedReadFile,
4312
4309
  writable: true,
4313
4310
  configurable: true
@@ -4315,9 +4312,9 @@ function installPhotonWasmRead(wasmBytes) {
4315
4312
  }
4316
4313
  return () => {
4317
4314
  try {
4318
- fs$1.readFileSync = unpatchedReadFile;
4315
+ fs.readFileSync = unpatchedReadFile;
4319
4316
  } catch {
4320
- Object.defineProperty(fs$1, "readFileSync", {
4317
+ Object.defineProperty(fs, "readFileSync", {
4321
4318
  value: unpatchedReadFile,
4322
4319
  writable: true,
4323
4320
  configurable: true
@@ -4554,6 +4551,6 @@ function keybindingIdentity(key) {
4554
4551
  "super"
4555
4552
  ].filter((modifier) => parts.includes(modifier)), canonicalBase].join("+");
4556
4553
  }
4557
- export { CodeHighlighter, FS_WATCH_RETRY_DELAY_MS, KEYBINDINGS, KeybindingsManager$1 as KeybindingsManager, NAV_CONFIRM_WINDOW_MS, OVERLAY_ACTIVE_ROW_MARKER, SAFE_FS_WATCH_CANONICALIZATION_FAILED, SAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH, SYSTEM_THEME_NAME, TerminalTextSanitizer, Theme, TwoPressConfirm, ansi256ToHex, applyEarlyInputChunk, clickableHintText, clickableKeyTextHint, closeWatcher, colorEnvironment, consumeStartupInput, detectTerminalThemeForAuto, endTimingSpan, fgAnsi, formatKeyText, getAvailableThemes, getAvailableThemesWithPaths, getCurrentThemeName, getEditorTheme, getGlobalTheme, getLanguageFromPath, getMarkdownTheme, getResolvedThemeColors, getSelectListTheme, getSettingsListTheme, getTerminalTheme, getThemeByName, getThemeExportColors, graphemeAt, hexColorAnsi, hexToRgb, highlightCode, hintKeyParts$1 as hintKeyParts, initTheme, isLightTheme, isNavHelpKey, isSafeFsWatchPathError, isUnsafeWindowsShortPath, keepStartupDialogDraft, keyDisplayText, keyHint, keyHintIfBound, keyText, keyTextHint, keybindingIdentity, linkStartupShell, loadAllHighlightLanguages, loadPhoton, loadThemeFromContent, markTerminalColorsPending, migrateKeybindingsConfig, navActionText, navEntryKeyParts, navEntryKeys, navFirstKeyText, navKeyText, onThemeChange, parenthesizedKeyHint, parseAutoThemeSetting, printTimings, rawKeyHint, recordTimeSinceReset, recordTimingLines, refreshCustomThemes, renderAutocompleteHintLine, renderNavHintLine, renderNavKeyOverlay, resetTimings, resolveColorMode, resolveNativeWatchPath, resolveThemeSetting, sanitizeTerminalText, setRegisteredThemes, setTerminalColorScheme, setTerminalColors, setTheme, setThemeInstance, singleLineDisplayText, slashCommandHint, startEarlyInputCapture, startTimingSpan, stopThemeWatcher, stripOsc133Marks, stripOverlayActiveRowMarker, terminalDisplayCursor, terminalDisplayText, theme, time, watchWithErrorHandler, watchWithErrorHandlerAsync, withEarlyInputHeldForStartupDialog };
4554
+ export { CodeHighlighter, FS_WATCH_RETRY_DELAY_MS, KEYBINDINGS, KeybindingsManager, NAV_CONFIRM_WINDOW_MS, OVERLAY_ACTIVE_ROW_MARKER, SAFE_FS_WATCH_CANONICALIZATION_FAILED, SAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH, SYSTEM_THEME_NAME, TerminalTextSanitizer, Theme, TwoPressConfirm, ansi256ToHex, applyEarlyInputChunk, clickableHintText, clickableKeyTextHint, closeWatcher, colorEnvironment, consumeStartupInput, detectTerminalThemeForAuto, endTimingSpan, fgAnsi, formatKeyText, getAvailableThemes, getAvailableThemesWithPaths, getCurrentThemeName, getEditorTheme, getGlobalTheme, getLanguageFromPath, getMarkdownTheme, getResolvedThemeColors, getSelectListTheme, getSettingsListTheme, getTerminalTheme, getThemeByName, getThemeExportColors, graphemeAt, hexColorAnsi, hexToRgb, highlightCode, hintKeyParts, initTheme, isLightTheme, isNavHelpKey, isSafeFsWatchPathError, isUnsafeWindowsShortPath, keepStartupDialogDraft, keyDisplayText, keyHint, keyHintIfBound, keyText, keyTextHint, keybindingIdentity, linkStartupShell, loadAllHighlightLanguages, loadPhoton, loadThemeFromContent, markTerminalColorsPending, migrateKeybindingsConfig, navActionText, navEntryKeyParts, navEntryKeys, navFirstKeyText, navKeyText, onThemeChange, parenthesizedKeyHint, parseAutoThemeSetting, printTimings, rawKeyHint, recordTimeSinceReset, recordTimingLines, refreshCustomThemes, renderAutocompleteHintLine, renderNavHintLine, renderNavKeyOverlay, resetTimings, resolveColorMode, resolveNativeWatchPath, resolveThemeSetting, sanitizeTerminalText, setRegisteredThemes, setTerminalColorScheme, setTerminalColors, setTheme, setThemeInstance, singleLineDisplayText, slashCommandHint, startEarlyInputCapture, startTimingSpan, stopThemeWatcher, stripOsc133Marks, stripOverlayActiveRowMarker, terminalDisplayCursor, terminalDisplayText, theme, time, watchWithErrorHandler, watchWithErrorHandlerAsync, withEarlyInputHeldForStartupDialog };
4558
4555
 
4559
4556
  //# sourceMappingURL=p2-shell-main-B2WIALFD.js.map