export type GitManageRemoteAction = "list" | "show" | "add" | "remove" | "rename" | "set-url";
export type GitRemoteUrlMode = "fetch" | "push";
export type GitManageRemotePermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitManageRemoteRiskCategory = "read-only-inspection" | "workspace-mutation";
export type GitManageRemoteGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitManageRemoteContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitManageRemoteGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitManageRemotePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitManageRemoteTarget = {
    repositoryPath: string;
    action: GitManageRemoteAction;
    remoteName?: string;
    newRemoteName?: string;
    remoteUrl?: string;
    urlMode: GitRemoteUrlMode;
};
export type GitManageRemoteRequest = {
    target?: Partial<GitManageRemoteTarget>;
    context?: GitManageRemoteContext;
    provider?: GitManageRemoteProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    action?: GitManageRemoteAction;
    remoteName?: string;
    newRemoteName?: string;
    remoteUrl?: string;
    urlMode?: GitRemoteUrlMode;
    dryRun?: boolean;
};
export type GitManageRemoteRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-manage-remote";
    allowedSubcommand: "remote";
};
export type GitManageRemoteRisk = {
    category: GitManageRemoteRiskCategory;
    riskLevel: "normal" | "risky";
    mutatesRepository: boolean;
    mutatesWorkingTree: boolean;
    mutatesRemoteConfig: boolean;
    mayUseNetwork: false;
    spawnsProcess: true;
    requiresTapApproval: boolean;
    runtimeOwnsExecution: true;
};
export type GitRemoteEntry = {
    name: string;
    url: string;
    mode?: "fetch" | "push";
};
export type GitManageRemoteEnvelope = {
    parser: "git-remote-output-v1";
    action: GitManageRemoteAction;
    remoteName?: string;
    newRemoteName?: string;
    remoteUrl?: string;
    urlMode: GitRemoteUrlMode;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    remotes: readonly GitRemoteEntry[];
    remoteChanged: boolean;
};
export type GitManageRemoteOutput = {
    kind: "agentCore.basicTool.git.manageRemote";
    target: GitManageRemoteTarget;
    runtimeEntry: GitManageRemoteRuntimeEntry;
    risk: GitManageRemoteRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitManageRemotePermission[];
    unsafeSideEffects: boolean;
    resultEnvelope: GitManageRemoteEnvelope;
};
export type GitManageRemotePlan = {
    toolId: "git.manageRemote";
    toolKind: "git.manageRemote";
    capability: "manage-remote";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    action: GitManageRemoteAction;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitManageRemotePermission[];
    runtimeEntry: GitManageRemoteRuntimeEntry;
    risk: GitManageRemoteRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateRepository: boolean;
    unsafeSideEffects: boolean;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-remote-config-runtime-guard";
        event: "basicTool.git.manageRemote.planned";
        governanceRequired: boolean;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitManageRemoteErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitManageRemoteErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_REQUIRED_FIELD" | "INVALID_ACTION" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitManageRemoteError = {
    code: GitManageRemoteErrorCode;
    message: string;
    boundary: GitManageRemoteErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitManageRemoteAuditEvent = {
    type: string;
    toolId: "git.manageRemote";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitManageRemoteResult = {
    ok: true;
    toolId: "git.manageRemote";
    output: GitManageRemoteOutput;
    plan: GitManageRemotePlan;
    audit: readonly GitManageRemoteAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.manageRemote";
    error: GitManageRemoteError;
    audit: readonly GitManageRemoteAuditEvent[];
    events: readonly string[];
};
export type GitManageRemoteProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitManageRemoteProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitManageRemoteProvider = (request: GitManageRemoteProviderRequest, context: GitManageRemoteContext) => GitManageRemoteProviderResult | Promise<GitManageRemoteProviderResult>;
export declare const gitManageRemoteDescriptor: {
    readonly toolId: "git.manageRemote";
    readonly toolKind: "git.manageRemote";
    readonly capability: "manage-remote";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.remote";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "remote-config-management";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
};
export declare function parseGitManageRemoteResult(providerResult: GitManageRemoteProviderResult | undefined, target: GitManageRemoteTarget): GitManageRemoteEnvelope;
export declare function planGitRemoteManagement(request?: GitManageRemoteRequest): GitManageRemoteResult;
export declare const planGitManageRemote: typeof planGitRemoteManagement;
export declare function executeGitManageRemote(request?: GitManageRemoteRequest): Promise<GitManageRemoteResult>;
