/** * Forgen — Session Store (Node.js built-in SQLite) * * 세션 대화를 SQLite에 저장하여 과거 세션을 전문 검색할 수 있게 함. * MCP session-search 도구가 이 데이터를 조회. * 외부 의존성 없음 — Node.js 22+ 내장 node:sqlite 사용. */ /** * v0.4.8 (A1): Codex transcript JSONL 을 SQLite 에 인덱싱. * * Codex schema (Claude 와 다름): * {type: 'response_item', payload: {type: 'message', role: 'user'|'assistant', * content: [{type: 'input_text'|'output_text', text: '...'}]}} * * 결정 (v0.4.8 A1): Claude/Codex 통합 abstraction 대신 분기 함수 두 개로 * 처리. 미래에 host 가 추가될 때 통합 추상화로 리팩터. */ export declare function indexCodexSession(cwd: string, transcriptPath: string, sessionId: string): Promise; /** * Transcript JSONL을 SQLite에 인덱싱. (Claude schema) */ export declare function indexSession(cwd: string, transcriptPath: string, sessionId: string): Promise; /** * 과거 세션 검색. * FTS5 MATCH 우선 사용 (전문 검색, 순위 정렬). * FTS5 미지원 시 LIKE 기반 폴백. */ export declare function searchSessions(query: string, limit?: number): Array<{ sessionId: string; role: string; content: string; timestamp: string; cwd: string; tokens: string[]; }>; /** * 매칭 토큰 위치를 기준으로 컨텍스트 윈도우를 추출. */ export declare function extractContextWindow(content: string, tokens: string[], windowSize?: number): string;