MCPcopy
hub / github.com/benjitaylor/agentation / initializeTenantStore

Function initializeTenantStore

mcp/src/server/tenant-store.ts:47–59  ·  view source on GitHub ↗

* Initialize the tenant store.

()

Source from the content-addressed store, hash-verified

45 * Initialize the tenant store.
46 */
47function initializeTenantStore(): import("./sqlite.js").TenantStore {
48 try {
49 // Dynamic import to avoid issues if better-sqlite3 isn't available
50 // eslint-disable-next-line @typescript-eslint/no-require-imports
51 const { createTenantStore } = require("./sqlite.js");
52 const store = createTenantStore();
53 process.stderr.write("[TenantStore] Initialized tenant store\n");
54 return store;
55 } catch (err) {
56 console.error("[TenantStore] Failed to initialize:", (err as Error).message);
57 throw err;
58 }
59}
60
61/**
62 * Reset the tenant store singleton (for testing).

Callers 1

getTenantStoreFunction · 0.85

Calls 1

createTenantStoreFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…