@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,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The failing check a completion stepped around.
|
|
3
|
+
*
|
|
4
|
+
* `NarrowedCheck` names a completion whose last check is a *narrower* version
|
|
5
|
+
* of one the run already ran, taken after the workspace moved. This module
|
|
6
|
+
* names the case one step further along: the run's reading of some subject
|
|
7
|
+
* reported a failure, over the very tree the run is now completing on, and the
|
|
8
|
+
* run neither re-ran it nor left it alone — it took a *different* reading of the
|
|
9
|
+
* same subject and completed on that one instead.
|
|
10
|
+
*
|
|
11
|
+
* It is not hypothetical. On a graded benchmark, one run edited a source file at
|
|
12
|
+
* frame 11, ran `pytest -rA testing/python/collect.py` at frame 12 — the whole
|
|
13
|
+
* file, unfiltered, over the tree it would go on to finish with — and was told
|
|
14
|
+
* "2 failed, 72 passed". At frame 13 it ran a command naming four cases out of
|
|
15
|
+
* that same file, was told "4 passed", and at frame 14 it completed. The broad
|
|
16
|
+
* result was never re-run, never retracted, and never mentioned. Its graded
|
|
17
|
+
* patch passed both target tests and 144 of 145 neighbours.
|
|
18
|
+
*
|
|
19
|
+
* ## Why a failing check alone is not the trigger
|
|
20
|
+
*
|
|
21
|
+
* "Some check failed and the run finished anyway" is not a defect, and reading
|
|
22
|
+
* it as one would be the harness deciding whose failures matter. The same wave
|
|
23
|
+
* contains the counter-example: an instance that **resolved** ran
|
|
24
|
+
* `pytest -rA astropy/io/fits/tests/test_header.py` after its edit, was told "2
|
|
25
|
+
* failed, 148 passed", and completed — correctly, because those two failures
|
|
26
|
+
* were nothing to do with its change. Nothing in the record distinguishes those
|
|
27
|
+
* two failure counts, and nothing may: counting failures means parsing a
|
|
28
|
+
* runner's output, which makes this a rule about pytest instead of a rule about
|
|
29
|
+
* evidence.
|
|
30
|
+
*
|
|
31
|
+
* What separates the two runs is what happened *after* the failing check. The
|
|
32
|
+
* resolved run walked away from that subject entirely: no later call it made
|
|
33
|
+
* names `astropy/io/fits/tests/test_header.py` at all. The unresolved run went
|
|
34
|
+
* back to exactly the subject that had failed, asked a smaller question about
|
|
35
|
+
* it, and reported the smaller answer. That is the shape this module names, and
|
|
36
|
+
* it is one the run's own record establishes: the run itself demonstrated the
|
|
37
|
+
* subject was still live by returning to it.
|
|
38
|
+
*
|
|
39
|
+
* So the demand is not "you have a failing test". It is: *the reading you
|
|
40
|
+
* replaced reported a failure, and you replaced it rather than answering it.*
|
|
41
|
+
* The run may answer either way — fix what the check reported, or complete again
|
|
42
|
+
* saying why those failures are expected. The loop asks once and accepts what
|
|
43
|
+
* comes back, because a harness that decided which failures counted would be
|
|
44
|
+
* grading the agent's work with its own.
|
|
45
|
+
*
|
|
46
|
+
* @since 0.1.0
|
|
47
|
+
*/
|
|
48
|
+
import type { Schema } from "effect";
|
|
49
|
+
import type * as NarrowedCheck from "./NarrowedCheck.ts";
|
|
50
|
+
/**
|
|
51
|
+
* The reserved key a flow reports its subject's exit status under.
|
|
52
|
+
*
|
|
53
|
+
* The second of the two conventions the loop reads off an otherwise opaque call
|
|
54
|
+
* result, alongside `invalidProbe`. It is not a shared type — the controller
|
|
55
|
+
* must not depend on the tool library — so it is a documented wire key.
|
|
56
|
+
* `@smthrs/std` `Bash` and `ShellCommand` are the producing half and own what
|
|
57
|
+
* the number means; the controller only has to know that a result carrying a
|
|
58
|
+
* non-zero number under this key is a result whose subject reported failure.
|
|
59
|
+
*
|
|
60
|
+
* @category identifiers
|
|
61
|
+
* @since 0.1.0
|
|
62
|
+
*/
|
|
63
|
+
export declare const exitStatusKey = "exitCode";
|
|
64
|
+
/**
|
|
65
|
+
* Whether a settled call's result reports a failing exit status.
|
|
66
|
+
*
|
|
67
|
+
* A result that declares no exit status is not a failure and not a success: it
|
|
68
|
+
* is a call whose flow does not report one, and reading its absence either way
|
|
69
|
+
* would be an assumption. `false` is the answer that costs a demand rather than
|
|
70
|
+
* inventing one.
|
|
71
|
+
*
|
|
72
|
+
* @category predicates
|
|
73
|
+
* @since 0.1.0
|
|
74
|
+
*/
|
|
75
|
+
export declare const failed: (value: Schema.Json) => boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The exit status a settled call's result reports about its subject, or
|
|
78
|
+
* nothing where it reports none.
|
|
79
|
+
*
|
|
80
|
+
* The one reader of {@link exitStatusKey}, so the two predicates below and
|
|
81
|
+
* every caller that wants the number itself agree by construction rather than
|
|
82
|
+
* by three copies of the same shape test.
|
|
83
|
+
*
|
|
84
|
+
* @category getters
|
|
85
|
+
* @since 1.0.0-rc.0
|
|
86
|
+
*/
|
|
87
|
+
export declare const exitStatus: (value: Schema.Json) => number | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Whether a settled call's result reports a passing exit status.
|
|
90
|
+
*
|
|
91
|
+
* The mirror of {@link failed}, and not its negation. A result that declares no
|
|
92
|
+
* exit status is neither: `false` from both predicates is a call whose flow
|
|
93
|
+
* does not report one, which is what a read and a search are. `Sufficiency`
|
|
94
|
+
* builds a completion signal out of this answer, so silence has to read as
|
|
95
|
+
* silence — a file read that "did not fail" is not a check that passed.
|
|
96
|
+
*
|
|
97
|
+
* @category predicates
|
|
98
|
+
* @since 0.1.0
|
|
99
|
+
*/
|
|
100
|
+
export declare const passed: (value: Schema.Json) => boolean;
|
|
101
|
+
/**
|
|
102
|
+
* A failing check, paired with the reading the run took in its place.
|
|
103
|
+
*
|
|
104
|
+
* @category models
|
|
105
|
+
* @since 0.1.0
|
|
106
|
+
*/
|
|
107
|
+
export interface Displaced {
|
|
108
|
+
/** The check that reported a failure and was never re-run. */
|
|
109
|
+
readonly failed: NarrowedCheck.Check;
|
|
110
|
+
/** A later check over the same tree that revisits its subject. */
|
|
111
|
+
readonly instead: NarrowedCheck.Check;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Whether a later check asks about the same subject as an earlier one.
|
|
115
|
+
*
|
|
116
|
+
* The relation is: same flow, a different call, and every *target* the earlier
|
|
117
|
+
* check named is named again. Targets — the terms carrying a separator, as
|
|
118
|
+
* `NarrowedCheck` `targeting` reads them — are the paths, files, modules and
|
|
119
|
+
* node ids a call is about; everything else is a condition on them. So "same
|
|
120
|
+
* subject" means the later call went back to all of the places the earlier one
|
|
121
|
+
* looked, whether it asked a narrower question there, a broader one, or looked
|
|
122
|
+
* somewhere else as well.
|
|
123
|
+
*
|
|
124
|
+
* It is deliberately weaker than `NarrowedCheck` `narrows`, which additionally
|
|
125
|
+
* requires every *condition* to be carried and forbids adding a target. That
|
|
126
|
+
* relation misses a compound command — a `git diff` of two source files joined
|
|
127
|
+
* onto a test run — because the diff's own paths read as added targets. This one
|
|
128
|
+
* does not, because the question it answers is not "is this the same question
|
|
129
|
+
* again" but "did you come back to this".
|
|
130
|
+
*
|
|
131
|
+
* An earlier check that names no target at all is never revisited. Such a call
|
|
132
|
+
* has no subject to return to, and treating it as revisited by any later call of
|
|
133
|
+
* the same flow would make the relation vacuous.
|
|
134
|
+
*
|
|
135
|
+
* @category predicates
|
|
136
|
+
* @since 0.1.0
|
|
137
|
+
*/
|
|
138
|
+
export declare const revisits: (later: NarrowedCheck.Check, earlier: NarrowedCheck.Check) => boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Finds the failing check a completion replaced rather than answered.
|
|
141
|
+
*
|
|
142
|
+
* Every condition is read off something the harness already records:
|
|
143
|
+
*
|
|
144
|
+
* 1. the frame closed on a complete measurement, so a digest means something;
|
|
145
|
+
* 2. some check in the ledger reported a failing exit status;
|
|
146
|
+
* 3. that check was recorded over the tree this frame is completing on, so its
|
|
147
|
+
* result is a statement about the tree the completion stands on;
|
|
148
|
+
* 4. it was recorded by a frame that changed nothing, so the digest stamped on
|
|
149
|
+
* it is the tree it actually ran over rather than a conservative guess;
|
|
150
|
+
* 5. some *later* check {@link revisits} it.
|
|
151
|
+
*
|
|
152
|
+
* Condition 4 is the one that cannot be dropped. A frame's calls are not ordered
|
|
153
|
+
* against its edits in anything the harness records, so a check taken in a frame
|
|
154
|
+
* that also edited is stamped with that frame's closing digest — which reads a
|
|
155
|
+
* check taken *before* the edit as though it ran after. `NarrowedCheck` accepts
|
|
156
|
+
* that in the direction that suppresses demands; here the same stamp would
|
|
157
|
+
* attribute a pre-edit failure to a tree the check never ran over, and invent
|
|
158
|
+
* one. The same wave carries an instance where it would have: a reproduction run
|
|
159
|
+
* in the same frame as the edit that fixed it, still reporting the bug.
|
|
160
|
+
*
|
|
161
|
+
* The ledger holds one entry per call signature, carrying that call's most
|
|
162
|
+
* recent run, so "never re-ran it" needs no separate test: a check re-run and
|
|
163
|
+
* passed is no longer failing, and a check re-run and failed again is still
|
|
164
|
+
* unanswered. Ledger order is recency of last run, which is what makes
|
|
165
|
+
* condition 5 a statement about time.
|
|
166
|
+
*
|
|
167
|
+
* The most recent such failing check wins, because it is the reading the
|
|
168
|
+
* completion is standing closest to.
|
|
169
|
+
*
|
|
170
|
+
* @category conversions
|
|
171
|
+
* @since 0.1.0
|
|
172
|
+
*/
|
|
173
|
+
export declare const find: (options: {
|
|
174
|
+
/** Every check this run has run, oldest first, this frame's included. */
|
|
175
|
+
readonly ledger: ReadonlyArray<NarrowedCheck.Check>;
|
|
176
|
+
/** The workspace digest the completing frame closed on; empty when unmeasured. */
|
|
177
|
+
readonly digest: string;
|
|
178
|
+
}) => Displaced | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* States which reading failed, which one replaced it, and what ends it.
|
|
181
|
+
*
|
|
182
|
+
* The text quotes both calls as the run wrote them and asserts only what the
|
|
183
|
+
* record says: the first reported a failing exit status over this exact tree,
|
|
184
|
+
* the second asked about the same subject, and the first was never run again.
|
|
185
|
+
* It does not say the failures are the run's fault, because it does not know —
|
|
186
|
+
* a pre-existing failure is a real answer and the demand names it as one of the
|
|
187
|
+
* two ways out.
|
|
188
|
+
*
|
|
189
|
+
* It also says plainly that nothing re-runs anything for the run, and that the
|
|
190
|
+
* next answer stands.
|
|
191
|
+
*
|
|
192
|
+
* @category constructors
|
|
193
|
+
* @since 0.1.0
|
|
194
|
+
*/
|
|
195
|
+
export declare const demand: (found: Displaced) => string;
|
|
196
|
+
//# sourceMappingURL=UnresolvedFailure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnresolvedFailure.d.ts","sourceRoot":"","sources":["../../src/UnresolvedFailure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEpC,OAAO,KAAK,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAGxD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,aAAa,CAAA;AAEvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,CAAC,IAAI,KAAG,OAG3C,CAAA;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,CAAC,IAAI,KAAG,MAAM,GAAG,SAIxD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,CAAC,IAAI,KAAG,OAAkC,CAAA;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,CAAA;IACpC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,KAAK,CAAA;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,QAAQ,GACnB,OAAO,aAAa,CAAC,KAAK,EAC1B,SAAS,aAAa,CAAC,KAAK,KAC3B,OAWF,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IACnD,kFAAkF;IAClF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB,KAAG,SAAS,GAAG,SAYf,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,MACyC,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var UnresolvedFailure_exports = {};
|
|
30
|
+
__export(UnresolvedFailure_exports, {
|
|
31
|
+
demand: () => demand,
|
|
32
|
+
exitStatus: () => exitStatus,
|
|
33
|
+
exitStatusKey: () => exitStatusKey,
|
|
34
|
+
failed: () => failed,
|
|
35
|
+
find: () => find,
|
|
36
|
+
passed: () => passed,
|
|
37
|
+
revisits: () => revisits
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(UnresolvedFailure_exports);
|
|
40
|
+
var DemandText = __toESM(require("./internal/demandText.js"), 1);
|
|
41
|
+
var import_NarrowedCheck = require("./NarrowedCheck.js");
|
|
42
|
+
const exitStatusKey = "exitCode";
|
|
43
|
+
const failed = (value) => {
|
|
44
|
+
const status = exitStatus(value);
|
|
45
|
+
return status !== void 0 && status !== 0;
|
|
46
|
+
};
|
|
47
|
+
const exitStatus = (value) => {
|
|
48
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
49
|
+
const status = value[exitStatusKey];
|
|
50
|
+
return typeof status === "number" ? status : void 0;
|
|
51
|
+
};
|
|
52
|
+
const passed = (value) => exitStatus(value) === 0;
|
|
53
|
+
const revisits = (later, earlier) => {
|
|
54
|
+
if (later.flow !== earlier.flow) return false;
|
|
55
|
+
if (later.signature === earlier.signature) return false;
|
|
56
|
+
const carried = new Set(later.terms);
|
|
57
|
+
let named = false;
|
|
58
|
+
for (const term of earlier.terms) {
|
|
59
|
+
if (!(0, import_NarrowedCheck.targeting)(term)) continue;
|
|
60
|
+
named = true;
|
|
61
|
+
if (!carried.has(term)) return false;
|
|
62
|
+
}
|
|
63
|
+
return named;
|
|
64
|
+
};
|
|
65
|
+
const find = (options) => {
|
|
66
|
+
if (options.digest === "") return void 0;
|
|
67
|
+
let found = void 0;
|
|
68
|
+
for (const [index, earlier] of options.ledger.entries()) {
|
|
69
|
+
if (!earlier.failing || !earlier.stable) continue;
|
|
70
|
+
if (earlier.digest !== options.digest) continue;
|
|
71
|
+
const instead = options.ledger.slice(index + 1).find((candidate) => revisits(candidate, earlier));
|
|
72
|
+
if (instead !== void 0) found = { failed: earlier, instead };
|
|
73
|
+
}
|
|
74
|
+
return found;
|
|
75
|
+
};
|
|
76
|
+
const demand = (found) => DemandText.unresolved(found.failed.flow, found.failed.label, found.instead.label);
|
|
77
|
+
//# sourceMappingURL=UnresolvedFailure.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/UnresolvedFailure.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The failing check a completion stepped around.\n *\n * `NarrowedCheck` names a completion whose last check is a *narrower* version\n * of one the run already ran, taken after the workspace moved. This module\n * names the case one step further along: the run's reading of some subject\n * reported a failure, over the very tree the run is now completing on, and the\n * run neither re-ran it nor left it alone \u2014 it took a *different* reading of the\n * same subject and completed on that one instead.\n *\n * It is not hypothetical. On a graded benchmark, one run edited a source file at\n * frame 11, ran `pytest -rA testing/python/collect.py` at frame 12 \u2014 the whole\n * file, unfiltered, over the tree it would go on to finish with \u2014 and was told\n * \"2 failed, 72 passed\". At frame 13 it ran a command naming four cases out of\n * that same file, was told \"4 passed\", and at frame 14 it completed. The broad\n * result was never re-run, never retracted, and never mentioned. Its graded\n * patch passed both target tests and 144 of 145 neighbours.\n *\n * ## Why a failing check alone is not the trigger\n *\n * \"Some check failed and the run finished anyway\" is not a defect, and reading\n * it as one would be the harness deciding whose failures matter. The same wave\n * contains the counter-example: an instance that **resolved** ran\n * `pytest -rA astropy/io/fits/tests/test_header.py` after its edit, was told \"2\n * failed, 148 passed\", and completed \u2014 correctly, because those two failures\n * were nothing to do with its change. Nothing in the record distinguishes those\n * two failure counts, and nothing may: counting failures means parsing a\n * runner's output, which makes this a rule about pytest instead of a rule about\n * evidence.\n *\n * What separates the two runs is what happened *after* the failing check. The\n * resolved run walked away from that subject entirely: no later call it made\n * names `astropy/io/fits/tests/test_header.py` at all. The unresolved run went\n * back to exactly the subject that had failed, asked a smaller question about\n * it, and reported the smaller answer. That is the shape this module names, and\n * it is one the run's own record establishes: the run itself demonstrated the\n * subject was still live by returning to it.\n *\n * So the demand is not \"you have a failing test\". It is: *the reading you\n * replaced reported a failure, and you replaced it rather than answering it.*\n * The run may answer either way \u2014 fix what the check reported, or complete again\n * saying why those failures are expected. The loop asks once and accepts what\n * comes back, because a harness that decided which failures counted would be\n * grading the agent's work with its own.\n *\n * @since 0.1.0\n */\n\nimport type { Schema } from \"effect\"\nimport * as DemandText from \"./internal/demandText.ts\"\nimport type * as NarrowedCheck from \"./NarrowedCheck.ts\"\nimport { targeting } from \"./NarrowedCheck.ts\"\n\n/**\n * The reserved key a flow reports its subject's exit status under.\n *\n * The second of the two conventions the loop reads off an otherwise opaque call\n * result, alongside `invalidProbe`. It is not a shared type \u2014 the controller\n * must not depend on the tool library \u2014 so it is a documented wire key.\n * `@smthrs/std` `Bash` and `ShellCommand` are the producing half and own what\n * the number means; the controller only has to know that a result carrying a\n * non-zero number under this key is a result whose subject reported failure.\n *\n * @category identifiers\n * @since 0.1.0\n */\nexport const exitStatusKey = \"exitCode\"\n\n/**\n * Whether a settled call's result reports a failing exit status.\n *\n * A result that declares no exit status is not a failure and not a success: it\n * is a call whose flow does not report one, and reading its absence either way\n * would be an assumption. `false` is the answer that costs a demand rather than\n * inventing one.\n *\n * @category predicates\n * @since 0.1.0\n */\nexport const failed = (value: Schema.Json): boolean => {\n const status = exitStatus(value)\n return status !== undefined && status !== 0\n}\n\n/**\n * The exit status a settled call's result reports about its subject, or\n * nothing where it reports none.\n *\n * The one reader of {@link exitStatusKey}, so the two predicates below and\n * every caller that wants the number itself agree by construction rather than\n * by three copies of the same shape test.\n *\n * @category getters\n * @since 1.0.0-rc.0\n */\nexport const exitStatus = (value: Schema.Json): number | undefined => {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return undefined\n const status = (value as Record<string, unknown>)[exitStatusKey]\n return typeof status === \"number\" ? status : undefined\n}\n\n/**\n * Whether a settled call's result reports a passing exit status.\n *\n * The mirror of {@link failed}, and not its negation. A result that declares no\n * exit status is neither: `false` from both predicates is a call whose flow\n * does not report one, which is what a read and a search are. `Sufficiency`\n * builds a completion signal out of this answer, so silence has to read as\n * silence \u2014 a file read that \"did not fail\" is not a check that passed.\n *\n * @category predicates\n * @since 0.1.0\n */\nexport const passed = (value: Schema.Json): boolean => exitStatus(value) === 0\n\n/**\n * A failing check, paired with the reading the run took in its place.\n *\n * @category models\n * @since 0.1.0\n */\nexport interface Displaced {\n /** The check that reported a failure and was never re-run. */\n readonly failed: NarrowedCheck.Check\n /** A later check over the same tree that revisits its subject. */\n readonly instead: NarrowedCheck.Check\n}\n\n/**\n * Whether a later check asks about the same subject as an earlier one.\n *\n * The relation is: same flow, a different call, and every *target* the earlier\n * check named is named again. Targets \u2014 the terms carrying a separator, as\n * `NarrowedCheck` `targeting` reads them \u2014 are the paths, files, modules and\n * node ids a call is about; everything else is a condition on them. So \"same\n * subject\" means the later call went back to all of the places the earlier one\n * looked, whether it asked a narrower question there, a broader one, or looked\n * somewhere else as well.\n *\n * It is deliberately weaker than `NarrowedCheck` `narrows`, which additionally\n * requires every *condition* to be carried and forbids adding a target. That\n * relation misses a compound command \u2014 a `git diff` of two source files joined\n * onto a test run \u2014 because the diff's own paths read as added targets. This one\n * does not, because the question it answers is not \"is this the same question\n * again\" but \"did you come back to this\".\n *\n * An earlier check that names no target at all is never revisited. Such a call\n * has no subject to return to, and treating it as revisited by any later call of\n * the same flow would make the relation vacuous.\n *\n * @category predicates\n * @since 0.1.0\n */\nexport const revisits = (\n later: NarrowedCheck.Check,\n earlier: NarrowedCheck.Check\n): boolean => {\n if (later.flow !== earlier.flow) return false\n if (later.signature === earlier.signature) return false\n const carried = new Set(later.terms)\n let named = false\n for (const term of earlier.terms) {\n if (!targeting(term)) continue\n named = true\n if (!carried.has(term)) return false\n }\n return named\n}\n\n/**\n * Finds the failing check a completion replaced rather than answered.\n *\n * Every condition is read off something the harness already records:\n *\n * 1. the frame closed on a complete measurement, so a digest means something;\n * 2. some check in the ledger reported a failing exit status;\n * 3. that check was recorded over the tree this frame is completing on, so its\n * result is a statement about the tree the completion stands on;\n * 4. it was recorded by a frame that changed nothing, so the digest stamped on\n * it is the tree it actually ran over rather than a conservative guess;\n * 5. some *later* check {@link revisits} it.\n *\n * Condition 4 is the one that cannot be dropped. A frame's calls are not ordered\n * against its edits in anything the harness records, so a check taken in a frame\n * that also edited is stamped with that frame's closing digest \u2014 which reads a\n * check taken *before* the edit as though it ran after. `NarrowedCheck` accepts\n * that in the direction that suppresses demands; here the same stamp would\n * attribute a pre-edit failure to a tree the check never ran over, and invent\n * one. The same wave carries an instance where it would have: a reproduction run\n * in the same frame as the edit that fixed it, still reporting the bug.\n *\n * The ledger holds one entry per call signature, carrying that call's most\n * recent run, so \"never re-ran it\" needs no separate test: a check re-run and\n * passed is no longer failing, and a check re-run and failed again is still\n * unanswered. Ledger order is recency of last run, which is what makes\n * condition 5 a statement about time.\n *\n * The most recent such failing check wins, because it is the reading the\n * completion is standing closest to.\n *\n * @category conversions\n * @since 0.1.0\n */\nexport const find = (options: {\n /** Every check this run has run, oldest first, this frame's included. */\n readonly ledger: ReadonlyArray<NarrowedCheck.Check>\n /** The workspace digest the completing frame closed on; empty when unmeasured. */\n readonly digest: string\n}): Displaced | undefined => {\n if (options.digest === \"\") return undefined\n let found: Displaced | undefined = undefined\n for (const [index, earlier] of options.ledger.entries()) {\n if (!earlier.failing || !earlier.stable) continue\n if (earlier.digest !== options.digest) continue\n const instead = options.ledger.slice(index + 1).find((candidate) => revisits(candidate, earlier))\n // Oldest first, keeping the last match: the ledger is ordered by when each\n // check last ran, so the surviving pair names the most recent failure.\n if (instead !== undefined) found = { failed: earlier, instead }\n }\n return found\n}\n\n/**\n * States which reading failed, which one replaced it, and what ends it.\n *\n * The text quotes both calls as the run wrote them and asserts only what the\n * record says: the first reported a failing exit status over this exact tree,\n * the second asked about the same subject, and the first was never run again.\n * It does not say the failures are the run's fault, because it does not know \u2014\n * a pre-existing failure is a real answer and the demand names it as one of the\n * two ways out.\n *\n * It also says plainly that nothing re-runs anything for the run, and that the\n * next answer stands.\n *\n * @category constructors\n * @since 0.1.0\n */\nexport const demand = (found: Displaced): string =>\n DemandText.unresolved(found.failed.flow, found.failed.label, found.instead.label)\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiDA,iBAA4B;AAE5B,2BAA0B;AAenB,MAAM,gBAAgB;AAatB,MAAM,SAAS,CAAC,UAAgC;AACrD,QAAM,SAAS,WAAW,KAAK;AAC/B,SAAO,WAAW,UAAa,WAAW;AAC5C;AAaO,MAAM,aAAa,CAAC,UAA2C;AACpE,MAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,EAAG,QAAO;AAChF,QAAM,SAAU,MAAkC,aAAa;AAC/D,SAAO,OAAO,WAAW,WAAW,SAAS;AAC/C;AAcO,MAAM,SAAS,CAAC,UAAgC,WAAW,KAAK,MAAM;AAwCtE,MAAM,WAAW,CACtB,OACA,YACY;AACZ,MAAI,MAAM,SAAS,QAAQ,KAAM,QAAO;AACxC,MAAI,MAAM,cAAc,QAAQ,UAAW,QAAO;AAClD,QAAM,UAAU,IAAI,IAAI,MAAM,KAAK;AACnC,MAAI,QAAQ;AACZ,aAAW,QAAQ,QAAQ,OAAO;AAChC,QAAI,KAAC,gCAAU,IAAI,EAAG;AACtB,YAAQ;AACR,QAAI,CAAC,QAAQ,IAAI,IAAI,EAAG,QAAO;AAAA,EACjC;AACA,SAAO;AACT;AAoCO,MAAM,OAAO,CAAC,YAKQ;AAC3B,MAAI,QAAQ,WAAW,GAAI,QAAO;AAClC,MAAI,QAA+B;AACnC,aAAW,CAAC,OAAO,OAAO,KAAK,QAAQ,OAAO,QAAQ,GAAG;AACvD,QAAI,CAAC,QAAQ,WAAW,CAAC,QAAQ,OAAQ;AACzC,QAAI,QAAQ,WAAW,QAAQ,OAAQ;AACvC,UAAM,UAAU,QAAQ,OAAO,MAAM,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,SAAS,WAAW,OAAO,CAAC;AAGhG,QAAI,YAAY,OAAW,SAAQ,EAAE,QAAQ,SAAS,QAAQ;AAAA,EAChE;AACA,SAAO;AACT;AAkBO,MAAM,SAAS,CAAC,UACrB,WAAW,WAAW,MAAM,OAAO,MAAM,MAAM,OAAO,OAAO,MAAM,QAAQ,KAAK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The proof that was already true before anything changed.
|
|
3
|
+
*
|
|
4
|
+
* **This control is not wired into `CellTurn`. Nothing in a production run
|
|
5
|
+
* reads it, and no run is told anything by it.** The module, this suite and
|
|
6
|
+
* `AgentEvent.VacuousVerificationObserved` are kept intact so it can be
|
|
7
|
+
* measured on its own, in its own wave, against the contract text r92
|
|
8
|
+
* measured. Everything below describes what it does when an arm turns it on.
|
|
9
|
+
*
|
|
10
|
+
* **Its input no longer exists.** {@link stored} reads the reserved
|
|
11
|
+
* `verification` key out of the durable state a cell filed by hand, and the
|
|
12
|
+
* filing surface was deleted on 2026-08-24: `Cell.Continue.state` decodes and
|
|
13
|
+
* is populated by nothing. An arm that re-wires this module reads nothing until
|
|
14
|
+
* it first decides where a realm run declares its verification — a name bound
|
|
15
|
+
* in the realm, a print, or a new field — so the wave that turns this back on
|
|
16
|
+
* carries that decision with it. {@link stored} is left reading `Schema.Json`
|
|
17
|
+
* because that decision has not been made and the r90–r96 journals it can be
|
|
18
|
+
* replayed against are still filing journals.
|
|
19
|
+
*
|
|
20
|
+
* It was live for exactly one wave. the r93 wave report reads
|
|
21
|
+
* the result off the 45 journals, and the reason it is off is that the wave
|
|
22
|
+
* cannot price it:
|
|
23
|
+
*
|
|
24
|
+
* - It fired **twice in 45 journals**, and on neither of the instances the
|
|
25
|
+
* diagnosis or the replay predicted. `django__django-14351`, the run it was
|
|
26
|
+
* written for, resolved that wave with **no observation on its journal at
|
|
27
|
+
* all** — so the row it was built to close was closed by something else, and
|
|
28
|
+
* two prompt rules landed in the same round.
|
|
29
|
+
* - `sympy__sympy-13878` is the firing that worked: told at frame 1 that its
|
|
30
|
+
* stored check was already green, the run replaced it, spent seventeen more
|
|
31
|
+
* frames on a different proof, and resolved — cheaper and in fewer frames
|
|
32
|
+
* than any earlier wave.
|
|
33
|
+
* - `django__django-15732` is the firing that did not. The observation landed
|
|
34
|
+
* on frame 7, which is the frame that made the correct edit. On frame 8 the
|
|
35
|
+
* run made a second edit that rewrote the enclosing block and restored the
|
|
36
|
+
* first edit's text **byte for byte**. Both edits reported `mutated: true`
|
|
37
|
+
* on an `observed` basis, the final tree equalled the base, and the captured
|
|
38
|
+
* diff was zero bytes. The instance had resolved in r90, r91 and r92; it is
|
|
39
|
+
* the wave's only empty patch.
|
|
40
|
+
*
|
|
41
|
+
* Nothing in this module's contract asks a run to revert, and one instance is
|
|
42
|
+
* not a mechanism. But it is the first evidence that a fact delivered on the
|
|
43
|
+
* `invalidProbe` channel can be read by a run as an instruction to retreat,
|
|
44
|
+
* and the one consequential firing in the wave preceded the wave's only
|
|
45
|
+
* revert-to-empty-patch. Two firings is not a rate. Turning this back on is a
|
|
46
|
+
* wave of its own — this control alone, on r92's contract text, with
|
|
47
|
+
* `django__django-15732` and `sympy__sympy-13878` as the rows to read — and
|
|
48
|
+
* not a change that rides along with another.
|
|
49
|
+
*
|
|
50
|
+
* A run is asked to store the check it verified with as
|
|
51
|
+
* `state.verification: { flow, input }` and to re-run that exact check after
|
|
52
|
+
* its edit. Nothing in that rule says the check ever failed. A run may pick a
|
|
53
|
+
* command that was green on the tree it was handed, watch it stay green after
|
|
54
|
+
* the edit, and complete citing a before-and-after that never moved.
|
|
55
|
+
*
|
|
56
|
+
* That is not a hypothetical either. `django__django-14351` lost a baseline
|
|
57
|
+
* verdict across two waves, and its journal says why in two rows: the same
|
|
58
|
+
* verification script — one content digest — ran at sequence 260, before any
|
|
59
|
+
* frame of the run had changed a byte, and exited 0; then again at sequence
|
|
60
|
+
* 582, after the edit, and exited 0. Both readings are true and the pair
|
|
61
|
+
* establishes nothing. The contract already says the words — *a command
|
|
62
|
+
* becomes evidence only once you have SEEN it fail on the unmodified tree* —
|
|
63
|
+
* and the run stored a check it had watched pass there instead.
|
|
64
|
+
*
|
|
65
|
+
* The harness can see this without re-running anything. It already records
|
|
66
|
+
* every check a frame ran, whether that check reported a passing exit status,
|
|
67
|
+
* and how many frames of the run had changed the workspace when it ran. A
|
|
68
|
+
* check that passed while that count was zero, in a frame that itself changed
|
|
69
|
+
* nothing, is a check that passed on the tree the run was handed. If a later
|
|
70
|
+
* cell stores that exact call as its verification, the run is standing on a
|
|
71
|
+
* proof that cannot distinguish its own change from no change at all.
|
|
72
|
+
*
|
|
73
|
+
* One reading takes it back: the same call reported *failing* over that same
|
|
74
|
+
* untouched tree. Then the run has watched the red the contract asks for, and a
|
|
75
|
+
* second, green reading of it before any edit says the command is unsteady
|
|
76
|
+
* rather than that the run never saw it fail. Such a signature is never
|
|
77
|
+
* admitted, so the observation can only ever be made about a check this run has
|
|
78
|
+
* no pre-edit failure for.
|
|
79
|
+
*
|
|
80
|
+
* So the harness says so, and does nothing else. It is delivered on the
|
|
81
|
+
* `invalidProbe` channel — the one place the loop already contradicts a
|
|
82
|
+
* reading of a result the flow itself could see through — because it is the
|
|
83
|
+
* same class of fact: a result that reads identically on a broken tree and on
|
|
84
|
+
* a fixed one. No bounce, no demand, no cap: the run continues on the
|
|
85
|
+
* transition it wrote. A harness that refused the completion would be grading
|
|
86
|
+
* the agent's work with its own, which is the line every control in this
|
|
87
|
+
* package holds, and it would be refusing on a *guess* — a check that was
|
|
88
|
+
* green before an edit is the right check for a task whose bug is a crash the
|
|
89
|
+
* command never reached, and only the run knows which it has.
|
|
90
|
+
*
|
|
91
|
+
* It fires at most once per distinct verification input. The fact is about a
|
|
92
|
+
* call, the record only grows, and a run that has been told and stored the
|
|
93
|
+
* same check again has decided, which is its decision to make.
|
|
94
|
+
*
|
|
95
|
+
* @since 0.1.0
|
|
96
|
+
*/
|
|
97
|
+
import { Schema } from "effect";
|
|
98
|
+
import type * as NarrowedCheck from "./NarrowedCheck.ts";
|
|
99
|
+
/**
|
|
100
|
+
* How many pristine-tree passes one run carries forward.
|
|
101
|
+
*
|
|
102
|
+
* The ledger is durable controller state, so it is bounded, and it only ever
|
|
103
|
+
* grows while the run has changed nothing: the moment a frame edits, nothing
|
|
104
|
+
* new is admitted. The longest graded run made 43 calls across 24 frames with
|
|
105
|
+
* its first edit at frame 3, so sixteen covers every check a run takes before
|
|
106
|
+
* it commits to a change. A run that outlives the bound forgets its oldest
|
|
107
|
+
* passes first, which can cost the observation and can never invent one.
|
|
108
|
+
*
|
|
109
|
+
* @category constants
|
|
110
|
+
* @since 0.1.0
|
|
111
|
+
*/
|
|
112
|
+
export declare const retained = 16;
|
|
113
|
+
declare const Pass_base: Schema.Class<Pass, Schema.Struct<{
|
|
114
|
+
/** The flow the call named. */
|
|
115
|
+
readonly flow: Schema.String;
|
|
116
|
+
/** The call's identity, as the controller's own signature names it. */
|
|
117
|
+
readonly signature: Schema.String;
|
|
118
|
+
/** The call's input as it was written, clipped, for the observation to quote. */
|
|
119
|
+
readonly label: Schema.String;
|
|
120
|
+
}>, {}>;
|
|
121
|
+
/**
|
|
122
|
+
* One check that passed over the tree the run was handed.
|
|
123
|
+
*
|
|
124
|
+
* @category models
|
|
125
|
+
* @since 0.1.0
|
|
126
|
+
*/
|
|
127
|
+
export declare class Pass extends Pass_base {
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* The pristine-tree passes this run carries, oldest first and bounded.
|
|
131
|
+
*
|
|
132
|
+
* @category schemas
|
|
133
|
+
* @since 0.1.0
|
|
134
|
+
*/
|
|
135
|
+
export declare const Ledger: Schema.withDecodingDefaultKey<Schema.withConstructorDefault<Schema.$Array<typeof Pass>>, never>;
|
|
136
|
+
/**
|
|
137
|
+
* The pristine-tree passes this run carries, oldest first and bounded.
|
|
138
|
+
*
|
|
139
|
+
* @category models
|
|
140
|
+
* @since 0.1.0
|
|
141
|
+
*/
|
|
142
|
+
export type Ledger = typeof Ledger.Type;
|
|
143
|
+
/**
|
|
144
|
+
* Records one frame's passing checks, but only while the tree is untouched.
|
|
145
|
+
*
|
|
146
|
+
* Three conditions, and all of them are refusals rather than readings. `epoch`
|
|
147
|
+
* is the run's own count of frames that changed the workspace *before* this
|
|
148
|
+
* one, so a non-zero epoch means some earlier frame already edited and a pass
|
|
149
|
+
* taken now says nothing about the tree the run was handed. `stable` is the
|
|
150
|
+
* same question inside one frame: a frame's calls are not ordered against its
|
|
151
|
+
* edits in anything the harness records, so a check from a frame that also
|
|
152
|
+
* edited might have run on either side of it. `Sufficiency` refuses the same
|
|
153
|
+
* stamp for the same reason; see `NarrowedCheck` `Check` `stable`.
|
|
154
|
+
*
|
|
155
|
+
* `failed` is the third, and it is the one that keeps the observation from
|
|
156
|
+
* contradicting the record it is read off. A check the run has already watched
|
|
157
|
+
* *fail* over the tree it was handed is a check the run has done the contract's
|
|
158
|
+
* work on, whatever it printed the second time: it is red on the unmodified
|
|
159
|
+
* tree, and a later green reading of it at the same epoch says the command is
|
|
160
|
+
* unsteady, not that the run never saw it fail. Telling such a run its proof
|
|
161
|
+
* was "already green" would be a sentence its own journal refutes, so the
|
|
162
|
+
* signature is refused on the way in and evicted if an earlier pass already put
|
|
163
|
+
* it there. The list is the run's failing-check ledger read at epoch zero —
|
|
164
|
+
* `Sufficiency` already keeps it, stamped with the epoch each failure was
|
|
165
|
+
* watched in — so nothing new is measured or stored for this. That ledger is
|
|
166
|
+
* bounded, so a run with more distinct pre-edit failures than `Sufficiency`
|
|
167
|
+
* retains can forget one; forgetting can cost the refusal and can never invent
|
|
168
|
+
* a pass.
|
|
169
|
+
*
|
|
170
|
+
* A repeated signature keeps its first entry rather than taking a second slot:
|
|
171
|
+
* the entries are all the same tree, so re-running one adds no information and
|
|
172
|
+
* re-stamping it would only cost the ledger its oldest genuinely distinct pass.
|
|
173
|
+
*
|
|
174
|
+
* @category combinators
|
|
175
|
+
* @since 0.1.0
|
|
176
|
+
*/
|
|
177
|
+
export declare const remember: (ledger: Ledger, options: {
|
|
178
|
+
/** The checks this frame ran. */
|
|
179
|
+
readonly frame: ReadonlyArray<NarrowedCheck.Check>;
|
|
180
|
+
/** Frames that had changed the workspace before this one. */
|
|
181
|
+
readonly epoch: number;
|
|
182
|
+
/** Signatures this run has watched fail over the tree it was handed. */
|
|
183
|
+
readonly failed: ReadonlyArray<string>;
|
|
184
|
+
}) => Ledger;
|
|
185
|
+
/**
|
|
186
|
+
* The `{ flow, input }` pair a cell stored as its verification, if it stored
|
|
187
|
+
* one this module can read.
|
|
188
|
+
*
|
|
189
|
+
* The reserved key and its two fields are the contract's own words, and this
|
|
190
|
+
* is the only thing the controller ever reads out of `agentState`. Anything
|
|
191
|
+
* else under `verification` — a string, a bare command, a shape the contract
|
|
192
|
+
* does not describe — reads as absent, because a state key the harness cannot
|
|
193
|
+
* parse is the cell's own memory and not a claim about evidence.
|
|
194
|
+
*
|
|
195
|
+
* @category conversions
|
|
196
|
+
* @since 0.1.0
|
|
197
|
+
*/
|
|
198
|
+
export declare const stored: (agentState: Schema.Json) => {
|
|
199
|
+
readonly flow: string;
|
|
200
|
+
readonly input: Schema.Json;
|
|
201
|
+
} | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Finds the pristine-tree pass a stored verification is standing on.
|
|
204
|
+
*
|
|
205
|
+
* The match is on the controller's own call signature, so it is the *exact*
|
|
206
|
+
* `{ flow, input }` the contract asks a run to reuse — a broadened or narrowed
|
|
207
|
+
* command is a different call and is not this failure.
|
|
208
|
+
*
|
|
209
|
+
* `stated` is the run's record of what it has already been told, which is what
|
|
210
|
+
* keeps this to one sentence per distinct input.
|
|
211
|
+
*
|
|
212
|
+
* @category conversions
|
|
213
|
+
* @since 0.1.0
|
|
214
|
+
*/
|
|
215
|
+
export declare const find: (options: {
|
|
216
|
+
/** Checks that passed over the tree the run was handed, oldest first. */
|
|
217
|
+
readonly ledger: Ledger;
|
|
218
|
+
/** The signature of the `{ flow, input }` the cell stored. */
|
|
219
|
+
readonly signature: string;
|
|
220
|
+
/** Verification signatures this run has already been told about. */
|
|
221
|
+
readonly stated: ReadonlyArray<string>;
|
|
222
|
+
}) => Pass | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* States that the stored proof was already green before anything changed.
|
|
225
|
+
*
|
|
226
|
+
* It quotes the call, says what the record establishes about it, and names the
|
|
227
|
+
* two things the run may do — keep it, having a reason, or go find a reading
|
|
228
|
+
* that can move. Neither is refused and neither is graded: a check that was
|
|
229
|
+
* green before the edit is the right check for a task whose bug is a crash the
|
|
230
|
+
* command never reached, and only the run knows whether that is this task.
|
|
231
|
+
*
|
|
232
|
+
* @category constructors
|
|
233
|
+
* @since 0.1.0
|
|
234
|
+
*/
|
|
235
|
+
export declare const observation: (found: Pass) => string;
|
|
236
|
+
export {};
|
|
237
|
+
//# sourceMappingURL=VacuousVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VacuousVerification.d.ts","sourceRoot":"","sources":["../../src/VacuousVerification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,KAAK,KAAK,aAAa,MAAM,oBAAoB,CAAA;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,KAAK,CAAA;;IASxB,+BAA+B;;IAE/B,uEAAuE;;IAEvE,iFAAiF;;;AAXnF;;;;;GAKG;AACH,qBAAa,IAAK,SAAQ,SAOxB;CAAG;AAEL;;;;;GAKG;AACH,eAAO,MAAM,MAAM,iGAGlB,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,QAAQ,GACnB,QAAQ,MAAM,EACd,SAAS;IACP,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAClD,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACvC,KACA,MAeF,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,GACjB,YAAY,MAAM,CAAC,IAAI,KACtB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAA;CAAE,GAAG,SAQ3D,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI,GAAI,SAAS;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CACvC,KAAG,IAAI,GAAG,SAGV,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,IAAI,KAAG,MAM+gB,CAAA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var VacuousVerification_exports = {};
|
|
30
|
+
__export(VacuousVerification_exports, {
|
|
31
|
+
Ledger: () => Ledger,
|
|
32
|
+
Pass: () => Pass,
|
|
33
|
+
find: () => find,
|
|
34
|
+
observation: () => observation,
|
|
35
|
+
remember: () => remember,
|
|
36
|
+
retained: () => retained,
|
|
37
|
+
stored: () => stored
|
|
38
|
+
});
|
|
39
|
+
module.exports = __toCommonJS(VacuousVerification_exports);
|
|
40
|
+
var import_effect = require("effect");
|
|
41
|
+
var Effect = __toESM(require("effect/Effect"), 1);
|
|
42
|
+
const retained = 16;
|
|
43
|
+
class Pass extends import_effect.Schema.Class("flows/harness/VacuousVerification/Pass")({
|
|
44
|
+
/** The flow the call named. */
|
|
45
|
+
flow: import_effect.Schema.String,
|
|
46
|
+
/** The call's identity, as the controller's own signature names it. */
|
|
47
|
+
signature: import_effect.Schema.String,
|
|
48
|
+
/** The call's input as it was written, clipped, for the observation to quote. */
|
|
49
|
+
label: import_effect.Schema.String
|
|
50
|
+
}) {
|
|
51
|
+
}
|
|
52
|
+
const Ledger = import_effect.Schema.Array(Pass).pipe(
|
|
53
|
+
import_effect.Schema.withConstructorDefault(Effect.succeed([])),
|
|
54
|
+
import_effect.Schema.withDecodingDefaultKey(Effect.succeed([]))
|
|
55
|
+
);
|
|
56
|
+
const remember = (ledger, options) => {
|
|
57
|
+
const refused = new Set(options.failed);
|
|
58
|
+
const kept = new Map(
|
|
59
|
+
ledger.filter((entry) => !refused.has(entry.signature)).map((entry) => [entry.signature, entry])
|
|
60
|
+
);
|
|
61
|
+
if (options.epoch === 0) {
|
|
62
|
+
for (const check of options.frame) {
|
|
63
|
+
if (!check.passing || !check.stable) continue;
|
|
64
|
+
if (refused.has(check.signature)) continue;
|
|
65
|
+
if (kept.has(check.signature)) continue;
|
|
66
|
+
kept.set(check.signature, new Pass({ flow: check.flow, signature: check.signature, label: check.label }));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const distinct = [...kept.values()];
|
|
70
|
+
return distinct.slice(Math.max(0, distinct.length - retained));
|
|
71
|
+
};
|
|
72
|
+
const stored = (agentState) => {
|
|
73
|
+
if (agentState === null || typeof agentState !== "object" || Array.isArray(agentState)) return void 0;
|
|
74
|
+
const declared = agentState["verification"];
|
|
75
|
+
if (declared === null || declared === void 0 || typeof declared !== "object" || Array.isArray(declared)) {
|
|
76
|
+
return void 0;
|
|
77
|
+
}
|
|
78
|
+
const { flow, input } = declared;
|
|
79
|
+
return typeof flow === "string" && input !== void 0 ? { flow, input } : void 0;
|
|
80
|
+
};
|
|
81
|
+
const find = (options) => {
|
|
82
|
+
if (options.stated.includes(options.signature)) return void 0;
|
|
83
|
+
return options.ledger.find((entry) => entry.signature === options.signature);
|
|
84
|
+
};
|
|
85
|
+
const observation = (found) => `Vacuous verification \u2014 the check you stored as \`state.verification\` is a check this run already watched PASS on the unmodified tree, before any frame of it changed a byte.
|
|
86
|
+
|
|
87
|
+
- the stored check: ${found.flow} ${found.label}
|
|
88
|
+
- what this run saw it do on the tree it was handed: exit 0
|
|
89
|
+
|
|
90
|
+
Re-running it after your edit cannot show your change did anything: it reads identically on a broken tree and on a fixed one, so a green result after the edit is the same green result as before it. A proof is a check you have watched FAIL and then watched pass. Nothing is being asked of you and nothing has been refused \u2014 if this command is genuinely the only observable the task has, keep it and say in your output that it never failed and why. Otherwise the reading you still need is one that is red right now. This notice is written once per distinct verification.`;
|
|
91
|
+
//# sourceMappingURL=VacuousVerification.js.map
|