/** * Anchor Map 핸들러 * Anchor Map 데이터 생성 및 브로드캐스트 로직 * Phase 1.2: http-server.ts 리팩토링 */ import type Database from 'better-sqlite3'; import type { ServerServices } from '../bootstrap.js'; import type { WebSocket } from 'ws'; /** * Anchor Map 노드 타입 */ export interface AnchorMapNode { id: string; type: 'anchor' | 'memory'; slot?: string; content: string; hop_distance?: number; similarity?: number; importance?: number; created_at?: string; embedding_missing?: boolean; } /** * Anchor Map 링크 타입 */ export interface AnchorMapLink { source: string; target: string; type: 'anchor' | 'hop' | 'link'; hop_distance?: number; similarity?: number; } /** * Agent ID별 앵커 개수 항목 */ export interface AnchorAgentIdEntry { agent_id: string; anchor_count: number; } /** * memory_id가 설정된 앵커를 agent_id별로 집계 */ export declare function listAnchorAgentIds(db: Database.Database): AnchorAgentIdEntry[]; /** * Anchor Map 데이터 타입 */ export interface AnchorMapData { agent_id: string; anchors: Array<{ agent_id: string; slot: string; memory_id: string | null; created_at: string; updated_at: string; }>; nodes: AnchorMapNode[]; links: AnchorMapLink[]; timestamp: string; } /** * Anchor Map 데이터 생성 */ export declare function buildAnchorMapData(db: Database.Database, serverServices: ServerServices, agentId: string): Promise; /** * WebSocket 구독자에게 브로드캐스트 */ export declare function broadcastToSubscribers(subscribers: Set, updateData: AnchorMapData): void; /** * Anchor Map 업데이트 브로드캐스트 */ export declare function broadcastAnchorMapUpdate(db: Database.Database | null, serverServices: ServerServices | null, anchorMapSubscribers: Map>, agentId: string): Promise; //# sourceMappingURL=anchor-map.handler.d.ts.map