@isaacriehm/cairn 0.1.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 (562) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/backprop/id.d.ts +14 -0
  5. package/dist/backprop/id.js +40 -0
  6. package/dist/backprop/id.js.map +1 -0
  7. package/dist/backprop/index.d.ts +23 -0
  8. package/dist/backprop/index.js +21 -0
  9. package/dist/backprop/index.js.map +1 -0
  10. package/dist/backprop/prompt.d.ts +16 -0
  11. package/dist/backprop/prompt.js +101 -0
  12. package/dist/backprop/prompt.js.map +1 -0
  13. package/dist/backprop/runner.d.ts +18 -0
  14. package/dist/backprop/runner.js +95 -0
  15. package/dist/backprop/runner.js.map +1 -0
  16. package/dist/backprop/schema.d.ts +61 -0
  17. package/dist/backprop/schema.js +55 -0
  18. package/dist/backprop/schema.js.map +1 -0
  19. package/dist/backprop/types.d.ts +101 -0
  20. package/dist/backprop/types.js +24 -0
  21. package/dist/backprop/types.js.map +1 -0
  22. package/dist/backprop/writer.d.ts +27 -0
  23. package/dist/backprop/writer.js +301 -0
  24. package/dist/backprop/writer.js.map +1 -0
  25. package/dist/claude/error.d.ts +33 -0
  26. package/dist/claude/error.js +58 -0
  27. package/dist/claude/error.js.map +1 -0
  28. package/dist/claude/index.d.ts +3 -0
  29. package/dist/claude/index.js +3 -0
  30. package/dist/claude/index.js.map +1 -0
  31. package/dist/claude/runner.d.ts +11 -0
  32. package/dist/claude/runner.js +132 -0
  33. package/dist/claude/runner.js.map +1 -0
  34. package/dist/claude/types.d.ts +52 -0
  35. package/dist/claude/types.js +14 -0
  36. package/dist/claude/types.js.map +1 -0
  37. package/dist/cli/attention.d.ts +11 -0
  38. package/dist/cli/attention.js +234 -0
  39. package/dist/cli/attention.js.map +1 -0
  40. package/dist/cli/daemon.d.ts +54 -0
  41. package/dist/cli/daemon.js +351 -0
  42. package/dist/cli/daemon.js.map +1 -0
  43. package/dist/cli/doctor.d.ts +8 -0
  44. package/dist/cli/doctor.js +116 -0
  45. package/dist/cli/doctor.js.map +1 -0
  46. package/dist/cli/gc.d.ts +15 -0
  47. package/dist/cli/gc.js +139 -0
  48. package/dist/cli/gc.js.map +1 -0
  49. package/dist/cli/hook.d.ts +18 -0
  50. package/dist/cli/hook.js +57 -0
  51. package/dist/cli/hook.js.map +1 -0
  52. package/dist/cli/index.d.ts +2 -0
  53. package/dist/cli/index.js +127 -0
  54. package/dist/cli/index.js.map +1 -0
  55. package/dist/cli/init.d.ts +1 -0
  56. package/dist/cli/init.js +77 -0
  57. package/dist/cli/init.js.map +1 -0
  58. package/dist/cli/install.d.ts +52 -0
  59. package/dist/cli/install.js +308 -0
  60. package/dist/cli/install.js.map +1 -0
  61. package/dist/cli/join.d.ts +1 -0
  62. package/dist/cli/join.js +84 -0
  63. package/dist/cli/join.js.map +1 -0
  64. package/dist/cli/mcp.d.ts +1 -0
  65. package/dist/cli/mcp.js +62 -0
  66. package/dist/cli/mcp.js.map +1 -0
  67. package/dist/cli/mirror.d.ts +1 -0
  68. package/dist/cli/mirror.js +97 -0
  69. package/dist/cli/mirror.js.map +1 -0
  70. package/dist/cli/run.d.ts +1 -0
  71. package/dist/cli/run.js +174 -0
  72. package/dist/cli/run.js.map +1 -0
  73. package/dist/cli/scope.d.ts +8 -0
  74. package/dist/cli/scope.js +65 -0
  75. package/dist/cli/scope.js.map +1 -0
  76. package/dist/cli/task.d.ts +18 -0
  77. package/dist/cli/task.js +137 -0
  78. package/dist/cli/task.js.map +1 -0
  79. package/dist/cli/watch.d.ts +1 -0
  80. package/dist/cli/watch.js +73 -0
  81. package/dist/cli/watch.js.map +1 -0
  82. package/dist/decision-capture/capture.d.ts +57 -0
  83. package/dist/decision-capture/capture.js +186 -0
  84. package/dist/decision-capture/capture.js.map +1 -0
  85. package/dist/decision-capture/extractor.d.ts +20 -0
  86. package/dist/decision-capture/extractor.js +103 -0
  87. package/dist/decision-capture/extractor.js.map +1 -0
  88. package/dist/decision-capture/id.d.ts +14 -0
  89. package/dist/decision-capture/id.js +44 -0
  90. package/dist/decision-capture/id.js.map +1 -0
  91. package/dist/decision-capture/index.d.ts +25 -0
  92. package/dist/decision-capture/index.js +21 -0
  93. package/dist/decision-capture/index.js.map +1 -0
  94. package/dist/decision-capture/prompt.d.ts +15 -0
  95. package/dist/decision-capture/prompt.js +68 -0
  96. package/dist/decision-capture/prompt.js.map +1 -0
  97. package/dist/decision-capture/refinement-prompt.d.ts +25 -0
  98. package/dist/decision-capture/refinement-prompt.js +146 -0
  99. package/dist/decision-capture/refinement-prompt.js.map +1 -0
  100. package/dist/decision-capture/refinement-schema.d.ts +52 -0
  101. package/dist/decision-capture/refinement-schema.js +61 -0
  102. package/dist/decision-capture/refinement-schema.js.map +1 -0
  103. package/dist/decision-capture/refinement.d.ts +60 -0
  104. package/dist/decision-capture/refinement.js +439 -0
  105. package/dist/decision-capture/refinement.js.map +1 -0
  106. package/dist/decision-capture/schema.d.ts +70 -0
  107. package/dist/decision-capture/schema.js +71 -0
  108. package/dist/decision-capture/schema.js.map +1 -0
  109. package/dist/decision-capture/types.d.ts +201 -0
  110. package/dist/decision-capture/types.js +20 -0
  111. package/dist/decision-capture/types.js.map +1 -0
  112. package/dist/decision-capture/writer.d.ts +90 -0
  113. package/dist/decision-capture/writer.js +267 -0
  114. package/dist/decision-capture/writer.js.map +1 -0
  115. package/dist/frontend/discord/acl.d.ts +6 -0
  116. package/dist/frontend/discord/acl.js +19 -0
  117. package/dist/frontend/discord/acl.js.map +1 -0
  118. package/dist/frontend/discord/channels.d.ts +29 -0
  119. package/dist/frontend/discord/channels.js +58 -0
  120. package/dist/frontend/discord/channels.js.map +1 -0
  121. package/dist/frontend/discord/classifier.d.ts +16 -0
  122. package/dist/frontend/discord/classifier.js +29 -0
  123. package/dist/frontend/discord/classifier.js.map +1 -0
  124. package/dist/frontend/discord/index.d.ts +118 -0
  125. package/dist/frontend/discord/index.js +1104 -0
  126. package/dist/frontend/discord/index.js.map +1 -0
  127. package/dist/frontend/discord/slash.d.ts +18 -0
  128. package/dist/frontend/discord/slash.js +90 -0
  129. package/dist/frontend/discord/slash.js.map +1 -0
  130. package/dist/frontend/inbox.d.ts +17 -0
  131. package/dist/frontend/inbox.js +30 -0
  132. package/dist/frontend/inbox.js.map +1 -0
  133. package/dist/frontend/index.d.ts +8 -0
  134. package/dist/frontend/index.js +6 -0
  135. package/dist/frontend/index.js.map +1 -0
  136. package/dist/frontend/stub/index.d.ts +58 -0
  137. package/dist/frontend/stub/index.js +144 -0
  138. package/dist/frontend/stub/index.js.map +1 -0
  139. package/dist/frontend/types.d.ts +247 -0
  140. package/dist/frontend/types.js +15 -0
  141. package/dist/frontend/types.js.map +1 -0
  142. package/dist/gc/apply.d.ts +26 -0
  143. package/dist/gc/apply.js +48 -0
  144. package/dist/gc/apply.js.map +1 -0
  145. package/dist/gc/canary.d.ts +42 -0
  146. package/dist/gc/canary.js +134 -0
  147. package/dist/gc/canary.js.map +1 -0
  148. package/dist/gc/classify.d.ts +25 -0
  149. package/dist/gc/classify.js +89 -0
  150. package/dist/gc/classify.js.map +1 -0
  151. package/dist/gc/doc-gardening.d.ts +29 -0
  152. package/dist/gc/doc-gardening.js +146 -0
  153. package/dist/gc/doc-gardening.js.map +1 -0
  154. package/dist/gc/frontmatter.d.ts +35 -0
  155. package/dist/gc/frontmatter.js +111 -0
  156. package/dist/gc/frontmatter.js.map +1 -0
  157. package/dist/gc/generator-drift.d.ts +28 -0
  158. package/dist/gc/generator-drift.js +53 -0
  159. package/dist/gc/generator-drift.js.map +1 -0
  160. package/dist/gc/index.d.ts +35 -0
  161. package/dist/gc/index.js +26 -0
  162. package/dist/gc/index.js.map +1 -0
  163. package/dist/gc/quality-update.d.ts +23 -0
  164. package/dist/gc/quality-update.js +69 -0
  165. package/dist/gc/quality-update.js.map +1 -0
  166. package/dist/gc/stub-hits.d.ts +31 -0
  167. package/dist/gc/stub-hits.js +125 -0
  168. package/dist/gc/stub-hits.js.map +1 -0
  169. package/dist/gc/sweep.d.ts +56 -0
  170. package/dist/gc/sweep.js +178 -0
  171. package/dist/gc/sweep.js.map +1 -0
  172. package/dist/gc/types.d.ts +129 -0
  173. package/dist/gc/types.js +26 -0
  174. package/dist/gc/types.js.map +1 -0
  175. package/dist/ground/drift.d.ts +8 -0
  176. package/dist/ground/drift.js +23 -0
  177. package/dist/ground/drift.js.map +1 -0
  178. package/dist/ground/frontmatter.d.ts +20 -0
  179. package/dist/ground/frontmatter.js +49 -0
  180. package/dist/ground/frontmatter.js.map +1 -0
  181. package/dist/ground/glob.d.ts +10 -0
  182. package/dist/ground/glob.js +46 -0
  183. package/dist/ground/glob.js.map +1 -0
  184. package/dist/ground/index.d.ts +14 -0
  185. package/dist/ground/index.js +10 -0
  186. package/dist/ground/index.js.map +1 -0
  187. package/dist/ground/ledgers.d.ts +18 -0
  188. package/dist/ground/ledgers.js +103 -0
  189. package/dist/ground/ledgers.js.map +1 -0
  190. package/dist/ground/manifest.d.ts +10 -0
  191. package/dist/ground/manifest.js +88 -0
  192. package/dist/ground/manifest.js.map +1 -0
  193. package/dist/ground/paths.d.ts +20 -0
  194. package/dist/ground/paths.js +61 -0
  195. package/dist/ground/paths.js.map +1 -0
  196. package/dist/ground/quality-grades.d.ts +11 -0
  197. package/dist/ground/quality-grades.js +98 -0
  198. package/dist/ground/quality-grades.js.map +1 -0
  199. package/dist/ground/schemas.d.ts +306 -0
  200. package/dist/ground/schemas.js +188 -0
  201. package/dist/ground/schemas.js.map +1 -0
  202. package/dist/ground/walk.d.ts +7 -0
  203. package/dist/ground/walk.js +53 -0
  204. package/dist/ground/walk.js.map +1 -0
  205. package/dist/index.d.ts +8 -0
  206. package/dist/index.js +9 -0
  207. package/dist/index.js.map +1 -0
  208. package/dist/init/detect.d.ts +25 -0
  209. package/dist/init/detect.js +336 -0
  210. package/dist/init/detect.js.map +1 -0
  211. package/dist/init/index.d.ts +14 -0
  212. package/dist/init/index.js +9 -0
  213. package/dist/init/index.js.map +1 -0
  214. package/dist/init/init.d.ts +68 -0
  215. package/dist/init/init.js +673 -0
  216. package/dist/init/init.js.map +1 -0
  217. package/dist/init/mapper.d.ts +160 -0
  218. package/dist/init/mapper.js +248 -0
  219. package/dist/init/mapper.js.map +1 -0
  220. package/dist/init/prompts.d.ts +70 -0
  221. package/dist/init/prompts.js +80 -0
  222. package/dist/init/prompts.js.map +1 -0
  223. package/dist/init/secrets.d.ts +18 -0
  224. package/dist/init/secrets.js +76 -0
  225. package/dist/init/secrets.js.map +1 -0
  226. package/dist/init/seed.d.ts +21 -0
  227. package/dist/init/seed.js +75 -0
  228. package/dist/init/seed.js.map +1 -0
  229. package/dist/init/setup-runners.d.ts +17 -0
  230. package/dist/init/setup-runners.js +70 -0
  231. package/dist/init/setup-runners.js.map +1 -0
  232. package/dist/init/types.d.ts +59 -0
  233. package/dist/init/types.js +10 -0
  234. package/dist/init/types.js.map +1 -0
  235. package/dist/init/walker.d.ts +53 -0
  236. package/dist/init/walker.js +460 -0
  237. package/dist/init/walker.js.map +1 -0
  238. package/dist/init/workflow-block.d.ts +34 -0
  239. package/dist/init/workflow-block.js +110 -0
  240. package/dist/init/workflow-block.js.map +1 -0
  241. package/dist/logger.d.ts +3 -0
  242. package/dist/logger.js +23 -0
  243. package/dist/logger.js.map +1 -0
  244. package/dist/mcp/context.d.ts +16 -0
  245. package/dist/mcp/context.js +8 -0
  246. package/dist/mcp/context.js.map +1 -0
  247. package/dist/mcp/errors.d.ts +17 -0
  248. package/dist/mcp/errors.js +23 -0
  249. package/dist/mcp/errors.js.map +1 -0
  250. package/dist/mcp/index.d.ts +10 -0
  251. package/dist/mcp/index.js +7 -0
  252. package/dist/mcp/index.js.map +1 -0
  253. package/dist/mcp/path-allowlist.d.ts +25 -0
  254. package/dist/mcp/path-allowlist.js +66 -0
  255. package/dist/mcp/path-allowlist.js.map +1 -0
  256. package/dist/mcp/result.d.ts +8 -0
  257. package/dist/mcp/result.js +18 -0
  258. package/dist/mcp/result.js.map +1 -0
  259. package/dist/mcp/schemas.d.ts +153 -0
  260. package/dist/mcp/schemas.js +135 -0
  261. package/dist/mcp/schemas.js.map +1 -0
  262. package/dist/mcp/server.d.ts +11 -0
  263. package/dist/mcp/server.js +58 -0
  264. package/dist/mcp/server.js.map +1 -0
  265. package/dist/mcp/telemetry.d.ts +15 -0
  266. package/dist/mcp/telemetry.js +13 -0
  267. package/dist/mcp/telemetry.js.map +1 -0
  268. package/dist/mcp/tools/append.d.ts +8 -0
  269. package/dist/mcp/tools/append.js +33 -0
  270. package/dist/mcp/tools/append.js.map +1 -0
  271. package/dist/mcp/tools/archive.d.ts +8 -0
  272. package/dist/mcp/tools/archive.js +49 -0
  273. package/dist/mcp/tools/archive.js.map +1 -0
  274. package/dist/mcp/tools/ask-operator.d.ts +34 -0
  275. package/dist/mcp/tools/ask-operator.js +93 -0
  276. package/dist/mcp/tools/ask-operator.js.map +1 -0
  277. package/dist/mcp/tools/canonical-for-topic.d.ts +6 -0
  278. package/dist/mcp/tools/canonical-for-topic.js +40 -0
  279. package/dist/mcp/tools/canonical-for-topic.js.map +1 -0
  280. package/dist/mcp/tools/decision-get.d.ts +6 -0
  281. package/dist/mcp/tools/decision-get.js +49 -0
  282. package/dist/mcp/tools/decision-get.js.map +1 -0
  283. package/dist/mcp/tools/decisions-for-symbol.d.ts +7 -0
  284. package/dist/mcp/tools/decisions-for-symbol.js +42 -0
  285. package/dist/mcp/tools/decisions-for-symbol.js.map +1 -0
  286. package/dist/mcp/tools/decisions-in-scope.d.ts +7 -0
  287. package/dist/mcp/tools/decisions-in-scope.js +47 -0
  288. package/dist/mcp/tools/decisions-in-scope.js.map +1 -0
  289. package/dist/mcp/tools/drop-task.d.ts +12 -0
  290. package/dist/mcp/tools/drop-task.js +47 -0
  291. package/dist/mcp/tools/drop-task.js.map +1 -0
  292. package/dist/mcp/tools/get-full.d.ts +7 -0
  293. package/dist/mcp/tools/get-full.js +46 -0
  294. package/dist/mcp/tools/get-full.js.map +1 -0
  295. package/dist/mcp/tools/ground-get.d.ts +7 -0
  296. package/dist/mcp/tools/ground-get.js +80 -0
  297. package/dist/mcp/tools/ground-get.js.map +1 -0
  298. package/dist/mcp/tools/index.d.ts +3 -0
  299. package/dist/mcp/tools/index.js +44 -0
  300. package/dist/mcp/tools/index.js.map +1 -0
  301. package/dist/mcp/tools/invariant-get.d.ts +6 -0
  302. package/dist/mcp/tools/invariant-get.js +49 -0
  303. package/dist/mcp/tools/invariant-get.js.map +1 -0
  304. package/dist/mcp/tools/invariants-in-scope.d.ts +7 -0
  305. package/dist/mcp/tools/invariants-in-scope.js +65 -0
  306. package/dist/mcp/tools/invariants-in-scope.js.map +1 -0
  307. package/dist/mcp/tools/query-history.d.ts +9 -0
  308. package/dist/mcp/tools/query-history.js +33 -0
  309. package/dist/mcp/tools/query-history.js.map +1 -0
  310. package/dist/mcp/tools/record-decision.d.ts +14 -0
  311. package/dist/mcp/tools/record-decision.js +101 -0
  312. package/dist/mcp/tools/record-decision.js.map +1 -0
  313. package/dist/mcp/tools/record-run-event.d.ts +10 -0
  314. package/dist/mcp/tools/record-run-event.js +28 -0
  315. package/dist/mcp/tools/record-run-event.js.map +1 -0
  316. package/dist/mcp/tools/search.d.ts +9 -0
  317. package/dist/mcp/tools/search.js +165 -0
  318. package/dist/mcp/tools/search.js.map +1 -0
  319. package/dist/mcp/tools/supersedes-chain.d.ts +6 -0
  320. package/dist/mcp/tools/supersedes-chain.js +66 -0
  321. package/dist/mcp/tools/supersedes-chain.js.map +1 -0
  322. package/dist/mcp/tools/timeline.d.ts +9 -0
  323. package/dist/mcp/tools/timeline.js +65 -0
  324. package/dist/mcp/tools/timeline.js.map +1 -0
  325. package/dist/mcp/tools/types.d.ts +9 -0
  326. package/dist/mcp/tools/types.js +2 -0
  327. package/dist/mcp/tools/types.js.map +1 -0
  328. package/dist/mirror/clone.d.ts +6 -0
  329. package/dist/mirror/clone.js +48 -0
  330. package/dist/mirror/clone.js.map +1 -0
  331. package/dist/mirror/dirty-overlap.d.ts +13 -0
  332. package/dist/mirror/dirty-overlap.js +77 -0
  333. package/dist/mirror/dirty-overlap.js.map +1 -0
  334. package/dist/mirror/index.d.ts +7 -0
  335. package/dist/mirror/index.js +7 -0
  336. package/dist/mirror/index.js.map +1 -0
  337. package/dist/mirror/paths.d.ts +18 -0
  338. package/dist/mirror/paths.js +45 -0
  339. package/dist/mirror/paths.js.map +1 -0
  340. package/dist/mirror/push.d.ts +9 -0
  341. package/dist/mirror/push.js +27 -0
  342. package/dist/mirror/push.js.map +1 -0
  343. package/dist/mirror/state.d.ts +4 -0
  344. package/dist/mirror/state.js +36 -0
  345. package/dist/mirror/state.js.map +1 -0
  346. package/dist/mirror/sync.d.ts +9 -0
  347. package/dist/mirror/sync.js +33 -0
  348. package/dist/mirror/sync.js.map +1 -0
  349. package/dist/mirror/types.d.ts +77 -0
  350. package/dist/mirror/types.js +2 -0
  351. package/dist/mirror/types.js.map +1 -0
  352. package/dist/orchestrator/activity-summarizer.d.ts +33 -0
  353. package/dist/orchestrator/activity-summarizer.js +120 -0
  354. package/dist/orchestrator/activity-summarizer.js.map +1 -0
  355. package/dist/orchestrator/inbox.d.ts +78 -0
  356. package/dist/orchestrator/inbox.js +115 -0
  357. package/dist/orchestrator/inbox.js.map +1 -0
  358. package/dist/orchestrator/index.d.ts +9 -0
  359. package/dist/orchestrator/index.js +7 -0
  360. package/dist/orchestrator/index.js.map +1 -0
  361. package/dist/orchestrator/orchestrator.d.ts +154 -0
  362. package/dist/orchestrator/orchestrator.js +2437 -0
  363. package/dist/orchestrator/orchestrator.js.map +1 -0
  364. package/dist/orchestrator/prompt.d.ts +19 -0
  365. package/dist/orchestrator/prompt.js +50 -0
  366. package/dist/orchestrator/prompt.js.map +1 -0
  367. package/dist/orchestrator/queue.d.ts +21 -0
  368. package/dist/orchestrator/queue.js +80 -0
  369. package/dist/orchestrator/queue.js.map +1 -0
  370. package/dist/orchestrator/run-log.d.ts +53 -0
  371. package/dist/orchestrator/run-log.js +92 -0
  372. package/dist/orchestrator/run-log.js.map +1 -0
  373. package/dist/orchestrator/runner.d.ts +56 -0
  374. package/dist/orchestrator/runner.js +172 -0
  375. package/dist/orchestrator/runner.js.map +1 -0
  376. package/dist/orchestrator/tool-digest.d.ts +35 -0
  377. package/dist/orchestrator/tool-digest.js +116 -0
  378. package/dist/orchestrator/tool-digest.js.map +1 -0
  379. package/dist/orchestrator/types.d.ts +263 -0
  380. package/dist/orchestrator/types.js +2 -0
  381. package/dist/orchestrator/types.js.map +1 -0
  382. package/dist/orchestrator/workspace.d.ts +21 -0
  383. package/dist/orchestrator/workspace.js +31 -0
  384. package/dist/orchestrator/workspace.js.map +1 -0
  385. package/dist/profiles/index.d.ts +3 -0
  386. package/dist/profiles/index.js +3 -0
  387. package/dist/profiles/index.js.map +1 -0
  388. package/dist/profiles/registry.d.ts +5 -0
  389. package/dist/profiles/registry.js +31 -0
  390. package/dist/profiles/registry.js.map +1 -0
  391. package/dist/profiles/types.d.ts +48 -0
  392. package/dist/profiles/types.js +11 -0
  393. package/dist/profiles/types.js.map +1 -0
  394. package/dist/profiles/unknown.d.ts +9 -0
  395. package/dist/profiles/unknown.js +17 -0
  396. package/dist/profiles/unknown.js.map +1 -0
  397. package/dist/reviewer/index.d.ts +6 -0
  398. package/dist/reviewer/index.js +5 -0
  399. package/dist/reviewer/index.js.map +1 -0
  400. package/dist/reviewer/prompt.d.ts +11 -0
  401. package/dist/reviewer/prompt.js +132 -0
  402. package/dist/reviewer/prompt.js.map +1 -0
  403. package/dist/reviewer/remediation.d.ts +15 -0
  404. package/dist/reviewer/remediation.js +61 -0
  405. package/dist/reviewer/remediation.js.map +1 -0
  406. package/dist/reviewer/reviewer.d.ts +9 -0
  407. package/dist/reviewer/reviewer.js +89 -0
  408. package/dist/reviewer/reviewer.js.map +1 -0
  409. package/dist/reviewer/schema.d.ts +45 -0
  410. package/dist/reviewer/schema.js +43 -0
  411. package/dist/reviewer/schema.js.map +1 -0
  412. package/dist/reviewer/types.d.ts +74 -0
  413. package/dist/reviewer/types.js +14 -0
  414. package/dist/reviewer/types.js.map +1 -0
  415. package/dist/sensors/attestation.d.ts +44 -0
  416. package/dist/sensors/attestation.js +262 -0
  417. package/dist/sensors/attestation.js.map +1 -0
  418. package/dist/sensors/catalog.d.ts +41 -0
  419. package/dist/sensors/catalog.js +123 -0
  420. package/dist/sensors/catalog.js.map +1 -0
  421. package/dist/sensors/decisions.d.ts +30 -0
  422. package/dist/sensors/decisions.js +393 -0
  423. package/dist/sensors/decisions.js.map +1 -0
  424. package/dist/sensors/diff.d.ts +27 -0
  425. package/dist/sensors/diff.js +148 -0
  426. package/dist/sensors/diff.js.map +1 -0
  427. package/dist/sensors/index.d.ts +13 -0
  428. package/dist/sensors/index.js +9 -0
  429. package/dist/sensors/index.js.map +1 -0
  430. package/dist/sensors/remediation.d.ts +20 -0
  431. package/dist/sensors/remediation.js +65 -0
  432. package/dist/sensors/remediation.js.map +1 -0
  433. package/dist/sensors/runner.d.ts +44 -0
  434. package/dist/sensors/runner.js +95 -0
  435. package/dist/sensors/runner.js.map +1 -0
  436. package/dist/sensors/structural.d.ts +30 -0
  437. package/dist/sensors/structural.js +204 -0
  438. package/dist/sensors/structural.js.map +1 -0
  439. package/dist/sensors/stub-catalog.d.ts +39 -0
  440. package/dist/sensors/stub-catalog.js +115 -0
  441. package/dist/sensors/stub-catalog.js.map +1 -0
  442. package/dist/sensors/types.d.ts +135 -0
  443. package/dist/sensors/types.js +14 -0
  444. package/dist/sensors/types.js.map +1 -0
  445. package/dist/tier0/classify.d.ts +5 -0
  446. package/dist/tier0/classify.js +91 -0
  447. package/dist/tier0/classify.js.map +1 -0
  448. package/dist/tier0/index.d.ts +3 -0
  449. package/dist/tier0/index.js +3 -0
  450. package/dist/tier0/index.js.map +1 -0
  451. package/dist/tier0/ollama.d.ts +22 -0
  452. package/dist/tier0/ollama.js +63 -0
  453. package/dist/tier0/ollama.js.map +1 -0
  454. package/dist/tier0/types.d.ts +24 -0
  455. package/dist/tier0/types.js +7 -0
  456. package/dist/tier0/types.js.map +1 -0
  457. package/dist/tightener/index.d.ts +4 -0
  458. package/dist/tightener/index.js +4 -0
  459. package/dist/tightener/index.js.map +1 -0
  460. package/dist/tightener/prompt.d.ts +3 -0
  461. package/dist/tightener/prompt.js +67 -0
  462. package/dist/tightener/prompt.js.map +1 -0
  463. package/dist/tightener/schema.d.ts +68 -0
  464. package/dist/tightener/schema.js +44 -0
  465. package/dist/tightener/schema.js.map +1 -0
  466. package/dist/tightener/tighten.d.ts +2 -0
  467. package/dist/tightener/tighten.js +66 -0
  468. package/dist/tightener/tighten.js.map +1 -0
  469. package/dist/tightener/types.d.ts +74 -0
  470. package/dist/tightener/types.js +6 -0
  471. package/dist/tightener/types.js.map +1 -0
  472. package/dist/uat/bundle.d.ts +68 -0
  473. package/dist/uat/bundle.js +168 -0
  474. package/dist/uat/bundle.js.map +1 -0
  475. package/dist/uat/index.d.ts +15 -0
  476. package/dist/uat/index.js +10 -0
  477. package/dist/uat/index.js.map +1 -0
  478. package/dist/uat/persistent.d.ts +64 -0
  479. package/dist/uat/persistent.js +206 -0
  480. package/dist/uat/persistent.js.map +1 -0
  481. package/dist/uat/probes/cli.d.ts +11 -0
  482. package/dist/uat/probes/cli.js +107 -0
  483. package/dist/uat/probes/cli.js.map +1 -0
  484. package/dist/uat/probes/http.d.ts +12 -0
  485. package/dist/uat/probes/http.js +139 -0
  486. package/dist/uat/probes/http.js.map +1 -0
  487. package/dist/uat/probes/index.d.ts +21 -0
  488. package/dist/uat/probes/index.js +30 -0
  489. package/dist/uat/probes/index.js.map +1 -0
  490. package/dist/uat/probes/integration.d.ts +18 -0
  491. package/dist/uat/probes/integration.js +188 -0
  492. package/dist/uat/probes/integration.js.map +1 -0
  493. package/dist/uat/probes/sql/config.d.ts +14 -0
  494. package/dist/uat/probes/sql/config.js +57 -0
  495. package/dist/uat/probes/sql/config.js.map +1 -0
  496. package/dist/uat/probes/sql/index.d.ts +29 -0
  497. package/dist/uat/probes/sql/index.js +43 -0
  498. package/dist/uat/probes/sql/index.js.map +1 -0
  499. package/dist/uat/probes/sql/mysql.d.ts +12 -0
  500. package/dist/uat/probes/sql/mysql.js +96 -0
  501. package/dist/uat/probes/sql/mysql.js.map +1 -0
  502. package/dist/uat/probes/sql/pg.d.ts +20 -0
  503. package/dist/uat/probes/sql/pg.js +102 -0
  504. package/dist/uat/probes/sql/pg.js.map +1 -0
  505. package/dist/uat/probes/sql/sqlite.d.ts +9 -0
  506. package/dist/uat/probes/sql/sqlite.js +58 -0
  507. package/dist/uat/probes/sql/sqlite.js.map +1 -0
  508. package/dist/uat/probes/sql/types.d.ts +46 -0
  509. package/dist/uat/probes/sql/types.js +10 -0
  510. package/dist/uat/probes/sql/types.js.map +1 -0
  511. package/dist/uat/probes/sql.d.ts +9 -0
  512. package/dist/uat/probes/sql.js +119 -0
  513. package/dist/uat/probes/sql.js.map +1 -0
  514. package/dist/uat/probes/ui.d.ts +19 -0
  515. package/dist/uat/probes/ui.js +244 -0
  516. package/dist/uat/probes/ui.js.map +1 -0
  517. package/dist/uat/prompt.d.ts +10 -0
  518. package/dist/uat/prompt.js +85 -0
  519. package/dist/uat/prompt.js.map +1 -0
  520. package/dist/uat/question.d.ts +50 -0
  521. package/dist/uat/question.js +139 -0
  522. package/dist/uat/question.js.map +1 -0
  523. package/dist/uat/rejection.d.ts +58 -0
  524. package/dist/uat/rejection.js +163 -0
  525. package/dist/uat/rejection.js.map +1 -0
  526. package/dist/uat/runner.d.ts +6 -0
  527. package/dist/uat/runner.js +96 -0
  528. package/dist/uat/runner.js.map +1 -0
  529. package/dist/uat/schema.d.ts +322 -0
  530. package/dist/uat/schema.js +189 -0
  531. package/dist/uat/schema.js.map +1 -0
  532. package/dist/uat/types.d.ts +268 -0
  533. package/dist/uat/types.js +18 -0
  534. package/dist/uat/types.js.map +1 -0
  535. package/dist/uat/uat.d.ts +89 -0
  536. package/dist/uat/uat.js +256 -0
  537. package/dist/uat/uat.js.map +1 -0
  538. package/dist/voice/index.d.ts +4 -0
  539. package/dist/voice/index.js +4 -0
  540. package/dist/voice/index.js.map +1 -0
  541. package/dist/voice/model.d.ts +23 -0
  542. package/dist/voice/model.js +46 -0
  543. package/dist/voice/model.js.map +1 -0
  544. package/dist/voice/pipe.d.ts +9 -0
  545. package/dist/voice/pipe.js +47 -0
  546. package/dist/voice/pipe.js.map +1 -0
  547. package/dist/voice/transcribe.d.ts +3 -0
  548. package/dist/voice/transcribe.js +43 -0
  549. package/dist/voice/transcribe.js.map +1 -0
  550. package/dist/voice/types.d.ts +26 -0
  551. package/dist/voice/types.js +9 -0
  552. package/dist/voice/types.js.map +1 -0
  553. package/dist/watch/daemon.d.ts +21 -0
  554. package/dist/watch/daemon.js +143 -0
  555. package/dist/watch/daemon.js.map +1 -0
  556. package/dist/watch/index.d.ts +4 -0
  557. package/dist/watch/index.js +3 -0
  558. package/dist/watch/index.js.map +1 -0
  559. package/dist/watch/regenerate.d.ts +25 -0
  560. package/dist/watch/regenerate.js +51 -0
  561. package/dist/watch/regenerate.js.map +1 -0
  562. package/package.json +75 -0
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Frontend adapter contract per `docs/WORKFLOW_GUIDE.md` §0.1.
3
+ *
4
+ * The orchestrator + grounding daemon + MCP server are frontend-agnostic.
5
+ * The operator console is a swappable adapter that consumes a uniform
6
+ * task/run/UAT bundle and renders/listens via its native primitive.
7
+ *
8
+ * Adapters live in `harness/src/frontend/<name>/`. Each implements
9
+ * `FrontendAdapter`. The `harness run --frontend <name>` CLI loads + starts
10
+ * registered adapters; on operator events, adapters drop normalized JSON rows
11
+ * to `.harness/inbox/<ts>-<source>-<slug>.json`. The orchestrator (Phase 8)
12
+ * picks them up. Phase 5 lands ingress-only — no orchestrator yet.
13
+ */
14
+ export type NotifyLevel = "info" | "warn" | "error";
15
+ /**
16
+ * A normalized inbox entry kind. Adapters drop one of these to
17
+ * `.harness/inbox/`. The orchestrator multiplexes on `kind`.
18
+ */
19
+ export type InboxKind = "task" | "slash" | "free_text" | "voice" | "interaction";
20
+ export interface FrontendTask {
21
+ source: string;
22
+ intent: string;
23
+ rawText: string;
24
+ authorId: string;
25
+ channelId?: string;
26
+ guildId?: string;
27
+ messageId?: string;
28
+ receivedAt: string;
29
+ }
30
+ export interface VoiceMessage {
31
+ source: string;
32
+ attachmentUrl: string;
33
+ mime?: string;
34
+ authorId: string;
35
+ channelId: string;
36
+ guildId?: string;
37
+ messageId: string;
38
+ receivedAt: string;
39
+ }
40
+ export interface SlashEvent {
41
+ source: string;
42
+ command: string;
43
+ options: Record<string, string | number | boolean>;
44
+ authorId: string;
45
+ channelId?: string;
46
+ guildId?: string;
47
+ messageId?: string;
48
+ receivedAt: string;
49
+ }
50
+ export interface FreeTextEvent {
51
+ source: string;
52
+ intent: string;
53
+ rawText: string;
54
+ authorId: string;
55
+ channelId?: string;
56
+ guildId?: string;
57
+ messageId?: string;
58
+ receivedAt: string;
59
+ }
60
+ export interface InteractionEvent {
61
+ source: string;
62
+ bundleId: string;
63
+ choiceId: string;
64
+ freeText?: string;
65
+ authorId: string;
66
+ channelId?: string;
67
+ guildId?: string;
68
+ messageId?: string;
69
+ receivedAt: string;
70
+ }
71
+ export interface DialogChoice {
72
+ /** Stable id ("a" | "b" | ... | "e_other"). */
73
+ id: string;
74
+ label: string;
75
+ }
76
+ export interface DialogSpec {
77
+ /** Origin run / task id used to correlate adapter responses. */
78
+ bundleId: string;
79
+ prompt: string;
80
+ /**
81
+ * 2-5 choices. Last MUST be `E) Other` per WORKFLOW_GUIDE §1.4.
82
+ * If more than 4 orthogonal questions arise, caller MUST collapse to a
83
+ * single tightened-spec proposal per §1.0 (cap = 2 questions/turn).
84
+ */
85
+ choices: DialogChoice[];
86
+ channelId?: string;
87
+ timeoutMs?: number;
88
+ /**
89
+ * When true, ping the channel's authorized operators (Discord
90
+ * `<@id>` mentions for `DISCORD_OWNER_USER_IDS`) so they get a
91
+ * mobile push. Used for agent-initiated `harness_ask_operator` so
92
+ * the operator notices the run is paused. Routine confirmations
93
+ * (per-question walks, e2e setup) leave this false to avoid noise.
94
+ */
95
+ pingOperators?: boolean;
96
+ /**
97
+ * §3.4 win 1 — multi-step walks (per-question tightener resolution,
98
+ * /oops branches) edit one message in place instead of posting N+1
99
+ * messages. Set this to the previous step's `bundleId`; the adapter
100
+ * looks it up in its dialog-message map and edits that message
101
+ * (same channel, new prompt + buttons). When the bundleId is
102
+ * unknown (gone, never registered) the adapter falls back to a
103
+ * fresh send.
104
+ */
105
+ replaceBundleId?: string;
106
+ /**
107
+ * Terminal-dialog flag. When true (default), the adapter compacts
108
+ * the message on click — strips buttons, appends an "Answered" line
109
+ * — so the channel scrollback shows what was chosen. Walk steps
110
+ * that intend to be replaced by a follow-on dialog (per-Q tightener)
111
+ * MUST pass false: otherwise the compaction race-edits the message
112
+ * the next step is about to overwrite, and either the answer
113
+ * annotation or the next prompt loses depending on REST ordering.
114
+ * Adapter still fires `deferUpdate` so the click acknowledges.
115
+ */
116
+ compactOnAnswer?: boolean;
117
+ }
118
+ export interface DialogResponse {
119
+ bundleId: string;
120
+ choiceId: string;
121
+ /** Populated only when `choiceId` is the `E) Other` option. */
122
+ freeText?: string;
123
+ timedOut?: boolean;
124
+ }
125
+ export interface ApprovalArtifact {
126
+ kind: "gif" | "screenshot" | "table" | "diff" | "log" | "url" | "text";
127
+ label?: string;
128
+ path?: string;
129
+ url?: string;
130
+ content?: string;
131
+ }
132
+ export interface ApprovalBundle {
133
+ bundleId: string;
134
+ runId: string;
135
+ taskId?: string;
136
+ goal: string;
137
+ diffSummary?: string;
138
+ acceptance?: {
139
+ id: string;
140
+ status: "pass" | "fail" | "pending";
141
+ note?: string;
142
+ }[];
143
+ artifacts?: ApprovalArtifact[];
144
+ channelId?: string;
145
+ timeoutMs?: number;
146
+ }
147
+ export interface Approval {
148
+ bundleId: string;
149
+ decision: "approve" | "reject" | "ask";
150
+ reason?: string;
151
+ timedOut?: boolean;
152
+ }
153
+ export interface PostUpdate {
154
+ taskId: string;
155
+ runId?: string;
156
+ status: string;
157
+ /**
158
+ * Free-form body. ≤1024 chars renders as inline embed `details` field
159
+ * (§3.3 win 3 — drops the live-status + content-message split). >1024
160
+ * chars falls back to the chunked secondary-embed path.
161
+ */
162
+ body?: string;
163
+ /**
164
+ * Original task spec (the operator's verbatim ask). Replaces the
165
+ * standalone `🆕 Task` drop card — the body lives on the same live
166
+ * status embed as everything else, so the channel only ever shows
167
+ * one self-updating message per task. Truncated at 1024 chars.
168
+ */
169
+ taskBody?: string;
170
+ channelId?: string;
171
+ /**
172
+ * Tier-0 (Ollama) summary of what the agent is doing right now —
173
+ * one-line, present-progressive ("Reading core/src/X", "Editing
174
+ * platform/Y"). Surfaces inside the live status embed so the
175
+ * operator sees ongoing activity instead of a static "running" badge.
176
+ * Set on a throttled cadence by the orchestrator during the
177
+ * implementer phase.
178
+ */
179
+ activity?: string;
180
+ /**
181
+ * Second-source visibility (§3.3 win 2) — extracted from claude
182
+ * stream-json events. Independent of Ollama; renders even when the
183
+ * Tier-0 summary fails. Each list capped + deduped at the source.
184
+ */
185
+ tools?: {
186
+ files?: string[];
187
+ bash?: string[];
188
+ searches?: string[];
189
+ };
190
+ /**
191
+ * Curated narrative tail from `.harness/runs/active/<run_id>/log.jsonl`
192
+ * (§3.3 win 1) — last N transitions, pre-formatted. Renders inside the
193
+ * live status embed's description so operator sees actual progress
194
+ * instead of a static "phase: running" line.
195
+ */
196
+ recentEvents?: string[];
197
+ /**
198
+ * §3.4 win 3 — when status === "failed", the orchestrator classifies
199
+ * which gate eject the run so the embed renders class-colored title +
200
+ * emoji. Operator can route differently per class.
201
+ */
202
+ failureClass?: "sensor" | "reviewer" | "uat" | "hard" | "halt";
203
+ /**
204
+ * §3.4 win 2 — failure remediation guidance surfaced as a dedicated
205
+ * embed field. `reason` is a one-liner; `suggestedActions` are the
206
+ * operator's next moves (`/ship-anyway`, re-submit, open thread).
207
+ */
208
+ remediation?: {
209
+ reason: string;
210
+ suggestedActions: string[];
211
+ };
212
+ }
213
+ export type IngestHandler<T> = (item: T) => void | Promise<void>;
214
+ export interface FrontendAdapter {
215
+ readonly name: string;
216
+ /** Connects, registers commands, prepares to ingest events. */
217
+ start(): Promise<void>;
218
+ /** Disconnects + cleans up. Idempotent. */
219
+ stop(): Promise<void>;
220
+ onTask(handler: IngestHandler<FrontendTask>): void;
221
+ onVoice(handler: IngestHandler<VoiceMessage>): void;
222
+ onSlash(handler: IngestHandler<SlashEvent>): void;
223
+ onFreeText(handler: IngestHandler<FreeTextEvent>): void;
224
+ onInteraction(handler: IngestHandler<InteractionEvent>): void;
225
+ postTaskUpdate(update: PostUpdate): Promise<void>;
226
+ requestApproval(bundle: ApprovalBundle): Promise<Approval>;
227
+ requestDialog(spec: DialogSpec): Promise<DialogResponse>;
228
+ notify(level: NotifyLevel, message: string): Promise<void>;
229
+ /**
230
+ * Show "typing" / activity indicator on the given channel until the
231
+ * returned stop fn is called. Adapters that don't support a native
232
+ * typing indicator (CLI, stub) should no-op. Discord refreshes every
233
+ * ~8 seconds since the native indicator decays after 10s.
234
+ */
235
+ startTyping?(channelId: string): () => void;
236
+ /**
237
+ * Pre-flight check: is this channel still reachable + writable?
238
+ * Adapters that can answer (Discord) MUST return false when the
239
+ * channel has been deleted or the bot lacks access. The orchestrator
240
+ * uses this to skip dispatching a queued task whose per-task channel
241
+ * is gone — typical when the operator deletes a stale `🟢 active`
242
+ * channel between runs and the queue shadow restored the entry.
243
+ * Adapters without channels (CLI / stub) should leave this undefined;
244
+ * the orchestrator treats undefined as "always alive."
245
+ */
246
+ isChannelAlive?(channelId: string): Promise<boolean>;
247
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Frontend adapter contract per `docs/WORKFLOW_GUIDE.md` §0.1.
3
+ *
4
+ * The orchestrator + grounding daemon + MCP server are frontend-agnostic.
5
+ * The operator console is a swappable adapter that consumes a uniform
6
+ * task/run/UAT bundle and renders/listens via its native primitive.
7
+ *
8
+ * Adapters live in `harness/src/frontend/<name>/`. Each implements
9
+ * `FrontendAdapter`. The `harness run --frontend <name>` CLI loads + starts
10
+ * registered adapters; on operator events, adapters drop normalized JSON rows
11
+ * to `.harness/inbox/<ts>-<source>-<slug>.json`. The orchestrator (Phase 8)
12
+ * picks them up. Phase 5 lands ingress-only — no orchestrator yet.
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/frontend/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Apply a single GcCommitProposal to the mirror checkout: write the patch
3
+ * files, run `git add` + `git commit`, return the resulting SHA.
4
+ *
5
+ * The caller is responsible for filtering proposals by `class` (only safe is
6
+ * auto-applied in v1; code / high-stakes are surfaced for confirm).
7
+ *
8
+ * No push happens here — the GC sweep + canary verification + push policy is
9
+ * orchestrated by `runGcBatch` (sweep.ts).
10
+ */
11
+ import type { GcCommitProposal } from "./types.js";
12
+ export interface ApplyCommitOptions {
13
+ repoRoot: string;
14
+ proposal: GcCommitProposal;
15
+ /** Override the commit author (smoke convenience). */
16
+ author?: {
17
+ name: string;
18
+ email: string;
19
+ };
20
+ }
21
+ export interface ApplyCommitResult {
22
+ commit_sha: string;
23
+ paths_written: string[];
24
+ paths_deleted: string[];
25
+ }
26
+ export declare function applyCommit(opts: ApplyCommitOptions): Promise<ApplyCommitResult>;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Apply a single GcCommitProposal to the mirror checkout: write the patch
3
+ * files, run `git add` + `git commit`, return the resulting SHA.
4
+ *
5
+ * The caller is responsible for filtering proposals by `class` (only safe is
6
+ * auto-applied in v1; code / high-stakes are surfaced for confirm).
7
+ *
8
+ * No push happens here — the GC sweep + canary verification + push policy is
9
+ * orchestrated by `runGcBatch` (sweep.ts).
10
+ */
11
+ import { mkdirSync, rmSync, writeFileSync } from "node:fs";
12
+ import { dirname, resolve } from "node:path";
13
+ import { simpleGit } from "simple-git";
14
+ export async function applyCommit(opts) {
15
+ const written = [];
16
+ const deleted = [];
17
+ for (const [rel, content] of Object.entries(opts.proposal.patch)) {
18
+ const abs = resolve(opts.repoRoot, rel);
19
+ if (content === "") {
20
+ try {
21
+ rmSync(abs, { force: true });
22
+ deleted.push(rel);
23
+ }
24
+ catch {
25
+ // file may not exist; ignore
26
+ }
27
+ }
28
+ else {
29
+ mkdirSync(dirname(abs), { recursive: true });
30
+ writeFileSync(abs, content, "utf8");
31
+ written.push(rel);
32
+ }
33
+ }
34
+ const git = simpleGit({ baseDir: opts.repoRoot });
35
+ if (opts.author !== undefined) {
36
+ await git.addConfig("user.name", opts.author.name, false, "local");
37
+ await git.addConfig("user.email", opts.author.email, false, "local");
38
+ }
39
+ await git.add(opts.proposal.paths);
40
+ await git.commit(opts.proposal.commit_message);
41
+ const sha = (await git.revparse(["HEAD"])).trim();
42
+ return {
43
+ commit_sha: sha,
44
+ paths_written: written,
45
+ paths_deleted: deleted,
46
+ };
47
+ }
48
+ //# sourceMappingURL=apply.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/gc/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAgBvC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAwB;IACxD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,KAAK,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KA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I,EAAE,CAAC;IAElD,OAAO;QACL,UAAU,EAAE,GAAG;QACf,aAAa,EAAE,OAAO;QACtB,aAAa,EAAE,OAAO;KACvB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Batch canary — verifies a multi-commit GC batch hasn't broken anything that
3
+ * shows only when the commits are taken together. Per L46 (Codex audit
4
+ * must-fix): "individually safe, collectively broken."
5
+ *
6
+ * Two checks run after the batch lands locally and BEFORE any push:
7
+ *
8
+ * 1. workflow.md re-render against a synthetic-task fixture.
9
+ * The orchestrator injects this template on every run; if a GC batch
10
+ * removed a placeholder section, broke a `{{var}}` token, or left
11
+ * orphaned `{{#each}}` blocks, the next live run would silently produce
12
+ * a malformed prompt. Render the template against a known-good fixture
13
+ * and assert (a) every `{{...}}` resolves and (b) the expected section
14
+ * headers (`## Task`, `## Acceptance criteria`, `## Decisions in scope`,
15
+ * `## Sensors that will run`) survive.
16
+ *
17
+ * 2. Manifest rebuild + ground-zone consistency.
18
+ * Re-run `buildManifest` against the post-batch tree. If it throws or
19
+ * produces zero entries (the canonical zone went empty), the batch
20
+ * broke ground.
21
+ *
22
+ * Both checks are pure-mechanical — no claude burn — and run in milliseconds.
23
+ * They are not exhaustive (no runtime sensor sweep against a synthetic diff
24
+ * yet; that's deferred to a richer Phase 12.x revision when the orchestrator
25
+ * exposes an "isolated sensor sweep" entry point).
26
+ */
27
+ import type { CanarySyntheticContext } from "./types.js";
28
+ export interface BatchCanaryResult {
29
+ ok: boolean;
30
+ failures: string[];
31
+ /** Number of files in the rebuilt manifest. */
32
+ manifest_files: number;
33
+ /** Length of the rendered workflow.md template. */
34
+ rendered_length: number;
35
+ }
36
+ export interface BatchCanaryOptions {
37
+ repoRoot: string;
38
+ /** Override the synthetic context. Defaults to a minimal fixture. */
39
+ syntheticContext?: CanarySyntheticContext;
40
+ }
41
+ export declare function buildSyntheticContext(): CanarySyntheticContext;
42
+ export declare function verifyBatchCanary(opts: BatchCanaryOptions): BatchCanaryResult;
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Batch canary — verifies a multi-commit GC batch hasn't broken anything that
3
+ * shows only when the commits are taken together. Per L46 (Codex audit
4
+ * must-fix): "individually safe, collectively broken."
5
+ *
6
+ * Two checks run after the batch lands locally and BEFORE any push:
7
+ *
8
+ * 1. workflow.md re-render against a synthetic-task fixture.
9
+ * The orchestrator injects this template on every run; if a GC batch
10
+ * removed a placeholder section, broke a `{{var}}` token, or left
11
+ * orphaned `{{#each}}` blocks, the next live run would silently produce
12
+ * a malformed prompt. Render the template against a known-good fixture
13
+ * and assert (a) every `{{...}}` resolves and (b) the expected section
14
+ * headers (`## Task`, `## Acceptance criteria`, `## Decisions in scope`,
15
+ * `## Sensors that will run`) survive.
16
+ *
17
+ * 2. Manifest rebuild + ground-zone consistency.
18
+ * Re-run `buildManifest` against the post-batch tree. If it throws or
19
+ * produces zero entries (the canonical zone went empty), the batch
20
+ * broke ground.
21
+ *
22
+ * Both checks are pure-mechanical — no claude burn — and run in milliseconds.
23
+ * They are not exhaustive (no runtime sensor sweep against a synthetic diff
24
+ * yet; that's deferred to a richer Phase 12.x revision when the orchestrator
25
+ * exposes an "isolated sensor sweep" entry point).
26
+ */
27
+ import { existsSync, readFileSync } from "node:fs";
28
+ import { join } from "node:path";
29
+ import { buildManifest } from "../ground/manifest.js";
30
+ import { loadWorkflowTemplate, renderTemplate } from "../orchestrator/prompt.js";
31
+ const REQUIRED_SECTION_HEADINGS = [
32
+ "## Task",
33
+ "## Acceptance criteria",
34
+ "## Decisions in scope",
35
+ "## Off-limits paths",
36
+ "## Sensors that will run",
37
+ ];
38
+ const UNRESOLVED_TOKEN_RE = /\{\{[^}]*\}\}/;
39
+ export function buildSyntheticContext() {
40
+ return {
41
+ agent_role: "implementer",
42
+ project_name: "canary",
43
+ run_id: "canary-run",
44
+ mirror_path: "/tmp/canary-mirror",
45
+ sha_pin: "0000000000000000000000000000000000000000",
46
+ tightened_spec_body: "Canary fixture body — non-empty.",
47
+ acceptance_criteria: ["Renders workflow.md without unresolved tokens."],
48
+ in_scope_decisions: [
49
+ { id: "D-CANARY-1", title: "Canary decision", scope_summary: "fixture" },
50
+ ],
51
+ in_scope_invariants: [{ id: "V-CANARY-1", title: "Canary invariant" }],
52
+ off_limits: [".git/**", ".archive/**"],
53
+ scoped_sensors: [
54
+ { id: "stub-pattern-catalog", description: "Layer A stub catalog" },
55
+ { id: "attestation-cross-check", description: "Layer B attestation cross-check" },
56
+ ],
57
+ };
58
+ }
59
+ export function verifyBatchCanary(opts) {
60
+ const failures = [];
61
+ const ctx = opts.syntheticContext ?? buildSyntheticContext();
62
+ // 1. Workflow template re-render.
63
+ let template = "";
64
+ let rendered = "";
65
+ try {
66
+ template = loadWorkflowTemplate(opts.repoRoot);
67
+ }
68
+ catch (err) {
69
+ failures.push(`workflow.md template missing or unreadable: ${err.message}`);
70
+ }
71
+ if (template.length === 0) {
72
+ failures.push("workflow.md template is empty after frontmatter strip");
73
+ }
74
+ else {
75
+ rendered = renderTemplate(template, {
76
+ agent_role: ctx.agent_role,
77
+ project_name: ctx.project_name,
78
+ run_id: ctx.run_id,
79
+ mirror_path: ctx.mirror_path,
80
+ sha_pin: ctx.sha_pin,
81
+ tightened_spec_body: ctx.tightened_spec_body,
82
+ acceptance_criteria: ctx.acceptance_criteria,
83
+ in_scope_decisions: ctx.in_scope_decisions,
84
+ in_scope_invariants: ctx.in_scope_invariants,
85
+ off_limits: ctx.off_limits,
86
+ scoped_sensors: ctx.scoped_sensors,
87
+ });
88
+ if (UNRESOLVED_TOKEN_RE.test(rendered)) {
89
+ const m = rendered.match(UNRESOLVED_TOKEN_RE);
90
+ failures.push(`workflow.md rendered prompt contains unresolved token: ${m?.[0] ?? "<unknown>"}`);
91
+ }
92
+ for (const heading of REQUIRED_SECTION_HEADINGS) {
93
+ if (!rendered.includes(heading)) {
94
+ failures.push(`workflow.md rendered prompt missing section: \`${heading}\``);
95
+ }
96
+ }
97
+ }
98
+ // 2. Manifest rebuild (canonical-zone integrity).
99
+ let manifestFiles = 0;
100
+ try {
101
+ const manifest = buildManifest({ repoRoot: opts.repoRoot, generator: "gc.canary" });
102
+ manifestFiles = manifest.files.length;
103
+ if (manifestFiles === 0) {
104
+ failures.push("manifest rebuild produced zero canonical-zone files");
105
+ }
106
+ }
107
+ catch (err) {
108
+ failures.push(`manifest rebuild threw: ${err.message}`);
109
+ }
110
+ // 3. Sanity: workflow.md exists at the expected path (loadWorkflowTemplate
111
+ // already throws when missing, but a missing template yields the more
112
+ // detailed failure above; this check ensures the path itself is right).
113
+ const workflowPath = join(opts.repoRoot, ".harness", "config", "workflow.md");
114
+ if (!existsSync(workflowPath)) {
115
+ failures.push(`workflow.md not found at .harness/config/workflow.md`);
116
+ }
117
+ else {
118
+ // Cheap re-read to ensure we can read it post-batch (catches an edit that
119
+ // wrote invalid utf-8 etc).
120
+ try {
121
+ readFileSync(workflowPath, "utf8");
122
+ }
123
+ catch (err) {
124
+ failures.push(`workflow.md unreadable post-batch: ${err.message}`);
125
+ }
126
+ }
127
+ return {
128
+ ok: failures.length === 0,
129
+ failures,
130
+ manifest_files: manifestFiles,
131
+ rendered_length: rendered.length,
132
+ };
133
+ }
134
+ //# sourceMappingURL=canary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canary.js","sourceRoot":"","sources":["../../src/gc/canary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGjF,MAAM,yBAAyB,GAAG;IAChC,SAAS;IACT,wBAAwB;IACxB,uBAAuB;IACvB,qBAAqB;IACrB,0BAA0B;CAC3B,CAAC;AAEF,M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C,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;YACxB,QAAQ,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;QACvE,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,QAAQ,CAAC,IAAI,CAAC,2BAA4B,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,2EAA2E;IAC3E,sEAAsE;IACtE,wEAAwE;IACxE,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IAC9E,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9B,QAAQ,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC;IACxE,CAAC;SAAM,CAAC;QACN,0EAA0E;QAC1E,4BAA4B;QAC5B,IAAI,CAAC;YACH,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACrC,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,IAAI,CAAC,sCAAuC,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IAED,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;QACzB,QAAQ;QACR,cAAc,EAAE,aAAa;QAC7B,eAAe,EAAE,QAAQ,CAAC,MAAM;KACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Auto-merge classification per L16/L17/L18 (PRIMER §12.2).
3
+ *
4
+ * Given a set of repo-relative paths a commit will touch, return one of:
5
+ * safe — formatting, doc regen, frontmatter refresh, generated content,
6
+ * archive moves, stub-catalog additions, .harness/ground/* writes
7
+ * code — touches *.ts / *.tsx / *.js outside generator-managed files
8
+ * high-stakes — any path matches projectGlobs.high_stakes_globs
9
+ *
10
+ * The classifier is deliberately conservative: when in doubt, escalate. A
11
+ * single high-stakes hit dominates the result. A single code hit dominates
12
+ * over safe.
13
+ */
14
+ import type { ProjectGlobs } from "../sensors/types.js";
15
+ import type { GcAutoMergeClass } from "./types.js";
16
+ export interface ClassifyArgs {
17
+ paths: readonly string[];
18
+ projectGlobs?: ProjectGlobs;
19
+ /**
20
+ * Globs of paths the harness considers generator-managed — touching these
21
+ * stays safe-class even when the extension is .ts. Default: empty.
22
+ */
23
+ generatorManagedGlobs?: readonly string[];
24
+ }
25
+ export declare function classifyAutoMerge(args: ClassifyArgs): GcAutoMergeClass;
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Auto-merge classification per L16/L17/L18 (PRIMER §12.2).
3
+ *
4
+ * Given a set of repo-relative paths a commit will touch, return one of:
5
+ * safe — formatting, doc regen, frontmatter refresh, generated content,
6
+ * archive moves, stub-catalog additions, .harness/ground/* writes
7
+ * code — touches *.ts / *.tsx / *.js outside generator-managed files
8
+ * high-stakes — any path matches projectGlobs.high_stakes_globs
9
+ *
10
+ * The classifier is deliberately conservative: when in doubt, escalate. A
11
+ * single high-stakes hit dominates the result. A single code hit dominates
12
+ * over safe.
13
+ */
14
+ import { matchAnyGlob } from "../ground/glob.js";
15
+ /** Patterns the classifier always treats as safe regardless of file type. */
16
+ const SAFE_PATH_PREFIXES = [
17
+ ".harness/ground/",
18
+ ".harness/staleness/",
19
+ ".harness/runs/terminal/",
20
+ ".archive/",
21
+ ];
22
+ /** Doc / config / generated extensions. Not safe by themselves; combined with
23
+ * off-source-tree location they are. */
24
+ const DOC_LIKE_EXTS = [".md", ".yaml", ".yml", ".json", ".txt"];
25
+ /** Source-code extensions that escalate to code-class. */
26
+ const CODE_EXTS = [
27
+ ".ts",
28
+ ".tsx",
29
+ ".cts",
30
+ ".mts",
31
+ ".js",
32
+ ".jsx",
33
+ ".cjs",
34
+ ".mjs",
35
+ ".py",
36
+ ".rb",
37
+ ".go",
38
+ ".rs",
39
+ ];
40
+ export function classifyAutoMerge(args) {
41
+ const highStakes = args.projectGlobs?.high_stakes_globs ?? [];
42
+ const generated = args.generatorManagedGlobs ?? args.projectGlobs?.generator_source_globs ?? [];
43
+ let cls = "safe";
44
+ for (const path of args.paths) {
45
+ if (highStakes.length > 0 && matchAnyGlob(path, highStakes)) {
46
+ return "high-stakes";
47
+ }
48
+ if (cls === "code")
49
+ continue; // already escalated; only high-stakes upgrade further
50
+ if (isSafePath(path, generated))
51
+ continue;
52
+ if (isCodePath(path)) {
53
+ cls = "code";
54
+ continue;
55
+ }
56
+ // Unknown extension under the canonical zone — keep as safe; .archive
57
+ // moves or yaml writes etc.
58
+ }
59
+ return cls;
60
+ }
61
+ function isSafePath(path, generatorManagedGlobs) {
62
+ for (const prefix of SAFE_PATH_PREFIXES) {
63
+ if (path.startsWith(prefix))
64
+ return true;
65
+ }
66
+ if (generatorManagedGlobs.length > 0 && matchAnyGlob(path, generatorManagedGlobs)) {
67
+ return true;
68
+ }
69
+ // Documentation files are safe.
70
+ if (path.startsWith("docs/"))
71
+ return true;
72
+ if (path === "AGENTS.md" || path === "CLAUDE.md" || path === "README.md")
73
+ return true;
74
+ // Frontmatter / config under .harness/config/* is safe (the GC pass that
75
+ // writes there is doing config maintenance, not source change).
76
+ if (path.startsWith(".harness/config/") || path.startsWith(".claude/"))
77
+ return true;
78
+ // Generic doc-extension files outside the source tree fall here.
79
+ for (const ext of DOC_LIKE_EXTS) {
80
+ if (path.endsWith(ext))
81
+ return true;
82
+ }
83
+ return false;
84
+ }
85
+ function isCodePath(path) {
86
+ const lower = path.toLowerCase();
87
+ return CODE_EXTS.some((e) => lower.endsWith(e));
88
+ }
89
+ //# sourceMappingURL=classify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/gc/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIjD,6EAA6E;AAC7E,MAAM,kBAAkB,GAAG;IACzB,kBAAkB;IAClB,qBAAqB;IACrB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