@rulvar/core 1.237.0 → 1.239.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 +320 -6
- package/dist/index.js +374 -37
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5764,10 +5764,13 @@ interface RunAgentOptions<S extends SchemaSpec = JsonSchema> {
|
|
|
5764
5764
|
* before one existed; with the seam the crash window shrinks to the
|
|
5765
5765
|
* single in-flight turn. Restored records (a checkpoint reboot)
|
|
5766
5766
|
* never re-emit: they were journaled by the segment that minted
|
|
5767
|
-
* them.
|
|
5767
|
+
* them. A returned promise is AWAITED before the loop proceeds
|
|
5768
|
+
* (RV3405, the awaited receipt posture): the caller decides the
|
|
5769
|
+
* durability, the loop honors it; a void return keeps the RV2008
|
|
5770
|
+
* fire and forget byte for byte.
|
|
5768
5771
|
*/
|
|
5769
5772
|
billing?: {
|
|
5770
|
-
onProviderCall: (record: ProviderCallRecord) => void
|
|
5773
|
+
onProviderCall: (record: ProviderCallRecord) => void | Promise<void>;
|
|
5771
5774
|
};
|
|
5772
5775
|
events?: RuntimeEventSink;
|
|
5773
5776
|
transcript?: {
|
|
@@ -7663,6 +7666,20 @@ interface EngineDefaults {
|
|
|
7663
7666
|
* identity, journals, or cassette keys.
|
|
7664
7667
|
*/
|
|
7665
7668
|
cache?: CachePolicy;
|
|
7669
|
+
/**
|
|
7670
|
+
* The receipt posture of the incremental billing seam (RV3405).
|
|
7671
|
+
* RV2008 journals every ProviderCallRecord the moment its wire call
|
|
7672
|
+
* settles, but the append is fire and forget: the loop never blocks
|
|
7673
|
+
* its dispatch path on journal IO, so the receipt most likely to
|
|
7674
|
+
* lose the race with a crash is exactly the wire being paid for at
|
|
7675
|
+
* the moment of death. `'awaited'` makes the loop await each receipt
|
|
7676
|
+
* append before the turn proceeds (the RV601 intent before effect
|
|
7677
|
+
* precedent), buying durable payment evidence for one journal IO
|
|
7678
|
+
* await per wire call; a failed append still degrades loudly to the
|
|
7679
|
+
* terminal lane (the RV2008 warning), never fails the run. Default
|
|
7680
|
+
* `'async'`: byte identical to RV2008.
|
|
7681
|
+
*/
|
|
7682
|
+
billingReceipts?: "async" | "awaited";
|
|
7666
7683
|
}
|
|
7667
7684
|
interface BudgetDefaults {
|
|
7668
7685
|
/** Last resort of the admission reserve formula; default 0.50. */
|
|
@@ -8766,6 +8783,62 @@ declare function formatCharacterValidator(options?: {
|
|
|
8766
8783
|
/** Single `Cf` characters to admit; everything else still rejects. */allow?: readonly string[];
|
|
8767
8784
|
name?: string;
|
|
8768
8785
|
}): FinishValidator;
|
|
8786
|
+
/**
|
|
8787
|
+
* Every declared literal must appear in the finish result at least
|
|
8788
|
+
* once (RV3308). The 2026-08-12 comparison run passed an exact twelve
|
|
8789
|
+
* heading contract and a citation floor while its "all publishable
|
|
8790
|
+
* packages" table silently dropped four of the seventeen names: shape
|
|
8791
|
+
* validators cannot see an enumerable universe, so the universe is
|
|
8792
|
+
* declared as literals and each one is held. Purely textual and
|
|
8793
|
+
* deterministic; fenced code counts, because tables and inline code
|
|
8794
|
+
* are legitimate places to name a package. Default name
|
|
8795
|
+
* 'required-mentions'.
|
|
8796
|
+
*/
|
|
8797
|
+
declare function requiredMentionsValidator(options: {
|
|
8798
|
+
terms: readonly string[];
|
|
8799
|
+
name?: string;
|
|
8800
|
+
}): FinishValidator;
|
|
8801
|
+
/**
|
|
8802
|
+
* One declaration for the shape a host both PROMPTS for and GATES on
|
|
8803
|
+
* (RV3308). The 2026-08-12 comparison run drifted exactly here: the
|
|
8804
|
+
* harness prompt named one heading while its finish contract named an
|
|
8805
|
+
* older one, the host accepted its own contract, and the common audit
|
|
8806
|
+
* refused the answer. A manifest is read twice, by
|
|
8807
|
+
* {@link manifestValidators} to build the gate and by
|
|
8808
|
+
* {@link renderContractRequirements} to build the prompt block, so
|
|
8809
|
+
* the two surfaces cannot disagree by construction.
|
|
8810
|
+
*/
|
|
8811
|
+
interface OutputContractManifest {
|
|
8812
|
+
/** The exact heading lines, ordered and exclusive when present. */
|
|
8813
|
+
sections?: readonly string[];
|
|
8814
|
+
/** Literal strings the result must contain, each at least once. */
|
|
8815
|
+
requiredMentions?: readonly string[];
|
|
8816
|
+
/** Whitespace word bounds, either side optional. */
|
|
8817
|
+
words?: {
|
|
8818
|
+
min?: number;
|
|
8819
|
+
max?: number;
|
|
8820
|
+
};
|
|
8821
|
+
/** Minimum citation occurrences over {@link DEFAULT_CITATION_PATTERN} or `citationPattern`. */
|
|
8822
|
+
minCitations?: number;
|
|
8823
|
+
/** Overrides the citation shape; only meaningful beside `minCitations`. */
|
|
8824
|
+
citationPattern?: string;
|
|
8825
|
+
}
|
|
8826
|
+
/**
|
|
8827
|
+
* The manifest's gate half (RV3308): heading structure (ordered,
|
|
8828
|
+
* exclusive), word bounds, the citation floor, and the mention
|
|
8829
|
+
* universe, in that stable order, each through the existing named
|
|
8830
|
+
* validator. Everything is derived from the SAME object the prompt
|
|
8831
|
+
* block renders from.
|
|
8832
|
+
*/
|
|
8833
|
+
declare function manifestValidators(manifest: OutputContractManifest): FinishValidator[];
|
|
8834
|
+
/**
|
|
8835
|
+
* The manifest's prompt half (RV3308): a deterministic requirements
|
|
8836
|
+
* block enumerating the SAME headings, bounds, citation floor and
|
|
8837
|
+
* literals the validators hold, byte for byte, for the host to embed
|
|
8838
|
+
* in its question. Rendering is pure string assembly; nothing here
|
|
8839
|
+
* consults the result.
|
|
8840
|
+
*/
|
|
8841
|
+
declare function renderContractRequirements(manifest: OutputContractManifest): string;
|
|
8769
8842
|
//#endregion
|
|
8770
8843
|
//#region src/orchestrator/contradictions.d.ts
|
|
8771
8844
|
/** One child's serialized output as the pass reads it. */
|
|
@@ -10406,7 +10479,16 @@ interface OrchestrateClaimConsistency {
|
|
|
10406
10479
|
* under `stage: 'both'` the draft pass carries and the final pass
|
|
10407
10480
|
* reports, and `stage: 'final'` with 'carry' is a ConfigError at
|
|
10408
10481
|
* intake, because a posture that reads as a gate must not quietly
|
|
10409
|
-
* behave as 'report'. '
|
|
10482
|
+
* behave as 'report'. 'repair' (RV3307) is the honest carry for the
|
|
10483
|
+
* final pass: judged findings ride ONE more synthesis invocation
|
|
10484
|
+
* (the same CLAIM CONTRADICTIONS block, over a prompt that now lies
|
|
10485
|
+
* ahead again), the repaired document is judged again, and findings
|
|
10486
|
+
* that survive the round fail the run typed, exactly like a dead or
|
|
10487
|
+
* declined judge under this posture, because a gate armed to repair
|
|
10488
|
+
* must not pass silently. It needs a pass that runs AFTER a
|
|
10489
|
+
* synthesis, so `stage` must be 'final' or 'both' (a ConfigError
|
|
10490
|
+
* beside the default 'draft', whose findings the ordinary carry
|
|
10491
|
+
* already consumes). 'fail' fails the run typed with
|
|
10410
10492
|
* `data.source` 'orchestrator_claim_consistency' BEFORE any
|
|
10411
10493
|
* synthesis dispatch; the judge itself has already been paid, which
|
|
10412
10494
|
* is the honest minimum for a semantic verdict. A judge that does
|
|
@@ -10414,7 +10496,7 @@ interface OrchestrateClaimConsistency {
|
|
|
10414
10496
|
* run only under 'fail': a gate armed to stop the run must not pass
|
|
10415
10497
|
* silently when its judge dies.
|
|
10416
10498
|
*/
|
|
10417
|
-
onFound?: "report" | "carry" | "fail";
|
|
10499
|
+
onFound?: "report" | "carry" | "fail" | "repair";
|
|
10418
10500
|
/**
|
|
10419
10501
|
* WHICH document the pass judges (RV2509), default `'draft'`, the
|
|
10420
10502
|
* historical behavior byte for byte. The pass has always read the
|
|
@@ -11330,6 +11412,24 @@ interface EvidenceContract {
|
|
|
11330
11412
|
/** Estimated non-evidence overhead calls; default 8. */
|
|
11331
11413
|
overheadCalls?: number;
|
|
11332
11414
|
/**
|
|
11415
|
+
* A journal observed prior for the per-entry call estimate
|
|
11416
|
+
* (RV3309): the figure `toolCalibrationFromJournal` folds from a
|
|
11417
|
+
* prior run of the same profile (aggregate or a p90 over several),
|
|
11418
|
+
* fractional on purpose. Preflight uses the HIGHER of the declared
|
|
11419
|
+
* estimate and this prior when it computes the evidence call floor,
|
|
11420
|
+
* never the lower, so a stale generous declaration still holds and
|
|
11421
|
+
* an optimistic one stops hiding the observed reality: the
|
|
11422
|
+
* 2026-08-12 comparison run observed 4.211 calls per entry where
|
|
11423
|
+
* the default estimate says 3. When the prior raises the floor,
|
|
11424
|
+
* preflight names it in an `evidence-estimate-below-observed`
|
|
11425
|
+
* finding beside the usual floor arithmetic. `source` is echoed in
|
|
11426
|
+
* that finding so a reader knows which journal spoke.
|
|
11427
|
+
*/
|
|
11428
|
+
calibration?: {
|
|
11429
|
+
callsPerEntry: number;
|
|
11430
|
+
source?: string;
|
|
11431
|
+
};
|
|
11432
|
+
/**
|
|
11333
11433
|
* What the floor does at the child's terminal settle (RV507). The
|
|
11334
11434
|
* default 'warn' keeps the historical behavior: the contract is a
|
|
11335
11435
|
* preflight signal only. 'refuse' turns an ok finish whose message
|
|
@@ -11690,7 +11790,8 @@ interface RunInternals {
|
|
|
11690
11790
|
toolsets?: Record<string, ToolsOption>; /** Registered mechanical gate profiles (M7-T10). */
|
|
11691
11791
|
gates?: Record<string, MechanicalGateProfile>; /** Engine-wide admission countTokens policy (RV1804); default 'allow'. */
|
|
11692
11792
|
countTokens?: "allow" | "deny"; /** The engine-wide prompt-cache policy (RV2006); profile and call opts win. */
|
|
11693
|
-
cache?: CachePolicy;
|
|
11793
|
+
cache?: CachePolicy; /** The receipt posture of the billing seam (RV3405); default 'async'. */
|
|
11794
|
+
billingReceipts?: "async" | "awaited";
|
|
11694
11795
|
};
|
|
11695
11796
|
/** Telemetry compat posture (RV1810). */
|
|
11696
11797
|
telemetry?: {
|
|
@@ -13446,6 +13547,60 @@ interface JournaledCriticalPath {
|
|
|
13446
13547
|
finalCompositionMs?: number;
|
|
13447
13548
|
/** Synthesis that IS the claim judge; same all-or-nothing condition. */
|
|
13448
13549
|
semanticJudgeMs?: number;
|
|
13550
|
+
/**
|
|
13551
|
+
* The stage split of `semanticJudgeMs` (RV3404), same all-or-nothing
|
|
13552
|
+
* condition: the draft pass is the exact judge label and every
|
|
13553
|
+
* suffixed variant is a post draft pass over the composed document
|
|
13554
|
+
* (the final pass and the repair round's re-judge both dispatch
|
|
13555
|
+
* `-final`, RV2509/RV3307). One classifier decides on both surfaces:
|
|
13556
|
+
* {@link claimJudgeStageOf}.
|
|
13557
|
+
*/
|
|
13558
|
+
draftJudgeMs?: number;
|
|
13559
|
+
/** The post draft half of the split; same condition. */
|
|
13560
|
+
finalJudgeMs?: number;
|
|
13561
|
+
/**
|
|
13562
|
+
* Settled synthesize spans counted by side, same condition (RV3404):
|
|
13563
|
+
* `compositionSpans: 2` in an archived journal is the legible
|
|
13564
|
+
* signature of the bounded repair round (RV3307), readable years
|
|
13565
|
+
* after the process that paid for it exited.
|
|
13566
|
+
*/
|
|
13567
|
+
compositionSpans?: number;
|
|
13568
|
+
/** Settled judge-side synthesize spans, counted; same condition. */
|
|
13569
|
+
judgeSpans?: number;
|
|
13570
|
+
/**
|
|
13571
|
+
* The window itemization a journal CAN answer (RV3404); present
|
|
13572
|
+
* exactly when `postFanInMs` is.
|
|
13573
|
+
*/
|
|
13574
|
+
postFanIn?: JournaledPostFanIn;
|
|
13575
|
+
}
|
|
13576
|
+
/**
|
|
13577
|
+
* The synthesis half of the RV710 decomposition, asked of a journal
|
|
13578
|
+
* (RV3404). The live breakdown also itemizes the coordinator's model
|
|
13579
|
+
* and tool time inside the window; a journal cannot: a terminal agent
|
|
13580
|
+
* entry spans the WHOLE invocation, and the coordinator's per turn
|
|
13581
|
+
* stamps died with the process that emitted them. So this block claims
|
|
13582
|
+
* exactly what the stamps prove: how much of the window settled
|
|
13583
|
+
* synthesize spans cover, the split of that cover when every span is
|
|
13584
|
+
* labelled, and how much of the window NO settled synthesize span
|
|
13585
|
+
* accounts for. `unaccountedMs` is a superset of the live `residueMs`
|
|
13586
|
+
* by construction (the coordinator's own tail time lives in it here),
|
|
13587
|
+
* which is why it refuses to share the name.
|
|
13588
|
+
*/
|
|
13589
|
+
interface JournaledPostFanIn {
|
|
13590
|
+
/** Union of settled synthesize spans clipped to the window. */
|
|
13591
|
+
synthesisCoveredMs: number;
|
|
13592
|
+
/**
|
|
13593
|
+
* The composition half of the covered spans, clipped; present under
|
|
13594
|
+
* the same all-or-nothing labelling condition as the top level
|
|
13595
|
+
* split, and equal to the live breakdown's reading of the same run.
|
|
13596
|
+
*/
|
|
13597
|
+
finalCompositionMs?: number;
|
|
13598
|
+
/** The judge half, clipped; same condition. */
|
|
13599
|
+
semanticJudgeMs?: number;
|
|
13600
|
+
/** `postFanInMs` minus `synthesisCoveredMs`, floored at zero. */
|
|
13601
|
+
unaccountedMs: number;
|
|
13602
|
+
/** `unaccountedMs / postFanInMs` when the window is positive. */
|
|
13603
|
+
unaccountedShare?: number;
|
|
13449
13604
|
}
|
|
13450
13605
|
/**
|
|
13451
13606
|
* Fold a run's critical path out of its journal.
|
|
@@ -13978,6 +14133,41 @@ interface InvoiceExport {
|
|
|
13978
14133
|
responseId?: string;
|
|
13979
14134
|
}>;
|
|
13980
14135
|
};
|
|
14136
|
+
/**
|
|
14137
|
+
* The orphaned receipt lane (RV3405): incremental provider-call rows
|
|
14138
|
+
* of agents whose TERMINAL entry does not cover them. The window is
|
|
14139
|
+
* real: the loop journals a receipt as each wire settles (RV2008),
|
|
14140
|
+
* the turn checkpoint lands later, and a crash between the two
|
|
14141
|
+
* resumes from a checkpoint that never saw the paid wire, so the
|
|
14142
|
+
* settled terminal's record set forgets the payment while the
|
|
14143
|
+
* receipt lane remembers it. Real money, priced and summed apart
|
|
14144
|
+
* from the settled totals exactly like `unsettled` (run_settle stays
|
|
14145
|
+
* the billing boundary); this lane is why a provider statement
|
|
14146
|
+
* billing that wire is explainable to the cent instead of reading as
|
|
14147
|
+
* a foreign row. Coverage is decided by response id when either side
|
|
14148
|
+
* carries one, else by the full (ordinal, servedBy, attempt,
|
|
14149
|
+
* outcome) coordinate plus byte equal usage: after a resume the
|
|
14150
|
+
* redispatched wire REUSES the ordinal, and reading the replacement
|
|
14151
|
+
* as the orphan would silently absorb the double payment the resume
|
|
14152
|
+
* honestly made. Present only when such rows exist; a journal
|
|
14153
|
+
* without a mid turn crash never carries it.
|
|
14154
|
+
*/
|
|
14155
|
+
orphanedReceipts?: {
|
|
14156
|
+
usd: number;
|
|
14157
|
+
wireRequests: number;
|
|
14158
|
+
rows: Array<{
|
|
14159
|
+
agentRef: number;
|
|
14160
|
+
scope: string;
|
|
14161
|
+
ordinal: number;
|
|
14162
|
+
servedBy: ModelRef;
|
|
14163
|
+
role: string;
|
|
14164
|
+
attempt: number;
|
|
14165
|
+
outcome: string;
|
|
14166
|
+
usage: Usage;
|
|
14167
|
+
usd?: number;
|
|
14168
|
+
responseId?: string;
|
|
14169
|
+
}>;
|
|
14170
|
+
};
|
|
13981
14171
|
}
|
|
13982
14172
|
/**
|
|
13983
14173
|
* The pure invoice fold. Pass the same entries and price table you
|
|
@@ -14160,6 +14350,23 @@ interface StatementReconciliation {
|
|
|
14160
14350
|
* alone would have closed money against it.
|
|
14161
14351
|
*/
|
|
14162
14352
|
monetarySettleable: boolean;
|
|
14353
|
+
/**
|
|
14354
|
+
* Statement rows explained by the invoice's receipt lanes (RV3405):
|
|
14355
|
+
* per request export rows whose response id matches an `unsettled`
|
|
14356
|
+
* or `orphanedReceipts` row of the invoice, i.e. OUR paid wires that
|
|
14357
|
+
* the settled rows do not carry (a crash before settle, a terminal
|
|
14358
|
+
* whose record set forgot the payment). Counted APART on purpose:
|
|
14359
|
+
* their dollars never enter the totals, the coverage, `settleable`
|
|
14360
|
+
* or `monetarySettleable`, because money the run did not settle must
|
|
14361
|
+
* not close; they exist so the statement drift is explainable to the
|
|
14362
|
+
* cent instead of reading as foreign rows. Present only when the
|
|
14363
|
+
* caller passed the lanes and at least one row matched.
|
|
14364
|
+
*/
|
|
14365
|
+
receiptMatchedRows?: number;
|
|
14366
|
+
/** Statement side dollars over those rows, when the export claims any. */
|
|
14367
|
+
receiptMatchedUsd?: number;
|
|
14368
|
+
/** First matched receipt ids (at most 20). */
|
|
14369
|
+
receiptIdSample?: string[];
|
|
14163
14370
|
}
|
|
14164
14371
|
/**
|
|
14165
14372
|
* Reconciles the invoice against a normalized provider export. Pure and
|
|
@@ -14178,6 +14385,24 @@ interface StatementReconciliation {
|
|
|
14178
14385
|
*/
|
|
14179
14386
|
declare function reconcileStatement(invoice: {
|
|
14180
14387
|
rows: readonly InvoiceRow[];
|
|
14388
|
+
/**
|
|
14389
|
+
* The invoice's receipt lanes (RV3405), passed straight off the
|
|
14390
|
+
* InvoiceExport when the caller wants statement rows for crashed
|
|
14391
|
+
* or terminal forgotten wires EXPLAINED instead of counted
|
|
14392
|
+
* foreign. Requests mode only (the join is by response id), and
|
|
14393
|
+
* strictly opt in: a bare `{ rows }` invoice reads byte for byte
|
|
14394
|
+
* as before.
|
|
14395
|
+
*/
|
|
14396
|
+
unsettled?: {
|
|
14397
|
+
rows: ReadonlyArray<{
|
|
14398
|
+
responseId?: string;
|
|
14399
|
+
}>;
|
|
14400
|
+
};
|
|
14401
|
+
orphanedReceipts?: {
|
|
14402
|
+
rows: ReadonlyArray<{
|
|
14403
|
+
responseId?: string;
|
|
14404
|
+
}>;
|
|
14405
|
+
};
|
|
14181
14406
|
}, statement: ProviderStatement, options: ReconcileStatementOptions): StatementReconciliation;
|
|
14182
14407
|
/**
|
|
14183
14408
|
* Column mapping for {@link statementFromRows}: each field names the
|
|
@@ -14427,6 +14652,29 @@ interface PreflightOrchestratorSpec {
|
|
|
14427
14652
|
judge?: {
|
|
14428
14653
|
estCost?: number;
|
|
14429
14654
|
};
|
|
14655
|
+
/**
|
|
14656
|
+
* Mirrors OrchestrateClaimConsistency.onFound (RV3402). Declaring
|
|
14657
|
+
* `'repair'` prices the bounded post judge round (RV3307) into the
|
|
14658
|
+
* static arithmetic: the working room adds one more judge pass and
|
|
14659
|
+
* one more composition (priced at the declared
|
|
14660
|
+
* `budget.synthesisReserveUsd`, the host's own estimate of one
|
|
14661
|
+
* composition), and the tail spawn count adds the round's two
|
|
14662
|
+
* invocations. The 2026-08-12 comparison shape motivates the
|
|
14663
|
+
* polarity: a ceiling sized to the exact plan converts a triggered
|
|
14664
|
+
* repair into the typed decline, and preflight should say so
|
|
14665
|
+
* before the first wire, not the journal after the last. Pairings
|
|
14666
|
+
* orchestrate() refuses at intake (repair at the draft stage,
|
|
14667
|
+
* repair without a synthesis, carry at the final stage, RV3301)
|
|
14668
|
+
* surface as error findings: the run would refuse to start.
|
|
14669
|
+
*/
|
|
14670
|
+
onFound?: "report" | "carry" | "fail" | "repair";
|
|
14671
|
+
/**
|
|
14672
|
+
* Mirrors OrchestrateClaimConsistency.stage (RV3402): `'both'`
|
|
14673
|
+
* dispatches the judge twice at worst, and the working room and
|
|
14674
|
+
* tail spawn arithmetic price passes, not declarations. Absent
|
|
14675
|
+
* keeps the historical one pass reading byte for byte.
|
|
14676
|
+
*/
|
|
14677
|
+
stage?: "draft" | "final" | "both";
|
|
14430
14678
|
};
|
|
14431
14679
|
/**
|
|
14432
14680
|
* The `reserve-line-headroom` threshold in coordination turn floors
|
|
@@ -14448,6 +14696,18 @@ interface PreflightOrchestratorSpec {
|
|
|
14448
14696
|
* configs are byte identical until a host opts in.
|
|
14449
14697
|
*/
|
|
14450
14698
|
minCeilingHeadroomShare?: number;
|
|
14699
|
+
/**
|
|
14700
|
+
* What a breached headroom floor emits (RV3310). The default
|
|
14701
|
+
* 'warning' keeps RV3208's behavior byte for byte: advisory, and a
|
|
14702
|
+
* host that only throws on errors sails past it. 'error' makes the
|
|
14703
|
+
* breach blocking for exactly such hosts: the 2026-08-12 comparison
|
|
14704
|
+
* harness threw on error findings only, its 2 percent floor held
|
|
14705
|
+
* against a 2.857 percent headroom, and the assurance answer to
|
|
14706
|
+
* "this plan is too thin to survive drift" must be refusal before
|
|
14707
|
+
* the first wire, not a line in a report nobody gates on.
|
|
14708
|
+
* Meaningful only beside a positive `minCeilingHeadroomShare`.
|
|
14709
|
+
*/
|
|
14710
|
+
ceilingHeadroomSeverity?: "warning" | "error";
|
|
14451
14711
|
}
|
|
14452
14712
|
/** The full input: engine surface, run surface, and the declared wave. */
|
|
14453
14713
|
interface PreflightInput {
|
|
@@ -15283,6 +15543,26 @@ interface CriticalPath {
|
|
|
15283
15543
|
* included, summed (RV1604).
|
|
15284
15544
|
*/
|
|
15285
15545
|
semanticJudgeMs: number;
|
|
15546
|
+
/**
|
|
15547
|
+
* The stage split of `semanticJudgeMs` (RV3404): the draft pass
|
|
15548
|
+
* dispatches under the exact {@link CLAIM_JUDGE_LABEL} and every
|
|
15549
|
+
* suffixed variant is a post draft pass (today the final pass and
|
|
15550
|
+
* the repair round's re-judge, both `-final`, RV2509/RV3307). Always
|
|
15551
|
+
* the exact partition: `draftJudgeMs + finalJudgeMs` equals
|
|
15552
|
+
* `semanticJudgeMs`.
|
|
15553
|
+
*/
|
|
15554
|
+
draftJudgeMs: number;
|
|
15555
|
+
/** The post draft half of the split; see `draftJudgeMs`. */
|
|
15556
|
+
finalJudgeMs: number;
|
|
15557
|
+
/**
|
|
15558
|
+
* Completed composition-side synthesize spans, counted (RV3404): two
|
|
15559
|
+
* compositions on one run is the legible signature of the bounded
|
|
15560
|
+
* repair round (RV3307), and a count survives where milliseconds
|
|
15561
|
+
* invite guessing.
|
|
15562
|
+
*/
|
|
15563
|
+
compositionSpans: number;
|
|
15564
|
+
/** Completed judge-side synthesize spans, counted (RV3404). */
|
|
15565
|
+
judgeSpans: number;
|
|
15286
15566
|
/** postFanInMs / runWallMs when both are defined and the wall is > 0. */
|
|
15287
15567
|
postFanInShare?: number;
|
|
15288
15568
|
/** synthesisMs / runWallMs under the same conditions. */
|
|
@@ -15379,6 +15659,40 @@ interface PostFanInBreakdown {
|
|
|
15379
15659
|
*/
|
|
15380
15660
|
declare const CLAIM_JUDGE_LABEL = "claim-consistency-judge";
|
|
15381
15661
|
/**
|
|
15662
|
+
* Whether a synthesize span's label names a claim-consistency judge
|
|
15663
|
+
* invocation: the exact {@link CLAIM_JUDGE_LABEL}, or a suffixed
|
|
15664
|
+
* variant of it (the final pass dispatches under
|
|
15665
|
+
* `claim-consistency-judge-final` since RV2509 so the two passes of
|
|
15666
|
+
* `stage: 'both'` stay separable). BOTH reducers must classify through
|
|
15667
|
+
* this one predicate (RV3302): the live fold compared the label for
|
|
15668
|
+
* exact equality while the journal fold accepted the suffix, and the
|
|
15669
|
+
* 2026-08-12 comparison run reported semanticJudgeMs 0 with the whole
|
|
15670
|
+
* 272923 ms window read as final composition on the live surface
|
|
15671
|
+
* while the journal fold correctly split 224864 against 48059.
|
|
15672
|
+
*/
|
|
15673
|
+
declare function isClaimJudgeLabel(label: string | undefined): boolean;
|
|
15674
|
+
/**
|
|
15675
|
+
* Which pass a claim-consistency judge label names (RV3404): the exact
|
|
15676
|
+
* {@link CLAIM_JUDGE_LABEL} is the draft pass, and every suffixed
|
|
15677
|
+
* variant is a post draft pass over the composed document (today the
|
|
15678
|
+
* final pass and the repair round's re-judge, both dispatching under
|
|
15679
|
+
* `-final`, RV2509/RV3307). `undefined` for every other label. One
|
|
15680
|
+
* classifier for both reducers, the RV3302 doctrine extended from the
|
|
15681
|
+
* judge predicate to the stage: the split must never read differently
|
|
15682
|
+
* off the live stream and off the journal of one run.
|
|
15683
|
+
*/
|
|
15684
|
+
declare function claimJudgeStageOf(label: string | undefined): "draft" | "final" | undefined;
|
|
15685
|
+
/**
|
|
15686
|
+
* Total length of the union of possibly overlapping intervals, exported
|
|
15687
|
+
* (RV3404) so the journal fold computes its window coverage through the
|
|
15688
|
+
* SAME arithmetic the live RV710 decomposition uses, never a sibling
|
|
15689
|
+
* implementation that can drift.
|
|
15690
|
+
*/
|
|
15691
|
+
declare function unionOfIntervalsMs(intervals: ReadonlyArray<{
|
|
15692
|
+
from: number;
|
|
15693
|
+
to: number;
|
|
15694
|
+
}>): number;
|
|
15695
|
+
/**
|
|
15382
15696
|
* The label the final synthesis (composition) invocation dispatches
|
|
15383
15697
|
* under (RV2901). The engine labelling its OWN dispatches is what lets
|
|
15384
15698
|
* `criticalPathFromJournal` split the synthesize bucket offline: the
|
|
@@ -15469,4 +15783,4 @@ interface SandboxBridge {
|
|
|
15469
15783
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
15470
15784
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
15471
15785
|
//#endregion
|
|
15472
|
-
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, 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, 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, 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, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -3158,11 +3158,17 @@ function requireTimerDelayMs(value, site) {
|
|
|
3158
3158
|
* same shapes with the same wording.
|
|
3159
3159
|
*/
|
|
3160
3160
|
function validateEvidenceContract(value, site) {
|
|
3161
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ConfigError(`${site} must be { minEntries, estCallsPerEntry?, overheadCalls?, enforce? }; got ${typeof value}`);
|
|
3162
|
-
const { minEntries, estCallsPerEntry, overheadCalls, enforce } = value;
|
|
3161
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) throw new ConfigError(`${site} must be { minEntries, estCallsPerEntry?, overheadCalls?, calibration?, enforce? }; got ${typeof value}`);
|
|
3162
|
+
const { minEntries, estCallsPerEntry, overheadCalls, calibration, enforce } = value;
|
|
3163
3163
|
requirePositiveInteger$2(minEntries, `${site}.minEntries`);
|
|
3164
3164
|
if (estCallsPerEntry !== void 0) requirePositiveInteger$2(estCallsPerEntry, `${site}.estCallsPerEntry`);
|
|
3165
3165
|
if (overheadCalls !== void 0) requireNonNegativeInteger(overheadCalls, `${site}.overheadCalls`);
|
|
3166
|
+
if (calibration !== void 0) {
|
|
3167
|
+
if (typeof calibration !== "object" || calibration === null || Array.isArray(calibration)) throw new ConfigError(`${site}.calibration must be { callsPerEntry, source? }; got ${typeof calibration}`);
|
|
3168
|
+
const { callsPerEntry, source } = calibration;
|
|
3169
|
+
if (typeof callsPerEntry !== "number" || !Number.isFinite(callsPerEntry) || callsPerEntry <= 0) throw new ConfigError(`${site}.calibration.callsPerEntry must be a positive finite number; got ` + JSON.stringify(callsPerEntry));
|
|
3170
|
+
if (source !== void 0 && (typeof source !== "string" || source.length === 0)) throw new ConfigError(`${site}.calibration.source must be a non empty string when present; got ` + JSON.stringify(source));
|
|
3171
|
+
}
|
|
3166
3172
|
if (enforce !== void 0 && enforce !== "warn" && enforce !== "refuse") throw new ConfigError(`${site}.enforce must be 'warn' or 'refuse'; got ${JSON.stringify(enforce)}`);
|
|
3167
3173
|
}
|
|
3168
3174
|
/**
|
|
@@ -9336,7 +9342,30 @@ const CLAIM_JUDGE_LABEL = "claim-consistency-judge";
|
|
|
9336
9342
|
* while the journal fold correctly split 224864 against 48059.
|
|
9337
9343
|
*/
|
|
9338
9344
|
function isClaimJudgeLabel(label) {
|
|
9339
|
-
return
|
|
9345
|
+
return claimJudgeStageOf(label) !== void 0;
|
|
9346
|
+
}
|
|
9347
|
+
/**
|
|
9348
|
+
* Which pass a claim-consistency judge label names (RV3404): the exact
|
|
9349
|
+
* {@link CLAIM_JUDGE_LABEL} is the draft pass, and every suffixed
|
|
9350
|
+
* variant is a post draft pass over the composed document (today the
|
|
9351
|
+
* final pass and the repair round's re-judge, both dispatching under
|
|
9352
|
+
* `-final`, RV2509/RV3307). `undefined` for every other label. One
|
|
9353
|
+
* classifier for both reducers, the RV3302 doctrine extended from the
|
|
9354
|
+
* judge predicate to the stage: the split must never read differently
|
|
9355
|
+
* off the live stream and off the journal of one run.
|
|
9356
|
+
*/
|
|
9357
|
+
function claimJudgeStageOf(label) {
|
|
9358
|
+
if (label === "claim-consistency-judge") return "draft";
|
|
9359
|
+
return label?.startsWith(`claim-consistency-judge-`) ?? false ? "final" : void 0;
|
|
9360
|
+
}
|
|
9361
|
+
/**
|
|
9362
|
+
* Total length of the union of possibly overlapping intervals, exported
|
|
9363
|
+
* (RV3404) so the journal fold computes its window coverage through the
|
|
9364
|
+
* SAME arithmetic the live RV710 decomposition uses, never a sibling
|
|
9365
|
+
* implementation that can drift.
|
|
9366
|
+
*/
|
|
9367
|
+
function unionOfIntervalsMs(intervals) {
|
|
9368
|
+
return unionLength([...intervals]);
|
|
9340
9369
|
}
|
|
9341
9370
|
/**
|
|
9342
9371
|
* The label the final synthesis (composition) invocation dispatches
|
|
@@ -9379,6 +9408,10 @@ function reduceCriticalPath(events) {
|
|
|
9379
9408
|
let synthesisMs = 0;
|
|
9380
9409
|
let finalCompositionMs = 0;
|
|
9381
9410
|
let semanticJudgeMs = 0;
|
|
9411
|
+
let draftJudgeMs = 0;
|
|
9412
|
+
let finalJudgeMs = 0;
|
|
9413
|
+
let compositionSpans = 0;
|
|
9414
|
+
let judgeSpans = 0;
|
|
9382
9415
|
const coordinationModel = [];
|
|
9383
9416
|
const coordinationTools = [];
|
|
9384
9417
|
const synthesisSpans = [];
|
|
@@ -9419,10 +9452,18 @@ function reduceCriticalPath(events) {
|
|
|
9419
9452
|
if (started === void 0) break;
|
|
9420
9453
|
if (started.role === "synthesize") {
|
|
9421
9454
|
const wall = Math.max(0, at - started.at);
|
|
9422
|
-
const
|
|
9455
|
+
const stage = claimJudgeStageOf(started.label);
|
|
9456
|
+
const judge = stage !== void 0;
|
|
9423
9457
|
synthesisMs += wall;
|
|
9424
|
-
if (judge)
|
|
9425
|
-
|
|
9458
|
+
if (judge) {
|
|
9459
|
+
semanticJudgeMs += wall;
|
|
9460
|
+
judgeSpans += 1;
|
|
9461
|
+
if (stage === "draft") draftJudgeMs += wall;
|
|
9462
|
+
else finalJudgeMs += wall;
|
|
9463
|
+
} else {
|
|
9464
|
+
finalCompositionMs += wall;
|
|
9465
|
+
compositionSpans += 1;
|
|
9466
|
+
}
|
|
9426
9467
|
synthesisSpans.push({
|
|
9427
9468
|
from: started.at,
|
|
9428
9469
|
to: at,
|
|
@@ -9441,6 +9482,10 @@ function reduceCriticalPath(events) {
|
|
|
9441
9482
|
synthesisMs,
|
|
9442
9483
|
finalCompositionMs,
|
|
9443
9484
|
semanticJudgeMs,
|
|
9485
|
+
draftJudgeMs,
|
|
9486
|
+
finalJudgeMs,
|
|
9487
|
+
compositionSpans,
|
|
9488
|
+
judgeSpans,
|
|
9444
9489
|
workerSpans
|
|
9445
9490
|
};
|
|
9446
9491
|
if (runStart !== void 0 && runEnd !== void 0) path.runWallMs = Math.max(0, runEnd - runStart);
|
|
@@ -9534,8 +9579,13 @@ function criticalPathFromJournal(entries) {
|
|
|
9534
9579
|
let synthesisMs = 0;
|
|
9535
9580
|
let finalCompositionMs = 0;
|
|
9536
9581
|
let semanticJudgeMs = 0;
|
|
9582
|
+
let draftJudgeMs = 0;
|
|
9583
|
+
let finalJudgeMs = 0;
|
|
9584
|
+
let compositionSpans = 0;
|
|
9585
|
+
let judgeSpans = 0;
|
|
9537
9586
|
let labelledSynthesis = false;
|
|
9538
9587
|
let unlabelledSynthesis = false;
|
|
9588
|
+
const synthSpans = [];
|
|
9539
9589
|
for (const entry of ordered) {
|
|
9540
9590
|
const startedAt = parse$1(entry.startedAt);
|
|
9541
9591
|
const endedAt = parse$1(entry.endedAt);
|
|
@@ -9560,11 +9610,28 @@ function criticalPathFromJournal(entries) {
|
|
|
9560
9610
|
const label = entry.costAttribution?.label;
|
|
9561
9611
|
if (label === void 0) {
|
|
9562
9612
|
unlabelledSynthesis = true;
|
|
9613
|
+
synthSpans.push({
|
|
9614
|
+
from: startedAt,
|
|
9615
|
+
to: endedAt
|
|
9616
|
+
});
|
|
9563
9617
|
continue;
|
|
9564
9618
|
}
|
|
9565
9619
|
labelledSynthesis = true;
|
|
9566
|
-
|
|
9567
|
-
|
|
9620
|
+
const stage = claimJudgeStageOf(label);
|
|
9621
|
+
if (stage !== void 0) {
|
|
9622
|
+
semanticJudgeMs += wall;
|
|
9623
|
+
judgeSpans += 1;
|
|
9624
|
+
if (stage === "draft") draftJudgeMs += wall;
|
|
9625
|
+
else finalJudgeMs += wall;
|
|
9626
|
+
} else {
|
|
9627
|
+
finalCompositionMs += wall;
|
|
9628
|
+
compositionSpans += 1;
|
|
9629
|
+
}
|
|
9630
|
+
synthSpans.push({
|
|
9631
|
+
from: startedAt,
|
|
9632
|
+
to: endedAt,
|
|
9633
|
+
judge: stage !== void 0
|
|
9634
|
+
});
|
|
9568
9635
|
}
|
|
9569
9636
|
const segments = logicalRunTelemetry(ordered).segments;
|
|
9570
9637
|
const path = {
|
|
@@ -9573,13 +9640,49 @@ function criticalPathFromJournal(entries) {
|
|
|
9573
9640
|
unclassifiedSpans,
|
|
9574
9641
|
segments
|
|
9575
9642
|
};
|
|
9576
|
-
|
|
9643
|
+
const splitLegible = labelledSynthesis && !unlabelledSynthesis;
|
|
9644
|
+
if (splitLegible) {
|
|
9577
9645
|
path.finalCompositionMs = finalCompositionMs;
|
|
9578
9646
|
path.semanticJudgeMs = semanticJudgeMs;
|
|
9647
|
+
path.draftJudgeMs = draftJudgeMs;
|
|
9648
|
+
path.finalJudgeMs = finalJudgeMs;
|
|
9649
|
+
path.compositionSpans = compositionSpans;
|
|
9650
|
+
path.judgeSpans = judgeSpans;
|
|
9579
9651
|
}
|
|
9580
9652
|
if (segments > 1 || runStart === void 0 || runEnd === void 0) return path;
|
|
9581
9653
|
path.runWallMs = Math.max(0, runEnd - runStart);
|
|
9582
|
-
if (lastWorkerEnd !== void 0)
|
|
9654
|
+
if (lastWorkerEnd !== void 0) {
|
|
9655
|
+
path.postFanInMs = Math.max(0, runEnd - lastWorkerEnd);
|
|
9656
|
+
const windowFrom = Math.min(lastWorkerEnd, runEnd);
|
|
9657
|
+
const windowTo = runEnd;
|
|
9658
|
+
const clipped = [];
|
|
9659
|
+
for (const span of synthSpans) {
|
|
9660
|
+
if (span.to < windowFrom || span.from > windowTo) continue;
|
|
9661
|
+
clipped.push({
|
|
9662
|
+
from: Math.max(span.from, windowFrom),
|
|
9663
|
+
to: Math.min(span.to, windowTo),
|
|
9664
|
+
...span.judge === void 0 ? {} : { judge: span.judge }
|
|
9665
|
+
});
|
|
9666
|
+
}
|
|
9667
|
+
const synthesisCoveredMs = unionOfIntervalsMs(clipped);
|
|
9668
|
+
const block = {
|
|
9669
|
+
synthesisCoveredMs,
|
|
9670
|
+
unaccountedMs: Math.max(0, path.postFanInMs - synthesisCoveredMs)
|
|
9671
|
+
};
|
|
9672
|
+
if (splitLegible) {
|
|
9673
|
+
let judgeClippedMs = 0;
|
|
9674
|
+
let compositionClippedMs = 0;
|
|
9675
|
+
for (const span of clipped) {
|
|
9676
|
+
const wall = span.to - span.from;
|
|
9677
|
+
if (span.judge === true) judgeClippedMs += wall;
|
|
9678
|
+
else compositionClippedMs += wall;
|
|
9679
|
+
}
|
|
9680
|
+
block.finalCompositionMs = compositionClippedMs;
|
|
9681
|
+
block.semanticJudgeMs = judgeClippedMs;
|
|
9682
|
+
}
|
|
9683
|
+
if (path.postFanInMs > 0) block.unaccountedShare = block.unaccountedMs / path.postFanInMs;
|
|
9684
|
+
path.postFanIn = block;
|
|
9685
|
+
}
|
|
9583
9686
|
if (path.runWallMs > 0) {
|
|
9584
9687
|
if (path.postFanInMs !== void 0) path.postFanInShare = path.postFanInMs / path.runWallMs;
|
|
9585
9688
|
path.synthesisShare = synthesisMs / path.runWallMs;
|
|
@@ -13492,7 +13595,10 @@ async function runAgent(options) {
|
|
|
13492
13595
|
if (outcome.aborted !== void 0) record.aborted = outcome.aborted;
|
|
13493
13596
|
else if (outcome.wireError !== void 0) record.errorCode = outcome.wireError.code;
|
|
13494
13597
|
providerCalls.push(record);
|
|
13495
|
-
|
|
13598
|
+
{
|
|
13599
|
+
const receipt = options.billing?.onProviderCall(record);
|
|
13600
|
+
if (receipt !== void 0) await receipt;
|
|
13601
|
+
}
|
|
13496
13602
|
addCallUsd(site.role, target.resolved.ref, accounted);
|
|
13497
13603
|
const limited = outcome.wireError?.data;
|
|
13498
13604
|
if (limited?.kind === "rate-limit" && typeof limited.reportedLimits === "object" && limited.reportedLimits !== null) rateLimitObservations.set(`${target.adapter.id}:${target.resolved.model}`, {
|
|
@@ -15818,6 +15924,20 @@ function sliceRemainder(slice, records) {
|
|
|
15818
15924
|
if (reasoning > 0) remainder.reasoningTokens = reasoning;
|
|
15819
15925
|
return USAGE_FIELDS.some((field) => remainder[field] > 0) || (remainder.reasoningTokens ?? 0) > 0 ? remainder : void 0;
|
|
15820
15926
|
}
|
|
15927
|
+
/**
|
|
15928
|
+
* One export row's usage envelope (RV3311): every row carries the SAME
|
|
15929
|
+
* field set, `reasoningTokens` included (0 when the provider reported
|
|
15930
|
+
* none), and the object is detached from the journal entry it was read
|
|
15931
|
+
* from. The 2026-08-12 comparison run's invoice had 77 rows with the
|
|
15932
|
+
* field and one without, and a FinOps consumer folding the column had
|
|
15933
|
+
* to know that absence meant zero on exactly one row shape.
|
|
15934
|
+
*/
|
|
15935
|
+
function rowUsage(usage) {
|
|
15936
|
+
return {
|
|
15937
|
+
...usage,
|
|
15938
|
+
reasoningTokens: usage.reasoningTokens ?? 0
|
|
15939
|
+
};
|
|
15940
|
+
}
|
|
15821
15941
|
/** One allocation pool per (entry, serving model) slice of the gross fold. */
|
|
15822
15942
|
function allocationKey(entrySeq, servedBy) {
|
|
15823
15943
|
return `${String(entrySeq)} ${servedBy}`;
|
|
@@ -15933,7 +16053,7 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
15933
16053
|
...record.responseId === void 0 ? {} : { responseId: record.responseId },
|
|
15934
16054
|
...record.wireResponseIds === void 0 ? {} : { wireResponseIds: record.wireResponseIds },
|
|
15935
16055
|
...record.wireRequests === void 0 ? {} : { wireRequests: record.wireRequests },
|
|
15936
|
-
usage: record.usage,
|
|
16056
|
+
usage: rowUsage(record.usage),
|
|
15937
16057
|
...record.usageApprox === true ? { usageApprox: true } : {},
|
|
15938
16058
|
...usageUnknown ? { usageUnknown: true } : {},
|
|
15939
16059
|
...usd === void 0 ? {} : { usd },
|
|
@@ -15951,7 +16071,7 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
15951
16071
|
servedBy: slice.servedBy,
|
|
15952
16072
|
...slice.role === void 0 ? {} : { role: slice.role },
|
|
15953
16073
|
outcome: "unattributed",
|
|
15954
|
-
usage: slice.usage,
|
|
16074
|
+
usage: rowUsage(slice.usage),
|
|
15955
16075
|
...entry.usageApprox === true ? { usageApprox: true } : {},
|
|
15956
16076
|
...usd === void 0 ? {} : { usd },
|
|
15957
16077
|
allocatedUsd: 0,
|
|
@@ -15973,7 +16093,7 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
15973
16093
|
servedBy: slice.servedBy,
|
|
15974
16094
|
...slice.role === void 0 ? {} : { role: slice.role },
|
|
15975
16095
|
outcome: "unattributed",
|
|
15976
|
-
usage: remainder,
|
|
16096
|
+
usage: rowUsage(remainder),
|
|
15977
16097
|
...entry.usageApprox === true ? { usageApprox: true } : {},
|
|
15978
16098
|
...usd === void 0 ? {} : { usd },
|
|
15979
16099
|
allocatedUsd: 0,
|
|
@@ -15984,16 +16104,40 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
15984
16104
|
}
|
|
15985
16105
|
}
|
|
15986
16106
|
const unallocatedUsd = allocateRows(rows, entries, priceUsd, report.grossUsd);
|
|
15987
|
-
const
|
|
16107
|
+
const terminalByRef = new Map(entries.filter((entry) => entry.kind === "agent" && entry.status !== "running").map((entry) => [entry.ref, entry]));
|
|
15988
16108
|
const runningBySeq = new Map(entries.filter((entry) => entry.kind === "agent" && entry.status === "running").map((entry) => [entry.seq, entry]));
|
|
15989
16109
|
const unsettledRows = [];
|
|
16110
|
+
const orphanedRows = [];
|
|
15990
16111
|
for (const entry of entries) {
|
|
15991
16112
|
if (entry.kind !== "decision") continue;
|
|
15992
16113
|
const value = entry.value;
|
|
15993
|
-
if (value?.decisionType !== "provider-call" || typeof value.agentRef !== "number"
|
|
15994
|
-
const running = runningBySeq.get(value.agentRef);
|
|
16114
|
+
if (value?.decisionType !== "provider-call" || typeof value.agentRef !== "number") continue;
|
|
15995
16115
|
const record = value.record;
|
|
15996
|
-
if (
|
|
16116
|
+
if (record?.usage === void 0 || typeof record.ordinal !== "number" || typeof record.servedBy !== "string") continue;
|
|
16117
|
+
const terminal = terminalByRef.get(value.agentRef);
|
|
16118
|
+
if (terminal !== void 0) {
|
|
16119
|
+
const receiptUsage = record.usage;
|
|
16120
|
+
if ((terminal.providerCalls ?? []).some((call) => {
|
|
16121
|
+
if (typeof record.responseId === "string" || call.responseId !== void 0) return call.responseId === record.responseId;
|
|
16122
|
+
return call.ordinal === record.ordinal && call.servedBy === record.servedBy && call.attempt === (typeof record.attempt === "number" ? record.attempt : 1) && call.outcome === (typeof record.outcome === "string" ? record.outcome : "ok") && USAGE_FIELDS.every((field) => (call.usage[field] ?? 0) === (receiptUsage[field] ?? 0)) && (call.usage.reasoningTokens ?? 0) === (receiptUsage.reasoningTokens ?? 0);
|
|
16123
|
+
})) continue;
|
|
16124
|
+
const usd = rowUsd(priceUsd, record.servedBy, record.usage, entry.seq);
|
|
16125
|
+
orphanedRows.push({
|
|
16126
|
+
agentRef: value.agentRef,
|
|
16127
|
+
scope: terminal.scope,
|
|
16128
|
+
ordinal: record.ordinal,
|
|
16129
|
+
servedBy: record.servedBy,
|
|
16130
|
+
role: typeof record.role === "string" ? record.role : "loop",
|
|
16131
|
+
attempt: typeof record.attempt === "number" ? record.attempt : 1,
|
|
16132
|
+
outcome: typeof record.outcome === "string" ? record.outcome : "ok",
|
|
16133
|
+
usage: rowUsage(record.usage),
|
|
16134
|
+
...usd === void 0 ? {} : { usd },
|
|
16135
|
+
...typeof record.responseId === "string" ? { responseId: record.responseId } : {}
|
|
16136
|
+
});
|
|
16137
|
+
continue;
|
|
16138
|
+
}
|
|
16139
|
+
const running = runningBySeq.get(value.agentRef);
|
|
16140
|
+
if (running === void 0) continue;
|
|
15997
16141
|
const usd = rowUsd(priceUsd, record.servedBy, record.usage, entry.seq);
|
|
15998
16142
|
unsettledRows.push({
|
|
15999
16143
|
agentRef: value.agentRef,
|
|
@@ -16003,7 +16147,7 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
16003
16147
|
role: typeof record.role === "string" ? record.role : "loop",
|
|
16004
16148
|
attempt: typeof record.attempt === "number" ? record.attempt : 1,
|
|
16005
16149
|
outcome: typeof record.outcome === "string" ? record.outcome : "ok",
|
|
16006
|
-
usage: record.usage,
|
|
16150
|
+
usage: rowUsage(record.usage),
|
|
16007
16151
|
...usd === void 0 ? {} : { usd },
|
|
16008
16152
|
...typeof record.responseId === "string" ? { responseId: record.responseId } : {}
|
|
16009
16153
|
});
|
|
@@ -16013,6 +16157,11 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
16013
16157
|
wireRequests: unsettledRows.length,
|
|
16014
16158
|
rows: unsettledRows
|
|
16015
16159
|
};
|
|
16160
|
+
const orphanedReceipts = orphanedRows.length === 0 ? void 0 : {
|
|
16161
|
+
usd: orphanedRows.reduce((sum, row) => sum + (row.usd ?? 0), 0),
|
|
16162
|
+
wireRequests: orphanedRows.length,
|
|
16163
|
+
rows: orphanedRows
|
|
16164
|
+
};
|
|
16016
16165
|
const usageApprox = report.usageApprox === true || report.abandoned.usageApprox === true;
|
|
16017
16166
|
const invoice = {
|
|
16018
16167
|
rows,
|
|
@@ -16026,6 +16175,7 @@ function invoiceFromJournal(entries, priceUsd, options) {
|
|
|
16026
16175
|
reconciliationFailures: rows.filter((row) => row.reconciliation !== "provider-id-present").length,
|
|
16027
16176
|
cardinality: cardinalityOf(rows),
|
|
16028
16177
|
...unsettled === void 0 ? {} : { unsettled },
|
|
16178
|
+
...orphanedReceipts === void 0 ? {} : { orphanedReceipts },
|
|
16029
16179
|
...(() => {
|
|
16030
16180
|
const count = rows.filter((row) => row.usageUnknown === true).length;
|
|
16031
16181
|
return count === 0 ? {} : { usageUnknownRows: count };
|
|
@@ -16160,6 +16310,9 @@ function reconcileStatement(invoice, statement, options) {
|
|
|
16160
16310
|
const unmatchedIdSample = [];
|
|
16161
16311
|
let statementOnlyRows = 0;
|
|
16162
16312
|
const statementOnlyIdSample = [];
|
|
16313
|
+
let receiptMatchedRows = 0;
|
|
16314
|
+
let receiptMatchedUsd = 0;
|
|
16315
|
+
const receiptIdSample = [];
|
|
16163
16316
|
let statementTotalUsd;
|
|
16164
16317
|
let statementComponents;
|
|
16165
16318
|
let matchedStatementRows = 0;
|
|
@@ -16257,7 +16410,15 @@ function reconcileStatement(invoice, statement, options) {
|
|
|
16257
16410
|
}
|
|
16258
16411
|
}
|
|
16259
16412
|
}
|
|
16413
|
+
const receiptIds = /* @__PURE__ */ new Set();
|
|
16414
|
+
for (const lane of [invoice.unsettled, invoice.orphanedReceipts]) for (const row of lane?.rows ?? []) if (typeof row.responseId === "string") receiptIds.add(row.responseId);
|
|
16260
16415
|
for (const row of statement.rows) if (!matchedStatement.has(row.responseId) && !partialSegmentIds.has(row.responseId)) {
|
|
16416
|
+
if (receiptIds.has(row.responseId)) {
|
|
16417
|
+
receiptMatchedRows += 1;
|
|
16418
|
+
if (row.usd !== void 0) receiptMatchedUsd += row.usd;
|
|
16419
|
+
if (receiptIdSample.length < SAMPLE_CAP) receiptIdSample.push(row.responseId);
|
|
16420
|
+
continue;
|
|
16421
|
+
}
|
|
16261
16422
|
statementOnlyRows += 1;
|
|
16262
16423
|
if (statementOnlyIdSample.length < SAMPLE_CAP) statementOnlyIdSample.push(row.responseId);
|
|
16263
16424
|
}
|
|
@@ -16406,7 +16567,12 @@ function reconcileStatement(invoice, statement, options) {
|
|
|
16406
16567
|
verdict,
|
|
16407
16568
|
dollarCoverage,
|
|
16408
16569
|
settleable,
|
|
16409
|
-
monetarySettleable: settleable && dollarCoverage === "complete"
|
|
16570
|
+
monetarySettleable: settleable && dollarCoverage === "complete",
|
|
16571
|
+
...receiptMatchedRows === 0 ? {} : {
|
|
16572
|
+
receiptMatchedRows,
|
|
16573
|
+
receiptMatchedUsd,
|
|
16574
|
+
receiptIdSample
|
|
16575
|
+
}
|
|
16410
16576
|
};
|
|
16411
16577
|
}
|
|
16412
16578
|
/** A cell that is absent by export convention: missing, null, or ''. */
|
|
@@ -19031,7 +19197,7 @@ function createCtx(internals, rootWorkflow) {
|
|
|
19031
19197
|
if (cachePolicy !== void 0) runAgentOptions.cache = cachePolicy;
|
|
19032
19198
|
}
|
|
19033
19199
|
runAgentOptions.billing = { onProviderCall: (record) => {
|
|
19034
|
-
internals.replayer.appendSinglePhase({
|
|
19200
|
+
const append = internals.replayer.appendSinglePhase({
|
|
19035
19201
|
scope: state.scope,
|
|
19036
19202
|
key: `pc:${String(running.seq)}:${String(record.ordinal)}`,
|
|
19037
19203
|
kind: "decision",
|
|
@@ -19043,13 +19209,14 @@ function createCtx(internals, rootWorkflow) {
|
|
|
19043
19209
|
agentRef: running.seq,
|
|
19044
19210
|
record
|
|
19045
19211
|
}
|
|
19046
|
-
}).catch((thrown) => {
|
|
19212
|
+
}).then(() => void 0).catch((thrown) => {
|
|
19047
19213
|
internals.events.emit({
|
|
19048
19214
|
type: "log",
|
|
19049
19215
|
level: "warn",
|
|
19050
19216
|
msg: `incremental billing row failed to append; the terminal entry remains the canonical record (${thrown instanceof Error ? thrown.message : String(thrown)})`
|
|
19051
19217
|
}, spanId);
|
|
19052
19218
|
});
|
|
19219
|
+
if (internals.defaults.billingReceipts === "awaited") return append;
|
|
19053
19220
|
} };
|
|
19054
19221
|
runAgentOptions.summarize = summarize;
|
|
19055
19222
|
if (profile?.compaction !== void 0) runAgentOptions.compaction = profile.compaction;
|
|
@@ -21466,6 +21633,93 @@ function formatCharacterValidator(options) {
|
|
|
21466
21633
|
}
|
|
21467
21634
|
};
|
|
21468
21635
|
}
|
|
21636
|
+
/**
|
|
21637
|
+
* Every declared literal must appear in the finish result at least
|
|
21638
|
+
* once (RV3308). The 2026-08-12 comparison run passed an exact twelve
|
|
21639
|
+
* heading contract and a citation floor while its "all publishable
|
|
21640
|
+
* packages" table silently dropped four of the seventeen names: shape
|
|
21641
|
+
* validators cannot see an enumerable universe, so the universe is
|
|
21642
|
+
* declared as literals and each one is held. Purely textual and
|
|
21643
|
+
* deterministic; fenced code counts, because tables and inline code
|
|
21644
|
+
* are legitimate places to name a package. Default name
|
|
21645
|
+
* 'required-mentions'.
|
|
21646
|
+
*/
|
|
21647
|
+
function requiredMentionsValidator(options) {
|
|
21648
|
+
const terms = requireNonEmptyStrings(options.terms, "requiredMentionsValidator terms");
|
|
21649
|
+
const declared = /* @__PURE__ */ new Set();
|
|
21650
|
+
for (const term of terms) {
|
|
21651
|
+
if (declared.has(term)) throw new ConfigError(`requiredMentionsValidator terms carry a duplicate: '${term}'`);
|
|
21652
|
+
declared.add(term);
|
|
21653
|
+
}
|
|
21654
|
+
return {
|
|
21655
|
+
name: options.name ?? "required-mentions",
|
|
21656
|
+
validate: (input) => {
|
|
21657
|
+
const missing = terms.filter((term) => !input.text.includes(term));
|
|
21658
|
+
if (missing.length === 0) return { ok: true };
|
|
21659
|
+
return {
|
|
21660
|
+
ok: false,
|
|
21661
|
+
reasons: [`required mentions missing from the result: ${missing.slice(0, MAX_LISTED_CITATIONS).map((term) => `'${term}'`).join(", ")}${missing.length > MAX_LISTED_CITATIONS ? ` and ${String(missing.length - MAX_LISTED_CITATIONS)} more` : ""} (${String(missing.length)} of ${String(terms.length)} declared literals)`]
|
|
21662
|
+
};
|
|
21663
|
+
}
|
|
21664
|
+
};
|
|
21665
|
+
}
|
|
21666
|
+
function requireManifest(manifest) {
|
|
21667
|
+
if (manifest.sections === void 0 && manifest.requiredMentions === void 0 && manifest.words === void 0 && manifest.minCitations === void 0) throw new ConfigError("an OutputContractManifest must declare at least one of sections, requiredMentions, words, or minCitations: an empty manifest gates nothing and prompts for nothing");
|
|
21668
|
+
if (manifest.citationPattern !== void 0 && manifest.minCitations === void 0) throw new ConfigError("OutputContractManifest.citationPattern is only meaningful beside minCitations");
|
|
21669
|
+
}
|
|
21670
|
+
/**
|
|
21671
|
+
* The manifest's gate half (RV3308): heading structure (ordered,
|
|
21672
|
+
* exclusive), word bounds, the citation floor, and the mention
|
|
21673
|
+
* universe, in that stable order, each through the existing named
|
|
21674
|
+
* validator. Everything is derived from the SAME object the prompt
|
|
21675
|
+
* block renders from.
|
|
21676
|
+
*/
|
|
21677
|
+
function manifestValidators(manifest) {
|
|
21678
|
+
requireManifest(manifest);
|
|
21679
|
+
const validators = [];
|
|
21680
|
+
if (manifest.sections !== void 0) validators.push(headingStructureValidator({
|
|
21681
|
+
sections: manifest.sections,
|
|
21682
|
+
ordered: true,
|
|
21683
|
+
exclusive: true
|
|
21684
|
+
}));
|
|
21685
|
+
if (manifest.words !== void 0) validators.push(wordCountValidator(manifest.words));
|
|
21686
|
+
if (manifest.minCitations !== void 0) validators.push(minMatchesValidator({
|
|
21687
|
+
pattern: manifest.citationPattern ?? "[\\w./-]+\\.\\w+:\\d+",
|
|
21688
|
+
min: manifest.minCitations,
|
|
21689
|
+
name: "citation-count"
|
|
21690
|
+
}));
|
|
21691
|
+
if (manifest.requiredMentions !== void 0) validators.push(requiredMentionsValidator({ terms: manifest.requiredMentions }));
|
|
21692
|
+
return validators;
|
|
21693
|
+
}
|
|
21694
|
+
/**
|
|
21695
|
+
* The manifest's prompt half (RV3308): a deterministic requirements
|
|
21696
|
+
* block enumerating the SAME headings, bounds, citation floor and
|
|
21697
|
+
* literals the validators hold, byte for byte, for the host to embed
|
|
21698
|
+
* in its question. Rendering is pure string assembly; nothing here
|
|
21699
|
+
* consults the result.
|
|
21700
|
+
*/
|
|
21701
|
+
function renderContractRequirements(manifest) {
|
|
21702
|
+
requireManifest(manifest);
|
|
21703
|
+
const lines = ["The final document must satisfy every requirement below, verbatim."];
|
|
21704
|
+
if (manifest.sections !== void 0) {
|
|
21705
|
+
const sections = requireNonEmptyStrings(manifest.sections, "renderContractRequirements sections");
|
|
21706
|
+
lines.push(`Exactly ${String(sections.length)} section headings, in this order and none besides:`);
|
|
21707
|
+
for (const section of sections) lines.push(section);
|
|
21708
|
+
}
|
|
21709
|
+
if (manifest.words !== void 0) {
|
|
21710
|
+
const { min, max } = manifest.words;
|
|
21711
|
+
if (min !== void 0 && max !== void 0) lines.push(`Whitespace word count between ${String(min)} and ${String(max)}.`);
|
|
21712
|
+
else if (min !== void 0) lines.push(`Whitespace word count at least ${String(min)}.`);
|
|
21713
|
+
else if (max !== void 0) lines.push(`Whitespace word count at most ${String(max)}.`);
|
|
21714
|
+
}
|
|
21715
|
+
if (manifest.minCitations !== void 0) lines.push(`At least ${String(manifest.minCitations)} citations matching /${manifest.citationPattern ?? "[\\w./-]+\\.\\w+:\\d+"}/.`);
|
|
21716
|
+
if (manifest.requiredMentions !== void 0) {
|
|
21717
|
+
const terms = requireNonEmptyStrings(manifest.requiredMentions, "renderContractRequirements requiredMentions");
|
|
21718
|
+
lines.push("Each of these literal strings must appear at least once:");
|
|
21719
|
+
for (const term of terms) lines.push(term);
|
|
21720
|
+
}
|
|
21721
|
+
return lines.join("\n");
|
|
21722
|
+
}
|
|
21469
21723
|
//#endregion
|
|
21470
21724
|
//#region src/orchestrator/contradictions.ts
|
|
21471
21725
|
/**
|
|
@@ -22607,7 +22861,11 @@ function validateOrchestrateOptions(opts) {
|
|
|
22607
22861
|
const consistency = opts.claimConsistency;
|
|
22608
22862
|
if (typeof consistency !== "object" || Array.isArray(consistency)) throw new ConfigError(`orchestrate claimConsistency must be an object; got ${JSON.stringify(opts.claimConsistency)}`);
|
|
22609
22863
|
const onFound = consistency.onFound ?? "report";
|
|
22610
|
-
if (onFound !== "report" && onFound !== "carry" && onFound !== "fail") throw new ConfigError(
|
|
22864
|
+
if (onFound !== "report" && onFound !== "carry" && onFound !== "fail" && onFound !== "repair") throw new ConfigError(`orchestrate claimConsistency.onFound must be 'report', 'carry', 'fail' or 'repair'; got ${JSON.stringify(consistency.onFound)}`);
|
|
22865
|
+
if (onFound === "repair") {
|
|
22866
|
+
if (opts.synthesis === void 0) throw new ConfigError("orchestrate claimConsistency.onFound 'repair' requires synthesis: the bounded repair round re-dispatches it with the judged findings carried");
|
|
22867
|
+
if (opts.synthesis.mode === "incremental") throw new ConfigError("orchestrate claimConsistency.onFound 'repair' needs a 'single' synthesis: the deterministic 'incremental' reconciliation has no prompt for the findings to ride");
|
|
22868
|
+
}
|
|
22611
22869
|
if (onFound === "carry") {
|
|
22612
22870
|
if (opts.synthesis === void 0) throw new ConfigError("orchestrate claimConsistency.onFound 'carry' requires synthesis: without the post-fan-in invocation there is no prompt to carry the findings into; use 'report' or 'fail'");
|
|
22613
22871
|
if (opts.synthesis.mode === "incremental") throw new ConfigError("orchestrate claimConsistency.onFound 'carry' needs a 'single' synthesis: the deterministic 'incremental' reconciliation has no prompt for the findings to ride");
|
|
@@ -22616,6 +22874,7 @@ function validateOrchestrateOptions(opts) {
|
|
|
22616
22874
|
if (stage !== "draft" && stage !== "final" && stage !== "both") throw new ConfigError("orchestrate claimConsistency.stage must be 'draft', 'final' or 'both'; got " + JSON.stringify(consistency.stage));
|
|
22617
22875
|
if (stage !== "draft" && opts.synthesis === void 0) throw new ConfigError(`orchestrate claimConsistency.stage '${stage}' requires synthesis: without the post-fan-in invocation the coordination draft IS the final artifact, and the default 'draft' already judges it`);
|
|
22618
22876
|
if (stage === "final" && onFound === "carry") throw new ConfigError("orchestrate claimConsistency.onFound 'carry' cannot pair with stage 'final': the final pass runs after the synthesis, so there is no prompt left to carry the findings into; use 'report' or 'fail', or keep a carried draft pass with stage 'both'");
|
|
22877
|
+
if (stage === "draft" && onFound === "repair") throw new ConfigError("orchestrate claimConsistency.onFound 'repair' needs stage 'final' or 'both': the repair consumes the FINAL pass's findings, and the draft pass already has 'carry'");
|
|
22619
22878
|
if (consistency.pattern !== void 0) {
|
|
22620
22879
|
if (typeof consistency.pattern !== "string") throw new ConfigError(`orchestrate claimConsistency.pattern must be a string; got ${typeof consistency.pattern}`);
|
|
22621
22880
|
let probe;
|
|
@@ -24874,7 +25133,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24874
25133
|
msg: "orchestrator claim consistency judge declined by admission",
|
|
24875
25134
|
data: { reason: declined.message.slice(0, 300) }
|
|
24876
25135
|
}, callingState.spanId);
|
|
24877
|
-
if (onFound === "fail") throw new FailRunError(
|
|
25136
|
+
if (onFound === "fail" || onFound === "repair") throw new FailRunError(`the claim-consistency judge could not be admitted within the orchestrator account, so the armed ${onFound} posture cannot pass the draft: ` + declined.message.slice(0, 300), { data: {
|
|
24878
25137
|
source: "orchestrator_claim_consistency",
|
|
24879
25138
|
claimConsistencyMeta,
|
|
24880
25139
|
...snapshot ?? {}
|
|
@@ -24895,7 +25154,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24895
25154
|
...judged.errorMessage === void 0 ? {} : { error: judged.errorMessage }
|
|
24896
25155
|
}
|
|
24897
25156
|
}, callingState.spanId);
|
|
24898
|
-
if (onFound === "fail") throw new FailRunError(`the claim-consistency judge did not settle ok (status '${judged.status}'), so the armed
|
|
25157
|
+
if (onFound === "fail" || onFound === "repair") throw new FailRunError(`the claim-consistency judge did not settle ok (status '${judged.status}'), so the armed ${onFound} posture cannot pass the draft`, { data: {
|
|
24899
25158
|
source: "orchestrator_claim_consistency",
|
|
24900
25159
|
judgeStatus: judged.status,
|
|
24901
25160
|
claimConsistencyMeta,
|
|
@@ -25063,7 +25322,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
25063
25322
|
announceGaps(gapsEntry.seq, failed.map((row) => row.name));
|
|
25064
25323
|
}
|
|
25065
25324
|
const carryBlocked = opts?.contradictions?.onFound === "carry" && contradictionsFound !== void 0 && contradictionsFound.length > 0;
|
|
25066
|
-
const claimCarryBlocked = opts?.claimConsistency?.onFound === "carry" && claimFindingsFound !== void 0 && claimFindingsFound.length > 0;
|
|
25325
|
+
const claimCarryBlocked = (opts?.claimConsistency?.onFound === "carry" || opts?.claimConsistency?.onFound === "repair") && claimFindingsFound !== void 0 && claimFindingsFound.length > 0;
|
|
25067
25326
|
if (failed.length === 0 && (carryBlocked || claimCarryBlocked)) internals.events.emit({
|
|
25068
25327
|
type: "log",
|
|
25069
25328
|
level: "info",
|
|
@@ -25178,7 +25437,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
25178
25437
|
...finishValidationPromptLines(validationSpec, synthSectionalFinish ? "draft-base" : void 0),
|
|
25179
25438
|
...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)],
|
|
25180
25439
|
...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)],
|
|
25181
|
-
...opts?.claimConsistency?.onFound !== "carry" || 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)],
|
|
25440
|
+
...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)],
|
|
25182
25441
|
...spec.policyFacts === true ? [(() => {
|
|
25183
25442
|
const byStatus = {};
|
|
25184
25443
|
let extensionsGranted = 0;
|
|
@@ -26025,6 +26284,33 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
26025
26284
|
if (claimStage !== "draft") {
|
|
26026
26285
|
claimConsistencyDraftMeta = claimStage === "both" ? claimConsistencyMeta : void 0;
|
|
26027
26286
|
await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
|
|
26287
|
+
if ((opts?.claimConsistency?.onFound ?? "report") === "repair" && claimFindingsFound !== void 0 && claimFindingsFound.length > 0) {
|
|
26288
|
+
const hashOfDocument = (value) => createHash("sha256").update(jcsSerialize(value ?? null), "utf8").digest("hex");
|
|
26289
|
+
const preRepairHash = hashOfDocument(synthesizedFinal);
|
|
26290
|
+
const carried = claimFindingsFound;
|
|
26291
|
+
try {
|
|
26292
|
+
synthesizedFinal = await runSynthesis(result.output);
|
|
26293
|
+
} catch (thrown) {
|
|
26294
|
+
await journalSynthesisAdmissionDecline(thrown);
|
|
26295
|
+
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
|
+
source: "orchestrator_claim_consistency",
|
|
26297
|
+
claimContradictions: carried,
|
|
26298
|
+
repairsUsed: 0,
|
|
26299
|
+
preRepairHash,
|
|
26300
|
+
...acceptanceSnapshot
|
|
26301
|
+
} });
|
|
26302
|
+
}
|
|
26303
|
+
await runClaimConsistencyPass(synthesizedFinal, acceptanceSnapshot, "final");
|
|
26304
|
+
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
|
+
source: "orchestrator_claim_consistency",
|
|
26306
|
+
claimContradictions: claimFindingsFound,
|
|
26307
|
+
claimConsistencyMeta,
|
|
26308
|
+
repairsUsed: 1,
|
|
26309
|
+
preRepairHash,
|
|
26310
|
+
repairedHash: hashOfDocument(synthesizedFinal),
|
|
26311
|
+
...acceptanceSnapshot
|
|
26312
|
+
} });
|
|
26313
|
+
}
|
|
26028
26314
|
}
|
|
26029
26315
|
const envelopeSchemaRecovered = (result.schemaRecoveredTerminalExchanges ?? 0) + synthesisSchemaRecoveredExchanges;
|
|
26030
26316
|
const deliverable = deliverableVerdict(synthesizedFinal);
|
|
@@ -26290,6 +26576,36 @@ function preflightEstimate(input) {
|
|
|
26290
26576
|
if (input.orchestrator.estInputTokens !== void 0) requireNonNegativeInteger(input.orchestrator.estInputTokens, "preflight.orchestrator.estInputTokens");
|
|
26291
26577
|
if (input.orchestrator.acceptance?.minSpawnedChildren !== void 0) requirePositiveInteger$2(input.orchestrator.acceptance.minSpawnedChildren, "preflight.orchestrator.acceptance.minSpawnedChildren");
|
|
26292
26578
|
if (input.orchestrator.claimConsistency?.judge?.estCost !== void 0) requireNonNegativeNumber(input.orchestrator.claimConsistency.judge.estCost, "preflight.orchestrator.claimConsistency.judge.estCost");
|
|
26579
|
+
{
|
|
26580
|
+
const posture = input.orchestrator.claimConsistency;
|
|
26581
|
+
if (posture?.onFound !== void 0 && ![
|
|
26582
|
+
"report",
|
|
26583
|
+
"carry",
|
|
26584
|
+
"fail",
|
|
26585
|
+
"repair"
|
|
26586
|
+
].includes(posture.onFound)) throw new ConfigError(`preflight.orchestrator.claimConsistency.onFound must be 'report', 'carry', 'fail' or 'repair'; got ${JSON.stringify(posture.onFound)}`);
|
|
26587
|
+
if (posture?.stage !== void 0 && ![
|
|
26588
|
+
"draft",
|
|
26589
|
+
"final",
|
|
26590
|
+
"both"
|
|
26591
|
+
].includes(posture.stage)) throw new ConfigError(`preflight.orchestrator.claimConsistency.stage must be 'draft', 'final' or 'both'; got ${JSON.stringify(posture.stage)}`);
|
|
26592
|
+
const stage = posture?.stage ?? "draft";
|
|
26593
|
+
if (posture?.onFound === "repair" && stage === "draft") say({
|
|
26594
|
+
severity: "error",
|
|
26595
|
+
code: "claim-posture-refused-at-intake",
|
|
26596
|
+
message: "claimConsistency.onFound 'repair' needs stage 'final' or 'both' (at the draft stage the repair IS the carry, RV3307): the run would refuse to start"
|
|
26597
|
+
});
|
|
26598
|
+
if (posture?.onFound === "repair" && input.orchestrator.synthesis === void 0) say({
|
|
26599
|
+
severity: "error",
|
|
26600
|
+
code: "claim-posture-refused-at-intake",
|
|
26601
|
+
message: "claimConsistency.onFound 'repair' requires a synthesis: the bounded round is one more composition, and without one there is nothing to repair with: the run would refuse to start"
|
|
26602
|
+
});
|
|
26603
|
+
if (posture?.onFound === "carry" && stage === "final") say({
|
|
26604
|
+
severity: "error",
|
|
26605
|
+
code: "claim-posture-refused-at-intake",
|
|
26606
|
+
message: "claimConsistency.onFound 'carry' cannot pair with stage 'final' (RV3301): the final pass has no synthesis prompt left to ride, and the run would refuse to start; declare onFound 'repair' for the bounded post judge round"
|
|
26607
|
+
});
|
|
26608
|
+
}
|
|
26293
26609
|
const spec = input.orchestrator.budget;
|
|
26294
26610
|
const fraction = spec?.capFraction ?? .2;
|
|
26295
26611
|
const fromFraction = ceilingUsd === void 0 ? void 0 : fraction * ceilingUsd;
|
|
@@ -26530,9 +26846,20 @@ function preflightEstimate(input) {
|
|
|
26530
26846
|
if (positiveCallCap || limits.toolUnits !== void 0) anyCappedSpawn = true;
|
|
26531
26847
|
const evidenceContract = spec.evidenceContract ?? profile?.evidenceContract;
|
|
26532
26848
|
if (evidenceContract !== void 0 && executedToolCallCeiling !== null) {
|
|
26533
|
-
const
|
|
26849
|
+
const declaredPerEntry = evidenceContract.estCallsPerEntry ?? 3;
|
|
26850
|
+
const observed = evidenceContract.calibration?.callsPerEntry;
|
|
26851
|
+
const perEntry = observed === void 0 ? declaredPerEntry : Math.max(declaredPerEntry, observed);
|
|
26852
|
+
if (observed !== void 0 && observed > declaredPerEntry) {
|
|
26853
|
+
const source = evidenceContract.calibration?.source === void 0 ? "" : ` (source: ${evidenceContract.calibration.source})`;
|
|
26854
|
+
say({
|
|
26855
|
+
severity: "info",
|
|
26856
|
+
code: "evidence-estimate-below-observed",
|
|
26857
|
+
message: `spawn '${label}' declares ${String(declaredPerEntry)} estimated calls per evidence entry, but the supplied calibration observed ${String(observed)}${source}: the evidence call floor uses the observed figure`,
|
|
26858
|
+
spawn: label
|
|
26859
|
+
});
|
|
26860
|
+
}
|
|
26534
26861
|
const overhead = evidenceContract.overheadCalls ?? 8;
|
|
26535
|
-
const floor = evidenceContract.minEntries * perEntry + overhead;
|
|
26862
|
+
const floor = Math.ceil(evidenceContract.minEntries * perEntry) + overhead;
|
|
26536
26863
|
if (executedToolCallCeiling < floor) say({
|
|
26537
26864
|
severity: "warning",
|
|
26538
26865
|
code: "tool-cap-below-evidence-floor",
|
|
@@ -26842,30 +27169,38 @@ function preflightEstimate(input) {
|
|
|
26842
27169
|
const ceilingHeadroomUsd = ceilingUsd === void 0 || requiredMinimumCeilingUsd === void 0 ? void 0 : ceilingUsd - requiredMinimumCeilingUsd;
|
|
26843
27170
|
const ceilingHeadroomShare = ceilingHeadroomUsd === void 0 || ceilingUsd === void 0 || ceilingUsd <= 0 ? void 0 : ceilingHeadroomUsd / ceilingUsd;
|
|
26844
27171
|
const minCeilingHeadroomShare = input.orchestrator?.minCeilingHeadroomShare ?? 0;
|
|
27172
|
+
const ceilingHeadroomSeverity = input.orchestrator?.ceilingHeadroomSeverity ?? "warning";
|
|
27173
|
+
if (ceilingHeadroomSeverity !== "warning" && ceilingHeadroomSeverity !== "error") throw new ConfigError("preflight orchestrator.ceilingHeadroomSeverity must be 'warning' or 'error'; got " + JSON.stringify(input.orchestrator?.ceilingHeadroomSeverity));
|
|
26845
27174
|
if (ceilingHeadroomShare !== void 0 && minCeilingHeadroomShare > 0 && ceilingHeadroomShare < minCeilingHeadroomShare) say({
|
|
26846
|
-
severity:
|
|
27175
|
+
severity: ceilingHeadroomSeverity,
|
|
26847
27176
|
code: "ceiling-headroom-thin",
|
|
26848
27177
|
message: `the ceiling headroom is ${(ceilingHeadroomShare * 100).toFixed(2)} percent of the ceiling (${(ceilingHeadroomUsd ?? 0).toFixed(4)} USD over the required minimum ${(requiredMinimumCeilingUsd ?? 0).toFixed(4)} USD), below the declared ${(minCeilingHeadroomShare * 100).toFixed(2)} percent floor: a small pricing or context drift refuses the whole wave at admission; raise the ceiling or slim the wave`
|
|
26849
27178
|
});
|
|
27179
|
+
const claimPosture = input.orchestrator?.claimConsistency;
|
|
27180
|
+
const repairArmed = claimPosture?.onFound === "repair";
|
|
27181
|
+
const worstJudgePasses = ((claimPosture?.stage ?? "draft") === "both" ? 2 : 1) + (repairArmed ? 1 : 0);
|
|
26850
27182
|
{
|
|
26851
27183
|
const judgeEstUsd = input.orchestrator?.claimConsistency?.judge?.estCost;
|
|
26852
27184
|
if (judgeEstUsd !== void 0 && effectiveCapUsd !== void 0 && synthesisHoldUsd > 0) {
|
|
26853
27185
|
const workingRoomUsd = effectiveCapUsd - synthesisHoldUsd;
|
|
26854
|
-
|
|
27186
|
+
const repairCompositionUsd = repairArmed ? synthesisHoldUsd : 0;
|
|
27187
|
+
if (workingRoomUsd < liveRootExposureTermUsd + judgeEstUsd * worstJudgePasses + repairCompositionUsd) say({
|
|
26855
27188
|
severity: "warning",
|
|
26856
27189
|
code: "orchestrator-working-room",
|
|
26857
|
-
message: `the orchestrator account's working room past the held synthesis reserve is ${workingRoomUsd.toFixed(4)} USD (cap ${effectiveCapUsd.toFixed(4)} minus the ${synthesisHoldUsd.toFixed(4)} USD hold), below one coordination turn floor (${liveRootExposureTermUsd.toFixed(4)} USD) plus the declared ${judgeEstUsd.toFixed(4)} USD claim-consistency judge estimate: the judge admission will be declined once the coordination loop has taken even one turn, and the pass degrades to its journaled declined verdict (RV2106); raise the cap, shrink the judge estimate, or shrink the synthesis reserve
|
|
27190
|
+
message: `the orchestrator account's working room past the held synthesis reserve is ${workingRoomUsd.toFixed(4)} USD (cap ${effectiveCapUsd.toFixed(4)} minus the ${synthesisHoldUsd.toFixed(4)} USD hold), below one coordination turn floor (${liveRootExposureTermUsd.toFixed(4)} USD) plus the declared ${judgeEstUsd.toFixed(4)} USD claim-consistency judge estimate` + (worstJudgePasses === 1 ? "" : ` across ${String(worstJudgePasses)} passes at worst (RV3402)`) + (repairArmed ? ` plus one repair round composition priced at the ${synthesisHoldUsd.toFixed(4)} USD reserve (RV3307)` : "") + ": the judge admission will be declined once the coordination loop has taken even one turn, and " + (claimPosture?.onFound === "fail" || claimPosture?.onFound === "repair" ? `under the armed '${claimPosture.onFound}' posture the declined judge stops the run typed (RV3307)` : "the pass degrades to its journaled declined verdict (RV2106)") + "; raise the cap, shrink the judge estimate, or shrink the synthesis reserve"
|
|
26858
27191
|
});
|
|
26859
27192
|
}
|
|
26860
27193
|
}
|
|
26861
27194
|
if (orchestrateWave && wave.length > 0 && admitted === wave.length) {
|
|
26862
27195
|
const lifetimeSpawnCap = input.engine?.budgetDefaults?.lifetimeSpawnCap ?? 500;
|
|
26863
|
-
const judgeDeclared = input.orchestrator?.claimConsistency
|
|
27196
|
+
const judgeDeclared = input.orchestrator?.claimConsistency !== void 0;
|
|
26864
27197
|
const synthesisDeclared = input.orchestrator?.synthesis !== void 0;
|
|
26865
|
-
const
|
|
27198
|
+
const judgeSpawns = judgeDeclared ? worstJudgePasses : 0;
|
|
27199
|
+
const repairSpawns = repairArmed && synthesisDeclared ? 1 : 0;
|
|
27200
|
+
const plannedSpawns = wave.length + judgeSpawns + (synthesisDeclared ? 1 : 0) + repairSpawns;
|
|
26866
27201
|
const spawnHeadroom = lifetimeSpawnCap - plannedSpawns;
|
|
26867
27202
|
if (spawnHeadroom <= 0) {
|
|
26868
|
-
const breakdown = `the admitted wave of ${String(wave.length)} agent invocations` + (judgeDeclared ? " plus the claim-consistency judge" : "") + (synthesisDeclared ? " plus the synthesis invocation" : "") + ` is ${String(plannedSpawns)} against budgetDefaults.lifetimeSpawnCap ` + String(lifetimeSpawnCap);
|
|
27203
|
+
const breakdown = `the admitted wave of ${String(wave.length)} agent invocations` + (judgeDeclared ? judgeSpawns === 1 ? " plus the claim-consistency judge" : ` plus ${String(judgeSpawns)} claim-consistency judge passes at worst` : "") + (synthesisDeclared ? " plus the synthesis invocation" : "") + (repairSpawns === 0 ? "" : " plus the repair round composition") + ` is ${String(plannedSpawns)} against budgetDefaults.lifetimeSpawnCap ` + String(lifetimeSpawnCap);
|
|
26869
27204
|
say({
|
|
26870
27205
|
severity: "warning",
|
|
26871
27206
|
code: "tail-spawn-budget",
|
|
@@ -27945,6 +28280,7 @@ function createEngine(options) {
|
|
|
27945
28280
|
if (profile.countTokens !== void 0 && !["allow", "deny"].includes(profile.countTokens)) throw new ConfigError(`createEngine defaults.profiles['${name}'].countTokens must be 'allow' or 'deny'`);
|
|
27946
28281
|
}
|
|
27947
28282
|
if (options.defaults?.countTokens !== void 0 && !["allow", "deny"].includes(options.defaults.countTokens)) throw new ConfigError("createEngine defaults.countTokens must be 'allow' or 'deny'");
|
|
28283
|
+
if (options.defaults?.billingReceipts !== void 0 && !["async", "awaited"].includes(options.defaults.billingReceipts)) throw new ConfigError("createEngine defaults.billingReceipts must be 'async' or 'awaited'");
|
|
27948
28284
|
if (options.telemetry?.quotaDeniedAgentError !== void 0 && typeof options.telemetry.quotaDeniedAgentError !== "boolean") throw new ConfigError("createEngine telemetry.quotaDeniedAgentError must be a boolean");
|
|
27949
28285
|
validateDeterminismConfig(options.determinism);
|
|
27950
28286
|
validateEngineQuotaConfig(options.quota);
|
|
@@ -28142,7 +28478,8 @@ function createEngine(options) {
|
|
|
28142
28478
|
...defaults.toolsets === void 0 ? {} : { toolsets: defaults.toolsets },
|
|
28143
28479
|
...defaults.gates === void 0 ? {} : { gates: defaults.gates },
|
|
28144
28480
|
...defaults.countTokens === void 0 ? {} : { countTokens: defaults.countTokens },
|
|
28145
|
-
...defaults.cache === void 0 ? {} : { cache: defaults.cache }
|
|
28481
|
+
...defaults.cache === void 0 ? {} : { cache: defaults.cache },
|
|
28482
|
+
...defaults.billingReceipts === void 0 ? {} : { billingReceipts: defaults.billingReceipts }
|
|
28146
28483
|
},
|
|
28147
28484
|
...options.telemetry === void 0 ? {} : { telemetry: options.telemetry },
|
|
28148
28485
|
errorPolicy: wf.errorPolicy,
|
|
@@ -29107,4 +29444,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
29107
29444
|
};
|
|
29108
29445
|
}
|
|
29109
29446
|
//#endregion
|
|
29110
|
-
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, 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, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, logicalRunTelemetry, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, statementRowsFromDelimited, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, synthesisCandidatesFromJournal, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolCalibrationFromJournal, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.239.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",
|