@entelligentsia/forgecli 1.1.0 → 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 (284) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +4 -0
  3. package/dist/CHANGELOG-forge-plugin.md +114 -0
  4. package/dist/CHANGELOG-pi.md +56 -0
  5. package/dist/extensions/forgecli/forge-subagent.js +58 -0
  6. package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
  7. package/dist/extensions/forgecli/mcp-bridge/grove.d.ts +38 -0
  8. package/dist/extensions/forgecli/mcp-bridge/grove.js +88 -2
  9. package/dist/extensions/forgecli/mcp-bridge/grove.js.map +1 -1
  10. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.d.ts +26 -2
  11. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.js +68 -13
  12. package/dist/extensions/forgecli/mcp-bridge/json-rpc-stdio.js.map +1 -1
  13. package/dist/extensions/forgecli/mcp-bridge/mcp-bridge.js +13 -2
  14. package/dist/extensions/forgecli/mcp-bridge/mcp-bridge.js.map +1 -1
  15. package/dist/extensions/forgecli/mcp-bridge/mcp-session.d.ts +3 -3
  16. package/dist/extensions/forgecli/mcp-bridge/mcp-session.js +3 -6
  17. package/dist/extensions/forgecli/mcp-bridge/mcp-session.js.map +1 -1
  18. package/dist/extensions/forgecli/orchestrators/init/init-phase-dispatch.d.ts +49 -40
  19. package/dist/extensions/forgecli/orchestrators/init/init-phase-dispatch.js +59 -188
  20. package/dist/extensions/forgecli/orchestrators/init/init-phase-dispatch.js.map +1 -1
  21. package/dist/extensions/forgecli/orchestrators/init/init-phases.d.ts +0 -43
  22. package/dist/extensions/forgecli/orchestrators/init/init-phases.js +11 -59
  23. package/dist/extensions/forgecli/orchestrators/init/init-phases.js.map +1 -1
  24. package/dist/extensions/forgecli/orchestrators/init/init-steps.d.ts +115 -0
  25. package/dist/extensions/forgecli/orchestrators/init/init-steps.js +125 -0
  26. package/dist/extensions/forgecli/orchestrators/init/init-steps.js.map +1 -0
  27. package/dist/extensions/forgecli/orchestrators/init/run-init-pipeline.js +400 -211
  28. package/dist/extensions/forgecli/orchestrators/init/run-init-pipeline.js.map +1 -1
  29. package/dist/extensions/forgecli/orchestrators/init/run-init-types.d.ts +8 -2
  30. package/dist/extensions/forgecli/orchestrators/init/run-init-types.js +15 -5
  31. package/dist/extensions/forgecli/orchestrators/init/run-init-types.js.map +1 -1
  32. package/dist/forge-payload/.base-pack/workflows-js/wfl-init.js +99 -38
  33. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  34. package/dist/forge-payload/.init/generation/generate-kb-doc.md +24 -0
  35. package/dist/forge-payload/.schemas/migrations.json +77 -0
  36. package/dist/forge-payload/init/generation/generate-kb-doc.md +24 -0
  37. package/dist/forge-payload/init/phases/phase-2/context.md +23 -0
  38. package/dist/forge-payload/init/phases/phase-2/database.md +26 -0
  39. package/dist/forge-payload/init/phases/phase-2/deployment.md +26 -0
  40. package/dist/forge-payload/init/phases/phase-2/domain-concepts.md +26 -0
  41. package/dist/forge-payload/init/phases/phase-2/domain-model.md +26 -0
  42. package/dist/forge-payload/init/phases/phase-2/entity-model.md +26 -0
  43. package/dist/forge-payload/init/phases/phase-2/index.md +25 -0
  44. package/dist/forge-payload/init/phases/phase-2/processes.md +26 -0
  45. package/dist/forge-payload/init/phases/phase-2/routing.md +25 -0
  46. package/dist/forge-payload/init/phases/phase-2/stack-checklist.md +25 -0
  47. package/dist/forge-payload/init/phases/phase-2/stack.md +27 -0
  48. package/dist/forge-payload/init/phases/phase-2/testing.md +26 -0
  49. package/dist/forge-payload/init/phases/phase-2-discover.md +15 -9
  50. package/dist/forge-payload/payload-manifest.json +2 -2
  51. package/dist/forge-payload/tools/seed-store.cjs +14 -0
  52. package/dist/forge-payload/tools/verify-phase.cjs +61 -4
  53. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +3 -1
  54. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  55. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +10 -1
  56. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  57. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  58. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +4 -6
  59. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  60. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  61. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +20 -2
  62. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  63. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  64. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  65. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -14
  66. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  67. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  68. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -5
  69. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  70. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
  71. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +2 -1
  72. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  73. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
  74. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +2 -1
  75. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  76. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  77. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +61 -41
  78. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  79. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  80. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +8 -3
  81. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  82. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  83. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +2 -14
  84. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  85. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.d.ts.map +1 -1
  86. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +2 -1
  87. package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +1 -1
  88. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +15 -45
  89. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  90. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -45
  91. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  92. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +461 -22
  93. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  94. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +140 -0
  95. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts.map +1 -1
  96. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +141 -4
  97. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js.map +1 -1
  98. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +20 -0
  99. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts.map +1 -1
  100. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +18 -0
  101. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js.map +1 -1
  102. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts +21 -0
  103. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts.map +1 -1
  104. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +18 -0
  105. package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js.map +1 -1
  106. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +21 -0
  107. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts.map +1 -1
  108. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +18 -0
  109. package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js.map +1 -1
  110. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +10 -5
  111. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts.map +1 -1
  112. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +4 -3
  113. package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js.map +1 -1
  114. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +82 -0
  115. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts.map +1 -1
  116. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +57 -0
  117. package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js.map +1 -1
  118. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts.map +1 -1
  119. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -1
  120. package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js.map +1 -1
  121. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts +1 -1
  122. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts.map +1 -1
  123. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +4 -4
  124. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js.map +1 -1
  125. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts +1 -1
  126. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts.map +1 -1
  127. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +4 -4
  128. package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js.map +1 -1
  129. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts.map +1 -1
  130. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +5 -5
  131. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js.map +1 -1
  132. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +88 -0
  133. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts.map +1 -1
  134. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +75 -2
  135. package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js.map +1 -1
  136. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +33 -15
  137. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +1 -1
  138. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +101 -84
  139. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +1 -1
  140. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts.map +1 -1
  141. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +2 -2
  142. package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js.map +1 -1
  143. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +44 -0
  144. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts.map +1 -1
  145. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +41 -4
  146. package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js.map +1 -1
  147. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts.map +1 -1
  148. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +12 -12
  149. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js.map +1 -1
  150. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts.map +1 -1
  151. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +12 -12
  152. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js.map +1 -1
  153. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts.map +1 -1
  154. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +12 -12
  155. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js.map +1 -1
  156. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts.map +1 -1
  157. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +15 -15
  158. package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js.map +1 -1
  159. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts +25 -0
  160. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +1 -0
  161. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +109 -0
  162. package/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +1 -0
  163. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts +2 -0
  164. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
  165. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +15 -2
  166. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
  167. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  168. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +3 -2
  169. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  170. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -0
  171. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  172. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -0
  173. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  174. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  175. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -0
  176. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  177. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  178. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +56 -0
  179. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +6 -1
  180. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  181. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +39 -15
  182. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  183. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  184. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +13 -5
  185. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  186. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
  187. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +5 -8
  188. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
  189. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  190. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  191. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  192. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  193. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +6 -0
  194. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  195. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +2 -1
  196. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  197. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +33 -1
  198. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  199. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +16 -2
  200. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  201. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  202. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.d.ts.map +1 -1
  203. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js +28 -1
  204. package/node_modules/@earendil-works/pi-coding-agent/dist/core/http-dispatcher.js.map +1 -1
  205. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +10 -0
  206. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  207. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +14 -17
  208. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  209. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -1
  210. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +0 -10
  211. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -1
  212. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts +20 -1
  213. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +87 -68
  215. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +3 -0
  217. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +8 -0
  219. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +20 -5
  222. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  224. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +2 -2
  225. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  226. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +3 -2
  227. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  228. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
  229. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  230. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts +3 -1
  231. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  232. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js +15 -7
  233. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/assistant-message.js.map +1 -1
  234. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts +19 -0
  235. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts.map +1 -0
  236. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +52 -0
  237. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js.map +1 -0
  238. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  239. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  240. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +13 -1
  241. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  242. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts +28 -0
  243. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts.map +1 -0
  244. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +60 -0
  245. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js.map +1 -0
  246. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts +6 -2
  247. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  248. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +18 -5
  249. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
  250. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +10 -10
  251. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  252. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +143 -130
  253. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  254. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts +15 -0
  255. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  256. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +14 -0
  257. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js.map +1 -1
  258. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  259. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +16 -0
  260. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  261. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +26 -0
  262. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  263. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
  264. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +7 -0
  266. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +55 -8
  268. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +58 -0
  269. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +28 -0
  270. package/node_modules/@earendil-works/pi-coding-agent/docs/session-format.md +18 -8
  271. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +1 -0
  272. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +1 -0
  273. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  274. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  275. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/entry-renderer.ts +41 -0
  276. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  277. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  278. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -0
  279. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  280. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  281. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -12
  282. package/node_modules/@earendil-works/pi-coding-agent/package.json +4 -4
  283. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  284. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ 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.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
