/**
 * Event union + Trigger schema — split out of `types.ts` per the AUTO.1
 * file-size constraint ("types.ts stays under 400 LOC; split into
 * `types/event.ts` if exceeded").
 *
 * `types.ts` re-exports every symbol declared here so existing
 * `import { Event } from './types.js'` callsites continue to work — this
 * file is internal layout, not a new public surface.
 *
 * Authoritative source: `docs/opensquid-real-design.md` §"The architecture
 * in six concepts" (concept 1: Event) + `docs/tasks/automation.md` AUTO.1
 * "Key code shapes" (the four new event variants + `triggers:` block).
 *
 * What lives here:
 *   - The Event variants (tool_call, post_tool_call, prompt_submit,
 *     session_end, stop, session_start, schedule, webhook, inbound_channel,
 *     file_changed) — post_tool_call added by POSTPUSH.1, session_start by
 *     HH6.1
 *   - The `Event` discriminated union
 *   - `EventKind` enum (the matching discriminator literals)
 *   - `Trigger` discriminated union + `DEFAULT_TRIGGERS` + `defaultTriggers()`
 *
 * What does NOT live here:
 *   - Verdict / Rule / Skill / Pack schemas → `types.ts` (the cross-process
 *     contract for the rest of the runtime).
 *   - DriftPolicy / RuntimeAction / PauseState → `types.ts` (drift-response
 *     and pause-state machinery).
 *
 * Naming: `event.ts` (sibling) rather than `types/event.ts` (subdir) to
 * avoid the NodeNext name collision between a sibling file `types.ts` and a
 * sibling directory `types/`. Both `.ts` and `.d.ts` resolvers can find
 * `./event.js` cleanly while preserving every existing `./types.js` import.
 *
 * Imports from: zod.
 * Imported by: src/runtime/types.ts (re-export barrel).
 */
