/** Factory Sessions API evidence projection. Hosts own credentials, pagination, * scheduling and delivery; RelayHistory owns interpreting provider JSON. */ export type FactoryMessage = Record; export type FactoryEvidence = { v: 1; source: 'droid'; sessionId: string; eventId: string; lens: 'history'; kind: 'prompt' | 'assistant' | 'tool_call' | 'marker'; ts: string; content: string; actorRole: string | null; toolCalls?: Array<{ id: string; tool: string; input: unknown; }>; record: { messageId: string; messageVersion: null; updatedAt: number | null; blockIds: string[]; raw: FactoryMessage; toolResults?: Array<{ id: string; status: string | null; output?: unknown; error?: unknown; }>; }; }; /** IDs remain opaque. Links and path delimiters must not become API paths. */ export declare function factorySessionId(value: string): string; /** Project a complete message set (all pages). Never invent IDs, timestamps or usage. */ export declare function factoryEvidence(session: string, messages: unknown[]): FactoryEvidence[]; /** Validate one documented GET /sessions/{id}/messages envelope. A host must * fetch every page before treating its snapshot as complete or retiring rows. */ export declare function factoryMessagePage(value: unknown): { messages: FactoryMessage[]; nextCursor: string | null; hasMore: boolean; }; /** Origin-independent row identities used by ai-hist's change feed and exports. * Hosts supply origin/revision fences and submit these through canonical delivery. */ export type FactoryCanonicalRecord = { kind: 'session_event' | 'tool_call' | 'session_marker'; source: 'droid'; session_id: string; key: string[]; record_id: string; payload: Record; /** Full provider JSON for a host's separate raw capture, never an unbounded marker column. */ raw?: FactoryMessage; }; export declare function factoryCanonicalRecordId(key: readonly string[]): Promise; /** Per-block API projection with the SAME native message/ordinal keys as local * Droid v2 acquisition. API-specific raw fields stay in non-activity markers. * A complete snapshot must be acquired before calling this function. */ export declare function factoryCanonicalEvidence(session: string, messages: unknown[]): Promise; //# sourceMappingURL=factory-source.d.ts.map