import type { CanonicalStateEventV1 } from "./canonical-state-events.js";
import type { TaskStateEventV1 } from "./event-payloads.js";
import type { PlanningStateProjectionV1 } from "./planning-projection-types.js";
import type { TaskStateProjectionV1 } from "./projection-types.js";
export type CanonicalEventAdmissionErrorCode = "unsupported-schema-version" | "unknown-event-kind" | "schema-validation-failed" | "duplicate-idempotency-key" | "invalid-lifecycle-transition" | "duplicate-task-id" | "task-not-found" | "workspace-revision-mismatch" | "module-state-schema-version-mismatch" | "replay-conflict";
export type CanonicalEventAdmissionError = {
    code: CanonicalEventAdmissionErrorCode;
    message: string;
    details?: string[];
};
export type CanonicalEventAdmissionContext = {
    priorEvents?: CanonicalStateEventV1[];
    initialTaskProjection?: TaskStateProjectionV1;
    initialPlanningProjection?: PlanningStateProjectionV1;
};
export declare function admitCanonicalStateEvent(input: unknown, context?: CanonicalEventAdmissionContext): {
    ok: true;
    event: CanonicalStateEventV1;
} | {
    ok: false;
    error: CanonicalEventAdmissionError;
};
export declare function admitCanonicalStateEventStream(inputs: unknown[], options?: CanonicalEventAdmissionContext): {
    ok: true;
    events: CanonicalStateEventV1[];
} | {
    ok: false;
    error: CanonicalEventAdmissionError;
};
/** Back-compat: task-only admission delegates to canonical stream. */
export declare function admitTaskStateEventStreamForCanonical(inputs: unknown[], options?: {
    priorEvents?: TaskStateEventV1[];
    initialProjection?: TaskStateProjectionV1;
}): ReturnType<typeof admitCanonicalStateEventStream>;
export declare function createEmptyCanonicalProjections(): {
    taskProjection: TaskStateProjectionV1;
    planningProjection: PlanningStateProjectionV1;
};
