@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,719 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reading Jev takes of a run while it is still running.
|
|
3
|
+
*
|
|
4
|
+
* Every other control in this package reads a completion, or reads one fact
|
|
5
|
+
* the harness measured: a tree that never moved, a check that was narrowed, a
|
|
6
|
+
* frame that repeated itself. Each is exact, each fires late, and each is
|
|
7
|
+
* silent about the run between its brakes. A run that edits the wrong file
|
|
8
|
+
* for twenty frames, re-runs one failing check after every edit and never
|
|
9
|
+
* once claims to be done trips none of them until its budget is gone.
|
|
10
|
+
*
|
|
11
|
+
* So this module asks Jev about the run's *shape* rather than its sentence.
|
|
12
|
+
* One classifier, `supervisor/turn`, over a {@link Snapshot} the controller
|
|
13
|
+
* assembles from what it already holds: the task, the newest frames, and the
|
|
14
|
+
* counts the deterministic controls keep — read-only streak, repeat streak,
|
|
15
|
+
* mutations, checks run and failing, unanswered failures, demands spent. It
|
|
16
|
+
* re-derives none of them. Beside the run's state it carries the skills it has
|
|
17
|
+
* not called, the flows it has, and whether it can call `jev`. One Jev call per
|
|
18
|
+
* snapshot answers every question at once.
|
|
19
|
+
*
|
|
20
|
+
* Eleven questions are fixed. Five are about the run: whether it is
|
|
21
|
+
* thrashing, whether it is still on the task, whether its evidence is
|
|
22
|
+
* suspect, and whether it carries outdated or irrelevant context. Five are
|
|
23
|
+
* operational states a person would recognise in a colleague, each scored
|
|
24
|
+
* `none`, `mild` or `strong` against evidence the snapshot names, and
|
|
25
|
+
* `needs_help` is the one word a person is shown. The five about the run are
|
|
26
|
+
* the {@link triggers}: any one past its threshold crosses. Each monitor the
|
|
27
|
+
* host arms may add one boolean of its own, under {@link monitorPrefix}.
|
|
28
|
+
*
|
|
29
|
+
* Rows recalled from {@link Memory} are not asked about here. Beside each
|
|
30
|
+
* reading, the supervisor asks `Relevance` which of up to
|
|
31
|
+
* {@link recalledLimit} rows, none already shown to the run, are unnecessary
|
|
32
|
+
* for the task; the rest are shown at the next boundary as
|
|
33
|
+
* {@link recalledInsert} renders them, and a row is shown to a run once.
|
|
34
|
+
*
|
|
35
|
+
* It is a supervisor and not a brake: nothing here ends a run, refuses a
|
|
36
|
+
* completion, or decides anything on the cell loop's hot path. `CellTurn`
|
|
37
|
+
* offers each frame's snapshot to a one-slot sliding queue and continues; a
|
|
38
|
+
* forked fiber takes the newest snapshot, asks, journals what came back, and
|
|
39
|
+
* hands the monitors' values and any recalled rows to the *next* turn boundary,
|
|
40
|
+
* which decides there what the run is told. A reading that arrives after the boundary it was for is
|
|
41
|
+
* journaled and never delivered, and a snapshot the fiber never reached is
|
|
42
|
+
* dropped: the run is never told something about a frame two frames gone.
|
|
43
|
+
*
|
|
44
|
+
* It never falls back. A snapshot Jev could not read is journaled as
|
|
45
|
+
* {@link AgentEvent.SupervisorUnjudged} with the transport's own reason; it
|
|
46
|
+
* nudges nothing, and is never counted as a reading that
|
|
47
|
+
* found the run calm or on target. A host with no judge (`unconfigured`) is
|
|
48
|
+
* journaled once per streak rather than every frame; each reading still asks,
|
|
49
|
+
* so a judge connected mid-run is used at once. Nothing here is a default value: every
|
|
50
|
+
* level and every word on the settled event came back from the transport.
|
|
51
|
+
*
|
|
52
|
+
* What a reading says is delivered wherever the host holds a real judge
|
|
53
|
+
* (`CellTurn.Input.judged`), and only through a monitor that crossed and
|
|
54
|
+
* passed its gates; the text of the legacy nudge is {@link nudge}, which the
|
|
55
|
+
* `supervisor` lint monitor says. The offline replay of archived journals
|
|
56
|
+
* (`evals/swebench/lib/jev-replay.mjs`, which scores {@link triggers} itself
|
|
57
|
+
* rather than a copy of it) measures their precision. The verdict is
|
|
58
|
+
* journaled whenever an `Evaluator` is bound. The supervisor writes no
|
|
59
|
+
* memory: a run's transcript is mined once, at run end, by `@smthrs/agent`'s
|
|
60
|
+
* `MemoryMine`.
|
|
61
|
+
*
|
|
62
|
+
* @since 1.0.0-rc.0
|
|
63
|
+
*/
|
|
64
|
+
import * as Classifier from "@smthrs/model/Classifier";
|
|
65
|
+
import type * as Evaluator from "@smthrs/model/Evaluator";
|
|
66
|
+
import * as Context from "effect/Context";
|
|
67
|
+
import * as Effect from "effect/Effect";
|
|
68
|
+
import * as Schema from "effect/Schema";
|
|
69
|
+
import type * as AgentEvent from "./AgentEvent.ts";
|
|
70
|
+
import * as Judgement from "./Judgement.ts";
|
|
71
|
+
/**
|
|
72
|
+
* The most of one frame's cell, prose or prints the snapshot carries, in
|
|
73
|
+
* UTF-8 bytes. The head of a cell and the tail of its prints: a cell states
|
|
74
|
+
* its plan first and a runner states its verdict last.
|
|
75
|
+
*
|
|
76
|
+
* @category constants
|
|
77
|
+
* @since 1.0.0-rc.0
|
|
78
|
+
*/
|
|
79
|
+
export declare const frameBytes = 1024;
|
|
80
|
+
/**
|
|
81
|
+
* How many of the newest frames a snapshot carries.
|
|
82
|
+
*
|
|
83
|
+
* @category constants
|
|
84
|
+
* @since 1.0.0-rc.0
|
|
85
|
+
*/
|
|
86
|
+
export declare const recentFrames = 3;
|
|
87
|
+
/**
|
|
88
|
+
* The most rows one reading recalls from {@link Memory}.
|
|
89
|
+
*
|
|
90
|
+
* @category constants
|
|
91
|
+
* @since 1.0.0-rc.0
|
|
92
|
+
*/
|
|
93
|
+
export declare const recalledLimit = 6;
|
|
94
|
+
/**
|
|
95
|
+
* How long a run that ends with a reading in flight waits for it to settle
|
|
96
|
+
* and journal, in milliseconds. A reading still unanswered then is interrupted
|
|
97
|
+
* and journaled `supervisor-unjudged` with reason `interrupted`; the run never
|
|
98
|
+
* waits longer than this for its supervisor.
|
|
99
|
+
*
|
|
100
|
+
* @category constants
|
|
101
|
+
* @since 1.0.0-rc.0
|
|
102
|
+
*/
|
|
103
|
+
export declare const closeGraceMs = 1500;
|
|
104
|
+
/**
|
|
105
|
+
* At or above this probability of `thrashing`, the reading crosses.
|
|
106
|
+
*
|
|
107
|
+
* @category constants
|
|
108
|
+
* @since 1.0.0-rc.0
|
|
109
|
+
*/
|
|
110
|
+
export declare const thrashingAt = 0.5;
|
|
111
|
+
/**
|
|
112
|
+
* At or below this probability of `on_target`, the reading crosses.
|
|
113
|
+
*
|
|
114
|
+
* @category constants
|
|
115
|
+
* @since 1.0.0-rc.0
|
|
116
|
+
*/
|
|
117
|
+
export declare const offTargetAt = 0.5;
|
|
118
|
+
/**
|
|
119
|
+
* At or above this probability of `suspect`, the reading crosses.
|
|
120
|
+
*
|
|
121
|
+
* @category constants
|
|
122
|
+
* @since 1.0.0-rc.0
|
|
123
|
+
*/
|
|
124
|
+
export declare const suspectAt = 0.5;
|
|
125
|
+
/**
|
|
126
|
+
* At or above this probability of `outdated_context` or
|
|
127
|
+
* `irrelevant_context`, a judged run compacts at its next frame.
|
|
128
|
+
*
|
|
129
|
+
* @category constants
|
|
130
|
+
* @since 1.0.0-rc.0
|
|
131
|
+
*/
|
|
132
|
+
export declare const contextAt = 0.5;
|
|
133
|
+
/**
|
|
134
|
+
* The three rungs every operational-state question is scored on.
|
|
135
|
+
*
|
|
136
|
+
* @category schemas
|
|
137
|
+
* @since 1.0.0-rc.0
|
|
138
|
+
*/
|
|
139
|
+
export declare const Level: Schema.Literals<readonly ["none", "mild", "strong"]>;
|
|
140
|
+
/**
|
|
141
|
+
* The decoded form of {@link Level}.
|
|
142
|
+
*
|
|
143
|
+
* @category models
|
|
144
|
+
* @since 1.0.0-rc.0
|
|
145
|
+
*/
|
|
146
|
+
export type Level = typeof Level.Type;
|
|
147
|
+
/**
|
|
148
|
+
* The rungs as the score question declares them, in order.
|
|
149
|
+
*
|
|
150
|
+
* @category constants
|
|
151
|
+
* @since 1.0.0-rc.0
|
|
152
|
+
*/
|
|
153
|
+
export declare const levels: readonly ["none", "mild", "strong"];
|
|
154
|
+
/**
|
|
155
|
+
* The one word a person is shown about a run.
|
|
156
|
+
*
|
|
157
|
+
* @category schemas
|
|
158
|
+
* @since 1.0.0-rc.0
|
|
159
|
+
*/
|
|
160
|
+
export declare const Help: Schema.Literals<readonly ["none", "clarification", "permission", "stuck", "risky_action"]>;
|
|
161
|
+
/**
|
|
162
|
+
* The decoded form of {@link Help}.
|
|
163
|
+
*
|
|
164
|
+
* @category models
|
|
165
|
+
* @since 1.0.0-rc.0
|
|
166
|
+
*/
|
|
167
|
+
export type Help = typeof Help.Type;
|
|
168
|
+
/**
|
|
169
|
+
* The five operational states, in the order they are asked and journaled.
|
|
170
|
+
*
|
|
171
|
+
* @category constants
|
|
172
|
+
* @since 1.0.0-rc.0
|
|
173
|
+
*/
|
|
174
|
+
export declare const emotions: readonly ["frustrated", "anxious", "scared", "confused", "confident"];
|
|
175
|
+
/**
|
|
176
|
+
* One of {@link emotions}.
|
|
177
|
+
*
|
|
178
|
+
* @category models
|
|
179
|
+
* @since 1.0.0-rc.0
|
|
180
|
+
*/
|
|
181
|
+
export type Emotion = typeof emotions[number];
|
|
182
|
+
/**
|
|
183
|
+
* One recent frame as the snapshot carries it: the cell the model wrote, the
|
|
184
|
+
* prose around it, what the cell printed, and how it ended.
|
|
185
|
+
*
|
|
186
|
+
* @category schemas
|
|
187
|
+
* @since 1.0.0-rc.0
|
|
188
|
+
*/
|
|
189
|
+
export declare const Frame: Schema.Struct<{
|
|
190
|
+
readonly frame: Schema.Int;
|
|
191
|
+
readonly cell: Schema.String;
|
|
192
|
+
readonly prose: Schema.String;
|
|
193
|
+
readonly printed: Schema.String;
|
|
194
|
+
readonly transition: Schema.Literals<readonly ["continue", "complete", "park", "raised", "rejected"]>;
|
|
195
|
+
readonly mutated: Schema.Boolean;
|
|
196
|
+
}>;
|
|
197
|
+
/**
|
|
198
|
+
* The decoded form of {@link Frame}.
|
|
199
|
+
*
|
|
200
|
+
* @category models
|
|
201
|
+
* @since 1.0.0-rc.0
|
|
202
|
+
*/
|
|
203
|
+
export type Frame = typeof Frame.Type;
|
|
204
|
+
/**
|
|
205
|
+
* The counts the deterministic controls keep, handed over as they stand.
|
|
206
|
+
*
|
|
207
|
+
* Every field is read off `CellTurn.State` or the frame's accounting and none
|
|
208
|
+
* is re-derived here: the supervisor is a reader of the harness's evidence,
|
|
209
|
+
* not a second measurer of it.
|
|
210
|
+
*
|
|
211
|
+
* @category schemas
|
|
212
|
+
* @since 1.0.0-rc.0
|
|
213
|
+
*/
|
|
214
|
+
export declare const Signals: Schema.Struct<{
|
|
215
|
+
readonly frame: Schema.Int;
|
|
216
|
+
readonly maxFrames: Schema.Int;
|
|
217
|
+
readonly readOnlyFrames: Schema.Int;
|
|
218
|
+
readonly repeatFrames: Schema.Int;
|
|
219
|
+
readonly mutations: Schema.Int;
|
|
220
|
+
readonly remoteMutations: Schema.Int;
|
|
221
|
+
readonly treeMoved: Schema.Boolean;
|
|
222
|
+
readonly paths: Schema.Int;
|
|
223
|
+
readonly checksRun: Schema.Int;
|
|
224
|
+
readonly checksFailing: Schema.Int;
|
|
225
|
+
readonly failuresUnanswered: Schema.Int;
|
|
226
|
+
readonly callsFailed: Schema.Int;
|
|
227
|
+
readonly callsSettled: Schema.Int;
|
|
228
|
+
readonly narrowingDemands: Schema.Int;
|
|
229
|
+
readonly unmovedDemands: Schema.Int;
|
|
230
|
+
readonly unresolvedDemands: Schema.Int;
|
|
231
|
+
readonly claimDemands: Schema.Int;
|
|
232
|
+
readonly sufficiencyStated: Schema.Boolean;
|
|
233
|
+
}>;
|
|
234
|
+
/**
|
|
235
|
+
* The decoded form of {@link Signals}.
|
|
236
|
+
*
|
|
237
|
+
* @category models
|
|
238
|
+
* @since 1.0.0-rc.0
|
|
239
|
+
*/
|
|
240
|
+
export type Signals = typeof Signals.Type;
|
|
241
|
+
/**
|
|
242
|
+
* One row recalled from memory.
|
|
243
|
+
*
|
|
244
|
+
* @category schemas
|
|
245
|
+
* @since 1.0.0-rc.0
|
|
246
|
+
*/
|
|
247
|
+
export declare const Recalled: Schema.Struct<{
|
|
248
|
+
readonly key: Schema.String;
|
|
249
|
+
readonly text: Schema.String;
|
|
250
|
+
}>;
|
|
251
|
+
/**
|
|
252
|
+
* The decoded form of {@link Recalled}.
|
|
253
|
+
*
|
|
254
|
+
* @category models
|
|
255
|
+
* @since 1.0.0-rc.0
|
|
256
|
+
*/
|
|
257
|
+
export type Recalled = typeof Recalled.Type;
|
|
258
|
+
/**
|
|
259
|
+
* The most skills one snapshot offers.
|
|
260
|
+
*
|
|
261
|
+
* @category constants
|
|
262
|
+
* @since 1.0.0-rc.0
|
|
263
|
+
*/
|
|
264
|
+
export declare const skillLimit = 12;
|
|
265
|
+
/**
|
|
266
|
+
* The most of one skill's description a snapshot carries, in UTF-8 bytes.
|
|
267
|
+
*
|
|
268
|
+
* @category constants
|
|
269
|
+
* @since 1.0.0-rc.0
|
|
270
|
+
*/
|
|
271
|
+
export declare const skillBytes = 256;
|
|
272
|
+
/**
|
|
273
|
+
* The most distinct flow names {@link Snapshot} `called` carries.
|
|
274
|
+
*
|
|
275
|
+
* @category constants
|
|
276
|
+
* @since 1.0.0-rc.0
|
|
277
|
+
*/
|
|
278
|
+
export declare const calledLimit = 64;
|
|
279
|
+
/**
|
|
280
|
+
* One skill the run could read and has neither called nor read.
|
|
281
|
+
*
|
|
282
|
+
* @category schemas
|
|
283
|
+
* @since 1.0.0-rc.0
|
|
284
|
+
*/
|
|
285
|
+
export declare const Skill: Schema.Struct<{
|
|
286
|
+
readonly name: Schema.String;
|
|
287
|
+
readonly description: Schema.String;
|
|
288
|
+
readonly path: Schema.String;
|
|
289
|
+
}>;
|
|
290
|
+
/**
|
|
291
|
+
* The decoded form of {@link Skill}.
|
|
292
|
+
*
|
|
293
|
+
* @category models
|
|
294
|
+
* @since 1.0.0-rc.0
|
|
295
|
+
*/
|
|
296
|
+
export type Skill = typeof Skill.Type;
|
|
297
|
+
/**
|
|
298
|
+
* One skill as a snapshot offers it: its description's head within
|
|
299
|
+
* {@link skillBytes}, wrapped as untrusted data.
|
|
300
|
+
*
|
|
301
|
+
* @category constructors
|
|
302
|
+
* @since 1.0.0-rc.0
|
|
303
|
+
*/
|
|
304
|
+
export declare const skill: (name: string, description: string, path: string) => Skill;
|
|
305
|
+
/**
|
|
306
|
+
* Everything one supervisor reading is a reading of.
|
|
307
|
+
*
|
|
308
|
+
* @category schemas
|
|
309
|
+
* @since 1.0.0-rc.0
|
|
310
|
+
*/
|
|
311
|
+
export declare const Snapshot: Schema.Struct<{
|
|
312
|
+
readonly task: Schema.String;
|
|
313
|
+
readonly frames: Schema.$Array<Schema.Struct<{
|
|
314
|
+
readonly frame: Schema.Int;
|
|
315
|
+
readonly cell: Schema.String;
|
|
316
|
+
readonly prose: Schema.String;
|
|
317
|
+
readonly printed: Schema.String;
|
|
318
|
+
readonly transition: Schema.Literals<readonly ["continue", "complete", "park", "raised", "rejected"]>;
|
|
319
|
+
readonly mutated: Schema.Boolean;
|
|
320
|
+
}>>;
|
|
321
|
+
readonly signals: Schema.Struct<{
|
|
322
|
+
readonly frame: Schema.Int;
|
|
323
|
+
readonly maxFrames: Schema.Int;
|
|
324
|
+
readonly readOnlyFrames: Schema.Int;
|
|
325
|
+
readonly repeatFrames: Schema.Int;
|
|
326
|
+
readonly mutations: Schema.Int;
|
|
327
|
+
readonly remoteMutations: Schema.Int;
|
|
328
|
+
readonly treeMoved: Schema.Boolean;
|
|
329
|
+
readonly paths: Schema.Int;
|
|
330
|
+
readonly checksRun: Schema.Int;
|
|
331
|
+
readonly checksFailing: Schema.Int;
|
|
332
|
+
readonly failuresUnanswered: Schema.Int;
|
|
333
|
+
readonly callsFailed: Schema.Int;
|
|
334
|
+
readonly callsSettled: Schema.Int;
|
|
335
|
+
readonly narrowingDemands: Schema.Int;
|
|
336
|
+
readonly unmovedDemands: Schema.Int;
|
|
337
|
+
readonly unresolvedDemands: Schema.Int;
|
|
338
|
+
readonly claimDemands: Schema.Int;
|
|
339
|
+
readonly sufficiencyStated: Schema.Boolean;
|
|
340
|
+
}>;
|
|
341
|
+
readonly skills: Schema.$Array<Schema.Struct<{
|
|
342
|
+
readonly name: Schema.String;
|
|
343
|
+
readonly description: Schema.String;
|
|
344
|
+
readonly path: Schema.String;
|
|
345
|
+
}>>;
|
|
346
|
+
readonly called: Schema.$Array<Schema.String>;
|
|
347
|
+
readonly jevAvailable: Schema.Boolean;
|
|
348
|
+
}>;
|
|
349
|
+
/**
|
|
350
|
+
* The decoded form of {@link Snapshot}.
|
|
351
|
+
*
|
|
352
|
+
* @category models
|
|
353
|
+
* @since 1.0.0-rc.0
|
|
354
|
+
*/
|
|
355
|
+
export type Snapshot = typeof Snapshot.Type;
|
|
356
|
+
/**
|
|
357
|
+
* The prefix of every question a monitor adds to a reading; the rest of the
|
|
358
|
+
* id is the monitor's own.
|
|
359
|
+
*
|
|
360
|
+
* @category constants
|
|
361
|
+
* @since 1.0.0-rc.0
|
|
362
|
+
*/
|
|
363
|
+
export declare const monitorPrefix = "monitor_";
|
|
364
|
+
/**
|
|
365
|
+
* The questions a snapshot's monitors add, by `monitor_<id>`.
|
|
366
|
+
*
|
|
367
|
+
* @category models
|
|
368
|
+
* @since 1.0.0-rc.0
|
|
369
|
+
*/
|
|
370
|
+
export type MonitorQuestions = Readonly<Record<`${typeof monitorPrefix}${string}`, Classifier.BooleanQuestion>>;
|
|
371
|
+
declare const declare: (extra: MonitorQuestions) => Classifier.Classifier<"supervisor/turn", Schema.Struct<{
|
|
372
|
+
readonly task: Schema.String;
|
|
373
|
+
readonly frames: Schema.$Array<Schema.Struct<{
|
|
374
|
+
readonly frame: Schema.Int;
|
|
375
|
+
readonly cell: Schema.String;
|
|
376
|
+
readonly prose: Schema.String;
|
|
377
|
+
readonly printed: Schema.String;
|
|
378
|
+
readonly transition: Schema.Literals<readonly ["continue", "complete", "park", "raised", "rejected"]>;
|
|
379
|
+
readonly mutated: Schema.Boolean;
|
|
380
|
+
}>>;
|
|
381
|
+
readonly signals: Schema.Struct<{
|
|
382
|
+
readonly frame: Schema.Int;
|
|
383
|
+
readonly maxFrames: Schema.Int;
|
|
384
|
+
readonly readOnlyFrames: Schema.Int;
|
|
385
|
+
readonly repeatFrames: Schema.Int;
|
|
386
|
+
readonly mutations: Schema.Int;
|
|
387
|
+
readonly remoteMutations: Schema.Int;
|
|
388
|
+
readonly treeMoved: Schema.Boolean;
|
|
389
|
+
readonly paths: Schema.Int;
|
|
390
|
+
readonly checksRun: Schema.Int;
|
|
391
|
+
readonly checksFailing: Schema.Int;
|
|
392
|
+
readonly failuresUnanswered: Schema.Int;
|
|
393
|
+
readonly callsFailed: Schema.Int;
|
|
394
|
+
readonly callsSettled: Schema.Int;
|
|
395
|
+
readonly narrowingDemands: Schema.Int;
|
|
396
|
+
readonly unmovedDemands: Schema.Int;
|
|
397
|
+
readonly unresolvedDemands: Schema.Int;
|
|
398
|
+
readonly claimDemands: Schema.Int;
|
|
399
|
+
readonly sufficiencyStated: Schema.Boolean;
|
|
400
|
+
}>;
|
|
401
|
+
readonly skills: Schema.$Array<Schema.Struct<{
|
|
402
|
+
readonly name: Schema.String;
|
|
403
|
+
readonly description: Schema.String;
|
|
404
|
+
readonly path: Schema.String;
|
|
405
|
+
}>>;
|
|
406
|
+
readonly called: Schema.$Array<Schema.String>;
|
|
407
|
+
readonly jevAvailable: Schema.Boolean;
|
|
408
|
+
}>, {
|
|
409
|
+
readonly thrashing: Evaluator.BooleanQuestion;
|
|
410
|
+
readonly on_target: Evaluator.BooleanQuestion;
|
|
411
|
+
readonly suspect: Evaluator.BooleanQuestion;
|
|
412
|
+
readonly outdated_context: Evaluator.BooleanQuestion;
|
|
413
|
+
readonly irrelevant_context: Evaluator.BooleanQuestion;
|
|
414
|
+
readonly frustrated: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
415
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
416
|
+
};
|
|
417
|
+
readonly anxious: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
418
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
419
|
+
};
|
|
420
|
+
readonly scared: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
421
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
422
|
+
};
|
|
423
|
+
readonly confused: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
424
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
425
|
+
};
|
|
426
|
+
readonly confident: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
427
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
428
|
+
};
|
|
429
|
+
readonly needs_help: Omit<Evaluator.ChoiceQuestion, "criteria"> & {
|
|
430
|
+
readonly criteria: {
|
|
431
|
+
readonly none: "nothing; the run can carry on";
|
|
432
|
+
readonly clarification: "the task is ambiguous or contradicted and a person must say which reading is meant";
|
|
433
|
+
readonly permission: "the run is blocked on a permission or sandbox refusal a person can grant";
|
|
434
|
+
readonly stuck: "the run is not converging and a person should intervene";
|
|
435
|
+
readonly risky_action: "the run is about to do something destructive, irreversible or out of scope";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
}>;
|
|
439
|
+
/**
|
|
440
|
+
* The classifier for a snapshot with these monitor questions.
|
|
441
|
+
*
|
|
442
|
+
* The fixed questions are the same for every snapshot and the monitors' follow
|
|
443
|
+
* them, so a snapshot with no monitor questions asks the eleven fixed
|
|
444
|
+
* questions and no others. Declared once per set of monitor ids, and again
|
|
445
|
+
* when a monitor id asks a different question, because the digest is the
|
|
446
|
+
* canonical hash of the questions and the journal names it.
|
|
447
|
+
*
|
|
448
|
+
* @category classifiers
|
|
449
|
+
* @since 1.0.0-rc.0
|
|
450
|
+
*/
|
|
451
|
+
export declare const classifierFor: (extra: MonitorQuestions) => ReturnType<typeof declare>;
|
|
452
|
+
/**
|
|
453
|
+
* The classifier over a bare snapshot: the eleven fixed questions and no
|
|
454
|
+
* monitor booleans. Its id is the id every shape shares.
|
|
455
|
+
*
|
|
456
|
+
* @category classifiers
|
|
457
|
+
* @since 1.0.0-rc.0
|
|
458
|
+
*/
|
|
459
|
+
export declare const classifier: Classifier.Classifier<"supervisor/turn", Schema.Struct<{
|
|
460
|
+
readonly task: Schema.String;
|
|
461
|
+
readonly frames: Schema.$Array<Schema.Struct<{
|
|
462
|
+
readonly frame: Schema.Int;
|
|
463
|
+
readonly cell: Schema.String;
|
|
464
|
+
readonly prose: Schema.String;
|
|
465
|
+
readonly printed: Schema.String;
|
|
466
|
+
readonly transition: Schema.Literals<readonly ["continue", "complete", "park", "raised", "rejected"]>;
|
|
467
|
+
readonly mutated: Schema.Boolean;
|
|
468
|
+
}>>;
|
|
469
|
+
readonly signals: Schema.Struct<{
|
|
470
|
+
readonly frame: Schema.Int;
|
|
471
|
+
readonly maxFrames: Schema.Int;
|
|
472
|
+
readonly readOnlyFrames: Schema.Int;
|
|
473
|
+
readonly repeatFrames: Schema.Int;
|
|
474
|
+
readonly mutations: Schema.Int;
|
|
475
|
+
readonly remoteMutations: Schema.Int;
|
|
476
|
+
readonly treeMoved: Schema.Boolean;
|
|
477
|
+
readonly paths: Schema.Int;
|
|
478
|
+
readonly checksRun: Schema.Int;
|
|
479
|
+
readonly checksFailing: Schema.Int;
|
|
480
|
+
readonly failuresUnanswered: Schema.Int;
|
|
481
|
+
readonly callsFailed: Schema.Int;
|
|
482
|
+
readonly callsSettled: Schema.Int;
|
|
483
|
+
readonly narrowingDemands: Schema.Int;
|
|
484
|
+
readonly unmovedDemands: Schema.Int;
|
|
485
|
+
readonly unresolvedDemands: Schema.Int;
|
|
486
|
+
readonly claimDemands: Schema.Int;
|
|
487
|
+
readonly sufficiencyStated: Schema.Boolean;
|
|
488
|
+
}>;
|
|
489
|
+
readonly skills: Schema.$Array<Schema.Struct<{
|
|
490
|
+
readonly name: Schema.String;
|
|
491
|
+
readonly description: Schema.String;
|
|
492
|
+
readonly path: Schema.String;
|
|
493
|
+
}>>;
|
|
494
|
+
readonly called: Schema.$Array<Schema.String>;
|
|
495
|
+
readonly jevAvailable: Schema.Boolean;
|
|
496
|
+
}>, {
|
|
497
|
+
readonly thrashing: Evaluator.BooleanQuestion;
|
|
498
|
+
readonly on_target: Evaluator.BooleanQuestion;
|
|
499
|
+
readonly suspect: Evaluator.BooleanQuestion;
|
|
500
|
+
readonly outdated_context: Evaluator.BooleanQuestion;
|
|
501
|
+
readonly irrelevant_context: Evaluator.BooleanQuestion;
|
|
502
|
+
readonly frustrated: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
503
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
504
|
+
};
|
|
505
|
+
readonly anxious: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
506
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
507
|
+
};
|
|
508
|
+
readonly scared: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
509
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
510
|
+
};
|
|
511
|
+
readonly confused: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
512
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
513
|
+
};
|
|
514
|
+
readonly confident: Omit<Evaluator.ScoreQuestion, "criteria"> & {
|
|
515
|
+
readonly criteria: readonly ["none", "mild", "strong"];
|
|
516
|
+
};
|
|
517
|
+
readonly needs_help: Omit<Evaluator.ChoiceQuestion, "criteria"> & {
|
|
518
|
+
readonly criteria: {
|
|
519
|
+
readonly none: "nothing; the run can carry on";
|
|
520
|
+
readonly clarification: "the task is ambiguous or contradicted and a person must say which reading is meant";
|
|
521
|
+
readonly permission: "the run is blocked on a permission or sandbox refusal a person can grant";
|
|
522
|
+
readonly stuck: "the run is not converging and a person should intervene";
|
|
523
|
+
readonly risky_action: "the run is about to do something destructive, irreversible or out of scope";
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
}>;
|
|
527
|
+
/**
|
|
528
|
+
* What one evaluation came back with, decoded.
|
|
529
|
+
*
|
|
530
|
+
* @category models
|
|
531
|
+
* @since 1.0.0-rc.0
|
|
532
|
+
*/
|
|
533
|
+
export interface Reading {
|
|
534
|
+
readonly thrashing: number;
|
|
535
|
+
readonly onTarget: number;
|
|
536
|
+
readonly suspect: number;
|
|
537
|
+
readonly outdatedContext: number;
|
|
538
|
+
readonly irrelevantContext: number;
|
|
539
|
+
readonly emotions: Readonly<Record<Emotion, Level>>;
|
|
540
|
+
readonly needsHelp: Help;
|
|
541
|
+
/** The probability of each monitor question asked, by monitor id. */
|
|
542
|
+
readonly monitors: Readonly<Record<string, number>>;
|
|
543
|
+
readonly latencyMs: number;
|
|
544
|
+
readonly usage?: Evaluator.Usage | undefined;
|
|
545
|
+
/** What was asked and what came back, for `decision-settled`. */
|
|
546
|
+
readonly asked: {
|
|
547
|
+
readonly digest: string;
|
|
548
|
+
readonly questions: Classifier.Questions;
|
|
549
|
+
readonly state: Schema.Json;
|
|
550
|
+
readonly answers: Readonly<Record<string, AgentEvent.DecisionAnswer>>;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Asks Jev about one snapshot, and the monitor questions `extra` adds.
|
|
555
|
+
*
|
|
556
|
+
* Fails, typed, whenever an answer could not be obtained: no evaluator bound,
|
|
557
|
+
* a transport refusal, a deadline, an answer that does not decode. There is
|
|
558
|
+
* no reading of a snapshot Jev did not read.
|
|
559
|
+
*
|
|
560
|
+
* @category conversions
|
|
561
|
+
* @since 1.0.0-rc.0
|
|
562
|
+
*/
|
|
563
|
+
export declare const read: (snapshot: Snapshot, extra: MonitorQuestions) => Effect.Effect<Reading, Judgement.Unjudged>;
|
|
564
|
+
/**
|
|
565
|
+
* The memory a supervisor reads rows from, and the run-end transcript miner
|
|
566
|
+
* writes accepted facts to.
|
|
567
|
+
*
|
|
568
|
+
* A port, so this package needs no memory store: the production composition
|
|
569
|
+
* adapts `@smthrs/memory` to it, and a test binds a recording double. The
|
|
570
|
+
* default is {@link memoryNone}, which recalls nothing and writes nothing.
|
|
571
|
+
*
|
|
572
|
+
* @category services
|
|
573
|
+
* @since 1.0.0-rc.0
|
|
574
|
+
*/
|
|
575
|
+
export interface Memory {
|
|
576
|
+
/** Whether anything is behind this port; false is the default. */
|
|
577
|
+
readonly bound: boolean;
|
|
578
|
+
/** Rows relevant to the query, most relevant first, bounded by the caller. */
|
|
579
|
+
readonly recall: (query: string, limit: number) => Effect.Effect<ReadonlyArray<Recalled>, MemoryFailure>;
|
|
580
|
+
/**
|
|
581
|
+
* Writes one accepted fact. A store that refuses it fails typed, and the
|
|
582
|
+
* writer journals `supervisor-memory-failed` and carries on.
|
|
583
|
+
*/
|
|
584
|
+
readonly remember: (text: string) => Effect.Effect<void, MemoryFailure>;
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* What a {@link Memory} fails with: the store's own account, safe to journal.
|
|
588
|
+
*
|
|
589
|
+
* @category models
|
|
590
|
+
* @since 1.0.0-rc.0
|
|
591
|
+
*/
|
|
592
|
+
export interface MemoryFailure {
|
|
593
|
+
readonly detail: string;
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* A memory with nothing behind it.
|
|
597
|
+
*
|
|
598
|
+
* @category constructors
|
|
599
|
+
* @since 1.0.0-rc.0
|
|
600
|
+
*/
|
|
601
|
+
export declare const memoryNone: Memory;
|
|
602
|
+
/**
|
|
603
|
+
* The {@link Memory} reference, defaulting to {@link memoryNone}.
|
|
604
|
+
*
|
|
605
|
+
* @category services
|
|
606
|
+
* @since 1.0.0-rc.0
|
|
607
|
+
*/
|
|
608
|
+
export declare const Memory: Context.Reference<Memory>;
|
|
609
|
+
/**
|
|
610
|
+
* The five triggers a reading fires, by name, each with the inequality that
|
|
611
|
+
* fires it. The one rule: the `supervisor` lint monitor crosses on it,
|
|
612
|
+
* {@link nudge} names from it, {@link compacting} reads its context triggers,
|
|
613
|
+
* and the offline replay scores it, so they cannot drift apart.
|
|
614
|
+
*
|
|
615
|
+
* @category constants
|
|
616
|
+
* @since 1.0.0-rc.0
|
|
617
|
+
*/
|
|
618
|
+
export declare const triggers: {
|
|
619
|
+
readonly thrashing: (reading: Triggerable) => boolean;
|
|
620
|
+
readonly off_target: (reading: Triggerable) => boolean;
|
|
621
|
+
readonly suspect: (reading: Triggerable) => boolean;
|
|
622
|
+
readonly outdated_context: (reading: Triggerable) => boolean;
|
|
623
|
+
readonly irrelevant_context: (reading: Triggerable) => boolean;
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* The fields of a {@link Reading} the triggers read.
|
|
627
|
+
*
|
|
628
|
+
* @category models
|
|
629
|
+
* @since 1.0.0-rc.0
|
|
630
|
+
*/
|
|
631
|
+
export type Triggerable = Pick<Reading, "thrashing" | "onTarget" | "suspect" | "outdatedContext" | "irrelevantContext">;
|
|
632
|
+
/**
|
|
633
|
+
* One of {@link triggers}.
|
|
634
|
+
*
|
|
635
|
+
* @category models
|
|
636
|
+
* @since 1.0.0-rc.0
|
|
637
|
+
*/
|
|
638
|
+
export type Trigger = keyof typeof triggers;
|
|
639
|
+
/**
|
|
640
|
+
* The triggers one reading fires, in declaration order.
|
|
641
|
+
*
|
|
642
|
+
* @category conversions
|
|
643
|
+
* @since 1.0.0-rc.0
|
|
644
|
+
*/
|
|
645
|
+
export declare const triggered: (reading: Triggerable) => ReadonlyArray<Trigger>;
|
|
646
|
+
/**
|
|
647
|
+
* The triggers that compact the run's context instead of nudging it.
|
|
648
|
+
*
|
|
649
|
+
* @category constants
|
|
650
|
+
* @since 1.0.0-rc.0
|
|
651
|
+
*/
|
|
652
|
+
export declare const contextTriggers: readonly ["outdated_context", "irrelevant_context"];
|
|
653
|
+
/**
|
|
654
|
+
* One of {@link contextTriggers}.
|
|
655
|
+
*
|
|
656
|
+
* @category models
|
|
657
|
+
* @since 1.0.0-rc.0
|
|
658
|
+
*/
|
|
659
|
+
export type ContextTrigger = typeof contextTriggers[number];
|
|
660
|
+
/**
|
|
661
|
+
* Whether one reading crosses: any trigger but a context one fires. A context
|
|
662
|
+
* trigger compacts the run's context at the next frame instead; see
|
|
663
|
+
* {@link compacting}.
|
|
664
|
+
*
|
|
665
|
+
* @category conversions
|
|
666
|
+
* @since 1.0.0-rc.0
|
|
667
|
+
*/
|
|
668
|
+
export declare const crosses: (reading: Triggerable) => boolean;
|
|
669
|
+
/**
|
|
670
|
+
* The context triggers one reading fires, in declaration order: why a judged
|
|
671
|
+
* run that is sent this reading compacts at its next frame.
|
|
672
|
+
*
|
|
673
|
+
* @category conversions
|
|
674
|
+
* @since 1.0.0-rc.0
|
|
675
|
+
*/
|
|
676
|
+
export declare const compacting: (reading: Triggerable) => ReadonlyArray<ContextTrigger>;
|
|
677
|
+
/**
|
|
678
|
+
* The nudge a crossed reading puts in front of the run, naming its evidence.
|
|
679
|
+
*
|
|
680
|
+
* Concise on purpose, and built from counts rather than from the model's
|
|
681
|
+
* prose: what the run is told is what the harness measured, and the reading's
|
|
682
|
+
* probabilities say only which measurements to name.
|
|
683
|
+
*
|
|
684
|
+
* @category conversions
|
|
685
|
+
* @since 1.0.0-rc.0
|
|
686
|
+
*/
|
|
687
|
+
export declare const nudge: (snapshot: Snapshot, reading: Reading) => string;
|
|
688
|
+
/**
|
|
689
|
+
* Renders one recalled row as the run reads it.
|
|
690
|
+
*
|
|
691
|
+
* @category conversions
|
|
692
|
+
* @since 1.0.0-rc.0
|
|
693
|
+
*/
|
|
694
|
+
export declare const recalledInsert: (row: Recalled) => string;
|
|
695
|
+
/**
|
|
696
|
+
* The head of a frame's cell or prose, bounded by {@link frameBytes}.
|
|
697
|
+
*
|
|
698
|
+
* @category conversions
|
|
699
|
+
* @since 1.0.0-rc.0
|
|
700
|
+
*/
|
|
701
|
+
export declare const head: (text: string) => string;
|
|
702
|
+
/**
|
|
703
|
+
* The newest {@link frameBytes} of a frame's prints.
|
|
704
|
+
*
|
|
705
|
+
* @category conversions
|
|
706
|
+
* @since 1.0.0-rc.0
|
|
707
|
+
*/
|
|
708
|
+
export declare const tail: (text: string) => string;
|
|
709
|
+
/**
|
|
710
|
+
* What the model wrote around its cell: the reply with every fenced cell
|
|
711
|
+
* removed. The anxiety question reads it, and so does the run-end
|
|
712
|
+
* transcript miner.
|
|
713
|
+
*
|
|
714
|
+
* @category conversions
|
|
715
|
+
* @since 1.0.0-rc.0
|
|
716
|
+
*/
|
|
717
|
+
export declare const prose: (text: string) => string;
|
|
718
|
+
export {};
|
|
719
|
+
//# sourceMappingURL=Supervisor.d.ts.map
|