import { AihError } from "../../../errors.js"; /** `.claude/settings.json` — the tool-native settings file (registry). */ export declare const CLAUDE_SETTINGS_PATH: string; /** `.claude/settings.local.json` — the gitignored local settings sibling (module constant). */ export declare const CLAUDE_SETTINGS_LOCAL_PATH = ".claude/settings.local.json"; /** `.mcp.json` — the project MCP server map (registry). */ export declare const CLAUDE_MCP_PATH: string; /** `CLAUDE.md` — the root bootloader hosting the single managed binding block (registry). */ export declare const CLAUDE_BOOTLOADER_PATH: string; /** The three shared JSON files AIH may own FIELDS in (D18: fields, not files). */ export declare const CLAUDE_SHARED_JSON_FILES: readonly string[]; /** The owned-FILE surface roots (D4.3), POSIX with a trailing slash. */ export declare const CLAUDE_OWNED_FILE_ROOTS: readonly string[]; /** Top-level key holding the MCP server map inside `.mcp.json` (registry). */ export declare const CLAUDE_MCP_KEY: "context_servers" | "mcp" | "mcpServers" | "mcp_servers" | "servers"; /** * The single managed CLAUDE.md block marker id. DISTINCT from the bootstrap-ai * shared-canon marker (`ai-canonical:shared`) so a binding block and the canon * block coexist in one CLAUDE.md; styled like the canon marker (`domain:scope`). */ export declare const CLAUDE_BINDING_MARKER = "aih-binding:claude"; /** The parenthetical note on the binding block's BEGIN line. */ export declare const CLAUDE_BINDING_BLOCK_NOTE = "aih project-framework binding \u2014 managed; do not edit inside this fence"; /** `#block:` — the ownership target convention for the CLAUDE.md fence. */ export declare const CLAUDE_BLOCK_TARGET: string; /** A binding host-adapter error (invalid target/pointer/surface). Fails closed. */ export declare class ClaudeHostWriteError extends AihError { constructor(message: string); } /** sha256 hex of a UTF-8 string. */ export declare function sha256Hex(text: string): string; /** Deterministic JSON with recursively sorted object keys (stable digests + equality). */ export declare function canonicalJson(value: unknown): string; /** Order-insensitive JSON value equality (the D18 "still equals the applied value" test). */ export declare function jsonEqual(a: unknown, b: unknown): boolean; /** * Parse an RFC6901-style JSON pointer ("/a/b") into unescaped segments. Fails * closed on a pointer that does not start with "/", has an empty segment, or names * a prototype-pollution key. Depth is validated by the caller (the write engine * supports depth 1 and 2 — the shape every Claude settings/MCP owned field takes). */ export declare function parseJsonPointer(pointer: string): string[]; /** Reject a dangerous or control-bearing object key. */ export declare function assertSafeKey(key: string): void; /** Walk `value` by `segments`, reading only own plain-object keys. */ export declare function valueAtPointer(value: unknown, segments: readonly string[]): { present: true; value: unknown; } | { present: false; }; /** * A safe repo-relative POSIX path — the SAME rule the binding lock's * {@link BindingWriteSchema} SafeRelPath enforces (no backslash, drive, absolute, * `..`, trailing/double slash, or control chars). Validated HERE at the write * boundary so a bad path is refused before it reaches the fs. */ export declare function isSafeRelPosixPath(value: string): boolean; /** Fail closed unless `file` is one of the D18 shared JSON surfaces. */ export declare function assertSharedJsonFile(file: string): void; /** Fail closed unless `rel` is a safe path under a D4.3 owned-file root. */ export declare function assertOwnedFilePath(rel: string): void;