/**
 * Permission-file writers for `neotoma setup`.
 *
 * Merges a single canonical `neotoma *` wildcard approval and a one-time
 * `npm install -g neotoma` allow entry into each supported harness's
 * permission file. All writers are merge-preserving and idempotent.
 */
import { existsSync } from "node:fs";
import type { ToolId } from "./doctor.js";
export interface PermissionPatch {
    path: string;
    tool: ToolId;
    before: string | null;
    after: string;
    changed: boolean;
    created: boolean;
}
/** Write `.claude/settings.local.json` with neotoma allow entries (project scope). */
export declare function patchClaudeCodeProject(cwd: string, options?: {
    dryRun?: boolean;
}): Promise<PermissionPatch>;
/** Write `~/.claude/settings.json` with neotoma allow entries (user scope). */
export declare function patchClaudeCodeUser(options?: {
    dryRun?: boolean;
}): Promise<PermissionPatch>;
/** Write `.cursor/allowlist.json` under the current project root. */
export declare function patchCursorAllowlist(cwd: string, options?: {
    dryRun?: boolean;
}): Promise<PermissionPatch>;
/** Append an `[approvals]` block to `~/.codex/config.toml` if missing. */
export declare function patchCodexConfig(options?: {
    dryRun?: boolean;
}): Promise<PermissionPatch>;
/** Write all supported permission files for a given tool. */
export declare function writePermissionsForTool(tool: ToolId, cwd: string, options?: {
    dryRun?: boolean;
    scope?: "project" | "user" | "both";
}): Promise<PermissionPatch[]>;
export declare function toolFromString(s: string): ToolId | null;
/** Convenience: detect whether a tool already has neotoma wildcard permission. */
export declare function hasNeotomaAllow(patch: PermissionPatch): boolean;
/** Expose existsSync for tests. */
export declare const __testing: {
    existsSync: typeof existsSync;
};
//# sourceMappingURL=permissions.d.ts.map