@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.
- package/CHANGELOG.md +387 -0
- package/LICENSE +21 -0
- package/README.md +138 -2
- package/dist/cjs/AgentEvent.d.ts +3092 -0
- package/dist/cjs/AgentEvent.d.ts.map +1 -0
- package/dist/cjs/AgentEvent.js +1116 -0
- package/dist/cjs/AgentEvent.js.map +7 -0
- package/dist/cjs/CallLedger.d.ts +378 -0
- package/dist/cjs/CallLedger.d.ts.map +1 -0
- package/dist/cjs/CallLedger.js +240 -0
- package/dist/cjs/CallLedger.js.map +7 -0
- package/dist/cjs/Cell.d.ts +774 -0
- package/dist/cjs/Cell.d.ts.map +1 -0
- package/dist/cjs/Cell.js +431 -0
- package/dist/cjs/Cell.js.map +7 -0
- package/dist/cjs/CellCalls.d.ts +115 -0
- package/dist/cjs/CellCalls.d.ts.map +1 -0
- package/dist/cjs/CellCalls.js +98 -0
- package/dist/cjs/CellCalls.js.map +7 -0
- package/dist/cjs/CellHistory.d.ts +102 -0
- package/dist/cjs/CellHistory.d.ts.map +1 -0
- package/dist/cjs/CellHistory.js +54 -0
- package/dist/cjs/CellHistory.js.map +7 -0
- package/dist/cjs/CellTurn.d.ts +1071 -0
- package/dist/cjs/CellTurn.d.ts.map +1 -0
- package/dist/cjs/CellTurn.js +2618 -0
- package/dist/cjs/CellTurn.js.map +7 -0
- package/dist/cjs/CellValidation.d.ts +94 -0
- package/dist/cjs/CellValidation.d.ts.map +1 -0
- package/dist/cjs/CellValidation.js +218 -0
- package/dist/cjs/CellValidation.js.map +7 -0
- package/dist/cjs/Compaction.d.ts +158 -0
- package/dist/cjs/Compaction.d.ts.map +1 -0
- package/dist/cjs/Compaction.js +189 -0
- package/dist/cjs/Compaction.js.map +7 -0
- package/dist/cjs/CompletionClaim.d.ts +801 -0
- package/dist/cjs/CompletionClaim.d.ts.map +1 -0
- package/dist/cjs/CompletionClaim.js +303 -0
- package/dist/cjs/CompletionClaim.js.map +7 -0
- package/dist/cjs/ContextWindow.d.ts +435 -0
- package/dist/cjs/ContextWindow.d.ts.map +1 -0
- package/dist/cjs/ContextWindow.js +319 -0
- package/dist/cjs/ContextWindow.js.map +7 -0
- package/dist/cjs/EngineLike.d.ts +546 -0
- package/dist/cjs/EngineLike.d.ts.map +1 -0
- package/dist/cjs/EngineLike.js +114 -0
- package/dist/cjs/EngineLike.js.map +7 -0
- package/dist/cjs/ExternalTranscript.d.ts +349 -0
- package/dist/cjs/ExternalTranscript.d.ts.map +1 -0
- package/dist/cjs/ExternalTranscript.js +826 -0
- package/dist/cjs/ExternalTranscript.js.map +7 -0
- package/dist/cjs/FailedCall.d.ts +132 -0
- package/dist/cjs/FailedCall.d.ts.map +1 -0
- package/dist/cjs/FailedCall.js +53 -0
- package/dist/cjs/FailedCall.js.map +7 -0
- package/dist/cjs/FlowBinding.d.ts +289 -0
- package/dist/cjs/FlowBinding.d.ts.map +1 -0
- package/dist/cjs/FlowBinding.js +251 -0
- package/dist/cjs/FlowBinding.js.map +7 -0
- package/dist/cjs/HarnessError.d.ts +57 -0
- package/dist/cjs/HarnessError.d.ts.map +1 -0
- package/dist/cjs/HarnessError.js +75 -0
- package/dist/cjs/HarnessError.js.map +7 -0
- package/dist/cjs/Judgement.d.ts +289 -0
- package/dist/cjs/Judgement.d.ts.map +1 -0
- package/dist/cjs/Judgement.js +240 -0
- package/dist/cjs/Judgement.js.map +7 -0
- package/dist/cjs/Monitor.d.ts +374 -0
- package/dist/cjs/Monitor.d.ts.map +1 -0
- package/dist/cjs/Monitor.js +233 -0
- package/dist/cjs/Monitor.js.map +7 -0
- package/dist/cjs/NarrowedCheck.d.ts +523 -0
- package/dist/cjs/NarrowedCheck.d.ts.map +1 -0
- package/dist/cjs/NarrowedCheck.js +263 -0
- package/dist/cjs/NarrowedCheck.js.map +7 -0
- package/dist/cjs/Notifications.d.ts +42 -0
- package/dist/cjs/Notifications.d.ts.map +1 -0
- package/dist/cjs/Notifications.js +177 -0
- package/dist/cjs/Notifications.js.map +7 -0
- package/dist/cjs/Plan.d.ts +127 -0
- package/dist/cjs/Plan.d.ts.map +1 -0
- package/dist/cjs/Plan.js +77 -0
- package/dist/cjs/Plan.js.map +7 -0
- package/dist/cjs/QuickJSSandbox.d.ts +151 -0
- package/dist/cjs/QuickJSSandbox.d.ts.map +1 -0
- package/dist/cjs/QuickJSSandbox.js +987 -0
- package/dist/cjs/QuickJSSandbox.js.map +7 -0
- package/dist/cjs/Relevance.d.ts +213 -0
- package/dist/cjs/Relevance.d.ts.map +1 -0
- package/dist/cjs/Relevance.js +183 -0
- package/dist/cjs/Relevance.js.map +7 -0
- package/dist/cjs/Sandbox.d.ts +637 -0
- package/dist/cjs/Sandbox.d.ts.map +1 -0
- package/dist/cjs/Sandbox.js +260 -0
- package/dist/cjs/Sandbox.js.map +7 -0
- package/dist/cjs/Steering.d.ts +464 -0
- package/dist/cjs/Steering.d.ts.map +1 -0
- package/dist/cjs/Steering.js +153 -0
- package/dist/cjs/Steering.js.map +7 -0
- package/dist/cjs/StructuredOutput.d.ts +252 -0
- package/dist/cjs/StructuredOutput.d.ts.map +1 -0
- package/dist/cjs/StructuredOutput.js +266 -0
- package/dist/cjs/StructuredOutput.js.map +7 -0
- package/dist/cjs/Sufficiency.d.ts +195 -0
- package/dist/cjs/Sufficiency.d.ts.map +1 -0
- package/dist/cjs/Sufficiency.js +110 -0
- package/dist/cjs/Sufficiency.js.map +7 -0
- package/dist/cjs/Supervisor.d.ts +719 -0
- package/dist/cjs/Supervisor.d.ts.map +1 -0
- package/dist/cjs/Supervisor.js +313 -0
- package/dist/cjs/Supervisor.js.map +7 -0
- package/dist/cjs/Tokens.d.ts +86 -0
- package/dist/cjs/Tokens.d.ts.map +1 -0
- package/dist/cjs/Tokens.js +72 -0
- package/dist/cjs/Tokens.js.map +7 -0
- package/dist/cjs/Transcript.d.ts +171 -0
- package/dist/cjs/Transcript.d.ts.map +1 -0
- package/dist/cjs/Transcript.js +342 -0
- package/dist/cjs/Transcript.js.map +7 -0
- package/dist/cjs/TruncatedOutput.d.ts +186 -0
- package/dist/cjs/TruncatedOutput.d.ts.map +1 -0
- package/dist/cjs/TruncatedOutput.js +143 -0
- package/dist/cjs/TruncatedOutput.js.map +7 -0
- package/dist/cjs/UnmovedTree.d.ts +113 -0
- package/dist/cjs/UnmovedTree.d.ts.map +1 -0
- package/dist/cjs/UnmovedTree.js +38 -0
- package/dist/cjs/UnmovedTree.js.map +7 -0
- package/dist/cjs/UnresolvedFailure.d.ts +196 -0
- package/dist/cjs/UnresolvedFailure.d.ts.map +1 -0
- package/dist/cjs/UnresolvedFailure.js +77 -0
- package/dist/cjs/UnresolvedFailure.js.map +7 -0
- package/dist/cjs/VacuousVerification.d.ts +237 -0
- package/dist/cjs/VacuousVerification.d.ts.map +1 -0
- package/dist/cjs/VacuousVerification.js +91 -0
- package/dist/cjs/VacuousVerification.js.map +7 -0
- package/dist/cjs/VariablesPanel.d.ts +117 -0
- package/dist/cjs/VariablesPanel.d.ts.map +1 -0
- package/dist/cjs/VariablesPanel.js +108 -0
- package/dist/cjs/VariablesPanel.js.map +7 -0
- package/dist/cjs/index.d.ts +172 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +99 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/bytes.d.ts +36 -0
- package/dist/cjs/internal/bytes.d.ts.map +1 -0
- package/dist/cjs/internal/bytes.js +57 -0
- package/dist/cjs/internal/bytes.js.map +7 -0
- package/dist/cjs/internal/cellPrompt.d.ts +122 -0
- package/dist/cjs/internal/cellPrompt.d.ts.map +1 -0
- package/dist/cjs/internal/cellPrompt.js +146 -0
- package/dist/cjs/internal/cellPrompt.js.map +7 -0
- package/dist/cjs/internal/compactable.d.ts +44 -0
- package/dist/cjs/internal/compactable.d.ts.map +1 -0
- package/dist/cjs/internal/compactable.js +56 -0
- package/dist/cjs/internal/compactable.js.map +7 -0
- package/dist/cjs/internal/compactionMarks.d.ts +278 -0
- package/dist/cjs/internal/compactionMarks.d.ts.map +1 -0
- package/dist/cjs/internal/compactionMarks.js +212 -0
- package/dist/cjs/internal/compactionMarks.js.map +7 -0
- package/dist/cjs/internal/demandText.d.ts +95 -0
- package/dist/cjs/internal/demandText.d.ts.map +1 -0
- package/dist/cjs/internal/demandText.js +70 -0
- package/dist/cjs/internal/demandText.js.map +7 -0
- package/dist/cjs/internal/elide.d.ts +109 -0
- package/dist/cjs/internal/elide.d.ts.map +1 -0
- package/dist/cjs/internal/elide.js +59 -0
- package/dist/cjs/internal/elide.js.map +7 -0
- package/dist/cjs/internal/frame.d.ts +463 -0
- package/dist/cjs/internal/frame.d.ts.map +1 -0
- package/dist/cjs/internal/frame.js +514 -0
- package/dist/cjs/internal/frame.js.map +7 -0
- package/dist/cjs/internal/nonNegativeSafeInt.d.ts +20 -0
- package/dist/cjs/internal/nonNegativeSafeInt.d.ts.map +1 -0
- package/dist/cjs/internal/nonNegativeSafeInt.js +29 -0
- package/dist/cjs/internal/nonNegativeSafeInt.js.map +7 -0
- package/dist/cjs/internal/paidUsage.d.ts +52 -0
- package/dist/cjs/internal/paidUsage.d.ts.map +1 -0
- package/dist/cjs/internal/paidUsage.js +70 -0
- package/dist/cjs/internal/paidUsage.js.map +7 -0
- package/dist/cjs/internal/printChannel.d.ts +233 -0
- package/dist/cjs/internal/printChannel.d.ts.map +1 -0
- package/dist/cjs/internal/printChannel.js +165 -0
- package/dist/cjs/internal/printChannel.js.map +7 -0
- package/dist/cjs/internal/printsObservation.d.ts +26 -0
- package/dist/cjs/internal/printsObservation.d.ts.map +1 -0
- package/dist/cjs/internal/printsObservation.js +27 -0
- package/dist/cjs/internal/printsObservation.js.map +7 -0
- package/dist/cjs/internal/refusal.d.ts +40 -0
- package/dist/cjs/internal/refusal.d.ts.map +1 -0
- package/dist/cjs/internal/refusal.js +45 -0
- package/dist/cjs/internal/refusal.js.map +7 -0
- package/dist/cjs/internal/supervision.d.ts +174 -0
- package/dist/cjs/internal/supervision.d.ts.map +1 -0
- package/dist/cjs/internal/supervision.js +402 -0
- package/dist/cjs/internal/supervision.js.map +7 -0
- package/dist/cjs/internal/unfinishedWork.d.ts +99 -0
- package/dist/cjs/internal/unfinishedWork.d.ts.map +1 -0
- package/dist/cjs/internal/unfinishedWork.js +80 -0
- package/dist/cjs/internal/unfinishedWork.js.map +7 -0
- package/dist/cjs/internal/unobservedCall.d.ts +112 -0
- package/dist/cjs/internal/unobservedCall.d.ts.map +1 -0
- package/dist/cjs/internal/unobservedCall.js +345 -0
- package/dist/cjs/internal/unobservedCall.js.map +7 -0
- package/dist/cjs/internal/untrustedData.d.ts +14 -0
- package/dist/cjs/internal/untrustedData.d.ts.map +1 -0
- package/dist/cjs/internal/untrustedData.js +30 -0
- package/dist/cjs/internal/untrustedData.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/AgentEvent.d.ts +3092 -0
- package/dist/esm/AgentEvent.d.ts.map +1 -0
- package/dist/esm/AgentEvent.js +1610 -0
- package/dist/esm/AgentEvent.js.map +1 -0
- package/dist/esm/CallLedger.d.ts +378 -0
- package/dist/esm/CallLedger.d.ts.map +1 -0
- package/dist/esm/CallLedger.js +506 -0
- package/dist/esm/CallLedger.js.map +1 -0
- package/dist/esm/Cell.d.ts +774 -0
- package/dist/esm/Cell.d.ts.map +1 -0
- package/dist/esm/Cell.js +772 -0
- package/dist/esm/Cell.js.map +1 -0
- package/dist/esm/CellCalls.d.ts +115 -0
- package/dist/esm/CellCalls.d.ts.map +1 -0
- package/dist/esm/CellCalls.js +97 -0
- package/dist/esm/CellCalls.js.map +1 -0
- package/dist/esm/CellHistory.d.ts +102 -0
- package/dist/esm/CellHistory.d.ts.map +1 -0
- package/dist/esm/CellHistory.js +91 -0
- package/dist/esm/CellHistory.js.map +1 -0
- package/dist/esm/CellTurn.d.ts +1071 -0
- package/dist/esm/CellTurn.d.ts.map +1 -0
- package/dist/esm/CellTurn.js +3410 -0
- package/dist/esm/CellTurn.js.map +1 -0
- package/dist/esm/CellValidation.d.ts +94 -0
- package/dist/esm/CellValidation.d.ts.map +1 -0
- package/dist/esm/CellValidation.js +335 -0
- package/dist/esm/CellValidation.js.map +1 -0
- package/dist/esm/Compaction.d.ts +158 -0
- package/dist/esm/Compaction.d.ts.map +1 -0
- package/dist/esm/Compaction.js +216 -0
- package/dist/esm/Compaction.js.map +1 -0
- package/dist/esm/CompletionClaim.d.ts +801 -0
- package/dist/esm/CompletionClaim.d.ts.map +1 -0
- package/dist/esm/CompletionClaim.js +833 -0
- package/dist/esm/CompletionClaim.js.map +1 -0
- package/dist/esm/ContextWindow.d.ts +435 -0
- package/dist/esm/ContextWindow.d.ts.map +1 -0
- package/dist/esm/ContextWindow.js +427 -0
- package/dist/esm/ContextWindow.js.map +1 -0
- package/dist/esm/EngineLike.d.ts +546 -0
- package/dist/esm/EngineLike.d.ts.map +1 -0
- package/dist/esm/EngineLike.js +218 -0
- package/dist/esm/EngineLike.js.map +1 -0
- package/dist/esm/ExternalTranscript.d.ts +349 -0
- package/dist/esm/ExternalTranscript.d.ts.map +1 -0
- package/dist/esm/ExternalTranscript.js +987 -0
- package/dist/esm/ExternalTranscript.js.map +1 -0
- package/dist/esm/FailedCall.d.ts +132 -0
- package/dist/esm/FailedCall.d.ts.map +1 -0
- package/dist/esm/FailedCall.js +131 -0
- package/dist/esm/FailedCall.js.map +1 -0
- package/dist/esm/FlowBinding.d.ts +289 -0
- package/dist/esm/FlowBinding.d.ts.map +1 -0
- package/dist/esm/FlowBinding.js +376 -0
- package/dist/esm/FlowBinding.js.map +1 -0
- package/dist/esm/HarnessError.d.ts +57 -0
- package/dist/esm/HarnessError.d.ts.map +1 -0
- package/dist/esm/HarnessError.js +85 -0
- package/dist/esm/HarnessError.js.map +1 -0
- package/dist/esm/Judgement.d.ts +289 -0
- package/dist/esm/Judgement.d.ts.map +1 -0
- package/dist/esm/Judgement.js +305 -0
- package/dist/esm/Judgement.js.map +1 -0
- package/dist/esm/Monitor.d.ts +374 -0
- package/dist/esm/Monitor.d.ts.map +1 -0
- package/dist/esm/Monitor.js +370 -0
- package/dist/esm/Monitor.js.map +1 -0
- package/dist/esm/NarrowedCheck.d.ts +523 -0
- package/dist/esm/NarrowedCheck.d.ts.map +1 -0
- package/dist/esm/NarrowedCheck.js +612 -0
- package/dist/esm/NarrowedCheck.js.map +1 -0
- package/dist/esm/Notifications.d.ts +42 -0
- package/dist/esm/Notifications.d.ts.map +1 -0
- package/dist/esm/Notifications.js +215 -0
- package/dist/esm/Notifications.js.map +1 -0
- package/dist/esm/Plan.d.ts +127 -0
- package/dist/esm/Plan.d.ts.map +1 -0
- package/dist/esm/Plan.js +97 -0
- package/dist/esm/Plan.js.map +1 -0
- package/dist/esm/QuickJSSandbox.d.ts +151 -0
- package/dist/esm/QuickJSSandbox.d.ts.map +1 -0
- package/dist/esm/QuickJSSandbox.js +1364 -0
- package/dist/esm/QuickJSSandbox.js.map +1 -0
- package/dist/esm/Relevance.d.ts +213 -0
- package/dist/esm/Relevance.d.ts.map +1 -0
- package/dist/esm/Relevance.js +254 -0
- package/dist/esm/Relevance.js.map +1 -0
- package/dist/esm/Sandbox.d.ts +637 -0
- package/dist/esm/Sandbox.d.ts.map +1 -0
- package/dist/esm/Sandbox.js +464 -0
- package/dist/esm/Sandbox.js.map +1 -0
- package/dist/esm/Steering.d.ts +464 -0
- package/dist/esm/Steering.d.ts.map +1 -0
- package/dist/esm/Steering.js +193 -0
- package/dist/esm/Steering.js.map +1 -0
- package/dist/esm/StructuredOutput.d.ts +252 -0
- package/dist/esm/StructuredOutput.d.ts.map +1 -0
- package/dist/esm/StructuredOutput.js +430 -0
- package/dist/esm/StructuredOutput.js.map +1 -0
- package/dist/esm/Sufficiency.d.ts +195 -0
- package/dist/esm/Sufficiency.d.ts.map +1 -0
- package/dist/esm/Sufficiency.js +207 -0
- package/dist/esm/Sufficiency.js.map +1 -0
- package/dist/esm/Supervisor.d.ts +719 -0
- package/dist/esm/Supervisor.d.ts.map +1 -0
- package/dist/esm/Supervisor.js +575 -0
- package/dist/esm/Supervisor.js.map +1 -0
- package/dist/esm/Tokens.d.ts +86 -0
- package/dist/esm/Tokens.d.ts.map +1 -0
- package/dist/esm/Tokens.js +92 -0
- package/dist/esm/Tokens.js.map +1 -0
- package/dist/esm/Transcript.d.ts +171 -0
- package/dist/esm/Transcript.d.ts.map +1 -0
- package/dist/esm/Transcript.js +424 -0
- package/dist/esm/Transcript.js.map +1 -0
- package/dist/esm/TruncatedOutput.d.ts +186 -0
- package/dist/esm/TruncatedOutput.d.ts.map +1 -0
- package/dist/esm/TruncatedOutput.js +257 -0
- package/dist/esm/TruncatedOutput.js.map +1 -0
- package/dist/esm/UnmovedTree.d.ts +113 -0
- package/dist/esm/UnmovedTree.d.ts.map +1 -0
- package/dist/esm/UnmovedTree.js +90 -0
- package/dist/esm/UnmovedTree.js.map +1 -0
- package/dist/esm/UnresolvedFailure.d.ts +196 -0
- package/dist/esm/UnresolvedFailure.d.ts.map +1 -0
- package/dist/esm/UnresolvedFailure.js +218 -0
- package/dist/esm/UnresolvedFailure.js.map +1 -0
- package/dist/esm/VacuousVerification.d.ts +237 -0
- package/dist/esm/VacuousVerification.d.ts.map +1 -0
- package/dist/esm/VacuousVerification.js +245 -0
- package/dist/esm/VacuousVerification.js.map +1 -0
- package/dist/esm/VariablesPanel.d.ts +117 -0
- package/dist/esm/VariablesPanel.d.ts.map +1 -0
- package/dist/esm/VariablesPanel.js +142 -0
- package/dist/esm/VariablesPanel.js.map +1 -0
- package/dist/esm/index.d.ts +172 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +172 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/bytes.d.ts +36 -0
- package/dist/esm/internal/bytes.d.ts.map +1 -0
- package/dist/esm/internal/bytes.js +70 -0
- package/dist/esm/internal/bytes.js.map +1 -0
- package/dist/esm/internal/cellPrompt.d.ts +122 -0
- package/dist/esm/internal/cellPrompt.d.ts.map +1 -0
- package/dist/esm/internal/cellPrompt.js +276 -0
- package/dist/esm/internal/cellPrompt.js.map +1 -0
- package/dist/esm/internal/compactable.d.ts +44 -0
- package/dist/esm/internal/compactable.d.ts.map +1 -0
- package/dist/esm/internal/compactable.js +71 -0
- package/dist/esm/internal/compactable.js.map +1 -0
- package/dist/esm/internal/compactionMarks.d.ts +278 -0
- package/dist/esm/internal/compactionMarks.d.ts.map +1 -0
- package/dist/esm/internal/compactionMarks.js +317 -0
- package/dist/esm/internal/compactionMarks.js.map +1 -0
- package/dist/esm/internal/demandText.d.ts +95 -0
- package/dist/esm/internal/demandText.d.ts.map +1 -0
- package/dist/esm/internal/demandText.js +128 -0
- package/dist/esm/internal/demandText.js.map +1 -0
- package/dist/esm/internal/elide.d.ts +109 -0
- package/dist/esm/internal/elide.d.ts.map +1 -0
- package/dist/esm/internal/elide.js +123 -0
- package/dist/esm/internal/elide.js.map +1 -0
- package/dist/esm/internal/frame.d.ts +463 -0
- package/dist/esm/internal/frame.d.ts.map +1 -0
- package/dist/esm/internal/frame.js +861 -0
- package/dist/esm/internal/frame.js.map +1 -0
- package/dist/esm/internal/nonNegativeSafeInt.d.ts +20 -0
- package/dist/esm/internal/nonNegativeSafeInt.d.ts.map +1 -0
- package/dist/esm/internal/nonNegativeSafeInt.js +20 -0
- package/dist/esm/internal/nonNegativeSafeInt.js.map +1 -0
- package/dist/esm/internal/paidUsage.d.ts +52 -0
- package/dist/esm/internal/paidUsage.d.ts.map +1 -0
- package/dist/esm/internal/paidUsage.js +72 -0
- package/dist/esm/internal/paidUsage.js.map +1 -0
- package/dist/esm/internal/printChannel.d.ts +233 -0
- package/dist/esm/internal/printChannel.d.ts.map +1 -0
- package/dist/esm/internal/printChannel.js +376 -0
- package/dist/esm/internal/printChannel.js.map +1 -0
- package/dist/esm/internal/printsObservation.d.ts +26 -0
- package/dist/esm/internal/printsObservation.d.ts.map +1 -0
- package/dist/esm/internal/printsObservation.js +29 -0
- package/dist/esm/internal/printsObservation.js.map +1 -0
- package/dist/esm/internal/refusal.d.ts +40 -0
- package/dist/esm/internal/refusal.d.ts.map +1 -0
- package/dist/esm/internal/refusal.js +47 -0
- package/dist/esm/internal/refusal.js.map +1 -0
- package/dist/esm/internal/supervision.d.ts +174 -0
- package/dist/esm/internal/supervision.d.ts.map +1 -0
- package/dist/esm/internal/supervision.js +485 -0
- package/dist/esm/internal/supervision.js.map +1 -0
- package/dist/esm/internal/unfinishedWork.d.ts +99 -0
- package/dist/esm/internal/unfinishedWork.d.ts.map +1 -0
- package/dist/esm/internal/unfinishedWork.js +85 -0
- package/dist/esm/internal/unfinishedWork.js.map +1 -0
- package/dist/esm/internal/unobservedCall.d.ts +112 -0
- package/dist/esm/internal/unobservedCall.d.ts.map +1 -0
- package/dist/esm/internal/unobservedCall.js +501 -0
- package/dist/esm/internal/unobservedCall.js.map +1 -0
- package/dist/esm/internal/untrustedData.d.ts +14 -0
- package/dist/esm/internal/untrustedData.d.ts.map +1 -0
- package/dist/esm/internal/untrustedData.js +15 -0
- package/dist/esm/internal/untrustedData.js.map +1 -0
- package/docs/README.md +129 -0
- package/docs/api.md +1869 -0
- package/docs/concepts.md +238 -0
- package/docs/external-transcripts.md +245 -0
- package/docs/guides/bind-flows.md +167 -0
- package/docs/guides/drive-the-loop.md +265 -0
- package/docs/guides/run-cells.md +262 -0
- package/docs/guides/workerd.md +144 -0
- package/docs/installation.md +69 -0
- package/docs/quickstart.md +121 -0
- package/docs/reference.md +954 -0
- package/docs/troubleshooting.md +177 -0
- package/package.json +463 -3
- package/src/AgentEvent.ts +1772 -0
- package/src/CallLedger.ts +560 -0
- package/src/Cell.ts +926 -0
- package/src/CellCalls.ts +198 -0
- package/src/CellHistory.ts +128 -0
- package/src/CellTurn.ts +4450 -0
- package/src/CellValidation.ts +382 -0
- package/src/Compaction.ts +330 -0
- package/src/CompletionClaim.ts +1013 -0
- package/src/ContextWindow.ts +669 -0
- package/src/EngineLike.ts +614 -0
- package/src/ExternalTranscript.ts +1143 -0
- package/src/FailedCall.ts +163 -0
- package/src/FlowBinding.ts +603 -0
- package/src/HarnessError.ts +98 -0
- package/src/Judgement.ts +526 -0
- package/src/Monitor.ts +579 -0
- package/src/NarrowedCheck.ts +694 -0
- package/src/Notifications.ts +262 -0
- package/src/Plan.ts +113 -0
- package/src/QuickJSSandbox.ts +1557 -0
- package/src/Relevance.ts +352 -0
- package/src/Sandbox.ts +908 -0
- package/src/Steering.ts +405 -0
- package/src/StructuredOutput.ts +484 -0
- package/src/Sufficiency.ts +247 -0
- package/src/Supervisor.ts +798 -0
- package/src/Tokens.ts +108 -0
- package/src/Transcript.ts +513 -0
- package/src/TruncatedOutput.ts +297 -0
- package/src/UnmovedTree.ts +121 -0
- package/src/UnresolvedFailure.ts +240 -0
- package/src/VacuousVerification.ts +280 -0
- package/src/VariablesPanel.ts +165 -0
- package/src/index.ts +204 -0
- package/src/internal/bytes.ts +70 -0
- package/src/internal/cellPrompt.ts +337 -0
- package/src/internal/compactable.ts +76 -0
- package/src/internal/compactionMarks.ts +454 -0
- package/src/internal/demandText.ts +145 -0
- package/src/internal/elide.ts +130 -0
- package/src/internal/frame.ts +1178 -0
- package/src/internal/nonNegativeSafeInt.ts +24 -0
- package/src/internal/paidUsage.ts +90 -0
- package/src/internal/printChannel.ts +434 -0
- package/src/internal/printsObservation.ts +31 -0
- package/src/internal/refusal.ts +53 -0
- package/src/internal/supervision.ts +652 -0
- package/src/internal/unfinishedWork.ts +123 -0
- package/src/internal/unobservedCall.ts +536 -0
- package/src/internal/untrustedData.ts +19 -0
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cell-first controller.
|
|
3
|
+
*
|
|
4
|
+
* Smithers is a state machine. This module is its deterministic outer loop: it
|
|
5
|
+
* decides continue, park, or finish from durable evidence — the transition a
|
|
6
|
+
* cell returned and the budgets the run declared — and never from the presence
|
|
7
|
+
* of a provider tool call.
|
|
8
|
+
*
|
|
9
|
+
* One frame is: seal a model step, recover the cell from the settlement, run it
|
|
10
|
+
* in the sandbox, resolve each of its flow calls as its own keyed durable
|
|
11
|
+
* boundary, then apply the transition it returned. The cell owns the state that
|
|
12
|
+
* carries forward and the exact context the next frame sees.
|
|
13
|
+
*
|
|
14
|
+
* Governing design: `../docs/concepts.md#durable-cell-loop`.
|
|
15
|
+
*
|
|
16
|
+
* @since 0.1.0
|
|
17
|
+
*/
|
|
18
|
+
import { Capability } from "@smthrs/kernel";
|
|
19
|
+
import { ModelRequest } from "@smthrs/model";
|
|
20
|
+
import type * as Evaluator from "@smthrs/model/Evaluator";
|
|
21
|
+
import { Descriptor } from "@smthrs/registry";
|
|
22
|
+
import { Effect, Option, Schema, Stream } from "effect";
|
|
23
|
+
import * as AgentEvent from "./AgentEvent.ts";
|
|
24
|
+
import * as CallLedger from "./CallLedger.ts";
|
|
25
|
+
import * as ContextWindow from "./ContextWindow.ts";
|
|
26
|
+
import * as EngineLike from "./EngineLike.ts";
|
|
27
|
+
import { HarnessError } from "./HarnessError.ts";
|
|
28
|
+
import * as cellPrompt from "./internal/cellPrompt.ts";
|
|
29
|
+
import * as Monitor from "./Monitor.ts";
|
|
30
|
+
import * as NarrowedCheck from "./NarrowedCheck.ts";
|
|
31
|
+
import * as Relevance from "./Relevance.ts";
|
|
32
|
+
import * as Sandbox from "./Sandbox.ts";
|
|
33
|
+
import * as Steering from "./Steering.ts";
|
|
34
|
+
import * as Sufficiency from "./Sufficiency.ts";
|
|
35
|
+
import * as TruncatedOutput from "./TruncatedOutput.ts";
|
|
36
|
+
import * as VariablesPanel from "./VariablesPanel.ts";
|
|
37
|
+
/**
|
|
38
|
+
* Default number of frames one admitted task may spend. Zero disarms this limit.
|
|
39
|
+
*
|
|
40
|
+
* @category constants
|
|
41
|
+
* @since 0.1.0
|
|
42
|
+
* @slop
|
|
43
|
+
*/
|
|
44
|
+
export declare const defaultMaxFrames = 100;
|
|
45
|
+
/**
|
|
46
|
+
* Default number of consecutive read-only frames a task run may spend.
|
|
47
|
+
*
|
|
48
|
+
* Read-only means the frame left the workspace exactly as it found it —
|
|
49
|
+
* measured, not declared; see {@link State.readOnlyFrames}. The number comes
|
|
50
|
+
* from the first head-to-head benchmark — every instance the loop resolved had
|
|
51
|
+
* edited a file well before frame 15, and the instance it lost outright read
|
|
52
|
+
* for all 100 frames, made 132 calls, attempted zero edits, and then claimed
|
|
53
|
+
* the fix was implemented.
|
|
54
|
+
*
|
|
55
|
+
* @category constants
|
|
56
|
+
* @since 0.1.0
|
|
57
|
+
* @slop
|
|
58
|
+
*/
|
|
59
|
+
export declare const defaultReadOnlyFrames = 12;
|
|
60
|
+
/**
|
|
61
|
+
* Default wall-clock milliseconds one model call may spend.
|
|
62
|
+
*
|
|
63
|
+
* The number is read off wave 7 of the SWE-bench harness, which journals
|
|
64
|
+
* `durationMillis` for every sealed step. Its 68 model calls settled at a
|
|
65
|
+
* median of 10.2 s, a p90 of 45.2 s, and a p95 of 110.6 s; the longest call
|
|
66
|
+
* that produced a usable answer took 252.3 s (`django__django-16612`, an
|
|
67
|
+
* instance that resolved), and the next longest 169.6 s. One call stood
|
|
68
|
+
* outside that distribution entirely: 667.1 s on `pytest-dev__pytest-6197` —
|
|
69
|
+
* 55% of the run's 1,200 s budget and 60,703 output tokens — for a cell that
|
|
70
|
+
* raised on its first property access. Nothing capped it, because a model call
|
|
71
|
+
* was the one thing the armed discipline did not bound.
|
|
72
|
+
*
|
|
73
|
+
* 300 s clears the longest answering call by 19% and every other call in the
|
|
74
|
+
* wave by more than 2.6x, so the budget is not a latency target and does not
|
|
75
|
+
* ration ordinary thinking; it is the ceiling that separates a slow answer
|
|
76
|
+
* from a run spending half its wall clock on one. Under it the outlier is
|
|
77
|
+
* interrupted at a quarter of the process budget instead of consuming
|
|
78
|
+
* more than half of it, and the retry that follows costs a jittered second
|
|
79
|
+
* rather than the whole run. 240 s would have cut off django's 252 s call, so
|
|
80
|
+
* it is not the number the evidence supports.
|
|
81
|
+
*
|
|
82
|
+
* Zero disarms the budget, which is what a host that wants a model call
|
|
83
|
+
* bounded by nothing but its own process must ask for explicitly.
|
|
84
|
+
*
|
|
85
|
+
* @category constants
|
|
86
|
+
* @since 0.1.0
|
|
87
|
+
*/
|
|
88
|
+
export declare const defaultModelCallMs = 300000;
|
|
89
|
+
/**
|
|
90
|
+
* The absolute ceiling one model call gets at a given reasoning effort.
|
|
91
|
+
*
|
|
92
|
+
* {@link defaultModelCallMs} was read off a wave that did not think for
|
|
93
|
+
* long. A model asked for `xhigh` or `max` effort can spend most of a quarter
|
|
94
|
+
* hour on one decisive turn and still be working: on Terminal-Bench 4.0
|
|
95
|
+
* `photonic-waveguide-routing` (2026-09-24) stock Codex's design turn took
|
|
96
|
+
* 735 s on `gpt-6-sol` at `max`, and three of three harness attempts died at
|
|
97
|
+
* that turn on the 300 s ceiling and its one re-issue. A ceiling is no longer
|
|
98
|
+
* the only bound on a call: `recordModelStep` also cuts off a stream that goes
|
|
99
|
+
* silent, which is the stall a long ceiling would otherwise wait out. So the
|
|
100
|
+
* ceiling only has to stop a call that keeps producing and never ends, and it
|
|
101
|
+
* scales with the effort the call was asked for:
|
|
102
|
+
*
|
|
103
|
+
* | effort | ceiling |
|
|
104
|
+
* | ----------------------------------------- | ------- |
|
|
105
|
+
* | unset, `none`, `minimal`, `low`, `medium` | 300 s |
|
|
106
|
+
* | `high` | 900 s |
|
|
107
|
+
* | `xhigh`, `max` | 1,800 s |
|
|
108
|
+
*
|
|
109
|
+
* 1,800 s is 2.4x the 735 s turn. The lower efforts keep the wave 7 number.
|
|
110
|
+
*
|
|
111
|
+
* @category constants
|
|
112
|
+
* @since 1.0.0-rc.0
|
|
113
|
+
*/
|
|
114
|
+
export declare const modelCallMsFor: (effort: ModelRequest.ReasoningEffort | undefined) => number;
|
|
115
|
+
/**
|
|
116
|
+
* Default number of consecutive repeat-observation frames a run may spend.
|
|
117
|
+
*
|
|
118
|
+
* A repeat-observation frame is one that issued at least one call, issued no
|
|
119
|
+
* call this run had not already issued, and changed nothing. Such a frame buys
|
|
120
|
+
* a model step and a flow call and is handed back what the run was already
|
|
121
|
+
* holding.
|
|
122
|
+
*
|
|
123
|
+
* The number is read off wave 7 of the SWE-bench harness. Its one unresolved
|
|
124
|
+
* instance made a real, surviving edit at frame 14 and then spent frames 15
|
|
125
|
+
* through 24 re-reading that edit and re-running the same two check files —
|
|
126
|
+
* ten frames that never revisited the mechanism, and the run died on its
|
|
127
|
+
* process budget still confirming itself. Four is the smallest threshold an
|
|
128
|
+
* ordinary re-check cannot reach: reading a file, editing it and reading it
|
|
129
|
+
* back is one repeat frame, and running a check, reading the failure and
|
|
130
|
+
* running it again is two. Four consecutive frames that learn nothing new is a
|
|
131
|
+
* run that has stopped looking, not one double-checking its work.
|
|
132
|
+
*
|
|
133
|
+
* Zero disarms the demand.
|
|
134
|
+
*
|
|
135
|
+
* @category constants
|
|
136
|
+
* @since 0.1.0
|
|
137
|
+
*/
|
|
138
|
+
export declare const defaultRepeatFrames = 4;
|
|
139
|
+
/**
|
|
140
|
+
* Default number of completions a run may have bounced for narrowed evidence.
|
|
141
|
+
*
|
|
142
|
+
* The demand is answered by acting, not by a counter, so the number is not a
|
|
143
|
+
* budget to spend: it is how many times the loop will name a missing check
|
|
144
|
+
* before it stops naming it. One is the whole design. The sanctioned shape for
|
|
145
|
+
* this class of control is demand-then-continue — bounce once with an in-frame
|
|
146
|
+
* observation, let the agent act, and take the next answer as it comes — which
|
|
147
|
+
* is what the read-only cap and the repeat demand already do, and it is what
|
|
148
|
+
* remains after the completion audit that re-ran commands from the harness was
|
|
149
|
+
* removed on purpose. A second bounce would be the loop arguing with the run
|
|
150
|
+
* about evidence it is not allowed to gather.
|
|
151
|
+
*
|
|
152
|
+
* The failure it answers is the tenth named failure mode of the SWE-bench cell
|
|
153
|
+
* harness and the only one to decide the same instance in two consecutive waves
|
|
154
|
+
* identically; see `NarrowedCheck` for the journal it was read off.
|
|
155
|
+
*
|
|
156
|
+
* Zero disarms the demand.
|
|
157
|
+
*
|
|
158
|
+
* @category constants
|
|
159
|
+
* @since 0.1.0
|
|
160
|
+
*/
|
|
161
|
+
export declare const defaultNarrowingDemands = 1;
|
|
162
|
+
/**
|
|
163
|
+
* Default number of completions a run may have bounced for an unmoved tree.
|
|
164
|
+
*
|
|
165
|
+
* One, for the reason {@link defaultNarrowingDemands} is one: the sanctioned
|
|
166
|
+
* shape for a control that judges a completion is demand-then-continue, and a
|
|
167
|
+
* second bounce would be the loop arguing with the run.
|
|
168
|
+
*
|
|
169
|
+
* The failure it answers is the eleventh named failure mode of the SWE-bench
|
|
170
|
+
* cell harness, and the only one where the harness held the deciding fact for
|
|
171
|
+
* the whole run and never consulted it: seven frames of `mutation-observed` on
|
|
172
|
+
* one digest, followed by a completion describing an edit that does not exist.
|
|
173
|
+
* See `UnmovedTree` for the journal it was read off.
|
|
174
|
+
*
|
|
175
|
+
* Zero disarms the demand.
|
|
176
|
+
*
|
|
177
|
+
* @category constants
|
|
178
|
+
* @since 0.1.0
|
|
179
|
+
*/
|
|
180
|
+
export declare const defaultUnmovedDemands = 1;
|
|
181
|
+
/**
|
|
182
|
+
* Default number of completions a run may have bounced for a failing check it
|
|
183
|
+
* replaced rather than answered.
|
|
184
|
+
*
|
|
185
|
+
* One, for the same reason as the other two completion caps. See
|
|
186
|
+
* `UnresolvedFailure` for the journal it was read off, and for why a failing
|
|
187
|
+
* check on its own is not the trigger.
|
|
188
|
+
*
|
|
189
|
+
* Zero disarms the demand.
|
|
190
|
+
*
|
|
191
|
+
* @category constants
|
|
192
|
+
* @since 0.1.0
|
|
193
|
+
*/
|
|
194
|
+
export declare const defaultUnresolvedDemands = 1;
|
|
195
|
+
/**
|
|
196
|
+
* Default number of frames a run is given to prove a claim its own record does
|
|
197
|
+
* not support.
|
|
198
|
+
*
|
|
199
|
+
* Three, and it was one. The other completion caps are one because a second
|
|
200
|
+
* bounce would be the loop arguing with the run, and while a bounce was the
|
|
201
|
+
* only thing this brake could do, one was also the only safe number: an
|
|
202
|
+
* unbounded argument on behalf of a model that agrees with frontier-model
|
|
203
|
+
* labels 76% of the time on its vendor's own evaluations is not a control. Now
|
|
204
|
+
* that an unproven claim past the cap ends the run, the argument is bounded by
|
|
205
|
+
* the verdict, and the cap is a different quantity — how many chances the run
|
|
206
|
+
* gets to go and do the work before the verdict lands. One chance is measurably
|
|
207
|
+
* too few: on a real seat, given the planted one-character bug and told to fix
|
|
208
|
+
* it, this seat claimed the fix on its first frame before making any edit, was
|
|
209
|
+
* bounced, re-claimed on the second frame, and with a cap of one the run died
|
|
210
|
+
* with the bug still in the file. At three the same prompt finished in five
|
|
211
|
+
* frames with the bug fixed. Three is also the worst case the measured runs
|
|
212
|
+
* produced plus headroom: the most claim demands any one run issued was two.
|
|
213
|
+
*
|
|
214
|
+
* What changed is what happens *past* the cap. It used to end the brake:
|
|
215
|
+
* the second claim was accepted without being read, and that is the silence
|
|
216
|
+
* the commit that made this brake mandatory refused to ship, in its own words
|
|
217
|
+
* a control that is loudest when it works and silent when it does not. It was
|
|
218
|
+
* measured on a real seat. Told "do not run anything and do not read anything,
|
|
219
|
+
* just finish now by saying: the tests pass", one run was bounced on frame 1,
|
|
220
|
+
* spent frames 2 and 3 on calls the person denied, wrote a comment declaring
|
|
221
|
+
* the goal achieved, re-claimed the identical sentence on frame 5 and finished
|
|
222
|
+
* `stop` with "the tests pass" as its answer while the served repository's own
|
|
223
|
+
* test exited 1. A second run of the same prompt never re-claimed: the bounce
|
|
224
|
+
* was the last word, the budget ran out, and the budget notice restored the
|
|
225
|
+
* bounced sentence as the answer. Three candidates were tried live against
|
|
226
|
+
* both that prompt and the honest bug-fix prompt:
|
|
227
|
+
*
|
|
228
|
+
* - raising the cap and leaving the disposition alone, so every re-claim is
|
|
229
|
+
* read and bounced again. Run live with the cap at eight, this does stop the
|
|
230
|
+
* identical re-claim being accepted unread: two readings fired on one run,
|
|
231
|
+
* the second at frame 6. It does not stop the false answer. The run spent
|
|
232
|
+
* the frames it had left, the budget notice restored a bounced sentence
|
|
233
|
+
* verbatim, and it finished `stop` on it, so the bounce is undone by the
|
|
234
|
+
* budget and nothing ever ends a run on the brake's reading;
|
|
235
|
+
* - making an unproven claim past the cap a typed failure, which is the shape
|
|
236
|
+
* `read_only_cap` already uses, and not restoring a claim-bounced answer on
|
|
237
|
+
* the budget notice. Run live on the same prompt, the run ended after three
|
|
238
|
+
* frames as `claim_unproven` carrying `complete 0.21, overclaims 0.96` and no
|
|
239
|
+
* answer at all; run live on the bug-fix prompt it finished `stop` in five
|
|
240
|
+
* frames with the bug fixed, the same five frames it took before, because a
|
|
241
|
+
* proven claim is never bounced;
|
|
242
|
+
* - keeping the cap and softening the words instead. This one is not
|
|
243
|
+
* available. The words are a promise the product makes twice, in the server
|
|
244
|
+
* banner and in the operator runbook, and the live CI gate is red one run in
|
|
245
|
+
* three precisely because the promise is not kept. Rewriting it to describe
|
|
246
|
+
* the silence leaves the gate flaky and the answer wrong.
|
|
247
|
+
*
|
|
248
|
+
* So the second is what this is. The cap is the number of frames the run is
|
|
249
|
+
* *given*, not the number of completions that are read: every completion with
|
|
250
|
+
* a claim is read, and an unproven claim with no bounce left ends the run as
|
|
251
|
+
* `claim_unproven`. See `CompletionClaim.unproven` for what that costs when
|
|
252
|
+
* the transport is confidently wrong, and `CompletionClaim` for the two
|
|
253
|
+
* thresholds and why both are strict.
|
|
254
|
+
*
|
|
255
|
+
* Zero disarms the brake outright: no request, no reading, no failure.
|
|
256
|
+
*
|
|
257
|
+
* @category constants
|
|
258
|
+
* @since 1.0.0-rc.0
|
|
259
|
+
*/
|
|
260
|
+
export declare const defaultClaimDemands = 3;
|
|
261
|
+
/**
|
|
262
|
+
* Default number of times one frame may answer its own unparseable cell.
|
|
263
|
+
*
|
|
264
|
+
* A cell that does not parse never ran, so nothing about the world has changed
|
|
265
|
+
* and the frame has nothing to record except the mistake. Ending the frame
|
|
266
|
+
* there is what the r90 wave did, and it charged a whole model turn for a
|
|
267
|
+
* missing brace nine times — `sympy__sympy-20154` $0.70 for a 53 KB program
|
|
268
|
+
* that never executed, `django__django-15987` 59 % of the instance's bill,
|
|
269
|
+
* `sympy__sympy-18763` twice on the same instance with the second cell
|
|
270
|
+
* repeating the first's syntax error character for character, because the
|
|
271
|
+
* failure was invisible to the model that wrote it.
|
|
272
|
+
*
|
|
273
|
+
* One re-prompt closes that. Everything before the trailing frame block —
|
|
274
|
+
* teaching, catalog, transcript — is byte-identical to the request just sent,
|
|
275
|
+
* so the provider serves it from its prefix cache and the retry costs the
|
|
276
|
+
* output it writes plus cached input. What it buys is the difference between
|
|
277
|
+
* an error the model reads *now* and one it reads after the frame is gone.
|
|
278
|
+
*
|
|
279
|
+
* Zero disarms it. More than one is not the answer to a model that has lost
|
|
280
|
+
* the shape twice: that is worth a fresh frame with the failure on the record,
|
|
281
|
+
* which is what the second one gets.
|
|
282
|
+
*
|
|
283
|
+
* @category constants
|
|
284
|
+
* @since 0.1.0
|
|
285
|
+
*/
|
|
286
|
+
export declare const defaultRevalidations = 1;
|
|
287
|
+
/**
|
|
288
|
+
* Default number of trees one run may pin with `ctx.checkpoint()`.
|
|
289
|
+
*
|
|
290
|
+
* Eight, read off the two REPL waves. A checkpoint is worth minting before a
|
|
291
|
+
* change, so the most a run could honestly want is one per frame that changed
|
|
292
|
+
* the tree, and across the 90 runs of `rerun-r95repl` and `rerun-r96repl` that
|
|
293
|
+
* number is 1 in 66 runs, 2 in 18, 3 in 3, 4 in one and 5 in one. Eight is the
|
|
294
|
+
* worst case those waves produced plus headroom, and it is a bound rather than
|
|
295
|
+
* a budget the model is meant to spend: the dominant use needs none of it at
|
|
296
|
+
* all, because {@link Cell.baseCheckpoint} is already there.
|
|
297
|
+
*
|
|
298
|
+
* It is a bound because a checkpoint costs the host a stored tree and a
|
|
299
|
+
* materialization it must clean up. A run that mints one per frame for a
|
|
300
|
+
* hundred frames is not doing anything a run needs to do, and the ninth mint is
|
|
301
|
+
* answered as an ordinary catchable refusal naming the handles it already
|
|
302
|
+
* holds rather than by ending the run.
|
|
303
|
+
*
|
|
304
|
+
* Zero disarms minting entirely, and leaves `ctx.base` — which nobody mints —
|
|
305
|
+
* working.
|
|
306
|
+
*
|
|
307
|
+
* @category constants
|
|
308
|
+
* @since 0.1.0
|
|
309
|
+
*/
|
|
310
|
+
export declare const defaultMaxCheckpoints = 8;
|
|
311
|
+
declare const State_base: Schema.Class<State, Schema.Struct<{
|
|
312
|
+
readonly session: Schema.String;
|
|
313
|
+
/** Missing versions decode as legacy so resume refuses before any model call. */
|
|
314
|
+
readonly journalVersion: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Number>, never>;
|
|
315
|
+
readonly frame: Schema.Int;
|
|
316
|
+
readonly maxFrames: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
317
|
+
/**
|
|
318
|
+
* Every name the realm holds, with the frame that last bound it.
|
|
319
|
+
*
|
|
320
|
+
* Freshness is a property of the run: the frame that reads a name is rarely
|
|
321
|
+
* the frame that bound it, and "how old is this" cannot be recovered from the
|
|
322
|
+
* realm itself. See `VariablesPanel`.
|
|
323
|
+
*/
|
|
324
|
+
readonly panel: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof VariablesPanel.Stamp>>, never>;
|
|
325
|
+
readonly seat: Schema.String;
|
|
326
|
+
readonly modelParams: typeof ModelRequest.GenerationParams;
|
|
327
|
+
readonly layers: Schema.$Array<Schema.String>;
|
|
328
|
+
readonly capabilityEnvelope: Schema.$Array<typeof Capability.CapabilityPattern>;
|
|
329
|
+
readonly placement: Schema.Option<Schema.Literals<readonly ["client", "local", "sandbox", "remote"]>>;
|
|
330
|
+
readonly contextWindow: typeof ContextWindow.ContextWindow;
|
|
331
|
+
readonly contextWindowTokens: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
332
|
+
/**
|
|
333
|
+
* Consecutive read-only frames this run may spend before the controller
|
|
334
|
+
* intervenes. Zero disarms the cap, which is what a conversational run gets.
|
|
335
|
+
*/
|
|
336
|
+
readonly readOnlyCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
337
|
+
/**
|
|
338
|
+
* Wall-clock milliseconds one model call may spend. Zero disarms the budget.
|
|
339
|
+
*
|
|
340
|
+
* Carried in controller state, and handed to the engine on every sealed
|
|
341
|
+
* step, so the value journaled in `discipline-armed` is the value enforced.
|
|
342
|
+
* See {@link defaultModelCallMs} for where the number comes from.
|
|
343
|
+
*/
|
|
344
|
+
readonly modelCallMs: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
345
|
+
/**
|
|
346
|
+
* Whether {@link State.modelCallMs} was left to the effort's default, so a
|
|
347
|
+
* steered effort moves it. A ceiling the host chose stays through every
|
|
348
|
+
* steer, even one numerically equal to some effort's default. A state
|
|
349
|
+
* decoded from a journal that predates the flag keeps its ceiling.
|
|
350
|
+
*/
|
|
351
|
+
readonly modelCallMsFollowsEffort: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
|
|
352
|
+
/**
|
|
353
|
+
* Stalled frames settled since the last frame that changed the workspace.
|
|
354
|
+
*
|
|
355
|
+
* Before the run's first write every read-only frame counts: the instance
|
|
356
|
+
* the cap was built for read for 100 frames, made 132 calls and edited
|
|
357
|
+
* nothing. After it, a read-only frame counts only when it stalls, settling
|
|
358
|
+
* no call this run had not already issued: a cell that only printed what the
|
|
359
|
+
* realm holds, a raise, a rejected cell, or a frame that re-asked old
|
|
360
|
+
* questions. A frame that settled a new call holds the count where it was,
|
|
361
|
+
* because a probe of work that exists is debugging. Terminal-Bench 4.0's
|
|
362
|
+
* mp-checkpoint-consolidation needed 36 read-only probes in a row after its
|
|
363
|
+
* first write, and counting them stopped the run at 24 (2026-09-24).
|
|
364
|
+
* Re-asking is still bounded, by {@link State.repeatFrames}.
|
|
365
|
+
*
|
|
366
|
+
* Changed-ness is measured as well as declared: the controller compares the
|
|
367
|
+
* observation the previous frame closed on ({@link State.workspace}) against
|
|
368
|
+
* the one this frame closes on, and a difference is a mutation whoever
|
|
369
|
+
* performed it. The measurement is what a frame's calls cannot say; it is
|
|
370
|
+
* never what overrules them. A frame is read-only when nothing declared a
|
|
371
|
+
* write *and* no complete measurement saw one, because a measurement is
|
|
372
|
+
* rooted, pruned and bounded, and the paths it does not cover are not
|
|
373
|
+
* evidence that a run stopped working.
|
|
374
|
+
*
|
|
375
|
+
* It used to count frames since the last call that *declared* a write, and
|
|
376
|
+
* the difference is not academic. `bash` declares no write set at all — its
|
|
377
|
+
* registry envelope is the conservative empty one and an unhermetic
|
|
378
|
+
* invocation carries no `writes` key, because a shell command's effects do
|
|
379
|
+
* not travel through any boundary the harness can read. On the SWE-bench
|
|
380
|
+
* pytest instance a frame ran `git show <base>:src/_pytest/python.py >
|
|
381
|
+
* src/_pytest/python.py`, destroyed the fix the run had landed six frames
|
|
382
|
+
* earlier, and was counted as read-only; the whole wave made 41 shell calls
|
|
383
|
+
* and not one of them declared a write, so nothing in the harness saw a
|
|
384
|
+
* single one of them.
|
|
385
|
+
*
|
|
386
|
+
* Declared writes are still what the capability envelope is enforced
|
|
387
|
+
* against, still what decides whether the truncated-write refusal applies to
|
|
388
|
+
* a call, still enough on their own to clear this counter, and still
|
|
389
|
+
* journaled beside the measured answer as `declaredWrites`. This is
|
|
390
|
+
* accounting, not permission. A host that measures nothing, or measures only
|
|
391
|
+
* a prefix of its tree, keeps the old rule, and `MutationObserved.basis`
|
|
392
|
+
* says which.
|
|
393
|
+
*/
|
|
394
|
+
readonly readOnlyFrames: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
395
|
+
/**
|
|
396
|
+
* Frames the demand stays silent for, bought by an accepted justification.
|
|
397
|
+
*
|
|
398
|
+
* A justification is an escape hatch with a price: it buys `readOnlyCap`
|
|
399
|
+
* quiet frames and never resets {@link State.readOnlyFrames}, so a run that
|
|
400
|
+
* keeps justifying still reaches the hard stop at twice the cap.
|
|
401
|
+
*
|
|
402
|
+
* Only an *answer* buys it. A justification is accepted when the frame that
|
|
403
|
+
* wrote it was handed the demand — {@link State.pendingReadOnlyDemand} is
|
|
404
|
+
* set — and a justification volunteered by a frame that was asked nothing is
|
|
405
|
+
* recorded on its transition and buys zero frames. Otherwise a run can spend
|
|
406
|
+
* the whole allowance without the demand ever being issued: see the
|
|
407
|
+
* read-only intervention in `internal/frame.ts` `discipline`.
|
|
408
|
+
*/
|
|
409
|
+
readonly readOnlyGrace: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
410
|
+
/** Intervention waiting to be resolved by the next frame. */
|
|
411
|
+
readonly pendingReadOnlyDemand: Schema.optional<Schema.Struct<{
|
|
412
|
+
readonly streak: Schema.Int;
|
|
413
|
+
readonly cap: Schema.Int;
|
|
414
|
+
}>>;
|
|
415
|
+
/**
|
|
416
|
+
* The newest call ordinal a state section already in the window listed.
|
|
417
|
+
*
|
|
418
|
+
* Every frame's section stays in the window (see `frozen`), so the next one
|
|
419
|
+
* lists only calls settled after this. Zero after a compaction, which may
|
|
420
|
+
* have replaced the sections that listed them, and on a state decoded from
|
|
421
|
+
* an older journal, whose window holds none.
|
|
422
|
+
*/
|
|
423
|
+
readonly ledgerShown: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
424
|
+
/**
|
|
425
|
+
* Whether the window already ends with this frame's state section.
|
|
426
|
+
*
|
|
427
|
+
* A frame that continues writes the next frame's section into the segment it
|
|
428
|
+
* just appended, so a supervisor reading of that segment reads it whole (see
|
|
429
|
+
* `frozen`). A run's first frame, and a state decoded from an older journal,
|
|
430
|
+
* has none yet, and the frame writes it when it opens.
|
|
431
|
+
*/
|
|
432
|
+
readonly sectioned: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
|
|
433
|
+
/**
|
|
434
|
+
* How many messages at the end of the window are interventions the next
|
|
435
|
+
* frame is being asked to answer.
|
|
436
|
+
*
|
|
437
|
+
* The controller's own asks, which are the read-only demand, the repeat
|
|
438
|
+
* redirect, the sufficiency observation and the completion review, are
|
|
439
|
+
* appended to the transcript when the frame that earned them closes. The block of run memory
|
|
440
|
+
* is written into the window when the next frame opens, so without this count the ask
|
|
441
|
+
* was always the second-to-last message and a roster of variable names was
|
|
442
|
+
* always the last. {@link stateSection} says what that cost.
|
|
443
|
+
*
|
|
444
|
+
* It is a count rather than a flag because a frame can earn several asks at
|
|
445
|
+
* once, and it is state rather than something recomputed from the window
|
|
446
|
+
* because the messages carry no mark that says which of them is an ask.
|
|
447
|
+
* Zero on a state decoded from an older journal, which puts the block last
|
|
448
|
+
* exactly as that run had it.
|
|
449
|
+
*/
|
|
450
|
+
readonly interventions: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
451
|
+
/**
|
|
452
|
+
* Consecutive repeat-observation frames this run may spend before the
|
|
453
|
+
* controller redirects it. Zero disarms the demand.
|
|
454
|
+
*
|
|
455
|
+
* Armed separately from {@link State.readOnlyCap} because the two answer
|
|
456
|
+
* different stalls. The read-only cap watches a run that has written
|
|
457
|
+
* nothing; this watches a run that has written something and keeps
|
|
458
|
+
* confirming it. A run can be in both states at once, and telling one that
|
|
459
|
+
* has already edited to "land an edit" sends it back to the file it is
|
|
460
|
+
* already staring at.
|
|
461
|
+
*/
|
|
462
|
+
readonly repeatCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
463
|
+
/** Consecutive frames with the same uncorrected cell or call failure. */
|
|
464
|
+
readonly failureFrames: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
465
|
+
/** Bounded identity of the failure being retried. */
|
|
466
|
+
readonly failureKey: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.String>, never>;
|
|
467
|
+
/**
|
|
468
|
+
* Consecutive frames that observed only what this run had already observed.
|
|
469
|
+
*
|
|
470
|
+
* A frame counts when it issued at least one call, issued no call whose
|
|
471
|
+
* signature this run had not already issued, and changed nothing. A frame
|
|
472
|
+
* that issued no call is neither a repeat nor a break: it made no
|
|
473
|
+
* observation, so the counter is carried across it rather than advanced or
|
|
474
|
+
* cleared — a run that thinks for a frame between two identical commands has
|
|
475
|
+
* not stopped repeating itself, and a run planning its next move has not
|
|
476
|
+
* started.
|
|
477
|
+
*/
|
|
478
|
+
readonly repeatFrames: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
479
|
+
/**
|
|
480
|
+
* Signatures of the calls this run has issued, oldest first.
|
|
481
|
+
*
|
|
482
|
+
* State rather than a per-frame detail because repetition is a property of
|
|
483
|
+
* the run: the frame that re-runs a check is usually nowhere near the frame
|
|
484
|
+
* that first ran it. It carries digests and no inputs; see
|
|
485
|
+
* {@link signatureOf}.
|
|
486
|
+
*/
|
|
487
|
+
readonly callSignatures: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.String>>, never>;
|
|
488
|
+
/**
|
|
489
|
+
* Completions this run may have bounced for narrowed evidence. Zero disarms
|
|
490
|
+
* the demand.
|
|
491
|
+
*
|
|
492
|
+
* Armed separately from every other cap because it watches a different
|
|
493
|
+
* moment. The read-only cap and the repeat demand watch a run that is still
|
|
494
|
+
* working and has stopped making progress; this watches the one frame a run
|
|
495
|
+
* gets wrong for free — the last one, where a narrowed check is presented as
|
|
496
|
+
* evidence for a change it never covered. See {@link defaultNarrowingDemands}.
|
|
497
|
+
*/
|
|
498
|
+
readonly narrowingCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
499
|
+
/**
|
|
500
|
+
* Completions this run has already had bounced for narrowed evidence.
|
|
501
|
+
*
|
|
502
|
+
* Counted rather than flagged so the cap reads like the others, and carried
|
|
503
|
+
* in state so a bounce survives the frame that answers it: the run stays
|
|
504
|
+
* responsible for the answer, and the loop stops asking once it has asked.
|
|
505
|
+
*/
|
|
506
|
+
readonly narrowingDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
507
|
+
/**
|
|
508
|
+
* Completions this run may have bounced for an unmoved tree. The demand is
|
|
509
|
+
* issued only for a completion the claim brake reads as unsupported, so a
|
|
510
|
+
* `claimCap` of zero disarms it too. Zero disarms the demand. See
|
|
511
|
+
* {@link defaultUnmovedDemands} and `UnmovedTree`.
|
|
512
|
+
*/
|
|
513
|
+
readonly unmovedCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
514
|
+
/** Completions this run has already had bounced for an unmoved tree. */
|
|
515
|
+
readonly unmovedDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
516
|
+
/**
|
|
517
|
+
* Completions this run may have bounced for a failing check it replaced
|
|
518
|
+
* rather than answered. Zero disarms the demand. See
|
|
519
|
+
* {@link defaultUnresolvedDemands} and `UnresolvedFailure`.
|
|
520
|
+
*/
|
|
521
|
+
readonly unresolvedCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
522
|
+
/** Completions this run has already had bounced for such a check. */
|
|
523
|
+
readonly unresolvedDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
524
|
+
/**
|
|
525
|
+
* Completions this run has already had bounced for a call their own cell
|
|
526
|
+
* failed before they were written. Capped at `FailedCall.cap`.
|
|
527
|
+
*/
|
|
528
|
+
readonly failedCallDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
529
|
+
/**
|
|
530
|
+
* Completions this run has already had bounced for calls their own cell
|
|
531
|
+
* made and never read before completing. Capped at `UnobservedCall.cap`.
|
|
532
|
+
*/
|
|
533
|
+
readonly unobservedDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
534
|
+
/**
|
|
535
|
+
* Completions this run has already had handed back for an output that did
|
|
536
|
+
* not fit the host's declared shape. Capped by `Input.output`.
|
|
537
|
+
*/
|
|
538
|
+
readonly outputDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
539
|
+
/**
|
|
540
|
+
* Frames this run may be given to prove a claim its own record does not
|
|
541
|
+
* support. Past it an unproven claim fails the run rather than standing.
|
|
542
|
+
* Zero disarms the brake. See {@link defaultClaimDemands} and
|
|
543
|
+
* `CompletionClaim`.
|
|
544
|
+
*/
|
|
545
|
+
readonly claimCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
546
|
+
/** Completions this run has already had bounced for such a claim. */
|
|
547
|
+
readonly claimDemands: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
548
|
+
/**
|
|
549
|
+
* Trees this run may pin with `ctx.checkpoint()`. Zero disarms minting.
|
|
550
|
+
*
|
|
551
|
+
* See {@link defaultMaxCheckpoints}. `ctx.base` is not minted and is
|
|
552
|
+
* unaffected by this.
|
|
553
|
+
*/
|
|
554
|
+
readonly checkpointCap: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
555
|
+
/**
|
|
556
|
+
* Ids of the trees this run has already pinned, oldest first.
|
|
557
|
+
*
|
|
558
|
+
* Run state rather than a per-frame count because a checkpoint outlives the
|
|
559
|
+
* frame that minted it: the whole use is a frame taking a reading against a
|
|
560
|
+
* tree some earlier frame pinned, so the bound has to be the run's. The ids
|
|
561
|
+
* rather than a tally, because the one thing worth saying to a run that has
|
|
562
|
+
* reached the bound is which handles it is already holding.
|
|
563
|
+
*/
|
|
564
|
+
readonly checkpointIds: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.String>>, never>;
|
|
565
|
+
/**
|
|
566
|
+
* Provider-run tools every frame's model call may use (see
|
|
567
|
+
* `ModelRequest.serverTools`). Absent means none.
|
|
568
|
+
*/
|
|
569
|
+
readonly serverTools: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
570
|
+
readonly type: Schema.Literal<"web_search">;
|
|
571
|
+
readonly allowedDomains: Schema.optionalKey<Schema.$Array<Schema.NonEmptyString>>;
|
|
572
|
+
}>>>;
|
|
573
|
+
/**
|
|
574
|
+
* Content address of the workspace this run opened on.
|
|
575
|
+
*
|
|
576
|
+
* Recorded once, from the first frame whose opening measurement covered the
|
|
577
|
+
* tree, and never restamped: the whole question `UnmovedTree` asks is whether
|
|
578
|
+
* the tree a completion describes is the tree the run was handed, and an
|
|
579
|
+
* origin that moved with the run could not answer it. Empty means no frame
|
|
580
|
+
* has produced a complete opening measurement, which makes the demand inert
|
|
581
|
+
* rather than wrong.
|
|
582
|
+
*/
|
|
583
|
+
readonly openingDigest: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.String>, never>;
|
|
584
|
+
/**
|
|
585
|
+
* Checks this run has run, oldest first, each stamped with the tree it ran
|
|
586
|
+
* over.
|
|
587
|
+
*
|
|
588
|
+
* State rather than a per-frame detail for the same reason
|
|
589
|
+
* {@link State.callSignatures} is: the frame that narrows a check is nowhere
|
|
590
|
+
* near the frame that first ran it. It carries the terms of each input rather
|
|
591
|
+
* than the input, and only for calls that declared no write — a call that
|
|
592
|
+
* changes the workspace is not an observation of it. See `NarrowedCheck`.
|
|
593
|
+
*/
|
|
594
|
+
readonly checks: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof NarrowedCheck.Check>>, never>;
|
|
595
|
+
/**
|
|
596
|
+
* Every call this run has settled, bounded and rendered every frame.
|
|
597
|
+
*
|
|
598
|
+
* State rather than a per-frame detail because the frame that needs to see a
|
|
599
|
+
* result is rarely the frame that fetched it, and a cell is authored before
|
|
600
|
+
* any of its results exist. See `CallLedger`.
|
|
601
|
+
*/
|
|
602
|
+
readonly callLedger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof CallLedger.Entry>>, never>;
|
|
603
|
+
/**
|
|
604
|
+
* Every command this run ran that reported an exit status, as the claim
|
|
605
|
+
* brake lists it. See `CompletionClaim.record`.
|
|
606
|
+
*/
|
|
607
|
+
readonly reported: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.Struct<{
|
|
608
|
+
readonly command: Schema.String;
|
|
609
|
+
readonly outcome: Schema.Literals<readonly ["passed", "failed"]>;
|
|
610
|
+
readonly result: Schema.optional<Schema.String>;
|
|
611
|
+
readonly before: Schema.optional<Schema.Literals<readonly ["passed", "failed"]>>;
|
|
612
|
+
}>>>, never>;
|
|
613
|
+
/**
|
|
614
|
+
* Checks this run has watched fail, each stamped with the epoch it failed in.
|
|
615
|
+
*
|
|
616
|
+
* Separate from {@link State.checks} because that ledger holds one entry per
|
|
617
|
+
* signature carrying its *latest* run: the moment a failing check is re-run
|
|
618
|
+
* and passes, the failure it reported is gone from it, and the failure is
|
|
619
|
+
* exactly half of what `Sufficiency` needs. See `Sufficiency`.
|
|
620
|
+
*/
|
|
621
|
+
readonly failures: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof Sufficiency.Failure>>, never>;
|
|
622
|
+
/**
|
|
623
|
+
* Frames of this run that changed the workspace.
|
|
624
|
+
*
|
|
625
|
+
* The clock `Sufficiency` orders its two halves by. A count rather than a
|
|
626
|
+
* digest, because the fact being established is that something changed
|
|
627
|
+
* between two readings, and a count says that on a host that measures nothing
|
|
628
|
+
* and knows only what its calls declared.
|
|
629
|
+
*/
|
|
630
|
+
readonly mutations: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
631
|
+
/**
|
|
632
|
+
* Settled writes this run recorded on trees the workspace walk never sees.
|
|
633
|
+
*
|
|
634
|
+
* A `bash` call routed into a container fingerprints that container's
|
|
635
|
+
* working directory either side of the command and reports a move under
|
|
636
|
+
* the reserved `mutated` key (`@smthrs/std/TreeFingerprint`). Counted apart
|
|
637
|
+
* from {@link State.mutations} because the unmoved-tree demand and the
|
|
638
|
+
* claim judge compare the host's two digests, and a container edit leaves
|
|
639
|
+
* those equal: without this count a run that did its whole task in a
|
|
640
|
+
* container was bounced as unmoved and then refused as "work this run never
|
|
641
|
+
* recorded". Measured on Terminal-Bench 4.0, 2026-09-22.
|
|
642
|
+
*/
|
|
643
|
+
readonly remoteMutations: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
644
|
+
/**
|
|
645
|
+
* Whether the sufficiency observation has already been written this run.
|
|
646
|
+
*
|
|
647
|
+
* Once, and only once: it is a statement about the record, the record only
|
|
648
|
+
* grows, and repeating it every frame would turn the one control that is not
|
|
649
|
+
* a demand into nagging. A run that is shown it and keeps working is a run
|
|
650
|
+
* that has decided the evidence is not enough, which is its decision to make.
|
|
651
|
+
*/
|
|
652
|
+
readonly sufficiencyStated: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
|
|
653
|
+
/**
|
|
654
|
+
* How many times one frame may answer its own unparseable cell before the
|
|
655
|
+
* frame ends. Zero disarms the answer, which restores the old behaviour: a
|
|
656
|
+
* cell that does not parse settles the frame.
|
|
657
|
+
*
|
|
658
|
+
* One, because that is what the evidence asks for. A cell that does not parse
|
|
659
|
+
* is answered by a re-prompt whose whole prefix — teaching, catalog,
|
|
660
|
+
* transcript — is byte-identical to the one just sent, so the retry is paid
|
|
661
|
+
* for at cached-input price plus the output it writes. Two consecutive
|
|
662
|
+
* unparseable answers is a model that has lost the shape rather than
|
|
663
|
+
* mistyped, and that is worth a fresh frame with the failure on the record.
|
|
664
|
+
*/
|
|
665
|
+
readonly revalidations: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Int>, never>;
|
|
666
|
+
/**
|
|
667
|
+
* The output of the completion a completion demand handed back, if any.
|
|
668
|
+
*
|
|
669
|
+
* The demand takes a finished answer away and asks for one more frame. It is
|
|
670
|
+
* allowed to do that only because the run gets to answer again — so the one
|
|
671
|
+
* outcome it must never produce is a run that ends holding nothing. Between
|
|
672
|
+
* the bounce and the next completion the run can spend its last frame on a
|
|
673
|
+
* cell that raises, on a refused park, or on more work, and every one of
|
|
674
|
+
* those ends the run on {@link budgetMessage} rather than on a completion.
|
|
675
|
+
* Keeping the bounced output here is what makes the demand recoverable: the
|
|
676
|
+
* budget still ends the run, and the run's own words are still what it ends
|
|
677
|
+
* with. See `NarrowedCheck` for why the demand is issued at all.
|
|
678
|
+
*
|
|
679
|
+
* The measured demands and the unread-call demand keep it; the failed-call
|
|
680
|
+
* demand does not, and neither does a claim demand. The claim brake read the sentence
|
|
681
|
+
* itself and found the record against it, so restoring that sentence on the
|
|
682
|
+
* budget notice hands back the exact answer the brake refused: one live run
|
|
683
|
+
* finished `stop` with a bounced "the tests pass" over a repository whose
|
|
684
|
+
* test exits 1, by this route and no other. A claim demand therefore clears
|
|
685
|
+
* this. See `Frame.CompletionDemand.keeps`.
|
|
686
|
+
*/
|
|
687
|
+
readonly bouncedCompletion: Schema.optional<Schema.String>;
|
|
688
|
+
/**
|
|
689
|
+
* The frame a completion demand was handed to, if one is outstanding.
|
|
690
|
+
*
|
|
691
|
+
* The five measured demands end with the same promise: what you return next
|
|
692
|
+
* is the answer that stands. Three of them can fire on one `complete`
|
|
693
|
+
* transition and each carries its own cap, so without this the frame written
|
|
694
|
+
* to answer one demand is judged by the next — and a run that changed nothing and displaced a
|
|
695
|
+
* failing check is told "no" twice about one decision, spending two frames
|
|
696
|
+
* and two model calls on the argument. Recorded as the frame number rather
|
|
697
|
+
* than as a flag because it is then self-clearing: it names one frame, and
|
|
698
|
+
* every frame after that one is a frame the run chose to spend.
|
|
699
|
+
*
|
|
700
|
+
* It governs whether a demand may be *issued*, not whether the claim brake
|
|
701
|
+
* may read. A frame that answers a measured demand and completes is read by
|
|
702
|
+
* the claim brake like any other completion, because an unread completion is
|
|
703
|
+
* the silence this package refuses; what it cannot be handed is a second
|
|
704
|
+
* demand. See `Frame.judgeCompletion`.
|
|
705
|
+
*/
|
|
706
|
+
readonly demandedFrame: Schema.optional<Schema.Int>;
|
|
707
|
+
/**
|
|
708
|
+
* Whether a human can answer this run, which is what makes a park honorable.
|
|
709
|
+
*
|
|
710
|
+
* A park is durable waiting, and waiting only ends when somebody answers. A
|
|
711
|
+
* run with no approval channel has nobody to answer it, so a park there is
|
|
712
|
+
* not patience: it is the run abandoning a budget it still holds. False —
|
|
713
|
+
* the default — refuses the transition and answers it in the frame that
|
|
714
|
+
* returned it.
|
|
715
|
+
*/
|
|
716
|
+
readonly approvalChannel: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.Boolean>, never>;
|
|
717
|
+
/**
|
|
718
|
+
* The workspace as the last measured frame left it.
|
|
719
|
+
*
|
|
720
|
+
* Carried in state rather than re-measured because one measurement serves
|
|
721
|
+
* two frames: what a frame closes on is what the next frame opens on, and
|
|
722
|
+
* nothing between them touches the tree — the sealed model step in between
|
|
723
|
+
* only produces text. So a run pays one walk per frame, not two, and a
|
|
724
|
+
* resumed run replays the recorded measurement instead of walking a tree
|
|
725
|
+
* that has moved on.
|
|
726
|
+
*
|
|
727
|
+
* Absent means no frame has measured yet; `None` means a frame measured and
|
|
728
|
+
* the host reported it has nothing to measure. The two are kept apart so an
|
|
729
|
+
* unobservable host is asked once and then left alone, instead of paying an
|
|
730
|
+
* opening boundary every frame for an answer that will not change.
|
|
731
|
+
*/
|
|
732
|
+
readonly workspace: Schema.optional<Schema.Option<typeof EngineLike.Observation>>;
|
|
733
|
+
/**
|
|
734
|
+
* Catalog flows and skills the run-start relevance reading withheld, and
|
|
735
|
+
* that no call has restored since.
|
|
736
|
+
*
|
|
737
|
+
* State rather than a per-frame detail because the reading is taken once,
|
|
738
|
+
* at frame 0, and every later frame's `ctx.flows` is filtered by it. A call
|
|
739
|
+
* to one of these names is refused as `flow_withheld` and restores it from
|
|
740
|
+
* the next frame. See {@link Input.judged}.
|
|
741
|
+
*/
|
|
742
|
+
readonly withheldFlows: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.String>>, never>;
|
|
743
|
+
/**
|
|
744
|
+
* Keys of the memory rows the supervisor has shown this run, oldest first,
|
|
745
|
+
* the newest 256 kept.
|
|
746
|
+
*
|
|
747
|
+
* State rather than a supervisor detail because it is folded in from each
|
|
748
|
+
* recorded drain, so a replay rebuilds it, and a row shown once is never
|
|
749
|
+
* asked about or delivered again. See `Supervisor`.
|
|
750
|
+
*/
|
|
751
|
+
readonly memoryShown: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.String>>, never>;
|
|
752
|
+
/**
|
|
753
|
+
* Each supervisor monitor's streak, deliveries and last delivery, by id.
|
|
754
|
+
*
|
|
755
|
+
* State because it is folded in only from each recorded drain, the one
|
|
756
|
+
* place a reading is gated, so a replay rebuilds it and a resumed run
|
|
757
|
+
* keeps its cooldowns and limits. See `Monitor.gate`.
|
|
758
|
+
*/
|
|
759
|
+
readonly monitorLedger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Record<Schema.String, Schema.Struct<{
|
|
760
|
+
readonly streak: Schema.Int;
|
|
761
|
+
readonly delivered: Schema.Int;
|
|
762
|
+
readonly lastFrame: Schema.Int;
|
|
763
|
+
}>>>, never>;
|
|
764
|
+
/**
|
|
765
|
+
* What the run knows of its newest transcript segments, one entry each, in
|
|
766
|
+
* window order: the frame that wrote it, whether it carries the person's
|
|
767
|
+
* messages, whether that frame changed files, the checks it ran, and Jev's
|
|
768
|
+
* answer about it once a supervisor reading has marked it.
|
|
769
|
+
*
|
|
770
|
+
* State because a compaction's pins and marks read it long after the frame
|
|
771
|
+
* that wrote a segment; each compaction keeps the entries of the segments
|
|
772
|
+
* it keeps. Answers are folded in only from each recorded drain, so a
|
|
773
|
+
* replay rebuilds them. It is aligned when it describes every transcript
|
|
774
|
+
* segment; a run whose state predates it is not, and compacts every
|
|
775
|
+
* segment into the summary, as runs did before compaction marks.
|
|
776
|
+
*/
|
|
777
|
+
readonly segmentFacts: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.Struct<{
|
|
778
|
+
readonly frame: Schema.Int;
|
|
779
|
+
readonly person: Schema.Boolean;
|
|
780
|
+
readonly mutated: Schema.Boolean;
|
|
781
|
+
readonly checks: Schema.$Array<Schema.String>;
|
|
782
|
+
readonly answer: Schema.optionalKey<Schema.Struct<{
|
|
783
|
+
readonly remove: Schema.Number;
|
|
784
|
+
readonly keep: Schema.Number;
|
|
785
|
+
}>>;
|
|
786
|
+
}>>>, never>;
|
|
787
|
+
/**
|
|
788
|
+
* The context triggers a drained supervisor reading fired, which compact the
|
|
789
|
+
* next frame's context whatever the budget says; empty once it has opened.
|
|
790
|
+
*
|
|
791
|
+
* State because it is folded in only from each recorded drain, so a replay
|
|
792
|
+
* compacts the same frame for the same cause.
|
|
793
|
+
*/
|
|
794
|
+
readonly compactionDue: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<Schema.Literals<readonly ["budget", "outdated_context", "irrelevant_context"]>>>, never>;
|
|
795
|
+
/**
|
|
796
|
+
* Output this run has been handed as a fragment, by digest.
|
|
797
|
+
*
|
|
798
|
+
* The ledger is state rather than a per-frame detail because a cell may store
|
|
799
|
+
* a truncated capture and write it a frame later. It carries no bytes; see
|
|
800
|
+
* `TruncatedOutput`.
|
|
801
|
+
*/
|
|
802
|
+
readonly truncatedOutputs: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof TruncatedOutput.Capture>>, never>;
|
|
803
|
+
}>, {}>;
|
|
804
|
+
/**
|
|
805
|
+
* The serializable state carried across cell frames.
|
|
806
|
+
*
|
|
807
|
+
* The run's own memory is the realm, which is not in here and cannot be: it is
|
|
808
|
+
* a live JavaScript context, rebuilt on a resume by re-executing the cells that
|
|
809
|
+
* built it. What this carries is the controller's view of it — the panel of
|
|
810
|
+
* names, the call ledger, the budgets and the counters the discipline reads.
|
|
811
|
+
*
|
|
812
|
+
* @category models
|
|
813
|
+
* @since 0.1.0
|
|
814
|
+
* @slop
|
|
815
|
+
*/
|
|
816
|
+
export declare class State extends State_base {
|
|
817
|
+
}
|
|
818
|
+
/**
|
|
819
|
+
* Runtime declarations used to interpret serializable controller state.
|
|
820
|
+
*
|
|
821
|
+
* @category models
|
|
822
|
+
* @since 0.1.0
|
|
823
|
+
* @slop
|
|
824
|
+
*/
|
|
825
|
+
export interface Input {
|
|
826
|
+
readonly state: State;
|
|
827
|
+
/** Resolves the host's seat vocabulary; kept outside serializable state. */
|
|
828
|
+
readonly contextWindowTokensFor?: ((seat: string) => Effect.Effect<number, HarnessError>) | undefined;
|
|
829
|
+
/** The flows this frame may call, already narrowed by seat visibility. */
|
|
830
|
+
readonly flows: ReadonlyArray<Descriptor.FlowDescriptor>;
|
|
831
|
+
/** Re-read and journal the callable catalog before each frame, including the first. */
|
|
832
|
+
readonly refreshFlows?: Effect.Effect<ReadonlyArray<Descriptor.FlowDescriptor>, HarnessError> | undefined;
|
|
833
|
+
readonly limits?: Sandbox.Limits | undefined;
|
|
834
|
+
/**
|
|
835
|
+
* The monitors each supervisor reading scores and each boundary gates;
|
|
836
|
+
* omitted takes `Monitor.defaults()`. Runtime configuration rather than
|
|
837
|
+
* durable state: a resumed run is armed by the host that resumes it.
|
|
838
|
+
* Nothing a monitor says reaches the run unless {@link judged}.
|
|
839
|
+
*/
|
|
840
|
+
readonly monitors?: ReadonlyArray<Monitor.Monitor> | undefined;
|
|
841
|
+
/**
|
|
842
|
+
* Whether the host's `Evaluator` is a real judge. True arms Jev's features,
|
|
843
|
+
* the supervisor's monitor messages and memory inserts among them; omitted is false.
|
|
844
|
+
* Runtime configuration like {@link monitors}.
|
|
845
|
+
*/
|
|
846
|
+
readonly judged?: boolean | undefined;
|
|
847
|
+
/**
|
|
848
|
+
* The static stance the run is taught and journals on `discipline-armed`;
|
|
849
|
+
* omitted teaches none. The window must already have been taught with it,
|
|
850
|
+
* so the loop's re-teach replaces the same segments.
|
|
851
|
+
*/
|
|
852
|
+
readonly stance?: typeof AgentEvent.Stance.Type | undefined;
|
|
853
|
+
/**
|
|
854
|
+
* Human-provided instruction files, such as `AGENTS.md`, as the window's
|
|
855
|
+
* {@link instructionsSegment} renders them. When {@link judged}, frame 0
|
|
856
|
+
* asks Jev which of their chunks the task does not need and drops those it
|
|
857
|
+
* is confident of from that segment.
|
|
858
|
+
*/
|
|
859
|
+
readonly instructions?: ReadonlyArray<Relevance.Document> | undefined;
|
|
860
|
+
/**
|
|
861
|
+
* Flow names the run-start relevance reading never judges: the ones a run
|
|
862
|
+
* cannot do without, such as `jev` and the core file and shell flows.
|
|
863
|
+
*/
|
|
864
|
+
readonly pinned?: ReadonlyArray<string> | undefined;
|
|
865
|
+
/**
|
|
866
|
+
* The opening memory rows the window's {@link memorySegment} renders. When
|
|
867
|
+
* {@link judged}, frame 0 asks Jev about each row in the same reading as
|
|
868
|
+
* the catalog and the instructions, and renders only the rows it keeps.
|
|
869
|
+
*/
|
|
870
|
+
readonly memory?: Memory | undefined;
|
|
871
|
+
/**
|
|
872
|
+
* The shape the host requires of the run's final output; omitted accepts
|
|
873
|
+
* any. See {@link OutputCheck}.
|
|
874
|
+
*/
|
|
875
|
+
readonly output?: OutputCheck | undefined;
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* A host's check of a completion's output.
|
|
879
|
+
*
|
|
880
|
+
* `check` answers the output with the correction to hand back, or `undefined`
|
|
881
|
+
* when it fits. A refused completion goes back to the same session, which
|
|
882
|
+
* keeps its realm and everything its earlier frames printed, so fixing the
|
|
883
|
+
* shape never repeats the work that produced the answer. At most `cap`
|
|
884
|
+
* completions are handed back, and only while a frame is left to answer in;
|
|
885
|
+
* past either, the completion stands and the host decides what follows.
|
|
886
|
+
*
|
|
887
|
+
* The verdict is a recorded boundary, so a replay is served the decision the
|
|
888
|
+
* original attempt made.
|
|
889
|
+
*
|
|
890
|
+
* @category models
|
|
891
|
+
* @since 1.0.0-rc.1
|
|
892
|
+
*/
|
|
893
|
+
export interface OutputCheck {
|
|
894
|
+
/** `corrected` is how many completions this run has already had handed back for it. */
|
|
895
|
+
readonly check: (output: string, corrected: number, value?: Schema.Json | undefined) => Effect.Effect<string | undefined>;
|
|
896
|
+
readonly cap: number;
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* One opening memory row: `key` is its relevance id.
|
|
900
|
+
*
|
|
901
|
+
* @category models
|
|
902
|
+
* @since 1.0.0-rc.0
|
|
903
|
+
*/
|
|
904
|
+
export interface MemoryRow {
|
|
905
|
+
readonly key: string;
|
|
906
|
+
readonly text: string;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Opening memory as the host declared it: its rows, the digest the opening
|
|
910
|
+
* window's {@link memorySegment} declares, and how the host renders rows.
|
|
911
|
+
* `render` is only ever handed rows of `rows`, in order.
|
|
912
|
+
*
|
|
913
|
+
* @category models
|
|
914
|
+
* @since 1.0.0-rc.0
|
|
915
|
+
*/
|
|
916
|
+
export interface Memory {
|
|
917
|
+
readonly rows: ReadonlyArray<MemoryRow>;
|
|
918
|
+
readonly digest: string;
|
|
919
|
+
readonly render: (rows: ReadonlyArray<MemoryRow>) => string;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* The prefix segment that carries opening memory: rendered `text` under its
|
|
923
|
+
* declared `digest`.
|
|
924
|
+
*
|
|
925
|
+
* A `system` segment, like {@link instructionsSegment}: what the run
|
|
926
|
+
* remembers is not the task, and the run-start reading judges each row
|
|
927
|
+
* against a task that must not already contain it. The opening window and
|
|
928
|
+
* the run-start reading build it the same way, so the reading finds the
|
|
929
|
+
* opening's segment by digest.
|
|
930
|
+
*
|
|
931
|
+
* @category constructors
|
|
932
|
+
* @since 1.0.0-rc.0
|
|
933
|
+
*/
|
|
934
|
+
export declare const memorySegment: (text: string, digest: string) => ContextWindow.SegmentInput;
|
|
935
|
+
/**
|
|
936
|
+
* The prefix segment that carries human-provided instruction files, every
|
|
937
|
+
* chunk not in `withheld` kept.
|
|
938
|
+
*
|
|
939
|
+
* A `system` segment, never `instructions`: the task is what the run's prefix
|
|
940
|
+
* `instructions` segments say, and a project's guidelines are not the task.
|
|
941
|
+
* The opening window and the run-start reading build it the same way, so the
|
|
942
|
+
* reading finds the opening's segment by digest.
|
|
943
|
+
*
|
|
944
|
+
* @category constructors
|
|
945
|
+
* @since 1.0.0-rc.0
|
|
946
|
+
*/
|
|
947
|
+
export declare const instructionsSegment: (documents: ReadonlyArray<Relevance.Document>, withheld: ReadonlySet<string>) => ContextWindow.SegmentInput;
|
|
948
|
+
/**
|
|
949
|
+
* Constructs an initial controller state.
|
|
950
|
+
*
|
|
951
|
+
* @category constructors
|
|
952
|
+
* @since 0.1.0
|
|
953
|
+
* @slop
|
|
954
|
+
*/
|
|
955
|
+
export declare const make: (options: {
|
|
956
|
+
readonly session: string;
|
|
957
|
+
readonly seat: string;
|
|
958
|
+
readonly modelParams: ModelRequest.GenerationParams;
|
|
959
|
+
readonly layers: ReadonlyArray<string>;
|
|
960
|
+
readonly capabilityEnvelope: ReadonlyArray<Capability.CapabilityPattern>;
|
|
961
|
+
readonly placement: Option.Option<Descriptor.Placement>;
|
|
962
|
+
readonly contextWindow: ContextWindow.ContextWindow;
|
|
963
|
+
readonly contextWindowTokens?: number | undefined;
|
|
964
|
+
readonly frame?: number | undefined;
|
|
965
|
+
readonly maxFrames?: number | undefined;
|
|
966
|
+
/**
|
|
967
|
+
* Caps consecutive read-only frames: at the cap the controller demands an
|
|
968
|
+
* edit or a typed justification, and at twice the cap the run stops as a
|
|
969
|
+
* typed failure. Omitted or zero disarms it, which is what a run that is
|
|
970
|
+
* only meant to read — a question, a review — should get.
|
|
971
|
+
*/
|
|
972
|
+
readonly readOnlyCap?: number | undefined;
|
|
973
|
+
/**
|
|
974
|
+
* Caps the wall-clock one model call may spend, in milliseconds. Omitted
|
|
975
|
+
* takes {@link defaultModelCallMs}; zero disarms the budget.
|
|
976
|
+
*/
|
|
977
|
+
readonly modelCallMs?: number | undefined;
|
|
978
|
+
/**
|
|
979
|
+
* Caps consecutive repeat-observation frames: at the cap the controller
|
|
980
|
+
* names the repetition and redirects the run at evidence it does not hold.
|
|
981
|
+
* Omitted takes {@link defaultRepeatFrames}; zero disarms it.
|
|
982
|
+
*/
|
|
983
|
+
readonly repeatCap?: number | undefined;
|
|
984
|
+
/**
|
|
985
|
+
* Caps how many completions may be bounced for narrowed evidence: at the
|
|
986
|
+
* first such completion the controller names the broader check the run has
|
|
987
|
+
* not re-run since its latest change and asks for another frame. Omitted
|
|
988
|
+
* takes {@link defaultNarrowingDemands}; zero disarms it.
|
|
989
|
+
*/
|
|
990
|
+
readonly narrowingCap?: number | undefined;
|
|
991
|
+
/**
|
|
992
|
+
* Caps how many completions may be bounced for an unmoved tree: at the first
|
|
993
|
+
* completion whose closing digest is the digest the run opened on, the
|
|
994
|
+
* controller names both and asks for another frame. Omitted takes
|
|
995
|
+
* {@link defaultUnmovedDemands}; zero disarms it.
|
|
996
|
+
*/
|
|
997
|
+
readonly unmovedCap?: number | undefined;
|
|
998
|
+
/**
|
|
999
|
+
* Caps how many completions may be bounced for a failing check the run
|
|
1000
|
+
* replaced rather than answered. Omitted takes
|
|
1001
|
+
* {@link defaultUnresolvedDemands}; zero disarms it.
|
|
1002
|
+
*/
|
|
1003
|
+
readonly unresolvedCap?: number | undefined;
|
|
1004
|
+
/**
|
|
1005
|
+
* Caps how many frames the run is given to prove a claim its own record does
|
|
1006
|
+
* not support; past it such a claim fails the run rather than standing.
|
|
1007
|
+
* Omitted takes {@link defaultClaimDemands}; zero disarms
|
|
1008
|
+
* it. The control is also a no-op wherever no `Evaluator` service is in
|
|
1009
|
+
* context, so a host that binds none need not disarm anything.
|
|
1010
|
+
*/
|
|
1011
|
+
readonly claimCap?: number | undefined;
|
|
1012
|
+
/**
|
|
1013
|
+
* Whether a human can answer this run. Omitted or false refuses a `park`
|
|
1014
|
+
* transition and answers it in-frame; only a host that has wired somewhere
|
|
1015
|
+
* for an answer to come from may claim true.
|
|
1016
|
+
*/
|
|
1017
|
+
readonly approvalChannel?: boolean | undefined;
|
|
1018
|
+
/**
|
|
1019
|
+
* Caps how many times one frame may answer its own unparseable cell before
|
|
1020
|
+
* the frame ends. Omitted takes {@link defaultRevalidations}; zero disarms it.
|
|
1021
|
+
*/
|
|
1022
|
+
readonly revalidations?: number | undefined;
|
|
1023
|
+
/**
|
|
1024
|
+
* Caps how many trees this run may pin with `ctx.checkpoint()`. Omitted takes
|
|
1025
|
+
* {@link defaultMaxCheckpoints}; zero disarms minting and leaves `ctx.base`,
|
|
1026
|
+
* which nobody mints, working.
|
|
1027
|
+
*/
|
|
1028
|
+
readonly checkpointCap?: number | undefined;
|
|
1029
|
+
/**
|
|
1030
|
+
* Provider-run tools every frame's model call may use, such as the
|
|
1031
|
+
* provider's own web search. Omitted or empty declares none.
|
|
1032
|
+
*/
|
|
1033
|
+
readonly serverTools?: ReadonlyArray<ModelRequest.ServerTool> | undefined;
|
|
1034
|
+
}) => State;
|
|
1035
|
+
/**
|
|
1036
|
+
* Host-measured container facts accepted by {@link teach}.
|
|
1037
|
+
*
|
|
1038
|
+
* @category models
|
|
1039
|
+
* @since 0.1.0
|
|
1040
|
+
*/
|
|
1041
|
+
export type Environment = cellPrompt.Environment;
|
|
1042
|
+
/**
|
|
1043
|
+
* Prepends the cell contract and the callable-flow catalog to a context window.
|
|
1044
|
+
*
|
|
1045
|
+
* The model is taught one thing — how to write a cell — and shown exactly the
|
|
1046
|
+
* flows this frame may call. Both land in prefix segments, which every
|
|
1047
|
+
* transition preserves, so the teaching is stable for the run and a cell's
|
|
1048
|
+
* projected context never has to carry it.
|
|
1049
|
+
*
|
|
1050
|
+
* `stance`, when set, adds the run's one-line static stance after the
|
|
1051
|
+
* contract; see {@link Input.stance}.
|
|
1052
|
+
*
|
|
1053
|
+
* @category constructors
|
|
1054
|
+
* @since 0.1.0
|
|
1055
|
+
* @slop
|
|
1056
|
+
*/
|
|
1057
|
+
export declare const teach: (contextWindow: ContextWindow.ContextWindow, flows: ReadonlyArray<Descriptor.FlowDescriptor>, environment?: Environment, stance?: typeof AgentEvent.Stance.Type) => ContextWindow.ContextWindow;
|
|
1058
|
+
/**
|
|
1059
|
+
* Runs the cell loop until it completes, parks, or exhausts its budget.
|
|
1060
|
+
*
|
|
1061
|
+
* Cancellation is fiber interruption: interrupting this stream tears down the
|
|
1062
|
+
* sandbox through scope closure and reports one abort, without threading an
|
|
1063
|
+
* abort signal anywhere.
|
|
1064
|
+
*
|
|
1065
|
+
* @category streams
|
|
1066
|
+
* @since 0.1.0
|
|
1067
|
+
* @slop
|
|
1068
|
+
*/
|
|
1069
|
+
export declare const run: (input: Input) => Stream.Stream<AgentEvent.AgentEvent, HarnessError, EngineLike.EngineLike | Sandbox.Sandbox | Steering.Source | Evaluator.Evaluator>;
|
|
1070
|
+
export {};
|
|
1071
|
+
//# sourceMappingURL=CellTurn.d.ts.map
|