@ensocode/server 0.3.3 → 0.3.5

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 (378) hide show
  1. package/README.md +10 -0
  2. package/out/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +117 -0
  3. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-MGNURJ72.js +6 -0
  4. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{azure-openai-responses-FSC6BAW3.js → azure-openai-responses-4WDOP7MF.js} +1 -1
  5. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +3 -3
  6. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4KSTFUIK.js +19 -0
  7. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-4UNPP53I.js +55 -0
  8. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-CCYGJPSU.js +2 -0
  9. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-4EYXVSA5.js → chunk-FF6XOTWB.js} +9 -9
  10. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-FMPAMX2W.js +82 -0
  11. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-GFUN2N5K.js +2 -0
  12. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-C2WU32PX.js → chunk-H4W2F2IO.js} +1 -1
  13. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-IEBK4HQA.js +2 -0
  14. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-EOO47QGR.js → chunk-JLFZH7C6.js} +1 -1
  15. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-LCB5FO32.js +4 -0
  16. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-GN3QYODH.js → chunk-LQUBM7HF.js} +1 -1
  17. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MABPTPMF.js +30 -0
  18. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-MPEFJ3RP.js +2 -0
  19. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-EBFHJFEE.js → chunk-PYBKJQVF.js} +1 -1
  20. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VKJQ6CME.js +8 -0
  21. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-B46VJEHW.js → chunk-VUPOM3AH.js} +1 -1
  22. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-3TGLJEWK.js → chunk-WL4TUXY7.js} +1 -1
  23. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-V6KH5QG4.js → chunk-XM4MQFQV.js} +1 -1
  24. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-YZKQS34S.js → chunk-Y55SJART.js} +5 -1
  25. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZG74NES2.js +2 -0
  26. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZKNSXGL5.js +1243 -0
  27. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cli-MCOUW5WS.js → cli-35W4A75E.js} +7 -7
  28. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cloudflare-workers-ai-system-one-WLAFJSP6.js → cloudflare-workers-ai-system-one-WKRH5HZA.js} +1 -1
  29. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/codemode-worker.js +2 -0
  30. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{easter-egg-3d-WMBNSJ4M.js → easter-egg-3d-GEVPKQF6.js} +1 -1
  31. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{execute-4CEBORGZ.js → execute-L2EEDV3L.js} +5 -3
  32. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +1 -1
  33. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-generative-ai-INGKNW72.js → google-generative-ai-VSMFCHJU.js} +1 -1
  34. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-vertex-IBTX6MBF.js → google-vertex-35UTLZJN.js} +1 -1
  35. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{llama-cpp-classify-V5U3QKXI.js → llama-cpp-classify-Z3SS4FP4.js} +1 -1
  36. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{mistral-conversations-S4OWXIXQ.js → mistral-conversations-LWJTUFIM.js} +1 -1
  37. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-YYIXDJWF.js +10 -0
  38. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-completions-EJNYB6IX.js → openai-completions-X2I4TQ2L.js} +3 -3
  39. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-decisions-IXI34BYG.js → openai-decisions-GG3FBAIF.js} +1 -1
  40. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-5CX3GG6R.js +4 -0
  41. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openrouter-images-PISKSFMS.js → openrouter-images-WHNK2UQG.js} +1 -1
  42. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{pi-messages-NORUKF4E.js → pi-messages-5CXWY5I7.js} +1 -1
  43. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{runtime-FQB7RU7U.js → runtime-J5ZSBGTX.js} +1 -1
  44. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{typesafe-system-one-CHVC2UUI.js → typesafe-system-one-KA2SBSSD.js} +1 -1
  45. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-7ZY53V4K.js +2 -0
  46. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
  47. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  48. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  49. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -1
  50. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-command.js +26 -2
  51. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-login.d.ts +15 -0
  52. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-login.js +232 -0
  53. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-logout.d.ts +14 -0
  54. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-logout.js +57 -0
  55. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-terminal.d.ts +17 -0
  56. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/auth-terminal.js +63 -0
  57. package/out/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +3 -1
  58. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +5 -0
  59. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +7 -0
  60. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +25 -6
  61. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +139 -50
  62. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +3 -2
  63. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +3 -1
  64. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/cache-warmer.d.ts +4 -37
  65. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/cache-warmer.js +11 -89
  66. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +2 -1
  67. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  68. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +10 -5
  69. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +1 -0
  70. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +9 -1
  71. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -6
  72. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +2 -2
  73. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +1 -1
  74. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts +12 -37
  75. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js +42 -121
  76. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +52 -0
  77. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +20 -19
  78. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts +5 -0
  79. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +11 -4
  80. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +10 -1
  81. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +50 -5
  82. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/pi-ai-schemas.d.ts +4 -0
  83. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/preferred-providers.d.ts +17 -0
  84. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/preferred-providers.js +24 -0
  85. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +18 -2
  86. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-composer.js +3 -1
  87. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-matching.d.ts +6 -0
  88. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-matching.js +8 -0
  89. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/radius-mcp.d.ts +13 -0
  90. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/radius-mcp.js +29 -0
  91. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +2 -0
  92. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/runtime-credentials.d.ts +8 -0
  93. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/runtime-credentials.js +15 -1
  94. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts +1 -1
  95. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js +1 -1
  96. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +35 -5
  97. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.d.ts +23 -14
  98. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit-diff.js +182 -41
  99. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +8 -7
  100. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +82 -36
  101. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts +5 -3
  102. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +87 -75
  103. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +2 -1
  104. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/powershell.js +15 -2
  105. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +8 -0
  106. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +141 -25
  107. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.d.ts +4 -14
  108. package/out/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/truncate.js +23 -29
  109. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js +4 -4
  110. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js +34 -12
  111. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.d.ts +2 -0
  112. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/client.js +23 -2
  113. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/ui.js +15 -3
  114. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.d.ts +2 -0
  115. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js +49 -14
  116. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/config.js +4 -7
  117. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js +4 -3
  118. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts +11 -49
  119. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js +56 -319
  120. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts +1 -1
  121. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js +4 -3
  122. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts +4 -3
  123. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js +7 -5
  124. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts +2 -23
  125. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js +6 -58
  126. package/out/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js +18 -6
  127. package/out/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +1 -1
  128. package/out/node_modules/@earendil-works/pi-coding-agent/dist/main.js +46 -0
  129. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
  130. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +12 -4
  131. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
  132. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +12 -4
  133. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.d.ts +5 -2
  134. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js +10 -3
  135. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/diff.js +11 -5
  136. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-selector.js +9 -1
  137. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +1 -18
  138. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/mermaid.d.ts +2 -1
  139. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/mermaid.js +25 -20
  140. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/model-selector.js +14 -6
  141. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
  142. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/oauth-selector.js +32 -5
  143. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/provider-brand.d.ts +14 -0
  144. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/provider-brand.js +66 -0
  145. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/radius-login-selector.d.ts +1 -2
  146. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/radius-login-selector.js +6 -37
  147. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
  148. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +12 -4
  149. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tree-selector.d.ts +1 -0
  150. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tree-selector.js +19 -10
  151. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +11 -1
  152. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +110 -63
  153. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +4 -0
  154. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +19 -10
  155. package/out/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +53 -23
  156. package/out/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +39 -8
  157. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +2 -2
  158. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +12 -6
  159. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +3 -1
  160. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/terminal-question.d.ts +8 -0
  161. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/terminal-question.js +24 -0
  162. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/web-url.d.ts +12 -0
  163. package/out/node_modules/@earendil-works/pi-coding-agent/dist/utils/web-url.js +20 -0
  164. package/out/node_modules/@earendil-works/pi-coding-agent/docs/cli.md +14 -1
  165. package/out/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +27 -7
  166. package/out/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +1 -1
  167. package/out/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +4 -7
  168. package/out/node_modules/@earendil-works/pi-coding-agent/docs/models-configuration.md +6 -1
  169. package/out/node_modules/@earendil-works/pi-coding-agent/docs/models.md +2 -1
  170. package/out/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +1 -1
  171. package/out/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +1 -1
  172. package/out/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +4 -2
  173. package/out/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -1
  174. package/out/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +1 -1
  175. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  176. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  177. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  178. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  179. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  180. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/index.ts +23 -13
  181. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/utils.ts +42 -16
  182. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/README.md +14 -11
  183. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/subagent/index.ts +392 -171
  184. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  185. package/out/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  186. package/out/node_modules/@earendil-works/pi-coding-agent/examples/tsconfig.json +63 -35
  187. package/out/node_modules/@earendil-works/pi-coding-agent/package.json +7 -7
  188. package/out/node_modules/@earendil-works/pi-coding-agent/schemas/models.schema.json +29 -0
  189. package/out/node_modules/@earendil-works/pi-coding-agent/schemas/settings.schema.json +1 -1
  190. package/out/phone/assets/{abnfDiagram-VCTEODGH-CLgfII9z.js → abnfDiagram-VCTEODGH-k76opPl1.js} +1 -1
  191. package/out/phone/assets/architecture-7GRP2DOG-DFA8x3QF.js +1 -0
  192. package/out/phone/assets/{architectureDiagram-5GKGNRK7-I2RDn32D.js → architectureDiagram-5GKGNRK7-yxQH9IuZ.js} +1 -1
  193. package/out/phone/assets/{blockDiagram-I7D4REHJ-D5xNQZkS.js → blockDiagram-I7D4REHJ-DoHteZpO.js} +1 -1
  194. package/out/phone/assets/{c4Diagram-7LVT6UL2-CRKpzdlA.js → c4Diagram-7LVT6UL2-DQVO6L4q.js} +1 -1
  195. package/out/phone/assets/channel-BBjWfdZr.js +1 -0
  196. package/out/phone/assets/{chunk-4HAMMTFA-CcezrqKz.js → chunk-4HAMMTFA-N9Rw4SGW.js} +1 -1
  197. package/out/phone/assets/{chunk-75Z2AOVW-DDCXp4y1.js → chunk-75Z2AOVW-DKJ8pOxp.js} +1 -1
  198. package/out/phone/assets/{chunk-DU6HZSFF-CjWveEkB.js → chunk-DU6HZSFF-BqGW8Nbd.js} +1 -1
  199. package/out/phone/assets/{chunk-F27PBJKO-Bgl_xI02.js → chunk-F27PBJKO-PkFmkghF.js} +1 -1
  200. package/out/phone/assets/{chunk-GMAD6QVW-EmL8nOme.js → chunk-GMAD6QVW-C9VeD3Jk.js} +1 -1
  201. package/out/phone/assets/{chunk-GVQU2GXP-Dox_nphF.js → chunk-GVQU2GXP-COhntOeE.js} +1 -1
  202. package/out/phone/assets/{chunk-IMKFNOWR-BapGpI4S.js → chunk-IMKFNOWR-B87ghLVD.js} +1 -1
  203. package/out/phone/assets/{chunk-L3NEJ4N5-Cq_UZI8A.js → chunk-L3NEJ4N5-C3N2izjg.js} +1 -1
  204. package/out/phone/assets/{chunk-OSK3NFVY-2VVlErAd.js → chunk-OSK3NFVY-DaAlvVhz.js} +1 -1
  205. package/out/phone/assets/{chunk-P2QGCYS3-Cci-G-p1.js → chunk-P2QGCYS3-BQpKr8IZ.js} +1 -1
  206. package/out/phone/assets/{chunk-POPQ4Y6H-CJ47EOfE.js → chunk-POPQ4Y6H-B2TZMY6U.js} +1 -1
  207. package/out/phone/assets/{chunk-PWAF6VOD-D9dLdFqC.js → chunk-PWAF6VOD-CgRhpUJy.js} +1 -1
  208. package/out/phone/assets/{chunk-SHT3W25Y-BlGSiWZn.js → chunk-SHT3W25Y-BySMFA99.js} +1 -1
  209. package/out/phone/assets/{chunk-SVP7TREG-C0zdsa_A.js → chunk-SVP7TREG-EDGanDUX.js} +1 -1
  210. package/out/phone/assets/{chunk-TICWLB2K-DAQW8nQU.js → chunk-TICWLB2K-BtCZ8R2k.js} +1 -1
  211. package/out/phone/assets/classDiagram-ZZMXUADV-CXXjdIIU.js +1 -0
  212. package/out/phone/assets/classDiagram-v2-VYDZK3BY-CXXjdIIU.js +1 -0
  213. package/out/phone/assets/{cynefin-OW5HDTMX-_zsx5mdV.js → cynefin-OW5HDTMX-CdZmp44V.js} +1 -1
  214. package/out/phone/assets/{cynefinDiagram-5FMLGOSQ-Cww-w0ex.js → cynefinDiagram-5FMLGOSQ-BCz9KwUb.js} +1 -1
  215. package/out/phone/assets/{dagre-GXQ25YYZ-C0i7DPqX.js → dagre-GXQ25YYZ-CgFeNgh6.js} +1 -1
  216. package/out/phone/assets/desk-C_b7mE6l.js +2 -0
  217. package/out/phone/assets/{diagram-S7CK7UJ4-Bx-G5hYz.js → diagram-S7CK7UJ4-CwvaZIBf.js} +1 -1
  218. package/out/phone/assets/{diagram-UQ7AKVKN-DaTblkjV.js → diagram-UQ7AKVKN-DqnD4XoZ.js} +1 -1
  219. package/out/phone/assets/{diagram-VSXAHHWV-gmN2e1b4.js → diagram-VSXAHHWV-Kqc9GudQ.js} +1 -1
  220. package/out/phone/assets/{diagram-VX7I27RA-WYtRtOo8.js → diagram-VX7I27RA-B_0DLDQ0.js} +1 -1
  221. package/out/phone/assets/{diagram-Z3DM3KII-Cr6uUB5B.js → diagram-Z3DM3KII-CppKBEPW.js} +1 -1
  222. package/out/phone/assets/{ebnfDiagram-PWID7BFC-BCicfvpA.js → ebnfDiagram-PWID7BFC-DeYPNCu9.js} +1 -1
  223. package/out/phone/assets/{erDiagram-RLTQ6QDP-B3QlJvfQ.js → erDiagram-RLTQ6QDP-MsfxDUmk.js} +1 -1
  224. package/out/phone/assets/eventmodeling-NTZA5JFV-D4a6gbOs.js +1 -0
  225. package/out/phone/assets/flowDiagram-HODETNUW-BBTtB5oX.js +1 -0
  226. package/out/phone/assets/{ganttDiagram-EL5Y4UJY-LYy2mfCh.js → ganttDiagram-EL5Y4UJY-DaScS1os.js} +1 -1
  227. package/out/phone/assets/{gitGraph-4MIJSDKK-dT22Z2jG.js → gitGraph-4MIJSDKK-C-FzqpZm.js} +1 -1
  228. package/out/phone/assets/{gitGraphDiagram-WWUBYQGX-DHNdY57l.js → gitGraphDiagram-WWUBYQGX-4Yv-hAwf.js} +1 -1
  229. package/out/phone/assets/{info-A6RAGUB7-nIu8NSOs.js → info-A6RAGUB7-CGLEP4t7.js} +1 -1
  230. package/out/phone/assets/{infoDiagram-27XIBGKW-DGkWZIMT.js → infoDiagram-27XIBGKW-DapEgYQa.js} +1 -1
  231. package/out/phone/assets/{ishikawaDiagram-5VMMS53U-C8EPXru-.js → ishikawaDiagram-5VMMS53U-D1B2lZSG.js} +1 -1
  232. package/out/phone/assets/{journeyDiagram-3NMN7TZE-Dyd9L3l3.js → journeyDiagram-3NMN7TZE-BSAtMVJw.js} +1 -1
  233. package/out/phone/assets/{kanban-definition-UXKFOSKX-DehTYcsL.js → kanban-definition-UXKFOSKX-CfZ4oI7A.js} +1 -1
  234. package/out/phone/assets/{line-Db4SulF4.js → line-DAXmUM4p.js} +1 -1
  235. package/out/phone/assets/main-B0yD1pMI.js +1643 -0
  236. package/out/phone/assets/main-DNRbLxEx.css +1 -0
  237. package/out/phone/assets/{mermaid-parser.core-D7h_8WV8.js → mermaid-parser.core-IObm7oM0.js} +3 -3
  238. package/out/phone/assets/{mermaid.core-Dw_E5kj4.js → mermaid.core-C1wA-mhD.js} +4 -4
  239. package/out/phone/assets/{mindmap-definition-YA3MSWOX-_5Mxqxsy.js → mindmap-definition-YA3MSWOX-3ph0EaB9.js} +1 -1
  240. package/out/phone/assets/{packet-AYTQ26CC-_cgeMDdN.js → packet-AYTQ26CC-BbDAe9Au.js} +1 -1
  241. package/out/phone/assets/{pegDiagram-XKGWAZYB-BhBwaNEr.js → pegDiagram-XKGWAZYB-EsuDcX_3.js} +1 -1
  242. package/out/phone/assets/{pie-WAS4IAKB-BepY80_0.js → pie-WAS4IAKB-BQfIj1fu.js} +1 -1
  243. package/out/phone/assets/{pieDiagram-E7YTZNPT-CQQgqmI8.js → pieDiagram-E7YTZNPT-Cw19z5Ip.js} +1 -1
  244. package/out/phone/assets/{quadrantDiagram-AXDQQJYC-DEEatC1J.js → quadrantDiagram-AXDQQJYC-Bqwz_sa8.js} +1 -1
  245. package/out/phone/assets/{radar-RG4KPBEZ-BqsiI_qQ.js → radar-RG4KPBEZ-Dmp-89iD.js} +1 -1
  246. package/out/phone/assets/{railroad-74A4TZTK-C_2pEUjD.js → railroad-74A4TZTK-dq2H8w8Y.js} +1 -1
  247. package/out/phone/assets/railroad-abnf-HS5TGJTU-DddVaVQM.js +1 -0
  248. package/out/phone/assets/railroad-ebnf-LZEXJU2U-BjvyqMjh.js +1 -0
  249. package/out/phone/assets/railroad-peg-WCYAUIDC-lBl4CV1_.js +1 -0
  250. package/out/phone/assets/{railroadDiagram-O6MQD6OU-B7786u7W.js → railroadDiagram-O6MQD6OU-D2Sbc7Wn.js} +1 -1
  251. package/out/phone/assets/{requirementDiagram-BXWQKSXE-Ci3b5uwm.js → requirementDiagram-BXWQKSXE-CLNUqxbl.js} +1 -1
  252. package/out/phone/assets/{sankeyDiagram-P5KCCOFB-PwT2gJjH.js → sankeyDiagram-P5KCCOFB-Dme5iwcw.js} +1 -1
  253. package/out/phone/assets/{sequenceDiagram-WJ2MYXX4-H6sgB5RI.js → sequenceDiagram-WJ2MYXX4-C5dYSwPE.js} +1 -1
  254. package/out/phone/assets/{stateDiagram-D77RDMKH-BxyRe7OB.js → stateDiagram-D77RDMKH-BuxkPvJ6.js} +1 -1
  255. package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Exd8xDBD.js +1 -0
  256. package/out/phone/assets/storage-p-WxHA1h.js +1 -0
  257. package/out/phone/assets/{swimlanes-42K2YHIH-DWT3f1Hk.js → swimlanes-42K2YHIH-DHyXnytv.js} +1 -1
  258. package/out/phone/assets/swimlanesDiagram-VR7AAH4N-B62_42fO.js +8 -0
  259. package/out/phone/assets/{timeline-definition-24CTP7MA-D67esSVY.js → timeline-definition-24CTP7MA-Bm8Z0u2Z.js} +1 -1
  260. package/out/phone/assets/{treeView-Q6P3EWNA-BTIfu3Qr.js → treeView-Q6P3EWNA-DFUxvDDO.js} +1 -1
  261. package/out/phone/assets/{treemap-WGGIJYW6-DkPf6LQc.js → treemap-WGGIJYW6-CMC-hwzt.js} +1 -1
  262. package/out/phone/assets/{vennDiagram-4TSXK5OY-DRMRxJ4f.js → vennDiagram-4TSXK5OY-CNL4gZsd.js} +1 -1
  263. package/out/phone/assets/{wardley-WFR3VGLG-hOvC_8-W.js → wardley-WFR3VGLG-CHQoq9KJ.js} +1 -1
  264. package/out/phone/assets/{wardleyDiagram-VM6X3IG4-a5aYRgrw.js → wardleyDiagram-VM6X3IG4-DAuBfK1O.js} +1 -1
  265. package/out/phone/assets/{xychartDiagram-S5SC5T6Z-DXjoRFDL.js → xychartDiagram-S5SC5T6Z-B2T9ECKd.js} +1 -1
  266. package/out/phone/desk.html +2 -2
  267. package/out/phone/index.html +3 -3
  268. package/out/renderer/assets/{abnfDiagram-VCTEODGH-DhskujJf.js → abnfDiagram-VCTEODGH-gdhrQbX6.js} +1 -1
  269. package/out/renderer/assets/{arc-BcW67t47.js → arc-D6-Q4l2d.js} +1 -1
  270. package/out/renderer/assets/{architectureDiagram-5GKGNRK7-D-x057Ia.js → architectureDiagram-5GKGNRK7-C4y0SbLT.js} +1 -1
  271. package/out/renderer/assets/{blockDiagram-I7D4REHJ-DR3sZkhW.js → blockDiagram-I7D4REHJ-DrsoSFRK.js} +1 -1
  272. package/out/renderer/assets/{c4Diagram-7LVT6UL2-CQ4lScWs.js → c4Diagram-7LVT6UL2-1DD8BlM8.js} +1 -1
  273. package/out/renderer/assets/channel-Sck-tAAK.js +1 -0
  274. package/out/renderer/assets/{chunk-2Q5K7J3B-CtT0yqF3.js → chunk-2Q5K7J3B-DRyc0B7g.js} +1 -1
  275. package/out/renderer/assets/{chunk-5VM5RSS4-DlCfddrY.js → chunk-5VM5RSS4-BJe8SghE.js} +1 -1
  276. package/out/renderer/assets/{chunk-F27PBJKO-BAJ5dGzo.js → chunk-F27PBJKO-BIipq4SK.js} +1 -1
  277. package/out/renderer/assets/{chunk-IMKFNOWR-Dlah_YbP.js → chunk-IMKFNOWR-D5Ak3Xd9.js} +1 -1
  278. package/out/renderer/assets/{chunk-JWPE2WC7-BiXd3nUZ.js → chunk-JWPE2WC7-BcaWCpW-.js} +1 -1
  279. package/out/renderer/assets/{chunk-POPQ4Y6H-Ch86i4EJ.js → chunk-POPQ4Y6H-C1TwLrrN.js} +1 -1
  280. package/out/renderer/assets/{chunk-SVP7TREG-z3inDV-H.js → chunk-SVP7TREG-DDOXG_t3.js} +1 -1
  281. package/out/renderer/assets/{chunk-TICWLB2K-B34A2AKD.js → chunk-TICWLB2K-BqT15hZi.js} +1 -1
  282. package/out/renderer/assets/{chunk-XXDRQBXY-Do_L0wRR.js → chunk-XXDRQBXY-D01ts6SC.js} +1 -1
  283. package/out/renderer/assets/classDiagram-ZZMXUADV-DnB4QNNe.js +1 -0
  284. package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DnB4QNNe.js +1 -0
  285. package/out/renderer/assets/{cose-bilkent-JH36ORCC-BQraKmgl.js → cose-bilkent-JH36ORCC-C7NVrT2_.js} +1 -1
  286. package/out/renderer/assets/{cynefin-OW5HDTMX-BwixoR4r.js → cynefin-OW5HDTMX-2LxdFmSk.js} +1 -1
  287. package/out/renderer/assets/{cynefinDiagram-5FMLGOSQ-BLTBma3J.js → cynefinDiagram-5FMLGOSQ-_AN_Mulc.js} +1 -1
  288. package/out/renderer/assets/{cytoscape-fcose-BRpJ5tyq.js → cytoscape-fcose-COZkZZmX.js} +1 -1
  289. package/out/renderer/assets/{dagre-GXQ25YYZ-aWsjA_wn.js → dagre-GXQ25YYZ-BUTwlM6j.js} +1 -1
  290. package/out/renderer/assets/{diagram-S7CK7UJ4-Cur2zK4q.js → diagram-S7CK7UJ4-CseZZ-y2.js} +1 -1
  291. package/out/renderer/assets/{diagram-UQ7AKVKN-DlrY8YcD.js → diagram-UQ7AKVKN-Cb7llS-8.js} +1 -1
  292. package/out/renderer/assets/{diagram-VSXAHHWV-BBdjreqR.js → diagram-VSXAHHWV-CtuGqQvp.js} +1 -1
  293. package/out/renderer/assets/{diagram-VX7I27RA-XiWMdc8S.js → diagram-VX7I27RA-BA8eov-1.js} +1 -1
  294. package/out/renderer/assets/{diagram-Z3DM3KII-CBB5leat.js → diagram-Z3DM3KII-VZOjj6Hg.js} +1 -1
  295. package/out/renderer/assets/{ebnfDiagram-PWID7BFC-nl8RPo8j.js → ebnfDiagram-PWID7BFC-YBIrle6d.js} +1 -1
  296. package/out/renderer/assets/{erDiagram-RLTQ6QDP-C_oaG80x.js → erDiagram-RLTQ6QDP-BiKyPEqW.js} +1 -1
  297. package/out/renderer/assets/{flowDiagram-HODETNUW-nDoVZFS7.js → flowDiagram-HODETNUW-7wmZyLHw.js} +1 -1
  298. package/out/renderer/assets/{ganttDiagram-EL5Y4UJY-DOrcuM3Q.js → ganttDiagram-EL5Y4UJY-D4j4GJaT.js} +1 -1
  299. package/out/renderer/assets/{gitGraphDiagram-WWUBYQGX-D_DB3jro.js → gitGraphDiagram-WWUBYQGX-BqveM1NI.js} +1 -1
  300. package/out/renderer/assets/globals-C9M_MZZV.js +2539 -0
  301. package/out/renderer/assets/globals-l3kDGoYH.css +1 -0
  302. package/out/renderer/assets/index-BzSTiwH2.js +117 -0
  303. package/out/renderer/assets/{infoDiagram-27XIBGKW-BbBrANxo.js → infoDiagram-27XIBGKW-DLPLnIFP.js} +1 -1
  304. package/out/renderer/assets/{ishikawaDiagram-5VMMS53U-7UlfWlWV.js → ishikawaDiagram-5VMMS53U-48drIAMR.js} +1 -1
  305. package/out/renderer/assets/{journeyDiagram-3NMN7TZE-CJP9bosH.js → journeyDiagram-3NMN7TZE-vjigqUq_.js} +1 -1
  306. package/out/renderer/assets/{kanban-definition-UXKFOSKX-D772kW7T.js → kanban-definition-UXKFOSKX-CpsYVONZ.js} +1 -1
  307. package/out/renderer/assets/{layout-BzVfJEvx.js → layout-DqfoORoO.js} +1 -1
  308. package/out/renderer/assets/{linear-DBjhr05m.js → linear-CJzBBHcp.js} +1 -1
  309. package/out/renderer/assets/{mermaid.core-CJpNSowm.js → mermaid.core-DdrGP-Hn.js} +5 -5
  310. package/out/renderer/assets/{mindmap-definition-YA3MSWOX-C2oqlH5E.js → mindmap-definition-YA3MSWOX-D68tLNxp.js} +1 -1
  311. package/out/renderer/assets/{pegDiagram-XKGWAZYB-CcZ8Hae-.js → pegDiagram-XKGWAZYB-DkgLTcrv.js} +1 -1
  312. package/out/renderer/assets/{pieDiagram-E7YTZNPT-DTw-_k2D.js → pieDiagram-E7YTZNPT-bz5NuX1w.js} +1 -1
  313. package/out/renderer/assets/{quadrantDiagram-AXDQQJYC-D5eX0DO7.js → quadrantDiagram-AXDQQJYC-o_VKLyJA.js} +1 -1
  314. package/out/renderer/assets/{railroadDiagram-O6MQD6OU-DzpBB_Re.js → railroadDiagram-O6MQD6OU-Dkf03e07.js} +1 -1
  315. package/out/renderer/assets/{requirementDiagram-BXWQKSXE-UbOUXLgl.js → requirementDiagram-BXWQKSXE-CBUz_3YU.js} +1 -1
  316. package/out/renderer/assets/{sankeyDiagram-P5KCCOFB-jRbXLLsa.js → sankeyDiagram-P5KCCOFB-B0pjUr9g.js} +1 -1
  317. package/out/renderer/assets/{sequenceDiagram-WJ2MYXX4-s0WBQQPf.js → sequenceDiagram-WJ2MYXX4-ClugIL0e.js} +1 -1
  318. package/out/renderer/assets/settings-DvhrDn2q.js +34 -0
  319. package/out/renderer/assets/{sizeCapture-INFHLROL-DvUs5rDx.js → sizeCapture-INFHLROL-D6y0rctc.js} +1 -1
  320. package/out/renderer/assets/{stateDiagram-D77RDMKH-C1_V497y.js → stateDiagram-D77RDMKH-DiftQepS.js} +1 -1
  321. package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-DxB2-9tl.js +1 -0
  322. package/out/renderer/assets/{swimlanes-42K2YHIH-BulPeZ6y.js → swimlanes-42K2YHIH-DhuTjCNj.js} +1 -1
  323. package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-CYDUqExO.js +8 -0
  324. package/out/renderer/assets/{timeline-definition-24CTP7MA-gQ5OygZn.js → timeline-definition-24CTP7MA-CrXqgptd.js} +1 -1
  325. package/out/renderer/assets/{vennDiagram-4TSXK5OY-A8QyA5Ix.js → vennDiagram-4TSXK5OY-CDm8SO8U.js} +1 -1
  326. package/out/renderer/assets/{wardleyDiagram-VM6X3IG4-CfP6E41T.js → wardleyDiagram-VM6X3IG4-CxyunHwQ.js} +1 -1
  327. package/out/renderer/assets/{xychartDiagram-S5SC5T6Z-DTG5UHh7.js → xychartDiagram-S5SC5T6Z-CvC5YMSy.js} +1 -1
  328. package/out/renderer/index.html +3 -3
  329. package/out/renderer/plugin-view.html +39 -0
  330. package/out/renderer/settings.html +4 -4
  331. package/out/renderer/web-preload.js +1 -1
  332. package/out/server/agent.js +2022 -860
  333. package/out/server/chunks/{agent-BhQn6jGA.js → agent-_G_O-Cpa.js} +359 -227
  334. package/out/server/chunks/{gpuBackendInstall-CdExgjGi.js → gpuBackendInstall-Cb6TFh_8.js} +11 -9
  335. package/out/server/chunks/{loadProvider-BnkyjMSW.js → loadProvider-Be9Lu1Oi.js} +7 -20
  336. package/out/server/chunks/{manifest-2odvnxjZ.js → manifest-CB63GQ-i.js} +129 -6
  337. package/out/server/chunks/{workflowPresets-DqSsjOj6.js → workflowPresets-Djlp5LPV.js} +4004 -2054
  338. package/out/server/index.js +8251 -6660
  339. package/out/server/plugin-host.js +36 -26
  340. package/package.json +10 -10
  341. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-BWGCKOF4.js +0 -6
  342. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-44DLKSKE.js +0 -1234
  343. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-62VOPMLK.js +0 -65
  344. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-7O7QKK6A.js +0 -2
  345. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-CHWNPHIS.js +0 -82
  346. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NL4X6LBY.js +0 -4
  347. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-NZY7EIPA.js +0 -4
  348. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-R2EGYMOO.js +0 -7
  349. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-UKVNB6C4.js +0 -2
  350. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-USJZMAIR.js +0 -2
  351. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VOLAXWGI.js +0 -2
  352. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-QAWLOQSN.js +0 -10
  353. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-responses-MD3562FB.js +0 -4
  354. package/out/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-O76XM3OB.js +0 -2
  355. package/out/phone/assets/architecture-7GRP2DOG-CQOPTv6S.js +0 -1
  356. package/out/phone/assets/channel-DdXebl9x.js +0 -1
  357. package/out/phone/assets/classDiagram-ZZMXUADV-BCctWEp1.js +0 -1
  358. package/out/phone/assets/classDiagram-v2-VYDZK3BY-BCctWEp1.js +0 -1
  359. package/out/phone/assets/desk-mfuEW2n4.js +0 -2
  360. package/out/phone/assets/eventmodeling-NTZA5JFV-BtfapP6M.js +0 -1
  361. package/out/phone/assets/flowDiagram-HODETNUW-BsyiyBtD.js +0 -1
  362. package/out/phone/assets/main-Dv9ve8mT.css +0 -1
  363. package/out/phone/assets/main-uMMbioCA.js +0 -1638
  364. package/out/phone/assets/railroad-abnf-HS5TGJTU-TmODpceI.js +0 -1
  365. package/out/phone/assets/railroad-ebnf-LZEXJU2U-BTCjNR9u.js +0 -1
  366. package/out/phone/assets/railroad-peg-WCYAUIDC-DjhKNo8j.js +0 -1
  367. package/out/phone/assets/stateDiagram-v2-MP3YSRHH-Cncmf_cL.js +0 -1
  368. package/out/phone/assets/storage-D9RW_4__.js +0 -1
  369. package/out/phone/assets/swimlanesDiagram-VR7AAH4N-DAahG4fH.js +0 -8
  370. package/out/renderer/assets/channel-CudRig7z.js +0 -1
  371. package/out/renderer/assets/classDiagram-ZZMXUADV-DL20WkD0.js +0 -1
  372. package/out/renderer/assets/classDiagram-v2-VYDZK3BY-DL20WkD0.js +0 -1
  373. package/out/renderer/assets/globals-Bkw7iiQG.css +0 -1
  374. package/out/renderer/assets/globals-D1ocHHQV.js +0 -2533
  375. package/out/renderer/assets/index-Cm5iq85v.js +0 -117
  376. package/out/renderer/assets/settings-DxYo7s4h.js +0 -34
  377. package/out/renderer/assets/stateDiagram-v2-MP3YSRHH-C9dfLXR8.js +0 -1
  378. package/out/renderer/assets/swimlanesDiagram-VR7AAH4N-LXwy6qGO.js +0 -8
