/**
 * Resolve an npm package's bin entry script (the real .js/.mjs file, NOT the
 * `node_modules/.bin` shim). `binName` selects which bin when a package exposes
 * several; defaults to the package's sole/string bin. Returns an absolute path
 * to the script, or null when the package or its bin can't be resolved.
 */
export declare function findPackageBinScript(pkgName: string, binName: string, start?: string): string | null;
/**
 * Parse an `npx`/`npm exec` command + args into the target package spec, or null
 * when the command isn't an npx/npm-exec invocation. Skips npx flags (`-y`,
 * `--yes`, `-p <pkg>`, `--package <pkg>`, `--`) to find the package positional.
 * The returned `pkg` keeps any leading `@scope/name`; a trailing `@version` is
 * stripped for resolution since the installed copy's version is authoritative.
 */
export declare function parseNpxPackage(command: string, args: readonly string[]): string | null;
/**
 * Resolve a package's real bin script from npx's on-demand cache. This is where
 * `npx -y <pkg>` installs a server on first run, so from the SECOND launch
 * onward we can spawn the real bin directly with `process.execPath` and skip
 * npx's ~90 MB `npm exec` wrapper — for ANY package, including user-added MCP
 * servers we don't (and can't) bundle.
 *
 * `versionPin` (from a `<pkg>@x.y.z` spec) is honoured strictly: a cached copy
 * is used only when its `package.json` version matches exactly, so a pin never
 * silently resolves to the wrong cached version (it falls through to npx, which
 * resolves the pin correctly). Unpinned specs take the highest cached version.
 * Deterministic fs reads only — no resolver hooks.
 */
export declare function findNpxCachedBinScript(pkgName: string, binName: string, versionPin?: string): string | null;
export interface ResolvedStdioCommand {
    command: string;
    args: string[];
}
/**
 * Rewrite a stdio `{ command, args }` to a direct `node <binScript>` invocation
 * when it's an `npx`/`npm exec` of a package whose bin script is resolvable
 * either from ggcoder's install (bundled/dep) OR from npx's on-demand cache
 * (`~/.npm/_npx/...`, populated on the package's first run). Returns the
 * original `{ command, args }` unchanged otherwise (non-npx command, or the
 * package isn't cached yet — the true first run, which npx then installs).
 */
export declare function resolveStdioCommand(command: string, args?: readonly string[]): ResolvedStdioCommand;
//# sourceMappingURL=resolve-stdio.d.ts.map