@smthrs/harness 0.0.0-stage → 1.0.0-rc.3

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 (476) hide show
  1. package/CHANGELOG.md +387 -0
  2. package/LICENSE +21 -0
  3. package/README.md +138 -2
  4. package/dist/cjs/AgentEvent.d.ts +3092 -0
  5. package/dist/cjs/AgentEvent.d.ts.map +1 -0
  6. package/dist/cjs/AgentEvent.js +1116 -0
  7. package/dist/cjs/AgentEvent.js.map +7 -0
  8. package/dist/cjs/CallLedger.d.ts +378 -0
  9. package/dist/cjs/CallLedger.d.ts.map +1 -0
  10. package/dist/cjs/CallLedger.js +240 -0
  11. package/dist/cjs/CallLedger.js.map +7 -0
  12. package/dist/cjs/Cell.d.ts +774 -0
  13. package/dist/cjs/Cell.d.ts.map +1 -0
  14. package/dist/cjs/Cell.js +431 -0
  15. package/dist/cjs/Cell.js.map +7 -0
  16. package/dist/cjs/CellCalls.d.ts +115 -0
  17. package/dist/cjs/CellCalls.d.ts.map +1 -0
  18. package/dist/cjs/CellCalls.js +98 -0
  19. package/dist/cjs/CellCalls.js.map +7 -0
  20. package/dist/cjs/CellHistory.d.ts +102 -0
  21. package/dist/cjs/CellHistory.d.ts.map +1 -0
  22. package/dist/cjs/CellHistory.js +54 -0
  23. package/dist/cjs/CellHistory.js.map +7 -0
  24. package/dist/cjs/CellTurn.d.ts +1071 -0
  25. package/dist/cjs/CellTurn.d.ts.map +1 -0
  26. package/dist/cjs/CellTurn.js +2618 -0
  27. package/dist/cjs/CellTurn.js.map +7 -0
  28. package/dist/cjs/CellValidation.d.ts +94 -0
  29. package/dist/cjs/CellValidation.d.ts.map +1 -0
  30. package/dist/cjs/CellValidation.js +218 -0
  31. package/dist/cjs/CellValidation.js.map +7 -0
  32. package/dist/cjs/Compaction.d.ts +158 -0
  33. package/dist/cjs/Compaction.d.ts.map +1 -0
  34. package/dist/cjs/Compaction.js +189 -0
  35. package/dist/cjs/Compaction.js.map +7 -0
  36. package/dist/cjs/CompletionClaim.d.ts +801 -0
  37. package/dist/cjs/CompletionClaim.d.ts.map +1 -0
  38. package/dist/cjs/CompletionClaim.js +303 -0
  39. package/dist/cjs/CompletionClaim.js.map +7 -0
  40. package/dist/cjs/ContextWindow.d.ts +435 -0
  41. package/dist/cjs/ContextWindow.d.ts.map +1 -0
  42. package/dist/cjs/ContextWindow.js +319 -0
  43. package/dist/cjs/ContextWindow.js.map +7 -0
  44. package/dist/cjs/EngineLike.d.ts +546 -0
  45. package/dist/cjs/EngineLike.d.ts.map +1 -0
  46. package/dist/cjs/EngineLike.js +114 -0
  47. package/dist/cjs/EngineLike.js.map +7 -0
  48. package/dist/cjs/ExternalTranscript.d.ts +349 -0
  49. package/dist/cjs/ExternalTranscript.d.ts.map +1 -0
  50. package/dist/cjs/ExternalTranscript.js +826 -0
  51. package/dist/cjs/ExternalTranscript.js.map +7 -0
  52. package/dist/cjs/FailedCall.d.ts +132 -0
  53. package/dist/cjs/FailedCall.d.ts.map +1 -0
  54. package/dist/cjs/FailedCall.js +53 -0
  55. package/dist/cjs/FailedCall.js.map +7 -0
  56. package/dist/cjs/FlowBinding.d.ts +289 -0
  57. package/dist/cjs/FlowBinding.d.ts.map +1 -0
  58. package/dist/cjs/FlowBinding.js +251 -0
  59. package/dist/cjs/FlowBinding.js.map +7 -0
  60. package/dist/cjs/HarnessError.d.ts +57 -0
  61. package/dist/cjs/HarnessError.d.ts.map +1 -0
  62. package/dist/cjs/HarnessError.js +75 -0
  63. package/dist/cjs/HarnessError.js.map +7 -0
  64. package/dist/cjs/Judgement.d.ts +289 -0
  65. package/dist/cjs/Judgement.d.ts.map +1 -0
  66. package/dist/cjs/Judgement.js +240 -0
  67. package/dist/cjs/Judgement.js.map +7 -0
  68. package/dist/cjs/Monitor.d.ts +374 -0
  69. package/dist/cjs/Monitor.d.ts.map +1 -0
  70. package/dist/cjs/Monitor.js +233 -0
  71. package/dist/cjs/Monitor.js.map +7 -0
  72. package/dist/cjs/NarrowedCheck.d.ts +523 -0
  73. package/dist/cjs/NarrowedCheck.d.ts.map +1 -0
  74. package/dist/cjs/NarrowedCheck.js +263 -0
  75. package/dist/cjs/NarrowedCheck.js.map +7 -0
  76. package/dist/cjs/Notifications.d.ts +42 -0
  77. package/dist/cjs/Notifications.d.ts.map +1 -0
  78. package/dist/cjs/Notifications.js +177 -0
  79. package/dist/cjs/Notifications.js.map +7 -0
  80. package/dist/cjs/Plan.d.ts +127 -0
  81. package/dist/cjs/Plan.d.ts.map +1 -0
  82. package/dist/cjs/Plan.js +77 -0
  83. package/dist/cjs/Plan.js.map +7 -0
  84. package/dist/cjs/QuickJSSandbox.d.ts +151 -0
  85. package/dist/cjs/QuickJSSandbox.d.ts.map +1 -0
  86. package/dist/cjs/QuickJSSandbox.js +987 -0
  87. package/dist/cjs/QuickJSSandbox.js.map +7 -0
  88. package/dist/cjs/Relevance.d.ts +213 -0
  89. package/dist/cjs/Relevance.d.ts.map +1 -0
  90. package/dist/cjs/Relevance.js +183 -0
  91. package/dist/cjs/Relevance.js.map +7 -0
  92. package/dist/cjs/Sandbox.d.ts +637 -0
  93. package/dist/cjs/Sandbox.d.ts.map +1 -0
  94. package/dist/cjs/Sandbox.js +260 -0
  95. package/dist/cjs/Sandbox.js.map +7 -0
  96. package/dist/cjs/Steering.d.ts +464 -0
  97. package/dist/cjs/Steering.d.ts.map +1 -0
  98. package/dist/cjs/Steering.js +153 -0
  99. package/dist/cjs/Steering.js.map +7 -0
  100. package/dist/cjs/StructuredOutput.d.ts +252 -0
  101. package/dist/cjs/StructuredOutput.d.ts.map +1 -0
  102. package/dist/cjs/StructuredOutput.js +266 -0
  103. package/dist/cjs/StructuredOutput.js.map +7 -0
  104. package/dist/cjs/Sufficiency.d.ts +195 -0
  105. package/dist/cjs/Sufficiency.d.ts.map +1 -0
  106. package/dist/cjs/Sufficiency.js +110 -0
  107. package/dist/cjs/Sufficiency.js.map +7 -0
  108. package/dist/cjs/Supervisor.d.ts +719 -0
  109. package/dist/cjs/Supervisor.d.ts.map +1 -0
  110. package/dist/cjs/Supervisor.js +313 -0
  111. package/dist/cjs/Supervisor.js.map +7 -0
  112. package/dist/cjs/Tokens.d.ts +86 -0
  113. package/dist/cjs/Tokens.d.ts.map +1 -0
  114. package/dist/cjs/Tokens.js +72 -0
  115. package/dist/cjs/Tokens.js.map +7 -0
  116. package/dist/cjs/Transcript.d.ts +171 -0
  117. package/dist/cjs/Transcript.d.ts.map +1 -0
  118. package/dist/cjs/Transcript.js +342 -0
  119. package/dist/cjs/Transcript.js.map +7 -0
  120. package/dist/cjs/TruncatedOutput.d.ts +186 -0
  121. package/dist/cjs/TruncatedOutput.d.ts.map +1 -0
  122. package/dist/cjs/TruncatedOutput.js +143 -0
  123. package/dist/cjs/TruncatedOutput.js.map +7 -0
  124. package/dist/cjs/UnmovedTree.d.ts +113 -0
  125. package/dist/cjs/UnmovedTree.d.ts.map +1 -0
  126. package/dist/cjs/UnmovedTree.js +38 -0
  127. package/dist/cjs/UnmovedTree.js.map +7 -0
  128. package/dist/cjs/UnresolvedFailure.d.ts +196 -0
  129. package/dist/cjs/UnresolvedFailure.d.ts.map +1 -0
  130. package/dist/cjs/UnresolvedFailure.js +77 -0
  131. package/dist/cjs/UnresolvedFailure.js.map +7 -0
  132. package/dist/cjs/VacuousVerification.d.ts +237 -0
  133. package/dist/cjs/VacuousVerification.d.ts.map +1 -0
  134. package/dist/cjs/VacuousVerification.js +91 -0
  135. package/dist/cjs/VacuousVerification.js.map +7 -0
  136. package/dist/cjs/VariablesPanel.d.ts +117 -0
  137. package/dist/cjs/VariablesPanel.d.ts.map +1 -0
  138. package/dist/cjs/VariablesPanel.js +108 -0
  139. package/dist/cjs/VariablesPanel.js.map +7 -0
  140. package/dist/cjs/index.d.ts +172 -0
  141. package/dist/cjs/index.d.ts.map +1 -0
  142. package/dist/cjs/index.js +99 -0
  143. package/dist/cjs/index.js.map +7 -0
  144. package/dist/cjs/internal/bytes.d.ts +36 -0
  145. package/dist/cjs/internal/bytes.d.ts.map +1 -0
  146. package/dist/cjs/internal/bytes.js +57 -0
  147. package/dist/cjs/internal/bytes.js.map +7 -0
  148. package/dist/cjs/internal/cellPrompt.d.ts +122 -0
  149. package/dist/cjs/internal/cellPrompt.d.ts.map +1 -0
  150. package/dist/cjs/internal/cellPrompt.js +146 -0
  151. package/dist/cjs/internal/cellPrompt.js.map +7 -0
  152. package/dist/cjs/internal/compactable.d.ts +44 -0
  153. package/dist/cjs/internal/compactable.d.ts.map +1 -0
  154. package/dist/cjs/internal/compactable.js +56 -0
  155. package/dist/cjs/internal/compactable.js.map +7 -0
  156. package/dist/cjs/internal/compactionMarks.d.ts +278 -0
  157. package/dist/cjs/internal/compactionMarks.d.ts.map +1 -0
  158. package/dist/cjs/internal/compactionMarks.js +212 -0
  159. package/dist/cjs/internal/compactionMarks.js.map +7 -0
  160. package/dist/cjs/internal/demandText.d.ts +95 -0
  161. package/dist/cjs/internal/demandText.d.ts.map +1 -0
  162. package/dist/cjs/internal/demandText.js +70 -0
  163. package/dist/cjs/internal/demandText.js.map +7 -0
  164. package/dist/cjs/internal/elide.d.ts +109 -0
  165. package/dist/cjs/internal/elide.d.ts.map +1 -0
  166. package/dist/cjs/internal/elide.js +59 -0
  167. package/dist/cjs/internal/elide.js.map +7 -0
  168. package/dist/cjs/internal/frame.d.ts +463 -0
  169. package/dist/cjs/internal/frame.d.ts.map +1 -0
  170. package/dist/cjs/internal/frame.js +514 -0
  171. package/dist/cjs/internal/frame.js.map +7 -0
  172. package/dist/cjs/internal/nonNegativeSafeInt.d.ts +20 -0
  173. package/dist/cjs/internal/nonNegativeSafeInt.d.ts.map +1 -0
  174. package/dist/cjs/internal/nonNegativeSafeInt.js +29 -0
  175. package/dist/cjs/internal/nonNegativeSafeInt.js.map +7 -0
  176. package/dist/cjs/internal/paidUsage.d.ts +52 -0
  177. package/dist/cjs/internal/paidUsage.d.ts.map +1 -0
  178. package/dist/cjs/internal/paidUsage.js +70 -0
  179. package/dist/cjs/internal/paidUsage.js.map +7 -0
  180. package/dist/cjs/internal/printChannel.d.ts +233 -0
  181. package/dist/cjs/internal/printChannel.d.ts.map +1 -0
  182. package/dist/cjs/internal/printChannel.js +165 -0
  183. package/dist/cjs/internal/printChannel.js.map +7 -0
  184. package/dist/cjs/internal/printsObservation.d.ts +26 -0
  185. package/dist/cjs/internal/printsObservation.d.ts.map +1 -0
  186. package/dist/cjs/internal/printsObservation.js +27 -0
  187. package/dist/cjs/internal/printsObservation.js.map +7 -0
  188. package/dist/cjs/internal/refusal.d.ts +40 -0
  189. package/dist/cjs/internal/refusal.d.ts.map +1 -0
  190. package/dist/cjs/internal/refusal.js +45 -0
  191. package/dist/cjs/internal/refusal.js.map +7 -0
  192. package/dist/cjs/internal/supervision.d.ts +174 -0
  193. package/dist/cjs/internal/supervision.d.ts.map +1 -0
  194. package/dist/cjs/internal/supervision.js +402 -0
  195. package/dist/cjs/internal/supervision.js.map +7 -0
  196. package/dist/cjs/internal/unfinishedWork.d.ts +99 -0
  197. package/dist/cjs/internal/unfinishedWork.d.ts.map +1 -0
  198. package/dist/cjs/internal/unfinishedWork.js +80 -0
  199. package/dist/cjs/internal/unfinishedWork.js.map +7 -0
  200. package/dist/cjs/internal/unobservedCall.d.ts +112 -0
  201. package/dist/cjs/internal/unobservedCall.d.ts.map +1 -0
  202. package/dist/cjs/internal/unobservedCall.js +345 -0
  203. package/dist/cjs/internal/unobservedCall.js.map +7 -0
  204. package/dist/cjs/internal/untrustedData.d.ts +14 -0
  205. package/dist/cjs/internal/untrustedData.d.ts.map +1 -0
  206. package/dist/cjs/internal/untrustedData.js +30 -0
  207. package/dist/cjs/internal/untrustedData.js.map +7 -0
  208. package/dist/cjs/package.json +1 -0
  209. package/dist/esm/AgentEvent.d.ts +3092 -0
  210. package/dist/esm/AgentEvent.d.ts.map +1 -0
  211. package/dist/esm/AgentEvent.js +1610 -0
  212. package/dist/esm/AgentEvent.js.map +1 -0
  213. package/dist/esm/CallLedger.d.ts +378 -0
  214. package/dist/esm/CallLedger.d.ts.map +1 -0
  215. package/dist/esm/CallLedger.js +506 -0
  216. package/dist/esm/CallLedger.js.map +1 -0
  217. package/dist/esm/Cell.d.ts +774 -0
  218. package/dist/esm/Cell.d.ts.map +1 -0
  219. package/dist/esm/Cell.js +772 -0
  220. package/dist/esm/Cell.js.map +1 -0
  221. package/dist/esm/CellCalls.d.ts +115 -0
  222. package/dist/esm/CellCalls.d.ts.map +1 -0
  223. package/dist/esm/CellCalls.js +97 -0
  224. package/dist/esm/CellCalls.js.map +1 -0
  225. package/dist/esm/CellHistory.d.ts +102 -0
  226. package/dist/esm/CellHistory.d.ts.map +1 -0
  227. package/dist/esm/CellHistory.js +91 -0
  228. package/dist/esm/CellHistory.js.map +1 -0
  229. package/dist/esm/CellTurn.d.ts +1071 -0
  230. package/dist/esm/CellTurn.d.ts.map +1 -0
  231. package/dist/esm/CellTurn.js +3410 -0
  232. package/dist/esm/CellTurn.js.map +1 -0
  233. package/dist/esm/CellValidation.d.ts +94 -0
  234. package/dist/esm/CellValidation.d.ts.map +1 -0
  235. package/dist/esm/CellValidation.js +335 -0
  236. package/dist/esm/CellValidation.js.map +1 -0
  237. package/dist/esm/Compaction.d.ts +158 -0
  238. package/dist/esm/Compaction.d.ts.map +1 -0
  239. package/dist/esm/Compaction.js +216 -0
  240. package/dist/esm/Compaction.js.map +1 -0
  241. package/dist/esm/CompletionClaim.d.ts +801 -0
  242. package/dist/esm/CompletionClaim.d.ts.map +1 -0
  243. package/dist/esm/CompletionClaim.js +833 -0
  244. package/dist/esm/CompletionClaim.js.map +1 -0
  245. package/dist/esm/ContextWindow.d.ts +435 -0
  246. package/dist/esm/ContextWindow.d.ts.map +1 -0
  247. package/dist/esm/ContextWindow.js +427 -0
  248. package/dist/esm/ContextWindow.js.map +1 -0
  249. package/dist/esm/EngineLike.d.ts +546 -0
  250. package/dist/esm/EngineLike.d.ts.map +1 -0
  251. package/dist/esm/EngineLike.js +218 -0
  252. package/dist/esm/EngineLike.js.map +1 -0
  253. package/dist/esm/ExternalTranscript.d.ts +349 -0
  254. package/dist/esm/ExternalTranscript.d.ts.map +1 -0
  255. package/dist/esm/ExternalTranscript.js +987 -0
  256. package/dist/esm/ExternalTranscript.js.map +1 -0
  257. package/dist/esm/FailedCall.d.ts +132 -0
  258. package/dist/esm/FailedCall.d.ts.map +1 -0
  259. package/dist/esm/FailedCall.js +131 -0
  260. package/dist/esm/FailedCall.js.map +1 -0
  261. package/dist/esm/FlowBinding.d.ts +289 -0
  262. package/dist/esm/FlowBinding.d.ts.map +1 -0
  263. package/dist/esm/FlowBinding.js +376 -0
  264. package/dist/esm/FlowBinding.js.map +1 -0
  265. package/dist/esm/HarnessError.d.ts +57 -0
  266. package/dist/esm/HarnessError.d.ts.map +1 -0
  267. package/dist/esm/HarnessError.js +85 -0
  268. package/dist/esm/HarnessError.js.map +1 -0
  269. package/dist/esm/Judgement.d.ts +289 -0
  270. package/dist/esm/Judgement.d.ts.map +1 -0
  271. package/dist/esm/Judgement.js +305 -0
  272. package/dist/esm/Judgement.js.map +1 -0
  273. package/dist/esm/Monitor.d.ts +374 -0
  274. package/dist/esm/Monitor.d.ts.map +1 -0
  275. package/dist/esm/Monitor.js +370 -0
  276. package/dist/esm/Monitor.js.map +1 -0
  277. package/dist/esm/NarrowedCheck.d.ts +523 -0
  278. package/dist/esm/NarrowedCheck.d.ts.map +1 -0
  279. package/dist/esm/NarrowedCheck.js +612 -0
  280. package/dist/esm/NarrowedCheck.js.map +1 -0
  281. package/dist/esm/Notifications.d.ts +42 -0
  282. package/dist/esm/Notifications.d.ts.map +1 -0
  283. package/dist/esm/Notifications.js +215 -0
  284. package/dist/esm/Notifications.js.map +1 -0
  285. package/dist/esm/Plan.d.ts +127 -0
  286. package/dist/esm/Plan.d.ts.map +1 -0
  287. package/dist/esm/Plan.js +97 -0
  288. package/dist/esm/Plan.js.map +1 -0
  289. package/dist/esm/QuickJSSandbox.d.ts +151 -0
  290. package/dist/esm/QuickJSSandbox.d.ts.map +1 -0
  291. package/dist/esm/QuickJSSandbox.js +1364 -0
  292. package/dist/esm/QuickJSSandbox.js.map +1 -0
  293. package/dist/esm/Relevance.d.ts +213 -0
  294. package/dist/esm/Relevance.d.ts.map +1 -0
  295. package/dist/esm/Relevance.js +254 -0
  296. package/dist/esm/Relevance.js.map +1 -0
  297. package/dist/esm/Sandbox.d.ts +637 -0
  298. package/dist/esm/Sandbox.d.ts.map +1 -0
  299. package/dist/esm/Sandbox.js +464 -0
  300. package/dist/esm/Sandbox.js.map +1 -0
  301. package/dist/esm/Steering.d.ts +464 -0
  302. package/dist/esm/Steering.d.ts.map +1 -0
  303. package/dist/esm/Steering.js +193 -0
  304. package/dist/esm/Steering.js.map +1 -0
  305. package/dist/esm/StructuredOutput.d.ts +252 -0
  306. package/dist/esm/StructuredOutput.d.ts.map +1 -0
  307. package/dist/esm/StructuredOutput.js +430 -0
  308. package/dist/esm/StructuredOutput.js.map +1 -0
  309. package/dist/esm/Sufficiency.d.ts +195 -0
  310. package/dist/esm/Sufficiency.d.ts.map +1 -0
  311. package/dist/esm/Sufficiency.js +207 -0
  312. package/dist/esm/Sufficiency.js.map +1 -0
  313. package/dist/esm/Supervisor.d.ts +719 -0
  314. package/dist/esm/Supervisor.d.ts.map +1 -0
  315. package/dist/esm/Supervisor.js +575 -0
  316. package/dist/esm/Supervisor.js.map +1 -0
  317. package/dist/esm/Tokens.d.ts +86 -0
  318. package/dist/esm/Tokens.d.ts.map +1 -0
  319. package/dist/esm/Tokens.js +92 -0
  320. package/dist/esm/Tokens.js.map +1 -0
  321. package/dist/esm/Transcript.d.ts +171 -0
  322. package/dist/esm/Transcript.d.ts.map +1 -0
  323. package/dist/esm/Transcript.js +424 -0
  324. package/dist/esm/Transcript.js.map +1 -0
  325. package/dist/esm/TruncatedOutput.d.ts +186 -0
  326. package/dist/esm/TruncatedOutput.d.ts.map +1 -0
  327. package/dist/esm/TruncatedOutput.js +257 -0
  328. package/dist/esm/TruncatedOutput.js.map +1 -0
  329. package/dist/esm/UnmovedTree.d.ts +113 -0
  330. package/dist/esm/UnmovedTree.d.ts.map +1 -0
  331. package/dist/esm/UnmovedTree.js +90 -0
  332. package/dist/esm/UnmovedTree.js.map +1 -0
  333. package/dist/esm/UnresolvedFailure.d.ts +196 -0
  334. package/dist/esm/UnresolvedFailure.d.ts.map +1 -0
  335. package/dist/esm/UnresolvedFailure.js +218 -0
  336. package/dist/esm/UnresolvedFailure.js.map +1 -0
  337. package/dist/esm/VacuousVerification.d.ts +237 -0
  338. package/dist/esm/VacuousVerification.d.ts.map +1 -0
  339. package/dist/esm/VacuousVerification.js +245 -0
  340. package/dist/esm/VacuousVerification.js.map +1 -0
  341. package/dist/esm/VariablesPanel.d.ts +117 -0
  342. package/dist/esm/VariablesPanel.d.ts.map +1 -0
  343. package/dist/esm/VariablesPanel.js +142 -0
  344. package/dist/esm/VariablesPanel.js.map +1 -0
  345. package/dist/esm/index.d.ts +172 -0
  346. package/dist/esm/index.d.ts.map +1 -0
  347. package/dist/esm/index.js +172 -0
  348. package/dist/esm/index.js.map +1 -0
  349. package/dist/esm/internal/bytes.d.ts +36 -0
  350. package/dist/esm/internal/bytes.d.ts.map +1 -0
  351. package/dist/esm/internal/bytes.js +70 -0
  352. package/dist/esm/internal/bytes.js.map +1 -0
  353. package/dist/esm/internal/cellPrompt.d.ts +122 -0
  354. package/dist/esm/internal/cellPrompt.d.ts.map +1 -0
  355. package/dist/esm/internal/cellPrompt.js +276 -0
  356. package/dist/esm/internal/cellPrompt.js.map +1 -0
  357. package/dist/esm/internal/compactable.d.ts +44 -0
  358. package/dist/esm/internal/compactable.d.ts.map +1 -0
  359. package/dist/esm/internal/compactable.js +71 -0
  360. package/dist/esm/internal/compactable.js.map +1 -0
  361. package/dist/esm/internal/compactionMarks.d.ts +278 -0
  362. package/dist/esm/internal/compactionMarks.d.ts.map +1 -0
  363. package/dist/esm/internal/compactionMarks.js +317 -0
  364. package/dist/esm/internal/compactionMarks.js.map +1 -0
  365. package/dist/esm/internal/demandText.d.ts +95 -0
  366. package/dist/esm/internal/demandText.d.ts.map +1 -0
  367. package/dist/esm/internal/demandText.js +128 -0
  368. package/dist/esm/internal/demandText.js.map +1 -0
  369. package/dist/esm/internal/elide.d.ts +109 -0
  370. package/dist/esm/internal/elide.d.ts.map +1 -0
  371. package/dist/esm/internal/elide.js +123 -0
  372. package/dist/esm/internal/elide.js.map +1 -0
  373. package/dist/esm/internal/frame.d.ts +463 -0
  374. package/dist/esm/internal/frame.d.ts.map +1 -0
  375. package/dist/esm/internal/frame.js +861 -0
  376. package/dist/esm/internal/frame.js.map +1 -0
  377. package/dist/esm/internal/nonNegativeSafeInt.d.ts +20 -0
  378. package/dist/esm/internal/nonNegativeSafeInt.d.ts.map +1 -0
  379. package/dist/esm/internal/nonNegativeSafeInt.js +20 -0
  380. package/dist/esm/internal/nonNegativeSafeInt.js.map +1 -0
  381. package/dist/esm/internal/paidUsage.d.ts +52 -0
  382. package/dist/esm/internal/paidUsage.d.ts.map +1 -0
  383. package/dist/esm/internal/paidUsage.js +72 -0
  384. package/dist/esm/internal/paidUsage.js.map +1 -0
  385. package/dist/esm/internal/printChannel.d.ts +233 -0
  386. package/dist/esm/internal/printChannel.d.ts.map +1 -0
  387. package/dist/esm/internal/printChannel.js +376 -0
  388. package/dist/esm/internal/printChannel.js.map +1 -0
  389. package/dist/esm/internal/printsObservation.d.ts +26 -0
  390. package/dist/esm/internal/printsObservation.d.ts.map +1 -0
  391. package/dist/esm/internal/printsObservation.js +29 -0
  392. package/dist/esm/internal/printsObservation.js.map +1 -0
  393. package/dist/esm/internal/refusal.d.ts +40 -0
  394. package/dist/esm/internal/refusal.d.ts.map +1 -0
  395. package/dist/esm/internal/refusal.js +47 -0
  396. package/dist/esm/internal/refusal.js.map +1 -0
  397. package/dist/esm/internal/supervision.d.ts +174 -0
  398. package/dist/esm/internal/supervision.d.ts.map +1 -0
  399. package/dist/esm/internal/supervision.js +485 -0
  400. package/dist/esm/internal/supervision.js.map +1 -0
  401. package/dist/esm/internal/unfinishedWork.d.ts +99 -0
  402. package/dist/esm/internal/unfinishedWork.d.ts.map +1 -0
  403. package/dist/esm/internal/unfinishedWork.js +85 -0
  404. package/dist/esm/internal/unfinishedWork.js.map +1 -0
  405. package/dist/esm/internal/unobservedCall.d.ts +112 -0
  406. package/dist/esm/internal/unobservedCall.d.ts.map +1 -0
  407. package/dist/esm/internal/unobservedCall.js +501 -0
  408. package/dist/esm/internal/unobservedCall.js.map +1 -0
  409. package/dist/esm/internal/untrustedData.d.ts +14 -0
  410. package/dist/esm/internal/untrustedData.d.ts.map +1 -0
  411. package/dist/esm/internal/untrustedData.js +15 -0
  412. package/dist/esm/internal/untrustedData.js.map +1 -0
  413. package/docs/README.md +129 -0
  414. package/docs/api.md +1869 -0
  415. package/docs/concepts.md +238 -0
  416. package/docs/external-transcripts.md +245 -0
  417. package/docs/guides/bind-flows.md +167 -0
  418. package/docs/guides/drive-the-loop.md +265 -0
  419. package/docs/guides/run-cells.md +262 -0
  420. package/docs/guides/workerd.md +144 -0
  421. package/docs/installation.md +69 -0
  422. package/docs/quickstart.md +121 -0
  423. package/docs/reference.md +954 -0
  424. package/docs/troubleshooting.md +177 -0
  425. package/package.json +463 -3
  426. package/src/AgentEvent.ts +1772 -0
  427. package/src/CallLedger.ts +560 -0
  428. package/src/Cell.ts +926 -0
  429. package/src/CellCalls.ts +198 -0
  430. package/src/CellHistory.ts +128 -0
  431. package/src/CellTurn.ts +4450 -0
  432. package/src/CellValidation.ts +382 -0
  433. package/src/Compaction.ts +330 -0
  434. package/src/CompletionClaim.ts +1013 -0
  435. package/src/ContextWindow.ts +669 -0
  436. package/src/EngineLike.ts +614 -0
  437. package/src/ExternalTranscript.ts +1143 -0
  438. package/src/FailedCall.ts +163 -0
  439. package/src/FlowBinding.ts +603 -0
  440. package/src/HarnessError.ts +98 -0
  441. package/src/Judgement.ts +526 -0
  442. package/src/Monitor.ts +579 -0
  443. package/src/NarrowedCheck.ts +694 -0
  444. package/src/Notifications.ts +262 -0
  445. package/src/Plan.ts +113 -0
  446. package/src/QuickJSSandbox.ts +1557 -0
  447. package/src/Relevance.ts +352 -0
  448. package/src/Sandbox.ts +908 -0
  449. package/src/Steering.ts +405 -0
  450. package/src/StructuredOutput.ts +484 -0
  451. package/src/Sufficiency.ts +247 -0
  452. package/src/Supervisor.ts +798 -0
  453. package/src/Tokens.ts +108 -0
  454. package/src/Transcript.ts +513 -0
  455. package/src/TruncatedOutput.ts +297 -0
  456. package/src/UnmovedTree.ts +121 -0
  457. package/src/UnresolvedFailure.ts +240 -0
  458. package/src/VacuousVerification.ts +280 -0
  459. package/src/VariablesPanel.ts +165 -0
  460. package/src/index.ts +204 -0
  461. package/src/internal/bytes.ts +70 -0
  462. package/src/internal/cellPrompt.ts +337 -0
  463. package/src/internal/compactable.ts +76 -0
  464. package/src/internal/compactionMarks.ts +454 -0
  465. package/src/internal/demandText.ts +145 -0
  466. package/src/internal/elide.ts +130 -0
  467. package/src/internal/frame.ts +1178 -0
  468. package/src/internal/nonNegativeSafeInt.ts +24 -0
  469. package/src/internal/paidUsage.ts +90 -0
  470. package/src/internal/printChannel.ts +434 -0
  471. package/src/internal/printsObservation.ts +31 -0
  472. package/src/internal/refusal.ts +53 -0
  473. package/src/internal/supervision.ts +652 -0
  474. package/src/internal/unfinishedWork.ts +123 -0
  475. package/src/internal/unobservedCall.ts +536 -0
  476. package/src/internal/untrustedData.ts +19 -0
