@entelligentsia/forgecli 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/CHANGELOG-pi.md +56 -0
  3. package/dist/extensions/forgecli/mcp-bridge/grove.d.ts +38 -0
  4. package/dist/extensions/forgecli/mcp-bridge/grove.js +88 -2
  5. package/dist/extensions/forgecli/mcp-bridge/grove.js.map +1 -1
  6. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.d.ts +26 -2
  7. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.js +68 -13
  8. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.js.map +1 -1
  9. package/dist/extensions/forgecli/mcp-bridge/mcp-bridge.js +13 -2
  10. package/dist/extensions/forgecli/mcp-bridge/mcp-bridge.js.map +1 -1
  11. package/dist/extensions/forgecli/mcp-bridge/mcp-session.d.ts +3 -3
  12. package/dist/extensions/forgecli/mcp-bridge/mcp-session.js +3 -6
  13. package/dist/extensions/forgecli/mcp-bridge/mcp-session.js.map +1 -1
  14. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +3 -1
  15. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  16. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +10 -1
  17. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  18. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  19. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +4 -6
  20. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  21. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  22. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +20 -2
  23. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  24. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  25. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  26. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -14
  27. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  28. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  29. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -5
  30. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  31. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  32. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +2 -1
  33. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  34. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  35. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +2 -1
  36. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  37. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  38. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +61 -41
  39. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  40. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  41. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +8 -3
  42. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  43. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  44. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +2 -14
  45. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  46. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.d.ts.map +1 -1
  47. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +2 -1
  48. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  49. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +15 -45
  50. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  51. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -45
  52. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  53. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +461 -22
  54. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  55. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +140 -0
  56. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts.map +1 -1
  57. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +141 -4
  58. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js.map +1 -1
  59. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +20 -0
  60. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts.map +1 -1
  61. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +18 -0
  62. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js.map +1 -1
  63. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts +21 -0
  64. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts.map +1 -1
  65. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +18 -0
  66. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js.map +1 -1
  67. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +21 -0
  68. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts.map +1 -1
  69. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +18 -0
  70. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js.map +1 -1
  71. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +10 -5
  72. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts.map +1 -1
  73. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +4 -3
  74. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js.map +1 -1
  75. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +82 -0
  76. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts.map +1 -1
  77. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +57 -0
  78. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js.map +1 -1
  79. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts.map +1 -1
  80. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
  81. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js.map +1 -1
  82. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts +1 -1
  83. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts.map +1 -1
  84. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +4 -4
  85. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js.map +1 -1
  86. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts +1 -1
  87. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts.map +1 -1
  88. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +4 -4
  89. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js.map +1 -1
  90. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts.map +1 -1
  91. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +5 -5
  92. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js.map +1 -1
  93. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +88 -0
  94. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts.map +1 -1
  95. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +75 -2
  96. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js.map +1 -1
  97. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +33 -15
  98. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +1 -1
  99. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +101 -84
  100. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +1 -1
  101. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts.map +1 -1
  102. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +2 -2
  103. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js.map +1 -1
  104. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +44 -0
  105. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts.map +1 -1
  106. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +41 -4
  107. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js.map +1 -1
  108. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts.map +1 -1
  109. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +12 -12
  110. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js.map +1 -1
  111. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts.map +1 -1
  112. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +12 -12
  113. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js.map +1 -1
  114. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts.map +1 -1
  115. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +12 -12
  116. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js.map +1 -1
  117. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts.map +1 -1
  118. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +15 -15
  119. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js.map +1 -1
  120. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts +25 -0
  121. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -0
  122. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +109 -0
  123. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -0
  124. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts +2 -0
  125. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
  126. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +15 -2
  127. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
  128. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  129. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +3 -2
  130. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  131. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -0
  132. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  133. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -0
  134. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  135. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  136. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -0
  137. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  138. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  139. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +56 -0
  140. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +6 -1
  141. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  142. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +39 -15
  143. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  144. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  145. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +13 -5
  146. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  147. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
  148. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +5 -8
  149. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
  150. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  151. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  152. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  153. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  154. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +6 -0
  155. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  156. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +2 -1
  157. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  158. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +33 -1
  159. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  160. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +16 -2
  161. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  162. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  163. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.d.ts.map +1 -1
  164. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +28 -1
  165. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js.map +1 -1
  166. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +10 -0
  167. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  168. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +14 -17
  169. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  170. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -1
  171. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +0 -10
  172. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -1
  173. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts +20 -1
  174. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  175. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +87 -68
  176. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  177. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +3 -0
  178. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  179. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +8 -0
  180. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  181. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  182. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +20 -5
  183. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  184. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  185. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +2 -2
  186. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  187. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +3 -2
  188. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  189. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
  190. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  191. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts +3 -1
  192. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  193. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +15 -7
  194. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
  195. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts +19 -0
  196. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
  197. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +52 -0
  198. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js.map +1 -0
  199. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  200. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  201. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +13 -1
  202. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  203. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts +28 -0
  204. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
  205. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +60 -0
  206. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js.map +1 -0
  207. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts +6 -2
  208. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  209. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +18 -5
  210. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
  211. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +10 -10
  212. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  213. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +143 -130
  214. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  215. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts +15 -0
  216. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  217. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +14 -0
  218. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js.map +1 -1
  219. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  220. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +16 -0
  221. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  222. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +26 -0
  223. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  224. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
  225. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  226. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +7 -0
  227. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  228. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +55 -8
  229. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +58 -0
  230. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +28 -0
  231. package/node_modules/@earendil-works/pi-coding-agent/docs/session-format.md +18 -8
  232. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -0
  233. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +1 -0
  234. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  235. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  236. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/entry-renderer.ts +41 -0
  237. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  238. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  239. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -0
  240. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  241. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  242. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -12
  243. package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
  244. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  245. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -5,7 +5,13 @@ All notable changes to `@entelligentsia/forgecli` are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [1.1.2] — 2026-07-02
