@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,523 @@
1
+ /**
2
+ * The narrowing ledger: which checks this run has run, and over which tree.
3
+ *
4
+ * A run finishes by claiming its work is done. The evidence for that claim is
5
+ * the checks it actually ran, and a check is only evidence for the tree it ran
6
+ * over. The failure this module names is a completion whose last check is a
7
+ * *narrowed* version of one the run had already run in full, taken after the
8
+ * workspace moved and never followed by the broad one: the narrow result is
9
+ * true, the broad one is unknown, and the run reports the unknown half as
10
+ * proven.
11
+ *
12
+ * It is not hypothetical, and it is not one instance's accident. On a graded
13
+ * benchmark the same run shape decided the same instance twice, in two
14
+ * consecutive waves, identically. The journal of the second reads: the run ran
15
+ * `pytest -rA testing/test_collection.py` in full, used its three failures to
16
+ * discard a wrong candidate, edited two source files, re-ran the *same command
17
+ * with a `-k` filter selecting four of seventy-two names* — "4 passed, 68
18
+ * deselected" — and completed on that frame. The graded patch passed both
19
+ * target tests and 144 of 145 neighbours; the one it broke was among the 68 the
20
+ * filter dropped, and the run had watched that exact test pass, on the exact
21
+ * command, before the change that broke it.
22
+ *
23
+ * The harness does not re-run anything to find this out. It compares two things
24
+ * it already records — the input of every call, and the workspace digest each
25
+ * frame closed on — and hands the run one sentence naming the check it is
26
+ * missing. What the run does with that is the run's business: re-run the broad
27
+ * check, or say why it no longer applies. The loop asks once and accepts what
28
+ * comes back, because a harness that verified completions itself would be
29
+ * grading the agent's work with its own, and that hack was removed on purpose.
30
+ *
31
+ * The module names two shapes of the same failure, and the second is here
32
+ * because the first was escaped from the other side. {@link find} is
33
+ * broad-then-narrow, above. {@link findOnly} is narrow-only: the next wave of
34
+ * the same instance ran a filtered reading of the right file, ran nothing else,
35
+ * and completed — so there was no broader check in the ledger and nothing to
36
+ * narrow. Both readings deselected the one neighbour the patch broke.
37
+ *
38
+ * @since 0.1.0
39
+ */
40
+ import { Schema } from "effect";
41
+ /**
42
+ * How many distinct checks one run carries forward.
43
+ *
44
+ * The ledger is controller state, so it is bounded. Thirty-two covers a whole
45
+ * run at the rate a graded wave actually calls flows — its longest run issued
46
+ * 43 calls across 24 frames, most of them reads of one file — so the broad
47
+ * check a run ran early is still recognisable when it completes. A run that
48
+ * outlives the bound forgets its oldest checks first, which can cost a demand
49
+ * and can never invent one.
50
+ *
51
+ * @category constants
52
+ * @since 0.1.0
53
+ */
54
+ export declare const retained = 32;
55
+ /**
56
+ * Most distinct terms one recorded check may carry.
57
+ *
58
+ * A ledger entry stores the terms of a call's input, so an input that is mostly
59
+ * *content* — a patch, a file body, a generated document — would store that
60
+ * content twice over. Such a call is also not a check anybody narrows: nothing
61
+ * re-runs a file write with an added filter. The largest input any flow issued
62
+ * across five graded runs carried 119 terms, so the bound is more than twice
63
+ * the observed ceiling and drops only inputs that are payloads.
64
+ *
65
+ * @category constants
66
+ * @since 0.1.0
67
+ */
68
+ export declare const maxTerms = 256;
69
+ /**
70
+ * How many UTF-8 bytes of a check's input the demand may quote back.
71
+ *
72
+ * The demand has to name the check the run is missing, and a name it cannot
73
+ * read is not a name. Bounded because the label lives in controller state,
74
+ * once per retained entry. The honest-elision notice may exceed this content
75
+ * bound so it can say how many bytes are missing and where the whole input is.
76
+ *
77
+ * @category constants
78
+ * @since 1.0.0-rc.0
79
+ */
80
+ export declare const labelWidth = 512;
81
+ /**
82
+ * An input as its label quotes it: canonical JSON, except that an object's
83
+ * longest string member comes last.
84
+ *
85
+ * The label is clipped to {@link labelWidth}, and a call routed into a task
86
+ * container carries its route beside its program. For a `script` the route
87
+ * already sorts first; for a `command` it sorts after the program and the clip
88
+ * can take the route. Two graded runs of 2026-09-26 listed their scripts as
89
+ * the route plus the first two hundred bytes of the program. So the short
90
+ * members, the route among them, come first in every input, and the longest
91
+ * string, which is the program in every such input, fills the rest of a wider
92
+ * label.
93
+ *
94
+ * @category conversions
95
+ * @since 1.0.0-rc.0
96
+ */
97
+ export declare const label: (input: Schema.Json) => string;
98
+ /**
99
+ * Whether a term names a target rather than a condition.
100
+ *
101
+ * The distinction is what keeps {@link narrows} one-directional. A call that
102
+ * repeats every term of an earlier call and adds a *condition* — a filter, a
103
+ * selector, a flag — asks for a subset of what the earlier call covered. A call
104
+ * that adds a *target* asks about something the earlier call never looked at,
105
+ * which is a broader question, not a narrower one; running two files where one
106
+ * ran before is not a narrowing and must not be demanded as one.
107
+ *
108
+ * A term is read as a target when it carries a separator inside it — a slash or
109
+ * a dot. That covers paths, file names, dotted module names, and node ids, and
110
+ * it reads a version number or a decimal as a target too. Both errors are in
111
+ * the same direction: a term wrongly read as a target suppresses a demand, and
112
+ * a demand this module does not issue costs nothing.
113
+ *
114
+ * Exported because `UnresolvedFailure` asks a different question of the same
115
+ * distinction — whether a later call came back to what an earlier one was about
116
+ * — and a second copy of this predicate would be a second thing to keep true.
117
+ *
118
+ * @category predicates
119
+ * @since 0.1.0
120
+ */
121
+ export declare const targeting: (term: string) => boolean;
122
+ /**
123
+ * Whether a term names a target a reader would recognise as one.
124
+ *
125
+ * {@link targeting} is the relation's own rule and is deliberately generous:
126
+ * `.py`, `/`, and a bare `tests/` all satisfy it, and each of them only ever
127
+ * costs a demand. Two callers need the answer to a different question — which
128
+ * of a call's terms is the thing it is *about* — and for that a term nobody can
129
+ * read is worse than no term at all. This is that stricter reading: the
130
+ * separator has a real character on both sides, so `tests/test_a.py` and
131
+ * `django.contrib.admin.sites` qualify while a glob's leftover `/` and a bare
132
+ * `.py` do not.
133
+ *
134
+ * One lexical rule, not two: `CallLedger` names a call's subject with it and
135
+ * {@link findOnly} reads a check's subjects with it.
136
+ *
137
+ * @category predicates
138
+ * @since 0.1.0
139
+ */
140
+ export declare const names: (term: string) => boolean;
141
+ /**
142
+ * The terms of one call input in the order the canonical document states them.
143
+ *
144
+ * The whole canonical input is lexed, keys included, so the relation works for
145
+ * a shell command, a structured search, and any host flow this harness has
146
+ * never heard of.
147
+ *
148
+ * Exported in document order because `CallLedger` asks a positional question of
149
+ * the same lexer — which term this call is *about*, which is the first one that
150
+ * {@link targeting} accepts — and a second copy of the separator would be a
151
+ * second thing to keep true. {@link terms} is the set view of the same lex.
152
+ *
153
+ * @category conversions
154
+ * @since 0.1.0
155
+ */
156
+ export declare const lex: (input: Schema.Json) => ReadonlyArray<string>;
157
+ /**
158
+ * The distinct terms of one call input, sorted.
159
+ *
160
+ * Sorted and de-duplicated because the only questions asked of it are set
161
+ * questions.
162
+ *
163
+ * @category conversions
164
+ * @since 0.1.0
165
+ */
166
+ export declare const terms: (input: Schema.Json) => ReadonlyArray<string>;
167
+ /**
168
+ * The terms of one call input that could be conditions its author added.
169
+ *
170
+ * The whole document is lexed, so three kinds of term come out of the lexer
171
+ * that are part of how the call is *written* rather than a constraint on what
172
+ * it covers, and each is removed here:
173
+ *
174
+ * - a term that names a target ({@link targeting}) is what the call is about,
175
+ * not a condition on it;
176
+ * - a term that is a key of the input document itself is the call's shape —
177
+ * `command`, `timeoutMs` — which the author fills in, not adds;
178
+ * - a term that is only digits is a magnitude — a timeout, a limit, an offset
179
+ * — and a condition that subsets a check names cases rather than counting
180
+ * them. The flag carrying such a number is still read as a condition, so a
181
+ * stop-early flag does not hide behind its argument.
182
+ *
183
+ * All three exclusions err in one direction: a term wrongly removed here can
184
+ * suppress a demand and can never invent one.
185
+ *
186
+ * @category conversions
187
+ * @since 0.1.0
188
+ */
189
+ export declare const conditions: (input: Schema.Json) => ReadonlyArray<string>;
190
+ declare const Check_base: Schema.Class<Check, Schema.Struct<{
191
+ /** The flow the call named. */
192
+ readonly flow: Schema.String;
193
+ /** The call's identity, as the controller's own signature names it. */
194
+ readonly signature: Schema.String;
195
+ /** The distinct terms of the call's input, sorted; see {@link terms}. */
196
+ readonly terms: Schema.$Array<Schema.String>;
197
+ /**
198
+ * The subset of {@link Check.terms} that could be conditions the call's
199
+ * author added; see {@link conditions}.
200
+ *
201
+ * Stored rather than recomputed because it is a fact about the input
202
+ * document — its key names — and the ledger keeps terms, not documents.
203
+ * Defaults empty, so an entry journaled before the field decodes; the only
204
+ * reader is {@link findOnly}, where an empty set means the check carries no
205
+ * added condition, which suppresses a demand and never invents one.
206
+ */
207
+ readonly conditions: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.String>>, never>;
208
+ /**
209
+ * Content address of the workspace the frame that ran this check closed on.
210
+ *
211
+ * The *closing* digest, and not the opening one, because a frame's calls are
212
+ * not ordered against its edits in anything the harness records. A check that
213
+ * ran in the same frame as an edit is therefore stamped as if it ran after
214
+ * that edit, which reads a stale check as current and suppresses a demand.
215
+ * Conservative on purpose: the whole module errs towards asking nothing.
216
+ *
217
+ * Empty when the frame had no complete measurement to stamp it with, which
218
+ * makes the entry inert — an unmeasured tree cannot say anything moved.
219
+ */
220
+ readonly digest: Schema.String;
221
+ /** The call's input as it was written, clipped, for the demand to quote. */
222
+ readonly label: Schema.String;
223
+ /**
224
+ * Whether the call's own result reported a failing exit status.
225
+ *
226
+ * Nothing in this module reads it: a check that reported failures is exactly
227
+ * as good evidence of what the tree does as one that reported none, and the
228
+ * narrowing relation is about the shape of a question rather than its answer.
229
+ * It is recorded here because `UnresolvedFailure` asks about the answer, and
230
+ * two ledgers over the same calls would be two things to keep true. See
231
+ * `UnresolvedFailure` `failed` for what "reported" means, and why a flow that
232
+ * declares no exit status is neither failing nor passing.
233
+ */
234
+ readonly failing: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
235
+ /**
236
+ * Whether the call's own result reported a passing exit status.
237
+ *
238
+ * Not the negation of {@link Check.failing}, and that is the whole reason it
239
+ * is a second field: a flow that reports no exit status at all — a read, a
240
+ * search — is neither failing nor passing, and reading its silence as a pass
241
+ * would let `Sufficiency` build a completion signal out of a file read. Both
242
+ * default false, so a result that says nothing about a subject says nothing
243
+ * here either. See `UnresolvedFailure` `passed`.
244
+ */
245
+ readonly passing: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
246
+ /**
247
+ * Whether {@link Check.digest} is the tree this check actually read.
248
+ *
249
+ * A check is stamped with its frame's closing digest, and a frame may both
250
+ * edit and check. The frame's writes are calls, though, and calls settle in
251
+ * order, so the question has an answer rather than a guess: a check with no
252
+ * standing write after it read the tree the frame closed on and is stable; a
253
+ * check with a write after it read a tree that is gone and is not. A frame
254
+ * whose measurement moved with no call declaring it — a shell redirect —
255
+ * cannot place the move among its calls at all, so nothing in it is stable.
256
+ *
257
+ * What it buys each reader: for {@link find} an unstable reading is a stale
258
+ * check read as current, which costs a demand; for a *failure* carried by
259
+ * one the stamp would attribute a result to a tree the check never ran over,
260
+ * so `UnresolvedFailure` requires this. A reading attributed to a checkpoint
261
+ * is stable by pin rather than by position.
262
+ */
263
+ readonly stable: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
264
+ }>, {}>;
265
+ /**
266
+ * One check this run has run, and the tree it ran over.
267
+ *
268
+ * A call becomes a check when it settled successfully and declared no write.
269
+ * "Successfully" is about the call and not about the result: a command that
270
+ * exits non-zero settled successfully, and its output — clean or informative —
271
+ * is exactly what a run reads before deciding what to change. The graded run
272
+ * this module was built from used the three failures its broad check reported
273
+ * to discard a wrong candidate; a rule that only remembered green checks would
274
+ * have forgotten the most useful thing that run ever ran. A call the flow could
275
+ * not run at all observed nothing, and a call that changes the workspace is not
276
+ * an observation of it.
277
+ *
278
+ * @category models
279
+ * @since 0.1.0
280
+ */
281
+ export declare class Check extends Check_base {
282
+ }
283
+ /**
284
+ * A check this frame ran, paired with the broader one it stands in for.
285
+ *
286
+ * @category models
287
+ * @since 0.1.0
288
+ */
289
+ export interface Narrowing {
290
+ /** The broader check, last run over a tree that has since changed. */
291
+ readonly earlier: Check;
292
+ /** This frame's check, which repeats it and adds conditions. */
293
+ readonly later: Check;
294
+ }
295
+ /**
296
+ * Records one settled call as a check, unless its input is a payload.
297
+ *
298
+ * `undefined` is not a failure: it is an input with more distinct terms than
299
+ * {@link maxTerms}, which is a call carrying content rather than a question.
300
+ *
301
+ * @category constructors
302
+ * @since 0.1.0
303
+ */
304
+ export declare const check: (options: {
305
+ readonly flow: string;
306
+ readonly signature: string;
307
+ readonly input: Schema.Json;
308
+ readonly digest: string;
309
+ /** Whether the call's result reported a failing exit status. */
310
+ readonly failing?: boolean | undefined;
311
+ /** Whether the call's result reported a passing exit status. */
312
+ readonly passing?: boolean | undefined;
313
+ /** Whether the frame that ran it left the workspace as it found it. */
314
+ readonly stable?: boolean | undefined;
315
+ }) => Check | undefined;
316
+ /**
317
+ * Whether one call's terms are a strict narrowing of another's.
318
+ *
319
+ * The relation is: every term the earlier call carried is carried again, at
320
+ * least one term is added, and no added term names a target
321
+ * ({@link targeting}). In words — same question, more conditions on it. It is
322
+ * deliberately syntactic. It parses no flag, knows no test runner, and would
323
+ * hold identically for a search flow, a linter, or a host flow written after
324
+ * this one; the moment it started reading `-k` it would be a rule about pytest
325
+ * rather than a rule about evidence.
326
+ *
327
+ * @category predicates
328
+ * @since 0.1.0
329
+ */
330
+ export declare const narrows: (later: ReadonlyArray<string>, earlier: ReadonlyArray<string>) => boolean;
331
+ /**
332
+ * Finds the broadest check a completing frame narrowed and did not re-run.
333
+ *
334
+ * All four conditions have to hold, and each of them is read off something the
335
+ * harness already records rather than off anything a cell said about itself:
336
+ *
337
+ * 1. the frame closed on a complete measurement, so a digest means something;
338
+ * 2. some earlier check was last run over a *different* tree, which is what
339
+ * "you have changed something since" means with no timestamps involved;
340
+ * 3. this frame issued no call with that check's exact signature, so the run
341
+ * did not simply re-run it here;
342
+ * 4. some call this frame issued names the same flow and {@link narrows} it.
343
+ *
344
+ * The broadest such earlier check wins — fewest terms, which under this
345
+ * module's own relation is the least constrained question — so the demand names
346
+ * the strongest evidence the completion is missing rather than the first one
347
+ * found. Ties go to the more recently run check.
348
+ *
349
+ * @category conversions
350
+ * @since 0.1.0
351
+ */
352
+ export declare const find: (options: {
353
+ /** Checks this run ran before this frame, oldest first. */
354
+ readonly ledger: ReadonlyArray<Check>;
355
+ /** Checks this frame ran. */
356
+ readonly frame: ReadonlyArray<Check>;
357
+ /** The workspace digest this frame closed on; empty when unmeasured. */
358
+ readonly digest: string;
359
+ }) => Narrowing | undefined;
360
+ /**
361
+ * States which check a completion is standing on, and which one it is missing.
362
+ *
363
+ * The text asks for a decision and names both ways out as equals, in the shape
364
+ * the read-only demand already uses: re-run the check that was skipped, or say
365
+ * why it does not apply. It never asserts the run is wrong — a filter can be
366
+ * the right check after a change that removed cases — it asserts only what is
367
+ * true from the record: the broad result the run is relying on was measured on
368
+ * a tree that no longer exists.
369
+ *
370
+ * It also says plainly that nothing re-runs the check for the run, and that the
371
+ * next answer stands. Anything softer invites a re-submission of the same
372
+ * frame; anything harder would be the harness pretending it will keep score.
373
+ *
374
+ * @category constructors
375
+ * @since 0.1.0
376
+ */
377
+ export declare const demand: (found: Narrowing) => string;
378
+ /**
379
+ * The reading a completion stands on, when the run holds no other reading of
380
+ * what it names.
381
+ *
382
+ * @category models
383
+ * @since 0.1.0
384
+ */
385
+ export interface Only {
386
+ /** The last check the completing frame ran. */
387
+ readonly later: Check;
388
+ /** The subjects it names, as {@link names} reads them, sorted. */
389
+ readonly targets: ReadonlyArray<string>;
390
+ }
391
+ /**
392
+ * Finds a completion standing on the run's only reading of its own subjects.
393
+ *
394
+ * {@link find} names the completion whose check *narrows* an earlier, broader
395
+ * one. This names the case that escapes it from the other side: a completion
396
+ * whose check narrows nothing because the run never took the broader reading at
397
+ * all. On a graded benchmark the same instance was lost both ways in two
398
+ * consecutive waves — one run took a broad reading of the wrong file, the next
399
+ * took a filtered reading of the right one and ran nothing else — and the
400
+ * second escaped {@link find} because there was nothing in the ledger to
401
+ * narrow. The filtered reading deselected the one neighbour the patch broke.
402
+ *
403
+ * The harness cannot see that a filter is a filter without learning one test
404
+ * runner's flags, so it does not try. It asks the question the record can
405
+ * answer: is this reading the only one this run has of what it names, and does
406
+ * it carry a phrase this run alone put there.
407
+ *
408
+ * Five conditions, each read off the run's own record:
409
+ *
410
+ * 1. the completing frame ran at least one check, and the subject is its
411
+ * *last* one — the reading the completion stands closest to, as
412
+ * `UnresolvedFailure` reads its own ledger;
413
+ * 2. that check names at least one subject ({@link names}) and carries at
414
+ * least one condition ({@link conditions}) the run itself added: a term
415
+ * that is not in the text the run was handed (`taught`) and not in any
416
+ * other check the run has made. A term the harness taught the run — the
417
+ * runner its task names, a flag the task prescribes, an envelope value its
418
+ * own example shows — is the run doing as it was told, and a term the run
419
+ * uses in its other checks is how this run phrases a question. Neither is
420
+ * a condition this check put on its subjects, and a check whose every
421
+ * non-target term is accounted for one of those two ways carries nothing
422
+ * the demand could ask to see removed;
423
+ * 3. the run never ran this exact call before this frame. A call replayed from
424
+ * an earlier frame is the run's own baseline re-run byte for byte, which is
425
+ * the discipline the contract asks for and the opposite of the failure here;
426
+ * 4. every subject it names is named by some other check of this run, so these
427
+ * are subjects the run has been working on rather than a container path or a
428
+ * scratch directory that one command creates and uses;
429
+ * 5. no other check of this run names all of them together, so nothing in the
430
+ * record says what they report as one.
431
+ *
432
+ * ## What it deliberately cannot see
433
+ *
434
+ * Conditions 4 and 5 together mean a check naming exactly *one* subject is
435
+ * never named: if the run read that subject anywhere else, that reading covers
436
+ * this one, and if it did not, there is nothing to corroborate against. So the
437
+ * demand is about a *combination* the run has read only through one command,
438
+ * and a single filtered file with no other mention of the file in the run goes
439
+ * unremarked.
440
+ *
441
+ * That is a chosen floor rather than an oversight. Three benchmark waves
442
+ * produced fifteen completions between them, and the shapes are not separable
443
+ * above it: the losing run's `check <file> -k "<two cases>"` and a resolved
444
+ * run's `check <file-a> <file-b>` differ only in what the flag means, which is
445
+ * a fact about one test runner. Every weaker condition tried against those
446
+ * fifteen runs fired on one or both of the two best rounds the harness has ever
447
+ * scored — a demand costing a correct round a frame to ask about a check that
448
+ * carries no condition at all. This one speaks once, to the run that lost its
449
+ * instance to a filter, naming the command that carried it, and says nothing to
450
+ * the other fourteen.
451
+ *
452
+ * Condition 2's second half was measured in, not reasoned in. The r97 wave
453
+ * fired this demand five times: twice on completions standing on a `-k`
454
+ * filter — the failure the module exists to catch — and three times on runs
455
+ * whose last check ran a whole test module exactly as their task text
456
+ * prescribed, `<interpreter> -m <runner> <flag> <file>`. Each of those three
457
+ * answered the demand by re-issuing the identical completion with a sentence
458
+ * saying the check carried no filter, and each was accepted: the demand
459
+ * taught the harness nothing and cost a correct run one full-context frame.
460
+ * What separates the five in the record is exactly condition 2: every
461
+ * non-target term of the three was taught by the run's own prompt, part of
462
+ * the input's own shape, or already in the run's other checks, and the two
463
+ * that deserved the demand each carried a filter phrase found nowhere else in
464
+ * the run. The residual errors both suppress: a run whose task text happens
465
+ * to contain a term it later uses as a filter, or whose earlier checks
466
+ * carried the same filter flag over other subjects, completes unasked — and a
467
+ * demand this module does not issue costs nothing.
468
+ *
469
+ * @category conversions
470
+ * @since 0.1.0
471
+ */
472
+ export declare const findOnly: (options: {
473
+ /** Every check this run has run, this frame's included, oldest first. */
474
+ readonly ledger: ReadonlyArray<Check>;
475
+ /** Signatures the run had already issued before this frame. */
476
+ readonly before: ReadonlyArray<string>;
477
+ /** Checks this frame ran, in the order they settled. */
478
+ readonly frame: ReadonlyArray<Check>;
479
+ /**
480
+ * The distinct terms of the text the run was handed — its teaching, its
481
+ * catalog, its task — as {@link terms} lexes it.
482
+ *
483
+ * The prefix of the run's own context window is that text and nothing else:
484
+ * nothing model-authored lands there, so a run cannot teach itself a term
485
+ * by using it.
486
+ */
487
+ readonly taught: ReadonlyArray<string>;
488
+ }) => Only | undefined;
489
+ /**
490
+ * States that the completion has one reading of its subjects, and asks for the
491
+ * other one.
492
+ *
493
+ * It quotes the check, names the subjects, and says exactly what the record
494
+ * establishes: no other call of this run covers them. It does not claim the
495
+ * reading is filtered — the harness cannot read a flag — so it names what a
496
+ * condition is and leaves the run to say whether it has one. The two ways out
497
+ * are equals, as they are in every demand here, and the second answer stands.
498
+ *
499
+ * @category constructors
500
+ * @since 0.1.0
501
+ */
502
+ export declare const demandOnly: (found: Only) => string;
503
+ /**
504
+ * Folds this frame's checks into the run's ledger, newest last and bounded.
505
+ *
506
+ * A repeated signature moves to the newest position rather than taking a second
507
+ * slot, so a run looping on one command cannot push the broad check it ran
508
+ * early out of the ledger — and its digest is restamped, which is how re-running
509
+ * a check answers the demand it caused.
510
+ *
511
+ * @category conversions
512
+ * @since 0.1.0
513
+ */
514
+ export declare const remember: (ledger: ReadonlyArray<Check>, added: ReadonlyArray<Check>) => ReadonlyArray<Check>;
515
+ /**
516
+ * The ledger schema carried in controller state.
517
+ *
518
+ * @category schemas
519
+ * @since 0.1.0
520
+ */
521
+ export declare const Ledger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof Check>>, never>;
522
+ export {};
523
+ //# sourceMappingURL=NarrowedCheck.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NarrowedCheck.d.ts","sourceRoot":"","sources":["../../src/NarrowedCheck.ts"],"names":[],"mappings":"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"}