@entelligentsia/forgecli 1.0.3 → 1.0.14

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 (497) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/README.md +2 -1
  3. package/dist/CHANGELOG-forge-plugin.md +250 -0
  4. package/dist/CHANGELOG-pi.md +94 -0
  5. package/dist/bin/forge.js +0 -0
  6. package/dist/extensions/forgecli/config-layer.d.ts +16 -0
  7. package/dist/extensions/forgecli/config-layer.js +5 -0
  8. package/dist/extensions/forgecli/config-layer.js.map +1 -1
  9. package/dist/extensions/forgecli/dashboard/component.d.ts +102 -0
  10. package/dist/extensions/forgecli/dashboard/component.js +882 -0
  11. package/dist/extensions/forgecli/dashboard/component.js.map +1 -0
  12. package/dist/extensions/forgecli/dashboard/register.d.ts +2 -0
  13. package/dist/extensions/forgecli/dashboard/register.js +45 -0
  14. package/dist/extensions/forgecli/dashboard/register.js.map +1 -0
  15. package/dist/extensions/forgecli/dashboard/view-model.d.ts +35 -0
  16. package/dist/extensions/forgecli/dashboard/view-model.js +54 -0
  17. package/dist/extensions/forgecli/dashboard/view-model.js.map +1 -0
  18. package/dist/extensions/forgecli/fix-bug.js +72 -7
  19. package/dist/extensions/forgecli/fix-bug.js.map +1 -1
  20. package/dist/extensions/forgecli/forge-artifact-tool.js +27 -4
  21. package/dist/extensions/forgecli/forge-artifact-tool.js.map +1 -1
  22. package/dist/extensions/forgecli/forge-cli-schema.json +4 -0
  23. package/dist/extensions/forgecli/forge-commands.js +1 -0
  24. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  25. package/dist/extensions/forgecli/forge-init/phase4-register.js +53 -0
  26. package/dist/extensions/forgecli/forge-init/phase4-register.js.map +1 -1
  27. package/dist/extensions/forgecli/forge-subagent.js +6 -4
  28. package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
  29. package/dist/extensions/forgecli/forge-tools.js +2 -2
  30. package/dist/extensions/forgecli/forge-tools.js.map +1 -1
  31. package/dist/extensions/forgecli/index.js +5 -0
  32. package/dist/extensions/forgecli/index.js.map +1 -1
  33. package/dist/extensions/forgecli/lib/halt-advisor.d.ts +54 -0
  34. package/dist/extensions/forgecli/lib/halt-advisor.js +90 -0
  35. package/dist/extensions/forgecli/lib/halt-advisor.js.map +1 -0
  36. package/dist/extensions/forgecli/migration-engine.js +25 -12
  37. package/dist/extensions/forgecli/migration-engine.js.map +1 -1
  38. package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +25 -0
  39. package/dist/extensions/forgecli/orchestrator-status-bar.js +183 -0
  40. package/dist/extensions/forgecli/orchestrator-status-bar.js.map +1 -0
  41. package/dist/extensions/forgecli/orchestrator-tree.d.ts +96 -0
  42. package/dist/extensions/forgecli/orchestrator-tree.js +390 -0
  43. package/dist/extensions/forgecli/orchestrator-tree.js.map +1 -0
  44. package/dist/extensions/forgecli/project-orientation.js +12 -8
  45. package/dist/extensions/forgecli/project-orientation.js.map +1 -1
  46. package/dist/extensions/forgecli/regenerate.d.ts +16 -0
  47. package/dist/extensions/forgecli/regenerate.js +110 -0
  48. package/dist/extensions/forgecli/regenerate.js.map +1 -1
  49. package/dist/extensions/forgecli/run-sprint.js +33 -3
  50. package/dist/extensions/forgecli/run-sprint.js.map +1 -1
  51. package/dist/extensions/forgecli/run-task.d.ts +32 -0
  52. package/dist/extensions/forgecli/run-task.js +185 -12
  53. package/dist/extensions/forgecli/run-task.js.map +1 -1
  54. package/dist/extensions/forgecli/subagent/phase-guard.js +15 -5
  55. package/dist/extensions/forgecli/subagent/phase-guard.js.map +1 -1
  56. package/dist/extensions/forgecli/subagent/phase-summary-map.d.ts +1 -0
  57. package/dist/extensions/forgecli/subagent/phase-summary-map.js +17 -0
  58. package/dist/extensions/forgecli/subagent/phase-summary-map.js.map +1 -1
  59. package/dist/extensions/forgecli/thread-switcher.js +105 -764
  60. package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
  61. package/dist/extensions/forgecli/viewport-events.js +32 -0
  62. package/dist/extensions/forgecli/viewport-events.js.map +1 -1
  63. package/dist/forge-payload/.base-pack/commands/fix-bug.md +1 -1
  64. package/dist/forge-payload/.base-pack/commands/run-sprint.md +1 -1
  65. package/dist/forge-payload/.base-pack/commands/run-task.md +1 -1
  66. package/dist/forge-payload/.base-pack/personas/architect.md +1 -1
  67. package/dist/forge-payload/.base-pack/personas/bug-fixer.md +1 -1
  68. package/dist/forge-payload/.base-pack/personas/collator.md +3 -3
  69. package/dist/forge-payload/.base-pack/personas/engineer.md +1 -1
  70. package/dist/forge-payload/.base-pack/personas/librarian.md +1 -1
  71. package/dist/forge-payload/.base-pack/personas/orchestrator.md +1 -1
  72. package/dist/forge-payload/.base-pack/personas/product-manager.md +1 -1
  73. package/dist/forge-payload/.base-pack/personas/qa-engineer.md +1 -1
  74. package/dist/forge-payload/.base-pack/personas/supervisor.md +1 -1
  75. package/dist/forge-payload/.base-pack/workflows/_fragments/event-emission-schema.md +1 -1
  76. package/dist/forge-payload/.base-pack/workflows/_fragments/friction-emit.md +1 -1
  77. package/dist/forge-payload/.base-pack/workflows/_fragments/iron-laws.md +1 -1
  78. package/dist/forge-payload/.base-pack/workflows/_fragments/progress-reporting.md +2 -2
  79. package/dist/forge-payload/.base-pack/workflows/_fragments/store-cli-verbs.md +29 -5
  80. package/dist/forge-payload/.base-pack/workflows/architect_approve.md +8 -10
  81. package/dist/forge-payload/.base-pack/workflows/architect_review_sprint_completion.md +2 -2
  82. package/dist/forge-payload/.base-pack/workflows/architect_sprint_intake.md +2 -2
  83. package/dist/forge-payload/.base-pack/workflows/architect_sprint_plan.md +5 -5
  84. package/dist/forge-payload/.base-pack/workflows/collator_agent.md +5 -7
  85. package/dist/forge-payload/.base-pack/workflows/commit_task.md +7 -9
  86. package/dist/forge-payload/.base-pack/workflows/enhance.md +5 -5
  87. package/dist/forge-payload/.base-pack/workflows/implement_plan.md +9 -9
  88. package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +12 -13
  89. package/dist/forge-payload/.base-pack/workflows/plan_task.md +5 -6
  90. package/dist/forge-payload/.base-pack/workflows/review_code.md +8 -8
  91. package/dist/forge-payload/.base-pack/workflows/review_plan.md +8 -8
  92. package/dist/forge-payload/.base-pack/workflows/sprint_retrospective.md +3 -3
  93. package/dist/forge-payload/.base-pack/workflows/triage.md +13 -10
  94. package/dist/forge-payload/.base-pack/workflows/update_implementation.md +2 -2
  95. package/dist/forge-payload/.base-pack/workflows/update_plan.md +2 -2
  96. package/dist/forge-payload/.base-pack/workflows/validate_task.md +6 -8
  97. package/dist/forge-payload/.base-pack/workflows-js/wfl-fix-bug.js +490 -0
  98. package/dist/forge-payload/.base-pack/workflows-js/wfl-run-sprint.js +416 -0
  99. package/dist/forge-payload/.base-pack/workflows-js/wfl-run-task.js +608 -0
  100. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  101. package/dist/forge-payload/.schemas/_defs/locator.schema.json +13 -0
  102. package/dist/forge-payload/.schemas/bug.schema.json +1 -0
  103. package/dist/forge-payload/.schemas/config.schema.json +2 -3
  104. package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
  105. package/dist/forge-payload/.schemas/event.schema.json +16 -0
  106. package/dist/forge-payload/.schemas/migrations.json +299 -0
  107. package/dist/forge-payload/.schemas/sprint.schema.json +1 -0
  108. package/dist/forge-payload/.schemas/task.schema.json +1 -0
  109. package/dist/forge-payload/commands/health.md +29 -0
  110. package/dist/forge-payload/commands/rebuild.md +143 -15
  111. package/dist/forge-payload/commands/update.md +28 -27
  112. package/dist/forge-payload/hooks/preflight-session.cjs +99 -0
  113. package/dist/forge-payload/init/phases/phase-3-materialize.md +18 -5
  114. package/dist/forge-payload/integrity.json +7 -6
  115. package/dist/forge-payload/meta/fragments/tool-discipline.md +1 -1
  116. package/dist/forge-payload/meta/personas/meta-architect.md +1 -1
  117. package/dist/forge-payload/meta/personas/meta-bug-fixer.md +1 -1
  118. package/dist/forge-payload/meta/personas/meta-collator.md +7 -7
  119. package/dist/forge-payload/meta/personas/meta-engineer.md +1 -1
  120. package/dist/forge-payload/meta/personas/meta-orchestrator.md +1 -1
  121. package/dist/forge-payload/meta/personas/meta-supervisor.md +1 -1
  122. package/dist/forge-payload/meta/tool-specs/store-cli.spec.md +1 -1
  123. package/dist/forge-payload/meta/workflows/_fragments/event-emission-schema.md +1 -1
  124. package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +1 -1
  125. package/dist/forge-payload/meta/workflows/_fragments/iron-laws.md +1 -1
  126. package/dist/forge-payload/meta/workflows/_fragments/progress-reporting.md +2 -2
  127. package/dist/forge-payload/meta/workflows/_fragments/store-cli-verbs.md +29 -5
  128. package/dist/forge-payload/meta/workflows/meta-approve.md +8 -10
  129. package/dist/forge-payload/meta/workflows/meta-bug-triage.md +13 -10
  130. package/dist/forge-payload/meta/workflows/meta-collate.md +6 -8
  131. package/dist/forge-payload/meta/workflows/meta-commit.md +7 -9
  132. package/dist/forge-payload/meta/workflows/meta-enhance.md +5 -5
  133. package/dist/forge-payload/meta/workflows/meta-fix-bug.md +35 -11
  134. package/dist/forge-payload/meta/workflows/meta-implement.md +18 -9
  135. package/dist/forge-payload/meta/workflows/meta-migrate.md +13 -14
  136. package/dist/forge-payload/meta/workflows/meta-new-sprint.md +3 -3
  137. package/dist/forge-payload/meta/workflows/meta-orchestrate.md +175 -82
  138. package/dist/forge-payload/meta/workflows/meta-plan-sprint.md +6 -6
  139. package/dist/forge-payload/meta/workflows/meta-plan-task.md +12 -6
  140. package/dist/forge-payload/meta/workflows/meta-retro.md +4 -4
  141. package/dist/forge-payload/meta/workflows/meta-retrospective.md +4 -4
  142. package/dist/forge-payload/meta/workflows/meta-review-implementation.md +8 -8
  143. package/dist/forge-payload/meta/workflows/meta-review-plan.md +8 -8
  144. package/dist/forge-payload/meta/workflows/meta-review-sprint-completion.md +3 -3
  145. package/dist/forge-payload/meta/workflows/meta-sprint-intake.md +3 -3
  146. package/dist/forge-payload/meta/workflows/meta-sprint-plan.md +6 -6
  147. package/dist/forge-payload/meta/workflows/meta-update-implementation.md +2 -2
  148. package/dist/forge-payload/meta/workflows/meta-update-plan.md +2 -2
  149. package/dist/forge-payload/meta/workflows/meta-validate.md +6 -8
  150. package/dist/forge-payload/schemas/_defs/locator.schema.json +13 -0
  151. package/dist/forge-payload/schemas/bug.schema.json +1 -0
  152. package/dist/forge-payload/schemas/config.schema.json +2 -3
  153. package/dist/forge-payload/schemas/enum-catalog.json +2 -2
  154. package/dist/forge-payload/schemas/event.schema.json +16 -0
  155. package/dist/forge-payload/schemas/sprint.schema.json +1 -0
  156. package/dist/forge-payload/schemas/structure-manifest.json +76 -73
  157. package/dist/forge-payload/schemas/task.schema.json +1 -0
  158. package/dist/forge-payload/skills/refresh-kb-links/SKILL.md +14 -7
  159. package/dist/forge-payload/tools/artifact-store.cjs +242 -0
  160. package/dist/forge-payload/tools/artifact.cjs +60 -120
  161. package/dist/forge-payload/tools/banners.cjs +29 -10
  162. package/dist/forge-payload/tools/check-structure.cjs +88 -7
  163. package/dist/forge-payload/tools/collate.cjs +16 -2
  164. package/dist/forge-payload/tools/lib/artifact-kinds.cjs +95 -0
  165. package/dist/forge-payload/tools/lib/store-nlp.cjs +6 -0
  166. package/dist/forge-payload/tools/lib/store-query-exec.cjs +39 -5
  167. package/dist/forge-payload/tools/lib/suggest.cjs +2 -1
  168. package/dist/forge-payload/tools/manage-config.cjs +5 -7
  169. package/dist/forge-payload/tools/parse-gates.cjs +73 -1
  170. package/dist/forge-payload/tools/postflight-gate.cjs +252 -0
  171. package/dist/forge-payload/tools/preflight-gate.cjs +102 -5
  172. package/dist/forge-payload/tools/store-cli.cjs +50 -15
  173. package/dist/forge-payload/tools/substitute-placeholders.cjs +5 -4
  174. package/dist/forge-payload/tools/verify-phase.cjs +17 -0
  175. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +5 -2
  176. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +1 -1
  177. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +81 -18
  178. package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +1 -1
  179. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +1 -1
  180. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +1 -0
  181. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +1 -1
  182. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  183. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +19 -24
  184. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  185. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +1 -0
  186. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  187. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +14 -1
  188. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  189. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +22 -8
  190. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  191. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  192. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  193. package/node_modules/@earendil-works/pi-ai/README.md +1 -1
  194. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +374 -122
  195. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  196. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +424 -232
  197. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  198. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts +1 -1
  199. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  200. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +38 -2
  201. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  202. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  203. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +21 -12
  204. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  205. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
  206. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +6 -10
  207. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  208. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
  209. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +1 -1
  210. package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +1 -1
  211. package/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +1 -1
  212. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +5 -3
  213. package/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +1 -1
  214. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.d.ts.map +1 -1
  215. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +3 -4
  216. package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js.map +1 -1
  217. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +2 -3
  219. package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +159 -78
  222. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
  224. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +16 -11
  225. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
  226. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +4 -1
  228. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  230. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +6 -10
  231. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
  232. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
  234. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
  235. package/node_modules/@earendil-works/pi-ai/dist/stream.d.ts.map +1 -1
  236. package/node_modules/@earendil-works/pi-ai/dist/stream.js +14 -2
  237. package/node_modules/@earendil-works/pi-ai/dist/stream.js.map +1 -1
  238. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +14 -4
  239. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts +6 -0
  242. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +1 -0
  243. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js +34 -0
  244. package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +1 -0
  245. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts +9 -7
  246. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.d.ts.map +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +8 -7
  248. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js.map +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +1 -1
  251. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts +1 -1
  253. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.d.ts.map +1 -1
  254. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js.map +1 -1
  256. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts +10 -1
  257. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  258. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +179 -79
  259. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  260. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  261. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +94 -0
  262. package/node_modules/@earendil-works/pi-coding-agent/README.md +9 -0
  263. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +3 -0
  264. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +27 -0
  266. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  268. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +15 -2
  269. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  270. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +1 -0
  271. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
  272. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +1 -0
  273. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
  274. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +5 -1
  275. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  276. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +28 -4
  277. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  278. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.d.ts.map +1 -1
  279. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +18 -24
  280. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js.map +1 -1
  281. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +1 -1
  282. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  283. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +8 -2
  284. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  285. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +7 -5
  286. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  287. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  288. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  289. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +65 -13
  290. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  291. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  292. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
  293. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  294. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.d.ts +9 -1
  295. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.d.ts.map +1 -1
  296. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +134 -11
  297. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js.map +1 -1
  298. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts +2 -0
  299. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  300. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +10 -6
  301. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  302. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts +6 -7
  303. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  304. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +75 -28
  305. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  306. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +2 -0
  307. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  308. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +14 -9
  309. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  310. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  311. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +0 -3
  312. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  313. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  314. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +7 -10
  315. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  316. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  317. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  318. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
  319. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
  320. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
  321. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -7
  322. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
  323. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  324. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +6 -7
  325. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  326. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts +5 -2
  327. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts.map +1 -1
  328. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +17 -1
  329. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js.map +1 -1
  330. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  331. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +5 -6
  332. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  333. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +2 -0
  334. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  335. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -0
  336. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  337. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  338. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +69 -16
  339. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  340. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
  341. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +118 -1
  342. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
  343. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -3
  344. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  345. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +2 -4
  346. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
  347. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  348. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js +1 -1
  349. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/user-message.js.map +1 -1
  350. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +3 -0
  351. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  352. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +59 -6
  353. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  354. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +10 -0
  356. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  358. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +3 -1
  359. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  360. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts +1 -0
  361. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  362. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-types.js.map +1 -1
  363. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.d.ts +4 -0
  364. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.d.ts.map +1 -0
  365. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.js +13 -0
  366. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.js.map +1 -0
  367. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.d.ts +3 -0
  368. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.d.ts.map +1 -0
  369. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.js +7 -0
  370. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.js.map +1 -0
  371. package/node_modules/@earendil-works/pi-coding-agent/docs/custom-provider.md +13 -10
  372. package/node_modules/@earendil-works/pi-coding-agent/docs/development.md +1 -1
  373. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +12 -6
  374. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +25 -12
  375. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +13 -5
  376. package/node_modules/@earendil-works/pi-coding-agent/docs/quickstart.md +1 -0
  377. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +2 -1
  378. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +6 -0
  379. package/node_modules/@earendil-works/pi-coding-agent/docs/session-format.md +1 -1
  380. package/node_modules/@earendil-works/pi-coding-agent/docs/sessions.md +8 -0
  381. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +7 -3
  382. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +2 -0
  383. package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +2 -2
  384. package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +9 -0
  385. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +1 -0
  386. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/index.ts +1 -1
  387. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  388. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/index.ts +54 -3
  389. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  390. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/git-merge-and-resolve.ts +115 -0
  391. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/input-transform-streaming.ts +39 -0
  392. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  393. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  394. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +443 -61
  395. package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
  396. package/node_modules/@earendil-works/pi-tui/README.md +2 -2
  397. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  398. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +24 -83
  399. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  400. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  401. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +7 -55
  402. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  403. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +7 -1
  404. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  405. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +12 -2
  406. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  407. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  408. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  409. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  410. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +1 -1
  411. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  412. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +34 -7
  413. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  414. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +33 -10
  415. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  416. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +172 -37
  417. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  418. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +6 -1
  419. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  420. package/node_modules/@earendil-works/pi-tui/dist/utils.js +27 -15
  421. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  422. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +25 -0
  423. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +1 -0
  424. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +96 -0
  425. package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +1 -0
  426. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  427. package/node_modules/@entelligentsia/forge-compress/LICENSE +21 -0
  428. package/node_modules/@entelligentsia/forge-compress/README.md +85 -0
  429. package/node_modules/@mariozechner/clipboard/Cargo.toml +3 -3
  430. package/node_modules/@mariozechner/clipboard/index.d.ts +34 -20
  431. package/node_modules/@mariozechner/clipboard/index.js +546 -257
  432. package/node_modules/@mariozechner/clipboard/package.json +5 -6
  433. package/node_modules/@mariozechner/clipboard/package.json.prepack-backup +14 -14
  434. package/node_modules/@mariozechner/clipboard/src/lib.rs +4 -9
  435. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/clipboard.linux-x64-gnu.node +0 -0
  436. package/node_modules/@mariozechner/clipboard-linux-x64-gnu/package.json +2 -2
  437. package/package.json +7 -7
  438. package/dist/bin/forgecli.d.ts +0 -2
  439. package/dist/bin/forgecli.js +0 -6
  440. package/dist/bin/forgecli.js.map +0 -1
  441. package/dist/extensions/forgecli/config-tui/index.d.ts +0 -5
  442. package/dist/extensions/forgecli/config-tui/index.js +0 -5
  443. package/dist/extensions/forgecli/config-tui/index.js.map +0 -1
  444. package/dist/extensions/forgecli/loaders/persona-skill-loader.d.ts +0 -45
  445. package/dist/extensions/forgecli/loaders/persona-skill-loader.js +0 -227
  446. package/dist/extensions/forgecli/loaders/persona-skill-loader.js.map +0 -1
  447. package/dist/extensions/forgecli/loaders/template-render.d.ts +0 -20
  448. package/dist/extensions/forgecli/loaders/template-render.js +0 -85
  449. package/dist/extensions/forgecli/loaders/template-render.js.map +0 -1
  450. package/dist/extensions/forgecli/loaders/workflow-loader.d.ts +0 -41
  451. package/dist/extensions/forgecli/loaders/workflow-loader.js +0 -164
  452. package/dist/extensions/forgecli/loaders/workflow-loader.js.map +0 -1
  453. package/dist/forge-payload/.base-pack/commands/quiz-agent.md +0 -6
  454. package/dist/forge-payload/.base-pack/commands/retrospective.md +0 -6
  455. package/dist/forge-payload/.base-pack/commands/sprint-intake.md +0 -6
  456. package/dist/forge-payload/.base-pack/commands/sprint-plan.md +0 -6
  457. package/dist/forge-payload/.base-pack/workflows/fix_bug.md +0 -446
  458. package/dist/forge-payload/.base-pack/workflows/orchestrate_task.md +0 -934
  459. package/dist/forge-payload/.base-pack/workflows/run_sprint.md +0 -225
  460. package/dist/forge-payload/commands/calibrate.md +0 -10
  461. package/dist/forge-payload/commands/materialize.md +0 -119
  462. package/dist/forge-payload/commands/migrate.md +0 -12
  463. package/dist/forge-payload/commands/quiz-agent.md +0 -6
  464. package/dist/forge-payload/commands/regenerate.md +0 -6
  465. package/dist/forge-payload/commands/store-query.md +0 -6
  466. package/dist/forge-payload/commands/store-repair.md +0 -6
  467. package/dist/forge-payload/commands/update-tools.md +0 -10
  468. package/dist/forge-payload/meta/templates/meta-retrospective.md +0 -28
  469. package/dist/forge-payload/tools/prompts/sprint-plan-prompt.md +0 -70
  470. package/dist/forge-payload/tools/schemas/task-list.schema.json +0 -53
  471. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +0 -4
  472. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +0 -1
  473. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +0 -3
  474. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +0 -1
  475. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +0 -20
  476. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +0 -1
  477. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +0 -92
  478. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +0 -1
  479. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +0 -18
  480. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +0 -1
  481. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +0 -42
  482. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +0 -1
  483. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +0 -10
  484. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +0 -1
  485. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +0 -31
  486. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +0 -1
  487. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +0 -30
  488. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +0 -1
  489. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +0 -170
  490. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +0 -1
  491. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +0 -26
  492. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +0 -1
  493. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +0 -90
  494. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +0 -1
  495. package/node_modules/@mariozechner/clipboard-linux-x64-musl/README.md +0 -3
  496. package/node_modules/@mariozechner/clipboard-linux-x64-musl/clipboard.linux-x64-musl.node +0 -0
  497. package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +0 -25