+
15
+
16
+ ### Fixed
17
+
18
+ - **`/forge:init` orchestrator `pipeline-end` `elapsedMs` corrected.** The final orchestrator-transcript event logged `elapsedMs` as `Date.now()` — an absolute epoch timestamp (~56,500 years) rather than a duration. The pipeline now captures `pipelineStartMs` before the wave loop and emits the delta, matching every per-phase `elapsedMs`.
19
+
20
+ ### Changed
21
+
22
+ - **Bundled Forge plugin re-vendored 1.6.9 → 1.6.10** (`forge.bundledVersion`). Picks up the `seed-store` fix ([Entelligentsia/forge@1.6.10](https://github.com/Entelligentsia/forge)): a fresh `4ge /forge:init` on a project with no pre-existing sprints/tasks/bugs now leaves a consistent `.forge/store/` with a `COLLATION_STATE.json` baseline instead of no store at all.
23
+
24
+ ## [1.1.1] — 2026-07-01
25
+
26
+ ### Changed
27
+
28
+ - **Bundled Forge plugin re-vendored 1.6.5 → 1.6.9** (`forge.bundledVersion`). Picks up the reconciled `/forge:init` step-machine (FEAT-011): the frozen 10-doc KB contract (plugin 1.6.5), the per-step Phase-2 substance fragments (1.6.6), the confident *not-applicable* stub policy plus widened Phase-2 verify gate (1.6.7), and the `wfl-init.js` Phase-2 fragment convergence (1.6.8) — released together as plugin 1.6.9.
29
+
30
+ ### Fixed
31
+
32
+ - **`payload-manifest.json`: `init/phases` select is now recursive** — the Slice-2 `init/phases/phase-2/` per-step substance fragments (`index.md`, `context.md`, and the 10 KB-doc fragments) now vendor into `.forge/init/phases/phase-2/` on a clean `4ge init claude .`. `wfl-init.js` references `phase-2/index.md` and `phase-2/context.md` literally, so without this the dead-vendored-reference gate failed once the 1.6.9 payload was vendored. `expected-install-set.json` frozen snapshot updated (+12 files, 283 → 295).
33
+
8
34
  ## [1.1.0] — 2026-06-28
9
35
 
10
36
  ### Changed
package/README.md CHANGED
@@ -321,6 +321,8 @@ before forge-cli's extension hook runs.
321
321
 
322
322
  ## Roadmap
323
323
 
324
+ **Latest: Shipped (1.1.1)** — see [CHANGELOG.md](CHANGELOG.md) for the full history.
325
+
324
326
  | Next | Status |
325
327
  |------|--------|
326
328
  | `/forge:export` — portable workflow skills for Claude Code + Codex | Planned |
@@ -375,5 +377,7 @@ MIT © Entelligentsia
375
377
  0.20.0 · 0.20.1 · 0.20.2 · 0.20.3 · 0.21.0 ·
376
378
  1.0.0 · 1.0.3 · 1.0.11 · 1.0.14 · 1.0.15 · 1.0.16 · 1.0.17 ·
377
379
  1.0.18 · 1.0.19 · 1.0.20
380
+ 1.0.21 · 1.0.22 · 1.0.23 · 1.0.24 · 1.0.25 · 1.0.26 · 1.0.27 · 1.0.28 · 1.0.29 · 1.0.30 ·
381
+ 1.0.31 · 1.0.32 · 1.0.33 · 1.0.34 · 1.0.35 · 1.0.36 · 1.0.42 · 1.0.43 · 1.0.44 · 1.1.0 · 1.1.1
378
382
  -->
379
383
 
@@ -5,6 +5,120 @@ Format: newest first. Breaking changes are marked **△ Breaking**.
5
5
 
6
6
  ---
7
7
 
8
+ ## [1.6.10] — 2026-07-02
9
+
10
+ ### Fixed
11
+ - **`seed-store` now lays down the store skeleton on a fresh `/forge:init`.** On a
12
+ project with no pre-existing sprints/tasks/bugs, `seed-store.cjs` no-oped
13
+ (`Seeded: 0 sprint(s)…`) and left `.forge/store/` entirely absent — the store dir
14
+ was only ever created lazily by `Store.writeSprint/Task/Bug`. The result was an
15
+ inconsistent post-init state: Phase 4 appended `.forge/store/events/` to
16
+ `.gitignore` for a directory that did not exist, and there was no collation
17
+ watermark until the first `/forge:collate`. `seed-store` now always writes a
18
+ `COLLATION_STATE.json` baseline (actual seeded counts, `featureCount 0`) even with
19
+ zero entities. `--dry-run` still writes nothing; the next real `/forge:collate`
20
+ overwrites the baseline with live counts. Reads already degraded gracefully
21
+ (`store-cli list` → `[]`, `validate-store` → passed) and writes self-created the
22
+ store, so this was low-severity, but init now leaves a consistent store. Migration
23
+ `target: tools:seed-store`, non-breaking.
24
+
25
+ ---
26
+
27
+ ## [1.6.9] — 2026-07-01
28
+
29
+ ### Changed
30
+ - **Named release of the reconciled `/forge:init` step-machine (FEAT-011, Slices 0–5).**
31
+ This version draws the release boundary around the four preceding init-reconciliation
32
+ slices: the frozen 10-doc KB contract (1.6.5), the per-step Phase-2 substance
33
+ fragments (1.6.6), the confident *not-applicable* stub policy plus widened Phase-2
34
+ verify gate (1.6.7), and the `wfl-init.js` Phase-2 fragment convergence (1.6.8).
35
+ No `.cjs`/`.js` logic changed in this release — the underlying behaviour already
36
+ shipped across 1.6.5–1.6.8; 1.6.9 consolidates them under one migratable boundary.
37
+ - **forge-cli payload re-vendored to 1.6.9.** `dist/forge-payload` is regenerated from
38
+ the 1.6.9 plugin source and `forge.bundledVersion` bumped `1.6.5 → 1.6.9`, closing the
39
+ two-layer drift (the `bundledVersion == payload-manifest forge_version` gate, BUG-019).
40
+
41
+ ---
42
+
43
+ ## [1.6.8] — 2026-07-01
44
+
45
+ ### Changed
46
+ - **Converged the markdown-workflow init driver onto the shared Phase-2 fragment set
47
+ (Slice 4).** `init/base-pack/workflows-js/wfl-init.js` no longer tells every Phase-2
48
+ subagent to read the whole `phase-2-discover.md` fat rulebook. Each kb-doc prompt now
49
+ composes the shared `generate-kb-doc.md` procedure + its own `phase-2/<name>.md`
50
+ substance fragment + an `AGENT PARAMS` block; index and context prompts repoint at
51
+ `phase-2/index.md` and `phase-2/context.md`; the gate agent inlines the scaffold
52
+ commands. The KB-doc fan-out now runs in two cross-reference waves (8 leaf docs, then
53
+ the 2 derived docs selected by name), matching forge-cli's native pipeline.
54
+
55
+ ---
56
+
57
+ ## [1.6.7] — 2026-07-01
58
+
59
+ ### Changed
60
+ - **The fixed 10-doc KB surface always materializes; an absent topic becomes a confident
61
+ not-applicable stub (Slice 3).** All 10 stub-bearing Phase-2 fragments now prescribe
62
+ the confident stub shape (`confidence: 100% — status: not-applicable` header + heading +
63
+ one-sentence absence statement) instead of "set confidence low"; `generate-kb-doc.md`
64
+ documents that shape authoritatively; and `verifyPhase2` in `verify-phase.cjs` enforces
65
+ substantive-OR-not-applicable — a header-only/empty doc now fails `--phase 2`. No
66
+ confidence-percentage or entity-count hard gate is introduced (library projects pass).
67
+
68
+ ### Breaking
69
+ - A KB carrying header-only empty stubs (a confidence header but no body and no
70
+ `status: not-applicable` marker) now **fails** `verify-phase --phase 2` until
71
+ re-materialized with the marker or a body.
72
+
73
+ ---
74
+
75
+ ## [1.6.6] — 2026-07-01
76
+
77
+ ### Changed
78
+ - **Split the fat Phase-2 rulebook into per-step substance fragments (Slice 2).** The
79
+ forge-cli native init pipeline no longer injects the entire `phase-2-discover.md`
80
+ rulebook into every Phase-2 subagent. 12 new substance fragments live under
81
+ `init/phases/phase-2/` (10 KB-doc basenames + index + context), each carrying its own
82
+ topic focus, discovery input, required output, and not-applicable stub;
83
+ `generate-kb-doc.md` is confirmed as the shared procedure with a composition preamble.
84
+ `build-payload.cjs` gained one-level recursion so the `phase-2/` subdir ships in the
85
+ bundle. `phase-2-discover.md` is no longer injected into any subagent.
86
+
87
+ ---
88
+
89
+ ## [1.6.5] — 2026-07-01
90
+
91
+ ### Changed
92
+ - **Froze ONE shared 10-doc KB contract across the Phase-2 verify gate and both init
93
+ fan-out drivers (Slice 1).** Closes a three-way drift between `verify-phase.cjs`
94
+ `ARCH_DOCS` (was 7 architecture-only docs), `wfl-init.js` `KB_DOC_IDS`, and
95
+ `phase-2-discover.md`'s doc-spec table. The gate now checks 10 canonical docIds —
96
+ `architecture/{stack,processes,routing,database,testing,deployment,entity-model,stack-checklist}`
97
+ + `business-domain/{domain-model,domain-concepts}` — resolved prefix-agnostically, and a
98
+ new drift-guard test (`kb-doc-contract.test.cjs`) pins all three arrays to the canonical
99
+ order.
100
+
101
+ ### Breaking
102
+ - A pre-existing KB carrying only the old 7 docs (or `entity-model`/`stack-checklist` at
103
+ their former paths) now fails `verify-phase --phase 2` until re-run; `entity-model` is
104
+ homed under `architecture/` per FEAT-011.
105
+
106
+ ---
107
+
108
+ ## [1.6.4] — 2026-06-28
109
+
110
+ ### Fixed
111
+ - **Dead vendored reference to `forge-usage-report.cjs` (FORGE-BUG-030/036
112
+ `MODULE_NOT_FOUND` class).** The tool was added at 1.6.3 and referenced by the
113
+ `wfl-fix-bug.js` / `wfl-run-task.js` / `wfl-run-sprint.js` drivers, but was missing from
114
+ `payload-manifest.json`'s tools selection, so `build-payload.cjs` never copied it into
115
+ the default payload — leaving bootstrapped projects with a dead
116
+ `.forge/tools/forge-usage-report.cjs` reference and a runtime `MODULE_NOT_FOUND` risk.
117
+ Added it to the tools include list; also regenerated `integrity.json`,
118
+ `structure-manifest.json`, and `enum-catalog.json`, which had drifted to 1.6.2.
119
+
120
+ ---
121
+
8
122
  ## [1.6.3] — 2026-06-21
9
123
 
10
124
  ### Fixed
@@ -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)).
@@ -17,6 +17,7 @@
17
17
  // IL7 — every failure path returns a typed result; no silent continuation
