export type LspFormatDocumentBoundary = "input" | "contract" | "governance" | "scope";
export type LspFormatDocumentGate = {
    accepted: boolean;
    reason?: string;
};
export type LspFormatDocumentOptions = {
    tabSize?: number;
    insertSpaces?: boolean;
    trimTrailingWhitespace?: boolean;
    insertFinalNewline?: boolean;
};
export type LspFormatDocumentRequest = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    documentUri?: string;
    languageId?: string;
    options?: LspFormatDocumentOptions;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    contract?: LspFormatDocumentGate;
    governance?: LspFormatDocumentGate;
};
export type LspFormatDocumentErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_DOCUMENT_URI" | "INVALID_FORMAT_OPTIONS" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_LSP_CALL_NOT_ALLOWED";
export type LspFormatDocumentError = {
    code: LspFormatDocumentErrorCode;
    message: string;
    boundary: LspFormatDocumentBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type LspFormatDocumentPlan = {
    tool: "code.lsp_formatDocument";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    documentUri: string;
    languageId?: string;
    options: Required<LspFormatDocumentOptions>;
    acceptedScopes: readonly string[];
    execution: {
        dryRun: true;
        lspServerInvoked: false;
        fileMutationPlanned: false;
        unsafeSideEffects: false;
    };
    audit: {
        capability: "format-document";
        governanceRequired: true;
        tapDelegation: "basic-tool-primitive";
    };
};
export type LspFormatDocumentResult = {
    ok: true;
    plan: LspFormatDocumentPlan;
    events: readonly string[];
} | {
    ok: false;
    error: LspFormatDocumentError;
    events: readonly string[];
};
export declare const lspFormatDocumentDescriptor: {
    readonly tool: "code.lsp_formatDocument";
    readonly capability: "format-document";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.lsp";
    readonly unsafeSideEffects: false;
    readonly firstRoundExecution: "dry-run-envelope";
};
export declare function createLspFormatDocumentPlan(request?: LspFormatDocumentRequest): LspFormatDocumentResult;
