Rulvar API reference / @rulvar/rulvar / RunInternals
Interface: RunInternals
Defined in: packages/core/dist/index.d.ts
Everything one run's ctx needs; created per run by the engine (M1-T11).
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
adapters | ReadonlyMap<string, ProviderAdapter> | - | packages/core/dist/index.d.ts |
admission? | AdmissionController | The single admission point for all spawns (M6-T06). | packages/core/dist/index.d.ts |
budget | RunBudget | - | packages/core/dist/index.d.ts |
claimedLineageDecisions? | Set<number> | Seqs of spawn-admission decisions already paired with a live ctx.agent dispatch this process lifetime, so byte-identical repeats recover THEIR OWN decisions in journal order (DEF-3; M7-T02). | packages/core/dist/index.d.ts |
cost | CostAttribution | - | packages/core/dist/index.d.ts |
defaults | { billingReceipts?: "intent" | "async" | "awaited"; cache?: CachePolicy; countTokens?: "allow" | "deny"; gates?: Record<string, MechanicalGateProfile>; limits?: UsageLimits; permissions?: PermissionConfig; profiles?: Record<string, AgentProfile>; requireToolsetAttestation?: boolean; retry?: RetryPolicy; routing?: Partial<Record<InvocationRole, ModelSpec>>; schemas?: Record<string, SchemaSpec<unknown>>; toolsets?: Record<string, ToolsOption>; workflows?: Record<string, unknown>; } | - | packages/core/dist/index.d.ts |
defaults.billingReceipts? | "intent" | "async" | "awaited" | - | packages/core/dist/index.d.ts |
defaults.cache? | CachePolicy | - | packages/core/dist/index.d.ts |
defaults.countTokens? | "allow" | "deny" | - | packages/core/dist/index.d.ts |
defaults.gates? | Record<string, MechanicalGateProfile> | - | packages/core/dist/index.d.ts |
defaults.limits? | UsageLimits | - | packages/core/dist/index.d.ts |
defaults.permissions? | PermissionConfig | - | packages/core/dist/index.d.ts |
defaults.profiles? | Record<string, AgentProfile> | - | packages/core/dist/index.d.ts |
defaults.requireToolsetAttestation? | boolean | - | packages/core/dist/index.d.ts |
defaults.retry? | RetryPolicy | - | packages/core/dist/index.d.ts |
defaults.routing? | Partial<Record<InvocationRole, ModelSpec>> | - | packages/core/dist/index.d.ts |
defaults.schemas? | Record<string, SchemaSpec<unknown>> | - | packages/core/dist/index.d.ts |
defaults.toolsets? | Record<string, ToolsOption> | - | packages/core/dist/index.d.ts |
defaults.workflows? | Record<string, unknown> | - | packages/core/dist/index.d.ts |
dropped | DroppedItem[] | - | packages/core/dist/index.d.ts |
errorPolicy | ErrorPolicy | - | packages/core/dist/index.d.ts |
events | RunEventSink | - | packages/core/dist/index.d.ts |
execKey? | ExecKeyDerivation | Which exec idempotency key derivation this run's isolated dispatches use (RV403), resolved at engine boot from RunMeta.execKeyDerivation: version 2 carries the run's generation token to scope keys to the incarnation; absent behaves as version 1 (the genesis-free derivation of runs recorded before the stamp shipped). | packages/core/dist/index.d.ts |
executionScope? | { account?: string; legalDomain?: string; project?: string; providerAccount?: string; region?: string; sponsor?: string; tenant?: string; } | The run's recorded execution scope (RV4205): the normalized copy genesis records, threaded so the quota completion can read the scope's tenant under tenantFrom: 'scope' and stamp the scope dimensions onto reservations for dimension-matched rules. Structural (not the engine's ExecutionScope named type) because ctx deliberately imports nothing from engine.ts. | packages/core/dist/index.d.ts |
executionScope.account? | string | - | packages/core/dist/index.d.ts |
executionScope.legalDomain? | string | - | packages/core/dist/index.d.ts |
executionScope.project? | string | - | packages/core/dist/index.d.ts |
executionScope.providerAccount? | string | - | packages/core/dist/index.d.ts |
executionScope.region? | string | - | packages/core/dist/index.d.ts |
executionScope.sponsor? | string | - | packages/core/dist/index.d.ts |
executionScope.tenant? | string | - | packages/core/dist/index.d.ts |
executors? | Partial<Record<IsolatedExecutorTag, ToolExecutorProvider>> | Isolated tool executors (RV-216): the ToolExecutorProvider registry from createEngine, keyed by non-inprocess executor tag. A tool declaring such a tag dispatches through the matching provider instead of running its inprocess closure; absent means only inprocess tools are accepted. | packages/core/dist/index.d.ts |
external? | ExternalRegistry | Open external suspensions plus the quiescence activity counter (M2-T08). | packages/core/dist/index.d.ts |
flatReserveUsd? | number | budgetDefaults.flatReserveUsd; last resort of the reserve formula. | packages/core/dist/index.d.ts |
floors? | QualityFloors | Hard router constraints from engine config (M4-T09). | packages/core/dist/index.d.ts |
isolation? | IsolationProvider | The worktree lifecycle provider. | packages/core/dist/index.d.ts |
knowledge? | ModelKnowledgeHandle | The ModelKnowledge runtime handle (M10-T03): current() only, commit physically absent. Present only when the engine was given stores.modelKnowledge; absent means the feature is off and no kb entries are ever written. | packages/core/dist/index.d.ts |
lease? | Lease | Queue mode: the segment's lease, threaded into EVERY transcript blob write of the segment (checkpoints, compaction summaries, worktree patches) exactly as the Replayer threads it into every journal append, so a store declaring fencedWrites refuses a superseded segment's blob overwrites (fenced run state RFC, F2). The engine binds this as a live getter over its segment-lease holder (P0.2), so the union with undefined is explicit: before the ownership boot (and on non-leasable stores) it reads undefined. | packages/core/dist/index.d.ts |
liveAgentCalls | Set<Promise<unknown>> | Every live agent invocation of this run, registered by the ctx wrapper the moment agentImpl is entered and removed when it settles (terminal append included), so the engine's settle drain (RV1904) can await the stragglers a workflow body returned over. The four-role benchmark's recovery run kept appending child terminals after run_settle; orchestrations barrier their own roster (RV1903), and this registry closes the same hole for plain workflows with un-awaited ctx.agent calls. | packages/core/dist/index.d.ts |
mintTranscriptRef | () => string | - | packages/core/dist/index.d.ts |
now | () => number | - | packages/core/dist/index.d.ts |
onEscalation? | (result) => | EscalationDecision | Promise<EscalationDecision> | The InProcessRunner escalation hook: receives escalated results when the call form cannot carry them; its decision is journaled as the authoritative escalation-decision entry. | packages/core/dist/index.d.ts |
priceUsd | (servedBy, usage) => number | undefined | - | packages/core/dist/index.d.ts |
pricingOf? | (servedBy) => Pricing | undefined | Raw price-row resolution (table wins, caps fallback); undefined = unpriced. | packages/core/dist/index.d.ts |
pricingVersion? | string | The configured price table's version; pinned in decision entries (M4-T06). | packages/core/dist/index.d.ts |
providerLimiter? | KeyedLimiter | Engine-scoped per-provider keyed limiter (M4-T07). | packages/core/dist/index.d.ts |
quota? | EngineQuotaRuntime | The shared quota limiter runtime (RV-215): the configured QuotaLimiter with the engine's tenant and failure policy resolved. Threaded into every live wire dispatch of every run; absent = no shared quota, byte-identical to before the feature. | packages/core/dist/index.d.ts |
replayer | Replayer | - | packages/core/dist/index.d.ts |
rootSpanId | string | The run root span; every top-level span parents on it. | packages/core/dist/index.d.ts |
runId | string | - | packages/core/dist/index.d.ts |
runSignal? | AbortSignal | - | packages/core/dist/index.d.ts |
semaphore | Semaphore | - | packages/core/dist/index.d.ts |
spans | SpanMinter | - | packages/core/dist/index.d.ts |
telemetry? | { quotaDeniedAgentError?: boolean; } | Telemetry compat posture (RV1810). | packages/core/dist/index.d.ts |
telemetry.quotaDeniedAgentError? | boolean | Emit the legacy agent:error twin beside quota:denied. | packages/core/dist/index.d.ts |
transcripts | TranscriptStore | - | packages/core/dist/index.d.ts |