@kb-labs/inbox-entry 2.103.0 → 2.105.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.
Files changed (2) hide show
  1. package/dist/manifest.json +545 -0
  2. package/package.json +19 -19
@@ -0,0 +1,545 @@
1
+ {
2
+ "schema": "kb.plugin/3",
3
+ "id": "@kb-labs/inbox",
4
+ "version": "0.1.0",
5
+ "display": {
6
+ "name": "Inbox",
7
+ "description": "Manage email via IMAP/SMTP — list, search, send, move, delete from CLI and REST API",
8
+ "tags": [
9
+ "email",
10
+ "inbox",
11
+ "imap",
12
+ "smtp",
13
+ "productivity"
14
+ ]
15
+ },
16
+ "permissions": {
17
+ "env": {
18
+ "read": [
19
+ "INBOX_ACCOUNTS",
20
+ "INBOX_ACCOUNT_*"
21
+ ]
22
+ },
23
+ "network": {
24
+ "tcp": {
25
+ "connect": [
26
+ "imap.yandex.ru:993",
27
+ "smtp.yandex.ru:465",
28
+ "smtp.yandex.ru:587"
29
+ ]
30
+ }
31
+ },
32
+ "quotas": {
33
+ "timeoutMs": 30000,
34
+ "memoryMb": 128
35
+ }
36
+ },
37
+ "cli": {
38
+ "commands": [
39
+ {
40
+ "path": "inbox list",
41
+ "handler": "./commands/mail-list.js#default",
42
+ "describe": "List emails in a folder",
43
+ "operationType": "read",
44
+ "flags": [
45
+ {
46
+ "name": "folder",
47
+ "type": "string",
48
+ "description": "Folder to list (default: INBOX)"
49
+ },
50
+ {
51
+ "name": "unread",
52
+ "type": "boolean",
53
+ "description": "Show only unread messages"
54
+ },
55
+ {
56
+ "name": "since",
57
+ "type": "string",
58
+ "description": "Filter by age: 24h, 7d, 2w or ISO date"
59
+ },
60
+ {
61
+ "name": "limit",
62
+ "type": "number",
63
+ "description": "Max results (default: 50)"
64
+ },
65
+ {
66
+ "name": "account",
67
+ "type": "string",
68
+ "description": "Account name or index (default: first)"
69
+ },
70
+ {
71
+ "name": "json",
72
+ "type": "boolean",
73
+ "description": "Output JSON"
74
+ },
75
+ {
76
+ "name": "full",
77
+ "type": "boolean",
78
+ "description": "Full JSON (requires --json)"
79
+ }
80
+ ],
81
+ "examples": [
82
+ "kb inbox list",
83
+ "kb inbox list --unread --since 24h",
84
+ "kb inbox list --folder Work --account personal --json"
85
+ ],
86
+ "category": "Mail"
87
+ },
88
+ {
89
+ "path": "inbox get",
90
+ "handler": "./commands/mail-get.js#default",
91
+ "describe": "Get full email content by uid",
92
+ "operationType": "read",
93
+ "flags": [
94
+ {
95
+ "name": "folder",
96
+ "type": "string",
97
+ "description": "Folder containing the message (default: INBOX)"
98
+ },
99
+ {
100
+ "name": "attachments",
101
+ "type": "boolean",
102
+ "description": "Include attachment list"
103
+ },
104
+ {
105
+ "name": "account",
106
+ "type": "string",
107
+ "description": "Account name or index"
108
+ },
109
+ {
110
+ "name": "json",
111
+ "type": "boolean",
112
+ "description": "Output JSON"
113
+ },
114
+ {
115
+ "name": "full",
116
+ "type": "boolean",
117
+ "description": "Full JSON (requires --json)"
118
+ }
119
+ ],
120
+ "examples": [
121
+ "kb inbox get 42",
122
+ "kb inbox get 42 --attachments --json",
123
+ "kb inbox get 42 --folder Sent --account work"
124
+ ],
125
+ "category": "Mail"
126
+ },
127
+ {
128
+ "path": "inbox thread",
129
+ "handler": "./commands/mail-thread.js#default",
130
+ "describe": "Get full email thread by uid",
131
+ "operationType": "read",
132
+ "flags": [
133
+ {
134
+ "name": "folder",
135
+ "type": "string",
136
+ "description": "Folder (default: INBOX)"
137
+ },
138
+ {
139
+ "name": "account",
140
+ "type": "string",
141
+ "description": "Account name or index"
142
+ },
143
+ {
144
+ "name": "json",
145
+ "type": "boolean",
146
+ "description": "Output JSON"
147
+ },
148
+ {
149
+ "name": "full",
150
+ "type": "boolean",
151
+ "description": "Full JSON (requires --json)"
152
+ }
153
+ ],
154
+ "examples": [
155
+ "kb inbox thread 42",
156
+ "kb inbox thread 42 --json"
157
+ ],
158
+ "category": "Mail"
159
+ },
160
+ {
161
+ "path": "inbox search",
162
+ "handler": "./commands/mail-search.js#default",
163
+ "describe": "Search emails by from, subject, body, or text",
164
+ "operationType": "read",
165
+ "flags": [
166
+ {
167
+ "name": "from",
168
+ "type": "string",
169
+ "description": "Filter by sender"
170
+ },
171
+ {
172
+ "name": "subject",
173
+ "type": "string",
174
+ "description": "Filter by subject"
175
+ },
176
+ {
177
+ "name": "body",
178
+ "type": "string",
179
+ "description": "Filter by body text"
180
+ },
181
+ {
182
+ "name": "text",
183
+ "type": "string",
184
+ "description": "Full-text search (subject + body)"
185
+ },
186
+ {
187
+ "name": "folder",
188
+ "type": "string",
189
+ "description": "Folder to search (default: INBOX)"
190
+ },
191
+ {
192
+ "name": "since",
193
+ "type": "string",
194
+ "description": "Filter by age: 24h, 7d, 2w or ISO date"
195
+ },
196
+ {
197
+ "name": "limit",
198
+ "type": "number",
199
+ "description": "Max results (default: 20)"
200
+ },
201
+ {
202
+ "name": "account",
203
+ "type": "string",
204
+ "description": "Account name or index"
205
+ },
206
+ {
207
+ "name": "json",
208
+ "type": "boolean",
209
+ "description": "Output JSON"
210
+ },
211
+ {
212
+ "name": "full",
213
+ "type": "boolean",
214
+ "description": "Full JSON (requires --json)"
215
+ }
216
+ ],
217
+ "examples": [
218
+ "kb inbox search --from boss@company.com",
219
+ "kb inbox search --subject \"invoice\" --since 30d --json",
220
+ "kb inbox search --text \"urgent\" --limit 5 --json"
221
+ ],
222
+ "category": "Mail"
223
+ },
224
+ {
225
+ "path": "inbox send",
226
+ "handler": "./commands/mail-send.js#default",
227
+ "describe": "Send an email",
228
+ "operationType": "mutate",
229
+ "flags": [
230
+ {
231
+ "name": "to",
232
+ "type": "string",
233
+ "description": "Recipient address (required)"
234
+ },
235
+ {
236
+ "name": "subject",
237
+ "type": "string",
238
+ "description": "Subject (required)"
239
+ },
240
+ {
241
+ "name": "body",
242
+ "type": "string",
243
+ "description": "Message body (required)"
244
+ },
245
+ {
246
+ "name": "cc",
247
+ "type": "string",
248
+ "description": "CC address"
249
+ },
250
+ {
251
+ "name": "bcc",
252
+ "type": "string",
253
+ "description": "BCC address"
254
+ },
255
+ {
256
+ "name": "account",
257
+ "type": "string",
258
+ "description": "Account name or index"
259
+ },
260
+ {
261
+ "name": "json",
262
+ "type": "boolean",
263
+ "description": "Output JSON"
264
+ }
265
+ ],
266
+ "examples": [
267
+ "kb inbox send --to user@example.com --subject \"Hello\" --body \"Hi there\"",
268
+ "kb inbox send --to user@example.com --subject \"Report\" --body \"...\" --account work --json"
269
+ ],
270
+ "category": "Mail"
271
+ },
272
+ {
273
+ "path": "inbox reply",
274
+ "handler": "./commands/mail-reply.js#default",
275
+ "describe": "Reply to an email by uid (preserves thread)",
276
+ "operationType": "mutate",
277
+ "flags": [
278
+ {
279
+ "name": "body",
280
+ "type": "string",
281
+ "description": "Reply body (required)"
282
+ },
283
+ {
284
+ "name": "folder",
285
+ "type": "string",
286
+ "description": "Folder containing the original (default: INBOX)"
287
+ },
288
+ {
289
+ "name": "account",
290
+ "type": "string",
291
+ "description": "Account name or index"
292
+ },
293
+ {
294
+ "name": "json",
295
+ "type": "boolean",
296
+ "description": "Output JSON"
297
+ }
298
+ ],
299
+ "examples": [
300
+ "kb inbox reply 42 --body \"Thanks, will do\"",
301
+ "kb inbox reply 42 --body \"On it\" --account work --json"
302
+ ],
303
+ "category": "Mail"
304
+ },
305
+ {
306
+ "path": "inbox move",
307
+ "handler": "./commands/mail-move.js#default",
308
+ "describe": "Move an email to a folder",
309
+ "operationType": "mutate",
310
+ "flags": [
311
+ {
312
+ "name": "folder",
313
+ "type": "string",
314
+ "description": "Destination folder (required)"
315
+ },
316
+ {
317
+ "name": "from",
318
+ "type": "string",
319
+ "description": "Source folder (default: INBOX)"
320
+ },
321
+ {
322
+ "name": "account",
323
+ "type": "string",
324
+ "description": "Account name or index"
325
+ },
326
+ {
327
+ "name": "json",
328
+ "type": "boolean",
329
+ "description": "Output JSON"
330
+ }
331
+ ],
332
+ "examples": [
333
+ "kb inbox move 42 --folder Work",
334
+ "kb inbox move 42 --folder Archive --from Sent --json"
335
+ ],
336
+ "category": "Mail"
337
+ },
338
+ {
339
+ "path": "inbox mark",
340
+ "handler": "./commands/mail-mark.js#default",
341
+ "describe": "Mark an email as read, unread, spam, or flagged",
342
+ "operationType": "mutate",
343
+ "flags": [
344
+ {
345
+ "name": "read",
346
+ "type": "boolean",
347
+ "description": "Mark as read"
348
+ },
349
+ {
350
+ "name": "unread",
351
+ "type": "boolean",
352
+ "description": "Mark as unread"
353
+ },
354
+ {
355
+ "name": "spam",
356
+ "type": "boolean",
357
+ "description": "Mark as spam and move to Junk"
358
+ },
359
+ {
360
+ "name": "flagged",
361
+ "type": "boolean",
362
+ "description": "Flag the message"
363
+ },
364
+ {
365
+ "name": "unflagged",
366
+ "type": "boolean",
367
+ "description": "Remove flag"
368
+ },
369
+ {
370
+ "name": "folder",
371
+ "type": "string",
372
+ "description": "Folder (default: INBOX)"
373
+ },
374
+ {
375
+ "name": "account",
376
+ "type": "string",
377
+ "description": "Account name or index"
378
+ },
379
+ {
380
+ "name": "json",
381
+ "type": "boolean",
382
+ "description": "Output JSON"
383
+ }
384
+ ],
385
+ "examples": [
386
+ "kb inbox mark 42 --read",
387
+ "kb inbox mark 42 --spam",
388
+ "kb inbox mark 42 --flagged --json"
389
+ ],
390
+ "category": "Mail"
391
+ },
392
+ {
393
+ "path": "inbox delete",
394
+ "handler": "./commands/mail-delete.js#default",
395
+ "describe": "Delete an email (moves to Trash)",
396
+ "operationType": "mutate",
397
+ "flags": [
398
+ {
399
+ "name": "folder",
400
+ "type": "string",
401
+ "description": "Folder containing the message (default: INBOX)"
402
+ },
403
+ {
404
+ "name": "account",
405
+ "type": "string",
406
+ "description": "Account name or index"
407
+ },
408
+ {
409
+ "name": "json",
410
+ "type": "boolean",
411
+ "description": "Output JSON"
412
+ }
413
+ ],
414
+ "examples": [
415
+ "kb inbox delete 42",
416
+ "kb inbox delete 42 --folder Spam --json"
417
+ ],
418
+ "category": "Mail"
419
+ },
420
+ {
421
+ "path": "inbox folders",
422
+ "handler": "./commands/mail-folders.js#default",
423
+ "describe": "List available folders/mailboxes",
424
+ "operationType": "read",
425
+ "flags": [
426
+ {
427
+ "name": "account",
428
+ "type": "string",
429
+ "description": "Account name or index"
430
+ },
431
+ {
432
+ "name": "json",
433
+ "type": "boolean",
434
+ "description": "Output JSON"
435
+ }
436
+ ],
437
+ "examples": [
438
+ "kb inbox folders",
439
+ "kb inbox folders --account work --json"
440
+ ],
441
+ "category": "Mail"
442
+ },
443
+ {
444
+ "path": "inbox accounts",
445
+ "handler": "./commands/mail-accounts.js#default",
446
+ "describe": "List configured email accounts",
447
+ "operationType": "read",
448
+ "flags": [
449
+ {
450
+ "name": "json",
451
+ "type": "boolean",
452
+ "description": "Output JSON"
453
+ }
454
+ ],
455
+ "examples": [
456
+ "kb inbox accounts",
457
+ "kb inbox accounts --json"
458
+ ],
459
+ "category": "Config"
460
+ }
461
+ ],
462
+ "groupMeta": [
463
+ {
464
+ "path": "inbox",
465
+ "describe": "Email management"
466
+ },
467
+ {
468
+ "path": "inbox mail",
469
+ "describe": "Mail operations"
470
+ }
471
+ ]
472
+ },
473
+ "rest": {
474
+ "basePath": "/v1/plugins/inbox",
475
+ "routes": [
476
+ {
477
+ "method": "GET",
478
+ "path": "/messages",
479
+ "handler": "./rest/handlers/list-handler.js#default"
480
+ },
481
+ {
482
+ "method": "GET",
483
+ "path": "/messages/:uid",
484
+ "handler": "./rest/handlers/get-handler.js#default"
485
+ },
486
+ {
487
+ "method": "GET",
488
+ "path": "/messages/:uid/thread",
489
+ "handler": "./rest/handlers/thread-handler.js#default"
490
+ },
491
+ {
492
+ "method": "GET",
493
+ "path": "/search",
494
+ "handler": "./rest/handlers/search-handler.js#default"
495
+ },
496
+ {
497
+ "method": "POST",
498
+ "path": "/messages",
499
+ "handler": "./rest/handlers/send-handler.js#default",
500
+ "input": {
501
+ "zod": "@kb-labs/inbox-contracts#SendMessageSchema"
502
+ }
503
+ },
504
+ {
505
+ "method": "POST",
506
+ "path": "/messages/:uid/reply",
507
+ "handler": "./rest/handlers/reply-handler.js#default",
508
+ "input": {
509
+ "zod": "@kb-labs/inbox-contracts#ReplyMessageSchema"
510
+ }
511
+ },
512
+ {
513
+ "method": "PATCH",
514
+ "path": "/messages/:uid/move",
515
+ "handler": "./rest/handlers/move-handler.js#default",
516
+ "input": {
517
+ "zod": "@kb-labs/inbox-contracts#MoveMessageSchema"
518
+ }
519
+ },
520
+ {
521
+ "method": "PATCH",
522
+ "path": "/messages/:uid/mark",
523
+ "handler": "./rest/handlers/mark-handler.js#default",
524
+ "input": {
525
+ "zod": "@kb-labs/inbox-contracts#MarkMessageSchema"
526
+ }
527
+ },
528
+ {
529
+ "method": "DELETE",
530
+ "path": "/messages/:uid",
531
+ "handler": "./rest/handlers/delete-handler.js#default"
532
+ },
533
+ {
534
+ "method": "GET",
535
+ "path": "/folders",
536
+ "handler": "./rest/handlers/folders-handler.js#default"
537
+ },
538
+ {
539
+ "method": "GET",
540
+ "path": "/accounts",
541
+ "handler": "./rest/handlers/accounts-handler.js#default"
542
+ }
543
+ ]
544
+ }
545
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kb-labs/inbox-entry",
3
- "version": "2.103.0",
3
+ "version": "2.105.0",
4
4
  "type": "module",
5
5
  "description": "V3 manifest + CLI commands + REST handlers for inbox plugin",
6
6
  "main": "./dist/index.js",
@@ -22,33 +22,33 @@
22
22
  "dist"
23
23
  ],
