@entelligentsia/forgecli 1.0.36 → 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 (654) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/CHANGELOG-forge-plugin.md +101 -0
  3. package/dist/CHANGELOG-pi.md +143 -0
  4. package/dist/bin/argv.d.ts +1 -1
  5. package/dist/bin/argv.js +12 -0
  6. package/dist/bin/argv.js.map +1 -1
  7. package/dist/bin/forge.js +18 -16
  8. package/dist/bin/forge.js.map +1 -1
  9. package/dist/bin/reset.d.ts +39 -0
  10. package/dist/bin/reset.js +101 -0
  11. package/dist/bin/reset.js.map +1 -0
  12. package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +56 -265
  13. package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -1
  14. package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +52 -32
  15. package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -1
  16. package/dist/extensions/forgecli/commands/reset.d.ts +16 -0
  17. package/dist/extensions/forgecli/commands/reset.js +83 -0
  18. package/dist/extensions/forgecli/commands/reset.js.map +1 -0
  19. package/dist/extensions/forgecli/forge-commands.d.ts +7 -2
  20. package/dist/extensions/forgecli/forge-commands.js +19 -5
  21. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  22. package/dist/extensions/forgecli/forge-subagent.d.ts +4 -4
  23. package/dist/extensions/forgecli/hooks/forge-permissions.js +20 -6
  24. package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -1
  25. package/dist/extensions/forgecli/index.js +6 -3
  26. package/dist/extensions/forgecli/index.js.map +1 -1
  27. package/dist/extensions/forgecli/lib/forge-root.d.ts +6 -0
  28. package/dist/extensions/forgecli/lib/forge-root.js +52 -0
  29. package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
  30. package/dist/extensions/forgecli/lib/payload-manifest.d.ts +62 -0
  31. package/dist/extensions/forgecli/lib/payload-manifest.js +151 -0
  32. package/dist/extensions/forgecli/lib/payload-manifest.js.map +1 -0
  33. package/dist/extensions/forgecli/orchestrators/advisory-render.d.ts +9 -0
  34. package/dist/extensions/forgecli/orchestrators/advisory-render.js +107 -0
  35. package/dist/extensions/forgecli/orchestrators/advisory-render.js.map +1 -0
  36. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +3 -0
  37. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +22 -0
  38. package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -1
  39. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +1 -1
  40. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +34 -2
  41. package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -1
  42. package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +2 -2
  43. package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -1
  44. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.d.ts +24 -0
  45. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js +58 -0
  46. package/dist/extensions/forgecli/orchestrators/common/recovery-menu.js.map +1 -0
  47. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.d.ts +53 -0
  48. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js +131 -0
  49. package/dist/extensions/forgecli/orchestrators/common/reset-pipeline.js.map +1 -0
  50. package/dist/extensions/forgecli/orchestrators/halt-advisor.js +25 -3
  51. package/dist/extensions/forgecli/orchestrators/halt-advisor.js.map +1 -1
  52. package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +3 -3
  53. package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -1
  54. package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +3 -0
  55. package/dist/extensions/forgecli/orchestrators/task/task-phases.js +22 -0
  56. package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -1
  57. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +1 -1
  58. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +37 -2
  59. package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -1
  60. package/dist/extensions/forgecli/store/store-resolver.d.ts +15 -0
  61. package/dist/extensions/forgecli/store/store-resolver.js +118 -18
  62. package/dist/extensions/forgecli/store/store-resolver.js.map +1 -1
  63. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  64. package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
  65. package/dist/forge-payload/.schemas/migrations.json +85 -0
  66. package/dist/forge-payload/.schemas/payload-manifest.schema.json +100 -0
  67. package/dist/forge-payload/commands/check-agent.md +7 -23
  68. package/dist/forge-payload/commands/enhance.md +31 -5
  69. package/dist/forge-payload/commands/init.md +161 -97
  70. package/dist/forge-payload/commands/reset.md +117 -0
  71. package/dist/forge-payload/hooks/forge-permissions.cjs +29 -6
  72. package/dist/forge-payload/init/phases/phase-3-materialize.md +5 -1
  73. package/dist/forge-payload/integrity.json +22 -7
  74. package/dist/forge-payload/payload-manifest.json +314 -0
  75. package/dist/forge-payload/schemas/enum-catalog.json +2 -2
  76. package/dist/forge-payload/schemas/payload-manifest.schema.json +100 -0
  77. package/dist/forge-payload/schemas/structure-manifest.json +4 -2
  78. package/dist/forge-payload/tools/reset-plan.cjs +210 -0
  79. package/dist/forge-payload/tools/store.cjs +4 -1
  80. package/dist/forge-payload/tools/substitute-placeholders.cjs +10 -2
  81. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  82. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
  83. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  84. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
  85. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  86. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
  87. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  88. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts +4 -0
  89. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.d.ts.map +1 -0
  90. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js +3 -0
  91. package/node_modules/@earendil-works/pi-agent-core/dist/harness/execution-env.js.map +1 -0
  92. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts +20 -0
  93. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.d.ts.map +1 -0
  94. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js +92 -0
  95. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/jsonl.js.map +1 -0
  96. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts +18 -0
  97. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.d.ts.map +1 -0
  98. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js +42 -0
  99. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/memory.js.map +1 -0
  100. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts +10 -0
  101. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.d.ts.map +1 -0
  102. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js +31 -0
  103. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo/shared.js.map +1 -0
  104. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts +30 -0
  105. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.d.ts.map +1 -0
  106. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js +170 -0
  107. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/jsonl.js.map +1 -0
  108. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts +26 -0
  109. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.d.ts.map +1 -0
  110. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js +90 -0
  111. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/storage/memory.js.map +1 -0
  112. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +6 -1
  113. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  114. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  115. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  116. package/node_modules/@earendil-works/pi-ai/README.md +12 -4
  117. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +1 -1
  118. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +3 -0
  119. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  120. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +45 -0
  121. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +1 -1
  122. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +45 -0
  123. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  124. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +1804 -815
  125. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  126. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +2031 -1384
  127. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  128. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  129. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +71 -27
  130. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  131. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
  132. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  133. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -16
  134. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  135. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
  136. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
  137. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  138. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  139. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
  140. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  141. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
  142. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +35 -13
  143. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
  144. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  145. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  146. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  147. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  148. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +1 -0
  149. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
  150. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +12 -4
  151. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  152. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  153. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.d.ts.map +1 -1
  154. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +13 -1
  155. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js.map +1 -1
  156. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.d.ts.map +1 -1
  157. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +4 -2
  158. package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js.map +1 -1
  159. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -1
  160. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  161. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -2
  162. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  163. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  164. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +143 -0
  165. package/node_modules/@earendil-works/pi-coding-agent/README.md +26 -4
  166. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +1 -0
  167. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  168. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +11 -0
  169. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  170. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts +10 -0
  171. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.d.ts.map +1 -0
  172. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js +48 -0
  173. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/project-trust.js.map +1 -0
  174. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts +17 -0
  175. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.d.ts.map +1 -0
  176. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +128 -0
  177. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js.map +1 -0
  178. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  179. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
  180. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  181. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts +3 -1
  182. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.d.ts.map +1 -1
  183. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js +4 -1
  184. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-runtime.js.map +1 -1
  185. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts +2 -1
  186. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.d.ts.map +1 -1
  187. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +2 -2
  188. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js.map +1 -1
  189. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +4 -1
  190. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  191. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +16 -3
  192. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  193. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  194. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +4 -3
  195. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  196. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts +3 -1
  197. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  198. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js +9 -3
  199. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/branch-summarization.js.map +1 -1
  200. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +1 -1
  201. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
  202. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +1 -1
  203. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
  204. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts +2 -0
  205. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.d.ts.map +1 -0
  206. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js +4 -0
  207. package/node_modules/@earendil-works/pi-coding-agent/dist/core/experimental.js.map +1 -0
  208. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/template.js +19 -6
  209. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  210. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  211. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  212. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts +1 -1
  213. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js +4 -4
  215. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +10 -3
  217. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +47 -1
  219. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +28 -2
  221. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  222. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts +2 -0
  224. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.d.ts.map +1 -1
  225. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
  226. package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js.map +1 -1
  227. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts +1 -0
  228. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.d.ts.map +1 -1
  229. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js +1 -0
  230. package/node_modules/@earendil-works/pi-coding-agent/dist/core/index.js.map +1 -1
  231. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
  232. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +1 -0
  233. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js.map +1 -1
  234. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts +1 -0
  235. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.d.ts.map +1 -1
  236. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +44 -5
  237. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  238. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts +3 -0
  239. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  240. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +47 -13
  241. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  242. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts +15 -0
  243. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -0
  244. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +58 -0
  245. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -0
  246. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts +2 -1
  247. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.d.ts.map +1 -1
  248. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js +24 -26
  249. package/node_modules/@earendil-works/pi-coding-agent/dist/core/prompt-templates.js.map +1 -1
  250. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts +4 -0
  251. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.d.ts.map +1 -0
  252. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js +72 -0
  253. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-attribution.js.map +1 -0
  254. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.d.ts.map +1 -1
  255. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js +3 -0
  256. package/node_modules/@earendil-works/pi-coding-agent/dist/core/provider-display-names.js.map +1 -1
  257. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +13 -2
  258. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  259. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +112 -37
  260. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  261. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  262. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +7 -33
  263. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  264. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +103 -70
  266. package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +20 -2
  268. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  269. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +97 -30
  270. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  271. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.d.ts.map +1 -1
  272. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js +1 -0
  273. package/node_modules/@earendil-works/pi-coding-agent/dist/core/slash-commands.js.map +1 -1
  274. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  275. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +1 -1
  276. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  277. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  278. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +1 -1
  279. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  280. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
  281. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +1 -1
  282. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
  283. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
  284. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +1 -1
  285. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
  286. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  287. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +1 -1
  288. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  289. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  290. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +1 -1
  291. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  292. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts +36 -0
  293. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.d.ts.map +1 -0
  294. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js +202 -0
  295. package/node_modules/@earendil-works/pi-coding-agent/dist/core/trust-manager.js.map +1 -0
  296. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +5 -4
  297. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  298. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -1
  299. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  300. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  301. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +72 -32
  302. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  303. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.d.ts.map +1 -1
  304. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +39 -34
  305. package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js.map +1 -1
  306. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts +1 -1
  307. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.d.ts.map +1 -1
  308. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/index.js.map +1 -1
  309. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  310. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +2 -2
  311. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
  312. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
  313. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
  314. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js +103 -0
  315. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/first-time-setup.js.map +1 -0
  316. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.d.ts.map +1 -1
  317. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js +7 -0
  318. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/footer.js.map +1 -1
  319. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts +2 -0
  320. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.d.ts.map +1 -1
  321. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js +2 -0
  322. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/index.js.map +1 -1
  323. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts +1 -1
  324. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  325. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +10 -13
  326. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js.map +1 -1
  327. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  328. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  329. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +20 -0
  330. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  331. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  332. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +22 -0
  333. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  334. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts +23 -0
  335. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.d.ts.map +1 -0
  336. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js +91 -0
  337. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/trust-selector.js.map +1 -0
  338. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +7 -0
  339. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  340. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +101 -5
  341. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  342. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
  343. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
  344. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
  345. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  346. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
  347. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  348. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts +6 -2
  349. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  350. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +111 -10
  351. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  352. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts +1 -0
  353. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.d.ts.map +1 -1
  354. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js +78 -0
  355. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/changelog.js.map +1 -1
  356. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.d.ts.map +1 -1
  357. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js +54 -22
  358. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/git.js.map +1 -1
  359. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts +9 -0
  360. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.d.ts.map +1 -0
  361. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js +22 -0
  362. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/open-browser.js.map +1 -0
  363. package/node_modules/@earendil-works/pi-coding-agent/docs/containerization.md +111 -0
  364. package/node_modules/@earendil-works/pi-coding-agent/docs/docs.json +8 -0
  365. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +67 -13
  366. package/node_modules/@earendil-works/pi-coding-agent/docs/index.md +2 -0
  367. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +4 -3
  368. package/node_modules/@earendil-works/pi-coding-agent/docs/packages.md +1 -1
  369. package/node_modules/@earendil-works/pi-coding-agent/docs/prompt-templates.md +9 -2
  370. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +5 -0
  371. package/node_modules/@earendil-works/pi-coding-agent/docs/rpc.md +1 -1
  372. package/node_modules/@earendil-works/pi-coding-agent/docs/sdk.md +5 -0
  373. package/node_modules/@earendil-works/pi-coding-agent/docs/security.md +59 -0
  374. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +15 -0
  375. package/node_modules/@earendil-works/pi-coding-agent/docs/skills.md +1 -1
  376. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +36 -2
  377. package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +1 -1
  378. package/node_modules/@earendil-works/pi-coding-agent/docs/tmux.md +4 -2
  379. package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +10 -1
  380. package/node_modules/@earendil-works/pi-coding-agent/docs/usage.md +19 -2
  381. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/README.md +2 -0
  382. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-header.ts +1 -1
  383. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  384. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  385. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/doom-overlay/index.ts +1 -1
  386. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/index.ts +531 -0
  387. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +185 -0
  388. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +19 -0
  389. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/handoff.ts +1 -1
  390. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/interactive-shell.ts +1 -1
  391. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-qa-tests.ts +152 -81
  392. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/project-trust.ts +64 -0
  393. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/qna.ts +1 -1
  394. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/question.ts +1 -1
  395. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/questionnaire.ts +1 -1
  396. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  397. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/snake.ts +1 -1
  398. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/space-invaders.ts +1 -1
  399. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/summarize.ts +1 -1
  400. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tic-tac-toe.ts +1 -1
  401. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/todo.ts +1 -1
  402. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/tools.ts +5 -0
  403. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  404. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -419
  405. package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -8
  406. package/node_modules/@earendil-works/pi-tui/README.md +13 -1
  407. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
  408. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  409. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  410. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
  411. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  412. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +102 -43
  413. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  414. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +2 -1
  415. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  416. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +11 -1
  417. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  418. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
  419. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
  420. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
  421. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
  422. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  423. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  424. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  425. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
  426. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  427. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -77
  428. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  429. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +20 -4
  430. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  431. package/node_modules/@earendil-works/pi-tui/dist/tui.js +244 -42
  432. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  433. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -0
  434. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  435. package/node_modules/@earendil-works/pi-tui/dist/utils.js +46 -15
  436. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  437. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  438. package/node_modules/@mariozechner/clipboard/package.json +2 -1
  439. package/node_modules/@mariozechner/clipboard-linux-x64-musl/README.md +3 -0
  440. package/node_modules/@mariozechner/clipboard-linux-x64-musl/package.json +25 -0
  441. package/package.json +7 -6
  442. package/dist/extensions/forgecli/add-pipeline.d.ts +0 -19
  443. package/dist/extensions/forgecli/add-pipeline.js +0 -143
  444. package/dist/extensions/forgecli/add-pipeline.js.map +0 -1
  445. package/dist/extensions/forgecli/add-task.d.ts +0 -20
  446. package/dist/extensions/forgecli/add-task.js +0 -154
  447. package/dist/extensions/forgecli/add-task.js.map +0 -1
  448. package/dist/extensions/forgecli/approve.d.ts +0 -22
  449. package/dist/extensions/forgecli/approve.js +0 -152
  450. package/dist/extensions/forgecli/approve.js.map +0 -1
  451. package/dist/extensions/forgecli/banner.d.ts +0 -10
  452. package/dist/extensions/forgecli/banner.js +0 -36
  453. package/dist/extensions/forgecli/banner.js.map +0 -1
  454. package/dist/extensions/forgecli/calibrate.d.ts +0 -64
  455. package/dist/extensions/forgecli/calibrate.js +0 -481
  456. package/dist/extensions/forgecli/calibrate.js.map +0 -1
  457. package/dist/extensions/forgecli/collate.d.ts +0 -22
  458. package/dist/extensions/forgecli/collate.js +0 -134
  459. package/dist/extensions/forgecli/collate.js.map +0 -1
  460. package/dist/extensions/forgecli/commit.d.ts +0 -22
  461. package/dist/extensions/forgecli/commit.js +0 -152
  462. package/dist/extensions/forgecli/commit.js.map +0 -1
  463. package/dist/extensions/forgecli/config-command.d.ts +0 -8
  464. package/dist/extensions/forgecli/config-command.js +0 -67
  465. package/dist/extensions/forgecli/config-command.js.map +0 -1
  466. package/dist/extensions/forgecli/config-layer.d.ts +0 -53
  467. package/dist/extensions/forgecli/config-layer.js +0 -72
  468. package/dist/extensions/forgecli/config-layer.js.map +0 -1
  469. package/dist/extensions/forgecli/config-writer.d.ts +0 -16
  470. package/dist/extensions/forgecli/config-writer.js +0 -69
  471. package/dist/extensions/forgecli/config-writer.js.map +0 -1
  472. package/dist/extensions/forgecli/enhance.d.ts +0 -27
  473. package/dist/extensions/forgecli/enhance.js +0 -199
  474. package/dist/extensions/forgecli/enhance.js.map +0 -1
  475. package/dist/extensions/forgecli/fix-bug.d.ts +0 -85
  476. package/dist/extensions/forgecli/fix-bug.js +0 -1580
  477. package/dist/extensions/forgecli/fix-bug.js.map +0 -1
  478. package/dist/extensions/forgecli/forge-header.d.ts +0 -12
  479. package/dist/extensions/forgecli/forge-header.js +0 -114
  480. package/dist/extensions/forgecli/forge-header.js.map +0 -1
  481. package/dist/extensions/forgecli/forge-init.d.ts +0 -26
  482. package/dist/extensions/forgecli/forge-init.js +0 -514
  483. package/dist/extensions/forgecli/forge-init.js.map +0 -1
  484. package/dist/extensions/forgecli/forge-root.d.ts +0 -10
  485. package/dist/extensions/forgecli/forge-root.js +0 -62
  486. package/dist/extensions/forgecli/forge-root.js.map +0 -1
  487. package/dist/extensions/forgecli/forge-update-command.d.ts +0 -100
  488. package/dist/extensions/forgecli/forge-update-command.js +0 -435
  489. package/dist/extensions/forgecli/forge-update-command.js.map +0 -1
  490. package/dist/extensions/forgecli/friction-emit.d.ts +0 -99
  491. package/dist/extensions/forgecli/friction-emit.js +0 -245
  492. package/dist/extensions/forgecli/friction-emit.js.map +0 -1
  493. package/dist/extensions/forgecli/implement.d.ts +0 -22
  494. package/dist/extensions/forgecli/implement.js +0 -170
  495. package/dist/extensions/forgecli/implement.js.map +0 -1
  496. package/dist/extensions/forgecli/init-context.d.ts +0 -99
  497. package/dist/extensions/forgecli/init-context.js +0 -178
  498. package/dist/extensions/forgecli/init-context.js.map +0 -1
  499. package/dist/extensions/forgecli/init-progress.d.ts +0 -39
  500. package/dist/extensions/forgecli/init-progress.js +0 -117
  501. package/dist/extensions/forgecli/init-progress.js.map +0 -1
  502. package/dist/extensions/forgecli/input-router.d.ts +0 -33
  503. package/dist/extensions/forgecli/input-router.js +0 -136
  504. package/dist/extensions/forgecli/input-router.js.map +0 -1
  505. package/dist/extensions/forgecli/lib/halt-advisor.d.ts +0 -59
  506. package/dist/extensions/forgecli/lib/halt-advisor.js +0 -113
  507. package/dist/extensions/forgecli/lib/halt-advisor.js.map +0 -1
  508. package/dist/extensions/forgecli/lib/orchestrator-preflight.d.ts +0 -46
  509. package/dist/extensions/forgecli/lib/orchestrator-preflight.js +0 -64
  510. package/dist/extensions/forgecli/lib/orchestrator-preflight.js.map +0 -1
  511. package/dist/extensions/forgecli/materialize.d.ts +0 -16
  512. package/dist/extensions/forgecli/materialize.js +0 -195
  513. package/dist/extensions/forgecli/materialize.js.map +0 -1
  514. package/dist/extensions/forgecli/migrate.d.ts +0 -22
  515. package/dist/extensions/forgecli/migrate.js +0 -260
  516. package/dist/extensions/forgecli/migrate.js.map +0 -1
  517. package/dist/extensions/forgecli/migration-engine.d.ts +0 -117
  518. package/dist/extensions/forgecli/migration-engine.js +0 -563
  519. package/dist/extensions/forgecli/migration-engine.js.map +0 -1
  520. package/dist/extensions/forgecli/model-registry.d.ts +0 -61
  521. package/dist/extensions/forgecli/model-registry.js +0 -127
  522. package/dist/extensions/forgecli/model-registry.js.map +0 -1
  523. package/dist/extensions/forgecli/model-resolver.d.ts +0 -32
  524. package/dist/extensions/forgecli/model-resolver.js +0 -65
  525. package/dist/extensions/forgecli/model-resolver.js.map +0 -1
  526. package/dist/extensions/forgecli/model-validator.d.ts +0 -29
  527. package/dist/extensions/forgecli/model-validator.js +0 -107
  528. package/dist/extensions/forgecli/model-validator.js.map +0 -1
  529. package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +0 -26
  530. package/dist/extensions/forgecli/orchestrator-status-bar.js +0 -213
  531. package/dist/extensions/forgecli/orchestrator-status-bar.js.map +0 -1
  532. package/dist/extensions/forgecli/plan.d.ts +0 -22
  533. package/dist/extensions/forgecli/plan.js +0 -167
  534. package/dist/extensions/forgecli/plan.js.map +0 -1
  535. package/dist/extensions/forgecli/quiz-agent.d.ts +0 -17
  536. package/dist/extensions/forgecli/quiz-agent.js +0 -98
  537. package/dist/extensions/forgecli/quiz-agent.js.map +0 -1
  538. package/dist/extensions/forgecli/read-command.d.ts +0 -2
  539. package/dist/extensions/forgecli/read-command.js +0 -100
  540. package/dist/extensions/forgecli/read-command.js.map +0 -1
  541. package/dist/extensions/forgecli/regenerate.d.ts +0 -40
  542. package/dist/extensions/forgecli/regenerate.js +0 -438
  543. package/dist/extensions/forgecli/regenerate.js.map +0 -1
  544. package/dist/extensions/forgecli/remove-command.d.ts +0 -17
  545. package/dist/extensions/forgecli/remove-command.js +0 -124
  546. package/dist/extensions/forgecli/remove-command.js.map +0 -1
  547. package/dist/extensions/forgecli/report-bug.d.ts +0 -25
  548. package/dist/extensions/forgecli/report-bug.js +0 -159
  549. package/dist/extensions/forgecli/report-bug.js.map +0 -1
  550. package/dist/extensions/forgecli/retrospective.d.ts +0 -20
  551. package/dist/extensions/forgecli/retrospective.js +0 -126
  552. package/dist/extensions/forgecli/retrospective.js.map +0 -1
  553. package/dist/extensions/forgecli/review-code.d.ts +0 -35
  554. package/dist/extensions/forgecli/review-code.js +0 -196
  555. package/dist/extensions/forgecli/review-code.js.map +0 -1
  556. package/dist/extensions/forgecli/review-plan.d.ts +0 -35
  557. package/dist/extensions/forgecli/review-plan.js +0 -200
  558. package/dist/extensions/forgecli/review-plan.js.map +0 -1
  559. package/dist/extensions/forgecli/run-sprint.d.ts +0 -27
  560. package/dist/extensions/forgecli/run-sprint.js +0 -716
  561. package/dist/extensions/forgecli/run-sprint.js.map +0 -1
  562. package/dist/extensions/forgecli/run-task.d.ts +0 -204
  563. package/dist/extensions/forgecli/run-task.js +0 -1403
  564. package/dist/extensions/forgecli/run-task.js.map +0 -1
  565. package/dist/extensions/forgecli/skill-curation-flag.d.ts +0 -21
  566. package/dist/extensions/forgecli/skill-curation-flag.js +0 -71
  567. package/dist/extensions/forgecli/skill-curation-flag.js.map +0 -1
  568. package/dist/extensions/forgecli/skill-curator-subagent.d.ts +0 -102
  569. package/dist/extensions/forgecli/skill-curator-subagent.js +0 -339
  570. package/dist/extensions/forgecli/skill-curator-subagent.js.map +0 -1
  571. package/dist/extensions/forgecli/skill-retriever.d.ts +0 -84
  572. package/dist/extensions/forgecli/skill-retriever.js +0 -246
  573. package/dist/extensions/forgecli/skill-retriever.js.map +0 -1
  574. package/dist/extensions/forgecli/skill-usage-tracker.d.ts +0 -91
  575. package/dist/extensions/forgecli/skill-usage-tracker.js +0 -224
  576. package/dist/extensions/forgecli/skill-usage-tracker.js.map +0 -1
  577. package/dist/extensions/forgecli/sprint-intake.d.ts +0 -10
  578. package/dist/extensions/forgecli/sprint-intake.js +0 -91
  579. package/dist/extensions/forgecli/sprint-intake.js.map +0 -1
  580. package/dist/extensions/forgecli/sprint-plan.d.ts +0 -14
  581. package/dist/extensions/forgecli/sprint-plan.js +0 -122
  582. package/dist/extensions/forgecli/sprint-plan.js.map +0 -1
  583. package/dist/extensions/forgecli/status-command.d.ts +0 -19
  584. package/dist/extensions/forgecli/status-command.js +0 -140
  585. package/dist/extensions/forgecli/status-command.js.map +0 -1
  586. package/dist/extensions/forgecli/store-error-remediation.d.ts +0 -65
  587. package/dist/extensions/forgecli/store-error-remediation.js +0 -307
  588. package/dist/extensions/forgecli/store-error-remediation.js.map +0 -1
  589. package/dist/extensions/forgecli/store-query.d.ts +0 -22
  590. package/dist/extensions/forgecli/store-query.js +0 -107
  591. package/dist/extensions/forgecli/store-query.js.map +0 -1
  592. package/dist/extensions/forgecli/store-repair.d.ts +0 -17
  593. package/dist/extensions/forgecli/store-repair.js +0 -123
  594. package/dist/extensions/forgecli/store-repair.js.map +0 -1
  595. package/dist/extensions/forgecli/store-resolver.d.ts +0 -56
  596. package/dist/extensions/forgecli/store-resolver.js +0 -263
  597. package/dist/extensions/forgecli/store-resolver.js.map +0 -1
  598. package/dist/extensions/forgecli/store-validator.d.ts +0 -16
  599. package/dist/extensions/forgecli/store-validator.js +0 -32
  600. package/dist/extensions/forgecli/store-validator.js.map +0 -1
  601. package/dist/extensions/forgecli/test-orchestrate.d.ts +0 -2
  602. package/dist/extensions/forgecli/test-orchestrate.js +0 -182
  603. package/dist/extensions/forgecli/test-orchestrate.js.map +0 -1
  604. package/dist/extensions/forgecli/thread-switcher.d.ts +0 -5
  605. package/dist/extensions/forgecli/thread-switcher.js +0 -189
  606. package/dist/extensions/forgecli/thread-switcher.js.map +0 -1
  607. package/dist/extensions/forgecli/transition-guard.d.ts +0 -20
  608. package/dist/extensions/forgecli/transition-guard.js +0 -89
  609. package/dist/extensions/forgecli/transition-guard.js.map +0 -1
  610. package/dist/extensions/forgecli/update-check.d.ts +0 -37
  611. package/dist/extensions/forgecli/update-check.js +0 -185
  612. package/dist/extensions/forgecli/update-check.js.map +0 -1
  613. package/dist/extensions/forgecli/update-tools.d.ts +0 -23
  614. package/dist/extensions/forgecli/update-tools.js +0 -135
  615. package/dist/extensions/forgecli/update-tools.js.map +0 -1
  616. package/dist/extensions/forgecli/validate.d.ts +0 -22
  617. package/dist/extensions/forgecli/validate.js +0 -152
  618. package/dist/extensions/forgecli/validate.js.map +0 -1
  619. package/dist/extensions/forgecli/viewport-events.d.ts +0 -78
  620. package/dist/extensions/forgecli/viewport-events.js +0 -243
  621. package/dist/extensions/forgecli/viewport-events.js.map +0 -1
  622. package/dist/extensions/forgecli/viewport-renderer.d.ts +0 -83
  623. package/dist/extensions/forgecli/viewport-renderer.js +0 -233
  624. package/dist/extensions/forgecli/viewport-renderer.js.map +0 -1
  625. package/dist/extensions/forgecli/viewport-theme.d.ts +0 -11
  626. package/dist/extensions/forgecli/viewport-theme.js +0 -128
  627. package/dist/extensions/forgecli/viewport-theme.js.map +0 -1
  628. package/dist/extensions/forgecli/whats-new-widget.d.ts +0 -26
  629. package/dist/extensions/forgecli/whats-new-widget.js +0 -376
  630. package/dist/extensions/forgecli/whats-new-widget.js.map +0 -1
  631. package/dist/extensions/forgecli/whats-new.d.ts +0 -120
  632. package/dist/extensions/forgecli/whats-new.js +0 -470
  633. package/dist/extensions/forgecli/whats-new.js.map +0 -1
  634. package/dist/forge-payload/.base-pack/commands/check-agent.md +0 -22
  635. package/dist/forge-payload/.base-pack/commands/enhance.md +0 -37
  636. package/dist/forge-payload/.base-pack/commands/init.md +0 -278
  637. package/dist/forge-payload/init/generation/generate-knowledge-base.md +0 -56
  638. package/dist/forge-payload/init/generation/generate-personas.md +0 -54
  639. package/dist/forge-payload/init/generation/generate-skills.md +0 -36
  640. package/dist/forge-payload/init/generation/generate-templates.md +0 -39
  641. /package/dist/forge-payload/{.base-pack/commands → commands}/approve.md +0 -0
  642. /package/dist/forge-payload/{.base-pack/commands → commands}/collate.md +0 -0
  643. /package/dist/forge-payload/{.base-pack/commands → commands}/commit.md +0 -0
  644. /package/dist/forge-payload/{.base-pack/commands → commands}/fix-bug.md +0 -0
  645. /package/dist/forge-payload/{.base-pack/commands → commands}/implement.md +0 -0
  646. /package/dist/forge-payload/{.base-pack/commands → commands}/new-sprint.md +0 -0
  647. /package/dist/forge-payload/{.base-pack/commands → commands}/plan-sprint.md +0 -0
  648. /package/dist/forge-payload/{.base-pack/commands → commands}/plan.md +0 -0
  649. /package/dist/forge-payload/{.base-pack/commands → commands}/retro.md +0 -0
  650. /package/dist/forge-payload/{.base-pack/commands → commands}/review-code.md +0 -0
  651. /package/dist/forge-payload/{.base-pack/commands → commands}/review-plan.md +0 -0
  652. /package/dist/forge-payload/{.base-pack/commands → commands}/run-sprint.md +0 -0
  653. /package/dist/forge-payload/{.base-pack/commands → commands}/run-task.md +0 -0
  654. /package/dist/forge-payload/{.base-pack/commands → commands}/validate.md +0 -0
