import { Decision, PolicyLayer, Requirement, Target, Verb } from "./PolicyTypes.js"; /** True once an application has installed a policy. Until then, everything is allowed. */ export declare function isPolicyInstalled(): boolean; /** * Installs the process policy. Call once, from the application that owns the entry * point — never from a library. * * Layers are supplied in priority order (highest first). */ export declare function installPolicy(orderedLayers: readonly PolicyLayer[]): void; /** Removes the policy, returning to the permissive default. Test seam. */ export declare function resetPolicyForTests(): void; /** The layers currently installed, highest priority first. Diagnostics and `nex policy status`. */ export declare function currentLayers(): readonly PolicyLayer[]; /** * Decides whether an operation may proceed. * * Only `target: "instance"` is gated. A local file write or a session-preference change * is not what this exists to prevent, and refusing them would produce false refusals on * operations that never touch instance data (`script-sync pull` being the clearest). */ export declare function checkRequirement(requirement: Requirement): Decision; export declare function setRemediationWriter(writer: (verbs: readonly Verb[], missing: Verb, layer: string) => string): void; /** * A layer that denies the listed verbs outright. * * Placed at the top of the ladder so nothing below can grant past it. This is the layer * that makes pointing the tool at production meaningful. * * The guarantee has a precise limit, and the docs must state it: this only holds when * the variable is set somewhere the agent cannot write — a shell profile, a systemd * unit, a container environment. A project-local `.mcp.json` is a file in the workspace, * and an agent with file-write access can edit it. */ export declare function denyLayer(name: string, denied: readonly Verb[]): PolicyLayer; /** A layer that grants the listed verbs and abstains on the rest. */ export declare function grantLayer(name: string, granted: readonly Verb[]): PolicyLayer; /** Convenience for tests and for embedders that want the old unrestricted behaviour. */ export declare function allowAllLayer(): PolicyLayer; export type { Decision, PolicyLayer, Requirement, Target, Verb };