@rulvar/core 1.227.0 → 1.229.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
@@ -2170,7 +2170,42 @@ type CoreEvents = {
2170
2170
  * read null while the journal held the verdict.
2171
2171
  */
2172
2172
  claimConsistencyMeta?: Record<string, unknown>; /** The synthesis-skip marker from the same envelope; same lift (RV2203). */
2173
- synthesisSkipped?: boolean | string; /** Children accepted through validated terminal output salvage on 'limit'; same lift. */
2173
+ synthesisSkipped?: boolean | string;
2174
+ /**
2175
+ * Whether the artifact this terminal carries was accepted by the
2176
+ * declared finish contract, and whether there is one to read at
2177
+ * all (RV2506); same lift. `deliverableAccepted` is absent, never
2178
+ * false, when no finish contract was declared. The pair is what
2179
+ * `status` and `completion` cannot say between them: an accepted
2180
+ * child roster over a synthesis that never passed its contract
2181
+ * reads `status: 'ok'`, `completion: 'complete'`,
2182
+ * `deliverableAccepted: false`.
2183
+ */
2184
+ deliverableAccepted?: boolean;
2185
+ resultAvailable?: boolean;
2186
+ /**
2187
+ * The journal seq of the decision recording that acceptance
2188
+ * (RV2506); absent whenever `deliverableAccepted` is not true.
2189
+ */
2190
+ acceptedArtifactRef?: number;
2191
+ /**
2192
+ * Every finish candidate the declared contract did NOT accept, in
2193
+ * judgement order (RV2507); same lift, absent when there was
2194
+ * none. Each row identifies the candidate (`callId`, `hash`,
2195
+ * `chars`) and names the validators that rejected it, with `ref`
2196
+ * pointing at the retained bytes where the host asked for them.
2197
+ */
2198
+ rejectedFinishCandidates?: {
2199
+ callId: string;
2200
+ verdict: "repair" | "rejected";
2201
+ hash: string;
2202
+ chars: number;
2203
+ failed: {
2204
+ name: string;
2205
+ reasons: string[];
2206
+ }[];
2207
+ ref?: string;
2208
+ }[]; /** Children accepted through validated terminal output salvage on 'limit'; same lift. */
2174
2209
  salvagedTerminalOutputChildren?: string[];
2175
2210
  /**
2176
2211
  * Children that settled 'ok' below their declared evidence floor
@@ -2181,6 +2216,22 @@ type CoreEvents = {
2181
2216
  */
2182
2217
  belowFloorOkChildren?: string[];
2183
2218
  /**
2219
+ * What the children had produced when the run died BEFORE any
2220
+ * acceptance verdict (RV2602), lifted on its own rather than with
2221
+ * the completion, because it exists for the terminal where there
2222
+ * is no completion to lift. Present exactly when children were
2223
+ * spawned and no acceptance verdict exists, so it never overlaps
2224
+ * the fields above. Frozen at the moment of death, ahead of the
2225
+ * RV1903 exit barrier, which is why `unsettled` can be non-empty.
2226
+ */
2227
+ childrenAtFailure?: {
2228
+ spawned: number;
2229
+ settled: number;
2230
+ statusCounts: Record<string, number>;
2231
+ belowFloorOkChildren?: string[];
2232
+ unsettled?: string[];
2233
+ };
2234
+ /**
2184
2235
  * Present and false ONLY when nothing durable records this
2185
2236
  * terminal: a settlement write failed (the run_settle journal
2186
2237
  * append or the terminal RunMeta projection, RV907), or the
@@ -5542,6 +5593,16 @@ interface RunAgentOptions<S extends SchemaSpec = JsonSchema> {
5542
5593
  remaining: number;
5543
5594
  reserveCalls: number;
5544
5595
  budget: FinalizationWindowBudget;
5596
+ /**
5597
+ * Present exactly when RV1208 widened the reserve past the
5598
+ * configured one (RV2601): the outstanding evidence entries, and
5599
+ * the floor they are outstanding against. Absent means the
5600
+ * configured reserve is what bound, so the arithmetic behind an
5601
+ * unexpected reserve is always in the journal and never only in
5602
+ * the notice the model read.
5603
+ */
5604
+ evidenceDeficit?: number;
5605
+ minEntries?: number;
5545
5606
  }) => Promise<void>;
5546
5607
  };
5547
5608
  /** Emits agent:stream deltas when true (telemetry only). */
