export interface SessionLike {
    run(query: string, params?: Record<string, unknown>): Promise<{
        records: Array<{
            get(key: string): unknown;
        }>;
    }>;
}
export interface GateArgs {
    session: SessionLike;
    accountId: string;
    labels: string[];
}
/**
 * Gate result.
 *
 * The `reason` discriminator stays narrow for backward compatibility: existing
 * callers (error UI, SKILL.md prose) key on `"no-admin-user"` / `"no-local-business"`
 * and continue working unchanged. The `subReason` field is the
 * additive observability surface — it distinguishes the two sub-cases of
 * `"no-admin-user"` (no node at all vs node with null accountId) and the two
 * sub-cases of `"no-local-business"` (kept generic for now since no consumer
 * needs the split). Loud diagnostic for operators reading the reject log line.
 *
 * After the seed-stamping + boot-time self-heal land, the
 * `"admin-user-no-accountid"` subReason should never fire in production —
 * it remains as a defensive surface in case a future regression resurrects
 * null-accountId state.
 */
export type GateResult = {
    ok: true;
} | {
    ok: false;
    reason: "no-admin-user" | "no-local-business";
    subReason: "no-admin-user-node" | "admin-user-no-accountid" | "no-business-or-personal-profile";
    message: string;
};
/** Compiled-truth cap. ≤2000 chars ≈ 300 words — forces the rewriter to summarise, not transcribe. */
export declare const COMPILED_TRUTH_MAX_CHARS = 2000;
export type PropertyGateResult = {
    ok: true;
} | {
    ok: false;
    reason: "compiled-truth-too-long";
    message: string;
};
/**
 * Property-level write gate (Task 306, extended Task 392). The cap applies
 * to both `compiledTruth` and its public twin `compiledTruthPublic`; either
 * field exceeding COMPILED_TRUTH_MAX_CHARS rejects the write. Used by both
 * `memory-write` and `memory-update`; the rewriter calls it before writing too.
 *
 * Pure / synchronous on purpose — no session needed. Loud-fail on
 * violation so an over-producing rewriter surfaces immediately instead
 * of silently truncating the operator's summary.
 */
export declare function checkPropertyWriteGate(args: {
    properties: Record<string, unknown>;
}): PropertyGateResult;
export type LabelGateResult = {
    ok: true;
} | {
    ok: false;
    reason: "forbidden-label";
    forbiddenLabel: string;
    message: string;
};
/**
 * Label-level write gate (compiled-truth rewriter). Rejects any agent-side write
 * whose labels include a FORBIDDEN_LABEL. Pure / synchronous — no
 * session needed.
 */
export declare function checkLabelWriteGate(args: {
    labels: string[];
}): LabelGateResult;
export declare function checkGraphWriteGate(args: GateArgs): Promise<GateResult>;
//# sourceMappingURL=graph-write-gate.d.ts.map