@@ -293,13 +293,20 @@ export class AgentSessionRuntime {
293
293
  await this.finishSessionReplacement();
294
294
  return { cancelled: false };
295
295
  }
296
+ /**
297
+ * Dispose the session for process exit. Also waits for credential writes in progress: an OAuth
298
+ * refresh may already have spent the old single-use refresh token, so exiting before the new one
299
+ * is saved would lose the login (#11692).
300
+ */
296
301
  async dispose() {
302
+ await this.session.abort();
297
303
  await emitSessionShutdownEvent(this.session.extensionRunner, {
298
304
  type: "session_shutdown",
299
305
  reason: "quit",
300
306
  });
301
307
  this.beforeSessionInvalidate?.();
302
308
  this.session.dispose();
309
+ await this.services.modelRuntime.settleCredentialWrites();
303
310
  }
304
311
  }
305
312
  /**
@@ -227,6 +227,7 @@ export declare class AgentSession {
227
227
  private _unsubscribeAgent?;
228
228
  private _eventListeners;
229
229
  private _isAgentRunActive;
230
+ private _promptPreflightCount;
230
231
  private _agentRunAbortRequested;
231
232
  private _idleWaitPromise;
232
233
  private _resolveIdleWait;
@@ -234,6 +235,8 @@ export declare class AgentSession {
234
235
  private _steeringMessages;
235
236
  /** Tracks pending follow-up messages for UI display. Removed when delivered. */
