import { readConfigFileSnapshotForWrite } from "../../config/config.js";
import type { KlawConfig } from "../../config/types.klaw.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: KlawConfig, next: KlawConfig): boolean;
export declare function didActiveSharedGatewayAuthChange(params: {
    fallbackPrev: KlawConfig;
    next: KlawConfig;
}): boolean;
export declare function commitGatewayConfigWrite(params: {
    snapshot: ConfigWriteSnapshot;
    writeOptions: ConfigWriteOptions;
    nextConfig: KlawConfig;
    context?: GatewayRequestContext;
    disconnectSharedAuthClients?: boolean;
}): Promise<{
    path: string;
    config: KlawConfig;
    queueFollowUp: () => void;
}>;
export declare function resolveGatewayConfigRestartWriteResult(params: {
    requestParams: unknown;
    kind: RestartSentinelPayload["kind"];
    mode: "config.patch" | "config.apply";
    configPath: string;
    changedPaths: string[];
    nextConfig: KlawConfig;
    actor: ControlPlaneActor;
    context?: GatewayRequestContext;
}): Promise<{
    payload: RestartSentinelPayload;
    sentinelPath: string | null;
    restart: ReturnType<typeof scheduleGatewaySigusr1Restart> | undefined;
}>;
