export type GitArchiveRepositoryPermission = "git:read" | "filesystem:write";
export type GitArchiveRepositoryRiskCategory = "workspace-mutation";
export type GitArchiveFormat = "tar" | "zip";
export type GitArchiveRepositoryGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitArchiveRepositoryContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitArchiveRepositoryGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitArchiveRepositoryPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitArchiveRepositoryTarget = {
    repositoryPath: string;
    outputPath: string;
    ref: string;
    format: GitArchiveFormat;
    pathspecs: readonly string[];
    prefix?: string;
};
export type GitArchiveRepositoryRequest = {
    target?: Partial<GitArchiveRepositoryTarget>;
    context?: GitArchiveRepositoryContext;
    provider?: GitArchiveRepositoryProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    outputPath?: string;
    ref?: string;
    format?: GitArchiveFormat;
    pathspecs?: readonly string[];
    prefix?: string;
    dryRun?: boolean;
};
export type GitArchiveRepositoryRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-archive-repository";
    allowedSubcommand: "archive";
};
export type GitArchiveRepositoryRisk = {
    category: GitArchiveRepositoryRiskCategory;
    riskLevel: "risky";
    mutatesRepository: false;
    mutatesWorkingTree: true;
    writesArchiveFile: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitArchiveRepositoryEnvelope = {
    parser: "git-archive-output-v1";
    repositoryPath: string;
    outputPath: string;
    ref: string;
    format: GitArchiveFormat;
    pathspecCount: number;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    archiveCreated: boolean;
};
export type GitArchiveRepositoryOutput = {
    kind: "agentCore.basicTool.git.archiveRepository";
    target: GitArchiveRepositoryTarget;
    runtimeEntry: GitArchiveRepositoryRuntimeEntry;
    risk: GitArchiveRepositoryRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitArchiveRepositoryPermission[];
    unsafeSideEffects: true;
    resultEnvelope: GitArchiveRepositoryEnvelope;
};
export type GitArchiveRepositoryPlan = {
    toolId: "git.archiveRepository";
    toolKind: "git.archiveRepository";
    capability: "archive-repository";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    outputPath: string;
    ref: string;
    format: GitArchiveFormat;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitArchiveRepositoryPermission[];
    runtimeEntry: GitArchiveRepositoryRuntimeEntry;
    risk: GitArchiveRepositoryRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateRepository: false;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-archive-runtime-guard";
        event: "basicTool.git.archiveRepository.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitArchiveRepositoryErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitArchiveRepositoryErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_TARGET_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitArchiveRepositoryError = {
    code: GitArchiveRepositoryErrorCode;
    message: string;
    boundary: GitArchiveRepositoryErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitArchiveRepositoryAuditEvent = {
    type: string;
    toolId: "git.archiveRepository";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitArchiveRepositoryResult = {
    ok: true;
    toolId: "git.archiveRepository";
    output: GitArchiveRepositoryOutput;
    plan: GitArchiveRepositoryPlan;
    audit: readonly GitArchiveRepositoryAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.archiveRepository";
    error: GitArchiveRepositoryError;
    audit: readonly GitArchiveRepositoryAuditEvent[];
    events: readonly string[];
};
export type GitArchiveRepositoryProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitArchiveRepositoryProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitArchiveRepositoryProvider = (request: GitArchiveRepositoryProviderRequest, context: GitArchiveRepositoryContext) => GitArchiveRepositoryProviderResult | Promise<GitArchiveRepositoryProviderResult>;
export declare const gitArchiveRepositoryDescriptor: {
    readonly toolId: "git.archiveRepository";
    readonly toolKind: "git.archiveRepository";
    readonly capability: "archive-repository";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.repository";
    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", "filesystem:write"];
    readonly defaultTimeoutMs: 60000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: true;
};
export declare function parseGitArchiveRepositoryResult(providerResult: GitArchiveRepositoryProviderResult | undefined, target: GitArchiveRepositoryTarget): GitArchiveRepositoryEnvelope;
export declare function planGitRepositoryArchive(request?: GitArchiveRepositoryRequest): GitArchiveRepositoryResult;
export declare const planGitArchiveRepository: typeof planGitRepositoryArchive;
export declare function executeGitArchiveRepository(request?: GitArchiveRepositoryRequest): Promise<GitArchiveRepositoryResult>;
