import type { ImageContent } from '@earendil-works/pi-ai'; export interface SessionSourceBinding { kind: 'note'; sourceId: string; version: string; attachedAt: number; } export interface TurnContextRef { kind: 'note'; sourceId: string; expectedVersion?: string; } export interface SourceContextRefSummary { kind: AgentSourceContext['kind']; sourceId: string; version: string; title: string; tokenEstimate?: number; truncated?: boolean; } export interface AgentSourceContext { kind: SessionSourceBinding['kind']; sourceId: string; version: string; title: string; text: string; images?: ImageContent[]; tokenEstimate?: number; truncated?: boolean; } export declare function summarizeSourceContext(context: AgentSourceContext): SourceContextRefSummary; export declare function isTurnContextRef(value: unknown): value is TurnContextRef; export declare function parseTurnContextRefs(value: unknown, max?: number): TurnContextRef[] | null; export type AgentSourceContextResolver = (binding: SessionSourceBinding, sessionKey: string) => Promise; export declare function isSessionSourceBinding(value: unknown): value is SessionSourceBinding;