/** * Mirror conformance guard (P1.2). * * Compile-time assertions binding the hand-mirrored v2 plugin context in * `./types.ts` to the official `@opencode/plugin` types (pinned to the * audited version in devDependencies). Enforcement point is `bun run * typecheck`: this file must NOT carry a test suffix, because tsconfig * excludes test-suffixed files (`*.test.ts`) from tsc — a test-suffixed * guard silently checks nothing. * * This file is deliberately NOT imported by any entry point, so it never * reaches the runtime bundles, and it uses `import type` only, so it * never loads `@opencode/plugin` at runtime. * * Layers: * 1. Pin the official session hook surface exactly. Bumping the * devDependency past an OpenCode-core hook change fails typecheck * here first. * 2. The hook names the mirror registers exist officially, and the * official-name subset the mirror's hook signature accepts equals * the declared list — stale guard lists and mirror overloads that * appear/disappear both fail. * 3. Official payload fields the bridges rely on exist with the shapes * the bridges assume. * * Known residual: a NEW mirror hook overload using a non-official name * is invisible to layer 2's derivation (which filters official names * only). Add such names to `MirrorSessionHookNames` explicitly; layer * 2a then fails until the name is official — which is the intended * alarm. Deleting this file goes unnoticed by `bun test`; it is * referenced from docs/opencode-v2-compatibility.md instead. */ export {};