import { Hono } from "hono";
import { type ConfigurationDefinition, type ConfigurationOverride, type ConfigurationScope, type EffectiveConfiguration, type MutationContext, type ProviderOperationContext, type ProjectId } from "@awp/contracts";
import { type AccountProvider, type I1LifecycleService, type WorkspaceExecutionDispatcher } from "@awp/application";
import type { AccountLoginManager } from "./account-login.js";
import type { OperatorSessionManager } from "./operator-session.js";
export interface ControlPlaneHealth {
    readonly status: "ok" | "error";
    readonly database: "postgresql";
    readonly migrations: {
        readonly applied: number;
        readonly expected: number;
        readonly pending: number;
        readonly drift: readonly string[];
    };
}
export interface ConfigurationHttpAuthority {
    listDefinitions(): Promise<readonly ConfigurationDefinition<unknown>[]>;
    listOverrides(definitionKey: string): Promise<readonly ConfigurationOverride<unknown>[]>;
    resolve(definitionKey: string, scopes: readonly {
        readonly scopeType: ConfigurationScope;
        readonly scopeId: string;
    }[]): Promise<EffectiveConfiguration<unknown> | undefined>;
    setOverride(input: {
        readonly definitionKey: string;
        readonly scopeType: ConfigurationScope;
        readonly scopeId: string;
        readonly value: unknown;
        readonly context: MutationContext;
    }): Promise<ConfigurationOverride<unknown>>;
    deleteOverride(definitionKey: string, scopeType: ConfigurationScope, scopeId: string, context: MutationContext): Promise<void>;
}
export interface ControlPlaneHttpDependencies {
    readonly lifecycle: I1LifecycleService;
    readonly execution?: WorkspaceExecutionDispatcher;
    readonly accountProvider?: AccountProvider;
    readonly accountProviderContext?: (context: MutationContext) => ProviderOperationContext;
    readonly accountLogin?: AccountLoginManager;
    readonly sessionManager?: OperatorSessionManager;
    readonly configuration?: ConfigurationHttpAuthority;
    readonly health: () => Promise<ControlPlaneHealth>;
    readonly contextFactory?: (projectId?: ProjectId) => MutationContext;
    readonly systemContextFactory?: (projectId?: ProjectId) => MutationContext;
}
export declare function systemMutationContext(projectId?: ProjectId): MutationContext;
export declare function createControlPlaneApp(deps: ControlPlaneHttpDependencies): Hono;
//# sourceMappingURL=app.d.ts.map