/**
 * `when_to_load` matcher evaluator.
 *
 * Skills declare load conditions as a list of matchers. The runtime walks the
 * list per Event and asks: "does this skill want to activate now?" Matchers
 * are pure predicates (no I/O, no side effects) so the evaluator can run on
 * every PreToolUse / UserPromptSubmit / Stop / SessionEnd hook without
 * starving the agent budget.
 *
 * Authoritative source: `docs/opensquid-real-design.md` §"Skill format" +
 * §"Skill properties" + spec `docs/tasks/phase-3-dynamic-loading.md` task 3.1.
 *
 * Four matcher kinds (discriminated on `kind`):
 *
 *   tool_match       — exact tool name match on a `tool_call` event.
 *   command_pattern  — regex against `tool_call.args.command` (Bash flavor).
 *   file_glob        — minimatch glob against a file-path field on `tool_call`.
 *   event_type       — match the event's own `kind` literal.
 *
 * Semantics are OR: a non-empty matcher list activates the skill if ANY
 * matcher hits. An empty list never activates (a skill with empty
 * `when_to_load` is either `load: preload` or intentionally inert).
 *
 * Shorthand surface — pack authors write the common case as a single-key
 * object:
 *
 *   when_to_load:
 *     - tool_match: Bash             # canonical: { kind: tool_match, tool: Bash }
 *     - command_pattern: '^git'      # canonical: { kind: command_pattern, pattern: '^git' }
 *     - file_glob: 'src/**\/*.ts'    # canonical: { kind: file_glob, glob: 'src/**\/*.ts' }
 *     - event_type: prompt_submit    # canonical: { kind: event_type, type: prompt_submit }
 *
 * `normalizeMatcher` accepts either form. `Matcher` (the Zod schema) only
 * accepts the canonical (discriminated) form so that everything past the YAML
 * boundary is type-safe.
 *
 * File-glob field precedence on `tool_call` events: `file_path` → `path` →
 * `notebook_path`. Multiple host conventions, picked in this order because
 * Claude Code's Read/Edit/Write surface `file_path`, generic FS tools surface
 * `path`, and notebook editors surface `notebook_path`. The first non-empty
 * string wins.
 *
 * Imports from: zod, minimatch, ./types.
 * Imported by: src/packs/schemas/skill.ts, src/runtime/index.ts.
 */
import { z } from 'zod';
import { type Event } from './types.js';
export declare const MatcherCanonical: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"tool_match">;
    tool: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "tool_match";
    tool: string;
}, {
    kind: "tool_match";
    tool: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"command_pattern">;
    pattern: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "command_pattern";
    pattern: string;
}, {
    kind: "command_pattern";
    pattern: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"file_glob">;
    glob: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "file_glob";
    glob: string;
}, {
    kind: "file_glob";
    glob: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"event_type">;
    type: z.ZodEnum<["tool_call", "post_tool_call", "prompt_submit", "session_end", "stop", "session_start", "schedule", "webhook", "inbound_channel", "file_changed"]>;
}, "strip", z.ZodTypeAny, {
    kind: "event_type";
    type: "tool_call" | "post_tool_call" | "prompt_submit" | "session_end" | "stop" | "session_start" | "schedule" | "webhook" | "inbound_channel" | "file_changed";
}, {
    kind: "event_type";
    type: "tool_call" | "post_tool_call" | "prompt_submit" | "session_end" | "stop" | "session_start" | "schedule" | "webhook" | "inbound_channel" | "file_changed";
}>]>;
export type Matcher = z.infer<typeof MatcherCanonical>;
export declare function normalizeMatcher(raw: unknown): unknown;
export declare const Matcher: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"tool_match">;
    tool: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "tool_match";
    tool: string;
}, {
    kind: "tool_match";
    tool: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"command_pattern">;
    pattern: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "command_pattern";
    pattern: string;
}, {
    kind: "command_pattern";
    pattern: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"file_glob">;
    glob: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "file_glob";
    glob: string;
}, {
    kind: "file_glob";
    glob: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"event_type">;
    type: z.ZodEnum<["tool_call", "post_tool_call", "prompt_submit", "session_end", "stop", "session_start", "schedule", "webhook", "inbound_channel", "file_changed"]>;
}, "strip", z.ZodTypeAny, {
    kind: "event_type";
    type: "tool_call" | "post_tool_call" | "prompt_submit" | "session_end" | "stop" | "session_start" | "schedule" | "webhook" | "inbound_channel" | "file_changed";
}, {
    kind: "event_type";
    type: "tool_call" | "post_tool_call" | "prompt_submit" | "session_end" | "stop" | "session_start" | "schedule" | "webhook" | "inbound_channel" | "file_changed";
}>]>, {
    kind: "tool_match";
    tool: string;
} | {
    kind: "command_pattern";
    pattern: string;
} | {
    kind: "file_glob";
    glob: string;
} | {
    kind: "event_type";
    type: "tool_call" | "post_tool_call" | "prompt_submit" | "session_end" | "stop" | "session_start" | "schedule" | "webhook" | "inbound_channel" | "file_changed";
}, unknown>;
/** Test-only: drop the regex cache so per-test mutations don't leak. */
export declare function clearRegexCache(): void;
export declare function matchesEvent(matchers: readonly Matcher[], event: Event): boolean;
//# sourceMappingURL=load_matchers.d.ts.map