dal-code 1.0.50 → 1.0.51

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 (591) hide show
  1. package/CHANGELOG.md +1039 -5
  2. package/dist/bundle/chunks/anthropic-messages-2P3UGLIO.js +5 -0
  3. package/dist/bundle/chunks/anthropic.js +74 -0
  4. package/dist/bundle/chunks/azure-openai-responses-S4GNH2XC.js +1 -0
  5. package/dist/bundle/chunks/bedrock-converse-stream.js +88 -0
  6. package/dist/bundle/chunks/chunk-2KOJ4RNS.js +43 -0
  7. package/dist/bundle/chunks/chunk-3YGHTGYM.js +7 -0
  8. package/dist/bundle/chunks/chunk-4LDEEFCY.js +1 -0
  9. package/dist/bundle/chunks/chunk-4UTLMBZZ.js +13 -0
  10. package/dist/bundle/chunks/chunk-567OJLS7.js +1 -0
  11. package/dist/bundle/chunks/chunk-5AGIVGSV.js +5 -0
  12. package/dist/bundle/chunks/chunk-6QGV3IWD.js +5 -0
  13. package/dist/bundle/chunks/chunk-723ZGEZ2.js +1 -0
  14. package/dist/bundle/chunks/chunk-7DDKXS2Q.js +1 -0
  15. package/dist/bundle/chunks/chunk-7ZC4UXSL.js +1 -0
  16. package/dist/bundle/chunks/chunk-AL7NZVPP.js +1 -0
  17. package/dist/bundle/chunks/chunk-ATQJO2OE.js +3 -0
  18. package/dist/bundle/chunks/chunk-B7NRFMLU.js +8 -0
  19. package/dist/bundle/chunks/chunk-BEDAM2M7.js +81 -0
  20. package/dist/bundle/chunks/chunk-CF5GWZHW.js +30 -0
  21. package/dist/bundle/chunks/chunk-CFPQOC7P.js +1 -0
  22. package/dist/bundle/chunks/chunk-D2WTLI2T.js +19 -0
  23. package/dist/bundle/chunks/chunk-EH7SFF47.js +129 -0
  24. package/dist/bundle/chunks/chunk-FCKLBLA4.js +1 -0
  25. package/dist/bundle/chunks/chunk-FFMDRXC4.js +9 -0
  26. package/dist/bundle/chunks/chunk-GSGE3ULF.js +15 -0
  27. package/dist/bundle/chunks/chunk-H5FHS6BV.js +1 -0
  28. package/dist/bundle/chunks/chunk-HXK5EFBE.js +1172 -0
  29. package/dist/bundle/chunks/chunk-IEBK4HQA.js +1 -0
  30. package/dist/bundle/chunks/chunk-JE6UXK35.js +30 -0
  31. package/dist/bundle/chunks/chunk-JXWJOIH4.js +1 -0
  32. package/dist/bundle/chunks/chunk-K7VBBYTT.js +1 -0
  33. package/dist/bundle/chunks/chunk-L2ZPNLYD.js +1 -0
  34. package/dist/bundle/chunks/chunk-LVVZS2NO.js +11 -0
  35. package/dist/bundle/chunks/chunk-ML5DIOWR.js +1 -0
  36. package/dist/bundle/chunks/chunk-NUIR7PPD.js +25 -0
  37. package/dist/bundle/chunks/chunk-P7FPUEYA.js +1 -0
  38. package/dist/bundle/chunks/chunk-PGXDEOVV.js +1 -0
  39. package/dist/bundle/chunks/chunk-PJACZCIR.js +1 -0
  40. package/dist/bundle/chunks/chunk-PRRNXB7S.js +1 -0
  41. package/dist/bundle/chunks/chunk-PWZRJWNP.js +17 -0
  42. package/dist/bundle/chunks/chunk-R44HF4S5.js +9 -0
  43. package/dist/bundle/chunks/chunk-R47JBGS3.js +1 -0
  44. package/dist/bundle/chunks/chunk-RCVVRHMF.js +9 -0
  45. package/dist/bundle/chunks/chunk-RDZVAGPR.js +1 -0
  46. package/dist/bundle/chunks/chunk-RR3ZP63P.js +56 -0
  47. package/dist/bundle/chunks/chunk-SE42OS3U.js +21 -0
  48. package/dist/bundle/chunks/chunk-TMTOQ7H7.js +1 -0
  49. package/dist/bundle/chunks/chunk-UTB4DTYQ.js +1 -0
  50. package/dist/bundle/chunks/chunk-VNHNHA4V.js +1 -0
  51. package/dist/bundle/chunks/chunk-XJFQKN3N.js +2 -0
  52. package/dist/bundle/chunks/chunk-ZG74NES2.js +1 -0
  53. package/dist/bundle/chunks/cli-FWMQKBFA.js +30 -0
  54. package/dist/bundle/chunks/cli-ZEDY5U67.js +52 -0
  55. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-E6TEENDO.js +1 -0
  56. package/dist/bundle/chunks/codemode-worker.js +480 -0
  57. package/dist/bundle/chunks/dist-D3WIBXB5.js +10 -0
  58. package/dist/bundle/chunks/easter-egg-3d-5TFBCTIS.js +1 -0
  59. package/dist/bundle/chunks/execute-62LDYHXA.js +506 -0
  60. package/dist/bundle/chunks/github-copilot.js +1 -0
  61. package/dist/bundle/chunks/google-generative-ai-V5DLXTF7.js +1 -0
  62. package/dist/bundle/chunks/google-vertex-K3KYGGLI.js +1 -0
  63. package/dist/bundle/chunks/http-proxy-KF35JLJN.js +1 -0
  64. package/dist/bundle/chunks/https-proxy-agent-LVOO5TPL.js +12 -0
  65. package/dist/bundle/chunks/image-resize-worker.js +1 -0
  66. package/dist/bundle/chunks/jiti-loader-GL4HJFAD.js +20 -0
  67. package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +1 -0
  68. package/dist/bundle/chunks/kimi-coding.js +1 -0
  69. package/dist/bundle/chunks/lib-4AVRLBHM.js +8 -0
  70. package/dist/bundle/chunks/llama-cpp-classify-JCTIEHTL.js +21 -0
  71. package/dist/bundle/chunks/mcp-VF7EY5WC.js +10 -0
  72. package/dist/bundle/chunks/meta.js +1 -0
  73. package/dist/bundle/chunks/mistral-conversations-LVBXTF6R.js +4 -0
  74. package/dist/bundle/chunks/multipart-parser-FMGQ7342.js +2 -0
  75. package/dist/bundle/chunks/node-AUOGOBCN.js +1 -0
  76. package/dist/bundle/chunks/node-ZTHARAQV.js +15 -0
  77. package/dist/bundle/chunks/office-PONBADQP.js +419 -0
  78. package/dist/bundle/chunks/openai-chatgpt.js +74 -0
  79. package/dist/bundle/chunks/openai-codex-responses-WBZKNYLX.js +9 -0
  80. package/dist/bundle/chunks/openai-codex.js +74 -0
  81. package/dist/bundle/chunks/openai-completions-HMHQRGX4.js +6 -0
  82. package/dist/bundle/chunks/openai-decisions-R7OFRKLL.js +4 -0
  83. package/dist/bundle/chunks/openai-responses-BHXRQFCI.js +3 -0
  84. package/dist/bundle/chunks/openrouter-images-BIMNIXQZ.js +1 -0
  85. package/dist/bundle/chunks/openrouter.js +74 -0
  86. package/dist/bundle/chunks/pi-messages-X5YTLXQJ.js +7 -0
  87. package/dist/bundle/chunks/radius.js +74 -0
  88. package/dist/bundle/chunks/review-WCGIBVLM.js +80 -0
  89. package/dist/bundle/chunks/rewind-2OYLDDHH.js +8 -0
  90. package/dist/bundle/chunks/router-7E5LU7US.js +3 -0
  91. package/dist/bundle/chunks/runtime-5PTUOEM2.js +1 -0
  92. package/dist/bundle/chunks/sdk-ZUFIGPSS.js +1 -0
  93. package/dist/bundle/chunks/src-QKGKDFSU.js +3 -0
  94. package/dist/bundle/chunks/sync-LOX6TIM6.js +4 -0
  95. package/dist/bundle/chunks/typesafe-system-one-KOIOG3HP.js +1 -0
  96. package/dist/bundle/chunks/usage-2EVEFGNI.js +1 -0
  97. package/dist/bundle/chunks/virtual-modules-MYMONT3Y.js +1 -0
  98. package/dist/bundle/chunks/xai.js +1 -0
  99. package/dist/bundle/cli-runtime.js +2 -0
  100. package/dist/bundle/cli.js +2 -0
  101. package/dist/bundle/index.js +1 -0
  102. package/dist/bundle/rpc-entry.js +2 -0
  103. package/dist/cli/args.js +1 -1
  104. package/dist/cli/auth-command.js +9 -6
  105. package/dist/cli/auth-login.js +2 -0
  106. package/dist/cli/auth-logout.js +1 -0
  107. package/dist/cli/auth-terminal.js +5 -0
  108. package/dist/cli/config-selector.js +1 -1
  109. package/dist/config.d.ts +5 -0
  110. package/dist/config.js +1 -1
  111. package/dist/core/agent-session-runtime.js +1 -1
  112. package/dist/core/agent-session-services.js +1 -1
  113. package/dist/core/agent-session.d.ts +8 -1
  114. package/dist/core/agent-session.js +12 -9
  115. package/dist/core/auth-storage.js +1 -1
  116. package/dist/core/bash-executor.js +1 -1
  117. package/dist/core/bug-report.js +3 -3
  118. package/dist/core/cache-warmer.d.ts +3 -15
  119. package/dist/core/cache-warmer.js +1 -1
  120. package/dist/core/compaction/branch-summarization.d.ts +3 -2
  121. package/dist/core/compaction/branch-summarization.js +5 -5
  122. package/dist/core/compaction/compaction.d.ts +1 -0
  123. package/dist/core/compaction/compaction.js +14 -14
  124. package/dist/core/compaction/tool-output-pruning.js +1 -1
  125. package/dist/core/compaction/utils.d.ts +0 -1
  126. package/dist/core/compaction/utils.js +8 -8
  127. package/dist/core/exec.d.ts +2 -0
  128. package/dist/core/exec.js +1 -1
  129. package/dist/core/export-html/template.css +9 -0
  130. package/dist/core/export-html/template.js +46 -39
  131. package/dist/core/export-html/tool-renderer.js +1 -1
  132. package/dist/core/extensions/index.d.ts +1 -1
  133. package/dist/core/extensions/loader.js +1 -1
  134. package/dist/core/extensions/pi-ai-extension-view.js +1 -0
  135. package/dist/core/extensions/runner.js +1 -1
  136. package/dist/core/extensions/types.d.ts +25 -7
  137. package/dist/core/extensions/virtual-modules.js +1 -1
  138. package/dist/core/keybindings.d.ts +1 -1
  139. package/dist/core/keybindings.js +1 -1
  140. package/dist/core/mcp-servers.d.ts +6 -17
  141. package/dist/core/mcp-servers.js +1 -1
  142. package/dist/core/model-config.d.ts +1912 -2211
  143. package/dist/core/model-config.js +4 -4
  144. package/dist/core/model-resolver.js +1 -1
  145. package/dist/core/model-runtime.d.ts +1 -0
  146. package/dist/core/model-runtime.js +1 -1
  147. package/dist/core/package-manager.d.ts +10 -1
  148. package/dist/core/package-manager.js +2 -2
  149. package/dist/core/pi-ai-schemas.js +1 -0
  150. package/dist/core/pi-manifest.js +1 -1
  151. package/dist/core/preferred-providers.js +1 -0
  152. package/dist/core/project-trust.js +2 -2
  153. package/dist/core/prompt-templates.js +2 -2
  154. package/dist/core/provider-composer.js +1 -1
  155. package/dist/core/provider-matching.js +1 -0
  156. package/dist/core/radius-mcp.js +1 -0
  157. package/dist/core/remote-catalog-provider.js +1 -1
  158. package/dist/core/resource-loader.d.ts +3 -1
  159. package/dist/core/resource-loader.js +1 -1
  160. package/dist/core/runtime-credentials.js +1 -1
  161. package/dist/core/sdk.js +1 -1
  162. package/dist/core/session-cwd.js +3 -7
  163. package/dist/core/session-manager.d.ts +1 -0
  164. package/dist/core/session-manager.js +12 -12
  165. package/dist/core/settings-defaults.js +1 -1
  166. package/dist/core/settings-manager.d.ts +4 -0
  167. package/dist/core/settings-manager.js +1 -1
  168. package/dist/core/settings-schema.d.ts +4 -2
  169. package/dist/core/settings-schema.js +1 -1
  170. package/dist/core/skills.js +3 -3
  171. package/dist/core/slash-commands.js +1 -1
  172. package/dist/core/source-info.d.ts +8 -0
  173. package/dist/core/source-info.js +1 -1
  174. package/dist/core/system-prompt.js +3 -3
  175. package/dist/core/tools/bash.d.ts +2 -2
  176. package/dist/core/tools/bash.js +15 -15
  177. package/dist/core/tools/edit-diff.d.ts +9 -4
  178. package/dist/core/tools/edit-diff.js +22 -15
  179. package/dist/core/tools/edit.d.ts +3 -3
  180. package/dist/core/tools/edit.js +3 -3
  181. package/dist/core/tools/find.d.ts +2 -2
  182. package/dist/core/tools/find.js +10 -11
  183. package/dist/core/tools/grep.d.ts +3 -3
  184. package/dist/core/tools/grep.js +8 -12
  185. package/dist/core/tools/ls.d.ts +2 -2
  186. package/dist/core/tools/ls.js +4 -4
  187. package/dist/core/tools/powershell.js +6 -2
  188. package/dist/core/tools/read.d.ts +5 -2
  189. package/dist/core/tools/read.js +20 -19
  190. package/dist/core/tools/render-utils.js +5 -5
  191. package/dist/core/tools/renderers/write.js +10 -10
  192. package/dist/core/tools/tool-definition-wrapper.d.ts +11 -0
  193. package/dist/core/tools/truncate.d.ts +2 -8
  194. package/dist/core/tools/truncate.js +10 -10
  195. package/dist/core/tools/write.d.ts +2 -2
  196. package/dist/core/trust-manager.js +2 -2
  197. package/dist/core/usage-totals.js +1 -1
  198. package/dist/extensions/codemode/execute.js +12 -12
  199. package/dist/extensions/codemode/renderer.js +6 -6
  200. package/dist/extensions/codemode/tool.d.ts +2 -1
  201. package/dist/extensions/codemode/tool.js +11 -10
  202. package/dist/extensions/llama/client.js +5 -5
  203. package/dist/extensions/llama/ui.js +2 -2
  204. package/dist/extensions/mcp/cli.js +21 -19
  205. package/dist/extensions/mcp/config.js +2 -2
  206. package/dist/extensions/mcp/index.js +7 -7
  207. package/dist/extensions/mcp/oauth.d.ts +3 -22
  208. package/dist/extensions/mcp/oauth.js +2 -2
  209. package/dist/extensions/mcp/resources.d.ts +1 -1
  210. package/dist/extensions/mcp/resources.js +1 -1
  211. package/dist/extensions/mcp/runtime.d.ts +2 -2
  212. package/dist/extensions/mcp/runtime.js +3 -3
  213. package/dist/extensions/mcp/tools.d.ts +1 -8
  214. package/dist/extensions/mcp/tools.js +4 -9
  215. package/dist/extensions/mcp/ui.js +1 -1
  216. package/dist/extensions/tool-search/tool.js +4 -4
  217. package/dist/index.d.ts +2 -2
  218. package/dist/main.js +4 -4
  219. package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
  220. package/dist/modes/interactive/components/assistant-message.js +2 -2
  221. package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
  222. package/dist/modes/interactive/components/branch-summary-message.js +2 -2
  223. package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
  224. package/dist/modes/interactive/components/compaction-summary-message.js +2 -2
  225. package/dist/modes/interactive/components/config-selector.js +1 -1
  226. package/dist/modes/interactive/components/custom-editor.js +1 -1
  227. package/dist/modes/interactive/components/custom-entry.js +1 -1
  228. package/dist/modes/interactive/components/custom-message.d.ts +5 -2
  229. package/dist/modes/interactive/components/custom-message.js +3 -3
  230. package/dist/modes/interactive/components/diff.js +3 -3
  231. package/dist/modes/interactive/components/extension-editor.d.ts +1 -0
  232. package/dist/modes/interactive/components/extension-editor.js +1 -1
  233. package/dist/modes/interactive/components/extension-selector.js +2 -2
  234. package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
  235. package/dist/modes/interactive/components/login-dialog.js +1 -1
  236. package/dist/modes/interactive/components/markdown-transform.js +1 -1
  237. package/dist/modes/interactive/components/mermaid.js +4 -4
  238. package/dist/modes/interactive/components/model-selector.d.ts +1 -0
  239. package/dist/modes/interactive/components/model-selector.js +2 -2
  240. package/dist/modes/interactive/components/oauth-selector.d.ts +2 -1
  241. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  242. package/dist/modes/interactive/components/provider-brand.js +1 -0
  243. package/dist/modes/interactive/components/radius-login-selector.js +1 -1
  244. package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
  245. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  246. package/dist/modes/interactive/components/session-selector-search.js +1 -1
  247. package/dist/modes/interactive/components/session-selector.d.ts +2 -1
  248. package/dist/modes/interactive/components/session-selector.js +2 -2
  249. package/dist/modes/interactive/components/settings-submenu.js +1 -1
  250. package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
  251. package/dist/modes/interactive/components/skill-invocation-message.js +2 -2
  252. package/dist/modes/interactive/components/tool-execution.d.ts +1 -0
  253. package/dist/modes/interactive/components/tool-execution.js +3 -3
  254. package/dist/modes/interactive/components/tree-selector.d.ts +2 -0
  255. package/dist/modes/interactive/components/tree-selector.js +1 -1
  256. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
  257. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  258. package/dist/modes/interactive/components/user-message.d.ts +2 -1
  259. package/dist/modes/interactive/components/user-message.js +1 -1
  260. package/dist/modes/interactive/external-editor.js +3 -3
  261. package/dist/modes/interactive/interactive-mode.d.ts +10 -1
  262. package/dist/modes/interactive/interactive-mode.js +45 -40
  263. package/dist/modes/interactive/model-search.js +1 -1
  264. package/dist/modes/interactive/theme/theme.d.ts +4 -0
  265. package/dist/modes/interactive/theme/theme.js +3 -6
  266. package/dist/modes/print-mode.js +7 -7
  267. package/dist/modes/rpc/rpc-mode.js +1 -1
  268. package/dist/node_modules/@dalcode/dal-advisor/package.json +3 -3
  269. package/dist/node_modules/@dalcode/dal-awake/package.json +2 -2
  270. package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
  271. package/dist/node_modules/@dalcode/dal-capabilities/package.json +4 -4
  272. package/dist/node_modules/@dalcode/dal-codeindex/package.json +2 -2
  273. package/dist/node_modules/@dalcode/dal-compat/package.json +3 -3
  274. package/dist/node_modules/@dalcode/dal-dap/package.json +2 -2
  275. package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
  276. package/dist/node_modules/@dalcode/dal-goal/package.json +3 -3
  277. package/dist/node_modules/@dalcode/dal-guard/package.json +4 -4
  278. package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
  279. package/dist/node_modules/@dalcode/dal-interactive/package.json +2 -2
  280. package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
  281. package/dist/node_modules/@dalcode/dal-learn/package.json +3 -2
  282. package/dist/node_modules/@dalcode/dal-learn/src/index.js +16 -16
  283. package/dist/node_modules/@dalcode/dal-learn/src/lesson-events.js +1 -0
  284. package/dist/node_modules/@dalcode/dal-lsp/package.json +4 -4
  285. package/dist/node_modules/@dalcode/dal-mcp/package.json +6 -6
  286. package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
  287. package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +3 -2
  288. package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
  289. package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +4 -3
  290. package/dist/node_modules/@dalcode/dal-plugins/package.json +4 -4
  291. package/dist/node_modules/@dalcode/dal-recall/package.json +2 -2
  292. package/dist/node_modules/@dalcode/dal-remote/package.json +2 -2
  293. package/dist/node_modules/@dalcode/dal-review/package.json +3 -3
  294. package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
  295. package/dist/node_modules/@dalcode/dal-router/package.json +6 -6
  296. package/dist/node_modules/@dalcode/dal-rtk/package.json +2 -2
  297. package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
  298. package/dist/node_modules/@dalcode/dal-statusline/package.json +2 -2
  299. package/dist/node_modules/@dalcode/dal-structured/package.json +2 -2
  300. package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
  301. package/dist/node_modules/@dalcode/dal-sync/package.json +4 -4
  302. package/dist/node_modules/@dalcode/dal-telemetry/package.json +4 -4
  303. package/dist/node_modules/@dalcode/dal-terminal/package.json +2 -2
  304. package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
  305. package/dist/node_modules/@dalcode/dal-usage/package.json +2 -2
  306. package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
  307. package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
  308. package/dist/node_modules/@dalcode/dal-workflow/src/todo-snapshot.js +2 -2
  309. package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +3 -3
  310. package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
  311. package/dist/node_modules/@earendil-works/pi-agent-core/README.md +8 -6
  312. package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +1 -1
  313. package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -2
  314. package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +8 -5
  315. package/dist/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  316. package/dist/node_modules/@earendil-works/pi-ai/README.md +58 -39
  317. package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -5
  318. package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -1
  319. package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1
  320. package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts +1 -0
  321. package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js +1 -1
  322. package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +1 -1
  323. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -1
  324. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +2 -2
  325. package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -1
  326. package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +1 -1
  327. package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +1 -1
  328. package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -4
  329. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +1 -1
  330. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +2 -1
  331. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +5 -5
  332. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +9 -9
  333. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +3 -3
  334. package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -1
  335. package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +2 -0
  336. package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +3 -3
  337. package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -1
  338. package/dist/node_modules/@earendil-works/pi-ai/dist/api/strict-tool-limits.js +1 -0
  339. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -1
  340. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +1 -1
  341. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +1 -1
  342. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +1 -1
  343. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/trusted-url.js +1 -0
  344. package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +2 -0
  345. package/dist/node_modules/@earendil-works/pi-ai/dist/cache-warming.d.ts +21 -0
  346. package/dist/node_modules/@earendil-works/pi-ai/dist/cache-warming.js +1 -0
  347. package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +5 -5
  348. package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +2 -0
  349. package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
  350. package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -3
  351. package/dist/node_modules/@earendil-works/pi-ai/dist/index.js +1 -1
  352. package/dist/node_modules/@earendil-works/pi-ai/dist/lazy-bedrock-provider.js +1 -0
  353. package/dist/node_modules/@earendil-works/pi-ai/dist/lazy-oauth.js +1 -0
  354. package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +1 -0
  355. package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +4 -0
  356. package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1 -1
  357. package/dist/node_modules/@earendil-works/pi-ai/dist/models.js +1 -1
  358. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.js +1 -1
  359. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +485 -498
  360. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +1 -1
  361. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  362. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  363. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  364. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -1
  365. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  366. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  367. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  368. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  369. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  370. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
  371. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
  372. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  373. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
  374. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
  375. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  376. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
  377. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
  378. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  379. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  380. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  381. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  382. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  383. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  384. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  385. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual-cn.json +1 -0
  386. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
  387. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  388. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  389. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  390. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  391. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
  392. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
  393. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
  394. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
  395. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
  396. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  397. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  398. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +5 -5
  399. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.js +1 -1
  400. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts +65 -65
  401. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +1 -1
  402. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +1 -1
  403. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.js +1 -0
  404. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.models.d.ts +5 -0
  405. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual-cn.models.js +1 -0
  406. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js +1 -1
  407. package/dist/node_modules/@earendil-works/pi-ai/dist/providers/schema-builders.js +1 -0
  408. package/dist/node_modules/@earendil-works/pi-ai/dist/telemetry.js +1 -1
  409. package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +4 -3
  410. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +1 -1
  411. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/openrouter-cost.js +1 -0
  412. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +1 -1
  413. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -1
  414. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.d.ts +26 -0
  415. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/streaming-json.js +4 -0
  416. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/{typebox-helpers.d.ts → string-enum.d.ts} +2 -2
  417. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/string-enum.js +1 -0
  418. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts +1 -0
  419. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.js +2 -2
  420. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +4 -4
  421. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.d.ts +1 -1
  422. package/dist/node_modules/@earendil-works/pi-ai/dist/utils/version.js +1 -1
  423. package/dist/node_modules/@earendil-works/pi-ai/package.json +12 -5
  424. package/dist/node_modules/@earendil-works/pi-codemode/README.md +2 -2
  425. package/dist/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +1 -0
  426. package/dist/node_modules/@earendil-works/pi-codemode/dist/declarations.js +4 -4
  427. package/dist/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +1 -1
  428. package/dist/node_modules/@earendil-works/pi-codemode/dist/index.js +1 -1
  429. package/dist/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +2 -0
  430. package/dist/node_modules/@earendil-works/pi-codemode/package.json +1 -1
  431. package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +1 -1
  432. package/dist/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +32 -0
  433. package/dist/node_modules/@earendil-works/pi-mcp/README.md +60 -5
  434. package/dist/node_modules/@earendil-works/pi-mcp/dist/config.d.ts +45 -0
  435. package/dist/node_modules/@earendil-works/pi-mcp/dist/config.js +1 -0
  436. package/dist/node_modules/@earendil-works/pi-mcp/dist/index.d.ts +5 -0
  437. package/dist/node_modules/@earendil-works/pi-mcp/dist/index.js +1 -1
  438. package/dist/node_modules/@earendil-works/pi-mcp/dist/input-schema.d.ts +1 -0
  439. package/dist/node_modules/@earendil-works/pi-mcp/dist/input-schema.js +1 -0
  440. package/dist/node_modules/@earendil-works/pi-mcp/dist/naming.d.ts +2 -0
  441. package/dist/node_modules/@earendil-works/pi-mcp/dist/naming.js +1 -0
  442. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/auth-provider.d.ts +18 -0
  443. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/auth-provider.js +1 -0
  444. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/callback.js +1 -1
  445. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/client-settings.d.ts +42 -0
  446. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/client-settings.js +1 -0
  447. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts +3 -0
  448. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js +1 -1
  449. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts +2 -0
  450. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js +1 -1
  451. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/index.d.ts +5 -1
  452. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/index.js +1 -1
  453. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/loopback.d.ts +22 -0
  454. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/loopback.js +1 -0
  455. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/sign-in.d.ts +28 -0
  456. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/sign-in.js +1 -0
  457. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts +1 -0
  458. package/dist/node_modules/@earendil-works/pi-mcp/dist/oauth/types.js +1 -1
  459. package/dist/node_modules/@earendil-works/pi-mcp/dist/output-limit.d.ts +8 -0
  460. package/dist/node_modules/@earendil-works/pi-mcp/dist/output-limit.js +11 -0
  461. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/lines.js +1 -0
  462. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/pipe.d.ts +34 -0
  463. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/pipe.js +2 -0
  464. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/stdio.d.ts +1 -4
  465. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/stdio.js +2 -2
  466. package/dist/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js +6 -4
  467. package/dist/node_modules/@earendil-works/pi-mcp/package.json +2 -2
  468. package/dist/node_modules/@earendil-works/pi-schema/CHANGELOG.md +37 -0
  469. package/dist/node_modules/@earendil-works/pi-schema/LICENSE +21 -0
  470. package/dist/node_modules/@earendil-works/pi-schema/README.md +319 -0
  471. package/dist/node_modules/@earendil-works/pi-schema/THIRD_PARTY_NOTICES/typebox-LICENSE +23 -0
  472. package/dist/node_modules/@earendil-works/pi-schema/dist/annotations.js +1 -0
  473. package/dist/node_modules/@earendil-works/pi-schema/dist/builders.d.ts +89 -0
  474. package/dist/node_modules/@earendil-works/pi-schema/dist/builders.js +1 -0
  475. package/dist/node_modules/@earendil-works/pi-schema/dist/checks.d.ts +51 -0
  476. package/dist/node_modules/@earendil-works/pi-schema/dist/checks.js +1 -0
  477. package/dist/node_modules/@earendil-works/pi-schema/dist/coerce.js +1 -0
  478. package/dist/node_modules/@earendil-works/pi-schema/dist/compiler.js +1 -0
  479. package/dist/node_modules/@earendil-works/pi-schema/dist/explain.js +1 -0
  480. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/index.js +1 -0
  481. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date.js +1 -0
  482. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/date_time.js +1 -0
  483. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/duration.js +1 -0
  484. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/email.js +1 -0
  485. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/hostname.js +1 -0
  486. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_email.js +1 -0
  487. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idn_hostname.js +1 -0
  488. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/format/bidi.js +1 -0
  489. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/format/puny.js +1 -0
  490. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/hostname.js +1 -0
  491. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/idn-hostname.js +1 -0
  492. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/index.js +1 -0
  493. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/ascii.js +1 -0
  494. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/puny.js +1 -0
  495. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/label/unicode.js +1 -0
  496. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/idna/pattern/pattern.js +1 -0
  497. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv4.js +1 -0
  498. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/ipv6.js +1 -0
  499. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri.js +1 -0
  500. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/iri_reference.js +1 -0
  501. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer.js +1 -0
  502. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/json_pointer_uri_fragment.js +1 -0
  503. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/regex.js +1 -0
  504. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/relative_json_pointer.js +1 -0
  505. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/time.js +1 -0
  506. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri.js +1 -0
  507. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_reference.js +1 -0
  508. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uri_template.js +1 -0
  509. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/url.js +1 -0
  510. package/dist/node_modules/@earendil-works/pi-schema/dist/formats/typebox/uuid.js +1 -0
  511. package/dist/node_modules/@earendil-works/pi-schema/dist/index.d.ts +4 -0
  512. package/dist/node_modules/@earendil-works/pi-schema/dist/index.js +1 -0
  513. package/dist/node_modules/@earendil-works/pi-schema/dist/resolver.js +1 -0
  514. package/dist/node_modules/@earendil-works/pi-schema/dist/shared.js +1 -0
  515. package/dist/node_modules/@earendil-works/pi-schema/dist/typebox-static.d.ts +54 -0
  516. package/dist/node_modules/@earendil-works/pi-schema/dist/typebox-static.js +0 -0
  517. package/dist/node_modules/@earendil-works/pi-schema/dist/types.d.ts +25 -0
  518. package/dist/node_modules/@earendil-works/pi-schema/dist/types.js +0 -0
  519. package/dist/node_modules/@earendil-works/pi-schema/dist/validator.d.ts +20 -0
  520. package/dist/node_modules/@earendil-works/pi-schema/dist/validator.js +1 -0
  521. package/dist/node_modules/@earendil-works/pi-schema/package.json +43 -0
  522. package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +1 -1
  523. package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.js +1 -1
  524. package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +1 -0
  525. package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.js +1 -1
  526. package/dist/node_modules/@earendil-works/pi-telemetry/dist/render.js +2 -2
  527. package/dist/node_modules/@earendil-works/pi-telemetry/package.json +3 -1
  528. package/dist/node_modules/@earendil-works/pi-tui/README.md +2 -0
  529. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +1 -0
  530. package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -3
  531. package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +4 -0
  532. package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -10
  533. package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +1 -0
  534. package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +1 -1
  535. package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +1 -0
  536. package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +1 -1
  537. package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.js +1 -1
  538. package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +1 -1
  539. package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -2
  540. package/dist/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
  541. package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +1 -0
  542. package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.js +1 -1
  543. package/dist/node_modules/@earendil-works/pi-tui/dist/keys.js +5 -5
  544. package/dist/node_modules/@earendil-works/pi-tui/dist/layout.js +1 -1
  545. package/dist/node_modules/@earendil-works/pi-tui/dist/program-status.js +1 -1
  546. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +1 -0
  547. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +1 -1
  548. package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.js +1 -1
  549. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +1 -1
  550. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +4 -4
  551. package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +13 -13
  552. package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +1 -0
  553. package/dist/node_modules/@earendil-works/pi-tui/dist/tui.js +2 -2
  554. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
  555. package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js +1 -1
  556. package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
  557. package/dist/package-manager-cli.js +17 -16
  558. package/dist/utils/ansi.js +1 -1
  559. package/dist/utils/changelog.js +3 -3
  560. package/dist/utils/clipboard-command.js +1 -1
  561. package/dist/utils/image-resize-core.js +1 -1
  562. package/dist/utils/image-resize.js +1 -1
  563. package/dist/utils/open-browser.js +1 -1
  564. package/dist/utils/paths.js +1 -1
  565. package/dist/utils/shell.js +3 -3
  566. package/dist/utils/syntax-highlight.js +4 -4
  567. package/dist/utils/terminal-question.js +1 -0
  568. package/dist/utils/tools-manager.js +1 -1
  569. package/dist/utils/web-url.js +1 -0
  570. package/examples/extensions/README.md +2 -1
  571. package/examples/extensions/custom-provider-gitlab-duo/package.json +14 -14
  572. package/examples/extensions/debug-provider.ts +2 -2
  573. package/examples/extensions/gondolin/package-lock.json +19 -29
  574. package/examples/extensions/gondolin/package.json +2 -2
  575. package/examples/extensions/plan-mode/index.ts +20 -9
  576. package/examples/extensions/plan-mode/utils.ts +42 -16
  577. package/examples/extensions/preset.ts +2 -0
  578. package/examples/extensions/reload-runtime.ts +17 -5
  579. package/examples/extensions/subagent/README.md +14 -11
  580. package/examples/extensions/subagent/index.ts +392 -171
  581. package/examples/extensions/todo.ts +7 -0
  582. package/examples/extensions/tools.ts +2 -0
  583. package/examples/extensions/with-deps/package-lock.json +2 -2
  584. package/examples/extensions/with-deps/package.json +20 -20
  585. package/examples/tsconfig.json +208 -0
  586. package/npm-shrinkwrap.json +407 -383
  587. package/package.json +6 -7
  588. package/examples/extensions/sandbox/index.ts +0 -327
  589. package/examples/extensions/sandbox/package-lock.json +0 -92
  590. package/examples/extensions/sandbox/package.json +0 -19
  591. /package/dist/node_modules/@earendil-works/pi-mcp/{LICENSES → THIRD_PARTY_NOTICES}/modelcontextprotocol-typescript-sdk.txt +0 -0
