@rulvar/core 1.171.0 → 1.173.0

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/dist/index.d.ts CHANGED
@@ -7933,6 +7933,20 @@ interface ClaimPairOptions {
7933
7933
  maxPoolPerPair?: number;
7934
7934
  /** Bound on each excerpt; default {@link DEFAULT_MAX_PAIR_EXCERPT_CHARS}. */
7935
7935
  maxExcerptChars?: number;
7936
+ /**
7937
+ * Critical anchor declarations (RV1603): each entry is a path
7938
+ * (`packages/executor/src/ledger.ts`, matching that file and anything
7939
+ * under it as a directory) or an anchor with a span
7940
+ * (`src/exec.ts:250-300`, matching same-file anchors intersecting the
7941
+ * span). Pairs whose draft anchor matches sort FIRST, before the
7942
+ * `max` cap applies, so a bounded pass judges the declared claims
7943
+ * preferentially; the fold also reports which critical draft anchors
7944
+ * ended up with no reported pair. Unset = the exact pre-RV1603
7945
+ * ordering, byte for byte (the eighteenth comparison benchmark's
7946
+ * judge saw 40 of 144 citing sentences with nothing steering WHICH
7947
+ * 40).
7948
+ */
7949
+ critical?: readonly string[];
7936
7950
  }
7937
7951
  /** What the fold produced, beside the pairs themselves. */
