import { type ClaudeUsageReport } from "./usage.js"; export type { ClaudeUsageReport, ClaudeUsageWindow } from "./usage.js"; export { CLAUDE_USAGE_EVENT, CLAUDE_USAGE_PROVIDER } from "./usage.js"; export interface ClaudeUsageProbe { /** Fresh usage, or null when there is nothing to show or reads are switched off. Never rejects. */ read(): Promise; /** Stop the idle Claude Code process now. */ close(): void; /** True once the usage API looked changed or kept failing; the probe then stays off. */ readonly disabled: boolean; } interface ProbeQuery { close(): void; [Symbol.asyncIterator](): AsyncIterator; } export interface ProbeQueryOptions { prompt: AsyncIterable; pathToClaudeCodeExecutable: string; env: Record; tools: string[]; mcpServers: Record; settingSources: []; persistSession: false; } export interface ClaudeUsageProbeOptions { /** Environment for Claude Code (e.g. the host's login-shell PATH). */ env?: NodeJS.ProcessEnv; /** Claude Code executable; resolved from `env.PATH` when omitted. */ executablePath?: string; /** Close the idle process this long after the last read. Default 2 minutes. */ idleShutdownMs?: number; /** Per-read timeout. Default 15 seconds. */ readTimeoutMs?: number; onDisabled?: (reason: string) => void; /** Test seam: start the idle Claude Code query. */ startQuery?: (options: ProbeQueryOptions) => ProbeQuery; } export declare function createClaudeUsageProbe(options?: ClaudeUsageProbeOptions): ClaudeUsageProbe;