import { z } from 'zod';
/**
 * Hook rule schemas for the bot-pack wiring engine (ADR-104).
 *
 * Two surfaces:
 * - `HooksYamlSchema` describes a pack's `hooks.yaml` (authoring surface).
 * - `CompiledHooksManifestSchema` describes `.totem/compiled-hooks.json`
 *   (runtime surface produced by `totem sync` from installed packs).
 *
 * The compiled manifest carries the staleness metadata required by
 * ADR-104 § Decision 3: schemaVersion + compiledAt + sourcePackVersions.
 */
declare const HookCheckTypeSchema: z.ZodEnum<["reject-if-match", "reject-if-no-match"]>;
export type HookCheckType = z.infer<typeof HookCheckTypeSchema>;
/**
 * Authoring-surface schema for a single hook rule in a pack's `hooks.yaml`.
 *
 * The optional `recoveryHint` field (ADR-104 § Decision 1) gives agents the
 * WHAT-INSTEAD on a block — recommended but not required in V1. Adoption
 * tracked toward a V2 upgrade-to-required trigger (>80% of published rules
 * carry it, OR an empirically-observed retry-loop incident).
 *
 * The `verification_shadow` field is reserved for the Spine Rule
 * classification path (ADR-104 § Convergence + Q1 binding). In V1 the engine
 * MUST warn-and-ignore any verification_shadow on a hook rule (hooks are
 * Interpretive Rule class — no formal verification obligation). Schema
 * accepts it permissively so future Spine-Rule promotion does not require
 * a schema break.
 */
export declare const HookRuleSchema: z.ZodObject<{
    id: z.ZodString;
    trigger: z.ZodObject<{
        tool: z.ZodString;
        pattern: z.ZodEffects<z.ZodString, string, string>;
    }, "strip", z.ZodTypeAny, {
        tool: string;
        pattern: string;
    }, {
        tool: string;
        pattern: string;
    }>;
    check: z.ZodObject<{
        pattern: z.ZodEffects<z.ZodString, string, string>;
        type: z.ZodEnum<["reject-if-match", "reject-if-no-match"]>;
    }, "strip", z.ZodTypeAny, {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    }, {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    }>;
    message: z.ZodString;
    recoveryHint: z.ZodOptional<z.ZodString>;
    verification_shadow: z.ZodOptional<z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
    check: {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    };
    message: string;
    id: string;
    trigger: {
        tool: string;
        pattern: string;
    };
    recoveryHint?: string | undefined;
    verification_shadow?: unknown;
}, {
    check: {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    };
    message: string;
    id: string;
    trigger: {
        tool: string;
        pattern: string;
    };
    recoveryHint?: string | undefined;
    verification_shadow?: unknown;
}>;
export type HookRule = z.infer<typeof HookRuleSchema>;
export declare const HOOKS_YAML_SCHEMA_VERSION: 1;
/**
 * Per-pack `hooks.yaml` file shape. The `version` field is the contract
 * for forward-compat: when `totem sync` parses an unknown version (higher
 * than the runner supports), it warns-and-skips that pack entirely
 * (ADR-104 § Decision 4).
 */
export declare const HooksYamlSchema: z.ZodEffects<z.ZodObject<{
    version: z.ZodNumber;
    hooks: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        trigger: z.ZodObject<{
            tool: z.ZodString;
            pattern: z.ZodEffects<z.ZodString, string, string>;
        }, "strip", z.ZodTypeAny, {
            tool: string;
            pattern: string;
        }, {
            tool: string;
            pattern: string;
        }>;
        check: z.ZodObject<{
            pattern: z.ZodEffects<z.ZodString, string, string>;
            type: z.ZodEnum<["reject-if-match", "reject-if-no-match"]>;
        }, "strip", z.ZodTypeAny, {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        }, {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        }>;
        message: z.ZodString;
        recoveryHint: z.ZodOptional<z.ZodString>;
        verification_shadow: z.ZodOptional<z.ZodUnknown>;
    }, "strip", z.ZodTypeAny, {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }, {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    version: number;
}, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    version: number;
}>, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    version: number;
}, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    version: number;
}>;
export type HooksYaml = z.infer<typeof HooksYamlSchema>;
export declare const COMPILED_HOOKS_SCHEMA_VERSION: 1;
/**
 * A compiled hook rule carries provenance (`packId`) so rejection messages
 * can name `<packId>/<ruleId>` (ADR-104 § Decision 1) and so staleness
 * checks can scope per-pack.
 */