18
18
  import * as fs from "node:fs";
19
19
  import * as path from "node:path";
20
+ import { registerFauxProvider } from "@earendil-works/pi-ai/compat";
20
21
  import { AuthStorage, createAgentSession, DefaultResourceLoader, getAgentDir, ModelRegistry, parseFrontmatter, SessionManager, } from "@earendil-works/pi-coding-agent";
21
22
  import { FORGE_TOOL_DISCIPLINE } from "./forge-tools.js";
22
23
  import { buildProjectOrientation } from "./project-orientation.js";
@@ -99,6 +100,12 @@ export async function runForgeSubagent(opts) {
99
100
  model: persona.model,
100
101
  };
101
102
  const cwdAbs = cwd ?? process.cwd();
103
+ // Test-only faux-provider handle — when opts.streamFn is set AND the
104
+ // session resolved no model (clean-env CI runner, no ~/.pi default), we
105
+ // register pi's faux provider as a fallback model so pi 0.80.2+'s agent
106
+ // loop can proceed to the scripted streamFn. Unregistered in the finally.
107
+ // Production never sets streamFn, so this stays undefined in real runs.
108
+ let fauxHandle;
102
109
  // ── Transcript export — normal path AND hard-exit path ───────────────
103
110
  // Exporting only at phase end loses the in-flight transcript when the