7938
7952
  interface ClaimPairsFold {
@@ -7942,10 +7956,28 @@ interface ClaimPairsFold {
7942
7956
  truncated: boolean;
7943
7957
  /** Draft sentences carrying at least one parsable anchor. */
7944
7958
  draftCitingSentences: number;
7959
+ /**
7960
+ * Citing sentences with at least one REPORTED pair (RV1603): the
7961
+ * honest coverage numerator against `draftCitingSentences`. A
7962
+ * sentence can be uncovered because nothing in the pool read its
7963
+ * files, because every reading agreed verbatim, or because the `max`
7964
+ * cap cut it; all three mean the judge never saw it.
7965
+ */
7966
+ coveredCitingSentences: number;
7967
+ /**
7968
+ * Present only when `critical` was given: the critical draft anchors
7969
+ * (verbatim, draft order, deduplicated) with no reported pair, capped
7970
+ * at {@link MAX_CRITICAL_UNCOVERED} entries.
7971
+ */
7972
+ criticalUncovered?: string[];
7973
+ /** The uncapped count behind `criticalUncovered`; present with it. */
7974
+ criticalUncoveredTotal?: number;
7945
7975
  }
7946
7976
  declare const DEFAULT_MAX_CLAIM_PAIRS = 40;
7947
7977
  declare const DEFAULT_MAX_POOL_PER_PAIR = 3;
7948
7978
  declare const DEFAULT_MAX_PAIR_EXCERPT_CHARS = 400;
7979
+ /** Bound on the reported uncovered-critical anchor list (RV1603). */
7980
+ declare const MAX_CRITICAL_UNCOVERED = 32;
7949
7981
  /**
7950
7982
  * Folds the composed draft against the settled pool it composed from:
7951
7983
  * every draft sentence citing an anchor is paired with the pool
@@ -7955,6 +7987,54 @@ declare const DEFAULT_MAX_PAIR_EXCERPT_CHARS = 400;
7955
7987
  * journaling anything (the `findContradictions` precedent).
7956
7988
  */
7957
7989
  declare function pairDraftClaims(draftText: string, rows: readonly ContradictionSource[], options?: ClaimPairOptions): ClaimPairsFold;
7990
+ /** The synthetic anchor and nodeId of run-facts pairs (RV1603). */
7991
+ declare const RUN_FACTS_ANCHOR = "(run-facts)";
7992
+ declare const DEFAULT_MAX_RUN_FACT_PAIRS = 8;
7993
+ /** The sheet excerpt bound: one sheet rides EVERY run-facts pair. */
7994
+ declare const MAX_RUN_FACTS_SHEET_CHARS = 1200;
7995
+ /**
7996
+ * The run's own recorded execution facts, prepared by the caller
7997
+ * (deterministic sentences plus the trigger vocabularies).
7998
+ */
7999
+ interface RunFactsSheet {
8000
+ /** Deterministic sentences of the recorded facts. */
8001
+ text: string;
8002
+ /** Identity triggers: ids the run itself minted (runId, child node ids). */
8003
+ ids: readonly string[];
8004
+ /** Numeric triggers: recorded fact values (counts, totals). */
8005
+ numbers: readonly number[];
8006
+ }
8007
+ interface RunFactPairOptions {
8008
+ /** Case-insensitive substring triggers, e.g. 'not run' or a locale phrase. */
8009
+ terms?: readonly string[];
8010
+ /** Bound on returned pairs; default {@link DEFAULT_MAX_RUN_FACT_PAIRS}. */
8011
+ max?: number;
8012
+ /** Bound on the draft excerpt; default {@link DEFAULT_MAX_PAIR_EXCERPT_CHARS}. */
8013
+ maxExcerptChars?: number;
8014
+ }
8015
+ interface RunFactPairsFold {
8016
+ /** The pairs, in draft order, capped at `max`; anchor {@link RUN_FACTS_ANCHOR}. */
8017
+ pairs: ClaimPair[];
8018
+ /** True when more sentences matched than `max` allowed to report. */
8019
+ truncated: boolean;
8020
+ }
8021
+ /**
8022
+ * Pairs draft sentences that speak about the RUN with the run's own
8023
+ * recorded fact sheet (RV1603), so the same judge invocation that rules
8024
+ * on source claims also rules on run claims. The eighteenth comparison
8025
+ * benchmark shipped both failure shapes this closes: a dossier claiming
8026
+ * "each role recorded 18-20 evidence entries" over recorded profiles of
8027
+ * 23/18/22/20/20/20, and "real models were not run" beside 125 recorded
8028
+ * wire requests, with executionFacts ENABLED on the input side; facts
8029
+ * offered to the composer verify nothing about what it composed.
8030
+ *
8031
+ * A sentence pairs when it names a minted id, a recorded fact value
8032
+ * (standalone, two digits or more, so a prose "6" cannot flood the
8033
+ * fold), or a caller-supplied term (case-insensitive). Pure and
8034
+ * deterministic like {@link pairDraftClaims}; the sheet excerpt rides
8035
+ * every pair, capped at {@link MAX_RUN_FACTS_SHEET_CHARS}.
8036
+ */
8037
+ declare function pairRunFactClaims(draftText: string, sheet: RunFactsSheet, options?: RunFactPairOptions): RunFactPairsFold;
7958
8038
  //#endregion
7959
8039
  //#region src/orchestrator/output-contract.d.ts
7960
8040
  /** The golden citation sample used with {@link DEFAULT_CITATION_PATTERN}. */
@@ -9179,6 +9259,50 @@ interface OrchestrateClaimConsistency {
9179
9259
  maxPoolPerPair?: number;
9180
9260
  /** Bound on each excerpt; default {@link DEFAULT_MAX_PAIR_EXCERPT_CHARS}. */
9181
9261
  maxExcerptChars?: number;
9262
+ /**
9263
+ * Critical anchor declarations (RV1603): paths (a file, or a
9264
+ * directory matched as a prefix) or span anchors
9265
+ * (`src/exec.ts:250-300`). Pairs whose draft anchor matches sort
9266
+ * FIRST, before the `max` cap, so the bounded judge spends its
9267
+ * budget on the declared claims, and the meta names every critical
9268
+ * draft anchor that ended up unjudged (`criticalUncovered`). The
9269
+ * eighteenth comparison benchmark judged 40 of 144 citing sentences
9270
+ * with nothing steering which 40 and nothing saying what was left
9271
+ * out. Unset = the exact historical pairing order, byte for byte.
9272
+ */
9273
+ critical?: string[];
9274
+ /**
9275
+ * What an unjudged critical anchor does (RV1603): 'report' (the
9276
+ * default) names them on the meta only; 'fail' fails the run typed
9277
+ * with `data.source` 'orchestrator_claim_consistency' BEFORE the
9278
+ * judge dispatch, so a run whose declared claims cannot be verified
9279
+ * never pays for a partial verdict. Requires `critical`.
9280
+ */
9281
+ onUncoveredCritical?: "report" | "fail";
9282
+ /**
9283
+ * The run-facts grounding opt-in (RV1603): the run's own recorded
9284
+ * execution facts (accepted children, statuses, recorded evidence
9285
+ * entry counts, wire request and token totals; the
9286
+ * {@link executionFactsOf} material plus the entries plumbing) become
9287
+ * one more pool reading, and draft sentences that SPEAK about the
9288
+ * run (naming a minted id, a recorded fact value of two or more
9289
+ * digits, or a `runFactTerms` phrase) are paired with that sheet
9290
+ * under the `(run-facts)` anchor, judged by the same invocation.
9291
+ * Closes the eighteenth benchmark's live gap: a dossier claimed
9292
+ * "each role recorded 18-20 evidence entries" over recorded profiles
9293
+ * of 23/18/22/20/20/20 and "real models were not run" beside 125
9294
+ * recorded wire requests, with `executionFacts` enabled; facts
9295
+ * offered to the composer verify nothing about what it composed.
9296
+ * Off by default: judge prompt bytes stay identical when unset.
9297
+ */
9298
+ runFacts?: boolean;
9299
+ /**
9300
+ * Case-insensitive phrases that mark a draft sentence as a run
9301
+ * claim for the `runFacts` pass (negations carry no number: "real
9302
+ * models were not run" pairs only through a term). Requires
9303
+ * `runFacts: true`.
9304
+ */
9305
+ runFactTerms?: string[];
9182
9306
  }
9183
9307
  /** One judged contradiction: the pair plus the judge's one-sentence reason. */
9184
9308
  interface ClaimContradictionFinding extends ClaimPair {
@@ -9204,6 +9328,24 @@ interface OrchestrateClaimConsistencyMeta {
9204
9328
  pairs: number;
9205
9329
  /** True when more pairs existed than `max` allowed to judge. */
9206
9330
  truncated: boolean;
9331
+ /**
9332
+ * Citing sentences with at least one judged pair (RV1603): the honest
9333
+ * coverage numerator against `draftCitingSentences`, so `[]` findings
9334
+ * over 40 of 144 sentences can never read as "fully verified".
9335
+ */
9336
+ coveredCitingSentences: number;
9337
+ /**
9338
+ * Present when `critical` was declared: the critical draft anchors
9339
+ * with no judged pair (capped at {@link MAX_CRITICAL_UNCOVERED});
9340
+ * `[]` means every declared claim the draft cited was judged.
9341
+ */
9342
+ criticalUncovered?: string[];
9343
+ /** The uncapped count behind `criticalUncovered`; present with it. */
9344
+ criticalUncoveredTotal?: number;
9345
+ /** Present under `runFacts`: run-claim pairs judged against the fact sheet. */
9346
+ runFactPairs?: number;
9347
+ /** Present under `runFacts` when more run claims matched than the bound. */
9348
+ runFactPairsTruncated?: true;
9207
9349
  /** True when the judge invocation was dispatched. */
9208
9350
  judgeInvoked: boolean;
9209
9351
  /** Present when the judge invocation did not settle ok. */
@@ -10855,6 +10997,18 @@ interface McpConfig {
10855
10997
  */
10856
10998
  maxTools?: number;
10857
10999
  /**
11000
+ * Cap on tools/list PAGES fetched in one sweep (RV1602): a server
11001
+ * paginating past it refuses typed, fail closed like maxTools (a
11002
+ * truncated import would silently admit a subset of the declared
11003
+ * surface). Bounds the sweep's WIRE CALL count where maxTools bounds
11004
+ * its volume: unique cursors over empty pages grow neither the tool
11005
+ * count nor any timeout (each page answers inside listMs), so only a
11006
+ * page bound stops them. Positive integer; absent = unbounded.
11007
+ * Independent of the unconditional cursor-echo cycle guard, which
11008
+ * needs no configuration.
11009
+ */
11010
+ maxPages?: number;
11011
+ /**
10858
11012
  * Per ADMITTED tool (allow/deny filter first): the UTF-8 byte length
10859
11013
  * of the serialized inputSchema plus outputSchema when present
10860
11014
  * (RV1515). An oversized tool refuses the resolution typed, naming
@@ -12712,4 +12866,4 @@ interface SandboxBridge {
12712
12866
  declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
12713
12867
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
12714
12868
  //#endregion
12715
- export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, SectionMatchMode, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolContractHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
12869
+ export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, RunFactPairOptions, RunFactPairsFold, RunFactsSheet, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, SectionMatchMode, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolContractHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
package/dist/index.js CHANGED
@@ -3885,6 +3885,7 @@ function validateBounds(cfg) {
3885
3885
  if (value !== void 0 && (!Number.isInteger(value) || value <= 0)) throw new ConfigError(`mcp: '${key}' must be a positive integer, got ${String(value)}`);
3886
3886
  };
3887
3887
  positiveInt("maxTools");
3888
+ positiveInt("maxPages");
3888
3889
  positiveInt("maxSchemaBytes");
3889
3890
  for (const key of [
3890
3891
  "connectMs",
@@ -4034,12 +4035,16 @@ function mcp(cfg) {
4034
4035
  const listAll = async (client) => {
4035
4036
  const tools = [];
4036
4037
  let cursor;
4038
+ let pages = 0;
4037
4039
  const listOptions = cfg.timeouts?.listMs === void 0 ? void 0 : { timeout: cfg.timeouts.listMs };
4038
4040
  do {
4039
4041
  const page = await client.listTools(cursor === void 0 ? {} : { cursor }, listOptions);
4042
+ pages += 1;
4040
4043
  tools.push(...page.tools);
4041
4044
  if (cfg.maxTools !== void 0 && tools.length > cfg.maxTools) throw new ConfigError(`mcp: tools/list of '${sourceIdOf(cfg)}' returned at least ${tools.length} wire tools, over the declared maxTools ${cfg.maxTools}; raise the cap or trim the server`);
4045
+ if (page.nextCursor !== void 0 && page.nextCursor !== "" && page.nextCursor === cursor) throw new ConfigError(`mcp: tools/list of '${sourceIdOf(cfg)}' returned the cursor it was queried with ('${page.nextCursor}') on page ${pages}: the pagination makes no progress`);
4042
4046
  cursor = page.nextCursor;
4047
+ if (cfg.maxPages !== void 0 && pages >= cfg.maxPages && cursor !== void 0 && cursor !== "") throw new ConfigError(`mcp: tools/list of '${sourceIdOf(cfg)}' still reports another page after ${pages} page(s), over the declared maxPages ${cfg.maxPages}; raise the cap or trim the server`);
4043
4048
  } while (cursor !== void 0 && cursor !== "");
4044
4049
  return tools;
4045
4050
  };
@@ -18891,6 +18896,8 @@ const DEFAULT_ANCHOR_PATTERN = `${DEFAULT_CITATION_PATTERN}(?:-\\d+)?`;
18891
18896
  const DEFAULT_MAX_CLAIM_PAIRS = 40;
18892
18897
  const DEFAULT_MAX_POOL_PER_PAIR = 3;
18893
18898
  const DEFAULT_MAX_PAIR_EXCERPT_CHARS = 400;
18899
+ /** Bound on the reported uncovered-critical anchor list (RV1603). */
18900
+ const MAX_CRITICAL_UNCOVERED = 32;
18894
18901
  /** Splits an anchor into path, start, and optional end at the LAST colon. */
18895
18902
  const ANCHOR_TAIL = /^(.*):(\d+)(?:-(\d+))?$/u;
18896
18903
  function requirePositiveInteger(value, what) {
@@ -18968,10 +18975,34 @@ function pairDraftClaims(draftText, rows, options) {
18968
18975
  });
18969
18976
  }
18970
18977
  }
18971
- const pairs = [];
18978
+ const critical = options?.critical;
18979
+ if (critical !== void 0) {
18980
+ for (const entry of critical) if (typeof entry !== "string" || entry.length === 0) throw new ConfigError(`pairDraftClaims critical entries must be nonempty strings; got ${JSON.stringify(entry)}`);
18981
+ }
18982
+ const criticalSpans = [];
18983
+ const criticalPaths = [];
18984
+ for (const entry of critical ?? []) {
18985
+ const parsed = ANCHOR_TAIL.exec(entry);
18986
+ const start = parsed === null ? NaN : Number(parsed[2]);
18987
+ const end = parsed === null || parsed[3] === void 0 ? start : Number(parsed[3]);
18988
+ if (parsed !== null && Number.isSafeInteger(start) && Number.isSafeInteger(end) && start >= 1 && end >= start) criticalSpans.push({
18989
+ raw: entry,
18990
+ path: parsed[1],
18991
+ start,
18992
+ end
18993
+ });
18994
+ else criticalPaths.push(entry);
18995
+ }
18996
+ const isCritical = (anchor) => {
18997
+ for (const path of criticalPaths) if (anchor.path === path || anchor.path.startsWith(`${path}/`)) return true;
18998
+ for (const span of criticalSpans) if (anchor.path === span.path && anchor.end >= span.start && anchor.start <= span.end) return true;
18999
+ return false;
19000
+ };
19001
+ const candidates = [];
18972
19002
  const seenPairs = /* @__PURE__ */ new Set();
18973
19003
  let draftCitingSentences = 0;
18974
- let total = 0;
19004
+ const criticalDraftAnchors = [];
19005
+ const seenCriticalAnchors = /* @__PURE__ */ new Set();
18975
19006
  for (const sentence of sentencesOf(draftText)) {
18976
19007
  const anchors = anchorsOf(sentence, pattern);
18977
19008
  if (anchors.length === 0) continue;
@@ -18979,6 +19010,11 @@ function pairDraftClaims(draftText, rows, options) {
18979
19010
  const full = collapse(sentence);
18980
19011
  const draftExcerpt = full.slice(0, maxExcerptChars);
18981
19012
  for (const anchor of anchors) {
19013
+ const anchorCritical = critical !== void 0 && isCritical(anchor);
19014
+ if (anchorCritical && !seenCriticalAnchors.has(anchor.raw)) {
19015
+ seenCriticalAnchors.add(anchor.raw);
19016
+ criticalDraftAnchors.push(anchor.raw);
19017
+ }
18982
19018
  const pairKey = `${full}\u0000${anchor.raw}`;
18983
19019
  if (seenPairs.has(pairKey)) continue;
18984
19020
  const readings = poolByPath.get(anchor.path) ?? [];
@@ -18998,18 +19034,94 @@ function pairDraftClaims(draftText, rows, options) {
18998
19034
  }
18999
19035
  if (pool.length === 0) continue;
19000
19036
  seenPairs.add(pairKey);
19001
- total += 1;
19002
- if (pairs.length < max) pairs.push({
19003
- anchor: anchor.raw,
19004
- draftExcerpt,
19005
- pool
19037
+ candidates.push({
19038
+ pair: {
19039
+ anchor: anchor.raw,
19040
+ draftExcerpt,
19041
+ pool
19042
+ },
19043
+ sentence: full,
19044
+ critical: anchorCritical
19006
19045
  });
19007
19046
  }
19008
19047
  }
19048
+ const reported = (critical === void 0 ? candidates : [...candidates.filter((candidate) => candidate.critical), ...candidates.filter((candidate) => !candidate.critical)]).slice(0, max);
19049
+ const coveredSentences = new Set(reported.map((candidate) => candidate.sentence));
19050
+ const fold = {
19051
+ pairs: reported.map((candidate) => candidate.pair),
19052
+ truncated: candidates.length > reported.length,
19053
+ draftCitingSentences,
19054
+ coveredCitingSentences: coveredSentences.size
19055
+ };
19056
+ if (critical !== void 0) {
19057
+ const reportedAnchors = new Set(reported.map((candidate) => candidate.pair.anchor));
19058
+ const uncovered = criticalDraftAnchors.filter((anchor) => !reportedAnchors.has(anchor));
19059
+ fold.criticalUncovered = uncovered.slice(0, 32);
19060
+ fold.criticalUncoveredTotal = uncovered.length;
19061
+ }
19062
+ return fold;
19063
+ }
19064
+ /** The synthetic anchor and nodeId of run-facts pairs (RV1603). */
19065
+ const RUN_FACTS_ANCHOR = "(run-facts)";
19066
+ const DEFAULT_MAX_RUN_FACT_PAIRS = 8;
19067
+ /** The sheet excerpt bound: one sheet rides EVERY run-facts pair. */
19068
+ const MAX_RUN_FACTS_SHEET_CHARS = 1200;
19069
+ /** Standalone numbers of two or more digits: single digits trigger nothing. */
19070
+ const RUN_FACT_NUMBER = /(?<![\d.,])(\d{2,})(?![\d.,])/gu;
19071
+ /**
19072
+ * Pairs draft sentences that speak about the RUN with the run's own
19073
+ * recorded fact sheet (RV1603), so the same judge invocation that rules
19074
+ * on source claims also rules on run claims. The eighteenth comparison
19075
+ * benchmark shipped both failure shapes this closes: a dossier claiming
19076
+ * "each role recorded 18-20 evidence entries" over recorded profiles of
19077
+ * 23/18/22/20/20/20, and "real models were not run" beside 125 recorded
19078
+ * wire requests, with executionFacts ENABLED on the input side; facts
19079
+ * offered to the composer verify nothing about what it composed.
19080
+ *
19081
+ * A sentence pairs when it names a minted id, a recorded fact value
19082
+ * (standalone, two digits or more, so a prose "6" cannot flood the
19083
+ * fold), or a caller-supplied term (case-insensitive). Pure and
19084
+ * deterministic like {@link pairDraftClaims}; the sheet excerpt rides
19085
+ * every pair, capped at {@link MAX_RUN_FACTS_SHEET_CHARS}.
19086
+ */
19087
+ function pairRunFactClaims(draftText, sheet, options) {
19088
+ const max = requirePositiveInteger(options?.max ?? 8, "pairRunFactClaims max");
19089
+ const maxExcerptChars = requirePositiveInteger(options?.maxExcerptChars ?? 400, "pairRunFactClaims maxExcerptChars");
19090
+ for (const term of options?.terms ?? []) if (typeof term !== "string" || term.length === 0) throw new ConfigError(`pairRunFactClaims terms must be nonempty strings; got ${JSON.stringify(term)}`);
19091
+ const terms = (options?.terms ?? []).map((term) => term.toLowerCase());
19092
+ const factNumbers = new Set(sheet.numbers.filter((value) => Number.isSafeInteger(value)));
19093
+ const sheetExcerpt = collapse(sheet.text).slice(0, MAX_RUN_FACTS_SHEET_CHARS);
19094
+ const pool = [{
19095
+ nodeId: RUN_FACTS_ANCHOR,
19096
+ excerpt: sheetExcerpt
19097
+ }];
19098
+ const matched = [];
19099
+ const seen = /* @__PURE__ */ new Set();
19100
+ let total = 0;
19101
+ for (const sentence of sentencesOf(draftText)) {
19102
+ const full = collapse(sentence);
19103
+ if (full.length === 0 || seen.has(full)) continue;
19104
+ const lower = full.toLowerCase();
19105
+ let triggered = sheet.ids.some((id) => id.length > 0 && full.includes(id));
19106
+ if (!triggered) triggered = terms.some((term) => lower.includes(term));
19107
+ if (!triggered) {
19108
+ for (const match of full.matchAll(RUN_FACT_NUMBER)) if (factNumbers.has(Number(match[1]))) {
19109
+ triggered = true;
19110
+ break;
19111
+ }
19112
+ }
19113
+ if (!triggered) continue;
19114
+ seen.add(full);
19115
+ total += 1;
19116
+ if (matched.length < max) matched.push({
19117
+ anchor: RUN_FACTS_ANCHOR,
19118
+ draftExcerpt: full.slice(0, maxExcerptChars),
19119
+ pool
19120
+ });
19121
+ }
19009
19122
  return {
19010
- pairs,
19011
- truncated: total > pairs.length,
19012
- draftCitingSentences
19123
+ pairs: matched,
19124
+ truncated: total > matched.length
19013
19125
  };
19014
19126
  }
19015
19127
  //#endregion
@@ -19632,6 +19744,16 @@ function validateOrchestrateOptions(opts) {
19632
19744
  ["maxPoolPerPair", consistency.maxPoolPerPair],
19633
19745
  ["maxExcerptChars", consistency.maxExcerptChars]
19634
19746
  ]) if (bound !== void 0 && (!Number.isInteger(bound) || bound < 1)) throw new ConfigError(`orchestrate claimConsistency.${label} must be a positive integer; got ` + JSON.stringify(bound));
19747
+ if (consistency.critical !== void 0) {
19748
+ if (!Array.isArray(consistency.critical) || consistency.critical.some((entry) => typeof entry !== "string" || entry.length === 0)) throw new ConfigError("orchestrate claimConsistency.critical must be an array of nonempty strings; got " + JSON.stringify(consistency.critical));
19749
+ }
19750
+ if (consistency.onUncoveredCritical !== void 0 && consistency.onUncoveredCritical !== "report" && consistency.onUncoveredCritical !== "fail") throw new ConfigError("orchestrate claimConsistency.onUncoveredCritical must be 'report' or 'fail'; got " + JSON.stringify(consistency.onUncoveredCritical));
19751
+ if (consistency.onUncoveredCritical !== void 0 && consistency.critical === void 0) throw new ConfigError("orchestrate claimConsistency.onUncoveredCritical needs critical anchors to watch; declare claimConsistency.critical");
19752
+ if (consistency.runFacts !== void 0 && typeof consistency.runFacts !== "boolean") throw new ConfigError(`orchestrate claimConsistency.runFacts must be a boolean; got ${typeof consistency.runFacts}`);
19753
+ if (consistency.runFactTerms !== void 0) {
19754
+ if (consistency.runFacts !== true) throw new ConfigError("orchestrate claimConsistency.runFactTerms rides the runFacts pass; set claimConsistency.runFacts true");
19755
+ if (!Array.isArray(consistency.runFactTerms) || consistency.runFactTerms.some((term) => typeof term !== "string" || term.length === 0)) throw new ConfigError("orchestrate claimConsistency.runFactTerms must be an array of nonempty strings; got " + JSON.stringify(consistency.runFactTerms));
19756
+ }
19635
19757
  if (consistency.judge !== void 0) {
19636
19758
  const judge = consistency.judge;
19637
19759
  if (typeof judge !== "object" || judge === null || Array.isArray(judge)) throw new ConfigError(`orchestrate claimConsistency.judge must be an object; got ${JSON.stringify(consistency.judge)}`);
@@ -21417,6 +21539,12 @@ function makeOrchestratorWorkflow(goal, opts) {
21417
21539
  const acceptedRoster = acceptedRosterNow();
21418
21540
  const pool = [];
21419
21541
  let poolChildren = 0;
21542
+ const factRows = [];
21543
+ const factIds = [internals.runId];
21544
+ const factNumbers = [];
21545
+ let factWires = 0;
21546
+ let factInput = 0;
21547
+ let factOutput = 0;
21420
21548
  for (const record of [...byOrdinal.values()].sort((a, b) => a.spawnOrdinal - b.spawnOrdinal)) {
21421
21549
  const settled = record.settled;
21422
21550
  if (settled === void 0) continue;
@@ -21431,20 +21559,66 @@ function makeOrchestratorWorkflow(goal, opts) {
21431
21559
  nodeId: record.nodeId,
21432
21560
  text: recorded.map((entry) => `${entry.claim.replace(/\.\s*$/u, "")}${entry.citation === void 0 ? "" : ` (\`${entry.citation}\`)`}.`).join(" ")
21433
21561
  });
21562
+ if (spec.runFacts === true) {
21563
+ const facts = executionFactsOf(settled);
21564
+ factRows.push(`Child ${record.nodeId} settled '${settled.status}' with ${String(recorded.length)} recorded evidence entries and ${String(facts.wireRequests)} wire requests.`);
21565
+ factIds.push(record.nodeId);
21566
+ factNumbers.push(recorded.length, facts.wireRequests);
21567
+ factWires += facts.wireRequests;
21568
+ factInput += facts.inputTokens;
21569
+ factOutput += facts.outputTokens;
21570
+ }
21434
21571
  }
21435
- const fold = pairDraftClaims(typeof draft === "string" ? draft : JSON.stringify(draft ?? null), pool, {
21572
+ const draftText = typeof draft === "string" ? draft : JSON.stringify(draft ?? null);
21573
+ const fold = pairDraftClaims(draftText, pool, {
21436
21574
  ...spec.pattern === void 0 ? {} : { pattern: spec.pattern },
21437
21575
  max: spec.max ?? 40,
21438
21576
  ...spec.maxPoolPerPair === void 0 ? {} : { maxPoolPerPair: spec.maxPoolPerPair },
21439
- ...spec.maxExcerptChars === void 0 ? {} : { maxExcerptChars: spec.maxExcerptChars }
21577
+ ...spec.maxExcerptChars === void 0 ? {} : { maxExcerptChars: spec.maxExcerptChars },
21578
+ ...spec.critical === void 0 ? {} : { critical: spec.critical }
21440
21579
  });
21580
+ const runFold = spec.runFacts === true ? pairRunFactClaims(draftText, {
21581
+ text: `The run ${internals.runId} made ${String(factWires)} provider wire requests across ${String(poolChildren)} accepted children, with token totals ${String(factInput)} input and ${String(factOutput)} output (the run's own recorded execution facts; harness-observed, not production evidence). ${factRows.join(" ")}`,
21582
+ ids: factIds,
21583
+ numbers: [
21584
+ ...factNumbers,
21585
+ factWires,
21586
+ factInput,
21587
+ factOutput
21588
+ ]
21589
+ }, {
21590
+ ...spec.runFactTerms === void 0 ? {} : { terms: spec.runFactTerms },
21591
+ ...spec.maxExcerptChars === void 0 ? {} : { maxExcerptChars: spec.maxExcerptChars }
21592
+ }) : void 0;
21593
+ const allPairs = runFold === void 0 ? fold.pairs : [...fold.pairs, ...runFold.pairs];
21441
21594
  const onFound = spec.onFound ?? "report";
21442
21595
  const metaBase = {
21443
21596
  poolChildren,
21444
21597
  draftCitingSentences: fold.draftCitingSentences,
21445
- pairs: fold.pairs.length,
21446
- truncated: fold.truncated
21598
+ pairs: allPairs.length,
21599
+ truncated: fold.truncated,
21600
+ coveredCitingSentences: fold.coveredCitingSentences,
21601
+ ...fold.criticalUncovered === void 0 ? {} : {
21602
+ criticalUncovered: fold.criticalUncovered,
21603
+ criticalUncoveredTotal: fold.criticalUncoveredTotal ?? 0
21604
+ },
21605
+ ...runFold === void 0 ? {} : {
21606
+ runFactPairs: runFold.pairs.length,
21607
+ ...runFold.truncated ? { runFactPairsTruncated: true } : {}
21608
+ }
21447
21609
  };
21610
+ if (spec.onUncoveredCritical === "fail" && fold.criticalUncovered !== void 0 && fold.criticalUncovered.length > 0) {
21611
+ claimConsistencyMeta = {
21612
+ ...metaBase,
21613
+ judgeInvoked: false
21614
+ };
21615
+ throw new FailRunError(`the claim-consistency pass left ${String(fold.criticalUncoveredTotal ?? 0)} critical draft anchor(s) unjudged (${fold.criticalUncovered.join(", ")}), and the armed onUncoveredCritical posture cannot pass the draft`, { data: {
21616
+ source: "orchestrator_claim_consistency",
21617
+ criticalUncovered: fold.criticalUncovered,
21618
+ claimConsistencyMeta,
21619
+ ...snapshot ?? {}
21620
+ } });
21621
+ }
21448
21622
  const announce = () => {
21449
21623
  internals.events.emit({
21450
21624
  type: "log",
@@ -21452,7 +21626,7 @@ function makeOrchestratorWorkflow(goal, opts) {
21452
21626
  msg: "orchestrator claim consistency pass",
21453
21627
  data: {
21454
21628
  children: poolChildren,
21455
- pairs: fold.pairs.length,
21629
+ pairs: allPairs.length,
21456
21630
  findings: claimFindingsFound?.length ?? 0,
21457
21631
  truncated: fold.truncated,
21458
21632
  onFound,
@@ -21461,7 +21635,7 @@ function makeOrchestratorWorkflow(goal, opts) {
21461
21635
  }
21462
21636
  }, callingState.spanId);
21463
21637
  };
21464
- if (fold.pairs.length === 0) {
21638
+ if (allPairs.length === 0) {
21465
21639
  claimFindingsFound = [];
21466
21640
  claimConsistencyMeta = {
21467
21641
  ...metaBase,
@@ -21470,12 +21644,16 @@ function makeOrchestratorWorkflow(goal, opts) {
21470
21644
  announce();
21471
21645
  return;
21472
21646
  }
21473
- const judgePrompt = ["You are the claim-consistency judge of an orchestrated run. Each PAIR below holds one sentence of the COMPOSED DRAFT beside the settled child sentences citing an intersecting span of the same file. Report ONLY real contradictions: a pair whose draft sentence asserts about the cited location something a pool reading denies (an inverted behavior, a negated default, a different value). Restating, summarizing, or narrowing a reading is NOT a contradiction. Answer with { contradictions: [{ pair, reason }] }: pair is the zero-based PAIR index and reason is one short sentence naming the disagreement; an empty array means every pair agrees.", `PAIRS: ${JSON.stringify(fold.pairs.map((pair, index) => ({
21474
- pair: index,
21475
- anchor: pair.anchor,
21476
- draft: pair.draftExcerpt,
21477
- pool: pair.pool
21478
- })))}`].join("\n");
21647
+ const judgePrompt = [
21648
+ "You are the claim-consistency judge of an orchestrated run. Each PAIR below holds one sentence of the COMPOSED DRAFT beside the settled child sentences citing an intersecting span of the same file. Report ONLY real contradictions: a pair whose draft sentence asserts about the cited location something a pool reading denies (an inverted behavior, a negated default, a different value). Restating, summarizing, or narrowing a reading is NOT a contradiction. Answer with { contradictions: [{ pair, reason }] }: pair is the zero-based PAIR index and reason is one short sentence naming the disagreement; an empty array means every pair agrees.",
21649
+ ...runFold !== void 0 && runFold.pairs.length > 0 ? ["Pairs anchored '(run-facts)' hold the run's own recorded execution facts as the pool reading. A draft sentence asserting something those facts deny (a count outside the recorded values, a negation of recorded activity) is a contradiction on the same terms."] : [],
21650
+ `PAIRS: ${JSON.stringify(allPairs.map((pair, index) => ({
21651
+ pair: index,
21652
+ anchor: pair.anchor,
21653
+ draft: pair.draftExcerpt,
21654
+ pool: pair.pool
21655
+ })))}`
21656
+ ].join("\n");
21479
21657
  const judgeState = { ...callingState };
21480
21658
  if (orchestratorAccount !== void 0) judgeState.budgetScope = orchestratorAccount;
21481
21659
  const judgeOpts = {
@@ -21516,11 +21694,11 @@ function makeOrchestratorWorkflow(goal, opts) {
21516
21694
  const byPair = /* @__PURE__ */ new Map();
21517
21695
  if (Array.isArray(rows)) for (const row of rows) {
21518
21696
  const candidate = row;
21519
- if (typeof candidate.pair !== "number" || !Number.isInteger(candidate.pair) || candidate.pair < 0 || candidate.pair >= fold.pairs.length || typeof candidate.reason !== "string" || candidate.reason.length === 0 || byPair.has(candidate.pair)) continue;
21697
+ if (typeof candidate.pair !== "number" || !Number.isInteger(candidate.pair) || candidate.pair < 0 || candidate.pair >= allPairs.length || typeof candidate.reason !== "string" || candidate.reason.length === 0 || byPair.has(candidate.pair)) continue;
21520
21698
  byPair.set(candidate.pair, candidate.reason);
21521
21699
  }
21522
21700
  const findings = [...byPair.entries()].sort((a, b) => a[0] - b[0]).map(([index, reason]) => ({
21523
- ...fold.pairs[index],
21701
+ ...allPairs[index],
21524
21702
  reason
21525
21703
  }));
21526
21704
  claimFindingsFound = findings;
@@ -25146,4 +25324,4 @@ function createSandboxBridge(ctx, options) {
25146
25324
  };
25147
25325
  }
25148
25326
  //#endregion
25149
- export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, KeyedLimiter, KnowledgeCasError, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LeaseHeldError, LineageIndex, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, SupersededError, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolContractHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
25327
+ export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, KeyedLimiter, KnowledgeCasError, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LeaseHeldError, LineageIndex, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, SupersededError, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolContractHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/core",
3
- "version": "1.171.0",
3
+ "version": "1.173.0",
4
4
  "description": "Rulvar core: L0 contracts, journal kernel, ctx primitives, agent runtime, model router, tool system, dynamic orchestrator, InMemory and JSONL stores, event stream.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",