export type GitManageIgnoreRulesPermission = "git:read" | "filesystem:read" | "filesystem:write";
export type GitManageIgnoreRulesAction = "inspect" | "add" | "remove" | "replace";
export type GitManageIgnoreRulesGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitManageIgnoreRulesContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitManageIgnoreRulesGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitManageIgnoreRulesPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitManageIgnoreRulesTarget = {
    repositoryPath: string;
    action: GitManageIgnoreRulesAction;
    ignoreFilePath: string;
    rules: readonly string[];
};
export type GitManageIgnoreRulesRequest = {
    target?: Partial<GitManageIgnoreRulesTarget>;
    context?: GitManageIgnoreRulesContext;
    provider?: GitManageIgnoreRulesProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    action?: string;
    ignoreFilePath?: string;
    rules?: readonly string[];
    dryRun?: boolean;
};
export type GitManageIgnoreRulesRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.filesystem.readText/writeText";
    methods: readonly ("readText" | "writeText")[];
    argvMode: "fixed-ignore-rules-file-mutation";
    fileKind: "gitignore";
};
export type GitManageIgnoreRulesRisk = {
    category: "read-only-inspection" | "workspace-mutation";
    riskLevel: "normal" | "risky";
    mutatesRepository: boolean;
    mutatesWorkingTree: boolean;
    mutatesIndex: false;
    mutatesIgnoreRules: boolean;
    spawnsProcess: false;
    requiresTapApproval: boolean;
    runtimeOwnsExecution: true;
};
export type GitManageIgnoreRulesEnvelope = {
    parser: "gitignore-rules-v1";
    action: GitManageIgnoreRulesAction;
    ignoreFilePath: string;
    absoluteIgnoreFilePath: string;
    beforeRuleCount: number;
    afterRuleCount: number;
    addedRules: readonly string[];
    removedRules: readonly string[];
    unchangedRules: readonly string[];
    contentChanged: boolean;
    bytesWritten?: number;
    fileMissing?: boolean;
};
export type GitManageIgnoreRulesOutput = {
    kind: "agentCore.basicTool.git.manageIgnoreRules";
    target: GitManageIgnoreRulesTarget;
    runtimeEntry: GitManageIgnoreRulesRuntimeEntry;
    risk: GitManageIgnoreRulesRisk;
    operationPlan: readonly string[];
    filePath: string;
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    permissionsRequired: readonly GitManageIgnoreRulesPermission[];
    unsafeSideEffects: boolean;
    stdout?: string;
    resultEnvelope: GitManageIgnoreRulesEnvelope;
};
export type GitManageIgnoreRulesPlan = {
    toolId: "git.manageIgnoreRules";
    toolKind: "git.manageIgnoreRules";
    capability: "manage-ignore-rules";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    ignoreFilePath: string;
    absoluteIgnoreFilePath: string;
    action: GitManageIgnoreRulesAction;
    rules: readonly string[];
    operationPlan: readonly string[];
    requiredPermissions: readonly GitManageIgnoreRulesPermission[];
    runtimeEntry: GitManageIgnoreRulesRuntimeEntry;
    risk: GitManageIgnoreRulesRisk;
    dispatch: "dry-run" | "runtime-filesystem";
    dryRun: boolean;
    unsafeSideEffects: boolean;
    audit: {
        guard: "git-ignore-runtime-guard";
        event: "basicTool.git.manageIgnoreRules.planned";
        governanceRequired: boolean;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitManageIgnoreRulesErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitManageIgnoreRulesErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_RULES" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_ACTION" | "UNSAFE_IGNORE_FILE_PATH" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitManageIgnoreRulesError = {
    code: GitManageIgnoreRulesErrorCode;
    message: string;
    boundary: GitManageIgnoreRulesErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitManageIgnoreRulesAuditEvent = {
    type: string;
    toolId: "git.manageIgnoreRules";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitManageIgnoreRulesResult = {
    ok: true;
    toolId: "git.manageIgnoreRules";
    output: GitManageIgnoreRulesOutput;
    plan: GitManageIgnoreRulesPlan;
    audit: readonly GitManageIgnoreRulesAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.manageIgnoreRules";
    error: GitManageIgnoreRulesError;
    audit: readonly GitManageIgnoreRulesAuditEvent[];
    events: readonly string[];
};
export type GitManageIgnoreRulesProviderReadResult = {
    content: string;
    truncated?: boolean;
    missing?: boolean;
};
export type GitManageIgnoreRulesProviderWriteResult = {
    bytesWritten: number;
};
export type GitManageIgnoreRulesProvider = {
    readText(request: {
        path: string;
        maxBytes?: number;
    }): Promise<GitManageIgnoreRulesProviderReadResult> | GitManageIgnoreRulesProviderReadResult;
    writeText?(request: {
        path: string;
        content: string;
    }): Promise<GitManageIgnoreRulesProviderWriteResult> | GitManageIgnoreRulesProviderWriteResult;
};
export declare const gitManageIgnoreRulesDescriptor: {
    readonly toolId: "git.manageIgnoreRules";
    readonly toolKind: "git.manageIgnoreRules";
    readonly capability: "manage-ignore-rules";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.file";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.filesystem.readText/writeText";
    readonly operationRisk: "workspace-mutation";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read", "filesystem:write"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
};
export declare function planGitIgnoreRuleManagement(request?: GitManageIgnoreRulesRequest): GitManageIgnoreRulesResult;
export declare function executeGitManageIgnoreRules(request?: GitManageIgnoreRulesRequest): Promise<GitManageIgnoreRulesResult>;