@@ -132,9 +132,17 @@ function validateManifest(manifest, forgeRoot) {
132
132
  fragments: path.join(basePackDir, 'workflows', '_fragments'),
133
133
  templates: path.join(basePackDir, 'templates'),
134
134
  commands: path.join(basePackDir, 'commands'),
135
+ 'workflows-js': path.join(basePackDir, 'workflows-js'),
136
+ // tools: not base-pack-sourced — source is forgeRoot/tools/ (verbatim vendor).
137
+ // Uses recursive enumeration to include lib/*.cjs with the lib/ prefix.
138
+ tools: path.join(forgeRoot, 'tools'),
135
139
  // schemas: not base-pack-sourced — source is forgeRoot/schemas/
136
140
  };
137
141
 
142
+ // Namespaces that require recursive enumeration (files may include path prefixes
143
+ // like lib/*.cjs). The walker returns relative paths with forward slashes.
144
+ const recursiveNs = new Set(['tools']);
145
+
138
146
  const manifestOnly = []; // Files in manifest but not in base-pack
139
147
  const basePackOnly = []; // Files in base-pack but not in manifest
140
148
 
@@ -147,14 +155,31 @@ function validateManifest(manifest, forgeRoot) {
147
155
 
148
156
  const manifestFiles = new Set(ns.files || []);
149
157
 
150
- // Read base-pack source directory
158
+ // Read base-pack source directory (flat or recursive depending on namespace)
151
159
  let basePackFiles = [];
152
160
  try {
153
- basePackFiles = fs.readdirSync(sourceDir).filter(f => {
154
- // Only include regular files, skip subdirectories (like _fragments under workflows)
155
- const stat = fs.statSync(path.join(sourceDir, f));
156
- return stat.isFile();
157
- });
161
+ if (recursiveNs.has(nsKey)) {
162
+ // Recursive walk: enumerate all files, returning paths relative to sourceDir
163
+ // (with forward-slash separators). Excludes *.test.cjs files.
164
+ const walkDir = (dir, prefix) => {
165
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
166
+ for (const entry of entries) {
167
+ const relPath = prefix ? `${prefix}/${entry.name}` : entry.name;
168
+ if (entry.isDirectory()) {
169
+ walkDir(path.join(dir, entry.name), relPath);
170
+ } else if (entry.isFile() && !entry.name.endsWith('.test.cjs')) {
171
+ basePackFiles.push(relPath);
172
+ }
173
+ }
174
+ };
175
+ walkDir(sourceDir, '');
176
+ } else {
177
+ basePackFiles = fs.readdirSync(sourceDir).filter(f => {
178
+ // Only include regular files, skip subdirectories (like _fragments under workflows)
179
+ const stat = fs.statSync(path.join(sourceDir, f));
180
+ return stat.isFile();
181
+ });
182
+ }
158
183
  } catch {
159
184
  // Directory doesn't exist — all manifest files are manifestOnly
160
185
  for (const f of manifestFiles) {
@@ -183,9 +208,65 @@ function validateManifest(manifest, forgeRoot) {
183
208
  return { manifestOnly, basePackOnly };
184
209
  }
185
210
 
211
+ // Checks whether the vendored .forge/tools/ directory is present, and whether
212
+ // the version marker (.forge/tools/.forge-tools-version) matches the active
213
+ // plugin version from .forge/config.json (paths.forgeRef).
214
+ //
215
+ // Returns:
216
+ // { present, vendoredVersion, activeVersion, stale, reason }
217
+ //
218
+ // present — true if .forge/tools/ directory exists
219
+ // vendoredVersion — version string from .forge-tools-version (or null)
220
+ // activeVersion — version string from paths.forgeRef in config (or null)
221
+ // stale — true when: dir absent=false; marker absent=true; versions differ=true
222
+ // reason — 'ok' | 'missing' | 'marker-absent' | 'version-mismatch'
223
+ function checkToolsVersion(projectRoot) {
224
+ const toolsDir = path.join(projectRoot, '.forge', 'tools');
225
+ const markerFile = path.join(toolsDir, '.forge-tools-version');
226
+ const configFile = path.join(projectRoot, '.forge', 'config.json');
227
+
228
+ // Dir absent → not stale (just missing)
229
+ if (!fs.existsSync(toolsDir)) {
230
+ return { present: false, vendoredVersion: null, activeVersion: null, stale: false, reason: 'missing' };
231
+ }
232
+
233
+ // Read active version from config
234
+ let activeVersion = null;
235
+ if (fs.existsSync(configFile)) {
236
+ try {
237
+ const cfg = JSON.parse(fs.readFileSync(configFile, 'utf8'));
238
+ activeVersion = (cfg && cfg.paths && cfg.paths.forgeRef) ? cfg.paths.forgeRef : null;
239
+ } catch {
240
+ // unparseable — leave activeVersion null
241
+ }
242
+ }
243
+
244
+ // Marker absent → stale
245
+ if (!fs.existsSync(markerFile)) {
246
+ return { present: true, vendoredVersion: null, activeVersion, stale: true, reason: 'marker-absent' };
247
+ }
248
+
249
+ // Read vendored version from marker
250
+ let vendoredVersion = null;
251
+ try {
252
+ const marker = JSON.parse(fs.readFileSync(markerFile, 'utf8'));
253
+ vendoredVersion = (marker && marker.version) ? marker.version : null;
254
+ } catch {
255
+ // unparseable marker → treat as marker-absent
256
+ return { present: true, vendoredVersion: null, activeVersion, stale: true, reason: 'marker-absent' };
257
+ }
258
+
259
+ // Version mismatch → stale
260
+ if (activeVersion && vendoredVersion && vendoredVersion !== activeVersion) {
261
+ return { present: true, vendoredVersion, activeVersion, stale: true, reason: 'version-mismatch' };
262
+ }
263
+
264
+ return { present: true, vendoredVersion, activeVersion, stale: false, reason: 'ok' };
265
+ }
266
+
186
267
  // ── Exports ────────────────────────────────────────────────────────────────────
187
268
 
188
- module.exports = { checkNamespaces, validateManifest };
269
+ module.exports = { checkNamespaces, validateManifest, checkToolsVersion };
189
270
 
190
271
  // ── CLI ────────────────────────────────────────────────────────────────────────
191
272
 
@@ -108,9 +108,23 @@ function resolveTaskDir(task, sprintDirPath, engPath) {
108
108
  const normalizedTaskPath = task.path ? task.path.replace(/\\/g, '/').replace(/\/$/, '') : null;
109
109
  const normalizedEngPath = engPath ? engPath.replace(/\\/g, '/').replace(/\/$/, '') : '';
110
110
 
111
- // Case 1: path is under the engineering root — it IS the task directory
111
+ // Case 1: path is under the engineering root — it IS (or is a file inside)
112
+ // the task directory. Some store records carry task.path pointing at a file
113
+ // inside the task dir (e.g. .../FORGE-S22-T04/PLAN.md) rather than the dir
114
+ // itself; in that case basename(path) is the filename, not the dir. Only
115
+ // trust Case 1 when its candidate resolves to a real directory on disk —
116
+ // otherwise fall through to the filesystem scan, which resolves by taskId.
112
117
  if (normalizedTaskPath && normalizedEngPath && normalizedTaskPath.startsWith(normalizedEngPath + '/')) {
113
- return resultOk(path.basename(normalizedTaskPath));
118
+ const candidate = path.basename(normalizedTaskPath);
119
+ // Can't verify against disk — preserve legacy behaviour and trust the path.
120
+ if (!sprintDirPath) return resultOk(candidate);
121
+ const candidatePath = path.join(sprintDirPath, candidate);
122
+ // Trust Case 1 only when the candidate is a real directory. If it's a file
123
+ // (task.path pointed at a doc inside the dir) or absent, fall through to the
124
+ // filesystem scan below, which resolves the dir by taskId.
125
+ if (fs.existsSync(candidatePath) && fs.statSync(candidatePath).isDirectory()) {
126
+ return resultOk(candidate);
127
+ }
114
128
  }
115
129
 
116
130
  // Case 2 (and fallback for case 1 missing): filesystem scan
@@ -0,0 +1,95 @@
1
+ 'use strict';
2
+
3
+ // ── Canonical artifact-kind registry ─────────────────────────────────────────
4
+ //
5
+ // Single source of truth for artifact filenames, bug-mode filename overrides,
6
+ // and the phase→kind mapping. Extracted from artifact.cjs per ADR
7
+ // `doc/decisions/artifact-resolution-abstraction.md` (Phase 1) so that
8
+ // artifact.cjs, store-cli.cjs (set-summary / set-bug-summary), and the
9
+ // forge-cli `forge_artifact` surface all consume ONE catalog instead of
10
+ // maintaining parallel copies.
11
+ //
12
+ // Renaming an artifact file is a one-line edit here.
13
+
14
+ const ARTIFACT_CATALOG = {
15
+ 'plan': { filename: 'PLAN.md', type: 'md' },
16
+ 'plan-review': { filename: 'PLAN_REVIEW.md', type: 'md' },
17
+ 'progress': { filename: 'PROGRESS.md', type: 'md' },
18
+ 'code-review': { filename: 'CODE_REVIEW.md', type: 'md' },
19
+ 'validation-report': { filename: 'VALIDATION_REPORT.md', type: 'md' },
20
+ 'architect-approval': { filename: 'ARCHITECT_APPROVAL.md', type: 'md' },
21
+ 'triage': { filename: 'TRIAGE.md', type: 'md' },
22
+ 'bug-report': { filename: 'BUG_REPORT.md', type: 'md' },
23
+ 'index': { filename: 'INDEX.md', type: 'md' },
24
+ 'task-prompt': { filename: 'TASK_PROMPT.md', type: 'md' },
25
+ 'sprint-requirements': { filename: 'SPRINT_REQUIREMENTS.md', type: 'md' },
26
+ 'sprint-completion-review': { filename: 'SPRINT_COMPLETION_REVIEW.md', type: 'md' },
27
+ 'cost-report': { filename: 'COST_REPORT.md', type: 'md' },
28
+ 'timesheet': { filename: 'TIMESHEET.md', type: 'md' },
29
+ 'plan-summary': { filename: 'PLAN-SUMMARY.json', type: 'json' },
30
+ 'review-plan-summary': { filename: 'REVIEW-PLAN-SUMMARY.json', type: 'json' },
31
+ 'implementation-summary': { filename: 'IMPLEMENTATION-SUMMARY.json', type: 'json' },
32
+ 'review-code-summary': { filename: 'REVIEW-CODE-SUMMARY.json', type: 'json' },
33
+ 'review-impl-summary': { filename: 'REVIEW-IMPL-SUMMARY.json', type: 'json' },
34
+ 'validation-summary': { filename: 'VALIDATION-SUMMARY.json', type: 'json' },
35
+ 'approve-summary': { filename: 'APPROVE-SUMMARY.json', type: 'json' },
36
+ 'commit-summary': { filename: 'COMMIT-SUMMARY.json', type: 'json' },
37
+ 'triage-summary': { filename: 'TRIAGE-SUMMARY.json', type: 'json' },
38
+ 'writeback-summary': { filename: 'WRITEBACK-SUMMARY.json', type: 'json' },
39
+ 'collation-summary': { filename: 'COLLATION-SUMMARY.json', type: 'json' },
40
+ };
41
+
42
+ // Per-entity filename overrides. Bug-mode plans and plan-summaries use the
43
+ // BUG_FIX_PLAN prefix to match the long-standing forge convention and the
44
+ // preflight-gate.cjs expectations for review-plan in bug mode. Without this
45
+ // override, plan-fix (routed via plan_task.md post FORGE-BUG-040) writes
46
+ // PLAN.md and review-plan preflight then fails "artifact missing:
47
+ // BUG_FIX_PLAN.md" — see FORGE-BUG-041.
48
+ const ARTIFACT_FILENAME_OVERRIDES = {
49
+ bug: {
50
+ 'plan': 'BUG_FIX_PLAN.md',
51
+ 'plan-summary': 'BUG-FIX-PLAN-SUMMARY.json',
52
+ },
53
+ };
54
+
55
+ // Phase → artifact-kind. Phases use underscore spellings (mirror of
56
+ // store-helpers VALID_SUMMARY_PHASES); kinds use the hyphenated catalog keys.
57
+ // This is the mapping set-summary / set-bug-summary use to self-resolve the
58
+ // sidecar JSON file from a record's path, so callers never hand-build paths.
59
+ const PHASE_TO_KIND = {
60
+ 'plan': 'plan-summary',
61
+ 'review_plan': 'review-plan-summary',
62
+ 'implementation': 'implementation-summary',
63
+ 'code_review': 'review-code-summary',
64
+ 'validation': 'validation-summary',
65
+ 'triage': 'triage-summary',
66
+ 'approve': 'approve-summary',
67
+ };
68
+
69
+ function resolveArtifactFilename(entity, artifactName) {
70
+ const override = ARTIFACT_FILENAME_OVERRIDES[entity];
71
+ if (override && override[artifactName]) return override[artifactName];
72
+ const entry = ARTIFACT_CATALOG[artifactName];
73
+ if (!entry) throw new Error(`unknown artifact kind: ${artifactName}`);
74
+ return entry.filename;
75
+ }
76
+
77
+ // Resolve the phase-summary sidecar filename for an entity. Applies the
78
+ // phase→kind map, then the per-entity filename override (so a bug's "plan"
79
+ // summary becomes BUG-FIX-PLAN-SUMMARY.json).
80
+ function resolveSummaryFilename(entity, phase) {
81
+ const kind = PHASE_TO_KIND[phase];
82
+ if (!kind) throw new Error(`unknown phase: ${phase}`);
83
+ return resolveArtifactFilename(entity, kind);
84
+ }
85
+
86
+ const ARTIFACT_NAMES = Object.keys(ARTIFACT_CATALOG).sort();
87
+
88
+ module.exports = {
89
+ ARTIFACT_CATALOG,
90
+ ARTIFACT_FILENAME_OVERRIDES,
91
+ ARTIFACT_NAMES,
92
+ PHASE_TO_KIND,
93
+ resolveArtifactFilename,
94
+ resolveSummaryFilename,
95
+ };
@@ -99,6 +99,12 @@ function parseIntentNLP(intent) {
99
99
  outer:
100
100
  for (let i = 0; i < words.length; i++) {
101
101
  if (consumed.has(i)) continue;
102
+ // "with <entity>" (and "<entity> for") are FK-follow directives handled in
103
+ // Stage 4 — they must NOT be treated as the primary entity. Otherwise an
104
+ // explicit anchored ID (e.g. "WI-S19-T04 with sprint with feature") loses
105
+ // its entity to the follow-word, its filter is stripped as invalid, and the
106
+ // query degrades into a full-store scan.
107
+ if (i > 0 && words[i - 1] === 'with') continue;
102
108
  const w = words[i];
103
109
  if (i + 1 < words.length) {
104
110
  const bigram = w + ' ' + words[i + 1];
@@ -5,6 +5,14 @@ const path = require('path');
5
5
  const { extractExcerpt, loadForgeConfig, findIndexPath } = require('./store-facade.cjs');
6
6
  const { extractKeywordsFromIntent } = require('./store-nlp.cjs');
7
7
 
8
+ // Default safety cap for NLP listings without an explicit limit. Prevents an
9
+ // unbounded query from dumping the entire store into an LLM's context (a single
10
+ // uncapped query consumed ~28% of a plan run's input tokens — see
11
+ // doc/plans/store-query-nlp-response-shape-improvement.md). Callers that need
12
+ // everything use the exact `--sprint`/`--task` flag paths (which bypass this) or
13
+ // pass an explicit limit.
14
+ const DEFAULT_NLP_LIMIT = 25;
15
+
8
16
  function escapeRe(s) {
9
17
  return String(s).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
10
18
  }
@@ -128,7 +136,7 @@ function executeQuery(plan, store, cfg) {
128
136
  const trace = [];
129
137
  const traverse = plan.traverse || plan;
130
138
  const singMap = { bug: 'bugs', task: 'tasks', sprint: 'sprints', feature: 'features' };
131
- const primary = singMap[traverse.primary] || traverse.primary || 'tasks';
139
+ let primary = singMap[traverse.primary] || traverse.primary || 'tasks';
132
140
  let filter = { ...(traverse.filter || {}) };
133
141
  const follow = traverse.follow || [];
134
142
  const kwMatch = traverse.keywordMatch || {};
@@ -138,6 +146,7 @@ function executeQuery(plan, store, cfg) {
138
146
 
139
147
  // Validate + strip invalid filters
140
148
  const validation = validatePlan(plan);
149
+ const stripped = {};
141
150
  if (validation.warnings.length > 0) {
142
151
  const validators = buildFieldValidators();
143
152
  const fields = validators[primary];
@@ -145,14 +154,17 @@ function executeQuery(plan, store, cfg) {
145
154
  for (const key of Object.keys(filter)) {
146
155
  if (!fields[key]) {
147
156
  trace.push(`stripped invalid filter key: ${key}`);
157
+ stripped[key] = filter[key];
148
158
  delete filter[key];
149
159
  } else {
150
160
  const spec = fields[key];
151
161
  if (spec instanceof RegExp && !spec.test(String(filter[key]))) {
152
162
  trace.push(`stripped filter ${key}="${filter[key]}" (value mismatch)`);
163
+ stripped[key] = filter[key];
153
164
  delete filter[key];
154
165
  } else if (Array.isArray(spec) && !spec.includes(String(filter[key]))) {
155
166
  trace.push(`stripped filter ${key}="${filter[key]}" (not in enum)`);
167
+ stripped[key] = filter[key];
156
168
  delete filter[key];
157
169
  }
158
170
  }
@@ -160,6 +172,21 @@ function executeQuery(plan, store, cfg) {
160
172
  }
161
173
  }
162
174
 
175
+ // Re-route on a stripped record-anchoring ID: an explicit taskId/bugId that
176
+ // was stripped because `primary` disagreed means the caller named a specific
177
+ // record. Honour it (re-route primary + restore the filter) instead of
178
+ // degrading into a full-collection scan. This is the engine-layer floor that
179
+ // backs up the parser fix in store-nlp.cjs.
180
+ const ID_ROUTE = { taskId: 'tasks', bugId: 'bugs' };
181
+ for (const idKey of Object.keys(ID_ROUTE)) {
182
+ if (stripped[idKey] !== undefined && primary !== ID_ROUTE[idKey]) {
183
+ trace.push(`re-routed primary ${primary} → ${ID_ROUTE[idKey]} (anchored ${idKey}="${stripped[idKey]}")`);
184
+ primary = ID_ROUTE[idKey];
185
+ filter[idKey] = stripped[idKey];
186
+ break;
187
+ }
188
+ }
189
+
163
190
  // List primary entities
164
191
  let entities;
165
192
  switch (primary) {
@@ -201,10 +228,16 @@ function executeQuery(plan, store, cfg) {
201
228
  return { query: cfg.query || '', path: 'intent-nlp', traversalTrace: trace, count: totalMatched, results: [], relatedFileRefs: [], totalMatched };
202
229
  }
203
230
 
204
- // Limit
205
- if (traverse.limit && entities.length > traverse.limit) {
206
- trace.push(`limited to ${traverse.limit} (of ${totalMatched})`);
207
- entities = entities.slice(0, traverse.limit);
231
+ // Limit — honour an explicit limit; otherwise apply a default safety cap so an
232
+ // unbounded NLP listing never dumps the whole collection into the model's
233
+ // context. `truncated` + `totalMatched` let the caller detect and, if needed,
234
+ // re-query with an explicit limit or the exact-flag path.
235
+ const effectiveLimit = traverse.limit || DEFAULT_NLP_LIMIT;
236
+ let truncated = false;
237
+ if (entities.length > effectiveLimit) {
238
+ trace.push(`limited to ${effectiveLimit} (of ${totalMatched})${traverse.limit ? '' : ' [default cap]'}`);
239
+ entities = entities.slice(0, effectiveLimit);
240
+ truncated = true;
208
241
  }
209
242
 
210
243
  // Build results + follow FKs
@@ -263,6 +296,7 @@ function executeQuery(plan, store, cfg) {
263
296
  results: allResults,
264
297
  totalMatched,
265
298
  returned: allResults.length,
299
+ truncated,
266
300
  limit: traverse.limit || null,
267
301
  sort: traverse.sort || null,
268
302
  relatedFileRefs: [...new Set(relatedFiles)],
@@ -90,7 +90,8 @@ const DRIFT_MAP = {
90
90
  'task-completed': ['task-committed'],
91
91
  'implemented': ['implementing'],
92
92
  'set': ['set-summary'],
93
- 'start': ['startTimestamp']
93
+ 'start': ['startTimestamp'],
94
+ 'create': ['write']
94
95
  };
95
96
 
96
97
  // ---------------------------------------------------------------------------
@@ -418,7 +418,7 @@ if (subcmd === 'resolve-forge-root') {
418
418
 
419
419
  const { config } = readConfig();
420
420
  const forgeRef = getByPath(config, 'paths.forgeRef');
421
- const forgeRoot = getByPath(config, 'paths.forgeRoot');
421
+ // Note: paths.forgeRoot read removed in FORGE-S29-T03 (Priority 3 deprecated).
422
422
 
423
423
  // Priority 2: Scan cache/marketplace directories by forgeRef
424
424
  if (forgeRef && typeof forgeRef === 'string') {
@@ -442,14 +442,12 @@ if (subcmd === 'resolve-forge-root') {
442
442
  }
443
443
  }
444
444
 
445
- // Priority 3: Fallback to paths.forgeRoot (deprecated but still read)
446
- if (forgeRoot && typeof forgeRoot === 'string') {
447
- console.log(forgeRoot);
448
- process.exit(0);
449
- }
445
+ // Priority 3 (paths.forgeRoot fallback) removed FORGE-S29-T03.
446
+ // paths.forgeRoot is deprecated and no longer used as a resolution fallback.
447
+ // Relying on it masks misconfigured projects and blocks the FORGE_ROOT retirement.
450
448
 
451
449
  // No resolution possible
452
- console.error('× Cannot resolve Forge plugin root: no CLAUDE_PLUGIN_ROOT env var, no forgeRef cache match, and no forgeRoot in config.');
450
+ console.error('× Cannot resolve Forge plugin root: no CLAUDE_PLUGIN_ROOT env var and no forgeRef cache match. Run /forge:update to refresh.');
453
451
  process.exit(1);
454
452
  }
455
453
 
@@ -154,4 +154,76 @@ function parseAfter(rest, lineNo) {
154
154
  return { phase: m[1], verdict };
155
155
  }
156
156
 
157
- module.exports = { parseGates };
157
+ // parseOutputs same fence-scan logic as parseGates but for ```outputs phase=X blocks.
158
+ // Closed grammar: only `artifact` and `require` directives are allowed.
159
+ // Unknown directives throw (parity with parseGates).
160
+ const OUTPUTS_FENCE_OPEN = /^```outputs\s+phase=([A-Za-z0-9_-]+)\s*$/;
161
+
162
+ function parseOutputs(markdown) {
163
+ if (typeof markdown !== 'string' || markdown.length === 0) return {};
164
+ const lines = markdown.split('\n');
165
+ const result = {};
166
+ let currentPhase = null;
167
+ let inFence = false;
168
+ let fenceStartLine = -1;
169
+ let fenceBuffer = [];
170
+ for (let i = 0; i < lines.length; i++) {
171
+ const line = lines[i];
172
+ const lineNo = i + 1;
173
+ if (!inFence) {
174
+ const m = line.match(OUTPUTS_FENCE_OPEN);
175
+ if (m) {
176
+ currentPhase = m[1];
177
+ if (result[currentPhase]) {
178
+ throw new Error(
179
+ `parse-gates: line ${lineNo}: duplicate outputs block for phase "${currentPhase}"`,
180
+ );
181
+ }
182
+ inFence = true;
183
+ fenceStartLine = lineNo;
184
+ fenceBuffer = [];
185
+ }
186
+ continue;
187
+ }
188
+ // Inside an outputs fence
189
+ if (FENCE_CLOSE.test(line)) {
190
+ result[currentPhase] = parseOutputsBlock(fenceBuffer, fenceStartLine);
191
+ inFence = false;
192
+ currentPhase = null;
193
+ fenceBuffer = [];
194
+ continue;
195
+ }
196
+ fenceBuffer.push({ text: line, lineNo });
197
+ }
198
+ if (inFence) {
199
+ throw new Error(`parse-gates: unterminated \`\`\`outputs fence opened at line ${fenceStartLine}`);
200
+ }
201
+ return result;
202
+ }
203
+
204
+ function parseOutputsBlock(bufferedLines, _fenceStartLine) {
205
+ const spec = { artifacts: [], require: [] };
206
+ for (const { text, lineNo } of bufferedLines) {
207
+ const trimmed = text.trim();
208
+ if (trimmed === '' || trimmed.startsWith('#')) continue;
209
+ const firstSpace = trimmed.search(/\s/);
210
+ if (firstSpace < 0) {
211
+ throw new Error(`parse-gates: line ${lineNo}: malformed directive "${trimmed}"`);
212
+ }
213
+ const directive = trimmed.slice(0, firstSpace);
214
+ const rest = trimmed.slice(firstSpace + 1).trim();
215
+ switch (directive) {
216
+ case 'artifact':
217
+ spec.artifacts.push(parseArtifact(rest, lineNo));
218
+ break;
219
+ case 'require':
220
+ spec.require.push(parsePredicate(rest, lineNo));
221
+ break;
222
+ default:
223
+ throw new Error(`parse-gates: line ${lineNo}: unknown directive "${directive}"`);
224
+ }
225
+ }
226
+ return spec;
227
+ }
228
+
229
+ module.exports = { parseGates, parseOutputs };