import { type Capability } from "../host/host.js"; import type { CapabilityLogEntry } from "../runtime/capabilityLog.js"; /** The capabilities the check covers: every one in `CAPABILITIES` that is * not left out above, so a new capability is checked unless someone * decides otherwise. */ export declare const CHECKED_CAPABILITIES: Capability[]; /** What the log says about one test case. Each entry of `uncovered` is a * host use no running function's tag covers: the host function, the * capability, and the innermost function that was running. `outside` is * a host use made while no function was running: the runtime's own work * after a node returned (a memory frame being saved), or top-level code. * No tag can cover those, so they are notes and do not fail the case. */ export type CapabilityCheckResult = { uncovered: string[]; outside: string[]; }; /** * Replay the log. `enter` pushes a frame and `exit` pops the innermost * frame with that name; a `use` is covered when any frame on the stack * declares its capability. * * Concurrent branches interleave their lines, so the stack is really the * set of every in-flight function across branches, and a use is covered if * any of them declares the capability. The errors this produces are false * passes: a wrong tag can hide behind a concurrent function with the right * one, so a green run does not prove the tags complete. */ export declare function checkCapabilityLog(entries: CapabilityLogEntry[]): CapabilityCheckResult;