export type GitAddToStagingPermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write";
export type GitAddToStagingGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitAddToStagingContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitAddToStagingGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitAddToStagingPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitAddToStagingTarget = {
    repositoryPath: string;
    pathspecs: readonly string[];
    all: boolean;
    update: boolean;
    intentToAdd: boolean;
    patch: boolean;
    force: boolean;
};
export type GitAddToStagingRequest = {
    target?: Partial<GitAddToStagingTarget>;
    context?: GitAddToStagingContext;
    provider?: GitAddToStagingProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    pathspecs?: readonly string[];
    all?: boolean;
    update?: boolean;
    intentToAdd?: boolean;
    patch?: boolean;
    force?: boolean;
    dryRun?: boolean;
};
export type GitAddToStagingRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-add-workspace-mutation";
    allowedSubcommand: "add";
};
export type GitAddToStagingRisk = {
    category: "workspace-mutation";
    riskLevel: "risky";
    mutatesRepository: true;
    mutatesWorkingTree: false;
    mutatesIndex: true;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitAddToStagingEnvelope = {
    parser: "git-add-exit-v1";
    pathspecs: readonly string[];
    all: boolean;
    update: boolean;
    intentToAdd: boolean;
    force: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
};
export type GitAddToStagingOutput = {
    kind: "agentCore.basicTool.git.addToStaging";
    target: GitAddToStagingTarget;
    runtimeEntry: GitAddToStagingRuntimeEntry;
    risk: GitAddToStagingRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitAddToStagingPermission[];
    unsafeSideEffects: true;
    resultEnvelope: GitAddToStagingEnvelope;
};
export type GitAddToStagingPlan = {
    toolId: "git.addToStaging";
    toolKind: "git.addToStaging";
    capability: "add-to-staging";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    pathspecs: readonly string[];
    all: boolean;
    update: boolean;
    intentToAdd: boolean;
    patch: boolean;
    force: boolean;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitAddToStagingPermission[];
    runtimeEntry: GitAddToStagingRuntimeEntry;
    risk: GitAddToStagingRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldMutateIndex: true;
    unsafeSideEffects: true;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-add-runtime-guard";
        event: "basicTool.git.addToStaging.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitAddToStagingErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitAddToStagingErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_TARGET_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_PATHSPEC" | "PATHSPEC_OUTSIDE_SCOPE" | "INVALID_TIMEOUT" | "INTERACTIVE_MODE_UNAVAILABLE" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitAddToStagingError = {
    code: GitAddToStagingErrorCode;
    message: string;
    boundary: GitAddToStagingErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitAddToStagingAuditEvent = {
    type: string;
    toolId: "git.addToStaging";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitAddToStagingResult = {
    ok: true;
    toolId: "git.addToStaging";
    output: GitAddToStagingOutput;
    plan: GitAddToStagingPlan;
    audit: readonly GitAddToStagingAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.addToStaging";
    error: GitAddToStagingError;
    audit: readonly GitAddToStagingAuditEvent[];
    events: readonly string[];
};
export type GitAddToStagingProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitAddToStagingProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitAddToStagingProvider = (request: GitAddToStagingProviderRequest, context: GitAddToStagingContext) => GitAddToStagingProviderResult | Promise<GitAddToStagingProviderResult>;
export declare const gitAddToStagingDescriptor: {
    readonly toolId: "git.addToStaging";
    readonly toolKind: "git.addToStaging";
    readonly capability: "add-to-staging";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.staging";
    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 parseGitAddToStagingResult(providerResult: GitAddToStagingProviderResult | undefined, target: GitAddToStagingTarget): GitAddToStagingEnvelope;
export declare function planGitAddToStaging(request?: GitAddToStagingRequest): GitAddToStagingResult;
export declare function executeGitAddToStaging(request?: GitAddToStagingRequest): Promise<GitAddToStagingResult>;
