export type GitRevertCommitPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitRevertCommitRiskCategory = "history-mutation";
export type GitRevertCommitGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitRevertCommitContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitRevertCommitGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitRevertCommitPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitRevertCommitTarget = {
    repositoryPath: string;
    commitRef: string;
    noCommit: boolean;
    mainlineParent?: number;
};
export type GitRevertCommitRequest = {
    target?: Partial<GitRevertCommitTarget>;
    context?: GitRevertCommitContext;
    provider?: GitRevertCommitProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    commitRef?: string;
    ref?: string;
    revision?: string;
    noCommit?: boolean;
    mainlineParent?: number;
    dryRun?: boolean;
};
export type GitRevertCommitRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-revert-commit";
    allowedSubcommand: "revert";
};
export type GitRevertCommitRisk = {
    category: GitRevertCommitRiskCategory;
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: true;
    mayCreateCommit: boolean;
    revertsCommit: true;
    mayCreateConflicts: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitRevertCommitEnvelope = {
    parser: "git-revert-output-v1";
    commitRef: string;
    noCommit: boolean;
    mainlineParent?: number;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    branchName?: string;
    commitHash?: string;
    subject?: string;
    filesChanged?: number;
    revertCompleted: boolean;
};
export type GitRevertCommitOutput = {
    kind: "agentCore.basicTool.git.revertCommit";
    target: GitRevertCommitTarget;
    runtimeEntry: GitRevertCommitRuntimeEntry;
    risk: GitRevertCommitRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitRevertCommitPermission[];
    unsafeSideEffects: true;
    revertsCommit: true;
    resultEnvelope: GitRevertCommitEnvelope;
};
export type GitRevertCommitPlan = {
    toolId: "git.revertCommit";
    toolKind: "git.revertCommit";
    capability: "revert-commit";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    commitRef: string;
    noCommit: boolean;
    mainlineParent?: number;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitRevertCommitPermission[];
    runtimeEntry: GitRevertCommitRuntimeEntry;
    risk: GitRevertCommitRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateRepository: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-history-mutation-runtime-guard";
        event: "basicTool.git.revertCommit.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitRevertCommitErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitRevertCommitErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_TARGET_REF" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitRevertCommitError = {
    code: GitRevertCommitErrorCode;
    message: string;
    boundary: GitRevertCommitErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitRevertCommitAuditEvent = {
    type: string;
    toolId: "git.revertCommit";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitRevertCommitResult = {
    ok: true;
    toolId: "git.revertCommit";
    output: GitRevertCommitOutput;
    plan: GitRevertCommitPlan;
    audit: readonly GitRevertCommitAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.revertCommit";
    error: GitRevertCommitError;
    audit: readonly GitRevertCommitAuditEvent[];
    events: readonly string[];
};
export type GitRevertCommitProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitRevertCommitProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitRevertCommitProvider = (request: GitRevertCommitProviderRequest, context: GitRevertCommitContext) => GitRevertCommitProviderResult | Promise<GitRevertCommitProviderResult>;
export declare const gitRevertCommitDescriptor: {
    readonly toolId: "git.revertCommit";
    readonly toolKind: "git.revertCommit";
    readonly capability: "revert-commit";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.commit";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "history-mutation";
    readonly permissionsRequired: readonly ["git:read", "git:write", "filesystem:read", "filesystem:write"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: true;
};
export declare function parseGitRevertCommitResult(providerResult: GitRevertCommitProviderResult | undefined, target: GitRevertCommitTarget): GitRevertCommitEnvelope;
export declare function planGitCommitRevert(request?: GitRevertCommitRequest): GitRevertCommitResult;
export declare const planGitRevertCommit: typeof planGitCommitRevert;
export declare function executeGitRevertCommit(request?: GitRevertCommitRequest): Promise<GitRevertCommitResult>;
