MCPcopy Create free account
hub / github.com/QuantiaAI/helm-agents / constructor

Method constructor

apps/api/src/engine/store.service.ts:25–38  ·  view source on GitHub ↗
(@Inject(STORE_DIR) storeDir: string)

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 3

openDbFunction · 0.90
pruneExpiredMethod · 0.80
reconcileInterruptedMethod · 0.45

Tested by

no test coverage detected