@entelligentsia/forgecli 1.0.25 → 1.0.40

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 (590) hide show
  1. package/CHANGELOG.md +341 -0
  2. package/README.md +2 -0
  3. package/dist/CHANGELOG-forge-plugin.md +264 -0
  4. package/dist/CHANGELOG-pi.md +143 -0
  5. package/dist/bin/argv.d.ts +2 -2
  6. package/dist/bin/argv.js +37 -0
  7. package/dist/bin/argv.js.map +1 -1
  8. package/dist/bin/forge.js +30 -16
  9. package/dist/bin/forge.js.map +1 -1
  10. package/dist/bin/init.d.ts +23 -0
  11. package/dist/bin/init.js +123 -0
  12. package/dist/bin/init.js.map +1 -0
  13. package/dist/bin/reset.d.ts +39 -0
  14. package/dist/bin/reset.js +101 -0
  15. package/dist/bin/reset.js.map +1 -0
  16. package/dist/bin/uninstall.d.ts +20 -0
  17. package/dist/bin/uninstall.js +141 -0
  18. package/dist/bin/uninstall.js.map +1 -0
  19. package/dist/extensions/forgecli/claude-bootstrap/bootstrap.d.ts +40 -0
  20. package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +384 -0
  21. package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -0
  22. package/dist/extensions/forgecli/claude-bootstrap/settings-merge.d.ts +46 -0
  23. package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js +245 -0
  24. package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js.map +1 -0
  25. package/dist/extensions/forgecli/claude-bootstrap/uninstall.d.ts +23 -0
  26. package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +235 -0
  27. package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -0
  28. package/dist/extensions/forgecli/commands/reset.d.ts +16 -0
  29. package/dist/extensions/forgecli/commands/reset.js +83 -0
  30. package/dist/extensions/forgecli/commands/reset.js.map +1 -0
  31. package/dist/extensions/forgecli/dashboard/component.js +10 -7
  32. package/dist/extensions/forgecli/dashboard/component.js.map +1 -1
  33. package/dist/extensions/forgecli/forge-commands.d.ts +7 -2
  34. package/dist/extensions/forgecli/forge-commands.js +19 -5
  35. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  36. package/dist/extensions/forgecli/forge-subagent.d.ts +4 -4
  37. package/dist/extensions/forgecli/hooks/forge-permissions.js +20 -6
  38. package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -1
  39. package/dist/extensions/forgecli/index.js +6 -3
  40. package/dist/extensions/forgecli/index.js.map +1 -1
  41. package/dist/extensions/forgecli/lib/forge-root.d.ts +6 -0
  42. package/dist/extensions/forgecli/lib/forge-root.js +52 -0
  43. package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
  44. package/dist/extensions/forgecli/lib/payload-manifest.d.ts +62 -0
  45. package/dist/extensions/forgecli/lib/payload-manifest.js +151 -0
  46. package/dist/extensions/forgecli/lib/payload-manifest.js.map +1 -0
  47. package/dist/extensions/forgecli/orchestrators/advisory-render.d.ts +9 -0
  48. package/dist/extensions/forgecli/orchestrators/advisory-render.js +107 -0
  49. package/dist/extensions/forgecli/orchestrators/advisory-render.js.map +1 -0
  50. package/dist/extensions/forgecli/orchestrators/bug/bug-body.d.ts +1 -0
  51. package/dist/extensions/forgecli/orchestrators/bug/bug-body.js +65 -0
  52. package/dist/extensions/forgecli/orchestrators/bug/bug-body.js.map +1 -0
  53. package/dist/extensions/forgecli/orchestrators/bug/bug-id.d.ts +23 -0
  54. package/dist/extensions/forgecli/orchestrators/bug/bug-id.js +140 -0
  55. package/dist/extensions/forgecli/orchestrators/bug/bug-id.js.map +1 -0
  56. package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.d.ts +54 -0
  57. package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js +349 -0
  58. package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js.map +1 -0
  59. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +11 -0
  60. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +82 -0
  61. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -0
  62. package/dist/extensions/forgecli/orchestrators/bug/bug-state.d.ts +14 -0
  63. package/dist/extensions/forgecli/orchestrators/bug/bug-state.js +100 -0
  64. package/dist/extensions/forgecli/orchestrators/bug/bug-state.js.map +1 -0
  65. package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.d.ts +72 -0
  66. package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js +204 -0
  67. package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js.map +1 -0
  68. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +38 -0
  69. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +198 -0
  70. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -0
  71. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.d.ts +3 -0
  72. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js +55 -0
  73. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js.map +1 -0
  74. package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.d.ts +7 -0
  75. package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js +293 -0
  76. package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js.map +1 -0
  77. package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.d.ts +2 -0
  78. package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +501 -0
  79. package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -0
  80. package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.d.ts +41 -0
  81. package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js +5 -0
  82. package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js.map +1 -0
  83. package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.d.ts +43 -0
  84. package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js +85 -0
  85. package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js.map +1 -0
  86. package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.d.ts +8 -0
  87. package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js +37 -0
  88. package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js.map +1 -0
  89. package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.d.ts +28 -0
  90. package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js +45 -0
  91. package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js.map +1 -0
  92. package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.d.ts +26 -0
  93. package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js +75 -0
  94. package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js.map +1 -0
  95. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.d.ts +24 -0
  96. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js +58 -0
  97. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js.map +1 -0
  98. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.d.ts +53 -0
  99. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js +131 -0
  100. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js.map +1 -0
  101. package/dist/extensions/forgecli/orchestrators/common/summary-recovery.d.ts +24 -0
  102. package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js +37 -0
  103. package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js.map +1 -0
  104. package/dist/extensions/forgecli/orchestrators/fix-bug.d.ts +9 -93
  105. package/dist/extensions/forgecli/orchestrators/fix-bug.js +23 -1721
  106. package/dist/extensions/forgecli/orchestrators/fix-bug.js.map +1 -1
  107. package/dist/extensions/forgecli/orchestrators/halt-advisor.js +25 -3
  108. package/dist/extensions/forgecli/orchestrators/halt-advisor.js.map +1 -1
  109. package/dist/extensions/forgecli/orchestrators/run-sprint.d.ts +3 -12
  110. package/dist/extensions/forgecli/orchestrators/run-sprint.js +48 -270
  111. package/dist/extensions/forgecli/orchestrators/run-sprint.js.map +1 -1
  112. package/dist/extensions/forgecli/orchestrators/run-task.d.ts +10 -214
  113. package/dist/extensions/forgecli/orchestrators/run-task.js +31 -1481
  114. package/dist/extensions/forgecli/orchestrators/run-task.js.map +1 -1
  115. package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.d.ts +33 -0
  116. package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js +135 -0
  117. package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js.map +1 -0
  118. package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.d.ts +18 -0
  119. package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js +55 -0
  120. package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js.map +1 -0
  121. package/dist/extensions/forgecli/orchestrators/task/run-task-command.d.ts +9 -0
  122. package/dist/extensions/forgecli/orchestrators/task/run-task-command.js +174 -0
  123. package/dist/extensions/forgecli/orchestrators/task/run-task-command.js.map +1 -0
  124. package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.d.ts +2 -0
  125. package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +494 -0
  126. package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -0
  127. package/dist/extensions/forgecli/orchestrators/task/run-task-types.d.ts +62 -0
  128. package/dist/extensions/forgecli/orchestrators/task/run-task-types.js +5 -0
  129. package/dist/extensions/forgecli/orchestrators/task/run-task-types.js.map +1 -0
  130. package/dist/extensions/forgecli/orchestrators/task/task-body.d.ts +4 -0
  131. package/dist/extensions/forgecli/orchestrators/task/task-body.js +48 -0
  132. package/dist/extensions/forgecli/orchestrators/task/task-body.js.map +1 -0
  133. package/dist/extensions/forgecli/orchestrators/task/task-events.d.ts +63 -0
  134. package/dist/extensions/forgecli/orchestrators/task/task-events.js +185 -0
  135. package/dist/extensions/forgecli/orchestrators/task/task-events.js.map +1 -0
  136. package/dist/extensions/forgecli/orchestrators/task/task-gates.d.ts +34 -0
  137. package/dist/extensions/forgecli/orchestrators/task/task-gates.js +78 -0
  138. package/dist/extensions/forgecli/orchestrators/task/task-gates.js.map +1 -0
  139. package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.d.ts +42 -0
  140. package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js +370 -0
  141. package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js.map +1 -0
  142. package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +17 -0
  143. package/dist/extensions/forgecli/orchestrators/task/task-phases.js +48 -0
  144. package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -0
  145. package/dist/extensions/forgecli/orchestrators/task/task-record.d.ts +9 -0
  146. package/dist/extensions/forgecli/orchestrators/task/task-record.js +58 -0
  147. package/dist/extensions/forgecli/orchestrators/task/task-record.js.map +1 -0
  148. package/dist/extensions/forgecli/orchestrators/task/task-state.d.ts +14 -0
  149. package/dist/extensions/forgecli/orchestrators/task/task-state.js +35 -0
  150. package/dist/extensions/forgecli/orchestrators/task/task-state.js.map +1 -0
  151. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +36 -0
  152. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +187 -0
  153. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -0
  154. package/dist/extensions/forgecli/store/store-resolver.d.ts +15 -0
  155. package/dist/extensions/forgecli/store/store-resolver.js +118 -18
  156. package/dist/extensions/forgecli/store/store-resolver.js.map +1 -1
  157. package/dist/extensions/forgecli/update/forge-update-command.js +10 -7
  158. package/dist/extensions/forgecli/update/forge-update-command.js.map +1 -1
  159. package/dist/forge-payload/.base-pack/workflows/collator_agent.md +5 -6
  160. package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +1 -1
  161. package/dist/forge-payload/.base-pack/workflows-js/wfl-init.js +449 -0
  162. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  163. package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
  164. package/dist/forge-payload/.schemas/migrations.json +170 -0
  165. package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
  166. package/dist/forge-payload/commands/add-pipeline.md +1 -1
  167. package/dist/forge-payload/commands/add-task.md +3 -3
  168. package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +2 -2
  169. package/dist/forge-payload/commands/ask.md +1 -1
  170. package/dist/forge-payload/commands/check-agent.md +8 -24
  171. package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +2 -2
  172. package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +2 -2
  173. package/dist/forge-payload/commands/config.md +1 -1
  174. package/dist/forge-payload/commands/enhance.md +31 -5
  175. package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +2 -2
  176. package/dist/forge-payload/commands/health.md +1 -1
  177. package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +2 -2
  178. package/dist/forge-payload/commands/init.md +186 -67
  179. package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +2 -2
  180. package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +2 -2
  181. package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +2 -2
  182. package/dist/forge-payload/commands/rebuild.md +3 -3
  183. package/dist/forge-payload/commands/remove.md +1 -1
  184. package/dist/forge-payload/commands/repair.md +1 -1
  185. package/dist/forge-payload/commands/report-bug.md +1 -1
  186. package/dist/forge-payload/commands/reset.md +117 -0
  187. package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +2 -2
  188. package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +2 -2
  189. package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +2 -2
  190. package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +2 -2
  191. package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +2 -2
  192. package/dist/forge-payload/commands/status.md +1 -1
  193. package/dist/forge-payload/commands/update.md +3 -3
  194. package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +2 -2
  195. package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
  196. package/dist/forge-payload/hooks/lib/common.cjs +228 -0
  197. package/dist/forge-payload/hooks/lib/plugin-detection.cjs +106 -0
  198. package/dist/forge-payload/hooks/lib/update-msg.cjs +23 -0
  199. package/dist/forge-payload/hooks/lib/update-url.cjs +46 -0
  200. package/dist/forge-payload/hooks/lib/write-registry.js +53 -0
  201. package/dist/forge-payload/init/discovery/discover-database.md +32 -0
  202. package/dist/forge-payload/init/discovery/discover-processes.md +31 -0
  203. package/dist/forge-payload/init/discovery/discover-routing.md +31 -0
  204. package/dist/forge-payload/init/discovery/discover-stack.md +33 -0
  205. package/dist/forge-payload/init/discovery/discover-testing.md +34 -0
  206. package/dist/forge-payload/init/generation/generate-commands.md +171 -0
  207. package/dist/forge-payload/init/generation/generate-kb-doc.md +60 -0
  208. package/dist/forge-payload/init/generation/generate-persona.md +73 -0
  209. package/dist/forge-payload/init/generation/generate-skill.md +66 -0
  210. package/dist/forge-payload/init/generation/generate-template.md +60 -0
  211. package/dist/forge-payload/init/generation/generate-tools.md +133 -0
  212. package/dist/forge-payload/init/generation/generate-workflows.md +78 -0
  213. package/dist/forge-payload/init/phases/phase-1-collect.md +10 -2
  214. package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
  215. package/dist/forge-payload/init/phases/phase-4-register.md +8 -0
  216. package/dist/forge-payload/init/workflow-gen-plan.json +17 -0
  217. package/dist/forge-payload/integrity.json +33 -18
  218. package/dist/forge-payload/meta/workflows/meta-collate.md +5 -6
  219. package/dist/forge-payload/meta/workflows/meta-migrate.md +1 -1
  220. package/dist/forge-payload/payload-manifest.json +314 -0
  221. package/dist/forge-payload/schemas/enum-catalog.json +2 -2
  222. package/dist/forge-payload/schemas/payload-manifest.schema.json +100 -0
  223. package/dist/forge-payload/schemas/structure-manifest.json +5 -12
  224. package/dist/forge-payload/tools/forge-preflight.cjs +268 -0
  225. package/dist/forge-payload/tools/lib/paths.cjs +12 -11
  226. package/dist/forge-payload/tools/lib/pricing.cjs +31 -11
  227. package/dist/forge-payload/tools/query-logger.cjs +34 -0
  228. package/dist/forge-payload/tools/reset-plan.cjs +210 -0
  229. package/dist/forge-payload/tools/store.cjs +4 -1
  230. package/dist/forge-payload/tools/substitute-placeholders.cjs +14 -7
  231. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  232. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
  233. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  234. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
  235. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  236. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
  237. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  238. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +4 -0
  239. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +1 -0
  240. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
  241. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +1 -0
  242. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +20 -0
  243. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +1 -0
  244. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
  245. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +1 -0
  246. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +18 -0
  247. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +1 -0
  248. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
  249. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +1 -0
  250. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +10 -0
  251. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +1 -0
  252. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
  253. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +1 -0
  254. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +30 -0
  255. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +1 -0
  256. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
  257. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +1 -0
  258. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +26 -0
  259. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +1 -0
  260. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
  261. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +1 -0
  262. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -1
  263. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  265. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  266. package/node_modules/@earendil-works/pi-ai/README.md +12 -4
  267. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  268. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +3 -0
  269. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  270. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +45 -0
  271. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  272. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
  273. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  274. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1804 -815
  275. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  276. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2031 -1384
  277. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  278. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  279. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +71 -27
  280. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  281. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
  282. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  283. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -16
  284. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  285. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
  286. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
  287. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  288. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  289. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
  290. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  291. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
  292. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +35 -13
  293. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
  294. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  295. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  296. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  297. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  298. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -0
  299. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
  300. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +12 -4
  301. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  302. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  303. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  304. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +13 -1
  305. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  306. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  307. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +4 -2
  308. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  309. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -1
  310. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  311. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -2
  312. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  313. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  314. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +143 -0
  315. package/node_modules/@earendil-works/pi-coding-agent/README.md +26 -4
  316. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
  317. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  318. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +11 -0
  319. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  320. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts +10 -0
  321. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts.map +1 -0
  322. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js +48 -0
  323. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js.map +1 -0
  324. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts +17 -0
  325. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -0
  326. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +128 -0
  327. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -0
  328. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  329. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
  330. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  331. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +3 -1
  332. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
  333. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -1
  334. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
  335. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +2 -1
  336. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
  337. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +2 -2
  338. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
  339. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +4 -1
  340. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  341. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +16 -3
  342. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  343. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  344. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +4 -3
  345. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  346. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts +3 -1
  347. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  348. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +9 -3
  349. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
  350. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +1 -1
  351. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
  352. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +1 -1
  353. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
  354. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts +2 -0
  355. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts.map +1 -0
  356. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
  357. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js.map +1 -0
  358. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +19 -6
  359. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  360. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  361. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  362. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -1
  363. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  364. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +4 -4
  365. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  366. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +10 -3
  367. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  368. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +47 -1
  369. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  370. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -2
  371. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  372. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  373. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +2 -0
  374. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
  375. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
  376. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
  377. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts +1 -0
  378. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts.map +1 -1
  379. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js +1 -0
  380. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js.map +1 -1
  381. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  382. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +1 -0
  383. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  384. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
  385. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  386. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +44 -5
  387. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  388. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +3 -0
  389. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  390. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +47 -13
  391. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  392. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts +15 -0
  393. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -0
  394. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +58 -0
  395. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -0
  396. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts +2 -1
  397. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
  398. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +24 -26
  399. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
  400. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts +4 -0
  401. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -0
  402. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +72 -0
  403. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -0
  404. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.d.ts.map +1 -1
  405. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js +3 -0
  406. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js.map +1 -1
  407. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +13 -2
  408. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  409. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +112 -37
  410. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  411. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  412. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +7 -33
  413. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  414. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  415. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +103 -70
  416. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  417. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +20 -2
  418. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  419. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +97 -30
  420. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  421. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  422. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +1 -0
  423. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  424. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  425. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -1
  426. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  427. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  428. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
  429. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  430. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
  431. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
  432. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
  433. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
  434. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +1 -1
  435. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
  436. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  437. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +1 -1
  438. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  439. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  440. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +1 -1
  441. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  442. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts +36 -0
  443. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -0
  444. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +202 -0
  445. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -0
  446. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +5 -4
  447. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  448. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
  449. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  450. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  451. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +72 -32
  452. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  453. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
  454. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +39 -34
  455. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
  456. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts +1 -1
  457. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts.map +1 -1
  458. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.js.map +1 -1
  459. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  460. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
  461. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
  462. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
  463. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
  464. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js +103 -0
  465. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js.map +1 -0
  466. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
  467. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +7 -0
  468. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  469. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts +2 -0
  470. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -1
  471. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js +2 -0
  472. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js.map +1 -1
  473. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -1
  474. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  475. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -13
  476. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
  477. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  478. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  479. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +20 -0
  480. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  481. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  482. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +22 -0
  483. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  484. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts +23 -0
  485. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
  486. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js +91 -0
  487. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js.map +1 -0
  488. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +7 -0
  489. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  490. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +101 -5
  491. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  492. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
  493. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
  494. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
  495. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  496. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
  497. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  498. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +6 -2
  499. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  500. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +111 -10
  501. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  502. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +1 -0
  503. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
  504. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +78 -0
  505. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
  506. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.d.ts.map +1 -1
  507. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js +54 -22
  508. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js.map +1 -1
  509. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts +9 -0
  510. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts.map +1 -0
  511. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js +22 -0
  512. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js.map +1 -0
  513. package/node_modules/@earendil-works/pi-coding-agent/docs/containerization.md +111 -0
  514. package/node_modules/@earendil-works/pi-coding-agent/docs/docs.json +8 -0
  515. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +67 -13
  516. package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +2 -0
  517. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +4 -3
  518. package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +1 -1
  519. package/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +9 -2
  520. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +5 -0
  521. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +1 -1
  522. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +5 -0
  523. package/node_modules/@earendil-works/pi-coding-agent/docs/security.md +59 -0
  524. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +15 -0
  525. package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +1 -1
  526. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +36 -2
  527. package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +1 -1
  528. package/node_modules/@earendil-works/pi-coding-agent/docs/tmux.md +4 -2
  529. package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +10 -1
  530. package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +19 -2
  531. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +2 -0
  532. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-header.ts +1 -1
  533. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  534. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  535. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/doom-overlay/index.ts +1 -1
  536. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/index.ts +531 -0
  537. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +185 -0
  538. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +19 -0
  539. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/handoff.ts +1 -1
  540. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/interactive-shell.ts +1 -1
  541. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-qa-tests.ts +152 -81
  542. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/project-trust.ts +64 -0
  543. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/qna.ts +1 -1
  544. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -1
  545. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/questionnaire.ts +1 -1
  546. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  547. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/snake.ts +1 -1
  548. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/space-invaders.ts +1 -1
  549. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/summarize.ts +1 -1
  550. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tic-tac-toe.ts +1 -1
  551. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/todo.ts +1 -1
  552. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tools.ts +5 -0
  553. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  554. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -419
  555. package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -8
  556. package/node_modules/@earendil-works/pi-tui/README.md +13 -1
  557. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
  558. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  559. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  560. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
  561. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  562. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +102 -43
  563. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  564. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -1
  565. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  566. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -1
  567. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  568. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
  569. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
  570. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
  571. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
  572. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  573. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  574. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  575. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
  576. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  577. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -77
  578. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  579. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +20 -4
  580. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  581. package/node_modules/@earendil-works/pi-tui/dist/tui.js +244 -42
  582. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  583. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
  584. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  585. package/node_modules/@earendil-works/pi-tui/dist/utils.js +46 -15
  586. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  587. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  588. package/package.json +8 -7
  589. package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
  590. package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
