@maxmo74/pi-coding-agent 0.0.0-stage → 1.4.0-max.0

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 (1293) hide show
  1. package/CHANGELOG.md +6397 -0
  2. package/LICENSE +21 -0
  3. package/README.md +116 -2
  4. package/dist/bun/cli.d.ts +5 -0
  5. package/dist/bun/cli.d.ts.map +1 -0
  6. package/dist/bun/cli.js +5 -0
  7. package/dist/bun/cli.js.map +1 -0
  8. package/dist/bun/restore-sandbox-env.d.ts +17 -0
  9. package/dist/bun/restore-sandbox-env.d.ts.map +1 -0
  10. package/dist/bun/restore-sandbox-env.js +36 -0
  11. package/dist/bun/restore-sandbox-env.js.map +1 -0
  12. package/dist/bun/runtime-setup.d.ts +2 -0
  13. package/dist/bun/runtime-setup.d.ts.map +1 -0
  14. package/dist/bun/runtime-setup.js +12 -0
  15. package/dist/bun/runtime-setup.js.map +1 -0
  16. package/dist/bun/sandbox-env-setup.d.ts +2 -0
  17. package/dist/bun/sandbox-env-setup.d.ts.map +1 -0
  18. package/dist/bun/sandbox-env-setup.js +4 -0
  19. package/dist/bun/sandbox-env-setup.js.map +1 -0
  20. package/dist/bundle/chunks/anthropic-messages-KRX3GRGV.js +6 -0
  21. package/dist/bundle/chunks/anthropic.js +75 -0
  22. package/dist/bundle/chunks/azure-openai-responses-YWTDZRIJ.js +2 -0
  23. package/dist/bundle/chunks/bedrock-converse-stream.js +89 -0
  24. package/dist/bundle/chunks/chunk-4UNN5OGR.js +4 -0
  25. package/dist/bundle/chunks/chunk-5AGIVGSV.js +6 -0
  26. package/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
  27. package/dist/bundle/chunks/chunk-7CBJINYJ.js +20 -0
  28. package/dist/bundle/chunks/chunk-7DDKXS2Q.js +2 -0
  29. package/dist/bundle/chunks/chunk-7ZC4UXSL.js +2 -0
  30. package/dist/bundle/chunks/chunk-AFNTYPTW.js +65 -0
  31. package/dist/bundle/chunks/chunk-BPHHHEET.js +9 -0
  32. package/dist/bundle/chunks/chunk-BSS6T6KQ.js +2 -0
  33. package/dist/bundle/chunks/chunk-CF5GWZHW.js +31 -0
  34. package/dist/bundle/chunks/chunk-CPKYLLPC.js +2 -0
  35. package/dist/bundle/chunks/chunk-FFMDRXC4.js +10 -0
  36. package/dist/bundle/chunks/chunk-HODJBMOY.js +9 -0
  37. package/dist/bundle/chunks/chunk-HQBQWHLD.js +7 -0
  38. package/dist/bundle/chunks/chunk-HQJBN2MC.js +2 -0
  39. package/dist/bundle/chunks/chunk-JXWJOIH4.js +2 -0
  40. package/dist/bundle/chunks/chunk-KFM2CJ7Q.js +4 -0
  41. package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
  42. package/dist/bundle/chunks/chunk-LAMEVJ4W.js +132 -0
  43. package/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  44. package/dist/bundle/chunks/chunk-LVVZS2NO.js +12 -0
  45. package/dist/bundle/chunks/chunk-M3LEVT3X.js +2 -0
  46. package/dist/bundle/chunks/chunk-MTLO5CT7.js +2 -0
  47. package/dist/bundle/chunks/chunk-P7FPUEYA.js +2 -0
  48. package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
  49. package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
  50. package/dist/bundle/chunks/chunk-PMRZO46Y.js +2 -0
  51. package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
  52. package/dist/bundle/chunks/chunk-QTM7S6TH.js +2 -0
  53. package/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  54. package/dist/bundle/chunks/chunk-RFUP4YGP.js +82 -0
  55. package/dist/bundle/chunks/chunk-TMTOQ7H7.js +2 -0
  56. package/dist/bundle/chunks/chunk-UKVNB6C4.js +2 -0
  57. package/dist/bundle/chunks/chunk-USJZMAIR.js +2 -0
  58. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +2 -0
  59. package/dist/bundle/chunks/chunk-V4LJ5IY6.js +44 -0
  60. package/dist/bundle/chunks/chunk-XPUTTZLN.js +16 -0
  61. package/dist/bundle/chunks/chunk-YUEEC7J5.js +1237 -0
  62. package/dist/bundle/chunks/chunk-ZN2R65UF.js +2 -0
  63. package/dist/bundle/chunks/cli-QUXYJ5RR.js +51 -0
  64. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-QPZQRBK5.js +2 -0
  65. package/dist/bundle/chunks/codemode-worker.js +478 -0
  66. package/dist/bundle/chunks/easter-egg-3d-RD5RBYI2.js +2 -0
  67. package/dist/bundle/chunks/execute-XTJDRV75.js +505 -0
  68. package/dist/bundle/chunks/github-copilot.js +2 -0
  69. package/dist/bundle/chunks/google-generative-ai-J3K3YPN3.js +2 -0
  70. package/dist/bundle/chunks/google-vertex-VFXOTBVP.js +2 -0
  71. package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +13 -0
  72. package/dist/bundle/chunks/image-resize-worker.js +2 -0
  73. package/dist/bundle/chunks/jiti-loader-GL4HJFAD.js +21 -0
  74. package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +2 -0
  75. package/dist/bundle/chunks/kimi-coding.js +2 -0
  76. package/dist/bundle/chunks/lib-4AVRLBHM.js +9 -0
  77. package/dist/bundle/chunks/llama-cpp-classify-4KFSGAMH.js +22 -0
  78. package/dist/bundle/chunks/meta.js +2 -0
  79. package/dist/bundle/chunks/mistral-conversations-C2QQGYVC.js +5 -0
  80. package/dist/bundle/chunks/multipart-parser-FMGQ7342.js +3 -0
  81. package/dist/bundle/chunks/node-AUOGOBCN.js +2 -0
  82. package/dist/bundle/chunks/node-KCMANYC2.js +16 -0
  83. package/dist/bundle/chunks/openai-chatgpt.js +75 -0
  84. package/dist/bundle/chunks/openai-codex-responses-H2UJSVV3.js +10 -0
  85. package/dist/bundle/chunks/openai-codex.js +75 -0
  86. package/dist/bundle/chunks/openai-completions-QPD4B26I.js +7 -0
  87. package/dist/bundle/chunks/openai-decisions-O6PHBSCB.js +5 -0
  88. package/dist/bundle/chunks/openai-responses-JOYMWKMB.js +4 -0
  89. package/dist/bundle/chunks/openrouter-images-4WG6OOLH.js +2 -0
  90. package/dist/bundle/chunks/openrouter.js +75 -0
  91. package/dist/bundle/chunks/pi-messages-EZXKVRR6.js +8 -0
  92. package/dist/bundle/chunks/radius.js +75 -0
  93. package/dist/bundle/chunks/runtime-YKR6KZPS.js +2 -0
  94. package/dist/bundle/chunks/src-QKGKDFSU.js +4 -0
  95. package/dist/bundle/chunks/typesafe-system-one-X3JT6ECA.js +2 -0
  96. package/dist/bundle/chunks/virtual-modules-DENBSTKO.js +2 -0
  97. package/dist/bundle/chunks/xai.js +2 -0
  98. package/dist/bundle/cli-runtime.js +3 -0
  99. package/dist/bundle/cli.js +5 -0
  100. package/dist/bundle/index.js +2 -0
  101. package/dist/bundle/rpc-entry.js +3 -0
  102. package/dist/cli/args.d.ts +62 -0
  103. package/dist/cli/args.d.ts.map +1 -0
  104. package/dist/cli/args.js +473 -0
  105. package/dist/cli/args.js.map +1 -0
  106. package/dist/cli/auth-check.d.ts +19 -0
  107. package/dist/cli/auth-check.d.ts.map +1 -0
  108. package/dist/cli/auth-check.js +50 -0
  109. package/dist/cli/auth-check.js.map +1 -0
  110. package/dist/cli/auth-command.d.ts +24 -0
  111. package/dist/cli/auth-command.d.ts.map +1 -0
  112. package/dist/cli/auth-command.js +103 -0
  113. package/dist/cli/auth-command.js.map +1 -0
  114. package/dist/cli/config-selector.d.ts +16 -0
  115. package/dist/cli/config-selector.d.ts.map +1 -0
  116. package/dist/cli/config-selector.js +32 -0
  117. package/dist/cli/config-selector.js.map +1 -0
  118. package/dist/cli/credential-print.d.ts +13 -0
  119. package/dist/cli/credential-print.d.ts.map +1 -0
  120. package/dist/cli/credential-print.js +76 -0
  121. package/dist/cli/credential-print.js.map +1 -0
  122. package/dist/cli/file-processor.d.ts +15 -0
  123. package/dist/cli/file-processor.d.ts.map +1 -0
  124. package/dist/cli/file-processor.js +71 -0
  125. package/dist/cli/file-processor.js.map +1 -0
  126. package/dist/cli/initial-message.d.ts +18 -0
  127. package/dist/cli/initial-message.d.ts.map +1 -0
  128. package/dist/cli/initial-message.js +22 -0
  129. package/dist/cli/initial-message.js.map +1 -0
  130. package/dist/cli/list-models.d.ts +9 -0
  131. package/dist/cli/list-models.d.ts.map +1 -0
  132. package/dist/cli/list-models.js +98 -0
  133. package/dist/cli/list-models.js.map +1 -0
  134. package/dist/cli/project-trust.d.ts +10 -0
  135. package/dist/cli/project-trust.d.ts.map +1 -0
  136. package/dist/cli/project-trust.js +48 -0
  137. package/dist/cli/project-trust.js.map +1 -0
  138. package/dist/cli/session-picker.d.ts +10 -0
  139. package/dist/cli/session-picker.d.ts.map +1 -0
  140. package/dist/cli/session-picker.js +36 -0
  141. package/dist/cli/session-picker.js.map +1 -0
  142. package/dist/cli/setup.d.ts +2 -0
  143. package/dist/cli/setup.d.ts.map +1 -0
  144. package/dist/cli/setup.js +12 -0
  145. package/dist/cli/setup.js.map +1 -0
  146. package/dist/cli/startup-ui.d.ts +20 -0
  147. package/dist/cli/startup-ui.d.ts.map +1 -0
  148. package/dist/cli/startup-ui.js +193 -0
  149. package/dist/cli/startup-ui.js.map +1 -0
  150. package/dist/cli.d.ts +3 -0
  151. package/dist/cli.d.ts.map +1 -0
  152. package/dist/cli.js +6 -0
  153. package/dist/cli.js.map +1 -0
  154. package/dist/config.d.ts +126 -0
  155. package/dist/config.d.ts.map +1 -0
  156. package/dist/config.js +534 -0
  157. package/dist/config.js.map +1 -0
  158. package/dist/core/agent-session-runtime.d.ts +120 -0
  159. package/dist/core/agent-session-runtime.d.ts.map +1 -0
  160. package/dist/core/agent-session-runtime.js +307 -0
  161. package/dist/core/agent-session-runtime.js.map +1 -0
  162. package/dist/core/agent-session-services.d.ts +86 -0
  163. package/dist/core/agent-session-services.d.ts.map +1 -0
  164. package/dist/core/agent-session-services.js +147 -0
  165. package/dist/core/agent-session-services.js.map +1 -0
  166. package/dist/core/agent-session.d.ts +940 -0
  167. package/dist/core/agent-session.d.ts.map +1 -0
  168. package/dist/core/agent-session.js +3654 -0
  169. package/dist/core/agent-session.js.map +1 -0
  170. package/dist/core/auth-guidance.d.ts +5 -0
  171. package/dist/core/auth-guidance.d.ts.map +1 -0
  172. package/dist/core/auth-guidance.js +21 -0
  173. package/dist/core/auth-guidance.js.map +1 -0
  174. package/dist/core/auth-storage.d.ts +72 -0
  175. package/dist/core/auth-storage.d.ts.map +1 -0
  176. package/dist/core/auth-storage.js +433 -0
  177. package/dist/core/auth-storage.js.map +1 -0
  178. package/dist/core/bash-executor.d.ts +32 -0
  179. package/dist/core/bash-executor.d.ts.map +1 -0
  180. package/dist/core/bash-executor.js +101 -0
  181. package/dist/core/bash-executor.js.map +1 -0
  182. package/dist/core/bug-report-upload.d.ts +12 -0
  183. package/dist/core/bug-report-upload.d.ts.map +1 -0
  184. package/dist/core/bug-report-upload.js +22 -0
  185. package/dist/core/bug-report-upload.js.map +1 -0
  186. package/dist/core/bug-report.d.ts +184 -0
  187. package/dist/core/bug-report.d.ts.map +1 -0
  188. package/dist/core/bug-report.js +292 -0
  189. package/dist/core/bug-report.js.map +1 -0
  190. package/dist/core/cache-stats.d.ts +49 -0
  191. package/dist/core/cache-stats.d.ts.map +1 -0
  192. package/dist/core/cache-stats.js +112 -0
  193. package/dist/core/cache-stats.js.map +1 -0
  194. package/dist/core/cache-warmer.d.ts +103 -0
  195. package/dist/core/cache-warmer.d.ts.map +1 -0
  196. package/dist/core/cache-warmer.js +356 -0
  197. package/dist/core/cache-warmer.js.map +1 -0
  198. package/dist/core/client-identity.d.ts +8 -0
  199. package/dist/core/client-identity.d.ts.map +1 -0
  200. package/dist/core/client-identity.js +15 -0
  201. package/dist/core/client-identity.js.map +1 -0
  202. package/dist/core/compaction/branch-summarization.d.ts +100 -0
  203. package/dist/core/compaction/branch-summarization.d.ts.map +1 -0
  204. package/dist/core/compaction/branch-summarization.js +253 -0
  205. package/dist/core/compaction/branch-summarization.js.map +1 -0
  206. package/dist/core/compaction/compaction.d.ts +145 -0
  207. package/dist/core/compaction/compaction.d.ts.map +1 -0
  208. package/dist/core/compaction/compaction.js +749 -0
  209. package/dist/core/compaction/compaction.js.map +1 -0
  210. package/dist/core/compaction/index.d.ts +7 -0
  211. package/dist/core/compaction/index.d.ts.map +1 -0
  212. package/dist/core/compaction/index.js +7 -0
  213. package/dist/core/compaction/index.js.map +1 -0
  214. package/dist/core/compaction/utils.d.ts +45 -0
  215. package/dist/core/compaction/utils.d.ts.map +1 -0
  216. package/dist/core/compaction/utils.js +148 -0
  217. package/dist/core/compaction/utils.js.map +1 -0
  218. package/dist/core/crash-log.d.ts +27 -0
  219. package/dist/core/crash-log.d.ts.map +1 -0
  220. package/dist/core/crash-log.js +140 -0
  221. package/dist/core/crash-log.js.map +1 -0
  222. package/dist/core/defaults.d.ts +4 -0
  223. package/dist/core/defaults.d.ts.map +1 -0
  224. package/dist/core/defaults.js +11 -0
  225. package/dist/core/defaults.js.map +1 -0
  226. package/dist/core/diagnostics.d.ts +15 -0
  227. package/dist/core/diagnostics.d.ts.map +1 -0
  228. package/dist/core/diagnostics.js +2 -0
  229. package/dist/core/diagnostics.js.map +1 -0
  230. package/dist/core/event-bus.d.ts +9 -0
  231. package/dist/core/event-bus.d.ts.map +1 -0
  232. package/dist/core/event-bus.js +25 -0
  233. package/dist/core/event-bus.js.map +1 -0
  234. package/dist/core/exec.d.ts +37 -0
  235. package/dist/core/exec.d.ts.map +1 -0
  236. package/dist/core/exec.js +119 -0
  237. package/dist/core/exec.js.map +1 -0
  238. package/dist/core/experimental.d.ts +2 -0
  239. package/dist/core/experimental.d.ts.map +1 -0
  240. package/dist/core/experimental.js +4 -0
  241. package/dist/core/experimental.js.map +1 -0
  242. package/dist/core/export-html/ansi-to-html.d.ts +22 -0
  243. package/dist/core/export-html/ansi-to-html.d.ts.map +1 -0
  244. package/dist/core/export-html/ansi-to-html.js +249 -0
  245. package/dist/core/export-html/ansi-to-html.js.map +1 -0
  246. package/dist/core/export-html/index.d.ts +37 -0
  247. package/dist/core/export-html/index.d.ts.map +1 -0
  248. package/dist/core/export-html/index.js +236 -0
  249. package/dist/core/export-html/index.js.map +1 -0
  250. package/dist/core/export-html/template.css +1085 -0
  251. package/dist/core/export-html/template.html +56 -0
  252. package/dist/core/export-html/template.js +2044 -0
  253. package/dist/core/export-html/tool-renderer.d.ts +34 -0
  254. package/dist/core/export-html/tool-renderer.d.ts.map +1 -0
  255. package/dist/core/export-html/tool-renderer.js +110 -0
  256. package/dist/core/export-html/tool-renderer.js.map +1 -0
  257. package/dist/core/export-html/vendor/highlight.min.js +1213 -0
  258. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  259. package/dist/core/export-html/vendor/marked.min.js +79 -0
  260. package/dist/core/extensions/index.d.ts +12 -0
  261. package/dist/core/extensions/index.d.ts.map +1 -0
  262. package/dist/core/extensions/index.js +9 -0
  263. package/dist/core/extensions/index.js.map +1 -0
  264. package/dist/core/extensions/jiti-loader.d.ts +2 -0
  265. package/dist/core/extensions/jiti-loader.d.ts.map +1 -0
  266. package/dist/core/extensions/jiti-loader.js +4 -0
  267. package/dist/core/extensions/jiti-loader.js.map +1 -0
  268. package/dist/core/extensions/jiti-static-loader.d.ts +2 -0
  269. package/dist/core/extensions/jiti-static-loader.d.ts.map +1 -0
  270. package/dist/core/extensions/jiti-static-loader.js +4 -0
  271. package/dist/core/extensions/jiti-static-loader.js.map +1 -0
  272. package/dist/core/extensions/loader.d.ts +23 -0
  273. package/dist/core/extensions/loader.d.ts.map +1 -0
  274. package/dist/core/extensions/loader.js +704 -0
  275. package/dist/core/extensions/loader.js.map +1 -0
  276. package/dist/core/extensions/runner.d.ts +215 -0
  277. package/dist/core/extensions/runner.d.ts.map +1 -0
  278. package/dist/core/extensions/runner.js +1238 -0
  279. package/dist/core/extensions/runner.js.map +1 -0
  280. package/dist/core/extensions/types.d.ts +1769 -0
  281. package/dist/core/extensions/types.d.ts.map +1 -0
  282. package/dist/core/extensions/types.js +48 -0
  283. package/dist/core/extensions/types.js.map +1 -0
  284. package/dist/core/extensions/virtual-modules.d.ts +3 -0
  285. package/dist/core/extensions/virtual-modules.d.ts.map +1 -0
  286. package/dist/core/extensions/virtual-modules.js +41 -0
  287. package/dist/core/extensions/virtual-modules.js.map +1 -0
  288. package/dist/core/extensions/wrapper.d.ts +20 -0
  289. package/dist/core/extensions/wrapper.d.ts.map +1 -0
  290. package/dist/core/extensions/wrapper.js +22 -0
  291. package/dist/core/extensions/wrapper.js.map +1 -0
  292. package/dist/core/footer-data-provider.d.ts +64 -0
  293. package/dist/core/footer-data-provider.d.ts.map +1 -0
  294. package/dist/core/footer-data-provider.js +338 -0
  295. package/dist/core/footer-data-provider.js.map +1 -0
  296. package/dist/core/http-dispatcher.d.ts +22 -0
  297. package/dist/core/http-dispatcher.d.ts.map +1 -0
  298. package/dist/core/http-dispatcher.js +98 -0
  299. package/dist/core/http-dispatcher.js.map +1 -0
  300. package/dist/core/index.d.ts +14 -0
  301. package/dist/core/index.d.ts.map +1 -0
  302. package/dist/core/index.js +13 -0
  303. package/dist/core/index.js.map +1 -0
  304. package/dist/core/key-id-schema.d.ts +6 -0
  305. package/dist/core/key-id-schema.d.ts.map +1 -0
  306. package/dist/core/key-id-schema.js +16 -0
  307. package/dist/core/key-id-schema.js.map +1 -0
  308. package/dist/core/keybindings-schema.d.ts +4 -0
  309. package/dist/core/keybindings-schema.d.ts.map +1 -0
  310. package/dist/core/keybindings-schema.js +16 -0
  311. package/dist/core/keybindings-schema.js.map +1 -0
  312. package/dist/core/keybindings.d.ts +568 -0
  313. package/dist/core/keybindings.d.ts.map +1 -0
  314. package/dist/core/keybindings.js +328 -0
  315. package/dist/core/keybindings.js.map +1 -0
  316. package/dist/core/mcp-servers.d.ts +139 -0
  317. package/dist/core/mcp-servers.d.ts.map +1 -0
  318. package/dist/core/mcp-servers.js +232 -0
  319. package/dist/core/mcp-servers.js.map +1 -0
  320. package/dist/core/messages.d.ts +77 -0
  321. package/dist/core/messages.d.ts.map +1 -0
  322. package/dist/core/messages.js +124 -0
  323. package/dist/core/messages.js.map +1 -0
  324. package/dist/core/model-config.d.ts +2312 -0
  325. package/dist/core/model-config.d.ts.map +1 -0
  326. package/dist/core/model-config.js +168 -0
  327. package/dist/core/model-config.js.map +1 -0
  328. package/dist/core/model-registry.d.ts +63 -0
  329. package/dist/core/model-registry.d.ts.map +1 -0
  330. package/dist/core/model-registry.js +144 -0
  331. package/dist/core/model-registry.js.map +1 -0
  332. package/dist/core/model-resolver.d.ts +137 -0
  333. package/dist/core/model-resolver.d.ts.map +1 -0
  334. package/dist/core/model-resolver.js +491 -0
  335. package/dist/core/model-resolver.js.map +1 -0
  336. package/dist/core/model-runtime.d.ts +145 -0
  337. package/dist/core/model-runtime.d.ts.map +1 -0
  338. package/dist/core/model-runtime.js +767 -0
  339. package/dist/core/model-runtime.js.map +1 -0
  340. package/dist/core/models-store.d.ts +22 -0
  341. package/dist/core/models-store.d.ts.map +1 -0
  342. package/dist/core/models-store.js +115 -0
  343. package/dist/core/models-store.js.map +1 -0
  344. package/dist/core/nested-tool-calls.d.ts +103 -0
  345. package/dist/core/nested-tool-calls.d.ts.map +1 -0
  346. package/dist/core/nested-tool-calls.js +179 -0
  347. package/dist/core/nested-tool-calls.js.map +1 -0
  348. package/dist/core/output-guard.d.ts +7 -0
  349. package/dist/core/output-guard.d.ts.map +1 -0
  350. package/dist/core/output-guard.js +89 -0
  351. package/dist/core/output-guard.js.map +1 -0
  352. package/dist/core/package-manager.d.ts +226 -0
  353. package/dist/core/package-manager.d.ts.map +1 -0
  354. package/dist/core/package-manager.js +2275 -0
  355. package/dist/core/package-manager.js.map +1 -0
  356. package/dist/core/pi-manifest.d.ts +9 -0
  357. package/dist/core/pi-manifest.d.ts.map +1 -0
  358. package/dist/core/pi-manifest.js +30 -0
  359. package/dist/core/pi-manifest.js.map +1 -0
  360. package/dist/core/project-trust.d.ts +15 -0
  361. package/dist/core/project-trust.d.ts.map +1 -0
  362. package/dist/core/project-trust.js +60 -0
  363. package/dist/core/project-trust.js.map +1 -0
  364. package/dist/core/prompt-templates.d.ts +59 -0
  365. package/dist/core/prompt-templates.d.ts.map +1 -0
  366. package/dist/core/prompt-templates.js +267 -0
  367. package/dist/core/prompt-templates.js.map +1 -0
  368. package/dist/core/provider-composer.d.ts +81 -0
  369. package/dist/core/provider-composer.d.ts.map +1 -0
  370. package/dist/core/provider-composer.js +492 -0
  371. package/dist/core/provider-composer.js.map +1 -0
  372. package/dist/core/radius.d.ts +7 -0
  373. package/dist/core/radius.d.ts.map +1 -0
  374. package/dist/core/radius.js +10 -0
  375. package/dist/core/radius.js.map +1 -0
  376. package/dist/core/remote-catalog-provider.d.ts +23 -0
  377. package/dist/core/remote-catalog-provider.d.ts.map +1 -0
  378. package/dist/core/remote-catalog-provider.js +190 -0
  379. package/dist/core/remote-catalog-provider.js.map +1 -0
  380. package/dist/core/resolve-config-value.d.ts +30 -0
  381. package/dist/core/resolve-config-value.d.ts.map +1 -0
  382. package/dist/core/resolve-config-value.js +247 -0
  383. package/dist/core/resolve-config-value.js.map +1 -0
  384. package/dist/core/resource-loader.d.ts +232 -0
  385. package/dist/core/resource-loader.d.ts.map +1 -0
  386. package/dist/core/resource-loader.js +1026 -0
  387. package/dist/core/resource-loader.js.map +1 -0
  388. package/dist/core/runtime-credentials.d.ts +15 -0
  389. package/dist/core/runtime-credentials.d.ts.map +1 -0
  390. package/dist/core/runtime-credentials.js +39 -0
  391. package/dist/core/runtime-credentials.js.map +1 -0
  392. package/dist/core/sdk.d.ts +117 -0
  393. package/dist/core/sdk.d.ts.map +1 -0
  394. package/dist/core/sdk.js +329 -0
  395. package/dist/core/sdk.js.map +1 -0
  396. package/dist/core/session-cwd.d.ts +19 -0
  397. package/dist/core/session-cwd.d.ts.map +1 -0
  398. package/dist/core/session-cwd.js +38 -0
  399. package/dist/core/session-cwd.js.map +1 -0
  400. package/dist/core/session-delete.d.ts +8 -0
  401. package/dist/core/session-delete.d.ts.map +1 -0
  402. package/dist/core/session-delete.js +37 -0
  403. package/dist/core/session-delete.js.map +1 -0
  404. package/dist/core/session-export.d.ts +8 -0
  405. package/dist/core/session-export.d.ts.map +1 -0
  406. package/dist/core/session-export.js +33 -0
  407. package/dist/core/session-export.js.map +1 -0
  408. package/dist/core/session-manager.d.ts +422 -0
  409. package/dist/core/session-manager.d.ts.map +1 -0
  410. package/dist/core/session-manager.js +1568 -0
  411. package/dist/core/session-manager.js.map +1 -0
  412. package/dist/core/session-move.d.ts +3 -0
  413. package/dist/core/session-move.d.ts.map +1 -0
  414. package/dist/core/session-move.js +133 -0
  415. package/dist/core/session-move.js.map +1 -0
  416. package/dist/core/session-ownership.d.ts +13 -0
  417. package/dist/core/session-ownership.d.ts.map +1 -0
  418. package/dist/core/session-ownership.js +205 -0
  419. package/dist/core/session-ownership.js.map +1 -0
  420. package/dist/core/settings-defaults.d.ts +66 -0
  421. package/dist/core/settings-defaults.d.ts.map +1 -0
  422. package/dist/core/settings-defaults.js +67 -0
  423. package/dist/core/settings-defaults.js.map +1 -0
  424. package/dist/core/settings-diagnostics.d.ts +9 -0
  425. package/dist/core/settings-diagnostics.d.ts.map +1 -0
  426. package/dist/core/settings-diagnostics.js +21 -0
  427. package/dist/core/settings-diagnostics.js.map +1 -0
  428. package/dist/core/settings-manager.d.ts +253 -0
  429. package/dist/core/settings-manager.d.ts.map +1 -0
  430. package/dist/core/settings-manager.js +1154 -0
  431. package/dist/core/settings-manager.js.map +1 -0
  432. package/dist/core/settings-schema.d.ts +231 -0
  433. package/dist/core/settings-schema.d.ts.map +1 -0
  434. package/dist/core/settings-schema.js +294 -0
  435. package/dist/core/settings-schema.js.map +1 -0
  436. package/dist/core/skills.d.ts +63 -0
  437. package/dist/core/skills.d.ts.map +1 -0
  438. package/dist/core/skills.js +412 -0
  439. package/dist/core/skills.js.map +1 -0
  440. package/dist/core/slash-commands.d.ts +15 -0
  441. package/dist/core/slash-commands.d.ts.map +1 -0
  442. package/dist/core/slash-commands.js +28 -0
  443. package/dist/core/slash-commands.js.map +1 -0
  444. package/dist/core/source-info.d.ts +33 -0
  445. package/dist/core/source-info.d.ts.map +1 -0
  446. package/dist/core/source-info.js +43 -0
  447. package/dist/core/source-info.js.map +1 -0
  448. package/dist/core/system-prompt.d.ts +77 -0
  449. package/dist/core/system-prompt.d.ts.map +1 -0
  450. package/dist/core/system-prompt.js +152 -0
  451. package/dist/core/system-prompt.js.map +1 -0
  452. package/dist/core/telemetry.d.ts +3 -0
  453. package/dist/core/telemetry.d.ts.map +1 -0
  454. package/dist/core/telemetry.js +9 -0
  455. package/dist/core/telemetry.js.map +1 -0
  456. package/dist/core/timings.d.ts +10 -0
  457. package/dist/core/timings.d.ts.map +1 -0
  458. package/dist/core/timings.js +41 -0
  459. package/dist/core/timings.js.map +1 -0
  460. package/dist/core/tools/bash.d.ts +100 -0
  461. package/dist/core/tools/bash.d.ts.map +1 -0
  462. package/dist/core/tools/bash.js +333 -0
  463. package/dist/core/tools/bash.js.map +1 -0
  464. package/dist/core/tools/edit-diff.d.ts +101 -0
  465. package/dist/core/tools/edit-diff.d.ts.map +1 -0
  466. package/dist/core/tools/edit-diff.js +421 -0
  467. package/dist/core/tools/edit-diff.js.map +1 -0
  468. package/dist/core/tools/edit.d.ts +44 -0
  469. package/dist/core/tools/edit.d.ts.map +1 -0
  470. package/dist/core/tools/edit.js +147 -0
  471. package/dist/core/tools/edit.js.map +1 -0
  472. package/dist/core/tools/file-mutation-queue.d.ts +6 -0
  473. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -0
  474. package/dist/core/tools/file-mutation-queue.js +52 -0
  475. package/dist/core/tools/file-mutation-queue.js.map +1 -0
  476. package/dist/core/tools/find.d.ts +42 -0
  477. package/dist/core/tools/find.d.ts.map +1 -0
  478. package/dist/core/tools/find.js +251 -0
  479. package/dist/core/tools/find.js.map +1 -0
  480. package/dist/core/tools/grep.d.ts +41 -0
  481. package/dist/core/tools/grep.d.ts.map +1 -0
  482. package/dist/core/tools/grep.js +254 -0
  483. package/dist/core/tools/grep.js.map +1 -0
  484. package/dist/core/tools/index.d.ts +43 -0
  485. package/dist/core/tools/index.d.ts.map +1 -0
  486. package/dist/core/tools/index.js +129 -0
  487. package/dist/core/tools/index.js.map +1 -0
  488. package/dist/core/tools/ls.d.ts +41 -0
  489. package/dist/core/tools/ls.d.ts.map +1 -0
  490. package/dist/core/tools/ls.js +126 -0
  491. package/dist/core/tools/ls.js.map +1 -0
  492. package/dist/core/tools/output-accumulator.d.ts +63 -0
  493. package/dist/core/tools/output-accumulator.d.ts.map +1 -0
  494. package/dist/core/tools/output-accumulator.js +214 -0
  495. package/dist/core/tools/output-accumulator.js.map +1 -0
  496. package/dist/core/tools/path-utils.d.ts +10 -0
  497. package/dist/core/tools/path-utils.d.ts.map +1 -0
  498. package/dist/core/tools/path-utils.js +99 -0
  499. package/dist/core/tools/path-utils.js.map +1 -0
  500. package/dist/core/tools/powershell.d.ts +16 -0
  501. package/dist/core/tools/powershell.d.ts.map +1 -0
  502. package/dist/core/tools/powershell.js +39 -0
  503. package/dist/core/tools/powershell.js.map +1 -0
  504. package/dist/core/tools/read.d.ts +55 -0
  505. package/dist/core/tools/read.d.ts.map +1 -0
  506. package/dist/core/tools/read.js +186 -0
  507. package/dist/core/tools/read.js.map +1 -0
  508. package/dist/core/tools/render-utils.d.ts +50 -0
  509. package/dist/core/tools/render-utils.d.ts.map +1 -0
  510. package/dist/core/tools/render-utils.js +158 -0
  511. package/dist/core/tools/render-utils.js.map +1 -0
  512. package/dist/core/tools/renderers/bash.d.ts +12 -0
  513. package/dist/core/tools/renderers/bash.d.ts.map +1 -0
  514. package/dist/core/tools/renderers/bash.js +89 -0
  515. package/dist/core/tools/renderers/bash.js.map +1 -0
  516. package/dist/core/tools/renderers/edit.d.ts +23 -0
  517. package/dist/core/tools/renderers/edit.d.ts.map +1 -0
  518. package/dist/core/tools/renderers/edit.js +168 -0
  519. package/dist/core/tools/renderers/edit.js.map +1 -0
  520. package/dist/core/tools/renderers/find.d.ts +10 -0
  521. package/dist/core/tools/renderers/find.d.ts.map +1 -0
  522. package/dist/core/tools/renderers/find.js +64 -0
  523. package/dist/core/tools/renderers/find.js.map +1 -0
  524. package/dist/core/tools/renderers/grep.d.ts +10 -0
  525. package/dist/core/tools/renderers/grep.d.ts.map +1 -0
  526. package/dist/core/tools/renderers/grep.js +69 -0
  527. package/dist/core/tools/renderers/grep.js.map +1 -0
  528. package/dist/core/tools/renderers/index.d.ts +28 -0
  529. package/dist/core/tools/renderers/index.d.ts.map +1 -0
  530. package/dist/core/tools/renderers/index.js +47 -0
  531. package/dist/core/tools/renderers/index.js.map +1 -0
  532. package/dist/core/tools/renderers/ls.d.ts +10 -0
  533. package/dist/core/tools/renderers/ls.d.ts.map +1 -0
  534. package/dist/core/tools/renderers/ls.js +58 -0
  535. package/dist/core/tools/renderers/ls.js.map +1 -0
  536. package/dist/core/tools/renderers/read.d.ts +11 -0
  537. package/dist/core/tools/renderers/read.d.ts.map +1 -0
  538. package/dist/core/tools/renderers/read.js +126 -0
  539. package/dist/core/tools/renderers/read.js.map +1 -0
  540. package/dist/core/tools/renderers/write.d.ts +10 -0
  541. package/dist/core/tools/renderers/write.d.ts.map +1 -0
  542. package/dist/core/tools/renderers/write.js +153 -0
  543. package/dist/core/tools/renderers/write.js.map +1 -0
  544. package/dist/core/tools/tool-definition-wrapper.d.ts +16 -0
  545. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -0
  546. package/dist/core/tools/tool-definition-wrapper.js +38 -0
  547. package/dist/core/tools/tool-definition-wrapper.js.map +1 -0
  548. package/dist/core/tools/truncate.d.ts +84 -0
  549. package/dist/core/tools/truncate.d.ts.map +1 -0
  550. package/dist/core/tools/truncate.js +244 -0
  551. package/dist/core/tools/truncate.js.map +1 -0
  552. package/dist/core/tools/write.d.ts +30 -0
  553. package/dist/core/tools/write.d.ts.map +1 -0
  554. package/dist/core/tools/write.js +61 -0
  555. package/dist/core/tools/write.js.map +1 -0
  556. package/dist/core/trust-manager.d.ts +36 -0
  557. package/dist/core/trust-manager.d.ts.map +1 -0
  558. package/dist/core/trust-manager.js +204 -0
  559. package/dist/core/trust-manager.js.map +1 -0
  560. package/dist/core/usage-totals.d.ts +21 -0
  561. package/dist/core/usage-totals.d.ts.map +1 -0
  562. package/dist/core/usage-totals.js +81 -0
  563. package/dist/core/usage-totals.js.map +1 -0
  564. package/dist/core/virtual-models.d.ts +117 -0
  565. package/dist/core/virtual-models.d.ts.map +1 -0
  566. package/dist/core/virtual-models.js +124 -0
  567. package/dist/core/virtual-models.js.map +1 -0
  568. package/dist/extensions/codemode/execute.d.ts +16 -0
  569. package/dist/extensions/codemode/execute.d.ts.map +1 -0
  570. package/dist/extensions/codemode/execute.js +740 -0
  571. package/dist/extensions/codemode/execute.js.map +1 -0
  572. package/dist/extensions/codemode/execute.lazy.d.ts +3 -0
  573. package/dist/extensions/codemode/execute.lazy.d.ts.map +1 -0
  574. package/dist/extensions/codemode/execute.lazy.js +3 -0
  575. package/dist/extensions/codemode/execute.lazy.js.map +1 -0
  576. package/dist/extensions/codemode/index.d.ts +21 -0
  577. package/dist/extensions/codemode/index.d.ts.map +1 -0
  578. package/dist/extensions/codemode/index.js +33 -0
  579. package/dist/extensions/codemode/index.js.map +1 -0
  580. package/dist/extensions/codemode/renderer.d.ts +12 -0
  581. package/dist/extensions/codemode/renderer.d.ts.map +1 -0
  582. package/dist/extensions/codemode/renderer.js +143 -0
  583. package/dist/extensions/codemode/renderer.js.map +1 -0
  584. package/dist/extensions/codemode/tool.d.ts +124 -0
  585. package/dist/extensions/codemode/tool.d.ts.map +1 -0
  586. package/dist/extensions/codemode/tool.js +313 -0
  587. package/dist/extensions/codemode/tool.js.map +1 -0
  588. package/dist/extensions/codemode/worker.d.ts +7 -0
  589. package/dist/extensions/codemode/worker.d.ts.map +1 -0
  590. package/dist/extensions/codemode/worker.js +7 -0
  591. package/dist/extensions/codemode/worker.js.map +1 -0
  592. package/dist/extensions/index.d.ts +3 -0
  593. package/dist/extensions/index.d.ts.map +1 -0
  594. package/dist/extensions/index.js +13 -0
  595. package/dist/extensions/index.js.map +1 -0
  596. package/dist/extensions/llama/client.d.ts +69 -0
  597. package/dist/extensions/llama/client.d.ts.map +1 -0
  598. package/dist/extensions/llama/client.js +313 -0
  599. package/dist/extensions/llama/client.js.map +1 -0
  600. package/dist/extensions/llama/huggingface.d.ts +23 -0
  601. package/dist/extensions/llama/huggingface.d.ts.map +1 -0
  602. package/dist/extensions/llama/huggingface.js +141 -0
  603. package/dist/extensions/llama/huggingface.js.map +1 -0
  604. package/dist/extensions/llama/index.d.ts +3 -0
  605. package/dist/extensions/llama/index.d.ts.map +1 -0
  606. package/dist/extensions/llama/index.js +219 -0
  607. package/dist/extensions/llama/index.js.map +1 -0
  608. package/dist/extensions/llama/provider.d.ts +12 -0
  609. package/dist/extensions/llama/provider.d.ts.map +1 -0
  610. package/dist/extensions/llama/provider.js +236 -0
  611. package/dist/extensions/llama/provider.js.map +1 -0
  612. package/dist/extensions/llama/ui.d.ts +42 -0
  613. package/dist/extensions/llama/ui.d.ts.map +1 -0
  614. package/dist/extensions/llama/ui.js +428 -0
  615. package/dist/extensions/llama/ui.js.map +1 -0
  616. package/dist/extensions/mcp/cli.d.ts +21 -0
  617. package/dist/extensions/mcp/cli.d.ts.map +1 -0
  618. package/dist/extensions/mcp/cli.js +494 -0
  619. package/dist/extensions/mcp/cli.js.map +1 -0
  620. package/dist/extensions/mcp/cli.lazy.d.ts +3 -0
  621. package/dist/extensions/mcp/cli.lazy.d.ts.map +1 -0
  622. package/dist/extensions/mcp/cli.lazy.js +3 -0
  623. package/dist/extensions/mcp/cli.lazy.js.map +1 -0
  624. package/dist/extensions/mcp/config.d.ts +84 -0
  625. package/dist/extensions/mcp/config.d.ts.map +1 -0
  626. package/dist/extensions/mcp/config.js +195 -0
  627. package/dist/extensions/mcp/config.js.map +1 -0
  628. package/dist/extensions/mcp/index.d.ts +79 -0
  629. package/dist/extensions/mcp/index.d.ts.map +1 -0
  630. package/dist/extensions/mcp/index.js +1205 -0
  631. package/dist/extensions/mcp/index.js.map +1 -0
  632. package/dist/extensions/mcp/log.d.ts +16 -0
  633. package/dist/extensions/mcp/log.d.ts.map +1 -0
  634. package/dist/extensions/mcp/log.js +66 -0
  635. package/dist/extensions/mcp/log.js.map +1 -0
  636. package/dist/extensions/mcp/oauth.d.ts +102 -0
  637. package/dist/extensions/mcp/oauth.d.ts.map +1 -0
  638. package/dist/extensions/mcp/oauth.js +428 -0
  639. package/dist/extensions/mcp/oauth.js.map +1 -0
  640. package/dist/extensions/mcp/resources.d.ts +36 -0
  641. package/dist/extensions/mcp/resources.d.ts.map +1 -0
  642. package/dist/extensions/mcp/resources.js +261 -0
  643. package/dist/extensions/mcp/resources.js.map +1 -0
  644. package/dist/extensions/mcp/runtime.d.ts +98 -0
  645. package/dist/extensions/mcp/runtime.d.ts.map +1 -0
  646. package/dist/extensions/mcp/runtime.js +378 -0
  647. package/dist/extensions/mcp/runtime.js.map +1 -0
  648. package/dist/extensions/mcp/runtime.lazy.d.ts +3 -0
  649. package/dist/extensions/mcp/runtime.lazy.d.ts.map +1 -0
  650. package/dist/extensions/mcp/runtime.lazy.js +3 -0
  651. package/dist/extensions/mcp/runtime.lazy.js.map +1 -0
  652. package/dist/extensions/mcp/tools.d.ts +86 -0
  653. package/dist/extensions/mcp/tools.d.ts.map +1 -0
  654. package/dist/extensions/mcp/tools.js +309 -0
  655. package/dist/extensions/mcp/tools.js.map +1 -0
  656. package/dist/extensions/mcp/ui.d.ts +61 -0
  657. package/dist/extensions/mcp/ui.d.ts.map +1 -0
  658. package/dist/extensions/mcp/ui.js +195 -0
  659. package/dist/extensions/mcp/ui.js.map +1 -0
  660. package/dist/extensions/tool-search/index.d.ts +12 -0
  661. package/dist/extensions/tool-search/index.d.ts.map +1 -0
  662. package/dist/extensions/tool-search/index.js +15 -0
  663. package/dist/extensions/tool-search/index.js.map +1 -0
  664. package/dist/extensions/tool-search/tool.d.ts +75 -0
  665. package/dist/extensions/tool-search/tool.d.ts.map +1 -0
  666. package/dist/extensions/tool-search/tool.js +210 -0
  667. package/dist/extensions/tool-search/tool.js.map +1 -0
  668. package/dist/index.d.ts +45 -0
  669. package/dist/index.d.ts.map +1 -0
  670. package/dist/index.js +54 -0
  671. package/dist/index.js.map +1 -0
  672. package/dist/main.d.ts +16 -0
  673. package/dist/main.d.ts.map +1 -0
  674. package/dist/main.js +836 -0
  675. package/dist/main.js.map +1 -0
  676. package/dist/migrations.d.ts +33 -0
  677. package/dist/migrations.d.ts.map +1 -0
  678. package/dist/migrations.js +282 -0
  679. package/dist/migrations.js.map +1 -0
  680. package/dist/modes/index.d.ts +10 -0
  681. package/dist/modes/index.d.ts.map +1 -0
  682. package/dist/modes/index.js +8 -0
  683. package/dist/modes/index.js.map +1 -0
  684. package/dist/modes/interactive/assets/clankolas.png +0 -0
  685. package/dist/modes/interactive/bug-report.d.ts +16 -0
  686. package/dist/modes/interactive/bug-report.d.ts.map +1 -0
  687. package/dist/modes/interactive/bug-report.js +210 -0
  688. package/dist/modes/interactive/bug-report.js.map +1 -0
  689. package/dist/modes/interactive/chat-viewport.d.ts +20 -0
  690. package/dist/modes/interactive/chat-viewport.d.ts.map +1 -0
  691. package/dist/modes/interactive/chat-viewport.js +28 -0
  692. package/dist/modes/interactive/chat-viewport.js.map +1 -0
  693. package/dist/modes/interactive/components/armin.d.ts +37 -0
  694. package/dist/modes/interactive/components/armin.d.ts.map +1 -0
  695. package/dist/modes/interactive/components/armin.js +335 -0
  696. package/dist/modes/interactive/components/armin.js.map +1 -0
  697. package/dist/modes/interactive/components/assistant-message.d.ts +28 -0
  698. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -0
  699. package/dist/modes/interactive/components/assistant-message.js +168 -0
  700. package/dist/modes/interactive/components/assistant-message.js.map +1 -0
  701. package/dist/modes/interactive/components/auth-url.d.ts +14 -0
  702. package/dist/modes/interactive/components/auth-url.d.ts.map +1 -0
  703. package/dist/modes/interactive/components/auth-url.js +37 -0
  704. package/dist/modes/interactive/components/auth-url.js.map +1 -0
  705. package/dist/modes/interactive/components/bash-execution.d.ts +38 -0
  706. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -0
  707. package/dist/modes/interactive/components/bash-execution.js +178 -0
  708. package/dist/modes/interactive/components/bash-execution.js.map +1 -0
  709. package/dist/modes/interactive/components/bordered-loader.d.ts +16 -0
  710. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -0
  711. package/dist/modes/interactive/components/bordered-loader.js +54 -0
  712. package/dist/modes/interactive/components/bordered-loader.js.map +1 -0
  713. package/dist/modes/interactive/components/branch-summary-message.d.ts +17 -0
  714. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -0
  715. package/dist/modes/interactive/components/branch-summary-message.js +54 -0
  716. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -0
  717. package/dist/modes/interactive/components/compaction-summary-message.d.ts +17 -0
  718. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -0
  719. package/dist/modes/interactive/components/compaction-summary-message.js +55 -0
  720. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -0
  721. package/dist/modes/interactive/components/config-selector.d.ts +102 -0
  722. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -0
  723. package/dist/modes/interactive/components/config-selector.js +771 -0
  724. package/dist/modes/interactive/components/config-selector.js.map +1 -0
  725. package/dist/modes/interactive/components/countdown-timer.d.ts +14 -0
  726. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -0
  727. package/dist/modes/interactive/components/countdown-timer.js +33 -0
  728. package/dist/modes/interactive/components/countdown-timer.js.map +1 -0
  729. package/dist/modes/interactive/components/custom-editor.d.ts +30 -0
  730. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -0
  731. package/dist/modes/interactive/components/custom-editor.js +122 -0
  732. package/dist/modes/interactive/components/custom-editor.js.map +1 -0
  733. package/dist/modes/interactive/components/custom-entry.d.ts +21 -0
  734. package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
  735. package/dist/modes/interactive/components/custom-entry.js +58 -0
  736. package/dist/modes/interactive/components/custom-entry.js.map +1 -0
  737. package/dist/modes/interactive/components/custom-message.d.ts +22 -0
  738. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -0
  739. package/dist/modes/interactive/components/custom-message.js +88 -0
  740. package/dist/modes/interactive/components/custom-message.js.map +1 -0
  741. package/dist/modes/interactive/components/diff.d.ts +12 -0
  742. package/dist/modes/interactive/components/diff.d.ts.map +1 -0
  743. package/dist/modes/interactive/components/diff.js +133 -0
  744. package/dist/modes/interactive/components/diff.js.map +1 -0
  745. package/dist/modes/interactive/components/dynamic-border.d.ts +15 -0
  746. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -0
  747. package/dist/modes/interactive/components/dynamic-border.js +21 -0
  748. package/dist/modes/interactive/components/dynamic-border.js.map +1 -0
  749. package/dist/modes/interactive/components/earendil-announcement.d.ts +5 -0
  750. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -0
  751. package/dist/modes/interactive/components/earendil-announcement.js +40 -0
  752. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -0
  753. package/dist/modes/interactive/components/easter-egg-3d.d.ts +104 -0
  754. package/dist/modes/interactive/components/easter-egg-3d.d.ts.map +1 -0
  755. package/dist/modes/interactive/components/easter-egg-3d.js +1139 -0
  756. package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -0
  757. package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts +6 -0
  758. package/dist/modes/interactive/components/easter-egg-3d.lazy.d.ts.map +1 -0
  759. package/dist/modes/interactive/components/easter-egg-3d.lazy.js +23 -0
  760. package/dist/modes/interactive/components/easter-egg-3d.lazy.js.map +1 -0
  761. package/dist/modes/interactive/components/extension-editor.d.ts +24 -0
  762. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -0
  763. package/dist/modes/interactive/components/extension-editor.js +103 -0
  764. package/dist/modes/interactive/components/extension-editor.js.map +1 -0
  765. package/dist/modes/interactive/components/extension-input.d.ts +25 -0
  766. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -0
  767. package/dist/modes/interactive/components/extension-input.js +67 -0
  768. package/dist/modes/interactive/components/extension-input.js.map +1 -0
  769. package/dist/modes/interactive/components/extension-selector.d.ts +27 -0
  770. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -0
  771. package/dist/modes/interactive/components/extension-selector.js +87 -0
  772. package/dist/modes/interactive/components/extension-selector.js.map +1 -0
  773. package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
  774. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
  775. package/dist/modes/interactive/components/first-time-setup.js +109 -0
  776. package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
  777. package/dist/modes/interactive/components/footer.d.ts +39 -0
  778. package/dist/modes/interactive/components/footer.d.ts.map +1 -0
  779. package/dist/modes/interactive/components/footer.js +265 -0
  780. package/dist/modes/interactive/components/footer.js.map +1 -0
  781. package/dist/modes/interactive/components/index.d.ts +33 -0
  782. package/dist/modes/interactive/components/index.d.ts.map +1 -0
  783. package/dist/modes/interactive/components/index.js +34 -0
  784. package/dist/modes/interactive/components/index.js.map +1 -0
  785. package/dist/modes/interactive/components/keybinding-hints.d.ts +13 -0
  786. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -0
  787. package/dist/modes/interactive/components/keybinding-hints.js +36 -0
  788. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -0
  789. package/dist/modes/interactive/components/login-dialog.d.ts +59 -0
  790. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -0
  791. package/dist/modes/interactive/components/login-dialog.js +289 -0
  792. package/dist/modes/interactive/components/login-dialog.js.map +1 -0
  793. package/dist/modes/interactive/components/markdown-transform.d.ts +3 -0
  794. package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -0
  795. package/dist/modes/interactive/components/markdown-transform.js +19 -0
  796. package/dist/modes/interactive/components/markdown-transform.js.map +1 -0
  797. package/dist/modes/interactive/components/mermaid.d.ts +11 -0
  798. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -0
  799. package/dist/modes/interactive/components/mermaid.js +75 -0
  800. package/dist/modes/interactive/components/mermaid.js.map +1 -0
  801. package/dist/modes/interactive/components/model-selector.d.ts +61 -0
  802. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -0
  803. package/dist/modes/interactive/components/model-selector.js +372 -0
  804. package/dist/modes/interactive/components/model-selector.js.map +1 -0
  805. package/dist/modes/interactive/components/oauth-selector.d.ts +40 -0
  806. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -0
  807. package/dist/modes/interactive/components/oauth-selector.js +175 -0
  808. package/dist/modes/interactive/components/oauth-selector.js.map +1 -0
  809. package/dist/modes/interactive/components/pi-logo.d.ts +19 -0
  810. package/dist/modes/interactive/components/pi-logo.d.ts.map +1 -0
  811. package/dist/modes/interactive/components/pi-logo.js +37 -0
  812. package/dist/modes/interactive/components/pi-logo.js.map +1 -0
  813. package/dist/modes/interactive/components/radius-login-selector.d.ts +15 -0
  814. package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -0
  815. package/dist/modes/interactive/components/radius-login-selector.js +85 -0
  816. package/dist/modes/interactive/components/radius-login-selector.js.map +1 -0
  817. package/dist/modes/interactive/components/scoped-models-selector.d.ts +47 -0
  818. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -0
  819. package/dist/modes/interactive/components/scoped-models-selector.js +337 -0
  820. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -0
  821. package/dist/modes/interactive/components/session-selector-search.d.ts +27 -0
  822. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -0
  823. package/dist/modes/interactive/components/session-selector-search.js +219 -0
  824. package/dist/modes/interactive/components/session-selector-search.js.map +1 -0
  825. package/dist/modes/interactive/components/session-selector.d.ts +104 -0
  826. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -0
  827. package/dist/modes/interactive/components/session-selector.js +932 -0
  828. package/dist/modes/interactive/components/session-selector.js.map +1 -0
  829. package/dist/modes/interactive/components/settings-selector.d.ts +98 -0
  830. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -0
  831. package/dist/modes/interactive/components/settings-selector.js +753 -0
  832. package/dist/modes/interactive/components/settings-selector.js.map +1 -0
  833. package/dist/modes/interactive/components/settings-submenu.d.ts +72 -0
  834. package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -0
  835. package/dist/modes/interactive/components/settings-submenu.js +167 -0
  836. package/dist/modes/interactive/components/settings-submenu.js.map +1 -0
  837. package/dist/modes/interactive/components/show-images-selector.d.ts +10 -0
  838. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -0
  839. package/dist/modes/interactive/components/show-images-selector.js +39 -0
  840. package/dist/modes/interactive/components/show-images-selector.js.map +1 -0
  841. package/dist/modes/interactive/components/skill-invocation-message.d.ts +18 -0
  842. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -0
  843. package/dist/modes/interactive/components/skill-invocation-message.js +57 -0
  844. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -0
  845. package/dist/modes/interactive/components/status-indicator.d.ts +30 -0
  846. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
  847. package/dist/modes/interactive/components/status-indicator.js +67 -0
  848. package/dist/modes/interactive/components/status-indicator.js.map +1 -0
  849. package/dist/modes/interactive/components/theme-selector.d.ts +11 -0
  850. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -0
  851. package/dist/modes/interactive/components/theme-selector.js +50 -0
  852. package/dist/modes/interactive/components/theme-selector.js.map +1 -0
  853. package/dist/modes/interactive/components/themed-text.d.ts +17 -0
  854. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -0
  855. package/dist/modes/interactive/components/themed-text.js +29 -0
  856. package/dist/modes/interactive/components/themed-text.js.map +1 -0
  857. package/dist/modes/interactive/components/thinking-selector.d.ts +23 -0
  858. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -0
  859. package/dist/modes/interactive/components/thinking-selector.js +109 -0
  860. package/dist/modes/interactive/components/thinking-selector.js.map +1 -0
  861. package/dist/modes/interactive/components/tool-execution.d.ts +79 -0
  862. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -0
  863. package/dist/modes/interactive/components/tool-execution.js +334 -0
  864. package/dist/modes/interactive/components/tool-execution.js.map +1 -0
  865. package/dist/modes/interactive/components/tree-selector.d.ts +95 -0
  866. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -0
  867. package/dist/modes/interactive/components/tree-selector.js +1250 -0
  868. package/dist/modes/interactive/components/tree-selector.js.map +1 -0
  869. package/dist/modes/interactive/components/trust-selector.d.ts +23 -0
  870. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
  871. package/dist/modes/interactive/components/trust-selector.js +91 -0
  872. package/dist/modes/interactive/components/trust-selector.js.map +1 -0
  873. package/dist/modes/interactive/components/user-message-selector.d.ts +31 -0
  874. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -0
  875. package/dist/modes/interactive/components/user-message-selector.js +122 -0
  876. package/dist/modes/interactive/components/user-message-selector.js.map +1 -0
  877. package/dist/modes/interactive/components/user-message.d.ts +18 -0
  878. package/dist/modes/interactive/components/user-message.d.ts.map +1 -0
  879. package/dist/modes/interactive/components/user-message.js +54 -0
  880. package/dist/modes/interactive/components/user-message.js.map +1 -0
  881. package/dist/modes/interactive/components/visual-truncate.d.ts +48 -0
  882. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -0
  883. package/dist/modes/interactive/components/visual-truncate.js +66 -0
  884. package/dist/modes/interactive/components/visual-truncate.js.map +1 -0
  885. package/dist/modes/interactive/external-editor.d.ts +12 -0
  886. package/dist/modes/interactive/external-editor.d.ts.map +1 -0
  887. package/dist/modes/interactive/external-editor.js +38 -0
  888. package/dist/modes/interactive/external-editor.js.map +1 -0
  889. package/dist/modes/interactive/interactive-mode.d.ts +491 -0
  890. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -0
  891. package/dist/modes/interactive/interactive-mode.js +6060 -0
  892. package/dist/modes/interactive/interactive-mode.js.map +1 -0
  893. package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
  894. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
  895. package/dist/modes/interactive/model-catalog-refresh.js +34 -0
  896. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
  897. package/dist/modes/interactive/model-search.d.ts +22 -0
  898. package/dist/modes/interactive/model-search.d.ts.map +1 -0
  899. package/dist/modes/interactive/model-search.js +36 -0
  900. package/dist/modes/interactive/model-search.js.map +1 -0
  901. package/dist/modes/interactive/program-status-reporter.d.ts +34 -0
  902. package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  903. package/dist/modes/interactive/program-status-reporter.js +110 -0
  904. package/dist/modes/interactive/program-status-reporter.js.map +1 -0
  905. package/dist/modes/interactive/session-share.d.ts +18 -0
  906. package/dist/modes/interactive/session-share.d.ts.map +1 -0
  907. package/dist/modes/interactive/session-share.js +195 -0
  908. package/dist/modes/interactive/session-share.js.map +1 -0
  909. package/dist/modes/interactive/theme/dark.json +78 -0
  910. package/dist/modes/interactive/theme/light.json +78 -0
  911. package/dist/modes/interactive/theme/system-theme.d.ts +55 -0
  912. package/dist/modes/interactive/theme/system-theme.d.ts.map +1 -0
  913. package/dist/modes/interactive/theme/system-theme.js +546 -0
  914. package/dist/modes/interactive/theme/system-theme.js.map +1 -0
  915. package/dist/modes/interactive/theme/theme-controller.d.ts +81 -0
  916. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -0
  917. package/dist/modes/interactive/theme/theme-controller.js +210 -0
  918. package/dist/modes/interactive/theme/theme-controller.js.map +1 -0
  919. package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
  920. package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  921. package/dist/modes/interactive/theme/theme-schema.js +105 -0
  922. package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  923. package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
  924. package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  925. package/dist/modes/interactive/theme/theme-tokens.js +94 -0
  926. package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  927. package/dist/modes/interactive/theme/theme.d.ts +155 -0
  928. package/dist/modes/interactive/theme/theme.d.ts.map +1 -0
  929. package/dist/modes/interactive/theme/theme.js +905 -0
  930. package/dist/modes/interactive/theme/theme.js.map +1 -0
  931. package/dist/modes/interactive/tui-renderer.d.ts +22 -0
  932. package/dist/modes/interactive/tui-renderer.d.ts.map +1 -0
  933. package/dist/modes/interactive/tui-renderer.js +67 -0
  934. package/dist/modes/interactive/tui-renderer.js.map +1 -0
  935. package/dist/modes/json-event.d.ts +34 -0
  936. package/dist/modes/json-event.d.ts.map +1 -0
  937. package/dist/modes/json-event.js +29 -0
  938. package/dist/modes/json-event.js.map +1 -0
  939. package/dist/modes/print-mode.d.ts +28 -0
  940. package/dist/modes/print-mode.d.ts.map +1 -0
  941. package/dist/modes/print-mode.js +146 -0
  942. package/dist/modes/print-mode.js.map +1 -0
  943. package/dist/modes/rpc/jsonl.d.ts +17 -0
  944. package/dist/modes/rpc/jsonl.d.ts.map +1 -0
  945. package/dist/modes/rpc/jsonl.js +49 -0
  946. package/dist/modes/rpc/jsonl.js.map +1 -0
  947. package/dist/modes/rpc/rpc-client.d.ts +254 -0
  948. package/dist/modes/rpc/rpc-client.d.ts.map +1 -0
  949. package/dist/modes/rpc/rpc-client.js +499 -0
  950. package/dist/modes/rpc/rpc-client.js.map +1 -0
  951. package/dist/modes/rpc/rpc-mode.d.ts +20 -0
  952. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -0
  953. package/dist/modes/rpc/rpc-mode.js +655 -0
  954. package/dist/modes/rpc/rpc-mode.js.map +1 -0
  955. package/dist/modes/rpc/rpc-types.d.ts +478 -0
  956. package/dist/modes/rpc/rpc-types.d.ts.map +1 -0
  957. package/dist/modes/rpc/rpc-types.js +8 -0
  958. package/dist/modes/rpc/rpc-types.js.map +1 -0
  959. package/dist/package-manager-cli.d.ts +9 -0
  960. package/dist/package-manager-cli.d.ts.map +1 -0
  961. package/dist/package-manager-cli.js +1015 -0
  962. package/dist/package-manager-cli.js.map +1 -0
  963. package/dist/rpc-entry.d.ts +3 -0
  964. package/dist/rpc-entry.d.ts.map +1 -0
  965. package/dist/rpc-entry.js +11 -0
  966. package/dist/rpc-entry.js.map +1 -0
  967. package/dist/utils/abort.d.ts +5 -0
  968. package/dist/utils/abort.d.ts.map +1 -0
  969. package/dist/utils/abort.js +48 -0
  970. package/dist/utils/abort.js.map +1 -0
  971. package/dist/utils/ansi.d.ts +10 -0
  972. package/dist/utils/ansi.d.ts.map +1 -0
  973. package/dist/utils/ansi.js +74 -0
  974. package/dist/utils/ansi.js.map +1 -0
  975. package/dist/utils/changelog.d.ts +22 -0
  976. package/dist/utils/changelog.d.ts.map +1 -0
  977. package/dist/utils/changelog.js +165 -0
  978. package/dist/utils/changelog.js.map +1 -0
  979. package/dist/utils/child-process.d.ts +18 -0
  980. package/dist/utils/child-process.d.ts.map +1 -0
  981. package/dist/utils/child-process.js +106 -0
  982. package/dist/utils/child-process.js.map +1 -0
  983. package/dist/utils/clipboard-command.d.ts +7 -0
  984. package/dist/utils/clipboard-command.d.ts.map +1 -0
  985. package/dist/utils/clipboard-command.js +48 -0
  986. package/dist/utils/clipboard-command.js.map +1 -0
  987. package/dist/utils/clipboard-image.d.ts +11 -0
  988. package/dist/utils/clipboard-image.d.ts.map +1 -0
  989. package/dist/utils/clipboard-image.js +214 -0
  990. package/dist/utils/clipboard-image.js.map +1 -0
  991. package/dist/utils/clipboard.d.ts +6 -0
  992. package/dist/utils/clipboard.d.ts.map +1 -0
  993. package/dist/utils/clipboard.js +162 -0
  994. package/dist/utils/clipboard.js.map +1 -0
  995. package/dist/utils/deprecation.d.ts +4 -0
  996. package/dist/utils/deprecation.d.ts.map +1 -0
  997. package/dist/utils/deprecation.js +13 -0
  998. package/dist/utils/deprecation.js.map +1 -0
  999. package/dist/utils/exif-orientation.d.ts +5 -0
  1000. package/dist/utils/exif-orientation.d.ts.map +1 -0
  1001. package/dist/utils/exif-orientation.js +157 -0
  1002. package/dist/utils/exif-orientation.js.map +1 -0
  1003. package/dist/utils/frontmatter.d.ts +8 -0
  1004. package/dist/utils/frontmatter.d.ts.map +1 -0
  1005. package/dist/utils/frontmatter.js +27 -0
  1006. package/dist/utils/frontmatter.js.map +1 -0
  1007. package/dist/utils/fs-watch.d.ts +5 -0
  1008. package/dist/utils/fs-watch.d.ts.map +1 -0
  1009. package/dist/utils/fs-watch.js +25 -0
  1010. package/dist/utils/fs-watch.js.map +1 -0
  1011. package/dist/utils/git.d.ts +26 -0
  1012. package/dist/utils/git.d.ts.map +1 -0
  1013. package/dist/utils/git.js +195 -0
  1014. package/dist/utils/git.js.map +1 -0
  1015. package/dist/utils/html.d.ts +7 -0
  1016. package/dist/utils/html.d.ts.map +1 -0
  1017. package/dist/utils/html.js +40 -0
  1018. package/dist/utils/html.js.map +1 -0
  1019. package/dist/utils/image-convert.d.ts +22 -0
  1020. package/dist/utils/image-convert.d.ts.map +1 -0
  1021. package/dist/utils/image-convert.js +84 -0
  1022. package/dist/utils/image-convert.js.map +1 -0
  1023. package/dist/utils/image-process.d.ts +18 -0
  1024. package/dist/utils/image-process.d.ts.map +1 -0
  1025. package/dist/utils/image-process.js +83 -0
  1026. package/dist/utils/image-process.js.map +1 -0
  1027. package/dist/utils/image-resize-core.d.ts +42 -0
  1028. package/dist/utils/image-resize-core.d.ts.map +1 -0
  1029. package/dist/utils/image-resize-core.js +129 -0
  1030. package/dist/utils/image-resize-core.js.map +1 -0
  1031. package/dist/utils/image-resize-worker.d.ts +2 -0
  1032. package/dist/utils/image-resize-worker.d.ts.map +1 -0
  1033. package/dist/utils/image-resize-worker.js +32 -0
  1034. package/dist/utils/image-resize-worker.js.map +1 -0
  1035. package/dist/utils/image-resize.d.ts +16 -0
  1036. package/dist/utils/image-resize.d.ts.map +1 -0
  1037. package/dist/utils/image-resize.js +96 -0
  1038. package/dist/utils/image-resize.js.map +1 -0
  1039. package/dist/utils/json.d.ts +3 -0
  1040. package/dist/utils/json.d.ts.map +1 -0
  1041. package/dist/utils/json.js +7 -0
  1042. package/dist/utils/json.js.map +1 -0
  1043. package/dist/utils/management-http.d.ts +25 -0
  1044. package/dist/utils/management-http.d.ts.map +1 -0
  1045. package/dist/utils/management-http.js +54 -0
  1046. package/dist/utils/management-http.js.map +1 -0
  1047. package/dist/utils/mime.d.ts +3 -0
  1048. package/dist/utils/mime.d.ts.map +1 -0
  1049. package/dist/utils/mime.js +110 -0
  1050. package/dist/utils/mime.js.map +1 -0
  1051. package/dist/utils/open-browser.d.ts +9 -0
  1052. package/dist/utils/open-browser.d.ts.map +1 -0
  1053. package/dist/utils/open-browser.js +22 -0
  1054. package/dist/utils/open-browser.js.map +1 -0
  1055. package/dist/utils/output-files.d.ts +15 -0
  1056. package/dist/utils/output-files.d.ts.map +1 -0
  1057. package/dist/utils/output-files.js +30 -0
  1058. package/dist/utils/output-files.js.map +1 -0
  1059. package/dist/utils/paths.d.ts +34 -0
  1060. package/dist/utils/paths.d.ts.map +1 -0
  1061. package/dist/utils/paths.js +115 -0
  1062. package/dist/utils/paths.js.map +1 -0
  1063. package/dist/utils/photon.d.ts +21 -0
  1064. package/dist/utils/photon.d.ts.map +1 -0
  1065. package/dist/utils/photon.js +121 -0
  1066. package/dist/utils/photon.js.map +1 -0
  1067. package/dist/utils/pi-user-agent.d.ts +3 -0
  1068. package/dist/utils/pi-user-agent.d.ts.map +1 -0
  1069. package/dist/utils/pi-user-agent.js +6 -0
  1070. package/dist/utils/pi-user-agent.js.map +1 -0
  1071. package/dist/utils/shell.d.ts +32 -0
  1072. package/dist/utils/shell.d.ts.map +1 -0
  1073. package/dist/utils/shell.js +235 -0
  1074. package/dist/utils/shell.js.map +1 -0
  1075. package/dist/utils/sleep.d.ts +5 -0
  1076. package/dist/utils/sleep.d.ts.map +1 -0
  1077. package/dist/utils/sleep.js +17 -0
  1078. package/dist/utils/sleep.js.map +1 -0
  1079. package/dist/utils/syntax-highlight.d.ts +13 -0
  1080. package/dist/utils/syntax-highlight.d.ts.map +1 -0
  1081. package/dist/utils/syntax-highlight.js +184 -0
  1082. package/dist/utils/syntax-highlight.js.map +1 -0
  1083. package/dist/utils/text.d.ts +8 -0
  1084. package/dist/utils/text.d.ts.map +1 -0
  1085. package/dist/utils/text.js +9 -0
  1086. package/dist/utils/text.js.map +1 -0
  1087. package/dist/utils/tool-result-images.d.ts +21 -0
  1088. package/dist/utils/tool-result-images.d.ts.map +1 -0
  1089. package/dist/utils/tool-result-images.js +48 -0
  1090. package/dist/utils/tool-result-images.js.map +1 -0
  1091. package/dist/utils/tools-manager.d.ts +13 -0
  1092. package/dist/utils/tools-manager.d.ts.map +1 -0
  1093. package/dist/utils/tools-manager.js +339 -0
  1094. package/dist/utils/tools-manager.js.map +1 -0
  1095. package/dist/utils/version-check.d.ts +55 -0
  1096. package/dist/utils/version-check.d.ts.map +1 -0
  1097. package/dist/utils/version-check.js +143 -0
  1098. package/dist/utils/version-check.js.map +1 -0
  1099. package/dist/utils/windows-self-update.d.ts +3 -0
  1100. package/dist/utils/windows-self-update.d.ts.map +1 -0
  1101. package/dist/utils/windows-self-update.js +77 -0
  1102. package/dist/utils/windows-self-update.js.map +1 -0
  1103. package/dist/utils/wsl.d.ts +3 -0
  1104. package/dist/utils/wsl.d.ts.map +1 -0
  1105. package/dist/utils/wsl.js +15 -0
  1106. package/dist/utils/wsl.js.map +1 -0
  1107. package/dist/utils/zip.d.ts +7 -0
  1108. package/dist/utils/zip.d.ts.map +1 -0
  1109. package/dist/utils/zip.js +60 -0
  1110. package/dist/utils/zip.js.map +1 -0
  1111. package/docs/cli-integration.md +106 -0
  1112. package/docs/cli.md +333 -0
  1113. package/docs/codemode.md +230 -0
  1114. package/docs/compaction.md +463 -0
  1115. package/docs/configuration.md +47 -0
  1116. package/docs/containerization.md +183 -0
  1117. package/docs/custom-provider.md +227 -0
  1118. package/docs/docs.json +220 -0
  1119. package/docs/environment-variables.md +102 -0
  1120. package/docs/extensions.md +3333 -0
  1121. package/docs/how-pi-works.md +49 -0
  1122. package/docs/images/doom-extension.png +0 -0
  1123. package/docs/images/exy.png +0 -0
  1124. package/docs/images/interactive-mode.png +0 -0
  1125. package/docs/images/tree-view.png +0 -0
  1126. package/docs/index.md +39 -0
  1127. package/docs/json.md +226 -0
  1128. package/docs/keybindings.md +195 -0
  1129. package/docs/llama-cpp.md +132 -0
  1130. package/docs/mcp.md +272 -0
  1131. package/docs/message-types.md +279 -0
  1132. package/docs/models-configuration.md +196 -0
  1133. package/docs/models.md +225 -0
  1134. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  1135. package/docs/packages.md +151 -0
  1136. package/docs/prompt-templates.md +59 -0
  1137. package/docs/providers.md +247 -0
  1138. package/docs/quickstart.md +140 -0
  1139. package/docs/rpc-commands.md +860 -0
  1140. package/docs/rpc-extension-ui.md +200 -0
  1141. package/docs/rpc.md +193 -0
  1142. package/docs/sdk.md +147 -0
  1143. package/docs/security.md +99 -0
  1144. package/docs/session-format.md +293 -0
  1145. package/docs/sessions.md +66 -0
  1146. package/docs/settings.md +172 -0
  1147. package/docs/shell-aliases.md +93 -0
  1148. package/docs/skills.md +93 -0
  1149. package/docs/slash-commands.md +61 -0
  1150. package/docs/terminal-setup.md +233 -0
  1151. package/docs/termux.md +117 -0
  1152. package/docs/themes.md +138 -0
  1153. package/docs/tmux.md +55 -0
  1154. package/docs/tui.md +197 -0
  1155. package/docs/usage.md +94 -0
  1156. package/docs/virtual-models.md +114 -0
  1157. package/docs/windows.md +81 -0
  1158. package/examples/README.md +36 -0
  1159. package/examples/extensions/README.md +214 -0
  1160. package/examples/extensions/auto-commit-on-exit.ts +49 -0
  1161. package/examples/extensions/bash-spawn-hook.ts +30 -0
  1162. package/examples/extensions/bookmark.ts +50 -0
  1163. package/examples/extensions/border-status-editor.ts +150 -0
  1164. package/examples/extensions/built-in-tool-renderer.ts +225 -0
  1165. package/examples/extensions/claude-rules.ts +86 -0
  1166. package/examples/extensions/commands.ts +72 -0
  1167. package/examples/extensions/confirm-destructive.ts +59 -0
  1168. package/examples/extensions/custom-compaction.ts +117 -0
  1169. package/examples/extensions/custom-footer.ts +64 -0
  1170. package/examples/extensions/custom-header.ts +73 -0
  1171. package/examples/extensions/custom-provider-anthropic/index.ts +613 -0
  1172. package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
  1173. package/examples/extensions/custom-provider-anthropic/package.json +19 -0
  1174. package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
  1175. package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
  1176. package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
  1177. package/examples/extensions/debug-provider.ts +90 -0
  1178. package/examples/extensions/dirty-repo-guard.ts +56 -0
  1179. package/examples/extensions/doom-overlay/README.md +46 -0
  1180. package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
  1181. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  1182. package/examples/extensions/doom-overlay/doom/build.sh +152 -0
  1183. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
  1184. package/examples/extensions/doom-overlay/doom-component.ts +132 -0
  1185. package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
  1186. package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
  1187. package/examples/extensions/doom-overlay/index.ts +74 -0
  1188. package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
  1189. package/examples/extensions/dynamic-resources/SKILL.md +8 -0
  1190. package/examples/extensions/dynamic-resources/dynamic.json +81 -0
  1191. package/examples/extensions/dynamic-resources/dynamic.md +5 -0
  1192. package/examples/extensions/dynamic-resources/index.ts +15 -0
  1193. package/examples/extensions/dynamic-tools.ts +74 -0
  1194. package/examples/extensions/entry-renderer.ts +41 -0
  1195. package/examples/extensions/event-bus.ts +43 -0
  1196. package/examples/extensions/file-trigger.ts +41 -0
  1197. package/examples/extensions/git-checkpoint.ts +53 -0
  1198. package/examples/extensions/git-merge-and-resolve.ts +115 -0
  1199. package/examples/extensions/github-issue-autocomplete.ts +185 -0
  1200. package/examples/extensions/gondolin/index.ts +531 -0
  1201. package/examples/extensions/gondolin/package-lock.json +175 -0
  1202. package/examples/extensions/gondolin/package.json +19 -0
  1203. package/examples/extensions/handoff.ts +190 -0
  1204. package/examples/extensions/hello.ts +26 -0
  1205. package/examples/extensions/hidden-thinking-label.ts +53 -0
  1206. package/examples/extensions/inline-bash.ts +94 -0
  1207. package/examples/extensions/input-transform-streaming.ts +39 -0
  1208. package/examples/extensions/input-transform.ts +43 -0
  1209. package/examples/extensions/interactive-shell.ts +196 -0
  1210. package/examples/extensions/jev-router.ts +113 -0
  1211. package/examples/extensions/mac-system-theme.ts +47 -0
  1212. package/examples/extensions/message-renderer.ts +59 -0
  1213. package/examples/extensions/minimal-mode.ts +353 -0
  1214. package/examples/extensions/modal-editor.ts +85 -0
  1215. package/examples/extensions/model-status.ts +31 -0
  1216. package/examples/extensions/notify.ts +57 -0
  1217. package/examples/extensions/overlay-qa-tests.ts +1450 -0
  1218. package/examples/extensions/overlay-test.ts +153 -0
  1219. package/examples/extensions/permission-gate.ts +34 -0
  1220. package/examples/extensions/pirate.ts +47 -0
  1221. package/examples/extensions/plan-mode/README.md +66 -0
  1222. package/examples/extensions/plan-mode/index.ts +394 -0
  1223. package/examples/extensions/plan-mode/utils.ts +168 -0
  1224. package/examples/extensions/preset.ts +438 -0
  1225. package/examples/extensions/project-trust.ts +64 -0
  1226. package/examples/extensions/prompt-customizer.ts +49 -0
  1227. package/examples/extensions/protected-paths.ts +30 -0
  1228. package/examples/extensions/provider-payload.ts +18 -0
  1229. package/examples/extensions/qna.ts +118 -0
  1230. package/examples/extensions/question.ts +286 -0
  1231. package/examples/extensions/questionnaire.ts +448 -0
  1232. package/examples/extensions/rainbow-editor.ts +88 -0
  1233. package/examples/extensions/reload-runtime.ts +49 -0
  1234. package/examples/extensions/rpc-demo.ts +118 -0
  1235. package/examples/extensions/sandbox/index.ts +321 -0
  1236. package/examples/extensions/sandbox/package-lock.json +92 -0
  1237. package/examples/extensions/sandbox/package.json +19 -0
  1238. package/examples/extensions/send-user-message.ts +97 -0
  1239. package/examples/extensions/session-name.ts +27 -0
  1240. package/examples/extensions/shutdown-command.ts +63 -0
  1241. package/examples/extensions/snake.ts +343 -0
  1242. package/examples/extensions/space-invaders.ts +560 -0
  1243. package/examples/extensions/ssh.ts +220 -0
  1244. package/examples/extensions/status-line.ts +32 -0
  1245. package/examples/extensions/structured-output.ts +65 -0
  1246. package/examples/extensions/subagent/README.md +177 -0
  1247. package/examples/extensions/subagent/agents/planner.md +37 -0
  1248. package/examples/extensions/subagent/agents/reviewer.md +35 -0
  1249. package/examples/extensions/subagent/agents/scout.md +50 -0
  1250. package/examples/extensions/subagent/agents/worker.md +24 -0
  1251. package/examples/extensions/subagent/agents.ts +157 -0
  1252. package/examples/extensions/subagent/index.ts +1036 -0
  1253. package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
  1254. package/examples/extensions/subagent/prompts/implement.md +10 -0
  1255. package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
  1256. package/examples/extensions/summarize.ts +199 -0
  1257. package/examples/extensions/system-prompt-header.ts +17 -0
  1258. package/examples/extensions/tic-tac-toe.ts +1008 -0
  1259. package/examples/extensions/timed-confirm.ts +70 -0
  1260. package/examples/extensions/titlebar-spinner.ts +58 -0
  1261. package/examples/extensions/todo.ts +304 -0
  1262. package/examples/extensions/tool-override.ts +144 -0
  1263. package/examples/extensions/tools.ts +148 -0
  1264. package/examples/extensions/trigger-compact.ts +50 -0
  1265. package/examples/extensions/truncated-tool.ts +195 -0
  1266. package/examples/extensions/widget-placement.ts +9 -0
  1267. package/examples/extensions/with-deps/index.ts +32 -0
  1268. package/examples/extensions/with-deps/package-lock.json +31 -0
  1269. package/examples/extensions/with-deps/package.json +22 -0
  1270. package/examples/extensions/working-indicator.ts +123 -0
  1271. package/examples/extensions/working-message-test.ts +25 -0
  1272. package/examples/rpc-client.ts +35 -0
  1273. package/examples/rpc-extension-ui.ts +661 -0
  1274. package/examples/sdk/01-minimal.ts +26 -0
  1275. package/examples/sdk/02-custom-model.ts +49 -0
  1276. package/examples/sdk/03-custom-prompt.ts +75 -0
  1277. package/examples/sdk/04-skills.ts +55 -0
  1278. package/examples/sdk/05-tools.ts +48 -0
  1279. package/examples/sdk/06-extensions.ts +99 -0
  1280. package/examples/sdk/07-context-files.ts +47 -0
  1281. package/examples/sdk/08-prompt-templates.ts +51 -0
  1282. package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
  1283. package/examples/sdk/10-settings.ts +53 -0
  1284. package/examples/sdk/11-sessions.ts +52 -0
  1285. package/examples/sdk/12-full-control.ts +74 -0
  1286. package/examples/sdk/13-session-runtime.ts +67 -0
  1287. package/examples/sdk/14-codemode-mcp.ts +61 -0
  1288. package/examples/sdk/README.md +141 -0
  1289. package/package.json +94 -5
  1290. package/schemas/keybindings.schema.json +397 -0
  1291. package/schemas/models.schema.json +1211 -0
  1292. package/schemas/settings.schema.json +792 -0
  1293. package/schemas/theme.schema.json +365 -0