@@ -1 +1 @@
1
- var T=Object.defineProperty;var a=(r,e)=>T(r,"name",{value:e,configurable:!0});import{spawnSync as x}from"child_process";import{chmodSync as _,createWriteStream as F,existsSync as w,mkdirSync as S,readdirSync as P,renameSync as z,rmSync as b}from"fs";import{arch as U,platform as h}from"os";import{join as c}from"path";import{Readable as A}from"stream";import{pipeline as k}from"stream/promises";import{getBinDir as B,VERSION as M}from"../config.js";import{fetchWithRetry as N}from"./management-http.js";import{isOfflineModeEnabled as O}from"./offline.js";import{getPiUserAgent as R}from"./pi-user-agent.js";const u=B(),C=1e4,D=12e4,y={fd:{name:"fd",repo:"sharkdp/fd",binaryName:"fd",systemBinaryNames:["fd","fdfind"],minSystemVersion:"8.7.0",tagPrefix:"v",getAssetName:a((r,e,t)=>e==="darwin"?`fd-v${r}-${t==="arm64"?"aarch64":"x86_64"}-apple-darwin.tar.gz`:e==="linux"?`fd-v${r}-${t==="arm64"?"aarch64":"x86_64"}-unknown-linux-musl.tar.gz`:e==="win32"?`fd-v${r}-${t==="arm64"?"aarch64":"x86_64"}-pc-windows-msvc.zip`:null,"getAssetName")},rg:{name:"ripgrep",repo:"BurntSushi/ripgrep",binaryName:"rg",tagPrefix:"",getAssetName:a((r,e,t)=>e==="darwin"?`ripgrep-${r}-${t==="arm64"?"aarch64":"x86_64"}-apple-darwin.tar.gz`:e==="linux"?`ripgrep-${r}-${t==="arm64"?"aarch64":"x86_64"}-unknown-linux-musl.tar.gz`:e==="win32"?`ripgrep-${r}-${t==="arm64"?"aarch64":"x86_64"}-pc-windows-msvc.zip`:null,"getAssetName")}};function L(r,e){const t=r.split(".").map(Number),n=e.split(".").map(Number);for(let i=0;i<Math.max(t.length,n.length);i++){const o=(t[i]??0)-(n[i]??0);if(o!==0)return o>0}return!0}a(L,"versionAtLeast");function W(r,e){try{const t=x(r,["--version"],{stdio:"pipe"});if(t.error!==void 0&&t.error!==null)return!1;if(!e)return!0;const n=/(\d+)\.(\d+)\.(\d+)/.exec(String(t.stdout??""));return n!==null&&L(n[0],e)}catch{return!1}}a(W,"commandExists");function I(r){const e=y[r];if(!e)return null;const t=c(u,e.binaryName+(h()==="win32"?".exe":""));if(w(t))return t;const n=e.systemBinaryNames??[e.binaryName];for(const i of n)if(W(i,e.minSystemVersion))return i;return null}a(I,"getToolPath");async function j(r){const e=await N(`https://github.com/${r}/releases/latest`,{headers:{"User-Agent":R(M)},redirect:"manual"},{timeoutMs:C});try{await e.body?.cancel()}catch{}const t=e.status>=300&&e.status<400?e.headers.get("location"):null;if(!t)throw new Error(`Failed to resolve latest ${r} release: HTTP ${e.status} without redirect`);const n=new URL(t,"https://github.com").pathname.split("/").pop();if(!n||!t.includes("/releases/tag/"))throw new Error(`Failed to resolve latest ${r} release: unexpected redirect to ${t}`);return decodeURIComponent(n).replace(/^v/,"")}a(j,"getLatestVersion");async function H(r,e){const t=await N(r,void 0,{timeoutMs:D});if(!t.ok)throw new Error(`Download failed with HTTP ${t.status}: ${r}`);if(!t.body)throw new Error("No response body");const n=F(e);await k(A.fromWeb(t.body),n)}a(H,"downloadFile");function V(r,e){const t=[r];for(;t.length>0;){const n=t.pop();if(!n)continue;const i=P(n,{withFileTypes:!0});for(const o of i){const s=c(n,o.name);if(o.isFile()&&o.name===e)return s;o.isDirectory()&&t.push(s)}}return null}a(V,"findBinaryRecursively");function G(r){if(r.error?.message)return r.error.message;const e=r.stderr?.toString().trim();if(e)return e;const t=r.stdout?.toString().trim();return t||`exit status ${r.status??"unknown"}`}a(G,"formatSpawnFailure");function m(r,e){const t=x(r,e,{stdio:"pipe"});return!t.error&&t.status===0?null:`${r}: ${G(t)}`}a(m,"runExtractionCommand");function K(r,e,t){const n=m("tar",["xzf",r,"-C",e]);if(n)throw new Error(`Failed to extract ${t}: ${n}`)}a(K,"extractTarGzArchive");function q(){const r=process.env.SystemRoot;if(r){const e=c(r,"System32","tar.exe");if(w(e))return e}return"tar.exe"}a(q,"getWindowsTarCommand");function X(r,e,t){const n=[];if(h()==="win32"){const i=m(q(),["xf",r,"-C",e]);if(!i)return;n.push(i);const s=m("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-Command","& { param($archive, $destination) $ErrorActionPreference = 'Stop'; Expand-Archive -LiteralPath $archive -DestinationPath $destination -Force }",r,e]);if(!s)return;n.push(s)}else{const i=m("unzip",["-q",r,"-d",e]);if(!i)return;n.push(i);const o=m("tar",["xf",r,"-C",e]);if(!o)return;n.push(o)}throw new Error(`Failed to extract ${t}: ${n.join("; ")}`)}a(X,"extractZipArchive");async function Z(r){const e=y[r];if(!e)throw new Error(`Unknown tool: ${r}`);const t=h(),n=U(),i=r==="fd"&&t==="darwin"&&n==="x64"?"10.3.0":await j(e.repo),o=e.getAssetName(i,t,n);if(!o)throw new Error(`Unsupported platform: ${t}/${n}`);S(u,{recursive:!0});const s=`https://github.com/${e.repo}/releases/download/${e.tagPrefix}${i}/${o}`,d=c(u,o),$=t==="win32"?".exe":"",g=c(u,e.binaryName+$);await H(s,d);const f=c(u,`extract_tmp_${e.binaryName}_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2,10)}`);S(f,{recursive:!0});try{if(o.endsWith(".tar.gz"))K(d,f,o);else if(o.endsWith(".zip"))X(d,f,o);else throw new Error(`Unsupported archive format: ${o}`);const l=e.binaryName+$,E=c(f,o.replace(/\.(tar\.gz|zip)$/,""));let p=[c(E,l),c(f,l)].find(v=>w(v));if(p||(p=V(f,l)??void 0),p)z(p,g);else throw new Error(`Binary not found in archive: expected ${l} under ${f}`);t!=="win32"&&_(g,493)}finally{b(d,{force:!0}),b(f,{recursive:!0,force:!0})}return g}a(Z,"downloadTool");const J={fd:"fd",rg:"ripgrep"};async function Q(r,e){const t=I(r);if(t)return t;const n=y[r];if(n){if(O()){e?.({type:"warning",message:`${n.name} not found. Offline mode enabled, skipping download.`});return}if(h()==="android"){const i=J[r]??r;e?.({type:"warning",message:`${n.name} not found. Install with: pkg install ${i}`});return}e?.({type:"info",message:`${n.name} not found. Downloading...`});try{const i=await Z(r);return e?.({type:"info",message:`${n.name} installed to ${i}`}),i}catch(i){const o=[];for(let s=i,d=0;s instanceof Error&&d<5;s=s.cause,d++)o.includes(s.message)||o.push(s.message);e?.({type:"warning",message:`Failed to download ${n.name}: ${o.length>0?o.join(": "):String(i)}`});return}}}a(Q,"ensureTool");function Y(r){return(/(?:^|[\s:])(rg|fd): (?:command )?not found/m.exec(r)??/command not found: (rg|fd)\b/.exec(r)??/Unknown command:? '?(rg|fd)'?/.exec(r))?.[1]}a(Y,"missingManagedTool");async function me(r,e=Q){const t=Y(r);if(!t)return;const n=await e(t);return n?`[${t} was not installed; it is now (${n}). Run the command again.]`:t==="rg"?"[rg is not available on this machine. Use the grep tool, or `grep -rn` instead.]":"[fd is not available on this machine. Use the find tool, or `find` instead.]"}a(me,"missingManagedToolHint");export{Q as ensureTool,j as getLatestVersion,I as getToolPath,Y as missingManagedTool,me as missingManagedToolHint};
1
+ var A=Object.defineProperty;var s=(n,e)=>A(n,"name",{value:e,configurable:!0});import{spawnSync as N}from"child_process";import{chmodSync as U,createWriteStream as _,existsSync as y,mkdirSync as E,readdirSync as R,renameSync as k,rmSync as S}from"fs";import{arch as $,platform as f}from"os";import{join as c}from"path";import{Readable as B}from"stream";import{pipeline as M}from"stream/promises";import{getBinDir as O,VERSION as z}from"../config.js";import{fetchWithRetry as v}from"./management-http.js";import{isOfflineModeEnabled as C}from"./offline.js";import{getPiUserAgent as D}from"./pi-user-agent.js";const u=O(),I=1e4,L=12e4;function T(n,e){const t=e==="arm64"?"aarch64":e==="x64"?"x86_64":void 0;if(t){if(n==="darwin")return`${t}-apple-darwin.tar.gz`;if(n==="linux")return`${t}-unknown-linux-musl.tar.gz`;if(n==="win32")return`${t}-pc-windows-msvc.zip`}}s(T,"getReleaseTarget");const x={fd:{name:"fd",repo:"sharkdp/fd",binaryName:"fd",systemBinaryNames:["fd","fdfind"],minSystemVersion:"8.7.0",tagPrefix:"v",getAssetName:s((n,e)=>`fd-v${n}-${e}`,"getAssetName")},rg:{name:"ripgrep",repo:"BurntSushi/ripgrep",binaryName:"rg",tagPrefix:"",getAssetName:s((n,e)=>`ripgrep-${n}-${e}`,"getAssetName")}};function W(n,e){const t=n.split(".").map(Number),r=e.split(".").map(Number);for(let i=0;i<Math.max(t.length,r.length);i++){const a=(t[i]??0)-(r[i]??0);if(a!==0)return a>0}return!0}s(W,"versionAtLeast");function j(n,e){try{const t=N(n,["--version"],{stdio:"pipe"});if(t.error!==void 0&&t.error!==null)return!1;if(!e)return!0;const r=/(\d+)\.(\d+)\.(\d+)/.exec(String(t.stdout??""));return r!==null&&W(r[0],e)}catch{return!1}}s(j,"commandExists");function H(n){const e=x[n];if(!e)return null;const t=c(u,e.binaryName+(f()==="win32"?".exe":""));if(y(t))return t;const r=e.systemBinaryNames??[e.binaryName];for(const i of r)if(j(i,e.minSystemVersion))return i;return null}s(H,"getToolPath");async function V(n){const e=await v(`https://github.com/${n}/releases/latest`,{headers:{"User-Agent":D(z)},redirect:"manual"},{timeoutMs:I});try{await e.body?.cancel()}catch{}const t=e.status>=300&&e.status<400?e.headers.get("location"):null;if(!t)throw new Error(`Failed to resolve latest ${n} release: HTTP ${e.status} without redirect`);const r=new URL(t,"https://github.com").pathname.split("/").pop();if(!r||!t.includes("/releases/tag/"))throw new Error(`Failed to resolve latest ${n} release: unexpected redirect to ${t}`);return decodeURIComponent(r).replace(/^v/,"")}s(V,"getLatestVersion");async function G(n,e){const t=await v(n,void 0,{timeoutMs:L});if(!t.ok)throw new Error(`Download failed with HTTP ${t.status}: ${n}`);if(!t.body)throw new Error("No response body");const r=_(e);await M(B.fromWeb(t.body),r)}s(G,"downloadFile");function K(n,e){const t=[n];for(;t.length>0;){const r=t.pop();if(!r)continue;const i=R(r,{withFileTypes:!0});for(const a of i){const o=c(r,a.name);if(a.isFile()&&a.name===e)return o;a.isDirectory()&&t.push(o)}}return null}s(K,"findBinaryRecursively");function q(n){if(n.error?.message)return n.error.message;const e=n.stderr?.toString().trim();if(e)return e;const t=n.stdout?.toString().trim();return t||`exit status ${n.status??"unknown"}`}s(q,"formatSpawnFailure");function m(n,e){const t=N(n,e,{stdio:"pipe"});return!t.error&&t.status===0?null:`${n}: ${q(t)}`}s(m,"runExtractionCommand");function X(n,e,t){const r=m("tar",["xzf",n,"-C",e]);if(r)throw new Error(`Failed to extract ${t}: ${r}`)}s(X,"extractTarGzArchive");function Z(){const n=process.env.SystemRoot;if(n){const e=c(n,"System32","tar.exe");if(y(e))return e}return"tar.exe"}s(Z,"getWindowsTarCommand");function J(n,e,t){const r=[];if(f()==="win32"){const i=m(Z(),["xf",n,"-C",e]);if(!i)return;r.push(i);const o=m("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-Command","& { param($archive, $destination) $ErrorActionPreference = 'Stop'; Expand-Archive -LiteralPath $archive -DestinationPath $destination -Force }",n,e]);if(!o)return;r.push(o)}else{const i=m("unzip",["-q",n,"-d",e]);if(!i)return;r.push(i);const a=m("tar",["xf",n,"-C",e]);if(!a)return;r.push(a)}throw new Error(`Failed to extract ${t}: ${r.join("; ")}`)}s(J,"extractZipArchive");async function Q(n){const e=x[n];if(!e)throw new Error(`Unknown tool: ${n}`);const t=f(),r=$(),i=T(t,r);if(!i)throw new Error(`Unsupported platform: ${t}/${r}`);const a=n==="fd"&&t==="darwin"&&r==="x64"?"10.3.0":await V(e.repo),o=e.getAssetName(a,i);E(u,{recursive:!0});const l=`https://github.com/${e.repo}/releases/download/${e.tagPrefix}${a}/${o}`,p=c(u,o),b=t==="win32"?".exe":"",w=c(u,e.binaryName+b);await G(l,p);const d=c(u,`extract_tmp_${e.binaryName}_${process.pid}_${Date.now()}_${Math.random().toString(36).slice(2,10)}`);E(d,{recursive:!0});try{if(o.endsWith(".tar.gz"))X(p,d,o);else if(o.endsWith(".zip"))J(p,d,o);else throw new Error(`Unsupported archive format: ${o}`);const g=e.binaryName+b,F=c(d,o.replace(/\.(tar\.gz|zip)$/,""));let h=[c(F,g),c(d,g)].find(P=>y(P));if(h||(h=K(d,g)??void 0),h)k(h,w);else throw new Error(`Binary not found in archive: expected ${g} under ${d}`);t!=="win32"&&U(w,493)}finally{S(p,{force:!0}),S(d,{recursive:!0,force:!0})}return w}s(Q,"downloadTool");const Y={fd:"fd",rg:"ripgrep"};async function ee(n,e){const t=H(n);if(t)return t;const r=x[n];if(r){if(C()){e?.({type:"warning",message:`${r.name} not found. Offline mode enabled, skipping download.`});return}if(f()==="android"){const i=Y[n]??n;e?.({type:"warning",message:`${r.name} not found. Install with: pkg install ${i}`});return}if(!T(f(),$())){e?.({type:"warning",message:`${r.name} not found. Automatic download is not supported on ${f()}/${$()}. Install ${r.name} with your system package manager.`});return}e?.({type:"info",message:`${r.name} not found. Downloading...`});try{const i=await Q(n);return e?.({type:"info",message:`${r.name} installed to ${i}`}),i}catch(i){const a=[];for(let o=i,l=0;o instanceof Error&&l<5;o=o.cause,l++)a.includes(o.message)||a.push(o.message);e?.({type:"warning",message:`Failed to download ${r.name}: ${a.length>0?a.join(": "):String(i)}`});return}}}s(ee,"ensureTool");function ne(n){return(/(?:^|[\s:])(rg|fd): (?:command )?not found/m.exec(n)??/command not found: (rg|fd)\b/.exec(n)??/Unknown command:? '?(rg|fd)'?/.exec(n))?.[1]}s(ne,"missingManagedTool");async function pe(n,e=ee){const t=ne(n);if(!t)return;const r=await e(t);return r?`[${t} was not installed; it is now (${r}). Run the command again.]`:t==="rg"?"[rg is not available on this machine. Use the grep tool, or `grep -rn` instead.]":"[fd is not available on this machine. Use the find tool, or `find` instead.]"}s(pe,"missingManagedToolHint");export{ee as ensureTool,V as getLatestVersion,H as getToolPath,ne as missingManagedTool,pe as missingManagedToolHint};
@@ -0,0 +1 @@
1
+ var o=Object.defineProperty;var n=(r,t)=>o(r,"name",{value:t,configurable:!0});import{replaceControlCharacters as e}from"@earendil-works/pi-tui";function p(r){if(!URL.canParse(r))return;const t=new URL(r);return t.protocol==="https:"||t.protocol==="http:"?t.href:void 0}n(p,"webUrl");function i(r){return p(r)??e(r)}n(i,"displayUrl");export{i as displayUrl,p as webUrl};
@@ -23,9 +23,10 @@ cp permission-gate.ts ~/.dal/agent/extensions/
23
23
  | `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
24
24
  | `confirm-destructive.ts` | Confirms before destructive session actions (clear, switch, fork) |
25
25
  | `dirty-repo-guard.ts` | Prevents session changes with uncommitted git changes |
26
- | `sandbox/` | OS-level sandboxing using `@anthropic-ai/sandbox-runtime` with per-project config |
27
26
  | `gondolin/` | Route built-in tools and `!` commands into a Gondolin micro-VM |
28
27
 
28
+ For isolation setup and limitations, see [Run Pi in an isolated environment](../../docs/containerization.md).
29
+
29
30
  ### Custom Tools
30
31
 
31
32
  | Extension | Description |
@@ -1,16 +1,16 @@
1
1
  {
2
- "name": "pi-extension-custom-provider-gitlab-duo",
3
- "private": true,
4
- "version": "0.1.48",
5
- "type": "module",
6
- "scripts": {
7
- "clean": "echo 'nothing to clean'",
8
- "build": "echo 'nothing to build'",
9
- "check": "echo 'nothing to check'"
10
- },
11
- "pi": {
12
- "extensions": [
13
- "./index.ts"
14
- ]
15
- }
2
+ "name": "pi-extension-custom-provider-gitlab-duo",
3
+ "private": true,
4
+ "version": "1.0.51",
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "echo 'nothing to clean'",
8
+ "build": "echo 'nothing to build'",
9
+ "check": "echo 'nothing to check'"
10
+ },
11
+ "pi": {
12
+ "extensions": [
13
+ "./index.ts"
14
+ ]
15
+ }
16
16
  }
@@ -6,7 +6,7 @@
6
6
  * as expandable custom entries.
7
7
  */
8
8
 
9
- import { type ExtensionAPI, keyHint } from "@earendil-works/pi-coding-agent";
9
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
10
10
  import { Box, Text } from "@earendil-works/pi-tui";
11
11
 
12
12
  const ENTRY_TYPE = "debug-provider-events";
@@ -24,7 +24,7 @@ export default function (pi: ExtensionAPI) {
24
24
  let activeEvents: unknown[] | undefined;
25
25
  let completedEntry: ProviderDebugEntry | undefined;
26
26
 
27
- pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded }, theme) => {
27
+ pi.registerEntryRenderer<ProviderDebugEntry>(ENTRY_TYPE, (entry, { expanded, keyHint }, theme) => {
28
28
  const data = entry.data;
29
29
  if (!data) return new Text(theme.fg("warning", "[provider debug] Missing event data"), 0, 0);
30
30
 
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "0.1.48",
3
+ "version": "1.0.51",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "0.1.48",
9
+ "version": "1.0.51",
10
10
  "dependencies": {
11
- "@earendil-works/gondolin": "0.12.0"
11
+ "@earendil-works/gondolin": "0.14.0"
12
12
  }
13
13
  },
14
14
  "node_modules/@cto.af/wtf8": {
@@ -21,31 +21,30 @@
21
21
  }
22
22
  },
23
23
  "node_modules/@earendil-works/gondolin": {
24
- "version": "0.12.0",
25
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.12.0.tgz",
26
- "integrity": "sha512-BXbvzQKb5QmxY5NtthRDONJTu7+IDKbzqWGrJyyNXMP7N681Tx0Q9TK8pK1ba8nUvYQTipNJyGZOsJfYiZll1A==",
24
+ "version": "0.14.0",
25
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin/-/gondolin-0.14.0.tgz",
26
+ "integrity": "sha512-MSw+EGcqFJeyKHdXEfm+nMRr74ytT4x8DGIohav0oPCHeVQAB9AajquM94cv2xqvIU3VDAaZZVC07IXsOY6OVQ==",
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
29
  "cbor2": "^2.3.0",
30
- "node-forge": "^1.3.3",
31
30
  "ssh2": "^1.17.0",
32
- "undici": "^6.21.0"
31
+ "undici": "^6.29.0"
33
32
  },
34
33
  "bin": {
35
34
  "gondolin": "dist/bin/gondolin.js"
36
35
  },
37
36
  "engines": {
38
- "node": ">=23.6.0"
37
+ "node": ">=22.19.0"
39
38
  },
40
39
  "optionalDependencies": {
41
- "@earendil-works/gondolin-krun-runner-darwin-arm64": "0.12.0",
42
- "@earendil-works/gondolin-krun-runner-linux-x64": "0.12.0"
40
+ "@earendil-works/gondolin-krun-runner-darwin-arm64": "0.14.0",
41
+ "@earendil-works/gondolin-krun-runner-linux-x64": "0.14.0"
43
42
  }
44
43
  },
45
44
  "node_modules/@earendil-works/gondolin-krun-runner-darwin-arm64": {
46
- "version": "0.12.0",
47
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.12.0.tgz",
48
- "integrity": "sha512-ftDlusht4PcT7Y3TuPrZIKrCXy3isiBTVMvlXYK0pcud2uXY6uwFTGeunYgP+8ND/60ddb+MImqbfmkcK8B84A==",
45
+ "version": "0.14.0",
46
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-darwin-arm64/-/gondolin-krun-runner-darwin-arm64-0.14.0.tgz",
47
+ "integrity": "sha512-fvuhz1CZPaEbmXC0luZoXd1obAb0bjaaGJz33Jo63bhMlosYunAahItakh7cU0dnTlNFzufOSnpGOPqtuYjnpQ==",
49
48
  "cpu": [
50
49
  "arm64"
51
50
  ],
@@ -59,9 +58,9 @@
59
58
  }
60
59
  },
61
60
  "node_modules/@earendil-works/gondolin-krun-runner-linux-x64": {
62
- "version": "0.12.0",
63
- "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.12.0.tgz",
64
- "integrity": "sha512-RRYsgwe2r5ApKmFNy469QgwnyjAHpAs9XANdWpTd9ol4iUYOY3sX7e0xIooAKxd+ktxGI4N/xRWicwGen3D/Ow==",
61
+ "version": "0.14.0",
62
+ "resolved": "https://registry.npmjs.org/@earendil-works/gondolin-krun-runner-linux-x64/-/gondolin-krun-runner-linux-x64-0.14.0.tgz",
63
+ "integrity": "sha512-91iw4smoOH/yOoAuQS6N2UZOxqSFwRhtk8rTyrokXBoWiWcveAzg4kHvnLcm40ZlNrWwzIDFrere4bkZeGDQcA==",
65
64
  "cpu": [
66
65
  "x64"
67
66
  ],
@@ -134,15 +133,6 @@
134
133
  "license": "MIT",
135
134
  "optional": true
136
135
  },
137
- "node_modules/node-forge": {
138
- "version": "1.4.0",
139
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
140
- "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
141
- "license": "(BSD-3-Clause OR GPL-2.0)",
142
- "engines": {
143
- "node": ">= 6.13.0"
144
- }
145
- },
146
136
  "node_modules/safer-buffer": {
147
137
  "version": "2.1.2",
148
138
  "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@@ -173,9 +163,9 @@
173
163
  "license": "Unlicense"
174
164
  },
175
165
  "node_modules/undici": {
176
- "version": "6.26.0",
177
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz",
178
- "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==",
166
+ "version": "6.29.1",
167
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
168
+ "integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
179
169
  "license": "MIT",
180
170
  "engines": {
181
171
  "node": ">=18.17"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.1.48",
4
+ "version": "1.0.51",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -14,6 +14,6 @@
14
14
  ]
15
15
  },
16
16
  "dependencies": {
17
- "@earendil-works/gondolin": "0.12.0"
17
+ "@earendil-works/gondolin": "0.14.0"
18
18
  }
19
19
  }
@@ -16,7 +16,7 @@ import type { AgentMessage } from "@earendil-works/pi-agent-core";
16
16
  import type { AssistantMessage, TextContent } from "@earendil-works/pi-ai";
17
17
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
18
18
  import { Key } from "@earendil-works/pi-tui";
19
- import { extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
19
+ import { allStepsComplete, extractTodoItems, isSafeCommand, markCompletedSteps, type TodoItem } from "./utils.ts";
20
20
 
21
21
  // Tools
22
22
  const PLAN_MODE_TOOLS = ["read", "bash", "grep", "find", "ls", "questionnaire"];
@@ -36,11 +36,16 @@ function isAssistantMessage(m: AgentMessage): m is AssistantMessage {
36
36
  return m.role === "assistant" && Array.isArray(m.content);
37
37
  }
38
38
 
39
- // Extract text content from an assistant message
39
+ // Extract text content from an assistant message.
40
+ // Includes thinking blocks: with reasoning-max models the [DONE:n] tags and
41
+ // plan drafts usually land in thinking, not the visible text.
40
42
  function getTextContent(message: AssistantMessage): string {
41
43
  return message.content
42
- .filter((block): block is TextContent => block.type === "text")
43
- .map((block) => block.text)
44
+ .map((block) => {
45
+ if (block.type === "text") return block.text;
46
+ if (block.type === "thinking") return (block as { thinking?: string }).thinking ?? "";
47
+ return "";
48
+ })
44
49
  .join("\n");
45
50
  }
46
51
 
@@ -247,10 +252,9 @@ After completing a step, include a [DONE:n] tag in your response.`,
247
252
  if (!executionMode || todoItems.length === 0) return;
