Rulvar API reference / @rulvar/core / EngineDefaults
Interface: EngineDefaults
Defined in: packages/core/src/engine/engine.ts:131
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
billingReceipts? | "intent" | "async" | "awaited" | The receipt posture of the incremental billing seam (RV3405). RV2008 journals every ProviderCallRecord the moment its wire call settles, but the append is fire and forget: the loop never blocks its dispatch path on journal IO, so the receipt most likely to lose the race with a crash is exactly the wire being paid for at the moment of death. 'awaited' makes the loop await each receipt append before the turn proceeds (the RV601 intent before effect precedent), buying durable payment evidence for one journal IO await per wire call; a failed append still degrades loudly to the terminal lane (the RV2008 warning), never fails the run. Default 'async': byte identical to RV2008. 'intent' (RV4006, the fifth comparison experiment's P0.5) goes one step further: every dispatched wire attempt journals a provider-intent decision BEFORE the provider could bill (awaited, intent before effect, the executor ledger's own rule: a failed intent append refuses the dispatch), receipts are awaited as under 'awaited', and a resume that finds an intent with no receipt and no terminal coverage refuses the blind retry typed unless ResumeOptions.acknowledgeOpenWireIntents is passed, because the provider may have billed a wire this process never heard back from. The intent narrows the unknown-outcome window to the wire itself; dispatch stays at-least-once with attempt binding, and the invoice names every open intent in its openIntents lane. | packages/core/src/engine/engine.ts:213 |
cache? | CachePolicy | The engine-wide prompt-cache policy (RV2006). Absent means 'auto': the agent loop attaches CacheHint breakpoints (after tools, after system, and the sliding deepest message, TTL '5m') on every turn served by an adapter that declares ModelCaps.promptCaching 'explicit', and attaches nothing anywhere else, so wire traffic to every other adapter stays byte identical. { mode: 'off' } is the opt-out; AgentProfile.cache and the per-call opts override in that order. Transport-level cost optimization only: hints never enter identity, journals, or cassette keys. | packages/core/src/engine/engine.ts:187 |
countTokens? | "allow" | "deny" | The admission countTokens policy (RV1804). The pre-admission count probe carries the FULL child prompt to the provider: egress exactly like a dispatch, but billed to no invoice row. 'deny' forbids that control wire engine-wide: the flat reserve admits instead, exactly like an adapter without countTokens, and the refusal is visible as a control:wire event with outcome 'denied'. Default 'allow' (today's behavior); AgentProfile.countTokens overrides per profile. | packages/core/src/engine/engine.ts:163 |
gates? | Record<string, MechanicalGateProfile> | Registered mechanical gate profiles: named pure functions over AgentResult.artifacts for ladder acceptance gates (M7-T10). | packages/core/src/engine/engine.ts:144 |
isolation? | IsolationProvider | The worktree lifecycle provider. | packages/core/src/engine/engine.ts:149 |
limits? | UsageLimits | - | packages/core/src/engine/engine.ts:145 |
permissions? | PermissionConfig | Engine-wide permission chain layers. | packages/core/src/engine/engine.ts:147 |
profiles? | Record<string, AgentProfile> | - | packages/core/src/engine/engine.ts:133 |
requireToolsetAttestation? | boolean | The toolset attestation floor (RV4204, the sixth comparison experiment): with this set, a spawn that resolves a NON-EMPTY toolset must run under a profile whose toolsetAttestation pins it, or it refuses typed at spawn time, before any provider call. The pin already binds call-level tool overrides and registered names for attested profiles (RV1514); what it could not bind was a spawn riding a profile that declared no tools and no pin, with the tools arriving per call. Off by default: every existing config keeps its bytes. compileRegulatedProfile arms it. | packages/core/src/engine/engine.ts:175 |
retry? | RetryPolicy | Engine-wide transport RetryPolicy (M4-T05). | packages/core/src/engine/engine.ts:151 |
roleFloors? | QualityFloors | Hard per-role model constraints (M4-T09). | packages/core/src/engine/engine.ts:153 |
routing? | Partial<Record<InvocationRole, ModelSpec>> | - | packages/core/src/engine/engine.ts:132 |
schemas? | Record<string, SchemaSpec> | Registered SchemaSpec names for outputSchemaRef (M7-T05). | packages/core/src/engine/engine.ts:137 |
toolsets? | Record<string, ToolsOption> | Registered tool profile names for toolsetRef (M7-T05). | packages/core/src/engine/engine.ts:139 |
workflows? | WorkflowRegistry | The workflow registry for shells and by-name resolution (10.4). | packages/core/src/engine/engine.ts:135 |