export type GitRestoreWorkingTreePermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitRestoreWorkingTreeGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitRestoreWorkingTreeContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitRestoreWorkingTreeGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitRestoreWorkingTreePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitRestoreWorkingTreeTarget = {
    repositoryPath: string;
    paths: readonly string[];
    sourceRef?: string;
};
export type GitRestoreWorkingTreeRequest = {
    target?: Partial<GitRestoreWorkingTreeTarget>;
    context?: GitRestoreWorkingTreeContext;
    provider?: GitRestoreWorkingTreeProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    paths?: readonly string[];
    sourceRef?: string;
    dryRun?: boolean;
};
export type GitRestoreWorkingTreeRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-restore-worktree-mutation";
    allowedSubcommand: "restore";
};
export type GitRestoreWorkingTreeRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: false;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitRestoreWorkingTreeEnvelope = {
    parser: "git-restore-exit-v1";
    paths: readonly string[];
    sourceRef?: string;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
};
export type GitRestoreWorkingTreeOutput = {
    kind: "agentCore.basicTool.git.restoreWorkingTree";
    target: GitRestoreWorkingTreeTarget;
    runtimeEntry: GitRestoreWorkingTreeRuntimeEntry;
    risk: GitRestoreWorkingTreeRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitRestoreWorkingTreePermission[];
    unsafeSideEffects: true;
    resultEnvelope: GitRestoreWorkingTreeEnvelope;
};
export type GitRestoreWorkingTreePlan = {
    toolId: "git.restoreWorkingTree";
    toolKind: "git.restoreWorkingTree";
    capability: "restore-working-tree";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    paths: readonly string[];
    sourceRef?: string;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitRestoreWorkingTreePermission[];
    runtimeEntry: GitRestoreWorkingTreeRuntimeEntry;
    risk: GitRestoreWorkingTreeRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateWorkingTree: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-restore-runtime-guard";
        event: "basicTool.git.restoreWorkingTree.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitRestoreWorkingTreeErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitRestoreWorkingTreeErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_TARGET_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_PATH" | "PATH_OUTSIDE_SCOPE" | "INVALID_SOURCE_REF" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitRestoreWorkingTreeError = {
    code: GitRestoreWorkingTreeErrorCode;
    message: string;
    boundary: GitRestoreWorkingTreeErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitRestoreWorkingTreeAuditEvent = {
    type: string;
    toolId: "git.restoreWorkingTree";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitRestoreWorkingTreeResult = {
    ok: true;
    toolId: "git.restoreWorkingTree";
    output: GitRestoreWorkingTreeOutput;
    plan: GitRestoreWorkingTreePlan;
    audit: readonly GitRestoreWorkingTreeAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.restoreWorkingTree";
    error: GitRestoreWorkingTreeError;
    audit: readonly GitRestoreWorkingTreeAuditEvent[];
    events: readonly string[];
};
export type GitRestoreWorkingTreeProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitRestoreWorkingTreeProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitRestoreWorkingTreeProvider = (request: GitRestoreWorkingTreeProviderRequest, context: GitRestoreWorkingTreeContext) => GitRestoreWorkingTreeProviderResult | Promise<GitRestoreWorkingTreeProviderResult>;
export declare const gitRestoreWorkingTreeDescriptor: {
    readonly toolId: "git.restoreWorkingTree";
    readonly toolKind: "git.restoreWorkingTree";
    readonly capability: "restore-working-tree";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.staging";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "workspace-mutation";
    readonly permissionsRequired: readonly ["git:read", "git:write", "filesystem:read", "filesystem:write"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: true;
};
export declare function parseGitRestoreWorkingTreeResult(providerResult: GitRestoreWorkingTreeProviderResult | undefined, target: GitRestoreWorkingTreeTarget): GitRestoreWorkingTreeEnvelope;
export declare function planGitRestoreWorkingTree(request?: GitRestoreWorkingTreeRequest): GitRestoreWorkingTreeResult;
export declare function executeGitRestoreWorkingTree(request?: GitRestoreWorkingTreeRequest): Promise<GitRestoreWorkingTreeResult>;
