/** * harness.ts — detect which AI coding harness the CLI is running inside, and * whether that harness can run a background "wait" command (poll the server * until a planning stage changes, then re-invoke the agent). * * Detection is a deliberate ALLOWLIST, not a heuristic: only Claude Code is * recognized (via `CLAUDECODE=1`, the env var Claude Code sets for every tool * call). Everything else — GitHub Copilot, a plain terminal, CI — is treated as * `unknown`/`none`, which routes `/hula-plan` to local planning and makes * `hula plan wait` refuse (unless `--force`). This lives in the CLI, not in the * skill text, because `hula init` installs ONE shared skill file for every * harness; the CLI is the single place that can branch on the environment. */ export interface HarnessInfo { /** The detected harness. Only `claude-code` is recognized; else `unknown`. */ harness: 'claude-code' | 'unknown'; /** * Whether this harness can run `hula plan wait` as a backgrounded command and * be re-invoked when it exits. `background` only for Claude Code; `none` * otherwise (the user resumes manually via `/hula-followup `). */ wait: 'background' | 'none'; } /** * Detect the current harness from the environment. Pure and side-effect free; * accepts an explicit `env` for testing (defaults to `process.env`). * * Allowlist: `CLAUDECODE === '1'` → Claude Code with background wait. Any other * value (`'0'`, `'true'`, unset) → unknown with no wait. No other signal is * consulted. */ export declare function detectHarness(env?: NodeJS.ProcessEnv): HarnessInfo; //# sourceMappingURL=harness.d.ts.map