//#region src/bin-dispatch.d.ts interface BinDispatch { /** The npm package the launcher resolves and invokes. */ readonly pkg: "document-cli" | "document-mcp"; /** The executable to spawn -- each JS package manager's own download-and-run command. */ readonly command: "npx" | "pnpm" | "yarn" | "bunx"; /** Arguments after the command itself -- begins with the manager's fetch flags, then the package name, then the passthrough args. */ readonly runnerArgs: readonly string[]; } /** * Resolves a launcher invocation into the companion package to run and the runner argument list to spawn it with. A bare invocation or any args that are not the `mcp` dispatch token run the interactive CLI; `mcp` launches the server. `cli` is the explicit escape hatch for the one collision a dispatcher that reserves a subcommand name necessarily has: a leading bare `mcp` is intercepted as "launch the server", so targeting a CLI command on a file literally named `mcp` needs `documents.js cli mcp`. document-cli's own commands never start with `mcp`, so the collision is narrow in practice -- the same "dispatcher reserves a subcommand name" model `git` uses. */ declare function resolveBinDispatch(argv: readonly string[], userAgent: string | undefined): BinDispatch; //#endregion export { BinDispatch, resolveBinDispatch };