(sessionId: string)
| 196 | // Insert a real cursor legacy session into the store so the helper's |
| 197 | // metadata writes have something to update. |
| 198 | function insertLegacy(sessionId: string): Session { |
| 199 | const cache = (engine as unknown as { sessionCache: import('./sessionCache').SessionCache }).sessionCache |
| 200 | const persisted = cache.getOrCreateSession( |
| 201 | sessionId, |
| 202 | { |
| 203 | path: '/tmp/proj', |
| 204 | host: 'localhost', |
| 205 | flavor: 'cursor', |
| 206 | cursorSessionId: 'cursor-uuid-real', |
| 207 | cursorSessionProtocol: 'stream-json' |
| 208 | }, |
| 209 | null, |
| 210 | 'default' |
| 211 | ) |
| 212 | return persisted |
| 213 | } |
| 214 | function getStoredMetadata(sessionId: string): Record<string, unknown> | undefined { |
| 215 | const store = (engine as unknown as { store: Store }).store |
| 216 | const row = store.sessions.getSession(sessionId) |
no test coverage detected