@remit/mcp-server 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,4 @@
1
- import { type BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
2
- export interface McpAuthDatabase {
3
- db: BetterSQLite3Database;
4
- close: () => void;
5
- }
6
- export declare const refuseSharedTableWrites: (db: BetterSQLite3Database) => BetterSQLite3Database;
7
- export declare const openMcpAuthDatabase: (filename: string) => McpAuthDatabase;
1
+ import { type Db, type SqliteHandle } from "@remit/drizzle-service/sqlite";
2
+ export type McpAuthDb = Db<Record<string, unknown>>;
3
+ export declare const refuseSharedTableWrites: (db: McpAuthDb) => McpAuthDb;
4
+ export declare const openMcpAuthDatabase: (filename: string) => SqliteHandle<Record<string, unknown>>;
@@ -1,6 +1,5 @@
1
1
  import { auth_account, auth_user } from "@remit/auth-service/schema";
2
- import Database from "better-sqlite3";
3
- import { drizzle, } from "drizzle-orm/better-sqlite3";
2
+ import { openSqlite, } from "@remit/drizzle-service/sqlite";
4
3
  const SHARED_TABLES = new Set([auth_user, auth_account]);
5
4
  const WRITES = new Set([
6
5
  "insert",
@@ -20,14 +19,4 @@ export const refuseSharedTableWrites = (db) => new Proxy(db, {
20
19
  };
21
20
  },
22
21
  });
23
- export const openMcpAuthDatabase = (filename) => {
24
- const sqlite = new Database(filename);
25
- sqlite.pragma("journal_mode = WAL");
26
- sqlite.pragma("busy_timeout = 5000");
27
- sqlite.pragma("synchronous = NORMAL");
28
- sqlite.pragma("foreign_keys = ON");
29
- return {
30
- db: drizzle(sqlite),
31
- close: () => sqlite.close(),
32
- };
33
- };
22
+ export const openMcpAuthDatabase = (filename) => openSqlite({ filename, mode: "create", synchronous: "NORMAL", schema: {} });
@@ -1,8 +1,8 @@
1
1
  import type { BetterAuthOptions } from "better-auth";
2
- import type { BaseSQLiteDatabase, SQLiteTable } from "drizzle-orm/sqlite-core";
2
+ import type { SQLiteAsyncDatabase, SQLiteTable } from "drizzle-orm/sqlite-core";
3
3
  export interface McpUserTables {
4
4
  user: SQLiteTable;
5
5
  account: SQLiteTable;
6
6
  }
7
- export type McpSqliteDatabase = BaseSQLiteDatabase<"async" | "sync", unknown, Record<string, unknown>>;
7
+ export type McpSqliteDatabase = SQLiteAsyncDatabase<"async" | "sync", unknown>;
8
8
  export declare const mcpDatabase: (db: McpSqliteDatabase, tables: McpUserTables) => BetterAuthOptions["database"];
@@ -1,3 +1,3 @@
1
- import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
2
1
  import { type McpAuthConfig, type McpAuthServer } from "./authorization-server.js";
3
- export declare const createSqliteMcpAuth: (config: McpAuthConfig, db: BetterSQLite3Database) => McpAuthServer;
2
+ import { type McpAuthDb } from "./database.js";
3
+ export declare const createSqliteMcpAuth: (config: McpAuthConfig, db: McpAuthDb) => McpAuthServer;
@@ -1,8 +1,8 @@
1
- import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
1
+ import type { McpAuthDb } from "./database.js";
2
2
  export type PasswordCheck = {
3
3
  ok: true;
4
4
  userId: string;
5
5
  } | {
6
6
  ok: false;
7
7
  };
8
- export declare const checkRemitPassword: (db: BetterSQLite3Database, email: string, password: string) => Promise<PasswordCheck>;
8
+ export declare const checkRemitPassword: (db: McpAuthDb, email: string, password: string) => Promise<PasswordCheck>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/mcp-server",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "The remit MCP server: mail tools over streamable HTTP and the OAuth authorization server that guards them.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,10 +32,8 @@
32
32
  "@remit/mailbox-service": "*",
33
33
  "@remit/storage-service": "*",
34
34
  "@remit/ui": "0.0.234",
35
- "@types/better-sqlite3": "^7.6.13",
36
35
  "better-auth": "^1.7.12",
37
- "better-sqlite3": "^12.11.1",
38
- "drizzle-orm": "^0.45.2",
36
+ "drizzle-orm": "1.0.0-rc.5",
39
37
  "jose": "^6.2.3",
40
38
  "react": "^19",
41
39
  "react-dom": "^19",