export type GitGetWorkingTreeDiffPermission = "git:read" | "filesystem:read";
export type GitWorkingTreeDiffMode = "unstaged" | "staged" | "combined";
export type GitWorkingTreeDiffGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitGetWorkingTreeDiffContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitWorkingTreeDiffGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitGetWorkingTreeDiffPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitGetWorkingTreeDiffTarget = {
    repositoryPath: string;
    mode: GitWorkingTreeDiffMode;
    compareRef?: string;
    pathspecs: readonly string[];
    contextLines?: number;
};
export type GitGetWorkingTreeDiffRequest = {
    target?: Partial<GitGetWorkingTreeDiffTarget>;
    context?: GitGetWorkingTreeDiffContext;
    provider?: GitWorkingTreeDiffProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    mode?: GitWorkingTreeDiffMode;
    compareRef?: string;
    pathspecs?: readonly string[];
    contextLines?: number;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
};
export type GitWorkingTreeDiffRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-diff-read";
    allowedSubcommand: "diff";
};
export type GitWorkingTreeDiffRisk = {
    category: "read-only-inspection";
    riskLevel: "normal";
    mutatesRepository: false;
    mutatesWorkingTree: false;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitWorkingTreeDiffFileEnvelope = {
    oldPath?: string;
    newPath?: string;
    status: "modified" | "added" | "deleted" | "renamed" | "copied" | "unknown";
};
export type GitWorkingTreeDiffEnvelope = {
    parser: "git-diff-raw-v1";
    files: readonly GitWorkingTreeDiffFileEnvelope[];
    hunkCount: number;
    rawLineCount: number;
};
export type GitGetWorkingTreeDiffOutput = {
    kind: "agentCore.basicTool.git.getWorkingTreeDiff";
    target: GitGetWorkingTreeDiffTarget;
    runtimeEntry: GitWorkingTreeDiffRuntimeEntry;
    risk: GitWorkingTreeDiffRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitGetWorkingTreeDiffPermission[];
    unsafeSideEffects: false;
    resultEnvelope: GitWorkingTreeDiffEnvelope;
};
export type GitGetWorkingTreeDiffPlan = {
    toolId: "git.getWorkingTreeDiff";
    toolKind: "git.getWorkingTreeDiff";
    capability: "read-working-tree-diff";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    mode: GitWorkingTreeDiffMode;
    compareRef?: string;
    pathspecs: readonly string[];
    contextLines?: number;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitGetWorkingTreeDiffPermission[];
    runtimeEntry: GitWorkingTreeDiffRuntimeEntry;
    risk: GitWorkingTreeDiffRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldReadWorkingTree: true;
    unsafeSideEffects: false;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-diff-runtime-guard";
        event: "basicTool.git.getWorkingTreeDiff.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitGetWorkingTreeDiffErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitGetWorkingTreeDiffErrorCode = "MISSING_RUNTIME_ID" | "MISSING_REPOSITORY_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_DIFF_MODE" | "INVALID_COMPARE_REF" | "INVALID_PATHSPEC" | "PATHSPEC_OUTSIDE_SCOPE" | "INVALID_CONTEXT_LINES" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitGetWorkingTreeDiffError = {
    code: GitGetWorkingTreeDiffErrorCode;
    message: string;
    boundary: GitGetWorkingTreeDiffErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitGetWorkingTreeDiffAuditEvent = {
    type: string;
    toolId: "git.getWorkingTreeDiff";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitGetWorkingTreeDiffResult = {
    ok: true;
    toolId: "git.getWorkingTreeDiff";
    output: GitGetWorkingTreeDiffOutput;
    plan: GitGetWorkingTreeDiffPlan;
    audit: readonly GitGetWorkingTreeDiffAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.getWorkingTreeDiff";
    error: GitGetWorkingTreeDiffError;
    audit: readonly GitGetWorkingTreeDiffAuditEvent[];
    events: readonly string[];
};
export type GitWorkingTreeDiffProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitWorkingTreeDiffProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitWorkingTreeDiffProvider = (request: GitWorkingTreeDiffProviderRequest, context: GitGetWorkingTreeDiffContext) => GitWorkingTreeDiffProviderResult | Promise<GitWorkingTreeDiffProviderResult>;
export declare const gitGetWorkingTreeDiffDescriptor: {
    readonly toolId: "git.getWorkingTreeDiff";
    readonly toolKind: "git.getWorkingTreeDiff";
    readonly capability: "read-working-tree-diff";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.inspection";
    readonly supportedModes: readonly ["unstaged", "staged", "combined"];
    readonly defaultMode: "unstaged";
    readonly defaultDryRun: true;
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "read-only-inspection";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
};
export declare function parseGitWorkingTreeDiff(stdout: string): GitWorkingTreeDiffEnvelope;
export declare function planGetWorkingTreeDiff(request?: GitGetWorkingTreeDiffRequest): GitGetWorkingTreeDiffResult;
export declare function executeGitWorkingTreeDiff(request?: GitGetWorkingTreeDiffRequest): Promise<GitGetWorkingTreeDiffResult>;
