/** * @fileoverview Thin domain-typed wrapper around the generic marker * walker for `kind: "tool"`. * * A Tool plugin is any npm package (scoped or unscoped, first- or third- * party) whose `package.json` declares: * * { "opensipTools": { "kind": "tool" } } * * The walker itself lives in `marker-discovery.ts` — this file preserves * the public surface (`discoverToolPackages`, `DiscoveredToolPackage`) * existing CLI consumers depend on, and delegates the actual node_modules * traversal to the shared primitive. * * Direct dependencies of opensip-tools are always loaded by the * CLI's own import statements; this discovery exists so a user can * install a third-party tool via `npm install` and have it picked up * with no further wiring. */ export interface ToolPackageDiscoveryOptions { /** Absolute path to the project root. */ readonly projectDir: string; } export interface DiscoveredToolPackage { /** npm package name, e.g. '@opensip-tools/fitness' or '@my-co/audit'. */ readonly name: string; /** Absolute path to the package's directory inside node_modules. */ readonly packageDir: string; } /** * Walk up from `projectDir` looking for `node_modules/` directories * containing packages with `opensipTools.kind === 'tool'`. Returns the * deduplicated list (first-occurrence-wins by package name). */ export declare function discoverToolPackages(options: ToolPackageDiscoveryOptions): DiscoveredToolPackage[]; /** * One discovery source for {@link discoverToolPackagesFromAnchors}. * * - `walkUp`: walk ancestor `node_modules` from `dir` (project trees, the * CLI install dir — covers a plain `npm install @tool` and global CLI * siblings). * - `scanDir`: scan exactly `