export declare const CompiledHookRuleSchema: z.ZodObject<{
    id: z.ZodString;
    trigger: z.ZodObject<{
        tool: z.ZodString;
        pattern: z.ZodEffects<z.ZodString, string, string>;
    }, "strip", z.ZodTypeAny, {
        tool: string;
        pattern: string;
    }, {
        tool: string;
        pattern: string;
    }>;
    check: z.ZodObject<{
        pattern: z.ZodEffects<z.ZodString, string, string>;
        type: z.ZodEnum<["reject-if-match", "reject-if-no-match"]>;
    }, "strip", z.ZodTypeAny, {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    }, {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    }>;
    message: z.ZodString;
    recoveryHint: z.ZodOptional<z.ZodString>;
    verification_shadow: z.ZodOptional<z.ZodUnknown>;
} & {
    packId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    check: {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    };
    message: string;
    id: string;
    trigger: {
        tool: string;
        pattern: string;
    };
    packId: string;
    recoveryHint?: string | undefined;
    verification_shadow?: unknown;
}, {
    check: {
        type: "reject-if-match" | "reject-if-no-match";
        pattern: string;
    };
    message: string;
    id: string;
    trigger: {
        tool: string;
        pattern: string;
    };
    packId: string;
    recoveryHint?: string | undefined;
    verification_shadow?: unknown;
}>;
export type CompiledHookRule = z.infer<typeof CompiledHookRuleSchema>;
/**
 * Runtime-surface manifest produced by `totem sync` and read on every
 * `totem hook run` invocation. The metadata fields are load-bearing for
 * ADR-104 § Decision 3 (staleness detection):
 *
 * - `schemaVersion`: bumps on breaking structural change to this manifest
 * - `compiledAt`: ISO 8601 timestamp of last compile
 * - `sourcePackVersions`: pack name → version at compile time; compared
 *   against package.json resolutions to emit `[totem:hook-stale]` warnings
 *   when packs have updated since last compile
 */
export declare const CompiledHooksManifestSchema: z.ZodObject<{
    schemaVersion: z.ZodLiteral<1>;
    compiledAt: z.ZodString;
    sourcePackVersions: z.ZodRecord<z.ZodString, z.ZodString>;
    hooks: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        trigger: z.ZodObject<{
            tool: z.ZodString;
            pattern: z.ZodEffects<z.ZodString, string, string>;
        }, "strip", z.ZodTypeAny, {
            tool: string;
            pattern: string;
        }, {
            tool: string;
            pattern: string;
        }>;
        check: z.ZodObject<{
            pattern: z.ZodEffects<z.ZodString, string, string>;
            type: z.ZodEnum<["reject-if-match", "reject-if-no-match"]>;
        }, "strip", z.ZodTypeAny, {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        }, {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        }>;
        message: z.ZodString;
        recoveryHint: z.ZodOptional<z.ZodString>;
        verification_shadow: z.ZodOptional<z.ZodUnknown>;
    } & {
        packId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        packId: string;
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }, {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        packId: string;
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        packId: string;
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    compiledAt: string;
    schemaVersion: 1;
    sourcePackVersions: Record<string, string>;
}, {
    hooks: {
        check: {
            type: "reject-if-match" | "reject-if-no-match";
            pattern: string;
        };
        message: string;
        id: string;
        trigger: {
            tool: string;
            pattern: string;
        };
        packId: string;
        recoveryHint?: string | undefined;
        verification_shadow?: unknown;
    }[];
    compiledAt: string;
    schemaVersion: 1;
    sourcePackVersions: Record<string, string>;
}>;
export type CompiledHooksManifest = z.infer<typeof CompiledHooksManifestSchema>;
export {};
//# sourceMappingURL=schema.d.ts.map