/** * ClaudeCodeHarness — CodingHarness implementation for Claude Code (claude). * * Claude Code is a hybrid: pi-default prompt delivery and nested `message.role` * transcripts, but cmd-style readiness/completion via SessionStart/Stop hooks * registered in `settings.json` under the ambient `CLAUDE_CONFIG_DIR`. * * Key characteristics (test-driven v2.1.208 — see * `docs/harness-specific-notes/claude-code.md` "Test-Drive Findings"): * - No `promptDeliveryStyle` / `combinesTextAndEnter` overrides (pi defaults). * - No live tool-status stream; `currentTool` is derived from the transcript. * - Real per-message Anthropic usage feeds the context/health bar. * - Anthropic-only: routing `provider` is ignored (never mapped to * `ANTHROPIC_BASE_URL`). Use ambient Claude/Anthropic auth + models. * - Folder trust is pre-seeded into `.claude.json` because * `--dangerously-skip-permissions` does NOT suppress the trust dialog. * * Config-dir scope (layer B): `CLAUDE_CONFIG_DIR` redirects the ENTIRE config * tree (settings, sessions, trust) — exactly like pi's `PI_CODING_AGENT_DIR`, * not like cmd's HOME-redirect. So `configSubdir` is `"."` (the redirect target * IS the config dir) and `redirectEnv` is `{ CLAUDE_CONFIG_DIR: dir }`. */ import type { CodingHarness, HarnessConfigProfile, HarnessEnvironment, HarnessSpawnParams, SessionAnalysis } from "#src/harness/interface"; import type { TmuxManager } from "#src/tmux-manager"; import type { SubagentRecord } from "#src/types"; export declare class ClaudeCodeHarness implements CodingHarness { readonly id = "claude-code"; readonly roleDefinitionDelivery: "prompt-context"; /** Self-described widget identity (fallback row retained in harness-colors). */ readonly widgetIdentity: { colorHex: string; sigil: string; }; readonly completionSentinelKind = "Stop-hook sentinel"; /** Default tmux stop combo (fallback row retained in guard-config). */ readonly defaultStopKeyCombo = "C-c"; readonly providesToolStatusStream = false; /** * Config-dir profile (layer B). `CLAUDE_CONFIG_DIR` redirects the entire * config + session tree (pi's `PI_CODING_AGENT_DIR` analogue), so the synth * dir IS the agent config dir (`configSubdir "."`). `settings.json` is * deep-merged; `.claude.json` (install metadata + project trust) is carried * so a synth dir keeps the user's install identity; `.credentials.json` is * symlinked read-only from the base when present. */ readonly configProfile: HarnessConfigProfile; resolveSessionDir(record: SubagentRecord): string; resolveEndFilePath(agentId: string, runtimeDir?: string): string; resolveOwnedTempPaths(agentId: string, runtimeDir?: string): string[]; setupEnvironment(params: HarnessSpawnParams): Promise; /** * Re-seed launch-blocking `.claude.json` flags for the *actual* launch cwd. * Called after Phase 2 (worktree may now be known). Always runs — even with * no worktree — so a tmux session whose default-path differs from the parent * process cwd still has trust pre-accepted for the path we `cd` into. */ prepareAfterWorktree(env: HarnessEnvironment): Promise; buildLaunchCommand(params: HarnessSpawnParams, env: HarnessEnvironment): string; waitForReady(_params: HarnessSpawnParams, env: HarnessEnvironment, agentId: string, _tmux: TmuxManager, signal?: AbortSignal): Promise; readTurnCount(env: HarnessEnvironment): Promise; analyzeSession(filePath: string): SessionAnalysis; isComplete(env: HarnessEnvironment): boolean; cleanup(env: HarnessEnvironment): Promise; } //# sourceMappingURL=claude-code-harness.d.ts.map