/**
 * Body-growth threshold above which a reclassify is allowed. Below this the
 * gate returns "skip" because section topology is unlikely to have shifted.
 * Picked to fire on roughly 2-3 new messages in a 10-message thread.
 */
export declare const KD_CLASSIFY_GROWTH_THRESHOLD = 0.25;
export interface GateInputs {
    bodyLen: number;
    /** Body length at the previous successful classify; 0 / null means never classified. */
    lastClassifiedBodyLength: number;
}
export interface GateDecision {
    action: "skip" | "proceed";
    growthPct: number;
    /** Human-readable skip reason when action === "skip". */
    reason: string | null;
}
/** Decide whether a classify call should proceed based on body-length delta. */
export declare function decideGate({ bodyLen, lastClassifiedBodyLength }: GateInputs): GateDecision;
/**
 * Write the KD's body to a deterministic temp-file path so the librarian can
 * feed it through memory-ingest-extract → memory-ingest unchanged. Deterministic
 * path = idempotent under repeat calls; the file is overwritten if it exists.
 */
export declare function writeClassifyTempFile(accountDir: string, attachmentId: string, body: string): Promise<string>;
/**
 * Build the dispatch envelope the operator-visible tool returns. Admin reads
 * the envelope and uses the Task tool to dispatch the librarian specialist;
 * librarian runs the document-ingest skill against `tempFilePath` with the
 * named `attachmentId` so the resulting :Section children land under the
 * pre-existing :KnowledgeDocument (memory-ingest is keyed on attachmentId).
 */
export declare function buildDispatchEnvelope(opts: {
    attachmentId: string;
    source: string;
    tempFilePath: string;
    bodyLen: number;
    lastClassifiedBodyLength: number;
    growthPct: number;
}): string;
//# sourceMappingURL=kd-classify-gate.d.ts.map