export type LspFormatRangeBoundary = "input" | "contract" | "governance" | "scope";
export type LspFormatRangeGate = {
    accepted: boolean;
    reason?: string;
};
export type LspPosition = {
    line: number;
    character: number;
};
export type LspRange = {
    start: LspPosition;
    end: LspPosition;
};
export type LspFormatRangeOptions = {
    tabSize?: number;
    insertSpaces?: boolean;
};
export type LspFormatRangeRequest = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    documentUri?: string;
    languageId?: string;
    range?: LspRange;
    options?: LspFormatRangeOptions;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    contract?: LspFormatRangeGate;
    governance?: LspFormatRangeGate;
};
export type LspFormatRangeErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_DOCUMENT_URI" | "MISSING_RANGE" | "INVALID_RANGE" | "INVALID_FORMAT_OPTIONS" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_LSP_CALL_NOT_ALLOWED";
export type LspFormatRangeError = {
    code: LspFormatRangeErrorCode;
    message: string;
    boundary: LspFormatRangeBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type LspFormatRangePlan = {
    tool: "code.lsp_formatRange";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    documentUri: string;
    languageId?: string;
    range: LspRange;
    options: Required<LspFormatRangeOptions>;
    acceptedScopes: readonly string[];
    execution: {
        dryRun: true;
        lspServerInvoked: false;
        fileMutationPlanned: false;
        unsafeSideEffects: false;
    };
    audit: {
        capability: "format-range";
        governanceRequired: true;
        tapDelegation: "basic-tool-primitive";
    };
};
export type LspFormatRangeResult = {
    ok: true;
    plan: LspFormatRangePlan;
    events: readonly string[];
} | {
    ok: false;
    error: LspFormatRangeError;
    events: readonly string[];
};
export declare const lspFormatRangeDescriptor: {
    readonly tool: "code.lsp_formatRange";
    readonly capability: "format-range";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.lsp";
    readonly unsafeSideEffects: false;
    readonly firstRoundExecution: "dry-run-envelope";
};
export declare function createLspFormatRangePlan(request?: LspFormatRangeRequest): LspFormatRangeResult;
