@rulvar/core 1.240.0 → 1.242.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 +220 -11
- package/dist/index.js +311 -23
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1122,6 +1122,16 @@ type JournalEntry = {
|
|
|
1122
1122
|
cap?: number;
|
|
1123
1123
|
};
|
|
1124
1124
|
/**
|
|
1125
|
+
* Terminal agent entries whose invocation was aborted by the host's
|
|
1126
|
+
* finish rejection (RV3702): the declared finish contract rejected
|
|
1127
|
+
* the candidate past its repair bound, so the span died by host
|
|
1128
|
+
* hand with its wires fine. Stamped at settle from the typed abort
|
|
1129
|
+
* reason; never on a defective (throwing) validator, whose abort
|
|
1130
|
+
* carries its own reason, because a host defect is not a verdict on
|
|
1131
|
+
* the candidate. Policy, never identity, exactly like usageByModel.
|
|
1132
|
+
*/
|
|
1133
|
+
hostRejected?: boolean;
|
|
1134
|
+
/**
|
|
1125
1135
|
* Terminal escalated entries ONLY: the schema-validated
|
|
1126
1136
|
* EscalationReport with runtime-filled costToDate and salvage; replay
|
|
1127
1137
|
* synthesizes the byte-identical report from here (DEF-1).
|
|
@@ -2599,6 +2609,15 @@ type AgentEvents = {
|
|
|
2599
2609
|
*/
|
|
2600
2610
|
retryCount?: number;
|
|
2601
2611
|
/**
|
|
2612
|
+
* Present and true when the invocation was aborted by the host's
|
|
2613
|
+
* finish rejection (RV3702): the declared finish contract
|
|
2614
|
+
* rejected the candidate past its repair bound. Journaled on the
|
|
2615
|
+
* terminal agent entry (unlike retryCount), so a replayed
|
|
2616
|
+
* agent:end carries it too and both surfaces of the RV3404 cut
|
|
2617
|
+
* read the same count.
|
|
2618
|
+
*/
|
|
2619
|
+
hostRejected?: boolean;
|
|
2620
|
+
/**
|
|
2602
2621
|
* The exploration guard counters (RV-210). Present live whenever
|
|
2603
2622
|
* any exploration guard limit was configured for the invocation;
|
|
2604
2623
|
* on replay present only when the guard abort journaled it in the
|
|
@@ -3826,6 +3845,8 @@ interface TerminalPatch {
|
|
|
3826
3845
|
used: number;
|
|
3827
3846
|
cap?: number;
|
|
3828
3847
|
};
|
|
3848
|
+
/** Terminal agent entries: the host finish rejection stamp (RV3702); see JournalEntry. */
|
|
3849
|
+
hostRejected?: boolean;
|
|
3829
3850
|
/** Terminal escalated entries: the validated EscalationReport. */
|
|
3830
3851
|
escalation?: unknown;
|
|
3831
3852
|
/**
|
|
@@ -6428,6 +6449,8 @@ interface BudgetAccountView {
|
|
|
6428
6449
|
finalizeReserveUsd: number;
|
|
6429
6450
|
/** The synthesis payload hold (cycle 76); zero when none is committed. */
|
|
6430
6451
|
synthesisReserveUsd: number;
|
|
6452
|
+
/** The repair round's verdict hold (RV3701); zero when none is committed. */
|
|
6453
|
+
convergenceReserveUsd: number;
|
|
6431
6454
|
parentScope?: string;
|
|
6432
6455
|
}
|
|
6433
6456
|
/**
|
|
@@ -6727,6 +6750,28 @@ declare class RunBudget {
|
|
|
6727
6750
|
commitSynthesisReserve(scope: string, reserveUsd: number): void;
|
|
6728
6751
|
/** The synthesis dispatch consumes its reserve; see commitSynthesisReserve. */
|
|
6729
6752
|
releaseSynthesisReserve(scope: string): void;
|
|
6753
|
+
/**
|
|
6754
|
+
* Registers the repair round's verdict reserve (RV3701, the third
|
|
6755
|
+
* comparison experiment's arc): absolute dollars held on the
|
|
6756
|
+
* orchestrator account AND the run root for the verdict pass (the
|
|
6757
|
+
* round's second judge invocation) that must follow a DISPATCHED
|
|
6758
|
+
* claim repair round. The third comparison run
|
|
6759
|
+
* proved the round's two invocation tail is only as convergent as
|
|
6760
|
+
* the money left when the candidate materializes; with the verdict
|
|
6761
|
+
* money held from the moment the round is admitted, the round's own
|
|
6762
|
+
* repair turns (the layer-2b clamp prices output from a remainder
|
|
6763
|
+
* this hold shrinks) and any concurrent admission (the hold joins
|
|
6764
|
+
* the projected admission sum) cannot eat it, so a round the budget
|
|
6765
|
+
* can only START is refused before any wire call instead of being
|
|
6766
|
+
* paid for and left unjudgeable. Exactly the synthesis reserve
|
|
6767
|
+
* mechanics: released to the invocation it was held FOR (the
|
|
6768
|
+
* verdict pass dispatch), never joined to the severing check.
|
|
6769
|
+
* Idempotent per account: registering again adjusts the root by the
|
|
6770
|
+
* delta.
|
|
6771
|
+
*/
|
|
6772
|
+
commitConvergenceReserve(scope: string, reserveUsd: number): void;
|
|
6773
|
+
/** The verdict pass dispatch consumes its reserve; see commitConvergenceReserve. */
|
|
6774
|
+
releaseConvergenceReserve(scope: string): void;
|
|
6730
6775
|
/** The reserve is replaced by real spend when the spawn settles. */
|
|
6731
6776
|
releaseReserve(reserveUsd: number, accountScope?: string): void;
|
|
6732
6777
|
/**
|
|
@@ -10016,6 +10061,15 @@ interface OrchestrateAcceptance {
|
|
|
10016
10061
|
/** How many rejected finishes are repaired by default: the plan's repair once. */
|
|
10017
10062
|
declare const DEFAULT_FINISH_MAX_REPAIRS = 1;
|
|
10018
10063
|
/**
|
|
10064
|
+
* Character cap of the HOST VALIDATION LESSONS prompt block (RV3603):
|
|
10065
|
+
* the bounded repair round's prompt folds the run's journaled finish
|
|
10066
|
+
* validation failures so the round does not relearn a lesson the run
|
|
10067
|
+
* already bought, and a pathological history must not flood the
|
|
10068
|
+
* composition context. Rows keep journal order; the tail is dropped
|
|
10069
|
+
* and the block names how many rows it dropped.
|
|
10070
|
+
*/
|
|
10071
|
+
declare const FINISH_LESSON_CAP_CHARS = 2e3;
|
|
10072
|
+
/**
|
|
10019
10073
|
* Default maxTurns of the synthesize invocation (RV-211): the finish
|
|
10020
10074
|
* call plus headroom for one validator repair exchange.
|
|
10021
10075
|
*/
|
|
@@ -10038,7 +10092,8 @@ declare const DEFAULT_CLAIM_JUDGE_MAX_TURNS = 3;
|
|
|
10038
10092
|
* finish({ result }) call first passes the configured host validators;
|
|
10039
10093
|
* a rejection returns the failure reasons to the model as the call's
|
|
10040
10094
|
* error tool result and the turn continues (a repair turn: the model
|
|
10041
|
-
* fixes the result and calls finish again), bounded by maxRepairs
|
|
10095
|
+
* fixes the result and calls finish again), bounded by maxRepairs
|
|
10096
|
+
* within the composition invocation (RV3602). A
|
|
10042
10097
|
* rejection past the bound fails the run with the typed FailRunError
|
|
10043
10098
|
* (code 'fail_run', data.source 'orchestrator_finish_validation'),
|
|
10044
10099
|
* BEFORE the acceptance settle, so acceptance never judges a finish the
|
|
@@ -10067,7 +10122,14 @@ interface FinishValidationSpec {
|
|
|
10067
10122
|
* How many rejected finishes are returned to the model for repair
|
|
10068
10123
|
* before the run fails; a nonnegative integer, default
|
|
10069
10124
|
* {@link DEFAULT_FINISH_MAX_REPAIRS}. Zero means the first rejected
|
|
10070
|
-
* finish fails the run.
|
|
10125
|
+
* finish fails the run. The bound belongs to one composition
|
|
10126
|
+
* invocation (RV3602): with the bounded claim repair round armed
|
|
10127
|
+
* (`claimConsistency.onFound: 'repair'`), the initial composition
|
|
10128
|
+
* and the round each enter with the full bound, because the third
|
|
10129
|
+
* comparison run's round inherited a spent run wide pool and its
|
|
10130
|
+
* first regression was final by construction. At most two
|
|
10131
|
+
* invocations exist, so the worst case is `maxRepairs + 1` judged
|
|
10132
|
+
* finishes per invocation, twice.
|
|
10071
10133
|
*/
|
|
10072
10134
|
maxRepairs?: number;
|
|
10073
10135
|
/**
|
|
@@ -10717,10 +10779,15 @@ interface OrchestrateClaimConsistencyMeta {
|
|
|
10717
10779
|
* is a clean verdict, a positive count is a disagreement that stayed
|
|
10718
10780
|
* wherever the posture did not stop the run. The findings themselves
|
|
10719
10781
|
* ride `claimContradictions` beside this meta on the acceptance
|
|
10720
|
-
* envelope,
|
|
10721
|
-
* journaled
|
|
10722
|
-
* 2026-08-12 comparison
|
|
10723
|
-
* finding no terminal
|
|
10782
|
+
* envelope, and since RV3601 the engine lifts them onto RunOutcome,
|
|
10783
|
+
* the journaled settle and `run:end` beside the meta, from the
|
|
10784
|
+
* envelope or the typed error data alike: the 2026-08-12 comparison
|
|
10785
|
+
* run settled ok/complete over a retained finding no terminal
|
|
10786
|
+
* surface could count (this count is that fix, RV3304), then the
|
|
10787
|
+
* 2026-08-13 run failed typed with the findings buried in error
|
|
10788
|
+
* data while the outcome's top level read null. Only the compact
|
|
10789
|
+
* terminal envelope still carries the meta alone, this count
|
|
10790
|
+
* standing in for the details.
|
|
10724
10791
|
*/
|
|
10725
10792
|
findings?: number;
|
|
10726
10793
|
/**
|
|
@@ -11881,6 +11948,17 @@ declare function executeWorkflow<A, R>(internals: RunInternals, wf: Workflow<A,
|
|
|
11881
11948
|
//#endregion
|
|
11882
11949
|
//#region src/engine/cost-report.d.ts
|
|
11883
11950
|
/**
|
|
11951
|
+
* The named fallback bucket of the attribution folds (RV3604): an
|
|
11952
|
+
* absent phase, an EMPTY phase and an empty agentType all fold under
|
|
11953
|
+
* 'unknown' instead of minting a '' key. The third comparison run's
|
|
11954
|
+
* report read `byPhase {"": 5.58}` for the whole run and a '' bucket
|
|
11955
|
+
* beside the named agent types: the empty string passed the `??`
|
|
11956
|
+
* fallback, and a '' key is unaddressable in every downstream table.
|
|
11957
|
+
* Both builders and both live accumulation sites apply this one rule,
|
|
11958
|
+
* so the live report and the journal fold cannot disagree on the key.
|
|
11959
|
+
*/
|
|
11960
|
+
declare function attributionBucket(value: string | undefined): string;
|
|
11961
|
+
/**
|
|
11884
11962
|
* Folds the per-run attribution buckets into the normative CostReport.
|
|
11885
11963
|
* Live attribution buckets never see abandoned subtrees, so a host
|
|
11886
11964
|
* that tracked abandoned spend itself passes it as `abandoned`;
|
|
@@ -11991,8 +12069,15 @@ interface CostReport {
|
|
|
11991
12069
|
};
|
|
11992
12070
|
/** Keyed by canonical ModelRef 'adapterId:model'. */
|
|
11993
12071
|
byModel: Record<string, number>;
|
|
11994
|
-
/**
|
|
12072
|
+
/**
|
|
12073
|
+
* ctx.phase names; phase is structural for this map. Spend with no
|
|
12074
|
+
* phase, or an EMPTY phase, folds under the named 'unknown' bucket
|
|
12075
|
+
* (RV3604): a '' key is unaddressable in every downstream table,
|
|
12076
|
+
* and the third comparison run's report read `byPhase {"": 5.58}`
|
|
12077
|
+
* for the whole run.
|
|
12078
|
+
*/
|
|
11995
12079
|
byPhase: Record<string, number>;
|
|
12080
|
+
/** Spawn agentType names; absent and empty fold under 'unknown' (RV3604). */
|
|
11996
12081
|
byAgentType: Record<string, number>;
|
|
11997
12082
|
byRole: Record<InvocationRole, number>;
|
|
11998
12083
|
/**
|
|
@@ -12177,7 +12262,20 @@ type RunOutcome<R> = {
|
|
|
12177
12262
|
* and the error terminal carried null: the truth now rides every
|
|
12178
12263
|
* terminal that has it, ok and failed alike.
|
|
12179
12264
|
*/
|
|
12180
|
-
claimConsistencyMeta?: Record<string, unknown>;
|
|
12265
|
+
claimConsistencyMeta?: Record<string, unknown>;
|
|
12266
|
+
/**
|
|
12267
|
+
* The judged contradictions themselves (RV3601), lifted from the
|
|
12268
|
+
* same envelope or typed error data as the meta beside them. RV3304
|
|
12269
|
+
* deliberately kept the details off this surface and let the meta's
|
|
12270
|
+
* `findings` count stand in; the 2026-08-13 comparison run then
|
|
12271
|
+
* failed typed with the findings buried in `error.data` while the
|
|
12272
|
+
* outcome's top level read null beside a null meta, so the details
|
|
12273
|
+
* now ride wherever the meta rides (this outcome, the journaled
|
|
12274
|
+
* settle, `run:end`), the compact terminal envelope alone keeping
|
|
12275
|
+
* the meta only. `[]` is the judge's claim of a clean document;
|
|
12276
|
+
* absence means nothing was judged (RV1209).
|
|
12277
|
+
*/
|
|
12278
|
+
claimContradictions?: Record<string, unknown>[]; /** The synthesis-skip marker from the same envelope; same lift and posture (RV2203). */
|
|
12181
12279
|
synthesisSkipped?: boolean | string;
|
|
12182
12280
|
/**
|
|
12183
12281
|
* Whether the artifact THIS terminal carries was accepted by the
|
|
@@ -13568,6 +13666,35 @@ interface JournaledCriticalPath {
|
|
|
13568
13666
|
/** Settled judge-side synthesize spans, counted; same condition. */
|
|
13569
13667
|
judgeSpans?: number;
|
|
13570
13668
|
/**
|
|
13669
|
+
* First stamp to the FIRST settled composition-side span's end
|
|
13670
|
+
* (RV3605): when a candidate deliverable first existed, readable
|
|
13671
|
+
* from the archive. The third comparison run held a mechanically
|
|
13672
|
+
* accepted candidate 25 minutes before it lost typed, and the only
|
|
13673
|
+
* route to that fact was a span dig. Needs everything the wall
|
|
13674
|
+
* needs (one segment) plus everything the split needs (every
|
|
13675
|
+
* synthesize span labelled, or the milestone would count a judge as
|
|
13676
|
+
* a candidate); absent otherwise, never guessed.
|
|
13677
|
+
*/
|
|
13678
|
+
firstCandidateMs?: number;
|
|
13679
|
+
/**
|
|
13680
|
+
* First stamp to the LAST settled composition-side span's end; same
|
|
13681
|
+
* conditions. Time to the accepted deliverable exactly when the
|
|
13682
|
+
* terminal says `deliverableAccepted: true`; on a failed run it is
|
|
13683
|
+
* when the last LOSING candidate settled, so pair it with the
|
|
13684
|
+
* acceptance verdict and never read it as a win on an error
|
|
13685
|
+
* terminal.
|
|
13686
|
+
*/
|
|
13687
|
+
lastCandidateMs?: number;
|
|
13688
|
+
/**
|
|
13689
|
+
* Settled agent spans whose invocation was aborted by the host's
|
|
13690
|
+
* finish rejection (RV3702): the journaled `hostRejected` stamps
|
|
13691
|
+
* counted. Unconditional (the stamp is self contained: no label, no
|
|
13692
|
+
* segment condition) and zero when none, exactly the live reading
|
|
13693
|
+
* of the same run: the layer split (wires fine, document refused by
|
|
13694
|
+
* host) stays readable years after the process exited.
|
|
13695
|
+
*/
|
|
13696
|
+
hostRejectedSpans: number;
|
|
13697
|
+
/**
|
|
13571
13698
|
* The window itemization a journal CAN answer (RV3404); present
|
|
13572
13699
|
* exactly when `postFanInMs` is.
|
|
13573
13700
|
*/
|
|
@@ -13852,6 +13979,28 @@ interface PinnedPricingSegment {
|
|
|
13852
13979
|
pricingVersion?: string;
|
|
13853
13980
|
/** The applied rows THIS settle pinned. */
|
|
13854
13981
|
rows: AppliedPricingRow[];
|
|
13982
|
+
/**
|
|
13983
|
+
* sha256 over the canonical JSON of THIS pin's rows (RV3703): the
|
|
13984
|
+
* version string is a label the table author chose, and the third
|
|
13985
|
+
* experiment's arc found a price defect that a label cannot expose;
|
|
13986
|
+
* the hash is the content. Two tables sharing a version string but
|
|
13987
|
+
* disagreeing on rates are distinguishable, and two folds of one
|
|
13988
|
+
* journal always derive the same hex. Computed at read time from
|
|
13989
|
+
* the pinned bytes: the journal is unchanged and every existing pin
|
|
13990
|
+
* gains it.
|
|
13991
|
+
*/
|
|
13992
|
+
rowsHash: string;
|
|
13993
|
+
/**
|
|
13994
|
+
* The freshness range of THIS pin's dated rows (RV3703): the oldest
|
|
13995
|
+
* and newest `ratesVerifiedAt` among rows carrying a parsable one,
|
|
13996
|
+
* the machine-readable age of the table that priced the segment.
|
|
13997
|
+
* Absent when no row is dated: freshness is then unattested, never
|
|
13998
|
+
* guessed.
|
|
13999
|
+
*/
|
|
14000
|
+
ratesVerifiedAt?: {
|
|
14001
|
+
oldest: string;
|
|
14002
|
+
newest: string;
|
|
14003
|
+
};
|
|
13855
14004
|
}
|
|
13856
14005
|
/** What `journalPricingSnapshot` rebuilds from a pinned run settle. */
|
|
13857
14006
|
interface JournalPricingSnapshot {
|
|
@@ -13859,6 +14008,16 @@ interface JournalPricingSnapshot {
|
|
|
13859
14008
|
pricingVersion?: string;
|
|
13860
14009
|
/** The last pin's rows: the union covering the whole settled journal. */
|
|
13861
14010
|
rows: AppliedPricingRow[];
|
|
14011
|
+
/** The last pin's content hash (RV3703); see PinnedPricingSegment.rowsHash. */
|
|
14012
|
+
rowsHash: string;
|
|
14013
|
+
/**
|
|
14014
|
+
* The last pin's freshness range (RV3703); see the per-segment
|
|
14015
|
+
* field. Absent when no row of the last pin is dated.
|
|
14016
|
+
*/
|
|
14017
|
+
ratesVerifiedAt?: {
|
|
14018
|
+
oldest: string;
|
|
14019
|
+
newest: string;
|
|
14020
|
+
};
|
|
13862
14021
|
/**
|
|
13863
14022
|
* The seq of the last pinning settle: rows at or past it belong to a
|
|
13864
14023
|
* segment no pin covers yet, so a caller composing with a live table
|
|
@@ -14665,7 +14824,13 @@ interface PreflightOrchestratorSpec {
|
|
|
14665
14824
|
* before the first wire, not the journal after the last. Pairings
|
|
14666
14825
|
* orchestrate() refuses at intake (repair at the draft stage,
|
|
14667
14826
|
* repair without a synthesis, carry at the final stage, RV3301)
|
|
14668
|
-
* surface as error findings: the run would refuse to start.
|
|
14827
|
+
* surface as error findings: the run would refuse to start. This
|
|
14828
|
+
* static arithmetic has a runtime twin (RV3701): at the moment a
|
|
14829
|
+
* round actually dispatches, the engine holds the money of the round's second judge pass
|
|
14830
|
+
* (this same `judge.estCost` first, else the run's own observed
|
|
14831
|
+
* post draft judge price) until that pass admits, so the
|
|
14832
|
+
* declared estimate is not only judged before the run but enforced
|
|
14833
|
+
* inside it.
|
|
14669
14834
|
*/
|
|
14670
14835
|
onFound?: "report" | "carry" | "fail" | "repair";
|
|
14671
14836
|
/**
|
|
@@ -14759,7 +14924,13 @@ interface PreflightInput {
|
|
|
14759
14924
|
* the mandatory synthesis tail (RV2504): every granted repair can
|
|
14760
14925
|
* write to the output allowance, so the tail
|
|
14761
14926
|
* `synthesis-reserve-below-cap-composition` prices is one
|
|
14762
|
-
* composition plus this many turns, whatever the turn reserve
|
|
14927
|
+
* composition plus this many turns, whatever the turn reserve
|
|
14928
|
+
* says. Since RV3602 the bound belongs to one composition
|
|
14929
|
+
* invocation, so this tail is the price of EACH invocation: the
|
|
14930
|
+
* armed claim repair round (RV3307) runs a second invocation with
|
|
14931
|
+
* its own full bound, and the working room finding already prices
|
|
14932
|
+
* that round at the declared synthesis reserve, the host's own
|
|
14933
|
+
* estimate of exactly this tail.
|
|
14763
14934
|
*/
|
|
14764
14935
|
maxRepairs?: number;
|
|
14765
14936
|
/**
|
|
@@ -15480,6 +15651,14 @@ interface AgentInvocationRow {
|
|
|
15480
15651
|
replayed: boolean;
|
|
15481
15652
|
/** True when the span's agent:end never arrived. */
|
|
15482
15653
|
open: boolean;
|
|
15654
|
+
/**
|
|
15655
|
+
* Present and true when the invocation was aborted by the host's
|
|
15656
|
+
* finish rejection (RV3702): the declared finish contract rejected
|
|
15657
|
+
* the candidate past its repair bound, so the span died by host
|
|
15658
|
+
* hand with its wires fine. From the agent:end stamp; absent
|
|
15659
|
+
* everywhere else.
|
|
15660
|
+
*/
|
|
15661
|
+
hostRejected?: boolean;
|
|
15483
15662
|
phases: PhaseRow[];
|
|
15484
15663
|
}
|
|
15485
15664
|
/** The reduced table plus the per-role aggregate across every span. */
|
|
@@ -15563,12 +15742,42 @@ interface CriticalPath {
|
|
|
15563
15742
|
compositionSpans: number;
|
|
15564
15743
|
/** Completed judge-side synthesize spans, counted (RV3404). */
|
|
15565
15744
|
judgeSpans: number;
|
|
15745
|
+
/**
|
|
15746
|
+
* run:start to the FIRST completed composition-side synthesize
|
|
15747
|
+
* span's end (RV3605): when a candidate deliverable first existed.
|
|
15748
|
+
* The third comparison run held a mechanically accepted candidate
|
|
15749
|
+
* from its 103rd journal seq onward and lost typed 25 minutes
|
|
15750
|
+
* later; nothing on any surface said when the latent document
|
|
15751
|
+
* materialized, and the judge had to dig spans by hand. Absent
|
|
15752
|
+
* without a run:start or a completed composition span, and live
|
|
15753
|
+
* fidelity like every wall figure here.
|
|
15754
|
+
*/
|
|
15755
|
+
firstCandidateMs?: number;
|
|
15756
|
+
/**
|
|
15757
|
+
* run:start to the LAST completed composition-side span's end
|
|
15758
|
+
* (RV3605). On a run whose terminal carries `deliverableAccepted:
|
|
15759
|
+
* true` this is when the accepted composition settled, the time to
|
|
15760
|
+
* accepted deliverable; on a failed run it is when the last LOSING
|
|
15761
|
+
* candidate settled, so pair it with the acceptance verdict and
|
|
15762
|
+
* never read it as a win on an error terminal (the comparison rule
|
|
15763
|
+
* the third experiment wrote down).
|
|
15764
|
+
*/
|
|
15765
|
+
lastCandidateMs?: number;
|
|
15566
15766
|
/** postFanInMs / runWallMs when both are defined and the wall is > 0. */
|
|
15567
15767
|
postFanInShare?: number;
|
|
15568
15768
|
/** synthesisMs / runWallMs under the same conditions. */
|
|
15569
15769
|
synthesisShare?: number;
|
|
15570
15770
|
/** Settled non-coordination agent spans that anchored the fan-in. */
|
|
15571
15771
|
workerSpans: number;
|
|
15772
|
+
/**
|
|
15773
|
+
* Settled spans whose invocation was aborted by the host's finish
|
|
15774
|
+
* rejection (RV3702): the `hostRejected` stamps counted. The count
|
|
15775
|
+
* is unconditional (the stamp is self contained, no labelling
|
|
15776
|
+
* condition applies) and zero when none: on the third comparison
|
|
15777
|
+
* run's shape it reads 1, the round's composition, telling the host
|
|
15778
|
+
* rejection apart from a provider death at the cut level.
|
|
15779
|
+
*/
|
|
15780
|
+
hostRejectedSpans: number;
|
|
15572
15781
|
/** The RV710 decomposition of the window; present with postFanInMs. */
|
|
15573
15782
|
postFanIn?: PostFanInBreakdown;
|
|
15574
15783
|
}
|
|
@@ -15783,4 +15992,4 @@ interface SandboxBridge {
|
|
|
15783
15992
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
15784
15993
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
15785
15994
|
//#endregion
|
|
15786
|
-
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, ChildrenAtFailure, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DelimitedStatementOptions, 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, FINAL_COMPOSITION_LABEL, 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, JournalIntegrityError, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSealedError, JournalSerializationContext, JournalSerializationHook, type JournalStore, JournaledChild, JournaledChildRoster, JournaledCriticalPath, JournaledPostFanIn, JournaledSynthesisCandidate, JournaledSynthesisCandidateReport, 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, OutputContractManifest, 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_ADMISSION_DECISION_TYPE, SPAWN_AGENT_SCHEMA, SYNTHESIS_NOTE_LABEL, 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, SynthesisCandidateFailure, TERMINAL_TELEMETRY_SCOPE, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TelemetryScope, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminalTelemetryScopes, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCalibrationExclusion, ToolCalibrationReport, ToolCalibrationRow, 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, childRostersFromJournal, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimJudgeStageOf, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, criticalPathFromJournal, 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, isClaimJudgeLabel, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, manifestValidators, 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, renderContractRequirements, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredMentionsValidator, 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, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, unionOfIntervalsMs, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
15995
|
+
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, ChildrenAtFailure, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DelimitedStatementOptions, 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, FINAL_COMPOSITION_LABEL, FINISH_LESSON_CAP_CHARS, 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, JournalIntegrityError, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSealedError, JournalSerializationContext, JournalSerializationHook, type JournalStore, JournaledChild, JournaledChildRoster, JournaledCriticalPath, JournaledPostFanIn, JournaledSynthesisCandidate, JournaledSynthesisCandidateReport, 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, OutputContractManifest, 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_ADMISSION_DECISION_TYPE, SPAWN_AGENT_SCHEMA, SYNTHESIS_NOTE_LABEL, 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, SynthesisCandidateFailure, TERMINAL_TELEMETRY_SCOPE, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TelemetryScope, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminalTelemetryScopes, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCalibrationExclusion, ToolCalibrationReport, ToolCalibrationRow, 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, attributionBucket, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, childRostersFromJournal, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimJudgeStageOf, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, criticalPathFromJournal, 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, isClaimJudgeLabel, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, manifestValidators, 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, renderContractRequirements, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredMentionsValidator, 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, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, unionOfIntervalsMs, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/dist/index.js
CHANGED
|
@@ -7972,6 +7972,7 @@ var Replayer = class {
|
|
|
7972
7972
|
if (patch.evidence !== void 0) entry.evidence = patch.evidence;
|
|
7973
7973
|
if (patch.evidenceEntries !== void 0) entry.evidenceEntries = patch.evidenceEntries;
|
|
7974
7974
|
if (patch.toolBudget !== void 0) entry.toolBudget = patch.toolBudget;
|
|
7975
|
+
if (patch.hostRejected !== void 0) entry.hostRejected = patch.hostRejected;
|
|
7975
7976
|
if (patch.artifacts !== void 0) entry.artifacts = toJournalValue(patch.artifacts, "terminal artifacts");
|
|
7976
7977
|
if (patch.escalation !== void 0) entry.escalation = toJournalValue(patch.escalation, "escalation report");
|
|
7977
7978
|
if (patch.memoizeOutcome !== void 0) entry.memoizeOutcome = patch.memoizeOutcome;
|
|
@@ -8936,6 +8937,7 @@ const TERMINAL_TELEMETRY_SCOPE = Object.freeze({
|
|
|
8936
8937
|
childrenAtFailure: "cumulative",
|
|
8937
8938
|
semanticPasses: "terminal",
|
|
8938
8939
|
claimConsistencyMeta: "terminal",
|
|
8940
|
+
claimContradictions: "terminal",
|
|
8939
8941
|
synthesisSkipped: "terminal",
|
|
8940
8942
|
deliverableAccepted: "terminal",
|
|
8941
8943
|
resultAvailable: "terminal",
|
|
@@ -9310,6 +9312,7 @@ function reduceInvocationTable(events) {
|
|
|
9310
9312
|
row.usageApprox = event.usageApprox === true;
|
|
9311
9313
|
row.retryCount = event.retryCount ?? 0;
|
|
9312
9314
|
if (event.toolBudget !== void 0) row.toolBudget = event.toolBudget;
|
|
9315
|
+
if (event.hostRejected === true) row.hostRejected = true;
|
|
9313
9316
|
totalCostUsd += event.costUsd;
|
|
9314
9317
|
break;
|
|
9315
9318
|
}
|
|
@@ -9330,6 +9333,20 @@ function reduceInvocationTable(events) {
|
|
|
9330
9333
|
*/
|
|
9331
9334
|
const CLAIM_JUDGE_LABEL = "claim-consistency-judge";
|
|
9332
9335
|
/**
|
|
9336
|
+
* The live abort reason of a finish rejection (RV3702): the value
|
|
9337
|
+
* `orchestrate()` aborts a composition invocation's signal with when
|
|
9338
|
+
* the declared finish contract rejects its candidate past the repair
|
|
9339
|
+
* bound, and ONLY then; a defective (throwing) validator aborts with
|
|
9340
|
+
* its own distinct reason, because a host defect is not a verdict on
|
|
9341
|
+
* the candidate. The settle layer reads the reason back and stamps
|
|
9342
|
+
* `hostRejected` onto the terminal agent entry and the live
|
|
9343
|
+
* `agent:end` event, so both span surfaces can tell a host rejection
|
|
9344
|
+
* (wires fine, document refused) from a provider failure without a
|
|
9345
|
+
* journal dig; the third comparison run's reader had exactly that
|
|
9346
|
+
* span (two successful wires, span cancelled) and nothing to name it.
|
|
9347
|
+
*/
|
|
9348
|
+
const FINISH_REJECTION_ABORT_REASON = "rulvar:finish-validation";
|
|
9349
|
+
/**
|
|
9333
9350
|
* Whether a synthesize span's label names a claim-consistency judge
|
|
9334
9351
|
* invocation: the exact {@link CLAIM_JUDGE_LABEL}, or a suffixed
|
|
9335
9352
|
* variant of it (the final pass dispatches under
|
|
@@ -9412,6 +9429,9 @@ function reduceCriticalPath(events) {
|
|
|
9412
9429
|
let finalJudgeMs = 0;
|
|
9413
9430
|
let compositionSpans = 0;
|
|
9414
9431
|
let judgeSpans = 0;
|
|
9432
|
+
let hostRejectedSpans = 0;
|
|
9433
|
+
let firstCompositionEnd;
|
|
9434
|
+
let lastCompositionEnd;
|
|
9415
9435
|
const coordinationModel = [];
|
|
9416
9436
|
const coordinationTools = [];
|
|
9417
9437
|
const synthesisSpans = [];
|
|
@@ -9450,6 +9470,7 @@ function reduceCriticalPath(events) {
|
|
|
9450
9470
|
case "agent:end": {
|
|
9451
9471
|
const started = startBySpan.get(event.spanId);
|
|
9452
9472
|
if (started === void 0) break;
|
|
9473
|
+
if (event.hostRejected === true) hostRejectedSpans += 1;
|
|
9453
9474
|
if (started.role === "synthesize") {
|
|
9454
9475
|
const wall = Math.max(0, at - started.at);
|
|
9455
9476
|
const stage = claimJudgeStageOf(started.label);
|
|
@@ -9463,6 +9484,8 @@ function reduceCriticalPath(events) {
|
|
|
9463
9484
|
} else {
|
|
9464
9485
|
finalCompositionMs += wall;
|
|
9465
9486
|
compositionSpans += 1;
|
|
9487
|
+
firstCompositionEnd = firstCompositionEnd === void 0 ? at : firstCompositionEnd;
|
|
9488
|
+
lastCompositionEnd = lastCompositionEnd === void 0 ? at : Math.max(lastCompositionEnd, at);
|
|
9466
9489
|
}
|
|
9467
9490
|
synthesisSpans.push({
|
|
9468
9491
|
from: started.at,
|
|
@@ -9486,9 +9509,12 @@ function reduceCriticalPath(events) {
|
|
|
9486
9509
|
finalJudgeMs,
|
|
9487
9510
|
compositionSpans,
|
|
9488
9511
|
judgeSpans,
|
|
9489
|
-
workerSpans
|
|
9512
|
+
workerSpans,
|
|
9513
|
+
hostRejectedSpans
|
|
9490
9514
|
};
|
|
9491
9515
|
if (runStart !== void 0 && runEnd !== void 0) path.runWallMs = Math.max(0, runEnd - runStart);
|
|
9516
|
+
if (runStart !== void 0 && firstCompositionEnd !== void 0) path.firstCandidateMs = Math.max(0, firstCompositionEnd - runStart);
|
|
9517
|
+
if (runStart !== void 0 && lastCompositionEnd !== void 0) path.lastCandidateMs = Math.max(0, lastCompositionEnd - runStart);
|
|
9492
9518
|
if (runEnd !== void 0 && lastWorkerEnd !== void 0) {
|
|
9493
9519
|
path.postFanInMs = Math.max(0, runEnd - lastWorkerEnd);
|
|
9494
9520
|
const windowFrom = Math.min(lastWorkerEnd, runEnd);
|
|
@@ -9576,6 +9602,7 @@ function criticalPathFromJournal(entries) {
|
|
|
9576
9602
|
let lastWorkerEnd;
|
|
9577
9603
|
let workerSpans = 0;
|
|
9578
9604
|
let unclassifiedSpans = 0;
|
|
9605
|
+
let hostRejectedSpans = 0;
|
|
9579
9606
|
let synthesisMs = 0;
|
|
9580
9607
|
let finalCompositionMs = 0;
|
|
9581
9608
|
let semanticJudgeMs = 0;
|
|
@@ -9583,6 +9610,8 @@ function criticalPathFromJournal(entries) {
|
|
|
9583
9610
|
let finalJudgeMs = 0;
|
|
9584
9611
|
let compositionSpans = 0;
|
|
9585
9612
|
let judgeSpans = 0;
|
|
9613
|
+
let firstCompositionEnd;
|
|
9614
|
+
let lastCompositionEnd;
|
|
9586
9615
|
let labelledSynthesis = false;
|
|
9587
9616
|
let unlabelledSynthesis = false;
|
|
9588
9617
|
const synthSpans = [];
|
|
@@ -9593,6 +9622,7 @@ function criticalPathFromJournal(entries) {
|
|
|
9593
9622
|
const last = endedAt ?? startedAt;
|
|
9594
9623
|
if (last !== void 0) runEnd = runEnd === void 0 ? last : Math.max(runEnd, last);
|
|
9595
9624
|
if (entry.kind !== "agent" || entry.status === "running" || entry.status === "suspended") continue;
|
|
9625
|
+
if (entry.hostRejected === true) hostRejectedSpans += 1;
|
|
9596
9626
|
const role = entry.costAttribution?.role;
|
|
9597
9627
|
if (role === void 0) {
|
|
9598
9628
|
unclassifiedSpans += 1;
|
|
@@ -9626,6 +9656,8 @@ function criticalPathFromJournal(entries) {
|
|
|
9626
9656
|
} else {
|
|
9627
9657
|
finalCompositionMs += wall;
|
|
9628
9658
|
compositionSpans += 1;
|
|
9659
|
+
firstCompositionEnd = firstCompositionEnd === void 0 ? endedAt : Math.min(firstCompositionEnd, endedAt);
|
|
9660
|
+
lastCompositionEnd = lastCompositionEnd === void 0 ? endedAt : Math.max(lastCompositionEnd, endedAt);
|
|
9629
9661
|
}
|
|
9630
9662
|
synthSpans.push({
|
|
9631
9663
|
from: startedAt,
|
|
@@ -9638,7 +9670,8 @@ function criticalPathFromJournal(entries) {
|
|
|
9638
9670
|
workerSpans,
|
|
9639
9671
|
synthesisMs,
|
|
9640
9672
|
unclassifiedSpans,
|
|
9641
|
-
segments
|
|
9673
|
+
segments,
|
|
9674
|
+
hostRejectedSpans
|
|
9642
9675
|
};
|
|
9643
9676
|
const splitLegible = labelledSynthesis && !unlabelledSynthesis;
|
|
9644
9677
|
if (splitLegible) {
|
|
@@ -9651,6 +9684,8 @@ function criticalPathFromJournal(entries) {
|
|
|
9651
9684
|
}
|
|
9652
9685
|
if (segments > 1 || runStart === void 0 || runEnd === void 0) return path;
|
|
9653
9686
|
path.runWallMs = Math.max(0, runEnd - runStart);
|
|
9687
|
+
if (splitLegible && firstCompositionEnd !== void 0) path.firstCandidateMs = Math.max(0, firstCompositionEnd - runStart);
|
|
9688
|
+
if (splitLegible && lastCompositionEnd !== void 0) path.lastCandidateMs = Math.max(0, lastCompositionEnd - runStart);
|
|
9654
9689
|
if (lastWorkerEnd !== void 0) {
|
|
9655
9690
|
path.postFanInMs = Math.max(0, runEnd - lastWorkerEnd);
|
|
9656
9691
|
const windowFrom = Math.min(lastWorkerEnd, runEnd);
|
|
@@ -14862,6 +14897,7 @@ var RunBudget = class {
|
|
|
14862
14897
|
committedReserveUsd: 0,
|
|
14863
14898
|
finalizeReserveUsd: 0,
|
|
14864
14899
|
synthesisReserveUsd: 0,
|
|
14900
|
+
convergenceReserveUsd: 0,
|
|
14865
14901
|
controller: new AbortController()
|
|
14866
14902
|
};
|
|
14867
14903
|
if (options.ceilingUsd !== void 0) root.ceilingUsd = options.ceilingUsd;
|
|
@@ -14912,6 +14948,7 @@ var RunBudget = class {
|
|
|
14912
14948
|
committedReserveUsd: 0,
|
|
14913
14949
|
finalizeReserveUsd: options.finalizeReserveUsd ?? 0,
|
|
14914
14950
|
synthesisReserveUsd: 0,
|
|
14951
|
+
convergenceReserveUsd: 0,
|
|
14915
14952
|
parentScope,
|
|
14916
14953
|
controller: new AbortController()
|
|
14917
14954
|
};
|
|
@@ -15012,7 +15049,8 @@ var RunBudget = class {
|
|
|
15012
15049
|
spentUsd: account.spentUsd,
|
|
15013
15050
|
committedReserveUsd: account.committedReserveUsd,
|
|
15014
15051
|
finalizeReserveUsd: account.finalizeReserveUsd,
|
|
15015
|
-
synthesisReserveUsd: account.synthesisReserveUsd
|
|
15052
|
+
synthesisReserveUsd: account.synthesisReserveUsd,
|
|
15053
|
+
convergenceReserveUsd: account.convergenceReserveUsd
|
|
15016
15054
|
};
|
|
15017
15055
|
if (account.ceilingUsd !== void 0) view.ceilingUsd = account.ceilingUsd;
|
|
15018
15056
|
if (account.parentScope !== void 0) view.parentScope = account.parentScope;
|
|
@@ -15026,7 +15064,7 @@ var RunBudget = class {
|
|
|
15026
15064
|
remainderOf(scope) {
|
|
15027
15065
|
const account = this.accounts.get(scope);
|
|
15028
15066
|
if (account?.ceilingUsd === void 0) return;
|
|
15029
|
-
return Math.max(0, account.ceilingUsd - account.spentUsd - account.committedReserveUsd - account.finalizeReserveUsd - account.synthesisReserveUsd);
|
|
15067
|
+
return Math.max(0, account.ceilingUsd - account.spentUsd - account.committedReserveUsd - account.finalizeReserveUsd - account.synthesisReserveUsd - account.convergenceReserveUsd);
|
|
15030
15068
|
}
|
|
15031
15069
|
/**
|
|
15032
15070
|
* The tightest allowance headroom on the chain of `scope`: the minimum
|
|
@@ -15106,15 +15144,16 @@ var RunBudget = class {
|
|
|
15106
15144
|
}
|
|
15107
15145
|
for (const account of this.chainOf(accountScope)) {
|
|
15108
15146
|
if (account.ceilingUsd === void 0) continue;
|
|
15109
|
-
const committed = account.spentUsd + account.committedReserveUsd + account.finalizeReserveUsd + account.synthesisReserveUsd;
|
|
15147
|
+
const committed = account.spentUsd + account.committedReserveUsd + account.finalizeReserveUsd + account.synthesisReserveUsd + account.convergenceReserveUsd;
|
|
15110
15148
|
if (committed >= account.ceilingUsd || committed + reserveUsd > account.ceilingUsd) {
|
|
15111
15149
|
if (account.scope === "run") this.exhaustedInternal = true;
|
|
15112
|
-
throw new BudgetExhaustedError(`budget ceiling reached on account '${account.scope}': spent ${account.spentUsd.toFixed(4)} USD plus committed reserves ${(account.committedReserveUsd + account.finalizeReserveUsd).toFixed(4)} USD ` + (account.synthesisReserveUsd > 0 ? `plus the held synthesis reserve ${account.synthesisReserveUsd.toFixed(4)} USD ` : "") + `plus the proposed reserve ${reserveUsd.toFixed(4)} USD does not fit the ceiling ${account.ceilingUsd.toFixed(4)} USD`, { data: {
|
|
15150
|
+
throw new BudgetExhaustedError(`budget ceiling reached on account '${account.scope}': spent ${account.spentUsd.toFixed(4)} USD plus committed reserves ${(account.committedReserveUsd + account.finalizeReserveUsd).toFixed(4)} USD ` + (account.synthesisReserveUsd > 0 ? `plus the held synthesis reserve ${account.synthesisReserveUsd.toFixed(4)} USD ` : "") + (account.convergenceReserveUsd > 0 ? `plus the held convergence reserve ${account.convergenceReserveUsd.toFixed(4)} USD ` : "") + `plus the proposed reserve ${reserveUsd.toFixed(4)} USD does not fit the ceiling ${account.ceilingUsd.toFixed(4)} USD`, { data: {
|
|
15113
15151
|
account: account.scope,
|
|
15114
15152
|
spentUsd: account.spentUsd,
|
|
15115
15153
|
committedReserveUsd: account.committedReserveUsd,
|
|
15116
15154
|
finalizeReserveUsd: account.finalizeReserveUsd,
|
|
15117
15155
|
synthesisReserveUsd: account.synthesisReserveUsd,
|
|
15156
|
+
convergenceReserveUsd: account.convergenceReserveUsd,
|
|
15118
15157
|
proposedReserveUsd: reserveUsd,
|
|
15119
15158
|
ceilingUsd: account.ceilingUsd
|
|
15120
15159
|
} });
|
|
@@ -15206,6 +15245,41 @@ var RunBudget = class {
|
|
|
15206
15245
|
account.synthesisReserveUsd = 0;
|
|
15207
15246
|
this.emitUpdate();
|
|
15208
15247
|
}
|
|
15248
|
+
/**
|
|
15249
|
+
* Registers the repair round's verdict reserve (RV3701, the third
|
|
15250
|
+
* comparison experiment's arc): absolute dollars held on the
|
|
15251
|
+
* orchestrator account AND the run root for the verdict pass (the
|
|
15252
|
+
* round's second judge invocation) that must follow a DISPATCHED
|
|
15253
|
+
* claim repair round. The third comparison run
|
|
15254
|
+
* proved the round's two invocation tail is only as convergent as
|
|
15255
|
+
* the money left when the candidate materializes; with the verdict
|
|
15256
|
+
* money held from the moment the round is admitted, the round's own
|
|
15257
|
+
* repair turns (the layer-2b clamp prices output from a remainder
|
|
15258
|
+
* this hold shrinks) and any concurrent admission (the hold joins
|
|
15259
|
+
* the projected admission sum) cannot eat it, so a round the budget
|
|
15260
|
+
* can only START is refused before any wire call instead of being
|
|
15261
|
+
* paid for and left unjudgeable. Exactly the synthesis reserve
|
|
15262
|
+
* mechanics: released to the invocation it was held FOR (the
|
|
15263
|
+
* verdict pass dispatch), never joined to the severing check.
|
|
15264
|
+
* Idempotent per account: registering again adjusts the root by the
|
|
15265
|
+
* delta.
|
|
15266
|
+
*/
|
|
15267
|
+
commitConvergenceReserve(scope, reserveUsd) {
|
|
15268
|
+
const account = this.accounts.get(scope);
|
|
15269
|
+
if (account === void 0) throw new ConfigError(`unknown budget account '${scope}' for the convergence reserve`);
|
|
15270
|
+
const previous = account.convergenceReserveUsd;
|
|
15271
|
+
account.convergenceReserveUsd = reserveUsd;
|
|
15272
|
+
if (account.scope !== "run") this.root.convergenceReserveUsd = Math.max(0, this.root.convergenceReserveUsd + reserveUsd - previous);
|
|
15273
|
+
this.emitUpdate();
|
|
15274
|
+
}
|
|
15275
|
+
/** The verdict pass dispatch consumes its reserve; see commitConvergenceReserve. */
|
|
15276
|
+
releaseConvergenceReserve(scope) {
|
|
15277
|
+
const account = this.accounts.get(scope);
|
|
15278
|
+
if (account === void 0 || account.convergenceReserveUsd === 0) return;
|
|
15279
|
+
if (account.scope !== "run") this.root.convergenceReserveUsd = Math.max(0, this.root.convergenceReserveUsd - account.convergenceReserveUsd);
|
|
15280
|
+
account.convergenceReserveUsd = 0;
|
|
15281
|
+
this.emitUpdate();
|
|
15282
|
+
}
|
|
15209
15283
|
/** The reserve is replaced by real spend when the spawn settles. */
|
|
15210
15284
|
releaseReserve(reserveUsd, accountScope = "run") {
|
|
15211
15285
|
for (const account of this.chainOf(accountScope)) account.committedReserveUsd = Math.max(0, account.committedReserveUsd - reserveUsd);
|
|
@@ -15413,7 +15487,7 @@ var RunBudget = class {
|
|
|
15413
15487
|
let remaining;
|
|
15414
15488
|
for (const account of this.chainOf(accountScope)) {
|
|
15415
15489
|
if (account.ceilingUsd === void 0) continue;
|
|
15416
|
-
const headroom = account.ceilingUsd - account.spentUsd - account.synthesisReserveUsd;
|
|
15490
|
+
const headroom = account.ceilingUsd - account.spentUsd - account.synthesisReserveUsd - account.convergenceReserveUsd;
|
|
15417
15491
|
remaining = remaining === void 0 ? headroom : Math.min(remaining, headroom);
|
|
15418
15492
|
}
|
|
15419
15493
|
return remaining === void 0 ? void 0 : Math.max(0, remaining);
|
|
@@ -15634,6 +15708,28 @@ function isOrchestratorAccount(scope) {
|
|
|
15634
15708
|
return scope === "orchestrator" || scope.endsWith("/orchestrator");
|
|
15635
15709
|
}
|
|
15636
15710
|
/**
|
|
15711
|
+
* The named fallback bucket of the attribution folds (RV3604): an
|
|
15712
|
+
* absent phase, an EMPTY phase and an empty agentType all fold under
|
|
15713
|
+
* 'unknown' instead of minting a '' key. The third comparison run's
|
|
15714
|
+
* report read `byPhase {"": 5.58}` for the whole run and a '' bucket
|
|
15715
|
+
* beside the named agent types: the empty string passed the `??`
|
|
15716
|
+
* fallback, and a '' key is unaddressable in every downstream table.
|
|
15717
|
+
* Both builders and both live accumulation sites apply this one rule,
|
|
15718
|
+
* so the live report and the journal fold cannot disagree on the key.
|
|
15719
|
+
*/
|
|
15720
|
+
function attributionBucket(value) {
|
|
15721
|
+
return value === void 0 || value === "" ? "unknown" : value;
|
|
15722
|
+
}
|
|
15723
|
+
/** {@link attributionBucket} over a whole live map, merging folded keys. */
|
|
15724
|
+
function foldBuckets(source) {
|
|
15725
|
+
const folded = {};
|
|
15726
|
+
for (const [key, usd] of source) {
|
|
15727
|
+
const bucket = attributionBucket(key);
|
|
15728
|
+
folded[bucket] = (folded[bucket] ?? 0) + usd;
|
|
15729
|
+
}
|
|
15730
|
+
return folded;
|
|
15731
|
+
}
|
|
15732
|
+
/**
|
|
15637
15733
|
* Folds the per-run attribution buckets into the normative CostReport.
|
|
15638
15734
|
* Live attribution buckets never see abandoned subtrees, so a host
|
|
15639
15735
|
* that tracked abandoned spend itself passes it as `abandoned`;
|
|
@@ -15661,8 +15757,8 @@ function buildCostReport(attribution, totalUsd, abandoned = {
|
|
|
15661
15757
|
grossUsd: totalUsd + abandoned.usd,
|
|
15662
15758
|
abandoned,
|
|
15663
15759
|
byModel: Object.fromEntries(attribution.byModel),
|
|
15664
|
-
byPhase:
|
|
15665
|
-
byAgentType:
|
|
15760
|
+
byPhase: foldBuckets(attribution.byPhase),
|
|
15761
|
+
byAgentType: foldBuckets(attribution.byAgentType),
|
|
15666
15762
|
byRole,
|
|
15667
15763
|
orchestrator: {
|
|
15668
15764
|
...orchestrator,
|
|
@@ -15727,9 +15823,9 @@ function costReportFromJournal(entries, priceUsd) {
|
|
|
15727
15823
|
totalUsd += priced.usd;
|
|
15728
15824
|
if (entry.usageApprox === true) usageApprox = true;
|
|
15729
15825
|
const facts = entry.costAttribution;
|
|
15730
|
-
const phase = facts?.phase
|
|
15826
|
+
const phase = attributionBucket(facts?.phase);
|
|
15731
15827
|
byPhase[phase] = (byPhase[phase] ?? 0) + priced.usd;
|
|
15732
|
-
const agentType = facts?.agentType
|
|
15828
|
+
const agentType = attributionBucket(facts?.agentType);
|
|
15733
15829
|
byAgentType[agentType] = (byAgentType[agentType] ?? 0) + priced.usd;
|
|
15734
15830
|
const primaryRole = facts?.role ?? "loop";
|
|
15735
15831
|
for (const unit of priced.units) byRole[unit.role ?? primaryRole] += unit.usd;
|
|
@@ -16830,6 +16926,33 @@ function persistedTerminalEnvelope(input) {
|
|
|
16830
16926
|
//#endregion
|
|
16831
16927
|
//#region src/engine/pricing-snapshot.ts
|
|
16832
16928
|
/**
|
|
16929
|
+
* The applied-pricing snapshot (RV407, the eighth-experiment review).
|
|
16930
|
+
* `invoiceFromJournal` and `costReportFromJournal` price at fold time
|
|
16931
|
+
* from the table the caller passes, so a live price-table update used
|
|
16932
|
+
* to silently re-price HISTORY: the same journal folded to different
|
|
16933
|
+
* invoices before and after the change. When `createEngine({ pricing })`
|
|
16934
|
+
* is configured, the settling segment now pins what it actually
|
|
16935
|
+
* applied: the resolved pricing row of every model the journal used
|
|
16936
|
+
* (table rows plus the caps-fallback rows of models the table misses),
|
|
16937
|
+
* and the table's version, additively inside the existing run-settle
|
|
16938
|
+
* decision value (the `outputHash` precedent; no journal shape change).
|
|
16939
|
+
* The gate is deliberate: caps-fallback pricing arrives ambiently from
|
|
16940
|
+
* adapters, and a setting the user never enabled must not change the
|
|
16941
|
+
* journal, so table-less runs settle byte for byte as before.
|
|
16942
|
+
* `journalPricingSnapshot` reads the pin back and
|
|
16943
|
+
* rebuilds a `priceUsd` from the pinned rows, so a repeated fold after
|
|
16944
|
+
* the live table changed reproduces the original numbers exactly.
|
|
16945
|
+
*
|
|
16946
|
+
* The snapshot governs REPORTING folds (the CLI invoice and inspect
|
|
16947
|
+
* cost views, and any host that opts in by passing the rebuilt
|
|
16948
|
+
* priceUsd; since RV611 those consumers pass `composedPriceUsd`, the
|
|
16949
|
+
* same pin-plus-current-table composition the engine's outcome mirror
|
|
16950
|
+
* applies, so a stored fold and the settled outcome can never
|
|
16951
|
+
* disagree). The engine's own live pricing, budget admission, and the
|
|
16952
|
+
* journaled spend debits are untouched: they were always priced at
|
|
16953
|
+
* write time and never re-priced by a fold.
|
|
16954
|
+
*/
|
|
16955
|
+
/**
|
|
16833
16956
|
* A pinnable row: every present rate is a finite non-negative number.
|
|
16834
16957
|
* The fold already treats a broken rate as unpriced (a NaN or negative
|
|
16835
16958
|
* price never poisons the CostReport), so the pin mirrors exactly that
|
|
@@ -16867,6 +16990,42 @@ function snapshotJournalPricing(entries, pricingOf) {
|
|
|
16867
16990
|
}
|
|
16868
16991
|
return rows.length === 0 ? void 0 : rows;
|
|
16869
16992
|
}
|
|
16993
|
+
/**
|
|
16994
|
+
* The pin's content hash (RV3703): sha256 over the canonical JSON of
|
|
16995
|
+
* the rows, so the derivation is byte-stable across folds, engines and
|
|
16996
|
+
* platforms; JCS fixes the key order, and the row order is the pin's
|
|
16997
|
+
* own (sorted at write, preserved at read).
|
|
16998
|
+
*/
|
|
16999
|
+
function rowsHashOf(rows) {
|
|
17000
|
+
return createHash("sha256").update(jcsSerialize(rows), "utf8").digest("hex");
|
|
17001
|
+
}
|
|
17002
|
+
/**
|
|
17003
|
+
* The freshness range of a pin's dated rows (RV3703): oldest and
|
|
17004
|
+
* newest parsable `ratesVerifiedAt`, original strings preserved.
|
|
17005
|
+
* Undefined when no row carries a parsable date.
|
|
17006
|
+
*/
|
|
17007
|
+
function ratesVerifiedRangeOf(rows) {
|
|
17008
|
+
let oldest;
|
|
17009
|
+
let newest;
|
|
17010
|
+
for (const row of rows) {
|
|
17011
|
+
const raw = row.rates.ratesVerifiedAt;
|
|
17012
|
+
if (raw === void 0) continue;
|
|
17013
|
+
const at = Date.parse(raw);
|
|
17014
|
+
if (!Number.isFinite(at)) continue;
|
|
17015
|
+
if (oldest === void 0 || at < oldest.at) oldest = {
|
|
17016
|
+
at,
|
|
17017
|
+
raw
|
|
17018
|
+
};
|
|
17019
|
+
if (newest === void 0 || at > newest.at) newest = {
|
|
17020
|
+
at,
|
|
17021
|
+
raw
|
|
17022
|
+
};
|
|
17023
|
+
}
|
|
17024
|
+
return oldest === void 0 || newest === void 0 ? void 0 : {
|
|
17025
|
+
oldest: oldest.raw,
|
|
17026
|
+
newest: newest.raw
|
|
17027
|
+
};
|
|
17028
|
+
}
|
|
16870
17029
|
function pinnedRows(value) {
|
|
16871
17030
|
const candidate = value?.pricing;
|
|
16872
17031
|
if (!Array.isArray(candidate) || candidate.length === 0) return;
|
|
@@ -16918,16 +17077,24 @@ function journalPricingSnapshot(entries) {
|
|
|
16918
17077
|
const rates = ratesFor(servedBy, seq);
|
|
16919
17078
|
return rates === void 0 ? void 0 : priceUsdOf(rates, usage);
|
|
16920
17079
|
};
|
|
17080
|
+
const lastRange = ratesVerifiedRangeOf(last.rows);
|
|
16921
17081
|
return {
|
|
16922
17082
|
...last.pricingVersion === void 0 ? {} : { pricingVersion: last.pricingVersion },
|
|
16923
17083
|
rows: last.rows,
|
|
17084
|
+
rowsHash: rowsHashOf(last.rows),
|
|
17085
|
+
...lastRange === void 0 ? {} : { ratesVerifiedAt: lastRange },
|
|
16924
17086
|
pinnedThroughSeq,
|
|
16925
|
-
segments: pins.map((pin, index) =>
|
|
16926
|
-
|
|
16927
|
-
|
|
16928
|
-
|
|
16929
|
-
|
|
16930
|
-
|
|
17087
|
+
segments: pins.map((pin, index) => {
|
|
17088
|
+
const range = ratesVerifiedRangeOf(pin.rows);
|
|
17089
|
+
return {
|
|
17090
|
+
fromSeq: index === 0 ? 0 : pins[index - 1]?.seq ?? 0,
|
|
17091
|
+
settleSeq: pin.seq,
|
|
17092
|
+
...pin.pricingVersion === void 0 ? {} : { pricingVersion: pin.pricingVersion },
|
|
17093
|
+
rows: pin.rows,
|
|
17094
|
+
rowsHash: rowsHashOf(pin.rows),
|
|
17095
|
+
...range === void 0 ? {} : { ratesVerifiedAt: range }
|
|
17096
|
+
};
|
|
17097
|
+
}),
|
|
16931
17098
|
priceUsd,
|
|
16932
17099
|
composedPriceUsd: (current) => (servedBy, usage, seq) => seq !== void 0 && seq < pinnedThroughSeq ? priceUsd(servedBy, usage, seq) ?? current(servedBy, usage) : current(servedBy, usage)
|
|
16933
17100
|
};
|
|
@@ -18775,6 +18942,7 @@ function createCtx(internals, rootWorkflow) {
|
|
|
18775
18942
|
costBasis: replayBasis,
|
|
18776
18943
|
entryRef: terminal?.seq ?? matched.running.seq,
|
|
18777
18944
|
...terminal?.usageApprox === true ? { usageApprox: true } : {},
|
|
18945
|
+
...terminal?.hostRejected === true ? { hostRejected: true } : {},
|
|
18778
18946
|
...result.exploration === void 0 ? {} : { exploration: result.exploration },
|
|
18779
18947
|
...result.toolBudget === void 0 ? {} : { toolBudget: result.toolBudget }
|
|
18780
18948
|
}, spanId, true);
|
|
@@ -19503,6 +19671,8 @@ function createCtx(internals, rootWorkflow) {
|
|
|
19503
19671
|
}
|
|
19504
19672
|
};
|
|
19505
19673
|
}
|
|
19674
|
+
const settleSignal = state.signal ?? internals.runSignal;
|
|
19675
|
+
if (result.status !== "ok" && settleSignal?.aborted === true && settleSignal.reason === "rulvar:finish-validation") terminalPatch.hostRejected = true;
|
|
19506
19676
|
if (checkpointWritten) terminalPatch.checkpointRef = ckptRef;
|
|
19507
19677
|
const terminal = await internals.replayer.appendTerminal(running.seq, terminalPatch);
|
|
19508
19678
|
internals.events.emit({
|
|
@@ -19516,6 +19686,7 @@ function createCtx(internals, rootWorkflow) {
|
|
|
19516
19686
|
entryRef: terminal.seq,
|
|
19517
19687
|
...resultUsageApprox ? { usageApprox: true } : {},
|
|
19518
19688
|
...result.transportRetries !== void 0 && result.transportRetries > 0 ? { retryCount: result.transportRetries } : {},
|
|
19689
|
+
...terminalPatch.hostRejected === true ? { hostRejected: true } : {},
|
|
19519
19690
|
...result.quotaDenials === void 0 ? {} : { quotaDenials: result.quotaDenials },
|
|
19520
19691
|
...result.exploration === void 0 ? {} : { exploration: result.exploration },
|
|
19521
19692
|
...result.toolBudget === void 0 ? {} : { toolBudget: result.toolBudget }
|
|
@@ -22592,6 +22763,15 @@ function selfTestFinishValidation(options) {
|
|
|
22592
22763
|
/** How many rejected finishes are repaired by default: the plan's repair once. */
|
|
22593
22764
|
const DEFAULT_FINISH_MAX_REPAIRS = 1;
|
|
22594
22765
|
/**
|
|
22766
|
+
* Character cap of the HOST VALIDATION LESSONS prompt block (RV3603):
|
|
22767
|
+
* the bounded repair round's prompt folds the run's journaled finish
|
|
22768
|
+
* validation failures so the round does not relearn a lesson the run
|
|
22769
|
+
* already bought, and a pathological history must not flood the
|
|
22770
|
+
* composition context. Rows keep journal order; the tail is dropped
|
|
22771
|
+
* and the block names how many rows it dropped.
|
|
22772
|
+
*/
|
|
22773
|
+
const FINISH_LESSON_CAP_CHARS = 2e3;
|
|
22774
|
+
/**
|
|
22595
22775
|
* Default maxTurns of the synthesize invocation (RV-211): the finish
|
|
22596
22776
|
* call plus headroom for one validator repair exchange.
|
|
22597
22777
|
*/
|
|
@@ -24056,10 +24236,33 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24056
24236
|
callId: decision.callId,
|
|
24057
24237
|
failed: decision.failed,
|
|
24058
24238
|
repairsUsed: decision.repairsUsed,
|
|
24059
|
-
maxRepairs: decision.maxRepairs
|
|
24239
|
+
maxRepairs: decision.maxRepairs,
|
|
24240
|
+
...decision.candidateHash === void 0 ? {} : { candidateHash: decision.candidateHash },
|
|
24241
|
+
...decision.candidateChars === void 0 ? {} : { candidateChars: decision.candidateChars }
|
|
24060
24242
|
} });
|
|
24061
24243
|
const validationDecisions = () => internals.replayer.snapshot().filter((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.value?.decisionType === "orchestrator_finish_validation").map((entry) => entry.value);
|
|
24062
24244
|
/**
|
|
24245
|
+
* Where the CURRENT composition invocation's verdicts begin
|
|
24246
|
+
* (RV3602): an index into validationDecisions(), captured from the
|
|
24247
|
+
* journaled verdict count at each synthesis dispatch, so the
|
|
24248
|
+
* mechanical repair pool belongs to one composition invocation.
|
|
24249
|
+
* The third comparison run's initial composition spent the single
|
|
24250
|
+
* run wide repair (default maxRepairs 1), so the bounded claim
|
|
24251
|
+
* repair round (RV3307) entered with zero mechanical retries BY
|
|
24252
|
+
* CONSTRUCTION and its first regression was final: the round was
|
|
24253
|
+
* structurally doomed whenever the initial composition had used
|
|
24254
|
+
* its retry. Cycle 73 scoped the pool to the contract generation;
|
|
24255
|
+
* this scopes it to the invocation on the same doctrine, the pool
|
|
24256
|
+
* spender must be the thing that gets the bound. Replay stable:
|
|
24257
|
+
* a resume replays the identical decision prefix, so the captured
|
|
24258
|
+
* index is identical. Validators bound to the coordination loop
|
|
24259
|
+
* (no synthesis) keep the zero baseline: one loop, one invocation,
|
|
24260
|
+
* the pre RV3602 pool byte for byte. Worst case stays bounded:
|
|
24261
|
+
* at most two composition invocations exist (the initial and one
|
|
24262
|
+
* RV3307 round), each granting at most maxRepairs repair turns.
|
|
24263
|
+
*/
|
|
24264
|
+
let validationInvocationStart = 0;
|
|
24265
|
+
/**
|
|
24063
24266
|
* The contract generation membership test (cycle 73). Without a
|
|
24064
24267
|
* contract there are no generations and every decision is current
|
|
24065
24268
|
* (the pre 1.77 behavior, byte identical). With one, a decision
|
|
@@ -24076,6 +24279,40 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24076
24279
|
return internals.replayer.snapshot().filter((entry) => entry.kind === "decision" && entry.scope === callingState.scope && entry.value?.decisionType === "orchestrator_finish_validation_bundle").length <= 1;
|
|
24077
24280
|
};
|
|
24078
24281
|
/**
|
|
24282
|
+
* The HOST VALIDATION LESSONS block (RV3603): the third comparison
|
|
24283
|
+
* run's repair round regressed provenance, the exact class the
|
|
24284
|
+
* initial composition's mechanical loop had fixed minutes earlier,
|
|
24285
|
+
* because the round is a FRESH invocation with no memory of
|
|
24286
|
+
* exchanges it never saw. The block folds the run's journaled
|
|
24287
|
+
* finish validation failures (current contract generation only,
|
|
24288
|
+
* deduplicated by validator and reasons, journal order) so the
|
|
24289
|
+
* round keeps the lessons the run already paid for. Derived ONLY
|
|
24290
|
+
* from journaled decisions: a resume re-derives identical bytes.
|
|
24291
|
+
* Capped at {@link FINISH_LESSON_CAP_CHARS}; the dropped row count
|
|
24292
|
+
* is named, never silent.
|
|
24293
|
+
*/
|
|
24294
|
+
const hostValidationLessons = () => {
|
|
24295
|
+
const rows = [];
|
|
24296
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24297
|
+
for (const decision of validationDecisions()) {
|
|
24298
|
+
if (decision.failed.length === 0 || !contractGenerationCurrent(decision)) continue;
|
|
24299
|
+
for (const failure of decision.failed) {
|
|
24300
|
+
const key = JSON.stringify([failure.name, failure.reasons]);
|
|
24301
|
+
if (seen.has(key)) continue;
|
|
24302
|
+
seen.add(key);
|
|
24303
|
+
rows.push({
|
|
24304
|
+
validator: failure.name,
|
|
24305
|
+
reasons: failure.reasons
|
|
24306
|
+
});
|
|
24307
|
+
}
|
|
24308
|
+
}
|
|
24309
|
+
if (rows.length === 0) return [];
|
|
24310
|
+
let kept = rows.length;
|
|
24311
|
+
while (kept > 1 && JSON.stringify(rows.slice(0, kept)).length > 2e3) kept -= 1;
|
|
24312
|
+
const dropped = rows.length - kept;
|
|
24313
|
+
return ["HOST VALIDATION LESSONS: earlier composition attempts in this run failed the declared finish contract exactly so; keep the repaired result clear of these failures while resolving the contradictions. " + JSON.stringify(rows.slice(0, kept)) + (dropped === 0 ? "" : ` (${String(dropped)} lesson row${dropped === 1 ? "" : "s"} truncated)`)];
|
|
24314
|
+
};
|
|
24315
|
+
/**
|
|
24079
24316
|
* The children snapshot (RV-202): spawn order, pure reads of the
|
|
24080
24317
|
* records the orchestrator already tracks, so validators can hold
|
|
24081
24318
|
* a finish result (or the RV510 draft pre-pass) against the
|
|
@@ -24225,7 +24462,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24225
24462
|
verdict = validator.validate(input);
|
|
24226
24463
|
} catch (thrown) {
|
|
24227
24464
|
validationTermination = new ConfigError(`finish validator '${validator.name}' threw instead of returning a verdict: ` + (thrown instanceof Error ? thrown.message : String(thrown)));
|
|
24228
|
-
validationAbort.abort("rulvar:finish-validation");
|
|
24465
|
+
validationAbort.abort("rulvar:finish-validation-defect");
|
|
24229
24466
|
return {
|
|
24230
24467
|
ok: false,
|
|
24231
24468
|
feedback: { error: `finish validator '${validator.name}' is defective; the run fails` }
|
|
@@ -24236,7 +24473,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24236
24473
|
reasons: verdict.reasons
|
|
24237
24474
|
});
|
|
24238
24475
|
}
|
|
24239
|
-
const repairsUsed = known.filter((candidate) => candidate.verdict !== "accepted" && contractGenerationCurrent(candidate)).length;
|
|
24476
|
+
const repairsUsed = known.filter((candidate, index) => index >= validationInvocationStart && candidate.verdict !== "accepted" && contractGenerationCurrent(candidate)).length;
|
|
24240
24477
|
const rejectedCandidate = failed.length > 0;
|
|
24241
24478
|
let candidateRef;
|
|
24242
24479
|
if (rejectedCandidate && validationSpec.retainRejectedCandidates === true) {
|
|
@@ -24288,7 +24525,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24288
24525
|
if (decision.verdict === "rejected") {
|
|
24289
24526
|
if (contractGenerationCurrent(decision)) {
|
|
24290
24527
|
validationTermination = finishValidationError(decision);
|
|
24291
|
-
validationAbort.abort(
|
|
24528
|
+
validationAbort.abort(FINISH_REJECTION_ABORT_REASON);
|
|
24292
24529
|
}
|
|
24293
24530
|
return {
|
|
24294
24531
|
ok: false,
|
|
@@ -24823,6 +25060,15 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24823
25060
|
* not settle ok, because an empty list would claim the pool agreed.
|
|
24824
25061
|
*/
|
|
24825
25062
|
let claimFindingsFound;
|
|
25063
|
+
/**
|
|
25064
|
+
* The observed price of this run's own latest post draft claim
|
|
25065
|
+
* judge pass (RV3701): the fallback sizing of the repair round's
|
|
25066
|
+
* convergence hold when the host declared no `judge.estCost`. By
|
|
25067
|
+
* the time the bounded round can dispatch, a post draft pass has
|
|
25068
|
+
* always settled (the round's findings came from it), so the
|
|
25069
|
+
* fallback is this run's own money, never an invented constant.
|
|
25070
|
+
*/
|
|
25071
|
+
let observedFinalJudgeCostUsd;
|
|
24826
25072
|
/** Set whenever the pass ran, findings or not (the RV1404 pairing). */
|
|
24827
25073
|
let claimConsistencyMeta;
|
|
24828
25074
|
/**
|
|
@@ -25107,6 +25353,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
25107
25353
|
try {
|
|
25108
25354
|
judged = await runtime.runInScope(judgeState, () => ctx.agent(judgePrompt, judgeOpts));
|
|
25109
25355
|
noteInternalSettle(judged);
|
|
25356
|
+
if (stage !== "draft" && typeof judged.costUsd === "number") observedFinalJudgeCostUsd = judged.costUsd;
|
|
25110
25357
|
} catch (declined) {
|
|
25111
25358
|
if (!(declined instanceof BudgetExhaustedError)) throw declined;
|
|
25112
25359
|
claimConsistencyMeta = finishMeta({
|
|
@@ -25438,6 +25685,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
25438
25685
|
...draftGaps === void 0 ? [] : ["DRAFT CONTRACT GAPS: the coordination draft failed exactly these declared validators; repair the named gaps and preserve the draft otherwise. " + JSON.stringify(draftGaps)],
|
|
25439
25686
|
...opts?.contradictions?.onFound !== "carry" || contradictionsFound === void 0 || contradictionsFound.length === 0 ? [] : ["CHILD CONTRADICTIONS: the settled children read these cited locations differently; resolve each one EXPLICITLY in the final result (say which reading holds and why it does) instead of silently picking one. " + JSON.stringify(contradictionsFound)],
|
|
25440
25687
|
...opts?.claimConsistency?.onFound !== "carry" && opts?.claimConsistency?.onFound !== "repair" || claimFindingsFound === void 0 || claimFindingsFound.length === 0 ? [] : ["CLAIM CONTRADICTIONS: the composed draft contradicts the settled child pool at these cited locations; resolve each one EXPLICITLY in the final result (say which reading holds and why) instead of keeping the inverted claim. " + JSON.stringify(claimFindingsFound)],
|
|
25688
|
+
...opts?.claimConsistency?.onFound !== "carry" && opts?.claimConsistency?.onFound !== "repair" || claimFindingsFound === void 0 || claimFindingsFound.length === 0 ? [] : hostValidationLessons(),
|
|
25441
25689
|
...spec.policyFacts === true ? [(() => {
|
|
25442
25690
|
const byStatus = {};
|
|
25443
25691
|
let extensionsGranted = 0;
|
|
@@ -25563,6 +25811,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
25563
25811
|
}
|
|
25564
25812
|
}
|
|
25565
25813
|
};
|
|
25814
|
+
validationInvocationStart = validationDecisions().length;
|
|
25566
25815
|
const synthesized = await runtime.runInScope(synthesisState, () => ctx.agent(prompt, synthesisOpts));
|
|
25567
25816
|
noteInternalSettle(synthesized);
|
|
25568
25817
|
synthesisSchemaRejectedExchanges = synthesized.schemaRejectedTerminalExchanges ?? 0;
|
|
@@ -26288,19 +26537,55 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
26288
26537
|
const hashOfDocument = (value) => createHash("sha256").update(jcsSerialize(value ?? null), "utf8").digest("hex");
|
|
26289
26538
|
const preRepairHash = hashOfDocument(synthesizedFinal);
|
|
26290
26539
|
const carried = claimFindingsFound;
|
|
26540
|
+
const convergenceHoldUsd = opts?.claimConsistency?.judge?.estCost ?? observedFinalJudgeCostUsd ?? 0;
|
|
26541
|
+
const convergenceScope = orchestratorAccount ?? "run";
|
|
26542
|
+
if (convergenceHoldUsd > 0) internals.budget.commitConvergenceReserve(convergenceScope, convergenceHoldUsd);
|
|
26291
26543
|
try {
|
|
26292
26544
|
synthesizedFinal = await runSynthesis(result.output);
|
|
26293
26545
|
} catch (thrown) {
|
|
26294
26546
|
await journalSynthesisAdmissionDecline(thrown);
|
|
26547
|
+
const hostRejection = thrown instanceof FailRunError && typeof thrown.data === "object" && thrown.data !== null && !Array.isArray(thrown.data) && thrown.data.source === "orchestrator_finish_validation" ? thrown.data : void 0;
|
|
26548
|
+
if (hostRejection !== void 0) throw new FailRunError(`the claim-consistency repair round dispatched and its repaired candidate failed host validation (${thrown instanceof Error ? thrown.message.slice(0, 300) : String(thrown)}); ${String(carried.length)} judged contradiction${carried.length === 1 ? "" : "s"} stand unconsumed and a gate armed to repair must not pass silently`, { data: {
|
|
26549
|
+
source: "orchestrator_claim_consistency",
|
|
26550
|
+
claimContradictions: carried,
|
|
26551
|
+
claimConsistencyMeta,
|
|
26552
|
+
repairsUsed: 1,
|
|
26553
|
+
roundDispatched: true,
|
|
26554
|
+
preRepairHash,
|
|
26555
|
+
finishValidation: {
|
|
26556
|
+
...hostRejection.callId === void 0 ? {} : { callId: hostRejection.callId },
|
|
26557
|
+
...hostRejection.failed === void 0 ? {} : { failed: hostRejection.failed },
|
|
26558
|
+
...hostRejection.repairsUsed === void 0 ? {} : { repairsUsed: hostRejection.repairsUsed },
|
|
26559
|
+
...hostRejection.maxRepairs === void 0 ? {} : { maxRepairs: hostRejection.maxRepairs },
|
|
26560
|
+
...hostRejection.candidateHash === void 0 ? {} : { candidateHash: hostRejection.candidateHash },
|
|
26561
|
+
...hostRejection.candidateChars === void 0 ? {} : { candidateChars: hostRejection.candidateChars }
|
|
26562
|
+
},
|
|
26563
|
+
...acceptanceSnapshot
|
|
26564
|
+
} });
|
|
26295
26565
|
throw new FailRunError(`the claim-consistency repair round could not dispatch (${thrown instanceof Error ? thrown.message.slice(0, 300) : String(thrown)}); ${String(carried.length)} judged contradiction${carried.length === 1 ? "" : "s"} stand unconsumed and a gate armed to repair must not pass silently`, { data: {
|
|
26296
26566
|
source: "orchestrator_claim_consistency",
|
|
26297
26567
|
claimContradictions: carried,
|
|
26568
|
+
claimConsistencyMeta,
|
|
26298
26569
|
repairsUsed: 0,
|
|
26570
|
+
roundDispatched: false,
|
|
26299
26571
|
preRepairHash,
|
|
26300
26572
|
...acceptanceSnapshot
|
|
26301
26573
|
} });
|
|
26574
|
+
} finally {
|
|
26575
|
+
if (convergenceHoldUsd > 0) internals.budget.releaseConvergenceReserve(convergenceScope);
|
|
26576
|
+
}
|
|
26577
|
+
try {
|
|
26578
|
+
await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
|
|
26579
|
+
} catch (thrown) {
|
|
26580
|
+
if (thrown instanceof FailRunError && typeof thrown.data === "object" && thrown.data !== null && !Array.isArray(thrown.data) && thrown.data.source === "orchestrator_claim_consistency") throw new FailRunError(thrown.message, { data: {
|
|
26581
|
+
...thrown.data,
|
|
26582
|
+
...thrown.data.claimContradictions === void 0 ? { claimContradictions: carried } : {},
|
|
26583
|
+
roundDispatched: true,
|
|
26584
|
+
repairsUsed: 1,
|
|
26585
|
+
preRepairHash
|
|
26586
|
+
} });
|
|
26587
|
+
throw thrown;
|
|
26302
26588
|
}
|
|
26303
|
-
await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
|
|
26304
26589
|
if (claimFindingsFound !== void 0 && claimFindingsFound.length > 0) throw new FailRunError(`the claim-consistency judge still found ${String(claimFindingsFound.length)} contradiction${claimFindingsFound.length === 1 ? "" : "s"} after the bounded repair round: the repaired composition keeps contradicting the settled pool`, { data: {
|
|
26305
26590
|
source: "orchestrator_claim_consistency",
|
|
26306
26591
|
claimContradictions: claimFindingsFound,
|
|
@@ -28119,6 +28404,8 @@ function liftRunCompletion(candidate) {
|
|
|
28119
28404
|
}
|
|
28120
28405
|
const metaCandidate = candidate.claimConsistencyMeta;
|
|
28121
28406
|
if (typeof metaCandidate === "object" && metaCandidate !== null && !Array.isArray(metaCandidate)) lifted.claimConsistencyMeta = { ...metaCandidate };
|
|
28407
|
+
const findingsCandidate = candidate.claimContradictions;
|
|
28408
|
+
if (Array.isArray(findingsCandidate) && findingsCandidate.every((row) => typeof row === "object" && row !== null && !Array.isArray(row) && typeof row.reason === "string")) lifted.claimContradictions = findingsCandidate.map((row) => ({ ...row }));
|
|
28122
28409
|
const skippedCandidate = candidate.synthesisSkipped;
|
|
28123
28410
|
if (typeof skippedCandidate === "boolean" || typeof skippedCandidate === "string") lifted.synthesisSkipped = skippedCandidate;
|
|
28124
28411
|
const acceptedCandidate = candidate.deliverableAccepted;
|
|
@@ -28755,6 +29042,7 @@ function createEngine(options) {
|
|
|
28755
29042
|
if (lifted.acceptanceChildren !== void 0) outcomeFacts.acceptanceChildren = lifted.acceptanceChildren;
|
|
28756
29043
|
if (lifted.semanticPasses !== void 0) outcomeFacts.semanticPasses = lifted.semanticPasses;
|
|
28757
29044
|
if (lifted.claimConsistencyMeta !== void 0) outcomeFacts.claimConsistencyMeta = lifted.claimConsistencyMeta;
|
|
29045
|
+
if (lifted.claimContradictions !== void 0) outcomeFacts.claimContradictions = lifted.claimContradictions;
|
|
28758
29046
|
if (lifted.synthesisSkipped !== void 0) outcomeFacts.synthesisSkipped = lifted.synthesisSkipped;
|
|
28759
29047
|
if (lifted.deliverableAccepted !== void 0) outcomeFacts.deliverableAccepted = lifted.deliverableAccepted;
|
|
28760
29048
|
if (lifted.resultAvailable !== void 0) outcomeFacts.resultAvailable = lifted.resultAvailable;
|
|
@@ -29444,4 +29732,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
29444
29732
|
};
|
|
29445
29733
|
}
|
|
29446
29734
|
//#endregion
|
|
29447
|
-
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, FINAL_COMPOSITION_LABEL, 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, JournalIntegrityError, 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_ADMISSION_DECISION_TYPE, SPAWN_AGENT_SCHEMA, SYNTHESIS_NOTE_LABEL, 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, childRostersFromJournal, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimJudgeStageOf, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, criticalPathFromJournal, 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, isClaimJudgeLabel, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, manifestValidators, 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, renderContractRequirements, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredMentionsValidator, 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, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, unionOfIntervalsMs, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
29735
|
+
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, FINAL_COMPOSITION_LABEL, FINISH_LESSON_CAP_CHARS, 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, JournalIntegrityError, 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_ADMISSION_DECISION_TYPE, SPAWN_AGENT_SCHEMA, SYNTHESIS_NOTE_LABEL, 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, attributionBucket, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, childRostersFromJournal, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimJudgeStageOf, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, criticalPathFromJournal, 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, isClaimJudgeLabel, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, manifestValidators, 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, renderContractRequirements, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredMentionsValidator, 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, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, unionOfIntervalsMs, 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.242.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",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"build": "tsdown",
|
|
47
47
|
"typecheck": "tsc --noEmit",
|
|
48
48
|
"lint": "eslint .",
|
|
49
|
+
"test": "pnpm -w exec vitest run --project @rulvar/core",
|
|
49
50
|
"pack-check": "publint --pack pnpm && attw --pack . --profile esm-only"
|
|
50
51
|
}
|
|
51
52
|
}
|