(@Inject(STORE_DIR) storeDir: string)
| 23 | readonly userSettings: UserSettingsRepo; |
| 24 | |
| 25 | constructor(@Inject(STORE_DIR) storeDir: string) { |
| 26 | this.db = openDb(storeDir); |
| 27 | this.runs = new SqliteRunsRepo(this.db); |
| 28 | this.memory = new SqliteMemoryRepo(this.db); |
| 29 | this.users = new UsersRepo(this.db); |
| 30 | this.refreshTokens = new RefreshTokensRepo(this.db); |
| 31 | this.userKeys = new UserKeysRepo(this.db); |
| 32 | this.userSettings = new UserSettingsRepo(this.db); |
| 33 | // A fresh process has no in-memory runs, so any persisted "running" row was |
| 34 | // orphaned by a prior restart/crash — reconcile so the UI never hangs. |
| 35 | this.runs.reconcileInterrupted(); |
| 36 | // Bound refresh-token table growth (keeps revoked-but-unexpired for reuse detection). |
| 37 | this.refreshTokens.pruneExpired(Date.now()); |
| 38 | } |
| 39 | } |
nothing calls this directly
no test coverage detected