@ikarmic/forge-core 4.4.0 → 5.0.0

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 (573) hide show
  1. package/LICENSE +44 -21
  2. package/README.md +2 -2
  3. package/dist/agent/agent.d.ts +0 -1
  4. package/dist/agent/agent.js +84 -32
  5. package/dist/agent/architect.d.ts +3 -1
  6. package/dist/agent/architect.js +1 -1
  7. package/dist/agent/cache-hints.d.ts +0 -1
  8. package/dist/agent/cache-hints.js +0 -1
  9. package/dist/agent/cost-router.d.ts +0 -1
  10. package/dist/agent/cost-router.js +2 -1
  11. package/dist/agent/enhance-prompt.d.ts +7 -0
  12. package/dist/agent/enhance-prompt.js +30 -0
  13. package/dist/agent/index.d.ts +0 -1
  14. package/dist/agent/index.js +0 -1
  15. package/dist/agent/loop-guard.d.ts +21 -0
  16. package/dist/agent/loop-guard.js +41 -0
  17. package/dist/agent/prompts.d.ts +0 -1
  18. package/dist/agent/prompts.js +0 -1
  19. package/dist/agent/think-tags.d.ts +0 -1
  20. package/dist/agent/think-tags.js +0 -1
  21. package/dist/agent/verify.d.ts +0 -1
  22. package/dist/agent/verify.js +0 -1
  23. package/dist/ai-comments/index.d.ts +0 -1
  24. package/dist/ai-comments/index.js +0 -1
  25. package/dist/attachments.d.ts +46 -0
  26. package/dist/attachments.js +178 -0
  27. package/dist/browser/cdp.d.ts +0 -1
  28. package/dist/browser/cdp.js +0 -1
  29. package/dist/browser/chrome.d.ts +0 -1
  30. package/dist/browser/chrome.js +0 -1
  31. package/dist/browser/session.d.ts +0 -1
  32. package/dist/browser/session.js +0 -1
  33. package/dist/checkpoints/index.d.ts +0 -1
  34. package/dist/checkpoints/index.js +0 -1
  35. package/dist/checkpoints/store.d.ts +0 -1
  36. package/dist/checkpoints/store.js +0 -1
  37. package/dist/checkpoints/types.d.ts +0 -1
  38. package/dist/checkpoints/types.js +0 -1
  39. package/dist/code-index/builder.d.ts +0 -1
  40. package/dist/code-index/builder.js +4 -1
  41. package/dist/code-index/index-store.d.ts +0 -1
  42. package/dist/code-index/index-store.js +0 -1
  43. package/dist/code-index/parser.d.ts +0 -1
  44. package/dist/code-index/parser.js +0 -1
  45. package/dist/code-index/types.d.ts +0 -1
  46. package/dist/code-index/types.js +0 -1
  47. package/dist/commands/custom-commands.d.ts +24 -0
  48. package/dist/commands/custom-commands.js +98 -0
  49. package/dist/config-file.d.ts +4 -1
  50. package/dist/config-file.js +0 -1
  51. package/dist/config.d.ts +0 -1
  52. package/dist/config.js +0 -1
  53. package/dist/context/compaction.d.ts +0 -1
  54. package/dist/context/compaction.js +17 -3
  55. package/dist/context/mask.d.ts +0 -1
  56. package/dist/context/mask.js +1 -2
  57. package/dist/credentials/index.d.ts +0 -1
  58. package/dist/credentials/index.js +0 -1
  59. package/dist/credentials/types.d.ts +0 -1
  60. package/dist/credentials/types.js +0 -1
  61. package/dist/diff/index.d.ts +0 -1
  62. package/dist/diff/index.js +0 -1
  63. package/dist/diff/unified-diff.d.ts +0 -1
  64. package/dist/diff/unified-diff.js +42 -16
  65. package/dist/git/auto-commit.d.ts +1 -2
  66. package/dist/git/auto-commit.js +17 -5
  67. package/dist/git/index.d.ts +0 -1
  68. package/dist/git/index.js +0 -1
  69. package/dist/github/github-tools.d.ts +83 -0
  70. package/dist/github/github-tools.js +175 -0
  71. package/dist/hooks/agent-runner.d.ts +0 -1
  72. package/dist/hooks/agent-runner.js +0 -1
  73. package/dist/hooks/bus.d.ts +0 -1
  74. package/dist/hooks/bus.js +0 -1
  75. package/dist/hooks/config.d.ts +0 -1
  76. package/dist/hooks/config.js +0 -1
  77. package/dist/hooks/events.d.ts +0 -1
  78. package/dist/hooks/events.js +0 -1
  79. package/dist/hooks/index.d.ts +0 -1
  80. package/dist/hooks/index.js +0 -1
  81. package/dist/hooks/loader.d.ts +0 -1
  82. package/dist/hooks/loader.js +0 -1
  83. package/dist/hooks/runner.d.ts +0 -1
  84. package/dist/hooks/runner.js +0 -1
  85. package/dist/hooks/watch-coalescer.d.ts +0 -1
  86. package/dist/hooks/watch-coalescer.js +0 -1
  87. package/dist/hooks/watch-ignore.d.ts +0 -1
  88. package/dist/hooks/watch-ignore.js +0 -1
  89. package/dist/hooks/watcher.d.ts +0 -1
  90. package/dist/hooks/watcher.js +0 -1
  91. package/dist/index.d.ts +21 -9
  92. package/dist/index.js +16 -5
  93. package/dist/lazy-model.d.ts +0 -1
  94. package/dist/lazy-model.js +0 -1
  95. package/dist/lint/auto-lint.d.ts +0 -1
  96. package/dist/lint/auto-lint.js +0 -1
  97. package/dist/lint/index.d.ts +0 -1
  98. package/dist/lint/index.js +0 -1
  99. package/dist/lsp/client.d.ts +0 -1
  100. package/dist/lsp/client.js +0 -1
  101. package/dist/lsp/diagnostics.d.ts +0 -1
  102. package/dist/lsp/diagnostics.js +0 -1
  103. package/dist/lsp/index.d.ts +0 -1
  104. package/dist/lsp/index.js +0 -1
  105. package/dist/mcp/catalog.d.ts +0 -1
  106. package/dist/mcp/catalog.js +0 -1
  107. package/dist/mcp/index.d.ts +0 -1
  108. package/dist/mcp/index.js +0 -1
  109. package/dist/mcp/json-schema-to-zod.d.ts +0 -1
  110. package/dist/mcp/json-schema-to-zod.js +0 -1
  111. package/dist/mcp/manager.d.ts +0 -1
  112. package/dist/mcp/manager.js +0 -1
  113. package/dist/mcp/marketplace-types.d.ts +0 -1
  114. package/dist/mcp/marketplace-types.js +0 -1
  115. package/dist/mcp/marketplace.d.ts +0 -1
  116. package/dist/mcp/marketplace.js +0 -1
  117. package/dist/mcp/mcp-client.d.ts +0 -1
  118. package/dist/mcp/mcp-client.js +0 -1
  119. package/dist/mcp/mcp-config.d.ts +0 -1
  120. package/dist/mcp/mcp-config.js +0 -1
  121. package/dist/mcp/registry.d.ts +0 -1
  122. package/dist/mcp/registry.js +0 -1
  123. package/dist/memory/memory-store.d.ts +57 -11
  124. package/dist/memory/memory-store.js +236 -70
  125. package/dist/memory/rank.d.ts +20 -0
  126. package/dist/memory/rank.js +64 -0
  127. package/dist/memory/stale.d.ts +18 -0
  128. package/dist/memory/stale.js +45 -0
  129. package/dist/model-alias.d.ts +0 -1
  130. package/dist/model-alias.js +0 -1
  131. package/dist/model-catalog.d.ts +0 -1
  132. package/dist/model-catalog.js +0 -1
  133. package/dist/model-list.d.ts +0 -1
  134. package/dist/model-list.js +0 -1
  135. package/dist/orchestrator/board-tools.d.ts +0 -1
  136. package/dist/orchestrator/board-tools.js +0 -1
  137. package/dist/orchestrator/board.d.ts +0 -1
  138. package/dist/orchestrator/board.js +0 -1
  139. package/dist/orchestrator/index.d.ts +0 -1
  140. package/dist/orchestrator/index.js +0 -1
  141. package/dist/orchestrator/orchestrator.d.ts +0 -1
  142. package/dist/orchestrator/orchestrator.js +0 -1
  143. package/dist/orchestrator/router.d.ts +0 -1
  144. package/dist/orchestrator/router.js +0 -1
  145. package/dist/orchestrator/specialists-registry.d.ts +0 -1
  146. package/dist/orchestrator/specialists-registry.js +0 -1
  147. package/dist/orchestrator/specialists.d.ts +0 -1
  148. package/dist/orchestrator/specialists.js +5 -6
  149. package/dist/orchestrator/types.d.ts +0 -1
  150. package/dist/orchestrator/types.js +0 -1
  151. package/dist/plugins/index.d.ts +0 -1
  152. package/dist/plugins/index.js +0 -1
  153. package/dist/plugins/install.d.ts +0 -1
  154. package/dist/plugins/install.js +0 -1
  155. package/dist/plugins/loader.d.ts +0 -1
  156. package/dist/plugins/loader.js +0 -1
  157. package/dist/policy/audit.d.ts +0 -1
  158. package/dist/policy/audit.js +0 -1
  159. package/dist/policy/policy.d.ts +0 -1
  160. package/dist/policy/policy.js +0 -1
  161. package/dist/policy/proxy.d.ts +0 -1
  162. package/dist/policy/proxy.js +0 -1
  163. package/dist/pricing.d.ts +0 -1
  164. package/dist/pricing.js +0 -1
  165. package/dist/providers.d.ts +0 -1
  166. package/dist/providers.js +0 -1
  167. package/dist/repomap/index.d.ts +0 -1
  168. package/dist/repomap/index.js +0 -1
  169. package/dist/repomap/repo-map.d.ts +0 -1
  170. package/dist/repomap/repo-map.js +0 -1
  171. package/dist/semantic/chunker.d.ts +0 -1
  172. package/dist/semantic/chunker.js +0 -1
  173. package/dist/semantic/embedder.d.ts +0 -1
  174. package/dist/semantic/embedder.js +0 -1
  175. package/dist/semantic/semantic-index.d.ts +0 -1
  176. package/dist/semantic/semantic-index.js +4 -1
  177. package/dist/semantic/vector-store.d.ts +0 -1
  178. package/dist/semantic/vector-store.js +0 -1
  179. package/dist/sessions/index.d.ts +2 -1
  180. package/dist/sessions/index.js +2 -1
  181. package/dist/sessions/prune.d.ts +23 -0
  182. package/dist/sessions/prune.js +35 -0
  183. package/dist/sessions/search.d.ts +22 -0
  184. package/dist/sessions/search.js +66 -0
  185. package/dist/sessions/session-export.d.ts +0 -1
  186. package/dist/sessions/session-export.js +0 -1
  187. package/dist/sessions/session-store.d.ts +0 -1
  188. package/dist/sessions/session-store.js +0 -1
  189. package/dist/sessions/watch.d.ts +0 -1
  190. package/dist/sessions/watch.js +0 -1
  191. package/dist/settings-export.d.ts +0 -1
  192. package/dist/settings-export.js +0 -1
  193. package/dist/skills/activator.d.ts +0 -1
  194. package/dist/skills/activator.js +0 -1
  195. package/dist/skills/index.d.ts +0 -1
  196. package/dist/skills/index.js +0 -1
  197. package/dist/skills/loader.d.ts +0 -1
  198. package/dist/skills/loader.js +0 -1
  199. package/dist/skills/marketplace-types.d.ts +0 -1
  200. package/dist/skills/marketplace-types.js +0 -1
  201. package/dist/skills/marketplace.d.ts +0 -1
  202. package/dist/skills/marketplace.js +0 -1
  203. package/dist/skills/parser.d.ts +0 -1
  204. package/dist/skills/parser.js +0 -1
  205. package/dist/skills/types.d.ts +0 -1
  206. package/dist/skills/types.js +0 -1
  207. package/dist/specs/generate.d.ts +0 -1
  208. package/dist/specs/generate.js +0 -1
  209. package/dist/specs/index.d.ts +2 -1
  210. package/dist/specs/index.js +1 -1
  211. package/dist/specs/store.d.ts +7 -1
  212. package/dist/specs/store.js +33 -1
  213. package/dist/specs/sync.d.ts +29 -0
  214. package/dist/specs/sync.js +155 -0
  215. package/dist/specs/tasks-parser.d.ts +0 -1
  216. package/dist/specs/tasks-parser.js +0 -1
  217. package/dist/specs/types.d.ts +2 -1
  218. package/dist/specs/types.js +0 -1
  219. package/dist/steering/glob.d.ts +0 -1
  220. package/dist/steering/glob.js +0 -1
  221. package/dist/steering/index.d.ts +0 -1
  222. package/dist/steering/index.js +0 -1
  223. package/dist/steering/loader.d.ts +0 -1
  224. package/dist/steering/loader.js +0 -1
  225. package/dist/steering/project-instructions.d.ts +0 -1
  226. package/dist/steering/project-instructions.js +0 -1
  227. package/dist/steering/select.d.ts +0 -1
  228. package/dist/steering/select.js +0 -1
  229. package/dist/steering/types.d.ts +0 -1
  230. package/dist/steering/types.js +0 -1
  231. package/dist/structured/index.d.ts +0 -1
  232. package/dist/structured/index.js +0 -1
  233. package/dist/structured/retry.d.ts +0 -1
  234. package/dist/structured/retry.js +0 -1
  235. package/dist/structured/schema.d.ts +0 -1
  236. package/dist/structured/schema.js +0 -1
  237. package/dist/tools/browser-tools.d.ts +0 -1
  238. package/dist/tools/browser-tools.js +0 -1
  239. package/dist/tools/codebase-search.d.ts +0 -1
  240. package/dist/tools/codebase-search.js +0 -1
  241. package/dist/tools/command-allow.d.ts +0 -1
  242. package/dist/tools/command-allow.js +0 -1
  243. package/dist/tools/edit-file.d.ts +0 -1
  244. package/dist/tools/edit-file.js +0 -1
  245. package/dist/tools/fetch-url.d.ts +0 -1
  246. package/dist/tools/fetch-url.js +0 -1
  247. package/dist/tools/find-references.d.ts +0 -1
  248. package/dist/tools/find-references.js +0 -1
  249. package/dist/tools/find-symbol.d.ts +0 -1
  250. package/dist/tools/find-symbol.js +0 -1
  251. package/dist/tools/ignore-rules.d.ts +15 -0
  252. package/dist/tools/ignore-rules.js +84 -0
  253. package/dist/tools/index.d.ts +3 -3
  254. package/dist/tools/index.js +5 -3
  255. package/dist/tools/list-files.d.ts +3 -1
  256. package/dist/tools/list-files.js +8 -1
  257. package/dist/tools/list-symbols.d.ts +0 -1
  258. package/dist/tools/list-symbols.js +0 -1
  259. package/dist/tools/memory.d.ts +34 -2
  260. package/dist/tools/memory.js +118 -26
  261. package/dist/tools/notebook.d.ts +69 -0
  262. package/dist/tools/notebook.js +163 -0
  263. package/dist/tools/policy.d.ts +0 -1
  264. package/dist/tools/policy.js +0 -1
  265. package/dist/tools/read-file.d.ts +8 -2
  266. package/dist/tools/read-file.js +19 -2
  267. package/dist/tools/read-image.d.ts +0 -1
  268. package/dist/tools/read-image.js +0 -1
  269. package/dist/tools/read-only.d.ts +0 -1
  270. package/dist/tools/read-only.js +0 -1
  271. package/dist/tools/redact.d.ts +0 -1
  272. package/dist/tools/redact.js +0 -1
  273. package/dist/tools/result-cache.d.ts +0 -1
  274. package/dist/tools/result-cache.js +0 -1
  275. package/dist/tools/run-command.d.ts +0 -1
  276. package/dist/tools/run-command.js +0 -1
  277. package/dist/tools/sandbox-loader.d.ts +0 -1
  278. package/dist/tools/sandbox-loader.js +0 -1
  279. package/dist/tools/search-files.d.ts +5 -3
  280. package/dist/tools/search-files.js +8 -1
  281. package/dist/tools/shared.d.ts +0 -1
  282. package/dist/tools/shared.js +0 -1
  283. package/dist/tools/sub-agent.d.ts +0 -1
  284. package/dist/tools/sub-agent.js +0 -1
  285. package/dist/tools/web-search.d.ts +55 -0
  286. package/dist/tools/web-search.js +131 -0
  287. package/dist/tools/write-file.d.ts +0 -1
  288. package/dist/tools/write-file.js +0 -1
  289. package/dist/types.d.ts +43 -2
  290. package/dist/types.js +0 -1
  291. package/dist/verify/detect.d.ts +0 -1
  292. package/dist/verify/detect.js +0 -1
  293. package/dist/verify/index.d.ts +0 -1
  294. package/dist/verify/index.js +0 -1
  295. package/dist/worktree/branch-ops.d.ts +0 -1
  296. package/dist/worktree/branch-ops.js +0 -1
  297. package/dist/worktree/index.d.ts +0 -1
  298. package/dist/worktree/index.js +0 -1
  299. package/dist/worktree/worktree.d.ts +0 -1
  300. package/dist/worktree/worktree.js +0 -1
  301. package/package.json +4 -2
  302. package/dist/agent/agent.d.ts.map +0 -1
  303. package/dist/agent/agent.js.map +0 -1
  304. package/dist/agent/architect.d.ts.map +0 -1
  305. package/dist/agent/architect.js.map +0 -1
  306. package/dist/agent/cache-hints.d.ts.map +0 -1
  307. package/dist/agent/cache-hints.js.map +0 -1
  308. package/dist/agent/cost-router.d.ts.map +0 -1
  309. package/dist/agent/cost-router.js.map +0 -1
  310. package/dist/agent/index.d.ts.map +0 -1
  311. package/dist/agent/index.js.map +0 -1
  312. package/dist/agent/prompts.d.ts.map +0 -1
  313. package/dist/agent/prompts.js.map +0 -1
  314. package/dist/agent/think-tags.d.ts.map +0 -1
  315. package/dist/agent/think-tags.js.map +0 -1
  316. package/dist/agent/verify.d.ts.map +0 -1
  317. package/dist/agent/verify.js.map +0 -1
  318. package/dist/ai-comments/index.d.ts.map +0 -1
  319. package/dist/ai-comments/index.js.map +0 -1
  320. package/dist/browser/cdp.d.ts.map +0 -1
  321. package/dist/browser/cdp.js.map +0 -1
  322. package/dist/browser/chrome.d.ts.map +0 -1
  323. package/dist/browser/chrome.js.map +0 -1
  324. package/dist/browser/session.d.ts.map +0 -1
  325. package/dist/browser/session.js.map +0 -1
  326. package/dist/checkpoints/index.d.ts.map +0 -1
  327. package/dist/checkpoints/index.js.map +0 -1
  328. package/dist/checkpoints/store.d.ts.map +0 -1
  329. package/dist/checkpoints/store.js.map +0 -1
  330. package/dist/checkpoints/types.d.ts.map +0 -1
  331. package/dist/checkpoints/types.js.map +0 -1
  332. package/dist/code-index/builder.d.ts.map +0 -1
  333. package/dist/code-index/builder.js.map +0 -1
  334. package/dist/code-index/index-store.d.ts.map +0 -1
  335. package/dist/code-index/index-store.js.map +0 -1
  336. package/dist/code-index/parser.d.ts.map +0 -1
  337. package/dist/code-index/parser.js.map +0 -1
  338. package/dist/code-index/types.d.ts.map +0 -1
  339. package/dist/code-index/types.js.map +0 -1
  340. package/dist/config-file.d.ts.map +0 -1
  341. package/dist/config-file.js.map +0 -1
  342. package/dist/config.d.ts.map +0 -1
  343. package/dist/config.js.map +0 -1
  344. package/dist/context/compaction.d.ts.map +0 -1
  345. package/dist/context/compaction.js.map +0 -1
  346. package/dist/context/mask.d.ts.map +0 -1
  347. package/dist/context/mask.js.map +0 -1
  348. package/dist/credentials/index.d.ts.map +0 -1
  349. package/dist/credentials/index.js.map +0 -1
  350. package/dist/credentials/types.d.ts.map +0 -1
  351. package/dist/credentials/types.js.map +0 -1
  352. package/dist/diff/index.d.ts.map +0 -1
  353. package/dist/diff/index.js.map +0 -1
  354. package/dist/diff/unified-diff.d.ts.map +0 -1
  355. package/dist/diff/unified-diff.js.map +0 -1
  356. package/dist/git/auto-commit.d.ts.map +0 -1
  357. package/dist/git/auto-commit.js.map +0 -1
  358. package/dist/git/index.d.ts.map +0 -1
  359. package/dist/git/index.js.map +0 -1
  360. package/dist/hooks/agent-runner.d.ts.map +0 -1
  361. package/dist/hooks/agent-runner.js.map +0 -1
  362. package/dist/hooks/bus.d.ts.map +0 -1
  363. package/dist/hooks/bus.js.map +0 -1
  364. package/dist/hooks/config.d.ts.map +0 -1
  365. package/dist/hooks/config.js.map +0 -1
  366. package/dist/hooks/events.d.ts.map +0 -1
  367. package/dist/hooks/events.js.map +0 -1
  368. package/dist/hooks/index.d.ts.map +0 -1
  369. package/dist/hooks/index.js.map +0 -1
  370. package/dist/hooks/loader.d.ts.map +0 -1
  371. package/dist/hooks/loader.js.map +0 -1
  372. package/dist/hooks/runner.d.ts.map +0 -1
  373. package/dist/hooks/runner.js.map +0 -1
  374. package/dist/hooks/watch-coalescer.d.ts.map +0 -1
  375. package/dist/hooks/watch-coalescer.js.map +0 -1
  376. package/dist/hooks/watch-ignore.d.ts.map +0 -1
  377. package/dist/hooks/watch-ignore.js.map +0 -1
  378. package/dist/hooks/watcher.d.ts.map +0 -1
  379. package/dist/hooks/watcher.js.map +0 -1
  380. package/dist/index.d.ts.map +0 -1
  381. package/dist/index.js.map +0 -1
  382. package/dist/lazy-model.d.ts.map +0 -1
  383. package/dist/lazy-model.js.map +0 -1
  384. package/dist/lint/auto-lint.d.ts.map +0 -1
  385. package/dist/lint/auto-lint.js.map +0 -1
  386. package/dist/lint/index.d.ts.map +0 -1
  387. package/dist/lint/index.js.map +0 -1
  388. package/dist/lsp/client.d.ts.map +0 -1
  389. package/dist/lsp/client.js.map +0 -1
  390. package/dist/lsp/diagnostics.d.ts.map +0 -1
  391. package/dist/lsp/diagnostics.js.map +0 -1
  392. package/dist/lsp/index.d.ts.map +0 -1
  393. package/dist/lsp/index.js.map +0 -1
  394. package/dist/mcp/catalog.d.ts.map +0 -1
  395. package/dist/mcp/catalog.js.map +0 -1
  396. package/dist/mcp/index.d.ts.map +0 -1
  397. package/dist/mcp/index.js.map +0 -1
  398. package/dist/mcp/json-schema-to-zod.d.ts.map +0 -1
  399. package/dist/mcp/json-schema-to-zod.js.map +0 -1
  400. package/dist/mcp/manager.d.ts.map +0 -1
  401. package/dist/mcp/manager.js.map +0 -1
  402. package/dist/mcp/marketplace-types.d.ts.map +0 -1
  403. package/dist/mcp/marketplace-types.js.map +0 -1
  404. package/dist/mcp/marketplace.d.ts.map +0 -1
  405. package/dist/mcp/marketplace.js.map +0 -1
  406. package/dist/mcp/mcp-client.d.ts.map +0 -1
  407. package/dist/mcp/mcp-client.js.map +0 -1
  408. package/dist/mcp/mcp-config.d.ts.map +0 -1
  409. package/dist/mcp/mcp-config.js.map +0 -1
  410. package/dist/mcp/registry.d.ts.map +0 -1
  411. package/dist/mcp/registry.js.map +0 -1
  412. package/dist/memory/memory-store.d.ts.map +0 -1
  413. package/dist/memory/memory-store.js.map +0 -1
  414. package/dist/model-alias.d.ts.map +0 -1
  415. package/dist/model-alias.js.map +0 -1
  416. package/dist/model-catalog.d.ts.map +0 -1
  417. package/dist/model-catalog.js.map +0 -1
  418. package/dist/model-list.d.ts.map +0 -1
  419. package/dist/model-list.js.map +0 -1
  420. package/dist/orchestrator/board-tools.d.ts.map +0 -1
  421. package/dist/orchestrator/board-tools.js.map +0 -1
  422. package/dist/orchestrator/board.d.ts.map +0 -1
  423. package/dist/orchestrator/board.js.map +0 -1
  424. package/dist/orchestrator/index.d.ts.map +0 -1
  425. package/dist/orchestrator/index.js.map +0 -1
  426. package/dist/orchestrator/orchestrator.d.ts.map +0 -1
  427. package/dist/orchestrator/orchestrator.js.map +0 -1
  428. package/dist/orchestrator/router.d.ts.map +0 -1
  429. package/dist/orchestrator/router.js.map +0 -1
  430. package/dist/orchestrator/specialists-registry.d.ts.map +0 -1
  431. package/dist/orchestrator/specialists-registry.js.map +0 -1
  432. package/dist/orchestrator/specialists.d.ts.map +0 -1
  433. package/dist/orchestrator/specialists.js.map +0 -1
  434. package/dist/orchestrator/types.d.ts.map +0 -1
  435. package/dist/orchestrator/types.js.map +0 -1
  436. package/dist/plugins/index.d.ts.map +0 -1
  437. package/dist/plugins/index.js.map +0 -1
  438. package/dist/plugins/install.d.ts.map +0 -1
  439. package/dist/plugins/install.js.map +0 -1
  440. package/dist/plugins/loader.d.ts.map +0 -1
  441. package/dist/plugins/loader.js.map +0 -1
  442. package/dist/policy/audit.d.ts.map +0 -1
  443. package/dist/policy/audit.js.map +0 -1
  444. package/dist/policy/policy.d.ts.map +0 -1
  445. package/dist/policy/policy.js.map +0 -1
  446. package/dist/policy/proxy.d.ts.map +0 -1
  447. package/dist/policy/proxy.js.map +0 -1
  448. package/dist/pricing.d.ts.map +0 -1
  449. package/dist/pricing.js.map +0 -1
  450. package/dist/providers.d.ts.map +0 -1
  451. package/dist/providers.js.map +0 -1
  452. package/dist/repomap/index.d.ts.map +0 -1
  453. package/dist/repomap/index.js.map +0 -1
  454. package/dist/repomap/repo-map.d.ts.map +0 -1
  455. package/dist/repomap/repo-map.js.map +0 -1
  456. package/dist/semantic/chunker.d.ts.map +0 -1
  457. package/dist/semantic/chunker.js.map +0 -1
  458. package/dist/semantic/embedder.d.ts.map +0 -1
  459. package/dist/semantic/embedder.js.map +0 -1
  460. package/dist/semantic/semantic-index.d.ts.map +0 -1
  461. package/dist/semantic/semantic-index.js.map +0 -1
  462. package/dist/semantic/vector-store.d.ts.map +0 -1
  463. package/dist/semantic/vector-store.js.map +0 -1
  464. package/dist/sessions/index.d.ts.map +0 -1
  465. package/dist/sessions/index.js.map +0 -1
  466. package/dist/sessions/session-export.d.ts.map +0 -1
  467. package/dist/sessions/session-export.js.map +0 -1
  468. package/dist/sessions/session-store.d.ts.map +0 -1
  469. package/dist/sessions/session-store.js.map +0 -1
  470. package/dist/sessions/watch.d.ts.map +0 -1
  471. package/dist/sessions/watch.js.map +0 -1
  472. package/dist/settings-export.d.ts.map +0 -1
  473. package/dist/settings-export.js.map +0 -1
  474. package/dist/skills/activator.d.ts.map +0 -1
  475. package/dist/skills/activator.js.map +0 -1
  476. package/dist/skills/index.d.ts.map +0 -1
  477. package/dist/skills/index.js.map +0 -1
  478. package/dist/skills/loader.d.ts.map +0 -1
  479. package/dist/skills/loader.js.map +0 -1
  480. package/dist/skills/marketplace-types.d.ts.map +0 -1
  481. package/dist/skills/marketplace-types.js.map +0 -1
  482. package/dist/skills/marketplace.d.ts.map +0 -1
  483. package/dist/skills/marketplace.js.map +0 -1
  484. package/dist/skills/parser.d.ts.map +0 -1
  485. package/dist/skills/parser.js.map +0 -1
  486. package/dist/skills/types.d.ts.map +0 -1
  487. package/dist/skills/types.js.map +0 -1
  488. package/dist/specs/generate.d.ts.map +0 -1
  489. package/dist/specs/generate.js.map +0 -1
  490. package/dist/specs/index.d.ts.map +0 -1
  491. package/dist/specs/index.js.map +0 -1
  492. package/dist/specs/store.d.ts.map +0 -1
  493. package/dist/specs/store.js.map +0 -1
  494. package/dist/specs/tasks-parser.d.ts.map +0 -1
  495. package/dist/specs/tasks-parser.js.map +0 -1
  496. package/dist/specs/types.d.ts.map +0 -1
  497. package/dist/specs/types.js.map +0 -1
  498. package/dist/steering/glob.d.ts.map +0 -1
  499. package/dist/steering/glob.js.map +0 -1
  500. package/dist/steering/index.d.ts.map +0 -1
  501. package/dist/steering/index.js.map +0 -1
  502. package/dist/steering/loader.d.ts.map +0 -1
  503. package/dist/steering/loader.js.map +0 -1
  504. package/dist/steering/project-instructions.d.ts.map +0 -1
  505. package/dist/steering/project-instructions.js.map +0 -1
  506. package/dist/steering/select.d.ts.map +0 -1
  507. package/dist/steering/select.js.map +0 -1
  508. package/dist/steering/types.d.ts.map +0 -1
  509. package/dist/steering/types.js.map +0 -1
  510. package/dist/structured/index.d.ts.map +0 -1
  511. package/dist/structured/index.js.map +0 -1
  512. package/dist/structured/retry.d.ts.map +0 -1
  513. package/dist/structured/retry.js.map +0 -1
  514. package/dist/structured/schema.d.ts.map +0 -1
  515. package/dist/structured/schema.js.map +0 -1
  516. package/dist/tools/browser-tools.d.ts.map +0 -1
  517. package/dist/tools/browser-tools.js.map +0 -1
  518. package/dist/tools/codebase-search.d.ts.map +0 -1
  519. package/dist/tools/codebase-search.js.map +0 -1
  520. package/dist/tools/command-allow.d.ts.map +0 -1
  521. package/dist/tools/command-allow.js.map +0 -1
  522. package/dist/tools/edit-file.d.ts.map +0 -1
  523. package/dist/tools/edit-file.js.map +0 -1
  524. package/dist/tools/fetch-url.d.ts.map +0 -1
  525. package/dist/tools/fetch-url.js.map +0 -1
  526. package/dist/tools/find-references.d.ts.map +0 -1
  527. package/dist/tools/find-references.js.map +0 -1
  528. package/dist/tools/find-symbol.d.ts.map +0 -1
  529. package/dist/tools/find-symbol.js.map +0 -1
  530. package/dist/tools/index.d.ts.map +0 -1
  531. package/dist/tools/index.js.map +0 -1
  532. package/dist/tools/list-files.d.ts.map +0 -1
  533. package/dist/tools/list-files.js.map +0 -1
  534. package/dist/tools/list-symbols.d.ts.map +0 -1
  535. package/dist/tools/list-symbols.js.map +0 -1
  536. package/dist/tools/memory.d.ts.map +0 -1
  537. package/dist/tools/memory.js.map +0 -1
  538. package/dist/tools/policy.d.ts.map +0 -1
  539. package/dist/tools/policy.js.map +0 -1
  540. package/dist/tools/read-file.d.ts.map +0 -1
  541. package/dist/tools/read-file.js.map +0 -1
  542. package/dist/tools/read-image.d.ts.map +0 -1
  543. package/dist/tools/read-image.js.map +0 -1
  544. package/dist/tools/read-only.d.ts.map +0 -1
  545. package/dist/tools/read-only.js.map +0 -1
  546. package/dist/tools/redact.d.ts.map +0 -1
  547. package/dist/tools/redact.js.map +0 -1
  548. package/dist/tools/result-cache.d.ts.map +0 -1
  549. package/dist/tools/result-cache.js.map +0 -1
  550. package/dist/tools/run-command.d.ts.map +0 -1
  551. package/dist/tools/run-command.js.map +0 -1
  552. package/dist/tools/sandbox-loader.d.ts.map +0 -1
  553. package/dist/tools/sandbox-loader.js.map +0 -1
  554. package/dist/tools/search-files.d.ts.map +0 -1
  555. package/dist/tools/search-files.js.map +0 -1
  556. package/dist/tools/shared.d.ts.map +0 -1
  557. package/dist/tools/shared.js.map +0 -1
  558. package/dist/tools/sub-agent.d.ts.map +0 -1
  559. package/dist/tools/sub-agent.js.map +0 -1
  560. package/dist/tools/write-file.d.ts.map +0 -1
  561. package/dist/tools/write-file.js.map +0 -1
  562. package/dist/types.d.ts.map +0 -1
  563. package/dist/types.js.map +0 -1
  564. package/dist/verify/detect.d.ts.map +0 -1
  565. package/dist/verify/detect.js.map +0 -1
  566. package/dist/verify/index.d.ts.map +0 -1
  567. package/dist/verify/index.js.map +0 -1
  568. package/dist/worktree/branch-ops.d.ts.map +0 -1
  569. package/dist/worktree/branch-ops.js.map +0 -1
  570. package/dist/worktree/index.d.ts.map +0 -1
  571. package/dist/worktree/index.js.map +0 -1
  572. package/dist/worktree/worktree.d.ts.map +0 -1
  573. package/dist/worktree/worktree.js.map +0 -1
