export type GitManageBranchPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitManageBranchAction = "list" | "create" | "delete" | "rename" | "set-upstream";
export type GitManageBranchRiskCategory = "read-only-inspection" | "history-mutation" | "destructive";
export type GitManageBranchGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitManageBranchContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitManageBranchGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitManageBranchPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitManageBranchTarget = {
    repositoryPath: string;
    action: GitManageBranchAction;
    branchName?: string;
    newBranchName?: string;
    startPoint?: string;
    upstream?: string;
    force: boolean;
};
export type GitManageBranchRequest = {
    target?: Partial<GitManageBranchTarget>;
    context?: GitManageBranchContext;
    provider?: GitManageBranchProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    action?: GitManageBranchAction;
    branchName?: string;
    branch?: string;
    name?: string;
    newBranchName?: string;
    newBranch?: string;
    startPoint?: string;
    upstream?: string;
    ref?: string;
    revision?: string;
    force?: boolean;
    dryRun?: boolean;
};
export type GitManageBranchRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-manage-branch";
    allowedSubcommand: "branch";
};
export type GitManageBranchRisk = {
    category: GitManageBranchRiskCategory;
    riskLevel: "normal" | "risky";
    mutatesRepository: boolean;
    mutatesWorkingTree: false;
    mutatesIndex: false;
    createsBranch: boolean;
    deletesBranch: boolean;
    renamesBranch: boolean;
    setsUpstream: boolean;
    spawnsProcess: true;
    requiresTapApproval: boolean;
    runtimeOwnsExecution: true;
};
export type GitManageBranchEnvelope = {
    parser: "git-branch-output-v1";
    action: GitManageBranchAction;
    branchName?: string;
    newBranchName?: string;
    startPoint?: string;
    upstream?: string;
    force: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    branchNames: readonly string[];
    currentBranch?: string;
    operationHint?: string;
    branchCreated: boolean;
    branchDeleted: boolean;
    branchRenamed: boolean;
    upstreamSet: boolean;
};
export type GitManageBranchOutput = {
    kind: "agentCore.basicTool.git.manageBranch";
    target: GitManageBranchTarget;
    runtimeEntry: GitManageBranchRuntimeEntry;
    risk: GitManageBranchRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitManageBranchPermission[];
    unsafeSideEffects: boolean;
    managesBranch: true;
    resultEnvelope: GitManageBranchEnvelope;
};
export type GitManageBranchPlan = {
    toolId: "git.manageBranch";
    toolKind: "git.manageBranch";
    capability: "manage-branch";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    action: GitManageBranchAction;
    branchName?: string;
    newBranchName?: string;
    startPoint?: string;
    upstream?: string;
    force: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitManageBranchPermission[];
    runtimeEntry: GitManageBranchRuntimeEntry;
    risk: GitManageBranchRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateRepository: boolean;
    unsafeSideEffects: boolean;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-branch-runtime-guard";
        event: "basicTool.git.manageBranch.planned";
        governanceRequired: boolean;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitManageBranchErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitManageBranchErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_BRANCH_NAME" | "MISSING_REQUIRED_FIELD" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_ACTION" | "UNSAFE_REF" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitManageBranchError = {
    code: GitManageBranchErrorCode;
    message: string;
    boundary: GitManageBranchErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitManageBranchAuditEvent = {
    type: string;
    toolId: "git.manageBranch";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitManageBranchResult = {
    ok: true;
    toolId: "git.manageBranch";
    output: GitManageBranchOutput;
    plan: GitManageBranchPlan;
    audit: readonly GitManageBranchAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.manageBranch";
    error: GitManageBranchError;
    audit: readonly GitManageBranchAuditEvent[];
    events: readonly string[];
};
export type GitManageBranchProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitManageBranchProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitManageBranchProvider = (request: GitManageBranchProviderRequest, context: GitManageBranchContext) => GitManageBranchProviderResult | Promise<GitManageBranchProviderResult>;
export declare const gitManageBranchDescriptor: {
    readonly toolId: "git.manageBranch";
    readonly toolKind: "git.manageBranch";
    readonly capability: "manage-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: "history-mutation";
    readonly permissionsRequired: readonly ["git:read", "git:write", "filesystem:read", "filesystem:write"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: true;
};
export declare function parseGitManageBranchResult(providerResult: GitManageBranchProviderResult | undefined, target: GitManageBranchTarget): GitManageBranchEnvelope;
export declare function planGitBranchManagement(request?: GitManageBranchRequest): GitManageBranchResult;
export declare const planGitManageBranch: typeof planGitBranchManagement;
export declare function executeGitManageBranch(request?: GitManageBranchRequest): Promise<GitManageBranchResult>;