@@ -9725,6 +9786,30 @@ interface FinishValidationSpec {
9725
9786
  */
9726
9787
  maxRepairs?: number;
9727
9788
  /**
9789
+ * Retain the BYTES of every rejected finish candidate as its own
9790
+ * addressable transcript blob (RV2507, the 1.226.0 comparison run),
9791
+ * default off. The identity of a rejected candidate always rides the
9792
+ * terminal (`rejectedFinishCandidates`: the call id, the sha256 that
9793
+ * names WHICH document drew the verdict, its size, and the validator
9794
+ * diffs); that costs nothing, because it is derived from decisions
9795
+ * the journal already holds. A COPY of the document costs storage,
9796
+ * so it is a decision the host makes: with this on, each rejected
9797
+ * candidate is written to `<runId>/finish-rejected/<callId>` and the
9798
+ * terminal row carries its `ref`, one `transcripts.get` away from the
9799
+ * bytes. Turn it on for evaluation and comparison runs. The
9800
+ * comparison run's three rejected syntheses were reachable only by an
9801
+ * external script that re-parsed the whole agent transcript; nothing
9802
+ * on the terminal or in the journal said where they were, or even
9803
+ * that they differed from each other.
9804
+ *
9805
+ * Bounded by construction: at most `maxRepairs + 1` candidates per
9806
+ * finish-validated invocation, under the run's own prefix, so
9807
+ * `Engine.deleteRun` cascades over them like every other run blob. A
9808
+ * store that refuses the write costs the run nothing: the row keeps
9809
+ * its identity and drops its `ref`, and absence means NOT RECORDED.
9810
+ */
9811
+ retainRejectedCandidates?: boolean;
9812
+ /**
9728
9813
  * The repair turn reserve (the v1.71 experiment review, P0.4; the
9729
9814
  * reserve RV-204 deliberately deferred). A nonnegative integer,
9730
9815
  * default 0: max EXTRA turns the invocation the validators bind (the
@@ -10113,6 +10198,35 @@ interface OrchestrateClaimConsistency {
10113
10198
  * silently when its judge dies.
10114
10199
  */
10115
10200
  onFound?: "report" | "carry" | "fail";
10201
+ /**
10202
+ * WHICH document the pass judges (RV2509), default `'draft'`, the
10203
+ * historical behavior byte for byte. The pass has always read the
10204
+ * coordination draft, strictly BEFORE the synthesis, so that a draft
10205
+ * contradicting its own pool fails before anything pays to compose
10206
+ * it. That ordering is right and stays; what it cannot do is verify
10207
+ * the document that actually SHIPPED. The synthesis rewrites the
10208
+ * draft, and under `'draft'` the semantic verdict on the terminal
10209
+ * describes a document no consumer ever receives: the twenty-fifth
10210
+ * comparison run's judge cleared a draft and the synthesis then
10211
+ * composed a different text three times over.
10212
+ *
10213
+ * `'final'` moves the pass after the synthesis, over the artifact the
10214
+ * run settles on. `'both'` keeps the pre-synthesis gate AND judges
10215
+ * the final, at the price of a second judge invocation; the terminal
10216
+ * then reports the FINAL pass in `claimConsistencyMeta` (the shipped
10217
+ * document is what a consumer gates on) and the earlier one in
10218
+ * `claimConsistencyDraftMeta`.
10219
+ *
10220
+ * Every meta says which document it read (`judgedStage`,
10221
+ * `judgedHash`), and the envelope's `draftToFinal` says whether the
10222
+ * synthesis changed the document at all, so the question "is this
10223
+ * verdict about what I received" is a field read under every setting,
10224
+ * including the default.
10225
+ *
10226
+ * Meaningful only with a `synthesis` configured: without one the
10227
+ * draft IS the final and all three settings judge the same document.
10228
+ */
10229
+ stage?: "draft" | "final" | "both";
10116
10230
  /** The judge invocation's own knobs; the routing chain applies otherwise. */
10117
10231
  judge?: {
10118
10232
  /** Model override for the judge invocation. */model?: ModelSpec; /** Canonical effort of the judge invocation. */
@@ -10284,6 +10398,39 @@ interface OrchestrateClaimConsistencyMeta {
10284
10398
  * "fully verified" when the judge saw 40 of 144 citing sentences.
10285
10399
  */
10286
10400
  coverage: ClaimCoverageGrade;
10401
+ /**
10402
+ * WHICH document this verdict describes (RV2509): `'draft'` for the
10403
+ * pre-synthesis pass, `'final'` for a pass over the artifact the run
10404
+ * settles on. Always present since RV2509, so a coverage grade can
10405
+ * never be read as a claim about the shipped document when it was
10406
+ * rendered over the draft the synthesis replaced.
10407
+ */
10408
+ judgedStage: "draft" | "final";
10409
+ /**
10410
+ * sha256 over the canonical document this verdict read (RV2509).
10411
+ * Compare it against the envelope's `draftToFinal.finalHash`: equal
10412
+ * means the judged document IS the one that shipped, unequal means
10413
+ * the synthesis rewrote what the judge cleared.
10414
+ */
10415
+ judgedHash: string;
10416
+ }
10417
+ /**
10418
+ * How the shipped artifact relates to the draft the run composed it
10419
+ * from (RV2509), present on the acceptance envelope whenever a
10420
+ * synthesis was configured. Two hashes and the answer they imply: a
10421
+ * semantic verdict rendered over the draft describes the final only
10422
+ * when `rewritten` is false, and until this shipped a consumer had no
10423
+ * way to ask.
10424
+ */
10425
+ interface OrchestrateDraftToFinal {
10426
+ /** sha256 over the canonical coordination draft. */
10427
+ draftHash: string;
10428
+ /** sha256 over the canonical artifact the run settled on. */
10429
+ finalHash: string;
10430
+ /** False exactly when the two hashes agree: the synthesis returned the draft unchanged. */
10431
+ rewritten: boolean;
10432
+ /** Which documents the claim-consistency pass actually judged; absent when it never ran. */
10433
+ claimsJudgedOn?: "draft" | "final" | "both";
10287
10434
  }
10288
10435
  /**
10289
10436
  * The synthesis invocation's own knobs (RV-211). Everything else about
@@ -11546,6 +11693,62 @@ interface SemanticPassesSummary {
11546
11693
  claimConsistency: SemanticPassSummary;
11547
11694
  synthesis: SemanticPassSummary;
11548
11695
  }
11696
+ /**
11697
+ * One finish candidate the declared contract did NOT accept (RV2507).
11698
+ * The 1.226.0 comparison run rejected three syntheses; nothing on its
11699
+ * terminal said so, nothing said whether the three differed from each
11700
+ * other, and the only way to read them was an external script that
11701
+ * re-parsed the whole agent transcript. The row is the artifact that
11702
+ * dig produced, made first class.
11703
+ *
11704
+ * `hash` is the sha256 over the canonical candidate: two rows with the
11705
+ * same hash are the model serving the same document twice, which is a
11706
+ * different failure from three genuine attempts and used to be
11707
+ * invisible. `ref` is present exactly under
11708
+ * `finishValidation.retainRejectedCandidates`, and points at a
11709
+ * transcript blob holding the candidate verbatim; without it the row
11710
+ * still identifies and sizes what was rejected, and names the
11711
+ * validators that did it.
11712
+ */
11713
+ interface RejectedFinishCandidate {
11714
+ /** The finish tool call this candidate arrived on. */
11715
+ callId: string;
11716
+ /** `'repair'` when another turn was granted, `'rejected'` when this was the last. */
11717
+ verdict: "repair" | "rejected";
11718
+ /** sha256 over the canonical candidate; identity, not location. */
11719
+ hash: string;
11720
+ /** The candidate's length in characters, honest whether or not the bytes were retained. */
11721
+ chars: number;
11722
+ /** Each validator that rejected it, with its reasons: the diff. */
11723
+ failed: {
11724
+ name: string;
11725
+ reasons: string[];
11726
+ }[];
11727
+ /** Transcript ref holding the bytes; absent unless retention is on and the write succeeded. */
11728
+ ref?: string;
11729
+ }
11730
+ /**
11731
+ * The roster facts of a run that died before any acceptance verdict
11732
+ * (RV2602): a fold over the children's own journaled terminals, so an
11733
+ * `exhausted` or failed orchestration still names the work it paid for.
11734
+ */
11735
+ interface ChildrenAtFailure {
11736
+ /** Children admitted, whether or not they settled. */
11737
+ spawned: number;
11738
+ /** Of those, the ones carrying a terminal at the moment of death. */
11739
+ settled: number;
11740
+ /** Their statuses, counted; the same vocabulary a child terminal uses. */
11741
+ statusCounts: Record<string, number>;
11742
+ /**
11743
+ * Children that settled `ok` under a declared evidence contract they
11744
+ * did not meet. The acceptance fold names these too, but only after
11745
+ * it runs: the fourth parity run's silent worker was `ok` with zero
11746
+ * recorded entries and its run never reached acceptance at all.
11747
+ */
11748
+ belowFloorOkChildren?: string[];
11749
+ /** Children still running when the run gave up; absent when none were. */
11750
+ unsettled?: string[];
11751
+ }
11549
11752
  interface AcceptanceChildSummary {
11550
11753
  child: string;
11551
11754
  status: string;
@@ -11608,6 +11811,56 @@ type RunOutcome<R> = {
11608
11811
  claimConsistencyMeta?: Record<string, unknown>; /** The synthesis-skip marker from the same envelope; same lift and posture (RV2203). */
11609
11812
  synthesisSkipped?: boolean | string;
11610
11813
  /**
11814
+ * Whether the artifact THIS terminal carries was accepted by the
11815
+ * declared finish contract (RV2506), lifted from the same envelope or
11816
+ * typed error data. The one question `status` and `completion` cannot
11817
+ * answer between them: the 1.226.0 comparison run accepted its
11818
+ * children (`completion: 'complete'` was earned by the acceptance
11819
+ * policy over child statuses), then failed its synthesis against the
11820
+ * contract three times and settled carrying nothing the contract ever
11821
+ * accepted, and the scoring harness read `status: 'ok'` and could not
11822
+ * tell. Absent, NEVER false, when no `finishValidation` was declared:
11823
+ * nothing judged anything, and absence means NOT RECORDED (RV1209).
11824
+ * False means a contract was declared and the artifact here did not
11825
+ * pass it, including the case where nothing was ever judged because
11826
+ * the run died first.
11827
+ */
11828
+ deliverableAccepted?: boolean;
11829
+ /**
11830
+ * Whether this terminal carries a deliverable to read at all
11831
+ * (RV2506); same lift and posture. False on every enriched failure
11832
+ * (an `error` outcome carries no value by construction) and on an
11833
+ * accepted run whose synthesis resolved to null. Distinct from
11834
+ * `deliverableAccepted`: an unjudged artifact still EXISTS, and a run
11835
+ * with no artifact still has a completion claim.
11836
+ */
11837
+ resultAvailable?: boolean;
11838
+ /**
11839
+ * The journal seq of the decision entry that records the acceptance
11840
+ * of the artifact this terminal carries (RV2506); same lift and
11841
+ * posture, absent whenever `deliverableAccepted` is not true. Three
11842
+ * different entries answer to it, which is the point of having one
11843
+ * field: the accepted `orchestrator_finish_validation` decision on
11844
+ * the ordinary path, the `orchestrator_synthesis_skip` decision when
11845
+ * the RV510 gate settled on a valid draft, and the
11846
+ * `orchestrator_synthesis_regressed` decision when the RV2505 floor
11847
+ * handed a failing synthesis back to its draft. Read it with
11848
+ * `rulvar inspect` (or any journal reader) to see WHICH validators
11849
+ * rendered the acceptance and over WHICH draft hash.
11850
+ */
11851
+ acceptedArtifactRef?: number;
11852
+ /**
11853
+ * Every finish candidate the declared contract did NOT accept, in the
11854
+ * order they were judged (RV2507); same lift and posture. Present
11855
+ * only when there was at least one, so a run that passed first try
11856
+ * keeps its exact terminal. It rides the ok terminal as well as the
11857
+ * failed one: a run that recovered on its second attempt still owes a
11858
+ * post-mortem the first, and the comparison analysis that had to
11859
+ * reconstruct three rejected syntheses from a transcript is the
11860
+ * reason the field exists.
11861
+ */
11862
+ rejectedFinishCandidates?: RejectedFinishCandidate[];
11863
+ /**
11611
11864
  * Children accepted through validated terminal output salvage on
11612
11865
  * 'limit'; same lift and posture.
11613
11866
  */
@@ -11632,7 +11885,28 @@ type RunOutcome<R> = {
11632
11885
  * verdict. Replay-stable: the roster is journaled inside the single
11633
11886
  * acceptance decision.
11634
11887
  */
11635
- acceptanceChildren?: AcceptanceChildSummary[]; /** Pipeline drops and onError:'null' losses; silent losses are forbidden. */
11888
+ acceptanceChildren?: AcceptanceChildSummary[];
11889
+ /**
11890
+ * What the children had produced when the run died BEFORE its
11891
+ * acceptance policy ever rendered a verdict (RV2602).
11892
+ *
11893
+ * Every other field on this envelope describes a policy's claim, and
11894
+ * a policy that never ran claims nothing: an orchestration whose
11895
+ * coordination loop crosses its ceiling mid-roster settles with
11896
+ * `completion` absent, and until this shipped the terminal said
11897
+ * nothing at all about work that was already paid for, even though
11898
+ * every child terminal was in the journal. Deliberately NOT
11899
+ * `childStatusCounts`: that field is the acceptance fold's number,
11900
+ * and a fold done by no policy must not borrow its name.
11901
+ *
11902
+ * Present exactly when children were spawned AND no acceptance
11903
+ * verdict exists, so the two readings never overlap and neither can
11904
+ * be mistaken for the other. Frozen at the moment of death, before
11905
+ * the RV1903 exit barrier settles the stragglers, which is why
11906
+ * `unsettled` can be non-empty: those children had not landed when
11907
+ * the run gave up.
11908
+ */
11909
+ childrenAtFailure?: ChildrenAtFailure; /** Pipeline drops and onError:'null' losses; silent losses are forbidden. */
11636
11910
  dropped: DroppedItem[]; /** Suspensions open at settle time (M2). */
11637
11911
  pending: PendingExternal[];
11638
11912
  usage: Usage;
@@ -12575,7 +12849,98 @@ declare function lastRunSettle(entries: readonly JournalEntry[]): {
12575
12849
  seq: number;
12576
12850
  outputHash?: string;
12577
12851
  completion?: "complete" | "partial" | "rejected";
12852
+ /**
12853
+ * The rejected finish candidates the settle recorded (RV2507),
12854
+ * read back for offline readers (RV2605). The settle persists the
12855
+ * whole completion lift, so this needs no re-fold and no
12856
+ * validator re-run; it is parsed defensively, exactly like
12857
+ * `completion`, so a foreign or older journal reads as "not
12858
+ * recorded" rather than as a claim.
12859
+ */
12860
+ rejectedFinishCandidates?: RejectedFinishCandidate[];
12578
12861
  } | undefined;
12862
+ /**
12863
+ * Whether a terminal figure counts THIS segment's work or the whole
12864
+ * logical run (RV2510).
12865
+ *
12866
+ * * `'segment'`: only the segment that produced this terminal. A
12867
+ * resumed run reports the resumed segment's number, and the figure
12868
+ * for the logical run is the SUM over every segment
12869
+ * ({@link logicalRunTelemetry} computes it).
12870
+ * * `'cumulative'`: the whole logical run, every prior segment
12871
+ * included, because the figure folds from the journal (money, usage),
12872
+ * resumes from the journaled ledger (the spawn count), or is
12873
+ * RE-DERIVED by replay (the loss list: a resumed segment re-executes
12874
+ * the workflow and reads the same journaled terminals, so the drops
12875
+ * of earlier segments come back). Summing these across segments
12876
+ * double counts.
12877
+ * * `'terminal'`: not a count at all: a claim about the run as it
12878
+ * stands at this settle, which a later segment can only replace.
12879
+ */
12880
+ type TelemetryScope = "segment" | "cumulative" | "terminal";
12881
+ /**
12882
+ * The scope of every field the engine writes onto a terminal (RV2510),
12883
+ * as one exported table rather than as sentences scattered through
12884
+ * field docs.
12885
+ *
12886
+ * The twenty-fifth comparison run was killed and resumed, and its two
12887
+ * terminals mixed both kinds with nothing marking which was which: the
12888
+ * money was cumulative, the wake count and the replay figures were not,
12889
+ * and reconciling them into one honest account of the logical run was
12890
+ * hand work over a joined journal. Keys are field paths as a consumer
12891
+ * reads them off `RunOutcome` (`cost.orchestrator.wakes`); the
12892
+ * doctrine test holds this table against the keys a real outcome
12893
+ * carries, so a new terminal field cannot ship without declaring what
12894
+ * it counts.
12895
+ */
12896
+ declare const TERMINAL_TELEMETRY_SCOPE: Readonly<Record<string, TelemetryScope>>;
12897
+ /** One logical run's telemetry, folded across every segment (RV2510). */
12898
+ interface LogicalRunTelemetry {
12899
+ /** How many settles the journal records: the number of segments that ran. */
12900
+ segments: number;
12901
+ /** Each segment's settled status, in journal order. */
12902
+ statuses: RunStatus[];
12903
+ /**
12904
+ * Journal entries each segment APPENDED, in the same order: its own
12905
+ * share of the run's durable work, which is the one honest
12906
+ * per-segment measure of effort a resumed run has. A pure-replay
12907
+ * segment that appended nothing but its settle reads 1.
12908
+ */
12909
+ entriesPerSegment: number[];
12910
+ /**
12911
+ * Entries the run holds in total. Equal to the sum of
12912
+ * `entriesPerSegment` plus whatever follows the last settle: the
12913
+ * partition is exact BECAUSE it is a partition, which is what makes
12914
+ * this figure safe to read beside a cumulative one.
12915
+ */
12916
+ entries: number;
12917
+ /**
12918
+ * Entries appended AFTER the last settle. Nonzero means the journal
12919
+ * continued past its terminal (RV1407: a detached resolution
12920
+ * awaiting its resume, or a successor segment over a stale settle),
12921
+ * so the last status is not the run's last word.
12922
+ */
12923
+ entriesAfterLastSettle: number;
12924
+ }
12925
+ /**
12926
+ * Folds a run's journal into the logical run's telemetry (RV2510): how
12927
+ * many segments ran, how each settled, and how much durable work each
12928
+ * one did, from entries the journal already holds. No new field, so it
12929
+ * reads journals written by every prior version exactly as well as
12930
+ * today's.
12931
+ *
12932
+ * The replay dedup is the design. Cumulative figures are deliberately
12933
+ * NOT here: money and usage fold from the WHOLE journal through
12934
+ * `costReportFromJournal` and the usage ledger, and re-summing them per
12935
+ * segment would count every replayed operation once per segment that
12936
+ * replayed it, which is exactly the reconciliation this fold exists to
12937
+ * make unnecessary. What it reports instead is a PARTITION of the
12938
+ * journal by settle boundary, so no entry is counted twice by
12939
+ * construction, and the segment-scoped figures a terminal carries
12940
+ * ({@link TERMINAL_TELEMETRY_SCOPE} names them) can be read against the
12941
+ * segment that produced them.
12942
+ */
12943
+ declare function logicalRunTelemetry(entries: readonly JournalEntry[]): LogicalRunTelemetry;
12579
12944
  type RunAuditVerdict = "consistent" | "meta-behind" | "stranded" | "suspect";
12580
12945
  interface RunStateAudit {
12581
12946
  runId: string;
@@ -14408,4 +14773,4 @@ interface SandboxBridge {
14408
14773
  declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
14409
14774
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
14410
14775
  //#endregion
14411
- 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, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, 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, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, 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, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishContractSectionPattern, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_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, JournalSealedError, 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, PilotAgentProfileOptions, PilotAgentProfileResult, 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, ProviderStatement, 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, ReconcileStatementOptions, 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, SectionPatternEntry, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, 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, ToolAuthority, 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, claimCoverageOf, 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, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
14776
+ 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, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, ChildrenAtFailure, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, 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, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, 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, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishContractSectionPattern, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_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, JournalSealedError, 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, LogicalRunTelemetry, 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, OrchestrateDraftToFinal, 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, PilotAgentProfileOptions, PilotAgentProfileResult, 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, ProviderStatement, 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, ReconcileStatementOptions, RefEntryAppender, RefEntryClassification, RefusalInfo, RejectedFinishCandidate, 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, SectionPatternEntry, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TERMINAL_TELEMETRY_SCOPE, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TelemetryScope, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, 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, claimCoverageOf, 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, logicalRunTelemetry, 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, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, 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
@@ -8736,15 +8736,139 @@ function lastRunSettle(entries) {
8736
8736
  const value = entry.value;
8737
8737
  if (value?.decisionType === "run_settle" && typeof value.runStatus === "string" && RUN_STATUSES.has(value.runStatus)) {
8738
8738
  const completion = value.completion;
8739
+ const rejected = readRejectedFinishCandidates(value.rejectedFinishCandidates);
8739
8740
  return {
8740
8741
  runStatus: value.runStatus,
8741
8742
  seq: entry.seq,
8742
8743
  ...typeof value.outputHash === "string" ? { outputHash: value.outputHash } : {},
8743
- ...completion === "complete" || completion === "partial" || completion === "rejected" ? { completion } : {}
8744
+ ...completion === "complete" || completion === "partial" || completion === "rejected" ? { completion } : {},
8745
+ ...rejected === void 0 ? {} : { rejectedFinishCandidates: rejected }
8744
8746
  };
8745
8747
  }
8746
8748
  }
8747
8749
  }
8750
+ /**
8751
+ * The rejected finish candidates of a persisted settle, or `undefined`
8752
+ * (RV2605). The WHOLE list drops on any malformed row, the same posture
8753
+ * the live lift takes (RV2507): a partial history read as complete
8754
+ * would under-report exactly the runs that misbehaved most.
8755
+ */
8756
+ function readRejectedFinishCandidates(raw) {
8757
+ if (!Array.isArray(raw) || raw.length === 0) return;
8758
+ const rows = [];
8759
+ for (const row of raw) {
8760
+ if (typeof row !== "object" || row === null) return;
8761
+ const { callId, verdict, hash, chars, failed, ref } = row;
8762
+ if (typeof callId !== "string" || verdict !== "repair" && verdict !== "rejected" || typeof hash !== "string" || typeof chars !== "number" || !Number.isSafeInteger(chars) || chars < 0 || !Array.isArray(failed) || ref !== void 0 && typeof ref !== "string") return;
8763
+ const validators = [];
8764
+ for (const entry of failed) {
8765
+ if (typeof entry !== "object" || entry === null) return;
8766
+ const { name, reasons } = entry;
8767
+ if (typeof name !== "string" || !Array.isArray(reasons) || reasons.some((reason) => typeof reason !== "string")) return;
8768
+ validators.push({
8769
+ name,
8770
+ reasons
8771
+ });
8772
+ }
8773
+ rows.push({
8774
+ callId,
8775
+ verdict,
8776
+ hash,
8777
+ chars,
8778
+ failed: validators,
8779
+ ...ref === void 0 ? {} : { ref }
8780
+ });
8781
+ }
8782
+ return rows;
8783
+ }
8784
+ /**
8785
+ * The scope of every field the engine writes onto a terminal (RV2510),
8786
+ * as one exported table rather than as sentences scattered through
8787
+ * field docs.
8788
+ *
8789
+ * The twenty-fifth comparison run was killed and resumed, and its two
8790
+ * terminals mixed both kinds with nothing marking which was which: the
8791
+ * money was cumulative, the wake count and the replay figures were not,
8792
+ * and reconciling them into one honest account of the logical run was
8793
+ * hand work over a joined journal. Keys are field paths as a consumer
8794
+ * reads them off `RunOutcome` (`cost.orchestrator.wakes`); the
8795
+ * doctrine test holds this table against the keys a real outcome
8796
+ * carries, so a new terminal field cannot ship without declaring what
8797
+ * it counts.
8798
+ */
8799
+ const TERMINAL_TELEMETRY_SCOPE = Object.freeze({
8800
+ status: "terminal",
8801
+ value: "terminal",
8802
+ error: "terminal",
8803
+ envelope: "terminal",
8804
+ completion: "terminal",
8805
+ childStatusCounts: "cumulative",
8806
+ degradedReasons: "cumulative",
8807
+ salvagedPartialChildren: "cumulative",
8808
+ salvagedTerminalOutputChildren: "cumulative",
8809
+ belowFloorOkChildren: "cumulative",
8810
+ acceptanceChildren: "cumulative",
8811
+ semanticPasses: "terminal",
8812
+ claimConsistencyMeta: "terminal",
8813
+ synthesisSkipped: "terminal",
8814
+ deliverableAccepted: "terminal",
8815
+ resultAvailable: "terminal",
8816
+ acceptedArtifactRef: "terminal",
8817
+ rejectedFinishCandidates: "cumulative",
8818
+ dropped: "cumulative",
8819
+ pending: "terminal",
8820
+ usage: "cumulative",
8821
+ cost: "cumulative",
8822
+ "cost.totalUsd": "cumulative",
8823
+ "cost.grossUsd": "cumulative",
8824
+ "cost.wireRequests": "cumulative",
8825
+ "cost.orchestrator.spentUsd": "cumulative",
8826
+ "cost.orchestrator.wakes": "segment",
8827
+ "cost.orchestrator.forcedFinish": "segment",
8828
+ "cost.orchestrator.reserveUsedUsd": "segment",
8829
+ transportRetries: "segment",
8830
+ schemaRejectedFinishExchanges: "segment",
8831
+ schemaRecoveredFinishExchanges: "segment"
8832
+ });
8833
+ /**
8834
+ * Folds a run's journal into the logical run's telemetry (RV2510): how
8835
+ * many segments ran, how each settled, and how much durable work each
8836
+ * one did, from entries the journal already holds. No new field, so it
8837
+ * reads journals written by every prior version exactly as well as
8838
+ * today's.
8839
+ *
8840
+ * The replay dedup is the design. Cumulative figures are deliberately
8841
+ * NOT here: money and usage fold from the WHOLE journal through
8842
+ * `costReportFromJournal` and the usage ledger, and re-summing them per
8843
+ * segment would count every replayed operation once per segment that
8844
+ * replayed it, which is exactly the reconciliation this fold exists to
8845
+ * make unnecessary. What it reports instead is a PARTITION of the
8846
+ * journal by settle boundary, so no entry is counted twice by
8847
+ * construction, and the segment-scoped figures a terminal carries
8848
+ * ({@link TERMINAL_TELEMETRY_SCOPE} names them) can be read against the
8849
+ * segment that produced them.
8850
+ */
8851
+ function logicalRunTelemetry(entries) {
8852
+ const statuses = [];
8853
+ const entriesPerSegment = [];
8854
+ let sinceLastSettle = 0;
8855
+ for (const entry of entries) {
8856
+ sinceLastSettle += 1;
8857
+ if (entry.kind !== "decision") continue;
8858
+ const value = entry.value;
8859
+ if (value?.decisionType !== "run_settle" || typeof value.runStatus !== "string" || !RUN_STATUSES.has(value.runStatus)) continue;
8860
+ statuses.push(value.runStatus);
8861
+ entriesPerSegment.push(sinceLastSettle);
8862
+ sinceLastSettle = 0;
8863
+ }
8864
+ return {
8865
+ segments: statuses.length,
8866
+ statuses,
8867
+ entriesPerSegment,
8868
+ entries: entries.length,
8869
+ entriesAfterLastSettle: sinceLastSettle
8870
+ };
8871
+ }
8748
8872
  function structure(entries) {
8749
8873
  const referenced = /* @__PURE__ */ new Set();
8750
8874
  for (const entry of entries) if (entry.ref !== void 0) referenced.add(entry.ref);
@@ -11568,10 +11692,11 @@ async function runAgent(options) {
11568
11692
  if (state === void 0) return;
11569
11693
  const reserve = reserveFor(state.budget);
11570
11694
  const deficit = evidenceDeficit();
11695
+ const widenedByDeficit = state.budget !== "turns" && finalizationWindow?.reserveForEvidenceDeficit === true && deficit > 0;
11571
11696
  const commit = () => {
11572
11697
  windowEntered = true;
11573
11698
  windowNoticeFired = true;
11574
- pendingWindowNotices.push(finalizationWindowNoticeText(state.remaining, reserve, state.budget, state.budget !== "turns" && finalizationWindow?.reserveForEvidenceDeficit === true && deficit > 0 ? deficit : void 0));
11699
+ pendingWindowNotices.push(finalizationWindowNoticeText(state.remaining, reserve, state.budget, widenedByDeficit ? deficit : void 0));
11575
11700
  events?.emit({
11576
11701
  type: "log",
11577
11702
  level: "info",
@@ -11586,7 +11711,11 @@ async function runAgent(options) {
11586
11711
  return durable({
11587
11712
  remaining: state.remaining,
11588
11713
  reserveCalls: reserve,
11589
- budget: state.budget
11714
+ budget: state.budget,
11715
+ ...widenedByDeficit ? {
11716
+ evidenceDeficit: deficit,
11717
+ minEntries: options.evidenceContract?.minEntries ?? 0
11718
+ } : {}
11590
11719
  }).then(commit);
11591
11720
  };
11592
11721
  const flushWindowNotices = () => {
@@ -21629,6 +21758,8 @@ function validateOrchestrateOptions(opts) {
21629
21758
  }
21630
21759
  if (fv.maxRepairs !== void 0) requireNonNegativeInteger(fv.maxRepairs, "orchestrate finishValidation.maxRepairs");
21631
21760
  if (fv.repairTurnReserve !== void 0) requireNonNegativeInteger(fv.repairTurnReserve, "orchestrate finishValidation.repairTurnReserve");
21761
+ const retain = fv.retainRejectedCandidates;
21762
+ if (retain !== void 0 && typeof retain !== "boolean") throw new ConfigError("orchestrate finishValidation.retainRejectedCandidates must be a boolean");
21632
21763
  const draftPolicy = fv.draftPolicy;
21633
21764
  if (draftPolicy !== void 0) {
21634
21765
  if (draftPolicy !== "contract" && (typeof draftPolicy !== "object" || draftPolicy === null)) throw new ConfigError("orchestrate finishValidation.draftPolicy must be an object or the sentinel 'contract'");
@@ -21763,6 +21894,9 @@ function validateOrchestrateOptions(opts) {
21763
21894
  if (opts.synthesis === void 0) throw new ConfigError("orchestrate claimConsistency.onFound 'carry' requires synthesis: without the post-fan-in invocation there is no prompt to carry the findings into; use 'report' or 'fail'");
21764
21895
  if (opts.synthesis.mode === "incremental") throw new ConfigError("orchestrate claimConsistency.onFound 'carry' needs a 'single' synthesis: the deterministic 'incremental' reconciliation has no prompt for the findings to ride");
21765
21896
  }
21897
+ const stage = consistency.stage ?? "draft";
21898
+ if (stage !== "draft" && stage !== "final" && stage !== "both") throw new ConfigError("orchestrate claimConsistency.stage must be 'draft', 'final' or 'both'; got " + JSON.stringify(consistency.stage));
21899
+ if (stage !== "draft" && opts.synthesis === void 0) throw new ConfigError(`orchestrate claimConsistency.stage '${stage}' requires synthesis: without the post-fan-in invocation the coordination draft IS the final artifact, and the default 'draft' already judges it`);
21766
21900
  if (consistency.pattern !== void 0) {
21767
21901
  if (typeof consistency.pattern !== "string") throw new ConfigError(`orchestrate claimConsistency.pattern must be a string; got ${typeof consistency.pattern}`);
21768
21902
  let probe;
@@ -22041,6 +22175,52 @@ function makeOrchestratorWorkflow(goal, opts) {
22041
22175
  };
22042
22176
  barrier.run = exitBarrier;
22043
22177
  /**
22178
+ * Whether an acceptance verdict exists (RV2602). The roster fold
22179
+ * below reports only where no policy ever spoke: two folds of the
22180
+ * same children under two different authorities would be one
22181
+ * reading too many, and the acceptance decision is the authority
22182
+ * wherever it exists.
22183
+ */
22184
+ let acceptanceRendered = false;
22185
+ /**
22186
+ * The pre-acceptance roster (RV2602): what the children had
22187
+ * produced at the moment the run gave up. The facts are already in
22188
+ * the journal, one child terminal at a time, and the terminal said
22189
+ * nothing about them because every surface that names children
22190
+ * hangs off the acceptance fold. The fourth parity run is the
22191
+ * shape: a worker settled `ok` with zero recorded evidence entries
22192
+ * under a declared contract, and the run died before acceptance
22193
+ * could say so.
22194
+ *
22195
+ * Read BEFORE the exit barrier, so it is the roster the verdict
22196
+ * would have frozen, not the one the stragglers land on later.
22197
+ */
22198
+ const rosterAtFailure = () => {
22199
+ if (acceptanceRendered) return;
22200
+ const roster = [...byOrdinal.values()];
22201
+ if (roster.length === 0) return;
22202
+ const statusCounts = {};
22203
+ const belowFloor = [];
22204
+ const unsettled = [];
22205
+ for (const record of roster) {
22206
+ const settled = record.settled;
22207
+ if (settled === void 0) {
22208
+ unsettled.push(record.nodeId);
22209
+ continue;
22210
+ }
22211
+ statusCounts[settled.status] = (statusCounts[settled.status] ?? 0) + 1;
22212
+ if (settled.status === "ok" && settled.evidence !== void 0 && !settled.evidence.met) belowFloor.push(record.nodeId);
22213
+ }
22214
+ return {
22215
+ spawned: roster.length,
22216
+ settled: roster.length - unsettled.length,
22217
+ statusCounts,
22218
+ ...belowFloor.length === 0 ? {} : { belowFloorOkChildren: belowFloor },
22219
+ ...unsettled.length === 0 ? {} : { unsettled }
22220
+ };
22221
+ };
22222
+ barrier.roster = rosterAtFailure;
22223
+ /**
22044
22224
  * The journaled spec behind each recovered ordinal: the idempotent
22045
22225
  * re-execution guard compares it against the incoming call, because
22046
22226
  * after a cross-attempt resume a REGENERATED turn (the boundary
@@ -23075,6 +23255,25 @@ function makeOrchestratorWorkflow(goal, opts) {
23075
23255
  });
23076
23256
  }
23077
23257
  const repairsUsed = known.filter((candidate) => candidate.verdict !== "accepted" && contractGenerationCurrent(candidate)).length;
23258
+ const rejectedCandidate = failed.length > 0;
23259
+ let candidateRef;
23260
+ if (rejectedCandidate && validationSpec.retainRejectedCandidates === true) {
23261
+ const ref = `${internals.runId}/finish-rejected/${call.id}`;
23262
+ try {
23263
+ await internals.transcripts.put(ref, new TextEncoder().encode(input.text), internals.lease);
23264
+ candidateRef = ref;
23265
+ } catch (writeFailed) {
23266
+ internals.events.emit({
23267
+ type: "log",
23268
+ level: "warn",
23269
+ msg: "orchestrator rejected finish candidate not retained",
23270
+ data: {
23271
+ ref,
23272
+ reason: (writeFailed instanceof Error ? writeFailed.message : String(writeFailed)).slice(0, 200)
23273
+ }
23274
+ }, callingState.spanId);
23275
+ }
23276
+ }
23078
23277
  decision = {
23079
23278
  decisionType: "orchestrator_finish_validation",
23080
23279
  callId: call.id,
@@ -23082,7 +23281,12 @@ function makeOrchestratorWorkflow(goal, opts) {
23082
23281
  failed,
23083
23282
  repairsUsed,
23084
23283
  maxRepairs,
23085
- ...validationSpec.contract === void 0 ? {} : { contractHash: validationSpec.contract.hash }
23284
+ ...validationSpec.contract === void 0 ? {} : { contractHash: validationSpec.contract.hash },
23285
+ ...rejectedCandidate ? {
23286
+ candidateHash: createHash("sha256").update(jcsSerialize(result), "utf8").digest("hex"),
23287
+ candidateChars: input.text.length,
23288
+ ...candidateRef === void 0 ? {} : { candidateRef }
23289
+ } : {}
23086
23290
  };
23087
23291
  await internals.replayer.appendSinglePhase({
23088
23292
  scope: callingState.scope,
@@ -23550,6 +23754,14 @@ function makeOrchestratorWorkflow(goal, opts) {
23550
23754
  */
23551
23755
  let synthesisSkippedByValidDraft = false;
23552
23756
  /**
23757
+ * The journal seq of the skip decision that carried the RV510 gate
23758
+ * (RV2506): the addressable provenance of the artifact a skipped
23759
+ * run settles on, since a skipped synthesis leaves no accepted
23760
+ * finish-validation decision behind and the draft's acceptance
23761
+ * lives in the skip entry instead.
23762
+ */
23763
+ let synthesisSkipDecisionRef;
23764
+ /**
23553
23765
  * The bounded contradiction pass's findings (RV1302), set exactly
23554
23766
  * when the pass is configured: an EMPTY array is a fact (the pass
23555
23767
  * ran and the pool agreed) and `undefined` is a different fact
@@ -23569,6 +23781,18 @@ function makeOrchestratorWorkflow(goal, opts) {
23569
23781
  /** Set whenever the pass ran, findings or not (the RV1404 pairing). */
23570
23782
  let claimConsistencyMeta;
23571
23783
  /**
23784
+ * Which document the claim-consistency pass judges (RV2509),
23785
+ * default `'draft'`: the historical ordering, byte for byte.
23786
+ */
23787
+ const claimStage = opts?.claimConsistency?.stage ?? "draft";
23788
+ /**
23789
+ * Under `stage: 'both'` the pre-synthesis verdict, kept beside the
23790
+ * final one (RV2509): `claimConsistencyMeta` reports the SHIPPED
23791
+ * document because that is what a consumer gates on, and the draft
23792
+ * verdict is the record of the gate that let the synthesis run.
23793
+ */
23794
+ let claimConsistencyDraftMeta;
23795
+ /**
23572
23796
  * The salvage arms the acceptance decision counted (RV1403), set on
23573
23797
  * the accepted path AFTER the decision, fresh or rolled forward
23574
23798
  * from the journal, so live and resume read the same lists; a
@@ -23666,7 +23890,7 @@ function makeOrchestratorWorkflow(goal, opts) {
23666
23890
  * entry, so a resume replays the verdict with zero paid calls and
23667
23891
  * this pass journals nothing of its own.
23668
23892
  */
23669
- const runClaimConsistencyPass = async (draft, snapshot) => {
23893
+ const runClaimConsistencyPass = async (draft, snapshot, stage = "draft") => {
23670
23894
  const spec = opts?.claimConsistency;
23671
23895
  if (spec === void 0) return;
23672
23896
  await recoveryDone;
@@ -23762,7 +23986,9 @@ function makeOrchestratorWorkflow(goal, opts) {
23762
23986
  };
23763
23987
  return {
23764
23988
  ...bare,
23765
- coverage: claimCoverageOf(bare)
23989
+ coverage: claimCoverageOf(bare),
23990
+ judgedStage: stage,
23991
+ judgedHash: createHash("sha256").update(jcsSerialize(draft ?? null), "utf8").digest("hex")
23766
23992
  };
23767
23993
  };
23768
23994
  if (spec.onLowCoverage === "fail" && metaBase.lowCoverage !== void 0) {
@@ -23821,7 +24047,7 @@ function makeOrchestratorWorkflow(goal, opts) {
23821
24047
  const judgeOpts = {
23822
24048
  role: "synthesize",
23823
24049
  result: "full",
23824
- label: CLAIM_JUDGE_LABEL,
24050
+ label: stage === "draft" ? CLAIM_JUDGE_LABEL : `${CLAIM_JUDGE_LABEL}-final`,
23825
24051
  schema: CLAIM_JUDGE_SCHEMA,
23826
24052
  limits: spec.judge?.limits ?? { maxTurns: 3 },
23827
24053
  ...spec.judge?.model === void 0 ? {} : { model: spec.judge.model },
@@ -23837,7 +24063,7 @@ function makeOrchestratorWorkflow(goal, opts) {
23837
24063
  judgeInvoked: false,
23838
24064
  judgeDeclined: true
23839
24065
  });
23840
- const declineKey = deriverV2.deriveKey({ kind: "orchestrator-claim-judge-declined" });
24066
+ const declineKey = deriverV2.deriveKey({ kind: stage === "draft" ? "orchestrator-claim-judge-declined" : "orchestrator-claim-judge-declined-final" });
23841
24067
  if (!internals.replayer.snapshot().some((entry) => entry.kind === "decision" && entry.key === declineKey)) await internals.replayer.appendSinglePhase({
23842
24068
  scope: callingState.scope,
23843
24069
  key: declineKey,
@@ -23956,6 +24182,7 @@ function makeOrchestratorWorkflow(goal, opts) {
23956
24182
  const prior = internals.replayer.snapshot().filter((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.key === skipKey).at(-1);
23957
24183
  if (prior !== void 0 && applies(prior.value)) {
23958
24184
  synthesisSkippedByValidDraft = true;
24185
+ synthesisSkipDecisionRef = prior.seq;
23959
24186
  announceSkip(prior.seq);
23960
24187
  return draft;
23961
24188
  }
@@ -24070,6 +24297,7 @@ function makeOrchestratorWorkflow(goal, opts) {
24070
24297
  });
24071
24298
  if (orchestratorAccount !== void 0 && (opts?.budget?.synthesisReserveUsd ?? 0) > 0) internals.budget.releaseSynthesisReserve(orchestratorAccount);
24072
24299
  synthesisSkippedByValidDraft = true;
24300
+ synthesisSkipDecisionRef = skipEntry.seq;
24073
24301
  announceSkip(skipEntry.seq);
24074
24302
  return draft;
24075
24303
  }
@@ -24637,14 +24865,83 @@ function makeOrchestratorWorkflow(goal, opts) {
24637
24865
  };
24638
24866
  return { used: true };
24639
24867
  };
24868
+ /**
24869
+ * The explicit deliverable verdict (RV2506, the 1.226.0 comparison
24870
+ * run): whether the artifact THIS terminal carries was accepted by
24871
+ * the declared finish contract, whether there is an artifact to
24872
+ * read at all, and where its acceptance is journaled. The harness
24873
+ * that scored the comparison could not answer the first question
24874
+ * from the terminal: it read `status: 'ok'`, and the run had in
24875
+ * fact accepted its children, failed its synthesis three times,
24876
+ * and settled carrying nothing the contract ever accepted. Every
24877
+ * input is a fact the run already journaled, so the verdict is
24878
+ * derived, never remembered, and a resume re-derives the same one.
24879
+ *
24880
+ * `deliverableAccepted` is ABSENT (never false) when no
24881
+ * `finishValidation` was declared: nothing judged anything, and
24882
+ * the RV1209 provenance doctrine says absence means NOT RECORDED.
24883
+ * `acceptedArtifactRef` names the decision entry that holds the
24884
+ * acceptance, which is the finish-validation decision on the
24885
+ * ordinary path, the RV510 skip decision when the gate skipped the
24886
+ * synthesis, and the RV2505 regression decision when a failing
24887
+ * synthesis handed the run back to its draft: three different
24888
+ * entries, one question, one field.
24889
+ */
24890
+ const deliverableVerdict = (artifact) => {
24891
+ const resultAvailable = artifact !== void 0 && artifact !== null;
24892
+ if (validationSpec === void 0) return { resultAvailable };
24893
+ if (synthesisRegressed !== void 0) return {
24894
+ resultAvailable,
24895
+ deliverableAccepted: true,
24896
+ acceptedArtifactRef: synthesisRegressed.decisionRef
24897
+ };
24898
+ if (synthesisSkipDecisionRef !== void 0) return {
24899
+ resultAvailable,
24900
+ deliverableAccepted: true,
24901
+ acceptedArtifactRef: synthesisSkipDecisionRef
24902
+ };
24903
+ const accepted = internals.replayer.snapshot().filter((entry) => {
24904
+ if (entry.kind !== "decision" || entry.scope !== callingState.scope) return false;
24905
+ const value = entry.value;
24906
+ return value?.decisionType === "orchestrator_finish_validation" && value.verdict === "accepted" && contractGenerationCurrent(value);
24907
+ }).at(-1);
24908
+ return accepted === void 0 ? {
24909
+ resultAvailable,
24910
+ deliverableAccepted: false
24911
+ } : {
24912
+ resultAvailable,
24913
+ deliverableAccepted: true,
24914
+ acceptedArtifactRef: accepted.seq
24915
+ };
24916
+ };
24917
+ /**
24918
+ * The rejected candidates of the CURRENT contract generation, in
24919
+ * judgement order (RV2507): a pure fold over decisions the journal
24920
+ * already holds, so a resume re-derives the identical list without
24921
+ * re-running a validator. A superseded generation's rejections stay
24922
+ * in the journal as the history they are and drop out here, exactly
24923
+ * as they drop out of the repair budget.
24924
+ */
24925
+ const rejectedFinishCandidates = () => validationDecisions().filter((decision) => decision.verdict !== "accepted" && contractGenerationCurrent(decision) && decision.candidateHash !== void 0).map((decision) => ({
24926
+ callId: decision.callId,
24927
+ verdict: decision.verdict,
24928
+ hash: decision.candidateHash ?? "",
24929
+ chars: decision.candidateChars ?? 0,
24930
+ failed: decision.failed,
24931
+ ...decision.candidateRef === void 0 ? {} : { ref: decision.candidateRef }
24932
+ }));
24640
24933
  const enrichSynthesisFailure = (thrown, snapshot) => {
24641
24934
  const passTruth = {
24642
24935
  ...claimConsistencyMeta === void 0 ? {} : { claimConsistencyMeta },
24643
24936
  semanticPasses: semanticPassesSummary({
24644
24937
  ran: false,
24645
24938
  reason: "synthesis-failed"
24646
- })
24939
+ }),
24940
+ resultAvailable: false,
24941
+ ...validationSpec === void 0 ? {} : { deliverableAccepted: false }
24647
24942
  };
24943
+ const rejected = rejectedFinishCandidates();
24944
+ if (rejected.length > 0) passTruth.rejectedFinishCandidates = rejected;
24648
24945
  if (thrown instanceof BudgetExhaustedError) throw new BudgetExhaustedError(thrown.message, { data: {
24649
24946
  ...thrown.data ?? {},
24650
24947
  ...snapshot ?? {},
@@ -24674,18 +24971,22 @@ function makeOrchestratorWorkflow(goal, opts) {
24674
24971
  if (result.status !== "ok") throw new ConfigError(`the orchestrator agent terminated with status '${result.status}'` + (result.errorMessage === void 0 ? "" : `: ${result.errorMessage}`));
24675
24972
  if (opts?.acceptance === void 0) {
24676
24973
  await runContradictionPass();
24677
- await runClaimConsistencyPass(result.output);
24974
+ if (claimStage !== "final") await runClaimConsistencyPass(result.output);
24975
+ let bare;
24678
24976
  try {
24679
- return await runSynthesis(result.output);
24977
+ bare = await runSynthesis(result.output);
24680
24978
  } catch (thrown) {
24681
24979
  await journalSynthesisAdmissionDecline(thrown);
24682
- if ((await draftFallbackOnRegression(result.output, thrown)).used) return result.output;
24683
- return enrichSynthesisFailure(thrown);
24980
+ if ((await draftFallbackOnRegression(result.output, thrown)).used) bare = result.output;
24981
+ else return enrichSynthesisFailure(thrown);
24684
24982
  }
24983
+ if (claimStage !== "draft") await runClaimConsistencyPass(bare, void 0, "final");
24984
+ return bare;
24685
24985
  }
24686
24986
  const acceptanceKey = "acceptance";
24687
24987
  const priorAcceptance = internals.replayer.snapshot().find((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.key === acceptanceKey);
24688
24988
  let decision;
24989
+ acceptanceRendered = true;
24689
24990
  if (priorAcceptance !== void 0) decision = priorAcceptance.value;
24690
24991
  else {
24691
24992
  const childStatusCounts = {};
@@ -24875,13 +25176,14 @@ function makeOrchestratorWorkflow(goal, opts) {
24875
25176
  ...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
24876
25177
  ...decision.salvagedTerminalOutputChildren === void 0 ? {} : { salvagedTerminalOutputChildren: decision.salvagedTerminalOutputChildren }
24877
25178
  });
24878
- await runClaimConsistencyPass(result.output, {
25179
+ const acceptanceSnapshot = {
24879
25180
  completion: decision.completion,
24880
25181
  childStatusCounts: decision.childStatusCounts,
24881
25182
  degradedReasons: decision.degradedReasons,
24882
25183
  ...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
24883
25184
  ...decision.salvagedTerminalOutputChildren === void 0 ? {} : { salvagedTerminalOutputChildren: decision.salvagedTerminalOutputChildren }
24884
- });
25185
+ };
25186
+ if (claimStage !== "final") await runClaimConsistencyPass(result.output, acceptanceSnapshot);
24885
25187
  let synthesizedFinal;
24886
25188
  try {
24887
25189
  synthesizedFinal = await runSynthesis(result.output);
@@ -24898,10 +25200,31 @@ function makeOrchestratorWorkflow(goal, opts) {
24898
25200
  ...decision.children === void 0 ? {} : { acceptanceChildren: decision.children }
24899
25201
  });
24900
25202
  }
25203
+ if (claimStage !== "draft") {
25204
+ claimConsistencyDraftMeta = claimStage === "both" ? claimConsistencyMeta : void 0;
25205
+ await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
25206
+ }
24901
25207
  const envelopeSchemaRecovered = (result.schemaRecoveredTerminalExchanges ?? 0) + synthesisSchemaRecoveredExchanges;
25208
+ const deliverable = deliverableVerdict(synthesizedFinal);
25209
+ const draftToFinal = opts?.synthesis === void 0 ? void 0 : (() => {
25210
+ const hashOf = (value) => createHash("sha256").update(jcsSerialize(value ?? null), "utf8").digest("hex");
25211
+ const draftHash = hashOf(result.output);
25212
+ const finalHash = hashOf(synthesizedFinal);
25213
+ return {
25214
+ draftHash,
25215
+ finalHash,
25216
+ rewritten: draftHash !== finalHash,
25217
+ ...claimConsistencyMeta === void 0 ? {} : { claimsJudgedOn: claimStage }
25218
+ };
25219
+ })();
25220
+ const envelopeRejectedCandidates = rejectedFinishCandidates();
24902
25221
  return {
24903
25222
  result: synthesizedFinal,
24904
25223
  completion: decision.completion,
25224
+ resultAvailable: deliverable.resultAvailable,
25225
+ ...deliverable.deliverableAccepted === void 0 ? {} : { deliverableAccepted: deliverable.deliverableAccepted },
25226
+ ...deliverable.acceptedArtifactRef === void 0 ? {} : { acceptedArtifactRef: deliverable.acceptedArtifactRef },
25227
+ ...envelopeRejectedCandidates.length === 0 ? {} : { rejectedFinishCandidates: envelopeRejectedCandidates },
24905
25228
  childStatusCounts: decision.childStatusCounts,
24906
25229
  degradedReasons: decision.degradedReasons,
24907
25230
  ...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
@@ -24921,6 +25244,8 @@ function makeOrchestratorWorkflow(goal, opts) {
24921
25244
  ...claimFindingsFound === void 0 ? {} : { claimContradictions: claimFindingsFound },
24922
25245
  claimConsistencyMeta
24923
25246
  },
25247
+ ...claimConsistencyDraftMeta === void 0 ? {} : { claimConsistencyDraftMeta },
25248
+ ...draftToFinal === void 0 ? {} : { draftToFinal },
24924
25249
  semanticPasses: semanticPassesSummary(opts?.synthesis === void 0 ? {
24925
25250
  ran: false,
24926
25251
  reason: "not-configured"
@@ -24934,6 +25259,16 @@ function makeOrchestratorWorkflow(goal, opts) {
24934
25259
  const barrier = {};
24935
25260
  try {
24936
25261
  return await orchestrationBody(ctx, barrier);
25262
+ } catch (thrown) {
25263
+ const roster = barrier.roster?.();
25264
+ if (roster === void 0) throw thrown;
25265
+ const widen = (data) => ({
25266
+ ...data ?? {},
25267
+ ...data?.childrenAtFailure === void 0 ? { childrenAtFailure: roster } : {}
25268
+ });
25269
+ if (thrown instanceof BudgetExhaustedError) throw new BudgetExhaustedError(thrown.message, { data: widen(thrown.data) });
25270
+ if (thrown instanceof FailRunError) throw new FailRunError(thrown.message, { data: widen(thrown.data) });
25271
+ throw thrown;
24937
25272
  } finally {
24938
25273
  await barrier.run?.();
24939
25274
  }
@@ -26525,6 +26860,42 @@ function workflowSourceRef(runId) {
26525
26860
  * telemetry, never authority), and an invalid counts record drops the
26526
26861
  * counts while keeping a valid completion.
26527
26862
  */
26863
+ /**
26864
+ * The pre-acceptance roster lift (RV2602), deliberately NOT gated on a
26865
+ * completion.
26866
+ *
26867
+ * Every other lifted field rides {@link liftRunCompletion}, which bails
26868
+ * out the moment there is no completion literal, and that is exactly
26869
+ * right: those fields report what an acceptance policy CLAIMED. This
26870
+ * one exists for the case where no policy ever ran, so gating it on a
26871
+ * completion would gate it on the very thing that is missing.
26872
+ *
26873
+ * Same posture as its siblings otherwise: a well formed record mirrors,
26874
+ * anything malformed drops silently rather than half-mirroring, so a
26875
+ * consumer never reads a partial roster as a whole one.
26876
+ */
26877
+ function liftChildrenAtFailure(candidate) {
26878
+ if (typeof candidate !== "object" || candidate === null || Array.isArray(candidate)) return;
26879
+ const raw = candidate.childrenAtFailure;
26880
+ if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return;
26881
+ const { spawned, settled, statusCounts, belowFloorOkChildren, unsettled } = raw;
26882
+ const count = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
26883
+ if (!count(spawned) || !count(settled)) return;
26884
+ if (typeof statusCounts !== "object" || statusCounts === null || Array.isArray(statusCounts)) return;
26885
+ const entries = Object.entries(statusCounts);
26886
+ if (!entries.every(([, value]) => count(value))) return;
26887
+ const names = (value) => Array.isArray(value) && value.every((entry) => typeof entry === "string") ? [...value] : void 0;
26888
+ const below = belowFloorOkChildren === void 0 ? void 0 : names(belowFloorOkChildren);
26889
+ const open = unsettled === void 0 ? void 0 : names(unsettled);
26890
+ if (belowFloorOkChildren !== void 0 && below === void 0 || unsettled !== void 0 && open === void 0) return;
26891
+ return {
26892
+ spawned,
26893
+ settled,
26894
+ statusCounts: Object.fromEntries(entries),
26895
+ ...below === void 0 ? {} : { belowFloorOkChildren: below },
26896
+ ...open === void 0 ? {} : { unsettled: open }
26897
+ };
26898
+ }
26528
26899
  function liftRunCompletion(candidate) {
26529
26900
  if (typeof candidate !== "object" || candidate === null || Array.isArray(candidate)) return;
26530
26901
  const completion = candidate.completion;
@@ -26579,6 +26950,21 @@ function liftRunCompletion(candidate) {
26579
26950
  if (typeof metaCandidate === "object" && metaCandidate !== null && !Array.isArray(metaCandidate)) lifted.claimConsistencyMeta = { ...metaCandidate };
26580
26951
  const skippedCandidate = candidate.synthesisSkipped;
26581
26952
  if (typeof skippedCandidate === "boolean" || typeof skippedCandidate === "string") lifted.synthesisSkipped = skippedCandidate;
26953
+ const acceptedCandidate = candidate.deliverableAccepted;
26954
+ if (typeof acceptedCandidate === "boolean") lifted.deliverableAccepted = acceptedCandidate;
26955
+ const availableCandidate = candidate.resultAvailable;
26956
+ if (typeof availableCandidate === "boolean") lifted.resultAvailable = availableCandidate;
26957
+ const artifactRefCandidate = candidate.acceptedArtifactRef;
26958
+ if (typeof artifactRefCandidate === "number" && Number.isSafeInteger(artifactRefCandidate) && artifactRefCandidate >= 0) lifted.acceptedArtifactRef = artifactRefCandidate;
26959
+ const rejectedCandidates = candidate.rejectedFinishCandidates;
26960
+ if (Array.isArray(rejectedCandidates)) {
26961
+ const validRow = (row) => {
26962
+ if (typeof row !== "object" || row === null) return false;
26963
+ const { callId, verdict, hash, chars, failed, ref } = row;
26964
+ return typeof callId === "string" && (verdict === "repair" || verdict === "rejected") && typeof hash === "string" && typeof chars === "number" && Number.isSafeInteger(chars) && chars >= 0 && (ref === void 0 || typeof ref === "string") && Array.isArray(failed) && failed.every((entry) => typeof entry === "object" && entry !== null && typeof entry.name === "string" && Array.isArray(entry.reasons) && entry.reasons.every((reason) => typeof reason === "string"));
26965
+ };
26966
+ if (rejectedCandidates.every(validRow)) lifted.rejectedFinishCandidates = rejectedCandidates.map((row) => ({ ...row }));
26967
+ }
26582
26968
  return lifted;
26583
26969
  }
26584
26970
  /**
@@ -27163,6 +27549,8 @@ function createEngine(options) {
27163
27549
  if (wireError !== void 0) outcomeFacts.error = wireError;
27164
27550
  let lifted = liftRunCompletion(status === "ok" || status === "exhausted" ? outcomeFacts.value : status === "error" ? wireError?.data : void 0);
27165
27551
  if (lifted === void 0 && status === "exhausted") lifted = liftRunCompletion(wireError?.data);
27552
+ const childrenAtFailure = liftChildrenAtFailure(status === "ok" || status === "exhausted" ? outcomeFacts.value : wireError?.data) ?? liftChildrenAtFailure(wireError?.data);
27553
+ if (childrenAtFailure !== void 0) outcomeFacts.childrenAtFailure = childrenAtFailure;
27166
27554
  if (lifted !== void 0) {
27167
27555
  outcomeFacts.completion = lifted.completion;
27168
27556
  if (lifted.childStatusCounts !== void 0) outcomeFacts.childStatusCounts = lifted.childStatusCounts;
@@ -27174,6 +27562,10 @@ function createEngine(options) {
27174
27562
  if (lifted.semanticPasses !== void 0) outcomeFacts.semanticPasses = lifted.semanticPasses;
27175
27563
  if (lifted.claimConsistencyMeta !== void 0) outcomeFacts.claimConsistencyMeta = lifted.claimConsistencyMeta;
27176
27564
  if (lifted.synthesisSkipped !== void 0) outcomeFacts.synthesisSkipped = lifted.synthesisSkipped;
27565
+ if (lifted.deliverableAccepted !== void 0) outcomeFacts.deliverableAccepted = lifted.deliverableAccepted;
27566
+ if (lifted.resultAvailable !== void 0) outcomeFacts.resultAvailable = lifted.resultAvailable;
27567
+ if (lifted.acceptedArtifactRef !== void 0) outcomeFacts.acceptedArtifactRef = lifted.acceptedArtifactRef;
27568
+ if (lifted.rejectedFinishCandidates !== void 0) outcomeFacts.rejectedFinishCandidates = lifted.rejectedFinishCandidates;
27177
27569
  }
27178
27570
  let settlementFailure;
27179
27571
  let supersededBy;
@@ -27252,6 +27644,7 @@ function createEngine(options) {
27252
27644
  totalUsd: outcome.cost.totalUsd,
27253
27645
  ...outcome.cost.usageApprox === true ? { usageApprox: true } : {},
27254
27646
  ...lifted === void 0 ? {} : lifted,
27647
+ ...childrenAtFailure === void 0 ? {} : { childrenAtFailure },
27255
27648
  ...settlementFailure !== void 0 ? { settled: false } : supersededBy !== void 0 ? {
27256
27649
  settled: false,
27257
27650
  settledReason: "superseded"
@@ -27835,4 +28228,4 @@ function createSandboxBridge(ctx, options) {
27835
28228
  };
27836
28229
  }
27837
28230
  //#endregion
27838
- export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DECISION_CHAIN_KINDS, 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_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_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, JournalSealedError, 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, claimCoverageOf, 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, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
28231
+ export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DECISION_CHAIN_KINDS, 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_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_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, JournalSealedError, 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, TERMINAL_TELEMETRY_SCOPE, 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, claimCoverageOf, 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, logicalRunTelemetry, 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, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, 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.227.0",
3
+ "version": "1.229.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",