export declare function isPluginInstalledButNotLoaded(env?: NodeJS.ProcessEnv): boolean; export declare const SKILL_NOT_LOADED_MESSAGE: string; export type SkillGuardState = "ok" | "not_loaded" | "not_invoked"; /** * Stamp the session attestation marker (`plugin status --skill-ack`). * * Lives here, in the same artifact as the gate, and is called BEFORE any * delegation to scripts/plugin-status.mjs: if stamping depended on that second * file, a package missing it could arm the gate with no way to clear it. * * Fail-open: the marker is attempted in the primary dir, then a tmpdir fallback * (see ackMarkerDirs), and success in EITHER opens the gate - so a primary-dir * write failure no longer strands a guided session. Returns false ONLY when no * location was writable at all (a broken filesystem). The caller surfaces that, * but even then the block messages carry an "already invoked -> do not retry" * escape, so there is no infinite loop. */ export declare function stampSkillAck(env?: NodeJS.ProcessEnv): boolean; export declare const ATTESTATION_WRITE_FAILED_MESSAGE: string; export declare function skillGuardState(env?: NodeJS.ProcessEnv): SkillGuardState; /** `commandPath` is space-joined, e.g. "kb create metric" or "ds refresh-history". */ export declare function isMutationCommand(commandPath: string): boolean; export declare function usesGovernanceAttestation(options: Record | undefined): boolean; export declare const SKILL_NOT_INVOKED_MESSAGE: string; export declare const MUTATION_BLOCKED_MESSAGE: string; export declare const ATTESTATION_BLOCKED_MESSAGE: string; /** * Print the state-appropriate loud warning to stderr (decoration channel). * Supersedes printSkillNotLoadedWarning as the preflight entry point. */ export declare function printSkillGuardWarning(env?: NodeJS.ProcessEnv): void; /** * The block decision for one parsed command. Returns the message to print, or * null to allow. `options` is the leaf command's parsed opts (commander camelCase). */ export declare function gateBlockMessage(commandPath: string, options?: Record | undefined, env?: NodeJS.ProcessEnv): string | null; /** Print the block message and exit non-zero, or return (allow). */ export declare function enforceSkillGate(commandPath: string, options?: Record | undefined, env?: NodeJS.ProcessEnv): void; /** * True when `commandPath` must not run in this session (mutation without the * skill in context). Kept for callers that only care about the mutation class. */ export declare function shouldBlockMutation(commandPath: string, env?: NodeJS.ProcessEnv): boolean;