/**
 * Core runtime types for the opensquid substrate.
 *
 * Every type is paired with a Zod schema and a `z.infer` line so that TS and
 * runtime validation never drift apart. Schemas validate untrusted input
 * (event payloads from hosts, pack YAML, RAG payloads); inferred types flow
 * through the rest of the runtime as compile-time guarantees.
 *
 * Type → source-of-truth in `docs/opensquid-real-design.md`:
 *
 *   Event       — §"The architecture in six concepts" (concept 1)
 *                 eight kinds: tool_call | prompt_submit | session_end | stop
 *                 | schedule | webhook | inbound_channel | file_changed
 *                 (AUTO.1 widened the union from 4 → 8 to back the four
 *                 non-tool-call triggers: scheduler ticks, webhook intakes,
 *                 inbound channel messages, and file-change watchers.)
 *   Verdict     — §"Anti-drift split" (rule output)
 *                 level: pass | block | warn | surface
 *   ProcessStep — §"Skill format" (rules are processes, not typed checks)
 *   Rule        — §"The architecture in six concepts" (concept 3)
 *                 kind: track_check (deterministic) | destination_check (LLM-judged)
 *   Skill       — §"Skill format" + §"Skill properties"
 *                 load mode + when_to_load + unloads_when + rules + prose
 *   Pack        — §"Pack format" + §"Manifest fields"
 *                 name / version / scope / goal required; rest defaulted
 *   RuleResult  — TS-only union (never crosses a process boundary, so no schema)
 *
 * Looseness is deliberate at `ProcessStep.args` and `ToolCallEvent.args`:
 * tightening means migrating every primitive. The task spec calls this out
 * (Task 1.1 risk callout). Per-function refinement lands in Task 1.2.
 */
import { z } from 'zod';
export declare const VerdictLevel: z.ZodEnum<["pass", "block", "warn", "surface", "directive"]>;
export type VerdictLevel = z.infer<typeof VerdictLevel>;
/**
 * NextAction — payload of a `level: 'directive'` verdict. Names the next
 * skill OR tool the agent should run (skill XOR tool, never both); `args`
 * threads the call through; `rationale` is the mandatory plain-English
 * explanation that lands in the agent's pre-prompt context.
 *
 * Per T-ASC L7 + project_opensquid_no_agent_loop: opensquid emits the
 * directive, the agent dispatches. The skill name here is informational —
 * opensquid does NOT invoke it.
 */
/**
 * DPC.1 (2026-05-30) — extended to 3-way XOR (skill / tool / profession).
 * The `profession` field points at an opensquid built-in profession pack
 * (e.g. `task-spec-author`, `scope-architect`) under `packs/builtin/<name>/`
 * or at a user-scope profession pack under `~/.opensquid/packs/<name>/`.
 * Chain-handoff directives (T-ASC ASC.5) use `profession:` to route the
 * agent to spawn_subagent with the named pack's team-role manifest. The
 * agent loads the pack, applies the role's `instructions` + pinned skills,
 * runs the subagent — opensquid stays passive per
 * [[project_opensquid_no_agent_loop]].
 */
export declare const NextAction: z.ZodEffects<z.ZodObject<{
    skill: z.ZodOptional<z.ZodString>;
    tool: z.ZodOptional<z.ZodString>;
    profession: z.ZodOptional<z.ZodString>;
    args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    rationale: z.ZodString;
}, "strict", z.ZodTypeAny, {
    rationale: string;
    tool?: string | undefined;
    args?: Record<string, unknown> | undefined;
    profession?: string | undefined;
    skill?: string | undefined;
}, {
    rationale: string;
    tool?: string | undefined;
    args?: Record<string, unknown> | undefined;
    profession?: string | undefined;
    skill?: string | undefined;
}>, {
    rationale: string;
    tool?: string | undefined;
    args?: Record<string, unknown> | undefined;
    profession?: string | undefined;
    skill?: string | undefined;
}, {
    rationale: string;
    tool?: string | undefined;
    args?: Record<string, unknown> | undefined;
    profession?: string | undefined;
    skill?: string | undefined;
}>;
export type NextAction = z.infer<typeof NextAction>;
export declare const Verdict: z.ZodDiscriminatedUnion<"level", [z.ZodObject<{
    level: z.ZodLiteral<"pass">;
    message: z.ZodString;
    ruleId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    message: string;
    level: "pass";
    ruleId?: string | undefined;
}, {
    message: string;
    level: "pass";
    ruleId?: string | undefined;
}>, z.ZodObject<{
    level: z.ZodLiteral<"block">;
    message: z.ZodString;
    ruleId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    message: string;
    level: "block";
    ruleId?: string | undefined;
}, {
    message: string;
    level: "block";
    ruleId?: string | undefined;
}>, z.ZodObject<{
    level: z.ZodLiteral<"warn">;
    message: z.ZodString;
    ruleId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    message: string;
    level: "warn";
    ruleId?: string | undefined;
}, {
    message: string;
    level: "warn";
    ruleId?: string | undefined;
}>, z.ZodObject<{
    level: z.ZodLiteral<"surface">;
    message: z.ZodString;
    ruleId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    message: string;
    level: "surface";
    ruleId?: string | undefined;
}, {
    message: string;
    level: "surface";
    ruleId?: string | undefined;
}>, z.ZodObject<{
    level: z.ZodLiteral<"directive">;
    next_action: z.ZodEffects<z.ZodObject<{
        skill: z.ZodOptional<z.ZodString>;
        tool: z.ZodOptional<z.ZodString>;
        profession: z.ZodOptional<z.ZodString>;
        args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        rationale: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    }, {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    }>, {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    }, {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    }>;
    ruleId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    level: "directive";
    next_action: {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    };
    ruleId?: string | undefined;
}, {
    level: "directive";
    next_action: {
        rationale: string;
        tool?: string | undefined;
        args?: Record<string, unknown> | undefined;
        profession?: string | undefined;
        skill?: string | undefined;
    };
    ruleId?: string | undefined;
}>]>;
export type Verdict = z.infer<typeof Verdict>;
/** Verdicts that carry a human-readable message (every level except directive). */
export type MessageVerdict = Extract<Verdict, {
    message: string;
}>;
/** Directive-level verdict (level: 'directive', carries next_action). */
export type DirectiveVerdict = Extract<Verdict, {
    level: 'directive';
}>;
/**
 * A directive emitted by a rule and aggregated by the dispatcher. Peer to
 * the inject_context aggregation: directives accumulate in
 * `DispatchResult.directives` across the walk and the UserPromptSubmit hook
 * bin serializes them into the envelope's additionalContext.
 */
