@kbzowski/mcp-inbox 0.2.0 → 0.3.0

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,21 +1,3 @@
1
- CREATE TABLE `attachments` (
2
- `sha256` text PRIMARY KEY NOT NULL,
3
- `filename` text NOT NULL,
4
- `content_type` text,
5
- `size_bytes` integer NOT NULL,
6
- `file_path` text NOT NULL,
7
- `first_seen_at` integer NOT NULL
8
- );
9
- --> statement-breakpoint
10
- CREATE TABLE `email_attachments` (
11
- `folder` text NOT NULL,
12
- `uid` integer NOT NULL,
13
- `part_id` text NOT NULL,
14
- `sha256` text NOT NULL,
15
- PRIMARY KEY(`folder`, `uid`, `part_id`),
16
- FOREIGN KEY (`sha256`) REFERENCES `attachments`(`sha256`) ON UPDATE no action ON DELETE no action
17
- );
18
- --> statement-breakpoint
19
1
  CREATE TABLE `emails` (
20
2
  `folder` text NOT NULL,
21
3
  `uid` integer NOT NULL,
@@ -33,13 +15,11 @@ CREATE TABLE `emails` (
33
15
  `modseq` integer,
34
16
  `cached_at` integer NOT NULL,
35
17
  `body_cached_at` integer,
36
- PRIMARY KEY(`folder`, `uid`)
18
+ CONSTRAINT `emails_pk` PRIMARY KEY(`folder`, `uid`)
37
19
  );
38
20
  --> statement-breakpoint
39
- CREATE INDEX `idx_emails_date` ON `emails` (`folder`,`date`);--> statement-breakpoint
40
- CREATE INDEX `idx_emails_message_id` ON `emails` (`message_id`);--> statement-breakpoint
41
21
  CREATE TABLE `folders` (
42
- `name` text PRIMARY KEY NOT NULL,
22
+ `name` text PRIMARY KEY,
43
23
  `delimiter` text NOT NULL,
44
24
  `special_use` text,
45
25
  `uid_validity` integer NOT NULL,
@@ -47,3 +27,6 @@ CREATE TABLE `folders` (
47
27
  `highest_modseq` integer,
48
28
  `last_synced_at` integer NOT NULL
49
29
  );
30
+ --> statement-breakpoint
31
+ CREATE INDEX `idx_emails_date` ON `emails` (`folder`,`date`);--> statement-breakpoint
32
+ CREATE INDEX `idx_emails_message_id` ON `emails` (`message_id`);
@@ -0,0 +1,300 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "sqlite",
4
+ "id": "5dc14bb7-bda9-4cba-88e2-489364cbb8fb",
5
+ "prevIds": [
6
+ "00000000-0000-0000-0000-000000000000"
7
+ ],
8
+ "ddl": [
9
+ {
10
+ "name": "emails",
11
+ "entityType": "tables"
12
+ },
13
+ {
14
+ "name": "folders",
15
+ "entityType": "tables"
16
+ },
17
+ {
18
+ "type": "text",
19
+ "notNull": true,
20
+ "autoincrement": false,
21
+ "default": null,
22
+ "generated": null,
23
+ "name": "folder",
24
+ "entityType": "columns",
25
+ "table": "emails"
26
+ },
27
+ {
28
+ "type": "integer",
29
+ "notNull": true,
30
+ "autoincrement": false,
31
+ "default": null,
32
+ "generated": null,
33
+ "name": "uid",
34
+ "entityType": "columns",
35
+ "table": "emails"
36
+ },
37
+ {
38
+ "type": "text",
39
+ "notNull": false,
40
+ "autoincrement": false,
41
+ "default": null,
42
+ "generated": null,
43
+ "name": "message_id",
44
+ "entityType": "columns",
45
+ "table": "emails"
46
+ },
47
+ {
48
+ "type": "text",
49
+ "notNull": false,
50
+ "autoincrement": false,
51
+ "default": null,
52
+ "generated": null,
53
+ "name": "subject",
54
+ "entityType": "columns",
55
+ "table": "emails"
56
+ },
57
+ {
58
+ "type": "text",
59
+ "notNull": false,
60
+ "autoincrement": false,
61
+ "default": null,
62
+ "generated": null,
63
+ "name": "from_addr",
64
+ "entityType": "columns",
65
+ "table": "emails"
66
+ },
67
+ {
68
+ "type": "text",
69
+ "notNull": false,
70
+ "autoincrement": false,
71
+ "default": null,
72
+ "generated": null,
73
+ "name": "to_addrs",
74
+ "entityType": "columns",
75
+ "table": "emails"
76
+ },
77
+ {
78
+ "type": "text",
79
+ "notNull": false,
80
+ "autoincrement": false,
81
+ "default": null,
82
+ "generated": null,
83
+ "name": "cc_addrs",
84
+ "entityType": "columns",
85
+ "table": "emails"
86
+ },
87
+ {
88
+ "type": "integer",
89
+ "notNull": false,
90
+ "autoincrement": false,
91
+ "default": null,
92
+ "generated": null,
93
+ "name": "date",
94
+ "entityType": "columns",
95
+ "table": "emails"
96
+ },
97
+ {
98
+ "type": "text",
99
+ "notNull": true,
100
+ "autoincrement": false,
101
+ "default": null,
102
+ "generated": null,
103
+ "name": "flags",
104
+ "entityType": "columns",
105
+ "table": "emails"
106
+ },
107
+ {
108
+ "type": "integer",
109
+ "notNull": true,
110
+ "autoincrement": false,
111
+ "default": "false",
112
+ "generated": null,
113
+ "name": "has_attachments",
114
+ "entityType": "columns",
115
+ "table": "emails"
116
+ },
117
+ {
118
+ "type": "text",
119
+ "notNull": true,
120
+ "autoincrement": false,
121
+ "default": null,
122
+ "generated": null,
123
+ "name": "envelope_json",
124
+ "entityType": "columns",
125
+ "table": "emails"
126
+ },
127
+ {
128
+ "type": "text",
129
+ "notNull": false,
130
+ "autoincrement": false,
131
+ "default": null,
132
+ "generated": null,
133
+ "name": "body_text",
134
+ "entityType": "columns",
135
+ "table": "emails"
136
+ },
137
+ {
138
+ "type": "text",
139
+ "notNull": false,
140
+ "autoincrement": false,
141
+ "default": null,
142
+ "generated": null,
143
+ "name": "body_html",
144
+ "entityType": "columns",
145
+ "table": "emails"
146
+ },
147
+ {
148
+ "type": "integer",
149
+ "notNull": false,
150
+ "autoincrement": false,
151
+ "default": null,
152
+ "generated": null,
153
+ "name": "modseq",
154
+ "entityType": "columns",
155
+ "table": "emails"
156
+ },
157
+ {
158
+ "type": "integer",
159
+ "notNull": true,
160
+ "autoincrement": false,
161
+ "default": null,
162
+ "generated": null,
163
+ "name": "cached_at",
164
+ "entityType": "columns",
165
+ "table": "emails"
166
+ },
167
+ {
168
+ "type": "integer",
169
+ "notNull": false,
170
+ "autoincrement": false,
171
+ "default": null,
172
+ "generated": null,
173
+ "name": "body_cached_at",
174
+ "entityType": "columns",
175
+ "table": "emails"
176
+ },
177
+ {
178
+ "type": "text",
179
+ "notNull": false,
180
+ "autoincrement": false,
181
+ "default": null,
182
+ "generated": null,
183
+ "name": "name",
184
+ "entityType": "columns",
185
+ "table": "folders"
186
+ },
187
+ {
188
+ "type": "text",
189
+ "notNull": true,
190
+ "autoincrement": false,
191
+ "default": null,
192
+ "generated": null,
193
+ "name": "delimiter",
194
+ "entityType": "columns",
195
+ "table": "folders"
196
+ },
197
+ {
198
+ "type": "text",
199
+ "notNull": false,
200
+ "autoincrement": false,
201
+ "default": null,
202
+ "generated": null,
203
+ "name": "special_use",
204
+ "entityType": "columns",
205
+ "table": "folders"
206
+ },
207
+ {
208
+ "type": "integer",
209
+ "notNull": true,
210
+ "autoincrement": false,
211
+ "default": null,
212
+ "generated": null,
213
+ "name": "uid_validity",
214
+ "entityType": "columns",
215
+ "table": "folders"
216
+ },
217
+ {
218
+ "type": "integer",
219
+ "notNull": false,
220
+ "autoincrement": false,
221
+ "default": null,
222
+ "generated": null,
223
+ "name": "uid_next",
224
+ "entityType": "columns",
225
+ "table": "folders"
226
+ },
227
+ {
228
+ "type": "integer",
229
+ "notNull": false,
230
+ "autoincrement": false,
231
+ "default": null,
232
+ "generated": null,
233
+ "name": "highest_modseq",
234
+ "entityType": "columns",
235
+ "table": "folders"
236
+ },
237
+ {
238
+ "type": "integer",
239
+ "notNull": true,
240
+ "autoincrement": false,
241
+ "default": null,
242
+ "generated": null,
243
+ "name": "last_synced_at",
244
+ "entityType": "columns",
245
+ "table": "folders"
246
+ },
247
+ {
248
+ "columns": [
249
+ "folder",
250
+ "uid"
251
+ ],
252
+ "nameExplicit": false,
253
+ "name": "emails_pk",
254
+ "entityType": "pks",
255
+ "table": "emails"
256
+ },
257
+ {
258
+ "columns": [
259
+ "name"
260
+ ],
261
+ "nameExplicit": false,
262
+ "name": "folders_pk",
263
+ "table": "folders",
264
+ "entityType": "pks"
265
+ },
266
+ {
267
+ "columns": [
268
+ {
269
+ "value": "folder",
270
+ "isExpression": false
271
+ },
272
+ {
273
+ "value": "date",
274
+ "isExpression": false
275
+ }
276
+ ],
277
+ "isUnique": false,
278
+ "where": null,
279
+ "origin": "manual",
280
+ "name": "idx_emails_date",
281
+ "entityType": "indexes",
282
+ "table": "emails"
283
+ },
284
+ {
285
+ "columns": [
286
+ {
287
+ "value": "message_id",
288
+ "isExpression": false
289
+ }
290
+ ],
291
+ "isUnique": false,
292
+ "where": null,
293
+ "origin": "manual",
294
+ "name": "idx_emails_message_id",
295
+ "entityType": "indexes",
296
+ "table": "emails"
297
+ }
298
+ ],
299
+ "renames": []
300
+ }
@@ -0,0 +1,7 @@
1
+ declare const originalEmitWarning: {
2
+ (warning: string | Error, ctor?: Function): void;
3
+ (warning: string | Error, type?: string, ctor?: Function): void;
4
+ (warning: string | Error, type?: string, code?: string, ctor?: Function): void;
5
+ (warning: string | Error, options?: NodeJS.EmitWarningOptions): void;
6
+ };
7
+ type EmitWarningArgs = Parameters<typeof process.emitWarning>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbzowski/mcp-inbox",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server exposing IMAP/SMTP email over a fast local cache. Read, search, compose, and manage email from any IMAP provider with near-instant response times via background sync and IDLE push.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -64,8 +64,7 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@modelcontextprotocol/sdk": "^1.20.0",
67
- "better-sqlite3": "^12.9.0",
68
- "drizzle-orm": "^0.45.2",
67
+ "drizzle-orm": "1.0.0-beta.22",
69
68
  "imapflow": "^1.3.2",
70
69
  "mailparser": "^3.7.2",
71
70
  "nodemailer": "^8.0.5",
@@ -73,11 +72,10 @@
73
72
  },
74
73
  "devDependencies": {
75
74
  "@changesets/cli": "^2.27.10",
76
- "@types/better-sqlite3": "^7.6.13",
77
75
  "@types/mailparser": "^3.4.5",
78
76
  "@types/node": "^25.0.0",
79
77
  "@types/nodemailer": "^8.0.0",
80
- "drizzle-kit": "^0.31.10",
78
+ "drizzle-kit": "1.0.0-beta.22",
81
79
  "esbuild": "^0.28.0",
82
80
  "eslint": "^10.0.0",
83
81
  "eslint-config-prettier": "^10.0.0",
@@ -1,2 +0,0 @@
1
- DROP TABLE `attachments`;--> statement-breakpoint
2
- DROP TABLE `email_attachments`;