export interface GrantLabel {
    readonly project: string;
    readonly skill: string;
    readonly server: string;
}
export interface DeclarationIdentity {
    readonly sourcePath: string;
    readonly sourceKind: "sidecar" | "frontmatter";
    readonly projectRoot: string;
    readonly serverName: string;
    readonly raw: Readonly<Record<string, unknown>>;
    readonly cwdBase: string;
}
export interface Grant {
    readonly label: GrantLabel;
    readonly names: readonly string[];
}
export interface GrantSnapshot {
    readonly version: 1;
    readonly generation: number;
    readonly grants: Readonly<Record<string, Grant>>;
}
export interface GrantObservation {
    readonly snapshot: GrantSnapshot;
    readonly conservative: boolean;
}
export declare function resolveGrantsStorePath(configDir?: string): string;
export declare function read(path?: string): Promise<GrantSnapshot>;
export declare function declarationDigest(identity: unknown): string;
/** The grants lock was lost or reclaimed before the write committed; the write was skipped. */
export declare class GrantsLockLostError extends Error {
    readonly code = "ELOCKLOST";
    constructor(cause: Error);
}
export declare function addGrant(path: string, digest: string, label: GrantLabel, names: readonly string[]): Promise<GrantSnapshot>;
export declare function revoke(path: string, digest: string, names?: readonly string[]): Promise<GrantSnapshot>;
export declare function list(path?: string): Promise<readonly (Grant & {
    readonly digest: string;
})[]>;
export declare function observe(path: string, listener: (event: GrantObservation) => void): Promise<() => void>;
//# sourceMappingURL=env-grants-store.d.ts.map