@bastani/atomic 0.9.28-alpha.1 → 0.9.28-alpha.3

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 (332) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/native-client-licenses/NOTICE +2 -0
  4. package/dist/builtin/mcp/package.json +1 -1
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/web-access/package.json +1 -1
  7. package/dist/builtin/workflows/CHANGELOG.md +34 -0
  8. package/dist/builtin/workflows/builtin/{chunk-wz8v67bn.js → chunk-aqv8ny38.js} +257 -259
  9. package/dist/builtin/workflows/builtin/{chunk-f61w0hpm.js → chunk-br4ac9a3.js} +1 -1
  10. package/dist/builtin/workflows/builtin/{chunk-tecnpe8j.js → chunk-p3xmajmj.js} +438 -39
  11. package/dist/builtin/workflows/builtin/chunk-p6jagvyf.js +8 -0
  12. package/dist/builtin/workflows/builtin/goal.js +2 -2
  13. package/dist/builtin/workflows/builtin/index.js +4 -4
  14. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  15. package/dist/builtin/workflows/package.json +1 -1
  16. package/dist/builtin/workflows/src/authoring.d.ts +14 -0
  17. package/dist/builtin/workflows/src/extension/index.bundle.mjs +111102 -110218
  18. package/dist/builtin/workflows/src/index.js +42284 -41141
  19. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +16 -11
  20. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +16 -1
  21. package/dist/cli/args.d.ts.map +1 -1
  22. package/dist/cli/args.js +8 -1
  23. package/dist/cli/args.js.map +1 -1
  24. package/dist/cli/credential-print.d.ts +1 -1
  25. package/dist/cli/credential-print.d.ts.map +1 -1
  26. package/dist/cli/credential-print.js +2 -56
  27. package/dist/cli/credential-print.js.map +1 -1
  28. package/dist/config.d.ts +2 -1
  29. package/dist/config.d.ts.map +1 -1
  30. package/dist/config.js +4 -2
  31. package/dist/config.js.map +1 -1
  32. package/dist/core/agent-session-accessors.d.ts.map +1 -1
  33. package/dist/core/agent-session-accessors.js +6 -1
  34. package/dist/core/agent-session-accessors.js.map +1 -1
  35. package/dist/core/agent-session-compaction.d.ts.map +1 -1
  36. package/dist/core/agent-session-compaction.js +20 -3
  37. package/dist/core/agent-session-compaction.js.map +1 -1
  38. package/dist/core/agent-session-events.d.ts.map +1 -1
  39. package/dist/core/agent-session-events.js +2 -1
  40. package/dist/core/agent-session-events.js.map +1 -1
  41. package/dist/core/agent-session-extension-bindings.d.ts +6 -0
  42. package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
  43. package/dist/core/agent-session-extension-bindings.js +90 -9
  44. package/dist/core/agent-session-extension-bindings.js.map +1 -1
  45. package/dist/core/agent-session-methods.d.ts +3 -1
  46. package/dist/core/agent-session-methods.d.ts.map +1 -1
  47. package/dist/core/agent-session-methods.js.map +1 -1
  48. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  49. package/dist/core/agent-session-prompt.js +14 -1
  50. package/dist/core/agent-session-prompt.js.map +1 -1
  51. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  52. package/dist/core/agent-session-tool-registry.js +1 -0
  53. package/dist/core/agent-session-tool-registry.js.map +1 -1
  54. package/dist/core/agent-session-types.d.ts +2 -0
  55. package/dist/core/agent-session-types.d.ts.map +1 -1
  56. package/dist/core/agent-session-types.js.map +1 -1
  57. package/dist/core/agent-session.d.ts +1 -0
  58. package/dist/core/agent-session.d.ts.map +1 -1
  59. package/dist/core/agent-session.js +6 -1
  60. package/dist/core/agent-session.js.map +1 -1
  61. package/dist/core/bash-executor.d.ts.map +1 -1
  62. package/dist/core/bash-executor.js +22 -4
  63. package/dist/core/bash-executor.js.map +1 -1
  64. package/dist/core/child-session-options.d.ts.map +1 -1
  65. package/dist/core/child-session-options.js +17 -2
  66. package/dist/core/child-session-options.js.map +1 -1
  67. package/dist/core/compaction/classifier-compaction.d.ts +13 -0
  68. package/dist/core/compaction/classifier-compaction.d.ts.map +1 -0
  69. package/dist/core/compaction/classifier-compaction.js +110 -0
  70. package/dist/core/compaction/classifier-compaction.js.map +1 -0
  71. package/dist/core/compaction/compaction-boundary.d.ts.map +1 -1
  72. package/dist/core/compaction/compaction-boundary.js +2 -6
  73. package/dist/core/compaction/compaction-boundary.js.map +1 -1
  74. package/dist/core/compaction/compaction-runner.d.ts +16 -1
  75. package/dist/core/compaction/compaction-runner.d.ts.map +1 -1
  76. package/dist/core/compaction/compaction-runner.js +97 -12
  77. package/dist/core/compaction/compaction-runner.js.map +1 -1
  78. package/dist/core/compaction/compaction-types.d.ts +18 -1
  79. package/dist/core/compaction/compaction-types.d.ts.map +1 -1
  80. package/dist/core/compaction/compaction-types.js +1 -1
  81. package/dist/core/compaction/compaction-types.js.map +1 -1
  82. package/dist/core/compaction/fallback-planner.d.ts +1 -0
  83. package/dist/core/compaction/fallback-planner.d.ts.map +1 -1
  84. package/dist/core/compaction/fallback-planner.js +2 -0
  85. package/dist/core/compaction/fallback-planner.js.map +1 -1
  86. package/dist/core/compaction/index.d.ts +3 -0
  87. package/dist/core/compaction/index.d.ts.map +1 -1
  88. package/dist/core/compaction/index.js +3 -0
  89. package/dist/core/compaction/index.js.map +1 -1
  90. package/dist/core/compaction/model-resolver.d.ts +16 -0
  91. package/dist/core/compaction/model-resolver.d.ts.map +1 -0
  92. package/dist/core/compaction/model-resolver.js +18 -0
  93. package/dist/core/compaction/model-resolver.js.map +1 -0
  94. package/dist/core/compaction/morph-compaction.d.ts +14 -0
  95. package/dist/core/compaction/morph-compaction.d.ts.map +1 -0
  96. package/dist/core/compaction/morph-compaction.js +99 -0
  97. package/dist/core/compaction/morph-compaction.js.map +1 -0
  98. package/dist/core/compaction/pi-summary-fallback.d.ts +34 -0
  99. package/dist/core/compaction/pi-summary-fallback.d.ts.map +1 -0
  100. package/dist/core/compaction/pi-summary-fallback.js +357 -0
  101. package/dist/core/compaction/pi-summary-fallback.js.map +1 -0
  102. package/dist/core/compaction/planner-outcome.d.ts +10 -6
  103. package/dist/core/compaction/planner-outcome.d.ts.map +1 -1
  104. package/dist/core/compaction/planner-outcome.js +11 -4
  105. package/dist/core/compaction/planner-outcome.js.map +1 -1
  106. package/dist/core/compaction/range-planner-diagnostics.d.ts +3 -1
  107. package/dist/core/compaction/range-planner-diagnostics.d.ts.map +1 -1
  108. package/dist/core/compaction/range-planner-diagnostics.js +11 -0
  109. package/dist/core/compaction/range-planner-diagnostics.js.map +1 -1
  110. package/dist/core/compaction/range-planner.d.ts +3 -3
  111. package/dist/core/compaction/range-planner.d.ts.map +1 -1
  112. package/dist/core/compaction/range-planner.js +59 -28
  113. package/dist/core/compaction/range-planner.js.map +1 -1
  114. package/dist/core/compaction/region-trimming.d.ts.map +1 -1
  115. package/dist/core/compaction/region-trimming.js +7 -0
  116. package/dist/core/compaction/region-trimming.js.map +1 -1
  117. package/dist/core/compaction/structured-compaction-input.d.ts +19 -0
  118. package/dist/core/compaction/structured-compaction-input.d.ts.map +1 -0
  119. package/dist/core/compaction/structured-compaction-input.js +70 -0
  120. package/dist/core/compaction/structured-compaction-input.js.map +1 -0
  121. package/dist/core/compaction/transcript-serialization.d.ts +1 -0
  122. package/dist/core/compaction/transcript-serialization.d.ts.map +1 -1
  123. package/dist/core/compaction/transcript-serialization.js +26 -0
  124. package/dist/core/compaction/transcript-serialization.js.map +1 -1
  125. package/dist/core/extensions/api-types.d.ts +2 -2
  126. package/dist/core/extensions/api-types.d.ts.map +1 -1
  127. package/dist/core/extensions/api-types.js.map +1 -1
  128. package/dist/core/extensions/context-types.d.ts +1 -0
  129. package/dist/core/extensions/context-types.d.ts.map +1 -1
  130. package/dist/core/extensions/context-types.js.map +1 -1
  131. package/dist/core/extensions/loader-api.js.map +1 -1
  132. package/dist/core/extensions/loader-virtual-modules.d.ts +3 -4
  133. package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
  134. package/dist/core/extensions/loader-virtual-modules.js +14 -9
  135. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  136. package/dist/core/extensions/runner-context.d.ts +10 -4
  137. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  138. package/dist/core/extensions/runner-context.js +47 -3
  139. package/dist/core/extensions/runner-context.js.map +1 -1
  140. package/dist/core/extensions/runner.d.ts +10 -3
  141. package/dist/core/extensions/runner.d.ts.map +1 -1
  142. package/dist/core/extensions/runner.js +31 -7
  143. package/dist/core/extensions/runner.js.map +1 -1
  144. package/dist/core/extensions/tool-events.d.ts +1 -1
  145. package/dist/core/extensions/tool-events.js.map +1 -1
  146. package/dist/core/extensions/ts-source-specifiers.d.ts +18 -0
  147. package/dist/core/extensions/ts-source-specifiers.d.ts.map +1 -0
  148. package/dist/core/extensions/ts-source-specifiers.js +142 -0
  149. package/dist/core/extensions/ts-source-specifiers.js.map +1 -0
  150. package/dist/core/extensions/workflow-events.d.ts +49 -0
  151. package/dist/core/extensions/workflow-events.d.ts.map +1 -1
  152. package/dist/core/extensions/workflow-events.js.map +1 -1
  153. package/dist/core/extensions/workflow-run-control-hub.d.ts +16 -4
  154. package/dist/core/extensions/workflow-run-control-hub.d.ts.map +1 -1
  155. package/dist/core/extensions/workflow-run-control-hub.js +72 -1
  156. package/dist/core/extensions/workflow-run-control-hub.js.map +1 -1
  157. package/dist/core/extensions/workflow-run-control.d.ts +11 -3
  158. package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
  159. package/dist/core/extensions/workflow-run-control.js.map +1 -1
  160. package/dist/core/messages.d.ts +1 -0
  161. package/dist/core/messages.d.ts.map +1 -1
  162. package/dist/core/messages.js +5 -1
  163. package/dist/core/messages.js.map +1 -1
  164. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  165. package/dist/core/remote-catalog-provider.js +3 -0
  166. package/dist/core/remote-catalog-provider.js.map +1 -1
  167. package/dist/core/sdk-exports.d.ts +2 -2
  168. package/dist/core/sdk-exports.js.map +1 -1
  169. package/dist/core/sdk-types.d.ts +3 -0
  170. package/dist/core/sdk-types.d.ts.map +1 -1
  171. package/dist/core/sdk-types.js.map +1 -1
  172. package/dist/core/sdk.d.ts.map +1 -1
  173. package/dist/core/sdk.js +17 -8
  174. package/dist/core/sdk.js.map +1 -1
  175. package/dist/core/session-manager-history.d.ts.map +1 -1
  176. package/dist/core/session-manager-history.js +4 -2
  177. package/dist/core/session-manager-history.js.map +1 -1
  178. package/dist/core/settings-manager-basic-accessors.d.ts +2 -0
  179. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  180. package/dist/core/settings-manager-basic-accessors.js +29 -0
  181. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  182. package/dist/core/settings-manager-core.js.map +1 -1
  183. package/dist/core/settings-merge.d.ts +3 -0
  184. package/dist/core/settings-merge.d.ts.map +1 -1
  185. package/dist/core/settings-merge.js +18 -4
  186. package/dist/core/settings-merge.js.map +1 -1
  187. package/dist/core/settings-storage.js.map +1 -1
  188. package/dist/core/settings-types.d.ts +1 -0
  189. package/dist/core/settings-types.d.ts.map +1 -1
  190. package/dist/core/settings-types.js.map +1 -1
  191. package/dist/core/transcript.d.ts +58 -0
  192. package/dist/core/transcript.d.ts.map +1 -0
  193. package/dist/core/transcript.js +185 -0
  194. package/dist/core/transcript.js.map +1 -0
  195. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  196. package/dist/extensions/codemode/execute.js +14 -1
  197. package/dist/extensions/codemode/execute.js.map +1 -1
  198. package/dist/extensions/codemode/tool.js +2 -2
  199. package/dist/extensions/codemode/tool.js.map +1 -1
  200. package/dist/extensions/herdr/index.d.ts.map +1 -1
  201. package/dist/extensions/herdr/index.js +15 -10
  202. package/dist/extensions/herdr/index.js.map +1 -1
  203. package/dist/extensions/herdr/pane-owner.d.ts +6 -2
  204. package/dist/extensions/herdr/pane-owner.d.ts.map +1 -1
  205. package/dist/extensions/herdr/pane-owner.js +19 -4
  206. package/dist/extensions/herdr/pane-owner.js.map +1 -1
  207. package/dist/extensions/llama/provider.d.ts.map +1 -1
  208. package/dist/extensions/llama/provider.js +19 -8
  209. package/dist/extensions/llama/provider.js.map +1 -1
  210. package/dist/extensions/mcp/cli.js +18 -24
  211. package/dist/extensions/mcp/cli.js.map +1 -1
  212. package/dist/extensions/mcp/client/auth-provider.d.ts +4 -0
  213. package/dist/extensions/mcp/client/auth-provider.d.ts.map +1 -1
  214. package/dist/extensions/mcp/client/auth-provider.js.map +1 -1
  215. package/dist/extensions/mcp/client/oauth/discovery.d.ts +3 -0
  216. package/dist/extensions/mcp/client/oauth/discovery.d.ts.map +1 -1
  217. package/dist/extensions/mcp/client/oauth/discovery.js +8 -5
  218. package/dist/extensions/mcp/client/oauth/discovery.js.map +1 -1
  219. package/dist/extensions/mcp/client/oauth/flow.d.ts +4 -0
  220. package/dist/extensions/mcp/client/oauth/flow.d.ts.map +1 -1
  221. package/dist/extensions/mcp/client/oauth/flow.js +12 -2
  222. package/dist/extensions/mcp/client/oauth/flow.js.map +1 -1
  223. package/dist/extensions/mcp/client/transports/streamable-http.d.ts +3 -0
  224. package/dist/extensions/mcp/client/transports/streamable-http.d.ts.map +1 -1
  225. package/dist/extensions/mcp/client/transports/streamable-http.js +17 -14
  226. package/dist/extensions/mcp/client/transports/streamable-http.js.map +1 -1
  227. package/dist/extensions/mcp/index.d.ts.map +1 -1
  228. package/dist/extensions/mcp/index.js +150 -72
  229. package/dist/extensions/mcp/index.js.map +1 -1
  230. package/dist/extensions/mcp/oauth.d.ts +5 -3
  231. package/dist/extensions/mcp/oauth.d.ts.map +1 -1
  232. package/dist/extensions/mcp/oauth.js +36 -10
  233. package/dist/extensions/mcp/oauth.js.map +1 -1
  234. package/dist/extensions/mcp/ui.d.ts +3 -3
  235. package/dist/extensions/mcp/ui.d.ts.map +1 -1
  236. package/dist/extensions/mcp/ui.js +10 -2
  237. package/dist/extensions/mcp/ui.js.map +1 -1
  238. package/dist/index.d.ts +3 -1
  239. package/dist/index.d.ts.map +1 -1
  240. package/dist/index.js +2 -0
  241. package/dist/index.js.map +1 -1
  242. package/dist/main-deferred-startup.d.ts +1 -0
  243. package/dist/main-deferred-startup.d.ts.map +1 -1
  244. package/dist/main-deferred-startup.js +9 -21
  245. package/dist/main-deferred-startup.js.map +1 -1
  246. package/dist/main.d.ts.map +1 -1
  247. package/dist/main.js +8 -6
  248. package/dist/main.js.map +1 -1
  249. package/dist/modes/interactive/components/compaction-boundary-message.d.ts +2 -0
  250. package/dist/modes/interactive/components/compaction-boundary-message.d.ts.map +1 -1
  251. package/dist/modes/interactive/components/compaction-boundary-message.js +15 -3
  252. package/dist/modes/interactive/components/compaction-boundary-message.js.map +1 -1
  253. package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
  254. package/dist/modes/interactive/components/settings-selector-items.js +43 -0
  255. package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
  256. package/dist/modes/interactive/components/settings-selector-types.d.ts +6 -0
  257. package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
  258. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  259. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  260. package/dist/modes/interactive/interactive-input-handling.d.ts.map +1 -1
  261. package/dist/modes/interactive/interactive-input-handling.js +1 -47
  262. package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
  263. package/dist/modes/interactive/interactive-mode-base.d.ts +0 -1
  264. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  265. package/dist/modes/interactive/interactive-mode-base.js +0 -1
  266. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  267. package/dist/modes/interactive/interactive-mode-surface.d.ts +0 -1
  268. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  269. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  270. package/dist/modes/interactive/interactive-prompt-restore.d.ts.map +1 -1
  271. package/dist/modes/interactive/interactive-prompt-restore.js +0 -5
  272. package/dist/modes/interactive/interactive-prompt-restore.js.map +1 -1
  273. package/dist/modes/interactive/interactive-prompt-turn.js +6 -4
  274. package/dist/modes/interactive/interactive-prompt-turn.js.map +1 -1
  275. package/dist/modes/interactive/interactive-render-chat.js +13 -6
  276. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  277. package/dist/modes/interactive/interactive-selectors.js +8 -0
  278. package/dist/modes/interactive/interactive-selectors.js.map +1 -1
  279. package/dist/modes/interactive/interactive-session-runtime.js +2 -0
  280. package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
  281. package/dist/modes/interactive/interactive-startup.js +1 -1
  282. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  283. package/dist/modes/rpc/rpc-client-process.d.ts +7 -0
  284. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  285. package/dist/modes/rpc/rpc-client-process.js +20 -3
  286. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  287. package/dist/modes/rpc/rpc-command-timeouts.d.ts.map +1 -1
  288. package/dist/modes/rpc/rpc-command-timeouts.js +1 -0
  289. package/dist/modes/rpc/rpc-command-timeouts.js.map +1 -1
  290. package/dist/utils/ansi.d.ts +8 -0
  291. package/dist/utils/ansi.d.ts.map +1 -1
  292. package/dist/utils/ansi.js +29 -10
  293. package/dist/utils/ansi.js.map +1 -1
  294. package/dist/utils/clipboard.d.ts.map +1 -1
  295. package/dist/utils/clipboard.js +13 -3
  296. package/dist/utils/clipboard.js.map +1 -1
  297. package/dist/utils/credential-redaction.d.ts +2 -0
  298. package/dist/utils/credential-redaction.d.ts.map +1 -0
  299. package/dist/utils/credential-redaction.js +20 -0
  300. package/dist/utils/credential-redaction.js.map +1 -0
  301. package/dist/utils/image-resize-core.d.ts +8 -0
  302. package/dist/utils/image-resize-core.d.ts.map +1 -1
  303. package/dist/utils/image-resize-core.js +1 -0
  304. package/dist/utils/image-resize-core.js.map +1 -1
  305. package/dist/utils/image-resize-worker.js +3 -2
  306. package/dist/utils/image-resize-worker.js.map +1 -1
  307. package/dist/utils/image-resize.d.ts +2 -2
  308. package/dist/utils/image-resize.d.ts.map +1 -1
  309. package/dist/utils/image-resize.js +7 -10
  310. package/dist/utils/image-resize.js.map +1 -1
  311. package/docs/codemode.md +21 -1
  312. package/docs/compaction/reference.md +10 -4
  313. package/docs/compaction.md +40 -8
  314. package/docs/docs.json +1 -0
  315. package/docs/extensions/api-reference.md +4 -0
  316. package/docs/extensions/events.md +2 -2
  317. package/docs/llama-cpp.md +9 -2
  318. package/docs/mcp-servers.md +3 -3
  319. package/docs/models.md +10 -0
  320. package/docs/providers.md +39 -5
  321. package/docs/reference/cli.md +2 -2
  322. package/docs/sdk/reference.md +19 -4
  323. package/docs/sdk/web-server.md +325 -0
  324. package/docs/sdk.md +83 -1
  325. package/docs/security.md +1 -1
  326. package/docs/settings.md +2 -2
  327. package/docs/tools.md +1 -1
  328. package/docs/workflows/api-reference.md +71 -3
  329. package/docs/workflows/builtins.md +4 -0
  330. package/docs/workflows/operations.md +13 -5
  331. package/npm-shrinkwrap.json +32 -32
  332. package/package.json +3 -3
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC;AAoBhC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AACxF,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AAEtH,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAiC,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACxG,OAAO,EAGN,yBAAyB,EACzB,kBAAkB,EAClB,4BAA4B,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AAM,0BAA0B,CAAC;AACvF,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,qCAAqC,EACrC,uCAAuC,EAGvC,qBAAqB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export type { ExtensionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport type { ExecuteToolOptions, ExtensionToolContext } from \"./core/extensions/context-types.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport type {\n\tToolAnnotations,\n\tToolExposure,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n} from \"./core/extensions/tool-types.ts\";\nexport { resolveRestoredModelReference } from \"./core/model-resolver-initial.ts\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { formatToolCallWithArgs } from \"./core/tools/render-utils.ts\";\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.js\";\nexport {\n\ttype CodemodeToolDetails,\n\ttype CodemodeToolOptions,\n\tcreateCodemodeDescription,\n\tcreateCodemodeTool,\n\tcreateCodemodeToolDefinition,\n} from \"./extensions/codemode/tool.js\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.js\";\nexport { createToolSearchToolDefinition, type ToolSearchToolOptions } from \"./extensions/tool-search/tool.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport {\n\tAutoRoutingInferenceError,\n\ttype ModelRoute,\n\ttype ModelRoutingContext,\n\trouteExecutionModel,\n} from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tANTHROPIC_FAST_MODE_MODEL_IDS,\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\tFAST_MODEL_SPEED,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesAnthropicFastMode,\n\tusesOpenAIFastServiceTier,\n\tusesXaiFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { matchesMcpDirectToolSelection } from \"./core/mcp-child-policy.ts\";\nexport {\n\ttype McpExposure,\n\ttype McpOAuthConfig,\n\ttype McpServerConfig,\n\ttype McpServerContribution,\n\tmcpNamespace,\n\tvalidateMcpServerConfig,\n} from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n\tsetsProviders,\n} from \"./core/model-routing-constraints.js\";\nexport {\n\tisModelRoutingDebugEnabled,\n\tMODEL_ROUTING_DEBUG_ENV,\n\treportModelRoutingDebug,\n} from \"./core/model-routing-debug.js\";\nexport {\n\tDIFFICULTY_LEVELS,\n\ttype Difficulty,\n\tMISTAKE_COST_LEVELS,\n\ttype MistakeCost,\n\tmergeTaskNeeds,\n\tparseTaskNeeds,\n\ttype TaskNeeds,\n\tTaskNeedsSchema,\n\tWORK_KINDS,\n\ttype WorkKind,\n} from \"./core/model-routing-needs.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedMcpServer,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust, QuietStartup } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype ModelRoutingSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype Settings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tgenerateStructuredOutput,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteFileOptions,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport {\n\ttype LoadedMcpConfig,\n\ttype McpServerConfigPatch,\n\ttype McpServerEntry,\n\tupdateMcpServerConfig,\n} from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions } from \"./extensions/mcp/index.js\";\nexport { McpOAuthCredentialStore } from \"./extensions/mcp/oauth.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment, spawnProcess } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC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cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export type { ExtensionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport type { ExecuteToolOptions, ExtensionToolContext } from \"./core/extensions/context-types.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport {\n\ttype ExtensionContextEffectPhase,\n\tpublishExtensionContextEffect,\n\tregisterExtensionContextRetirementEffect,\n} from \"./core/extensions/runner-context.ts\";\nexport type {\n\tToolAnnotations,\n\tToolExposure,\n\tToolLoadout,\n\tToolLoadoutChanges,\n\tToolNamespace,\n\tToolRendererResolver,\n\tToolRenderers,\n} from \"./core/extensions/tool-types.ts\";\nexport { resolveRestoredModelReference } from \"./core/model-resolver-initial.ts\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { formatToolCallWithArgs } from \"./core/tools/render-utils.ts\";\nexport {\n\tcreateTranscript,\n\ttype Transcript,\n\ttype TranscriptOptions,\n\ttype TranscriptPart,\n\ttype TranscriptTextPart,\n\ttype TranscriptThinkingPart,\n\ttype TranscriptToolCallPart,\n\ttype TranscriptToolResult,\n\ttype TranscriptToolResultFormat,\n} from \"./core/transcript.js\";\nexport { type CodemodeExtensionOptions, createCodemodeExtension } from \"./extensions/codemode/index.js\";\nexport {\n\ttype CodemodeToolDetails,\n\ttype CodemodeToolOptions,\n\tcreateCodemodeDescription,\n\tcreateCodemodeTool,\n\tcreateCodemodeToolDefinition,\n} from \"./extensions/codemode/tool.js\";\nexport { createToolSearchExtension } from \"./extensions/tool-search/index.js\";\nexport { createToolSearchToolDefinition, type ToolSearchToolOptions } from \"./extensions/tool-search/tool.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport {\n\tAutoRoutingInferenceError,\n\ttype ModelRoute,\n\ttype ModelRoutingContext,\n\trouteExecutionModel,\n} from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tANTHROPIC_FAST_MODE_MODEL_IDS,\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\tFAST_MODEL_SPEED,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesAnthropicFastMode,\n\tusesOpenAIFastServiceTier,\n\tusesXaiFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { matchesMcpDirectToolSelection } from \"./core/mcp-child-policy.ts\";\nexport {\n\ttype McpExposure,\n\ttype McpOAuthConfig,\n\ttype McpServerConfig,\n\ttype McpServerContribution,\n\tmcpNamespace,\n\tvalidateMcpServerConfig,\n} from \"./core/mcp-servers.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n\tsetsProviders,\n} from \"./core/model-routing-constraints.js\";\nexport {\n\tisModelRoutingDebugEnabled,\n\tMODEL_ROUTING_DEBUG_ENV,\n\treportModelRoutingDebug,\n} from \"./core/model-routing-debug.js\";\nexport {\n\tDIFFICULTY_LEVELS,\n\ttype Difficulty,\n\tMISTAKE_COST_LEVELS,\n\ttype MistakeCost,\n\tmergeTaskNeeds,\n\tparseTaskNeeds,\n\ttype TaskNeeds,\n\tTaskNeedsSchema,\n\tWORK_KINDS,\n\ttype WorkKind,\n} from \"./core/model-routing-needs.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedMcpServer,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\tbuildSessionProjection,\n\ttype CompactionEntry,\n\ttype ContextEditableContent,\n\ttype ContextEditEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\ttype ProjectedSessionEntry,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionProjection,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust, QuietStartup } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype ModelRoutingSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype Settings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tgenerateStructuredOutput,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteFileOptions,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.js\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport {\n\ttype LoadedMcpConfig,\n\ttype McpServerConfigPatch,\n\ttype McpServerEntry,\n\tupdateMcpServerConfig,\n} from \"./extensions/mcp/config.ts\";\nexport { createMcpExtension, type McpExtensionOptions } from \"./extensions/mcp/index.js\";\nexport { McpOAuthCredentialStore } from \"./extensions/mcp/oauth.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment, spawnProcess } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
@@ -36,6 +36,7 @@ export interface ComputeStartupInputCaptureInput {
36
36
  resolvedExtensionPathCount: number;
37
37
  resolvedResourcePathCount: number;
38
38
  deprecationWarningCount: number;
39
+ sessionSelectionComplete?: boolean;
39
40
  }
40
41
  export declare function computeStartupInputCaptureEnabled(input: ComputeStartupInputCaptureInput): boolean;
41
42
  export declare function computeDeferExtensions(input: ComputeDeferExtensionsInput): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"main-deferred-startup.d.ts","sourceRoot":"","sources":["../src/main-deferred-startup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,g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M,CAAC;CACf;AAED,MAAM,WAAW,6CAA6C;IAC7D,sBAAsB,EAAE,OAAO,CAAC;IAChC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yBAAyB,EAAE,OAAO,CAAC;IACnC,kBAAkB,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,+BAA+B;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,IAAI,CACX,IAAI,EACF,MAAM,GACN,YAAY,GACZ,sBAAsB,GACtB,cAAc,GACd,oBAAoB,GACpB,cAAc,GACd,UAAU,GACV,OAAO,GACP,QAAQ,GACR,SAAS,CACX,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;IAClD,0BAA0B,EAAE,MAAM,CAAC;IACnC,yBAAyB,EAAE,MAAM,CAAC;IAClC,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,+BAA+B,GAAG,OAAO,CAajG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAelF;AAED;;;;GAIG;AACH,wBAAgB,wCAAwC,CACvD,KAAK,EAAE,6CAA6C,GAClD,OAAO,CAUT;AAED,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,WAAW,EAAE,GAAG,MAAM,CAOzE"}
@@ -1,28 +1,16 @@
1
1
  import { hasProjectTrustInputs } from "./core/trust-manager.js";
2
2
  export function computeStartupInputCaptureEnabled(input) {
3
- if (input.parsed.resume || input.parsed.session !== undefined)
3
+ if (!input.sessionSelectionComplete && (input.parsed.resume || input.parsed.session !== undefined))
4
4
  return false;
5
5
  const hasTrustInputs = hasProjectTrustInputs(input.sessionCwd);
6
- // Explicit extension and resource paths make startup slower without adding a
7
- // pre-TUI stdin consumer, so their longer typing window makes capture more
8
- // necessary. Ignore their counts here while computeDeferExtensions continues
9
- // to use the real counts when deciding whether to defer the actual loading.
10
- return (input.deprecationWarningCount === 0 &&
11
- computeDeferExtensions({
12
- appMode: input.appMode,
13
- stdinIsTTY: input.stdinIsTTY,
14
- hasSessionStartEvent: false,
15
- help: input.parsed.help,
16
- listModels: input.parsed.listModels,
17
- shouldResolveProjectTrust: input.parsed.projectTrustOverride === undefined && hasTrustInputs,
18
- storedProjectTrust: hasTrustInputs ? input.projectTrustStore.get(input.sessionCwd) : null,
19
- resolvedExtensionPathCount: 0,
20
- resolvedResourcePathCount: 0,
21
- hasSystemPromptInput: input.parsed.systemPrompt !== undefined || (input.parsed.appendSystemPrompt?.length ?? 0) > 0,
22
- unknownFlagCount: input.parsed.unknownFlags.size,
23
- provider: input.parsed.provider,
24
- model: input.parsed.model,
25
- }));
6
+ return (input.appMode === "interactive" &&
7
+ input.stdinIsTTY &&
8
+ !input.parsed.help &&
9
+ input.parsed.listModels === undefined &&
10
+ input.deprecationWarningCount === 0 &&
11
+ (input.parsed.projectTrustOverride !== undefined ||
12
+ !hasTrustInputs ||
13
+ input.projectTrustStore.get(input.sessionCwd) !== null));
26
14
  }
27
15
  export function computeDeferExtensions(input) {
28
16
  return (input.appMode === "interactive" &&
@@ -1 +1 @@
1
- {"version":3,"file":"main-deferred-startup.js","sourceRoot":"","sources":["../src/main-deferred-startup.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAqDhE,MAAM,UAAU,iCAAiC,CAAC,KAAsC;IACvF,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS;QAAE,OAAO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S;QAC9B,CAAC,CAAC,KAAK,CAAC,yBAAyB,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;QACvE,KAAK,CAAC,0BAA0B,KAAK,CAAC;QACtC,KAAK,CAAC,yBAAyB,KAAK,CAAC;QACrC,CAAC,KAAK,CAAC,oBAAoB;QAC3B,KAAK,CAAC,QAAQ,KAAK,SAAS;QAC5B,KAAK,CAAC,KAAK,KAAK,SAAS;QACzB,KAAK,CAAC,gBAAgB,KAAK,CAAC,CAC5B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wCAAwC,CACvD,KAAoD;IAEpD,OAAO,CACN,KAAK,CAAC,sBAAsB;QAC5B,CAAC,KAAK,CAAC,oBAAoB;QAC3B,CAAC,CAAC,KAAK,CAAC,yBAAyB,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;QACvE,KAAK,CAAC,0BAA0B,KAAK,CAAC;QACtC,KAAK,CAAC,yBAAyB,KAAK,CAAC;QACrC,CAAC,KAAK,CAAC,oBAAoB;QAC3B,KAAK,CAAC,gBAAgB,KAAK,CAAC,CAC5B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,YAA2B;IAChE,OAAO,YAAY;SACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACf,MAAM,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC9C,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC","sourcesContent":["import type { Args } from \"./cli/args.ts\";\nimport type { ScopedModel } from \"./core/model-resolver-types.ts\";\nimport type { ProjectTrustStore } from \"./core/trust-manager.ts\";\nimport { hasProjectTrustInputs } from \"./core/trust-manager.ts\";\nimport type { AppMode } from \"./main-app-mode.ts\";\n\nexport interface ComputeDeferExtensionsInput {\n\tappMode: AppMode;\n\tstdinIsTTY: boolean;\n\thasSessionStartEvent: boolean;\n\thelp?: boolean;\n\tlistModels?: Args[\"listModels\"];\n\tshouldResolveProjectTrust: boolean;\n\tstoredProjectTrust: boolean | null;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\thasSystemPromptInput: boolean;\n\tunknownFlagCount: number;\n\tprovider?: string;\n\tmodel?: string;\n}\n\nexport interface ComputeInteractiveEngineResourceDeferralInput {\n\tinteractiveEngineChild: boolean;\n\thasSessionStartEvent: boolean;\n\tshouldResolveProjectTrust: boolean;\n\tstoredProjectTrust: boolean | null;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\thasSystemPromptInput: boolean;\n\tunknownFlagCount: number;\n}\n\nexport interface ComputeStartupInputCaptureInput {\n\tappMode: AppMode;\n\tstdinIsTTY: boolean;\n\tparsed: Pick<\n\t\tArgs,\n\t\t| \"help\"\n\t\t| \"listModels\"\n\t\t| \"projectTrustOverride\"\n\t\t| \"systemPrompt\"\n\t\t| \"appendSystemPrompt\"\n\t\t| \"unknownFlags\"\n\t\t| \"provider\"\n\t\t| \"model\"\n\t\t| \"resume\"\n\t\t| \"session\"\n\t>;\n\tsessionCwd: string;\n\tprojectTrustStore: Pick<ProjectTrustStore, \"get\">;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\tdeprecationWarningCount: number;\n}\n\nexport function computeStartupInputCaptureEnabled(input: ComputeStartupInputCaptureInput): boolean {\n\tif (input.parsed.resume || input.parsed.session !== undefined) return false;\n\tconst hasTrustInputs = hasProjectTrustInputs(input.sessionCwd);\n\t// Explicit extension and resource paths make startup slower without adding a\n\t// pre-TUI stdin consumer, so their longer typing window makes capture more\n\t// necessary. Ignore their counts here while computeDeferExtensions continues\n\t// to use the real counts when deciding whether to defer the actual loading.\n\treturn (\n\t\tinput.deprecationWarningCount === 0 &&\n\t\tcomputeDeferExtensions({\n\t\t\tappMode: input.appMode,\n\t\t\tstdinIsTTY: input.stdinIsTTY,\n\t\t\thasSessionStartEvent: false,\n\t\t\thelp: input.parsed.help,\n\t\t\tlistModels: input.parsed.listModels,\n\t\t\tshouldResolveProjectTrust: input.parsed.projectTrustOverride === undefined && hasTrustInputs,\n\t\t\tstoredProjectTrust: hasTrustInputs ? input.projectTrustStore.get(input.sessionCwd) : null,\n\t\t\tresolvedExtensionPathCount: 0,\n\t\t\tresolvedResourcePathCount: 0,\n\t\t\thasSystemPromptInput:\n\t\t\t\tinput.parsed.systemPrompt !== undefined || (input.parsed.appendSystemPrompt?.length ?? 0) > 0,\n\t\t\tunknownFlagCount: input.parsed.unknownFlags.size,\n\t\t\tprovider: input.parsed.provider,\n\t\t\tmodel: input.parsed.model,\n\t\t})\n\t);\n}\n\nexport function computeDeferExtensions(input: ComputeDeferExtensionsInput): boolean {\n\treturn (\n\t\tinput.appMode === \"interactive\" &&\n\t\tinput.stdinIsTTY &&\n\t\t!input.hasSessionStartEvent &&\n\t\t!input.help &&\n\t\tinput.listModels === undefined &&\n\t\t(!input.shouldResolveProjectTrust || input.storedProjectTrust !== null) &&\n\t\tinput.resolvedExtensionPathCount === 0 &&\n\t\tinput.resolvedResourcePathCount === 0 &&\n\t\t!input.hasSystemPromptInput &&\n\t\tinput.provider === undefined &&\n\t\tinput.model === undefined &&\n\t\tinput.unknownFlagCount === 0\n\t);\n}\n\n/**\n * The isolated engine may bind its minimal RPC session before loading optional\n * bundled resources. User-selected paths and trust-sensitive startup stay\n * synchronous because they can affect the first visible or interactive state.\n */\nexport function computeInteractiveEngineResourceDeferral(\n\tinput: ComputeInteractiveEngineResourceDeferralInput,\n): boolean {\n\treturn (\n\t\tinput.interactiveEngineChild &&\n\t\t!input.hasSessionStartEvent &&\n\t\t(!input.shouldResolveProjectTrust || input.storedProjectTrust !== null) &&\n\t\tinput.resolvedExtensionPathCount === 0 &&\n\t\tinput.resolvedResourcePathCount === 0 &&\n\t\t!input.hasSystemPromptInput &&\n\t\tinput.unknownFlagCount === 0\n\t);\n}\n\nexport function formatScopedModelList(scopedModels: ScopedModel[]): string {\n\treturn scopedModels\n\t\t.map((scoped) => {\n\t\t\tconst thinkingSuffix = scoped.thinkingLevel ? `:${scoped.thinkingLevel}` : \"\";\n\t\t\treturn `${scoped.model.id}${thinkingSuffix}`;\n\t\t})\n\t\t.join(\", \");\n}\n"]}
1
+ {"version":3,"file":"main-deferred-startup.js","sourceRoot":"","sources":["../src/main-deferred-startup.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAsDhE,MAAM,UAAU,iCAAiC,CAAC,KAAsC;IACvF,IAAI,CAAC,KAAK,CAAC,wBAAwB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC;QAAE,OAAO,KAAK,CAAC;IACjH,MAAM,cAAc,GAAG,qBAAqB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/D,OAAO,CACN,KAAK,CAAC,OAAO,KAAK,aAAa;QAC/B,KAAK,CAAC,UAAU;QAChB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;QAClB,KAAK,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS;QACrC,KAAK,CAAC,uBAAuB,KAAK,CAAC;QACnC,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,KAAK,SAAS;YAC/C,CAAC,cAAc;YACf,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,CACxD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACxE,OAAO,CACN,KAAK,CAAC,OAAO,KAAK,aAAa;QAC/B,KAAK,CAAC,UAAU;QAChB,CAAC,KAAK,CAAC,oBAAoB;QAC3B,CAAC,KAAK,CAAC,IAAI;QACX,KAAK,CAAC,UAAU,KAAK,SAAS;QAC9B,CAAC,CAAC,KAAK,CAAC,yBAAyB,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;QACvE,KAAK,CAAC,0BAA0B,KAAK,CAAC;QACtC,KAAK,CAAC,yBAAyB,KAAK,CAAC;QACrC,CAAC,KAAK,CAAC,oBAAoB;QAC3B,KAAK,CAAC,QAAQ,KAAK,SAAS;QAC5B,KAAK,CAAC,KAAK,KAAK,SAAS;QACzB,KAAK,CAAC,gBAAgB,KAAK,CAAC,CAC5B,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wCAAwC,CACvD,KAAoD;IAEpD,OAAO,CACN,KAAK,CAAC,sBAAsB;QAC5B,CAAC,KAAK,CAAC,oBAAoB;QAC3B,CAAC,CAAC,KAAK,CAAC,yBAAyB,IAAI,KAAK,CAAC,kBAAkB,KAAK,IAAI,CAAC;QACvE,KAAK,CAAC,0BAA0B,KAAK,CAAC;QACtC,KAAK,CAAC,yBAAyB,KAAK,CAAC;QACrC,CAAC,KAAK,CAAC,oBAAoB;QAC3B,KAAK,CAAC,gBAAgB,KAAK,CAAC,CAC5B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,YAA2B;IAChE,OAAO,YAAY;SACjB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QACf,MAAM,cAAc,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAC9C,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC","sourcesContent":["import type { Args } from \"./cli/args.ts\";\nimport type { ScopedModel } from \"./core/model-resolver-types.ts\";\nimport type { ProjectTrustStore } from \"./core/trust-manager.ts\";\nimport { hasProjectTrustInputs } from \"./core/trust-manager.ts\";\nimport type { AppMode } from \"./main-app-mode.ts\";\n\nexport interface ComputeDeferExtensionsInput {\n\tappMode: AppMode;\n\tstdinIsTTY: boolean;\n\thasSessionStartEvent: boolean;\n\thelp?: boolean;\n\tlistModels?: Args[\"listModels\"];\n\tshouldResolveProjectTrust: boolean;\n\tstoredProjectTrust: boolean | null;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\thasSystemPromptInput: boolean;\n\tunknownFlagCount: number;\n\tprovider?: string;\n\tmodel?: string;\n}\n\nexport interface ComputeInteractiveEngineResourceDeferralInput {\n\tinteractiveEngineChild: boolean;\n\thasSessionStartEvent: boolean;\n\tshouldResolveProjectTrust: boolean;\n\tstoredProjectTrust: boolean | null;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\thasSystemPromptInput: boolean;\n\tunknownFlagCount: number;\n}\n\nexport interface ComputeStartupInputCaptureInput {\n\tappMode: AppMode;\n\tstdinIsTTY: boolean;\n\tparsed: Pick<\n\t\tArgs,\n\t\t| \"help\"\n\t\t| \"listModels\"\n\t\t| \"projectTrustOverride\"\n\t\t| \"systemPrompt\"\n\t\t| \"appendSystemPrompt\"\n\t\t| \"unknownFlags\"\n\t\t| \"provider\"\n\t\t| \"model\"\n\t\t| \"resume\"\n\t\t| \"session\"\n\t>;\n\tsessionCwd: string;\n\tprojectTrustStore: Pick<ProjectTrustStore, \"get\">;\n\tresolvedExtensionPathCount: number;\n\tresolvedResourcePathCount: number;\n\tdeprecationWarningCount: number;\n\tsessionSelectionComplete?: boolean;\n}\n\nexport function computeStartupInputCaptureEnabled(input: ComputeStartupInputCaptureInput): boolean {\n\tif (!input.sessionSelectionComplete && (input.parsed.resume || input.parsed.session !== undefined)) return false;\n\tconst hasTrustInputs = hasProjectTrustInputs(input.sessionCwd);\n\treturn (\n\t\tinput.appMode === \"interactive\" &&\n\t\tinput.stdinIsTTY &&\n\t\t!input.parsed.help &&\n\t\tinput.parsed.listModels === undefined &&\n\t\tinput.deprecationWarningCount === 0 &&\n\t\t(input.parsed.projectTrustOverride !== undefined ||\n\t\t\t!hasTrustInputs ||\n\t\t\tinput.projectTrustStore.get(input.sessionCwd) !== null)\n\t);\n}\n\nexport function computeDeferExtensions(input: ComputeDeferExtensionsInput): boolean {\n\treturn (\n\t\tinput.appMode === \"interactive\" &&\n\t\tinput.stdinIsTTY &&\n\t\t!input.hasSessionStartEvent &&\n\t\t!input.help &&\n\t\tinput.listModels === undefined &&\n\t\t(!input.shouldResolveProjectTrust || input.storedProjectTrust !== null) &&\n\t\tinput.resolvedExtensionPathCount === 0 &&\n\t\tinput.resolvedResourcePathCount === 0 &&\n\t\t!input.hasSystemPromptInput &&\n\t\tinput.provider === undefined &&\n\t\tinput.model === undefined &&\n\t\tinput.unknownFlagCount === 0\n\t);\n}\n\n/**\n * The isolated engine may bind its minimal RPC session before loading optional\n * bundled resources. User-selected paths and trust-sensitive startup stay\n * synchronous because they can affect the first visible or interactive state.\n */\nexport function computeInteractiveEngineResourceDeferral(\n\tinput: ComputeInteractiveEngineResourceDeferralInput,\n): boolean {\n\treturn (\n\t\tinput.interactiveEngineChild &&\n\t\t!input.hasSessionStartEvent &&\n\t\t(!input.shouldResolveProjectTrust || input.storedProjectTrust !== null) &&\n\t\tinput.resolvedExtensionPathCount === 0 &&\n\t\tinput.resolvedResourcePathCount === 0 &&\n\t\t!input.hasSystemPromptInput &&\n\t\tinput.unknownFlagCount === 0\n\t);\n}\n\nexport function formatScopedModelList(scopedModels: ScopedModel[]): string {\n\treturn scopedModels\n\t\t.map((scoped) => {\n\t\t\tconst thinkingSuffix = scoped.thinkingLevel ? `:${scoped.thinkingLevel}` : \"\";\n\t\t\treturn `${scoped.model.id}${thinkingSuffix}`;\n\t\t})\n\t\t.join(\", \");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAenD,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6JnD,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,iBAipB/D"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAenD,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6JnD,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,WAAW,iBAwpB/D"}
package/dist/main.js CHANGED
@@ -306,20 +306,22 @@ export async function main(argv, options) {
306
306
  (!startupHasTrustInputs || startupDefaultProjectTrust === "always");
307
307
  const resolvedExtensionPaths = resolveCliPaths(cwd, parsed.extensions), resolvedSkillPaths = resolveCliPaths(cwd, parsed.skills);
308
308
  const resolvedPromptTemplatePaths = resolveCliPaths(cwd, parsed.promptTemplates), resolvedThemePaths = resolveCliPaths(cwd, parsed.themes);
309
- let startupEarlyInputCapture = startEarlyInputCapture({
309
+ const beginStartupInputCapture = (sessionCwd, sessionSelectionComplete = false, deprecationWarningCount = 0) => startEarlyInputCapture({
310
310
  enabled: computeStartupInputCaptureEnabled({
311
311
  appMode,
312
312
  stdinIsTTY: process.stdin.isTTY === true,
313
313
  parsed,
314
- sessionCwd: cwd,
314
+ sessionCwd,
315
315
  projectTrustStore,
316
316
  resolvedExtensionPathCount: resolvedExtensionPaths?.length ?? 0,
317
317
  resolvedResourcePathCount: (resolvedSkillPaths?.length ?? 0) +
318
318
  (resolvedPromptTemplatePaths?.length ?? 0) +
319
319
  (resolvedThemePaths?.length ?? 0),
320
- deprecationWarningCount: 0,
320
+ deprecationWarningCount,
321
+ sessionSelectionComplete,
321
322
  }),
322
323
  });
324
+ let startupEarlyInputCapture = beginStartupInputCapture(cwd);
323
325
  // Run migrations after computing startup project trust so project-local migrations
324
326
  // cannot read or mutate untrusted project config before approval.
325
327
  const { migratedAuthProviders: migratedProviders, deprecationWarnings } = runMigrations(cwd, {
@@ -370,12 +372,14 @@ export async function main(argv, options) {
370
372
  const name = parsed.name.trim();
371
373
  if (!name) {
372
374
  console.error(chalk.red("Error: --name requires a non-empty value"));
375
+ startupEarlyInputCapture?.consume();
373
376
  process.exit(1);
374
377
  }
375
378
  sessionManager.appendSessionInfo(name);
376
379
  }
377
380
  time("createSessionManager");
378
381
  const sessionCwd = sessionManager.getCwd();
382
+ startupEarlyInputCapture ??= beginStartupInputCapture(sessionCwd, true, deprecationWarnings.length);
379
383
  const autoTrustOnReloadCwd = parsed.projectTrustOverride === undefined && !hasProjectTrustInputs(sessionCwd) ? sessionCwd : undefined;
380
384
  const builtinPackagePaths = options?.builtinPackagePaths;
381
385
  const trustPromptMode = parsed.help || parsed.listModels !== undefined ? "print" : appMode;
@@ -436,9 +440,6 @@ export async function main(argv, options) {
436
440
  }));
437
441
  if (sessionStartEvent === undefined) {
438
442
  deferredExtensionLoad = deferExtensions || deferStartupTrust;
439
- startupEarlyInputCapture ??= startEarlyInputCapture({
440
- enabled: appMode === "interactive" && deferExtensions && deprecationWarnings.length === 0,
441
- });
442
443
  }
443
444
  const getProjectTrustContext = () => startupTrustContext ??
444
445
  projectTrustContext ??
@@ -698,6 +699,7 @@ export async function main(argv, options) {
698
699
  if (appMode === "interactive" && deprecationWarnings.length > 0) {
699
700
  await showDeprecationWarnings(deprecationWarnings);
700
701
  }
702
+ startupEarlyInputCapture ??= beginStartupInputCapture(sessionCwd, true);
701
703
  const scopedModels = [...session.scopedModels];
702
704
  time("resolveModelScope");
703
705
  const startupDiagnostics = deduplicateDiagnostics([...startupSettingsDiagnostics, ...runtime.diagnostics]);