import { S as StoreOpts, _ as CommentTarget, c as CommentsSchema, f as Actor, g as CommentStatus, h as CommentInput, i as CommentSanitizationError, m as CommentAuthor, n as CommentModerationError, p as Comment, r as CommentNotFoundError, s as isCommentError, x as Sanitize } from "./errors-DEH0RQpz.js";
import { Querier } from "@platform-modules/db";
//#region src/moderation.d.ts
/** Default classify timeout — fail-safe lands pending on hang (spec §2). */
declare const CLASSIFY_TIMEOUT_MS = 10000;
type ModeratableStatus = Extract<CommentStatus, 'published' | 'pending' | 'spam'>;
interface CommentModerator {
  classify(c: {
    body: string;
    author: CommentAuthor;
    target: CommentTarget;
  }): Promise<{
    status: ModeratableStatus;
    reason?: string;
  }>;
}
interface AiClassifyClient {
  classify(input: {
    body: string;
    author: CommentAuthor;
    target: CommentTarget;
  }): Promise<{
    spamScore: number;
  }>;
}
/**
 * postModerated — classify then insert with moderator verdict (system authority).
 * Fail-safe: throw/timeout → pending, NEVER published.
 */
declare function postModerated(db: Querier<CommentsSchema>, input: CommentInput, actor: Actor | null, sanitize: Sanitize, moderator: CommentModerator, opts?: StoreOpts): Promise<Comment>;
/**
 * moderate — re-classify an existing comment (moderator queue).
 * Classifier errors propagate; existing status unchanged on failure.
 */
declare function moderate(db: Querier<CommentsSchema>, id: string, moderator: CommentModerator, actor: Actor, opts?: StoreOpts): Promise<Comment>;
/** Reference ai-backed moderator — client errors propagate to caller fail-safe. */
declare function aiModerator(client: AiClassifyClient, opts?: {
  threshold?: number;
}): CommentModerator;
//#endregion
export { AiClassifyClient, CLASSIFY_TIMEOUT_MS, CommentModerationError, CommentModerator, CommentNotFoundError, CommentSanitizationError, aiModerator, isCommentError, moderate, postModerated };