8
+ ## [1.1.3] — 2026-07-05
9
+
10
+ ### Changed
11
+
12
+ - **Vendored pi runtime upgraded 0.80.2 → 0.80.3** (weekly upstream sync; 54 commits since 2026-06-28). The bundled `@earendil-works/pi-coding-agent` moves `0.80.2-forge.1` → `0.80.3-forge.1`; siblings `pi-tui` / `pi-ai` / `pi-agent-core` move `0.80.2` → `0.80.3`. Pulls in upstream fixes: Cloudflare 524 retry + device-code polling backoff, stale Codex websocket session rotation, Bedrock prompt caching for Claude 5, DS4 context-overflow detection, bash-timeout validation (reject non-positive / oversized), split-turn compaction-summary serialization, configurable assistant output padding, session-entry renderers, and refreshed provider/model catalogs.
13
+
14
+
9
15
 
10
16
  ### Fixed
11
17
 
@@ -4,10 +4,66 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - Added public SDK exports for CLI-equivalent model and scoped-model resolution ([#6201](https://github.com/earendil-works/pi/issues/6201)).
8
+ - Added extension entry renderers for persisted display-only session entries that are rendered in interactive mode without being sent to the model context.
9
+
10
+ ### Fixed
11
+
12
+ - Fixed startup model selection to skip unauthenticated saved defaults so configured local custom models can be selected instead ([#6231](https://github.com/earendil-works/pi/issues/6231)).
13
+ - Fixed Escape aborts to clear runs stuck in extension context hooks that ignore abort signals ([#6234](https://github.com/earendil-works/pi/issues/6234)).
14
+ - Fixed the question extension example to run question tool calls sequentially so multiple questions in one assistant turn remain answerable ([#6189](https://github.com/earendil-works/pi/issues/6189)).
15
+ - Fixed `/login` to report auth storage persistence failures instead of claiming credentials were saved when `auth.json` is locked ([#6223](https://github.com/earendil-works/pi/issues/6223)).
16
+ - Fixed split-turn compaction to serialize summary requests so single-concurrency local providers do not fail with 429 errors ([#5536](https://github.com/earendil-works/pi/issues/5536)).
17
+ - Fixed custom session entries appended during assistant streaming to render before the live assistant message, matching persisted session order.
18
+ - Fixed oversized bash tool timeouts to fail with a clear validation error instead of being clamped to an immediate timeout ([#6181](https://github.com/earendil-works/pi/issues/6181)).
19
+ - Fixed the edit tool schema to allow model-invented extra replacement fields instead of rejecting otherwise valid edits ([#6278](https://github.com/earendil-works/pi/issues/6278)).
20
+
21
+ ### Removed
22
+
23
+ - Removed default attribution headers from Vercel AI Gateway requests.
24
+
25
+ ## [0.80.3] - 2026-06-30
26
+
27
+ ### New Features
28
+
29
+ - **Anthropic Claude Sonnet 5 support** - Claude Sonnet 5 is available through inherited Anthropic-compatible and Bedrock provider catalogs with adaptive thinking enabled. See [Providers](docs/providers.md) and [Model Options](docs/usage.md#model-options).
30
+ - **Configurable output spacing** - `outputPad` controls horizontal padding for user messages, assistant messages, and thinking blocks. See [Settings](docs/settings.md#ui--display).
31
+ - **External editor configuration** - `externalEditor` lets Ctrl+G use a configured editor before `$VISUAL`/`$EDITOR` fallbacks. See [Settings](docs/settings.md#ui--display) and [Keybindings](docs/keybindings.md).
32
+ - **Richer RPC session tree access** - RPC clients can inspect session entries and tree snapshots with `get_entries` and `get_tree`. See [get_entries](docs/rpc.md#get_entries) and [get_tree](docs/rpc.md#get_tree).
33
+ - **Extension session metadata updates** - Extensions can observe session name changes through `session_info_changed`. See [session_info_changed](docs/extensions.md#session_info_changed).
34
+ - **Modern Azure Foundry endpoint support** - Azure OpenAI Responses provider setup supports current Microsoft Foundry endpoint URLs. See [Azure OpenAI](docs/providers.md#azure-openai).
35
+
36
+ ### Added
37
+
38
+ - Added inherited Anthropic Claude Sonnet 5 model support.
39
+ - Added `get_entries` and `get_tree` RPC commands for reading session entries and tree snapshots over RPC ([#6078](https://github.com/earendil-works/pi/pull/6078) by [@geraschenko](https://github.com/geraschenko)).
40
+ - Added a package `./rpc-entry` export for launching Pi directly in RPC mode.
41
+ - Added session-name change events for extensions ([#6175](https://github.com/earendil-works/pi/pull/6175) by [@xl0](https://github.com/xl0)).
42
+ - Added inherited Azure OpenAI Responses support for modern Microsoft Foundry endpoint URLs ([#6004](https://github.com/earendil-works/pi/pull/6004) by [@gukoff](https://github.com/gukoff)).
43
+ - Added inherited `Usage.reasoning` token counts for providers that report reasoning/thinking token usage ([#6057](https://github.com/earendil-works/pi/issues/6057)).
7
44
  - Added an `externalEditor` settings.json override for Ctrl+G external editor commands, with default fallbacks to Notepad on Windows and `nano` elsewhere ([#6122](https://github.com/earendil-works/pi/issues/6122)).
45
+ - Added an `outputPad` setting for user message, assistant message, and thinking horizontal padding ([#6168](https://github.com/earendil-works/pi/issues/6168)).
46
+
47
+ ### Changed
48
+
49
+ - Changed the default OpenAI model to `gpt-5.5`.
50
+ - Changed inherited OpenAI Codex Responses SSE response-header waits to use the configured HTTP timeout instead of the previous fixed 20 second timeout, reducing false timeouts on slow connections ([#4945](https://github.com/earendil-works/pi/issues/4945)).
8
51
 
9
52
  ### Fixed
10
53
 
54
+ - Fixed inherited Claude Sonnet 5 metadata to use adaptive thinking payloads for Anthropic-compatible and Bedrock requests.
55
+ - Fixed inherited generated Xiaomi MiMo model pricing to match current pay-as-you-go pricing from models.dev ([#6138](https://github.com/earendil-works/pi/issues/6138)).
56
+ - Fixed inherited provider HTTP errors to include response bodies instead of opaque SDK messages ([#5832](https://github.com/earendil-works/pi/pull/5832) by [@stephanmck](https://github.com/stephanmck)).
57
+ - Fixed inherited `streamSimple()` max-token caps so providers that count input and output against one context window do not reject long requests ([#5595](https://github.com/earendil-works/pi/issues/5595)).
58
+ - Fixed inherited OpenAI Responses streams to preserve reasoning replay state when output items finish out of order ([#6009](https://github.com/earendil-works/pi/issues/6009)).
59
+ - Fixed inherited Z.AI preserved thinking requests to send `thinking.clear_thinking: false` when thinking is enabled, allowing replayed `reasoning_content` to participate in provider caching ([#6083](https://github.com/earendil-works/pi/issues/6083)).
60
+ - Fixed pre-prompt compaction to stop after compaction instead of continuing immediately ([#6074](https://github.com/earendil-works/pi/pull/6074) by [@yzhg1983](https://github.com/yzhg1983)).
61
+ - Fixed resource notifications to stay before messages when resuming sessions ([#6048](https://github.com/earendil-works/pi/pull/6048) by [@haoqixu](https://github.com/haoqixu)).
62
+ - Fixed startup benchmark timing output to print after TUI shutdown, preserve extension timings, and drain terminal-query replies before stopping benchmark mode ([#6030](https://github.com/earendil-works/pi/pull/6030) by [@xl0](https://github.com/xl0), [#6063](https://github.com/earendil-works/pi/pull/6063) by [@xl0](https://github.com/xl0)).
63
+ - Fixed extension tool changes to apply before the next provider request in the same agent run without dropping `before_agent_start` system-prompt overrides ([#6162](https://github.com/earendil-works/pi/issues/6162)).
64
+ - Fixed a crash when undici emits an internal client error while terminating a mid-stream HTTP response ([#6133](https://github.com/earendil-works/pi/issues/6133)).
65
+ - Fixed the compaction event regression test to cover status indicator cleanup and keep CI passing.
66
+ - Fixed interactive status indicators so ending work, retry, compaction, or branch-summary indicators no longer shrink the TUI when clear-on-shrink is enabled ([#6026](https://github.com/earendil-works/pi/pull/6026)).
11
67
  - Fixed `--session` and `SessionManager.open()` to reject non-empty invalid session files without overwriting them ([#6002](https://github.com/earendil-works/pi/issues/6002)).
12
68
  - Fixed user-message transcript rendering to keep visible backslashes in Markdown escape sequences such as `\"` ([#6105](https://github.com/earendil-works/pi/issues/6105)).
13
69
  - Fixed assistant messages stopped by output length to show a visible incomplete-response error ([#4290](https://github.com/earendil-works/pi/issues/4290)).
@@ -1,5 +1,30 @@
1
1
  import { type McpAttachment } from "./mcp-bridge.js";
2
2
  export declare const GROVE_TOOL_PREFIX = "mcp__grove__";
3
+ export declare const GROVE_EXPLORE_TOOL = "mcp__grove__explore";
4
+ /**
5
+ * True when the project was provisioned for grove's delegated local-LLM mode
6
+ * (`grove init --as mcp-llm`). The signal is the same predicate grove itself
7
+ * keys on internally (`determine_surface` in grove's `cli/src/mcp.rs`): the
8
+ * presence of `.grove/explore.json`. forge-cli mirrors grove's own surface
9
+ * decision rather than inventing a parallel one — provisioning stays the user's
10
+ * job (grove's interactive `init --as mcp-llm` TUI), forge-cli only detects it.
11
+ */
12
+ export declare function isGroveExploreProject(cwd: string): boolean;
13
+ /**
14
+ * Decide whether to attach grove in explore-mode for this session.
15
+ *
16
+ * - An explicit `explore` override (from AttachGroveOptions) always wins.
17
+ * - `FORGE_GROVE_NO_EXPLORE=1` forces the standard structural surface even in a
18
+ * provisioned explore project (escape hatch, mirrors FORGE_GROVE_NO_AUTOINIT).
19
+ * - Otherwise: explore-mode iff the project has `.grove/explore.json`.
20
+ *
21
+ * Note this only decides which surface to *ask* grove for. Grove's own health
22
+ * probe has the final say: `serve --explore` with a down local LLM transparently
23
+ * falls back to the 7 structural tools, and the bridge registers whatever grove
24
+ * actually advertised — so a stale/unavailable explore config still degrades
25
+ * cleanly with no extra logic here.
26
+ */
27
+ export declare function shouldUseExplore(cwd: string, explicit?: boolean): boolean;
3
28
  /**
4
29
  * The grove code-navigation steering block — injected ONCE into the system
5
30
  * prompt (via project-orientation, which reaches both the main thread and
@@ -9,6 +34,13 @@ export declare const GROVE_TOOL_PREFIX = "mcp__grove__";
9
34
  * `promptGuidelines` are deliberately NOT used — pi concatenates them across
10
35
  * every active tool with no cross-tool dedup, so a shared block would repeat
11
36
  * once per grove tool.
37
+ *
38
+ * The block branches on the ACTUAL discovered roster, not on the requested mode:
39
+ * if grove served its explore-mode surface (`mcp__grove__explore` present) the
40
+ * locator steering is emitted; otherwise the structural procedure. Because grove
41
+ * falls back to the 7 structural tools when the local LLM is down, keying off the
42
+ * real roster keeps the steering honest even when explore was requested but
43
+ * couldn't be served.
12
44
  */
13
45
  export declare function buildGroveSteering(toolNames: string[]): string;
14
46
  /**
@@ -55,6 +87,12 @@ export interface AttachGroveOptions {
55
87
  autoInit?: boolean;
56
88
  /** Per-call request timeout for grove tools (default 15s). */
57
89
  requestTimeoutMs?: number;
90
+ /**
91
+ * Force explore-mode (`grove serve --explore`) on/off. Undefined (default)
92
+ * auto-detects via `shouldUseExplore`: explore-mode iff the project has
93
+ * `.grove/explore.json` and FORGE_GROVE_NO_EXPLORE isn't set.
94
+ */
95
+ explore?: boolean;
58
96
  }
59
97
  /**
60
98
  * Attach grove to a pi session: detect → (optionally) provision → spawn
@@ -22,6 +22,49 @@ import { attachMcpServer } from "./mcp-bridge.js";
22
22
  // existing steering drives the model straight onto the bridge, rather than to a
23
23
  // `grove` CLI fallback that the skill assumes when MCP tools are absent.
24
24
  export const GROVE_TOOL_PREFIX = "mcp__grove__";
25
+ // The single delegating tool grove exposes in explore-mode (`grove serve
26
+ // --explore`). When it appears in the discovered roster, the project is running
27
+ // grove's local-LLM delegation surface and the outer model gets ONE locator tool
28
+ // instead of the 7 structural tools.
29
+ export const GROVE_EXPLORE_TOOL = `${GROVE_TOOL_PREFIX}explore`;
30
+ // Idle (per-progress) timeout for explore-mode calls. The delegated local-LLM
31
+ // loop runs multiple turns; grove emits `notifications/progress` per turn, which
32
+ // the transport uses to reset this timer. So this bounds the gap BETWEEN progress
33
+ // events (a single hung turn), not the whole call — generous enough for a slow
34
+ // local model, still short enough to catch a genuinely dead provider.
35
+ const GROVE_EXPLORE_IDLE_TIMEOUT_MS = 120_000;
36
+ /**
37
+ * True when the project was provisioned for grove's delegated local-LLM mode
38
+ * (`grove init --as mcp-llm`). The signal is the same predicate grove itself
39
+ * keys on internally (`determine_surface` in grove's `cli/src/mcp.rs`): the
40
+ * presence of `.grove/explore.json`. forge-cli mirrors grove's own surface
41
+ * decision rather than inventing a parallel one — provisioning stays the user's
42
+ * job (grove's interactive `init --as mcp-llm` TUI), forge-cli only detects it.
43
+ */
44
+ export function isGroveExploreProject(cwd) {
45
+ return existsSync(path.join(cwd, ".grove", "explore.json"));
46
+ }
47
+ /**
48
+ * Decide whether to attach grove in explore-mode for this session.
49
+ *
50
+ * - An explicit `explore` override (from AttachGroveOptions) always wins.
51
+ * - `FORGE_GROVE_NO_EXPLORE=1` forces the standard structural surface even in a
52
+ * provisioned explore project (escape hatch, mirrors FORGE_GROVE_NO_AUTOINIT).
53
+ * - Otherwise: explore-mode iff the project has `.grove/explore.json`.
54
+ *
55
+ * Note this only decides which surface to *ask* grove for. Grove's own health
56
+ * probe has the final say: `serve --explore` with a down local LLM transparently
57
+ * falls back to the 7 structural tools, and the bridge registers whatever grove
58
+ * actually advertised — so a stale/unavailable explore config still degrades
59
+ * cleanly with no extra logic here.
60
+ */
61
+ export function shouldUseExplore(cwd, explicit) {
62
+ if (explicit !== undefined)
63
+ return explicit;
64
+ if (process.env.FORGE_GROVE_NO_EXPLORE === "1")
65
+ return false;
66
+ return isGroveExploreProject(cwd);
67
+ }
25
68
  /**
26
69
  * The grove code-navigation steering block — injected ONCE into the system
27
70
  * prompt (via project-orientation, which reaches both the main thread and
@@ -31,8 +74,18 @@ export const GROVE_TOOL_PREFIX = "mcp__grove__";
31
74
  * `promptGuidelines` are deliberately NOT used — pi concatenates them across
32
75
  * every active tool with no cross-tool dedup, so a shared block would repeat
33
76
  * once per grove tool.
77
+ *
78
+ * The block branches on the ACTUAL discovered roster, not on the requested mode:
79
+ * if grove served its explore-mode surface (`mcp__grove__explore` present) the
80
+ * locator steering is emitted; otherwise the structural procedure. Because grove
81
+ * falls back to the 7 structural tools when the local LLM is down, keying off the
82
+ * real roster keeps the steering honest even when explore was requested but
83
+ * couldn't be served.
34
84
  */
35
85
  export function buildGroveSteering(toolNames) {
86
+ if (toolNames.includes(GROVE_EXPLORE_TOOL)) {
87
+ return buildGroveExploreSteering();
88
+ }
36
89
  const available = toolNames.length > 0 ? toolNames.join(", ") : "mcp__grove__*";
37
90
  return [
38
91
  "## Code navigation — use grove",
@@ -49,6 +102,30 @@ export function buildGroveSteering(toolNames) {
49
102
  "for call sites and go-to-def; `mcp__grove__check` after an edit.",
50
103
  ].join("\n");
51
104
  }
105
+ /**
106
+ * Steering for grove's delegated explore-mode surface: a single `explore` tool
107
+ * backed by a local LLM. It is a code LOCATOR — ask ONE narrow where-is question,
108
+ * get `file:line` citations back — not a broad task runner. Framed to match
109
+ * grove's own locator instructions so the model engages it rather than bypassing
110
+ * it with a broad grep.
111
+ */
112
+ function buildGroveExploreSteering() {
113
+ return [
114
+ "## Code navigation — use grove explore",
115
+ "",
116
+ `This project runs grove in explore-mode: a single \`${GROVE_EXPLORE_TOOL}\` tool,`,
117
+ "backed by a local LLM, is your code-navigation surface. It is a LOCATOR — it",
118
+ "finds WHERE code lives and returns `file:line` citations, not a whole answer.",
119
+ "",
120
+ "For any where-is / what-defines / who-calls question, reach for it FIRST.",
121
+ "Ask ONE narrow, single-focus question per call (e.g. \"where is the API-key",
122
+ "health check defined\"), not a broad multi-part task. Best flow: a few narrow",
123
+ `\`${GROVE_EXPLORE_TOOL}\` calls to locate the pieces → \`read\` those exact`,
124
+ "`file:line` spans → synthesize. `grep` / `rg` / reading whole files blind are",
125
+ "fallbacks, used only after explore has been tried and returned insufficient",
126
+ "content.",
127
+ ].join("\n");
128
+ }
52
129
  /**
53
130
  * Resolve a usable grove binary, or null if none works.
54
131
  * Precedence: explicit arg → FORGE_GROVE_BIN env → `grove` on PATH.
@@ -115,15 +192,24 @@ export async function attachGrove(opts) {
115
192
  });
116
193
  if (!readiness.bin)
117
194
  return null;
195
+ // A `--as mcp-llm` project asked for grove's delegated local-LLM surface;
196
+ // mirror grove's own decision and spawn `serve --explore`. Grove health-probes
197
+ // the local backend and falls back to the 7 structural tools if it's down, so
198
+ // this is safe even when the configured LLM isn't currently running.
199
+ const explore = shouldUseExplore(opts.cwd, opts.explore);
200
+ const args = explore ? ["serve", "--explore"] : ["serve"];
201
+ // Explore delegates to a local LLM over many turns; give it a wide idle window
202
+ // (reset per progress notification). Structural calls keep the default.
203
+ const requestTimeoutMs = opts.requestTimeoutMs ?? (explore ? GROVE_EXPLORE_IDLE_TIMEOUT_MS : undefined);
118
204
  try {
119
205
  // No per-tool promptGuidelines — steering is injected once via
120
206
  // buildGroveSteering → project-orientation (reaches main + subagents).
121
207
  return await attachMcpServer({
122
208
  command: readiness.bin,
123
- args: ["serve"],
209
+ args,
124
210
  cwd: opts.cwd,
125
211
  namePrefix: opts.namePrefix ?? GROVE_TOOL_PREFIX,
126
- requestTimeoutMs: opts.requestTimeoutMs,
212
+ requestTimeoutMs,
127
213
  });
128
214
  }
129
215
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"grove.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/mcp-bridge/grove.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,0EAA0E;AAC1E,wEAAwE;AACxE,EAAE;AACF,gFAAgF;AAChF,0EAA0E;AAC1E,iFAAiF;AACjF,8EAA8E;AAC9E,qCAAqC;AAErC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAsB,MAAM,iBAAiB,CAAC;AAEtE,mFAAmF;AACnF,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,gFAAgF;AAChF,yEAAyE;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,cAAc,CAAC;AAEhD;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAmB;IACrD,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;IAChF,OAAO;QACN,gCAAgC;QAChC,EAAE;QACF,uE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 +14,13 @@ export interface JsonRpcStdioOptions {
14
14
  /** Called for each stderr chunk (diagnostics). */
15
15
  onStderr?: (chunk: string) => void;
16
16
  }
17
+ /** Payload of an MCP `notifications/progress` message. */
18
+ export interface ProgressNotification {
19
+ progressToken: number | string;
20
+ progress?: number;
21
+ total?: number;
22
+ message?: string;
23
+ }
17
24
  /**
18
25
  * A live JSON-RPC 2.0 session over a child process's stdio.
19
26
  *
@@ -33,14 +40,31 @@ export declare class JsonRpcStdioClient {
33
40
  constructor(opts: JsonRpcStdioOptions);
34
41
  /** Spawn the child and begin reading responses. */
35
42
  start(): void;
36
- /** Send a request and await its result. Rejects on error / timeout / exit. */
37
- request(method: string, params?: unknown): Promise<unknown>;
43
+ /**
44
+ * Send a request and await its result. Rejects on error / timeout / exit.
45
+ * `onProgress`, if given, fires for each `notifications/progress` the server
46
+ * emits for this request (and each one also resets the inactivity timer).
47
+ */
48
+ request(method: string, params?: unknown, onProgress?: (p: ProgressNotification) => void): Promise<unknown>;
49
+ /**
50
+ * Return a shallow copy of `params` with `_meta.progressToken` set to `token`,
51
+ * without mutating the caller's object. MCP reserves `params._meta` for this;
52
+ * servers that don't emit progress simply ignore it.
53
+ */
54
+ private withProgressToken;
38
55
  /** Fire-and-forget notification (no id, no response expected). */
39
56
  notify(method: string, params?: unknown): void;
40
57
  /** Close stdin and terminate the child; rejects any stragglers. */
41
58
  close(): Promise<void>;
42
59
  private onStdout;
43
60
  private dispatch;
61
+ /**
62
+ * Handle a server-initiated notification. Only `notifications/progress` is
63
+ * actioned: it restarts the inactivity timer of the request whose
64
+ * `progressToken` it carries (the request id we assigned), turning the flat
65
+ * request deadline into an idle timeout that survives long, live operations.
66
+ */
67
+ private onNotification;
44
68
  private fail;
45
69
  private rejectAll;
46
70
  }
@@ -66,32 +66,64 @@ export class JsonRpcStdioClient {
66
66
  }
67
67
  });
68
68
  }
69
- /** Send a request and await its result. Rejects on error / timeout / exit. */
70
- request(method, params) {
69
+ /**
70
+ * Send a request and await its result. Rejects on error / timeout / exit.
71
+ * `onProgress`, if given, fires for each `notifications/progress` the server
72
+ * emits for this request (and each one also resets the inactivity timer).
73
+ */
74
+ request(method, params, onProgress) {
71
75
  if (!this.child)
72
76
  return Promise.reject(new Error("client not started"));
73
77
  if (this.exited) {
74
78
  return Promise.reject(this.exitError ?? new Error("client closed"));
75
79
  }
76
80
  const id = this.nextId++;
77
- const payload = JSON.stringify({ jsonrpc: "2.0", id, method, params }) + "\n";
81
+ // Opt into MCP progress: servers emit `notifications/progress` keyed off
82
+ // this token. We use the request id itself so a progress notification maps
83
+ // straight back to its pending entry. Without a token grove never emits
84
+ // progress and a long delegated call dies at the flat deadline.
85
+ const withMeta = this.withProgressToken(params, id);
86
+ const payload = JSON.stringify({ jsonrpc: "2.0", id, method, params: withMeta }) + "\n";
78
87
  return new Promise((resolve, reject) => {
79
- const timer = setTimeout(() => {
80
- this.pending.delete(id);
81
- reject(new Error(`request "${method}" timed out after ${this.timeoutMs}ms`));
82
- }, this.timeoutMs);
83
- // Don't let a pending timer hold the process open.
84
- timer.unref?.();
85
- this.pending.set(id, { resolve, reject, timer });
88
+ const pending = {
89
+ resolve,
90
+ reject,
91
+ method,
92
+ onProgress,
93
+ timer: undefined,
94
+ reset: () => {
95
+ clearTimeout(pending.timer);
96
+ pending.timer = setTimeout(() => {
97
+ this.pending.delete(id);
98
+ reject(new Error(`request "${method}" timed out after ${this.timeoutMs}ms without activity`));
99
+ }, this.timeoutMs);
100
+ // Don't let a pending timer hold the process open.
101
+ pending.timer.unref?.();
102
+ },
103
+ };
104
+ pending.reset();
105
+ this.pending.set(id, pending);
86
106
  this.child.stdin.write(payload, (err) => {
87
107
  if (err) {
88
108
  this.pending.delete(id);
89
- clearTimeout(timer);
109
+ clearTimeout(pending.timer);
90
110
  reject(err);
91
111
  }
92
112
  });
93
113
  });
94
114
  }
115
+ /**
116
+ * Return a shallow copy of `params` with `_meta.progressToken` set to `token`,
117
+ * without mutating the caller's object. MCP reserves `params._meta` for this;
118
+ * servers that don't emit progress simply ignore it.
119
+ */
120
+ withProgressToken(params, token) {
121
+ const base = params && typeof params === "object" ? params : {};
122
+ const meta = base._meta && typeof base._meta === "object"
123
+ ? base._meta
124
+ : {};
125
+ return { ...base, _meta: { ...meta, progressToken: token } };
126
+ }
95
127
  /** Fire-and-forget notification (no id, no response expected). */
96
128
  notify(method, params) {
97
129
  if (!this.child || this.exited)
@@ -141,9 +173,12 @@ export class JsonRpcStdioClient {
141
173
  // Non-JSON line (a server log to stdout); ignore.
142
174
  return;
143
175
  }
144
- // Notifications / server-initiated messages carry no id we issued.
145
- if (msg.id === undefined || msg.id === null)
176
+ // Notifications / server-initiated messages carry no id we issued — a
177
+ // progress notification refreshes its request's inactivity timer.
178
+ if (msg.id === undefined || msg.id === null) {
179
+ this.onNotification(msg);
146
180
  return;
181
+ }
147
182
  if (typeof msg.id !== "number")
148
183
  return;
149
184
  const pending = this.pending.get(msg.id);
@@ -157,6 +192,26 @@ export class JsonRpcStdioClient {
157
192
  }
158
193
  pending.resolve(msg.result);
159
194
  }
195
+ /**
196
+ * Handle a server-initiated notification. Only `notifications/progress` is
197
+ * actioned: it restarts the inactivity timer of the request whose
198
+ * `progressToken` it carries (the request id we assigned), turning the flat
199
+ * request deadline into an idle timeout that survives long, live operations.
200
+ */
201
+ onNotification(msg) {
202
+ if (msg.method !== "notifications/progress")
203
+ return;
204
+ const params = msg.params;
205
+ const token = params?.progressToken;
206
+ if (typeof token !== "number")
207
+ return;
208
+ const pending = this.pending.get(token);
209
+ if (!pending)
210
+ return;
211
+ pending.reset();
212
+ if (params)
213
+ pending.onProgress?.(params);
214
+ }
160
215
  fail(err) {
161
216
  if (!this.exitError)
162
217
  this.exitError = err;
@@ -1 +1 @@
1
- {"version":3,"file":"json-rpc-stdio.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/mcp-bridge/json-rpc-stdio.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,gFAAgF;AAChF,+EA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AI,CAAC,SAAS;YAAE,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;QAC1C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAEO,SAAS,CAAC,GAAU;QAC3B,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACD"}
@@ -33,9 +33,20 @@ export function buildToolDefinition(session, descriptor, opts) {
33
33
  // Pass the MCP JSON Schema straight through — see header note.
34
34
  parameters: (descriptor.inputSchema ?? { type: "object", properties: {} }),
35
35
  promptGuidelines: opts.promptGuidelines,
36
- async execute(_toolCallId, params, signal) {
36
+ async execute(_toolCallId, params, signal, onUpdate) {
37
37
  try {
38
- const result = await session.callTool(descriptor.name, (params ?? {}), signal);
38
+ // Surface the server's progress notifications as live tool updates so
39
+ // the user sees liveness during a long call (e.g. grove's delegated
40
+ // explore, which reports "turn 2/7 · …" per inner-loop turn) instead
41
+ // of a silent wait. Partial updates carry text only; the final result
42
+ // still comes from the resolved call below.
43
+ const onProgress = onUpdate
44
+ ? (p) => {
45
+ const text = p.message ?? `working (${p.progress ?? "?"}/${p.total ?? "?"})`;
46
+ onUpdate({ content: [{ type: "text", text }], details: {} });
47
+ }
48
+ : undefined;
49
+ const result = await session.callTool(descriptor.name, (params ?? {}), signal, onProgress);
39
50
  return {
40
51
  content: toToolContent(result.content, result.isError ? "tool error" : "OK"),
41
52
  details: {},
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-bridge.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/mcp-bridge/mcp-bridge.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,qEAAqE;AACrE,wEAAwE;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,CAAC;QAC3B,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACtF,OAAO;YACN,KAAK;YACL,SAAS,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACnC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,OAAO;YACP,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE;SAC9B,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC7C,MAAM,GAAG,CAAC;IACX,CAAC;AACF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type JsonRpcStdioOptions } from "./json-rpc-stdio.js";
1
+ import { type JsonRpcStdioOptions, type ProgressNotification } from "./json-rpc-stdio.js";
2
2
  /** One tool as advertised by an MCP server's tools/list. */
3
3
  export interface McpToolDescriptor {
4
4
  name: string;
@@ -32,7 +32,7 @@ export interface McpSession {
32
32
  readonly serverInfo?: McpServerInfo;
33
33
  initialize(): Promise<void>;
34
34
  listTools(): Promise<McpToolDescriptor[]>;
35
- callTool(name: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<McpCallResult>;
35
+ callTool(name: string, args: Record<string, unknown>, signal?: AbortSignal, onProgress?: (p: ProgressNotification) => void): Promise<McpCallResult>;
36
36
  close(): Promise<void>;
37
37
  }
38
38
  /** McpSession backed by a spawned stdio child (e.g. `grove serve`). */
@@ -43,6 +43,6 @@ export declare class StdioMcpSession implements McpSession {
43
43
  constructor(opts: JsonRpcStdioOptions);
44
44
  initialize(): Promise<void>;
45
45
  listTools(): Promise<McpToolDescriptor[]>;
46
- callTool(name: string, args: Record<string, unknown>, signal?: AbortSignal): Promise<McpCallResult>;
46
+ callTool(name: string, args: Record<string, unknown>, signal?: AbortSignal, onProgress?: (p: ProgressNotification) => void): Promise<McpCallResult>;
47
47
  close(): Promise<void>;
48
48
  }
@@ -5,7 +5,7 @@
5
5
  // framing grove's `serve` mode speaks. Deliberately tiny: discovery + call,
6
6
  // nothing else. The `McpSession` interface is what synthesizeTools() depends on,
7
7
  // so tests can inject a fake without spawning a process.
8
- import { JsonRpcStdioClient } from "./json-rpc-stdio.js";
8
+ import { JsonRpcStdioClient, } from "./json-rpc-stdio.js";
9
9
  const MCP_PROTOCOL_VERSION = "2024-11-05";
10
10
  /** McpSession backed by a spawned stdio child (e.g. `grove serve`). */
11
11
  export class StdioMcpSession {
@@ -33,13 +33,10 @@ export class StdioMcpSession {
33
33
  const result = (await this.client.request("tools/list", {}));
34
34
  return Array.isArray(result?.tools) ? result.tools : [];
35
35
  }
36
- async callTool(name, args, signal) {
36
+ async callTool(name, args, signal, onProgress) {
37
37
  if (signal?.aborted)
38
38
  throw new Error("aborted");
39
- const result = (await this.client.request("tools/call", {
40
- name,
41
- arguments: args ?? {},
42
- }));
39
+ const result = (await this.client.request("tools/call", { name, arguments: args ?? {} }, onProgress));
43
40
  return {
44
41
  content: Array.isArray(result?.content) ? result.content : [],
45
42
  isError: result?.isError === true,
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-session.js","sourceRoot":"","sources":["../../../../src/extensions/forgecli/mcp-bridge/mcp-session.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,EAAE;AACF,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,iFAAiF;AACjF,yDAAyD;AAEzD,OAAO,EAAE,kBAAkB,EAA4B,MAAM,qBAAqB,CAAC;AAEnF,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAsC1C,uEAAuE;AACvE,MAAM,OAAO,eAAe;IACV,MAAM,CAAqB;IACpC,WAAW,GAAG,KAA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,CAAC;QACnC,gEAAgE;QAChE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,SAAS;QACd,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAE1D,CAAC;QACF,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,QAAQ,CACb,IAAY,EACZ,IAA6B,EAC7B,MAAoB,EACpB,UAA8C;QAE9C,IAAI,MAAM,EAAE,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;QAChD,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACxC,YAAY,EACZ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,EAC/B,UAAU,CACV,CAAkB,CAAC;QACpB,OAAO;YACN,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YAC7D,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI;SACjC,CAAC;IACH,CAAC;IAED,KAAK;QACJ,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;CACD"}
@@ -1,5 +1,5 @@
1
1
  import { type ImageContent, type Message, type SimpleStreamOptions, type ThinkingBudgets, type Transport } from "@earendil-works/pi-ai/compat";
2
- import type { AfterToolCallContext, AfterToolCallResult, AgentEvent, AgentLoopTurnUpdate, AgentMessage, AgentState, BeforeToolCallContext, BeforeToolCallResult, QueueMode, StreamFn, ToolExecutionMode } from "./types.ts";
2
+ import type { AfterToolCallContext, AfterToolCallResult, AgentEvent, AgentLoopTurnUpdate, AgentMessage, AgentState, BeforeToolCallContext, BeforeToolCallResult, PrepareNextTurnContext, QueueMode, StreamFn, ToolExecutionMode } from "./types.ts";
3
3
  export type { QueueMode } from "./types.ts";
4
4
  /** Options for constructing an {@link Agent}. */
5
5
  export interface AgentOptions {
@@ -13,6 +13,7 @@ export interface AgentOptions {
13
13
  beforeToolCall?: (context: BeforeToolCallContext, signal?: AbortSignal) => Promise<BeforeToolCallResult | undefined>;
14
14
  afterToolCall?: (context: AfterToolCallContext, signal?: AbortSignal) => Promise<AfterToolCallResult | undefined>;
15
15
  prepareNextTurn?: (signal?: AbortSignal) => Promise<AgentLoopTurnUpdate | undefined> | AgentLoopTurnUpdate | undefined;
16
+ prepareNextTurnWithContext?: (context: PrepareNextTurnContext, signal?: AbortSignal) => Promise<AgentLoopTurnUpdate | undefined> | AgentLoopTurnUpdate | undefined;
16
17
  steeringMode?: QueueMode;
17
18
  followUpMode?: QueueMode;
18
19
  sessionId?: string;
@@ -41,6 +42,7 @@ export declare class Agent {
41
42
  beforeToolCall?: (context: BeforeToolCallContext, signal?: AbortSignal) => Promise<BeforeToolCallResult | undefined>;
42
43
  afterToolCall?: (context: AfterToolCallContext, signal?: AbortSignal) => Promise<AfterToolCallResult | undefined>;
43
44
  prepareNextTurn?: (signal?: AbortSignal) => Promise<AgentLoopTurnUpdate | undefined> | AgentLoopTurnUpdate | undefined;
45
+ prepareNextTurnWithContext?: (context: PrepareNextTurnContext, signal?: AbortSignal) => Promise<AgentLoopTurnUpdate | undefined> | AgentLoopTurnUpdate | undefined;
44
46
  private activeRun?;
45
47
  /** Session identifier forwarded to providers for cache-aware backends. */
46
48
  sessionId?: string;