import { type Plan, type JsonValue, type PlanCapability, type PlanChannel, type PlanCondition, type PlanDisposition, type PlanEffect, type PlanInterruptLifetime, type PlanMotionEffect, type PlanSurfaceOrdering } from "./types.js"; export interface PlanCompileContext { states?: ReadonlySet; capabilities?: ReadonlySet; contentIds?: ReadonlySet; targets?: ReadonlySet; validateSelector?: (selector: string) => boolean; validatePath?: (path: string) => boolean; } export interface CompiledPlanStateSelection { readonly kind: "state" | "capability"; readonly name: string; } export interface CompiledPlanSurface { readonly id: string; readonly channel: `surface:${string}`; readonly contentId: string; readonly dataSource?: "event-payload"; readonly disposition?: PlanDisposition; readonly ordering?: Readonly; readonly data?: JsonValue; } export interface CompiledPlanEffect { readonly channels: readonly PlanChannel[]; readonly state?: Readonly; readonly motion?: Readonly; readonly surfaces: readonly CompiledPlanSurface[]; readonly until?: Readonly; } export interface CompiledPlanRule { readonly id: string; readonly when: Readonly; readonly effect: Readonly; } export interface CompiledPlan { readonly baseline: Readonly; readonly rules: readonly Readonly[]; } export interface PlanEventState { readonly ordering: Map; readonly sessions: Map; } export interface PlanEventInput { source: "browser" | "application"; name: string; payload?: unknown; } export interface PlanEventEvaluation { readonly status: "matched" | "unmatched" | "stale" | "closed" | "invalid"; readonly rules: readonly Readonly[]; readonly effects: readonly Readonly[]; readonly rejectedSurfaces: readonly Readonly[]; } export interface PlanEventSurfaceRejection { readonly channel: CompiledPlanSurface["channel"]; readonly status: "stale" | "closed" | "invalid"; } export interface PlanCompileDiagnostic { readonly code: string; readonly path: string; readonly message: string; } export type PlanPreflightResult = { readonly valid: true; readonly plan: CompiledPlan; readonly errors: readonly []; } | { readonly valid: false; readonly plan: undefined; readonly errors: readonly Readonly[]; }; export declare class PlanCompileError extends TypeError { readonly code: string; readonly path: string; constructor(code: string, path: string, message: string); } export declare function compilePlan(input: Plan, context?: PlanCompileContext): CompiledPlan; /** Compile one temporary Effect without creating a second Plan evaluator. */ export declare function compileOverrideEffect(input: PlanEffect, context?: PlanCompileContext): CompiledPlanEffect; export declare function preflightPlan(input: Plan, context?: PlanCompileContext): PlanPreflightResult; export declare function createPlanEventState(): PlanEventState; export declare function evaluatePlanEvent(plan: CompiledPlan, state: PlanEventState, input: PlanEventInput): PlanEventEvaluation; export declare function selectCompiledEffectChannels(effect: CompiledPlanEffect, channels: readonly PlanChannel[]): CompiledPlanEffect | undefined; //# sourceMappingURL=plan-compiler.d.ts.map