import type { ImageAttachment, WireMessage } from "../wire.js"; import type { SupportedMemoryDetails } from "../../memory/types.js"; /** A single message as stored in SQLite. Identical to WireMessage. */ export type StoredMessage = WireMessage; /** Input shape for `appendMessage`. */ export interface AppendMessageInput { /** Optional override; otherwise a UUID is generated. */ id?: string; role: "user" | "assistant" | "system"; content: string; /** Already-serialized JSONL of streamed events. Default "". */ eventsJsonl?: string; /** Optional override; otherwise Date.now(). */ createdAt?: number; /** Base64-encoded images attached to user messages (omitted for assistant/system). */ images?: ImageAttachment[]; /** Credits consumed by this message, persisted to a dedicated column (null until token_usage arrives). */ creditsUsed?: number | null; /** Output token count for this message, persisted to a dedicated column (null until token_usage arrives). */ outputTokens?: number | null; /** Generation window ms (message_end − first streamed delta, excludes TTFT); null until token_usage arrives. */ durationMs?: number | null; /** Output tokens per second over the generation window (1 decimal); null until token_usage arrives. */ tokensPerSecond?: number | null; /** Time-to-first-delta ms (first streamed delta − message_start); null until token_usage arrives. */ ttftMs?: number | null; /** Stable per-session insertion sequence. Auto-assigned/preserved when omitted. */ sequence?: number; } export interface CreateSessionInput { /** Owning project. Required — sessions cannot exist standalone. */ projectId: string; /** Optional override; otherwise a UUID is generated. */ id?: string; /** Optional title; default "New conversation". */ title?: string; } export interface CreateProjectInput { /** Optional override; otherwise a UUID is generated. */ id?: string; name: string; /** Absolute, validated filesystem path. */ path: string; } export interface SessionMemorySnapshot { sessionId: string; summary: string; details: SupportedMemoryDetails; coveredSourceCount: number; updatedAt: number; } export interface UpdateProjectInput { name?: string; /** Already-validated absolute path. */ path?: string; } /** Persisted dev-server command definition. */ export interface DevProcessDefinition { id: string; projectId: string | null; label: string; command: string; cwd: string; createdAt: number; updatedAt: number; } export interface CreateDevProcessDefinitionInput { id?: string; projectId?: string | null; label: string; command: string; cwd: string; } //# sourceMappingURL=types.d.ts.map