/** * Absolute path to the vendored grammar tree (`/vendor`). * * This module compiles to `/dist/core/tree-sitter/vendored-grammars.js` * and runs from `/src/core/tree-sitter/...` under tsx in dev — both sit * three directories below the package root, and the build (`tsc`) never bundles, * so `import.meta.url` resolves the same way in both. `vendor/` ships in the * published package via package.json `files`. */ export declare const VENDOR_ROOT: string; /** * The tree-sitter grammars GitNexus vendors inside its own package (NOT npm * dependencies). Kept in one place so consumers (runtime loaders, the CLI * availability probe, and the test grammar-introspection helper) agree on which * grammars resolve from `vendor/` rather than `node_modules`. */ export declare const VENDORED_GRAMMAR_PACKAGES: ReadonlySet; /** Absolute directory of a vendored grammar package under `vendor/`. */ export declare const vendoredGrammarDir: (packageName: string) => string; /** * Load a vendored tree-sitter grammar by its absolute path under `vendor/`. * * GitNexus vendors five grammars (c/dart/proto/swift/kotlin) inside its own * package under `vendor/`, each shipping committed per-platform prebuilds. They * are deliberately NOT npm dependencies and must NEVER be copied into * `node_modules`: an undeclared package under `node_modules` is "extraneous" to * every subsequent `npm`/`npx` arborist reify, which prunes or relocates it. * That is the root cause of #2111 / #1728 — on Windows the relocation throws * `EPERM: operation not permitted, symlink` (errno -4048) during the npx-cache * reify Antigravity triggers when it launches the MCP server, and on every OS * the second run silently deletes the materialized grammars. * * Resolving the grammar by absolute path runs its own `bindings/node` entry, * which calls `node-gyp-build()` and loads * `vendor//prebuilds/-/…` directly — no build, no write, * no `node_modules` copy. (`node-gyp-build` itself IS an npm dependency and * resolves normally from the grammar directory.) */ export declare const requireVendoredGrammar: (packageName: string) => unknown;