@rulvar/core 1.54.0 → 1.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1638,6 +1638,59 @@ interface KbProposal {
1638
1638
  note?: string;
1639
1639
  }
1640
1640
  //#endregion
1641
+ //#region src/l0/spi/quota.d.ts
1642
+ /**
1643
+ * The pre-dispatch estimate a reservation is admitted under. Token
1644
+ * estimates are heuristic (the engine uses its deterministic
1645
+ * four-characters-per-token prompt estimate plus the request's output
1646
+ * cap when one is set); reconcile() settles the difference against
1647
+ * actual usage inside the same accounting window.
1648
+ */
1649
+ interface QuotaEstimate {
1650
+ /** Wire calls this reservation admits; the engine always sends 1. */
1651
+ requests: number;
1652
+ /** Heuristic prompt estimate for the attempt. */
1653
+ inputTokens: number;
1654
+ /** The request's output token cap, when one is set. */
1655
+ maxOutputTokens?: number;
1656
+ }
1657
+ /** One admission request, dimensioned for tenant/model/provider rules. */
1658
+ interface QuotaReservationRequest {
1659
+ /**
1660
+ * The adapter id (the left segment of ModelRef), matching the keys
1661
+ * of `concurrency.perProvider`.
1662
+ */
1663
+ provider: string;
1664
+ /** The serving model, re-reserved per failover target. */
1665
+ model: string;
1666
+ /** The engine's configured tenant; absent when the host set none. */
1667
+ tenant?: string;
1668
+ /** The run paying for the attempt; observability only. */
1669
+ runId?: string;
1670
+ estimate: QuotaEstimate;
1671
+ }
1672
+ /**
1673
+ * The admission verdict. `retryAfterMs` on a denial is the
1674
+ * provider-shaped hint the retry engine honors verbatim: the time
1675
+ * until the limiter expects capacity (0 = retry immediately, e.g. a
1676
+ * request whose estimate can never fit its cap, so exhaustion and
1677
+ * failover happen without waiting; absent = the caller's backoff
1678
+ * policy applies).
1679
+ */
1680
+ type QuotaDecision = {
1681
+ granted: true;
1682
+ reservationId: string;
1683
+ } | {
1684
+ granted: false;
1685
+ retryAfterMs?: number;
1686
+ reason?: string;
1687
+ };
1688
+ /** The shared rate/quota limiter seam; see the module contract above. */
1689
+ interface QuotaLimiter {
1690
+ reserve(request: QuotaReservationRequest): Promise<QuotaDecision>;
1691
+ reconcile(reservationId: string, usage: Usage): Promise<void>;
1692
+ }
1693
+ //#endregion
1641
1694
  //#region src/knowledge/decay.d.ts