@@ -0,0 +1,940 @@
1
+ /**
2
+ * AgentSession - Core abstraction for agent lifecycle and session management.
3
+ *
4
+ * This class is shared between all run modes (interactive, print, rpc).
5
+ * It encapsulates:
6
+ * - Agent state access
7
+ * - Event subscription with automatic session persistence
8
+ * - Model and thinking level management
9
+ * - Compaction (manual and auto)
10
+ * - Bash execution
11
+ * - Session switching and branching
12
+ *
13
+ * Modes use this class and add their own I/O layer on top.
14
+ */
15
+ import { type Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type StreamFn, type ThinkingLevel } from "@earendil-works/pi-agent-core";
16
+ import type { ImageContent, Model, TextContent } from "@earendil-works/pi-ai/compat";
17
+ import { type BashResult } from "./bash-executor.ts";
18
+ import type { CacheWarmer, CacheWarmingStatus } from "./cache-warmer.ts";
19
+ import { type CompactionResult } from "./compaction/index.ts";
20
+ import { type ContextUsage, type ExtensionCommandContextActions, type ExtensionErrorListener, type ExtensionMode, ExtensionRunner, type ExtensionUIContext, type InputSource, type ReplacedSessionContext, type SessionStartEvent, type ShutdownHandler, type ToolDefinition, type ToolInfo } from "./extensions/index.ts";
21
+ import { type CustomMessage } from "./messages.ts";
22
+ import type { ModelRuntime } from "./model-runtime.ts";
23
+ import { type PromptTemplate } from "./prompt-templates.ts";
24
+ import type { ResourceLoader } from "./resource-loader.ts";
25
+ import { type BranchSummaryEntry, type SessionEntry, SessionManager } from "./session-manager.ts";
26
+ import { type CacheWarmingMode, type SettingsManager } from "./settings-manager.ts";
27
+ import { type BashOperations } from "./tools/bash.ts";
28
+ /** Mark `streamFn` as resolving auth through `modelRuntime` on its own. */
29
+ export declare function markRuntimeStreamFunction(streamFn: StreamFn, modelRuntime: ModelRuntime): void;
30
+ /** Parsed skill block from a user message */
31
+ export interface ParsedSkillBlock {
32
+ name: string;
33
+ location: string;
34
+ content: string;
35
+ userMessage: string | undefined;
36
+ }
37
+ /**
38
+ * Parse a skill block from message text.
39
+ * Returns null if the text doesn't contain a skill block.
40
+ */
41
+ export declare function parseSkillBlock(text: string): ParsedSkillBlock | null;
42
+ /** Tool execution events of calls a tool made through `ctx.executeTool()` carry `parentToolCallId`. */
43
+ type WithParentToolCallId<E> = E extends {
44
+ type: "tool_execution_start" | "tool_execution_update" | "tool_execution_end";
45
+ } ? E & {
46
+ parentToolCallId?: string;
47
+ } : E;
48
+ /** Session-specific events that extend the core AgentEvent */
49
+ export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
50
+ type: "agent_end";
51
+ }>> | {
52
+ type: "agent_end";
53
+ messages: AgentMessage[];
54
+ willRetry: boolean;
55
+ } | {
56
+ type: "agent_settled";
57
+ aborted: boolean;
58
+ } | {
59
+ type: "queue_update";
60
+ steering: readonly string[];
61
+ followUp: readonly string[];
62
+ } | {
63
+ type: "compaction_start";
64
+ reason: "manual" | "threshold" | "overflow";
65
+ } | {
66
+ type: "entry_appended";
67
+ entry: SessionEntry;
68
+ } | {
69
+ type: "session_info_changed";
70
+ name: string | undefined;
71
+ } | {
72
+ type: "thinking_level_changed";
73
+ level: ThinkingLevel;
74
+ } | {
75
+ type: "compaction_end";
76
+ reason: "manual" | "threshold" | "overflow";
77
+ result: CompactionResult | undefined;
78
+ aborted: boolean;
79
+ willRetry: boolean;
80
+ errorMessage?: string;
81
+ } | {
82
+ type: "auto_retry_start";
83
+ attempt: number;
84
+ maxAttempts: number;
85
+ delayMs: number;
86
+ errorMessage: string;
87
+ } | {
88
+ type: "auto_retry_end";
89
+ success: boolean;
90
+ attempt: number;
91
+ finalError?: string;
92
+ } | {
93
+ type: "summarization_retry_scheduled";
94
+ attempt: number;
95
+ maxAttempts: number;
96
+ delayMs: number;
97
+ errorMessage: string;
98
+ } | {
99
+ type: "summarization_retry_attempt_start";
100
+ source: "branchSummary";
101
+ } | {
102
+ type: "summarization_retry_attempt_start";
103
+ source: "compaction";
104
+ reason: "manual" | "threshold" | "overflow";
105
+ } | {
106
+ type: "summarization_retry_finished";
107
+ } | {
108
+ type: "bash_execution_update";
109
+ id?: string;
110
+ delta: string;
111
+ };
112
+ /** Listener function for agent session events */
113
+ export type AgentSessionEventListener = (event: AgentSessionEvent) => void;
114
+ export interface AgentSessionConfig {
115
+ agent: Agent;
116
+ sessionManager: SessionManager;
117
+ settingsManager: SettingsManager;
118
+ cwd: string;
119
+ /** Models to cycle through with Ctrl+P (from --models flag) */
120
+ scopedModels?: Array<{
121
+ model: Model<any>;
122
+ thinkingLevel?: ThinkingLevel;
123
+ }>;
124
+ /** Resource loader for extensions, skills, prompts, themes, context files, and system prompt */
125
+ resourceLoader: ResourceLoader;
126
+ /** SDK custom tools registered outside extensions */
127
+ customTools?: ToolDefinition[];
128
+ /** Canonical model/auth runtime used by coding-agent internals. */
129
+ modelRuntime: ModelRuntime;
130
+ /** Keeps the prompt cache entry of the last session request warm. */
131
+ cacheWarmer?: Pick<CacheWarmer, "cancel" | "status" | "onAgentSettled" | "onModeChanged" | "onWarmed">;
132
+ /** Initial active built-in tool names. Default: [read, bash, edit, write] */
133
+ initialActiveToolNames?: string[];
134
+ /**
135
+ * Whether the initial tools come from the `defaultTools` setting. When true, a resumed session
136
+ * replaces them with the loadout its transcript records, with `defaultToolModifiers` applied, and
137
+ * reload activates tools newly added to the setting. Tools removed from it stay active.
138
+ */
139
+ usesDefaultTools?: boolean;
140
+ /**
141
+ * `+name`/`-name` entries applied on top of the `defaultTools` setting, from `--tools`. Reload
142
+ * applies them to the reloaded setting too, so a removed tool stays removed.
143
+ */
144
+ defaultToolModifiers?: string[];
145
+ /**
146
+ * Optional allowlist of tool names or patterns (`*` matches any characters). When provided, only
147
+ * matching tools are exposed. A non-empty list without `mcp__` entries also keeps MCP tools
148
+ * registered for codemode and tool_search; only tool_search can declare them. An empty list
149
+ * exposes no tools.
150
+ */
151
+ allowedToolNames?: string[];
152
+ /** Optional denylist of tool names or patterns. When provided, matching tools are not exposed. */
153
+ excludedToolNames?: string[];
154
+ /**
155
+ * Override base tools (useful for custom runtimes).
156
+ *
157
+ * These are synthesized into minimal ToolDefinitions internally so AgentSession can keep
158
+ * a definition-first registry even when callers provide plain AgentTool instances.
159
+ */
160
+ baseToolsOverride?: Record<string, AgentTool>;
161
+ /** Mutable ref used by Agent to access the current ExtensionRunner */
162
+ extensionRunnerRef?: {
163
+ current?: ExtensionRunner;
164
+ };
165
+ /** Session start event metadata emitted when extensions bind to this runtime. */
166
+ sessionStartEvent?: SessionStartEvent;
167
+ }
168
+ export interface ExtensionBindings {
169
+ uiContext?: ExtensionUIContext;
170
+ mode?: ExtensionMode;
171
+ commandContextActions?: ExtensionCommandContextActions;
172
+ abortHandler?: () => void;
173
+ shutdownHandler?: ShutdownHandler;
174
+ onError?: ExtensionErrorListener;
175
+ }
176
+ export type QueuedInputDisposition = "handled" | "queued";
177
+ export type PromptDisposition = QueuedInputDisposition | "started";
178
+ /** Options for AgentSession.prompt() */
179
+ export interface PromptOptions {
180
+ /** Whether to dispatch extension commands and expand skill commands and prompt templates (default: true) */
181
+ expandPromptTemplates?: boolean;
182
+ /** Image attachments */
183
+ images?: ImageContent[];
184
+ /** When streaming, how to queue the message: "steer" (interrupt) or "followUp" (wait). Required if streaming. */
185
+ streamingBehavior?: "steer" | "followUp";
186
+ /** Source of input for extension input event handlers. Defaults to "interactive". */
187
+ source?: InputSource;
188
+ /** Internal hook used by RPC mode to observe how an accepted prompt was dispatched. Not called if the prompt is rejected. */
189
+ preflightResult?: (disposition: PromptDisposition) => void;
190
+ }
191
+ /** Options for model/thinking mutations. */
192
+ export interface ModelMutationOptions {
193
+ /** Persist the new value to global defaults. Defaults to session-only. */
194
+ persist?: boolean;
195
+ }
196
+ /** Result from cycleModel() */
197
+ export interface ModelCycleResult {
198
+ model: Model<any>;
199
+ thinkingLevel: ThinkingLevel;
200
+ /** Whether cycling through scoped models (--models flag) or all available */
201
+ isScoped: boolean;
202
+ }
203
+ /** Session statistics for /session command */
204
+ export interface SessionStats {
205
+ sessionFile: string | undefined;
206
+ sessionId: string;
207
+ userMessages: number;
208
+ assistantMessages: number;
209
+ toolCalls: number;
210
+ toolResults: number;
211
+ totalMessages: number;
212
+ tokens: {
213
+ input: number;
214
+ output: number;
215
+ cacheRead: number;
216
+ cacheWrite: number;
217
+ total: number;
218
+ };
219
+ cost: number;
220
+ contextUsage?: ContextUsage;
221
+ }
222
+ export declare class AgentSession {
223
+ readonly agent: Agent;
224
+ readonly sessionManager: SessionManager;
225
+ readonly settingsManager: SettingsManager;
226
+ private _scopedModels;
227
+ private _unsubscribeAgent?;
228
+ private _eventListeners;
229
+ private _isAgentRunActive;
230
+ private _agentRunAbortRequested;
231
+ private _idleWaitPromise;
232
+ private _resolveIdleWait;
233
+ /** Tracks pending steering messages for UI display. Removed when delivered. */
234
+ private _steeringMessages;
235
+ /** Tracks pending follow-up messages for UI display. Removed when delivered. */
236
+ private _followUpMessages;
237
+ /** Messages queued to be included with the next user prompt as context ("asides"). */
238
+ private _pendingNextTurnMessages;
239
+ /** Context-only custom messages queued during a run, flushed once the current turn's tool results are in. */
240
+ private _pendingCustomMessages;
241
+ private _compactionAbortController;
242
+ private _autoCompactionAbortController;
243
+ private _overflowRecoveryAttempted;
244
+ private _branchSummaryAbortController;
245
+ private _retryAbortController;
246
+ private _retryAttempt;
247
+ /**
248
+ * Failed response that the next request repeats, set by auto-retry and overflow recovery. The
249
+ * retry is routed with it as `failed`, since the context no longer contains it.
250
+ */
251
+ private _failedResponse;
252
+ private readonly _bashAbortControllers;
253
+ private _pendingBashMessages;
254
+ private _extensionRunner;
255
+ private _turnIndex;
256
+ private readonly _entryIdsByMessage;
257
+ private readonly _boundaryDispatchedMessages;
258
+ private _lastAssistantMessage;
259
+ private _lastActivityOutcome;
260
+ private _isBeforeSettle;
261
+ private _abortDuringBeforeSettle;
262
+ private _isEmittingAgentSettled;
263
+ private readonly _deferredSettledActions;
264
+ private _resourceLoader;
265
+ private _customTools;
266
+ private _baseToolDefinitions;
267
+ private _cwd;
268
+ private _extensionRunnerRef?;
269
+ private _initialActiveToolNames?;
270
+ /**
271
+ * Tools of the restored or reloaded loadout that are not registered yet, such as tools of MCP
272
+ * servers that are still connecting. They are activated when they are registered, and dropped when
273
+ * `setActiveToolsByName()` deactivates a tool or the next agent run starts.
274
+ */
275
+ private _pendingToolNames;
276
+ private _usesDefaultTools;
277
+ private _defaultToolModifiers;
278
+ /** Matches the `--tools` entries: tool names or patterns. */
279
+ private _allowedTools?;
280
+ /**
281
+ * Whether the allowlist filters MCP tools: it is empty (`--no-tools`) or names an MCP tool
282
+ * (`mcp__*`). Otherwise it keeps MCP tools registered for codemode and tool_search.
283
+ */
284
+ private _allowlistFiltersMcp;
285
+ private _excludedTools?;
286
+ private _baseToolsOverride?;
287
+ private _sessionStartEvent;
288
+ private _extensionUIContext?;
289
+ private _extensionMode;
290
+ private _extensionCommandContextActions?;
291
+ private _extensionAbortHandler?;
292
+ private _extensionShutdownHandler?;
293
+ private _extensionErrorListener?;
294
+ private _extensionErrorUnsubscriber?;
295
+ private _modelRuntime;
296
+ private _cacheWarmer?;
297
+ private _toolRegistry;
298
+ /** Created on the first `ctx.executeTool()` call. */
299
+ private _nestedToolCalls;
300
+ /** Declared tools whose declarations requests leave out, from `prepareLoadout` hooks. */
301
+ private _hiddenDeclarations;
302
+ private _toolDefinitions;
303
+ private _toolPromptSnippets;
304
+ private _toolPromptGuidelines;
305
+ private _baseSystemPromptOptions;
306
+ /** Prompt options after before_agent_start mutations for the active run. */
307
+ private _runSystemPromptOptions?;
308
+ constructor(config: AgentSessionConfig);
309
+ get modelRuntime(): ModelRuntime;
310
+ private _getRequiredRequestAuth;
311
+ private _getSummarizationRequestAuth;
312
+ /**
313
+ * The model whose limits apply to `message`, or undefined when the message came from another
314
+ * model. Under a virtual selection, that is the physical model that produced it.
315
+ */
316
+ private _modelForMessage;
317
+ /**
318
+ * Record the selection on the current branch when the branch implies another one, so a resume
319
+ * restores it. Tree navigation can leave the latest `model_change` on another branch; responses
320
+ * cannot record a virtual selection because they name physical models. Responses do record a
321
+ * physical selection unless the branch holds a virtual one; checking a physical selection against
322
+ * responses would record it on every prompt while `prepareRequest` redirects to another model.
323
+ */
324
+ private _recordSelection;
325
+ /** The model whose limits apply to the conversation. */
326
+ private _limitsModel;
327
+ /**
328
+ * Install tool hooks once on the Agent instance.
329
+ *
330
+ * The callbacks read `this._extensionRunner` at execution time, so extension reload swaps in the
331
+ * new runner without reinstalling hooks. Extension-specific tool wrappers are still used to adapt
332
+ * registered tool execution to the extension context. Tool call and tool result interception now
333
+ * happens here instead of in wrappers.
334
+ */
335
+ private _installAgentToolHooks;
336
+ /** `tool_call` handlers. `parentToolCallId` is set for calls another tool made. */
337
+ private _beforeToolCall;
338
+ /** `tool_result` handlers and image normalization. `parentToolCallId` is set for calls another tool made. */
339
+ private _afterToolCall;
340
+ /**
341
+ * Run a call that the tool call `parentToolCallId` made through `ctx.executeTool()`. It goes
342
+ * through the agent's tool pipeline with the session's hooks, against the callable tools.
343
+ */
344
+ private _executeNestedToolCall;
345
+ /** Whether `projection`, the current session projection, exceeds the compaction threshold of `model`. */
346
+ private _exceedsCompactionThreshold;
347
+ private _compactBeforeNextAssistantResponse;
348
+ private _installAgentRequestProjection;
349
+ private _dispatchTurnEndBoundary;
350
+ private _installAgentBoundaryHooks;
351
+ private _installAgentNextTurnRefresh;
352
+ private _refreshFinalizedContext;
353
+ private _applyBoundaryDrafts;
354
+ private _createBoundaryPreviewManager;
355
+ private _getPendingBoundaryMessages;
356
+ private _buildBoundaryContext;
357
+ private _commitBoundaryDrafts;
358
+ private _reportInvalidBoundaryContinuation;
359
+ /** Emit an event to all listeners */
360
+ private _emit;
361
+ private _emitQueueUpdate;
362
+ private _emitSessionCompactFailed;
363
+ private _getIdleWaitPromise;
364
+ private _resolveIdleWaitIfIdle;
365
+ private _emitAgentSettled;
366
+ /** Internal handler for agent events - shared by subscribe and reconnect */
367
+ private _handleAgentEvent;
368
+ private _willRetryAfterAgentEnd;
369
+ private _findPersistedMessageEntryId;
370
+ /**
371
+ * Persistently omit a failed attempt and its tool results from model context. Results are
372
+ * found in the projected context, so the pair stays together whether the attempt comes from
373
+ * the current run or a resumed session. An unpaired result fails the next request (#11227).
374
+ */
375
+ private _omitRecoveryAttempt;
376
+ /** Find the last assistant message in agent state (including aborted ones) */
377
+ private _findLastAssistantMessage;
378
+ private _replaceMessageInPlace;
379
+ /** Emit extension events based on agent events */
380
+ private _emitExtensionEvent;
381
+ /**
382
+ * Subscribe to agent events.
383
+ * Session persistence is handled internally (saves messages on message_end).
384
+ * Multiple listeners can be added. Returns unsubscribe function for this listener.
385
+ */
386
+ subscribe(listener: AgentSessionEventListener): () => void;
387
+ /** Disconnect from agent events during disposal. */
388
+ private _disconnectFromAgent;
389
+ /**
390
+ * Remove all listeners and disconnect from agent.
391
+ * Call this when completely done with the session.
392
+ */
393
+ dispose(): void;
394
+ /** Refresh the public finalized transcript from the canonical session projection. */
395
+ refreshContext(): void;
396
+ /** Full agent state */
397
+ get state(): AgentState;
398
+ /** Current cache-warming state and the policy inputs that produced it. */
399
+ get cacheWarmingStatus(): CacheWarmingStatus | undefined;
400
+ /** Persist the cache-warming mode and immediately reconcile active warming. */
401
+ setCacheWarmingMode(mode: CacheWarmingMode): void;
402
+ /** Current model (may be undefined if not yet selected) */
403
+ get model(): Model<any> | undefined;
404
+ /** Current thinking level */
405
+ get thinkingLevel(): ThinkingLevel;
406
+ /** Under a virtual selection, the physical model and thinking level of the latest successful response. */
407
+ get routedModel(): {
408
+ model: Model<any>;
409
+ thinkingLevel?: ThinkingLevel;
410
+ } | undefined;
411
+ /** Whether the session is currently processing an agent run or post-run continuation. */
412
+ get isStreaming(): boolean;
413
+ /** Whether the session has no active agent run, compaction, branch summary, retry, or queued continuation. */
414
+ get isIdle(): boolean;
415
+ /** Current effective system prompt, including changes not yet sent to the model. */
416
+ get systemPrompt(): string;
417
+ /** Current retry attempt (0 if not retrying) */
418
+ get retryAttempt(): number;
419
+ /**
420
+ * Get the names of currently active tools, which are the tools declared to the model.
421
+ * Tools with `codemode` or `deferred` exposure are callable from other tools without being active.
422
+ */
423
+ getActiveToolNames(): string[];
424
+ /** Get the names of the tools that tools can call through `ctx.executeTool()`. */
425
+ getCallableToolNames(): string[];
426
+ /**
427
+ * Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
428
+ */
429
+ getAllTools(): ToolInfo[];
430
+ getToolDefinition(name: string): ToolDefinition | undefined;
431
+ /**
432
+ * Set active tools by name.
433
+ * Only tools in the registry can be enabled. Unknown and hidden tool names are ignored.
434
+ * Also rebuilds the system prompt to reflect the new tool set.
435
+ * Changes take effect on the next agent turn.
436
+ */
437
+ setActiveToolsByName(toolNames: string[]): void;
438
+ private _setActiveTools;
439
+ /**
440
+ * Whether `--tools` and `--exclude-tools` keep the tool registered. MCP tools stay registered
441
+ * unless the allowlist filters them (see `_allowlistFiltersMcp`).
442
+ */
443
+ private _isAllowedTool;
444
+ /**
445
+ * Whether the tool may be active, which declares it to the model. MCP tools the allowlist keeps
446
+ * without matching them are only for codemode and tool_search: they may be declared only when
447
+ * tool_search can load them (non-`direct` exposure and tool_search registered). This also applies
448
+ * to tools restored from the transcript or set by extensions.
449
+ */
450
+ private _isActivatable;
451
+ private _getToolExposure;
452
+ /**
453
+ * Tools callable through `ctx.executeTool()`: the active `direct` tools and every registered
454
+ * `codemode` or `deferred` tool.
455
+ */
456
+ private _getCallableTools;
457
+ /**
458
+ * Set the agent's tools for the given active tool names and return them. The active tools are
459
+ * the registered, non-hidden ones; they are declared to the model. Active tools with a
460
+ * `prepareLoadout` hook can change the declared descriptions and hide declarations from
461
+ * requests (see {@link _installHiddenDeclarationsProjection}).
462
+ *
463
+ * The active tools are a set: tools that stay active keep their current order and newly active
464
+ * ones are appended, so reordering the same names does not change the prompt (#11495).
465
+ */
466
+ private _applyToolLoadout;
467
+ /** Whether compaction or branch summarization is currently running */
468
+ get isCompacting(): boolean;
469
+ /** All messages including custom types like BashExecutionMessage */
470
+ get messages(): AgentMessage[];
471
+ /** Current steering mode */
472
+ get steeringMode(): "all" | "one-at-a-time";
473
+ /** Current follow-up mode */
474
+ get followUpMode(): "all" | "one-at-a-time";
475
+ /** Current session file path, or undefined if sessions are disabled */
476
+ get sessionFile(): string | undefined;
477
+ /** Current session ID */
478
+ get sessionId(): string;
479
+ /** Current session display name, if set */
480
+ get sessionName(): string | undefined;
481
+ /** Scoped models for cycling (from --models flag) */
482
+ get scopedModels(): ReadonlyArray<{
483
+ model: Model<any>;
484
+ thinkingLevel?: ThinkingLevel;
485
+ }>;
486
+ /** Update scoped models for cycling */
487
+ setScopedModels(scopedModels: Array<{
488
+ model: Model<any>;
489
+ thinkingLevel?: ThinkingLevel;
490
+ }>): void;
491
+ /** File-based prompt templates */
492
+ get promptTemplates(): ReadonlyArray<PromptTemplate>;
493
+ private _normalizePromptSnippet;
494
+ private _normalizePromptGuidelines;
495
+ private _rebuildSystemPrompt;
496
+ /**
497
+ * Apply a prompt and tool loadout for the next request. Sets the executable tools and
498
+ * returns a system message patching the prompt sections the model currently has (replayed
499
+ * from `messages`), or undefined when the prompt is unchanged. Tool changes are declared by
500
+ * the agent loop before the request.
501
+ *
502
+ * A forced prompt does not affect the transcript: the structured sections are still diffed
503
+ * and persisted, and the forced text is projected onto the request by
504
+ * {@link _installAgentForcedPromptProjection}.
505
+ */
506
+ private _preparePromptAndToolLoadout;
507
+ /**
508
+ * Send a forced prompt as the provider's leading system prompt without recording it.
509
+ *
510
+ * A `before_agent_start` handler that returns `systemPrompt` needs that exact text at the
511
+ * head of the request; a mid-conversation system message would leave the original prompt
512
+ * in place. The forced text is a rendering of the current prompt, so the transcript keeps
513
+ * its structured sections and the request is projected instead: the system messages
514
+ * collapse into one head holding the forced text and the current tools. Runs after the
515
+ * `context` extension handlers.
516
+ */
517
+ /**
518
+ * Remove the declarations that `prepareLoadout` hooks hide from every request. The whole
519
+ * transcript is filtered with the current set, so the projected declarations stay consistent
520
+ * across requests and only change when the loadout does.
521
+ */
522
+ private _installHiddenDeclarationsProjection;
523
+ private _installAgentForcedPromptProjection;
524
+ /**
525
+ * Restore the active tool loadout declared by the session transcript, if it declares one.
526
+ * Tools reachable only from other tools are never declared, but they do not depend on the active
527
+ * set, so the transcript's declarations are the whole loadout.
528
+ * @param modifiers `+name`/`-name` entries applied to the restored loadout.
529
+ */
530
+ private _restoreToolsFromTranscript;
531
+ /**
532
+ * Start a run from a user or custom message. The session counts as busy from here on, so
533
+ * messages sent while before_agent_start handlers run are queued into this run instead of
534
+ * starting another, and an abort requested meanwhile aborts the run as soon as it exists.
535
+ * @param onStarted Called once the run's messages are prepared, before the first request.
536
+ */
537
+ private _startRun;
538
+ /**
539
+ * Prepare a run and return its starting messages: compact first when needed, emit
540
+ * before_agent_start, apply the run's prompt options and tool loadout, and build the starting
541
+ * message followed by pending nextTurn messages (consumed here) and handler messages, with a
542
+ * system patch first when the prompt changed.
543
+ */
544
+ private _prepareRun;
545
+ private _handlePostAgentRun;
546
+ private _runBeforeSettleBoundary;
547
+ private _runInputHandlers;
548
+ private _normalizePromptImages;
549
+ /**
550
+ * Send a prompt to the agent.
551
+ * - Handles extension commands (registered via pi.registerCommand) immediately, even during streaming
552
+ * - Expands file-based prompt templates by default
553
+ * - During streaming, queues via steer() or followUp() based on streamingBehavior option
554
+ * - Validates model and API key before sending (when not streaming)
555
+ * @throws Error if streaming and no streamingBehavior specified
556
+ * @throws Error if no model selected or no API key available (when not streaming)
557
+ */
558
+ prompt(text: string, options?: PromptOptions): Promise<void>;
559
+ /**
560
+ * Try to execute an extension command. Returns true if command was found and executed.
561
+ */
562
+ private _tryExecuteExtensionCommand;
563
+ /**
564
+ * Expand skill commands (/skill:name args) to their full content.
565
+ * Returns the expanded text, or the original text if not a skill command or skill not found.
566
+ * Emits errors via extension runner if file read fails.
567
+ */
568
+ private _expandSkillCommand;
569
+ private _queueUserInput;
570
+ /**
571
+ * Queue a steering message while the agent is running.
572
+ * Delivered after the current assistant turn finishes executing its tool calls,
573
+ * before the next LLM call.
574
+ * Expands skill commands and prompt templates. Errors on extension commands.
575
+ * @param images Optional image attachments to include with the message
576
+ * @param options Input source; defaults to interactive
577
+ * @throws Error if text is an extension command
578
+ */
579
+ steer(text: string, images?: ImageContent[], options?: {
580
+ source?: InputSource;
581
+ }): Promise<QueuedInputDisposition>;
582
+ /**
583
+ * Queue a follow-up message to be processed after the agent finishes.
584
+ * Delivered only when agent has no more tool calls or steering messages.
585
+ * Expands skill commands and prompt templates. Errors on extension commands.
586
+ * @param images Optional image attachments to include with the message
587
+ * @param options Input source; defaults to interactive
588
+ * @throws Error if text is an extension command
589
+ */
590
+ followUp(text: string, images?: ImageContent[], options?: {
591
+ source?: InputSource;
592
+ }): Promise<QueuedInputDisposition>;
593
+ /**
594
+ * Internal: Queue a steering message (already expanded, no extension command check).
595
+ */
596
+ private _queueSteer;
597
+ /**
598
+ * Internal: Queue a follow-up message (already expanded, no extension command check).
599
+ */
600
+ private _queueFollowUp;
601
+ /**
602
+ * Throw an error if the text is an extension command.
603
+ */
604
+ private _throwIfExtensionCommand;
605
+ /**
606
+ * Send a custom message to the session. Creates a CustomMessageEntry.
607
+ *
608
+ * Handles four cases:
609
+ * - Streaming: queues message, processed when loop pulls from queue
610
+ * - Streaming + triggerTurn false: appended to state/session once the current turn ends
611
+ * - Not streaming + triggerTurn: appends to state/session, starts new turn
612
+ * - Not streaming + no trigger: appends to state/session, no turn
613
+ *
614
+ * @param message Custom message with customType, content, display, details
615
+ * @param options.triggerTurn If true and not streaming, triggers a new LLM turn
616
+ * @param options.deliverAs Delivery mode: "steer", "followUp", or "nextTurn"
617
+ */
618
+ sendCustomMessage<T = unknown>(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details">, options?: {
619
+ triggerTurn?: boolean;
620
+ deliverAs?: "steer" | "followUp" | "nextTurn";
621
+ }): Promise<void>;
622
+ private _appendCustomMessage;
623
+ /**
624
+ * Append custom messages queued while the agent was running.
625
+ * Called once the current turn's tool results are in agent state and session history.
626
+ */
627
+ private _flushPendingCustomMessages;
628
+ /**
629
+ * Send a user message to the agent. Always triggers a turn.
630
+ * When the agent is streaming, use deliverAs to specify how to queue the message.
631
+ *
632
+ * @param content User message content (string or content array)
633
+ * @param options.deliverAs Delivery mode when streaming: "steer" or "followUp"
634
+ * @param options.expandPromptTemplates Whether to dispatch extension commands and expand skill commands and prompt templates. Default: false.
635
+ */
636
+ sendUserMessage(content: string | (TextContent | ImageContent)[], options?: {
637
+ deliverAs?: "steer" | "followUp";
638
+ expandPromptTemplates?: boolean;
639
+ }): Promise<void>;
640
+ /**
641
+ * Clear all queued messages and return them.
642
+ * Useful for restoring to editor when user aborts.
643
+ * @returns Object with steering and followUp arrays
644
+ */
645
+ clearQueue(): {
646
+ steering: string[];
647
+ followUp: string[];
648
+ };
649
+ /** Number of pending messages (includes both steering and follow-up) */
650
+ get pendingMessageCount(): number;
651
+ /** Get pending steering messages (read-only) */
652
+ getSteeringMessages(): readonly string[];
653
+ /** Get pending follow-up messages (read-only) */
654
+ getFollowUpMessages(): readonly string[];
655
+ get resourceLoader(): ResourceLoader;
656
+ /**
657
+ * Abort current operation and wait for agent to become idle.
658
+ */
659
+ abort(): Promise<void>;
660
+ waitForIdle(): Promise<void>;
661
+ private _emitModelSelect;
662
+ /**
663
+ * Set model directly.
664
+ * Validates that auth is configured and saves to the session transcript.
665
+ * Persists to global defaults only when options.persist is true.
666
+ * @throws Error if no auth is configured for the model
667
+ */
668
+ setModel(model: Model<any>, options?: ModelMutationOptions): Promise<void>;
669
+ private _addPersistedDefaultToNonEmptyScope;
670
+ /**
671
+ * Cycle to next/previous model.
672
+ * Uses scoped models (from --models flag) if available, otherwise all available models.
673
+ * @param direction - "forward" (default) or "backward"
674
+ * @returns The new model info, or undefined if only one model available
675
+ */
676
+ cycleModel(direction?: "forward" | "backward", options?: ModelMutationOptions): Promise<ModelCycleResult | undefined>;
677
+ private _cycleScopedModel;
678
+ private _cycleAvailableModel;
679
+ /**
680
+ * Set thinking level.
681
+ * Clamps to model capabilities based on available thinking levels.
682
+ * Saves the clamped level to the session transcript only if the level actually changes.
683
+ * Persists the requested level to global defaults only when options.persist is true.
684
+ */
685
+ setThinkingLevel(level: ThinkingLevel, options?: ModelMutationOptions): void;
686
+ /**
687
+ * Cycle to next thinking level.
688
+ * @returns New level, or undefined if model doesn't support thinking
689
+ */
690
+ cycleThinkingLevel(options?: ModelMutationOptions): ThinkingLevel | undefined;
691
+ /**
692
+ * Get available thinking levels for current model.
693
+ * The provider will clamp to what the specific model supports internally.
694
+ */
695
+ getAvailableThinkingLevels(): ThinkingLevel[];
696
+ /**
697
+ * Check if current model supports thinking/reasoning.
698
+ */
699
+ supportsThinking(): boolean;
700
+ private _getThinkingLevelForModelSwitch;
701
+ private _clampThinkingLevel;
702
+ private syncQueueModesFromSettings;
703
+ /**
704
+ * Set steering message mode.
705
+ * Saves to settings.
706
+ */
707
+ setSteeringMode(mode: "all" | "one-at-a-time"): void;
708
+ /**
709
+ * Set follow-up message mode.
710
+ * Saves to settings.
711
+ */
712
+ setFollowUpMode(mode: "all" | "one-at-a-time"): void;
713
+ /** Generate Pi's built-in compaction summary for manual and automatic compaction. */
714
+ private _runDefaultCompaction;
715
+ private _clearManualCompactionState;
716
+ /**
717
+ * Manually compact the session context.
718
+ *
719
+ * This is the manual entry point used by `/compact`, RPC, and extensions. It is
720
+ * separate from automatic threshold/overflow compaction, which enters through
721
+ * `_checkCompaction()` and `_runAutoCompaction()`. After preparation and the
722
+ * `session_before_compact` hook, both paths call the lower-level `compact()`
723
+ * function imported from `./compaction/index.ts`, unless the hook cancels or
724
+ * supplies a custom result.
725
+ *
726
+ * Aborts the current agent operation first. Manual compaction never retries or
727
+ * continues the interrupted agent turn.
728
+ *
729
+ * @param customInstructions Optional instructions for the compaction summary
730
+ */
731
+ compact(customInstructions?: string): Promise<CompactionResult>;
732
+ /**
733
+ * Cancel in-progress compaction (manual or auto).
734
+ */
735
+ abortCompaction(): void;
736
+ /**
737
+ * Cancel in-progress branch summarization.
738
+ */
739
+ abortBranchSummary(): void;
740
+ /**
741
+ * Dispatch automatic compaction after `agent_end` or before prompt submission.
742
+ * Manual compaction does not call this method; it enters through `compact()`.
743
+ *
744
+ * Automatic cases:
745
+ * 1. Overflow with retry: a context-overflow error or recoverable length stop;
746
+ * remove the failed assistant message, compact, and retry the turn once.
747
+ * 2. Overflow without retry: a successful response exceeded the configured
748
+ * context window; compact but preserve the completed response.
749
+ * 3. Threshold without retry: valid or estimated context usage crossed the
750
+ * configured threshold; compact without retrying the completed response.
751
+ *
752
+ * Each case calls `_runAutoCompaction()`. After preparation and the
753
+ * `session_before_compact` hook, that method calls the lower-level `compact()`
754
+ * function imported from `./compaction/index.ts`, unless the hook cancels or
755
+ * supplies a custom result.
756
+ *
757
+ * @param assistantMessage The assistant message to check
758
+ * @param skipAbortedCheck If false, include aborted messages (for pre-prompt check). Default: true
759
+ * @returns Whether the post-run loop should call `agent.continue()` for overflow recovery or queued messages
760
+ */
761
+ private _checkCompaction;
762
+ /**
763
+ * Execute threshold or overflow compaction. Manual compaction uses
764
+ * `AgentSession.compact()` instead. Both paths call the lower-level `compact()`
765
+ * function imported from `./compaction/index.ts` after preparation and extension
766
+ * interception.
767
+ *
768
+ * @param reason Automatic trigger selected by `_checkCompaction()`
769
+ * @param willRetry Whether to continue the interrupted turn after overflow compaction
770
+ * @returns Whether the post-run loop should call `agent.continue()`
771
+ */
772
+ private _runAutoCompaction;
773
+ /**
774
+ * Toggle auto-compaction setting.
775
+ */
776
+ setAutoCompactionEnabled(enabled: boolean): void;
777
+ /** Whether auto-compaction is enabled */
778
+ get autoCompactionEnabled(): boolean;
779
+ bindExtensions(bindings: ExtensionBindings): Promise<void>;
780
+ private extendResourcesFromExtensions;
781
+ private buildExtensionResourcePaths;
782
+ private getExtensionSourceLabel;
783
+ private _applyExtensionBindings;
784
+ private _refreshCurrentModelFromRegistry;
785
+ private _bindExtensionCore;
786
+ private _refreshToolRegistry;
787
+ /** Whether activating the tool declares it to the model. */
788
+ private _isDeclarable;
789
+ /** Whether registering the tool activates it, which declares it to the model. */
790
+ private _isActivatedOnRegistration;
791
+ private _buildRuntime;
792
+ reload(options?: {
793
+ beforeSessionStart?: () => void | Promise<void>;
794
+ }): Promise<void>;
795
+ /**
796
+ * Check if an error is retryable (overloaded, rate limit, server errors).
797
+ * Context overflow errors are NOT retryable (handled by compaction instead).
798
+ */
799
+ private _isRetryableError;
800
+ /**
801
+ * Retry policy + callbacks shared by compaction and branch-summary summarization calls.
802
+ * Uses the same `settings.retry` budget/backoff as agent-turn retries so a single transient
803
+ * stream drop no longer fails the whole operation. `source` carries the context
804
+ * the TUI needs to render the retry and recreate the underlying indicator.
805
+ */
806
+ private _summarizationRetryCallbacks;
807
+ private _finishCancelledRetry;
808
+ /**
809
+ * Prepare a retryable error for continuation with exponential backoff.
810
+ * @returns true if the caller should continue the agent, false otherwise
811
+ */
812
+ private _prepareRetry;
813
+ /**
814
+ * Cancel in-progress retry.
815
+ */
816
+ abortRetry(): void;
817
+ /** Whether auto-retry is currently in progress */
818
+ get isRetrying(): boolean;
819
+ /** Whether auto-retry is enabled */
820
+ get autoRetryEnabled(): boolean;
821
+ /**
822
+ * Toggle auto-retry setting.
823
+ */
824
+ setAutoRetryEnabled(enabled: boolean): void;
825
+ /**
826
+ * Execute a bash command.
827
+ * Adds result to agent context and session.
828
+ * @param command The bash command to execute
829
+ * @param onChunk Optional streaming callback for output
830
+ * @param options.excludeFromContext If true, command output won't be sent to LLM (!! prefix)
831
+ * @param options.id Optional identifier included in bash execution update events
832
+ * @param options.operations Custom BashOperations for remote execution
833
+ */
834
+ executeBash(command: string, onChunk?: (chunk: string) => void, options?: {
835
+ excludeFromContext?: boolean;
836
+ id?: string;
837
+ operations?: BashOperations;
838
+ }): Promise<BashResult>;
839
+ /**
840
+ * Record a bash execution result in session history.
841
+ * Used by executeBash and by extensions that handle bash execution themselves.
842
+ */
843
+ recordBashResult(command: string, result: BashResult, options?: {
844
+ excludeFromContext?: boolean;
845
+ }): void;
846
+ /**
847
+ * Cancel running bash command.
848
+ */
849
+ abortBash(): void;
850
+ /** Whether a bash command is currently running */
851
+ get isBashRunning(): boolean;
852
+ /** Whether there are pending bash messages waiting to be flushed */
853
+ get hasPendingBashMessages(): boolean;
854
+ /**
855
+ * Flush pending bash messages to agent state and session.
856
+ * Called after agent turn completes to maintain proper message ordering.
857
+ */
858
+ private _flushPendingBashMessages;
859
+ /**
860
+ * Set a display name for the current session.
861
+ */
862
+ setSessionName(name: string): void;
863
+ /**
864
+ * Navigate to a different node in the session tree.
865
+ * Unlike fork() which creates a new session file, this stays in the same file.
866
+ *
867
+ * @param targetId The entry ID to navigate to
868
+ * @param options.summarize Whether user wants to summarize abandoned branch
869
+ * @param options.customInstructions Custom instructions for summarizer
870
+ * @param options.replaceInstructions If true, customInstructions replaces the default prompt
871
+ * @param options.label Label to attach to the branch summary entry
872
+ * @returns Result with editorText (if user message) and cancelled status
873
+ */
874
+ navigateTree(targetId: string, options?: {
875
+ summarize?: boolean;
876
+ customInstructions?: string;
877
+ replaceInstructions?: boolean;
878
+ label?: string;
879
+ }): Promise<{
880
+ editorText?: string;
881
+ cancelled: boolean;
882
+ aborted?: boolean;
883
+ summaryEntry?: BranchSummaryEntry;
884
+ }>;
885
+ /**
886
+ * Get all user messages from session for fork selector.
887
+ */
888
+ getUserMessagesForForking(): Array<{
889
+ entryId: string;
890
+ text: string;
891
+ }>;
892
+ /**
893
+ * Get session statistics. Aggregates over ALL session entries (including
894
+ * history that was compacted away), so token/cost totals reflect what was
895
+ * actually billed across the session.
896
+ */
897
+ getSessionStats(): SessionStats;
898
+ getContextUsage(): ContextUsage | undefined;
899
+ /**
900
+ * Export session to HTML.
901
+ * @param outputPath Optional output path (defaults to session directory)
902
+ * @param options Optional export presentation settings
903
+ * @returns Path to exported file
904
+ */
905
+ exportToHtml(outputPath?: string, options?: {
906
+ themeName?: string;
907
+ }): Promise<string>;
908
+ /**
909
+ * Export the current session branch to a JSONL file.
910
+ * Writes the session header followed by all entries on the current branch path.
911
+ * @param outputPath Target file path. If omitted, generates a timestamped file in cwd.
912
+ * @returns The resolved output file path.
913
+ */
914
+ exportToJsonl(outputPath?: string): string;
915
+ /**
916
+ * Ask the current model to describe what went wrong in this session for a bug report.
917
+ * Used when the user declines to share the transcript itself.
918
+ */
919
+ summarizeForBugReport(options: {
920
+ hint?: string;
921
+ signal: AbortSignal;
922
+ }): Promise<string>;
923
+ /**
924
+ * Get text content of last assistant message.
925
+ * Useful for /copy command.
926
+ * @returns Text content, or undefined if no assistant message exists
927
+ */
928
+ getLastAssistantText(): string | undefined;
929
+ createReplacedSessionContext(): ReplacedSessionContext;
930
+ /**
931
+ * Check if extensions have handlers for a specific event type.
932
+ */
933
+ hasExtensionHandlers(eventType: string): boolean;
934
+ /**
935
+ * Get the extension runner (for setting UI context and error handlers).
936
+ */
937
+ get extensionRunner(): ExtensionRunner;
938
+ }
939
+ export {};
940
+ //# sourceMappingURL=agent-session.d.ts.map