/** * The `spawn-helper` binaries a node-pty install may ship, given its package * root. Pure over (root, readdir) so it is unit-testable. Covers the prebuilt * layout (`prebuilds//spawn-helper`) plus the from-source fallback * (`build/Release/spawn-helper`). */ export declare function spawnHelperPaths(root: string, readdir?: (dir: string) => string[]): string[]; /** * Make node-pty's `spawn-helper` executable, resolved from node-pty's REAL * location at runtime. * * Why this exists: the prebuilt helper must be `chmod +x` to run, and the * package's `postinstall` does that — but via a RELATIVE path * (`node_modules/node-pty/...`) that only holds when shadok-ai is the root * package (a dev checkout). Installed as a dependency (npx / the managed * `~/.shadok-ai/app`), node-pty is hoisted to the parent `node_modules` and the * postinstall's CWD is shadok-ai's own dir, so the chmod hits a path that isn't * there and silently no-ops — leaving the helper non-executable and * `pty.spawn()` throwing an opaque `Error: posix_spawnp failed` on the user's * first agent. Resolving node-pty here sidesteps every install layout. * * Best-effort and idempotent; a no-op on Windows (no spawn-helper there). */ export declare function ensureSpawnHelperExecutable(notify?: (line: string) => void): void;