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