import type { CodeToolResult } from "../../_shared/baseToolAdapter.js";
import { type CodeEditContext, type CodeEditGate, type CodeEditProvider } from "../_shared/editCore.js";
export type CodeDeleteBoundary = "input" | "contract" | "governance" | "scope" | "provider";
export type CodeDeleteGate = CodeEditGate & {
    accepted: boolean;
    reason?: string;
};
export type CodeDeleteKind = "file" | "directory" | "code-range";
export type CodeDeleteRange = {
    startLine: number;
    endLine: number;
};
export type CodeDeleteRequest = {
    workspaceRoot?: string;
    targetPath?: string;
    deleteKind?: CodeDeleteKind;
    range?: CodeDeleteRange;
    reason?: string;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    contract?: CodeDeleteGate;
    governance?: CodeDeleteGate;
    guard?: CodeEditGate;
    context?: CodeEditContext;
    provider?: CodeDeleteProvider;
    deleter?: CodeDeleteProvider;
    metadata?: Readonly<Record<string, unknown>>;
};
export type CodeDeleteProvider = Pick<CodeEditProvider, "readText" | "writeText" | "deletePath">;
export type CodeDeleteErrorCode = "MISSING_WORKSPACE_ROOT" | "MISSING_TARGET_PATH" | "TARGET_OUT_OF_SCOPE" | "INVALID_DELETE_RANGE" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_SIDE_EFFECT_NOT_ALLOWED" | "APPROVAL_REQUIRED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_FAILURE";
export type CodeDeleteError = {
    code: CodeDeleteErrorCode;
    message: string;
    boundary: CodeDeleteBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type CodeDeletePlan = {
    tool: "code.delete";
    capability: "delete-code-or-file";
    workspaceRoot: string;
    targetPath: string;
    deleteKind: CodeDeleteKind;
    range?: CodeDeleteRange;
    reason?: string;
    requiredPermission: "filesystem:delete";
    requiresTapApproval: true;
    dispatch: "dry-run";
    dryRun: true;
    wouldDelete: true;
    unsafeSideEffects: false;
    acceptedScopes: readonly string[];
    audit: {
        guard: "target-scope-and-approval";
        event: "basicTool.code.delete.planned";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type CodeDeleteOutput = {
    kind: "agentCore.basicTool.code.delete.output";
    targetPath: string;
    deleteKind: CodeDeleteKind;
    range?: CodeDeleteRange;
    reason?: string;
    deleted: boolean;
    deletedLines: number;
    bytesWritten: number;
    applied: boolean;
    dryRun: boolean;
    unsafeSideEffects: false;
};
export type CodeDeleteResult = {
    ok: true;
    plan: CodeDeletePlan;
    events: readonly string[];
} | {
    ok: false;
    error: CodeDeleteError;
    events: readonly string[];
};
export declare const codeDeleteDescriptor: {
    readonly tool: "code.delete";
    readonly capability: "delete-code-or-file";
    readonly layer: "agent_executionEngine.basic_toolLayer.baseTools.codeBase.edit";
    readonly defaultDispatch: "dry-run";
    readonly requiresTapApproval: true;
    readonly unsafeSideEffects: false;
};
export declare function planCodeDelete(request?: CodeDeleteRequest): CodeDeleteResult;
export declare function executeCodeDelete(request?: CodeDeleteRequest): Promise<CodeToolResult<CodeDeleteOutput, CodeDeleteErrorCode>>;
