/** * Detected host environment, surfaced to agents so they (a) target the right * OS/shell and (b) only invoke tooling that is actually installed — instead of * guessing (e.g. DeepSeek hallucinating a `bash` tool or GNU-only flags on macOS). */ export interface HostEnvironment { /** Raw node platform string (darwin | linux | win32 | ...). */ platform: string; /** Friendly OS name (macOS | Linux | Windows | ). */ osName: string; /** OS kernel release. */ osRelease: string; /** CPU architecture (arm64 | x64 | ...). */ arch: string; /** Login shell from $SHELL, if known. */ shell: string | undefined; /** Node.js version (process.version). */ nodeVersion: string; /** Detected project package manager (npm | pnpm | yarn | bun | undefined). */ packageManager: string | undefined; /** Names of common dev CLIs found on PATH. */ installedTools: string[]; } /** * Detect the host environment. Tool/OS detection is process-stable, so the * result is cached after the first call (package-manager detection re-runs only * when the cache is cold). Pass a projectRoot for package-manager detection. */ export declare function detectEnvironment(projectRoot: string): Promise; /** Reset the cache (tests). */ export declare function resetEnvironmentCache(): void; /** * Render the environment + the role's exact harness tools as a markdown block * for injection into an agent's system prompt. * * @param env Detected host environment. * @param toolNames The exact harness tool names available to this role (e.g. * ["read_file","glob","grep"]). Used to stop models inventing * tools (e.g. a non-existent "bash" for read-only roles). * @param projectRoot Absolute path to the project root. Surfaced so models stop * guessing it — non-Claude models otherwise invent an absolute * path with the wrong home dir, which the path sandbox rejects. */ export declare function formatEnvironmentContext(env: HostEnvironment, toolNames: string[], projectRoot?: string): string; //# sourceMappingURL=environment.d.ts.map