export type GitCheckoutTargetPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitCheckoutTargetGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitCheckoutTargetContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitCheckoutTargetGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitCheckoutTargetPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitCheckoutTarget = {
    repositoryPath: string;
    targetRef: string;
    newBranchName?: string;
    detach: boolean;
    force: boolean;
};
export type GitCheckoutTargetRequest = {
    target?: Partial<GitCheckoutTarget>;
    context?: GitCheckoutTargetContext;
    provider?: GitCheckoutTargetProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    targetRef?: string;
    ref?: string;
    revision?: string;
    newBranchName?: string;
    branchName?: string;
    detach?: boolean;
    force?: boolean;
    dryRun?: boolean;
};
export type GitCheckoutTargetRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-checkout-target-workspace-mutation";
    allowedSubcommand: "checkout";
};
export type GitCheckoutTargetRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: true;
    mutatesIndex: true;
    checksOutTarget: true;
    createsBranch: boolean;
    detachesHead: boolean;
    forceCheckout: boolean;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitCheckoutTargetEnvelope = {
    parser: "git-checkout-output-v1";
    targetRef: string;
    newBranchName?: string;
    detach: boolean;
    force: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    checkoutHint?: string;
    createdBranch: boolean;
};
export type GitCheckoutTargetOutput = {
    kind: "agentCore.basicTool.git.checkoutTarget";
    target: GitCheckoutTarget;
    runtimeEntry: GitCheckoutTargetRuntimeEntry;
    risk: GitCheckoutTargetRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitCheckoutTargetPermission[];
    unsafeSideEffects: true;
    checksOutTarget: true;
    resultEnvelope: GitCheckoutTargetEnvelope;
};
export type GitCheckoutTargetPlan = {
    toolId: "git.checkoutTarget";
    toolKind: "git.checkoutTarget";
    capability: "checkout-target";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    targetRef: string;
    newBranchName?: string;
    detach: boolean;
    force: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitCheckoutTargetPermission[];
    runtimeEntry: GitCheckoutTargetRuntimeEntry;
    risk: GitCheckoutTargetRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateWorkingTree: true;
    wouldMutateIndex: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-checkout-runtime-guard";
        event: "basicTool.git.checkoutTarget.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitCheckoutTargetErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitCheckoutTargetErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_TARGET_REF" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "UNSAFE_REF" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitCheckoutTargetError = {
    code: GitCheckoutTargetErrorCode;
    message: string;
    boundary: GitCheckoutTargetErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitCheckoutTargetAuditEvent = {
    type: string;
    toolId: "git.checkoutTarget";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitCheckoutTargetResult = {
    ok: true;
    toolId: "git.checkoutTarget";
    output: GitCheckoutTargetOutput;
    plan: GitCheckoutTargetPlan;
    audit: readonly GitCheckoutTargetAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.checkoutTarget";
    error: GitCheckoutTargetError;
    audit: readonly GitCheckoutTargetAuditEvent[];
    events: readonly string[];
};
export type GitCheckoutTargetProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitCheckoutTargetProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitCheckoutTargetProvider = (request: GitCheckoutTargetProviderRequest, context: GitCheckoutTargetContext) => GitCheckoutTargetProviderResult | Promise<GitCheckoutTargetProviderResult>;
export declare const gitCheckoutTargetDescriptor: {
    readonly toolId: "git.checkoutTarget";
    readonly toolKind: "git.checkoutTarget";
    readonly capability: "checkout-target";
    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 parseGitCheckoutTargetResult(providerResult: GitCheckoutTargetProviderResult | undefined, target: GitCheckoutTarget): GitCheckoutTargetEnvelope;
export declare function planGitTargetCheckout(request?: GitCheckoutTargetRequest): GitCheckoutTargetResult;
export declare const planGitCheckoutTarget: typeof planGitTargetCheckout;
export declare function executeGitCheckoutTarget(request?: GitCheckoutTargetRequest): Promise<GitCheckoutTargetResult>;
