export type GitPopStashChangesPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitPopStashChangesGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitPopStashChangesContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitPopStashChangesGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitPopStashChangesPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitPopStashChangesTarget = {
    repositoryPath: string;
    stashRef: string;
    reinstateIndex: boolean;
};
export type GitPopStashChangesRequest = {
    target?: Partial<GitPopStashChangesTarget>;
    context?: GitPopStashChangesContext;
    provider?: GitPopStashChangesProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    stashRef?: string;
    reinstateIndex?: boolean;
    dryRun?: boolean;
};
export type GitPopStashChangesRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-stash-pop-workspace-mutation";
    allowedSubcommand: "stash";
};
export type GitPopStashChangesRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: boolean;
    dropsStashOnSuccess: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitPopStashChangesEnvelope = {
    parser: "git-stash-pop-exit-v1";
    stashRef: string;
    reinstateIndex: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    poppedHint?: string;
};
export type GitPopStashChangesOutput = {
    kind: "agentCore.basicTool.git.popStashChanges";
    target: GitPopStashChangesTarget;
    runtimeEntry: GitPopStashChangesRuntimeEntry;
    risk: GitPopStashChangesRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitPopStashChangesPermission[];
    unsafeSideEffects: true;
    dropsStashOnSuccess: true;
    resultEnvelope: GitPopStashChangesEnvelope;
};
export type GitPopStashChangesPlan = {
    toolId: "git.popStashChanges";
    toolKind: "git.popStashChanges";
    capability: "pop-stash-changes";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    stashRef: string;
    reinstateIndex: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitPopStashChangesPermission[];
    runtimeEntry: GitPopStashChangesRuntimeEntry;
    risk: GitPopStashChangesRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateWorkingTree: true;
    wouldMutateIndex: boolean;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-pop-stash-runtime-guard";
        event: "basicTool.git.popStashChanges.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitPopStashChangesErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitPopStashChangesErrorCode = "MISSING_REPOSITORY_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_STASH_REF" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitPopStashChangesError = {
    code: GitPopStashChangesErrorCode;
    message: string;
    boundary: GitPopStashChangesErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitPopStashChangesAuditEvent = {
    type: string;
    toolId: "git.popStashChanges";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitPopStashChangesResult = {
    ok: true;
    toolId: "git.popStashChanges";
    output: GitPopStashChangesOutput;
    plan: GitPopStashChangesPlan;
    audit: readonly GitPopStashChangesAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.popStashChanges";
    error: GitPopStashChangesError;
    audit: readonly GitPopStashChangesAuditEvent[];
    events: readonly string[];
};
export type GitPopStashChangesProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitPopStashChangesProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitPopStashChangesProvider = (request: GitPopStashChangesProviderRequest, context: GitPopStashChangesContext) => GitPopStashChangesProviderResult | Promise<GitPopStashChangesProviderResult>;
export declare const gitPopStashChangesDescriptor: {
    readonly toolId: "git.popStashChanges";
    readonly toolKind: "git.popStashChanges";
    readonly capability: "pop-stash-changes";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.stash";
    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 parseGitPopStashChangesResult(providerResult: GitPopStashChangesProviderResult | undefined, target: GitPopStashChangesTarget): GitPopStashChangesEnvelope;
export declare function planGitPopStashChanges(request?: GitPopStashChangesRequest): GitPopStashChangesResult;
export declare function executeGitPopStashChanges(request?: GitPopStashChangesRequest): Promise<GitPopStashChangesResult>;
