import type { OutputEvent } from './types/session-types.js'; import type { ElicitationRequest, ElicitationResult } from './types/sdk-types.js'; export type LedgerRecord = { v: 1; ts: number; } & LedgerPayload; export type LedgerPayload = { kind: 'meta'; sessionId: string; model: string; cwd?: string; surface?: string; traceLabel?: string | null; } | { kind: 'user'; text: string; } | { kind: 'assistant'; text: string; } | { kind: 'thinking'; text: string; } | { kind: 'tool'; toolName: string; toolUseId?: string; input: string; } | { kind: 'tool_error'; toolName?: string; content: string; } | { kind: 'tool_result'; toolUseId: string; content: string; durationMs?: number; toolName?: string; } | { kind: 'done'; costUsd?: number; durationMs?: number; inputTokens?: number; outputTokens?: number; cacheReadTokens?: number; stopReason?: string; } | { kind: 'error'; message: string; } | { kind: 'paused'; resetsAt?: string; } | { kind: 'resumed'; } | { kind: 'tool_activity'; activeCount: number; activeToolUseIds: string[]; } | { kind: 'rate_limit'; retryAfterMs?: number; } | { kind: 'progress'; message: string; } | { kind: 'subagent_lifecycle'; subagentId: string; status: string; model?: string; agentType?: string; durationMs?: number; totalCostUsd?: number; outputBytes?: number; errorClass?: string; errorMessage?: string; promptHead?: string; turnCount?: number; stopReason?: string; parentToolUseId?: string; } | { kind: 'background_job'; jobId: string; status: string; label?: string; } | { kind: 'plan_mode'; mode: string; } | { kind: 'elicitation'; reqId: string; request: ElicitationRequest; } | { kind: 'elicitation_response'; reqId: string; result: ElicitationResult; hmac: string; } | { kind: 'abort_request'; nonce: string; hmac: string; } | { kind: 'closed'; reason?: string; }; export declare const MAX_TEXT_LEN = 8000; export declare const MAX_TOOL_INPUT_LEN = 400; export declare function clip(text: string, max: number): string; export declare function projectOutputEvent(event: OutputEvent): LedgerPayload | null;