1642
1695
  /**
1643
1696
  * The asymmetric TTL table:
@@ -2667,6 +2720,127 @@ declare class KeyedLimiter {
2667
2720
  withSlot<T>(key: string, fn: () => Promise<T>, onQueued?: () => void, signal?: AbortSignal): Promise<T>;
2668
2721
  }
2669
2722
  //#endregion
2723
+ //#region src/model/quota.d.ts
2724
+ /** The fixed accounting window every PerMinute cap counts over. */
2725
+ declare const QUOTA_WINDOW_MS = 6e4;
2726
+ /**
2727
+ * One shared-quota rule. The dimension fields select which requests
2728
+ * the rule governs (an absent dimension matches every value); EVERY
2729
+ * matching rule must admit a request, and a grant consumes capacity
2730
+ * from each of them. The counters are rule-scoped: one rule matching
2731
+ * two models pools them under one cap; write one rule per model for
2732
+ * per-model buckets.
2733
+ */
2734
+ interface QuotaRule {
2735
+ /** Adapter id, as in `concurrency.perProvider` keys. */
2736
+ provider?: string;
2737
+ model?: string;
2738
+ tenant?: string;
2739
+ /** Wire attempts admitted per window; the exact, hard cap. */
2740
+ requestsPerMinute?: number;
2741
+ /**
2742
+ * Input plus output tokens admitted per window: estimated at
2743
+ * admission, reconciled to actual usage.
2744
+ */
2745
+ tokensPerMinute?: number;
2746
+ }
2747
+ /**
2748
+ * Validates a quota rule set as a typed ConfigError before any
2749
+ * limiter can admit under it: a non-array or empty set, a rule
2750
+ * without a cap, a malformed dimension, or a malformed cap all fail
2751
+ * loud at construction. Shared by every reference implementation.
2752
+ */
2753
+ declare function validateQuotaRules(rules: readonly QuotaRule[], site?: string): void;
2754
+ /** True when every dimension the rule pins matches the request. */
2755
+ declare function quotaRuleMatches(rule: QuotaRule, request: QuotaReservationRequest): boolean;
2756
+ /** The tokens a reservation is admitted under: input estimate plus the output cap. */
2757
+ declare function quotaEstimateTokens(request: QuotaReservationRequest): number;
2758
+ /** The tokens a settled attempt actually consumed. */
2759
+ declare function quotaActualTokens(usage: Usage): number;
2760
+ /** Current-window counters of one rule bucket. */
2761
+ interface QuotaCounters {
2762
+ requests: number;
2763
+ tokens: number;
2764
+ }
2765
+ /**
2766
+ * One rule's admission verdict against its current-window counters,
2767
+ * the pure decision both reference implementations share. A denial
2768
+ * carries the window remainder as retryAfterMs, except when the
2769
+ * estimate alone can never fit the token cap: that denial says
2770
+ * retryAfterMs 0 (retry immediately), so the caller's bounded
2771
+ * attempts exhaust without waiting and failover gets its chance.
2772
+ */
2773
+ declare function quotaRuleAdmission(rule: QuotaRule, counters: QuotaCounters, estimate: QuotaCounters, msUntilWindowEnd: number): {
2774
+ admit: true;
2775
+ } | {
2776
+ admit: false;
2777
+ retryAfterMs: number;
2778
+ reason: string;
2779
+ };
2780
+ /**
2781
+ * Folds one more failing rule into the decision the caller returns:
2782
+ * the wait is the LONGEST failing horizon (every matching rule must
2783
+ * admit), and the FIRST failing rule names the denial.
2784
+ */
2785
+ declare function mergeQuotaDenial(current: {
2786
+ retryAfterMs: number;
2787
+ reason: string;
2788
+ } | undefined, next: {
2789
+ retryAfterMs: number;
2790
+ reason: string;
2791
+ }): {
2792
+ retryAfterMs: number;
2793
+ reason: string;
2794
+ };
2795
+ /** One rule's live counters, exposed by `snapshot()` for telemetry. */
2796
+ interface QuotaWindowSnapshot {
2797
+ rule: QuotaRule;
2798
+ windowStart: number;
2799
+ requests: number;
2800
+ tokens: number;
2801
+ }
2802
+ /** The in-process reference QuotaLimiter returned by memoryQuotaLimiter. */
2803
+ interface MemoryQuotaLimiter extends QuotaLimiter {
2804
+ /** Current-window counters per rule; rolled-over windows read as zero. */
2805
+ snapshot(): QuotaWindowSnapshot[];
2806
+ }
2807
+ /**
2808
+ * The in-process reference QuotaLimiter: fixed epoch-aligned
2809
+ * one-minute windows over the shared rule model. Coordinates every
2810
+ * engine that shares THIS instance inside one process; processes
2811
+ * coordinate through a shared-storage implementation of the same SPI
2812
+ * (SqliteQuotaLimiter in @rulvar/store-sqlite) instead.
2813
+ */
2814
+ declare function memoryQuotaLimiter(rules: readonly QuotaRule[], options?: {
2815
+ now?: () => number;
2816
+ }): MemoryQuotaLimiter;
2817
+ /** createEngine quota config: the limiter plus its engine-scoped knobs. */
2818
+ interface EngineQuotaConfig {
2819
+ limiter: QuotaLimiter;
2820
+ /** Stamped on every reservation of this engine's runs. */
2821
+ tenant?: string;
2822
+ /**
2823
+ * What a limiter infrastructure FAILURE (reserve throwing) means:
2824
+ * 'deny' (default, fail closed) converts it into a retryable
2825
+ * transport-class denial; 'allow' logs a warning and dispatches
2826
+ * without a reservation. A limiter DENIAL is unaffected by this
2827
+ * knob. reconcile failures only ever warn.
2828
+ */
2829
+ onLimiterError?: "deny" | "allow";
2830
+ }
2831
+ /** The resolved engine-side quota runtime threaded into every run. */
2832
+ interface EngineQuotaRuntime {
2833
+ limiter: QuotaLimiter;
2834
+ tenant?: string;
2835
+ onLimiterError: "deny" | "allow";
2836
+ }
2837
+ /**
2838
+ * Validates createEngine's quota config as a typed ConfigError before
2839
+ * any run could dispatch under a malformed limiter (the intake
2840
+ * discipline every engine option follows).
2841
+ */
2842
+ declare function validateEngineQuotaConfig(config: EngineQuotaConfig | undefined, site?: string): void;
2843
+ //#endregion
2670
2844
  //#region src/model/floors.d.ts
