import type { PromptRunOptions } from '../types/PromptRunOptions'; import type { PromptRunResult } from '../types/PromptRunResult'; import type { PromptRunner } from '../types/PromptRunner'; import { type HarnessSubscriptionUsage } from '../types/HarnessSubscriptionUsage'; import type { ClaudeCodeRunnerOptions } from './ClaudeCodeRunnerOptions'; /** * Runs prompts via the Claude Code CLI. */ export declare class ClaudeCodeRunner implements PromptRunner { private readonly options; /** TEAM uses this harness's existing command tool, with the same permissions as its caller. */ readonly teamCapability: "command-tools"; readonly name = "claude-code"; private subscriptionUsage; /** * Creates a new Claude Code runner. */ constructor(options?: ClaudeCodeRunnerOptions); /** * Returns the latest subscription-limit snapshot emitted by this Claude Code session. * * Claude exposes these values in the normal stream, so no separate quota-only model call is made. The snapshot is * kept current while the prompt is still running, which is what lets the dashboard poll it instead of showing the * values of the previous prompt for the whole round. */ getSubscriptionUsage(): Promise; /** * Runs the prompt using Claude Code and parses usage output. */ runPrompt(options: PromptRunOptions): Promise; /** * Runs one Claude Code CLI process and returns its raw output. */ private runClaudeCodeOnce; /** * Keeps the snapshot current from one line of the stream which is still being written. * * A coding prompt can run for hours, and a subscription window keeps moving during all of it. Only a rate-limit * event can change the snapshot, so the far more frequent tool and message lines are recognized by their type and * skipped before anything is parsed. */ private updateSubscriptionUsageFromOutputLine; /** * Keeps the newest usable Claude subscription-limit values reported by the stream. * * A stream can omit these values for API-key users or unsupported plan types; retaining the prior snapshot avoids * a temporary omission erasing a still-valid dashboard value while a long queue is running. */ private updateSubscriptionUsage; }