import type { DaemonApiRouteHandlers } from './context.js';
import type { AuthenticatedPrincipal } from './http-policy.js';
interface GatewayMethodDescriptorLike {
    readonly dangerous?: boolean;
    readonly access?: string;
}
interface GatewayMethodCatalogLike {
    list(options?: Record<string, unknown>): unknown;
    listEvents(options?: Record<string, unknown>): unknown;
    get(methodId: string): GatewayMethodDescriptorLike | null | undefined;
}
interface ControlPlaneGatewayLike {
    getSnapshot(): unknown;
    renderWebUi(): Response;
    listRecentEvents(limit: number): unknown;
    listSurfaceMessages(): unknown;
    listClients(): unknown;
    createEventStream(req: Request, input: Record<string, unknown>): Response | Promise<Response>;
}
interface ControlRouteContext {
    readonly authToken: string | null;
    readonly version: string;
    readonly sessionCookieName: string;
    readonly controlPlaneGateway: ControlPlaneGatewayLike;
    readonly extractAuthToken: (req: Request) => string;
    readonly resolveAuthenticatedPrincipal: (req: Request) => AuthenticatedPrincipal | null;
    readonly gatewayMethods: GatewayMethodCatalogLike;
    readonly getOperatorContract: () => unknown;
    readonly inspectInboundTls: (surface: 'controlPlane' | 'httpListener') => unknown;
    readonly inspectOutboundTls: () => unknown;
    readonly invokeGatewayMethodCall: (input: {
        readonly authToken: string;
        readonly methodId: string;
        readonly query?: Record<string, unknown>;
        readonly body?: unknown;
        readonly context?: {
            readonly principalId?: string;
            readonly principalKind?: 'user' | 'bot' | 'service' | 'token' | 'remote-peer';
            readonly admin?: boolean;
            readonly scopes?: readonly string[];
            readonly clientKind?: string;
        };
    }) => Promise<{
        status: number;
        ok: boolean;
        body: unknown;
    }>;
    readonly parseOptionalJsonBody: (req: Request) => Promise<Record<string, unknown> | null | Response>;
    readonly requireAdmin: (req: Request) => Response | null;
    readonly requireAuthenticatedSession: (req: Request) => {
        username: string;
        roles: readonly string[];
    } | null;
}
export declare function createDaemonControlRouteHandlers(context: ControlRouteContext, request: Request): Pick<DaemonApiRouteHandlers, 'getStatus' | 'getCurrentAuth' | 'getControlPlaneSnapshot' | 'getOperatorContract' | 'getControlPlaneWeb' | 'getControlPlaneRecentEvents' | 'getControlPlaneMessages' | 'getControlPlaneClients' | 'getGatewayMethods' | 'getGatewayEvents' | 'getGatewayMethod' | 'invokeGatewayMethod' | 'createControlPlaneEventStream'>;
export {};
//# sourceMappingURL=control-routes.d.ts.map