import type { ModuleCommandResult, ModuleLifecycleContext } from "../../../contracts/module-contract.js";
import type { ModuleStateRow } from "../../../core/state/unified-state-db.js";
import type { OpenedPlanningStores } from "./planning-open.js";
import type { TaskStore } from "./store.js";
export { MODULE_STATE_PLANNING_SYNC_ALLOWLIST } from "../task-state-events/module-state-planning-sync-allowlist.js";
export declare function computeNextModuleStateRevision(current: ModuleStateRow | null): {
    expectedStateSchemaVersion: number;
    nextStateSchemaVersion: number;
};
export declare function publishModuleStatePlanningEventIfAllowed(input: {
    ctx: ModuleLifecycleContext;
    moduleId: string;
    stateSchemaVersion: number;
    state: Record<string, unknown>;
    updatedAt: string;
    expectedStateSchemaVersion?: number;
    removed?: boolean;
    commandName: string;
    clientMutationId?: string;
    policyApproval?: {
        confirmed: boolean;
        rationale: string;
    };
    store?: TaskStore;
    planning?: OpenedPlanningStores;
}): Promise<ModuleCommandResult | null>;
/** Read current row, bump revision when git-sync allowlisted, persist SQLite, publish when canonical authority. */
export declare function persistAllowlistedModuleStateWithPlanningSync(args: {
    workspacePath: string;
    effectiveConfig?: Record<string, unknown>;
    moduleId: string;
    state: Record<string, unknown>;
    updatedAt?: string;
    removed?: boolean;
    commandName: string;
    clientMutationId?: string;
    policyApproval?: {
        confirmed: boolean;
        rationale: string;
    };
    /** Document schema version for non-git-sync saves (ignored when revision bump applies). */
    documentSchemaVersion?: number;
}): Promise<ModuleCommandResult | null>;