2671
2845
  /** An explicit allowlist and denylist; deny wins over allow. */
2672
2846
  type ModelListConstraint = {
@@ -3033,6 +3207,10 @@ interface ExplorationSummary {
3033
3207
  deniedRepeats: number;
3034
3208
  /** Executions per tool name. */
3035
3209
  byTool: Record<string, number>;
3210
+ /** Calls denied by maxCallsPerTool; present when that limit is configured. */
3211
+ deniedToolCap?: number;
3212
+ /** Weighted tool units spent; present when toolUnits is configured. */
3213
+ toolUnitsUsed?: number;
3036
3214
  }
3037
3215
  /**
3038
3216
  * Agent lifecycle. One logical agent dispatch emits EXACTLY ONE
@@ -3407,6 +3585,45 @@ declare class NoProgressDetector {
3407
3585
  describe(): string;
3408
3586
  }
3409
3587
  //#endregion
3588
+ //#region src/tools/progress.d.ts
3589
+ /** The stock progress tool name the engine scans terminals for. */
3590
+ declare const PROGRESS_REPORT_TOOL_NAME = "report_progress";
3591
+ /**
3592
+ * One progress report: what the agent has established so far. Captured
3593
+ * as {@link AgentResult.partial} (normalized: absent arrays become
3594
+ * empty) when the invocation terminates with status 'limit'.
3595
+ */
3596
+ interface ProgressReport {
3597
+ /** New facts established, each a standalone claim line. */
3598
+ facts: string[];
3599
+ /** Evidence references backing the facts (file:line or recorded ids). */
3600
+ evidence: string[];
3601
+ /** Remaining unresolved questions. */
3602
+ questions: string[];
3603
+ /** Optional short status note. */
3604
+ note?: string;
3605
+ }
3606
+ /**
3607
+ * The stock progress-report tool. Stateless and deterministic: the
3608
+ * result echoes the counts, so a verbatim repeated report is a
3609
+ * duplicate result digest to the exploration guards. The value is the
3610
+ * side contract: the engine captures the LAST successful call of this
3611
+ * tool as the structured terminal partial of a 'limit' invocation, so
3612
+ * an agent that reports after every batch never loses its collected
3613
+ * work to a budget expiry.
3614
+ */
3615
+ declare function progressReportTool(): ToolDef;
3616
+ /**
3617
+ * The deterministic terminal scan: pairs `report_progress` tool calls
3618
+ * with their SUCCESSFUL results by id (a denied or failed call never
3619
+ * counts, mirroring the exploration guard's restore) and normalizes the
3620
+ * last one into a {@link ProgressReport}. Pure over the message window
3621
+ * it is given: the live loop hands its own history, the replay path
3622
+ * hands the terminal checkpoint's messages, and a compaction naturally
3623
+ * narrows the window to what the model itself still sees.
3624
+ */
3625
+ declare function latestProgressReport(messages: readonly Msg[]): ProgressReport | undefined;
3626
+ //#endregion
3410
3627
  //#region src/runtime/usage-limits.d.ts
3411
3628
  interface UsageLimits {
3412
3629
  /** Default 32. */
@@ -3449,6 +3666,29 @@ interface UsageLimits {
3449
3666
  * default.
3450
3667
  */
3451
3668
  maxNoNewEvidenceCalls?: number;
3669
+ /**
3670
+ * Per-tool execution caps by tool NAME (RV-210 close-out): the call
3671
+ * that would exceed its tool's cap is denied with a typed error tool
3672
+ * result instead of dispatched (visible to the model, never terminal),
3673
+ * and the denial does not consume maxToolCalls or tool units. A cap of
3674
+ * 0 bans the tool for the invocation; names absent from the record are
3675
+ * unlimited. Per layer the whole record replaces (no per-key merge),
3676
+ * like every other UsageLimits field.
3677
+ */
3678
+ maxCallsPerTool?: Record<string, number>;
3679
+ /**
3680
+ * The weighted tool budget (RV-210 close-out): every EXECUTED call of
3681
+ * tool T costs `costs[T] ?? 1` units (a cost of 0 makes bookkeeping
3682
+ * tools free), and once the spent units reach `max` the invocation
3683
+ * terminates as status 'limit' exactly like maxToolCalls (paid partial
3684
+ * work; executed results stand). Denied calls cost nothing. On resume
3685
+ * the spent units rebuild from the restored transcript's successful
3686
+ * executions, the same conservative window the exploration guards use.
3687
+ */
3688
+ toolUnits?: {
3689
+ max: number;
3690
+ costs?: Record<string, number>;
3691
+ };
3452
3692
  }
3453
3693
  declare const DEFAULT_MAX_TURNS = 32;
3454
3694
  declare const DEFAULT_STREAM_IDLE_TIMEOUT_MS = 12e4;
@@ -3464,6 +3704,11 @@ interface EffectiveUsageLimits {
3464
3704
  toolBudgetNotices?: boolean;
3465
3705
  maxRepeatedToolSignature?: number;
3466
3706
  maxNoNewEvidenceCalls?: number;
3707
+ maxCallsPerTool?: Record<string, number>;
3708
+ toolUnits?: {
3709
+ max: number;
3710
+ costs?: Record<string, number>;
3711
+ };
3467
3712
  }
3468
3713
  /**
3469
3714
  * Limits merge per spawn: AgentOpts.limits over profile limits over engine
@@ -3574,6 +3819,18 @@ interface AgentResult<T> {
3574
3819
  * transportRetries.
3575
3820
  */
3576
3821
  exploration?: ExplorationSummary;
3822
+ /**
3823
+ * The structured terminal partial (RV-210 close-out): the LAST
3824
+ * successful `report_progress` call of the invocation, present only on
3825
+ * a 'limit' terminal (cap expiry or an engine-decided abort) whose
3826
+ * transcript recorded at least one report. Derived deterministically
3827
+ * from the message window: live from the loop's own history (a final
3828
+ * boundary checkpoint is written so the window is durable), on replay
3829
+ * from the terminal checkpoint, so both read the same bytes. This is
3830
+ * what lets a caller salvage a limit child's collected work instead of
3831
+ * seeing a bare 'terminal status limit'.
3832
+ */
3833
+ partial?: ProgressReport;
3577
3834
  }
3578
3835
  type EscalatedResult<T> = AgentResult<T> & {
3579
3836
  status: "escalated";
@@ -3690,6 +3947,24 @@ interface RunAgentOptions<S extends SchemaSpec = JsonSchema> {
3690
3947
  * key's queue without a slot (v1.34.0 review P2-4).
3691
3948
  */
3692
3949
  providerSlot?: <T>(key: string, fn: () => Promise<T>, signal?: AbortSignal) => Promise<T>;
3950
+ /**
3951
+ * The shared quota limiter hook (RV-215): consulted before EVERY
3952
+ * live wire dispatch (initial attempts, transport retries, and
3953
+ * failover takeovers alike, in every phase). A denial becomes a
3954
+ * synthetic rate-limit-class WireError the retry and failover
3955
+ * engine treats exactly like a provider 429, except no wire call
3956
+ * was paid: retryAfterMs drives the interruptible backoff, attempts
3957
+ * stay bounded by RetryPolicy, and exhaustion fails over (the
3958
+ * takeover reserves under its own model). Granted reservations are
3959
+ * reconciled with the attempt's actual usage after the outcome
3960
+ * settles. Live-only by construction: replayed calls never reach
3961
+ * this seam, and nothing here is journaled.
3962
+ */
3963
+ quota?: {
3964
+ reserve: (request: QuotaReservationRequest) => Promise<QuotaDecision>;
3965
+ reconcile: (reservationId: string, usage: Usage) => Promise<void>; /** Limiter infrastructure failure policy; a denial is unaffected. */
3966
+ onLimiterError: "deny" | "allow";
3967
+ };
3693
3968
  /** The resolved toolset; absent = no tools declared. */
3694
3969
  tools?: ToolRuntime;
3695
3970
  /**
@@ -5118,6 +5393,18 @@ interface CreateEngineOptions {
5118
5393
  perRun?: number; /** Per-adapter-id caps; unlimited unless configured (Appendix A; M4-T07). */
5119
5394
  perProvider?: Record<string, number>;
5120
5395
  };
5396
+ /**
5397
+ * The shared quota limiter (RV-215): a QuotaLimiter implementation
5398
+ * consulted before every live wire dispatch of every run, plus the
5399
+ * engine's tenant dimension and the limiter failure policy. Engines
5400
+ * and processes that share one limiter (or one limiter storage,
5401
+ * e.g. SqliteQuotaLimiter in @rulvar/store-sqlite over one database
5402
+ * file) enforce one global quota; a denial rides the provider-429
5403
+ * retry and failover machinery without paying a wire call. Absent =
5404
+ * no shared quota (Appendix A: an embeddable library must not
5405
+ * surprise-throttle hosts).
5406
+ */
5407
+ quota?: EngineQuotaConfig;
5121
5408
  /** Versioned price table; wins over caps.pricing (M4-T06). */
5122
5409
  pricing?: PriceTable;
5123
5410
  /**
@@ -5519,8 +5806,10 @@ interface TaskDigest {
5519
5806
  * when the output IS a string, else its JCS-independent `JSON.stringify`)
5520
5807
  * for a settled ok child, or the child's `errorMessage` otherwise, so the
5521
5808
  * orchestrator can read WHY a child failed as readily as what it
5522
- * produced. Everything here is a pure read of already durable journal
5523
- * state, so a resume reproduces it with no new spend.
5809
+ * produced; a limit child carrying a structured terminal partial serves
5810
+ * `{ error, partial }` instead (RV-210 close-out), so the collected work
5811
+ * is pageable in full. Everything here is a pure read of already durable
5812
+ * journal state, so a resume reproduces it with no new spend.
5524
5813
  */
5525
5814
  interface ChildResultPage {
5526
5815
  handle: number;
@@ -5998,6 +6287,21 @@ interface OrchestrateAcceptance {
5998
6287
  childPolicy: "all-ok" | {
5999
6288
  minSuccessful: number;
6000
6289
  };
6290
+ /**
6291
+ * The partial-child salvage switch (RV-210 close-out; default false).
6292
+ * When true, a child that settled 'limit' WITH a structured terminal
6293
+ * partial (it recorded progress through the stock `report_progress`
6294
+ * tool before the budget expired) counts as a successful child for the
6295
+ * policy: under 'all-ok' it no longer rejects the run, and under
6296
+ * { minSuccessful: N } it counts toward N. The acceptance verdict then
6297
+ * reports completion 'partial' (never 'complete'), lists the salvaged
6298
+ * children in `salvagedPartialChildren` on the result envelope, and
6299
+ * keeps a per-child note in degradedReasons. A limit child WITHOUT a
6300
+ * partial gave the caller nothing to salvage and still counts against
6301
+ * the policy. The whole fold is journaled in the single acceptance
6302
+ * decision, so a resume rolls the same verdict forward.
6303
+ */
6304
+ acceptPartialChildren?: boolean;
6001
6305
  }
6002
6306
  /** How many rejected finishes are repaired by default: the plan's repair once. */
6003
6307
  declare const DEFAULT_FINISH_MAX_REPAIRS = 1;
@@ -6789,6 +7093,13 @@ interface RunInternals {
6789
7093
  };
6790
7094
  /** Engine-scoped per-provider keyed limiter (M4-T07). */
6791
7095
  providerLimiter?: KeyedLimiter;
7096
+ /**
7097
+ * The shared quota limiter runtime (RV-215): the configured
7098
+ * QuotaLimiter with the engine's tenant and failure policy
7099
+ * resolved. Threaded into every live wire dispatch of every run;
7100
+ * absent = no shared quota, byte-identical to before the feature.
7101
+ */
7102
+ quota?: EngineQuotaRuntime;
6792
7103
  /** The configured price table's version; pinned in decision entries (M4-T06). */
6793
7104
  pricingVersion?: string;
6794
7105
  /** budgetDefaults.flatReserveUsd; last resort of the reserve formula. */
@@ -7158,6 +7469,73 @@ interface RepositoryResearchToolset {
7158
7469
  }
7159
7470
  declare function repositoryResearchToolset(options: RepositoryResearchToolsetOptions): RepositoryResearchToolset;
7160
7471
  //#endregion
7472
+ //#region src/engine/profile-templates.d.ts
7473
+ /**
7474
+ * The research template's stop conditions: a weighted unit budget over
7475
+ * the research tools (bookkeeping tools are free), per-tool caps, both
7476
+ * repetition guards, and soft budget notices. Exported so hosts and
7477
+ * tests can read the exact defaults they are overriding.
7478
+ */
7479
+ declare const RESEARCH_PROFILE_LIMITS: UsageLimits;
7480
+ /** The implementation template's stop conditions. */
7481
+ declare const IMPLEMENTATION_PROFILE_LIMITS: UsageLimits;
7482
+ /** The review template's stop conditions. */
7483
+ declare const REVIEW_PROFILE_LIMITS: UsageLimits;
7484
+ /** Options shared by the implementation and review templates. */
7485
+ interface AgentProfileTemplateOptions {
7486
+ /** Advertised profile description; the template provides a default. */
7487
+ description?: string;
7488
+ /** Per-key overrides over the template's limits. */
7489
+ limits?: UsageLimits;
7490
+ /** The task tools; the stock report_progress tool is always prepended. */
7491
+ tools?: ToolDef[];
7492
+ }
7493
+ /** Options of {@link researchAgentProfile}: the toolset knobs plus template overrides. */
7494
+ interface ResearchAgentProfileOptions extends RepositoryResearchToolsetOptions {
7495
+ /** Advertised profile description; the template provides a default. */
7496
+ description?: string;
7497
+ /** Per-key overrides over {@link RESEARCH_PROFILE_LIMITS}. */
7498
+ limits?: UsageLimits;
7499
+ /** Extra tools appended after the research toolset. */
7500
+ extraTools?: ToolDef[];
7501
+ }
7502
+ /** What {@link researchAgentProfile} returns: the profile plus the evidence accessor. */
7503
+ interface ResearchAgentProfileResult {
7504
+ profile: AgentProfile;
7505
+ /**
7506
+ * The research kit's host-side evidence snapshot. One kit instance
7507
+ * backs the profile, so children spawned from the SAME registered
7508
+ * profile pool their verified evidence here (and see each other's
7509
+ * entries through list_evidence); construct one template per fan-out
7510
+ * run, or per child, when isolation matters.
7511
+ */
7512
+ evidence: () => ResearchEvidenceEntry[];
7513
+ }
7514
+ /**
7515
+ * The batteries-included research child: the confined
7516
+ * {@link repositoryResearchToolset} over `root`, the stock
7517
+ * report_progress tool, and {@link RESEARCH_PROFILE_LIMITS} as the stop
7518
+ * conditions. A child spawned from this profile that runs out of budget
7519
+ * settles 'limit' WITH its last progress report as the structured
7520
+ * partial, and the recorded evidence stays readable host-side through
7521
+ * `evidence()`.
7522
+ */
7523
+ declare function researchAgentProfile(options: ResearchAgentProfileOptions): ResearchAgentProfileResult;
7524
+ /**
7525
+ * The implementation child template: the caller's task tools plus the
7526
+ * progress contract, with {@link IMPLEMENTATION_PROFILE_LIMITS} as the
7527
+ * stop conditions (a no-progress detector instead of the research
7528
+ * no-new-evidence guard: implementation legitimately re-reads state).
7529
+ */
7530
+ declare function implementationAgentProfile(options?: AgentProfileTemplateOptions): AgentProfile;
7531
+ /**
7532
+ * The review child template: the caller's task tools plus the progress
7533
+ * contract, with {@link REVIEW_PROFILE_LIMITS} as the stop conditions
7534
+ * (a tighter turn budget and the no-new-evidence guard: a reviewer
7535
+ * circling over the same pages should stop, not spin).
7536
+ */
7537
+ declare function reviewAgentProfile(options?: AgentProfileTemplateOptions): AgentProfile;
7538
+ //#endregion
7161
7539
  //#region src/journal/scope.d.ts
7162
7540
  /**
7163
7541
  * Scope-path grammar (M1-T04): deterministic structural paths, independent
@@ -7924,4 +8302,4 @@ interface SandboxBridge {
7924
8302
  declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
7925
8303
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
7926
8304
  //#endregion
7927
- export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, 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, OrchestrateOptions, OrchestrateSynthesis, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, type PhaseRow, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, PricedUsage, type Pricing, type PricingTier, type ProviderAdapter, QualityFloors, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, 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, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, Semaphore, SerializationHook, Settled, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, StructuredOutputTier, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, 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, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readRunMeta, readTerminationInit, reconcileRunMeta, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
8305
+ export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, 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, OrchestrateOptions, OrchestrateSynthesis, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, type PhaseRow, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, Semaphore, SerializationHook, Settled, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, StructuredOutputTier, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, 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, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, identityJcs, implementationAgentProfile, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };