import { readConfigFileSnapshotForWrite } from "../../config/config.js";
import type { DaoCoreConfig } from "../../config/types.daocore.js";
import { type RestartSentinelPayload } from "../../infra/restart-sentinel.js";
import { scheduleGatewaySigusr1Restart } from "../../infra/restart.js";
import { type ControlPlaneActor } from "../control-plane-audit.js";
import type { GatewayRequestContext } from "./types.js";
export type ConfigWriteSnapshot = Awaited<ReturnType<typeof readConfigFileSnapshotForWrite>>["snapshot"];
export type ConfigWriteOptions = Awaited<ReturnType<typeof readConfigFileSnapshotForWrite>>["writeOptions"];
export declare function resolveGatewayConfigPath(snapshot?: Pick<ConfigWriteSnapshot, "path">): string;
export declare function didSharedGatewayAuthChange(prev: DaoCoreConfig, next: DaoCoreConfig): boolean;
export declare function didActiveSharedGatewayAuthChange(params: {
    fallbackPrev: DaoCoreConfig;
    next: DaoCoreConfig;
}): boolean;
export declare function commitGatewayConfigWrite(params: {
    snapshot: ConfigWriteSnapshot;
    writeOptions: ConfigWriteOptions;
    nextConfig: DaoCoreConfig;
    context?: GatewayRequestContext;
    disconnectSharedAuthClients?: boolean;
}): Promise<{
    path: string;
    config: DaoCoreConfig;
    queueFollowUp: () => void;
}>;
export declare function resolveGatewayConfigRestartWriteResult(params: {
    requestParams: unknown;
    kind: RestartSentinelPayload["kind"];
    mode: "config.patch" | "config.apply";
    configPath: string;
    changedPaths: string[];
    nextConfig: DaoCoreConfig;
    actor: ControlPlaneActor;
    context?: GatewayRequestContext;
}): Promise<{
    payload: RestartSentinelPayload;
    sentinelPath: string | null;
    restart: ReturnType<typeof scheduleGatewaySigusr1Restart> | undefined;
}>;