24
24
  "sideEffects": false,
25
+ "scripts": {
26
+ "clean": "rimraf dist",
27
+ "build": "tsup",
28
+ "dev": "tsup --watch",
29
+ "lint": "eslint src --ext .ts",
30
+ "lint:fix": "eslint . --fix",
31
+ "type-check": "tsc --noEmit",
32
+ "test": "vitest run --passWithNoTests",
33
+ "test:cli": "vitest run --config vitest.cli.config.ts --passWithNoTests"
34
+ },
25
35
  "dependencies": {
26
- "@kb-labs/sdk": "2.22.0",
27
- "@kb-labs/shared-command-kit": "2.103.0",
28
- "@kb-labs/inbox-contracts": "2.103.0",
29
- "@kb-labs/inbox-core": "2.103.0"
36
+ "@kb-labs/inbox-contracts": "^2.105.0",
37
+ "@kb-labs/inbox-core": "^2.105.0",
38
+ "@kb-labs/sdk": "workspace:*",
39
+ "@kb-labs/shared-command-kit": "^2.105.0"
30
40
  },
31
41
  "devDependencies": {
42
+ "@kb-labs/devkit": "workspace:*",
43
+ "@kb-labs/shared-testing-e2e": "workspace:*",
32
44
  "@types/node": "^24.0.0",
33
45
  "rimraf": "^6.0.1",
34
46
  "tsup": "^8.5.0",
35
47
  "typescript": "^5.6.3",
36
- "vitest": "^3.2.6",
37
- "@kb-labs/shared-testing-e2e": "2.103.0",
38
- "@kb-labs/devkit": "2.103.0"
48
+ "vitest": "^3.2.6"
39
49
  },
40
50
  "engines": {
41
51
  "node": ">=20.0.0",
42
52
  "pnpm": ">=9.0.0"
43
- },
44
- "scripts": {
45
- "clean": "rimraf dist",
46
- "build": "tsup",
47
- "dev": "tsup --watch",
48
- "lint": "eslint src --ext .ts",
49
- "lint:fix": "eslint . --fix",
50
- "type-check": "tsc --noEmit",
51
- "test": "vitest run --passWithNoTests",
52
- "test:cli": "vitest run --config vitest.cli.config.ts --passWithNoTests"
53
53
  }
54
- }
54
+ }