@@ -0,0 +1,237 @@
1
+ /**
2
+ * The proof that was already true before anything changed.
3
+ *
4
+ * **This control is not wired into `CellTurn`. Nothing in a production run
5
+ * reads it, and no run is told anything by it.** The module, this suite and
6
+ * `AgentEvent.VacuousVerificationObserved` are kept intact so it can be
7
+ * measured on its own, in its own wave, against the contract text r92
8
+ * measured. Everything below describes what it does when an arm turns it on.
9
+ *
10
+ * **Its input no longer exists.** {@link stored} reads the reserved
11
+ * `verification` key out of the durable state a cell filed by hand, and the
12
+ * filing surface was deleted on 2026-08-24: `Cell.Continue.state` decodes and
13
+ * is populated by nothing. An arm that re-wires this module reads nothing until
14
+ * it first decides where a realm run declares its verification — a name bound
15
+ * in the realm, a print, or a new field — so the wave that turns this back on
16
+ * carries that decision with it. {@link stored} is left reading `Schema.Json`
17
+ * because that decision has not been made and the r90–r96 journals it can be
18
+ * replayed against are still filing journals.
19
+ *
20
+ * It was live for exactly one wave. the r93 wave report reads
21
+ * the result off the 45 journals, and the reason it is off is that the wave
22
+ * cannot price it:
23
+ *
24
+ * - It fired **twice in 45 journals**, and on neither of the instances the
25
+ * diagnosis or the replay predicted. `django__django-14351`, the run it was
26
+ * written for, resolved that wave with **no observation on its journal at
27
+ * all** — so the row it was built to close was closed by something else, and
28
+ * two prompt rules landed in the same round.
29
+ * - `sympy__sympy-13878` is the firing that worked: told at frame 1 that its
30
+ * stored check was already green, the run replaced it, spent seventeen more
31
+ * frames on a different proof, and resolved — cheaper and in fewer frames
32
+ * than any earlier wave.
33
+ * - `django__django-15732` is the firing that did not. The observation landed
34
+ * on frame 7, which is the frame that made the correct edit. On frame 8 the
35
+ * run made a second edit that rewrote the enclosing block and restored the
36
+ * first edit's text **byte for byte**. Both edits reported `mutated: true`
37
+ * on an `observed` basis, the final tree equalled the base, and the captured
38
+ * diff was zero bytes. The instance had resolved in r90, r91 and r92; it is
39
+ * the wave's only empty patch.
40
+ *
41
+ * Nothing in this module's contract asks a run to revert, and one instance is
42
+ * not a mechanism. But it is the first evidence that a fact delivered on the
43
+ * `invalidProbe` channel can be read by a run as an instruction to retreat,
44
+ * and the one consequential firing in the wave preceded the wave's only
45
+ * revert-to-empty-patch. Two firings is not a rate. Turning this back on is a
46
+ * wave of its own — this control alone, on r92's contract text, with
47
+ * `django__django-15732` and `sympy__sympy-13878` as the rows to read — and
48
+ * not a change that rides along with another.
49
+ *
50
+ * A run is asked to store the check it verified with as
51
+ * `state.verification: { flow, input }` and to re-run that exact check after
52
+ * its edit. Nothing in that rule says the check ever failed. A run may pick a
53
+ * command that was green on the tree it was handed, watch it stay green after
54
+ * the edit, and complete citing a before-and-after that never moved.
55
+ *
56
+ * That is not a hypothetical either. `django__django-14351` lost a baseline
57
+ * verdict across two waves, and its journal says why in two rows: the same
58
+ * verification script — one content digest — ran at sequence 260, before any
59
+ * frame of the run had changed a byte, and exited 0; then again at sequence
60
+ * 582, after the edit, and exited 0. Both readings are true and the pair
61
+ * establishes nothing. The contract already says the words — *a command
62
+ * becomes evidence only once you have SEEN it fail on the unmodified tree* —
63
+ * and the run stored a check it had watched pass there instead.
64
+ *
65
+ * The harness can see this without re-running anything. It already records
66
+ * every check a frame ran, whether that check reported a passing exit status,
67
+ * and how many frames of the run had changed the workspace when it ran. A
68
+ * check that passed while that count was zero, in a frame that itself changed
69
+ * nothing, is a check that passed on the tree the run was handed. If a later
70
+ * cell stores that exact call as its verification, the run is standing on a
71
+ * proof that cannot distinguish its own change from no change at all.
72
+ *
73
+ * One reading takes it back: the same call reported *failing* over that same
74
+ * untouched tree. Then the run has watched the red the contract asks for, and a
75
+ * second, green reading of it before any edit says the command is unsteady
76
+ * rather than that the run never saw it fail. Such a signature is never
77
+ * admitted, so the observation can only ever be made about a check this run has
78
+ * no pre-edit failure for.
79
+ *
80
+ * So the harness says so, and does nothing else. It is delivered on the
81
+ * `invalidProbe` channel — the one place the loop already contradicts a
82
+ * reading of a result the flow itself could see through — because it is the
83
+ * same class of fact: a result that reads identically on a broken tree and on
84
+ * a fixed one. No bounce, no demand, no cap: the run continues on the
85
+ * transition it wrote. A harness that refused the completion would be grading
86
+ * the agent's work with its own, which is the line every control in this
87
+ * package holds, and it would be refusing on a *guess* — a check that was
88
+ * green before an edit is the right check for a task whose bug is a crash the
89
+ * command never reached, and only the run knows which it has.
90
+ *
91
+ * It fires at most once per distinct verification input. The fact is about a
92
+ * call, the record only grows, and a run that has been told and stored the
93
+ * same check again has decided, which is its decision to make.
94
+ *
95
+ * @since 0.1.0
96
+ */
97
+ import { Schema } from "effect";
98
+ import type * as NarrowedCheck from "./NarrowedCheck.ts";
99
+ /**
100
+ * How many pristine-tree passes one run carries forward.
101
+ *
102
+ * The ledger is durable controller state, so it is bounded, and it only ever
103
+ * grows while the run has changed nothing: the moment a frame edits, nothing
104
+ * new is admitted. The longest graded run made 43 calls across 24 frames with
105
+ * its first edit at frame 3, so sixteen covers every check a run takes before
106
+ * it commits to a change. A run that outlives the bound forgets its oldest
107
+ * passes first, which can cost the observation and can never invent one.
108
+ *
109
+ * @category constants
110
+ * @since 0.1.0
111
+ */
112
+ export declare const retained = 16;
113
+ declare const Pass_base: Schema.Class<Pass, Schema.Struct<{
114
+ /** The flow the call named. */
115
+ readonly flow: Schema.String;
116
+ /** The call's identity, as the controller's own signature names it. */
117
+ readonly signature: Schema.String;
118
+ /** The call's input as it was written, clipped, for the observation to quote. */
119
+ readonly label: Schema.String;
120
+ }>, {}>;
121
+ /**
122
+ * One check that passed over the tree the run was handed.
123
+ *
124
+ * @category models
125
+ * @since 0.1.0
126
+ */
127
+ export declare class Pass extends Pass_base {
128
+ }
129
+ /**
130
+ * The pristine-tree passes this run carries, oldest first and bounded.
131
+ *
132
+ * @category schemas
133
+ * @since 0.1.0
134
+ */
135
+ export declare const Ledger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof Pass>>, never>;
136
+ /**
137
+ * The pristine-tree passes this run carries, oldest first and bounded.
138
+ *
139
+ * @category models
140
+ * @since 0.1.0
141
+ */
142
+ export type Ledger = typeof Ledger.Type;
143
+ /**
144
+ * Records one frame's passing checks, but only while the tree is untouched.
145
+ *
146
+ * Three conditions, and all of them are refusals rather than readings. `epoch`
147
+ * is the run's own count of frames that changed the workspace *before* this
148
+ * one, so a non-zero epoch means some earlier frame already edited and a pass
149
+ * taken now says nothing about the tree the run was handed. `stable` is the
150
+ * same question inside one frame: a frame's calls are not ordered against its
151
+ * edits in anything the harness records, so a check from a frame that also
152
+ * edited might have run on either side of it. `Sufficiency` refuses the same
153
+ * stamp for the same reason; see `NarrowedCheck` `Check` `stable`.
154
+ *
155
+ * `failed` is the third, and it is the one that keeps the observation from
156
+ * contradicting the record it is read off. A check the run has already watched
157
+ * *fail* over the tree it was handed is a check the run has done the contract's
158
+ * work on, whatever it printed the second time: it is red on the unmodified
159
+ * tree, and a later green reading of it at the same epoch says the command is
160
+ * unsteady, not that the run never saw it fail. Telling such a run its proof
161
+ * was "already green" would be a sentence its own journal refutes, so the
162
+ * signature is refused on the way in and evicted if an earlier pass already put
163
+ * it there. The list is the run's failing-check ledger read at epoch zero —
164
+ * `Sufficiency` already keeps it, stamped with the epoch each failure was
165
+ * watched in — so nothing new is measured or stored for this. That ledger is
166
+ * bounded, so a run with more distinct pre-edit failures than `Sufficiency`
167
+ * retains can forget one; forgetting can cost the refusal and can never invent
168
+ * a pass.
169
+ *
170
+ * A repeated signature keeps its first entry rather than taking a second slot:
171
+ * the entries are all the same tree, so re-running one adds no information and
172
+ * re-stamping it would only cost the ledger its oldest genuinely distinct pass.
173
+ *
174
+ * @category combinators
175
+ * @since 0.1.0
176
+ */
177
+ export declare const remember: (ledger: Ledger, options: {
178
+ /** The checks this frame ran. */
179
+ readonly frame: ReadonlyArray<NarrowedCheck.Check>;
180
+ /** Frames that had changed the workspace before this one. */
181
+ readonly epoch: number;
182
+ /** Signatures this run has watched fail over the tree it was handed. */
183
+ readonly failed: ReadonlyArray<string>;
184
+ }) => Ledger;
185
+ /**
186
+ * The `{ flow, input }` pair a cell stored as its verification, if it stored
187
+ * one this module can read.
188
+ *
189
+ * The reserved key and its two fields are the contract's own words, and this
190
+ * is the only thing the controller ever reads out of `agentState`. Anything
191
+ * else under `verification` — a string, a bare command, a shape the contract
192
+ * does not describe — reads as absent, because a state key the harness cannot
193
+ * parse is the cell's own memory and not a claim about evidence.
194
+ *
195
+ * @category conversions
196
+ * @since 0.1.0
197
+ */
198
+ export declare const stored: (agentState: Schema.Json) => {
199
+ readonly flow: string;
200
+ readonly input: Schema.Json;
201
+ } | undefined;
202
+ /**
203
+ * Finds the pristine-tree pass a stored verification is standing on.
204
+ *
205
+ * The match is on the controller's own call signature, so it is the *exact*
206
+ * `{ flow, input }` the contract asks a run to reuse — a broadened or narrowed
207
+ * command is a different call and is not this failure.
208
+ *
209
+ * `stated` is the run's record of what it has already been told, which is what
210
+ * keeps this to one sentence per distinct input.
211
+ *
212
+ * @category conversions
213
+ * @since 0.1.0
214
+ */
215
+ export declare const find: (options: {
216
+ /** Checks that passed over the tree the run was handed, oldest first. */
217
+ readonly ledger: Ledger;
218
+ /** The signature of the `{ flow, input }` the cell stored. */
219
+ readonly signature: string;
220
+ /** Verification signatures this run has already been told about. */
221
+ readonly stated: ReadonlyArray<string>;
222
+ }) => Pass | undefined;
223
+ /**
224
+ * States that the stored proof was already green before anything changed.
225
+ *
226
+ * It quotes the call, says what the record establishes about it, and names the
227
+ * two things the run may do — keep it, having a reason, or go find a reading
228
+ * that can move. Neither is refused and neither is graded: a check that was
229
+ * green before the edit is the right check for a task whose bug is a crash the
230
+ * command never reached, and only the run knows whether that is this task.
231
+ *
232
+ * @category constructors
233
+ * @since 0.1.0
234
+ */
235
+ export declare const observation: (found: Pass) => string;
236
+ export {};
237
+ //# sourceMappingURL=VacuousVerification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VacuousVerification.d.ts","sourceRoot":"","sources":["../../src/VacuousVerification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,KAAK,CAAA;;IASxB,+BAA+B;;IAE/B,uEAAuE;;IAEvE,iFAAiF;;;AAXnF;;;;;GAKG;AACH,qBAAa,IAAK,SAAQ,SAOxB;CAAG;AAEL;;;;;GAKG;AACH,eAAO,MAAM,MAAM,iGAGlB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,QAAQ,GACnB,QAAQ,MAAM,EACd,SAAS;IACP,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAClD,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACvC,KACA,MAeF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GACjB,YAAY,MAAM,CAAC,IAAI,KACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAA;CAAE,GAAG,SAQ3D,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACvC,KAAG,IAAI,GAAG,SAGV,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,KAAG,MAM+gB,CAAA"}
@@ -0,0 +1,245 @@
1
+ /**
2
+ * The proof that was already true before anything changed.
3
+ *
4
+ * **This control is not wired into `CellTurn`. Nothing in a production run
5
+ * reads it, and no run is told anything by it.** The module, this suite and
6
+ * `AgentEvent.VacuousVerificationObserved` are kept intact so it can be
7
+ * measured on its own, in its own wave, against the contract text r92
8
+ * measured. Everything below describes what it does when an arm turns it on.
9
+ *
10
+ * **Its input no longer exists.** {@link stored} reads the reserved
11
+ * `verification` key out of the durable state a cell filed by hand, and the
12
+ * filing surface was deleted on 2026-08-24: `Cell.Continue.state` decodes and
13
+ * is populated by nothing. An arm that re-wires this module reads nothing until
14
+ * it first decides where a realm run declares its verification — a name bound
15
+ * in the realm, a print, or a new field — so the wave that turns this back on
16
+ * carries that decision with it. {@link stored} is left reading `Schema.Json`
17
+ * because that decision has not been made and the r90–r96 journals it can be
18
+ * replayed against are still filing journals.
19
+ *
20
+ * It was live for exactly one wave. the r93 wave report reads
21
+ * the result off the 45 journals, and the reason it is off is that the wave
22
+ * cannot price it:
23
+ *
24
+ * - It fired **twice in 45 journals**, and on neither of the instances the
25
+ * diagnosis or the replay predicted. `django__django-14351`, the run it was
26
+ * written for, resolved that wave with **no observation on its journal at
27
+ * all** — so the row it was built to close was closed by something else, and
28
+ * two prompt rules landed in the same round.
29
+ * - `sympy__sympy-13878` is the firing that worked: told at frame 1 that its
30
+ * stored check was already green, the run replaced it, spent seventeen more
31
+ * frames on a different proof, and resolved — cheaper and in fewer frames
32
+ * than any earlier wave.
33
+ * - `django__django-15732` is the firing that did not. The observation landed
34
+ * on frame 7, which is the frame that made the correct edit. On frame 8 the
35
+ * run made a second edit that rewrote the enclosing block and restored the
36
+ * first edit's text **byte for byte**. Both edits reported `mutated: true`
37
+ * on an `observed` basis, the final tree equalled the base, and the captured
38
+ * diff was zero bytes. The instance had resolved in r90, r91 and r92; it is
39
+ * the wave's only empty patch.
40
+ *
41
+ * Nothing in this module's contract asks a run to revert, and one instance is
42
+ * not a mechanism. But it is the first evidence that a fact delivered on the
43
+ * `invalidProbe` channel can be read by a run as an instruction to retreat,
44
+ * and the one consequential firing in the wave preceded the wave's only
45
+ * revert-to-empty-patch. Two firings is not a rate. Turning this back on is a
46
+ * wave of its own — this control alone, on r92's contract text, with
47
+ * `django__django-15732` and `sympy__sympy-13878` as the rows to read — and
48
+ * not a change that rides along with another.
49
+ *
50
+ * A run is asked to store the check it verified with as
51
+ * `state.verification: { flow, input }` and to re-run that exact check after
52
+ * its edit. Nothing in that rule says the check ever failed. A run may pick a
53
+ * command that was green on the tree it was handed, watch it stay green after
54
+ * the edit, and complete citing a before-and-after that never moved.
55
+ *
56
+ * That is not a hypothetical either. `django__django-14351` lost a baseline
57
+ * verdict across two waves, and its journal says why in two rows: the same
58
+ * verification script — one content digest — ran at sequence 260, before any
59
+ * frame of the run had changed a byte, and exited 0; then again at sequence
60
+ * 582, after the edit, and exited 0. Both readings are true and the pair
61
+ * establishes nothing. The contract already says the words — *a command
62
+ * becomes evidence only once you have SEEN it fail on the unmodified tree* —
63
+ * and the run stored a check it had watched pass there instead.
64
+ *
65
+ * The harness can see this without re-running anything. It already records
66
+ * every check a frame ran, whether that check reported a passing exit status,
67
+ * and how many frames of the run had changed the workspace when it ran. A
68
+ * check that passed while that count was zero, in a frame that itself changed
69
+ * nothing, is a check that passed on the tree the run was handed. If a later
70
+ * cell stores that exact call as its verification, the run is standing on a
71
+ * proof that cannot distinguish its own change from no change at all.
72
+ *
73
+ * One reading takes it back: the same call reported *failing* over that same
74
+ * untouched tree. Then the run has watched the red the contract asks for, and a
75
+ * second, green reading of it before any edit says the command is unsteady
76
+ * rather than that the run never saw it fail. Such a signature is never
77
+ * admitted, so the observation can only ever be made about a check this run has
78
+ * no pre-edit failure for.
79
+ *
80
+ * So the harness says so, and does nothing else. It is delivered on the
81
+ * `invalidProbe` channel — the one place the loop already contradicts a
82
+ * reading of a result the flow itself could see through — because it is the
83
+ * same class of fact: a result that reads identically on a broken tree and on
84
+ * a fixed one. No bounce, no demand, no cap: the run continues on the
85
+ * transition it wrote. A harness that refused the completion would be grading
86
+ * the agent's work with its own, which is the line every control in this
87
+ * package holds, and it would be refusing on a *guess* — a check that was
88
+ * green before an edit is the right check for a task whose bug is a crash the
89
+ * command never reached, and only the run knows which it has.
90
+ *
91
+ * It fires at most once per distinct verification input. The fact is about a
92
+ * call, the record only grows, and a run that has been told and stored the
93
+ * same check again has decided, which is its decision to make.
94
+ *
95
+ * @since 0.1.0
96
+ */
97
+ import { Schema } from "effect";
98
+ import * as Effect from "effect/Effect";
99
+ /**
100
+ * How many pristine-tree passes one run carries forward.
101
+ *
102
+ * The ledger is durable controller state, so it is bounded, and it only ever
103
+ * grows while the run has changed nothing: the moment a frame edits, nothing
104
+ * new is admitted. The longest graded run made 43 calls across 24 frames with
105
+ * its first edit at frame 3, so sixteen covers every check a run takes before
106
+ * it commits to a change. A run that outlives the bound forgets its oldest
107
+ * passes first, which can cost the observation and can never invent one.
108
+ *
109
+ * @category constants
110
+ * @since 0.1.0
111
+ */
112
+ export const retained = 16;
113
+ /**
114
+ * One check that passed over the tree the run was handed.
115
+ *
116
+ * @category models
117
+ * @since 0.1.0
118
+ */
119
+ export class Pass extends Schema.Class("flows/harness/VacuousVerification/Pass")({
120
+ /** The flow the call named. */
121
+ flow: Schema.String,
122
+ /** The call's identity, as the controller's own signature names it. */
123
+ signature: Schema.String,
124
+ /** The call's input as it was written, clipped, for the observation to quote. */
125
+ label: Schema.String
126
+ }) {
127
+ }
128
+ /**
129
+ * The pristine-tree passes this run carries, oldest first and bounded.
130
+ *
131
+ * @category schemas
132
+ * @since 0.1.0
133
+ */
134
+ export const Ledger = Schema.Array(Pass).pipe(Schema.withConstructorDefault(Effect.succeed([])), Schema.withDecodingDefaultKey(Effect.succeed([])));
135
+ /**
136
+ * Records one frame's passing checks, but only while the tree is untouched.
137
+ *
138
+ * Three conditions, and all of them are refusals rather than readings. `epoch`
139
+ * is the run's own count of frames that changed the workspace *before* this
140
+ * one, so a non-zero epoch means some earlier frame already edited and a pass
141
+ * taken now says nothing about the tree the run was handed. `stable` is the
142
+ * same question inside one frame: a frame's calls are not ordered against its
143
+ * edits in anything the harness records, so a check from a frame that also
144
+ * edited might have run on either side of it. `Sufficiency` refuses the same
145
+ * stamp for the same reason; see `NarrowedCheck` `Check` `stable`.
146
+ *
147
+ * `failed` is the third, and it is the one that keeps the observation from
148
+ * contradicting the record it is read off. A check the run has already watched
149
+ * *fail* over the tree it was handed is a check the run has done the contract's
150
+ * work on, whatever it printed the second time: it is red on the unmodified
151
+ * tree, and a later green reading of it at the same epoch says the command is
152
+ * unsteady, not that the run never saw it fail. Telling such a run its proof
153
+ * was "already green" would be a sentence its own journal refutes, so the
154
+ * signature is refused on the way in and evicted if an earlier pass already put
155
+ * it there. The list is the run's failing-check ledger read at epoch zero —
156
+ * `Sufficiency` already keeps it, stamped with the epoch each failure was
157
+ * watched in — so nothing new is measured or stored for this. That ledger is
158
+ * bounded, so a run with more distinct pre-edit failures than `Sufficiency`
159
+ * retains can forget one; forgetting can cost the refusal and can never invent
160
+ * a pass.
161
+ *
162
+ * A repeated signature keeps its first entry rather than taking a second slot:
163
+ * the entries are all the same tree, so re-running one adds no information and
164
+ * re-stamping it would only cost the ledger its oldest genuinely distinct pass.
165
+ *
166
+ * @category combinators
167
+ * @since 0.1.0
168
+ */
169
+ export const remember = (ledger, options) => {
170
+ const refused = new Set(options.failed);
171
+ const kept = new Map(ledger.filter((entry) => !refused.has(entry.signature)).map((entry) => [entry.signature, entry]));
172
+ if (options.epoch === 0) {
173
+ for (const check of options.frame) {
174
+ if (!check.passing || !check.stable)
175
+ continue;
176
+ if (refused.has(check.signature))
177
+ continue;
178
+ if (kept.has(check.signature))
179
+ continue;
180
+ kept.set(check.signature, new Pass({ flow: check.flow, signature: check.signature, label: check.label }));
181
+ }
182
+ }
183
+ const distinct = [...kept.values()];
184
+ return distinct.slice(Math.max(0, distinct.length - retained));
185
+ };
186
+ /**
187
+ * The `{ flow, input }` pair a cell stored as its verification, if it stored
188
+ * one this module can read.
189
+ *
190
+ * The reserved key and its two fields are the contract's own words, and this
191
+ * is the only thing the controller ever reads out of `agentState`. Anything
192
+ * else under `verification` — a string, a bare command, a shape the contract
193
+ * does not describe — reads as absent, because a state key the harness cannot
194
+ * parse is the cell's own memory and not a claim about evidence.
195
+ *
196
+ * @category conversions
197
+ * @since 0.1.0
198
+ */
199
+ export const stored = (agentState) => {
200
+ if (agentState === null || typeof agentState !== "object" || Array.isArray(agentState))
201
+ return undefined;
202
+ const declared = agentState["verification"];
203
+ if (declared === null || declared === undefined || typeof declared !== "object" || Array.isArray(declared)) {
204
+ return undefined;
205
+ }
206
+ const { flow, input } = declared;
207
+ return typeof flow === "string" && input !== undefined ? { flow, input } : undefined;
208
+ };
209
+ /**
210
+ * Finds the pristine-tree pass a stored verification is standing on.
211
+ *
212
+ * The match is on the controller's own call signature, so it is the *exact*
213
+ * `{ flow, input }` the contract asks a run to reuse — a broadened or narrowed
214
+ * command is a different call and is not this failure.
215
+ *
216
+ * `stated` is the run's record of what it has already been told, which is what
217
+ * keeps this to one sentence per distinct input.
218
+ *
219
+ * @category conversions
220
+ * @since 0.1.0
221
+ */
222
+ export const find = (options) => {
223
+ if (options.stated.includes(options.signature))
224
+ return undefined;
225
+ return options.ledger.find((entry) => entry.signature === options.signature);
226
+ };
227
+ /**
228
+ * States that the stored proof was already green before anything changed.
229
+ *
230
+ * It quotes the call, says what the record establishes about it, and names the
231
+ * two things the run may do — keep it, having a reason, or go find a reading
232
+ * that can move. Neither is refused and neither is graded: a check that was
233
+ * green before the edit is the right check for a task whose bug is a crash the
234
+ * command never reached, and only the run knows whether that is this task.
235
+ *
236
+ * @category constructors
237
+ * @since 0.1.0
238
+ */
239
+ export const observation = (found) => `Vacuous verification — the check you stored as \`state.verification\` is a check this run already watched PASS on the unmodified tree, before any frame of it changed a byte.
240
+
241
+ - the stored check: ${found.flow} ${found.label}
242
+ - what this run saw it do on the tree it was handed: exit 0
243
+
244
+ Re-running it after your edit cannot show your change did anything: it reads identically on a broken tree and on a fixed one, so a green result after the edit is the same green result as before it. A proof is a check you have watched FAIL and then watched pass. Nothing is being asked of you and nothing has been refused — if this command is genuinely the only observable the task has, keep it and say in your output that it never failed and why. Otherwise the reading you still need is one that is red right now. This notice is written once per distinct verification.`;
245
+ //# sourceMappingURL=VacuousVerification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VacuousVerification.js","sourceRoot":"","sources":["../../src/VacuousVerification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAA;AAE1B;;;;;GAKG;AACH,MAAM,OAAO,IAAK,SAAQ,MAAM,CAAC,KAAK,CAAO,wCAAwC,CAAC,CAAC;IACrF,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC;CAAG;AAEL;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAC3C,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAsB,EAAE,CAAC,CAAC,EACtE,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAsB,EAAE,CAAC,CAAC,CACvE,CAAA;AAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,MAAc,EACd,OAOC,EACO,EAAE;IACV,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACvC,MAAM,IAAI,GAAG,IAAI,GAAG,CAClB,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACjG,CAAA;IACD,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;QACxB,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,SAAQ;YAC7C,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,SAAQ;YAC1C,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC;gBAAE,SAAQ;YACvC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QAC3G,CAAC;IACH,CAAC;IACD,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IACnC,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAA;AAChE,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CACpB,UAAuB,EAC6C,EAAE;IACtE,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;QAAE,OAAO,SAAS,CAAA;IACxG,MAAM,QAAQ,GAAI,UAA0C,CAAC,cAAc,CAAC,CAAA;IAC5E,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC3G,OAAO,SAAS,CAAA;IAClB,CAAC;IACD,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,QAAuC,CAAA;IAC/D,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACtF,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,OAOpB,EAAoB,EAAE;IACrB,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAA;IAChE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,KAAK,OAAO,CAAC,SAAS,CAAC,CAAA;AAC9E,CAAC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAW,EAAU,EAAE,CACjD;;sBAEoB,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,KAAK;;;yjBAG0gB,CAAA","sourcesContent":["/**\n * The proof that was already true before anything changed.\n *\n * **This control is not wired into `CellTurn`. Nothing in a production run\n * reads it, and no run is told anything by it.** The module, this suite and\n * `AgentEvent.VacuousVerificationObserved` are kept intact so it can be\n * measured on its own, in its own wave, against the contract text r92\n * measured. Everything below describes what it does when an arm turns it on.\n *\n * **Its input no longer exists.** {@link stored} reads the reserved\n * `verification` key out of the durable state a cell filed by hand, and the\n * filing surface was deleted on 2026-08-24: `Cell.Continue.state` decodes and\n * is populated by nothing. An arm that re-wires this module reads nothing until\n * it first decides where a realm run declares its verification — a name bound\n * in the realm, a print, or a new field — so the wave that turns this back on\n * carries that decision with it. {@link stored} is left reading `Schema.Json`\n * because that decision has not been made and the r90–r96 journals it can be\n * replayed against are still filing journals.\n *\n * It was live for exactly one wave. the r93 wave report reads\n * the result off the 45 journals, and the reason it is off is that the wave\n * cannot price it:\n *\n * - It fired **twice in 45 journals**, and on neither of the instances the\n * diagnosis or the replay predicted. `django__django-14351`, the run it was\n * written for, resolved that wave with **no observation on its journal at\n * all** — so the row it was built to close was closed by something else, and\n * two prompt rules landed in the same round.\n * - `sympy__sympy-13878` is the firing that worked: told at frame 1 that its\n * stored check was already green, the run replaced it, spent seventeen more\n * frames on a different proof, and resolved — cheaper and in fewer frames\n * than any earlier wave.\n * - `django__django-15732` is the firing that did not. The observation landed\n * on frame 7, which is the frame that made the correct edit. On frame 8 the\n * run made a second edit that rewrote the enclosing block and restored the\n * first edit's text **byte for byte**. Both edits reported `mutated: true`\n * on an `observed` basis, the final tree equalled the base, and the captured\n * diff was zero bytes. The instance had resolved in r90, r91 and r92; it is\n * the wave's only empty patch.\n *\n * Nothing in this module's contract asks a run to revert, and one instance is\n * not a mechanism. But it is the first evidence that a fact delivered on the\n * `invalidProbe` channel can be read by a run as an instruction to retreat,\n * and the one consequential firing in the wave preceded the wave's only\n * revert-to-empty-patch. Two firings is not a rate. Turning this back on is a\n * wave of its own — this control alone, on r92's contract text, with\n * `django__django-15732` and `sympy__sympy-13878` as the rows to read — and\n * not a change that rides along with another.\n *\n * A run is asked to store the check it verified with as\n * `state.verification: { flow, input }` and to re-run that exact check after\n * its edit. Nothing in that rule says the check ever failed. A run may pick a\n * command that was green on the tree it was handed, watch it stay green after\n * the edit, and complete citing a before-and-after that never moved.\n *\n * That is not a hypothetical either. `django__django-14351` lost a baseline\n * verdict across two waves, and its journal says why in two rows: the same\n * verification script — one content digest — ran at sequence 260, before any\n * frame of the run had changed a byte, and exited 0; then again at sequence\n * 582, after the edit, and exited 0. Both readings are true and the pair\n * establishes nothing. The contract already says the words — *a command\n * becomes evidence only once you have SEEN it fail on the unmodified tree* —\n * and the run stored a check it had watched pass there instead.\n *\n * The harness can see this without re-running anything. It already records\n * every check a frame ran, whether that check reported a passing exit status,\n * and how many frames of the run had changed the workspace when it ran. A\n * check that passed while that count was zero, in a frame that itself changed\n * nothing, is a check that passed on the tree the run was handed. If a later\n * cell stores that exact call as its verification, the run is standing on a\n * proof that cannot distinguish its own change from no change at all.\n *\n * One reading takes it back: the same call reported *failing* over that same\n * untouched tree. Then the run has watched the red the contract asks for, and a\n * second, green reading of it before any edit says the command is unsteady\n * rather than that the run never saw it fail. Such a signature is never\n * admitted, so the observation can only ever be made about a check this run has\n * no pre-edit failure for.\n *\n * So the harness says so, and does nothing else. It is delivered on the\n * `invalidProbe` channel — the one place the loop already contradicts a\n * reading of a result the flow itself could see through — because it is the\n * same class of fact: a result that reads identically on a broken tree and on\n * a fixed one. No bounce, no demand, no cap: the run continues on the\n * transition it wrote. A harness that refused the completion would be grading\n * the agent's work with its own, which is the line every control in this\n * package holds, and it would be refusing on a *guess* — a check that was\n * green before an edit is the right check for a task whose bug is a crash the\n * command never reached, and only the run knows which it has.\n *\n * It fires at most once per distinct verification input. The fact is about a\n * call, the record only grows, and a run that has been told and stored the\n * same check again has decided, which is its decision to make.\n *\n * @since 0.1.0\n */\n\nimport { Schema } from \"effect\"\nimport * as Effect from \"effect/Effect\"\nimport type * as NarrowedCheck from \"./NarrowedCheck.ts\"\n\n/**\n * How many pristine-tree passes one run carries forward.\n *\n * The ledger is durable controller state, so it is bounded, and it only ever\n * grows while the run has changed nothing: the moment a frame edits, nothing\n * new is admitted. The longest graded run made 43 calls across 24 frames with\n * its first edit at frame 3, so sixteen covers every check a run takes before\n * it commits to a change. A run that outlives the bound forgets its oldest\n * passes first, which can cost the observation and can never invent one.\n *\n * @category constants\n * @since 0.1.0\n */\nexport const retained = 16\n\n/**\n * One check that passed over the tree the run was handed.\n *\n * @category models\n * @since 0.1.0\n */\nexport class Pass extends Schema.Class<Pass>(\"flows/harness/VacuousVerification/Pass\")({\n /** The flow the call named. */\n flow: Schema.String,\n /** The call's identity, as the controller's own signature names it. */\n signature: Schema.String,\n /** The call's input as it was written, clipped, for the observation to quote. */\n label: Schema.String\n}) {}\n\n/**\n * The pristine-tree passes this run carries, oldest first and bounded.\n *\n * @category schemas\n * @since 0.1.0\n */\nexport const Ledger = Schema.Array(Pass).pipe(\n Schema.withConstructorDefault(Effect.succeed<ReadonlyArray<Pass>>([])),\n Schema.withDecodingDefaultKey(Effect.succeed<ReadonlyArray<Pass>>([]))\n)\n\n/**\n * The pristine-tree passes this run carries, oldest first and bounded.\n *\n * @category models\n * @since 0.1.0\n */\nexport type Ledger = typeof Ledger.Type\n\n/**\n * Records one frame's passing checks, but only while the tree is untouched.\n *\n * Three conditions, and all of them are refusals rather than readings. `epoch`\n * is the run's own count of frames that changed the workspace *before* this\n * one, so a non-zero epoch means some earlier frame already edited and a pass\n * taken now says nothing about the tree the run was handed. `stable` is the\n * same question inside one frame: a frame's calls are not ordered against its\n * edits in anything the harness records, so a check from a frame that also\n * edited might have run on either side of it. `Sufficiency` refuses the same\n * stamp for the same reason; see `NarrowedCheck` `Check` `stable`.\n *\n * `failed` is the third, and it is the one that keeps the observation from\n * contradicting the record it is read off. A check the run has already watched\n * *fail* over the tree it was handed is a check the run has done the contract's\n * work on, whatever it printed the second time: it is red on the unmodified\n * tree, and a later green reading of it at the same epoch says the command is\n * unsteady, not that the run never saw it fail. Telling such a run its proof\n * was \"already green\" would be a sentence its own journal refutes, so the\n * signature is refused on the way in and evicted if an earlier pass already put\n * it there. The list is the run's failing-check ledger read at epoch zero —\n * `Sufficiency` already keeps it, stamped with the epoch each failure was\n * watched in — so nothing new is measured or stored for this. That ledger is\n * bounded, so a run with more distinct pre-edit failures than `Sufficiency`\n * retains can forget one; forgetting can cost the refusal and can never invent\n * a pass.\n *\n * A repeated signature keeps its first entry rather than taking a second slot:\n * the entries are all the same tree, so re-running one adds no information and\n * re-stamping it would only cost the ledger its oldest genuinely distinct pass.\n *\n * @category combinators\n * @since 0.1.0\n */\nexport const remember = (\n ledger: Ledger,\n options: {\n /** The checks this frame ran. */\n readonly frame: ReadonlyArray<NarrowedCheck.Check>\n /** Frames that had changed the workspace before this one. */\n readonly epoch: number\n /** Signatures this run has watched fail over the tree it was handed. */\n readonly failed: ReadonlyArray<string>\n }\n): Ledger => {\n const refused = new Set(options.failed)\n const kept = new Map(\n ledger.filter((entry) => !refused.has(entry.signature)).map((entry) => [entry.signature, entry])\n )\n if (options.epoch === 0) {\n for (const check of options.frame) {\n if (!check.passing || !check.stable) continue\n if (refused.has(check.signature)) continue\n if (kept.has(check.signature)) continue\n kept.set(check.signature, new Pass({ flow: check.flow, signature: check.signature, label: check.label }))\n }\n }\n const distinct = [...kept.values()]\n return distinct.slice(Math.max(0, distinct.length - retained))\n}\n\n/**\n * The `{ flow, input }` pair a cell stored as its verification, if it stored\n * one this module can read.\n *\n * The reserved key and its two fields are the contract's own words, and this\n * is the only thing the controller ever reads out of `agentState`. Anything\n * else under `verification` — a string, a bare command, a shape the contract\n * does not describe — reads as absent, because a state key the harness cannot\n * parse is the cell's own memory and not a claim about evidence.\n *\n * @category conversions\n * @since 0.1.0\n */\nexport const stored = (\n agentState: Schema.Json\n): { readonly flow: string; readonly input: Schema.Json } | undefined => {\n if (agentState === null || typeof agentState !== \"object\" || Array.isArray(agentState)) return undefined\n const declared = (agentState as Record<string, Schema.Json>)[\"verification\"]\n if (declared === null || declared === undefined || typeof declared !== \"object\" || Array.isArray(declared)) {\n return undefined\n }\n const { flow, input } = declared as Record<string, Schema.Json>\n return typeof flow === \"string\" && input !== undefined ? { flow, input } : undefined\n}\n\n/**\n * Finds the pristine-tree pass a stored verification is standing on.\n *\n * The match is on the controller's own call signature, so it is the *exact*\n * `{ flow, input }` the contract asks a run to reuse — a broadened or narrowed\n * command is a different call and is not this failure.\n *\n * `stated` is the run's record of what it has already been told, which is what\n * keeps this to one sentence per distinct input.\n *\n * @category conversions\n * @since 0.1.0\n */\nexport const find = (options: {\n /** Checks that passed over the tree the run was handed, oldest first. */\n readonly ledger: Ledger\n /** The signature of the `{ flow, input }` the cell stored. */\n readonly signature: string\n /** Verification signatures this run has already been told about. */\n readonly stated: ReadonlyArray<string>\n}): Pass | undefined => {\n if (options.stated.includes(options.signature)) return undefined\n return options.ledger.find((entry) => entry.signature === options.signature)\n}\n\n/**\n * States that the stored proof was already green before anything changed.\n *\n * It quotes the call, says what the record establishes about it, and names the\n * two things the run may do — keep it, having a reason, or go find a reading\n * that can move. Neither is refused and neither is graded: a check that was\n * green before the edit is the right check for a task whose bug is a crash the\n * command never reached, and only the run knows whether that is this task.\n *\n * @category constructors\n * @since 0.1.0\n */\nexport const observation = (found: Pass): string =>\n `Vacuous verification — the check you stored as \\`state.verification\\` is a check this run already watched PASS on the unmodified tree, before any frame of it changed a byte.\n\n- the stored check: ${found.flow} ${found.label}\n- what this run saw it do on the tree it was handed: exit 0\n\nRe-running it after your edit cannot show your change did anything: it reads identically on a broken tree and on a fixed one, so a green result after the edit is the same green result as before it. A proof is a check you have watched FAIL and then watched pass. Nothing is being asked of you and nothing has been refused — if this command is genuinely the only observable the task has, keep it and say in your output that it never failed and why. Otherwise the reading you still need is one that is red right now. This notice is written once per distinct verification.`\n"]}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * The variables panel: what the realm holds, stated every frame.
3
+ *
4
+ * A run's memory is not a JSON document the cell filed — it is the set of names
5
+ * the realm is holding, and the model can only act on what the prompt says about
6
+ * them. This is what the prompt says.
7
+ *
8
+ * Every line is a name, its type, one *cheap* size, and when it was last bound.
9
+ * Nothing here is serialized whole: a panel that stringified every global would
10
+ * pay the heap for it every frame, and the value the model wants is already
11
+ * under the name the panel prints.
12
+ *
13
+ * Freshness is derived from the cheap size, which is what makes the panel cost
14
+ * nothing. A binding rewritten to a value of the same type and the same size —
15
+ * a 40-character string replaced by a different 40-character string — reads as
16
+ * unchanged and keeps its stamp. That bound is stated rather than hidden: the
17
+ * panel is a roster, and the run's own prints are what say a value moved.
18
+ *
19
+ * @since 0.1.0
20
+ */
21
+ import { Schema } from "effect";
22
+ /**
23
+ * How many names the panel prints before it starts counting instead.
24
+ *
25
+ * Sixty-four is the same order as `CallLedger` `bound` and well above what a
26
+ * round near par binds: the five golfed instances hold between 6 and 21 names
27
+ * at their last frame. A run past the bound is shown its most recently bound
28
+ * names and told how many older ones it still holds.
29
+ *
30
+ * @category constants
31
+ * @since 0.1.0
32
+ */
33
+ export declare const bound = 64;
34
+ declare const Binding_base: Schema.Class<Binding, Schema.Struct<{
35
+ readonly name: Schema.String;
36
+ /**
37
+ * The name's JavaScript type, `unset` for a name a throw left unassigned, or
38
+ * `unreadable` for one whose value the probe could not even read — a throwing
39
+ * accessor, a proxy that refuses its own keys. The two are named apart because
40
+ * they say different things: one name holds nothing, the other holds something
41
+ * that will not be looked at.
42
+ */
43
+ readonly type: Schema.String;
44
+ /** One cheap measure of the value, already rendered; empty when there is none. */
45
+ readonly size: Schema.String;
46
+ }>, {}>;
47
+ /**
48
+ * One name the realm holds, with the cheap facts a probe can read off it.
49
+ *
50
+ * `size` is already rendered by the probe — a string's length, an array's
51
+ * length, an object's key count, a function's arity, a number or boolean by
52
+ * value — because the value itself never crosses the realm boundary.
53
+ *
54
+ * @category models
55
+ * @since 0.1.0
56
+ */
57
+ export declare class Binding extends Binding_base {
58
+ }
59
+ declare const Stamp_base: Schema.Class<Stamp, Schema.Struct<{
60
+ readonly name: Schema.String;
61
+ readonly type: Schema.String;
62
+ readonly size: Schema.String;
63
+ /** The frame whose cell last changed the binding's cheap shape. */
64
+ readonly frame: Schema.Int;
65
+ /** The frame whose cell first bound the name. */
66
+ readonly since: Schema.Int;
67
+ }>, {}>;
68
+ /**
69
+ * One name the realm holds, with the frames that first and last bound it.
70
+ *
71
+ * @category models
72
+ * @since 0.1.0
73
+ */
74
+ export declare class Stamp extends Stamp_base {
75
+ }
76
+ /**
77
+ * Every name the realm holds, with the frames that bound it.
78
+ *
79
+ * @category models
80
+ * @since 0.1.0
81
+ */
82
+ export declare const Ledger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof Stamp>>, never>;
83
+ /**
84
+ * Every name the realm holds, with the frames that bound it.
85
+ *
86
+ * @category models
87
+ * @since 0.1.0
88
+ */
89
+ export type Ledger = typeof Ledger.Type;
90
+ /**
91
+ * Re-stamps the panel against the bindings a frame closed on.
92
+ *
93
+ * A name whose type and size are unchanged keeps both of its frames, so the
94
+ * panel says when a binding last moved rather than that every name was touched
95
+ * again. A name the realm no longer reports is dropped: a `var` global cannot
96
+ * be deleted, so the only way a name leaves the probe's answer is the realm
97
+ * being rebuilt, and a roster that outlived its realm would be a lie.
98
+ *
99
+ * @category combinators
100
+ * @since 0.1.0
101
+ */
102
+ export declare const stamp: (known: Ledger, bindings: ReadonlyArray<Binding>, frame: number) => Ledger;
103
+ /**
104
+ * Renders the panel for one frame's prompt.
105
+ *
106
+ * `frame` is the frame whose cell just ran, which is what `new` and `changed`
107
+ * are relative to.
108
+ *
109
+ * @category conversions
110
+ * @since 0.1.0
111
+ */
112
+ export declare const render: (options: {
113
+ readonly ledger: Ledger;
114
+ readonly frame: number;
115
+ }) => string;
116
+ export {};
117
+ //# sourceMappingURL=VariablesPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VariablesPanel.d.ts","sourceRoot":"","sources":["../../src/VariablesPanel.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAKvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,KAAK,CAAA;;;IAcrB;;;;;;OAMG;;IAEH,kFAAkF;;;AApBpF;;;;;;;;;GASG;AACH,qBAAa,OAAQ,SAAQ,YAY3B;CAAG;;;;;IAYH,mEAAmE;;IAEnE,iDAAiD;;;AAZnD;;;;;GAKG;AACH,qBAAa,KAAM,SAAQ,UAQzB;CAAG;AAEL;;;;;GAKG;AACH,eAAO,MAAM,MAAM,kGAGlB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,UAAU,aAAa,CAAC,OAAO,CAAC,EAAE,OAAO,MAAM,KAAG,MAWtF,CAAA;AAUD;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,GAAI,SAAS;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB,KAAG,MAqBH,CAAA"}