/**
 * `unloads_when` condition evaluator.
 *
 * Skills declare exit conditions as a list of `UnloadCondition` entries. The
 * runtime walks the list per `TickState` snapshot and asks: "should this
 * skill leave context now?" Like `when_to_load`, semantics are OR — any
 * condition fires → unload. The evaluator is pure: tick state in, boolean
 * out, no I/O.
 *
 * Authoritative source: `docs/opensquid-real-design.md` §"Skill format" +
 * §"Skill properties" + spec `docs/tasks/phase-3-dynamic-loading.md` task 3.2.
 *
 * Three condition kinds:
 *
 *   active_task_completes — fires when the wrapping task closes (Stop event).
 *   session_ends          — fires when the host session terminates.
 *   idle_n_turns          — fires after `n` UserPromptSubmit cycles without
 *                           skill activation. "Turn" is locked to a
 *                           UserPromptSubmit cycle (see `tick.ts`) — NOT a
 *                           tool call. Definition pinned per memory
 *                           `feedback_workflow_cycle`.
 *
 * Shorthand surface — pack authors write the no-arg conditions as bare
 * strings:
 *
 *   unloads_when:
 *     - active_task_completes        # canonical: { kind: active_task_completes }
 *     - session_ends                 # canonical: { kind: session_ends }
 *     - idle_n_turns: 5              # canonical: { kind: idle_n_turns, n: 5 }
 *
 * `normalizeUnloadCondition` accepts either form; canonical form passes
 * through unchanged.
 *
 * Imports from: zod.
 * Imported by: src/packs/schemas/skill.ts, src/runtime/index.ts, src/runtime/tick.ts.
 */
import { z } from 'zod';
export declare const UnloadConditionCanonical: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"active_task_completes">;
}, "strip", z.ZodTypeAny, {
    kind: "active_task_completes";
}, {
    kind: "active_task_completes";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"session_ends">;
}, "strip", z.ZodTypeAny, {
    kind: "session_ends";
}, {
    kind: "session_ends";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"idle_n_turns">;
    n: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    kind: "idle_n_turns";
    n: number;
}, {
    kind: "idle_n_turns";
    n: number;
}>]>;
export type UnloadCondition = z.infer<typeof UnloadConditionCanonical>;
export declare function normalizeUnloadCondition(raw: unknown): unknown;
export declare const UnloadCondition: z.ZodEffects<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"active_task_completes">;
}, "strip", z.ZodTypeAny, {
    kind: "active_task_completes";
}, {
    kind: "active_task_completes";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"session_ends">;
}, "strip", z.ZodTypeAny, {
    kind: "session_ends";
}, {
    kind: "session_ends";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"idle_n_turns">;
    n: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
    kind: "idle_n_turns";
    n: number;
}, {
    kind: "idle_n_turns";
    n: number;
}>]>, {
    kind: "active_task_completes";
} | {
    kind: "session_ends";
} | {
    kind: "idle_n_turns";
    n: number;
}, unknown>;
export interface TickState {
    turnsSinceActivation: number;
    taskCompleted: boolean;
    sessionEnded: boolean;
}
export declare function shouldUnload(conditions: readonly UnloadCondition[], tick: Readonly<TickState>): boolean;
//# sourceMappingURL=unload_conditions.d.ts.map