@@ -23,6 +23,13 @@ export declare class SpecStore {
23
23
  get(id: string): Promise<SpecSummary | null>;
24
24
  /** List every approved spec, oldest first. */
25
25
  list(): Promise<SpecSummary[]>;
26
+ /** The three documents of an approved spec, or null when it doesn't exist. */
27
+ readDocs(id: string): Promise<SpecSections | null>;
28
+ /**
29
+ * Replace an approved spec's documents (a re-sync with the code). The previous versions
30
+ * are kept in `<dir>/history/<timestamp>/`, and the manifest records `syncedAt`.
31
+ */
32
+ update(id: string, sections: SpecSections, now?: Date): Promise<SpecSummary>;
26
33
  /** Delete an approved spec's directory. Returns false when it didn't exist. */
27
34
  delete(id: string): Promise<boolean>;
28
35
  private draftDir;
@@ -44,4 +51,3 @@ export declare class SpecStore {
44
51
  * all (e.g. `"!!!"`).
45
52
  */
46
53
  export declare function slugifyTaskForSpecId(task: string): string;
47
- //# sourceMappingURL=store.d.ts.map
@@ -14,6 +14,7 @@ import { convertToCheckboxes } from './tasks-parser.js';
14
14
  const MANIFEST_FILENAME = 'manifest.json';
15
15
  const DRAFT_FILENAME = 'draft.json';
16
16
  const RUNS_FILENAME = 'runs.json';
17
+ const HISTORY_DIR = 'history';
17
18
  const DRAFTS_DIR = '.drafts';
18
19
  const MAX_RUNS_PER_TASK = 20;
19
20
  const SAFE_ID = /^[a-z0-9][a-z0-9._-]*$/i;
@@ -88,6 +89,38 @@ export class SpecStore {
88
89
  }
89
90
  return out.sort((a, b) => a.approvedAt.localeCompare(b.approvedAt));
90
91
  }
92
+ /** The three documents of an approved spec, or null when it doesn't exist. */
93
+ async readDocs(id) {
94
+ const spec = await this.get(id);
95
+ if (!spec)
96
+ return null;
97
+ const read = (f) => readFile(path.join(spec.dir, f), 'utf8').catch(() => '');
98
+ return { requirements: await read('requirements.md'), design: await read('design.md'), tasks: await read('tasks.md') };
99
+ }
100
+ /**
101
+ * Replace an approved spec's documents (a re-sync with the code). The previous versions
102
+ * are kept in `<dir>/history/<timestamp>/`, and the manifest records `syncedAt`.
103
+ */
104
+ async update(id, sections, now = new Date()) {
105
+ assertSafeSpecId(id);
106
+ const spec = await this.get(id);
107
+ if (!spec)
108
+ throw new Error(`no spec ${id}`);
109
+ const stamp = now.toISOString().replace(/[:.]/g, '-');
110
+ const backup = path.join(spec.dir, HISTORY_DIR, stamp);
111
+ await mkdir(backup, { recursive: true });
112
+ for (const f of ['requirements.md', 'design.md', 'tasks.md']) {
113
+ const from = path.join(spec.dir, f);
114
+ if (existsSync(from))
115
+ await writeFile(path.join(backup, f), await readFile(from, 'utf8'), 'utf8');
116
+ }
117
+ await writeFile(path.join(spec.dir, 'requirements.md'), sections.requirements, 'utf8');
118
+ await writeFile(path.join(spec.dir, 'design.md'), sections.design, 'utf8');
119
+ await writeFile(path.join(spec.dir, 'tasks.md'), sections.tasks, 'utf8');
120
+ const updated = { ...spec, syncedAt: now.toISOString() };
121
+ await writeFile(path.join(spec.dir, MANIFEST_FILENAME), JSON.stringify(updated, null, 2), 'utf8');
122
+ return updated;
123
+ }
91
124
  /** Delete an approved spec's directory. Returns false when it didn't exist. */
92
125
  async delete(id) {
93
126
  if (!isSafeSpecId(id))
@@ -222,4 +255,3 @@ export function slugifyTaskForSpecId(task) {
222
255
  const suffix = Math.random().toString(36).slice(2, 8);
223
256
  return `${slug}-${suffix}`;
224
257
  }
225
- //# sourceMappingURL=store.js.map
@@ -0,0 +1,29 @@
1
+ import type { SpecSections, SpecSummary } from './types.js';
2
+ export interface SpecDrift {
3
+ /** Paths the documents mention (in backticks) that no longer exist. */
4
+ missingPaths: string[];
5
+ /** Files changed since the spec was approved or last synced (committed or not), workspace-relative. */
6
+ changedFiles: string[];
7
+ tasks: {
8
+ done: number;
9
+ total: number;
10
+ };
11
+ /** When the comparison starts: the last sync, else approval. */
12
+ since: string;
13
+ }
14
+ /** Backticked tokens that look like file paths: a slash or a file extension, no spaces. */
15
+ export declare function referencedPaths(markdown: string): string[];
16
+ /** Files changed since `iso` (commits after it plus uncommitted work), or [] outside a git repo. */
17
+ export declare function changedSince(cwd: string, iso: string): Promise<string[]>;
18
+ export declare function specDrift(cwd: string, spec: Pick<SpecSummary, 'approvedAt'> & {
19
+ syncedAt?: string;
20
+ }, docs: SpecSections): Promise<SpecDrift>;
21
+ /** The task for a spec-mode run that brings the documents up to date with the code. */
22
+ export declare function syncSpecTask(spec: Pick<SpecSummary, 'id' | 'task'>, docs: SpecSections, drift: SpecDrift): string;
23
+ /** Re-tick tasks (matched by their written number, else their title) that were done before the sync. */
24
+ export declare function keepDoneTasks(before: string, after: string): string;
25
+ /** Line counts added and removed between two texts (a rough size of the change, not a diff). */
26
+ export declare function changeSize(before: string, after: string): {
27
+ added: number;
28
+ removed: number;
29
+ };
@@ -0,0 +1,155 @@
1
+ /**
2
+ * Re-sync an approved spec with the code. The code moves on after a spec is approved
3
+ * (tasks done by hand, files renamed, designs changed mid-way), so the documents drift.
4
+ *
5
+ * - {@link specDrift} measures it without a model: paths the docs mention that are
6
+ * gone, files changed since the spec was approved (or last synced), task progress.
7
+ * - {@link syncSpecTask} is the task for a read-only spec-mode run that rewrites the
8
+ * three documents to describe the code as it is now.
9
+ * - {@link keepDoneTasks} makes sure a re-sync never un-ticks a task the user finished.
10
+ *
11
+ * The caller shows the change and writes it with `SpecStore.update` (which keeps the
12
+ * previous version in `history/`).
13
+ */
14
+ import { execFile } from 'node:child_process';
15
+ import { existsSync } from 'node:fs';
16
+ import path from 'node:path';
17
+ import { promisify } from 'node:util';
18
+ import { parseTasks, setTaskDone } from './tasks-parser.js';
19
+ const execFileAsync = promisify(execFile);
20
+ /** Backticked tokens that look like file paths: a slash or a file extension, no spaces. */
21
+ export function referencedPaths(markdown) {
22
+ const out = new Set();
23
+ for (const m of markdown.matchAll(/`([^`\s]+)`/g)) {
24
+ let p = m[1].replace(/[:#].*$/, '').replace(/[),.;]+$/, '');
25
+ if (p.startsWith('./'))
26
+ p = p.slice(2);
27
+ if (!p || /^[a-z]+:\/\//i.test(p) || p.startsWith('-') || p.startsWith('@'))
28
+ continue;
29
+ const looksLikePath = (p.includes('/') && /[A-Za-z0-9_]/.test(p)) || /^[\w.-]+\.[A-Za-z][A-Za-z0-9]{0,5}$/.test(p);
30
+ // Globs, placeholders and versions are not paths.
31
+ if (!looksLikePath || /[*?{}<>$]/.test(p) || /^\d+(\.\d+)+$/.test(p))
32
+ continue;
33
+ out.add(p);
34
+ }
35
+ return [...out].sort();
36
+ }
37
+ async function git(cwd, args) {
38
+ const { stdout } = await execFileAsync('git', args, { cwd, timeout: 20_000, maxBuffer: 16 * 1024 * 1024 });
39
+ return stdout;
40
+ }
41
+ /** Files changed since `iso` (commits after it plus uncommitted work), or [] outside a git repo. */
42
+ export async function changedSince(cwd, iso) {
43
+ const files = new Set();
44
+ try {
45
+ const log = await git(cwd, ['log', `--since=${iso}`, '--name-only', '--pretty=format:']);
46
+ for (const f of log.split('\n'))
47
+ if (f.trim())
48
+ files.add(f.trim());
49
+ const status = await git(cwd, ['status', '--porcelain', '--untracked-files=all']);
50
+ for (const line of status.split('\n')) {
51
+ const f = line.slice(3).trim();
52
+ if (!f)
53
+ continue;
54
+ files.add(f.includes(' -> ') ? f.split(' -> ')[1] : f);
55
+ }
56
+ }
57
+ catch {
58
+ return [];
59
+ }
60
+ // The spec's own files are not code drift.
61
+ return [...files].filter((f) => !f.startsWith('.forge/')).sort();
62
+ }
63
+ export async function specDrift(cwd, spec, docs) {
64
+ const since = spec.syncedAt ?? spec.approvedAt;
65
+ const mentioned = referencedPaths(`${docs.requirements}\n${docs.design}\n${docs.tasks}`);
66
+ const tasks = parseTasks(docs.tasks);
67
+ return {
68
+ missingPaths: mentioned.filter((p) => !existsSync(path.join(cwd, p))),
69
+ changedFiles: await changedSince(cwd, since),
70
+ tasks: { done: tasks.filter((t) => t.done).length, total: tasks.length },
71
+ since,
72
+ };
73
+ }
74
+ const LIST_MAX = 80;
75
+ function list(items) {
76
+ if (items.length === 0)
77
+ return '(none)';
78
+ const shown = items.slice(0, LIST_MAX).map((i) => `- ${i}`);
79
+ if (items.length > LIST_MAX)
80
+ shown.push(`- … and ${items.length - LIST_MAX} more`);
81
+ return shown.join('\n');
82
+ }
83
+ /** The task for a spec-mode run that brings the documents up to date with the code. */
84
+ export function syncSpecTask(spec, docs, drift) {
85
+ return `Bring the spec "${spec.id}" up to date with the code as it is now. It was written for: ${spec.task}
86
+
87
+ Read the code (start with the changed files below) and rewrite the three documents so they describe what is actually built and what is still left to do:
88
+ - requirements.md: keep every requirement and its number; change one only where the code deliberately does something else, and say so in the requirement.
89
+ - design.md: describe the real modules, files, data shapes and flows. Fix paths and names that changed; drop parts that were not built and are no longer planned.
90
+ - tasks.md: keep the checklist format (- [ ] / - [x]) and the task numbers. Tick a task when the code clearly does it. Never untick a ticked task. Add new unticked tasks, numbered after the last one, for work the code still needs to meet the requirements.
91
+
92
+ Do not change any code. Reply with the three updated documents in the usual format.
93
+
94
+ Since ${drift.since}:
95
+ Changed files:
96
+ ${list(drift.changedFiles)}
97
+
98
+ Paths the documents mention that no longer exist:
99
+ ${list(drift.missingPaths)}
100
+
101
+ Task progress: ${drift.tasks.done} of ${drift.tasks.total} ticked.
102
+
103
+ <current-requirements.md>
104
+ ${docs.requirements}
105
+ </current-requirements.md>
106
+
107
+ <current-design.md>
108
+ ${docs.design}
109
+ </current-design.md>
110
+
111
+ <current-tasks.md>
112
+ ${docs.tasks}
113
+ </current-tasks.md>`;
114
+ }
115
+ const NUMBER = /^(\d+(?:\.\d+)*)[.)]?\s+/;
116
+ /** A task's written number (`2.1`), or null: parseTasks falls back to its position, which moves. */
117
+ function writtenNumber(title) {
118
+ return NUMBER.exec(title)?.[1] ?? null;
119
+ }
120
+ function bareTitle(title) {
121
+ return title.replace(NUMBER, '').trim().toLowerCase();
122
+ }
123
+ /** Re-tick tasks (matched by their written number, else their title) that were done before the sync. */
124
+ export function keepDoneTasks(before, after) {
125
+ const doneBefore = parseTasks(before).filter((t) => t.done);
126
+ if (doneBefore.length === 0)
127
+ return after;
128
+ const numbers = new Set(doneBefore.map((t) => writtenNumber(t.title)).filter((n) => n !== null));
129
+ const titles = new Set(doneBefore.map((t) => bareTitle(t.title)));
130
+ let md = after;
131
+ for (const task of parseTasks(after)) {
132
+ if (task.done)
133
+ continue;
134
+ const n = writtenNumber(task.title);
135
+ if (!(n !== null && numbers.has(n)) && !titles.has(bareTitle(task.title)))
136
+ continue;
137
+ const r = setTaskDone(md, task, true);
138
+ if (r.ok)
139
+ md = r.md;
140
+ }
141
+ return md;
142
+ }
143
+ /** Line counts added and removed between two texts (a rough size of the change, not a diff). */
144
+ export function changeSize(before, after) {
145
+ const count = (lines) => lines.reduce((m, l) => m.set(l, (m.get(l) ?? 0) + 1), new Map());
146
+ const a = count(before.split('\n'));
147
+ const b = count(after.split('\n'));
148
+ let added = 0;
149
+ let removed = 0;
150
+ for (const [line, n] of b)
151
+ added += Math.max(0, n - (a.get(line) ?? 0));
152
+ for (const [line, n] of a)
153
+ removed += Math.max(0, n - (b.get(line) ?? 0));
154
+ return { added, removed };
155
+ }
@@ -25,4 +25,3 @@ export declare function setTaskDone(md: string, task: {
25
25
  reason: string;
26
26
  };
27
27
  export declare function convertToCheckboxes(md: string): string;
28
- //# sourceMappingURL=tasks-parser.d.ts.map
@@ -75,4 +75,3 @@ export function convertToCheckboxes(md) {
75
75
  });
76
76
  return changed ? out.join(eolOf(md)) : md;
77
77
  }
78
- //# sourceMappingURL=tasks-parser.js.map
@@ -36,7 +36,8 @@ export interface SpecSummary {
36
36
  id: string;
37
37
  task: string;
38
38
  approvedAt: string;
39
+ /** When the documents were last re-synced with the code (`SpecStore.update`). */
40
+ syncedAt?: string;
39
41
  /** Absolute path to `.forge/specs/<id>/`. */
40
42
  dir: string;
41
43
  }
42
- //# sourceMappingURL=types.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=types.js.map
@@ -12,4 +12,3 @@
12
12
  * Spec: docs/superpowers/specs/2026-09-29-steering-files-design.md §5.1
13
13
  */
14
14
  export declare function pathMatchesGlob(rawPattern: string, relPath: string): boolean;
15
- //# sourceMappingURL=glob.d.ts.map
@@ -88,4 +88,3 @@ export function pathMatchesGlob(rawPattern, relPath) {
88
88
  const subject = pattern.includes('/') ? relPath : relPath.slice(relPath.lastIndexOf('/') + 1);
89
89
  return matchTokens(tokenize(pattern), subject);
90
90
  }
91
- //# sourceMappingURL=glob.js.map
@@ -4,4 +4,3 @@ export { isSafeSteeringName, loadSteering, overrideFilePath, parseSteering, read
4
4
  export { MAX_TOOL_INJECTIONS, START_BUDGET_BYTES, TOOL_DOC_BYTES, formatSteeringLine, selectAtStart, selectOnToolTouch, stripSteering, toWorkspaceRelative, wrapSteering, } from './select.js';
5
5
  export type { StartSelection } from './select.js';
6
6
  export type { SteeringConfig, SteeringDoc, SteeringInclusion, SteeringLoadResult, SteeringSkip } from './types.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -2,4 +2,3 @@
2
2
  export { pathMatchesGlob } from './glob.js';
3
3
  export { isSafeSteeringName, loadSteering, overrideFilePath, parseSteering, readOverride, setSteeringDisabled, } from './loader.js';
4
4
  export { MAX_TOOL_INJECTIONS, START_BUDGET_BYTES, TOOL_DOC_BYTES, formatSteeringLine, selectAtStart, selectOnToolTouch, stripSteering, toWorkspaceRelative, wrapSteering, } from './select.js';
5
- //# sourceMappingURL=index.js.map
@@ -12,4 +12,3 @@ export declare function loadSteering(cwd: string, opts?: {
12
12
  includeProject?: boolean;
13
13
  homeDir?: string;
14
14
  }): Promise<SteeringLoadResult>;
15
- //# sourceMappingURL=loader.d.ts.map
@@ -150,4 +150,3 @@ export async function loadSteering(cwd, opts = {}) {
150
150
  .sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
151
151
  return { docs, warnings };
152
152
  }
153
- //# sourceMappingURL=loader.js.map
@@ -1,4 +1,3 @@
1
1
  export declare const PROJECT_INSTRUCTION_FILES: readonly ["AGENTS.md", "CLAUDE.md", "CONVENTIONS.md"];
2
2
  export declare const MAX_INSTRUCTION_BYTES = 16000;
3
3
  export declare function buildProjectInstructionsBlock(cwd: string): Promise<string>;
4
- //# sourceMappingURL=project-instructions.d.ts.map
@@ -25,4 +25,3 @@ export async function buildProjectInstructionsBlock(cwd) {
25
25
  }
26
26
  return blocks.join('\n\n');
27
27
  }
28
- //# sourceMappingURL=project-instructions.js.map
@@ -26,4 +26,3 @@ export declare function formatSteeringLine(e: {
26
26
  skipped: SteeringSkip[];
27
27
  path?: string;
28
28
  }): string;
29
- //# sourceMappingURL=select.d.ts.map
@@ -94,4 +94,3 @@ export function formatSteeringLine(e) {
94
94
  const skipped = e.skipped.length > 0 ? ` · skipped: ${e.skipped.map((s) => `${s.name} (${s.reason})`).join(', ')}` : '';
95
95
  return `${head}: ${applied}${skipped}`;
96
96
  }
97
- //# sourceMappingURL=select.js.map
@@ -32,4 +32,3 @@ export interface SteeringSkip {
32
32
  name: string;
33
33
  reason: 'budget' | 'cap';
34
34
  }
35
- //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1,2 @@
1
1
  /** Steering files (SP3a). Spec: docs/superpowers/specs/2026-09-29-steering-files-design.md §5.1 */
2
2
  export {};
3
- //# sourceMappingURL=types.js.map
@@ -16,4 +16,3 @@ export type { ZodTypeAny } from 'zod';
16
16
  export { formatZodError, jsonSchemaToZod, loadSchemaFile, } from './schema.js';
17
17
  export { defaultRetryPrompt, isStructuredOutputError, runStructuredAgent, StructuredOutputError, validateFinalText, } from './retry.js';
18
18
  export type { StructuredRunOptions, StructuredRunResult } from './retry.js';
19
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export { formatZodError, jsonSchemaToZod, loadSchemaFile, } from './schema.js';
2
2
  export { defaultRetryPrompt, isStructuredOutputError, runStructuredAgent, StructuredOutputError, validateFinalText, } from './retry.js';
3
- //# sourceMappingURL=index.js.map
@@ -131,4 +131,3 @@ export declare class StructuredOutputError extends Error {
131
131
  */
132
132
  export declare function isStructuredOutputError(err: unknown): err is StructuredOutputError;
133
133
  export { z };
134
- //# sourceMappingURL=retry.d.ts.map
@@ -200,4 +200,3 @@ export function isStructuredOutputError(err) {
200
200
  }
201
201
  // Re-export so callers don't need a second import.
202
202
  export { z };
203
- //# sourceMappingURL=retry.js.map
@@ -60,4 +60,3 @@ export declare function jsonSchemaToZod(schema: Record<string, unknown>): ZodTyp
60
60
  * Paths use JSON Pointer-ish dotted notation; values are quoted.
61
61
  */
62
62
  export declare function formatZodError(err: ZodError): string;
63
- //# sourceMappingURL=schema.d.ts.map
@@ -291,4 +291,3 @@ function describeReceived(issue) {
291
291
  return '';
292
292
  return JSON.stringify(issue.received);
293
293
  }
294
- //# sourceMappingURL=schema.js.map
@@ -75,4 +75,3 @@ declare const actParams: z.ZodEffects<z.ZodObject<{
75
75
  selector?: string | undefined;
76
76
  }>;
77
77
  export {};
78
- //# sourceMappingURL=browser-tools.d.ts.map
@@ -136,4 +136,3 @@ const actParams = z
136
136
  if (v.action === 'evaluate' && !v.expression)
137
137
  ctx.addIssue({ code: 'custom', message: 'expression is required' });
138
138
  });
139
- //# sourceMappingURL=browser-tools.js.map
@@ -20,4 +20,3 @@ export interface CodebaseSearchResult {
20
20
  }
21
21
  export declare function createCodebaseSearchTool(embedder: Embedder): ToolDefinition<z.infer<typeof params>, CodebaseSearchResult>;
22
22
  export {};
23
- //# sourceMappingURL=codebase-search.d.ts.map
@@ -19,4 +19,3 @@ export function createCodebaseSearchTool(embedder) {
19
19
  }),
20
20
  };
21
21
  }
22
- //# sourceMappingURL=codebase-search.js.map
@@ -9,4 +9,3 @@ export declare function isAlwaysAllowable(command: string, hasCwd?: boolean): bo
9
9
  export declare function needsScriptFingerprint(command: string): boolean;
10
10
  /** Whether a `run_command` call's arguments name one of `allowed` exactly, without a working-directory override. */
11
11
  export declare function isListedCommand(args: unknown, allowed: readonly string[]): boolean;
12
- //# sourceMappingURL=command-allow.d.ts.map
@@ -47,4 +47,3 @@ export function isListedCommand(args, allowed) {
47
47
  return false;
48
48
  return allowed.includes(normalizeCommand(a.command));
49
49
  }
50
- //# sourceMappingURL=command-allow.js.map
@@ -27,4 +27,3 @@ export interface EditFileResult {
27
27
  }
28
28
  export declare const editFileTool: ToolDefinition<z.infer<typeof params>, EditFileResult>;
29
29
  export {};
30
- //# sourceMappingURL=edit-file.d.ts.map
@@ -56,4 +56,3 @@ function countOccurrences(haystack, needle) {
56
56
  }
57
57
  return count;
58
58
  }
59
- //# sourceMappingURL=edit-file.js.map
@@ -39,4 +39,3 @@ export interface FetchUrlResult {
39
39
  }
40
40
  export declare const fetchUrlTool: ToolDefinition<z.infer<typeof params>, FetchUrlResult>;
41
41
  export {};
42
- //# sourceMappingURL=fetch-url.d.ts.map
@@ -296,4 +296,3 @@ function prettyJson(text) {
296
296
  return text;
297
297
  }
298
298
  }
299
- //# sourceMappingURL=fetch-url.js.map
@@ -18,4 +18,3 @@ export interface FindReferencesResult {
18
18
  }
19
19
  export declare const findReferencesTool: ToolDefinition<z.infer<typeof params>, FindReferencesResult>;
20
20
  export {};
21
- //# sourceMappingURL=find-references.d.ts.map
@@ -37,4 +37,3 @@ export const findReferencesTool = {
37
37
  function escapeRegExp(s) {
38
38
  return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
39
39
  }
40
- //# sourceMappingURL=find-references.js.map
@@ -24,4 +24,3 @@ export interface FindSymbolResult {
24
24
  }
25
25
  export declare const findSymbolTool: ToolDefinition<z.infer<typeof params>, FindSymbolResult>;
26
26
  export {};
27
- //# sourceMappingURL=find-symbol.d.ts.map
@@ -33,4 +33,3 @@ export const findSymbolTool = {
33
33
  return { query: args.name, matchType: 'none', matches: [] };
34
34
  },
35
35
  };
36
- //# sourceMappingURL=find-symbol.js.map
@@ -0,0 +1,15 @@
1
+ /** Files read in every directory, in this order. `.forgeignore` is for paths only the agent should skip. */
2
+ export declare const IGNORE_FILE_NAMES: readonly [".gitignore", ".forgeignore"];
3
+ /** The closest ancestor of `dir` (itself included) that holds a `.git` entry, or null. */
4
+ export declare function findGitRoot(dir: string): string | null;
5
+ export declare class IgnoreRules {
6
+ private readonly top;
7
+ private readonly cache;
8
+ /** `top` is where rule lookup starts: the git root, or the walked directory outside a repository. */
9
+ private constructor();
10
+ /** Rules for walking anywhere under `cwd`. */
11
+ static forRoot(cwd: string): IgnoreRules;
12
+ private rulesIn;
13
+ /** Whether `absPath` is ignored. Paths outside the rule root are never ignored here. */
14
+ isIgnored(absPath: string, isDir: boolean): boolean;
15
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Git-style ignore rules for walking the workspace: `.gitignore` and `.forgeignore`
3
+ * files (in the walked tree and in its ancestors up to the git root) plus
4
+ * `.git/info/exclude`. Each file's patterns apply relative to its own directory,
5
+ * and a deeper file can re-include (`!pattern`) what a shallower one ignored, as in git.
6
+ */
7
+ import { existsSync, readFileSync, statSync } from 'node:fs';
8
+ import path from 'node:path';
9
+ import ignore from 'ignore';
10
+ /** Files read in every directory, in this order. `.forgeignore` is for paths only the agent should skip. */
11
+ export const IGNORE_FILE_NAMES = ['.gitignore', '.forgeignore'];
12
+ function readIfFile(file) {
13
+ try {
14
+ return statSync(file).isFile() ? readFileSync(file, 'utf8') : null;
15
+ }
16
+ catch {
17
+ return null;
18
+ }
19
+ }
20
+ /** The closest ancestor of `dir` (itself included) that holds a `.git` entry, or null. */
21
+ export function findGitRoot(dir) {
22
+ let current = path.resolve(dir);
23
+ for (;;) {
24
+ if (existsSync(path.join(current, '.git')))
25
+ return current;
26
+ const parent = path.dirname(current);
27
+ if (parent === current)
28
+ return null;
29
+ current = parent;
30
+ }
31
+ }
32
+ export class IgnoreRules {
33
+ top;
34
+ cache = new Map();
35
+ /** `top` is where rule lookup starts: the git root, or the walked directory outside a repository. */
36
+ constructor(top) {
37
+ this.top = top;
38
+ }
39
+ /** Rules for walking anywhere under `cwd`. */
40
+ static forRoot(cwd) {
41
+ const abs = path.resolve(cwd);
42
+ return new IgnoreRules(findGitRoot(abs) ?? abs);
43
+ }
44
+ rulesIn(dir) {
45
+ if (this.cache.has(dir))
46
+ return this.cache.get(dir);
47
+ const chunks = [];
48
+ if (dir === this.top) {
49
+ const exclude = readIfFile(path.join(dir, '.git', 'info', 'exclude'));
50
+ if (exclude)
51
+ chunks.push(exclude);
52
+ }
53
+ for (const name of IGNORE_FILE_NAMES) {
54
+ const text = readIfFile(path.join(dir, name));
55
+ if (text)
56
+ chunks.push(text);
57
+ }
58
+ const rules = chunks.length > 0 ? ignore().add(chunks.join('\n')) : null;
59
+ this.cache.set(dir, rules);
60
+ return rules;
61
+ }
62
+ /** Whether `absPath` is ignored. Paths outside the rule root are never ignored here. */
63
+ isIgnored(absPath, isDir) {
64
+ const rel = path.relative(this.top, path.resolve(absPath));
65
+ if (!rel || rel.startsWith('..') || path.isAbsolute(rel))
66
+ return false;
67
+ const parts = rel.split(path.sep);
68
+ let ignored = false;
69
+ let dir = this.top;
70
+ for (let i = 0; i < parts.length; i++) {
71
+ const rules = this.rulesIn(dir);
72
+ if (rules) {
73
+ const sub = parts.slice(i).join('/') + (isDir ? '/' : '');
74
+ const verdict = rules.test(sub);
75
+ if (verdict.ignored)
76
+ ignored = true;
77
+ else if (verdict.unignored)
78
+ ignored = false;
79
+ }
80
+ dir = path.join(dir, parts[i]);
81
+ }
82
+ return ignored;
83
+ }
84
+ }
@@ -4,7 +4,8 @@ import { findReferencesTool } from './find-references.js';
4
4
  import { findSymbolTool } from './find-symbol.js';
5
5
  import { listFilesTool } from './list-files.js';
6
6
  import { listSymbolsTool } from './list-symbols.js';
7
- import { memoryReadTool, memoryWriteTool } from './memory.js';
7
+ import { memoryForgetTool, memoryReadTool, memoryWriteTool } from './memory.js';
8
+ import { editNotebookTool } from './notebook.js';
8
9
  import { readFileTool } from './read-file.js';
9
10
  import { readImageTool } from './read-image.js';
10
11
  import { runCommandTool } from './run-command.js';
@@ -25,11 +26,10 @@ type AnyToolDefinition = ToolDefinition<any, any>;
25
26
  * intentional: the model sees this order in its tool list.
26
27
  */
27
28
  export declare const BUILTIN_TOOLS: readonly AnyToolDefinition[];
28
- export { editFileTool, fetchUrlTool, findReferencesTool, findSymbolTool, listFilesTool, listSymbolsTool, memoryReadTool, memoryWriteTool, readFileTool, readImageTool, runCommandTool, searchFilesTool, subAgentTool, writeFileTool, };
29
+ export { editFileTool, editNotebookTool, fetchUrlTool, findReferencesTool, findSymbolTool, listFilesTool, listSymbolsTool, memoryForgetTool, memoryReadTool, memoryWriteTool, readFileTool, readImageTool, runCommandTool, searchFilesTool, subAgentTool, writeFileTool, };
29
30
  export type { ToolContext, ToolDefinition, ToolPolicy, ToolSandbox } from '../types.js';
30
31
  export { checkPolicyViolation, globToRegex, mergeToolSandbox, normalizePathPattern, pathMatchesAny } from './policy.js';
31
32
  export { redact, countRedactions, buildRules } from './redact.js';
32
33
  export type { RedactionRule, RedactionResult } from './redact.js';
33
34
  export { ToolResultCache, buildCacheKey, cachedExecute } from './result-cache.js';
34
35
  export type { CacheKeyParts, CacheStats } from './result-cache.js';
35
- //# sourceMappingURL=index.d.ts.map
@@ -4,7 +4,8 @@ import { findReferencesTool } from './find-references.js';
4
4
  import { findSymbolTool } from './find-symbol.js';
5
5
  import { listFilesTool } from './list-files.js';
6
6
  import { listSymbolsTool } from './list-symbols.js';
7
- import { memoryReadTool, memoryWriteTool } from './memory.js';
7
+ import { memoryForgetTool, memoryReadTool, memoryWriteTool } from './memory.js';
8
+ import { editNotebookTool } from './notebook.js';
8
9
  import { readFileTool } from './read-file.js';
9
10
  import { readImageTool } from './read-image.js';
10
11
  import { runCommandTool } from './run-command.js';
@@ -27,14 +28,15 @@ export const BUILTIN_TOOLS = [
27
28
  findReferencesTool,
28
29
  writeFileTool,
29
30
  editFileTool,
31
+ editNotebookTool,
30
32
  runCommandTool,
31
33
  fetchUrlTool,
32
34
  memoryReadTool,
33
35
  memoryWriteTool,
36
+ memoryForgetTool,
34
37
  subAgentTool,
35
38
  ];
36
- export { editFileTool, fetchUrlTool, findReferencesTool, findSymbolTool, listFilesTool, listSymbolsTool, memoryReadTool, memoryWriteTool, readFileTool, readImageTool, runCommandTool, searchFilesTool, subAgentTool, writeFileTool, };
39
+ export { editFileTool, editNotebookTool, fetchUrlTool, findReferencesTool, findSymbolTool, listFilesTool, listSymbolsTool, memoryForgetTool, memoryReadTool, memoryWriteTool, readFileTool, readImageTool, runCommandTool, searchFilesTool, subAgentTool, writeFileTool, };
37
40
  export { checkPolicyViolation, globToRegex, mergeToolSandbox, normalizePathPattern, pathMatchesAny } from './policy.js';
38
41
  export { redact, countRedactions, buildRules } from './redact.js';
39
42
  export { ToolResultCache, buildCacheKey, cachedExecute } from './result-cache.js';
40
- //# sourceMappingURL=index.js.map