export type GitAmendLastCommitPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitAmendLastCommitRiskCategory = "history-mutation";
export type GitAmendLastCommitGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitAmendLastCommitContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitAmendLastCommitGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitAmendLastCommitPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitAmendLastCommitTarget = {
    repositoryPath: string;
    commitMessage?: string;
    noEdit: boolean;
    includeAllTracked: boolean;
    resetAuthor: boolean;
};
export type GitAmendLastCommitRequest = {
    target?: Partial<GitAmendLastCommitTarget>;
    context?: GitAmendLastCommitContext;
    provider?: GitAmendLastCommitProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    commitMessage?: string;
    message?: string;
    noEdit?: boolean;
    includeAllTracked?: boolean;
    all?: boolean;
    resetAuthor?: boolean;
    dryRun?: boolean;
};
export type GitAmendLastCommitRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-amend-last-commit";
    allowedSubcommand: "commit";
};
export type GitAmendLastCommitRisk = {
    category: GitAmendLastCommitRiskCategory;
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: false;
    mutatesIndex: true;
    amendsCommit: true;
    rewritesHistory: true;
    mayStageTrackedChanges: boolean;
    mayResetAuthor: boolean;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitAmendLastCommitEnvelope = {
    parser: "git-amend-output-v1";
    commitMessage?: string;
    noEdit: boolean;
    includeAllTracked: boolean;
    resetAuthor: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    branchName?: string;
    commitHash?: string;
    subject?: string;
    filesChanged?: number;
    commitAmended: boolean;
};
export type GitAmendLastCommitOutput = {
    kind: "agentCore.basicTool.git.amendLastCommit";
    target: GitAmendLastCommitTarget;
    runtimeEntry: GitAmendLastCommitRuntimeEntry;
    risk: GitAmendLastCommitRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitAmendLastCommitPermission[];
    unsafeSideEffects: true;
    amendsCommit: true;
    rewritesHistory: true;
    resultEnvelope: GitAmendLastCommitEnvelope;
};
export type GitAmendLastCommitPlan = {
    toolId: "git.amendLastCommit";
    toolKind: "git.amendLastCommit";
    capability: "amend-last-commit";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    commitMessage?: string;
    noEdit: boolean;
    includeAllTracked: boolean;
    resetAuthor: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitAmendLastCommitPermission[];
    runtimeEntry: GitAmendLastCommitRuntimeEntry;
    risk: GitAmendLastCommitRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateRepository: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-commit-runtime-guard";
        event: "basicTool.git.amendLastCommit.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitAmendLastCommitErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitAmendLastCommitErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_REQUIRED_FIELD" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitAmendLastCommitError = {
    code: GitAmendLastCommitErrorCode;
    message: string;
    boundary: GitAmendLastCommitErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitAmendLastCommitAuditEvent = {
    type: string;
    toolId: "git.amendLastCommit";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitAmendLastCommitResult = {
    ok: true;
    toolId: "git.amendLastCommit";
    output: GitAmendLastCommitOutput;
    plan: GitAmendLastCommitPlan;
    audit: readonly GitAmendLastCommitAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.amendLastCommit";
    error: GitAmendLastCommitError;
    audit: readonly GitAmendLastCommitAuditEvent[];
    events: readonly string[];
};
export type GitAmendLastCommitProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitAmendLastCommitProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitAmendLastCommitProvider = (request: GitAmendLastCommitProviderRequest, context: GitAmendLastCommitContext) => GitAmendLastCommitProviderResult | Promise<GitAmendLastCommitProviderResult>;
export declare const gitAmendLastCommitDescriptor: {
    readonly toolId: "git.amendLastCommit";
    readonly toolKind: "git.amendLastCommit";
    readonly capability: "amend-last-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 parseGitAmendLastCommitResult(providerResult: GitAmendLastCommitProviderResult | undefined, target: GitAmendLastCommitTarget): GitAmendLastCommitEnvelope;
export declare function planGitLastCommitAmend(request?: GitAmendLastCommitRequest): GitAmendLastCommitResult;
export declare const planGitAmendLastCommit: typeof planGitLastCommitAmend;
export declare function executeGitAmendLastCommit(request?: GitAmendLastCommitRequest): Promise<GitAmendLastCommitResult>;
