/** * Workspace bring-up helpers used by `agenticros init` and any runner that * needs the JS workspace built before it can launch (currently `up real`; * sim runners don't need TS deps). * * Why shared: across 0.1.2 .. 0.1.6 we kept hitting "user picks Launch * without running init first" failures. Rather than asking the user to * pick the right menu item, we just auto-recover. */ /** * `node_modules/` alone isn't proof that `pnpm install` completed - pnpm * creates the dir before it succeeds, and a half-finished install leaves it * empty or missing `.pnpm/` / `.bin/`. Checking for `.modules.yaml` (written * at the END of a successful install) is a reliable success marker. * * We ALSO verify that per-package symlinks exist - specifically the * agenticros-claude-code package's tsc binary. The CLI's heal flow can * accidentally clobber per-package node_modules even when root looks * healthy, which manifests as `sh: tsc: not found` later. Treating that * case as "not installed" forces a clean pnpm install on next launch. */ export declare function isWorkspaceInstalled(repoRoot: string): boolean; /** `process.versions.modules` — NODE_MODULE_VERSION (127 on Node 22, 147 on Node 26). */ export declare function currentNodeModuleAbi(): string; export declare function readWorkspaceNodeAbi(repoRoot: string): string | undefined; export declare function writeWorkspaceNodeAbi(repoRoot: string, abi?: string): void; /** * True when JS native addons were compiled for a different Node ABI than the * running interpreter. After `nvm use 26` without `agenticros init --force`, * `node_modules` still exists so init would otherwise skip `pnpm install`. */ export declare function nativeAddonsNeedRebuild(repoRoot: string): boolean; /** * `pnpm build` succeeded if the shared packages that adapters import have * been emitted. The agenticros-claude-code adapter is pre-built in the * published bundle so we don't check that one — but `object-detection` * (and ros-camera) are *not* prebuilt (pack-runtime drops their dist/), * and claude-code's tsc fails with "Cannot find module * '@agenticros/object-detection'" if those dist trees are missing. * * Checking only core/dist used to skip `pnpm -r build` on upgrade when * core was already built from an older CLI, leaving object-detection * unbuilt after refreshShippedCode dropped the new package. */ export declare function isWorkspaceBuilt(repoRoot: string): boolean; /** * Run `pnpm install` with the same flags init.ts uses. * * Native robotics packages (`node-datachannel`, `rclnodejs`) are optional * deps of @agenticros/core. If their install scripts fail (common in * NemoClaw / minimal containers), retry with `--no-optional` so zenoh and * rosbridge transports still work. */ export declare function runPnpmInstall(repoRoot: string): Promise; /** * Idempotently make sure the workspace is install + build ready. Anything * already in place is left untouched. * * @param repoRoot Path to the install or workspace root. * @param what Short label describing what needs the workspace (used in * the user-facing notice). */ export declare function ensureWorkspaceReady(repoRoot: string, what: string): Promise; //# sourceMappingURL=workspace.d.ts.map