104
111
  // user /quit's pi (or the process dies): the post-dispatch code never
@@ -249,6 +256,56 @@ export async function runForgeSubagent(opts) {
249
256
  process.stderr.write(`[forge-subagent] requestedModel not in registry: ${opts.requestedModel.provider}:${opts.requestedModel.model} — inheriting pi current model\n`);
250
257
  }
251
258
  }
259
+ // Test-only seam (forge-cli#17): when a scripted streamFn is set, force
260
+ // the session onto pi's faux provider so the agent loop has a runnable,
261
+ // no-auth model. pi 0.80.2+'s agent loop dispatches to streamFn only after
262
+ // a model is selected; a clean-env CI runner (no ~/.pi config) resolves a
263
+ // placeholder "unknown" model that can't run, so the loop fails before the
264
+ // scripted streamFn and the scripted model never lands in result.model
265
+ // (e.g. run-sprint.ceremony fell back to "orchestrator"). Registering faux
266
+ // AFTER the requestedModel path above means the persona's real model still
267
+ // gets a chance first (normal-env tests), but faux wins as the runnable
268
+ // model for the scripted streamFn. Only fires when the session resolved
269
+ // no runnable model (pi's "unknown" placeholder, or undefined) — normal-env
270
+ // runs that already resolved the persona's real model are untouched.
271
+ // Production never sets streamFn.
272
+ if (opts.streamFn && (!session.model || session.model.id === "unknown")) {
273
+ fauxHandle = registerFauxProvider({});
274
+ fauxHandle.setResponses([]);
275
+ const fauxModel = fauxHandle.getModel();
276
+ authStorage.setRuntimeApiKey(fauxModel.provider, "faux-key");
277
+ try {
278
+ modelRegistry.registerProvider(fauxModel.provider, {
279
+ apiKey: "faux-key",
280
+ baseUrl: fauxModel.baseUrl ?? "https://faux.local",
281
+ api: fauxHandle.api,
282
+ models: fauxHandle.models.map((m) => ({
283
+ id: m.id,
284
+ name: m.name,
285
+ api: m.api,
286
+ reasoning: m.reasoning,
287
+ input: m.input,
288
+ cost: m.cost,
289
+ contextWindow: m.contextWindow,
290
+ maxTokens: m.maxTokens,
291
+ baseUrl: m.baseUrl ?? "https://faux.local",
292
+ })),
293
+ });
294
+ }
295
+ catch {
296
+ /* non-fatal: setModel below can still set the faux model directly */
297
+ }
298
+ try {
299
+ await session.setModel(fauxModel);
300
+ // setModel rebinds session.agent.streamFn to the new model's provider
301
+ // stream; re-apply the scripted streamFn so the test seam wins over
302
+ // faux's (empty) default responses.
303
+ session.agent.streamFn = opts.streamFn;
304
+ }
305
+ catch {
306
+ /* non-fatal: scripted streamFn may still run via the current model */
307
+ }
308
+ }
252
309
  // ── terminate channel ────────────────────────────────────────────────
