/** * `gsk mesh` — thin proxy to the native gsk-mesh binary. * * gsk-mesh is a standalone native Rust binary (Genspark Mesh: Tailscale-based * private networking + SSH). `gsk mesh ` lazily downloads + verifies * it on first use, then exec's it with the remaining argv. Auth is shared: * gsk-mesh reads the same ~/.genspark-tool-cli/config.json `api_key` that * `gsk login` writes. * * Why this is intercepted OUTSIDE commander (see index.ts main()): a true * passthrough needs commander's `passThroughOptions`, which requires * `enablePositionalOptions` on the program — and that flips global option * parsing for the WHOLE CLI (`gsk web_search q --debug` would break). So we * detect `mesh` by scanning argv ourselves and forward everything verbatim, * leaving the rest of the CLI's parsing untouched. The stub command registered * by `registerMeshCommand` exists only so `mesh` shows up in `gsk --help`. */ import { Command } from 'commander'; /** * If the invocation is `gsk [global-opts] mesh [args...]`, return the args * after `mesh` (possibly empty). Otherwise return null. * * `argv` is process.argv.slice(2) (no node/script prefix). */ export declare function getMeshInvocation(argv: string[]): string[] | null; /** * Insert the wrapper-only `upgrade` entry at the end of the native help's * "Commands:" block. If the block can't be located (native help format * changed), append a short note instead so `upgrade` stays documented. */ export declare function augmentMeshHelp(nativeHelp: string): string; /** * Handle a `gsk mesh ...` invocation end-to-end. Dispatches: * - `upgrade` → TS-side version negotiation + download * - `login` → redirect to `gsk login` (shared auth; no duplicate UI) * - everything else → download-if-needed + exec the native binary verbatim * (`whoami`, `logout`, `devices`, `join`, `ssh`, `--help`, …) */ export declare function runMesh(args: string[], baseUrlOverride?: string): Promise; /** * Register the stub `mesh` command so it appears in `gsk --help`. The real * handling happens in index.ts main() via getMeshInvocation/runMesh before * commander parses — this action is a safety net only. */ export declare function registerMeshCommand(program: Command): void; //# sourceMappingURL=mesh.d.ts.map