export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; }; export type JsonObject = { [key: string]: JsonValue; }; export declare const MAX_BATCH_EVENTS = 200; export declare const MAX_EVENT_PAYLOAD_BYTES: number; export declare const MAX_PREVIEW_BYTES: number; export declare const MAX_ID_LENGTH = 256; export declare const MAX_TEXT_LENGTH: number; export declare const LEDGER_EVENT_TYPES: readonly ["intake.started", "intake.answered", "intake.ready", "intake.exhausted", "run.started", "run.closed", "request.received", "constraint.recorded", "decision.recorded", "step.started", "step.completed", "step.failed", "approval.requested", "approval.decided", "tool.requested", "tool.started", "tool.completed", "tool.failed", "tool.outcome_unknown", "command.started", "command.completed", "file.observed", "file.changed", "test.started", "test.completed", "verification.recorded", "error.recorded", "retry.recorded", "cancellation.recorded", "context.used", "context.feedback", "memory.proposed", "memory.promoted", "task_profile.revised", "correction.recorded", "source.event"]; export type LedgerEventType = (typeof LEDGER_EVENT_TYPES)[number]; export declare const CAPTURE_PROFILES: readonly ["minimal", "standard", "diagnostic"]; export type CaptureProfile = (typeof CAPTURE_PROFILES)[number]; export declare const COVERAGE_LEVELS: readonly ["complete", "best_effort", "declared", "unavailable"]; export type CoverageLevel = (typeof COVERAGE_LEVELS)[number]; export declare const RUN_STATUSES: readonly ["intake", "active", "completed", "failed", "cancelled", "interrupted"]; export type RunStatus = (typeof RUN_STATUSES)[number]; export declare const TERMINAL_RUN_STATUSES: readonly ["completed", "failed", "cancelled", "interrupted"]; export declare const TASK_TYPES: readonly ["build", "debug", "research", "review", "devops", "writing", "analysis"]; export type TaskType = (typeof TASK_TYPES)[number]; export interface Coverage { run: CoverageLevel; tool: CoverageLevel; command: CoverageLevel; file: CoverageLevel; approval: CoverageLevel; } export interface ClientInput { kind: string; version?: string; sessionId?: string; } export interface ProfileHints { taskType: TaskType | null; target: string | null; expected: string | null; constraints: JsonValue | null; } export interface TaskInput { title: string; query: string; profileHints: ProfileHints; } export interface AnswerInput { apiVersion: '1'; questionId: string; value: JsonValue; } export interface CreateRunInput { runId: string; workspace: string; protocolVersion: '1'; client: ClientInput; captureProfile: CaptureProfile; coverage: Coverage; task: TaskInput; metadata?: JsonObject; parentRunId?: string; startedAt?: string; } export interface LedgerEventInput { eventId?: string; sourceEventId?: string; sourceSequence?: number; eventType: LedgerEventType; sourceType?: string; actor: string; outcome?: string | null; occurredAt?: string; payload: JsonValue; } export interface Redaction { path: string; kind: 'sensitive_key' | 'secret_pattern' | 'url' | 'home_path' | 'preview_truncated' | 'environment_value' | 'hidden_reasoning'; } export interface SanitizationOptions { workspace?: string; home?: string; } export interface Sanitized { value: T; redactions: Redaction[]; truncated: string[]; } export interface RunRecord { runId: string; workspace: string; client: ClientInput; protocolVersion: string; captureProfile: CaptureProfile; coverage: Coverage; status: RunStatus; title: string | null; taskHash: string | null; metadata: JsonObject; lastSequence: number; lastSourceSequence: number | null; startedAt: string; endedAt: string | null; createdAt: string; updatedAt: string; } export interface AppendAck { runId: string; acceptedThrough: number; localSequences: number[]; sourceSequences: Array; eventIds: string[]; } export interface LedgerStoreOptions extends SanitizationOptions { now?: () => string; } //# sourceMappingURL=types.d.ts.map