harnery 0.29.0 → 0.31.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 (512) hide show
  1. package/README.md +4 -4
  2. package/dist/commander.d.ts +8 -0
  3. package/dist/commander.d.ts.map +1 -1
  4. package/dist/commander.js +14 -13
  5. package/dist/commands/adapter.d.ts +12 -0
  6. package/dist/commands/adapter.d.ts.map +1 -0
  7. package/dist/commands/{harness.js → adapter.js} +35 -35
  8. package/dist/commands/agents.d.ts +3 -2
  9. package/dist/commands/agents.d.ts.map +1 -1
  10. package/dist/commands/agents.js +61 -60
  11. package/dist/commands/artifacts.d.ts +4 -0
  12. package/dist/commands/artifacts.d.ts.map +1 -0
  13. package/dist/commands/artifacts.js +143 -0
  14. package/dist/commands/backup.d.ts +1 -1
  15. package/dist/commands/backup.d.ts.map +1 -1
  16. package/dist/commands/backup.js +5 -2
  17. package/dist/commands/browse.d.ts.map +1 -1
  18. package/dist/commands/browse.js +310 -7
  19. package/dist/commands/checkpoint.d.ts +12 -0
  20. package/dist/commands/checkpoint.d.ts.map +1 -0
  21. package/dist/commands/checkpoint.js +162 -0
  22. package/dist/commands/context.d.ts +2 -2
  23. package/dist/commands/context.d.ts.map +1 -1
  24. package/dist/commands/context.js +3 -151
  25. package/dist/commands/decision.d.ts.map +1 -1
  26. package/dist/commands/decision.js +31 -7
  27. package/dist/commands/deinit.d.ts +2 -2
  28. package/dist/commands/deinit.js +15 -15
  29. package/dist/commands/doctor.js +23 -23
  30. package/dist/commands/governor.d.ts +4 -0
  31. package/dist/commands/governor.d.ts.map +1 -0
  32. package/dist/commands/{supervisor.js → governor.js} +133 -108
  33. package/dist/commands/init.d.ts +12 -12
  34. package/dist/commands/init.d.ts.map +1 -1
  35. package/dist/commands/init.js +44 -30
  36. package/dist/commands/{session.d.ts → journal.d.ts} +2 -2
  37. package/dist/commands/journal.d.ts.map +1 -0
  38. package/dist/commands/{scratch.js → journal.js} +47 -47
  39. package/dist/commands/policy.js +1 -1
  40. package/dist/commands/presence.js +2 -2
  41. package/dist/commands/sync.d.ts +1 -1
  42. package/dist/commands/sync.js +3 -3
  43. package/dist/commands/tunnel.d.ts +16 -0
  44. package/dist/commands/tunnel.d.ts.map +1 -1
  45. package/dist/commands/tunnel.js +193 -23
  46. package/dist/commands/web-fetch.js +1 -1
  47. package/dist/commands/web.d.ts +19 -0
  48. package/dist/commands/web.d.ts.map +1 -1
  49. package/dist/commands/web.js +51 -0
  50. package/dist/commands/work.d.ts +2 -1
  51. package/dist/commands/work.d.ts.map +1 -1
  52. package/dist/commands/work.js +55 -25
  53. package/dist/commands/workflow.d.ts.map +1 -1
  54. package/dist/commands/workflow.js +35 -28
  55. package/dist/core/{harnesses → adapters}/attest-projection.d.ts +2 -2
  56. package/dist/core/adapters/attest-projection.d.ts.map +1 -0
  57. package/dist/core/{harnesses → adapters}/attest.d.ts +16 -16
  58. package/dist/core/adapters/attest.d.ts.map +1 -0
  59. package/dist/core/{harnesses → adapters}/attest.js +9 -9
  60. package/dist/core/{harnesses → adapters}/attestation.d.ts +16 -16
  61. package/dist/core/adapters/attestation.d.ts.map +1 -0
  62. package/dist/core/{harnesses → adapters}/attestation.js +20 -20
  63. package/dist/core/{harnesses → adapters}/bench.d.ts +12 -12
  64. package/dist/core/adapters/bench.d.ts.map +1 -0
  65. package/dist/core/{harnesses → adapters}/bench.js +12 -12
  66. package/dist/core/adapters/index.d.ts +13 -0
  67. package/dist/core/adapters/index.d.ts.map +1 -0
  68. package/dist/core/adapters/index.js +6 -0
  69. package/dist/core/{harnesses → adapters}/profiles.d.ts +11 -11
  70. package/dist/core/adapters/profiles.d.ts.map +1 -0
  71. package/dist/core/{harnesses → adapters}/profiles.js +11 -11
  72. package/dist/core/adapters/registry.d.ts +15 -0
  73. package/dist/core/adapters/registry.d.ts.map +1 -0
  74. package/dist/core/{harnesses → adapters}/registry.js +11 -11
  75. package/dist/core/{harnesses → adapters}/types.d.ts +28 -23
  76. package/dist/core/adapters/types.d.ts.map +1 -0
  77. package/dist/core/{harnesses → adapters}/types.js +1 -1
  78. package/dist/core/agents/canonical-emit.d.ts +4 -4
  79. package/dist/core/agents/canonical-emit.js +5 -5
  80. package/dist/core/agents/cli-emit.js +1 -1
  81. package/dist/core/agents/cli.js +30 -26
  82. package/dist/core/agents/codex-replay.d.ts +1 -1
  83. package/dist/core/agents/codex-replay.js +6 -6
  84. package/dist/core/agents/coord-client.d.ts +21 -2
  85. package/dist/core/agents/coord-client.d.ts.map +1 -1
  86. package/dist/core/agents/coord-client.js +122 -27
  87. package/dist/core/agents/events/consume.d.ts +1 -1
  88. package/dist/core/agents/events/emit.d.ts +5 -6
  89. package/dist/core/agents/events/emit.d.ts.map +1 -1
  90. package/dist/core/agents/events/emit.js +2 -2
  91. package/dist/core/agents/render/prompt-context.d.ts +21 -9
  92. package/dist/core/agents/render/prompt-context.d.ts.map +1 -1
  93. package/dist/core/agents/render/prompt-context.js +82 -30
  94. package/dist/core/agents/render/session-context.d.ts +1 -1
  95. package/dist/core/agents/render/session-context.js +5 -5
  96. package/dist/core/agents/rules/claim-conflict.d.ts +2 -6
  97. package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -1
  98. package/dist/core/agents/rules/claim-conflict.js +1 -1
  99. package/dist/core/agents/rules/commit-conflict.js +98 -22
  100. package/dist/core/agents/rules/stop-hook.d.ts +9 -9
  101. package/dist/core/agents/rules/stop-hook.d.ts.map +1 -1
  102. package/dist/core/agents/rules/stop-hook.js +23 -5
  103. package/dist/core/agents/rules/verdict.d.ts +14 -0
  104. package/dist/core/agents/rules/verdict.d.ts.map +1 -0
  105. package/dist/core/agents/rules/verdict.js +1 -0
  106. package/dist/core/agents/session-events.js +3 -3
  107. package/dist/core/agents/state/council.d.ts +1 -1
  108. package/dist/core/agents/state/council.js +1 -1
  109. package/dist/core/agents/state/heartbeat-projector.d.ts +3 -2
  110. package/dist/core/agents/state/heartbeat-projector.d.ts.map +1 -1
  111. package/dist/core/agents/state/heartbeat-projector.js +14 -10
  112. package/dist/core/agents/state/heartbeat-writer.d.ts +1 -1
  113. package/dist/core/agents/state/heartbeat-writer.js +12 -12
  114. package/dist/core/agents/state/{scratch.d.ts → journal.d.ts} +7 -7
  115. package/dist/core/agents/state/{scratch.d.ts.map → journal.d.ts.map} +1 -1
  116. package/dist/core/agents/state/{scratch.js → journal.js} +12 -12
  117. package/dist/core/agents/state/pidmap.d.ts +28 -4
  118. package/dist/core/agents/state/pidmap.d.ts.map +1 -1
  119. package/dist/core/agents/state/pidmap.js +130 -15
  120. package/dist/core/agents/state/proc-start.d.ts +95 -0
  121. package/dist/core/agents/state/proc-start.d.ts.map +1 -0
  122. package/dist/core/agents/state/proc-start.js +199 -0
  123. package/dist/core/agents/state/shell-mutation.d.ts +1 -1
  124. package/dist/core/agents/state/shell-mutation.js +1 -1
  125. package/dist/core/agents/state/stale-sweep.js +7 -7
  126. package/dist/core/artifacts/index.d.ts +86 -0
  127. package/dist/core/artifacts/index.d.ts.map +1 -0
  128. package/dist/core/artifacts/index.js +421 -0
  129. package/dist/core/config.d.ts +9 -2
  130. package/dist/core/config.d.ts.map +1 -1
  131. package/dist/core/config.js +26 -2
  132. package/dist/core/context/index.d.ts +12 -12
  133. package/dist/core/context/index.js +10 -10
  134. package/dist/core/governor/adapter-spread.d.ts +52 -0
  135. package/dist/core/governor/adapter-spread.d.ts.map +1 -0
  136. package/dist/core/governor/adapter-spread.js +52 -0
  137. package/dist/core/governor/index.d.ts +7 -0
  138. package/dist/core/governor/index.d.ts.map +1 -0
  139. package/dist/core/governor/index.js +6 -0
  140. package/dist/core/governor/plan-api.d.ts +38 -0
  141. package/dist/core/governor/plan-api.d.ts.map +1 -0
  142. package/dist/core/governor/plan-api.js +83 -0
  143. package/dist/core/governor/plan-read.d.ts +5 -0
  144. package/dist/core/governor/plan-read.d.ts.map +1 -0
  145. package/dist/core/{supervisor → governor}/plan-read.js +71 -51
  146. package/dist/core/governor/plan-types.d.ts +181 -0
  147. package/dist/core/governor/plan-types.d.ts.map +1 -0
  148. package/dist/core/{supervisor → governor}/plan-types.js +4 -4
  149. package/dist/core/governor/planning.d.ts +48 -0
  150. package/dist/core/governor/planning.d.ts.map +1 -0
  151. package/dist/core/{supervisor → governor}/planning.js +143 -94
  152. package/dist/core/governor/read.d.ts +6 -0
  153. package/dist/core/governor/read.d.ts.map +1 -0
  154. package/dist/core/governor/read.js +4 -0
  155. package/dist/core/governor/runner.d.ts +37 -0
  156. package/dist/core/governor/runner.d.ts.map +1 -0
  157. package/dist/core/{supervisor → governor}/runner.js +15 -15
  158. package/dist/core/governor/service-read.d.ts +6 -0
  159. package/dist/core/governor/service-read.d.ts.map +1 -0
  160. package/dist/core/{supervisor → governor}/service-read.js +12 -12
  161. package/dist/core/governor/service.d.ts +114 -0
  162. package/dist/core/governor/service.d.ts.map +1 -0
  163. package/dist/core/{supervisor → governor}/service.js +57 -57
  164. package/dist/core/governor/state.d.ts +116 -0
  165. package/dist/core/governor/state.d.ts.map +1 -0
  166. package/dist/core/{supervisor → governor}/state.js +290 -116
  167. package/dist/core/hooks/adapter/detect.d.ts +9 -0
  168. package/dist/core/hooks/{harness → adapter}/detect.d.ts.map +1 -1
  169. package/dist/core/hooks/{harness → adapter}/detect.js +8 -8
  170. package/dist/core/hooks/{harness → adapter}/events.d.ts +15 -14
  171. package/dist/core/hooks/adapter/events.d.ts.map +1 -0
  172. package/dist/core/hooks/{harness → adapter}/events.js +5 -5
  173. package/dist/core/hooks/{harness → adapter}/output.d.ts +20 -14
  174. package/dist/core/hooks/adapter/output.d.ts.map +1 -0
  175. package/dist/core/hooks/{harness → adapter}/output.js +30 -22
  176. package/dist/core/hooks/{harness → adapter}/parse.d.ts +5 -5
  177. package/dist/core/hooks/{harness → adapter}/parse.d.ts.map +1 -1
  178. package/dist/core/hooks/{harness → adapter}/parse.js +4 -4
  179. package/dist/core/hooks/{harness → adapter}/wiring.d.ts +15 -15
  180. package/dist/core/hooks/{harness → adapter}/wiring.d.ts.map +1 -1
  181. package/dist/core/hooks/{harness → adapter}/wiring.js +13 -13
  182. package/dist/core/hooks/cli.d.ts +3 -3
  183. package/dist/core/hooks/cli.js +175 -151
  184. package/dist/core/hooks/effects/image-capture.d.ts +5 -5
  185. package/dist/core/hooks/effects/image-capture.d.ts.map +1 -1
  186. package/dist/core/hooks/effects/image-capture.js +3 -3
  187. package/dist/core/hooks/effects/index.d.ts +12 -12
  188. package/dist/core/hooks/effects/index.d.ts.map +1 -1
  189. package/dist/core/hooks/effects/index.js +17 -17
  190. package/dist/core/hooks/events/emit.d.ts +2 -2
  191. package/dist/core/hooks/events/emit.d.ts.map +1 -1
  192. package/dist/core/hooks/events/emit.js +1 -1
  193. package/dist/core/hooks/events/rotate.js +1 -1
  194. package/dist/core/hooks/events/schema.d.ts +13 -5
  195. package/dist/core/hooks/events/schema.d.ts.map +1 -1
  196. package/dist/core/hooks/guard-path.d.ts +2 -2
  197. package/dist/core/hooks/guard-path.js +2 -2
  198. package/dist/core/hooks/index.d.ts +1 -1
  199. package/dist/core/hooks/index.d.ts.map +1 -1
  200. package/dist/core/hooks/resolve/anchor.d.ts +14 -5
  201. package/dist/core/hooks/resolve/anchor.d.ts.map +1 -1
  202. package/dist/core/hooks/resolve/anchor.js +64 -7
  203. package/dist/core/hooks/resolve/coord-root.d.ts +3 -3
  204. package/dist/core/hooks/resolve/coord-root.js +4 -4
  205. package/dist/core/hooks/resolve/intent.js +1 -1
  206. package/dist/core/hooks/resolve/owner.d.ts +1 -1
  207. package/dist/core/hooks/resolve/owner.d.ts.map +1 -1
  208. package/dist/core/hooks/resolve/owner.js +11 -5
  209. package/dist/core/{scratch → journal}/index.d.ts +25 -25
  210. package/dist/core/{scratch → journal}/index.d.ts.map +1 -1
  211. package/dist/core/{scratch → journal}/index.js +38 -38
  212. package/dist/core/policy/evaluate.d.ts +1 -1
  213. package/dist/core/policy/evaluate.d.ts.map +1 -1
  214. package/dist/core/policy/evaluate.js +7 -7
  215. package/dist/core/policy/types.d.ts +3 -3
  216. package/dist/core/policy/types.d.ts.map +1 -1
  217. package/dist/core/work/runner.d.ts.map +1 -1
  218. package/dist/core/work/runner.js +11 -2
  219. package/dist/core/work/state.d.ts +28 -3
  220. package/dist/core/work/state.d.ts.map +1 -1
  221. package/dist/core/work/state.js +148 -16
  222. package/dist/core/workflow/adapters.d.ts +17 -0
  223. package/dist/core/workflow/adapters.d.ts.map +1 -0
  224. package/dist/core/workflow/adapters.js +21 -0
  225. package/dist/core/workflow/approvals.js +6 -6
  226. package/dist/core/workflow/billing.d.ts +9 -9
  227. package/dist/core/workflow/billing.js +9 -9
  228. package/dist/core/workflow/child-env.d.ts +10 -2
  229. package/dist/core/workflow/child-env.d.ts.map +1 -1
  230. package/dist/core/workflow/child-env.js +12 -4
  231. package/dist/core/workflow/engine.d.ts +15 -5
  232. package/dist/core/workflow/engine.d.ts.map +1 -1
  233. package/dist/core/workflow/engine.js +151 -83
  234. package/dist/core/workflow/evidence-preflight.d.ts +24 -0
  235. package/dist/core/workflow/evidence-preflight.d.ts.map +1 -0
  236. package/dist/core/workflow/evidence-preflight.js +134 -0
  237. package/dist/core/workflow/index.d.ts +3 -2
  238. package/dist/core/workflow/index.d.ts.map +1 -1
  239. package/dist/core/workflow/index.js +2 -1
  240. package/dist/core/workflow/proof.d.ts +28 -5
  241. package/dist/core/workflow/proof.d.ts.map +1 -1
  242. package/dist/core/workflow/proof.js +77 -34
  243. package/dist/core/workflow/run-state.d.ts +1 -1
  244. package/dist/core/workflow/run-state.js +7 -7
  245. package/dist/core/workflow/sandbox-projection.d.ts +6 -6
  246. package/dist/core/workflow/sandbox-projection.d.ts.map +1 -1
  247. package/dist/core/workflow/sandbox-projection.js +11 -11
  248. package/dist/core/workflow/spawn-claude.d.ts +3 -3
  249. package/dist/core/workflow/spawn-claude.d.ts.map +1 -1
  250. package/dist/core/workflow/spawn-claude.js +28 -8
  251. package/dist/core/workflow/spawn-codex.d.ts +4 -4
  252. package/dist/core/workflow/spawn-codex.d.ts.map +1 -1
  253. package/dist/core/workflow/spawn-codex.js +26 -8
  254. package/dist/core/workflow/spawn-cursor.d.ts +4 -4
  255. package/dist/core/workflow/spawn-cursor.d.ts.map +1 -1
  256. package/dist/core/workflow/spawn-cursor.js +27 -8
  257. package/dist/core/workflow/spawn-failure.d.ts +15 -1
  258. package/dist/core/workflow/spawn-failure.d.ts.map +1 -1
  259. package/dist/core/workflow/spawn-failure.js +35 -1
  260. package/dist/core/workflow/specialists.js +2 -2
  261. package/dist/core/workflow/{journal.d.ts → transcript.d.ts} +8 -8
  262. package/dist/core/workflow/transcript.d.ts.map +1 -0
  263. package/dist/core/workflow/{journal.js → transcript.js} +14 -14
  264. package/dist/core/workflow/types.d.ts +119 -46
  265. package/dist/core/workflow/types.d.ts.map +1 -1
  266. package/dist/core/workflow/types.js +11 -1
  267. package/dist/core/workflow/validate.d.ts +1 -1
  268. package/dist/core/workflow/validate.js +1 -1
  269. package/dist/core/workflow/workspaces/cancellation.js +2 -2
  270. package/dist/core/workflow/workspaces/cleanup.js +2 -2
  271. package/dist/core/workflow/workspaces/execution.js +6 -6
  272. package/dist/core/workflow/workspaces/inspect.js +9 -9
  273. package/dist/core/workflow/workspaces/integration.js +14 -14
  274. package/dist/core/workflow/workspaces/lifecycle.d.ts +1 -1
  275. package/dist/core/workflow/workspaces/lifecycle.d.ts.map +1 -1
  276. package/dist/core/workflow/workspaces/lifecycle.js +9 -9
  277. package/dist/core/workflow/workspaces/local-git.d.ts.map +1 -1
  278. package/dist/core/workflow/workspaces/local-git.js +39 -5
  279. package/dist/core/workflow/workspaces/recovery.js +3 -3
  280. package/dist/core/workflow/workspaces/state.d.ts +1 -1
  281. package/dist/core/workflow/workspaces/state.d.ts.map +1 -1
  282. package/dist/core/workflow/workspaces/state.js +3 -3
  283. package/dist/core/workflow/workspaces/types.d.ts +1 -1
  284. package/dist/core/workflow/workspaces/types.d.ts.map +1 -1
  285. package/dist/lib/browser/asserts.d.ts +28 -0
  286. package/dist/lib/browser/asserts.d.ts.map +1 -0
  287. package/dist/lib/browser/asserts.js +152 -0
  288. package/dist/lib/browser/client.d.ts +49 -0
  289. package/dist/lib/browser/client.d.ts.map +1 -1
  290. package/dist/lib/browser/client.js +155 -14
  291. package/dist/lib/browser/content-checks.d.ts +108 -0
  292. package/dist/lib/browser/content-checks.d.ts.map +1 -0
  293. package/dist/lib/browser/content-checks.js +474 -0
  294. package/dist/lib/browser/critique.d.ts +91 -0
  295. package/dist/lib/browser/critique.d.ts.map +1 -0
  296. package/dist/lib/browser/critique.js +167 -0
  297. package/dist/lib/browser/geometry.d.ts +32 -0
  298. package/dist/lib/browser/geometry.d.ts.map +1 -1
  299. package/dist/lib/browser/geometry.js +244 -1
  300. package/dist/lib/browser/index.d.ts +4 -1
  301. package/dist/lib/browser/index.d.ts.map +1 -1
  302. package/dist/lib/browser/index.js +2 -0
  303. package/dist/lib/claude-desktop.d.ts.map +1 -1
  304. package/dist/lib/claude-desktop.js +4 -1
  305. package/dist/lib/council/index.d.ts +6 -6
  306. package/dist/lib/council/index.d.ts.map +1 -1
  307. package/dist/lib/council/index.js +8 -8
  308. package/dist/lib/exec.d.ts +7 -0
  309. package/dist/lib/exec.d.ts.map +1 -1
  310. package/dist/lib/exec.js +6 -3
  311. package/dist/lib/identities/assume.d.ts +2 -2
  312. package/dist/lib/identities/assume.js +7 -7
  313. package/dist/lib/instructions/apply.d.ts +3 -3
  314. package/dist/lib/instructions/apply.d.ts.map +1 -1
  315. package/dist/lib/instructions/apply.js +75 -27
  316. package/dist/lib/instructions/host-addendum.d.ts +54 -0
  317. package/dist/lib/instructions/host-addendum.d.ts.map +1 -0
  318. package/dist/lib/instructions/host-addendum.js +107 -0
  319. package/dist/lib/instructions/templates.d.ts +10 -3
  320. package/dist/lib/instructions/templates.d.ts.map +1 -1
  321. package/dist/lib/instructions/templates.js +41 -12
  322. package/dist/lib/machine.d.ts +2 -2
  323. package/dist/lib/machine.js +2 -2
  324. package/package.json +26 -21
  325. package/schemas/config.schema.json +26 -1
  326. package/src/commander.ts +22 -13
  327. package/src/commands/{harness.ts → adapter.ts} +46 -46
  328. package/src/commands/agents.ts +71 -64
  329. package/src/commands/artifacts.ts +168 -0
  330. package/src/commands/backup.ts +47 -33
  331. package/src/commands/browse.ts +438 -2
  332. package/src/commands/checkpoint.ts +196 -0
  333. package/src/commands/context.ts +3 -176
  334. package/src/commands/decision.ts +41 -7
  335. package/src/commands/deinit.ts +16 -16
  336. package/src/commands/doctor.ts +28 -28
  337. package/src/commands/{supervisor.ts → governor.ts} +184 -154
  338. package/src/commands/init.ts +50 -34
  339. package/src/commands/{scratch.ts → journal.ts} +60 -60
  340. package/src/commands/policy.ts +1 -1
  341. package/src/commands/presence.ts +2 -2
  342. package/src/commands/sync.ts +3 -3
  343. package/src/commands/tunnel.ts +237 -34
  344. package/src/commands/web-fetch.ts +1 -1
  345. package/src/commands/web.ts +56 -1
  346. package/src/commands/work.ts +72 -38
  347. package/src/commands/workflow.ts +43 -34
  348. package/src/core/{harnesses → adapters}/attest-projection.ts +2 -2
  349. package/src/core/{harnesses → adapters}/attest.ts +27 -27
  350. package/src/core/{harnesses → adapters}/attestation.ts +41 -41
  351. package/src/core/{harnesses → adapters}/bench.ts +34 -43
  352. package/src/core/adapters/index.ts +56 -0
  353. package/src/core/{harnesses → adapters}/profiles.ts +16 -16
  354. package/src/core/{harnesses → adapters}/registry.ts +23 -23
  355. package/src/core/{harnesses → adapters}/types.ts +28 -23
  356. package/src/core/agents/canonical-emit.ts +6 -6
  357. package/src/core/agents/cli-emit.ts +1 -1
  358. package/src/core/agents/cli.ts +30 -28
  359. package/src/core/agents/codex-replay.ts +6 -6
  360. package/src/core/agents/coord-client.ts +119 -28
  361. package/src/core/agents/events/consume.ts +1 -1
  362. package/src/core/agents/events/emit.ts +7 -6
  363. package/src/core/agents/render/prompt-context.ts +107 -31
  364. package/src/core/agents/render/session-context.ts +6 -6
  365. package/src/core/agents/rules/claim-conflict.ts +4 -7
  366. package/src/core/agents/rules/commit-conflict.ts +103 -22
  367. package/src/core/agents/rules/stop-hook.ts +33 -17
  368. package/src/core/agents/rules/verdict.ts +13 -0
  369. package/src/core/agents/session-events.ts +4 -4
  370. package/src/core/agents/state/council.ts +1 -1
  371. package/src/core/agents/state/heartbeat-projector.ts +16 -12
  372. package/src/core/agents/state/heartbeat-writer.ts +12 -12
  373. package/src/core/agents/state/{scratch.ts → journal.ts} +12 -12
  374. package/src/core/agents/state/pidmap.ts +130 -15
  375. package/src/core/agents/state/proc-start.ts +208 -0
  376. package/src/core/agents/state/shell-mutation.ts +1 -1
  377. package/src/core/agents/state/stale-sweep.ts +7 -7
  378. package/src/core/artifacts/index.ts +557 -0
  379. package/src/core/config.ts +30 -2
  380. package/src/core/context/index.ts +15 -15
  381. package/src/core/governor/adapter-spread.ts +82 -0
  382. package/src/core/governor/index.ts +91 -0
  383. package/src/core/governor/plan-api.ts +115 -0
  384. package/src/core/{supervisor → governor}/plan-read.ts +120 -96
  385. package/src/core/{supervisor → governor}/plan-types.ts +64 -50
  386. package/src/core/{supervisor → governor}/planning.ts +240 -188
  387. package/src/core/governor/read.ts +59 -0
  388. package/src/core/{supervisor → governor}/runner.ts +39 -39
  389. package/src/core/{supervisor → governor}/service-read.ts +22 -22
  390. package/src/core/{supervisor → governor}/service.ts +117 -119
  391. package/src/core/{supervisor → governor}/state.ts +389 -174
  392. package/src/core/hooks/adapter/detect.ts +30 -0
  393. package/src/core/hooks/{harness → adapter}/events.ts +16 -14
  394. package/src/core/hooks/{harness → adapter}/output.ts +31 -23
  395. package/src/core/hooks/{harness → adapter}/parse.ts +5 -5
  396. package/src/core/hooks/{harness → adapter}/wiring.ts +21 -21
  397. package/src/core/hooks/cli.ts +185 -162
  398. package/src/core/hooks/effects/image-capture.ts +6 -6
  399. package/src/core/hooks/effects/index.ts +17 -17
  400. package/src/core/hooks/events/emit.ts +3 -3
  401. package/src/core/hooks/events/rotate.ts +1 -1
  402. package/src/core/hooks/events/schema.ts +15 -7
  403. package/src/core/hooks/guard-path.ts +2 -2
  404. package/src/core/hooks/index.ts +1 -1
  405. package/src/core/hooks/resolve/anchor.ts +63 -8
  406. package/src/core/hooks/resolve/coord-root.ts +4 -4
  407. package/src/core/hooks/resolve/intent.ts +1 -1
  408. package/src/core/hooks/resolve/owner.ts +11 -5
  409. package/src/core/{scratch → journal}/index.ts +53 -53
  410. package/src/core/policy/evaluate.ts +8 -8
  411. package/src/core/policy/types.ts +3 -3
  412. package/src/core/work/runner.ts +11 -2
  413. package/src/core/work/state.ts +185 -21
  414. package/src/core/workflow/adapters.ts +33 -0
  415. package/src/core/workflow/approvals.ts +7 -7
  416. package/src/core/workflow/billing.ts +12 -12
  417. package/src/core/workflow/child-env.ts +13 -4
  418. package/src/core/workflow/engine.ts +166 -90
  419. package/src/core/workflow/evidence-preflight.ts +165 -0
  420. package/src/core/workflow/index.ts +6 -3
  421. package/src/core/workflow/proof.ts +94 -48
  422. package/src/core/workflow/run-state.ts +7 -7
  423. package/src/core/workflow/sandbox-projection.ts +16 -16
  424. package/src/core/workflow/spawn-claude.ts +34 -12
  425. package/src/core/workflow/spawn-codex.ts +30 -12
  426. package/src/core/workflow/spawn-cursor.ts +31 -12
  427. package/src/core/workflow/spawn-failure.ts +41 -1
  428. package/src/core/workflow/specialists.ts +2 -2
  429. package/src/core/workflow/{journal.ts → transcript.ts} +16 -16
  430. package/src/core/workflow/types.ts +130 -46
  431. package/src/core/workflow/validate.ts +1 -1
  432. package/src/core/workflow/workspaces/cancellation.ts +2 -2
  433. package/src/core/workflow/workspaces/cleanup.ts +2 -2
  434. package/src/core/workflow/workspaces/execution.ts +6 -6
  435. package/src/core/workflow/workspaces/inspect.ts +14 -11
  436. package/src/core/workflow/workspaces/integration.ts +18 -14
  437. package/src/core/workflow/workspaces/lifecycle.ts +10 -10
  438. package/src/core/workflow/workspaces/local-git.ts +47 -5
  439. package/src/core/workflow/workspaces/recovery.ts +3 -3
  440. package/src/core/workflow/workspaces/state.ts +4 -3
  441. package/src/core/workflow/workspaces/types.ts +1 -1
  442. package/src/lib/browser/asserts.ts +177 -0
  443. package/src/lib/browser/client.ts +189 -14
  444. package/src/lib/browser/content-checks.ts +571 -0
  445. package/src/lib/browser/critique.ts +231 -0
  446. package/src/lib/browser/geometry.ts +297 -1
  447. package/src/lib/browser/index.ts +34 -0
  448. package/src/lib/claude-desktop.ts +4 -1
  449. package/src/lib/council/index.ts +9 -9
  450. package/src/lib/exec.ts +13 -3
  451. package/src/lib/identities/assume.ts +7 -7
  452. package/src/lib/instructions/apply.ts +87 -25
  453. package/src/lib/instructions/host-addendum.ts +126 -0
  454. package/src/lib/instructions/templates.ts +44 -15
  455. package/src/lib/machine.ts +2 -2
  456. package/dist/commands/harness.d.ts +0 -12
  457. package/dist/commands/harness.d.ts.map +0 -1
  458. package/dist/commands/scratch.d.ts +0 -4
  459. package/dist/commands/scratch.d.ts.map +0 -1
  460. package/dist/commands/session.d.ts.map +0 -1
  461. package/dist/commands/session.js +0 -162
  462. package/dist/commands/supervisor.d.ts +0 -4
  463. package/dist/commands/supervisor.d.ts.map +0 -1
  464. package/dist/core/harnesses/attest-projection.d.ts.map +0 -1
  465. package/dist/core/harnesses/attest.d.ts.map +0 -1
  466. package/dist/core/harnesses/attestation.d.ts.map +0 -1
  467. package/dist/core/harnesses/bench.d.ts.map +0 -1
  468. package/dist/core/harnesses/index.d.ts +0 -13
  469. package/dist/core/harnesses/index.d.ts.map +0 -1
  470. package/dist/core/harnesses/index.js +0 -6
  471. package/dist/core/harnesses/profiles.d.ts.map +0 -1
  472. package/dist/core/harnesses/registry.d.ts +0 -15
  473. package/dist/core/harnesses/registry.d.ts.map +0 -1
  474. package/dist/core/harnesses/types.d.ts.map +0 -1
  475. package/dist/core/hooks/harness/detect.d.ts +0 -9
  476. package/dist/core/hooks/harness/events.d.ts.map +0 -1
  477. package/dist/core/hooks/harness/output.d.ts.map +0 -1
  478. package/dist/core/supervisor/index.d.ts +0 -7
  479. package/dist/core/supervisor/index.d.ts.map +0 -1
  480. package/dist/core/supervisor/index.js +0 -6
  481. package/dist/core/supervisor/plan-api.d.ts +0 -23
  482. package/dist/core/supervisor/plan-api.d.ts.map +0 -1
  483. package/dist/core/supervisor/plan-api.js +0 -50
  484. package/dist/core/supervisor/plan-read.d.ts +0 -5
  485. package/dist/core/supervisor/plan-read.d.ts.map +0 -1
  486. package/dist/core/supervisor/plan-types.d.ts +0 -170
  487. package/dist/core/supervisor/plan-types.d.ts.map +0 -1
  488. package/dist/core/supervisor/planning.d.ts +0 -33
  489. package/dist/core/supervisor/planning.d.ts.map +0 -1
  490. package/dist/core/supervisor/read.d.ts +0 -6
  491. package/dist/core/supervisor/read.d.ts.map +0 -1
  492. package/dist/core/supervisor/read.js +0 -4
  493. package/dist/core/supervisor/runner.d.ts +0 -37
  494. package/dist/core/supervisor/runner.d.ts.map +0 -1
  495. package/dist/core/supervisor/service-read.d.ts +0 -6
  496. package/dist/core/supervisor/service-read.d.ts.map +0 -1
  497. package/dist/core/supervisor/service.d.ts +0 -114
  498. package/dist/core/supervisor/service.d.ts.map +0 -1
  499. package/dist/core/supervisor/state.d.ts +0 -95
  500. package/dist/core/supervisor/state.d.ts.map +0 -1
  501. package/dist/core/workflow/harnesses.d.ts +0 -17
  502. package/dist/core/workflow/harnesses.d.ts.map +0 -1
  503. package/dist/core/workflow/harnesses.js +0 -21
  504. package/dist/core/workflow/journal.d.ts.map +0 -1
  505. package/src/commands/session.ts +0 -187
  506. package/src/core/harnesses/index.ts +0 -56
  507. package/src/core/hooks/harness/detect.ts +0 -30
  508. package/src/core/supervisor/index.ts +0 -89
  509. package/src/core/supervisor/plan-api.ts +0 -73
  510. package/src/core/supervisor/read.ts +0 -59
  511. package/src/core/workflow/harnesses.ts +0 -33
  512. /package/dist/core/{harnesses → adapters}/attest-projection.js +0 -0
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Council manifest helpers: file-based multi-agent coordination primitives.
3
3
  *
