Skip to content

Rulvar API reference


Rulvar API reference / @rulvar/rulvar / EvidenceContract

Interface: EvidenceContract

Defined in: packages/core/dist/index.d.ts

A declared evidence floor (RV303): preflight judges tool caps against it, and under enforce: 'refuse' the runtime refuses an ok settle below it (RV507); see AgentProfile.evidenceContract.

Properties

PropertyTypeDescriptionDefined in
calibration?{ callsPerEntry: number; source?: string; }A journal observed prior for the per-entry call estimate (RV3309): the figure toolCalibrationFromJournal folds from a prior run of the same profile (aggregate or a p90 over several), fractional on purpose. Preflight uses the HIGHER of the declared estimate and this prior when it computes the evidence call floor, never the lower, so a stale generous declaration still holds and an optimistic one stops hiding the observed reality: the 2026-08-12 comparison run observed 4.211 calls per entry where the default estimate says 3. When the prior raises the floor, preflight names it in an evidence-estimate-below-observed finding beside the usual floor arithmetic. source is echoed in that finding so a reader knows which journal spoke.packages/core/dist/index.d.ts
calibration.callsPerEntrynumber-packages/core/dist/index.d.ts
calibration.source?string-packages/core/dist/index.d.ts
enforce?"warn" | "refuse"What the floor does at the child's terminal settle (RV507). The default 'warn' keeps the historical behavior: the contract is a preflight signal only. 'refuse' turns an ok finish whose message window carries fewer successful record_evidence executions (result recorded: true; duplicates and verification errors never count) than minEntries into a typed error terminal (kind 'terminal') whose journaled error data carries the machine-readable evidenceFloor: { recordedEntries, minEntries }; the outcome is memoized, so a resume rolls the refusal forward instead of re-paying the invocation. Non-ok terminals are never re-judged.packages/core/dist/index.d.ts
estCallsPerEntry?numberEstimated executed calls per recorded entry; default 3.packages/core/dist/index.d.ts
minEntriesnumberEvidence entries the task must record; positive integer.packages/core/dist/index.d.ts
overheadCalls?numberEstimated non-evidence overhead calls; default 8.packages/core/dist/index.d.ts