export type GitStashChangesPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitStashChangesGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitStashChangesContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitStashChangesGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitStashChangesPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitStashChangesTarget = {
    repositoryPath: string;
    message?: string;
    includeUntracked: boolean;
    keepIndex: boolean;
    pathspecs: readonly string[];
};
export type GitStashChangesRequest = {
    target?: Partial<GitStashChangesTarget>;
    context?: GitStashChangesContext;
    provider?: GitStashChangesProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    message?: string;
    includeUntracked?: boolean;
    keepIndex?: boolean;
    pathspecs?: readonly string[];
    dryRun?: boolean;
};
export type GitStashChangesRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-stash-push-workspace-mutation";
    allowedSubcommand: "stash";
};
export type GitStashChangesRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: boolean;
    createsStashEntry: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitStashChangesEnvelope = {
    parser: "git-stash-push-exit-v1";
    message?: string;
    includeUntracked: boolean;
    keepIndex: boolean;
    pathspecs: readonly string[];
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    createdStashHint?: string;
};
export type GitStashChangesOutput = {
    kind: "agentCore.basicTool.git.stashChanges";
    target: GitStashChangesTarget;
    runtimeEntry: GitStashChangesRuntimeEntry;
    risk: GitStashChangesRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitStashChangesPermission[];
    unsafeSideEffects: true;
    createsStashEntry: true;
    resultEnvelope: GitStashChangesEnvelope;
};
export type GitStashChangesPlan = {
    toolId: "git.stashChanges";
    toolKind: "git.stashChanges";
    capability: "stash-changes";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    message?: string;
    includeUntracked: boolean;
    keepIndex: boolean;
    pathspecs: readonly string[];
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitStashChangesPermission[];
    runtimeEntry: GitStashChangesRuntimeEntry;
    risk: GitStashChangesRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateWorkingTree: true;
    wouldMutateIndex: boolean;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-stash-runtime-guard";
        event: "basicTool.git.stashChanges.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitStashChangesErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitStashChangesErrorCode = "MISSING_REPOSITORY_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_MESSAGE" | "INVALID_PATHSPEC" | "PATHSPEC_OUTSIDE_SCOPE" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitStashChangesError = {
    code: GitStashChangesErrorCode;
    message: string;
    boundary: GitStashChangesErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitStashChangesAuditEvent = {
    type: string;
    toolId: "git.stashChanges";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitStashChangesResult = {
    ok: true;
    toolId: "git.stashChanges";
    output: GitStashChangesOutput;
    plan: GitStashChangesPlan;
    audit: readonly GitStashChangesAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.stashChanges";
    error: GitStashChangesError;
    audit: readonly GitStashChangesAuditEvent[];
    events: readonly string[];
};
export type GitStashChangesProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitStashChangesProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitStashChangesProvider = (request: GitStashChangesProviderRequest, context: GitStashChangesContext) => GitStashChangesProviderResult | Promise<GitStashChangesProviderResult>;
export declare const gitStashChangesDescriptor: {
    readonly toolId: "git.stashChanges";
    readonly toolKind: "git.stashChanges";
    readonly capability: "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 parseGitStashChangesResult(providerResult: GitStashChangesProviderResult | undefined, target: GitStashChangesTarget): GitStashChangesEnvelope;
export declare function planGitStashChanges(request?: GitStashChangesRequest): GitStashChangesResult;
export declare function executeGitStashChanges(request?: GitStashChangesRequest): Promise<GitStashChangesResult>;
