import type { AccessLevel, AppAccess } from "../app-access.js"; import type { AppId } from "../ids.js"; import type { ConformanceSuite } from "./index.js"; /** * Build contract §9.2–§9.4 — the executable definition of `can()`. * * There are two implementations of this seam: `appAccess(store)` in * @vendoai/vendo/store, and the stand-in @vendoai/vendo/apps' own tests run against a * memory store (the runtime cannot import the store — `apps → core` is the only * edge layering allows it). Two implementations of one rule is exactly how a * permission check rots: mutate the real `can()` to `return true` and the * stand-in's suite stays green. * * So the RULE lives here, once, and both implementations mount it. A case that * fails is a divergence, whichever side moved. */ export interface AppAccessConformanceOptions { /** The implementation under test, over whatever store the caller wired. */ access: AppAccess; /** Put an app row whose subject is `subject` (a person, or an org id). */ seedApp(appId: AppId, subject: string): Promise; /** Put a grant row directly, WITHOUT the owner gate — these cases set the world up; the gate itself is asserted through `access.grant`. */ seedGrant(appId: AppId, principal: string, level: AccessLevel): Promise; } export declare function appAccessConformance(options: AppAccessConformanceOptions): ConformanceSuite;