248
253
  if (!isAssistantMessage(event.message)) return;
249
254
 
250
- const text = getTextContent(event.message);
251
- if (markCompletedSteps(text, todoItems) > 0) {
252
- updateStatus(ctx);
253
- }
255
+ markCompletedSteps(getTextContent(event.message), todoItems);
256
+ // Always refresh: cheap, keeps the widget consistent even when nothing matched.
257
+ updateStatus(ctx);
254
258
  persistState();
255
259
  });
256
260
 
@@ -258,11 +262,18 @@ After completing a step, include a [DONE:n] tag in your response.`,
258
262
  pi.on("agent_end", async (event, ctx) => {
259
263
  // Check if execution is complete
260
264
  if (executionMode && todoItems.length > 0) {
265
+ // Fallback: the model wrapped up without [DONE:n] tags ("All steps complete").
266
+ const lastAssistant = [...event.messages].reverse().find(isAssistantMessage);
267
+ if (lastAssistant && allStepsComplete(getTextContent(lastAssistant))) {
268
+ for (const t of todoItems) t.completed = true;
269
+ }
261
270
  if (todoItems.every((t) => t.completed)) {
262
271
  const completedList = todoItems.map((t) => `~~${t.text}~~`).join("\n");
263
272
  pi.sendMessage(
264
273
  { customType: "plan-complete", content: `**Plan Complete!** ✓\n\n${completedList}`, display: true },
265
- { triggerTurn: false },
274
+ // nextTurn: delivered with the next user prompt instead of triggering an
275
+ // extra (expensive, reasoning-max) LLM turn to acknowledge the card.
276
+ { deliverAs: "nextTurn" },
266
277
  );
267
278
  executionMode = false;
268
279
  todoItems = [];
@@ -120,26 +120,30 @@ export function cleanStepText(text: string): string {
120
120
  if (cleaned.length > 0) {
121
121
  cleaned = cleaned.charAt(0).toUpperCase() + cleaned.slice(1);
122
122
  }
123
- if (cleaned.length > 50) {
124
- cleaned = `${cleaned.slice(0, 47)}...`;
125
- }
123
+ // Keep full text: the exec message and widget display need the whole step.
124
+ // The widget truncates for display (see updateStatus in index.ts).
126
125
  return cleaned;
127
126
  }
128
127
 
129
128
  export function extractTodoItems(message: string): TodoItem[] {
130
129
  const items: TodoItem[] = [];
131
- const headerMatch = message.match(/\*{0,2}Plan:\*{0,2}\s*\n/i);
132
- if (!headerMatch) return items;
133
-
134
- const planSection = message.slice(message.indexOf(headerMatch[0]) + headerMatch[0].length);
135
- const numberedPattern = /^\s*(\d+)[.)]\s+\*{0,2}([^*\n]+)/gm;
130
+ // Take the LAST "Plan:" section: since getTextContent includes thinking blocks,
131
+ // a draft in the reasoning block can precede the user-visible plan in the text
132
+ // block — the text block comes last in content order.
133
+ const headers = [...message.matchAll(/\*{0,2}Plan:\*{0,2}\s*\n/gi)];
134
+ if (headers.length === 0) return items;
135
+ const lastHeader = headers[headers.length - 1];
136
+ const planSection = message.slice((lastHeader.index ?? 0) + lastHeader[0].length);
137
+ // Full-line capture: step titles may contain bold/italic/backticks ("1. **Step** \`x\` …").
138
+ // cleanStepText strips the markdown; / and - items are still skipped below.
139
+ const numberedPattern = /^\s*(\d+)[.)]\s+(.+)$/gm;
136
140
 
137
141
  for (const match of planSection.matchAll(numberedPattern)) {
138
142
  const text = match[2]
139
143
  .trim()
140
144
  .replace(/\*{1,2}$/, "")
141
145
  .trim();
142
- if (text.length > 5 && !text.startsWith("`") && !text.startsWith("/") && !text.startsWith("-")) {
146
+ if (text.length > 5 && !text.startsWith("/") && !text.startsWith("-")) {
143
147
  const cleaned = cleanStepText(text);
144
148
  if (cleaned.length > 3) {
145
149
  items.push({ step: items.length + 1, text: cleaned, completed: false });
@@ -151,18 +155,40 @@ export function extractTodoItems(message: string): TodoItem[] {
151
155
 
152
156
  export function extractDoneSteps(message: string): number[] {
153
157
  const steps: number[] = [];
154
- for (const match of message.matchAll(/\[DONE:(\d+)\]/gi)) {
155
- const step = Number(match[1]);
156
- if (Number.isFinite(step)) steps.push(step);
158
+ // Canonical and bracket variants: [DONE:1], [DONE: 1], [DONE 1], [Done:1]
159
+ for (const match of message.matchAll(/\[DONE\s*:?\s*(\d+)\]/gi)) {
160
+ steps.push(Number(match[1]));
161
+ }
162
+ // "Done: 1" without brackets
163
+ for (const match of message.matchAll(/\bDone\s*:\s*(\d+)\b/gi)) {
164
+ steps.push(Number(match[1]));
165
+ }
166
+ // "Step 1 done", "Step 2 is complete", "Step 3 finished" — adjacency-anchored,
167
+ // so "Step 9 is not done" / "Step 9 incomplete" never match.
168
+ for (const match of message.matchAll(/\bStep\s*(\d+)\s+(?:is\s+)?(?:done|complete|completed|finished)\b/gi)) {
169
+ steps.push(Number(match[1]));
157
170
  }
158
- return steps;
171
+ return [...new Set(steps)];
159
172
  }
160
173
 
161
174
  export function markCompletedSteps(text: string, items: TodoItem[]): number {
162
175
  const doneSteps = extractDoneSteps(text);
176
+ let marked = 0;
163
177
  for (const step of doneSteps) {
164
- const item = items.find((t) => t.step === step);
165
- if (item) item.completed = true;
178
+ const item = items.find((t) => t.step === step && !t.completed);
179
+ if (item) {
180
+ item.completed = true;
181
+ marked++;
182
+ }
166
183
  }
167
- return doneSteps.length;
184
+ return marked;
185
+ }
186
+
187
+ // Whole-plan completion phrasing, used as a fallback when the model summarizes
188
+ // without [DONE:n] tags. Only consulted on the run's final message (agent_end).
189
+ export function allStepsComplete(message: string): boolean {
190
+ return (
191
+ /(?:all|every)\s+steps?\s+(?:are|is\s+)?(?:done|complete|completed|finished)/i.test(message) ||
192
+ /\b(?:the\s+)?plan\s+(?:is\s+)?(?:complete|completed|done)\b/i.test(message)
193
+ );
168
194
  }
@@ -252,6 +252,8 @@ export default function presetExtension(pi: ExtensionAPI) {
252
252
  container.addChild(new DynamicBorder((str) => theme.fg("accent", str)));
253
253
 
254
254
  return {
255
+ // Let PageUp/PageDown page the list instead of scrolling the fullscreen transcript.
256
+ capturesViewportInput: selectList.capturesViewportInput,
255
257
  render(width: number) {
256
258
  return container.render(width);
257
259
  },
@@ -2,7 +2,7 @@
2
2
  * Reload Runtime Extension
3
3
  *
4
4
  * Demonstrates ctx.reload() from ExtensionCommandContext and an LLM-callable
5
- * tool that queues a follow-up command to trigger reload.
5
+ * tool that requests a reload once the agent has settled.
6
6
  */
7
7
 
8
8
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
@@ -19,19 +19,31 @@ export default function (pi: ExtensionAPI) {
19
19
  },
20
20
  });
21
21
 
22
- // LLM-callable tool. Tools get ExtensionContext, so they cannot call ctx.reload() directly.
23
- // Instead, queue a follow-up user command that executes the command above.
22
+ // LLM-callable tool. Tools do not receive ExtensionCommandContext, so they cannot call
23
+ // ctx.reload(), and Pi cannot reload while the agent is running. The tool records the
24
+ // request and ends the run; the agent_settled handler then runs the command above.
25
+ let reloadRequested = false;
26
+
24
27
  pi.registerTool({
25
28
  name: "reload_runtime",
26
29
  label: "Reload Runtime",
27
30
  description: "Reload extensions, skills, prompts, themes, and context files",
28
31
  parameters: Type.Object({}),
29
32
  async execute() {
30
- pi.sendUserMessage("/reload-runtime", { deliverAs: "followUp" });
33
+ reloadRequested = true;
31
34
  return {
32
- content: [{ type: "text", text: "Queued /reload-runtime as a follow-up command." }],
35
+ content: [{ type: "text", text: "Reload requested. Pi reloads after this response." }],
33
36
  details: {},
37
+ terminate: true,
34
38
  };
35
39
  },
36
40
  });
41
+
42
+ pi.on("agent_settled", () => {
43
+ if (!reloadRequested) return;
44
+ reloadRequested = false;
45
+ // Sent from agent_settled, the command runs after every settled handler finishes, while
46
+ // the agent is idle. expandPromptTemplates dispatches it as a command, not as model input.
47
+ pi.sendUserMessage("/reload-runtime", { expandPromptTemplates: true });
48
+ });
37
49
  }
@@ -8,7 +8,7 @@ Delegate tasks to specialized subagents with isolated context windows.
8
8
  - **Streaming output**: See tool calls and progress as they happen
9
9
  - **Parallel streaming**: All parallel tasks stream updates simultaneously
10
10
  - **Markdown rendering**: Final output rendered with proper formatting (expanded view)
11
- - **Usage tracking**: Shows turns, tokens, cost, and context usage per agent
11
+ - **Usage display**: Shows turns, tokens, cost, and context usage inside each subagent result
12
12
  - **Abort support**: Ctrl+C propagates to kill subagent processes
13
13
 
14
14
  ## Structure
@@ -62,7 +62,7 @@ This tool executes a separate `pi` subprocess with a delegated system prompt and
62
62
 
63
63
  To enable project-local agents, pass `agentScope: "both"` (or `"project"`). Only do this for repositories you trust.
64
64
 
65
- When running interactively, the tool prompts for confirmation before running project-local agents in untrusted projects. Trusted projects skip the additional prompt. Set `confirmProjectAgents: false` to disable confirmation.
65
+ When running interactively, the tool prompts for confirmation before running project-local agents unless the session trust context reports trusted and the agents come from that session project's `.dal/agents` directory. Agents loaded from another task `cwd` still require confirmation. Set `confirmProjectAgents: false` to disable confirmation.
66
66
 
67
67
  ## Usage
68
68
 
@@ -112,8 +112,8 @@ Use a chain: first have scout find the read tool, then have planner suggest impr
112
112
  **Parallel mode streaming**:
113
113
  - Shows all tasks with live status (⏳ running, ✓ done, ✗ failed)
114
114
  - Updates as each task makes progress
115
- - Shows "2/3 done, 1 running" status
116
- - Returns each completed task's final output to the parent model, capped at 50 KB per task
115
+ - Distinguishes pending, running, completed, failed, and aborted tasks
116
+ - Returns each completed task summary to the parent model with its own 50 KB limit
117
117
  - Returns failure diagnostics from stderr/error messages when a child exits before producing output
118
118
 
119
119
  **Tool call formatting** (mimics built-in tools):
@@ -140,7 +140,7 @@ System prompt for the agent goes here.
140
140
  When `model` is omitted, the subagent inherits the dispatching session's active model and thinking level.
141
141
 
142
142
  **Locations:**
143
- - `~/.dal/agent/agents/*.md` - User-level (always loaded)
143
+ - `~/.dal/agent/agents/*.md` - User-level (with `agentScope: "user"` or `"both"`)
144
144
  - `.dal/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
145
145
 
146
146
  Project agents override user agents with the same name when `agentScope: "both"`.
@@ -164,14 +164,17 @@ Project agents override user agents with the same name when `agentScope: "both"`
164
164
 
165
165
  ## Error Handling
166
166
 
167
- - **Exit code != 0**: Tool returns error with stderr/output
168
- - **stopReason "error"**: LLM error propagated with error message
169
- - **stopReason "aborted"**: User abort (Ctrl+C) kills subprocess, throws error
170
- - **Chain mode**: Stops at first failing step, reports which step failed
167
+ - **Exit code != 0 or signal termination**: Tool returns an error with preserved stderr/output
168
+ - **Spawn errors**: Tool returns the spawn diagnostic
169
+ - **stopReason "error"**: LLM error is propagated with its error message
170
+ - **Abort**: Ctrl+C sends SIGTERM, escalates to SIGKILL after five seconds if needed, and preserves partial details/usage
171
+ - **Chain mode**: Stops at the first failing step and reports which step failed
171
172
 
172
173
  ## Limitations
173
174
 
174
175
  - Output truncated to last 10 items in collapsed view (expand to see all)
175
- - Parallel model-visible output is capped at 50 KB per task; full results remain in tool details
176
- - Agents discovered fresh on each invocation (allows editing mid-session)
176
+ - Single and chain output is capped at 50 KB/2,000 lines; full results remain in tool details
177
+ - Parallel output keeps a separate 50 KB budget per task, allowing up to roughly 400 KB across eight tasks
178
+ - Child usage is displayed in tool details but is not added to the calling session's usage totals
179
+ - Agents are snapshotted from each task's effective cwd when the tool invocation starts; relative task cwd values resolve from the session cwd
177
180
  - Parallel mode limited to 8 tasks, 4 concurrent