looply-cli 0.0.0-stage → 0.3.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 (793) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -3
  3. package/dist/.src-hash +1 -0
  4. package/dist/acceptance-observe.d.ts +108 -0
  5. package/dist/acceptance-observe.d.ts.map +1 -0
  6. package/dist/acceptance-observe.js +152 -0
  7. package/dist/acceptance-observe.js.map +1 -0
  8. package/dist/agent-cmd.d.ts +131 -0
  9. package/dist/agent-cmd.d.ts.map +1 -0
  10. package/dist/agent-cmd.js +154 -0
  11. package/dist/agent-cmd.js.map +1 -0
  12. package/dist/agent-contained.d.ts +114 -0
  13. package/dist/agent-contained.d.ts.map +1 -0
  14. package/dist/agent-contained.js +292 -0
  15. package/dist/agent-contained.js.map +1 -0
  16. package/dist/agent-driver.d.ts +130 -0
  17. package/dist/agent-driver.d.ts.map +1 -0
  18. package/dist/agent-driver.js +170 -0
  19. package/dist/agent-driver.js.map +1 -0
  20. package/dist/agent-envelope.d.ts +94 -0
  21. package/dist/agent-envelope.d.ts.map +1 -0
  22. package/dist/agent-envelope.js +214 -0
  23. package/dist/agent-envelope.js.map +1 -0
  24. package/dist/agent-exec.d.ts +182 -0
  25. package/dist/agent-exec.d.ts.map +1 -0
  26. package/dist/agent-exec.js +125 -0
  27. package/dist/agent-exec.js.map +1 -0
  28. package/dist/agent-runtime.d.ts +23 -0
  29. package/dist/agent-runtime.d.ts.map +1 -0
  30. package/dist/agent-runtime.js +143 -0
  31. package/dist/agent-runtime.js.map +1 -0
  32. package/dist/approval-gate-read.d.ts +66 -0
  33. package/dist/approval-gate-read.d.ts.map +1 -0
  34. package/dist/approval-gate-read.js +138 -0
  35. package/dist/approval-gate-read.js.map +1 -0
  36. package/dist/approval-resolution.d.ts +87 -0
  37. package/dist/approval-resolution.d.ts.map +1 -0
  38. package/dist/approval-resolution.js +100 -0
  39. package/dist/approval-resolution.js.map +1 -0
  40. package/dist/approval-resumes.d.ts +102 -0
  41. package/dist/approval-resumes.d.ts.map +1 -0
  42. package/dist/approval-resumes.js +167 -0
  43. package/dist/approval-resumes.js.map +1 -0
  44. package/dist/ask-brain.d.ts +167 -0
  45. package/dist/ask-brain.d.ts.map +1 -0
  46. package/dist/ask-brain.js +355 -0
  47. package/dist/ask-brain.js.map +1 -0
  48. package/dist/autonomy-authority.d.ts +80 -0
  49. package/dist/autonomy-authority.d.ts.map +1 -0
  50. package/dist/autonomy-authority.js +82 -0
  51. package/dist/autonomy-authority.js.map +1 -0
  52. package/dist/autonomy-controller.d.ts +321 -0
  53. package/dist/autonomy-controller.d.ts.map +1 -0
  54. package/dist/autonomy-controller.js +517 -0
  55. package/dist/autonomy-controller.js.map +1 -0
  56. package/dist/autonomy-store.d.ts +327 -0
  57. package/dist/autonomy-store.d.ts.map +1 -0
  58. package/dist/autonomy-store.js +581 -0
  59. package/dist/autonomy-store.js.map +1 -0
  60. package/dist/autonomy-tick.d.ts +257 -0
  61. package/dist/autonomy-tick.d.ts.map +1 -0
  62. package/dist/autonomy-tick.js +616 -0
  63. package/dist/autonomy-tick.js.map +1 -0
  64. package/dist/bin.d.ts +3 -0
  65. package/dist/bin.d.ts.map +1 -0
  66. package/dist/bin.js +2727 -0
  67. package/dist/bin.js.map +1 -0
  68. package/dist/brain-advice.d.ts +21 -0
  69. package/dist/brain-advice.d.ts.map +1 -0
  70. package/dist/brain-advice.js +51 -0
  71. package/dist/brain-advice.js.map +1 -0
  72. package/dist/candidate-replay-runtime.d.ts +125 -0
  73. package/dist/candidate-replay-runtime.d.ts.map +1 -0
  74. package/dist/candidate-replay-runtime.js +188 -0
  75. package/dist/candidate-replay-runtime.js.map +1 -0
  76. package/dist/checkout-carry.d.ts +76 -0
  77. package/dist/checkout-carry.d.ts.map +1 -0
  78. package/dist/checkout-carry.js +125 -0
  79. package/dist/checkout-carry.js.map +1 -0
  80. package/dist/citation-readers.d.ts +26 -0
  81. package/dist/citation-readers.d.ts.map +1 -0
  82. package/dist/citation-readers.js +102 -0
  83. package/dist/citation-readers.js.map +1 -0
  84. package/dist/command-receipts.d.ts +79 -0
  85. package/dist/command-receipts.d.ts.map +1 -0
  86. package/dist/command-receipts.js +143 -0
  87. package/dist/command-receipts.js.map +1 -0
  88. package/dist/command-runner.d.ts +32 -0
  89. package/dist/command-runner.d.ts.map +1 -0
  90. package/dist/command-runner.js +108 -0
  91. package/dist/command-runner.js.map +1 -0
  92. package/dist/compatible-sets.d.ts +67 -0
  93. package/dist/compatible-sets.d.ts.map +1 -0
  94. package/dist/compatible-sets.js +81 -0
  95. package/dist/compatible-sets.js.map +1 -0
  96. package/dist/compile-check.d.ts +31 -0
  97. package/dist/compile-check.d.ts.map +1 -0
  98. package/dist/compile-check.js +34 -0
  99. package/dist/compile-check.js.map +1 -0
  100. package/dist/compile-store.d.ts +16 -0
  101. package/dist/compile-store.d.ts.map +1 -0
  102. package/dist/compile-store.js +21 -0
  103. package/dist/compile-store.js.map +1 -0
  104. package/dist/completion.d.ts +106 -0
  105. package/dist/completion.d.ts.map +1 -0
  106. package/dist/completion.js +131 -0
  107. package/dist/completion.js.map +1 -0
  108. package/dist/config.d.ts +549 -0
  109. package/dist/config.d.ts.map +1 -0
  110. package/dist/config.js +763 -0
  111. package/dist/config.js.map +1 -0
  112. package/dist/control-file.d.ts +142 -0
  113. package/dist/control-file.d.ts.map +1 -0
  114. package/dist/control-file.js +144 -0
  115. package/dist/control-file.js.map +1 -0
  116. package/dist/coordinator-state.d.ts +131 -0
  117. package/dist/coordinator-state.d.ts.map +1 -0
  118. package/dist/coordinator-state.js +380 -0
  119. package/dist/coordinator-state.js.map +1 -0
  120. package/dist/coordinator.d.ts +95 -0
  121. package/dist/coordinator.d.ts.map +1 -0
  122. package/dist/coordinator.js +97 -0
  123. package/dist/coordinator.js.map +1 -0
  124. package/dist/cursor-store.d.ts +53 -0
  125. package/dist/cursor-store.d.ts.map +1 -0
  126. package/dist/cursor-store.js +98 -0
  127. package/dist/cursor-store.js.map +1 -0
  128. package/dist/daemon-cmd.d.ts +239 -0
  129. package/dist/daemon-cmd.d.ts.map +1 -0
  130. package/dist/daemon-cmd.js +1751 -0
  131. package/dist/daemon-cmd.js.map +1 -0
  132. package/dist/daemon-lock.d.ts +140 -0
  133. package/dist/daemon-lock.d.ts.map +1 -0
  134. package/dist/daemon-lock.js +352 -0
  135. package/dist/daemon-lock.js.map +1 -0
  136. package/dist/daemon-recovery.d.ts +78 -0
  137. package/dist/daemon-recovery.d.ts.map +1 -0
  138. package/dist/daemon-recovery.js +161 -0
  139. package/dist/daemon-recovery.js.map +1 -0
  140. package/dist/daemon.d.ts +368 -0
  141. package/dist/daemon.d.ts.map +1 -0
  142. package/dist/daemon.js +601 -0
  143. package/dist/daemon.js.map +1 -0
  144. package/dist/declared-response-shape.d.ts +93 -0
  145. package/dist/declared-response-shape.d.ts.map +1 -0
  146. package/dist/declared-response-shape.js +200 -0
  147. package/dist/declared-response-shape.js.map +1 -0
  148. package/dist/declared-surfaces.d.ts +16 -0
  149. package/dist/declared-surfaces.d.ts.map +1 -0
  150. package/dist/declared-surfaces.js +19 -0
  151. package/dist/declared-surfaces.js.map +1 -0
  152. package/dist/depends-review.d.ts +113 -0
  153. package/dist/depends-review.d.ts.map +1 -0
  154. package/dist/depends-review.js +110 -0
  155. package/dist/depends-review.js.map +1 -0
  156. package/dist/doctor.d.ts +91 -0
  157. package/dist/doctor.d.ts.map +1 -0
  158. package/dist/doctor.js +71 -0
  159. package/dist/doctor.js.map +1 -0
  160. package/dist/edge-approval.d.ts +105 -0
  161. package/dist/edge-approval.d.ts.map +1 -0
  162. package/dist/edge-approval.js +100 -0
  163. package/dist/edge-approval.js.map +1 -0
  164. package/dist/evidence-cache.d.ts +45 -0
  165. package/dist/evidence-cache.d.ts.map +1 -0
  166. package/dist/evidence-cache.js +90 -0
  167. package/dist/evidence-cache.js.map +1 -0
  168. package/dist/evidence-cmd.d.ts +133 -0
  169. package/dist/evidence-cmd.d.ts.map +1 -0
  170. package/dist/evidence-cmd.js +347 -0
  171. package/dist/evidence-cmd.js.map +1 -0
  172. package/dist/evidence-facts.d.ts +40 -0
  173. package/dist/evidence-facts.d.ts.map +1 -0
  174. package/dist/evidence-facts.js +114 -0
  175. package/dist/evidence-facts.js.map +1 -0
  176. package/dist/exclusive-lock.d.ts +52 -0
  177. package/dist/exclusive-lock.d.ts.map +1 -0
  178. package/dist/exclusive-lock.js +150 -0
  179. package/dist/exclusive-lock.js.map +1 -0
  180. package/dist/exec-domains.d.ts +140 -0
  181. package/dist/exec-domains.d.ts.map +1 -0
  182. package/dist/exec-domains.js +287 -0
  183. package/dist/exec-domains.js.map +1 -0
  184. package/dist/exemption-store.d.ts +197 -0
  185. package/dist/exemption-store.d.ts.map +1 -0
  186. package/dist/exemption-store.js +266 -0
  187. package/dist/exemption-store.js.map +1 -0
  188. package/dist/explicit-start-gate.d.ts +96 -0
  189. package/dist/explicit-start-gate.d.ts.map +1 -0
  190. package/dist/explicit-start-gate.js +103 -0
  191. package/dist/explicit-start-gate.js.map +1 -0
  192. package/dist/fs-trouble.d.ts +70 -0
  193. package/dist/fs-trouble.d.ts.map +1 -0
  194. package/dist/fs-trouble.js +98 -0
  195. package/dist/fs-trouble.js.map +1 -0
  196. package/dist/gate.d.ts +278 -0
  197. package/dist/gate.d.ts.map +1 -0
  198. package/dist/gate.js +278 -0
  199. package/dist/gate.js.map +1 -0
  200. package/dist/git-driver.d.ts +519 -0
  201. package/dist/git-driver.d.ts.map +1 -0
  202. package/dist/git-driver.js +900 -0
  203. package/dist/git-driver.js.map +1 -0
  204. package/dist/git-push-executor.d.ts +41 -0
  205. package/dist/git-push-executor.d.ts.map +1 -0
  206. package/dist/git-push-executor.js +142 -0
  207. package/dist/git-push-executor.js.map +1 -0
  208. package/dist/glob.d.ts +26 -0
  209. package/dist/glob.d.ts.map +1 -0
  210. package/dist/glob.js +93 -0
  211. package/dist/glob.js.map +1 -0
  212. package/dist/goal-adaptive.d.ts +295 -0
  213. package/dist/goal-adaptive.d.ts.map +1 -0
  214. package/dist/goal-adaptive.js +393 -0
  215. package/dist/goal-adaptive.js.map +1 -0
  216. package/dist/goal-compile.d.ts +342 -0
  217. package/dist/goal-compile.d.ts.map +1 -0
  218. package/dist/goal-compile.js +444 -0
  219. package/dist/goal-compile.js.map +1 -0
  220. package/dist/goal-depends-executor.d.ts +55 -0
  221. package/dist/goal-depends-executor.d.ts.map +1 -0
  222. package/dist/goal-depends-executor.js +202 -0
  223. package/dist/goal-depends-executor.js.map +1 -0
  224. package/dist/goal-execution-evidence.d.ts +135 -0
  225. package/dist/goal-execution-evidence.d.ts.map +1 -0
  226. package/dist/goal-execution-evidence.js +159 -0
  227. package/dist/goal-execution-evidence.js.map +1 -0
  228. package/dist/goal-gap.d.ts +140 -0
  229. package/dist/goal-gap.d.ts.map +1 -0
  230. package/dist/goal-gap.js +197 -0
  231. package/dist/goal-gap.js.map +1 -0
  232. package/dist/goal-met-target.d.ts +98 -0
  233. package/dist/goal-met-target.d.ts.map +1 -0
  234. package/dist/goal-met-target.js +92 -0
  235. package/dist/goal-met-target.js.map +1 -0
  236. package/dist/goal-ownership.d.ts +416 -0
  237. package/dist/goal-ownership.d.ts.map +1 -0
  238. package/dist/goal-ownership.js +576 -0
  239. package/dist/goal-ownership.js.map +1 -0
  240. package/dist/goal-runs.d.ts +82 -0
  241. package/dist/goal-runs.d.ts.map +1 -0
  242. package/dist/goal-runs.js +120 -0
  243. package/dist/goal-runs.js.map +1 -0
  244. package/dist/goal-store.d.ts +146 -0
  245. package/dist/goal-store.d.ts.map +1 -0
  246. package/dist/goal-store.js +294 -0
  247. package/dist/goal-store.js.map +1 -0
  248. package/dist/goal-view.d.ts +156 -0
  249. package/dist/goal-view.d.ts.map +1 -0
  250. package/dist/goal-view.js +499 -0
  251. package/dist/goal-view.js.map +1 -0
  252. package/dist/governed-approvals.d.ts +152 -0
  253. package/dist/governed-approvals.d.ts.map +1 -0
  254. package/dist/governed-approvals.js +246 -0
  255. package/dist/governed-approvals.js.map +1 -0
  256. package/dist/governed-broker.d.ts +169 -0
  257. package/dist/governed-broker.d.ts.map +1 -0
  258. package/dist/governed-broker.js +196 -0
  259. package/dist/governed-broker.js.map +1 -0
  260. package/dist/governed-run.d.ts +220 -0
  261. package/dist/governed-run.d.ts.map +1 -0
  262. package/dist/governed-run.js +406 -0
  263. package/dist/governed-run.js.map +1 -0
  264. package/dist/grant-reconcile.d.ts +63 -0
  265. package/dist/grant-reconcile.d.ts.map +1 -0
  266. package/dist/grant-reconcile.js +121 -0
  267. package/dist/grant-reconcile.js.map +1 -0
  268. package/dist/index-for-head.d.ts +56 -0
  269. package/dist/index-for-head.d.ts.map +1 -0
  270. package/dist/index-for-head.js +103 -0
  271. package/dist/index-for-head.js.map +1 -0
  272. package/dist/index.d.ts +39 -0
  273. package/dist/index.d.ts.map +1 -0
  274. package/dist/index.js +55 -0
  275. package/dist/index.js.map +1 -0
  276. package/dist/init-detect.d.ts +39 -0
  277. package/dist/init-detect.d.ts.map +1 -0
  278. package/dist/init-detect.js +188 -0
  279. package/dist/init-detect.js.map +1 -0
  280. package/dist/integration-deps.d.ts +62 -0
  281. package/dist/integration-deps.d.ts.map +1 -0
  282. package/dist/integration-deps.js +251 -0
  283. package/dist/integration-deps.js.map +1 -0
  284. package/dist/integration-runtime.d.ts +458 -0
  285. package/dist/integration-runtime.d.ts.map +1 -0
  286. package/dist/integration-runtime.js +681 -0
  287. package/dist/integration-runtime.js.map +1 -0
  288. package/dist/integration.d.ts +45 -0
  289. package/dist/integration.d.ts.map +1 -0
  290. package/dist/integration.js +87 -0
  291. package/dist/integration.js.map +1 -0
  292. package/dist/integrator.d.ts +84 -0
  293. package/dist/integrator.d.ts.map +1 -0
  294. package/dist/integrator.js +193 -0
  295. package/dist/integrator.js.map +1 -0
  296. package/dist/lane-claims.d.ts +174 -0
  297. package/dist/lane-claims.d.ts.map +1 -0
  298. package/dist/lane-claims.js +218 -0
  299. package/dist/lane-claims.js.map +1 -0
  300. package/dist/lane-coverage.d.ts +87 -0
  301. package/dist/lane-coverage.d.ts.map +1 -0
  302. package/dist/lane-coverage.js +129 -0
  303. package/dist/lane-coverage.js.map +1 -0
  304. package/dist/ledger-replay.d.ts +115 -0
  305. package/dist/ledger-replay.d.ts.map +1 -0
  306. package/dist/ledger-replay.js +155 -0
  307. package/dist/ledger-replay.js.map +1 -0
  308. package/dist/ledger-store.d.ts +68 -0
  309. package/dist/ledger-store.d.ts.map +1 -0
  310. package/dist/ledger-store.js +111 -0
  311. package/dist/ledger-store.js.map +1 -0
  312. package/dist/loop-safety-observer.d.ts +132 -0
  313. package/dist/loop-safety-observer.d.ts.map +1 -0
  314. package/dist/loop-safety-observer.js +76 -0
  315. package/dist/loop-safety-observer.js.map +1 -0
  316. package/dist/loop-safety-store.d.ts +339 -0
  317. package/dist/loop-safety-store.d.ts.map +1 -0
  318. package/dist/loop-safety-store.js +800 -0
  319. package/dist/loop-safety-store.js.map +1 -0
  320. package/dist/machine-store.d.ts +54 -0
  321. package/dist/machine-store.d.ts.map +1 -0
  322. package/dist/machine-store.js +149 -0
  323. package/dist/machine-store.js.map +1 -0
  324. package/dist/mcp-main.d.ts +2 -0
  325. package/dist/mcp-main.d.ts.map +1 -0
  326. package/dist/mcp-main.js +116 -0
  327. package/dist/mcp-main.js.map +1 -0
  328. package/dist/mcp-server.d.ts +72 -0
  329. package/dist/mcp-server.d.ts.map +1 -0
  330. package/dist/mcp-server.js +259 -0
  331. package/dist/mcp-server.js.map +1 -0
  332. package/dist/model-routing.d.ts +75 -0
  333. package/dist/model-routing.d.ts.map +1 -0
  334. package/dist/model-routing.js +108 -0
  335. package/dist/model-routing.js.map +1 -0
  336. package/dist/model-transport.d.ts +188 -0
  337. package/dist/model-transport.d.ts.map +1 -0
  338. package/dist/model-transport.js +625 -0
  339. package/dist/model-transport.js.map +1 -0
  340. package/dist/notify-cadence.d.ts +55 -0
  341. package/dist/notify-cadence.d.ts.map +1 -0
  342. package/dist/notify-cadence.js +68 -0
  343. package/dist/notify-cadence.js.map +1 -0
  344. package/dist/notify-channel.d.ts +69 -0
  345. package/dist/notify-channel.d.ts.map +1 -0
  346. package/dist/notify-channel.js +151 -0
  347. package/dist/notify-channel.js.map +1 -0
  348. package/dist/notify.d.ts +71 -0
  349. package/dist/notify.d.ts.map +1 -0
  350. package/dist/notify.js +125 -0
  351. package/dist/notify.js.map +1 -0
  352. package/dist/observation-inventory.d.ts +65 -0
  353. package/dist/observation-inventory.d.ts.map +1 -0
  354. package/dist/observation-inventory.js +139 -0
  355. package/dist/observation-inventory.js.map +1 -0
  356. package/dist/owned-children.d.ts +45 -0
  357. package/dist/owned-children.d.ts.map +1 -0
  358. package/dist/owned-children.js +64 -0
  359. package/dist/owned-children.js.map +1 -0
  360. package/dist/packet-for-goal.d.ts +19 -0
  361. package/dist/packet-for-goal.d.ts.map +1 -0
  362. package/dist/packet-for-goal.js +32 -0
  363. package/dist/packet-for-goal.js.map +1 -0
  364. package/dist/pair-cmd.d.ts +85 -0
  365. package/dist/pair-cmd.d.ts.map +1 -0
  366. package/dist/pair-cmd.js +205 -0
  367. package/dist/pair-cmd.js.map +1 -0
  368. package/dist/partial-asker.d.ts +96 -0
  369. package/dist/partial-asker.d.ts.map +1 -0
  370. package/dist/partial-asker.js +117 -0
  371. package/dist/partial-asker.js.map +1 -0
  372. package/dist/pdf-text-lines.d.ts +17 -0
  373. package/dist/pdf-text-lines.d.ts.map +1 -0
  374. package/dist/pdf-text-lines.js +70 -0
  375. package/dist/pdf-text-lines.js.map +1 -0
  376. package/dist/pdf-text-worker.d.ts +2 -0
  377. package/dist/pdf-text-worker.d.ts.map +1 -0
  378. package/dist/pdf-text-worker.js +81 -0
  379. package/dist/pdf-text-worker.js.map +1 -0
  380. package/dist/pdf-text.d.ts +56 -0
  381. package/dist/pdf-text.d.ts.map +1 -0
  382. package/dist/pdf-text.js +64 -0
  383. package/dist/pdf-text.js.map +1 -0
  384. package/dist/pending-action.d.ts +154 -0
  385. package/dist/pending-action.d.ts.map +1 -0
  386. package/dist/pending-action.js +148 -0
  387. package/dist/pending-action.js.map +1 -0
  388. package/dist/preemptor.d.ts +40 -0
  389. package/dist/preemptor.d.ts.map +1 -0
  390. package/dist/preemptor.js +49 -0
  391. package/dist/preemptor.js.map +1 -0
  392. package/dist/programme-mode.d.ts +29 -0
  393. package/dist/programme-mode.d.ts.map +1 -0
  394. package/dist/programme-mode.js +50 -0
  395. package/dist/programme-mode.js.map +1 -0
  396. package/dist/progress-view.d.ts +14 -0
  397. package/dist/progress-view.d.ts.map +1 -0
  398. package/dist/progress-view.js +114 -0
  399. package/dist/progress-view.js.map +1 -0
  400. package/dist/project-graph-builder.d.ts +81 -0
  401. package/dist/project-graph-builder.d.ts.map +1 -0
  402. package/dist/project-graph-builder.js +246 -0
  403. package/dist/project-graph-builder.js.map +1 -0
  404. package/dist/project-graph-runtime.d.ts +86 -0
  405. package/dist/project-graph-runtime.d.ts.map +1 -0
  406. package/dist/project-graph-runtime.js +112 -0
  407. package/dist/project-graph-runtime.js.map +1 -0
  408. package/dist/project-index-builder.d.ts +96 -0
  409. package/dist/project-index-builder.d.ts.map +1 -0
  410. package/dist/project-index-builder.js +298 -0
  411. package/dist/project-index-builder.js.map +1 -0
  412. package/dist/project-index-facts.d.ts +51 -0
  413. package/dist/project-index-facts.d.ts.map +1 -0
  414. package/dist/project-index-facts.js +117 -0
  415. package/dist/project-index-facts.js.map +1 -0
  416. package/dist/project-index-store.d.ts +97 -0
  417. package/dist/project-index-store.d.ts.map +1 -0
  418. package/dist/project-index-store.js +140 -0
  419. package/dist/project-index-store.js.map +1 -0
  420. package/dist/project-memory-store.d.ts +127 -0
  421. package/dist/project-memory-store.d.ts.map +1 -0
  422. package/dist/project-memory-store.js +302 -0
  423. package/dist/project-memory-store.js.map +1 -0
  424. package/dist/proposal-store.d.ts +14 -0
  425. package/dist/proposal-store.d.ts.map +1 -0
  426. package/dist/proposal-store.js +19 -0
  427. package/dist/proposal-store.js.map +1 -0
  428. package/dist/prover.d.ts +80 -0
  429. package/dist/prover.d.ts.map +1 -0
  430. package/dist/prover.js +137 -0
  431. package/dist/prover.js.map +1 -0
  432. package/dist/provider-identity-store.d.ts +34 -0
  433. package/dist/provider-identity-store.d.ts.map +1 -0
  434. package/dist/provider-identity-store.js +72 -0
  435. package/dist/provider-identity-store.js.map +1 -0
  436. package/dist/provider-identity.d.ts +104 -0
  437. package/dist/provider-identity.d.ts.map +1 -0
  438. package/dist/provider-identity.js +167 -0
  439. package/dist/provider-identity.js.map +1 -0
  440. package/dist/provider-limit.d.ts +79 -0
  441. package/dist/provider-limit.d.ts.map +1 -0
  442. package/dist/provider-limit.js +148 -0
  443. package/dist/provider-limit.js.map +1 -0
  444. package/dist/provider-preflight.d.ts +171 -0
  445. package/dist/provider-preflight.d.ts.map +1 -0
  446. package/dist/provider-preflight.js +395 -0
  447. package/dist/provider-preflight.js.map +1 -0
  448. package/dist/provider-state.d.ts +120 -0
  449. package/dist/provider-state.d.ts.map +1 -0
  450. package/dist/provider-state.js +182 -0
  451. package/dist/provider-state.js.map +1 -0
  452. package/dist/providers.d.ts +132 -0
  453. package/dist/providers.d.ts.map +1 -0
  454. package/dist/providers.js +161 -0
  455. package/dist/providers.js.map +1 -0
  456. package/dist/publication-recorder.d.ts +117 -0
  457. package/dist/publication-recorder.d.ts.map +1 -0
  458. package/dist/publication-recorder.js +124 -0
  459. package/dist/publication-recorder.js.map +1 -0
  460. package/dist/pursuit-delivery.d.ts +24 -0
  461. package/dist/pursuit-delivery.d.ts.map +1 -0
  462. package/dist/pursuit-delivery.js +38 -0
  463. package/dist/pursuit-delivery.js.map +1 -0
  464. package/dist/queue-store.d.ts +132 -0
  465. package/dist/queue-store.d.ts.map +1 -0
  466. package/dist/queue-store.js +185 -0
  467. package/dist/queue-store.js.map +1 -0
  468. package/dist/queue-summary.d.ts +14 -0
  469. package/dist/queue-summary.d.ts.map +1 -0
  470. package/dist/queue-summary.js +82 -0
  471. package/dist/queue-summary.js.map +1 -0
  472. package/dist/queue-view.d.ts +20 -0
  473. package/dist/queue-view.d.ts.map +1 -0
  474. package/dist/queue-view.js +163 -0
  475. package/dist/queue-view.js.map +1 -0
  476. package/dist/queue-write-lease.d.ts +106 -0
  477. package/dist/queue-write-lease.d.ts.map +1 -0
  478. package/dist/queue-write-lease.js +282 -0
  479. package/dist/queue-write-lease.js.map +1 -0
  480. package/dist/rails-home.d.ts +162 -0
  481. package/dist/rails-home.d.ts.map +1 -0
  482. package/dist/rails-home.js +452 -0
  483. package/dist/rails-home.js.map +1 -0
  484. package/dist/rails-migrations.d.ts +75 -0
  485. package/dist/rails-migrations.d.ts.map +1 -0
  486. package/dist/rails-migrations.js +199 -0
  487. package/dist/rails-migrations.js.map +1 -0
  488. package/dist/rails-stores.d.ts +49 -0
  489. package/dist/rails-stores.d.ts.map +1 -0
  490. package/dist/rails-stores.js +100 -0
  491. package/dist/rails-stores.js.map +1 -0
  492. package/dist/reaper.d.ts +69 -0
  493. package/dist/reaper.d.ts.map +1 -0
  494. package/dist/reaper.js +152 -0
  495. package/dist/reaper.js.map +1 -0
  496. package/dist/record-store.d.ts +36 -0
  497. package/dist/record-store.d.ts.map +1 -0
  498. package/dist/record-store.js +78 -0
  499. package/dist/record-store.js.map +1 -0
  500. package/dist/recovery-io.d.ts +50 -0
  501. package/dist/recovery-io.d.ts.map +1 -0
  502. package/dist/recovery-io.js +122 -0
  503. package/dist/recovery-io.js.map +1 -0
  504. package/dist/recovery.d.ts +146 -0
  505. package/dist/recovery.d.ts.map +1 -0
  506. package/dist/recovery.js +110 -0
  507. package/dist/recovery.js.map +1 -0
  508. package/dist/redraw.d.ts +34 -0
  509. package/dist/redraw.d.ts.map +1 -0
  510. package/dist/redraw.js +62 -0
  511. package/dist/redraw.js.map +1 -0
  512. package/dist/rejected-evidence.d.ts +255 -0
  513. package/dist/rejected-evidence.d.ts.map +1 -0
  514. package/dist/rejected-evidence.js +324 -0
  515. package/dist/rejected-evidence.js.map +1 -0
  516. package/dist/report-cmd.d.ts +32 -0
  517. package/dist/report-cmd.d.ts.map +1 -0
  518. package/dist/report-cmd.js +201 -0
  519. package/dist/report-cmd.js.map +1 -0
  520. package/dist/repos-cmd.d.ts +80 -0
  521. package/dist/repos-cmd.d.ts.map +1 -0
  522. package/dist/repos-cmd.js +240 -0
  523. package/dist/repos-cmd.js.map +1 -0
  524. package/dist/request-body-shape.d.ts +93 -0
  525. package/dist/request-body-shape.d.ts.map +1 -0
  526. package/dist/request-body-shape.js +407 -0
  527. package/dist/request-body-shape.js.map +1 -0
  528. package/dist/requirement-claims.d.ts +89 -0
  529. package/dist/requirement-claims.d.ts.map +1 -0
  530. package/dist/requirement-claims.js +92 -0
  531. package/dist/requirement-claims.js.map +1 -0
  532. package/dist/retention-apply-runtime.d.ts +105 -0
  533. package/dist/retention-apply-runtime.d.ts.map +1 -0
  534. package/dist/retention-apply-runtime.js +269 -0
  535. package/dist/retention-apply-runtime.js.map +1 -0
  536. package/dist/reverify.d.ts +41 -0
  537. package/dist/reverify.d.ts.map +1 -0
  538. package/dist/reverify.js +69 -0
  539. package/dist/reverify.js.map +1 -0
  540. package/dist/round-records.d.ts +65 -0
  541. package/dist/round-records.d.ts.map +1 -0
  542. package/dist/round-records.js +61 -0
  543. package/dist/round-records.js.map +1 -0
  544. package/dist/round-runner.d.ts +924 -0
  545. package/dist/round-runner.d.ts.map +1 -0
  546. package/dist/round-runner.js +1693 -0
  547. package/dist/round-runner.js.map +1 -0
  548. package/dist/run-approval.d.ts +180 -0
  549. package/dist/run-approval.d.ts.map +1 -0
  550. package/dist/run-approval.js +199 -0
  551. package/dist/run-approval.js.map +1 -0
  552. package/dist/run-cmd.d.ts +359 -0
  553. package/dist/run-cmd.d.ts.map +1 -0
  554. package/dist/run-cmd.js +4418 -0
  555. package/dist/run-cmd.js.map +1 -0
  556. package/dist/run-delivery.d.ts +71 -0
  557. package/dist/run-delivery.d.ts.map +1 -0
  558. package/dist/run-delivery.js +104 -0
  559. package/dist/run-delivery.js.map +1 -0
  560. package/dist/run-ended.d.ts +75 -0
  561. package/dist/run-ended.d.ts.map +1 -0
  562. package/dist/run-ended.js +27 -0
  563. package/dist/run-ended.js.map +1 -0
  564. package/dist/run-ending-locator.d.ts +125 -0
  565. package/dist/run-ending-locator.d.ts.map +1 -0
  566. package/dist/run-ending-locator.js +133 -0
  567. package/dist/run-ending-locator.js.map +1 -0
  568. package/dist/run-launcher.d.ts +459 -0
  569. package/dist/run-launcher.d.ts.map +1 -0
  570. package/dist/run-launcher.js +652 -0
  571. package/dist/run-launcher.js.map +1 -0
  572. package/dist/run-lease.d.ts +208 -0
  573. package/dist/run-lease.d.ts.map +1 -0
  574. package/dist/run-lease.js +301 -0
  575. package/dist/run-lease.js.map +1 -0
  576. package/dist/run-refusal-marks.d.ts +189 -0
  577. package/dist/run-refusal-marks.d.ts.map +1 -0
  578. package/dist/run-refusal-marks.js +249 -0
  579. package/dist/run-refusal-marks.js.map +1 -0
  580. package/dist/run-start-marks.d.ts +153 -0
  581. package/dist/run-start-marks.d.ts.map +1 -0
  582. package/dist/run-start-marks.js +269 -0
  583. package/dist/run-start-marks.js.map +1 -0
  584. package/dist/scan-cmd.d.ts +14 -0
  585. package/dist/scan-cmd.d.ts.map +1 -0
  586. package/dist/scan-cmd.js +270 -0
  587. package/dist/scan-cmd.js.map +1 -0
  588. package/dist/scan-events.d.ts +50 -0
  589. package/dist/scan-events.d.ts.map +1 -0
  590. package/dist/scan-events.js +91 -0
  591. package/dist/scan-events.js.map +1 -0
  592. package/dist/scan.d.ts +191 -0
  593. package/dist/scan.d.ts.map +1 -0
  594. package/dist/scan.js +417 -0
  595. package/dist/scan.js.map +1 -0
  596. package/dist/scope-rule.d.ts +148 -0
  597. package/dist/scope-rule.d.ts.map +1 -0
  598. package/dist/scope-rule.js +121 -0
  599. package/dist/scope-rule.js.map +1 -0
  600. package/dist/self-repo-id.d.ts +18 -0
  601. package/dist/self-repo-id.d.ts.map +1 -0
  602. package/dist/self-repo-id.js +70 -0
  603. package/dist/self-repo-id.js.map +1 -0
  604. package/dist/serve-cmd.d.ts +115 -0
  605. package/dist/serve-cmd.d.ts.map +1 -0
  606. package/dist/serve-cmd.js +505 -0
  607. package/dist/serve-cmd.js.map +1 -0
  608. package/dist/serve.d.ts +167 -0
  609. package/dist/serve.d.ts.map +1 -0
  610. package/dist/serve.js +336 -0
  611. package/dist/serve.js.map +1 -0
  612. package/dist/server-client.d.ts +766 -0
  613. package/dist/server-client.d.ts.map +1 -0
  614. package/dist/server-client.js +475 -0
  615. package/dist/server-client.js.map +1 -0
  616. package/dist/session-adapter-runtime.d.ts +195 -0
  617. package/dist/session-adapter-runtime.d.ts.map +1 -0
  618. package/dist/session-adapter-runtime.js +373 -0
  619. package/dist/session-adapter-runtime.js.map +1 -0
  620. package/dist/session-checkpoint-runtime.d.ts +62 -0
  621. package/dist/session-checkpoint-runtime.d.ts.map +1 -0
  622. package/dist/session-checkpoint-runtime.js +268 -0
  623. package/dist/session-checkpoint-runtime.js.map +1 -0
  624. package/dist/session-control-transport.d.ts +106 -0
  625. package/dist/session-control-transport.d.ts.map +1 -0
  626. package/dist/session-control-transport.js +232 -0
  627. package/dist/session-control-transport.js.map +1 -0
  628. package/dist/session-observation-store.d.ts +98 -0
  629. package/dist/session-observation-store.d.ts.map +1 -0
  630. package/dist/session-observation-store.js +155 -0
  631. package/dist/session-observation-store.js.map +1 -0
  632. package/dist/session-observe-runtime.d.ts +123 -0
  633. package/dist/session-observe-runtime.d.ts.map +1 -0
  634. package/dist/session-observe-runtime.js +317 -0
  635. package/dist/session-observe-runtime.js.map +1 -0
  636. package/dist/session-store.d.ts +98 -0
  637. package/dist/session-store.d.ts.map +1 -0
  638. package/dist/session-store.js +116 -0
  639. package/dist/session-store.js.map +1 -0
  640. package/dist/sessions-cmd.d.ts +202 -0
  641. package/dist/sessions-cmd.d.ts.map +1 -0
  642. package/dist/sessions-cmd.js +609 -0
  643. package/dist/sessions-cmd.js.map +1 -0
  644. package/dist/settings-overlay.d.ts +53 -0
  645. package/dist/settings-overlay.d.ts.map +1 -0
  646. package/dist/settings-overlay.js +175 -0
  647. package/dist/settings-overlay.js.map +1 -0
  648. package/dist/setup-prompt.d.ts +34 -0
  649. package/dist/setup-prompt.d.ts.map +1 -0
  650. package/dist/setup-prompt.js +92 -0
  651. package/dist/setup-prompt.js.map +1 -0
  652. package/dist/setup.d.ts +103 -0
  653. package/dist/setup.d.ts.map +1 -0
  654. package/dist/setup.js +283 -0
  655. package/dist/setup.js.map +1 -0
  656. package/dist/shared-grants.d.ts +164 -0
  657. package/dist/shared-grants.d.ts.map +1 -0
  658. package/dist/shared-grants.js +242 -0
  659. package/dist/shared-grants.js.map +1 -0
  660. package/dist/signals.d.ts +55 -0
  661. package/dist/signals.d.ts.map +1 -0
  662. package/dist/signals.js +85 -0
  663. package/dist/signals.js.map +1 -0
  664. package/dist/source-cmd.d.ts +201 -0
  665. package/dist/source-cmd.d.ts.map +1 -0
  666. package/dist/source-cmd.js +684 -0
  667. package/dist/source-cmd.js.map +1 -0
  668. package/dist/source-verdict.d.ts +99 -0
  669. package/dist/source-verdict.d.ts.map +1 -0
  670. package/dist/source-verdict.js +182 -0
  671. package/dist/source-verdict.js.map +1 -0
  672. package/dist/spend-ledger.d.ts +350 -0
  673. package/dist/spend-ledger.d.ts.map +1 -0
  674. package/dist/spend-ledger.js +546 -0
  675. package/dist/spend-ledger.js.map +1 -0
  676. package/dist/stale-run-sweep.d.ts +79 -0
  677. package/dist/stale-run-sweep.d.ts.map +1 -0
  678. package/dist/stale-run-sweep.js +116 -0
  679. package/dist/stale-run-sweep.js.map +1 -0
  680. package/dist/start-attempts.d.ts +385 -0
  681. package/dist/start-attempts.d.ts.map +1 -0
  682. package/dist/start-attempts.js +613 -0
  683. package/dist/start-attempts.js.map +1 -0
  684. package/dist/status-cmd.d.ts +28 -0
  685. package/dist/status-cmd.d.ts.map +1 -0
  686. package/dist/status-cmd.js +116 -0
  687. package/dist/status-cmd.js.map +1 -0
  688. package/dist/stop-follow-up.d.ts +107 -0
  689. package/dist/stop-follow-up.d.ts.map +1 -0
  690. package/dist/stop-follow-up.js +172 -0
  691. package/dist/stop-follow-up.js.map +1 -0
  692. package/dist/surface-lease.d.ts +118 -0
  693. package/dist/surface-lease.d.ts.map +1 -0
  694. package/dist/surface-lease.js +485 -0
  695. package/dist/surface-lease.js.map +1 -0
  696. package/dist/sync.d.ts +54 -0
  697. package/dist/sync.d.ts.map +1 -0
  698. package/dist/sync.js +93 -0
  699. package/dist/sync.js.map +1 -0
  700. package/dist/syncing-ledger.d.ts +45 -0
  701. package/dist/syncing-ledger.d.ts.map +1 -0
  702. package/dist/syncing-ledger.js +53 -0
  703. package/dist/syncing-ledger.js.map +1 -0
  704. package/dist/temp-fixtures.d.ts +68 -0
  705. package/dist/temp-fixtures.d.ts.map +1 -0
  706. package/dist/temp-fixtures.js +38 -0
  707. package/dist/temp-fixtures.js.map +1 -0
  708. package/dist/token-window.d.ts +84 -0
  709. package/dist/token-window.d.ts.map +1 -0
  710. package/dist/token-window.js +143 -0
  711. package/dist/token-window.js.map +1 -0
  712. package/dist/tool-bridge.d.ts +177 -0
  713. package/dist/tool-bridge.d.ts.map +1 -0
  714. package/dist/tool-bridge.js +329 -0
  715. package/dist/tool-bridge.js.map +1 -0
  716. package/dist/tool-call-record.d.ts +197 -0
  717. package/dist/tool-call-record.d.ts.map +1 -0
  718. package/dist/tool-call-record.js +276 -0
  719. package/dist/tool-call-record.js.map +1 -0
  720. package/dist/tool-protocol.d.ts +135 -0
  721. package/dist/tool-protocol.d.ts.map +1 -0
  722. package/dist/tool-protocol.js +104 -0
  723. package/dist/tool-protocol.js.map +1 -0
  724. package/dist/tool-worker.d.ts +3 -0
  725. package/dist/tool-worker.d.ts.map +1 -0
  726. package/dist/tool-worker.js +478 -0
  727. package/dist/tool-worker.js.map +1 -0
  728. package/dist/toolchain-mirror.d.ts +86 -0
  729. package/dist/toolchain-mirror.d.ts.map +1 -0
  730. package/dist/toolchain-mirror.js +307 -0
  731. package/dist/toolchain-mirror.js.map +1 -0
  732. package/dist/trusted-git.d.ts +243 -0
  733. package/dist/trusted-git.d.ts.map +1 -0
  734. package/dist/trusted-git.js +920 -0
  735. package/dist/trusted-git.js.map +1 -0
  736. package/dist/ui.d.ts +76 -0
  737. package/dist/ui.d.ts.map +1 -0
  738. package/dist/ui.js +118 -0
  739. package/dist/ui.js.map +1 -0
  740. package/dist/untrusted-exec.d.ts +275 -0
  741. package/dist/untrusted-exec.d.ts.map +1 -0
  742. package/dist/untrusted-exec.js +479 -0
  743. package/dist/untrusted-exec.js.map +1 -0
  744. package/dist/untrusted-gate.d.ts +73 -0
  745. package/dist/untrusted-gate.d.ts.map +1 -0
  746. package/dist/untrusted-gate.js +226 -0
  747. package/dist/untrusted-gate.js.map +1 -0
  748. package/dist/uploader.d.ts +153 -0
  749. package/dist/uploader.d.ts.map +1 -0
  750. package/dist/uploader.js +204 -0
  751. package/dist/uploader.js.map +1 -0
  752. package/dist/verifier.d.ts +66 -0
  753. package/dist/verifier.d.ts.map +1 -0
  754. package/dist/verifier.js +170 -0
  755. package/dist/verifier.js.map +1 -0
  756. package/dist/verify-apply.d.ts +26 -0
  757. package/dist/verify-apply.d.ts.map +1 -0
  758. package/dist/verify-apply.js +36 -0
  759. package/dist/verify-apply.js.map +1 -0
  760. package/dist/verify-cmd.d.ts +44 -0
  761. package/dist/verify-cmd.d.ts.map +1 -0
  762. package/dist/verify-cmd.js +125 -0
  763. package/dist/verify-cmd.js.map +1 -0
  764. package/dist/verify-pass.d.ts +73 -0
  765. package/dist/verify-pass.d.ts.map +1 -0
  766. package/dist/verify-pass.js +103 -0
  767. package/dist/verify-pass.js.map +1 -0
  768. package/dist/welcome.d.ts +43 -0
  769. package/dist/welcome.d.ts.map +1 -0
  770. package/dist/welcome.js +116 -0
  771. package/dist/welcome.js.map +1 -0
  772. package/dist/workspace-provisioner.d.ts +65 -0
  773. package/dist/workspace-provisioner.d.ts.map +1 -0
  774. package/dist/workspace-provisioner.js +66 -0
  775. package/dist/workspace-provisioner.js.map +1 -0
  776. package/dist/workspace-quarantine.d.ts +64 -0
  777. package/dist/workspace-quarantine.d.ts.map +1 -0
  778. package/dist/workspace-quarantine.js +156 -0
  779. package/dist/workspace-quarantine.js.map +1 -0
  780. package/dist/workspace-residue-sweep.d.ts +113 -0
  781. package/dist/workspace-residue-sweep.d.ts.map +1 -0
  782. package/dist/workspace-residue-sweep.js +158 -0
  783. package/dist/workspace-residue-sweep.js.map +1 -0
  784. package/dist/workspace.d.ts +639 -0
  785. package/dist/workspace.d.ts.map +1 -0
  786. package/dist/workspace.js +2026 -0
  787. package/dist/workspace.js.map +1 -0
  788. package/package.json +52 -4
  789. package/win/CredProbe.cs +64 -0
  790. package/win/FakeClaude.cs +56 -0
  791. package/win/HandleProbe.cs +116 -0
  792. package/win/TokenProbe.cs +53 -0
  793. package/win/appcontainer.ps1 +500 -0
