@rulvar/core 1.227.0 → 1.228.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 +289 -2
- package/dist/index.js +269 -13
- package/package.json +1 -1
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;
|
|
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
|
|
@@ -9725,6 +9760,30 @@ interface FinishValidationSpec {
|
|
|
9725
9760
|
*/
|
|
9726
9761
|
maxRepairs?: number;
|
|
9727
9762
|
/**
|
|
9763
|
+
* Retain the BYTES of every rejected finish candidate as its own
|
|
9764
|
+
* addressable transcript blob (RV2507, the 1.226.0 comparison run),
|
|
9765
|
+
* default off. The identity of a rejected candidate always rides the
|
|
9766
|
+
* terminal (`rejectedFinishCandidates`: the call id, the sha256 that
|
|
9767
|
+
* names WHICH document drew the verdict, its size, and the validator
|
|
9768
|
+
* diffs); that costs nothing, because it is derived from decisions
|
|
9769
|
+
* the journal already holds. A COPY of the document costs storage,
|
|
9770
|
+
* so it is a decision the host makes: with this on, each rejected
|
|
9771
|
+
* candidate is written to `<runId>/finish-rejected/<callId>` and the
|
|
9772
|
+
* terminal row carries its `ref`, one `transcripts.get` away from the
|
|
9773
|
+
* bytes. Turn it on for evaluation and comparison runs. The
|
|
9774
|
+
* comparison run's three rejected syntheses were reachable only by an
|
|
9775
|
+
* external script that re-parsed the whole agent transcript; nothing
|
|
9776
|
+
* on the terminal or in the journal said where they were, or even
|
|
9777
|
+
* that they differed from each other.
|
|
9778
|
+
*
|
|
9779
|
+
* Bounded by construction: at most `maxRepairs + 1` candidates per
|
|
9780
|
+
* finish-validated invocation, under the run's own prefix, so
|
|
9781
|
+
* `Engine.deleteRun` cascades over them like every other run blob. A
|
|
9782
|
+
* store that refuses the write costs the run nothing: the row keeps
|
|
9783
|
+
* its identity and drops its `ref`, and absence means NOT RECORDED.
|
|
9784
|
+
*/
|
|
9785
|
+
retainRejectedCandidates?: boolean;
|
|
9786
|
+
/**
|
|
9728
9787
|
* The repair turn reserve (the v1.71 experiment review, P0.4; the
|
|
9729
9788
|
* reserve RV-204 deliberately deferred). A nonnegative integer,
|
|
9730
9789
|
* default 0: max EXTRA turns the invocation the validators bind (the
|
|
@@ -10113,6 +10172,35 @@ interface OrchestrateClaimConsistency {
|
|
|
10113
10172
|
* silently when its judge dies.
|
|
10114
10173
|
*/
|
|
10115
10174
|
onFound?: "report" | "carry" | "fail";
|
|
10175
|
+
/**
|
|
10176
|
+
* WHICH document the pass judges (RV2509), default `'draft'`, the
|
|
10177
|
+
* historical behavior byte for byte. The pass has always read the
|
|
10178
|
+
* coordination draft, strictly BEFORE the synthesis, so that a draft
|
|
10179
|
+
* contradicting its own pool fails before anything pays to compose
|
|
10180
|
+
* it. That ordering is right and stays; what it cannot do is verify
|
|
10181
|
+
* the document that actually SHIPPED. The synthesis rewrites the
|
|
10182
|
+
* draft, and under `'draft'` the semantic verdict on the terminal
|
|
10183
|
+
* describes a document no consumer ever receives: the twenty-fifth
|
|
10184
|
+
* comparison run's judge cleared a draft and the synthesis then
|
|
10185
|
+
* composed a different text three times over.
|
|
10186
|
+
*
|
|
10187
|
+
* `'final'` moves the pass after the synthesis, over the artifact the
|
|
10188
|
+
* run settles on. `'both'` keeps the pre-synthesis gate AND judges
|
|
10189
|
+
* the final, at the price of a second judge invocation; the terminal
|
|
10190
|
+
* then reports the FINAL pass in `claimConsistencyMeta` (the shipped
|
|
10191
|
+
* document is what a consumer gates on) and the earlier one in
|
|
10192
|
+
* `claimConsistencyDraftMeta`.
|
|
10193
|
+
*
|
|
10194
|
+
* Every meta says which document it read (`judgedStage`,
|
|
10195
|
+
* `judgedHash`), and the envelope's `draftToFinal` says whether the
|
|
10196
|
+
* synthesis changed the document at all, so the question "is this
|
|
10197
|
+
* verdict about what I received" is a field read under every setting,
|
|
10198
|
+
* including the default.
|
|
10199
|
+
*
|
|
10200
|
+
* Meaningful only with a `synthesis` configured: without one the
|
|
10201
|
+
* draft IS the final and all three settings judge the same document.
|
|
10202
|
+
*/
|
|
10203
|
+
stage?: "draft" | "final" | "both";
|
|
10116
10204
|
/** The judge invocation's own knobs; the routing chain applies otherwise. */
|
|
10117
10205
|
judge?: {
|
|
10118
10206
|
/** Model override for the judge invocation. */model?: ModelSpec; /** Canonical effort of the judge invocation. */
|
|
@@ -10284,6 +10372,39 @@ interface OrchestrateClaimConsistencyMeta {
|
|
|
10284
10372
|
* "fully verified" when the judge saw 40 of 144 citing sentences.
|
|
10285
10373
|
*/
|
|
10286
10374
|
coverage: ClaimCoverageGrade;
|
|
10375
|
+
/**
|
|
10376
|
+
* WHICH document this verdict describes (RV2509): `'draft'` for the
|
|
10377
|
+
* pre-synthesis pass, `'final'` for a pass over the artifact the run
|
|
10378
|
+
* settles on. Always present since RV2509, so a coverage grade can
|
|
10379
|
+
* never be read as a claim about the shipped document when it was
|
|
10380
|
+
* rendered over the draft the synthesis replaced.
|
|
10381
|
+
*/
|
|
10382
|
+
judgedStage: "draft" | "final";
|
|
10383
|
+
/**
|
|
10384
|
+
* sha256 over the canonical document this verdict read (RV2509).
|
|
10385
|
+
* Compare it against the envelope's `draftToFinal.finalHash`: equal
|
|
10386
|
+
* means the judged document IS the one that shipped, unequal means
|
|
10387
|
+
* the synthesis rewrote what the judge cleared.
|
|
10388
|
+
*/
|
|
10389
|
+
judgedHash: string;
|
|
10390
|
+
}
|
|
10391
|
+
/**
|
|
10392
|
+
* How the shipped artifact relates to the draft the run composed it
|
|
10393
|
+
* from (RV2509), present on the acceptance envelope whenever a
|
|
10394
|
+
* synthesis was configured. Two hashes and the answer they imply: a
|
|
10395
|
+
* semantic verdict rendered over the draft describes the final only
|
|
10396
|
+
* when `rewritten` is false, and until this shipped a consumer had no
|
|
10397
|
+
* way to ask.
|
|
10398
|
+
*/
|
|
10399
|
+
interface OrchestrateDraftToFinal {
|
|
10400
|
+
/** sha256 over the canonical coordination draft. */
|
|
10401
|
+
draftHash: string;
|
|
10402
|
+
/** sha256 over the canonical artifact the run settled on. */
|
|
10403
|
+
finalHash: string;
|
|
10404
|
+
/** False exactly when the two hashes agree: the synthesis returned the draft unchanged. */
|
|
10405
|
+
rewritten: boolean;
|
|
10406
|
+
/** Which documents the claim-consistency pass actually judged; absent when it never ran. */
|
|
10407
|
+
claimsJudgedOn?: "draft" | "final" | "both";
|
|
10287
10408
|
}
|
|
10288
10409
|
/**
|
|
10289
10410
|
* The synthesis invocation's own knobs (RV-211). Everything else about
|
|
@@ -11546,6 +11667,40 @@ interface SemanticPassesSummary {
|
|
|
11546
11667
|
claimConsistency: SemanticPassSummary;
|
|
11547
11668
|
synthesis: SemanticPassSummary;
|
|
11548
11669
|
}
|
|
11670
|
+
/**
|
|
11671
|
+
* One finish candidate the declared contract did NOT accept (RV2507).
|
|
11672
|
+
* The 1.226.0 comparison run rejected three syntheses; nothing on its
|
|
11673
|
+
* terminal said so, nothing said whether the three differed from each
|
|
11674
|
+
* other, and the only way to read them was an external script that
|
|
11675
|
+
* re-parsed the whole agent transcript. The row is the artifact that
|
|
11676
|
+
* dig produced, made first class.
|
|
11677
|
+
*
|
|
11678
|
+
* `hash` is the sha256 over the canonical candidate: two rows with the
|
|
11679
|
+
* same hash are the model serving the same document twice, which is a
|
|
11680
|
+
* different failure from three genuine attempts and used to be
|
|
11681
|
+
* invisible. `ref` is present exactly under
|
|
11682
|
+
* `finishValidation.retainRejectedCandidates`, and points at a
|
|
11683
|
+
* transcript blob holding the candidate verbatim; without it the row
|
|
11684
|
+
* still identifies and sizes what was rejected, and names the
|
|
11685
|
+
* validators that did it.
|
|
11686
|
+
*/
|
|
11687
|
+
interface RejectedFinishCandidate {
|
|
11688
|
+
/** The finish tool call this candidate arrived on. */
|
|
11689
|
+
callId: string;
|
|
11690
|
+
/** `'repair'` when another turn was granted, `'rejected'` when this was the last. */
|
|
11691
|
+
verdict: "repair" | "rejected";
|
|
11692
|
+
/** sha256 over the canonical candidate; identity, not location. */
|
|
11693
|
+
hash: string;
|
|
11694
|
+
/** The candidate's length in characters, honest whether or not the bytes were retained. */
|
|
11695
|
+
chars: number;
|
|
11696
|
+
/** Each validator that rejected it, with its reasons: the diff. */
|
|
11697
|
+
failed: {
|
|
11698
|
+
name: string;
|
|
11699
|
+
reasons: string[];
|
|
11700
|
+
}[];
|
|
11701
|
+
/** Transcript ref holding the bytes; absent unless retention is on and the write succeeded. */
|
|
11702
|
+
ref?: string;
|
|
11703
|
+
}
|
|
11549
11704
|
interface AcceptanceChildSummary {
|
|
11550
11705
|
child: string;
|
|
11551
11706
|
status: string;
|
|
@@ -11608,6 +11763,56 @@ type RunOutcome<R> = {
|
|
|
11608
11763
|
claimConsistencyMeta?: Record<string, unknown>; /** The synthesis-skip marker from the same envelope; same lift and posture (RV2203). */
|
|
11609
11764
|
synthesisSkipped?: boolean | string;
|
|
11610
11765
|
/**
|
|
11766
|
+
* Whether the artifact THIS terminal carries was accepted by the
|
|
11767
|
+
* declared finish contract (RV2506), lifted from the same envelope or
|
|
11768
|
+
* typed error data. The one question `status` and `completion` cannot
|
|
11769
|
+
* answer between them: the 1.226.0 comparison run accepted its
|
|
11770
|
+
* children (`completion: 'complete'` was earned by the acceptance
|
|
11771
|
+
* policy over child statuses), then failed its synthesis against the
|
|
11772
|
+
* contract three times and settled carrying nothing the contract ever
|
|
11773
|
+
* accepted, and the scoring harness read `status: 'ok'` and could not
|
|
11774
|
+
* tell. Absent, NEVER false, when no `finishValidation` was declared:
|
|
11775
|
+
* nothing judged anything, and absence means NOT RECORDED (RV1209).
|
|
11776
|
+
* False means a contract was declared and the artifact here did not
|
|
11777
|
+
* pass it, including the case where nothing was ever judged because
|
|
11778
|
+
* the run died first.
|
|
11779
|
+
*/
|
|
11780
|
+
deliverableAccepted?: boolean;
|
|
11781
|
+
/**
|
|
11782
|
+
* Whether this terminal carries a deliverable to read at all
|
|
11783
|
+
* (RV2506); same lift and posture. False on every enriched failure
|
|
11784
|
+
* (an `error` outcome carries no value by construction) and on an
|
|
11785
|
+
* accepted run whose synthesis resolved to null. Distinct from
|
|
11786
|
+
* `deliverableAccepted`: an unjudged artifact still EXISTS, and a run
|
|
11787
|
+
* with no artifact still has a completion claim.
|
|
11788
|
+
*/
|
|
11789
|
+
resultAvailable?: boolean;
|
|
11790
|
+
/**
|
|
11791
|
+
* The journal seq of the decision entry that records the acceptance
|
|
11792
|
+
* of the artifact this terminal carries (RV2506); same lift and
|
|
11793
|
+
* posture, absent whenever `deliverableAccepted` is not true. Three
|
|
11794
|
+
* different entries answer to it, which is the point of having one
|
|
11795
|
+
* field: the accepted `orchestrator_finish_validation` decision on
|
|
11796
|
+
* the ordinary path, the `orchestrator_synthesis_skip` decision when
|
|
11797
|
+
* the RV510 gate settled on a valid draft, and the
|
|
11798
|
+
* `orchestrator_synthesis_regressed` decision when the RV2505 floor
|
|
11799
|
+
* handed a failing synthesis back to its draft. Read it with
|
|
11800
|
+
* `rulvar inspect` (or any journal reader) to see WHICH validators
|
|
11801
|
+
* rendered the acceptance and over WHICH draft hash.
|
|
11802
|
+
*/
|
|
11803
|
+
acceptedArtifactRef?: number;
|
|
11804
|
+
/**
|
|
11805
|
+
* Every finish candidate the declared contract did NOT accept, in the
|
|
11806
|
+
* order they were judged (RV2507); same lift and posture. Present
|
|
11807
|
+
* only when there was at least one, so a run that passed first try
|
|
11808
|
+
* keeps its exact terminal. It rides the ok terminal as well as the
|
|
11809
|
+
* failed one: a run that recovered on its second attempt still owes a
|
|
11810
|
+
* post-mortem the first, and the comparison analysis that had to
|
|
11811
|
+
* reconstruct three rejected syntheses from a transcript is the
|
|
11812
|
+
* reason the field exists.
|
|
11813
|
+
*/
|
|
11814
|
+
rejectedFinishCandidates?: RejectedFinishCandidate[];
|
|
11815
|
+
/**
|
|
11611
11816
|
* Children accepted through validated terminal output salvage on
|
|
11612
11817
|
* 'limit'; same lift and posture.
|
|
11613
11818
|
*/
|
|
@@ -12576,6 +12781,88 @@ declare function lastRunSettle(entries: readonly JournalEntry[]): {
|
|
|
12576
12781
|
outputHash?: string;
|
|
12577
12782
|
completion?: "complete" | "partial" | "rejected";
|
|
12578
12783
|
} | undefined;
|
|
12784
|
+
/**
|
|
12785
|
+
* Whether a terminal figure counts THIS segment's work or the whole
|
|
12786
|
+
* logical run (RV2510).
|
|
12787
|
+
*
|
|
12788
|
+
* * `'segment'`: only the segment that produced this terminal. A
|
|
12789
|
+
* resumed run reports the resumed segment's number, and the figure
|
|
12790
|
+
* for the logical run is the SUM over every segment
|
|
12791
|
+
* ({@link logicalRunTelemetry} computes it).
|
|
12792
|
+
* * `'cumulative'`: the whole logical run, every prior segment
|
|
12793
|
+
* included, because the figure folds from the journal (money, usage),
|
|
12794
|
+
* resumes from the journaled ledger (the spawn count), or is
|
|
12795
|
+
* RE-DERIVED by replay (the loss list: a resumed segment re-executes
|
|
12796
|
+
* the workflow and reads the same journaled terminals, so the drops
|
|
12797
|
+
* of earlier segments come back). Summing these across segments
|
|
12798
|
+
* double counts.
|
|
12799
|
+
* * `'terminal'`: not a count at all: a claim about the run as it
|
|
12800
|
+
* stands at this settle, which a later segment can only replace.
|
|
12801
|
+
*/
|
|
12802
|
+
type TelemetryScope = "segment" | "cumulative" | "terminal";
|
|
12803
|
+
/**
|
|
12804
|
+
* The scope of every field the engine writes onto a terminal (RV2510),
|
|
12805
|
+
* as one exported table rather than as sentences scattered through
|
|
12806
|
+
* field docs.
|
|
12807
|
+
*
|
|
12808
|
+
* The twenty-fifth comparison run was killed and resumed, and its two
|
|
12809
|
+
* terminals mixed both kinds with nothing marking which was which: the
|
|
12810
|
+
* money was cumulative, the wake count and the replay figures were not,
|
|
12811
|
+
* and reconciling them into one honest account of the logical run was
|
|
12812
|
+
* hand work over a joined journal. Keys are field paths as a consumer
|
|
12813
|
+
* reads them off `RunOutcome` (`cost.orchestrator.wakes`); the
|
|
12814
|
+
* doctrine test holds this table against the keys a real outcome
|
|
12815
|
+
* carries, so a new terminal field cannot ship without declaring what
|
|
12816
|
+
* it counts.
|
|
12817
|
+
*/
|
|
12818
|
+
declare const TERMINAL_TELEMETRY_SCOPE: Readonly<Record<string, TelemetryScope>>;
|
|
12819
|
+
/** One logical run's telemetry, folded across every segment (RV2510). */
|
|
12820
|
+
interface LogicalRunTelemetry {
|
|
12821
|
+
/** How many settles the journal records: the number of segments that ran. */
|
|
12822
|
+
segments: number;
|
|
12823
|
+
/** Each segment's settled status, in journal order. */
|
|
12824
|
+
statuses: RunStatus[];
|
|
12825
|
+
/**
|
|
12826
|
+
* Journal entries each segment APPENDED, in the same order: its own
|
|
12827
|
+
* share of the run's durable work, which is the one honest
|
|
12828
|
+
* per-segment measure of effort a resumed run has. A pure-replay
|
|
12829
|
+
* segment that appended nothing but its settle reads 1.
|
|
12830
|
+
*/
|
|
12831
|
+
entriesPerSegment: number[];
|
|
12832
|
+
/**
|
|
12833
|
+
* Entries the run holds in total. Equal to the sum of
|
|
12834
|
+
* `entriesPerSegment` plus whatever follows the last settle: the
|
|
12835
|
+
* partition is exact BECAUSE it is a partition, which is what makes
|
|
12836
|
+
* this figure safe to read beside a cumulative one.
|
|
12837
|
+
*/
|
|
12838
|
+
entries: number;
|
|
12839
|
+
/**
|
|
12840
|
+
* Entries appended AFTER the last settle. Nonzero means the journal
|
|
12841
|
+
* continued past its terminal (RV1407: a detached resolution
|
|
12842
|
+
* awaiting its resume, or a successor segment over a stale settle),
|
|
12843
|
+
* so the last status is not the run's last word.
|
|
12844
|
+
*/
|
|
12845
|
+
entriesAfterLastSettle: number;
|
|
12846
|
+
}
|
|
12847
|
+
/**
|
|
12848
|
+
* Folds a run's journal into the logical run's telemetry (RV2510): how
|
|
12849
|
+
* many segments ran, how each settled, and how much durable work each
|
|
12850
|
+
* one did, from entries the journal already holds. No new field, so it
|
|
12851
|
+
* reads journals written by every prior version exactly as well as
|
|
12852
|
+
* today's.
|
|
12853
|
+
*
|
|
12854
|
+
* The replay dedup is the design. Cumulative figures are deliberately
|
|
12855
|
+
* NOT here: money and usage fold from the WHOLE journal through
|
|
12856
|
+
* `costReportFromJournal` and the usage ledger, and re-summing them per
|
|
12857
|
+
* segment would count every replayed operation once per segment that
|
|
12858
|
+
* replayed it, which is exactly the reconciliation this fold exists to
|
|
12859
|
+
* make unnecessary. What it reports instead is a PARTITION of the
|
|
12860
|
+
* journal by settle boundary, so no entry is counted twice by
|
|
12861
|
+
* construction, and the segment-scoped figures a terminal carries
|
|
12862
|
+
* ({@link TERMINAL_TELEMETRY_SCOPE} names them) can be read against the
|
|
12863
|
+
* segment that produced them.
|
|
12864
|
+
*/
|
|
12865
|
+
declare function logicalRunTelemetry(entries: readonly JournalEntry[]): LogicalRunTelemetry;
|
|
12579
12866
|
type RunAuditVerdict = "consistent" | "meta-behind" | "stranded" | "suspect";
|
|
12580
12867
|
interface RunStateAudit {
|
|
12581
12868
|
runId: string;
|
|
@@ -14408,4 +14695,4 @@ interface SandboxBridge {
|
|
|
14408
14695
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
14409
14696
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
14410
14697
|
//#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 };
|
|
14698
|
+
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, 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
|
@@ -8745,6 +8745,94 @@ function lastRunSettle(entries) {
|
|
|
8745
8745
|
}
|
|
8746
8746
|
}
|
|
8747
8747
|
}
|
|
8748
|
+
/**
|
|
8749
|
+
* The scope of every field the engine writes onto a terminal (RV2510),
|
|
8750
|
+
* as one exported table rather than as sentences scattered through
|
|
8751
|
+
* field docs.
|
|
8752
|
+
*
|
|
8753
|
+
* The twenty-fifth comparison run was killed and resumed, and its two
|
|
8754
|
+
* terminals mixed both kinds with nothing marking which was which: the
|
|
8755
|
+
* money was cumulative, the wake count and the replay figures were not,
|
|
8756
|
+
* and reconciling them into one honest account of the logical run was
|
|
8757
|
+
* hand work over a joined journal. Keys are field paths as a consumer
|
|
8758
|
+
* reads them off `RunOutcome` (`cost.orchestrator.wakes`); the
|
|
8759
|
+
* doctrine test holds this table against the keys a real outcome
|
|
8760
|
+
* carries, so a new terminal field cannot ship without declaring what
|
|
8761
|
+
* it counts.
|
|
8762
|
+
*/
|
|
8763
|
+
const TERMINAL_TELEMETRY_SCOPE = Object.freeze({
|
|
8764
|
+
status: "terminal",
|
|
8765
|
+
value: "terminal",
|
|
8766
|
+
error: "terminal",
|
|
8767
|
+
envelope: "terminal",
|
|
8768
|
+
completion: "terminal",
|
|
8769
|
+
childStatusCounts: "cumulative",
|
|
8770
|
+
degradedReasons: "cumulative",
|
|
8771
|
+
salvagedPartialChildren: "cumulative",
|
|
8772
|
+
salvagedTerminalOutputChildren: "cumulative",
|
|
8773
|
+
belowFloorOkChildren: "cumulative",
|
|
8774
|
+
acceptanceChildren: "cumulative",
|
|
8775
|
+
semanticPasses: "terminal",
|
|
8776
|
+
claimConsistencyMeta: "terminal",
|
|
8777
|
+
synthesisSkipped: "terminal",
|
|
8778
|
+
deliverableAccepted: "terminal",
|
|
8779
|
+
resultAvailable: "terminal",
|
|
8780
|
+
acceptedArtifactRef: "terminal",
|
|
8781
|
+
rejectedFinishCandidates: "cumulative",
|
|
8782
|
+
dropped: "cumulative",
|
|
8783
|
+
pending: "terminal",
|
|
8784
|
+
usage: "cumulative",
|
|
8785
|
+
cost: "cumulative",
|
|
8786
|
+
"cost.totalUsd": "cumulative",
|
|
8787
|
+
"cost.grossUsd": "cumulative",
|
|
8788
|
+
"cost.wireRequests": "cumulative",
|
|
8789
|
+
"cost.orchestrator.spentUsd": "cumulative",
|
|
8790
|
+
"cost.orchestrator.wakes": "segment",
|
|
8791
|
+
"cost.orchestrator.forcedFinish": "segment",
|
|
8792
|
+
"cost.orchestrator.reserveUsedUsd": "segment",
|
|
8793
|
+
transportRetries: "segment",
|
|
8794
|
+
schemaRejectedFinishExchanges: "segment",
|
|
8795
|
+
schemaRecoveredFinishExchanges: "segment"
|
|
8796
|
+
});
|
|
8797
|
+
/**
|
|
8798
|
+
* Folds a run's journal into the logical run's telemetry (RV2510): how
|
|
8799
|
+
* many segments ran, how each settled, and how much durable work each
|
|
8800
|
+
* one did, from entries the journal already holds. No new field, so it
|
|
8801
|
+
* reads journals written by every prior version exactly as well as
|
|
8802
|
+
* today's.
|
|
8803
|
+
*
|
|
8804
|
+
* The replay dedup is the design. Cumulative figures are deliberately
|
|
8805
|
+
* NOT here: money and usage fold from the WHOLE journal through
|
|
8806
|
+
* `costReportFromJournal` and the usage ledger, and re-summing them per
|
|
8807
|
+
* segment would count every replayed operation once per segment that
|
|
8808
|
+
* replayed it, which is exactly the reconciliation this fold exists to
|
|
8809
|
+
* make unnecessary. What it reports instead is a PARTITION of the
|
|
8810
|
+
* journal by settle boundary, so no entry is counted twice by
|
|
8811
|
+
* construction, and the segment-scoped figures a terminal carries
|
|
8812
|
+
* ({@link TERMINAL_TELEMETRY_SCOPE} names them) can be read against the
|
|
8813
|
+
* segment that produced them.
|
|
8814
|
+
*/
|
|
8815
|
+
function logicalRunTelemetry(entries) {
|
|
8816
|
+
const statuses = [];
|
|
8817
|
+
const entriesPerSegment = [];
|
|
8818
|
+
let sinceLastSettle = 0;
|
|
8819
|
+
for (const entry of entries) {
|
|
8820
|
+
sinceLastSettle += 1;
|
|
8821
|
+
if (entry.kind !== "decision") continue;
|
|
8822
|
+
const value = entry.value;
|
|
8823
|
+
if (value?.decisionType !== "run_settle" || typeof value.runStatus !== "string" || !RUN_STATUSES.has(value.runStatus)) continue;
|
|
8824
|
+
statuses.push(value.runStatus);
|
|
8825
|
+
entriesPerSegment.push(sinceLastSettle);
|
|
8826
|
+
sinceLastSettle = 0;
|
|
8827
|
+
}
|
|
8828
|
+
return {
|
|
8829
|
+
segments: statuses.length,
|
|
8830
|
+
statuses,
|
|
8831
|
+
entriesPerSegment,
|
|
8832
|
+
entries: entries.length,
|
|
8833
|
+
entriesAfterLastSettle: sinceLastSettle
|
|
8834
|
+
};
|
|
8835
|
+
}
|
|
8748
8836
|
function structure(entries) {
|
|
8749
8837
|
const referenced = /* @__PURE__ */ new Set();
|
|
8750
8838
|
for (const entry of entries) if (entry.ref !== void 0) referenced.add(entry.ref);
|
|
@@ -21629,6 +21717,8 @@ function validateOrchestrateOptions(opts) {
|
|
|
21629
21717
|
}
|
|
21630
21718
|
if (fv.maxRepairs !== void 0) requireNonNegativeInteger(fv.maxRepairs, "orchestrate finishValidation.maxRepairs");
|
|
21631
21719
|
if (fv.repairTurnReserve !== void 0) requireNonNegativeInteger(fv.repairTurnReserve, "orchestrate finishValidation.repairTurnReserve");
|
|
21720
|
+
const retain = fv.retainRejectedCandidates;
|
|
21721
|
+
if (retain !== void 0 && typeof retain !== "boolean") throw new ConfigError("orchestrate finishValidation.retainRejectedCandidates must be a boolean");
|
|
21632
21722
|
const draftPolicy = fv.draftPolicy;
|
|
21633
21723
|
if (draftPolicy !== void 0) {
|
|
21634
21724
|
if (draftPolicy !== "contract" && (typeof draftPolicy !== "object" || draftPolicy === null)) throw new ConfigError("orchestrate finishValidation.draftPolicy must be an object or the sentinel 'contract'");
|
|
@@ -21763,6 +21853,9 @@ function validateOrchestrateOptions(opts) {
|
|
|
21763
21853
|
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
21854
|
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
21855
|
}
|
|
21856
|
+
const stage = consistency.stage ?? "draft";
|
|
21857
|
+
if (stage !== "draft" && stage !== "final" && stage !== "both") throw new ConfigError("orchestrate claimConsistency.stage must be 'draft', 'final' or 'both'; got " + JSON.stringify(consistency.stage));
|
|
21858
|
+
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
21859
|
if (consistency.pattern !== void 0) {
|
|
21767
21860
|
if (typeof consistency.pattern !== "string") throw new ConfigError(`orchestrate claimConsistency.pattern must be a string; got ${typeof consistency.pattern}`);
|
|
21768
21861
|
let probe;
|
|
@@ -23075,6 +23168,25 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23075
23168
|
});
|
|
23076
23169
|
}
|
|
23077
23170
|
const repairsUsed = known.filter((candidate) => candidate.verdict !== "accepted" && contractGenerationCurrent(candidate)).length;
|
|
23171
|
+
const rejectedCandidate = failed.length > 0;
|
|
23172
|
+
let candidateRef;
|
|
23173
|
+
if (rejectedCandidate && validationSpec.retainRejectedCandidates === true) {
|
|
23174
|
+
const ref = `${internals.runId}/finish-rejected/${call.id}`;
|
|
23175
|
+
try {
|
|
23176
|
+
await internals.transcripts.put(ref, new TextEncoder().encode(input.text), internals.lease);
|
|
23177
|
+
candidateRef = ref;
|
|
23178
|
+
} catch (writeFailed) {
|
|
23179
|
+
internals.events.emit({
|
|
23180
|
+
type: "log",
|
|
23181
|
+
level: "warn",
|
|
23182
|
+
msg: "orchestrator rejected finish candidate not retained",
|
|
23183
|
+
data: {
|
|
23184
|
+
ref,
|
|
23185
|
+
reason: (writeFailed instanceof Error ? writeFailed.message : String(writeFailed)).slice(0, 200)
|
|
23186
|
+
}
|
|
23187
|
+
}, callingState.spanId);
|
|
23188
|
+
}
|
|
23189
|
+
}
|
|
23078
23190
|
decision = {
|
|
23079
23191
|
decisionType: "orchestrator_finish_validation",
|
|
23080
23192
|
callId: call.id,
|
|
@@ -23082,7 +23194,12 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23082
23194
|
failed,
|
|
23083
23195
|
repairsUsed,
|
|
23084
23196
|
maxRepairs,
|
|
23085
|
-
...validationSpec.contract === void 0 ? {} : { contractHash: validationSpec.contract.hash }
|
|
23197
|
+
...validationSpec.contract === void 0 ? {} : { contractHash: validationSpec.contract.hash },
|
|
23198
|
+
...rejectedCandidate ? {
|
|
23199
|
+
candidateHash: createHash("sha256").update(jcsSerialize(result), "utf8").digest("hex"),
|
|
23200
|
+
candidateChars: input.text.length,
|
|
23201
|
+
...candidateRef === void 0 ? {} : { candidateRef }
|
|
23202
|
+
} : {}
|
|
23086
23203
|
};
|
|
23087
23204
|
await internals.replayer.appendSinglePhase({
|
|
23088
23205
|
scope: callingState.scope,
|
|
@@ -23550,6 +23667,14 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23550
23667
|
*/
|
|
23551
23668
|
let synthesisSkippedByValidDraft = false;
|
|
23552
23669
|
/**
|
|
23670
|
+
* The journal seq of the skip decision that carried the RV510 gate
|
|
23671
|
+
* (RV2506): the addressable provenance of the artifact a skipped
|
|
23672
|
+
* run settles on, since a skipped synthesis leaves no accepted
|
|
23673
|
+
* finish-validation decision behind and the draft's acceptance
|
|
23674
|
+
* lives in the skip entry instead.
|
|
23675
|
+
*/
|
|
23676
|
+
let synthesisSkipDecisionRef;
|
|
23677
|
+
/**
|
|
23553
23678
|
* The bounded contradiction pass's findings (RV1302), set exactly
|
|
23554
23679
|
* when the pass is configured: an EMPTY array is a fact (the pass
|
|
23555
23680
|
* ran and the pool agreed) and `undefined` is a different fact
|
|
@@ -23569,6 +23694,18 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23569
23694
|
/** Set whenever the pass ran, findings or not (the RV1404 pairing). */
|
|
23570
23695
|
let claimConsistencyMeta;
|
|
23571
23696
|
/**
|
|
23697
|
+
* Which document the claim-consistency pass judges (RV2509),
|
|
23698
|
+
* default `'draft'`: the historical ordering, byte for byte.
|
|
23699
|
+
*/
|
|
23700
|
+
const claimStage = opts?.claimConsistency?.stage ?? "draft";
|
|
23701
|
+
/**
|
|
23702
|
+
* Under `stage: 'both'` the pre-synthesis verdict, kept beside the
|
|
23703
|
+
* final one (RV2509): `claimConsistencyMeta` reports the SHIPPED
|
|
23704
|
+
* document because that is what a consumer gates on, and the draft
|
|
23705
|
+
* verdict is the record of the gate that let the synthesis run.
|
|
23706
|
+
*/
|
|
23707
|
+
let claimConsistencyDraftMeta;
|
|
23708
|
+
/**
|
|
23572
23709
|
* The salvage arms the acceptance decision counted (RV1403), set on
|
|
23573
23710
|
* the accepted path AFTER the decision, fresh or rolled forward
|
|
23574
23711
|
* from the journal, so live and resume read the same lists; a
|
|
@@ -23666,7 +23803,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23666
23803
|
* entry, so a resume replays the verdict with zero paid calls and
|
|
23667
23804
|
* this pass journals nothing of its own.
|
|
23668
23805
|
*/
|
|
23669
|
-
const runClaimConsistencyPass = async (draft, snapshot) => {
|
|
23806
|
+
const runClaimConsistencyPass = async (draft, snapshot, stage = "draft") => {
|
|
23670
23807
|
const spec = opts?.claimConsistency;
|
|
23671
23808
|
if (spec === void 0) return;
|
|
23672
23809
|
await recoveryDone;
|
|
@@ -23762,7 +23899,9 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23762
23899
|
};
|
|
23763
23900
|
return {
|
|
23764
23901
|
...bare,
|
|
23765
|
-
coverage: claimCoverageOf(bare)
|
|
23902
|
+
coverage: claimCoverageOf(bare),
|
|
23903
|
+
judgedStage: stage,
|
|
23904
|
+
judgedHash: createHash("sha256").update(jcsSerialize(draft ?? null), "utf8").digest("hex")
|
|
23766
23905
|
};
|
|
23767
23906
|
};
|
|
23768
23907
|
if (spec.onLowCoverage === "fail" && metaBase.lowCoverage !== void 0) {
|
|
@@ -23821,7 +23960,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23821
23960
|
const judgeOpts = {
|
|
23822
23961
|
role: "synthesize",
|
|
23823
23962
|
result: "full",
|
|
23824
|
-
label: CLAIM_JUDGE_LABEL
|
|
23963
|
+
label: stage === "draft" ? CLAIM_JUDGE_LABEL : `${CLAIM_JUDGE_LABEL}-final`,
|
|
23825
23964
|
schema: CLAIM_JUDGE_SCHEMA,
|
|
23826
23965
|
limits: spec.judge?.limits ?? { maxTurns: 3 },
|
|
23827
23966
|
...spec.judge?.model === void 0 ? {} : { model: spec.judge.model },
|
|
@@ -23837,7 +23976,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23837
23976
|
judgeInvoked: false,
|
|
23838
23977
|
judgeDeclined: true
|
|
23839
23978
|
});
|
|
23840
|
-
const declineKey = deriverV2.deriveKey({ kind: "orchestrator-claim-judge-declined" });
|
|
23979
|
+
const declineKey = deriverV2.deriveKey({ kind: stage === "draft" ? "orchestrator-claim-judge-declined" : "orchestrator-claim-judge-declined-final" });
|
|
23841
23980
|
if (!internals.replayer.snapshot().some((entry) => entry.kind === "decision" && entry.key === declineKey)) await internals.replayer.appendSinglePhase({
|
|
23842
23981
|
scope: callingState.scope,
|
|
23843
23982
|
key: declineKey,
|
|
@@ -23956,6 +24095,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
23956
24095
|
const prior = internals.replayer.snapshot().filter((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.key === skipKey).at(-1);
|
|
23957
24096
|
if (prior !== void 0 && applies(prior.value)) {
|
|
23958
24097
|
synthesisSkippedByValidDraft = true;
|
|
24098
|
+
synthesisSkipDecisionRef = prior.seq;
|
|
23959
24099
|
announceSkip(prior.seq);
|
|
23960
24100
|
return draft;
|
|
23961
24101
|
}
|
|
@@ -24070,6 +24210,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24070
24210
|
});
|
|
24071
24211
|
if (orchestratorAccount !== void 0 && (opts?.budget?.synthesisReserveUsd ?? 0) > 0) internals.budget.releaseSynthesisReserve(orchestratorAccount);
|
|
24072
24212
|
synthesisSkippedByValidDraft = true;
|
|
24213
|
+
synthesisSkipDecisionRef = skipEntry.seq;
|
|
24073
24214
|
announceSkip(skipEntry.seq);
|
|
24074
24215
|
return draft;
|
|
24075
24216
|
}
|
|
@@ -24637,14 +24778,83 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24637
24778
|
};
|
|
24638
24779
|
return { used: true };
|
|
24639
24780
|
};
|
|
24781
|
+
/**
|
|
24782
|
+
* The explicit deliverable verdict (RV2506, the 1.226.0 comparison
|
|
24783
|
+
* run): whether the artifact THIS terminal carries was accepted by
|
|
24784
|
+
* the declared finish contract, whether there is an artifact to
|
|
24785
|
+
* read at all, and where its acceptance is journaled. The harness
|
|
24786
|
+
* that scored the comparison could not answer the first question
|
|
24787
|
+
* from the terminal: it read `status: 'ok'`, and the run had in
|
|
24788
|
+
* fact accepted its children, failed its synthesis three times,
|
|
24789
|
+
* and settled carrying nothing the contract ever accepted. Every
|
|
24790
|
+
* input is a fact the run already journaled, so the verdict is
|
|
24791
|
+
* derived, never remembered, and a resume re-derives the same one.
|
|
24792
|
+
*
|
|
24793
|
+
* `deliverableAccepted` is ABSENT (never false) when no
|
|
24794
|
+
* `finishValidation` was declared: nothing judged anything, and
|
|
24795
|
+
* the RV1209 provenance doctrine says absence means NOT RECORDED.
|
|
24796
|
+
* `acceptedArtifactRef` names the decision entry that holds the
|
|
24797
|
+
* acceptance, which is the finish-validation decision on the
|
|
24798
|
+
* ordinary path, the RV510 skip decision when the gate skipped the
|
|
24799
|
+
* synthesis, and the RV2505 regression decision when a failing
|
|
24800
|
+
* synthesis handed the run back to its draft: three different
|
|
24801
|
+
* entries, one question, one field.
|
|
24802
|
+
*/
|
|
24803
|
+
const deliverableVerdict = (artifact) => {
|
|
24804
|
+
const resultAvailable = artifact !== void 0 && artifact !== null;
|
|
24805
|
+
if (validationSpec === void 0) return { resultAvailable };
|
|
24806
|
+
if (synthesisRegressed !== void 0) return {
|
|
24807
|
+
resultAvailable,
|
|
24808
|
+
deliverableAccepted: true,
|
|
24809
|
+
acceptedArtifactRef: synthesisRegressed.decisionRef
|
|
24810
|
+
};
|
|
24811
|
+
if (synthesisSkipDecisionRef !== void 0) return {
|
|
24812
|
+
resultAvailable,
|
|
24813
|
+
deliverableAccepted: true,
|
|
24814
|
+
acceptedArtifactRef: synthesisSkipDecisionRef
|
|
24815
|
+
};
|
|
24816
|
+
const accepted = internals.replayer.snapshot().filter((entry) => {
|
|
24817
|
+
if (entry.kind !== "decision" || entry.scope !== callingState.scope) return false;
|
|
24818
|
+
const value = entry.value;
|
|
24819
|
+
return value?.decisionType === "orchestrator_finish_validation" && value.verdict === "accepted" && contractGenerationCurrent(value);
|
|
24820
|
+
}).at(-1);
|
|
24821
|
+
return accepted === void 0 ? {
|
|
24822
|
+
resultAvailable,
|
|
24823
|
+
deliverableAccepted: false
|
|
24824
|
+
} : {
|
|
24825
|
+
resultAvailable,
|
|
24826
|
+
deliverableAccepted: true,
|
|
24827
|
+
acceptedArtifactRef: accepted.seq
|
|
24828
|
+
};
|
|
24829
|
+
};
|
|
24830
|
+
/**
|
|
24831
|
+
* The rejected candidates of the CURRENT contract generation, in
|
|
24832
|
+
* judgement order (RV2507): a pure fold over decisions the journal
|
|
24833
|
+
* already holds, so a resume re-derives the identical list without
|
|
24834
|
+
* re-running a validator. A superseded generation's rejections stay
|
|
24835
|
+
* in the journal as the history they are and drop out here, exactly
|
|
24836
|
+
* as they drop out of the repair budget.
|
|
24837
|
+
*/
|
|
24838
|
+
const rejectedFinishCandidates = () => validationDecisions().filter((decision) => decision.verdict !== "accepted" && contractGenerationCurrent(decision) && decision.candidateHash !== void 0).map((decision) => ({
|
|
24839
|
+
callId: decision.callId,
|
|
24840
|
+
verdict: decision.verdict,
|
|
24841
|
+
hash: decision.candidateHash ?? "",
|
|
24842
|
+
chars: decision.candidateChars ?? 0,
|
|
24843
|
+
failed: decision.failed,
|
|
24844
|
+
...decision.candidateRef === void 0 ? {} : { ref: decision.candidateRef }
|
|
24845
|
+
}));
|
|
24640
24846
|
const enrichSynthesisFailure = (thrown, snapshot) => {
|
|
24641
24847
|
const passTruth = {
|
|
24642
24848
|
...claimConsistencyMeta === void 0 ? {} : { claimConsistencyMeta },
|
|
24643
24849
|
semanticPasses: semanticPassesSummary({
|
|
24644
24850
|
ran: false,
|
|
24645
24851
|
reason: "synthesis-failed"
|
|
24646
|
-
})
|
|
24852
|
+
}),
|
|
24853
|
+
resultAvailable: false,
|
|
24854
|
+
...validationSpec === void 0 ? {} : { deliverableAccepted: false }
|
|
24647
24855
|
};
|
|
24856
|
+
const rejected = rejectedFinishCandidates();
|
|
24857
|
+
if (rejected.length > 0) passTruth.rejectedFinishCandidates = rejected;
|
|
24648
24858
|
if (thrown instanceof BudgetExhaustedError) throw new BudgetExhaustedError(thrown.message, { data: {
|
|
24649
24859
|
...thrown.data ?? {},
|
|
24650
24860
|
...snapshot ?? {},
|
|
@@ -24674,14 +24884,17 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24674
24884
|
if (result.status !== "ok") throw new ConfigError(`the orchestrator agent terminated with status '${result.status}'` + (result.errorMessage === void 0 ? "" : `: ${result.errorMessage}`));
|
|
24675
24885
|
if (opts?.acceptance === void 0) {
|
|
24676
24886
|
await runContradictionPass();
|
|
24677
|
-
await runClaimConsistencyPass(result.output);
|
|
24887
|
+
if (claimStage !== "final") await runClaimConsistencyPass(result.output);
|
|
24888
|
+
let bare;
|
|
24678
24889
|
try {
|
|
24679
|
-
|
|
24890
|
+
bare = await runSynthesis(result.output);
|
|
24680
24891
|
} catch (thrown) {
|
|
24681
24892
|
await journalSynthesisAdmissionDecline(thrown);
|
|
24682
|
-
if ((await draftFallbackOnRegression(result.output, thrown)).used)
|
|
24683
|
-
return enrichSynthesisFailure(thrown);
|
|
24893
|
+
if ((await draftFallbackOnRegression(result.output, thrown)).used) bare = result.output;
|
|
24894
|
+
else return enrichSynthesisFailure(thrown);
|
|
24684
24895
|
}
|
|
24896
|
+
if (claimStage !== "draft") await runClaimConsistencyPass(bare, void 0, "final");
|
|
24897
|
+
return bare;
|
|
24685
24898
|
}
|
|
24686
24899
|
const acceptanceKey = "acceptance";
|
|
24687
24900
|
const priorAcceptance = internals.replayer.snapshot().find((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.key === acceptanceKey);
|
|
@@ -24875,13 +25088,14 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24875
25088
|
...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
|
|
24876
25089
|
...decision.salvagedTerminalOutputChildren === void 0 ? {} : { salvagedTerminalOutputChildren: decision.salvagedTerminalOutputChildren }
|
|
24877
25090
|
});
|
|
24878
|
-
|
|
25091
|
+
const acceptanceSnapshot = {
|
|
24879
25092
|
completion: decision.completion,
|
|
24880
25093
|
childStatusCounts: decision.childStatusCounts,
|
|
24881
25094
|
degradedReasons: decision.degradedReasons,
|
|
24882
25095
|
...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
|
|
24883
25096
|
...decision.salvagedTerminalOutputChildren === void 0 ? {} : { salvagedTerminalOutputChildren: decision.salvagedTerminalOutputChildren }
|
|
24884
|
-
}
|
|
25097
|
+
};
|
|
25098
|
+
if (claimStage !== "final") await runClaimConsistencyPass(result.output, acceptanceSnapshot);
|
|
24885
25099
|
let synthesizedFinal;
|
|
24886
25100
|
try {
|
|
24887
25101
|
synthesizedFinal = await runSynthesis(result.output);
|
|
@@ -24898,10 +25112,31 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24898
25112
|
...decision.children === void 0 ? {} : { acceptanceChildren: decision.children }
|
|
24899
25113
|
});
|
|
24900
25114
|
}
|
|
25115
|
+
if (claimStage !== "draft") {
|
|
25116
|
+
claimConsistencyDraftMeta = claimStage === "both" ? claimConsistencyMeta : void 0;
|
|
25117
|
+
await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
|
|
25118
|
+
}
|
|
24901
25119
|
const envelopeSchemaRecovered = (result.schemaRecoveredTerminalExchanges ?? 0) + synthesisSchemaRecoveredExchanges;
|
|
25120
|
+
const deliverable = deliverableVerdict(synthesizedFinal);
|
|
25121
|
+
const draftToFinal = opts?.synthesis === void 0 ? void 0 : (() => {
|
|
25122
|
+
const hashOf = (value) => createHash("sha256").update(jcsSerialize(value ?? null), "utf8").digest("hex");
|
|
25123
|
+
const draftHash = hashOf(result.output);
|
|
25124
|
+
const finalHash = hashOf(synthesizedFinal);
|
|
25125
|
+
return {
|
|
25126
|
+
draftHash,
|
|
25127
|
+
finalHash,
|
|
25128
|
+
rewritten: draftHash !== finalHash,
|
|
25129
|
+
...claimConsistencyMeta === void 0 ? {} : { claimsJudgedOn: claimStage }
|
|
25130
|
+
};
|
|
25131
|
+
})();
|
|
25132
|
+
const envelopeRejectedCandidates = rejectedFinishCandidates();
|
|
24902
25133
|
return {
|
|
24903
25134
|
result: synthesizedFinal,
|
|
24904
25135
|
completion: decision.completion,
|
|
25136
|
+
resultAvailable: deliverable.resultAvailable,
|
|
25137
|
+
...deliverable.deliverableAccepted === void 0 ? {} : { deliverableAccepted: deliverable.deliverableAccepted },
|
|
25138
|
+
...deliverable.acceptedArtifactRef === void 0 ? {} : { acceptedArtifactRef: deliverable.acceptedArtifactRef },
|
|
25139
|
+
...envelopeRejectedCandidates.length === 0 ? {} : { rejectedFinishCandidates: envelopeRejectedCandidates },
|
|
24905
25140
|
childStatusCounts: decision.childStatusCounts,
|
|
24906
25141
|
degradedReasons: decision.degradedReasons,
|
|
24907
25142
|
...decision.salvagedPartialChildren === void 0 ? {} : { salvagedPartialChildren: decision.salvagedPartialChildren },
|
|
@@ -24921,6 +25156,8 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24921
25156
|
...claimFindingsFound === void 0 ? {} : { claimContradictions: claimFindingsFound },
|
|
24922
25157
|
claimConsistencyMeta
|
|
24923
25158
|
},
|
|
25159
|
+
...claimConsistencyDraftMeta === void 0 ? {} : { claimConsistencyDraftMeta },
|
|
25160
|
+
...draftToFinal === void 0 ? {} : { draftToFinal },
|
|
24924
25161
|
semanticPasses: semanticPassesSummary(opts?.synthesis === void 0 ? {
|
|
24925
25162
|
ran: false,
|
|
24926
25163
|
reason: "not-configured"
|
|
@@ -26579,6 +26816,21 @@ function liftRunCompletion(candidate) {
|
|
|
26579
26816
|
if (typeof metaCandidate === "object" && metaCandidate !== null && !Array.isArray(metaCandidate)) lifted.claimConsistencyMeta = { ...metaCandidate };
|
|
26580
26817
|
const skippedCandidate = candidate.synthesisSkipped;
|
|
26581
26818
|
if (typeof skippedCandidate === "boolean" || typeof skippedCandidate === "string") lifted.synthesisSkipped = skippedCandidate;
|
|
26819
|
+
const acceptedCandidate = candidate.deliverableAccepted;
|
|
26820
|
+
if (typeof acceptedCandidate === "boolean") lifted.deliverableAccepted = acceptedCandidate;
|
|
26821
|
+
const availableCandidate = candidate.resultAvailable;
|
|
26822
|
+
if (typeof availableCandidate === "boolean") lifted.resultAvailable = availableCandidate;
|
|
26823
|
+
const artifactRefCandidate = candidate.acceptedArtifactRef;
|
|
26824
|
+
if (typeof artifactRefCandidate === "number" && Number.isSafeInteger(artifactRefCandidate) && artifactRefCandidate >= 0) lifted.acceptedArtifactRef = artifactRefCandidate;
|
|
26825
|
+
const rejectedCandidates = candidate.rejectedFinishCandidates;
|
|
26826
|
+
if (Array.isArray(rejectedCandidates)) {
|
|
26827
|
+
const validRow = (row) => {
|
|
26828
|
+
if (typeof row !== "object" || row === null) return false;
|
|
26829
|
+
const { callId, verdict, hash, chars, failed, ref } = row;
|
|
26830
|
+
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"));
|
|
26831
|
+
};
|
|
26832
|
+
if (rejectedCandidates.every(validRow)) lifted.rejectedFinishCandidates = rejectedCandidates.map((row) => ({ ...row }));
|
|
26833
|
+
}
|
|
26582
26834
|
return lifted;
|
|
26583
26835
|
}
|
|
26584
26836
|
/**
|
|
@@ -27174,6 +27426,10 @@ function createEngine(options) {
|
|
|
27174
27426
|
if (lifted.semanticPasses !== void 0) outcomeFacts.semanticPasses = lifted.semanticPasses;
|
|
27175
27427
|
if (lifted.claimConsistencyMeta !== void 0) outcomeFacts.claimConsistencyMeta = lifted.claimConsistencyMeta;
|
|
27176
27428
|
if (lifted.synthesisSkipped !== void 0) outcomeFacts.synthesisSkipped = lifted.synthesisSkipped;
|
|
27429
|
+
if (lifted.deliverableAccepted !== void 0) outcomeFacts.deliverableAccepted = lifted.deliverableAccepted;
|
|
27430
|
+
if (lifted.resultAvailable !== void 0) outcomeFacts.resultAvailable = lifted.resultAvailable;
|
|
27431
|
+
if (lifted.acceptedArtifactRef !== void 0) outcomeFacts.acceptedArtifactRef = lifted.acceptedArtifactRef;
|
|
27432
|
+
if (lifted.rejectedFinishCandidates !== void 0) outcomeFacts.rejectedFinishCandidates = lifted.rejectedFinishCandidates;
|
|
27177
27433
|
}
|
|
27178
27434
|
let settlementFailure;
|
|
27179
27435
|
let supersededBy;
|
|
@@ -27835,4 +28091,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
27835
28091
|
};
|
|
27836
28092
|
}
|
|
27837
28093
|
//#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 };
|
|
28094
|
+
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.
|
|
3
|
+
"version": "1.228.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",
|