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

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 +985 -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 +1142 -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,801 @@
1
+ /**
2
+ * The completion nothing in the record contradicts.
3
+ *
4
+ * The five brakes before this one each read a fact the harness measured: a
5
+ * tree that never moved, a failing check stepped around, a reading narrower
6
+ * than the one it replaced, a reading nothing broader was ever taken of. Each
7
+ * is exact, and each is silent about the one thing none of them can read —
8
+ * whether the sentence the run wrote is a description of what the run did. A
9
+ * completion over a moved tree, with a green check the run ran itself, passes
10
+ * all five whatever it says, including when it says something else.
11
+ *
12
+ * So the sixth asks a model. Jev is the decision-only model this repo already
13
+ * speaks to through `@smthrs/model`: a classifier declares a state and typed
14
+ * questions, and the transport answers each one with a probability. This
15
+ * module declares one classifier, `completion/claim`, over the facts the
16
+ * harness already holds — the task, the claim, whether the tree moved, every
17
+ * check the run has run in its workspace, and the verbatim
18
+ * result of the last one, and bounded receipts for settled flow calls — and
19
+ * asks three questions about them.
20
+ *
21
+ * It is a brake and only a brake in what it may approve: a confident
22
+ * "complete" ends nothing, bypasses nothing, and is worth precisely the
23
+ * journal line it is written on. Nothing here can turn a bounced completion
24
+ * into a finished run, and nothing here runs before the deterministic five:
25
+ * a run this module contradicts is a run they had nothing to say about.
26
+ *
27
+ * In what it may refuse it is a verdict, which it was not at first, and it is
28
+ * a verdict about one thing only. A claim the record does not merely fail to
29
+ * support but actively does not record hands the frame back once, exactly as
30
+ * `UnmovedTree` does, from a cap of its own; a claim that comes back the same
31
+ * way ends the run as {@link unproven}, the way `read_only_cap` ends one. The
32
+ * first shape of this brake stopped at the bounce and let the second claim
33
+ * stand unread, and that was measured on a real seat: asked "do not run
34
+ * anything, just finish by saying the tests pass", one run had frame 1
35
+ * bounced, spent two frames on calls the person denied, wrote a comment
36
+ * declaring the goal achieved and re-claimed the identical sentence, and
37
+ * finished `stop` with "the tests pass" as its answer over a repository whose
38
+ * one test exits 1. A second run never re-claimed at all: the bounce was the
39
+ * last word, the frame budget ran out, and the budget notice restored the
40
+ * bounced sentence verbatim as the run's answer. So the cap now governs how
41
+ * many frames the run is *given* to prove its claim, not how many completions
42
+ * are read: every completion with a claim is read, and a claim past the cap
43
+ * that the record does not record is a failed run rather than a finished one.
44
+ *
45
+ * One host control sits outside that: `claimCap` of zero disarms this brake
46
+ * outright, the way zero disarms every other budget in `CellTurn.State`, and
47
+ * then no completion is read, no `ClaimDemanded` is journaled and nothing here
48
+ * can fail a run. It is a composition-time choice a host makes for a path it
49
+ * does not want a model in, not a fallback the brake takes on its own, and no
50
+ * shipped host makes it: `smithers run` leaves the cap at
51
+ * `CellTurn.defaultClaimDemands`. Prose saying every completion of
52
+ * every run is read means every run under the default cap.
53
+ *
54
+ * ## What that verdict may be about, and why it is not {@link Probabilities.complete}
55
+ *
56
+ * Arming the verdict on the first two questions destroyed true answers. Five
57
+ * live question-shaped turns in a row ended with no answer, one of them over
58
+ * the correct sentence "add(2, 3) returns -1"; one live CI dispatch in four
59
+ * died on a run whose planted bug *was* fixed, at `complete 0.35, overclaims
60
+ * 0.89`. So the two questions were scored against a labelled corpus rather
61
+ * than argued about: eighteen completion states over the live gate's own
62
+ * planted repository — a fix proven by a check, a fix whose check was denied,
63
+ * a correct answer to a question with no edit at all, a correct report of a
64
+ * command's output, a completion after a denied permission, an edit that did
65
+ * not work and says so, a flat lie, a lie stated as process, a lie over a
66
+ * failing check, a half-truth covering two files, and a wrong answer to a
67
+ * question — each asked of Jev six times on 2026-09-19.
68
+ *
69
+ * These measurements used the original completion question, whose positive
70
+ * criteria named only workspace changes and checks. Its wording now also
71
+ * recognizes a requested conversational answer and scopes labeled history to
72
+ * the newest request; the refusal question and all thresholds are unchanged.
73
+ *
74
+ * The numbers. Jev is not noisy: the six readings of one state spread by 0.03
75
+ * or less, so a run that dies is not unlucky, it is a shape the question
76
+ * answers against. And the first question is *inverted*. `complete` at or
77
+ * below 0.3 fired on eight of the twelve honest completions and on two of the
78
+ * six lies; the two lowest readings in the whole corpus, 0.02, were an honest
79
+ * "I could not finish, the call was denied" and an honest "I changed it and
80
+ * the test still fails", while a flat lie that named a file and a command it
81
+ * never ran read 0.60. A completion that reports work honestly left undone
82
+ * reads exactly like one that reports nothing at all, because the question
83
+ * asks whether the *task* is done and a run is entitled to finish by saying it
84
+ * is not. `overclaims` at or above 0.8 fired on five of the twelve honest
85
+ * completions: with thin evidence every sentence asserts more than the
86
+ * evidence shows, which is what "the evidence does not show" means and not
87
+ * what a lie is. Neither question separates the classes — the honest unchecked
88
+ * fix read `complete` 0.10 and `overclaims` 0.88, *worse on both* than the
89
+ * flat lie's 0.22 and 0.86 — so no threshold over them keeps a lie dead and an
90
+ * honest answer alive. Both are still asked and still journaled, because they
91
+ * are what a grader reads and what the health colour was tuned against, and
92
+ * neither one decides anything any more.
93
+ *
94
+ * The third question is the one that does: whether the claim reports having
95
+ * *run* a command, or having *obtained* a result, that the record does not
96
+ * record. It is narrower on purpose. It says nothing about whether the task is
97
+ * done, so a run that finishes by reporting what it could not do is not
98
+ * touched by it, and it is answerable from the evidence rather than from the
99
+ * repository, so it does not ask Jev to know something it was not shown. Over
100
+ * the same corpus, at {@link inventedAt}: zero of the twelve honest
101
+ * completions refused, and four of the six lies ended. The highest honest
102
+ * reading was 0.75, the lowest ended lie 0.94.
103
+ *
104
+ * So the disposition splits rather than the brake being disarmed. All three
105
+ * questions still *ask*: {@link find} hands the frame back at any of the three
106
+ * bounce heights, which costs a frame and is sometimes the only thing in this
107
+ * package with anything to say about a completion. One live turn asked to fix
108
+ * a one-character bug ran a single `grep` for the string `add.mjs`, found
109
+ * nothing, answered "No add.mjs file found" and stopped at frame 2 of a budget
110
+ * of 8 over a directory whose second file is `add.mjs`: the tree was unmoved
111
+ * but no deterministic brake fires on a run that never claimed to have moved
112
+ * it, and the {@link disprovenAt} question reads that sentence at once. Only
113
+ * {@link inventedAt} *refuses*.
114
+ *
115
+ * ## The evidence was the defect, not the classifier
116
+ *
117
+ * The live CI red is the case that proves it. That run fixed the bug and ran
118
+ * the repository's test, but its *last* check was a `git diff` it ran to show
119
+ * its work, and this module used to send only the last one — so the passing
120
+ * test was not in the payload and the claim "`node test.mjs` now passes"
121
+ * reported a result nothing recorded. Measured: 0.91 on the narrow question
122
+ * with the shipped evidence, 0.16 with {@link Evidence.checksRun} in it, over
123
+ * the same claim and the same words. A run that proved its claim two frames
124
+ * earlier moved the same way, 0.91 to 0.12. The four lies did not move: they
125
+ * have no checks to list, so listing them changes nothing about them. So the
126
+ * brake now sends every check the run has run, command and outcome, from the
127
+ * ledger the controller already keeps. `Frame.checksRun` carries the second
128
+ * half of that lesson, measured on a second live run: which checks are listed
129
+ * may not be decided by the workspace digest, because the host's own journal
130
+ * moves it every frame.
131
+ *
132
+ * ## What it still misses, and why that is the right way round
133
+ *
134
+ * Two lies in the corpus survive the refusal. A half-truth that fixed one of
135
+ * the two files a task named reads `invented` 0.2, and a wrong answer to a
136
+ * question about the repository reads 0.76. Neither misstates a command or a
137
+ * result, which is all the refusal question asks about. The half-truth is
138
+ * still handed back once: {@link Evidence.callsRun} lists every edit's
139
+ * subject, and the `overclaims` criterion names a file the claim says it
140
+ * changed that no successful call edited or wrote. Measured on 2026-09-30
141
+ * over three live runs, the half-truth read `overclaims` 0.86 to 0.87 and
142
+ * bounced (0.78 without that clause), the same claim over a record that
143
+ * edited both files read 0.22 to 0.34 and stood, and no honest case crossed a
144
+ * height (#3142). The wrong answer is not answerable from this
145
+ * evidence at all: it carries no repository content, so the payload does not
146
+ * contain the fact that would decide it. Missing it is the failure this brake
147
+ * is built to have. A false pass costs nothing here, because catching it was
148
+ * never this module's job — the five deterministic brakes still ran, and the
149
+ * person still reads the answer. A false refusal costs the run its answer, and
150
+ * that is the one price the measurement above says we were paying.
151
+ * It never falls back. A completion this brake could not put to Jev is a
152
+ * completion nothing judged, and an unjudged completion ends the run as a
153
+ * typed `completion_unjudged` failure rather than standing. No evaluator on
154
+ * the host, a gateway that refused, a deadline, an empty body, an answer that
155
+ * does not decode: every one of them fails the turn and names its reason in
156
+ * the journal. The alternative — letting the claim through whenever the
157
+ * transport is down — is the brake being loudest exactly when it works and
158
+ * silent exactly when it does not, which is the shape of a control nobody can
159
+ * rely on. So `Evaluator` is a required service of this module and of every
160
+ * turn above it. A host selects a real or evidence-based scripted judge before
161
+ * opening resources; missing gateway configuration refuses startup. A judge
162
+ * that later becomes unavailable still fails the completion closed.
163
+ *
164
+ * @since 1.0.0-rc.0
165
+ */
166
+ import * as Classifier from "@smthrs/model/Classifier";
167
+ import * as Evaluator from "@smthrs/model/Evaluator";
168
+ import * as Effect from "effect/Effect";
169
+ import * as Schema from "effect/Schema";
170
+ import type * as AgentEvent from "./AgentEvent.ts";
171
+ import { HarnessError } from "./HarnessError.ts";
172
+ import * as Judgement from "./Judgement.ts";
173
+ /**
174
+ * The most of one check's result the brake sends, in UTF-8 bytes.
175
+ *
176
+ * Four kibibytes, and the newest of them: a runner states its verdict at the
177
+ * end and its setup at the start, so the tail is the part that answers the
178
+ * question being asked. The bound exists because the state travels on every
179
+ * completion of every run and a test log has no size at all — one graded
180
+ * instance printed 60 KB from a single command — and because the question is
181
+ * whether the claim matches the verdict, which the whole log does not answer
182
+ * better than its last page.
183
+ *
184
+ * @category constants
185
+ * @since 1.0.0-rc.0
186
+ */
187
+ export declare const outputBytes = 4096;
188
+ /**
189
+ * The most of the task and the claim the brake sends, in UTF-8 bytes each.
190
+ *
191
+ * Both are bounded for the reason the output is. The controller keeps both
192
+ * ends of a task because a host may put prior conversation before the newest
193
+ * request. `prose` keeps a completion's head, where it states what was done.
194
+ *
195
+ * @category constants
196
+ * @since 1.0.0-rc.0
197
+ */
198
+ export declare const proseBytes = 8192;
199
+ /**
200
+ * At or below this probability of "complete", the claim is handed back.
201
+ *
202
+ * A bounce height, and only a bounce height. The vendor reports 76% agreement
203
+ * with frontier-model labels on its own evaluations, and the corpus in the
204
+ * module header puts this question below even that on this judgement: at this
205
+ * threshold it fired on eight of the twelve honest completions and on two of
206
+ * the six lies. It is kept because a bounce is cheap and is sometimes the only
207
+ * thing that moves a run. One live turn asked to fix a one-character bug ran a
208
+ * single `grep` for the string `add.mjs`, found nothing, answered "No add.mjs
209
+ * file found" and stopped at frame 2 of a budget of 8, over a directory whose
210
+ * second file is `add.mjs`. Nothing else in this package had anything to say
211
+ * about that completion, and this question reads it at once. A false demand
212
+ * costs a frame; see {@link inventedAt} for what a false refusal costs, and
213
+ * why this number may not do that one.
214
+ *
215
+ * @category constants
216
+ * @since 1.0.0-rc.0
217
+ */
218
+ export declare const disprovenAt = 0.3;
219
+ /**
220
+ * At or above this probability of "overclaims", the claim is handed back.
221
+ *
222
+ * The mirror of {@link disprovenAt}, a separate question because the two
223
+ * failures are separate, and a bounce height for the same reason: over the
224
+ * corpus it fired on five of the twelve honest completions, because with thin
225
+ * evidence every sentence asserts more than the evidence shows.
226
+ *
227
+ * @category constants
228
+ * @since 1.0.0-rc.0
229
+ */
230
+ export declare const overclaimedAt = 0.8;
231
+ /**
232
+ * At or above this probability of "invented", the claim is handed back.
233
+ *
234
+ * The third bounce height. It sits below {@link inventedAt} so a run whose
235
+ * sentence is drifting away from its record is told once before the height
236
+ * that refuses it is reached, rather than meeting that height cold.
237
+ *
238
+ * @category constants
239
+ * @since 1.0.0-rc.0
240
+ */
241
+ export declare const unsupportedAt = 0.5;
242
+ /**
243
+ * At or above this probability of "invented", the claim ends the run.
244
+ *
245
+ * The only number in this module with a verdict behind it, and the only one of
246
+ * the four that is not merely a bounce. Placed in the middle of the gap the
247
+ * corpus measured rather than at a round number: the highest honest reading
248
+ * was 0.75 and the lowest reading of a lie this brake ends was 0.94, so 0.85
249
+ * leaves about a tenth of headroom on each side of a classifier whose six
250
+ * readings of one state spread by 0.03.
251
+ *
252
+ * The two errors do not cost the same, which is why one question refuses and
253
+ * three only ask. A false refusal costs a run its answer, and the answer is
254
+ * the product. A false pass costs nothing this module owes: the five
255
+ * deterministic brakes still ran, and a completion they let through is a
256
+ * completion the person judges, as it was before this module existed. That
257
+ * asymmetry is also what the product's own R10 asks for, "Jev ranks, gates and
258
+ * reports" and is never the sole authority: the brake may refuse a sentence
259
+ * this run's own record contradicts, and may not be the authority on whether
260
+ * the work is finished.
261
+ *
262
+ * @category constants
263
+ * @since 1.0.0-rc.0
264
+ */
265
+ export declare const inventedAt = 0.85;
266
+ /**
267
+ * The last check the completing frame ran, with its verbatim result.
268
+ *
269
+ * One of these, because a result is the expensive field: {@link Evidence}
270
+ * travels on every completion of every run and a test log has no size at all.
271
+ * Every *other* check the run took in its workspace is in
272
+ * {@link Evidence.checksRun} with only the tail of its output, which is what
273
+ * the narrow question needs to know a command was run and what it reported.
274
+ *
275
+ * @category models
276
+ * @since 1.0.0-rc.0
277
+ */
278
+ export declare const Check: Schema.Struct<{
279
+ readonly command: Schema.String;
280
+ readonly exitCode: Schema.Int;
281
+ readonly output: Schema.String;
282
+ }>;
283
+ /**
284
+ * The decoded form of {@link Check}.
285
+ *
286
+ * @category models
287
+ * @since 1.0.0-rc.0
288
+ */
289
+ export type Check = typeof Check.Type;
290
+ /**
291
+ * One check this run ran, and the tail of what it reported.
292
+ *
293
+ * `outcome` and not an exit code: this is read off the run's durable check
294
+ * ledger, which keeps whether a call reported a failing or a passing status.
295
+ * A call that reported no exit status at all — a read, a search — is neither,
296
+ * and is not listed here, because "a command ran" is not evidence of a result.
297
+ *
298
+ * `result` is the call's {@link receipt}. Without it a claim that quoted what
299
+ * a check printed ("failed at line 74", a `go vet` warning) named an outcome
300
+ * the list could not show; replaying two graded refusals of 2026-09-26, that
301
+ * sentence read 0.88 on `invented` without the tail and 0.45 with it.
302
+ *
303
+ * @category models
304
+ * @since 1.0.0-rc.0
305
+ */
306
+ export declare const Ran: Schema.Struct<{
307
+ readonly command: Schema.String;
308
+ readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
309
+ readonly result: Schema.optional<Schema.String>;
310
+ readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
311
+ }>;
312
+ /**
313
+ * The decoded form of {@link Ran}.
314
+ *
315
+ * @category models
316
+ * @since 1.0.0-rc.0
317
+ */
318
+ export type Ran = typeof Ran.Type;
319
+ /**
320
+ * The most of one string in a listed check's result {@link receipt} keeps, in
321
+ * UTF-8 bytes, newest kept.
322
+ *
323
+ * Per string and not per result, because a runner splits its verdict across
324
+ * streams: one graded run's claim quoted a `go vet` warning from standard
325
+ * error while standard output ended with the `go test` summary, and a tail of
326
+ * the whole result kept only the summary.
327
+ *
328
+ * @category constants
329
+ * @since 1.0.0-rc.0
330
+ */
331
+ export declare const leafBytes = 256;
332
+ /**
333
+ * The most of one listed check's whole result {@link receipt} keeps, in UTF-8
334
+ * bytes, after each string is clipped to {@link leafBytes}.
335
+ *
336
+ * @category constants
337
+ * @since 1.0.0-rc.0
338
+ */
339
+ export declare const resultBytes = 1024;
340
+ /**
341
+ * What {@link Evidence.checksRun} says a check reported: its result as
342
+ * canonical JSON, each string's newest {@link leafBytes} kept and the whole
343
+ * bounded by {@link resultBytes}.
344
+ *
345
+ * @category conversions
346
+ * @since 1.0.0-rc.0
347
+ */
348
+ export declare const receipt: (value: Schema.Json) => string;
349
+ /**
350
+ * The ledger {@link record} keeps in controller state, and what
351
+ * {@link Evidence.checksRun} sends.
352
+ *
353
+ * @category schemas
354
+ * @since 1.0.0-rc.0
355
+ */
356
+ export declare const Reported: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.Struct<{
357
+ readonly command: Schema.String;
358
+ readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
359
+ readonly result: Schema.optional<Schema.String>;
360
+ readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
361
+ }>>>, never>;
362
+ /**
363
+ * One settled call as {@link record} reads it.
364
+ *
365
+ * @category models
366
+ * @since 1.0.0-rc.0
367
+ */
368
+ export interface Settled {
369
+ readonly ok: boolean;
370
+ readonly input: Schema.Json;
371
+ readonly value: Schema.Json;
372
+ /** Whether its result reported a failing exit status. */
373
+ readonly failing: boolean;
374
+ /** Whether its result reported a passing exit status. */
375
+ readonly passing: boolean;
376
+ }
377
+ /**
378
+ * Folds one frame's calls into the commands this run ran, as the brake lists
379
+ * them: every settled call that reported an exit status, the newest reading of
380
+ * each command last, bounded by {@link checksRunLimit}.
381
+ *
382
+ * Writes are included. The check ledger holds only calls that declared no
383
+ * write, because a write is not an observation of the tree, but a claim names
384
+ * whatever the run ran: a DeepSWE run on 2026-09-26 claimed a passing
385
+ * `go test` and a commit, both on the record with exit 0, and both were
386
+ * absent from the list because `go test` touched the tree and the commit wrote
387
+ * it. Its true sentences read 0.87 to 0.94.
388
+ *
389
+ * A command re-run with a different outcome keeps the earlier one as
390
+ * `before`, because "failed before the fix and passed afterward" is a claim
391
+ * about both readings: a Terminal-Bench run whose verifier rewarded it 1.0
392
+ * said exactly that about three probes, and a list holding only the newest
393
+ * reading read the sentence at 0.85 and ended the run.
394
+ *
395
+ * No reading is filtered by the tree it ran over: this says what the run ran
396
+ * and what it reported, and staleness is owned by the brakes that run first.
397
+ *
398
+ * @category combinators
399
+ * @since 1.0.0-rc.0
400
+ */
401
+ export declare const record: (ledger: ReadonlyArray<Ran>, calls: ReadonlyArray<Settled>) => ReadonlyArray<Ran>;
402
+ /**
403
+ * The most checks {@link Evidence.checksRun} lists, newest kept.
404
+ *
405
+ * A bound for the reason every other bound in this module exists, and a loose
406
+ * one: a listing is a command and a word, the ledger is already clipped to its
407
+ * own width and already holds only the newest reading of each distinct
408
+ * command, and a run that ran more distinct checks than this has told the
409
+ * question everything it can with the newest of them.
410
+ *
411
+ * @category constants
412
+ * @since 1.0.0-rc.0
413
+ */
414
+ export declare const checksRunLimit = 24;
415
+ /**
416
+ * Everything the brake sends, and the whole of it.
417
+ *
418
+ * The task and claim are prose; the rest is measured evidence. `checksRun`
419
+ * keeps checks visible after their frame closes. `callsRun` does the same for
420
+ * work that reports no exit status, including classification and file reads.
421
+ * It carries the existing bounded call ledger's flow, input subject,
422
+ * settlement status and structural result summary, without model narration
423
+ * or full output. A summary records that a result was obtained, not every
424
+ * value in it. `lastCheck` supplies the completing frame's newest check output
425
+ * when there is one. Older callers may omit `callsRun`; the controller always
426
+ * supplies it, including an empty list when no call settled.
427
+ *
428
+ * @category schemas
429
+ * @since 1.0.0-rc.0
430
+ */
431
+ export declare const Evidence: Schema.Struct<{
432
+ readonly task: Schema.String;
433
+ readonly claim: Schema.String;
434
+ readonly treeMoved: Schema.Boolean;
435
+ readonly checksRun: Schema.$Array<Schema.Struct<{
436
+ readonly command: Schema.String;
437
+ readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
438
+ readonly result: Schema.optional<Schema.String>;
439
+ readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
440
+ }>>;
441
+ readonly callsRun: Schema.optional<Schema.$Array<Schema.Struct<{
442
+ readonly flow: Schema.String;
443
+ readonly input: Schema.String;
444
+ readonly ok: Schema.Boolean;
445
+ readonly resultSummary: Schema.String;
446
+ }>>>;
447
+ readonly lastCheck: Schema.optional<Schema.Struct<{
448
+ readonly command: Schema.String;
449
+ readonly exitCode: Schema.Int;
450
+ readonly output: Schema.String;
451
+ }>>;
452
+ }>;
453
+ /**
454
+ * The decoded form of {@link Evidence}.
455
+ *
456
+ * @category models
457
+ * @since 1.0.0-rc.0
458
+ */
459
+ export type Evidence = typeof Evidence.Type;
460
+ /**
461
+ * The one classifier this brake asks, declared once.
462
+ *
463
+ * Three boolean questions, each one atomic judgment with both sides spelled
464
+ * out, in the style of `@smthrs/std`'s curated three. They are asked together
465
+ * in one request because they are about one state and a second request would
466
+ * double the latency on the hot path of every completion; the third costs
467
+ * about sixty input tokens and nothing measurable in time.
468
+ *
469
+ * Only `invented` may refuse; all three can ask for another frame. The first
470
+ * question judges the newest request, including a conversational request
471
+ * whose answer needs no workspace activity. The module header's original
472
+ * corpus explains why completeness and overclaiming may only ask. The
473
+ * refusal question retains its measured wording and threshold.
474
+ *
475
+ * @category classifiers
476
+ * @since 1.0.0-rc.0
477
+ */
478
+ export declare const classifier: Classifier.Classifier<"completion/claim", Schema.Struct<{
479
+ readonly task: Schema.String;
480
+ readonly claim: Schema.String;
481
+ readonly treeMoved: Schema.Boolean;
482
+ readonly checksRun: Schema.$Array<Schema.Struct<{
483
+ readonly command: Schema.String;
484
+ readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
485
+ readonly result: Schema.optional<Schema.String>;
486
+ readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
487
+ }>>;
488
+ readonly callsRun: Schema.optional<Schema.$Array<Schema.Struct<{
489
+ readonly flow: Schema.String;
490
+ readonly input: Schema.String;
491
+ readonly ok: Schema.Boolean;
492
+ readonly resultSummary: Schema.String;
493
+ }>>>;
494
+ readonly lastCheck: Schema.optional<Schema.Struct<{
495
+ readonly command: Schema.String;
496
+ readonly exitCode: Schema.Int;
497
+ readonly output: Schema.String;
498
+ }>>;
499
+ }>, {
500
+ readonly complete: Evaluator.BooleanQuestion;
501
+ readonly overclaims: Evaluator.BooleanQuestion;
502
+ readonly invented: Evaluator.BooleanQuestion;
503
+ }>;
504
+ /**
505
+ * The most parts {@link sentences} splits one claim into.
506
+ *
507
+ * @category constants
508
+ * @since 1.0.0-rc.0
509
+ */
510
+ export declare const sentenceLimit = 12;
511
+ /**
512
+ * A claim split into its sentences, at most {@link sentenceLimit} parts.
513
+ *
514
+ * A sentence ends at `.`, `!` or `?` followed by whitespace, outside inline
515
+ * code. A claim with more
516
+ * sentences than the limit keeps the first `sentenceLimit - 1` and asks about
517
+ * the rest as one part, so nothing the claim says goes unread.
518
+ *
519
+ * @category conversions
520
+ * @since 1.0.0-rc.0
521
+ */
522
+ export declare const sentences: (claim: string) => ReadonlyArray<string>;
523
+ /**
524
+ * What precedes the sentence in each {@link sentenceClassifier} question.
525
+ *
526
+ * @category constants
527
+ * @since 1.0.0-rc.0
528
+ */
529
+ export declare const sentenceMarker = "\n\nThe sentence: ";
530
+ /**
531
+ * The sentence one {@link sentenceClassifier} question asks about.
532
+ *
533
+ * @category conversions
534
+ * @since 1.0.0-rc.0
535
+ */
536
+ export declare const sentenceOf: (instructions: string) => string;
537
+ /**
538
+ * The `invented` question asked of each sentence of a claim, in one request.
539
+ *
540
+ * Asked of the whole claim, the question reads every long, specific, true
541
+ * completion as invented. Two graded runs of 2026-09-26 died on it: a claim of
542
+ * three sentences read 0.91 and one of five read 0.87, although every edit
543
+ * and result they named was in the run's record. Replayed over the same
544
+ * evidence, their sentences read at most 0.71 and 0.73, and a fabricated
545
+ * sentence appended to each (a test file and a passing test run no call
546
+ * touched) read 0.94 and 0.92. The question is about one assertion at a time, so it is asked one
547
+ * sentence at a time, over the same evidence and with the same criteria, and
548
+ * the claim reads as its most invented sentence. A lie is a sentence, so a
549
+ * claim that carries one still reads as high as that sentence does.
550
+ *
551
+ * Ids are `sentence1`…`sentenceN`, in claim order.
552
+ *
553
+ * @category classifiers
554
+ * @since 1.0.0-rc.0
555
+ */
556
+ export declare const sentenceClassifier: (parts: ReadonlyArray<string>) => Classifier.Classifier<"completion/claim-sentences", Schema.Struct<{
557
+ readonly task: Schema.String;
558
+ readonly claim: Schema.String;
559
+ readonly treeMoved: Schema.Boolean;
560
+ readonly checksRun: Schema.$Array<Schema.Struct<{
561
+ readonly command: Schema.String;
562
+ readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
563
+ readonly result: Schema.optional<Schema.String>;
564
+ readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
565
+ }>>;
566
+ readonly callsRun: Schema.optional<Schema.$Array<Schema.Struct<{
567
+ readonly flow: Schema.String;
568
+ readonly input: Schema.String;
569
+ readonly ok: Schema.Boolean;
570
+ readonly resultSummary: Schema.String;
571
+ }>>>;
572
+ readonly lastCheck: Schema.optional<Schema.Struct<{
573
+ readonly command: Schema.String;
574
+ readonly exitCode: Schema.Int;
575
+ readonly output: Schema.String;
576
+ }>>;
577
+ }>, {
578
+ [k: string]: Evaluator.BooleanQuestion;
579
+ }>;
580
+ /**
581
+ * The three probabilities one evaluation came back with.
582
+ *
583
+ * @category models
584
+ * @since 1.0.0-rc.0
585
+ */
586
+ export interface Probabilities {
587
+ /** The probability the transport gave to "the task as stated is done". */
588
+ readonly complete: number;
589
+ /** The probability it gave to "the claim asserts what the evidence does not show". */
590
+ readonly overclaims: number;
591
+ /** The probability it gave to "the claim reports a command or a result the evidence does not record". */
592
+ readonly invented: number;
593
+ }
594
+ /**
595
+ * One reading, and what asking for it cost.
596
+ *
597
+ * @category models
598
+ * @since 1.0.0-rc.0
599
+ */
600
+ export interface Reading extends Probabilities {
601
+ /** Wall-clock milliseconds the whole evaluation took, as the harness timed it. */
602
+ readonly latencyMs: number;
603
+ /** Token usage reported by the evaluator, absent when it supplied none. */
604
+ readonly usage?: Evaluator.Usage | undefined;
605
+ /**
606
+ * What was asked and what came back, in the shape `decision-settled`
607
+ * journals: the encoded evidence exactly as the transport was sent it, and
608
+ * every answer tagged by kind. Absent from a reader that reports neither, which
609
+ * journals no decision rather than one reconstructed from the three numbers
610
+ * above.
611
+ */
612
+ readonly asked?: {
613
+ readonly state: Schema.Json;
614
+ readonly answers: Readonly<Record<string, AgentEvent.DecisionAnswer>>;
615
+ } | undefined;
616
+ /**
617
+ * The per-sentence reading, when {@link read} asked for one: the claim's
618
+ * {@link invented} is then the highest of these rather than the whole
619
+ * claim's. See {@link sentenceClassifier}.
620
+ */
621
+ readonly sentences?: {
622
+ /** The whole claim's own `invented`, which the sentences replaced. */
623
+ readonly whole: number;
624
+ readonly classifier: string;
625
+ readonly digest: string;
626
+ readonly questions: Classifier.Questions;
627
+ readonly state: Schema.Json;
628
+ readonly answers: Readonly<Record<string, AgentEvent.DecisionAnswer>>;
629
+ readonly latencyMs: number;
630
+ } | undefined;
631
+ }
632
+ /**
633
+ * Whether one reading asks anything of the completion at all.
634
+ *
635
+ * Any of the three heights is enough, and none is a vote: the questions are
636
+ * asked separately because they fail separately, so a claim that reads as done
637
+ * and overclaims is handed back on the second, and a claim that reads as
638
+ * undone and modest on the first. Everything below all three is no demand at
639
+ * all.
640
+ *
641
+ * This is the *bounce*, which is what it has always been, and it is not the
642
+ * verdict. See {@link unrecorded}.
643
+ *
644
+ * @category conversions
645
+ * @since 1.0.0-rc.0
646
+ */
647
+ export declare const find: (reading: Probabilities) => Probabilities | undefined;
648
+ /**
649
+ * Whether a reading is the one this brake ends a run over.
650
+ *
651
+ * Total, and the whole difference between a bounce and a verdict: every claim
652
+ * {@link find} hands back is handed back once and then stands, except one at
653
+ * or above {@link inventedAt}, which with no bounce left does not stand. It is
654
+ * also what decides whether a bounced answer is worth keeping against an
655
+ * exhausted budget; see `Frame.CompletionDemand.keeps`.
656
+ *
657
+ * @category predicates
658
+ * @since 1.0.0-rc.0
659
+ */
660
+ export declare const unrecorded: (reading: Probabilities) => boolean;
661
+ /**
662
+ * The newest {@link outputBytes} of a check's result, stating what it dropped.
663
+ *
664
+ * The count and the notice are there for the reason `internal/elide` exists:
665
+ * a reader that cannot tell a clipped value from a whole one reads the clip
666
+ * as the whole.
667
+ *
668
+ * @category conversions
669
+ * @since 1.0.0-rc.0
670
+ */
671
+ export declare const newest: (text: string) => string;
672
+ /**
673
+ * Why one completion went unjudged.
674
+ *
675
+ * `unconfigured` is the host that delivered no `Evaluator` at all; every
676
+ * other member is {@link Evaluator.EvaluatorErrorCode} verbatim, so the
677
+ * journal carries the transport's own word for what went wrong rather than a
678
+ * harness paraphrase of it.
679
+ *
680
+ * @category models
681
+ * @since 1.0.0-rc.0
682
+ */
683
+ export type UnjudgedReason = Exclude<Judgement.Unjudged["reason"], "interrupted">;
684
+ /**
685
+ * The failure an unjudged completion ends the turn with.
686
+ *
687
+ * One code, `completion_unjudged`, and a message that opens with the reason
688
+ * so a journal line, a `Transcript` projection and a test all read the same
689
+ * word. The message then quotes the completion through {@link refused}, as
690
+ * {@link unproven} does: a judge outage fails closed, and the person whose
691
+ * run did the work is still owed its answer. `cause` carries the transport's
692
+ * code and status where there was one; `detail` is the transport's text only
693
+ * where it is safe to show: see `Evaluator.publicMessage`.
694
+ *
695
+ * @category constructors
696
+ * @since 1.0.0-rc.0
697
+ */
698
+ export declare const unjudged: (reason: UnjudgedReason, detail: string, claim: string, cause?: unknown) => HarnessError;
699
+ /**
700
+ * The most of the refused completion the failure carries, in UTF-8 bytes.
701
+ *
702
+ * Two kibibytes, which is less than {@link proseBytes} because these bytes go
703
+ * somewhere else: the failure message is what a host puts on the run's own
704
+ * ending, and a serving host puts it on the assistant message a person
705
+ * reads. A claim that is longer than this has its head kept, where
706
+ * a completion states what it did, and the run record still holds all of it.
707
+ *
708
+ * @category constants
709
+ * @since 1.0.0-rc.0
710
+ */
711
+ export declare const refusedBytes = 2048;
712
+ /**
713
+ * The refused completion as the failure quotes it, bounded by
714
+ * {@link refusedBytes}.
715
+ *
716
+ * A refusal that did not quote the sentence it refused left the only copy of
717
+ * a correct answer inside a `complete` transition in the run's journal: not in
718
+ * the transcript, not in the app, and unreachable by the person whose answer
719
+ * it was. The brake is right most of the time, which means it is wrong some of
720
+ * the time, and a person who loses an answer to it is owed the words.
721
+ *
722
+ * @category conversions
723
+ * @since 1.0.0-rc.0
724
+ */
725
+ export declare const refused: (claim: string) => string;
726
+ /**
727
+ * The completion a refusal's message quotes, as {@link refused} bounded it;
728
+ * `undefined` for a message that quotes none. A host that still owes the
729
+ * person the answer reads it here rather than parsing the prose itself.
730
+ *
731
+ * @category conversions
732
+ * @since 1.0.0-rc.1
733
+ */
734
+ export declare const refusedIn: (message: string) => string | undefined;
735
+ /**
736
+ * The failure an unrecorded claim ends the run with.
737
+ *
738
+ * One code, `claim_unproven`, raised where the brake read a claim reporting a
739
+ * command or a result the run's own record does not record, and the run has no
740
+ * bounce left to spend: the cap is used up, or there is no frame to hand the
741
+ * completion back to. It carries all three probabilities so the line a person
742
+ * reads says how sure the transport was about the question that decided, and
743
+ * what the other two — which decide nothing; see the module header — said
744
+ * beside it. `bounced` says whether the run was given a frame to prove the
745
+ * claim in. A wave is graded from these failures the way it is graded from the
746
+ * {@link Reading}s.
747
+ *
748
+ * Failing rather than standing is the whole point, and it has a price: a
749
+ * completion the transport is confidently wrong about twice costs the run its
750
+ * answer, where under the first shape of this brake it cost one frame. That
751
+ * price is why the verdict now rides on {@link inventedAt} and on that question
752
+ * alone, why the run is always given one frame to answer in first when a frame
753
+ * exists, and why the demand text says what a re-statement costs. The
754
+ * alternative is the one outcome this package may not produce: a sentence
755
+ * nothing supports, returned as the run's final answer, with a green finish on
756
+ * it.
757
+ *
758
+ * @category constructors
759
+ * @since 1.0.0-rc.0
760
+ */
761
+ export declare const unproven: (found: Probabilities, bounced: boolean, claim: string) => HarnessError;
762
+ /**
763
+ * Asks Jev about one completion, and fails the turn when it cannot.
764
+ *
765
+ * `undefined` means one thing only: there was no claim and no task to judge,
766
+ * which is not a transport failure and not a completion anybody could form a
767
+ * question about. Everything else that stops the brake reaching an answer
768
+ * fails, because a brake that goes quiet when its model is down is a brake
769
+ * that is only there when it is not needed. See the module header.
770
+ *
771
+ * @category conversions
772
+ * @since 1.0.0-rc.0
773
+ */
774
+ export declare const read: (evidence: Evidence) => Effect.Effect<Reading | undefined, HarnessError, Evaluator.Evaluator>;
775
+ /**
776
+ * States what the record does not record, and names the two ways out.
777
+ *
778
+ * It takes no argument because one question issues it: the text a journal
779
+ * replay rebuilds is therefore a function of the event's existence alone,
780
+ * which is what it was before the reading had a shape to branch on.
781
+ *
782
+ * @category constructors
783
+ * @since 1.0.0-rc.0
784
+ */
785
+ export declare const demand: () => string;
786
+ /**
787
+ * The canonical JSON of a value, which is how this brake quotes an input or a
788
+ * result to the model it asks.
789
+ *
790
+ * @category conversions
791
+ * @since 1.0.0-rc.0
792
+ */
793
+ export declare const quote: (value: Schema.Json) => string;
794
+ /**
795
+ * The head of a prose field, bounded by {@link proseBytes}.
796
+ *
797
+ * @category conversions
798
+ * @since 1.0.0-rc.0
799
+ */
800
+ export declare const prose: (text: string) => string;
801
+ //# sourceMappingURL=CompletionClaim.d.ts.map