/**
 * @license
 * Copyright 2026 Amodal Labs, Inc.
 * SPDX-License-Identifier: MIT
 */
import type { BatchChange, ChangeProposal, StudioDeploy, StudioDeploySettings, StudioSourceRef } from "./types.js";
export interface LocalDeployPolicy {
    promote: boolean;
    startRuntime: boolean;
}
export interface CreateChangeProposalInput {
    baseDeployId: string;
    title?: string;
    branch?: string;
    authorId: string;
}
export interface CommitProposalChangesInput {
    proposalId: string;
    baseDeployId: string;
    message: string;
    changes: BatchChange[];
}
export interface DeploySourceInput {
    sourceId: string;
    authorId: string;
}
export interface ChangeProposalBackend {
    createProposal(req: Request, input: CreateChangeProposalInput): Promise<ChangeProposal>;
    commitChanges(req: Request, input: CommitProposalChangesInput): Promise<ChangeProposal>;
    getProposal(req: Request, proposalId: string): Promise<ChangeProposal | null>;
    listBranches?(req: Request): Promise<string[]>;
    listSourceRefs?(req: Request): Promise<StudioSourceRef[]>;
    deploySource?(req: Request, input: DeploySourceInput): Promise<StudioDeploy>;
    listSourceFiles?(req: Request, sourceId: string): Promise<FileTreeEntry[]>;
    getSourceFile?(req: Request, sourceId: string, filePath: string): Promise<SourceFileData>;
}
interface FileTreeEntry {
    name: string;
    path: string;
    type: "file" | "directory";
    children?: FileTreeEntry[];
    source?: "local" | "package";
}
interface SourceFileData {
    path: string;
    content: string;
    language: string;
    source: "local" | "package";
}
export declare function localDeployPolicyForBranch(settings: StudioDeploySettings, branch: string): LocalDeployPolicy;
export declare function setChangeProposalBackend(backend: ChangeProposalBackend): void;
export declare function getChangeProposalBackend(): ChangeProposalBackend;
export {};