import { z } from 'zod';
export declare const ToolCallEvent: z.ZodObject<{
    kind: z.ZodLiteral<"tool_call">;
    tool: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "tool_call";
    tool: string;
    args: Record<string, unknown>;
    cwd?: string | undefined;
}, {
    kind: "tool_call";
    tool: string;
    args: Record<string, unknown>;
    cwd?: string | undefined;
}>;
export type ToolCallEvent = z.infer<typeof ToolCallEvent>;
export declare const PostToolCallEvent: z.ZodObject<{
    kind: z.ZodLiteral<"post_tool_call">;
    tool: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    exit_code: z.ZodNumber;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    cwd: z.ZodOptional<z.ZodString>;
    duration_ms: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    kind: "post_tool_call";
    tool: string;
    args: Record<string, unknown>;
    exit_code: number;
    cwd?: string | undefined;
    stdout?: string | undefined;
    stderr?: string | undefined;
    duration_ms?: number | undefined;
}, {
    kind: "post_tool_call";
    tool: string;
    args: Record<string, unknown>;
    exit_code: number;
    cwd?: string | undefined;
    stdout?: string | undefined;
    stderr?: string | undefined;
    duration_ms?: number | undefined;
}>;
export type PostToolCallEvent = z.infer<typeof PostToolCallEvent>;
export declare const PromptSubmitEvent: z.ZodObject<{
    kind: z.ZodLiteral<"prompt_submit">;
    prompt: z.ZodString;
    priorAssistantText: z.ZodOptional<z.ZodString>;
    recentTurns: z.ZodOptional<z.ZodString>;
    openTasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        status: z.ZodString;
        taskId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        status: string;
        id: string;
        taskId?: string | undefined;
    }, {
        status: string;
        id: string;
        taskId?: string | undefined;
    }>, "many">>;
}, "strip", z.ZodTypeAny, {
    kind: "prompt_submit";
    prompt: string;
    priorAssistantText?: string | undefined;
    recentTurns?: string | undefined;
    openTasks?: {
        status: string;
        id: string;
        taskId?: string | undefined;
    }[] | undefined;
}, {
    kind: "prompt_submit";
    prompt: string;
    priorAssistantText?: string | undefined;
    recentTurns?: string | undefined;
    openTasks?: {
        status: string;
        id: string;
        taskId?: string | undefined;
    }[] | undefined;
}>;
export type PromptSubmitEvent = z.infer<typeof PromptSubmitEvent>;
export declare const SessionEndEvent: z.ZodObject<{
    kind: z.ZodLiteral<"session_end">;
    sessionId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "session_end";
    sessionId: string;
}, {
    kind: "session_end";
    sessionId: string;
}>;
export type SessionEndEvent = z.infer<typeof SessionEndEvent>;
export declare const StopEvent: z.ZodObject<{
    kind: z.ZodLiteral<"stop">;
    assistantText: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "stop";
    assistantText: string;
}, {
    kind: "stop";
    assistantText: string;
}>;
export type StopEvent = z.infer<typeof StopEvent>;
export declare const SessionStartEvent: z.ZodObject<{
    kind: z.ZodLiteral<"session_start">;
    source: z.ZodEnum<["startup", "resume", "clear", "compact"]>;
    sessionId: z.ZodOptional<z.ZodString>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    source: "startup" | "resume" | "clear" | "compact";
    kind: "session_start";
    cwd?: string | undefined;
    sessionId?: string | undefined;
}, {
    source: "startup" | "resume" | "clear" | "compact";
    kind: "session_start";
    cwd?: string | undefined;
    sessionId?: string | undefined;
}>;
export type SessionStartEvent = z.infer<typeof SessionStartEvent>;
export declare const ScheduleEvent: z.ZodObject<{
    kind: z.ZodLiteral<"schedule">;
    scheduleId: z.ZodString;
    fireTime: z.ZodString;
    triggerPayload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    kind: "schedule";
    scheduleId: string;
    fireTime: string;
    triggerPayload: Record<string, unknown>;
}, {
    kind: "schedule";
    scheduleId: string;
    fireTime: string;
    triggerPayload?: Record<string, unknown> | undefined;
}>;
export type ScheduleEvent = z.infer<typeof ScheduleEvent>;
export declare const WebhookEvent: z.ZodObject<{
    kind: z.ZodLiteral<"webhook">;
    subscriptionId: z.ZodString;
    method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
    headers: z.ZodRecord<z.ZodString, z.ZodString>;
    body: z.ZodUnknown;
    receivedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "webhook";
    subscriptionId: string;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    headers: Record<string, string>;
    receivedAt: string;
    body?: unknown;
}, {
    kind: "webhook";
    subscriptionId: string;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    headers: Record<string, string>;
    receivedAt: string;
    body?: unknown;
}>;
export type WebhookEvent = z.infer<typeof WebhookEvent>;
export declare const InboundChannelEvent: z.ZodObject<{
    kind: z.ZodLiteral<"inbound_channel">;
    channelUri: z.ZodString;
    sender: z.ZodString;
    text: z.ZodString;
    threadKey: z.ZodOptional<z.ZodString>;
    receivedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "inbound_channel";
    receivedAt: string;
    channelUri: string;
    sender: string;
    text: string;
    threadKey?: string | undefined;
}, {
    kind: "inbound_channel";
    receivedAt: string;
    channelUri: string;
    sender: string;
    text: string;
    threadKey?: string | undefined;
}>;
export type InboundChannelEvent = z.infer<typeof InboundChannelEvent>;
export declare const FileChangedEvent: z.ZodObject<{
    kind: z.ZodLiteral<"file_changed">;
    path: z.ZodString;
    changeKind: z.ZodEnum<["add", "change", "unlink"]>;
    changedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    path: string;
    kind: "file_changed";
    changeKind: "add" | "change" | "unlink";
    changedAt: string;
}, {
    path: string;
    kind: "file_changed";
    changeKind: "add" | "change" | "unlink";
    changedAt: string;
}>;
export type FileChangedEvent = z.infer<typeof FileChangedEvent>;
export declare const Event: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"tool_call">;
    tool: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "tool_call";
    tool: string;
    args: Record<string, unknown>;
    cwd?: string | undefined;
}, {
    kind: "tool_call";
    tool: string;
    args: Record<string, unknown>;
    cwd?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"post_tool_call">;
    tool: z.ZodString;
    args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    exit_code: z.ZodNumber;
    stdout: z.ZodOptional<z.ZodString>;
    stderr: z.ZodOptional<z.ZodString>;
    cwd: z.ZodOptional<z.ZodString>;
    duration_ms: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
    kind: "post_tool_call";
    tool: string;
    args: Record<string, unknown>;
    exit_code: number;
    cwd?: string | undefined;
    stdout?: string | undefined;
    stderr?: string | undefined;
    duration_ms?: number | undefined;
}, {
    kind: "post_tool_call";
    tool: string;
    args: Record<string, unknown>;
    exit_code: number;
    cwd?: string | undefined;
    stdout?: string | undefined;
    stderr?: string | undefined;
    duration_ms?: number | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"prompt_submit">;
    prompt: z.ZodString;
    priorAssistantText: z.ZodOptional<z.ZodString>;
    recentTurns: z.ZodOptional<z.ZodString>;
    openTasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        status: z.ZodString;
        taskId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        status: string;
        id: string;
        taskId?: string | undefined;
    }, {
        status: string;
        id: string;
        taskId?: string | undefined;
    }>, "many">>;
}, "strip", z.ZodTypeAny, {
    kind: "prompt_submit";
    prompt: string;
    priorAssistantText?: string | undefined;
    recentTurns?: string | undefined;
    openTasks?: {
        status: string;
        id: string;
        taskId?: string | undefined;
    }[] | undefined;
}, {
    kind: "prompt_submit";
    prompt: string;
    priorAssistantText?: string | undefined;
    recentTurns?: string | undefined;
    openTasks?: {
        status: string;
        id: string;
        taskId?: string | undefined;
    }[] | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"session_end">;
    sessionId: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "session_end";
    sessionId: string;
}, {
    kind: "session_end";
    sessionId: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"stop">;
    assistantText: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "stop";
    assistantText: string;
}, {
    kind: "stop";
    assistantText: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"session_start">;
    source: z.ZodEnum<["startup", "resume", "clear", "compact"]>;
    sessionId: z.ZodOptional<z.ZodString>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    source: "startup" | "resume" | "clear" | "compact";
    kind: "session_start";
    cwd?: string | undefined;
    sessionId?: string | undefined;
}, {
    source: "startup" | "resume" | "clear" | "compact";
    kind: "session_start";
    cwd?: string | undefined;
    sessionId?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"schedule">;
    scheduleId: z.ZodString;
    fireTime: z.ZodString;
    triggerPayload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    kind: "schedule";
    scheduleId: string;
    fireTime: string;
    triggerPayload: Record<string, unknown>;
}, {
    kind: "schedule";
    scheduleId: string;
    fireTime: string;
    triggerPayload?: Record<string, unknown> | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"webhook">;
    subscriptionId: z.ZodString;
    method: z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>;
    headers: z.ZodRecord<z.ZodString, z.ZodString>;
    body: z.ZodUnknown;
    receivedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "webhook";
    subscriptionId: string;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    headers: Record<string, string>;
    receivedAt: string;
    body?: unknown;
}, {
    kind: "webhook";
    subscriptionId: string;
    method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
    headers: Record<string, string>;
    receivedAt: string;
    body?: unknown;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"inbound_channel">;
    channelUri: z.ZodString;
    sender: z.ZodString;
    text: z.ZodString;
    threadKey: z.ZodOptional<z.ZodString>;
    receivedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "inbound_channel";
    receivedAt: string;
    channelUri: string;
    sender: string;
    text: string;
    threadKey?: string | undefined;
}, {
    kind: "inbound_channel";
    receivedAt: string;
    channelUri: string;
    sender: string;
    text: string;
    threadKey?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"file_changed">;
    path: z.ZodString;
    changeKind: z.ZodEnum<["add", "change", "unlink"]>;
    changedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    path: string;
    kind: "file_changed";
    changeKind: "add" | "change" | "unlink";
    changedAt: string;
}, {
    path: string;
    kind: "file_changed";
    changeKind: "add" | "change" | "unlink";
    changedAt: string;
}>]>;
export type Event = z.infer<typeof Event>;
export declare const EventKind: z.ZodEnum<["tool_call", "post_tool_call", "prompt_submit", "session_end", "stop", "session_start", "schedule", "webhook", "inbound_channel", "file_changed"]>;
export type EventKind = z.infer<typeof EventKind>;
export declare const Trigger: 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;
}>]>;
export type Trigger = z.infer<typeof Trigger>;
/**
 * Default trigger list applied when a skill omits the `triggers:` block.
 * Pinned to a single `tool_call` entry for back-compat with every Phase
 * 1–7 pack authored before AUTO.1 widened the Event union.
 */
export declare const DEFAULT_TRIGGERS: readonly Trigger[];
/**
 * Build a fresh, mutable copy of the default trigger list — used by Zod
 * `.default(fn)` so each parsed skill gets its own array instance.
 */
export declare function defaultTriggers(): Trigger[];
//# sourceMappingURL=event.d.ts.map