@@ -0,0 +1,198 @@
1
+ // bug-verdict-loop.ts — review-phase verdict + revision/loopback handling for
2
+ // the fix-bug pipeline. Extracted VERBATIM from fix-bug.ts's phase loop
3
+ // (FORGE-S31 file-size refactor) as a pure decision function: it performs the
4
+ // same store reads, ctx.ui notifications, state writes, transcript records,
5
+ // tree-node finalization, status-reset transition, and halt-advisor dispatch the
6
+ // inline block did, and returns a small discriminated result the caller's loop
7
+ // switches on.
8
+ //
9
+ // Behavior-preserving: no logic changes. The only structural change is that the
10
+ // inline `return {...}` paths now return `{ kind: "return"; result }`, the
11
+ // `continue` path returns `{ kind: "loopback"; toIndex }`, and the fall-through
12
+ // (approved) path returns `{ kind: "advance" }`.
13
+ import { spawnSync } from "node:child_process";
14
+ import { resolveAdvisorModel, runHaltAdvisor } from "../halt-advisor.js";
15
+ import { offerRecoveryMenu } from "../common/recovery-menu.js";
16
+ import { recoverPhaseSummary } from "../common/summary-recovery.js";
17
+ import { findPredecessorIndex } from "../run-task.js";
18
+ import { BUG_PHASES } from "./bug-phases.js";
19
+ import { readBugRecord } from "./bug-id.js";
20
+ import { writeBugState } from "./bug-state.js";
21
+ import { readBugVerdict } from "./bug-verdict.js";
22
+ /**
23
+ * Evaluate the review-phase verdict and decide the loop's next move.
24
+ * Mirrors the inline block that previously lived in runBugPipelineInner.
25
+ */
26
+ export async function handleBugReviewVerdict(p) {
27
+ const { phase, bugId, storeCli, cwd, forgeRoot, iterationCounts, currentPhaseIndex, modelRoutingConfig, ctx } = p;
28
+ const { orchTranscript, finishPhaseNode, summaryKeyByRole, recoveredPhases } = p;
29
+ // Re-read bug record for latest status after subagent ran
30
+ const updatedBugRecord = readBugRecord(bugId, storeCli, cwd);
31
+ let verdict = readBugVerdict(updatedBugRecord, phase.role, summaryKeyByRole);
32
+ // Completion recovery (forge-engineering#41): a clean stop with no verdict in
33
+ // the store is most often the subagent writing the {PHASE}-SUMMARY.json
34
+ // sidecar but eliding the set-bug-summary that registers it. Register the
35
+ // sidecar ourselves (once per phase), then re-read. Phases whose verdict comes
36
+ // from bug.status (e.g. commit → summaryKey null) are not recoverable this way.
37
+ if (verdict === "missing") {
38
+ const summaryKey = summaryKeyByRole[phase.role];
39
+ if (summaryKey && !recoveredPhases.has(phase.role)) {
40
+ recoveredPhases.add(phase.role);
41
+ const rec = recoverPhaseSummary({
42
+ storeCli,
43
+ entityId: bugId,
44
+ summaryKey,
45
+ cwd,
46
+ summaryVerb: "set-bug-summary",
47
+ });
48
+ if (rec.ok) {
49
+ const recheck = readBugVerdict(readBugRecord(bugId, storeCli, cwd), phase.role, summaryKeyByRole);
50
+ if (recheck !== "missing") {
51
+ ctx.ui.notify(`⟳ forge:fix-bug — ${phase.role}: subagent skipped set-bug-summary; orchestrator registered ` +
52
+ `the '${summaryKey}' sidecar and the verdict is now present.`, "info");
53
+ verdict = recheck;
54
+ }
55
+ }
56
+ }
57
+ }
58
+ if (verdict === "missing") {
59
+ ctx.ui.notify(`× forge:fix-bug — verdict missing for phase ${phase.role} after subagent completed. Halting for advisory.`, "error");
60
+ finishPhaseNode("failed");
61
+ writeBugState(cwd, {
62
+ bugId,
63
+ phaseIndex: currentPhaseIndex,
64
+ iterationCounts,
65
+ halted: true,
66
+ lastError: `verdict missing for ${phase.role}`,
67
+ savedAt: new Date().toISOString(),
68
+ });
69
+ // A missing verdict IS a postflight-outputs failure: the canonical
70
+ // phase summary the subagent must write (e.g. summaries.code_review,
71
+ // linked via set-bug-summary) was never recorded, so there is no
72
+ // verdict to route on. Route it through the halt-recovery advisor
73
+ // (FORGE-S26-T18) — the same hand-off the preflight/postflight gate
74
+ // failures use — instead of a bare escalation. Best-effort, non-fatal.
75
+ const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
76
+ // FORGE-BUG-046: await the advisor so its diagnosis surfaces BEFORE the
77
+ // pipeline tears down (was `void` — fire-and-forget before pipeline-end).
78
+ await runHaltAdvisor({
79
+ gateFailure: {
80
+ phase: phase.role,
81
+ reasonCode: "verdict-missing",
82
+ detail: `Phase '${phase.role}' completed but no verdict was found in the store. ` +
83
+ "The canonical phase summary was not written, so the orchestrator has no verdict to route on.",
84
+ remediation: "Re-run the phase and ensure the subagent's forge_store set-bug-summary call " +
85
+ 'uses args:["<bugId>", "<phaseKey>"] with the literal phase key as args[1] ' +
86
+ "(e.g. code_review), and that the call exits zero before the subagent returns.",
87
+ },
88
+ advisorModel,
89
+ taskId: bugId,
90
+ cwd,
91
+ ctx: { ui: ctx.ui },
92
+ forgeRoot,
93
+ });
94
+ // FEAT-009: offer an interactive recovery menu (reset → resume). No-op in
95
+ // non-interactive mode; best-effort, never masks the halt.
96
+ await offerRecoveryMenu({ ui: ctx.ui, kind: "bug", id: bugId, cwd, storeCli });
97
+ return {
98
+ kind: "return",
99
+ result: {
100
+ status: "halted",
101
+ lastPhaseIndex: currentPhaseIndex,
102
+ iterationCounts,
103
+ lastError: `verdict missing for ${phase.role}`,
104
+ },
105
+ };
106
+ }
107
+ if (verdict === "revision") {
108
+ iterationCounts[phase.role] = (iterationCounts[phase.role] ?? 0) + 1;
109
+ if (iterationCounts[phase.role] >= phase.maxIterations) {
110
+ ctx.ui.notify(`× forge:fix-bug — revision cap reached for phase ${phase.role} ` +
111
+ `(${iterationCounts[phase.role]}/${phase.maxIterations} iterations). Escalating.`, "error");
112
+ finishPhaseNode("escalated");
113
+ writeBugState(cwd, {
114
+ bugId,
115
+ phaseIndex: currentPhaseIndex,
116
+ iterationCounts,
117
+ halted: true,
118
+ lastError: `revision cap reached for ${phase.role}`,
119
+ savedAt: new Date().toISOString(),
120
+ });
121
+ // FEAT-009: a revision-cap escalation is a halt like any other — route it
122
+ // through the halt-recovery advisor + recovery menu instead of leaving the
123
+ // bare error notify above as the only signal (matches the verdict-missing
124
+ // hand-off above and the run-task twin). Best-effort, non-fatal.
125
+ const gateFailure = {
126
+ phase: phase.role,
127
+ reasonCode: "revision-cap-reached",
128
+ detail: `Phase '${phase.role}' returned 'revision' ${iterationCounts[phase.role]} time(s), ` +
129
+ `reaching its cap of ${phase.maxIterations}. The reviewer kept requesting changes ` +
130
+ "and the predecessor phase could not satisfy them within the allowed iterations, " +
131
+ "so the pipeline halted rather than loop indefinitely.",
132
+ remediation: "Inspect the latest review feedback for this phase, address it manually, then " +
133
+ `reset the pipeline to the predecessor phase and resume — e.g. \`4ge reset ${bugId} ` +
134
+ `--to ${BUG_PHASES[findPredecessorIndex(BUG_PHASES, currentPhaseIndex)]?.role ?? phase.role}\` ` +
135
+ "— or re-run the bug once the underlying disagreement is resolved.",
136
+ };
137
+ const advisorModel = resolveAdvisorModel(modelRoutingConfig, ctx.model);
138
+ await runHaltAdvisor({
139
+ gateFailure,
140
+ advisorModel,
141
+ taskId: bugId,
142
+ cwd,
143
+ ctx: { ui: ctx.ui },
144
+ forgeRoot,
145
+ });
146
+ await offerRecoveryMenu({ ui: ctx.ui, kind: "bug", id: bugId, cwd, storeCli });
147
+ return {
148
+ kind: "return",
149
+ result: {
150
+ status: "escalated",
151
+ lastPhaseIndex: currentPhaseIndex,
152
+ iterationCounts,
153
+ lastError: `revision cap reached for ${phase.role}`,
154
+ },
155
+ };
156
+ }
157
+ // Transition bug back to in-progress before re-dispatching implement.
158
+ // This is required for review-code → implement and approve → implement loops.
159
+ const currentBugStatus = updatedBugRecord?.status;
160
+ if (currentBugStatus === "fixed" || currentBugStatus === "approved") {
161
+ const transitionResult = spawnSync("node", [storeCli, "update-status", "bug", bugId, "status", "in-progress"], { cwd, encoding: "utf8" });
162
+ if (transitionResult.status !== 0) {
163
+ ctx.ui.notify(`⚠ forge:fix-bug — failed to transition bug ${bugId} from ${currentBugStatus} to in-progress: ${transitionResult.stderr ?? "unknown"}`, "warning");
164
+ }
165
+ else {
166
+ ctx.ui.notify(`⟳ forge:fix-bug — transitioned bug ${bugId}: ${currentBugStatus} → in-progress`, "info");
167
+ }
168
+ }
169
+ // The review subagent itself finished cleanly — `revision`
170
+ // is its verdict, not a failure — so its node closes as
171
+ // completed before the predecessor re-dispatches under a
172
+ // fresh node ID.
173
+ finishPhaseNode("completed");
174
+ const predIndex = findPredecessorIndex(BUG_PHASES, currentPhaseIndex);
175
+ ctx.ui.notify(`⟳ forge:fix-bug — ${phase.role} returned revision; looping to ${BUG_PHASES[predIndex]?.role ?? predIndex} ` +
176
+ `(attempt ${iterationCounts[phase.role]}/${phase.maxIterations})`, "info");
177
+ orchTranscript.record({
178
+ kind: "phase-loopback",
179
+ ts: new Date().toISOString(),
180
+ fromPhase: phase.role,
181
+ toPhase: BUG_PHASES[predIndex]?.role ?? String(predIndex),
182
+ fromPhaseIndex: currentPhaseIndex,
183
+ toPhaseIndex: predIndex,
184
+ reason: `${phase.role} returned revision (attempt ${iterationCounts[phase.role]}/${phase.maxIterations})`,
185
+ });
186
+ writeBugState(cwd, {
187
+ bugId,
188
+ phaseIndex: predIndex,
189
+ iterationCounts,
190
+ halted: false,
191
+ savedAt: new Date().toISOString(),
192
+ });
193
+ return { kind: "loopback", toIndex: predIndex };
194
+ }
195
+ // verdict === "approved": fall through to advance
196
+ return { kind: "advance" };
197
+ }
198
+ //# sourceMappingURL=bug-verdict-loop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bug-verdict-loop.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/bug-verdict-loop.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAC9E,4EAA4E;AAC5E,iFAAiF;AACjF,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,iDAAiD;AAEjD,OAAO,EA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AAM,CACN,CAAC;QACF,cAAc,CAAC,MAAM,CAAC;YACrB,IAAI,EAAE,gBAAgB;YACtB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YAC5B,SAAS,EAAE,KAAK,CAAC,IAAI;YACrB,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC;YACzD,cAAc,EAAE,iBAAiB;YACjC,YAAY,EAAE,SAAS;YACvB,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,+BAA+B,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,aAAa,GAAG;SACzG,CAAC,CAAC;QACH,aAAa,CAAC,GAAG,EAAE;YAClB,KAAK;YACL,UAAU,EAAE,SAAS;YACrB,eAAe;YACf,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACjC,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IACjD,CAAC;IAED,kDAAkD;IAClD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BugRecord } from "./bug-id.js";
2
+ export type BugVerdict = "approved" | "revision" | "n/a" | "missing";
3
+ export declare function readBugVerdict(bugRecord: BugRecord | null, phaseRole: string, summaryKeyByRole: Record<string, string | null>): BugVerdict;
@@ -0,0 +1,55 @@
1
+ // bug-verdict.ts — read the routing verdict for a bug phase from the bug
2
+ // record (approve summary / commit status / review summaries). Extracted
3
+ // VERBATIM from fix-bug.ts (FORGE-S31 file-size refactor); no logic changes.
4
+ export function readBugVerdict(bugRecord, phaseRole, summaryKeyByRole) {
5
+ if (!bugRecord)
6
+ return "missing";
7
+ // Approve phase: read approve summary verdict (set via set-bug-summary).
8
+ // The forge v0.44.0 contract makes summaries.approve.verdict the canonical
9
+ // approve signal for bugs — `bug.status` does NOT carry an "approved"
10
+ // value (that enum was dropped). See read-verdict.cjs §
11
+ // BUG_PHASE_VERDICT_SOURCE for the matching plugin-side wiring.
12
+ if (phaseRole === "approve") {
13
+ const summaryKey = summaryKeyByRole["approve"];
14
+ if (summaryKey) {
15
+ const summaries = bugRecord.summaries ?? {};
16
+ const blob = summaries[summaryKey];
17
+ if (blob && typeof blob === "object") {
18
+ const verdict = blob?.verdict;
19
+ if (typeof verdict === "string") {
20
+ if (verdict === "approved")
21
+ return "approved";
22
+ if (verdict === "revision")
23
+ return "revision";
24
+ }
25
+ }
26
+ }
27
+ return "missing";
28
+ }
29
+ // Commit phase: read bug status directly. Terminal target is `fixed`.
30
+ if (phaseRole === "commit") {
31
+ if (bugRecord.status === "fixed")
32
+ return "approved";
33
+ // in-progress means commit did not advance status — treat as revision-needed.
34
+ if (bugRecord.status === "in-progress")
35
+ return "revision";
36
+ return "missing";
37
+ }
38
+ // Review phases: read from summaries via key map.
39
+ const summaryKey = summaryKeyByRole[phaseRole];
40
+ if (!summaryKey)
41
+ return "missing";
42
+ const summaries = bugRecord.summaries ?? {};
43
+ const blob = summaries[summaryKey];
44
+ if (!blob || typeof blob !== "object")
45
+ return "missing";
46
+ const verdict = blob?.verdict;
47
+ if (typeof verdict !== "string")
48
+ return "missing";
49
+ if (verdict === "approved")
50
+ return "approved";
51
+ if (verdict === "revision")
52
+ return "revision";
53
+ return "missing";
54
+ }
55
+ //# sourceMappingURL=bug-verdict.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bug-verdict.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/bug-verdict.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,yEAAyE;AACzE,6EAA6E;AAQ7E,MAAM,UAAU,cAAc,CAC7B,SAA2B,EAC3B,SAAiB,EACjB,gBAA+C;IAE/C,IAAI,CAAC,SAAS;QAAE,OAAO,SAAS,CAAC;IAEjC,yEAAyE;IACzE,2EA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gC,EAAE,OAAO,CAAC;IAC3D,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAClD,IAAI,OAAO,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC9C,IAAI,OAAO,KAAK,UAAU;QAAE,OAAO,UAAU,CAAC;IAC9C,OAAO,SAAS,CAAC;AAClB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+ import { type ForgeToolDefs } from "../../forge-tools.js";
3
+ export interface RegisterFixBugOptions {
4
+ cwd?: string;
5
+ forgeToolDefs?: ForgeToolDefs;
6
+ }
7
+ export declare function registerFixBug(pi: ExtensionAPI, options?: RegisterFixBugOptions): void;
@@ -0,0 +1,293 @@
1
+ // run-bug-command.ts — the /forge:fix-bug command handler (config discovery,
2
+ // bug-ID resolution / minting, resume detection, session registration, then
3
+ // delegate to runBugPipeline). Extracted VERBATIM from fix-bug.ts (no logic
4
+ // changes).
5
+ import * as fs from "node:fs";
6
+ import * as path from "node:path";
7
+ import { assertAudience, CallerContextStore } from "../../audience-gate.js";
8
+ import { loadGovernorProjectConfig } from "../../governor-config.js";
9
+ import { getOrchestratorTree } from "../../orchestrator-tree.js";
10
+ import { loadWorkflow } from "../../parsers/workflow-loader.js";
11
+ import { getSessionRegistry } from "../../session-registry.js";
12
+ import { resolveToCanonicalId, resolveToolDir } from "../../store/store-resolver.js";
13
+ import { archiveRun } from "../../transcript-archive.js";
14
+ import { createOrchestratorNotifier } from "../common/orchestrator-notify.js";
15
+ import { resolveOrchestratorEntry } from "../common/orchestrator-entry.js";
16
+ import { formatLocalTime, isNonInteractive } from "../common/orchestrator-misc.js";
17
+ import { assignNextBugId, extractBugIdFromReportText, preCreateBug, readBugRecord } from "./bug-id.js";
18
+ import { BUG_PHASES, BUG_TERMINAL_STATES } from "./bug-phases.js";
19
+ import { deleteBugState, isBugStateStale, readBugState } from "./bug-state.js";
20
+ import { runBugPipeline } from "./run-bug-pipeline.js";
21
+ const STATUS_KEY = "forge:fix-bug";
22
+ const MESSAGE_KEY = "forge:fix-bug:message";
23
+ export function registerFixBug(pi, options = {}) {
24
+ pi.registerCommand("forge:fix-bug", {
25
+ description: "Run the full bug-fix pipeline (triage → plan-fix → review-plan → implement → review-code → approve → commit). " +
26
+ "Usage: /forge:fix-bug <BUG_ID_OR_SUMMARY>. " +
27
+ "Orchestrator archetype: each phase is an isolated subagent session (IL10).",
28
+ async handler(args, ctx) {
29
+ const cwd = options.cwd ?? process.cwd();
30
+ const rawArg = args.trim();
31
+ if (!rawArg) {
32
+ ctx.ui.notify("× forge:fix-bug — bug ID or summary required. Usage: /forge:fix-bug <BUG_ID_OR_SUMMARY>", "error");
33
+ return;
34
+ }
35
+ const notify = createOrchestratorNotifier(ctx, {
36
+ label: "forge:fix-bug",
37
+ statusKey: STATUS_KEY,
38
+ messageKey: MESSAGE_KEY,
39
+ });
40
+ notify.setStatus(`fix-bug: initializing…`);
41
+ // ── Discover forge config + sweep orphaned transcripts ───────────
42
+ const entry = resolveOrchestratorEntry({ cwd, notify });
43
+ if (!entry)
44
+ return;
45
+ const { forgeRoot, storeCli, preflightGate } = entry;
46
+ // ── Determine bugId ────────────────────────────────────────────
47
+ let bugId;
48
+ let isNewBug = false;
49
+ // Check if arg looks like it could be a bug ID (prefixed or unprefixed).
50
+ // Covers: FORGE-BUG-042, BUG-042, B042.
51
+ const looksLikeBugId = /^(?:[A-Z0-9]+-)?(?:BUG-?\d+|B\d+)$/i.test(rawArg) || /^BUG-\d+$/i.test(rawArg);
52
+ if (/^[A-Z][A-Z0-9]*-BUG-\d+$/.test(rawArg)) {
53
+ // Canonical prefixed bug ID (any project prefix, e.g. FORGE-BUG-042,
54
+ // CART-BUG-001) — verify it exists. Previously hardcoded to FORGE-,
55
+ // which pushed other-prefix canonical IDs through the resolver.
56
+ bugId = rawArg;
57
+ const bugRecord = readBugRecord(bugId, storeCli, cwd);
58
+ if (!bugRecord) {
59
+ ctx.ui.notify(`× forge:fix-bug — bug ${bugId} not found in store.`, "error");
60
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
61
+ return;
62
+ }
63
+ // Check if bug is already in a terminal state
64
+ if (BUG_TERMINAL_STATES.has(bugRecord.status ?? "")) {
65
+ ctx.ui.notify(`× forge:fix-bug — bug ${bugId} is already in terminal state '${bugRecord.status}'. No further processing.`, "error");
66
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
67
+ return;
68
+ }
69
+ }
70
+ else if (looksLikeBugId) {
71
+ // Unprefixed bug ID — resolve through the store cascade.
72
+ // Issue #20: unprefixed entity IDs silently poisoned substitutions.
73
+ const toolDir = resolveToolDir(forgeRoot);
74
+ const resolvedBugId = await resolveToCanonicalId(rawArg, toolDir, cwd, "bug", {
75
+ ctx,
76
+ commandLabel: "forge:fix-bug",
77
+ });
78
+ if (!resolvedBugId) {
79
+ // Error already emitted by resolver
80
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
81
+ ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
82
+ return;
83
+ }
84
+ bugId = resolvedBugId;
85
+ // Re-verify the resolved bug exists
86
+ const bugRecord = readBugRecord(bugId, storeCli, cwd);
87
+ if (!bugRecord) {
88
+ ctx.ui.notify(`× forge:fix-bug — bug ${bugId} not found in store.`, "error");
89
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
90
+ return;
91
+ }
92
+ if (BUG_TERMINAL_STATES.has(bugRecord.status ?? "")) {
93
+ ctx.ui.notify(`× forge:fix-bug — bug ${bugId} is already in terminal state '${bugRecord.status}'. No further processing.`, "error");
94
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
95
+ return;
96
+ }
97
+ }
98
+ else {
99
+ // @file or free-form text. If an @file report references a canonical
100
+ // <PREFIX>-BUG-NNN that already exists in the store, fix THAT record —
101
+ // minting a new bug here duplicated CART-BUG-001 as a phantom in the
102
+ // CART incident (the report header carried the real ID all along).
103
+ let reportBugId = null;
104
+ if (rawArg.startsWith("@")) {
105
+ const rel = rawArg.slice(1).trim();
106
+ const reportPath = path.isAbsolute(rel) ? rel : path.join(cwd, rel);
107
+ try {
108
+ // 256 KB cap — bug reports are small; never slurp arbitrary files.
109
+ if (fs.existsSync(reportPath) && fs.statSync(reportPath).size <= 262144) {
110
+ const projectPrefix = loadGovernorProjectConfig(cwd).prefix;
111
+ reportBugId = extractBugIdFromReportText(fs.readFileSync(reportPath, "utf8"), projectPrefix);
112
+ }
113
+ }
114
+ catch {
115
+ /* unreadable report — fall through to new-bug intake */
116
+ }
117
+ }
118
+ const reportRecord = reportBugId ? readBugRecord(reportBugId, storeCli, cwd) : null;
119
+ if (reportBugId && reportRecord) {
120
+ if (BUG_TERMINAL_STATES.has(reportRecord.status ?? "")) {
121
+ ctx.ui.notify(`× forge:fix-bug — ${rawArg} references ${reportBugId}, which is already in terminal state ` +
122
+ `'${reportRecord.status}'. No further processing.`, "error");
123
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
124
+ return;
125
+ }
126
+ bugId = reportBugId;
127
+ ctx.ui.notify(`forge:fix-bug — ${rawArg} references existing bug ${bugId}; fixing it (no new record minted).`, "info");
128
+ }
129
+ else {
130
+ // Free-form text (or report with no resolvable ID) — defer bug
131
+ // creation to the triage-phase subagent via a PENDING placeholder.
132
+ bugId = `PENDING-${Date.now()}`;
133
+ isNewBug = true;
134
+ }
135
+ }
136
+ // ── Pre-flight confirm ───────────────────────────────────────────
137
+ if (!isNonInteractive()) {
138
+ const confirmMsg = isNewBug
139
+ ? `Fix bug: "${rawArg.slice(0, 80)}"? A bug record will be created during triage.`
140
+ : `Fix bug ${bugId}?`;
141
+ const proceed = await ctx.ui.confirm(`Fix bug?`, confirmMsg);
142
+ if (!proceed) {
143
+ ctx.ui.notify("forge:fix-bug — cancelled.", "info");
144
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
145
+ return;
146
+ }
147
+ }
148
+ // ── Resume detection ─────────────────────────────────────────────
149
+ const registry = getSessionRegistry();
150
+ const existing = isNewBug ? null : readBugState(cwd, bugId);
151
+ let resumeFromState;
152
+ if (existing) {
153
+ if (isBugStateStale(existing)) {
154
+ ctx.ui.notify(`⚠ forge:fix-bug — cached state for ${bugId} is stale (>7 days old, saved at ${formatLocalTime(existing.savedAt)}). Offering purge.`, "warning");
155
+ if (!isNonInteractive()) {
156
+ const purge = await ctx.ui.confirm(`Purge stale state for ${bugId}?`, "The cached state is older than 7 days. Purge and restart from the beginning?");
157
+ if (purge) {
158
+ deleteBugState(cwd, bugId);
159
+ }
160
+ else {
161
+ ctx.ui.notify("forge:fix-bug — stale state kept; aborting.", "info");
162
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
163
+ ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
164
+ return;
165
+ }
166
+ }
167
+ else {
168
+ ctx.ui.notify("forge:fix-bug — stale state; non-interactive mode auto-aborting.", "info");
169
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
170
+ ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
171
+ return;
172
+ }
173
+ }
174
+ else {
175
+ // ADR-S21-01: offer resume for ALL non-stale states — halted=true
176
+ // (explicit failure), halted=false (cancelled/interrupted), and
177
+ // any state with existing.status set.
178
+ const stateStatus = existing.status ?? (existing.halted ? "halted" : "interrupted");
179
+ const statusLabel = stateStatus === "cancelled" ? "cancelled" : stateStatus === "halted" ? "halted" : "interrupted";
180
+ const phaseRole = BUG_PHASES[existing.phaseIndex]?.role ?? existing.phaseIndex;
181
+ if (!isNonInteractive()) {
182
+ const resume = await ctx.ui.confirm(`Resume ${bugId}?`, `Cached state — phase ${existing.phaseIndex} (${phaseRole}), ${statusLabel}, ` +
183
+ `saved at ${formatLocalTime(existing.savedAt)}. Resume from here?`);
184
+ if (resume) {
185
+ resumeFromState = existing;
186
+ ctx.ui.notify(`forge:fix-bug — resuming ${bugId} from phase ${phaseRole} (${statusLabel})`, "info");
187
+ }
188
+ else {
189
+ deleteBugState(cwd, bugId);
190
+ }
191
+ }
192
+ else {
193
+ // Non-interactive: auto-resume from state (no confirmation).
194
+ // Cancelled/interrupted states are valid resume points.
195
+ resumeFromState = existing;
196
+ ctx.ui.notify(`forge:fix-bug — resuming ${bugId} from phase ${phaseRole} (${statusLabel})`, "info");
197
+ }
198
+ }
199
+ }
200
+ // For new bugs, triage phase will create the bug record.
201
+ // After triage, we need to capture the bugId from the subagent events.
202
+ // This is handled inside runBugPipeline via onEvent interception.
203
+ // For now, we pass the temporary bugId; runBugPipeline will update it.
204
+ // ── Materialization check (top-level workflow) ──────────────────
205
+ const workflowPath = path.join(cwd, ".forge", "workflows", "fix_bug.md");
206
+ if (fs.existsSync(workflowPath)) {
207
+ try {
208
+ const loaded = loadWorkflow(workflowPath);
209
+ // AC#12: Top-level audience check for the fix_bug.md workflow.
210
+ // The orchestrator ITSELF runs fix_bug.md (not a subagent), so check
211
+ // from orchestrator context. Using asSubagent would falsely reject
212
+ // orchestrator-only workflows called by the orchestrator.
213
+ const topAudienceOk = CallerContextStore.asOrchestrator(() => assertAudience({ workflowName: "fix_bug", audience: loaded.audience }, ctx));
214
+ if (!topAudienceOk) {
215
+ ctx.ui.notify("× forge:fix-bug — audience check failed for top-level fix_bug workflow.", "error");
216
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
217
+ ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
218
+ return;
219
+ }
220
+ // Note: no materialization-marker check here. fix_bug.md is the
221
+ // orchestrator workflow (prose algorithm), not a sub-workflow that
222
+ // subagents run directly. Per-phase sub-workflows (architect_approve,
223
+ // review_code, etc.) each get their own materialization check inside
224
+ // runBugPipeline at line ~481, which is the correct guard layer.
225
+ }
226
+ catch {
227
+ // Workflow file exists but couldn't be read — non-fatal, continue
228
+ }
229
+ }
230
+ // ── Pre-assign real bug ID for new bugs ────────────────────────
231
+ // Previously this was done inside runBugPipeline, but the session registry
232
+ // needs the real ID before startSession is called.
233
+ if (isNewBug && bugId.startsWith("PENDING-")) {
234
+ const realBugId = assignNextBugId(storeCli, cwd, loadGovernorProjectConfig(cwd).prefix);
235
+ const title = rawArg && !rawArg.startsWith("@") ? rawArg.slice(0, 120) : "New bug (pending triage)";
236
+ if (preCreateBug(realBugId, title, storeCli, cwd)) {
237
+ ctx.ui.notify(`forge:fix-bug — pre-assigned bug ID: ${realBugId}`, "info");
238
+ bugId = realBugId;
239
+ }
240
+ else {
241
+ ctx.ui.notify("× forge:fix-bug — failed to pre-create bug record. Falling back to PENDING capture.", "error");
242
+ }
243
+ }
244
+ // Register session
245
+ registry.startSession(bugId);
246
+ // Bridge: register bug in OrchestratorTree.
247
+ const tree = getOrchestratorTree();
248
+ tree.startNode(bugId, { label: `fix-bug ${bugId}`, kind: "orchestrator" });
249
+ // ── Delegate to pipeline ─────────────────────────────────────────
250
+ // ── Delegate to pipeline ─────────────────────────────────────────
251
+ const signal = registry.getAbortSignal(bugId);
252
+ const pipelineResult = await runBugPipeline({
253
+ bugId,
254
+ originalArg: isNewBug ? rawArg : undefined,
255
+ isNewBug,
256
+ cwd,
257
+ ctx,
258
+ forgeRoot,
259
+ storeCli,
260
+ preflightGate,
261
+ registry,
262
+ resumeFromState,
263
+ signal,
264
+ forgeToolDefs: options.forgeToolDefs,
265
+ });
266
+ // ── Handle result ────────────────────────────────────────────────
267
+ if (pipelineResult.status === "completed") {
268
+ registry.completeSession(bugId, "completed");
269
+ tree.completeNode(bugId, "completed");
270
+ ctx.ui.notify(`〇 forge:fix-bug — ${bugId} pipeline complete (${BUG_PHASES.length} phases).`, "info");
271
+ }
272
+ else if (pipelineResult.status === "cancelled") {
273
+ registry.completeSession(bugId, "cancelled");
274
+ tree.completeNode(bugId, "cancelled");
275
+ }
276
+ else {
277
+ registry.completeSession(bugId, "failed");
278
+ tree.completeNode(bugId, "failed");
279
+ }
280
+ // Mirror this run into the central transcript archive (best-effort —
281
+ // archiveRun never throws).
282
+ if (pipelineResult.orchestratorTranscriptPath) {
283
+ archiveRun({
284
+ cwd,
285
+ orchestratorJsonlPath: pipelineResult.orchestratorTranscriptPath,
286
+ });
287
+ }
288
+ ctx.ui.setStatus?.(STATUS_KEY, undefined);
289
+ ctx.ui.setStatus?.(MESSAGE_KEY, undefined);
290
+ },
291
+ });
292
+ }
293
+ //# sourceMappingURL=run-bug-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-bug-command.js","sourceRoot":"","sources":["../../../../../src/extensions/forgecli/orchestrators/bug/run-bug-command.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,YAAY;AAEZ,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAoB,MAAM,gBAAgB,CAAC;AACjG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AC;YACJ,CAAC;YAED,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;YAC1C,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAC5C,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { RunBugPipelineOptions, RunBugPipelineResult } from "./run-bug-types.js";
2
+ export declare function runBugPipeline(opts: RunBugPipelineOptions): Promise<RunBugPipelineResult>;