4
- * Lives under .harnery/councils/ alongside heartbeats + scratchpads. Council
4
+ * Lives under .harnery/councils/ alongside heartbeats + journals. Council
5
5
  * lifecycle commands serialize manifest mutations through a shared flock;
6
6
  * round contribution files are per-member and don't need shared locking.
7
7
  */
@@ -176,7 +176,7 @@ export function setCouncilSteward(councilId, steward) {
176
176
  * next-app's same-named constant. */
177
177
  const KNOWN_AGENT_STALE_WINDOW_MS = 30 * 24 * 60 * 60 * 1000;
178
178
  /**
179
- * Active heartbeats + recently-archived scratchpads, deduped by name.
179
+ * Active heartbeats + recently-archived journals, deduped by name.
180
180
  * Used by `agents council set-steward` to refuse arbitrary names;
181
181
  * pass `--allow-unknown` to bypass when bootstrapping a new agent.
182
182
  */
@@ -185,7 +185,7 @@ export function listKnownAgents() {
185
185
  if (!root)
186
186
  return [];
187
187
  const activeDir = resolve(root, ".harnery", "active");
188
- const archiveDir = resolve(root, ".harnery", "scratch", "archived");
188
+ const archiveDir = resolve(root, ".harnery", "journal", "archived");
189
189
  const byName = new Map();
190
190
  if (existsSync(activeDir)) {
191
191
  for (const f of readdirSync(activeDir)) {
@@ -220,7 +220,7 @@ export function listKnownAgents() {
220
220
  continue;
221
221
  try {
222
222
  const head = readFileSync(resolve(archiveDir, f), "utf8").slice(0, 200);
223
- const nameMatch = head.match(/^#\s+Scratchpad:\s+(agent-[A-Za-z][A-Za-z0-9_-]*)/m);
223
+ const nameMatch = head.match(/^#\s+Journal:\s+(agent-[A-Za-z][A-Za-z0-9_-]*)/m);
224
224
  if (!nameMatch)
225
225
  continue;
226
226
  const name = nameMatch[1];
@@ -504,7 +504,7 @@ export function writeContribution(councilId, round, memberName, body) {
504
504
  * Path to the round-N prompts directory: `.harnery/councils/<id>/round-N/prompts/`.
505
505
  * Sibling to the contribution files. Holds one `<member>.md` per non-self
506
506
  * council member, drafted by the steward, read by the operator (copy-paste
507
- * into each agent harness) and the web UI (per-member panel).
507
+ * into each agent adapter) and the web UI (per-member panel).
508
508
  */
509
509
  export function promptsDir(councilId, round) {
510
510
  const rd = roundDir(councilId, round);
@@ -549,9 +549,9 @@ const SUBMIT_FOOTER_MARKER = "<!-- council-submit-footer -->";
549
549
  * Build the submit footer appended to every steward-drafted prompt. This is the
550
550
  * load-bearing instruction that a contribution composed in chat is NOT recorded;
551
551
  * the agent must run the command below. It rides on the prompt (the one
552
- * artifact the operator always pastes) so it reaches every harness regardless of
552
+ * artifact the operator always pastes) so it reaches every adapter regardless of
553
553
  * whether the convene-time invitation was delivered or a `/council` skill is
554
- * available. Without it, agents (esp. non-Claude harnesses with no skill) write
554
+ * available. Without it, agents (esp. non-Claude adapters with no skill) write
555
555
  * their take as a reply and end the turn, leaving the council showing them as
556
556
  * still-pending. Visible markdown (not an HTML comment) so the agent reads it.
557
557
  */
@@ -567,7 +567,7 @@ export function buildSubmitFooter(councilId) {
567
567
  `# longer write-up? ${bin} agents council contribute ${councilId} --file <path>`,
568
568
  "```",
569
569
  "",
570
- '_(Or invoke the `council` skill in your harness: `/council contribute` in Claude Code, `$council` / "use the council skill" in Codex/Cursor, for the same flow with routing guards.)_',
570
+ '_(Or invoke the `council` skill in your adapter: `/council contribute` in Claude Code, `$council` / "use the council skill" in Codex/Cursor, for the same flow with routing guards.)_',
571
571
  ].join("\n");
572
572
  }
573
573
  /** Strip an appended submit footer from a prompt body, if present. */
@@ -14,6 +14,13 @@ export interface ExecResult {
14
14
  * child that handles the signal cleanly still exits 0, so the exit code alone
15
15
  * cannot distinguish a kill from an ordinary finish. */
16
16
  timedOut?: boolean;
17
+ /** The `code` from a spawn-level failure (`proc` "error" event), e.g.
18
+ * "ENOENT" when the binary is absent. Absent for an ordinary process exit.
19
+ * We collapse such failures to exitCode 127 so callers' exit-code branches
20
+ * still fire, but a shell can legitimately exit 127 too; only this field
21
+ * distinguishes "the binary was never there" from "the process ran and exited
22
+ * 127". The process that knows reports it (as ADR 0044 did for `timedOut`). */
23
+ spawnErrno?: string;
17
24
  }
18
25
  export interface ExecOpts {
19
26
  cwd?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/lib/exec.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;4DAEwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,QAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAwC5E;AAED,sEAAsE;AACtE,wBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAEhG"}
1
+ {"version":3,"file":"exec.d.ts","sourceRoot":"","sources":["../../src/lib/exec.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;4DAEwD;IACxD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;mFAK+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE,QAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CA2C5E;AAED,sEAAsE;AACtE,wBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAEhG"}
package/dist/lib/exec.js CHANGED
@@ -34,7 +34,7 @@ export function exec(cmd, opts = {}) {
34
34
  timedOut = true;
35
35
  proc.kill();
36
36
  }, timeout);
37
- const finish = (exitCode, errOverride) => {
37
+ const finish = (exitCode, errOverride, spawnErrno) => {
38
38
  clearTimeout(timer);
39
39
  const stdout = Buffer.concat(out).toString("utf-8");
40
40
  const stderr = errOverride ?? Buffer.concat(err).toString("utf-8");
@@ -44,12 +44,15 @@ export function exec(cmd, opts = {}) {
44
44
  stderr: shouldTrim ? stderr.trim() : stderr.replace(/\n$/, ""),
45
45
  exitCode,
46
46
  ...(timedOut ? { timedOut: true } : {}),
47
+ ...(spawnErrno ? { spawnErrno } : {}),
47
48
  });
48
49
  };
49
50
  // ENOENT (binary not found) and similar spawn failures surface here rather
50
51
  // than throwing: resolve with 127 + the message so callers' exitCode
51
- // branches handle it instead of crashing on an unhandled rejection.
52
- proc.on("error", (e) => finish(127, e.message));
52
+ // branches handle it instead of crashing on an unhandled rejection. The
53
+ // errno (e.g. "ENOENT") is carried through so a real missing binary is
54
+ // distinguishable from a shell that merely exited 127.
55
+ proc.on("error", (e) => finish(127, e.message, e.code));
53
56
  proc.on("close", (code) => finish(code ?? 1));
54
57
  });
55
58
  }
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Local collision policy: a fresh heartbeat alone is not enough to block.
10
10
  * If the namesake has no live pid-map process (crashed session, healed
11
- * zombie, or abandoned harness), reclaim that heartbeat and continue.
11
+ * zombie, or abandoned adapter), reclaim that heartbeat and continue.
12
12
  * Refuse only when another process is still alive, or when cached remote
13
13
  * presence reports the name.
14
14
  */
@@ -40,7 +40,7 @@ export interface IdentityAssumeResult {
40
40
  * presence. No network call occurs; absent presence degrades to local-only. */
41
41
  export declare function findIdentityConflict(coordRoot: string, instanceId: string, name: string, nowMs?: number): IdentityConflict | null;
42
42
  /**
43
- * Drop a local namesake whose harness process is gone. Fresh heartbeats can
43
+ * Drop a local namesake whose adapter process is gone. Fresh heartbeats can
44
44
  * linger after a crash (or after heartbeat heal without a live pid-map), and
45
45
  * `identity assume` is the supported takeover path — operators should not
46
46
  * need a separate kill/sweep step.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * Local collision policy: a fresh heartbeat alone is not enough to block.
10
10
  * If the namesake has no live pid-map process (crashed session, healed
11
- * zombie, or abandoned harness), reclaim that heartbeat and continue.
11
+ * zombie, or abandoned adapter), reclaim that heartbeat and continue.
12
12
  * Refuse only when another process is still alive, or when cached remote
13
13
  * presence reports the name.
14
14
  */
@@ -78,7 +78,7 @@ export function findIdentityConflict(coordRoot, instanceId, name, nowMs = Date.n
78
78
  return null;
79
79
  }
80
80
  /**
81
- * Drop a local namesake whose harness process is gone. Fresh heartbeats can
81
+ * Drop a local namesake whose adapter process is gone. Fresh heartbeats can
82
82
  * linger after a crash (or after heartbeat heal without a live pid-map), and
83
83
  * `identity assume` is the supported takeover path — operators should not
84
84
  * need a separate kill/sweep step.
@@ -89,13 +89,13 @@ export function reclaimAbandonedLocalConflict(coordRoot, conflict) {
89
89
  if (instanceHasLivePid(coordRoot, conflict.instance_id))
90
90
  return false;
91
91
  const hbPath = join(coordRoot, ".harnery", "active", `${conflict.instance_id}.json`);
92
- let harness = "claude-code";
92
+ let adapter = "claude-code";
93
93
  let sessionId = conflict.instance_id;
94
94
  let ageSecs;
95
95
  if (existsSync(hbPath)) {
96
96
  try {
97
97
  const hb = JSON.parse(readFileSync(hbPath, "utf8"));
98
- harness = harnessOf(hb.platform);
98
+ adapter = adapterOf(hb.platform);
99
99
  sessionId = hb.session_id || conflict.instance_id;
100
100
  const ts = Date.parse(hb.last_heartbeat);
101
101
  if (Number.isFinite(ts))
@@ -117,7 +117,7 @@ export function reclaimAbandonedLocalConflict(coordRoot, conflict) {
117
117
  event_type: "health.heartbeat_swept",
118
118
  instance_id: conflict.instance_id,
119
119
  session_id: sessionId,
120
- harness,
120
+ adapter,
121
121
  source: "agent-coord",
122
122
  data: {
123
123
  reason: "stale",
@@ -186,7 +186,7 @@ function acquireLock(coordRoot) {
186
186
  }
187
187
  throw new IdentityAssumeError("identity_busy", "another identity assumption is in progress; retry in a moment");
188
188
  }
189
- function harnessOf(platform) {
189
+ function adapterOf(platform) {
190
190
  if (platform === "cursor")
191
191
  return "cursor";
192
192
  if (platform === "codex")
@@ -239,7 +239,7 @@ export function assumeIdentity(coordRoot, instanceId, target) {
239
239
  event_type: "identity.assumed",
240
240
  instance_id: instanceId,
241
241
  session_id: hb.session_id,
242
- harness: harnessOf(hb.platform),
242
+ adapter: adapterOf(hb.platform),
243
243
  data: {
244
244
  name: identity.name,
245
245
  agent_id: identity.agent_id,
@@ -21,7 +21,7 @@
21
21
  export declare function readSkillsExclude(projectRoot: string): Set<string>;
22
22
  interface ApplyOpts {
23
23
  binName: string;
24
- harness: string;
24
+ adapter: string;
25
25
  dryRun: boolean;
26
26
  }
27
27
  export interface ApplyResult {
@@ -35,7 +35,7 @@ export interface ApplyResult {
35
35
  */
36
36
  export declare function applyInstructions(projectRoot: string, opts: ApplyOpts): ApplyResult;
37
37
  interface RemoveOpts {
38
- harness: string;
38
+ adapter: string;
39
39
  dryRun: boolean;
40
40
  }
41
41
  /**
@@ -57,7 +57,7 @@ export interface CheckResult {
57
57
  */
58
58
  export declare function checkInstructions(projectRoot: string, opts: {
59
59
  binName: string;
60
- harness: string;
60
+ adapter: string;
61
61
  }): CheckResult;
62
62
  export {};
63
63
  //# sourceMappingURL=apply.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA4CH,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYlE;AAiBD,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,CA4EnF;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAmErF;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzC,WAAW,CAqCb"}
1
+ {"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA8CH,sFAAsF;AACtF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAYlE;AAiBD,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,CA8GnF;AAED,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,WAAW,CAiFrF;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACzC,WAAW,CAiDb"}
@@ -20,8 +20,9 @@
20
20
  import { existsSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync, } from "node:fs";
21
21
  import { dirname, join } from "node:path";
22
22
  import { stripJsonComments } from "../../core/config.js";
23
+ import { readHostAddendum } from "./host-addendum.js";
23
24
  import { checkOwnedSkill, checkRegion, isOwnedFile, removeRegion, spliceRegion, } from "./splice.js";
24
- import { IMPORT_REGION, INSTRUCTIONS_REGION, renderInstructionsBlock, SKILLS, } from "./templates.js";
25
+ import { HOST_ADDENDUM_REGION, IMPORT_REGION, INSTRUCTIONS_REGION, renderInstructionsBlock, SKILLS, } from "./templates.js";
25
26
  const AGENTS_FILE = "AGENTS.md";
26
27
  const CLAUDE_FILE = "CLAUDE.md";
27
28
  const CLAUDE_SKILLS_DIR = join(".claude", "skills");
@@ -54,8 +55,8 @@ export function readSkillsExclude(projectRoot) {
54
55
  * codex get the block but no skill files, so both read false there. Kept in one
55
56
  * place so `applyInstructions` and `checkInstructions` render byte-identical blocks.
56
57
  */
57
- function blockSkills(projectRoot, harness) {
58
- const claudeCode = harness === "claude-code";
58
+ function blockSkills(projectRoot, adapter) {
59
+ const claudeCode = adapter === "claude-code";
59
60
  const exclude = readSkillsExclude(projectRoot);
60
61
  return {
61
62
  decide: claudeCode && !exclude.has("harn-decide"),
@@ -70,28 +71,57 @@ function blockSkills(projectRoot, harness) {
70
71
  export function applyInstructions(projectRoot, opts) {
71
72
  const actions = [];
72
73
  const warnings = [];
73
- const claudeCode = opts.harness === "claude-code";
74
+ const claudeCode = opts.adapter === "claude-code";
74
75
  // dry-run narrates the future ("would create"); a real run narrates the past.
75
76
  const verbed = (base, past) => (opts.dryRun ? `would ${base}` : past);
77
+ // Resolve the host addendum before touching a single file, so a bad path
78
+ // aborts the whole run instead of leaving AGENTS.md half-updated.
79
+ const addendum = readHostAddendum(projectRoot);
76
80
  // ── AGENTS.md orientation block ─────────────────────────────────────────
77
81
  const agentsPath = join(projectRoot, AGENTS_FILE);
78
82
  const agentsExisted = existsSync(agentsPath);
79
83
  const agentsBefore = agentsExisted ? readFileSync(agentsPath, "utf8") : "";
80
- const body = renderInstructionsBlock(opts.binName, blockSkills(projectRoot, opts.harness));
84
+ const body = renderInstructionsBlock(opts.binName, blockSkills(projectRoot, opts.adapter));
81
85
  const spliced = spliceRegion(agentsBefore, INSTRUCTIONS_REGION, body);
82
86
  if (!spliced.changed) {
83
87
  actions.push(`· ${AGENTS_FILE} instructions block already current`);
84
88
  }
89
+ else if (!agentsExisted) {
90
+ actions.push(`+ ${verbed("create", "created")} ${AGENTS_FILE} with the instructions block`);
91
+ }
92
+ else if (!spliced.had) {
93
+ actions.push(`+ ${verbed("inject", "injected")} the instructions block into ${AGENTS_FILE}`);
94
+ }
85
95
  else {
86
- if (!opts.dryRun)
87
- writeFileSync(agentsPath, spliced.text);
88
- if (!agentsExisted)
89
- actions.push(`+ ${verbed("create", "created")} ${AGENTS_FILE} with the instructions block`);
90
- else if (!spliced.had)
91
- actions.push(`+ ${verbed("inject", "injected")} the instructions block into ${AGENTS_FILE}`);
92
- else
93
- actions.push(`~ ${verbed("update", "updated")} the instructions block in ${AGENTS_FILE}`);
96
+ actions.push(`~ ${verbed("update", "updated")} the instructions block in ${AGENTS_FILE}`);
94
97
  }
98
+ // ── host addendum (a second region, content the host owns) ──────────────
99
+ // Harnery places and versions it; what it says is none of harnery's business.
100
+ // No configured source means any region left behind belongs to a config entry
101
+ // that has since been deleted, so init takes it back out.
102
+ let agentsAfter = spliced.text;
103
+ if (addendum.configured) {
104
+ const withAddendum = spliceRegion(agentsAfter, HOST_ADDENDUM_REGION, addendum.body);
105
+ agentsAfter = withAddendum.text;
106
+ if (!withAddendum.changed) {
107
+ actions.push(`· ${AGENTS_FILE} host addendum already current (${addendum.relPath})`);
108
+ }
109
+ else if (!withAddendum.had) {
110
+ actions.push(`+ ${verbed("splice", "spliced")} the host addendum into ${AGENTS_FILE} (${addendum.relPath})`);
111
+ }
112
+ else {
113
+ actions.push(`~ ${verbed("update", "updated")} the host addendum in ${AGENTS_FILE} (${addendum.relPath})`);
114
+ }
115
+ }
116
+ else {
117
+ const dropped = removeRegion(agentsAfter, HOST_ADDENDUM_REGION);
118
+ if (dropped.removed) {
119
+ agentsAfter = dropped.text;
120
+ actions.push(`+ ${verbed("remove", "removed")} the host addendum from ${AGENTS_FILE} (no longer configured)`);
121
+ }
122
+ }
123
+ if (!opts.dryRun && agentsAfter !== agentsBefore)
124
+ writeFileSync(agentsPath, agentsAfter);
95
125
  // ── CLAUDE.md import shim (claude-code only) ────────────────────────────
96
126
  if (claudeCode) {
97
127
  const claudePath = join(projectRoot, CLAUDE_FILE);
@@ -150,23 +180,32 @@ export function applyInstructions(projectRoot, opts) {
150
180
  export function removeInstructions(projectRoot, opts) {
151
181
  const actions = [];
152
182
  const warnings = [];
153
- const claudeCode = opts.harness === "claude-code";
154
- // ── AGENTS.md block ─────────────────────────────────────────────────────
183
+ const claudeCode = opts.adapter === "claude-code";
184
+ // ── AGENTS.md block + host addendum ─────────────────────────────────────
155
185
  const agentsPath = join(projectRoot, AGENTS_FILE);
156
186
  if (existsSync(agentsPath)) {
157
- const { text, removed } = removeRegion(readFileSync(agentsPath, "utf8"), INSTRUCTIONS_REGION);
158
- if (!removed) {
159
- actions.push(`· no instructions block in ${AGENTS_FILE}`);
187
+ // Both regions are harnery-placed, so deinit leaves neither behind. The
188
+ // addendum's *source file* is the host's and stays where it is.
189
+ const addendumGone = removeRegion(readFileSync(agentsPath, "utf8"), HOST_ADDENDUM_REGION);
190
+ if (addendumGone.removed) {
191
+ actions.push(`+ ${opts.dryRun ? "would remove" : "removed"} the host addendum from ${AGENTS_FILE}`);
160
192
  }
161
- else if (text === "") {
162
- if (!opts.dryRun)
163
- rmSync(agentsPath);
164
- actions.push(`+ ${opts.dryRun ? "would remove" : "removed"} ${AGENTS_FILE} (was block-only)`);
193
+ const { text, removed } = removeRegion(addendumGone.text, INSTRUCTIONS_REGION);
194
+ if (removed) {
195
+ actions.push(`+ ${opts.dryRun ? "would remove" : "removed"} the instructions block from ${AGENTS_FILE}`);
165
196
  }
166
- else {
167
- if (!opts.dryRun)
197
+ else if (!addendumGone.removed) {
198
+ actions.push(`· no instructions block in ${AGENTS_FILE}`);
199
+ }
200
+ if (removed || addendumGone.removed) {
201
+ if (text === "") {
202
+ if (!opts.dryRun)
203
+ rmSync(agentsPath);
204
+ actions.push(`+ ${opts.dryRun ? "would remove" : "removed"} ${AGENTS_FILE} (nothing left but ours)`);
205
+ }
206
+ else if (!opts.dryRun) {
168
207
  writeFileSync(agentsPath, text);
169
- actions.push(`+ ${opts.dryRun ? "would remove" : "removed"} the instructions block from ${AGENTS_FILE}`);
208
+ }
170
209
  }
171
210
  }
172
211
  // ── CLAUDE.md import shim (claude-code) ─────────────────────────────────
@@ -233,8 +272,17 @@ export function checkInstructions(projectRoot, opts) {
233
272
  try {
234
273
  const agentsPath = join(projectRoot, AGENTS_FILE);
235
274
  const content = existsSync(agentsPath) ? readFileSync(agentsPath, "utf8") : "";
236
- note(`${AGENTS_FILE} block`, checkRegion(content, INSTRUCTIONS_REGION, renderInstructionsBlock(opts.binName, blockSkills(projectRoot, opts.harness))));
237
- if (opts.harness === "claude-code") {
275
+ note(`${AGENTS_FILE} block`, checkRegion(content, INSTRUCTIONS_REGION, renderInstructionsBlock(opts.binName, blockSkills(projectRoot, opts.adapter))));
276
+ // A configured addendum is checked against its source; an unconfigured one
277
+ // still sitting in the file is drift too, since init would take it out.
278
+ const addendum = readHostAddendum(projectRoot);
279
+ if (addendum.configured) {
280
+ note(`${AGENTS_FILE} host addendum (${addendum.relPath})`, checkRegion(content, HOST_ADDENDUM_REGION, addendum.body));
281
+ }
282
+ else if (checkRegion(content, HOST_ADDENDUM_REGION, "") !== "missing") {
283
+ issues.push(`${AGENTS_FILE} host addendum: present but no longer configured (re-run init)`);
284
+ }
285
+ if (opts.adapter === "claude-code") {
238
286
  const exclude = readSkillsExclude(projectRoot);
239
287
  for (const skill of SKILLS) {
240
288
  if (exclude.has(skill.id))
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The host addendum: a second managed region whose *content* belongs to the
3
+ * consumer.
4
+ *
5
+ * Harnery's orientation block is deliberately generic, because it ships to
6
+ * every consumer (ADR 0007's portability split, ADR 0008's ~80-line budget). A
7
+ * project with real coordination policy of its own therefore had nowhere
8
+ * machine-managed to put it, and ended up hand-maintaining it next to the
9
+ * block, where nothing kept the two in step.
10
+ *
11
+ * The fix is declarative rather than programmatic. A consumer names a file:
12
+ *
13
+ * // .harnery/config.jsonc
14
+ * { "instructions": { "hostAddendumFile": ".agents/host-instructions.md" } }
15
+ *
16
+ * and harnery gives that file's contents the same lifecycle as its own block:
17
+ * spliced on `init`, refreshed when the file changes, reported by
18
+ * `init --check`, removed by `deinit` or by deleting the config entry. Harnery
19
+ * never parses, renders, or reasons about what the file says, which is what
20
+ * keeps the arrangement portable: the mechanism is generic even though every
21
+ * consumer's content is not.
22
+ *
23
+ * Exposing the splicer as a public primitive instead would have pushed the
24
+ * whole lifecycle onto each host, since `init` and `deinit` are registered
25
+ * inside harnery and every consumer would have had to wrap or replace them and
26
+ * reimplement apply, check, and remove. The config key keeps one implementation
27
+ * of all four.
28
+ *
29
+ * Every failure here is raised before the caller writes anything.
30
+ */
31
+ /** Dotted config key naming the addendum source, quoted in every error. */
32
+ export declare const HOST_ADDENDUM_KEY = "instructions.hostAddendumFile";
33
+ /** A host addendum that cannot be used. Callers abort before writing. */
34
+ export declare class HostAddendumError extends Error {
35
+ constructor(message: string);
36
+ }
37
+ export type HostAddendum = {
38
+ configured: false;
39
+ } | {
40
+ configured: true;
41
+ relPath: string;
42
+ body: string;
43
+ };
44
+ /**
45
+ * Resolve the configured addendum, or report that there is none.
46
+ *
47
+ * Absent config, absent key, and explicit `null` all mean "not configured",
48
+ * which is how a consumer turns the addendum off: delete the key and re-run
49
+ * `init`. Anything else that cannot become a readable file inside the project
50
+ * throws, because the alternative is an agent-facing instruction file that
51
+ * quietly lost a section the host believes is still there.
52
+ */
53
+ export declare function readHostAddendum(projectRoot: string): HostAddendum;
54
+ //# sourceMappingURL=host-addendum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host-addendum.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/host-addendum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAMH,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,kCAAkC,CAAC;AAEjE,yEAAyE;AACzE,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,EAAE,MAAM;CAI5B;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,UAAU,EAAE,KAAK,CAAA;CAAE,GACrB;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAmDlE"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * The host addendum: a second managed region whose *content* belongs to the
3
+ * consumer.
4
+ *
5
+ * Harnery's orientation block is deliberately generic, because it ships to
6
+ * every consumer (ADR 0007's portability split, ADR 0008's ~80-line budget). A
7
+ * project with real coordination policy of its own therefore had nowhere
8
+ * machine-managed to put it, and ended up hand-maintaining it next to the
9
+ * block, where nothing kept the two in step.
10
+ *
11
+ * The fix is declarative rather than programmatic. A consumer names a file:
12
+ *
13
+ * // .harnery/config.jsonc
14
+ * { "instructions": { "hostAddendumFile": ".agents/host-instructions.md" } }
15
+ *
16
+ * and harnery gives that file's contents the same lifecycle as its own block:
17
+ * spliced on `init`, refreshed when the file changes, reported by
18
+ * `init --check`, removed by `deinit` or by deleting the config entry. Harnery
19
+ * never parses, renders, or reasons about what the file says, which is what
20
+ * keeps the arrangement portable: the mechanism is generic even though every
21
+ * consumer's content is not.
22
+ *
23
+ * Exposing the splicer as a public primitive instead would have pushed the
24
+ * whole lifecycle onto each host, since `init` and `deinit` are registered
25
+ * inside harnery and every consumer would have had to wrap or replace them and
26
+ * reimplement apply, check, and remove. The config key keeps one implementation
27
+ * of all four.
28
+ *
29
+ * Every failure here is raised before the caller writes anything.
30
+ */
31
+ import { readFileSync, statSync } from "node:fs";
32
+ import { isAbsolute, join, resolve, sep } from "node:path";
33
+ import { stripJsonComments } from "../../core/config.js";
34
+ /** Dotted config key naming the addendum source, quoted in every error. */
35
+ export const HOST_ADDENDUM_KEY = "instructions.hostAddendumFile";
36
+ /** A host addendum that cannot be used. Callers abort before writing. */
37
+ export class HostAddendumError extends Error {
38
+ constructor(message) {
39
+ super(message);
40
+ this.name = "HostAddendumError";
41
+ }
42
+ }
43
+ /**
44
+ * Resolve the configured addendum, or report that there is none.
45
+ *
46
+ * Absent config, absent key, and explicit `null` all mean "not configured",
47
+ * which is how a consumer turns the addendum off: delete the key and re-run
48
+ * `init`. Anything else that cannot become a readable file inside the project
49
+ * throws, because the alternative is an agent-facing instruction file that
50
+ * quietly lost a section the host believes is still there.
51
+ */
52
+ export function readHostAddendum(projectRoot) {
53
+ const configured = readConfiguredPath(projectRoot);
54
+ if (configured === null)
55
+ return { configured: false };
56
+ if (typeof configured !== "string" || configured.trim() === "") {
57
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} must be a repo-relative path to a markdown file`);
58
+ }
59
+ const relPath = configured.trim();
60
+ // An absolute path would name one machine's checkout, and this repo is cloned
61
+ // to a different location on every one of them.
62
+ if (isAbsolute(relPath)) {
63
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} must be repo-relative, not absolute (got "${relPath}")`);
64
+ }
65
+ const root = resolve(projectRoot);
66
+ const target = resolve(root, relPath);
67
+ if (target !== root && !target.startsWith(root + sep)) {
68
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} resolves outside the project ("${relPath}"); ` +
69
+ `the addendum must be a committed file in this repo`);
70
+ }
71
+ let body;
72
+ try {
73
+ if (statSync(target).isDirectory()) {
74
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} points at a directory ("${relPath}")`);
75
+ }
76
+ body = readFileSync(target, "utf8");
77
+ }
78
+ catch (err) {
79
+ if (err instanceof HostAddendumError)
80
+ throw err;
81
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} not found or unreadable ("${relPath}"): ${err.message}`);
82
+ }
83
+ // Splicing an empty region is never what anyone meant by configuring one, and
84
+ // it fails silently: the file looks fine and the policy simply is not there.
85
+ if (body.trim() === "") {
86
+ throw new HostAddendumError(`${HOST_ADDENDUM_KEY} is empty ("${relPath}")`);
87
+ }
88
+ // Trimmed because the splicer supplies the newlines around a region body;
89
+ // otherwise a trailing newline in the file shows up as a blank line that
90
+ // makes every re-render look like a change.
91
+ return { configured: true, relPath, body: body.trim() };
92
+ }
93
+ /** The raw config value, or null when the file, the section, or the key is absent. */
94
+ function readConfiguredPath(projectRoot) {
95
+ const configPath = join(projectRoot, ".harnery", "config.jsonc");
96
+ let parsed;
97
+ try {
98
+ parsed = JSON.parse(stripJsonComments(readFileSync(configPath, "utf8")));
99
+ }
100
+ catch {
101
+ // No config, or one harnery cannot parse. The rest of init already tolerates
102
+ // that, so the addendum does too rather than blocking an unrelated run.
103
+ return null;
104
+ }
105
+ const value = parsed?.instructions?.hostAddendumFile;
106
+ return value === undefined || value === null ? null : value;
107
+ }
@@ -14,6 +14,13 @@
14
14
  export declare const INSTRUCTIONS_REGION = "instructions";
15
15
  /** Managed-region name for the CLAUDE.md `@AGENTS.md` import shim. */
16
16
  export declare const IMPORT_REGION = "import";
17
+ /**
18
+ * Managed-region name for the consumer's own coordination policy, spliced from
19
+ * the file named by `instructions.hostAddendumFile`. Harnery places and
20
+ * versions the region; the content is the host's and is never rendered here.
21
+ * See `host-addendum.ts`.
22
+ */
23
+ export declare const HOST_ADDENDUM_REGION = "host-addendum";
17
24
  /** Which shipped skills exist in the project the block is rendered for. */
18
25
  export interface BlockSkills {
19
26
  /** the `harn-decide` skill file is present (claude-code, not excluded) */
@@ -29,15 +36,15 @@ export interface BlockSkills {
29
36
  * `harn-council`) even for a renamed bin; only command strings track `binName`.
30
37
  *
31
38
  * The block only points at a skill that actually exists here: a host that
32
- * excludes one via `skills.exclude`, or a harness with no skill primitive
39
+ * excludes one via `skills.exclude`, or a adapter with no skill primitive
33
40
  * (cursor/codex get the block but no skill files), gets a `--help` pointer
34
41
  * instead of a dangling reference to a skill it doesn't have.
35
42
  */
36
43
  export declare function renderInstructionsBlock(binName: string, skills?: BlockSkills): string;
37
- /** A shipped skill: its harness-relative file path + a bin-name-aware renderer. */
44
+ /** A shipped skill: its adapter-relative file path + a bin-name-aware renderer. */
38
45
  export interface SkillTemplate {
39
46
  id: string;
40
- /** path under the harness skill dir, e.g. `harn-decide/SKILL.md` */
47
+ /** path under the adapter skill dir, e.g. `harn-decide/SKILL.md` */
41
48
  relPath: string;
42
49
  render: (binName: string) => string;
43
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AAEtC,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAA6C,GACpD,MAAM,CA4DR;AAID,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAsKD,eAAO,MAAM,MAAM,EAAE,aAAa,EA4BjC,CAAC"}
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../src/lib/instructions/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAClD,sEAAsE;AACtE,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,0EAA0E;IAC1E,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,WAA6C,GACpD,MAAM,CAkFR;AAID,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAsKD,eAAO,MAAM,MAAM,EAAE,aAAa,EA4BjC,CAAC"}