* Persist a fact. scope='project' (default) ties it to `cwd`; scope='user' * makes it global — surfaced in every session regardless of directory. User * facts are stored with a '*' sentinel cwd so they never collide with a real path.
(sessionId: string, cwd: string, fact: string, scope: 'project' | 'user' = 'project')
| 300 | `).run(sessionId); |
| 301 | }); |
| 302 | tx(); |
| 303 | } |
| 304 | |
| 305 | /** Delete a session entirely (cascades to messages via FK). */ |
| 306 | deleteSession(sessionId: string): void { |
| 307 | this.db.prepare(`DELETE FROM sessions WHERE id = ?`).run(sessionId); |
| 308 | } |
| 309 | |
| 310 | /** |
| 311 | * Persist a fact. scope='project' (default) ties it to `cwd`; scope='user' |
| 312 | * makes it global — surfaced in every session regardless of directory. User |
no test coverage detected