export type GitSwitchBranchPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitSwitchBranchGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitSwitchBranchContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitSwitchBranchGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitSwitchBranchPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitSwitchBranchTarget = {
    repositoryPath: string;
    branchName: string;
    create: boolean;
    startPoint?: string;
    track: boolean;
    discardChanges: boolean;
};
export type GitSwitchBranchRequest = {
    target?: Partial<GitSwitchBranchTarget>;
    context?: GitSwitchBranchContext;
    provider?: GitSwitchBranchProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    branchName?: string;
    branch?: string;
    ref?: string;
    create?: boolean;
    startPoint?: string;
    track?: boolean;
    discardChanges?: boolean;
    dryRun?: boolean;
};
export type GitSwitchBranchRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-switch-branch-workspace-mutation";
    allowedSubcommand: "switch";
};
export type GitSwitchBranchRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: true;
    switchesBranch: true;
    createsBranch: boolean;
    discardsChanges: boolean;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitSwitchBranchEnvelope = {
    parser: "git-switch-output-v1";
    branchName: string;
    create: boolean;
    startPoint?: string;
    track: boolean;
    discardChanges: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    switchedBranchHint?: string;
    createdBranch: boolean;
    discardedChanges: boolean;
};
export type GitSwitchBranchOutput = {
    kind: "agentCore.basicTool.git.switchBranch";
    target: GitSwitchBranchTarget;
    runtimeEntry: GitSwitchBranchRuntimeEntry;
    risk: GitSwitchBranchRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitSwitchBranchPermission[];
    unsafeSideEffects: true;
    switchesBranch: true;
    resultEnvelope: GitSwitchBranchEnvelope;
};
export type GitSwitchBranchPlan = {
    toolId: "git.switchBranch";
    toolKind: "git.switchBranch";
    capability: "switch-branch";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    branchName: string;
    create: boolean;
    startPoint?: string;
    track: boolean;
    discardChanges: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitSwitchBranchPermission[];
    runtimeEntry: GitSwitchBranchRuntimeEntry;
    risk: GitSwitchBranchRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateWorkingTree: true;
    wouldMutateIndex: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-switch-runtime-guard";
        event: "basicTool.git.switchBranch.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitSwitchBranchErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitSwitchBranchErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_BRANCH_NAME" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "UNSAFE_BRANCH_REF" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitSwitchBranchError = {
    code: GitSwitchBranchErrorCode;
    message: string;
    boundary: GitSwitchBranchErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitSwitchBranchAuditEvent = {
    type: string;
    toolId: "git.switchBranch";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitSwitchBranchResult = {
    ok: true;
    toolId: "git.switchBranch";
    output: GitSwitchBranchOutput;
    plan: GitSwitchBranchPlan;
    audit: readonly GitSwitchBranchAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.switchBranch";
    error: GitSwitchBranchError;
    audit: readonly GitSwitchBranchAuditEvent[];
    events: readonly string[];
};
export type GitSwitchBranchProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitSwitchBranchProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitSwitchBranchProvider = (request: GitSwitchBranchProviderRequest, context: GitSwitchBranchContext) => GitSwitchBranchProviderResult | Promise<GitSwitchBranchProviderResult>;
export declare const gitSwitchBranchDescriptor: {
    readonly toolId: "git.switchBranch";
    readonly toolKind: "git.switchBranch";
    readonly capability: "switch-branch";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.branch";
    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 parseGitSwitchBranchResult(providerResult: GitSwitchBranchProviderResult | undefined, target: GitSwitchBranchTarget): GitSwitchBranchEnvelope;
export declare function planGitBranchSwitch(request?: GitSwitchBranchRequest): GitSwitchBranchResult;
export declare const planGitSwitchBranch: typeof planGitBranchSwitch;
export declare function executeGitSwitchBranch(request?: GitSwitchBranchRequest): Promise<GitSwitchBranchResult>;
