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,80 @@
1
+ import type { Item, ProofVerdict } from '@looply/core';
2
+ import { type ImplementerResult } from './agent-driver';
3
+ import type { CommandResult } from './gate';
4
+ import type { ProofOutcome } from './round-runner';
5
+ /**
6
+ * The prover invocation (DESIGN §2.2, Key 2): build the read-only prompt from
7
+ * exactly three things — the item title, its evidence, and the diff — and run
8
+ * the prover agent over it.
9
+ *
10
+ * The context deliberately carries the full implementer result even though the
11
+ * prompt uses none of it. The round runner holds that result, and the natural
12
+ * way this rule breaks is a caller "helpfully" splicing the implementer's note
13
+ * in for context — at which point the prover grades the story rather than the
14
+ * code, and the rejection rate quietly heads for the 166-for-166 zero that
15
+ * motivated proof in the first place (§12 case 16). Accepting the result here
16
+ * and provably discarding it makes the exclusion a tested boundary instead of
17
+ * a convention every call site must remember.
18
+ */
19
+ export interface ProverContext {
20
+ item: Pick<Item, 'title' | 'evidence'>;
21
+ /** Unified diff of the round's changes, embedded in the prompt verbatim. */
22
+ diff: string;
23
+ /** Held so the exclusion is enforced (and tested) here, never used in the prompt. */
24
+ implementer: ImplementerResult;
25
+ }
26
+ /**
27
+ * Runs the prover agent over a finished prompt. The prompt travels as data,
28
+ * not as a command line: the diff is arbitrary bytes from the round's edits,
29
+ * and splicing it into a `shell: true` command string is an injection waiting
30
+ * to happen. The real backend (stdin or a temp file into the agent process)
31
+ * lands when the `agent:` config gap is resolved; until then every caller and
32
+ * test scripts this function.
33
+ */
34
+ export type ProverInvoke = (prompt: string, timeoutMs: number) => Promise<CommandResult>;
35
+ export interface ProverRunResult {
36
+ /** The exact prompt handed to the agent, kept for the round log (§3.2). */
37
+ prompt: string;
38
+ transcript: string;
39
+ ms: number;
40
+ /** Recorded, never decisive — the verdict parser (§12 case 15) decides. */
41
+ exitOk: boolean;
42
+ timedOut: boolean;
43
+ }
44
+ export declare function runProver(invoke: ProverInvoke, ctx: ProverContext, timeoutMs: number): Promise<ProverRunResult>;
45
+ export declare function buildProverPrompt(ctx: ProverContext): string;
46
+ /** One itemized claim from the §2.2 verdict contract. */
47
+ export interface ProverCheck {
48
+ claim: string;
49
+ held: boolean;
50
+ }
51
+ /** The prover's structured verdict, DESIGN §2.2 verbatim. */
52
+ export interface ProverVerdict {
53
+ verdict: ProofVerdict;
54
+ reason: string;
55
+ checks: ProverCheck[];
56
+ confidence: number;
57
+ }
58
+ export type ProverVerdictExtract = {
59
+ ok: true;
60
+ verdict: ProverVerdict;
61
+ } | {
62
+ ok: false;
63
+ reason: string;
64
+ };
65
+ /**
66
+ * Find the prover's verdict in a transcript: the last JSON candidate that fully
67
+ * validates against the §2.2 contract wins. The prompt itself embeds the contract
68
+ * in a fenced json block, so a transcript that echoes the prompt contains a
69
+ * verdict-shaped decoy — taking the *first* candidate would grade every round
70
+ * with the example. Scanning from the end mirrors extractImplementerResult.
71
+ */
72
+ export declare function extractProverVerdict(transcript: string): ProverVerdictExtract;
73
+ /**
74
+ * §12 case 15: an unparseable verdict is a rejection, not a pass. Anything short
75
+ * of a fully valid verdict — empty transcript, timeout, malformed JSON, a
76
+ * contradictory proven-with-failed-checks — maps to `rejected` with confidence 0.
77
+ * The exit code is recorded upstream but decides nothing here, same as case 3.
78
+ */
79
+ export declare function toProofOutcome(run: ProverRunResult): ProofOutcome;
80
+ //# sourceMappingURL=prover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prover.d.ts","sourceRoot":"","sources":["../src/prover.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAY,IAAI,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAkB,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC,CAAC;IACvC,4EAA4E;IAC5E,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAEzF,MAAM,WAAW,eAAe;IAC9B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,SAAS,CAC7B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,aAAa,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,eAAe,CAAC,CAI1B;AAYD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAuB5D;AAED,yDAAyD;AACzD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf;AAED,6DAA6D;AAC7D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,oBAAoB,GAC5B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,aAAa,CAAA;CAAE,GACpC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,CAU7E;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,eAAe,GAAG,YAAY,CAUjE"}
package/dist/prover.js ADDED
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runProver = runProver;
4
+ exports.buildProverPrompt = buildProverPrompt;
5
+ exports.extractProverVerdict = extractProverVerdict;
6
+ exports.toProofOutcome = toProofOutcome;
7
+ const agent_driver_1 = require("./agent-driver");
8
+ async function runProver(invoke, ctx, timeoutMs) {
9
+ const prompt = buildProverPrompt(ctx);
10
+ const r = await invoke(prompt, timeoutMs);
11
+ return { prompt, transcript: r.output ?? '', ms: r.ms, exitOk: r.ok, timedOut: r.timedOut };
12
+ }
13
+ /**
14
+ * The verdict contract quoted in the prompt is DESIGN §2.2 verbatim, so the
15
+ * parser on the other side (the next backlog item) validates against the same
16
+ * shape the agent was shown.
17
+ */
18
+ const VERDICT_CONTRACT = `{ "verdict": "proven" | "rejected" | "partial",
19
+ "reason": "<one sentence: what held or what is missing>",
20
+ "checks": [{ "claim": "<a specific behaviour the item requires>", "held": true }],
21
+ "confidence": <0..1> }`;
22
+ function buildProverPrompt(ctx) {
23
+ return [
24
+ 'You are a prover with read-only access. You may read files; you must not modify anything.',
25
+ 'Judge whether the diff below actually delivers what the item claims. Grade the code,',
26
+ 'not any surrounding narrative: if a required behaviour is not visible in the diff or',
27
+ 'the files it touches, it does not count.',
28
+ '',
29
+ `Item: ${ctx.item.title}`,
30
+ '',
31
+ renderEvidence(ctx.item.evidence),
32
+ '',
33
+ '--- BEGIN DIFF ---',
34
+ ctx.diff,
35
+ '--- END DIFF ---',
36
+ '',
37
+ 'Verdicts: "proven" — the item is delivered; "rejected" — it is not, and reason says',
38
+ 'what is missing; "partial" — some of it is delivered and the rest is not.',
39
+ '',
40
+ 'Answer with exactly one JSON object in this shape and nothing after it:',
41
+ '```json',
42
+ VERDICT_CONTRACT,
43
+ '```',
44
+ ].join('\n');
45
+ }
46
+ /**
47
+ * Find the prover's verdict in a transcript: the last JSON candidate that fully
48
+ * validates against the §2.2 contract wins. The prompt itself embeds the contract
49
+ * in a fenced json block, so a transcript that echoes the prompt contains a
50
+ * verdict-shaped decoy — taking the *first* candidate would grade every round
51
+ * with the example. Scanning from the end mirrors extractImplementerResult.
52
+ */
53
+ function extractProverVerdict(transcript) {
54
+ let why;
55
+ for (const candidate of (0, agent_driver_1.jsonCandidates)(transcript)) {
56
+ const v = validateVerdict(candidate.value);
57
+ if (v.ok)
58
+ return v;
59
+ // Keep the failure closest to the end — that candidate is the most likely
60
+ // to be the intended verdict, so its error is the one worth reporting.
61
+ if (why === undefined)
62
+ why = `the last verdict-shaped JSON is not a valid prover verdict: ${v.why}`;
63
+ }
64
+ return { ok: false, reason: why ?? 'no structured prover verdict in the transcript' };
65
+ }
66
+ /**
67
+ * §12 case 15: an unparseable verdict is a rejection, not a pass. Anything short
68
+ * of a fully valid verdict — empty transcript, timeout, malformed JSON, a
69
+ * contradictory proven-with-failed-checks — maps to `rejected` with confidence 0.
70
+ * The exit code is recorded upstream but decides nothing here, same as case 3.
71
+ */
72
+ function toProofOutcome(run) {
73
+ const extracted = extractProverVerdict(run.transcript);
74
+ if (extracted.ok) {
75
+ const { verdict, reason, confidence } = extracted.verdict;
76
+ return { verdict, reason, confidence };
77
+ }
78
+ const reason = run.timedOut
79
+ ? `${extracted.reason}; the prover hit its timeout and was killed after ${run.ms}ms`
80
+ : extracted.reason;
81
+ return { verdict: 'rejected', reason, confidence: 0 };
82
+ }
83
+ const VERDICTS = ['proven', 'rejected', 'partial'];
84
+ function validateVerdict(v) {
85
+ const verdict = v['verdict'];
86
+ if (typeof verdict !== 'string' || !VERDICTS.includes(verdict)) {
87
+ return { ok: false, why: `verdict must be one of ${VERDICTS.join(' | ')}` };
88
+ }
89
+ const reason = v['reason'];
90
+ if (typeof reason !== 'string' || reason.trim() === '') {
91
+ return { ok: false, why: 'reason must be a non-empty string' };
92
+ }
93
+ const checks = parseChecks(v['checks']);
94
+ if (checks === undefined) {
95
+ return { ok: false, why: 'checks must be a list of { claim, held } entries' };
96
+ }
97
+ const confidence = v['confidence'];
98
+ if (typeof confidence !== 'number' || !Number.isFinite(confidence) || confidence < 0 || confidence > 1) {
99
+ return { ok: false, why: 'confidence must be a number between 0 and 1' };
100
+ }
101
+ // Cross-check, like the implementer's blocked-iff-blocked rule: "proven" while
102
+ // itemizing a check that did not hold is a contradiction, and a contradictory
103
+ // verdict must fail closed (→ rejection via case 15) rather than commit.
104
+ if (verdict === 'proven' && checks.some((c) => !c.held)) {
105
+ return { ok: false, why: 'a proven verdict cannot list a check that did not hold' };
106
+ }
107
+ return {
108
+ ok: true,
109
+ verdict: { verdict: verdict, reason, checks, confidence },
110
+ };
111
+ }
112
+ function parseChecks(v) {
113
+ if (!Array.isArray(v))
114
+ return undefined;
115
+ const out = [];
116
+ for (const entry of v) {
117
+ if (typeof entry !== 'object' || entry === null || Array.isArray(entry))
118
+ return undefined;
119
+ const o = entry;
120
+ const claim = o['claim'];
121
+ const held = o['held'];
122
+ if (typeof claim !== 'string' || !claim || typeof held !== 'boolean')
123
+ return undefined;
124
+ out.push({ claim, held });
125
+ }
126
+ return out;
127
+ }
128
+ function renderEvidence(evidence) {
129
+ if (evidence.length === 0)
130
+ return 'Evidence: none recorded for this item.';
131
+ const lines = evidence.map((e) => {
132
+ const loc = e.line === undefined ? e.path : `${e.path}:${e.line}`;
133
+ return e.quote === undefined ? `- ${loc}` : `- ${loc} — ${JSON.stringify(e.quote)}`;
134
+ });
135
+ return ['Evidence:', ...lines].join('\n');
136
+ }
137
+ //# sourceMappingURL=prover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prover.js","sourceRoot":"","sources":["../src/prover.ts"],"names":[],"mappings":";;AA+CA,8BAQC;AAYD,8CAuBC;AA2BD,oDAUC;AAQD,wCAUC;AAhJD,iDAAwE;AA8CjE,KAAK,UAAU,SAAS,CAC7B,MAAoB,EACpB,GAAkB,EAClB,SAAiB;IAEjB,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACtC,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,gBAAgB,GAAG;;;yBAGA,CAAC;AAE1B,SAAgB,iBAAiB,CAAC,GAAkB;IAClD,OAAO;QACL,2FAA2F;QAC3F,sFAAsF;QACtF,sFAAsF;QACtF,0CAA0C;QAC1C,EAAE;QACF,SAAS,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE;QACzB,EAAE;QACF,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;QACjC,EAAE;QACF,oBAAoB;QACpB,GAAG,CAAC,IAAI;QACR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AAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QAClE,OAAO,CAAC,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;IACtF,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { identifyProvider, type ProviderIdentity } from './provider-identity';
2
+ import type { LedgerFs } from './ledger-store';
3
+ /**
4
+ * THE PROVIDER THAT ANSWERED LAST TIME, SO A CHANGE CAN BE NOTICED.
5
+ *
6
+ * One file, rewritten each run. There is no history here on purpose: the
7
+ * question is "is this the same binary as last time", and a ledger of every
8
+ * provider a machine has ever seen would be a durable record of somebody's tool
9
+ * inventory for no benefit.
10
+ *
11
+ * 🔴 IT IS A DIAGNOSTIC, NOT A GATE. A provider that changed is reported and the
12
+ * run proceeds. Refusing would mean Looply stops working every time the user
13
+ * updates their coding CLI, which is a normal thing to do — and a gate that
14
+ * fires on a normal action is one people disable. §3.19 names the choice
15
+ * explicitly: diagnostic warning, compatibility re-check, or user acceptance.
16
+ */
17
+ export declare class ProviderIdentityStore {
18
+ private readonly stateDir;
19
+ private readonly fs;
20
+ constructor(stateDir: string, fs: LedgerFs);
21
+ private get path();
22
+ /** What was recorded last, or null when nothing was — which is not a change. */
23
+ previous(): Promise<ProviderIdentity | null>;
24
+ /** Temp-then-rename, like every other durable write here. */
25
+ record(identity: ProviderIdentity): Promise<void>;
26
+ }
27
+ /**
28
+ * Identify the provider, compare it with last time, and record it.
29
+ *
30
+ * Returns a line to say, or null when there is nothing worth saying — which is
31
+ * the overwhelmingly common case and must stay silent.
32
+ */
33
+ export declare function noteProviderIdentity(store: ProviderIdentityStore, input: Parameters<typeof identifyProvider>[0]): Promise<string | null>;
34
+ //# sourceMappingURL=provider-identity-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-identity-store.d.ts","sourceRoot":"","sources":["../src/provider-identity-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,EAAE;gBADF,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,QAAQ;IAG/B,OAAO,KAAK,IAAI,GAEf;IAED,gFAAgF;IAC1E,QAAQ,IAAI,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAiBlD,6DAA6D;IACvD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAMxD;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,qBAAqB,EAC5B,KAAK,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC5C,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProviderIdentityStore = void 0;
4
+ exports.noteProviderIdentity = noteProviderIdentity;
5
+ const provider_identity_1 = require("./provider-identity");
6
+ /**
7
+ * THE PROVIDER THAT ANSWERED LAST TIME, SO A CHANGE CAN BE NOTICED.
8
+ *
9
+ * One file, rewritten each run. There is no history here on purpose: the
10
+ * question is "is this the same binary as last time", and a ledger of every
11
+ * provider a machine has ever seen would be a durable record of somebody's tool
12
+ * inventory for no benefit.
13
+ *
14
+ * 🔴 IT IS A DIAGNOSTIC, NOT A GATE. A provider that changed is reported and the
15
+ * run proceeds. Refusing would mean Looply stops working every time the user
16
+ * updates their coding CLI, which is a normal thing to do — and a gate that
17
+ * fires on a normal action is one people disable. §3.19 names the choice
18
+ * explicitly: diagnostic warning, compatibility re-check, or user acceptance.
19
+ */
20
+ class ProviderIdentityStore {
21
+ stateDir;
22
+ fs;
23
+ constructor(stateDir, fs) {
24
+ this.stateDir = stateDir;
25
+ this.fs = fs;
26
+ }
27
+ get path() {
28
+ return `${this.stateDir}/provider-identity.json`;
29
+ }
30
+ /** What was recorded last, or null when nothing was — which is not a change. */
31
+ async previous() {
32
+ let text;
33
+ try {
34
+ text = await this.fs.readFile(this.path);
35
+ }
36
+ catch {
37
+ return null;
38
+ }
39
+ if (text === null)
40
+ return null;
41
+ try {
42
+ const parsed = JSON.parse(text);
43
+ // A record from another shape is not a change, it is an unknown.
44
+ return typeof parsed?.schema === 'number' && typeof parsed?.kind === 'string' ? parsed : null;
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ }
50
+ /** Temp-then-rename, like every other durable write here. */
51
+ async record(identity) {
52
+ await this.fs.mkdir(this.stateDir);
53
+ const tmp = `${this.path}.${process.pid}.tmp`;
54
+ await this.fs.writeFile(tmp, `${JSON.stringify(identity, null, 2)}\n`);
55
+ await this.fs.rename(tmp, this.path);
56
+ }
57
+ }
58
+ exports.ProviderIdentityStore = ProviderIdentityStore;
59
+ /**
60
+ * Identify the provider, compare it with last time, and record it.
61
+ *
62
+ * Returns a line to say, or null when there is nothing worth saying — which is
63
+ * the overwhelmingly common case and must stay silent.
64
+ */
65
+ async function noteProviderIdentity(store, input) {
66
+ const current = (0, provider_identity_1.identifyProvider)(input);
67
+ const previous = await store.previous().catch(() => null);
68
+ await store.record(current).catch(() => undefined);
69
+ const change = (0, provider_identity_1.providerChanged)(previous, current);
70
+ return change.changed ? change.because : null;
71
+ }
72
+ //# sourceMappingURL=provider-identity-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-identity-store.js","sourceRoot":"","sources":["../src/provider-identity-store.ts"],"names":[],"mappings":";;;AA4DA,oDASC;AArED,2DAA+F;AAG/F;;;;;;;;;;;;;GAaG;AACH,MAAa,qBAAqB;IAEb;IACA;IAFnB,YACmB,QAAgB,EAChB,EAAY;QADZ,aAAQ,GAAR,QAAQ,CAAQ;QAChB,OAAE,GAAF,EAAE,CAAU;IAC5B,CAAC;IAEJ,IAAY,IAAI;QACd,OAAO,GAAG,IAAI,CAAC,QAAQ,yBAAyB,CAAC;IACnD,CAAC;IAED,gFAAgF;IAChF,KAAK,CAAC,QAAQ;QACZ,IAAI,IAAmB,CAAC;QACxB,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAqB,CAAC;YACpD,iEAAiE;YACjE,OAAO,OAAO,MAAM,EAAE,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAChG,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,6DAA6D;IAC7D,KAAK,CAAC,MAAM,CAAC,QAA0B;QACrC,MAAM,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;QAC9C,MAAM,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACvE,MAAM,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAnCD,sDAmCC;AAED;;;;;GAKG;AACI,KAAK,UAAU,oBAAoB,CACxC,KAA4B,EAC5B,KAA6C;IAE7C,MAAM,OAAO,GAAG,IAAA,oCAAgB,EAAC,KAAK,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACnD,MAAM,MAAM,GAAG,IAAA,mCAAe,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC"}
@@ -0,0 +1,104 @@
1
+ import type { ProposalProvider } from '@looply/core';
2
+ import { type AgentSpec } from './agent-exec';
3
+ /**
4
+ * WHICH BINARY ANSWERED, AND WHETHER IT IS THE ONE THAT ANSWERED LAST TIME.
5
+ *
6
+ * ─────────────────────────────────────────────────────────────────────────────
7
+ * 🔴 THE ONLY TEST APPLIED TO THE PROVIDER WAS `existsSync`.
8
+ *
9
+ * A file at the derived path was executed on the strength of its NAME and
10
+ * LOCATION alone — no version, no size, no digest, no signature — and nothing
11
+ * anywhere recorded which binary a run had actually used. So if the provider
12
+ * changed between two runs, by update or by tampering or because a different
13
+ * Node install shifted the derived path, Looply would not notice and could not
14
+ * say so afterwards.
15
+ *
16
+ * ─────────────────────────────────────────────────────────────────────────────
17
+ * WHAT THIS IS NOT
18
+ *
19
+ * ⚠️ THIS IS NOT SUPPLY-CHAIN INTEGRITY, AND SAYING SO IS THE POINT. There is no
20
+ * expected digest to compare against: the provider is not a dependency of
21
+ * Looply, appears in no lockfile, and carries no `integrity` hash anybody here
22
+ * could check. A digest computed from the file on disk answers "is this the same
23
+ * bytes as last time", never "are these the right bytes" — an attacker who can
24
+ * replace the binary can let it be hashed afterwards.
25
+ *
26
+ * ⚠️ AND IT IS NOT AUTHENTICODE. Nothing here verifies a signature. That would
27
+ * be a real improvement and it is not what this is.
28
+ *
29
+ * What it IS: a record of what ran, and a diagnostic when that changes. §3.20
30
+ * calls the installed provider a TRUST BOUNDARY, and the honest treatment of a
31
+ * trust boundary you cannot enforce is to make crossings visible.
32
+ */
33
+ /** Bumped only when the recorded shape changes incompatibly. */
34
+ export declare const PROVIDER_IDENTITY_SCHEMA = 1;
35
+ /**
36
+ * How large a provider binary may be before it is described rather than read.
37
+ *
38
+ * The digest reads the file, and the packaged provider's launcher is small; a
39
+ * hundred megabytes would be a different kind of artefact and hashing it on
40
+ * every run would be a cost paid for nothing. Over the bound the identity is
41
+ * still recorded — size and mtime — with no digest, which is a weaker identity
42
+ * honestly labelled rather than a missing one.
43
+ */
44
+ export declare const MAX_HASHED_PROVIDER_BYTES: number;
45
+ export type ProviderKind = 'default' | 'configured';
46
+ export interface ProviderIdentity {
47
+ readonly schema: number;
48
+ readonly kind: ProviderKind;
49
+ /**
50
+ * 🔴 A CATEGORY, NEVER THE PATH ITSELF.
51
+ *
52
+ * The absolute path contains the user's account name and wherever they keep
53
+ * their tools. This record is written to disk and read back by a diagnostic,
54
+ * so it says WHAT KIND of location answered rather than reproducing it.
55
+ */
56
+ readonly where: 'provider-package' | 'configured-command' | 'unknown';
57
+ /** Bytes, or null when the binary could not be measured. */
58
+ readonly bytes: number | null;
59
+ /** Last-modified, or null. Not an identity on its own — see the header. */
60
+ readonly modifiedMs: number | null;
61
+ /** sha256 of the executable, or null when it was too large or unreadable. */
62
+ readonly digest: string | null;
63
+ }
64
+ export interface IdentifyInput {
65
+ readonly kind: ProviderKind;
66
+ /** The resolved executable, for `default`. */
67
+ readonly executable?: string;
68
+ /** The declared command line, for `configured`. */
69
+ readonly command?: string;
70
+ }
71
+ /**
72
+ * Describe the provider that is about to run.
73
+ *
74
+ * 🔴 NEVER THROWS. A provider whose binary cannot be measured is still a
75
+ * provider that is about to run, and a diagnostic that could abort a round would
76
+ * be a worse thing than the gap it reports. Every unknown is a null that says so.
77
+ */
78
+ export declare function identifyProvider(input: IdentifyInput): ProviderIdentity;
79
+ export type ProviderChange = {
80
+ readonly changed: false;
81
+ } | {
82
+ readonly changed: true;
83
+ readonly because: string;
84
+ };
85
+ /**
86
+ * Whether the provider differs from the one recorded last time.
87
+ *
88
+ * 🔴 A DIGEST DIFFERENCE IS THE FINDING; A SIZE OR MTIME DIFFERENCE IS A HINT.
89
+ * Reported in that order, and only one reason is given — a person reading a
90
+ * warning wants the strongest true statement, not a list.
91
+ *
92
+ * ⚠️ NO PREVIOUS RECORD IS NOT A CHANGE. The first run on a machine would
93
+ * otherwise announce that the provider had changed, which is both false and
94
+ * exactly the sort of noise that teaches people to ignore a warning.
95
+ */
96
+ export declare function providerChanged(previous: ProviderIdentity | null, current: ProviderIdentity): ProviderChange;
97
+ /**
98
+ * Who a record says was asked, read from the thing that will run (M3-1/M3-2):
99
+ * the packaged provider's identity digest when the spec names the default
100
+ * command, the configured command's otherwise. `packageDir` is the provider
101
+ * package the caller located (`claudePackageDir()`), or null when it did not.
102
+ */
103
+ export declare function providerRecordFor(spec: AgentSpec, packageDir: string | null): ProposalProvider;
104
+ //# sourceMappingURL=provider-identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-identity.d.ts","sourceRoot":"","sources":["../src/provider-identity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC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E,gBAAgB,GAAG,IAAI,EACjC,OAAO,EAAE,gBAAgB,GACxB,cAAc,CAuBhB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB,CAQ9F"}
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_HASHED_PROVIDER_BYTES = exports.PROVIDER_IDENTITY_SCHEMA = void 0;
4
+ exports.identifyProvider = identifyProvider;
5
+ exports.providerChanged = providerChanged;
6
+ exports.providerRecordFor = providerRecordFor;
7
+ const node_crypto_1 = require("node:crypto");
8
+ const node_fs_1 = require("node:fs");
9
+ const node_path_1 = require("node:path");
10
+ const agent_exec_1 = require("./agent-exec");
11
+ /**
12
+ * WHICH BINARY ANSWERED, AND WHETHER IT IS THE ONE THAT ANSWERED LAST TIME.
13
+ *
14
+ * ─────────────────────────────────────────────────────────────────────────────
15
+ * 🔴 THE ONLY TEST APPLIED TO THE PROVIDER WAS `existsSync`.
16
+ *
17
+ * A file at the derived path was executed on the strength of its NAME and
18
+ * LOCATION alone — no version, no size, no digest, no signature — and nothing
19
+ * anywhere recorded which binary a run had actually used. So if the provider
20
+ * changed between two runs, by update or by tampering or because a different
21
+ * Node install shifted the derived path, Looply would not notice and could not
22
+ * say so afterwards.
23
+ *
24
+ * ─────────────────────────────────────────────────────────────────────────────
25
+ * WHAT THIS IS NOT
26
+ *
27
+ * ⚠️ THIS IS NOT SUPPLY-CHAIN INTEGRITY, AND SAYING SO IS THE POINT. There is no
28
+ * expected digest to compare against: the provider is not a dependency of
29
+ * Looply, appears in no lockfile, and carries no `integrity` hash anybody here
30
+ * could check. A digest computed from the file on disk answers "is this the same
31
+ * bytes as last time", never "are these the right bytes" — an attacker who can
32
+ * replace the binary can let it be hashed afterwards.
33
+ *
34
+ * ⚠️ AND IT IS NOT AUTHENTICODE. Nothing here verifies a signature. That would
35
+ * be a real improvement and it is not what this is.
36
+ *
37
+ * What it IS: a record of what ran, and a diagnostic when that changes. §3.20
38
+ * calls the installed provider a TRUST BOUNDARY, and the honest treatment of a
39
+ * trust boundary you cannot enforce is to make crossings visible.
40
+ */
41
+ /** Bumped only when the recorded shape changes incompatibly. */
42
+ exports.PROVIDER_IDENTITY_SCHEMA = 1;
43
+ /**
44
+ * How large a provider binary may be before it is described rather than read.
45
+ *
46
+ * The digest reads the file, and the packaged provider's launcher is small; a
47
+ * hundred megabytes would be a different kind of artefact and hashing it on
48
+ * every run would be a cost paid for nothing. Over the bound the identity is
49
+ * still recorded — size and mtime — with no digest, which is a weaker identity
50
+ * honestly labelled rather than a missing one.
51
+ */
52
+ exports.MAX_HASHED_PROVIDER_BYTES = 64 * 1024 * 1024;
53
+ /**
54
+ * Describe the provider that is about to run.
55
+ *
56
+ * 🔴 NEVER THROWS. A provider whose binary cannot be measured is still a
57
+ * provider that is about to run, and a diagnostic that could abort a round would
58
+ * be a worse thing than the gap it reports. Every unknown is a null that says so.
59
+ */
60
+ function identifyProvider(input) {
61
+ if (input.kind === 'configured') {
62
+ /**
63
+ * A configured provider is a SHELL LINE a person wrote, not a binary Looply
64
+ * resolved — the executable is `cmd.exe` and the real program is somewhere
65
+ * inside the line. So the identity is of the LINE. That is genuinely weaker,
66
+ * and calling it `configured-command` says which kind of answer this is.
67
+ */
68
+ const command = input.command ?? '';
69
+ return {
70
+ schema: exports.PROVIDER_IDENTITY_SCHEMA,
71
+ kind: 'configured',
72
+ where: 'configured-command',
73
+ bytes: null,
74
+ modifiedMs: null,
75
+ digest: command === ''
76
+ ? null
77
+ : (0, node_crypto_1.createHash)('sha256').update(`looply-provider-command-v1\n${command}`, 'utf8').digest('hex'),
78
+ };
79
+ }
80
+ const executable = input.executable ?? '';
81
+ const unknown = {
82
+ schema: exports.PROVIDER_IDENTITY_SCHEMA,
83
+ kind: 'default',
84
+ where: executable === '' ? 'unknown' : 'provider-package',
85
+ bytes: null,
86
+ modifiedMs: null,
87
+ digest: null,
88
+ };
89
+ if (executable === '')
90
+ return unknown;
91
+ let bytes;
92
+ let modifiedMs;
93
+ try {
94
+ const s = (0, node_fs_1.statSync)(executable);
95
+ bytes = s.size;
96
+ modifiedMs = Math.floor(s.mtimeMs);
97
+ }
98
+ catch {
99
+ return unknown;
100
+ }
101
+ let digest = null;
102
+ if (bytes <= exports.MAX_HASHED_PROVIDER_BYTES) {
103
+ try {
104
+ digest = (0, node_crypto_1.createHash)('sha256').update((0, node_fs_1.readFileSync)(executable)).digest('hex');
105
+ }
106
+ catch {
107
+ // Unreadable is recorded as a missing digest, not as a missing identity.
108
+ digest = null;
109
+ }
110
+ }
111
+ return {
112
+ schema: exports.PROVIDER_IDENTITY_SCHEMA,
113
+ kind: 'default',
114
+ where: 'provider-package',
115
+ bytes,
116
+ modifiedMs,
117
+ digest,
118
+ };
119
+ }
120
+ /**
121
+ * Whether the provider differs from the one recorded last time.
122
+ *
123
+ * 🔴 A DIGEST DIFFERENCE IS THE FINDING; A SIZE OR MTIME DIFFERENCE IS A HINT.
124
+ * Reported in that order, and only one reason is given — a person reading a
125
+ * warning wants the strongest true statement, not a list.
126
+ *
127
+ * ⚠️ NO PREVIOUS RECORD IS NOT A CHANGE. The first run on a machine would
128
+ * otherwise announce that the provider had changed, which is both false and
129
+ * exactly the sort of noise that teaches people to ignore a warning.
130
+ */
131
+ function providerChanged(previous, current) {
132
+ if (previous === null)
133
+ return { changed: false };
134
+ if (previous.kind !== current.kind) {
135
+ return { changed: true, because: `the provider kind changed from ${previous.kind} to ${current.kind}` };
136
+ }
137
+ if (previous.digest !== null && current.digest !== null && previous.digest !== current.digest) {
138
+ return { changed: true, because: 'the provider executable has different contents than the last run' };
139
+ }
140
+ if (previous.bytes !== null && current.bytes !== null && previous.bytes !== current.bytes) {
141
+ return { changed: true, because: `the provider executable changed size (${previous.bytes} → ${current.bytes} bytes)` };
142
+ }
143
+ if (previous.digest !== null &&
144
+ current.digest === null &&
145
+ previous.modifiedMs !== null &&
146
+ current.modifiedMs !== null &&
147
+ previous.modifiedMs !== current.modifiedMs) {
148
+ // Only when there is no digest to ask instead: mtime moves for reasons that
149
+ // are not changes, and reporting it over a matching digest would be noise.
150
+ return { changed: true, because: 'the provider executable was modified since the last run' };
151
+ }
152
+ return { changed: false };
153
+ }
154
+ /**
155
+ * Who a record says was asked, read from the thing that will run (M3-1/M3-2):
156
+ * the packaged provider's identity digest when the spec names the default
157
+ * command, the configured command's otherwise. `packageDir` is the provider
158
+ * package the caller located (`claudePackageDir()`), or null when it did not.
159
+ */
160
+ function providerRecordFor(spec, packageDir) {
161
+ const isDefault = spec.command === agent_exec_1.DEFAULT_AGENT.command;
162
+ const identity = identifyProvider(isDefault
163
+ ? { kind: 'default', ...(packageDir === null ? {} : { executable: (0, node_path_1.join)(packageDir, 'bin', 'claude.exe') }) }
164
+ : { kind: 'configured', command: spec.command });
165
+ return { kind: identity.kind, role: 'brain', command: spec.command, digest: identity.digest };
166
+ }
167
+ //# sourceMappingURL=provider-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-identity.js","sourceRoot":"","sources":["../src/provider-identity.ts"],"names":[],"mappings":";;;AAuFA,4CA4DC;AAiBD,0CA0BC;AAQD,8CAQC;AA9MD,6CAAyC;AACzC,qCAAiD;AACjD,yCAAiC;AAEjC,6CAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,gEAAgE;AACnD,QAAA,wBAAwB,GAAG,CAAC,CAAC;AAE1C;;;;;;;;GAQG;AACU,QAAA,yBAAyB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AA+B1D;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAAC,KAAoB;IACnD,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAChC;;;;;WAKG;QACH,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC;QACpC,OAAO;YACL,MAAM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