export interface SynapFetchResponseLike { formatted_context?: string | null; facts?: unknown[]; preferences?: unknown[]; episodes?: unknown[]; emotions?: unknown[]; temporal_events?: unknown[]; } export interface SynapFetchArgs { conversation_id?: string | null; user_id: string; customer_id?: string | null; search_query?: string[]; max_results?: number; mode?: string; include_conversation_context?: boolean; } export interface SynapMemoryCreateArgs { document: string; user_id: string; customer_id?: string | null; metadata?: Record; } export interface SynapMemoryCreateResult { ingestion_id: string; } export interface SynapRecentMessage { role: string; content: string; timestamp: string; message_id: string; } export interface SynapPromptContext { formatted_context?: string; available?: boolean; recent_messages?: SynapRecentMessage[]; recent_message_count?: number; total_message_count?: number; /** The framed compaction block; absent before the first compaction and on older SDKs. */ context_block?: string | null; /** Earlier turns the SDK found for the latest message, rendered. */ history_block?: string | null; } export interface SynapSdkLike { fetch(args: SynapFetchArgs): Promise; conversation: { context: { get_context_for_prompt(args: { conversation_id: string; /** Optional formatting style — structured | narrative | bullet_points. */ style?: string; }): Promise; }; }; memories: { create(args: SynapMemoryCreateArgs): Promise; }; } export interface EveAuthContextLike { readonly principalId?: string; readonly subject?: string; } export interface EveSessionLike { readonly session: { readonly id: string; readonly auth?: { readonly current?: EveAuthContextLike | null; readonly initiator?: EveAuthContextLike | null; } | null; }; } export declare class SynapIntegrationError extends Error { readonly operation: string; readonly cause?: unknown; constructor(operation: string, message: string, cause?: unknown); } /** * Resolve the Synap user scope for a turn. Prefers an explicit id, then the * turn's *current* principal. Returns `undefined` when neither is present — * callers apply the read/write policy accordingly. * * Deliberately does NOT fall back to `auth.initiator`: on a delegated or * system-initiated session `initiator` is whoever *started* the session (e.g. * an admin/service), not the end user this turn acts for — using it would scope * memory to the wrong principal. When `current` is null (unauthenticated * channel), pass an explicit `userId` instead. */ export declare function resolveUserId(explicit: string | undefined, ctx?: EveSessionLike): string | undefined; /** Resolve the conversation scope: explicit id, else the eve session id. */ export declare function resolveConversationId(explicit: string | undefined, ctx?: EveSessionLike): string | undefined; //# sourceMappingURL=types.d.ts.map