export type GitFetchRemoteTagsMode = "default" | "tags" | "no-tags";
export type GitFetchRemoteUpdatesPermission = "git:read" | "git:write" | "filesystem:write" | "network:egress";
export type GitFetchRemoteUpdatesRiskCategory = "remote-network";
export type GitFetchRemoteUpdatesGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitFetchRemoteUpdatesContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitFetchRemoteUpdatesGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitFetchRemoteUpdatesPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitFetchRemoteUpdatesTarget = {
    repositoryPath: string;
    remoteName?: string;
    refspecs: readonly string[];
    prune: boolean;
    tagsMode: GitFetchRemoteTagsMode;
};
export type GitFetchRemoteUpdatesRequest = {
    target?: Partial<GitFetchRemoteUpdatesTarget>;
    context?: GitFetchRemoteUpdatesContext;
    provider?: GitFetchRemoteUpdatesProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    cwd?: string;
    remoteName?: string;
    remote?: string;
    refspecs?: readonly string[];
    prune?: boolean;
    tagsMode?: GitFetchRemoteTagsMode;
    dryRun?: boolean;
};
export type GitFetchRemoteUpdatesRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-fetch-remote-updates";
    allowedSubcommand: "fetch";
};
export type GitFetchRemoteUpdatesRisk = {
    category: GitFetchRemoteUpdatesRiskCategory;
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: false;
    updatesRemoteTrackingRefs: true;
    mayUseNetwork: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitFetchRemoteUpdateEntry = {
    raw: string;
    operation?: "new" | "update" | "delete" | "tag" | "other";
    source?: string;
    destination?: string;
};
export type GitFetchRemoteUpdatesEnvelope = {
    parser: "git-fetch-output-v1";
    remoteName?: string;
    refspecs: readonly string[];
    prune: boolean;
    tagsMode: GitFetchRemoteTagsMode;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    updateLines: readonly GitFetchRemoteUpdateEntry[];
    fetched: boolean;
};
export type GitFetchRemoteUpdatesOutput = {
    kind: "agentCore.basicTool.git.fetchRemoteUpdates";
    target: GitFetchRemoteUpdatesTarget;
    runtimeEntry: GitFetchRemoteUpdatesRuntimeEntry;
    risk: GitFetchRemoteUpdatesRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitFetchRemoteUpdatesPermission[];
    unsafeSideEffects: true;
    mayUseNetwork: true;
    resultEnvelope: GitFetchRemoteUpdatesEnvelope;
};
export type GitFetchRemoteUpdatesPlan = {
    toolId: "git.fetchRemoteUpdates";
    toolKind: "git.fetchRemoteUpdates";
    capability: "fetch-remote-updates";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    remoteName?: string;
    refspecs: readonly string[];
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitFetchRemoteUpdatesPermission[];
    runtimeEntry: GitFetchRemoteUpdatesRuntimeEntry;
    risk: GitFetchRemoteUpdatesRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldContactRemote: true;
    wouldUpdateRemoteTrackingRefs: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-remote-network-runtime-guard";
        event: "basicTool.git.fetchRemoteUpdates.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitFetchRemoteUpdatesErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitFetchRemoteUpdatesErrorCode = "MISSING_REPOSITORY_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitFetchRemoteUpdatesError = {
    code: GitFetchRemoteUpdatesErrorCode;
    message: string;
    boundary: GitFetchRemoteUpdatesErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitFetchRemoteUpdatesAuditEvent = {
    type: string;
    toolId: "git.fetchRemoteUpdates";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitFetchRemoteUpdatesResult = {
    ok: true;
    toolId: "git.fetchRemoteUpdates";
    output: GitFetchRemoteUpdatesOutput;
    plan: GitFetchRemoteUpdatesPlan;
    audit: readonly GitFetchRemoteUpdatesAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.fetchRemoteUpdates";
    error: GitFetchRemoteUpdatesError;
    audit: readonly GitFetchRemoteUpdatesAuditEvent[];
    events: readonly string[];
};
export type GitFetchRemoteUpdatesProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitFetchRemoteUpdatesProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitFetchRemoteUpdatesProvider = (request: GitFetchRemoteUpdatesProviderRequest, context: GitFetchRemoteUpdatesContext) => GitFetchRemoteUpdatesProviderResult | Promise<GitFetchRemoteUpdatesProviderResult>;
export declare const gitFetchRemoteUpdatesDescriptor: {
    readonly toolId: "git.fetchRemoteUpdates";
    readonly toolKind: "git.fetchRemoteUpdates";
    readonly capability: "fetch-remote-updates";
    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-network";
    readonly permissionsRequired: readonly ["git:read", "git:write", "filesystem:write", "network:egress"];
    readonly defaultTimeoutMs: 120000;
    readonly maxTimeoutMs: 900000;
    readonly unsafeSideEffects: true;
};
export declare function parseGitFetchRemoteUpdatesResult(providerResult: GitFetchRemoteUpdatesProviderResult | undefined, target: GitFetchRemoteUpdatesTarget): GitFetchRemoteUpdatesEnvelope;
export declare function planFetchRemoteUpdates(request?: GitFetchRemoteUpdatesRequest): GitFetchRemoteUpdatesResult;
export declare const planGitFetchRemoteUpdates: typeof planFetchRemoteUpdates;
export declare function executeGitFetchRemoteUpdates(request?: GitFetchRemoteUpdatesRequest): Promise<GitFetchRemoteUpdatesResult>;
