Lines 27-67javascript
27 * proprietary package into an MIT dep tree, (b) couple the harness-agnostic core to
28 * a Claude-Code-only package, and (c) not even give us `builtinAgentTools` (the SDK
29 * union is input-SCHEMA names like `FileReadInput`/`CronCreateInput` — a superset in
30 * a different vocabulary than the subagent `tools:` catalog). Reading the local file
31 * + a hand-authored list of bare identifiers (facts) is the deliberate ToS-clean
32 * design; this drift alarm is what keeps the hand-list honest.
34 * NOTE (CC ≥ ~2.1.18x): CC switched to a NATIVE-BINARY distribution — the npm
35 * package ships `bin/claude.exe` (from a platform `optionalDependencies` package),
36 * NOT a readable `cli.js` JS bundle. So the old "grep hook-event string literals out
37 * of cli.js" check has no bundle to read and degrades to a LOUD SKIP (see
38 * `findClaudeCodeBundle`); `sdk-tools.d.ts` is still shipped, so the tool-type drift
39 * alarm keeps working.
41 * Pure parsers (testable with fixtures) + a local-install locator. TWO consumers:
42 * the gated CI test in `dialect-drift.test.ts` (fails loud on tool/event drift), and
43 * `vigiles audit` at runtime via `checkDialectDrift`/`formatDialectDrift` (a best-effort,
44 * read-local freshness WARN when the installed CC's tool surface drifts from ours).
46const node_fs_1 = require("node:fs");
47const node_path_1 = require("node:path");
48const node_child_process_1 = require("node:child_process");
49/**
HighChild Process
Package source references child process execution.
dist/dialect-drift.jsView on unpkg · L47 50 * The Claude Code version `ACKNOWLEDGED_TOOL_INPUT_TYPES` + the dialect were last
51 * validated against. SINGLE SOURCE OF TRUTH for the pin: CI installs
52 * `@anthropic-ai/claude-code@<this>` (grepped from this line) in every job that
53 * drives the real binary, so the dialect-drift alarm fires only on a DELIBERATE
54 * bump — not on every unpinned CC release landing on an unrelated PR — and the
55 * real-`claude` harness/eval tests stay reproducible. Bump this together with
56 * `ACKNOWLEDGED_TOOL_INPUT_TYPES` (the gated test cross-checks them).
58exports.VALIDATED_CC_VERSION = "2.1.187";
60 * The `<X>Input` interface names we've ACKNOWLEDGED from `sdk-tools.d.ts` (Claude
61 * Code 2.1.187). The drift test fails when the installed set differs — a loud nudge
62 * to re-check `claudeCodeDialect` (and update this set) when CC adds/removes a tool.
63 * NOT a redistribution of their file: a list of bare identifiers (facts), authored here.
65 * 2.1.187 added the agent-PLATFORM surface (cron/scheduling/worktrees/web-app):
66 * Artifact, Cron{Create,Delete,List}, Enter/ExitWorktree, EnterPlanMode, Monitor,
67 * Projects, PushNotification, REPL, ReadMcpResourceDir, RemoteTrigger,