/** * The Claude Code version `ACKNOWLEDGED_TOOL_INPUT_TYPES` + the dialect were last * validated against. SINGLE SOURCE OF TRUTH for the pin: CI installs * `@anthropic-ai/claude-code@` (grepped from this line) in every job that * drives the real binary, so the dialect-drift alarm fires only on a DELIBERATE * bump — not on every unpinned CC release landing on an unrelated PR — and the * real-`claude` harness/eval tests stay reproducible. Bump this together with * `ACKNOWLEDGED_TOOL_INPUT_TYPES` (the gated test cross-checks them). */ export declare const VALIDATED_CC_VERSION = "2.1.187"; /** * The `Input` interface names we've ACKNOWLEDGED from `sdk-tools.d.ts` (Claude * Code 2.1.187). The drift test fails when the installed set differs — a loud nudge * to re-check `claudeCodeDialect` (and update this set) when CC adds/removes a tool. * NOT a redistribution of their file: a list of bare identifiers (facts), authored here. * * 2.1.187 added the agent-PLATFORM surface (cron/scheduling/worktrees/web-app): * Artifact, Cron{Create,Delete,List}, Enter/ExitWorktree, EnterPlanMode, Monitor, * Projects, PushNotification, REPL, ReadMcpResourceDir, RemoteTrigger, * ScheduleWakeup, ShowOnboardingRolePicker, Task{Create,Get,List,Update}, Workflow; * and removed Config. These are HOST/platform tools, NOT subagent-grantable, so * `claudeCodeDialect.builtinAgentTools` (the `tools:` frontmatter catalog) is * intentionally unchanged — they're acknowledged here as facts, nothing more. */ export declare const ACKNOWLEDGED_TOOL_INPUT_TYPES: readonly string[]; /** Parse `export interface Input {` names from sdk-tools.d.ts → sorted []. Pure. */ export declare function parseToolInputTypes(dts: string): string[]; /** * Locate a READABLE JavaScript bundle inside the installed CC package, or null. * Older CC shipped `cli.js` — a readable JS bundle whose hook-event names appear as * string literals, greppable by `eventsMissingFromBundle`. CC ≥ ~2.1.18x switched to * a NATIVE-BINARY distribution (`bin/claude.exe` copied from a platform * `optionalDependencies` package) with NO readable JS bundle, so there is nothing to * text-scan. Returns the bundle path when present, else null — callers then SKIP the * event-drift check loudly rather than crash on a missing `cli.js`. */ export declare function findClaudeCodeBundle(pkg: string): string | null; /** Which of `events` do NOT appear as a whole-word literal in the bundle. Pure. */ export declare function eventsMissingFromBundle(bundle: string, events: readonly string[]): string[]; /** * Locate the user's installed `@anthropic-ai/claude-code` package dir, or null. * Tries the global npm root, then the `claude` binary's real path. Read-only — * we only read files the user already installed under their own CC license. */ export declare function findClaudeCodePackage(): string | null; /** * Extract the semver core from a `claude --version` line * (e.g. `"2.1.211 (Claude Code)"` → `"2.1.211"`). Pure; null when absent. */ export declare function parseClaudeVersion(raw: string): string | null; /** * The version of the `claude` binary actually on PATH — which can DIFFER from the * package {@link findClaudeCodePackage} locates. In the native-binary era CC ships * as a platform binary with no readable `sdk-tools.d.ts`, so a box can carry a * stale leftover `@anthropic-ai/claude-code` in a global `node_modules` (readable, * but months old and NOT what's running) beside the real, newer CC. Reconciling * against this stops the drift alarm crying wolf on that leftover. Real IO; null * when `claude` isn't runnable. */ export declare function onPathClaudeVersion(): string | null; /** A runtime drift report: how the INSTALLED CC's tool surface compares to ours. */ export interface DialectDriftReport { /** Version of the located `@anthropic-ai/claude-code` package (its types we read). */ readonly installedVersion: string; /** Version of the `claude` binary on PATH, or null — the actually-running CC. */ readonly runningVersion: string | null; readonly validatedVersion: string; /** Tool-input types present in the install but not in ACKNOWLEDGED (CC added). */ readonly newToolTypes: string[]; /** Acknowledged types absent from the install (CC removed/renamed). */ readonly removedToolTypes: string[]; } /** * Best-effort, read-local drift check for `scan` (and other runtime callers). Reads * only the small `sdk-tools.d.ts` (fast — no `cli.js` bundle scan; events are the * CI test's job). Returns null when CC isn't installed or anything is unreadable — * NEVER throws, so it can't break the command. ToS-clean: reads the user's own * install, ships nothing. */ export declare function checkDialectDrift(): DialectDriftReport | null; /** A one-line freshness warning if the dialect drifted from the install, else null. */ export declare function formatDialectDrift(r: DialectDriftReport | null): string | null; //# sourceMappingURL=dialect-drift.d.ts.map