export interface Directive {
    next_action: NextAction;
    ruleId?: string;
}
export { DEFAULT_TRIGGERS, Event, EventKind, FileChangedEvent, InboundChannelEvent, PromptSubmitEvent, ScheduleEvent, SessionEndEvent, SessionStartEvent, StopEvent, ToolCallEvent, Trigger, WebhookEvent, defaultTriggers, } from './event.js';
export { SkillRequires } from './skill_requires.js';
export type { RequiresCache } from './skill_requires.js';
export declare const ProcessStep: z.ZodObject<{
    call: z.ZodString;
    args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    as: z.ZodOptional<z.ZodString>;
    if: z.ZodOptional<z.ZodString>;
    on_empty: z.ZodOptional<z.ZodEnum<["pass", "block", "continue"]>>;
    on_error: z.ZodOptional<z.ZodEnum<["abort", "continue"]>>;
}, "strip", z.ZodTypeAny, {
    call: string;
    args?: Record<string, unknown> | undefined;
    as?: string | undefined;
    if?: string | undefined;
    on_empty?: "block" | "pass" | "continue" | undefined;
    on_error?: "continue" | "abort" | undefined;
}, {
    call: string;
    args?: Record<string, unknown> | undefined;
    as?: string | undefined;
    if?: string | undefined;
    on_empty?: "block" | "pass" | "continue" | undefined;
    on_error?: "continue" | "abort" | undefined;
}>;
export type ProcessStep = z.infer<typeof ProcessStep>;
export declare const RuleKind: z.ZodEnum<["track_check", "destination_check"]>;
export type RuleKind = z.infer<typeof RuleKind>;
export declare const TrackCheckRule: z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodDefault<z.ZodLiteral<"track_check">>;
    requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"automation_mode_on">;
    }, "strict", z.ZodTypeAny, {
        kind: "automation_mode_on";
    }, {
        kind: "automation_mode_on";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"active_task_present">;
    }, "strict", z.ZodTypeAny, {
        kind: "active_task_present";
    }, {
        kind: "active_task_present";
    }>]>, "many">>;
    process: z.ZodArray<z.ZodObject<{
        call: z.ZodString;
        args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        as: z.ZodOptional<z.ZodString>;
        if: z.ZodOptional<z.ZodString>;
        on_empty: z.ZodOptional<z.ZodEnum<["pass", "block", "continue"]>>;
        on_error: z.ZodOptional<z.ZodEnum<["abort", "continue"]>>;
    }, "strip", z.ZodTypeAny, {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }, {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    kind: "track_check";
    id: string;
    requires: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[];
    process: {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }[];
}, {
    id: string;
    process: {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }[];
    kind?: "track_check" | undefined;
    requires?: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[] | undefined;
}>;
export type TrackCheckRule = z.infer<typeof TrackCheckRule>;
export declare const DestinationCheckRule: z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodLiteral<"destination_check">;
    interval: z.ZodObject<{
        every_n_tool_calls: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        every_n_tool_calls: number;
    }, {
        every_n_tool_calls: number;
    }>;
    model_alias: z.ZodDefault<z.ZodString>;
    prompt_template: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "destination_check";
    id: string;
    model_alias: string;
    interval: {
        every_n_tool_calls: number;
    };
    prompt_template: string;
}, {
    kind: "destination_check";
    id: string;
    interval: {
        every_n_tool_calls: number;
    };
    prompt_template: string;
    model_alias?: string | undefined;
}>;
export type DestinationCheckRule = z.infer<typeof DestinationCheckRule>;
export declare const Rule: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodDefault<z.ZodLiteral<"track_check">>;
    requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"automation_mode_on">;
    }, "strict", z.ZodTypeAny, {
        kind: "automation_mode_on";
    }, {
        kind: "automation_mode_on";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"active_task_present">;
    }, "strict", z.ZodTypeAny, {
        kind: "active_task_present";
    }, {
        kind: "active_task_present";
    }>]>, "many">>;
    process: z.ZodArray<z.ZodObject<{
        call: z.ZodString;
        args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        as: z.ZodOptional<z.ZodString>;
        if: z.ZodOptional<z.ZodString>;
        on_empty: z.ZodOptional<z.ZodEnum<["pass", "block", "continue"]>>;
        on_error: z.ZodOptional<z.ZodEnum<["abort", "continue"]>>;
    }, "strip", z.ZodTypeAny, {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }, {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }>, "many">;
}, "strip", z.ZodTypeAny, {
    kind: "track_check";
    id: string;
    requires: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[];
    process: {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }[];
}, {
    id: string;
    process: {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }[];
    kind?: "track_check" | undefined;
    requires?: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[] | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    kind: z.ZodLiteral<"destination_check">;
    interval: z.ZodObject<{
        every_n_tool_calls: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        every_n_tool_calls: number;
    }, {
        every_n_tool_calls: number;
    }>;
    model_alias: z.ZodDefault<z.ZodString>;
    prompt_template: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "destination_check";
    id: string;
    model_alias: string;
    interval: {
        every_n_tool_calls: number;
    };
    prompt_template: string;
}, {
    kind: "destination_check";
    id: string;
    interval: {
        every_n_tool_calls: number;
    };
    prompt_template: string;
    model_alias?: string | undefined;
}>]>, {
    kind: "track_check";
    id: string;
    requires: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[];
    process: {
        call: string;
        args?: Record<string, unknown> | undefined;
        as?: string | undefined;
        if?: string | undefined;
        on_empty?: "block" | "pass" | "continue" | undefined;
        on_error?: "continue" | "abort" | undefined;
    }[];
} | {
    kind: "destination_check";
    id: string;
    model_alias: string;
    interval: {
        every_n_tool_calls: number;
    };
    prompt_template: string;
}, unknown>;
export type Rule = z.infer<typeof Rule>;
export declare const LoadMode: z.ZodEnum<["preload", "lazy"]>;
export type LoadMode = z.infer<typeof LoadMode>;
export declare const Skill: z.ZodObject<{
    name: z.ZodString;
    load: z.ZodDefault<z.ZodEnum<["preload", "lazy"]>>;
    when_to_load: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
    requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"automation_mode_on">;
    }, "strict", z.ZodTypeAny, {
        kind: "automation_mode_on";
    }, {
        kind: "automation_mode_on";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"active_task_present">;
    }, "strict", z.ZodTypeAny, {
        kind: "active_task_present";
    }, {
        kind: "active_task_present";
    }>]>, "many">>;
    unloads_when: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
    triggers: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"tool_call">;
    }, "strip", z.ZodTypeAny, {
        kind: "tool_call";
    }, {
        kind: "tool_call";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"post_tool_call">;
    }, "strip", z.ZodTypeAny, {
        kind: "post_tool_call";
    }, {
        kind: "post_tool_call";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"prompt_submit">;
    }, "strip", z.ZodTypeAny, {
        kind: "prompt_submit";
    }, {
        kind: "prompt_submit";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"session_end">;
    }, "strip", z.ZodTypeAny, {
        kind: "session_end";
    }, {
        kind: "session_end";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"stop">;
    }, "strip", z.ZodTypeAny, {
        kind: "stop";
    }, {
        kind: "stop";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"session_start">;
    }, "strip", z.ZodTypeAny, {
        kind: "session_start";
    }, {
        kind: "session_start";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"schedule">;
        cron: z.ZodOptional<z.ZodString>;
        cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
    }, "strip", z.ZodTypeAny, {
        kind: "schedule";
        cron?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    }, {
        kind: "schedule";
        cron?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"webhook">;
        path: z.ZodOptional<z.ZodString>;
        cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
    }, "strip", z.ZodTypeAny, {
        kind: "webhook";
        path?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    }, {
        kind: "webhook";
        path?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"inbound_channel">;
        channel: z.ZodOptional<z.ZodString>;
        sender_pattern: z.ZodOptional<z.ZodString>;
        cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
    }, "strip", z.ZodTypeAny, {
        kind: "inbound_channel";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        channel?: string | undefined;
        sender_pattern?: string | undefined;
    }, {
        kind: "inbound_channel";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        channel?: string | undefined;
        sender_pattern?: string | undefined;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"file_changed">;
        paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        ignored: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
    }, "strip", z.ZodTypeAny, {
        kind: "file_changed";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        paths?: string[] | undefined;
        ignored?: string[] | undefined;
    }, {
        kind: "file_changed";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        paths?: string[] | undefined;
        ignored?: string[] | undefined;
    }>]>, "many">>;
    rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        id: z.ZodString;
        kind: z.ZodDefault<z.ZodLiteral<"track_check">>;
        requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"automation_mode_on">;
        }, "strict", z.ZodTypeAny, {
            kind: "automation_mode_on";
        }, {
            kind: "automation_mode_on";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"active_task_present">;
        }, "strict", z.ZodTypeAny, {
            kind: "active_task_present";
        }, {
            kind: "active_task_present";
        }>]>, "many">>;
        process: z.ZodArray<z.ZodObject<{
            call: z.ZodString;
            args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            as: z.ZodOptional<z.ZodString>;
            if: z.ZodOptional<z.ZodString>;
            on_empty: z.ZodOptional<z.ZodEnum<["pass", "block", "continue"]>>;
            on_error: z.ZodOptional<z.ZodEnum<["abort", "continue"]>>;
        }, "strip", z.ZodTypeAny, {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }, {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        kind: "track_check";
        id: string;
        requires: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[];
        process: {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }[];
    }, {
        id: string;
        process: {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }[];
        kind?: "track_check" | undefined;
        requires?: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[] | undefined;
    }>, z.ZodObject<{
        id: z.ZodString;
        kind: z.ZodLiteral<"destination_check">;
        interval: z.ZodObject<{
            every_n_tool_calls: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            every_n_tool_calls: number;
        }, {
            every_n_tool_calls: number;
        }>;
        model_alias: z.ZodDefault<z.ZodString>;
        prompt_template: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        kind: "destination_check";
        id: string;
        model_alias: string;
        interval: {
            every_n_tool_calls: number;
        };
        prompt_template: string;
    }, {
        kind: "destination_check";
        id: string;
        interval: {
            every_n_tool_calls: number;
        };
        prompt_template: string;
        model_alias?: string | undefined;
    }>]>, {
        kind: "track_check";
        id: string;
        requires: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[];
        process: {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }[];
    } | {
        kind: "destination_check";
        id: string;
        model_alias: string;
        interval: {
            every_n_tool_calls: number;
        };
        prompt_template: string;
    }, unknown>, "many">>;
    prose: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    name: string;
    requires: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[];
    load: "preload" | "lazy";
    when_to_load: unknown[];
    unloads_when: unknown[];
    triggers: ({
        kind: "tool_call";
    } | {
        kind: "post_tool_call";
    } | {
        kind: "prompt_submit";
    } | {
        kind: "session_end";
    } | {
        kind: "stop";
    } | {
        kind: "session_start";
    } | {
        kind: "schedule";
        cron?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    } | {
        kind: "webhook";
        path?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    } | {
        kind: "inbound_channel";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        channel?: string | undefined;
        sender_pattern?: string | undefined;
    } | {
        kind: "file_changed";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        paths?: string[] | undefined;
        ignored?: string[] | undefined;
    })[];
    rules: ({
        kind: "track_check";
        id: string;
        requires: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[];
        process: {
            call: string;
            args?: Record<string, unknown> | undefined;
            as?: string | undefined;
            if?: string | undefined;
            on_empty?: "block" | "pass" | "continue" | undefined;
            on_error?: "continue" | "abort" | undefined;
        }[];
    } | {
        kind: "destination_check";
        id: string;
        model_alias: string;
        interval: {
            every_n_tool_calls: number;
        };
        prompt_template: string;
    })[];
    prose?: string | undefined;
}, {
    name: string;
    requires?: ({
        kind: "automation_mode_on";
    } | {
        kind: "active_task_present";
    })[] | undefined;
    load?: "preload" | "lazy" | undefined;
    when_to_load?: unknown[] | undefined;
    unloads_when?: unknown[] | undefined;
    triggers?: ({
        kind: "tool_call";
    } | {
        kind: "post_tool_call";
    } | {
        kind: "prompt_submit";
    } | {
        kind: "session_end";
    } | {
        kind: "stop";
    } | {
        kind: "session_start";
    } | {
        kind: "schedule";
        cron?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    } | {
        kind: "webhook";
        path?: string | undefined;
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
    } | {
        kind: "inbound_channel";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        channel?: string | undefined;
        sender_pattern?: string | undefined;
    } | {
        kind: "file_changed";
        cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        paths?: string[] | undefined;
        ignored?: string[] | undefined;
    })[] | undefined;
    rules?: unknown[] | undefined;
    prose?: string | undefined;
}>;
export type Skill = z.infer<typeof Skill>;
export declare const Scope: z.ZodEnum<["universal", "domain", "specialty", "workflow", "project"]>;
export type Scope = z.infer<typeof Scope>;
export declare const Pack: z.ZodObject<{
    name: z.ZodString;
    version: z.ZodString;
    scope: z.ZodEnum<["universal", "domain", "specialty", "workflow", "project"]>;
    goal: z.ZodString;
    description: z.ZodDefault<z.ZodString>;
    requires: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    extends: z.ZodOptional<z.ZodString>;
    evolves: z.ZodDefault<z.ZodBoolean>;
    skills: z.ZodDefault<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        load: z.ZodDefault<z.ZodEnum<["preload", "lazy"]>>;
        when_to_load: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
        requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"automation_mode_on">;
        }, "strict", z.ZodTypeAny, {
            kind: "automation_mode_on";
        }, {
            kind: "automation_mode_on";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"active_task_present">;
        }, "strict", z.ZodTypeAny, {
            kind: "active_task_present";
        }, {
            kind: "active_task_present";
        }>]>, "many">>;
        unloads_when: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
        triggers: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"tool_call">;
        }, "strip", z.ZodTypeAny, {
            kind: "tool_call";
        }, {
            kind: "tool_call";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"post_tool_call">;
        }, "strip", z.ZodTypeAny, {
            kind: "post_tool_call";
        }, {
            kind: "post_tool_call";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"prompt_submit">;
        }, "strip", z.ZodTypeAny, {
            kind: "prompt_submit";
        }, {
            kind: "prompt_submit";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"session_end">;
        }, "strip", z.ZodTypeAny, {
            kind: "session_end";
        }, {
            kind: "session_end";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"stop">;
        }, "strip", z.ZodTypeAny, {
            kind: "stop";
        }, {
            kind: "stop";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"session_start">;
        }, "strip", z.ZodTypeAny, {
            kind: "session_start";
        }, {
            kind: "session_start";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"schedule">;
            cron: z.ZodOptional<z.ZodString>;
            cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
        }, "strip", z.ZodTypeAny, {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        }, {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"webhook">;
            path: z.ZodOptional<z.ZodString>;
            cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
        }, "strip", z.ZodTypeAny, {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        }, {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"inbound_channel">;
            channel: z.ZodOptional<z.ZodString>;
            sender_pattern: z.ZodOptional<z.ZodString>;
            cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
        }, "strip", z.ZodTypeAny, {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        }, {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"file_changed">;
            paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            ignored: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            cost_tier: z.ZodOptional<z.ZodEnum<["cheap", "balanced", "premium"]>>;
        }, "strip", z.ZodTypeAny, {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        }, {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        }>]>, "many">>;
        rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            id: z.ZodString;
            kind: z.ZodDefault<z.ZodLiteral<"track_check">>;
            requires: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
                kind: z.ZodLiteral<"automation_mode_on">;
            }, "strict", z.ZodTypeAny, {
                kind: "automation_mode_on";
            }, {
                kind: "automation_mode_on";
            }>, z.ZodObject<{
                kind: z.ZodLiteral<"active_task_present">;
            }, "strict", z.ZodTypeAny, {
                kind: "active_task_present";
            }, {
                kind: "active_task_present";
            }>]>, "many">>;
            process: z.ZodArray<z.ZodObject<{
                call: z.ZodString;
                args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
                as: z.ZodOptional<z.ZodString>;
                if: z.ZodOptional<z.ZodString>;
                on_empty: z.ZodOptional<z.ZodEnum<["pass", "block", "continue"]>>;
                on_error: z.ZodOptional<z.ZodEnum<["abort", "continue"]>>;
            }, "strip", z.ZodTypeAny, {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }, {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            kind: "track_check";
            id: string;
            requires: ({
                kind: "automation_mode_on";
            } | {
                kind: "active_task_present";
            })[];
            process: {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }[];
        }, {
            id: string;
            process: {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }[];
            kind?: "track_check" | undefined;
            requires?: ({
                kind: "automation_mode_on";
            } | {
                kind: "active_task_present";
            })[] | undefined;
        }>, z.ZodObject<{
            id: z.ZodString;
            kind: z.ZodLiteral<"destination_check">;
            interval: z.ZodObject<{
                every_n_tool_calls: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                every_n_tool_calls: number;
            }, {
                every_n_tool_calls: number;
            }>;
            model_alias: z.ZodDefault<z.ZodString>;
            prompt_template: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "destination_check";
            id: string;
            model_alias: string;
            interval: {
                every_n_tool_calls: number;
            };
            prompt_template: string;
        }, {
            kind: "destination_check";
            id: string;
            interval: {
                every_n_tool_calls: number;
            };
            prompt_template: string;
            model_alias?: string | undefined;
        }>]>, {
            kind: "track_check";
            id: string;
            requires: ({
                kind: "automation_mode_on";
            } | {
                kind: "active_task_present";
            })[];
            process: {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }[];
        } | {
            kind: "destination_check";
            id: string;
            model_alias: string;
            interval: {
                every_n_tool_calls: number;
            };
            prompt_template: string;
        }, unknown>, "many">>;
        prose: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        requires: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[];
        load: "preload" | "lazy";
        when_to_load: unknown[];
        unloads_when: unknown[];
        triggers: ({
            kind: "tool_call";
        } | {
            kind: "post_tool_call";
        } | {
            kind: "prompt_submit";
        } | {
            kind: "session_end";
        } | {
            kind: "stop";
        } | {
            kind: "session_start";
        } | {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        } | {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        })[];
        rules: ({
            kind: "track_check";
            id: string;
            requires: ({
                kind: "automation_mode_on";
            } | {
                kind: "active_task_present";
            })[];
            process: {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }[];
        } | {
            kind: "destination_check";
            id: string;
            model_alias: string;
            interval: {
                every_n_tool_calls: number;
            };
            prompt_template: string;
        })[];
        prose?: string | undefined;
    }, {
        name: string;
        requires?: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[] | undefined;
        load?: "preload" | "lazy" | undefined;
        when_to_load?: unknown[] | undefined;
        unloads_when?: unknown[] | undefined;
        triggers?: ({
            kind: "tool_call";
        } | {
            kind: "post_tool_call";
        } | {
            kind: "prompt_submit";
        } | {
            kind: "session_end";
        } | {
            kind: "stop";
        } | {
            kind: "session_start";
        } | {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        } | {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        })[] | undefined;
        rules?: unknown[] | undefined;
        prose?: string | undefined;
    }>, "many">>;
    chatAgent: z.ZodOptional<z.ZodObject<{
        default_model: z.ZodString;
        system_prompt: z.ZodOptional<z.ZodString>;
        skills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        disable_builtins: z.ZodDefault<z.ZodArray<z.ZodEnum<["chat_send", "recall", "store_lesson"]>, "many">>;
        max_tool_iterations: z.ZodDefault<z.ZodNumber>;
        max_tokens: z.ZodDefault<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        default_model: string;
        skills: string[];
        disable_builtins: ("chat_send" | "recall" | "store_lesson")[];
        max_tool_iterations: number;
        max_tokens: number;
        system_prompt?: string | undefined;
    }, {
        default_model: string;
        system_prompt?: string | undefined;
        skills?: string[] | undefined;
        disable_builtins?: ("chat_send" | "recall" | "store_lesson")[] | undefined;
        max_tool_iterations?: number | undefined;
        max_tokens?: number | undefined;
    }>>;
    models: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
        description: z.ZodDefault<z.ZodString>;
        mode: z.ZodEnum<["subscription", "api", "local", "mcp"]>;
        impl: z.ZodOptional<z.ZodEnum<["cli", "sdk"]>>;
        cli: z.ZodOptional<z.ZodString>;
        args: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        sdk: z.ZodOptional<z.ZodString>;
        model: z.ZodOptional<z.ZodString>;
        endpoint: z.ZodOptional<z.ZodString>;
        provider: z.ZodOptional<z.ZodString>;
        server: z.ZodOptional<z.ZodString>;
        tool: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        args: string[];
        description: string;
        mode: "subscription" | "api" | "local" | "mcp";
        tool?: string | undefined;
        cli?: string | undefined;
        sdk?: string | undefined;
        impl?: "cli" | "sdk" | undefined;
        model?: string | undefined;
        endpoint?: string | undefined;
        provider?: string | undefined;
        server?: string | undefined;
    }, {
        mode: "subscription" | "api" | "local" | "mcp";
        tool?: string | undefined;
        args?: string[] | undefined;
        cli?: string | undefined;
        sdk?: string | undefined;
        description?: string | undefined;
        impl?: "cli" | "sdk" | undefined;
        model?: string | undefined;
        endpoint?: string | undefined;
        provider?: string | undefined;
        server?: string | undefined;
    }>>>>;
    driftResponse: z.ZodOptional<z.ZodObject<{
        default: z.ZodDefault<z.ZodEnum<["block_tool", "warn", "full_stop_and_redo", "notify_and_pause", "auto_correct", "escalate"]>>;
        per_rule: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodEnum<["block_tool", "warn", "full_stop_and_redo", "notify_and_pause", "auto_correct", "escalate"]>>>;
        corrective_skills: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, "strict", z.ZodTypeAny, {
        default: "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate";
        per_rule: Record<string, "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate">;
        corrective_skills: Record<string, string>;
    }, {
        default?: "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate" | undefined;
        per_rule?: Record<string, "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate"> | undefined;
        corrective_skills?: Record<string, string> | undefined;
    }>>;
    foundation: z.ZodOptional<z.ZodObject<{
        tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            semver: z.ZodOptional<z.ZodString>;
        }, "strict", z.ZodTypeAny, {
            name: string;
            semver?: string | undefined;
        }, {
            name: string;
            semver?: string | undefined;
        }>, "many">>;
        domains: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        methodologies: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
    }, "strict", z.ZodTypeAny, {
        domains: string[];
        tools: {
            name: string;
            semver?: string | undefined;
        }[];
        methodologies: string[];
    }, {
        domains?: string[] | undefined;
        tools?: {
            name: string;
            semver?: string | undefined;
        }[] | undefined;
        methodologies?: string[] | undefined;
    }>>;
    activationScope: z.ZodOptional<z.ZodEnum<["project", "user", "hybrid", "team", "global"]>>;
    detectedBy: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
        kind: z.ZodLiteral<"file_exists">;
        path: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        path: string;
        kind: "file_exists";
    }, {
        path: string;
        kind: "file_exists";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"dir_exists">;
        path: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        path: string;
        kind: "dir_exists";
    }, {
        path: string;
        kind: "dir_exists";
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"file_match">;
        path: z.ZodString;
        matches: z.ZodRecord<z.ZodString, z.ZodString>;
    }, "strict", z.ZodTypeAny, {
        path: string;
        kind: "file_match";
        matches: Record<string, string>;
    }, {
        path: string;
        kind: "file_match";
        matches: Record<string, string>;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"file_glob">;
        pattern: z.ZodString;
        min_count: z.ZodDefault<z.ZodNumber>;
    }, "strict", z.ZodTypeAny, {
        kind: "file_glob";
        pattern: string;
        min_count: number;
    }, {
        kind: "file_glob";
        pattern: string;
        min_count?: number | undefined;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"memory_match">;
        pattern: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        kind: "memory_match";
        pattern: string;
    }, {
        kind: "memory_match";
        pattern: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"conversation_signal">;
        pattern: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        kind: "conversation_signal";
        pattern: string;
    }, {
        kind: "conversation_signal";
        pattern: string;
    }>, z.ZodObject<{
        kind: z.ZodLiteral<"user_pinned">;
    }, "strict", z.ZodTypeAny, {
        kind: "user_pinned";
    }, {
        kind: "user_pinned";
    }>]>, "many">>;
    kind: z.ZodOptional<z.ZodEnum<["focused", "composite"]>>;
    usage: z.ZodOptional<z.ZodEnum<["active", "profession", "both"]>>;
    includes: z.ZodOptional<z.ZodArray<z.ZodObject<{
        pack_id: z.ZodString;
        semver: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        semver: string;
        pack_id: string;
    }, {
        semver: string;
        pack_id: string;
    }>, "many">>;
    team: z.ZodOptional<z.ZodObject<{
        name: z.ZodString;
        roles: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            pack: z.ZodString;
            model_alias: z.ZodString;
            handoff_signal: z.ZodOptional<z.ZodString>;
            instructions: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }, {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        name: string;
        roles: {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }[];
    }, {
        name: string;
        roles: {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }[];
    }>>;
    baseVersion: z.ZodOptional<z.ZodString>;
    personalRevisionId: z.ZodOptional<z.ZodNumber>;
    lastMergedVanilla: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    livingVersion: z.ZodOptional<z.ZodObject<{
        base: z.ZodString;
        revision: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        base: string;
        revision: number;
    }, {
        base: string;
        revision: number;
    }>>;
    seedLessons: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
        title: z.ZodString;
        body: z.ZodOptional<z.ZodString>;
        body_path: z.ZodOptional<z.ZodString>;
        scope: z.ZodDefault<z.ZodEnum<["user", "global"]>>;
        tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
        source: z.ZodOptional<z.ZodString>;
    }, "strict", z.ZodTypeAny, {
        title: string;
        scope: "user" | "global";
        tags: string[];
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
    }, {
        title: string;
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
        scope?: "user" | "global" | undefined;
        tags?: string[] | undefined;
    }>, {
        title: string;
        scope: "user" | "global";
        tags: string[];
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
    }, {
        title: string;
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
        scope?: "user" | "global" | undefined;
        tags?: string[] | undefined;
    }>, "many">>;
    verifyGates: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        when: z.ZodObject<{
            event_kind: z.ZodEnum<["tool_call", "prompt_submit", "stop", "session_end"]>;
        }, "strict", z.ZodTypeAny, {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        }, {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        }>;
        check: z.ZodString;
        on_fail: z.ZodObject<{
            level: z.ZodEnum<["warn", "block"]>;
            message: z.ZodString;
        }, "strict", z.ZodTypeAny, {
            message: string;
            level: "warn" | "block";
        }, {
            message: string;
            level: "warn" | "block";
        }>;
    }, "strict", z.ZodTypeAny, {
        name: string;
        when: {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        };
        check: string;
        on_fail: {
            message: string;
            level: "warn" | "block";
        };
    }, {
        name: string;
        when: {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        };
        check: string;
        on_fail: {
            message: string;
            level: "warn" | "block";
        };
    }>, "many">>;
    guards: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        on: z.ZodDefault<z.ZodEnum<["tool_call", "prompt_submit", "stop", "session_end"]>>;
        detect: z.ZodOptional<z.ZodObject<{
            call: z.ZodString;
            args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strict", z.ZodTypeAny, {
            call: string;
            args?: Record<string, unknown> | undefined;
        }, {
            call: string;
            args?: Record<string, unknown> | undefined;
        }>>;
        as: z.ZodDefault<z.ZodString>;
        when: z.ZodString;
        level: z.ZodEnum<["warn", "block"]>;
        message: z.ZodString;
    }, "strict", z.ZodTypeAny, {
        message: string;
        name: string;
        as: string;
        when: string;
        level: "warn" | "block";
        on: "tool_call" | "prompt_submit" | "session_end" | "stop";
        detect?: {
            call: string;
            args?: Record<string, unknown> | undefined;
        } | undefined;
    }, {
        message: string;
        name: string;
        when: string;
        level: "warn" | "block";
        as?: string | undefined;
        on?: "tool_call" | "prompt_submit" | "session_end" | "stop" | undefined;
        detect?: {
            call: string;
            args?: Record<string, unknown> | undefined;
        } | undefined;
    }>, "many">>;
    /** Pack-declared lifecycle FSM (slice A2; from `fsm.yaml`). Validated total. */
    fsm: z.ZodOptional<z.ZodObject<{
        initial: z.ZodString;
        states: z.ZodArray<z.ZodString, "many">;
        transitions: z.ZodDefault<z.ZodArray<z.ZodObject<{
            from: z.ZodString;
            on: z.ZodString;
            to: z.ZodString;
            when: z.ZodOptional<z.ZodString>;
        }, "strict", z.ZodTypeAny, {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }, {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }>, "many">>;
    }, "strict", z.ZodTypeAny, {
        initial: string;
        states: string[];
        transitions: {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }[];
    }, {
        initial: string;
        states: string[];
        transitions?: {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }[] | undefined;
    }>>;
}, "strip", z.ZodTypeAny, {
    version: string;
    name: string;
    description: string;
    skills: {
        name: string;
        requires: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[];
        load: "preload" | "lazy";
        when_to_load: unknown[];
        unloads_when: unknown[];
        triggers: ({
            kind: "tool_call";
        } | {
            kind: "post_tool_call";
        } | {
            kind: "prompt_submit";
        } | {
            kind: "session_end";
        } | {
            kind: "stop";
        } | {
            kind: "session_start";
        } | {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        } | {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        })[];
        rules: ({
            kind: "track_check";
            id: string;
            requires: ({
                kind: "automation_mode_on";
            } | {
                kind: "active_task_present";
            })[];
            process: {
                call: string;
                args?: Record<string, unknown> | undefined;
                as?: string | undefined;
                if?: string | undefined;
                on_empty?: "block" | "pass" | "continue" | undefined;
                on_error?: "continue" | "abort" | undefined;
            }[];
        } | {
            kind: "destination_check";
            id: string;
            model_alias: string;
            interval: {
                every_n_tool_calls: number;
            };
            prompt_template: string;
        })[];
        prose?: string | undefined;
    }[];
    scope: "universal" | "domain" | "specialty" | "workflow" | "project";
    goal: string;
    requires: string[];
    conflicts: string[];
    evolves: boolean;
    includes?: {
        semver: string;
        pack_id: string;
    }[] | undefined;
    kind?: "focused" | "composite" | undefined;
    team?: {
        name: string;
        roles: {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }[];
    } | undefined;
    extends?: string | undefined;
    foundation?: {
        domains: string[];
        tools: {
            name: string;
            semver?: string | undefined;
        }[];
        methodologies: string[];
    } | undefined;
    usage?: "active" | "profession" | "both" | undefined;
    guards?: {
        message: string;
        name: string;
        as: string;
        when: string;
        level: "warn" | "block";
        on: "tool_call" | "prompt_submit" | "session_end" | "stop";
        detect?: {
            call: string;
            args?: Record<string, unknown> | undefined;
        } | undefined;
    }[] | undefined;
    chatAgent?: {
        default_model: string;
        skills: string[];
        disable_builtins: ("chat_send" | "recall" | "store_lesson")[];
        max_tool_iterations: number;
        max_tokens: number;
        system_prompt?: string | undefined;
    } | undefined;
    models?: Record<string, {
        args: string[];
        description: string;
        mode: "subscription" | "api" | "local" | "mcp";
        tool?: string | undefined;
        cli?: string | undefined;
        sdk?: string | undefined;
        impl?: "cli" | "sdk" | undefined;
        model?: string | undefined;
        endpoint?: string | undefined;
        provider?: string | undefined;
        server?: string | undefined;
    }> | undefined;
    driftResponse?: {
        default: "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate";
        per_rule: Record<string, "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate">;
        corrective_skills: Record<string, string>;
    } | undefined;
    activationScope?: "user" | "project" | "hybrid" | "team" | "global" | undefined;
    detectedBy?: ({
        path: string;
        kind: "file_exists";
    } | {
        path: string;
        kind: "dir_exists";
    } | {
        path: string;
        kind: "file_match";
        matches: Record<string, string>;
    } | {
        kind: "file_glob";
        pattern: string;
        min_count: number;
    } | {
        kind: "memory_match";
        pattern: string;
    } | {
        kind: "conversation_signal";
        pattern: string;
    } | {
        kind: "user_pinned";
    })[] | undefined;
    baseVersion?: string | undefined;
    personalRevisionId?: number | undefined;
    lastMergedVanilla?: string | null | undefined;
    livingVersion?: {
        base: string;
        revision: number;
    } | undefined;
    seedLessons?: {
        title: string;
        scope: "user" | "global";
        tags: string[];
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
    }[] | undefined;
    verifyGates?: {
        name: string;
        when: {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        };
        check: string;
        on_fail: {
            message: string;
            level: "warn" | "block";
        };
    }[] | undefined;
    fsm?: {
        initial: string;
        states: string[];
        transitions: {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }[];
    } | undefined;
}, {
    version: string;
    name: string;
    scope: "universal" | "domain" | "specialty" | "workflow" | "project";
    goal: string;
    includes?: {
        semver: string;
        pack_id: string;
    }[] | undefined;
    kind?: "focused" | "composite" | undefined;
    description?: string | undefined;
    skills?: {
        name: string;
        requires?: ({
            kind: "automation_mode_on";
        } | {
            kind: "active_task_present";
        })[] | undefined;
        load?: "preload" | "lazy" | undefined;
        when_to_load?: unknown[] | undefined;
        unloads_when?: unknown[] | undefined;
        triggers?: ({
            kind: "tool_call";
        } | {
            kind: "post_tool_call";
        } | {
            kind: "prompt_submit";
        } | {
            kind: "session_end";
        } | {
            kind: "stop";
        } | {
            kind: "session_start";
        } | {
            kind: "schedule";
            cron?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "webhook";
            path?: string | undefined;
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
        } | {
            kind: "inbound_channel";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            channel?: string | undefined;
            sender_pattern?: string | undefined;
        } | {
            kind: "file_changed";
            cost_tier?: "cheap" | "balanced" | "premium" | undefined;
            paths?: string[] | undefined;
            ignored?: string[] | undefined;
        })[] | undefined;
        rules?: unknown[] | undefined;
        prose?: string | undefined;
    }[] | undefined;
    team?: {
        name: string;
        roles: {
            name: string;
            pack: string;
            model_alias: string;
            handoff_signal?: string | undefined;
            instructions?: string | undefined;
        }[];
    } | undefined;
    requires?: string[] | undefined;
    conflicts?: string[] | undefined;
    extends?: string | undefined;
    evolves?: boolean | undefined;
    foundation?: {
        domains?: string[] | undefined;
        tools?: {
            name: string;
            semver?: string | undefined;
        }[] | undefined;
        methodologies?: string[] | undefined;
    } | undefined;
    usage?: "active" | "profession" | "both" | undefined;
    guards?: {
        message: string;
        name: string;
        when: string;
        level: "warn" | "block";
        as?: string | undefined;
        on?: "tool_call" | "prompt_submit" | "session_end" | "stop" | undefined;
        detect?: {
            call: string;
            args?: Record<string, unknown> | undefined;
        } | undefined;
    }[] | undefined;
    chatAgent?: {
        default_model: string;
        system_prompt?: string | undefined;
        skills?: string[] | undefined;
        disable_builtins?: ("chat_send" | "recall" | "store_lesson")[] | undefined;
        max_tool_iterations?: number | undefined;
        max_tokens?: number | undefined;
    } | undefined;
    models?: Record<string, {
        mode: "subscription" | "api" | "local" | "mcp";
        tool?: string | undefined;
        args?: string[] | undefined;
        cli?: string | undefined;
        sdk?: string | undefined;
        description?: string | undefined;
        impl?: "cli" | "sdk" | undefined;
        model?: string | undefined;
        endpoint?: string | undefined;
        provider?: string | undefined;
        server?: string | undefined;
    }> | undefined;
    driftResponse?: {
        default?: "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate" | undefined;
        per_rule?: Record<string, "block_tool" | "warn" | "full_stop_and_redo" | "notify_and_pause" | "auto_correct" | "escalate"> | undefined;
        corrective_skills?: Record<string, string> | undefined;
    } | undefined;
    activationScope?: "user" | "project" | "hybrid" | "team" | "global" | undefined;
    detectedBy?: ({
        path: string;
        kind: "file_exists";
    } | {
        path: string;
        kind: "dir_exists";
    } | {
        path: string;
        kind: "file_match";
        matches: Record<string, string>;
    } | {
        kind: "file_glob";
        pattern: string;
        min_count?: number | undefined;
    } | {
        kind: "memory_match";
        pattern: string;
    } | {
        kind: "conversation_signal";
        pattern: string;
    } | {
        kind: "user_pinned";
    })[] | undefined;
    baseVersion?: string | undefined;
    personalRevisionId?: number | undefined;
    lastMergedVanilla?: string | null | undefined;
    livingVersion?: {
        base: string;
        revision: number;
    } | undefined;
    seedLessons?: {
        title: string;
        source?: string | undefined;
        body?: string | undefined;
        body_path?: string | undefined;
        scope?: "user" | "global" | undefined;
        tags?: string[] | undefined;
    }[] | undefined;
    verifyGates?: {
        name: string;
        when: {
            event_kind: "tool_call" | "prompt_submit" | "session_end" | "stop";
        };
        check: string;
        on_fail: {
            message: string;
            level: "warn" | "block";
        };
    }[] | undefined;
    fsm?: {
        initial: string;
        states: string[];
        transitions?: {
            from: string;
            to: string;
            on: string;
            when?: string | undefined;
        }[] | undefined;
    } | undefined;
}>;
export type Pack = z.infer<typeof Pack>;
/**
 * T-ASC ASC.3: RuleResult gains a `directive` variant that the dispatcher
 * aggregates separately from the `verdict` variant (which carries a
 * MessageVerdict only — directives don't flow through drift_response).
 * The evaluator forks at the verdict-primitive special-case: a value with
 * `level === 'directive'` becomes `{kind: 'directive'}`, every other level
 * becomes `{kind: 'verdict'}`.
 */
export type RuleResult = {
    kind: 'verdict';
    verdict: MessageVerdict;
} | {
    kind: 'directive';
    directive: Directive;
} | {
    kind: 'no_verdict';
} | {
    kind: 'error';
    error: string;
    step: number;
} | {
    kind: 'inject_context';
    content: string;
};
export type DriftPolicy = 'block_tool' | 'warn' | 'full_stop_and_redo' | 'notify_and_pause' | 'auto_correct' | 'escalate';
export type RuntimeAction = {
    kind: 'block_tool';
    message: string;
} | {
    kind: 'warn';
    message: string;
} | {
    kind: 'halt';
    reason: string;
    entrySkill?: string;
} | {
    kind: 'notify_pause';
    reason: string;
    severity: 'critical' | 'error' | 'warning';
} | {
    kind: 'auto_correct';
    correctiveSkill: string;
    verdict: Verdict;
} | {
    kind: 'escalate';
    reroutedSeverity: 'critical';
    verdict: Verdict;
};
export interface PauseState {
    reason: string;
    triggeredAt: string;
    ruleId?: string;
    packId?: string;
}
//# sourceMappingURL=types.d.ts.map