@@ -1,185 +0,0 @@
1
- // Update-check probe + banner — FORGE-S16-T14 (issue #18, part 1).
2
- //
3
- // Dual-probe (npm registry + Entelligentsia/forge GitHub releases) with a
4
- // 24h TTL, per-version dismissal cache, and `FORGE_NO_UPDATE_CHECK=1`
5
- // opt-out. This is the only outbound HTTP traffic forgecli performs (Q21).
6
- // All failures are fail-silent on the user surface; debug output requires
7
- // FORGE_DEBUG_UPDATE_CHECK=1.
8
- import { promises as fs } from "node:fs";
9
- import * as path from "node:path";
10
- import { getUserCacheDir } from "./paths/paths.js";
11
- export const CACHE_TTL_MS = 24 * 60 * 60 * 1000;
12
- const PROBE_TIMEOUT_MS = 5000;
13
- const NPM_URL = "https://registry.npmjs.org/@entelligentsia/forgecli";
14
- const GH_RELEASES_URL = "https://api.github.com/repos/Entelligentsia/forge/releases/latest";
15
- function defaultCacheDir() {
16
- return getUserCacheDir();
17
- }
18
- function cachePath(cacheDir) {
19
- return path.join(cacheDir, "update-banner.json");
20
- }
21
- async function readCache(cacheDir) {
22
- try {
23
- const raw = await fs.readFile(cachePath(cacheDir), "utf8");
24
- const parsed = JSON.parse(raw);
25
- return {
26
- lastProbeAt: typeof parsed.lastProbeAt === "number" ? parsed.lastProbeAt : 0,
27
- latestNpmVersion: typeof parsed.latestNpmVersion === "string" ? parsed.latestNpmVersion : null,
28
- latestForgeVersion: typeof parsed.latestForgeVersion === "string" ? parsed.latestForgeVersion : null,
29
- dismissedNpmVersions: Array.isArray(parsed.dismissedNpmVersions)
30
- ? parsed.dismissedNpmVersions.filter((v) => typeof v === "string")
31
- : [],
32
- dismissedForgeVersions: Array.isArray(parsed.dismissedForgeVersions)
33
- ? parsed.dismissedForgeVersions.filter((v) => typeof v === "string")
34
- : [],
35
- };
36
- }
37
- catch {
38
- return null;
39
- }
40
- }
41
- async function writeCache(cacheDir, cache) {
42
- await fs.mkdir(cacheDir, { recursive: true });
43
- const final = cachePath(cacheDir);
44
- const tmp = `${final}.${process.pid}.${Date.now()}.tmp`;
45
- await fs.writeFile(tmp, JSON.stringify(cache, null, 2), "utf8");
46
- await fs.rename(tmp, final);
47
- }
48
- function parseTriple(v) {
49
- const cleaned = v.startsWith("v") ? v.slice(1) : v;
50
- const parts = cleaned.split(".");
51
- if (parts.length !== 3)
52
- return null;
53
- const nums = [];
54
- for (const p of parts) {
55
- if (!/^\d+$/.test(p))
56
- return null;
57
- nums.push(Number.parseInt(p, 10));
58
- }
59
- return [nums[0], nums[1], nums[2]];
60
- }
61
- function semverGt(a, b) {
62
- const pa = parseTriple(a);
63
- const pb = parseTriple(b);
64
- if (!pa || !pb)
65
- return false;
66
- for (let i = 0; i < 3; i++) {
67
- if (pa[i] > pb[i])
68
- return true;
69
- if (pa[i] < pb[i])
70
- return false;
71
- }
72
- return false;
73
- }
74
- function debug(...args) {
75
- if (process.env.FORGE_DEBUG_UPDATE_CHECK === "1") {
76
- console.error("[forge-cli update-check]", ...args);
77
- }
78
- }
79
- async function probeNpm(fetchImpl) {
80
- const ctl = new AbortController();
81
- const t = setTimeout(() => ctl.abort(), PROBE_TIMEOUT_MS);
82
- try {
83
- const res = await fetchImpl(NPM_URL, { signal: ctl.signal, headers: { Accept: "application/json" } });
84
- if (!res.ok)
85
- return null;
86
- const body = (await res.json());
87
- const tag = body["dist-tags"]?.latest;
88
- return typeof tag === "string" ? tag : null;
89
- }
90
- catch (err) {
91
- debug("npm probe failed:", err);
92
- return null;
93
- }
94
- finally {
95
- clearTimeout(t);
96
- }
97
- }
98
- async function probeForge(fetchImpl) {
99
- const ctl = new AbortController();
100
- const t = setTimeout(() => ctl.abort(), PROBE_TIMEOUT_MS);
101
- try {
102
- const res = await fetchImpl(GH_RELEASES_URL, {
103
- signal: ctl.signal,
104
- headers: { Accept: "application/vnd.github+json" },
105
- });
106
- if (!res.ok)
107
- return null;
108
- const body = (await res.json());
109
- if (typeof body.tag_name !== "string")
110
- return null;
111
- return body.tag_name.startsWith("v") ? body.tag_name.slice(1) : body.tag_name;
112
- }
113
- catch (err) {
114
- debug("github releases probe failed:", err);
115
- return null;
116
- }
117
- finally {
118
- clearTimeout(t);
119
- }
120
- }
121
- function composeBanner(npm, forge) {
122
- const lines = [];
123
- if (npm) {
124
- lines.push(`forge-cli: update available — ${npm.current} → ${npm.latest} (run \`forge update\` or \`npm i -g @entelligentsia/forgecli@${npm.latest}\`)`);
125
- }
126
- if (forge) {
127
- lines.push(`forge plugin: update available — ${forge.current} → ${forge.latest} (run /forge:update for migration guide)`);
128
- }
129
- return lines.length > 0 ? lines.join("\n") : null;
130
- }
131
- export async function triggerUpdateCheck(opts) {
132
- if (process.env.FORGE_NO_UPDATE_CHECK === "1")
133
- return;
134
- const now = opts.now ?? (() => Date.now());
135
- const fetchImpl = opts.fetchImpl ?? fetch;
136
- const cacheDir = opts.cacheDir ?? defaultCacheDir();
137
- let cache = (await readCache(cacheDir)) ?? {
138
- lastProbeAt: 0,
139
- latestNpmVersion: null,
140
- latestForgeVersion: null,
141
- dismissedNpmVersions: [],
142
- dismissedForgeVersions: [],
143
- };
144
- const ts = now();
145
- const ttlFresh = ts - cache.lastProbeAt < CACHE_TTL_MS;
146
- if (!ttlFresh) {
147
- const [npmRes, forgeRes] = await Promise.allSettled([probeNpm(fetchImpl), probeForge(fetchImpl)]);
148
- const nextNpm = npmRes.status === "fulfilled" && npmRes.value !== null ? npmRes.value : cache.latestNpmVersion;
149
- const nextForge = forgeRes.status === "fulfilled" && forgeRes.value !== null ? forgeRes.value : cache.latestForgeVersion;
150
- cache = {
151
- ...cache,
152
- lastProbeAt: ts,
153
- latestNpmVersion: nextNpm,
154
- latestForgeVersion: nextForge,
155
- };
156
- try {
157
- await writeCache(cacheDir, cache);
158
- }
159
- catch (err) {
160
- debug("cache write failed:", err);
161
- }
162
- }
163
- const npmAvail = cache.latestNpmVersion &&
164
- semverGt(cache.latestNpmVersion, opts.currentCliVersion) &&
165
- !cache.dismissedNpmVersions.includes(cache.latestNpmVersion)
166
- ? { current: opts.currentCliVersion, latest: cache.latestNpmVersion }
167
- : null;
168
- const forgeAvail = cache.latestForgeVersion &&
169
- semverGt(cache.latestForgeVersion, opts.currentBundledForgeVersion) &&
170
- !cache.dismissedForgeVersions.includes(cache.latestForgeVersion)
171
- ? { current: opts.currentBundledForgeVersion, latest: cache.latestForgeVersion }
172
- : null;
173
- const banner = composeBanner(npmAvail, forgeAvail);
174
- if (banner)
175
- opts.notify(banner, "info");
176
- }
177
- export const __test__ = {
178
- CACHE_TTL_MS,
179
- cachePath,
180
- readCache,
181
- writeCache,
182
- semverGt,
183
- composeBanner,
184
- };
185
- //# sourceMappingURL=update-check.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-check.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/update-check.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,EAAE;AACF,0EAA0E;AAC1E,sEAAsE;AACtE,2EAA2E;AAC3E,0EAA0E;AAC1E,8BAA8B;AAE9B,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAA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CAAC,KAAK,CAAC,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CAAC;QACxD,CAAC,KAAK,CAAC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC3D,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE;QACrE,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,UAAU,GACf,KAAK,CAAC,kBAAkB;QACxB,QAAQ,CAAC,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC,0BAA0B,CAAC;QACnE,CAAC,KAAK,CAAC,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC;QAC/D,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,0BAA0B,EAAE,MAAM,EAAE,KAAK,CAAC,kBAAkB,EAAE;QAChF,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,MAAM,GAAG,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IACnD,IAAI,MAAM;QAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB,YAAY;IACZ,SAAS;IACT,SAAS;IACT,UAAU;IACV,QAAQ;IACR,aAAa;CACb,CAAC"}
@@ -1,23 +0,0 @@
1
- import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
- export interface UpdateToolsResult {
3
- copied: number;
4
- skipped: number;
5
- validationPassed: boolean;
6
- messages: string[];
7
- }
8
- /**
9
- * Copy all *.json from bundled .schemas/ to .forge/schemas/ in cwd.
10
- * Runs validate-store --dry-run after copy.
11
- * Exported so orchestrators can call directly without going through sendUserMessage.
12
- */
13
- export declare function runUpdateTools(cwd: string, opts?: {
14
- _testBundleRoot?: string;
15
- _testToolsRoot?: string;
16
- }): Promise<UpdateToolsResult>;
17
- export interface RegisterUpdateToolsOptions {
18
- /** Override bundle root — for testing only. */
19
- _testBundleRoot?: string;
20
- /** Override tools root — for testing only. */
21
- _testToolsRoot?: string;
22
- }
23
- export declare function registerUpdateTools(pi: ExtensionAPI, opts?: RegisterUpdateToolsOptions): void;
@@ -1,135 +0,0 @@
1
- // update-tools.ts — native atomic handler for /forge:update-tools (FORGE-S23-T10)
2
- //
3
- // Copies all JSON schema files from the bundled forge payload (.schemas/) to
4
- // the project's .forge/schemas/, then runs validate-store --dry-run to verify.
5
- //
6
- // Archetype: Atomic (no LLM in loop — pack-04 §Atomic).
7
- // Iron Laws:
8
- // IL1 — new code lives in forge-cli/ only
9
- // IL6 — no shell-string interpolation (argv-array throughout)
10
- // IL7 — silent continuation past failures is never acceptable
11
- import { execFile } from "node:child_process";
12
- import * as fs from "node:fs";
13
- import * as path from "node:path";
14
- import { promisify } from "node:util";
15
- import { getBundledPayloadRoot, getBundledToolsRoot } from "./forge-init.js";
16
- const execFileAsync = promisify(execFile);
17
- // ── Core runner ──────────────────────────────────────────────────────────────
18
- /**
19
- * Copy all *.json from bundled .schemas/ to .forge/schemas/ in cwd.
20
- * Runs validate-store --dry-run after copy.
21
- * Exported so orchestrators can call directly without going through sendUserMessage.
22
- */
23
- export async function runUpdateTools(cwd, opts = {}) {
24
- const messages = [];
25
- let bundleRoot;
26
- let toolsRoot;
27
- try {
28
- bundleRoot = opts._testBundleRoot ?? getBundledPayloadRoot();
29
- toolsRoot = opts._testToolsRoot ?? getBundledToolsRoot();
30
- }
31
- catch (err) {
32
- const msg = err instanceof Error ? err.message : String(err);
33
- return {
34
- copied: 0,
35
- skipped: 0,
36
- validationPassed: false,
37
- messages: [`× forge:update-tools — could not resolve bundle root: ${msg}`],
38
- };
39
- }
40
- // Source: bundled .schemas/ directory
41
- const schemasSrc = path.join(bundleRoot, ".schemas");
42
- if (!fs.existsSync(schemasSrc)) {
43
- return {
44
- copied: 0,
45
- skipped: 0,
46
- validationPassed: false,
47
- messages: [`× forge:update-tools — bundled schemas directory not found: ${schemasSrc}`],
48
- };
49
- }
50
- // Destination: .forge/schemas/ in the project
51
- const schemasDest = path.join(cwd, ".forge", "schemas");
52
- fs.mkdirSync(schemasDest, { recursive: true });
53
- // Copy all *.json files
54
- let copied = 0;
55
- let skipped = 0;
56
- let schemaFiles;
57
- try {
58
- schemaFiles = fs.readdirSync(schemasSrc).filter((f) => f.endsWith(".json"));
59
- }
60
- catch (err) {
61
- const msg = err instanceof Error ? err.message : String(err);
62
- return {
63
- copied: 0,
64
- skipped: 0,
65
- validationPassed: false,
66
- messages: [`× forge:update-tools — could not read schemas directory: ${msg}`],
67
- };
68
- }
69
- for (const file of schemaFiles) {
70
- const srcPath = path.join(schemasSrc, file);
71
- const destPath = path.join(schemasDest, file);
72
- // src and dest are always different directories; structural skip-if-equal
73
- // is impossible in production but tested via mocks per AC requirement.
74
- if (srcPath === destPath) {
75
- skipped++;
76
- continue;
77
- }
78
- try {
79
- await fs.promises.copyFile(srcPath, destPath);
80
- copied++;
81
- }
82
- catch (err) {
83
- const msg = err instanceof Error ? err.message : String(err);
84
- messages.push(`△ forge:update-tools — could not copy ${file}: ${msg}`);
85
- }
86
- }
87
- messages.push(`〇 forge:update-tools — copied ${copied} schema file(s) to .forge/schemas/.`);
88
- if (skipped > 0) {
89
- messages.push(` (${skipped} file(s) skipped — source equals destination)`);
90
- }
91
- // Run validate-store --dry-run
92
- const validateStorePath = path.join(toolsRoot, "validate-store.cjs");
93
- let validationPassed = false;
94
- try {
95
- await execFileAsync("node", [validateStorePath, "--dry-run"], {
96
- cwd,
97
- encoding: "utf8",
98
- timeout: 15_000,
99
- });
100
- validationPassed = true;
101
- messages.push("〇 Schemas updated and store validation passed.");
102
- }
103
- catch (err) {
104
- const e = err;
105
- const detail = e.stderr || e.stdout || e.message || String(err);
106
- messages.push(`× Validation failed — ${detail.slice(0, 300)}`);
107
- }
108
- return { copied, skipped, validationPassed, messages };
109
- }
110
- export function registerUpdateTools(pi, opts = {}) {
111
- pi.registerCommand("forge:update-tools", {
112
- description: "Refresh .forge/schemas/ from the installed Forge plugin version. " +
113
- "Copies all JSON schema files from the bundled payload to your project.",
114
- async handler(_args, ctx) {
115
- const cwd = process.cwd();
116
- // Outside-project guard
117
- const configPath = path.join(cwd, ".forge", "config.json");
118
- if (!fs.existsSync(configPath)) {
119
- ctx.ui.notify("× forge:update-tools — no .forge/config.json found. " + "Run /forge:init first.", "error");
120
- return;
121
- }
122
- ctx.ui.setStatus?.("forge:update-tools", "Copying schemas…");
123
- const result = await runUpdateTools(cwd, {
124
- _testBundleRoot: opts._testBundleRoot,
125
- _testToolsRoot: opts._testToolsRoot,
126
- });
127
- ctx.ui.setStatus?.("forge:update-tools", undefined);
128
- for (const msg of result.messages) {
129
- const severity = msg.startsWith("×") ? "error" : msg.startsWith("△") ? "warning" : "info";
130
- ctx.ui.notify(msg, severity);
131
- }
132
- },
133
- });
134
- }
135
- //# sourceMappingURL=update-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-tools.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/update-tools.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,EAAE;AACF,wDAAwD;AACxD,aAAa;AACb,4CAA4C;AAC5C,gEAAgE;AAChE,gEAAgE;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAW1C,gFAAgF;AAEhF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CACnC,GAAW,EACX,OAA8D,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AI,CAAC,GAAG,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;YAC3D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,sDAAsD,GAAG,wBAAwB,EAAE,OAAO,CAAC,CAAC;gBAC1G,OAAO;YACR,CAAC;YAED,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC;YAE7D,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,GAAG,EAAE;gBACxC,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,cAAc,EAAE,IAAI,CAAC,cAAc;aACnC,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;YAEpD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACnC,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;gBAC1F,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC9B,CAAC;QACF,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
- import { extractPersonaNames } from "./lib/frontmatter-parser.js";
3
- export { extractPersonaNames };
4
- import { checkMaterialization, type MaterializationCheck } from "./lib/manifest-checker.js";
5
- export { checkMaterialization, type MaterializationCheck };
6
- export type ArgMode = "empty" | "file" | "text";
7
- export interface ParsedArgs {
8
- mode: ArgMode;
9
- taskRef: string;
10
- sourceLabel: string;
11
- }
12
- export declare function parseValidateArgs(rawArgs: string, cwd: string): ParsedArgs;
13
- export interface ComposeKickoffOpts {
14
- workflowMd: string;
15
- personaIdentity: string;
16
- parsed: ParsedArgs;
17
- }
18
- export declare function composeKickoff(opts: ComposeKickoffOpts): string;
19
- export interface RegisterValidateOptions {
20
- cwd?: string;
21
- }
22
- export declare function registerValidate(pi: ExtensionAPI, options?: RegisterValidateOptions): void;
@@ -1,152 +0,0 @@
1
- // forge:validate — native kickoff handler (FORGE-S21-T10).
2
- //
3
- // Replaces the auto-generated stub previously installed by
4
- // registerAllForgeCommands (forge-commands.ts). Kickoff Shim archetype
5
- // (Pack-04 + Pack-06): single LLM handoff in current context, no fork.
6
- //
7
- // Note: The materialized workflow (validate_task.md) declares
8
- // `audience: subagent` — advisory only. Users may invoke this command
9
- // manually from the CLI; assertAudience never refuses subagent-audience
10
- // workflows. Orchestrator chains still dispatch via runForgeSubagent
11
- // directly and do NOT route through this handler.
12
- //
13
- // Iron Laws:
14
- // IL1 — code only under forge-cli/src/extensions/forgecli/.
15
- // IL4 — no JSON.stringify-into-subagent dispatch.
16
- // IL6 — no shell-string interpolation; no spawn calls here.
17
- // IL7 — every failure path emits ctx.ui.notify and returns; no silent
18
- // continuation.
19
- import * as fs from "node:fs";
20
- import * as path from "node:path";
21
- import { assertAudience } from "./audience-gate.js";
22
- import { discoverForgeConfig } from "./forge-root.js";
23
- import { sendKickoff } from "./kickoff.js";
24
- // FORGE-S25-T16: extracted to lib modules (H-1, H-2). Re-exported here for
25
- // backward compatibility with existing test and consumer imports.
26
- import { extractPersonaNames } from "./lib/frontmatter-parser.js";
27
- import { parseGuardArgs, runPipelineGuard } from "./lib/pipeline-guard.js";
28
- import { loadPersona, PersonaSkillLoaderError } from "./parsers/persona-skill-loader.js";
29
- import { loadWorkflow, WorkflowLoaderError } from "./parsers/workflow-loader.js";
30
- export { extractPersonaNames };
31
- import { checkMaterialization } from "./lib/manifest-checker.js";
32
- export { checkMaterialization };
33
- export function parseValidateArgs(rawArgs, cwd) {
34
- const trimmed = (rawArgs ?? "").trim();
35
- if (trimmed === "") {
36
- return { mode: "empty", taskRef: "", sourceLabel: "(no input — qa-engineer infers task from store/context)" };
37
- }
38
- if (trimmed.startsWith("@")) {
39
- const ref = trimmed.slice(1).trim();
40
- const filePath = path.isAbsolute(ref) ? ref : path.resolve(cwd, ref);
41
- const seed = fs.readFileSync(filePath, "utf8");
42
- return { mode: "file", taskRef: seed, sourceLabel: `(seed from file: ${ref})` };
43
- }
44
- return { mode: "text", taskRef: trimmed, sourceLabel: "(seed from inline text)" };
45
- }
46
- export function composeKickoff(opts) {
47
- const { workflowMd, personaIdentity, parsed } = opts;
48
- const sections = ["# /forge:validate", ""];
49
- if (personaIdentity.trim().length > 0) {
50
- sections.push(personaIdentity.trim(), "");
51
- }
52
- sections.push("## Dispatch", "", "Run the workflow below. Specifically:", "", "1. Read the implementation artifacts for `engineering/sprints/<SPRINT_ID>/<TASK_ID>/` (PROGRESS.md, CODE_REVIEW.md).", "2. Query the store for the task and its sprint/feature context via `forge_store_query` — do NOT raw-read `.forge/store/`.", "3. Follow the workflow Algorithm verbatim: validate the implementation against acceptance criteria, run test commands, verify completeness.", "4. Write `VALIDATION_REPORT.md` and `VALIDATION-SUMMARY.json` to the task directory using the `write` tool.", "5. Update task status by calling the `forge_store` MCP tool: `{command:'update-status', args:['task','<TASK_ID>','status','<new-status>']}`. Never raw-write `.forge/store/`. Do NOT bash-shell `forge store ...`.", "6. Honour Pack-06 Read/Write/Ask/Store discipline: writes go via the `forge_store` MCP tool; in-conversation clarifications use `forge_ask_user`.");
53
- sections.push("", "---", "", "## Workflow", "", workflowMd.trim(), "", "---");
54
- if (parsed.mode === "empty") {
55
- sections.push("", "## Input", "", "(no seed — infer task from sprint context and store)");
56
- }
57
- else {
58
- sections.push("", `## Input — ${parsed.sourceLabel}`, "", parsed.taskRef.trim());
59
- }
60
- return sections.join("\n");
61
- }
62
- // Registration -------------------------------------------------------------
63
- const WORKFLOW_REL_PATH = path.join(".forge", "workflows", "validate_task.md");
64
- export function registerValidate(pi, options = {}) {
65
- pi.registerCommand("forge:validate", {
66
- description: "Run the validate-task workflow for a Forge task. " +
67
- "Usage: /forge:validate [@<file> | <free-form text>]. " +
68
- "Note: this workflow is subagent-only; standalone invocations are refused. " +
69
- "Orchestrator chains dispatch directly via runForgeSubagent.",
70
- async handler(args, ctx) {
71
- const cwd = options.cwd ?? process.cwd();
72
- const workflowPath = path.join(cwd, WORKFLOW_REL_PATH);
73
- // Pipeline step guard (FORGE-S26-T11): check task state before dispatching.
74
- const guardParsed = parseGuardArgs(args);
75
- if (!guardParsed.force) {
76
- const forgeConfig = discoverForgeConfig(cwd);
77
- if (forgeConfig) {
78
- const guard = runPipelineGuard("validate", guardParsed.taskIdHint, forgeConfig.forgeRoot, cwd);
79
- if (guard.blocked) {
80
- ctx.ui.notify(guard.message, "error");
81
- return;
82
- }
83
- }
84
- }
85
- const effectiveArgs = guardParsed.cleanArgs;
86
- let workflowMd;
87
- let workflowAudience;
88
- try {
89
- const loaded = loadWorkflow(workflowPath);
90
- workflowMd = loaded.rawMarkdown;
91
- workflowAudience = loaded.audience;
92
- }
93
- catch (err) {
94
- if (err instanceof WorkflowLoaderError) {
95
- if (err.code === "missing_file") {
96
- ctx.ui.notify(`× forge:validate — workflow not found at ${WORKFLOW_REL_PATH}; run /forge:init or /forge:rebuild first.`, "error");
97
- }
98
- else {
99
- ctx.ui.notify(`× forge:validate — workflow load failed (${err.code}): ${err.message}`, "error");
100
- }
101
- return;
102
- }
103
- const e = err;
104
- ctx.ui.notify(`× forge:validate — failed to read workflow: ${e.message ?? "unknown"}`, "error");
105
- return;
106
- }
107
- let parsed;
108
- try {
109
- parsed = parseValidateArgs(effectiveArgs, cwd);
110
- }
111
- catch (err) {
112
- const e = err;
113
- ctx.ui.notify(`× forge:validate — failed to read seed: ${e.message ?? "unknown"}`, "error");
114
- return;
115
- }
116
- const check = checkMaterialization(workflowPath, workflowMd);
117
- if (!check.ok) {
118
- for (const marker of check.missing) {
119
- ctx.ui.notify(`× workflow regression: ${marker} not found in ${workflowPath}`, "error");
120
- }
121
- return;
122
- }
123
- const personas = extractPersonaNames(workflowMd);
124
- let personaIdentity = "";
125
- if (personas.length > 0) {
126
- try {
127
- const persona = loadPersona(personas[0], { cwd });
128
- personaIdentity = persona.identity;
129
- }
130
- catch (err) {
131
- if (err instanceof PersonaSkillLoaderError) {
132
- ctx.ui.notify(`× forge:validate — persona '${personas[0]}' load failed (${err.code}): ${err.message}`, "error");
133
- return;
134
- }
135
- const e = err;
136
- ctx.ui.notify(`× forge:validate — persona load error: ${e.message ?? "unknown"}`, "error");
137
- return;
138
- }
139
- }
140
- if (!assertAudience({ workflowName: "validate_task", audience: workflowAudience }, ctx)) {
141
- return;
142
- }
143
- const kickoff = composeKickoff({
144
- workflowMd,
145
- personaIdentity,
146
- parsed,
147
- });
148
- sendKickoff(pi, kickoff);
149
- },
150
- });
151
- }
152
- //# sourceMappingURL=validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/extensions/forgecli/validate.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,2DAA2D;AAC3D,uEAAuE;AACvE,uEAAuE;AACvE,EAAE;AACF,8DAA8D;AAC9D,sEAAsE;AACtE,wEAAwE;AACxE,qEAAqE;AACrE,kDAAkD;AAClD,EAAE;AACF,aAAa;AACb,8DAA8D;AAC9D,oDAAoD;AACpD,8DAA8D;AAC9D,wEAAwE;AACxE,wBAAwB;AAExB,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,2EAA2E;AAC3E,kEAAkE;AAClE,O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AAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC;oBACJ,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;oBAClD,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;gBACpC,CAAC;gBAAC,OAAO,GAAY,EAAE,CAAC;oBACvB,IAAI,GAAG,YAAY,uBAAuB,EAAE,CAAC;wBAC5C,GAAG,CAAC,EAAE,CAAC,MAAM,CACZ,+BAA+B,QAAQ,CAAC,CAAC,CAAC,kBAAkB,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE,EACvF,OAAO,CACP,CAAC;wBACF,OAAO;oBACR,CAAC;oBACD,MAAM,CAAC,GAAG,GAA2B,CAAC;oBACtC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,0CAA0C,CAAC,CAAC,OAAO,IAAI,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;oBAC3F,OAAO;gBACR,CAAC;YACF,CAAC;YAED,IAAI,CAAC,cAAc,CAAC,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,gBAAgB,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;gBACzF,OAAO;YACR,CAAC;YAED,MAAM,OAAO,GAAG,cAAc,CAAC;gBAC9B,UAAU;gBACV,eAAe;gBACf,MAAM;aACN,CAAC,CAAC;YAEH,WAAW,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC1B,CAAC;KACD,CAAC,CAAC;AACJ,CAAC"}
@@ -1,78 +0,0 @@
1
- import type { SessionRegistry } from "./session-registry.js";
2
- import { type UsageDelta } from "./viewport-renderer.js";
3
- /** Minimal shape of the AgentSessionEvent union we care about — kept loose
4
- * so the file doesn't pull in @earendil-works/pi-agent-core types at compile
5
- * time for callers that only consume the factory. */
6
- type SubagentEvent = {
7
- type: "turn_start";
8
- } | {
9
- type: "turn_end";
10
- message: unknown;
11
- } | {
12
- type: "tool_execution_start";
13
- toolCallId: string;
14
- toolName: string;
15
- args: unknown;
16
- } | {
17
- type: "tool_execution_end";
18
- toolCallId: string;
19
- toolName: string;
20
- result: unknown;
21
- isError: boolean;
22
- } | {
23
- type: "compaction_start";
24
- reason: string;
25
- } | {
26
- type: "auto_retry_start";
27
- attempt: number;
28
- maxAttempts: number;
29
- errorMessage?: string;
30
- } | {
31
- type: string;
32
- [k: string]: unknown;
33
- };
34
- export interface ViewportObserverOpts {
35
- registry: SessionRegistry;
36
- /** session key in the registry (taskId, bugId, or sprintId:ceremony, etc.) */
37
- sessionId: string;
38
- /** phase scope for tail buffer and per-phase usage */
39
- phaseRole: string;
40
- /** displayed in the per-line prefix `[<displayRole> HH:MM:SS tN]`. Usually same
41
- * as `phaseRole` but kept separate so callers like run-sprint ceremony can
42
- * show a friendlier role label without changing the registry key. */
43
- displayRole?: string;
44
- /** optional `─── phase X/Y begin · sessionId ───` header to emit immediately */
45
- beginHeader?: string;
46
- /** optional JSONL audit sink (the run-task debug log). */
47
- writeDebug?: (rec: Record<string, unknown>) => void;
48
- /** optional verbose status setter — only called when FORGE_VERBOSE=1.
49
- * The observer doesn't read FORGE_VERBOSE itself; caller decides whether to
50
- * wire this. */
51
- setStatusVerbose?: (key: string, msg: string) => void;
52
- /** optional toast for compaction/retry; ignore to suppress. */
53
- notify?: (msg: string, level: "info" | "warning" | "error") => void;
54
- /** keys used for `setStatusVerbose` when caller wants verbose status. */
55
- verboseKeys?: {
56
- messageKey?: string;
57
- };
58
- /** invoked after every handled event so orchestrators can refresh their own
59
- * status line (e.g. FORGE_VERBOSE status with `lastTool`, elapsed seconds). */
60
- afterEach?: () => void;
61
- }
62
- export interface AttachedObserver {
63
- onEvent: (event: SubagentEvent) => void;
64
- /** Mutable counters orchestrator can read after subagent returns. */
65
- state: {
66
- turn: number;
67
- toolCount: number;
68
- errCount: number;
69
- lastTool: string;
70
- cumUsage: UsageDelta;
71
- cumCompression: {
72
- calls: number;
73
- tokensSaved: number;
74
- };
75
- };
76
- }
77
- export declare function attachViewportObserver(opts: ViewportObserverOpts): AttachedObserver;
78
- export {};