236
237
  private _followUpMessages;
238
+ /** Queued user messages whose images are normalized when they are delivered. */
239
+ private _queuedMessagesWithImages;
237
240
  /** Messages queued to be included with the next user prompt as context ("asides"). */
238
241
  private _pendingNextTurnMessages;
239
242
  /** Context-only custom messages queued during a run, flushed once the current turn's tool results are in. */
@@ -314,14 +317,23 @@ export declare class AgentSession {
314
317
  * model. Under a virtual selection, that is the physical model that produced it.
315
318
  */
316
319
  private _modelForMessage;
320
+ /** Record the live model and thinking level on the current branch, so a resume restores them. */
321
+ private _recordSelection;
317
322
  /**
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
+ * Record the model on the current branch when the branch implies another one. Tree navigation
324
+ * can leave the latest `model_change` on another branch; responses cannot record a virtual
325
+ * selection because they name physical models. Responses do record a physical selection unless
326
+ * the branch holds a virtual one; checking a physical selection against responses would record
327
+ * it on every prompt while `prepareRequest` redirects to another model.
323
328
  */
324
- private _recordSelection;
329
+ private _recordModelSelection;
330
+ /**
331
+ * Record the thinking level on the current branch when the branch implies another one (#11451).
332
+ * Tree navigation can leave the latest `thinking_level_change` on another branch. The recorded
333
+ * level is compared after clamping to the current model, so a level clamped on resume (e.g.
334
+ * `xhigh` running as `high`) is not recorded over the requested one.
335
+ */
336
+ private _recordThinkingLevel;
325
337
  /** The model whose limits apply to the conversation. */
326
338
  private _limitsModel;
327
339
  /**
@@ -556,6 +568,11 @@ export declare class AgentSession {
556
568
  * @throws Error if no model selected or no API key available (when not streaming)
557
569
  */
558
570
  prompt(text: string, options?: PromptOptions): Promise<void>;
571
+ /**
572
+ * Run input hooks, expand templates, queue while streaming, and validate model and auth.
573
+ * Returns the run trigger, or undefined when the prompt was handled or queued.
574
+ */
575
+ private _preparePrompt;
559
576
  /**
560
577
  * Try to execute an extension command. Returns true if command was found and executed.
561
578
  */
@@ -598,6 +615,8 @@ export declare class AgentSession {
598
615
  * Internal: Queue a follow-up message (already expanded, no extension command check).
599
616
  */
600
617
  private _queueFollowUp;
618
+ /** Replace a queued user message's images in place with normalized ones, appending hints to its text. */
619
+ private _normalizeQueuedMessageImages;
601
620
  /**
602
621
  * Throw an error if the text is an extension command.
603
622
  */
@@ -89,6 +89,20 @@ function estimateMessagesTokens(messages) {
89
89
  // ============================================================================
90
90
  // AgentSession Class
91
91
  // ============================================================================
92
+ /**
93
+ * Index of the model to cycle to, or undefined when there is nothing to switch to.
94
+ * When the current model is not in the list (currentIndex -1), forward picks the first
95
+ * entry and backward the last, so a one-entry list still selects its only model.
96
+ */
97
+ function getNextCycleIndex(currentIndex, length, direction) {
98
+ if (length === 0)
99
+ return undefined;
100
+ if (currentIndex === -1)
101
+ return direction === "forward" ? 0 : length - 1;
102
+ if (length === 1)
103
+ return undefined;
104
+ return direction === "forward" ? (currentIndex + 1) % length : (currentIndex - 1 + length) % length;
105
+ }
92
106
  export class AgentSession {
93
107
  agent;
94
108
  sessionManager;
@@ -98,6 +112,7 @@ export class AgentSession {
98
112
  _unsubscribeAgent;
99
113
  _eventListeners = [];
100
114
  _isAgentRunActive = false;
115
+ _promptPreflightCount = 0;
101
116
  _agentRunAbortRequested = false;
102
117
  _idleWaitPromise;
103
118
  _resolveIdleWait;
@@ -105,6 +120,8 @@ export class AgentSession {
105
120
  _steeringMessages = [];
106
121
  /** Tracks pending follow-up messages for UI display. Removed when delivered. */
107
122
  _followUpMessages = [];
123
+ /** Queued user messages whose images are normalized when they are delivered. */
124
+ _queuedMessagesWithImages = new WeakSet();
108
125
  /** Messages queued to be included with the next user prompt as context ("asides"). */
109
126
  _pendingNextTurnMessages = [];
110
127
  /** Context-only custom messages queued during a run, flushed once the current turn's tool results are in. */
@@ -299,19 +316,25 @@ export class AgentSession {
299
316
  return this._modelRuntime.getPhysicalModel(message.provider, message.model);
300
317
  return model?.provider === message.provider && model.id === message.model ? model : undefined;
301
318
  }
319
+ /** Record the live model and thinking level on the current branch, so a resume restores them. */
320
+ _recordSelection() {
321
+ const branch = this.sessionManager.getBranch();
322
+ this._recordModelSelection(branch);
323
+ this._recordThinkingLevel(branch);
324
+ }
302
325
  /**
303
- * Record the selection on the current branch when the branch implies another one, so a resume
304
- * restores it. Tree navigation can leave the latest `model_change` on another branch; responses
305
- * cannot record a virtual selection because they name physical models. Responses do record a
306
- * physical selection unless the branch holds a virtual one; checking a physical selection against
307
- * responses would record it on every prompt while `prepareRequest` redirects to another model.
326
+ * Record the model on the current branch when the branch implies another one. Tree navigation
327
+ * can leave the latest `model_change` on another branch; responses cannot record a virtual
328
+ * selection because they name physical models. Responses do record a physical selection unless
329
+ * the branch holds a virtual one; checking a physical selection against responses would record
330
+ * it on every prompt while `prepareRequest` redirects to another model.
308
331
  */
309
- _recordSelection() {
332
+ _recordModelSelection(branch) {
310
333
  const model = this.model;
311
334
  if (!model)
312
335
  return;
313
336
  const getModel = (provider, modelId) => this._modelRuntime.getModel(provider, modelId);
314
- const recorded = getBranchSelection(this.sessionManager.getBranch(), getModel);
337
+ const recorded = getBranchSelection(branch, getModel);
315
338
  if (!recorded || (recorded.provider === model.provider && recorded.modelId === model.id))
316
339
  return;
317
340
  const recordedModel = getModel(recorded.provider, recorded.modelId);
@@ -319,6 +342,25 @@ export class AgentSession {
319
342
  return;
320
343
  this.sessionManager.appendModelChange(model.provider, model.id);
321
344
  }
345
+ /**
346
+ * Record the thinking level on the current branch when the branch implies another one (#11451).
347
+ * Tree navigation can leave the latest `thinking_level_change` on another branch. The recorded
348
+ * level is compared after clamping to the current model, so a level clamped on resume (e.g.
349
+ * `xhigh` running as `high`) is not recorded over the requested one.
350
+ */
351
+ _recordThinkingLevel(branch) {
352
+ const recorded = branch.findLast((entry) => entry.type === "thinking_level_change");
353
+ if (!recorded)
354
+ return;
355
+ const recordedLevel = recorded.thinkingLevel;
356
+ const availableLevels = this.getAvailableThinkingLevels();
357
+ const effective = availableLevels.includes(recordedLevel)
358
+ ? recordedLevel
359
+ : this._clampThinkingLevel(recordedLevel, availableLevels);
360
+ if (effective === this.thinkingLevel)
361
+ return;
362
+ this.sessionManager.appendThinkingLevelChange(this.thinkingLevel);
363
+ }
322
364
  /** The model whose limits apply to the conversation. */
323
365
  _limitsModel() {
324
366
  return this.routedModel?.model ?? this.model;
@@ -744,21 +786,25 @@ export class AgentSession {
744
786
  if (event.type === "message_start" && event.message.role === "user") {
745
787
  this._overflowRecoveryAttempted = false;
746
788
  const messageText = contentText(event.message.content, "");
747
- if (messageText) {
748
- // Check steering queue first
749
- const steeringIndex = this._steeringMessages.indexOf(messageText);
750
- if (steeringIndex !== -1) {
751
- this._steeringMessages.splice(steeringIndex, 1);
789
+ // Check steering queue first
790
+ const steeringIndex = this._steeringMessages.indexOf(messageText);
791
+ if (steeringIndex !== -1) {
792
+ this._steeringMessages.splice(steeringIndex, 1);
793
+ this._emitQueueUpdate();
794
+ }
795
+ else {
796
+ // Check follow-up queue
797
+ const followUpIndex = this._followUpMessages.indexOf(messageText);
798
+ if (followUpIndex !== -1) {
799
+ this._followUpMessages.splice(followUpIndex, 1);
752
800
  this._emitQueueUpdate();
753
801
  }
754
- else {
755
- // Check follow-up queue
756
- const followUpIndex = this._followUpMessages.indexOf(messageText);
757
- if (followUpIndex !== -1) {
758
- this._followUpMessages.splice(followUpIndex, 1);
759
- this._emitQueueUpdate();
760
- }
761
- }
802
+ }
803
+ // Normalize queued images at delivery, before events and persistence see the message,
804
+ // so they get the same resize as idle prompts with the current model's limits (#11738).
805
+ if (this._queuedMessagesWithImages.has(event.message)) {
806
+ this._queuedMessagesWithImages.delete(event.message);
807
+ await this._normalizeQueuedMessageImages(event.message);
762
808
  }
763
809
  }
764
810
  // Emit to extensions first, then notify public listeners.
@@ -1663,14 +1709,34 @@ export class AgentSession {
1663
1709
  return;
1664
1710
  }
1665
1711
  }
1666
- if (this._compactionAbortController !== undefined) {
1712
+ if (this._compactionAbortController !== undefined || this._branchSummaryAbortController !== undefined) {
1667
1713
  throw new Error("Cannot submit a prompt while compaction is in progress. Wait for compaction to finish and retry.");
1668
1714
  }
1715
+ // Reserve the context through async input hooks and auth checks so tree navigation cannot
1716
+ // start meanwhile (#9154). _startRun marks the run active synchronously, so there is no gap.
1717
+ this._promptPreflightCount++;
1718
+ let trigger;
1719
+ try {
1720
+ trigger = await this._preparePrompt(text, options);
1721
+ }
1722
+ finally {
1723
+ this._promptPreflightCount--;
1724
+ }
1725
+ if (trigger)
1726
+ await this._startRun(trigger, () => preflightResult?.("started"));
1727
+ }
1728
+ /**
1729
+ * Run input hooks, expand templates, queue while streaming, and validate model and auth.
1730
+ * Returns the run trigger, or undefined when the prompt was handled or queued.
1731
+ */
1732
+ async _preparePrompt(text, options) {
1733
+ const expandPromptTemplates = options?.expandPromptTemplates ?? true;
1734
+ const preflightResult = options?.preflightResult;
1669
1735
  // Emit input event for extension interception (before skill/template expansion)
1670
1736
  const processedInput = await this._runInputHandlers(text, options?.images, options?.source ?? "interactive", this.isStreaming ? options?.streamingBehavior : undefined);
1671
1737
  if (!processedInput) {
1672
1738
  preflightResult?.("handled");
1673
- return;
1739
+ return undefined;
1674
1740
  }
1675
1741
  const { text: currentText, images: currentImages } = processedInput;
1676
1742
  // Expand skill commands (/skill:name args) and prompt templates (/template args)
@@ -1691,7 +1757,7 @@ export class AgentSession {
1691
1757
  await this._queueSteer(expandedText, currentImages);
1692
1758
  }
1693
1759
  preflightResult?.("queued");
1694
- return;
1760
+ return undefined;
1695
1761
  }
1696
1762
  // Validate model
1697
1763
  if (!this.model) {
@@ -1708,7 +1774,7 @@ export class AgentSession {
1708
1774
  }
1709
1775
  throw new Error(formatNoApiKeyFoundMessage(this.model.provider));
1710
1776
  }
1711
- await this._startRun({ messageType: "user", prompt: expandedText, images: currentImages }, () => preflightResult?.("started"));
1777
+ return { messageType: "user", prompt: expandedText, images: currentImages };
1712
1778
  }
1713
1779
  /**
1714
1780
  * Try to execute an extension command. Returns true if command was found and executed.
@@ -1817,11 +1883,10 @@ export class AgentSession {
1817
1883
  if (images) {
1818
1884
  content.push(...images);
1819
1885
  }
1820
- this.agent.steer({
1821
- role: "user",
1822
- content,
1823
- timestamp: Date.now(),
1824
- });
1886
+ const message = { role: "user", content, timestamp: Date.now() };
1887
+ if (images?.length)
1888
+ this._queuedMessagesWithImages.add(message);
1889
+ this.agent.steer(message);
1825
1890
  }
1826
1891
  /**
1827
1892
  * Internal: Queue a follow-up message (already expanded, no extension command check).
@@ -1833,7 +1898,26 @@ export class AgentSession {
1833
1898
  if (images) {
1834
1899
  content.push(...images);
1835
1900
  }
1836
- this.agent.followUp({ role: "user", content, timestamp: Date.now() });
1901
+ const message = { role: "user", content, timestamp: Date.now() };
1902
+ if (images?.length)
1903
+ this._queuedMessagesWithImages.add(message);
1904
+ this.agent.followUp(message);
1905
+ }
1906
+ /** Replace a queued user message's images in place with normalized ones, appending hints to its text. */
1907
+ async _normalizeQueuedMessageImages(message) {
1908
+ if (typeof message.content === "string")
1909
+ return;
1910
+ const [first, ...rest] = message.content;
1911
+ if (first?.type !== "text")
1912
+ return;
1913
+ const images = rest.filter((block) => block.type === "image");
1914
+ const normalized = await this._normalizePromptImages(images);
1915
+ const text = normalized.hints.length > 0 ? `${first.text}\n\n${normalized.hints.join("\n")}` : first.text;
1916
+ message.content = [
1917
+ { type: "text", text },
1918
+ ...rest.filter((block) => block.type !== "image"),
1919
+ ...normalized.images,
1920
+ ];
1837
1921
  }
1838
1922
  /**
1839
1923
  * Throw an error if the text is an extension command.
@@ -2070,14 +2154,11 @@ export class AgentSession {
2070
2154
  async _cycleScopedModel(direction, options) {
2071
2155
  const availableIds = new Set(this._modelRuntime.getAvailableSnapshot().map((model) => `${model.provider}\0${model.id}`));
2072
2156
  const scopedModels = this._scopedModels.filter((scoped) => availableIds.has(`${scoped.model.provider}\0${scoped.model.id}`));
2073
- if (scopedModels.length <= 1)
2074
- return undefined;
2075
2157
  const currentModel = this.model;
2076
- let currentIndex = scopedModels.findIndex((sm) => modelsAreEqual(sm.model, currentModel));
2077
- if (currentIndex === -1)
2078
- currentIndex = 0;
2079
- const len = scopedModels.length;
2080
- const nextIndex = direction === "forward" ? (currentIndex + 1) % len : (currentIndex - 1 + len) % len;
2158
+ const currentIndex = scopedModels.findIndex((sm) => modelsAreEqual(sm.model, currentModel));
2159
+ const nextIndex = getNextCycleIndex(currentIndex, scopedModels.length, direction);
2160
+ if (nextIndex === undefined)
2161
+ return undefined;
2081
2162
  const next = scopedModels[nextIndex];
2082
2163
  const thinkingLevel = this._getThinkingLevelForModelSwitch(next.model, next.thinkingLevel);
2083
2164
  // Apply model
@@ -2098,14 +2179,11 @@ export class AgentSession {
2098
2179
  }
2099
2180
  async _cycleAvailableModel(direction, options) {
2100
2181
  const availableModels = this._modelRuntime.getAvailableSnapshot();
2101
- if (availableModels.length <= 1)
2102
- return undefined;
2103
2182
  const currentModel = this.model;
2104
- let currentIndex = availableModels.findIndex((m) => modelsAreEqual(m, currentModel));
2105
- if (currentIndex === -1)
2106
- currentIndex = 0;
2107
- const len = availableModels.length;
2108
- const nextIndex = direction === "forward" ? (currentIndex + 1) % len : (currentIndex - 1 + len) % len;
2183
+ const currentIndex = availableModels.findIndex((m) => modelsAreEqual(m, currentModel));
2184
+ const nextIndex = getNextCycleIndex(currentIndex, availableModels.length, direction);
2185
+ if (nextIndex === undefined)
2186
+ return undefined;
2109
2187
  const nextModel = availableModels[nextIndex];
2110
2188
  const thinkingLevel = this._getThinkingLevelForModelSwitch(nextModel);
2111
2189
  this.agent.state.model = nextModel;
@@ -3014,6 +3092,12 @@ export class AgentSession {
3014
3092
  });
3015
3093
  }
3016
3094
  async reload(options) {
3095
+ if (this.isStreaming) {
3096
+ throw new Error("Wait for the current response to finish before reloading.");
3097
+ }
3098
+ if (this.isCompacting) {
3099
+ throw new Error("Wait for compaction to finish before reloading.");
3100
+ }
3017
3101
  const oldRunner = this._extensionRunner;
3018
3102
  const previousFlagValues = oldRunner.getFlagValues();
3019
3103
  await emitSessionShutdownEvent(oldRunner, { type: "session_shutdown", reason: "reload" });
@@ -3277,7 +3361,7 @@ export class AgentSession {
3277
3361
  * @returns Result with editorText (if user message) and cancelled status
3278
3362
  */
3279
3363
  async navigateTree(targetId, options = {}) {
3280
- if (this.isStreaming) {
3364
+ if (this.isStreaming || this._promptPreflightCount > 0) {
3281
3365
  throw new Error("Wait for the current response to finish before navigating the session tree.");
3282
3366
  }
3283
3367
  if (this.isCompacting) {
@@ -3313,7 +3397,8 @@ export class AgentSession {
3313
3397
  label,
3314
3398
  };
3315
3399
  // Set up abort controller for summarization
3316
- this._branchSummaryAbortController = new AbortController();
3400
+ const abortController = new AbortController();
3401
+ this._branchSummaryAbortController = abortController;
3317
3402
  try {
3318
3403
  let extensionSummary;
3319
3404
  let fromExtension = false;
@@ -3322,7 +3407,7 @@ export class AgentSession {
3322
3407
  const result = (await this._extensionRunner.emit({
3323
3408
  type: "session_before_tree",
3324
3409
  preparation,
3325
- signal: this._branchSummaryAbortController.signal,
3410
+ signal: abortController.signal,
3326
3411
  }));
3327
3412
  if (result?.cancel) {
3328
3413
  return { cancelled: true };
@@ -3347,7 +3432,7 @@ export class AgentSession {
3347
3432
  let summaryDetails;
3348
3433
  let summaryUsage;
3349
3434
  if (options.summarize && entriesToSummarize.length > 0 && !extensionSummary) {
3350
- const signal = this._branchSummaryAbortController.signal;
3435
+ const signal = abortController.signal;
3351
3436
  const branchSummarySettings = this.settingsManager.getBranchSummarySettings();
3352
3437
  const result = await generateBranchSummary(entriesToSummarize, {
3353
3438
  ...(await this._getSummarizationRequestAuth(this.model, signal)),
@@ -3421,7 +3506,8 @@ export class AgentSession {
3421
3506
  // Update finalized context from the canonical session projection.
3422
3507
  this._refreshFinalizedContext();
3423
3508
  this._restoreToolsFromTranscript();
3424
- // Emit session_tree event
3509
+ // The selected context is installed; session_tree handlers may now prompt or navigate again.
3510
+ this._branchSummaryAbortController = undefined;
3425
3511
  await this._extensionRunner.emit({
3426
3512
  type: "session_tree",
3427
3513
  newLeafId: this.sessionManager.getLeafId(),
@@ -3433,7 +3519,10 @@ export class AgentSession {
3433
3519
  return { editorText, cancelled: false, summaryEntry };
3434
3520
  }
3435
3521
  finally {
3436
- this._branchSummaryAbortController = undefined;
3522
+ // A navigation started from session_tree owns the controller now; do not clear it.
3523
+ if (this._branchSummaryAbortController === abortController) {
3524
+ this._branchSummaryAbortController = undefined;
3525
+ }
3437
3526
  this._resolveIdleWaitIfIdle();
3438
3527
  }
3439
3528
  }
@@ -47,7 +47,8 @@ export class FileAuthStorageBackend {
47
47
  const delayMs = 20;
48
48
  for (let attempt = 1;; attempt++) {
49
49
  try {
50
- return lockfile.lockSync(path, { realpath: false });
50
+ // Lock the resolved file so symlinked aliases of auth.json share one lock (#11655).
51
+ return lockfile.lockSync(path);
51
52
  }
52
53
  catch (error) {
53
54
  if (!getRetryableLockErrorCode(error) || attempt === maxAttempts)
@@ -88,8 +89,8 @@ export class FileAuthStorageBackend {
88
89
  signal?.throwIfAborted();
89
90
  let release;
90
91
  try {
92
+ // Lock the resolved file so symlinked aliases of auth.json share one lock (#11655).
91
93
  release = await lockfile.lock(this.authPath, {
92
- realpath: false,
93
94
  retries: 0,
94
95
  stale: staleMs,
95
96
  onCompromised,
@@ -19,6 +19,7 @@ import { DEFAULT_MAX_BYTES, truncateTail } from "./tools/truncate.js";
19
19
  export async function executeBashWithOperations(command, cwd, operations, options) {
20
20
  const outputChunks = [];
21
21
  let outputBytes = 0;
22
+ let discardedOutput = false;
22
23
  const maxOutputBytes = DEFAULT_MAX_BYTES * 2;
23
24
  let tempFilePath;
24
25
  let tempFileStream;
@@ -54,6 +55,7 @@ export async function executeBashWithOperations(command, cwd, operations, option
54
55
  while (outputBytes > maxOutputBytes && outputChunks.length > 1) {
55
56
  const removed = outputChunks.shift();
56
57
  outputBytes -= removed.length;
58
+ discardedOutput = true;
57
59
  }
58
60
  // Stream to callback
59
61
  if (options?.onChunk) {
@@ -94,7 +96,7 @@ export async function executeBashWithOperations(command, cwd, operations, option
94
96
  output: truncationResult.truncated ? truncationResult.content : fullOutput,
95
97
  exitCode: cancelled ? undefined : (exitCode ?? undefined),
96
98
  cancelled,
97
- truncated: truncationResult.truncated,
99
+ truncated: discardedOutput || truncationResult.truncated,
98
100
  fullOutputPath: tempFilePath,
99
101
  };
100
102
  }
@@ -1,41 +1,8 @@
1
- import { type Api, type Context, type Model, type ModelsSimpleStreamOptions, type SimpleStreamOptions } from "@earendil-works/pi-ai";
1
+ import { type Api, type CacheWarmingAction, type CacheWarmingDecision, type Context, type Model, type ModelsSimpleStreamOptions } from "@earendil-works/pi-ai";
2
2
  import type { ModelRuntime } from "./model-runtime.ts";
3
3
  import type { SessionManager, UsageEntry } from "./session-manager.ts";
4
4
  import type { CacheWarmingMode } from "./settings-manager.ts";
5
- /** Refresh at 90% of the TTL while preserving at least ten seconds of margin. */
6
- export declare function getCacheWarmingDelayMs(ttlMs: number): number | undefined;
7
- /**
8
- * Lifetime of the prompt cache entry a request writes, from the model's
9
- * `promptCache` tier for the retention the request used. Undefined when the
10
- * model has no lifetime for that tier or caching is off.
11
- */
12
- export declare function getPromptCacheTtlMs(model: Model<Api>, options: SimpleStreamOptions | undefined): number | undefined;
13
- /**
14
- * Whether replaying the request with a one-token output cap leaves its cache
15
- * entry untouched. Anthropic's budget-based thinking (Claude models without
16
- * adaptive thinking) derives `budget_tokens` from `max_tokens`; the replay
17
- * would get a different budget, which Anthropic keys the message cache on,
18
- * and the model could still think for thousands of tokens.
19
- */
20
- export declare function isReplayable(model: Model<Api>, options: SimpleStreamOptions | undefined): boolean;
21
- export type CacheWarmingAction = "warm" | "stop";
22
- /** Inputs and outcome of one warm-or-stop decision, as shown by `/session`. */
23
- export interface CacheWarmingDecision {
24
- /** "streaming" while the agent run that sent the request is still active. */
25
- phase: "streaming" | "idle";
26
- /** Price of this refresh: a cache read of the prompt plus one output token. */
27
- warmCost: number;
28
- /** Extra price of the next real request if the cache entry is lost. */
29
- missCost: number;
30
- /** Estimated chance that a real request arrives before the entry expires. */
31
- continuationProbability: number;
32
- /** `continuationProbability * missCost - warmCost`. */
33
- expectedSavings: number;
34
- /** False when the prompt size or the model's prices are unknown. */
35
- economicsAvailable: boolean;
36
- /** Pi's decision: "warm" when `expectedSavings` is at least $0.05. */
37
- action: CacheWarmingAction;
38
- }
5
+ export type { CacheWarmingAction, CacheWarmingDecision };
39
6
  /**
40
7
  * Fired before each refresh with pi's decision filled in. Everything else an
41
8
  * extension might want (model, idle state, context size) is on the context.
@@ -98,6 +65,6 @@ export declare class CacheWarmer {
98
65
  }
99
66
  /** One-line status for `/session`. */
100
67
  export declare function formatCacheWarmingStatus(status: CacheWarmingStatus, now?: number): string;
101
- /** One-line transcript text for persisted cache-warming usage. */
102
- export declare function formatCacheWarmingUsage(entry: UsageEntry): string;
68
+ /** One-line transcript text for the total cost of one or more consecutive cache warms. */
69
+ export declare function formatCacheWarmingUsage(totalCost: number, note?: string): string;
103
70
  //# sourceMappingURL=cache-warmer.d.ts.map