253
310
  const onAbort = () => {
254
311
  void session.abort();
@@ -316,6 +373,7 @@ export async function runForgeSubagent(opts) {
316
373
  if (signal)
317
374
  signal.removeEventListener("abort", onAbort);
318
375
  session.dispose();
376
+ fauxHandle?.unregister();
319
377
  }
320
378
  if (result.stopReason === "error" || result.stopReason === "aborted") {
321
379
  result.exitCode = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"forge-subagent.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/forge-subagent.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,0CAA0C;AAC1C,4DAA4D;AAC5D,oFAAoF;AACpF,uDAAuD;AACvD,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,oCAAoC;AACpC,EAAE;AACF,iFAAiF;AACjF,mFAAmF;AACnF,EAAE;AACF,aAAa;AACb,6DAA6D;AAC7D,4EAA4E;AAE5E,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAEN,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EAErB,WAAW,EACX,aAAa,EAEb,gBAAgB,EAChB,cAAc,GAEd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,2BAA2B,EA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Y,EAAE,MAAM,CAAC,YAAY,IAAI,IAAI;QACzC,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ;KACzB,CAAC;IACF,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACrE,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,4EAA4E;AAE5E,8DAA8D;AAC9D,MAAM,UAAU,cAAc,CAAC,QAAmB;IACjD,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/C,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,GAAG,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YAC9B,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;gBAChC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM;oBAAE,OAAO,IAAI,CAAC,IAAI,CAAC;YAC5C,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,EAAE,CAAC;AACX,CAAC"}
@@ -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,uEAAuE,SAAS,GAAG;QACnF,8EAA8E;QAC9E,8EAA8E;QAC9E,8EAA8E;QAC9E,oEAAoE;QACpE,EAAE;QACF,8EAA8E;QAC9E,8EAA8E;QAC9E,mFAAmF;QACnF,kEAAkE;KAClE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,QAAiB;IAChD,MA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AG,EAAE,IAAI,CAAC,GAAG;QACb,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,QAAQ,KAAK,IAAI;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,SAAS,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAEhC,0EAA0E;IAC1E,+EAA+E;IAC/E,8EAA8E;IAC9E,qEAAqE;IACrE,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACzD,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC1D,+EAA+E;IAC/E,wEAAwE;IACxE,MAAM,gBAAgB,GACrB,IAAI,CAAC,gBAAgB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAEhF,IAAI,CAAC;QACJ,+DAA+D;QAC/D,uEAAuE;QACvE,OAAO,MAAM,eAAe,CAAC;YAC5B,OAAO,EAAE,SAAS,CAAC,GAAG;YACtB,IAAI;YACJ,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,iBAAiB;YAChD,gBAAgB;SAChB,CAAC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACR,oEAAoE;QACpE,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC"}
@@ -14,6 +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
  }