@@ -0,0 +1,174 @@
1
+ import type { DeliveredClaim, ItemServing } from '@looply/core';
2
+ export declare const LANE_CLAIMS_SCHEMA = 1;
3
+ /**
4
+ * WHAT A RUN TELLS THE LANE ABOUT THE WORK ON ITS BRANCH.
5
+ *
6
+ * Written by the RUN process the moment a plan is materialised — before any
7
+ * work — and read by whatever offers that branch to the lane. It is a CLAIM,
8
+ * never an acceptance: `LOOPLY-R3-LIVE-CLOSURE-02` §3 is explicit that a
9
+ * worker's own requirement associations are provenance, and that acceptance is
10
+ * regenerated at the integrated revision from the lane's own fresh gates.
11
+ *
12
+ * ## Why this is a local file and not `PUT …/items/:itemId/requirements`
13
+ *
14
+ * 🔴 THAT ROUTE 404s FOR EVERY ITEM THIS PRODUCT COMPILES, AND ADDING A CLIENT
15
+ * METHOD WOULD NOT CHANGE IT. `items.service.ts:141-147` throws
16
+ * `NotFoundException` for an item the server does not hold; the server learns
17
+ * item ids ONLY from `item.created` (`ingest.service.ts:183-216`); and the only
18
+ * emitter of that event is `scanFinishedEvents` (`scan-events.ts:99-109`),
19
+ * called from `scan-cmd.ts:280` and `:314` and nowhere else. A compiled plan's
20
+ * items go `planToItems` → `materialiseGoalPlan` (goal-ownership.ts:549-583) →
21
+ * the LOCAL `QueueStore` and reach the server never. The server's own
22
+ * `Item.goalId` says the same thing from the other side: *"Nullable forever …
23
+ * Phase 3 has no writer for it at all"* (schema.prisma:193-195), and
24
+ * `materialiseItems` never sets it. So a PUT would store nothing, and a 404 is
25
+ * indistinguishable downstream from a project that never claimed anything.
26
+ *
27
+ * ⚠️ NOTHING IS GIVEN UP BY WRITING IT HERE, and the route is untouched as the
28
+ * future home. Its authority is `servedRequirementTrouble`
29
+ * (requirement-receipt.ts:92-109), a PURE CORE function — the caller runs it on
30
+ * the machine with the same `{sources, goalLinks}` the server would use, and
31
+ * the lane re-asks the ownership half against the goal's CURRENT links at
32
+ * integration time, which is stricter than the route: the route checks once, at
33
+ * write time, against the goal as it was then.
34
+ *
35
+ * ⚠️ AND IT CANNOT TRAVEL IN A REPLAY. `projectStateDir` is under `STATE_DIR`
36
+ * (`.looply`), which `patchBetween` and `changedPathsBetween` exclude by name
37
+ * (`:!${STATE_DIR}`, git-driver.ts:672, :685) — so one run's claims can never be
38
+ * carried onto another's base inside an applied patch.
39
+ */
40
+ export type LaneClaimRecord = {
41
+ readonly schema: number;
42
+ readonly kind: 'claims';
43
+ readonly at: string;
44
+ readonly branch: string;
45
+ readonly runId: string;
46
+ readonly goalId: string;
47
+ readonly goalVersion: number;
48
+ readonly planRevision: number;
49
+ /**
50
+ * What each item of this plan revision claims to serve.
51
+ *
52
+ * ⚠️ EMPTY IS THE ORDINARY ANSWER TODAY and the record is written anyway.
53
+ * Naming the branch's goal is the half that fixes the scheduling defect
54
+ * `goalOfBranch` documents, and it must not wait on a producer of claims.
55
+ */
56
+ readonly servings: readonly ItemServing[];
57
+ /**
58
+ * F28 (B13): the checkout whose `.looply/state` holds this plan — where the goal's later
59
+ * Starts must run. Absent on records written before it existed.
60
+ */
61
+ readonly workspace?: string;
62
+ } | {
63
+ readonly schema: number;
64
+ readonly kind: 'delivery';
65
+ readonly at: string;
66
+ readonly branch: string;
67
+ readonly runId: string;
68
+ readonly goalId: string;
69
+ readonly goalVersion: number;
70
+ readonly planRevision: number;
71
+ /** The tip this delivery was confirmed at — KEY 2's own sha. */
72
+ readonly commitSha: string;
73
+ /**
74
+ * The commit the evaluator JUDGED, when it was not `commitSha` (F27): the lane's replay of
75
+ * this delivery. It is how the third key knows a carried candidate's owed verdict was taken,
76
+ * on exactly the commit the lane published. Absent everywhere else.
77
+ */
78
+ readonly judgedAt?: string;
79
+ /** Which items of this plan revision the delivery actually finished. */
80
+ readonly delivered: readonly string[];
81
+ /**
82
+ * The acceptance map in force when these claims were frozen.
83
+ *
84
+ * 🔴 WITHOUT IT A CLAIM CANNOT GO STALE. `provenBy` is a step NAME, so a
85
+ * claim saying "jest proves this" is about whatever `jest` ran then. The
86
+ * lane compares this against its own current digest and refuses the whole
87
+ * claim when they differ.
88
+ */
89
+ readonly acceptanceDigest: string;
90
+ };
91
+ export declare function laneClaimsPath(cwd: string): string;
92
+ /**
93
+ * ⚠️ LED BY A NEWLINE, not terminated by one — the same shape as `recordAttempt`
94
+ * (integration-runtime.ts:124-136) and for its reason: a torn write costs the
95
+ * one record it tore, rather than joining two into a line that parses as
96
+ * neither.
97
+ *
98
+ * Best-effort. A run must not die because its bookkeeping could not be written;
99
+ * the caller logs, and `goalOfBranch` degrades to today's behaviour.
100
+ */
101
+ export declare function recordLaneClaim(cwd: string, record: LaneClaimRecord): boolean;
102
+ export declare function readLaneClaims(cwd: string): LaneClaimRecord[];
103
+ /**
104
+ * WHICH GOAL A FINISHED BRANCH BELONGS TO, AND WHICH RUN PRODUCED IT.
105
+ *
106
+ * 🔴 THE FIX FOR A LIVE DEFECT: ON THE AUTONOMOUS PATH, EVERY DEPENDENT WAITED
107
+ * FOR EVER.
108
+ *
109
+ * `integrator.ts` offers `{ branch }` and `bin.ts`'s `looply integrate --goal`
110
+ * — a person, typing — was the ONLY writer of `goalId` on an attempt. But
111
+ * `coordinator-state.ts:341-347` derives its integrated set with
112
+ * `typeof a.goalId === 'string'` over PUBLISHED attempts, so on the daemon path
113
+ * that set was ALWAYS EMPTY: every `ScheduleGoal.integrated` was false, and
114
+ * with `integrationRequired` on (daemon-cmd.ts:1292) `schedule.ts:504-505` made
115
+ * `isSatisfied` false for every goal. Nothing with a `dependsOn` could ever
116
+ * start.
117
+ *
118
+ * ⚠️ AND IT WAS INVISIBLE, because the screen has a fallback the scheduler does
119
+ * not: `goal-view.ts:317` filters attempts with `a.goalId === goal.id ||
120
+ * known.has(a.branch)`, so a person read a healthy lane while the scheduler was
121
+ * blind. That is why this is a defect rather than an unfinished feature.
122
+ *
123
+ * ⚠️ ONE SOURCE, NOT TWO. A `claims` record is written the moment a plan is
124
+ * materialised, before any work, so every bound run that compiled anything is
125
+ * named here whatever it does next. Deriving the same answer a second way —
126
+ * from `RunRefusalMarks` joined to the grants, as `goal-view.ts:246-256` does
127
+ * for the screen — would be the second implementation this repository keeps
128
+ * finding in its own mutation batteries.
129
+ *
130
+ * Degradation is in the safe direction: no record → `null` → no `goalId` on the
131
+ * attempt → exactly today's behaviour. This can only ever ADD an integrated
132
+ * goal, never remove one.
133
+ */
134
+ export declare function goalOfBranch(cwd: string, branch: string): {
135
+ goalId: string;
136
+ runId: string;
137
+ } | null;
138
+ /**
139
+ * THE CLAIM THIS BRANCH CARRIES AT THIS EXACT TIP, or null.
140
+ *
141
+ * ⚠️ MATCHED ON (branch, commitSha). A tip that moved is a different delivery,
142
+ * and crediting one delivery's requirements to another commit is the whole-tree
143
+ * mistake one size smaller.
144
+ *
145
+ * ⚠️ THE DELIVERED SET IS UNIONED ACROSS PLAN REVISIONS OF ONE GOAL VERSION, and
146
+ * only that. `confirmGoalExecutionEvidence` filters items to the CURRENT plan
147
+ * revision, so a goal that took three revisions has a `delivered` list per
148
+ * revision; without the union, every requirement claimed by revision 1's items
149
+ * would fold to `item-not-delivered` for ever and no multi-revision goal could
150
+ * be accepted. A record at a DIFFERENT goal version is excluded — that is what
151
+ * staleness is for, and the lane answers it.
152
+ */
153
+ /**
154
+ * F33 (group B review — soun-4 at the LANE): the delivery records whose work the candidate's
155
+ * history CONTAINS, as `branch@commitSha` — the record's commit is an ancestor of (or is) the
156
+ * candidate, or the lane published that branch — as it stood, or carried as a replay — at a commit
157
+ * that is. `deliveredClaimFor` unions only these: a delivery on a branch the lane REFUSED, which
158
+ * the candidate was never cut from, credits nothing here. F31b filtered only the new record; the
159
+ * refused branch's own record came back through this union, and F27's re-cut makes that normal.
160
+ */
161
+ export declare function deliveriesInHistory(cwd: string, candidate: string, isAncestor: (ancestor: string, of: string) => Promise<boolean>, attempts: readonly {
162
+ readonly branch: string;
163
+ readonly published?: {
164
+ readonly to: string;
165
+ };
166
+ readonly replayedAs?: string;
167
+ }[]): Promise<Set<string>>;
168
+ export declare function deliveredClaimFor(cwd: string, at: {
169
+ readonly branch: string;
170
+ readonly commitSha: string;
171
+ },
172
+ /** F33: `deliveriesInHistory` for this candidate. Absent: every delivery of the goal version counts, as before. */
173
+ counted?: ReadonlySet<string>): DeliveredClaim | null;
174
+ //# sourceMappingURL=lane-claims.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-claims.d.ts","sourceRoot":"","sources":["../src/lane-claims.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAqB,MAAM,cAAc,CAAC;AAGnF,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,MAAM,eAAe,GACvB;IACE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,K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C,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAOlG;AAED;;;;;;;;;;;;;;GAcG;AACH;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAC9D,QAAQ,EAAE,SAAS;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAC3H,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAqCtB;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,EAAE,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE;AAC3D,mHAAmH;AACnH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC5B,cAAc,GAAG,IAAI,CAoCvB"}
@@ -0,0 +1,218 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LANE_CLAIMS_SCHEMA = void 0;
4
+ exports.laneClaimsPath = laneClaimsPath;
5
+ exports.recordLaneClaim = recordLaneClaim;
6
+ exports.readLaneClaims = readLaneClaims;
7
+ exports.goalOfBranch = goalOfBranch;
8
+ exports.deliveriesInHistory = deliveriesInHistory;
9
+ exports.deliveredClaimFor = deliveredClaimFor;
10
+ const node_fs_1 = require("node:fs");
11
+ const node_path_1 = require("node:path");
12
+ const git_driver_1 = require("./git-driver");
13
+ exports.LANE_CLAIMS_SCHEMA = 1;
14
+ function laneClaimsPath(cwd) {
15
+ return (0, node_path_1.join)((0, git_driver_1.projectStateDir)(cwd), 'lane-claims.jsonl');
16
+ }
17
+ /**
18
+ * ⚠️ LED BY A NEWLINE, not terminated by one — the same shape as `recordAttempt`
19
+ * (integration-runtime.ts:124-136) and for its reason: a torn write costs the
20
+ * one record it tore, rather than joining two into a line that parses as
21
+ * neither.
22
+ *
23
+ * Best-effort. A run must not die because its bookkeeping could not be written;
24
+ * the caller logs, and `goalOfBranch` degrades to today's behaviour.
25
+ */
26
+ function recordLaneClaim(cwd, record) {
27
+ const path = laneClaimsPath(cwd);
28
+ try {
29
+ (0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(path), { recursive: true });
30
+ (0, node_fs_1.appendFileSync)(path, `\n${JSON.stringify(record)}\n`, 'utf8');
31
+ return true;
32
+ }
33
+ catch {
34
+ return false;
35
+ }
36
+ }
37
+ function readLaneClaims(cwd) {
38
+ let raw;
39
+ try {
40
+ raw = (0, node_fs_1.readFileSync)(laneClaimsPath(cwd), 'utf8');
41
+ }
42
+ catch {
43
+ return [];
44
+ }
45
+ const out = [];
46
+ for (const line of raw.split('\n')) {
47
+ const text = line.trim();
48
+ if (text === '')
49
+ continue;
50
+ try {
51
+ const parsed = JSON.parse(text);
52
+ // A record that cannot name its branch and goal answers no question this
53
+ // file is asked; dropping it is not the same as dropping a torn line, and
54
+ // both are silent on purpose — this is a projection, never the record.
55
+ const kind = parsed?.kind;
56
+ if ((kind === 'claims' || kind === 'delivery') &&
57
+ typeof parsed?.goalId === 'string' &&
58
+ typeof parsed?.branch === 'string') {
59
+ out.push(parsed);
60
+ }
61
+ }
62
+ catch {
63
+ /* a fragment from a torn write; the leading newline is what bounds it */
64
+ }
65
+ }
66
+ return out;
67
+ }
68
+ /**
69
+ * WHICH GOAL A FINISHED BRANCH BELONGS TO, AND WHICH RUN PRODUCED IT.
70
+ *
71
+ * 🔴 THE FIX FOR A LIVE DEFECT: ON THE AUTONOMOUS PATH, EVERY DEPENDENT WAITED
72
+ * FOR EVER.
73
+ *
74
+ * `integrator.ts` offers `{ branch }` and `bin.ts`'s `looply integrate --goal`
75
+ * — a person, typing — was the ONLY writer of `goalId` on an attempt. But
76
+ * `coordinator-state.ts:341-347` derives its integrated set with
77
+ * `typeof a.goalId === 'string'` over PUBLISHED attempts, so on the daemon path
78
+ * that set was ALWAYS EMPTY: every `ScheduleGoal.integrated` was false, and
79
+ * with `integrationRequired` on (daemon-cmd.ts:1292) `schedule.ts:504-505` made
80
+ * `isSatisfied` false for every goal. Nothing with a `dependsOn` could ever
81
+ * start.
82
+ *
83
+ * ⚠️ AND IT WAS INVISIBLE, because the screen has a fallback the scheduler does
84
+ * not: `goal-view.ts:317` filters attempts with `a.goalId === goal.id ||
85
+ * known.has(a.branch)`, so a person read a healthy lane while the scheduler was
86
+ * blind. That is why this is a defect rather than an unfinished feature.
87
+ *
88
+ * ⚠️ ONE SOURCE, NOT TWO. A `claims` record is written the moment a plan is
89
+ * materialised, before any work, so every bound run that compiled anything is
90
+ * named here whatever it does next. Deriving the same answer a second way —
91
+ * from `RunRefusalMarks` joined to the grants, as `goal-view.ts:246-256` does
92
+ * for the screen — would be the second implementation this repository keeps
93
+ * finding in its own mutation batteries.
94
+ *
95
+ * Degradation is in the safe direction: no record → `null` → no `goalId` on the
96
+ * attempt → exactly today's behaviour. This can only ever ADD an integrated
97
+ * goal, never remove one.
98
+ */
99
+ function goalOfBranch(cwd, branch) {
100
+ const mine = readLaneClaims(cwd).filter((r) => r.branch === branch);
101
+ // The last record wins: a goal rebound onto the same branch is a later claim
102
+ // about it, and an older revision must not outvote the one that ran.
103
+ const last = mine[mine.length - 1];
104
+ if (last === undefined)
105
+ return null;
106
+ return { goalId: last.goalId, runId: last.runId };
107
+ }
108
+ /**
109
+ * THE CLAIM THIS BRANCH CARRIES AT THIS EXACT TIP, or null.
110
+ *
111
+ * ⚠️ MATCHED ON (branch, commitSha). A tip that moved is a different delivery,
112
+ * and crediting one delivery's requirements to another commit is the whole-tree
113
+ * mistake one size smaller.
114
+ *
115
+ * ⚠️ THE DELIVERED SET IS UNIONED ACROSS PLAN REVISIONS OF ONE GOAL VERSION, and
116
+ * only that. `confirmGoalExecutionEvidence` filters items to the CURRENT plan
117
+ * revision, so a goal that took three revisions has a `delivered` list per
118
+ * revision; without the union, every requirement claimed by revision 1's items
119
+ * would fold to `item-not-delivered` for ever and no multi-revision goal could
120
+ * be accepted. A record at a DIFFERENT goal version is excluded — that is what
121
+ * staleness is for, and the lane answers it.
122
+ */
123
+ /**
124
+ * F33 (group B review — soun-4 at the LANE): the delivery records whose work the candidate's
125
+ * history CONTAINS, as `branch@commitSha` — the record's commit is an ancestor of (or is) the
126
+ * candidate, or the lane published that branch — as it stood, or carried as a replay — at a commit
127
+ * that is. `deliveredClaimFor` unions only these: a delivery on a branch the lane REFUSED, which
128
+ * the candidate was never cut from, credits nothing here. F31b filtered only the new record; the
129
+ * refused branch's own record came back through this union, and F27's re-cut makes that normal.
130
+ */
131
+ async function deliveriesInHistory(cwd, candidate, isAncestor, attempts) {
132
+ // A replay's publication is its origin branch's publication too.
133
+ const originOf = new Map();
134
+ for (const a of attempts)
135
+ if (a.replayedAs !== undefined)
136
+ originOf.set(a.replayedAs, a.branch);
137
+ const publishedAt = new Map();
138
+ for (const a of attempts) {
139
+ if (a.published === undefined)
140
+ continue;
141
+ for (const b of new Set([a.branch, originOf.get(a.branch) ?? a.branch])) {
142
+ publishedAt.set(b, [...(publishedAt.get(b) ?? []), a.published.to]);
143
+ }
144
+ }
145
+ // A fault reading one commit (a pruned object) is "not contained", never a thrown claim.
146
+ const inside = async (sha) => {
147
+ if (sha === candidate)
148
+ return true;
149
+ try {
150
+ return await isAncestor(sha, candidate);
151
+ }
152
+ catch {
153
+ return false;
154
+ }
155
+ };
156
+ const out = new Set();
157
+ for (const r of readLaneClaims(cwd)) {
158
+ if (r.kind !== 'delivery')
159
+ continue;
160
+ const key = `${r.branch}@${r.commitSha}`;
161
+ if (out.has(key))
162
+ continue;
163
+ if (await inside(r.commitSha)) {
164
+ out.add(key);
165
+ continue;
166
+ }
167
+ for (const p of publishedAt.get(r.branch) ?? []) {
168
+ if (await inside(p)) {
169
+ out.add(key);
170
+ break;
171
+ }
172
+ }
173
+ }
174
+ return out;
175
+ }
176
+ function deliveredClaimFor(cwd, at,
177
+ /** F33: `deliveriesInHistory` for this candidate. Absent: every delivery of the goal version counts, as before. */
178
+ counted) {
179
+ const all = readLaneClaims(cwd);
180
+ const head = all
181
+ .filter((r) => r.kind === 'delivery' && r.branch === at.branch && r.commitSha === at.commitSha)
182
+ .pop();
183
+ if (head === undefined || head.kind !== 'delivery')
184
+ return null;
185
+ const delivered = new Set();
186
+ const byItem = new Map();
187
+ for (const r of all) {
188
+ if (r.goalId !== head.goalId || r.goalVersion !== head.goalVersion)
189
+ continue;
190
+ if (r.kind === 'delivery') {
191
+ if (counted !== undefined && !counted.has(`${r.branch}@${r.commitSha}`))
192
+ continue;
193
+ for (const id of r.delivered)
194
+ delivered.add(id);
195
+ continue;
196
+ }
197
+ for (const serving of r.servings) {
198
+ const list = byItem.get(serving.itemId) ?? [];
199
+ for (const s of serving.serves) {
200
+ // A revision re-stating the same claim is one claim, not two.
201
+ if (!list.some((x) => x.sourceId === s.sourceId && x.ordinal === s.ordinal && x.row === s.row))
202
+ list.push(s);
203
+ }
204
+ byItem.set(serving.itemId, list);
205
+ }
206
+ }
207
+ return {
208
+ goalId: head.goalId,
209
+ goalVersion: head.goalVersion,
210
+ runId: head.runId,
211
+ branch: head.branch,
212
+ commitSha: head.commitSha,
213
+ delivered: [...delivered],
214
+ servings: [...byItem].map(([itemId, serves]) => ({ itemId, serves })),
215
+ acceptanceDigest: head.acceptanceDigest,
216
+ };
217
+ }
218
+ //# sourceMappingURL=lane-claims.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-claims.js","sourceRoot":"","sources":["../src/lane-claims.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AAC,gBAAgB;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { type Attestation, type Classification, type CoverageGateResult, type Disposition, type IntegratedReceipt, type RequirementLink, type SourceStatement } from '@looply/core';
2
+ import type { Publication } from './completion';
3
+ import type { GitDriver } from './git-driver';
4
+ /**
5
+ * STRICT COVERAGE, JUDGED WHERE THE CHARTER PUTS ACCEPTANCE: ON THE INTEGRATED TREE (F25).
6
+ *
7
+ * 🔴 NO PROGRAMME GOAL COULD EVER CLOSE. The fourth key ran inside the WORKER, on
8
+ * its own checkout, reading receipts from a server table nothing writes and
9
+ * dispositions from a reconcile nothing runs — so every mandatory link blocked
10
+ * `unmeasured`, every goal ended `human_required`, and the scheduler never
11
+ * released a dependent (live2/CLOSURE-CHAIN-MAP.md B1/B2). The charter's rule is
12
+ * the opposite: "the integration lane is the acceptance authority", and strict
13
+ * coverage reads the lane's integrated receipts.
14
+ *
15
+ * So in programme mode the controller's third key judges it here, after the
16
+ * lane published the goal's work:
17
+ * - on the tree of the CURRENT `looply/integration` tip — one tree for every
18
+ * goal, so judging one never makes another's attestations stale, and the
19
+ * lane's ratchet keeps every integrated goal's proven checks green on it;
20
+ * - with dispositions measured AT that tree — the machine reconciles it when
21
+ * the latest measurement is about another tree (a disposition must be about
22
+ * the tree being judged; it used to be about whatever was measured last);
23
+ * - with the lane's ACCEPTED claims as the per-requirement receipts, table rows
24
+ * included (the gate keys rows by their own address);
25
+ * - with a person's attestations (or the owner's bounded delegation) at that tree.
26
+ *
27
+ * ⚠️ IT DECIDES NOTHING ITSELF. It returns the gate's verdict as a fact on the
28
+ * publication; `decideThirdKey` holds the closure until it is ok. And anything it
29
+ * cannot establish is `unavailable`, which holds too — never an empty gate.
30
+ */
31
+ export interface LaneSourceDetail {
32
+ readonly statements: readonly SourceStatement[];
33
+ readonly classifications: readonly Classification[];
34
+ readonly classifierVersion: number | null;
35
+ readonly dispositions: readonly Disposition[];
36
+ readonly attestations: readonly Attestation[];
37
+ readonly reconciledAt: {
38
+ readonly treeSha: string;
39
+ } | null;
40
+ }
41
+ export interface LaneCoverageDeps {
42
+ /** The goal as the server holds it now. */
43
+ readonly goal: (goalId: string) => Promise<{
44
+ version: number;
45
+ requirements: readonly RequirementLink[];
46
+ } | null>;
47
+ readonly sourceDetail: (sourceId: string) => Promise<LaneSourceDetail>;
48
+ /** The tree of the current integration tip — the tree every goal is judged on. */
49
+ readonly tipTree: () => Promise<string>;
50
+ /** Measure the source against `treeSha` and record it. The machine may; it can never write an attestation. */
51
+ readonly reconcile: (sourceId: string, treeSha: string, detail: LaneSourceDetail) => Promise<void>;
52
+ }
53
+ export type LaneCoverage = {
54
+ readonly kind: 'judged';
55
+ readonly tree: string;
56
+ readonly result: CoverageGateResult;
57
+ } | {
58
+ readonly kind: 'unavailable';
59
+ readonly because: string;
60
+ };
61
+ export declare function laneCoverage(input: {
62
+ readonly goalId: string;
63
+ readonly receipt?: IntegratedReceipt;
64
+ }, deps: LaneCoverageDeps): Promise<LaneCoverage>;
65
+ /**
66
+ * STRICT COVERAGE OF `links` ON `tree` — the lane's judge (F25), shared with the source verdict (F32)
67
+ * so the two cannot disagree: each source measured AT that tree (reconciled when its latest
68
+ * measurement is about another), rows classified by the derivation that made them obligations,
69
+ * `receipted` as the per-requirement receipts. What it cannot establish is `unavailable`.
70
+ */
71
+ export declare function judgeOnTree(links: readonly RequirementLink[], receipted: ReadonlySet<string>, tree: string, deps: Pick<LaneCoverageDeps, 'sourceDetail' | 'reconcile'>): Promise<LaneCoverage>;
72
+ /**
73
+ * The third key with coverage attached: what the lane says about the branch, and — when it
74
+ * published — whether the pursuit's goal is covered on the integrated tree. Anything that
75
+ * throws becomes `unavailable`, which holds; it never reads as covered.
76
+ */
77
+ export declare function withLaneCoverage(read: (branch: string | undefined) => Promise<Publication>, deps: LaneCoverageDeps): (branch: string | undefined, goalId?: string) => Promise<Publication>;
78
+ /** The daemon's deps: the server it already talks to, and the project's own git for the tip. */
79
+ export declare function nodeLaneCoverageDeps(cwd: string, git: GitDriver, client: {
80
+ sourceDetail(projectId: string, sourceId: string): Promise<LaneSourceDetail>;
81
+ reconcileSource(projectId: string, sourceId: string, input: {
82
+ treeSha: string;
83
+ reconcilerVersion: number;
84
+ dispositions: Disposition[];
85
+ }): Promise<unknown>;
86
+ }, projectId: string, goal: LaneCoverageDeps['goal']): LaneCoverageDeps;
87
+ //# sourceMappingURL=lane-coverage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-coverage.d.ts","sourceRoot":"","sources":["../src/lane-coverage.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;IAChD,QAAQ,CAAC,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IACpD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC5D;AAED,MAAM,WAAW,gBAAgB;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,OAAO,EA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,GAAG,SAAS,KAAK,OAAO,CAAC,WAAW,CAAC,EAC1D,IAAI,EAAE,gBAAgB,GACrB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,CA8BvE;AAED,gGAAgG;AAChG,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,SAAS,EACd,MAAM,EAAE;IACN,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7E,eAAe,CACb,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,WAAW,EAAE,CAAA;KAAE,GACjF,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB,EACD,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAC7B,gBAAgB,CAgBlB"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.laneCoverage = laneCoverage;
4
+ exports.judgeOnTree = judgeOnTree;
5
+ exports.withLaneCoverage = withLaneCoverage;
6
+ exports.nodeLaneCoverageDeps = nodeLaneCoverageDeps;
7
+ const core_1 = require("@looply/core");
8
+ const index_for_head_1 = require("./index-for-head");
9
+ const integration_1 = require("./integration");
10
+ async function laneCoverage(input, deps) {
11
+ const goal = await deps.goal(input.goalId);
12
+ if (goal === null)
13
+ return { kind: 'unavailable', because: `the server does not name goal ${input.goalId}` };
14
+ const tree = await deps.tipTree();
15
+ // A claim the lane marked STALE speaks for nothing here; `decideThirdKey` has already held on it.
16
+ const receipted = input.receipt !== undefined && input.receipt.stale === null ? (0, core_1.acceptedKeys)(input.receipt) : new Set();
17
+ return judgeOnTree(goal.requirements, receipted, tree, deps);
18
+ }
19
+ /**
20
+ * STRICT COVERAGE OF `links` ON `tree` — the lane's judge (F25), shared with the source verdict (F32)
21
+ * so the two cannot disagree: each source measured AT that tree (reconciled when its latest
22
+ * measurement is about another), rows classified by the derivation that made them obligations,
23
+ * `receipted` as the per-requirement receipts. What it cannot establish is `unavailable`.
24
+ */
25
+ async function judgeOnTree(links, receipted, tree, deps) {
26
+ const classifications = new Map();
27
+ const dispositions = new Map();
28
+ const attestations = new Map();
29
+ for (const sourceId of [...new Set(links.map((l) => l.sourceId))].sort()) {
30
+ let detail = await deps.sourceDetail(sourceId);
31
+ if (detail.classifierVersion === null) {
32
+ return { kind: 'unavailable', because: `source ${sourceId} was never classified, so nothing says which statements are requirements` };
33
+ }
34
+ if (detail.reconciledAt?.treeSha !== tree) {
35
+ await deps.reconcile(sourceId, tree, detail);
36
+ detail = await deps.sourceDetail(sourceId);
37
+ if (detail.reconciledAt?.treeSha !== tree) {
38
+ return { kind: 'unavailable', because: `source ${sourceId} could not be measured at the integrated tree ${tree.slice(0, 12)}` };
39
+ }
40
+ }
41
+ const key = (ordinal) => `${sourceId}#${ordinal}`;
42
+ for (const c of detail.classifications)
43
+ classifications.set(key(c.ordinal), c);
44
+ for (const d of detail.dispositions)
45
+ dispositions.set(key(d.ordinal), d);
46
+ for (const a of detail.attestations)
47
+ attestations.set(key(a.ordinal), a);
48
+ // A table row is classified by the derivation that made it an obligation, under its own address.
49
+ for (const d of (0, core_1.deriveAllTableRequirements)(detail.statements).derived) {
50
+ classifications.set((0, core_1.criterionKey)({ sourceId, ordinal: d.sourceOrdinal, row: d.row }), {
51
+ ordinal: d.sourceOrdinal,
52
+ class: d.class,
53
+ polarity: d.polarity,
54
+ rule: d.rule,
55
+ classifierVersion: d.classifierVersion,
56
+ });
57
+ }
58
+ }
59
+ return {
60
+ kind: 'judged',
61
+ tree,
62
+ result: (0, core_1.coverageGate)({
63
+ links,
64
+ classifications,
65
+ dispositions,
66
+ attestations,
67
+ measuredTree: tree,
68
+ // The tip was produced by lane publications, each re-gated on the full acceptance pass.
69
+ deliveredUnderReceipt: true,
70
+ receiptedRequirements: receipted,
71
+ mode: 'strict',
72
+ }),
73
+ };
74
+ }
75
+ /**
76
+ * The third key with coverage attached: what the lane says about the branch, and — when it
77
+ * published — whether the pursuit's goal is covered on the integrated tree. Anything that
78
+ * throws becomes `unavailable`, which holds; it never reads as covered.
79
+ */
80
+ function withLaneCoverage(read, deps) {
81
+ return async (branch, goalId) => {
82
+ const publication = await read(branch);
83
+ if (publication.kind !== 'published')
84
+ return publication;
85
+ if (goalId === undefined) {
86
+ return { ...publication, coverage: { kind: 'unavailable', because: 'the pursuit named no goal, so its coverage cannot be judged' } };
87
+ }
88
+ // F31 (soun-12): what the lane published, and the receipt it wrote, must be about THIS goal.
89
+ if (publication.goalId !== undefined && publication.goalId !== goalId) {
90
+ return {
91
+ ...publication,
92
+ coverage: { kind: 'unavailable', because: `the lane published ${publication.branch} for goal ${publication.goalId}, not ${goalId}` },
93
+ };
94
+ }
95
+ if (publication.requirements !== undefined && publication.requirements.goalId !== goalId) {
96
+ return {
97
+ ...publication,
98
+ coverage: { kind: 'unavailable', because: `the lane's receipt at ${publication.sha} is for goal ${publication.requirements.goalId}, not ${goalId}` },
99
+ };
100
+ }
101
+ try {
102
+ const coverage = await laneCoverage({ goalId, ...(publication.requirements === undefined ? {} : { receipt: publication.requirements }) }, deps);
103
+ return { ...publication, coverage };
104
+ }
105
+ catch (e) {
106
+ return { ...publication, coverage: { kind: 'unavailable', because: e.message } };
107
+ }
108
+ };
109
+ }
110
+ /** The daemon's deps: the server it already talks to, and the project's own git for the tip. */
111
+ function nodeLaneCoverageDeps(cwd, git, client, projectId, goal) {
112
+ return {
113
+ goal,
114
+ sourceDetail: (sourceId) => client.sourceDetail(projectId, sourceId),
115
+ tipTree: () => git.treeOf(integration_1.INTEGRATION_BRANCH),
116
+ reconcile: async (sourceId, treeSha, detail) => {
117
+ const index = await (0, index_for_head_1.indexForTree)(cwd, treeSha);
118
+ if (!index.ok)
119
+ throw new Error(index.because);
120
+ const dispositions = (0, core_1.reconcileStatements)({
121
+ statements: [...detail.statements],
122
+ classifications: [...detail.classifications],
123
+ index: index.snapshot,
124
+ });
125
+ await client.reconcileSource(projectId, sourceId, { treeSha, reconcilerVersion: core_1.RECONCILER_VERSION, dispositions });
126
+ },
127
+ };
128
+ }
129
+ //# sourceMappingURL=lane-coverage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lane-coverage.js","sourceRoot":"","sources":["../src/lane-coverage.ts"],"names":[],"mappings":";;AAuEA,oCAUC;AAQD,kCAoDC;AAOD,4CAiCC;AAGD,oDA6BC;AArND,uCAcsB;AAGtB,qDAAgD;AAChD,+CAAmD;AAqD5C,KAAK,UAAU,YAAY,CAChC,KAAwE,EACxE,IAAsB;IAEtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,iCAAiC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;IAC5G,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IAClC,kGAAkG;IAClG,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,IAAA,mBAAY,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAU,CAAC;IAChI,OAAO,WAAW,CAAC,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,WAAW,CAC/B,KAAiC,EACjC,SAA8B,EAC9B,IAAY,EACZ,IAA0D;IAE1D,M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