@elizaos/plugin-inbox 2.0.3-beta.2
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.
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/assets/hero.png +0 -0
- package/assets/hero.svg +67 -0
- package/package.json +93 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# @elizaos/plugin-inbox
|
|
2
|
+
|
|
3
|
+
Unified cross-channel inbox triage with unresolved-item tracking, snooze, archive, and follow-up watcher. Drives the inbox-zero workflow.
|
|
4
|
+
|
|
5
|
+
## Scope
|
|
6
|
+
|
|
7
|
+
Aggregates threads across email, Discord, Telegram, WhatsApp, Slack, X, Farcaster, iMessage, and similar connected channels into one triage queue.
|
|
8
|
+
|
|
9
|
+
**Out of scope:** Android SMS — that remains in `@elizaos/plugin-messages`.
|
|
10
|
+
|
|
11
|
+
## Plugin surface
|
|
12
|
+
|
|
13
|
+
### Action
|
|
14
|
+
|
|
15
|
+
`INBOX` — op-based dispatch. Ops: `list`, `search`, `summarize`.
|
|
16
|
+
|
|
17
|
+
- `list` — fan-out fetch across all connected platform adapters (gmail, discord, telegram, signal, imessage, whatsapp), dedupe by message id and thread topic, return merged feed ordered by recency.
|
|
18
|
+
- `search` — search across selected platforms by `query`.
|
|
19
|
+
- `summarize` — return a per-platform count plus a single rolled-up summary.
|
|
20
|
+
|
|
21
|
+
Fetchers are injectable via `setInboxFetchers` for tests. Owner-only.
|
|
22
|
+
|
|
23
|
+
### Providers
|
|
24
|
+
|
|
25
|
+
- `inboxTriage` (position `14`) — injects the user's pending triage queue (urgent, needs_reply, recent auto-replies) into owner context from the `InboxRepository`.
|
|
26
|
+
- `crossChannelContext` (position `-3`) — injects recent triage entries from the current message sender across other channels (resolved by entityId then senderName). Owner-only, silently empty when no cross-channel history exists.
|
|
27
|
+
|
|
28
|
+
### Service
|
|
29
|
+
|
|
30
|
+
`InboxService` (`src/inbox/service.ts`) — `triage()`, `curate()`, `triageWithCuration()`, `search()`, `list()`, `digest()`, `resolve()`. No dependency on `@elizaos/plugin-personal-assistant`.
|
|
31
|
+
|
|
32
|
+
### Schema
|
|
33
|
+
|
|
34
|
+
`pgSchema('app_inbox')` with three tables:
|
|
35
|
+
|
|
36
|
+
- `triage_decisions` — history of decisions per (thread, decision-event).
|
|
37
|
+
- `snoozed` — threads to re-surface at `wake_at`.
|
|
38
|
+
- `archived` — threads explicitly removed from the active inbox.
|
|
39
|
+
|
|
40
|
+
### View
|
|
41
|
+
|
|
42
|
+
`/inbox` — `InboxView` component. Minimal placeholder UI (header, channel filter chips, empty thread list) until the full triage drawer / snooze picker / approval queue lands.
|
|
43
|
+
|
|
44
|
+
## Layout
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
src/
|
|
48
|
+
index.ts Public API barrel
|
|
49
|
+
plugin.ts inboxPlugin Plugin object
|
|
50
|
+
types.ts TriageDecision, ThreadSummary, channel + decision enums
|
|
51
|
+
actions/
|
|
52
|
+
inbox.ts INBOX umbrella action (list/search/summarize fan-out)
|
|
53
|
+
providers/
|
|
54
|
+
inbox-triage.ts inboxTriage provider — pending triage queue (position 14)
|
|
55
|
+
cross-channel-context.ts crossChannelContext provider — sender cross-channel history (position -3)
|
|
56
|
+
inbox/
|
|
57
|
+
service.ts InboxService — triage/curate/search/list/digest/resolve
|
|
58
|
+
repository.ts InboxRepository — raw SQL over app_lifeops.life_inbox_triage_*
|
|
59
|
+
types.ts InboundMessage, TriageEntry, TriageClassification, etc.
|
|
60
|
+
triage-classifier.ts LLM classification of inbound messages
|
|
61
|
+
email-curation.ts Email curation engine (save/archive/delete decisions)
|
|
62
|
+
config.ts loadInboxTriageConfig()
|
|
63
|
+
message-fetcher.ts Per-platform message fetchers
|
|
64
|
+
channel-deep-links.ts Channel deep-link helpers
|
|
65
|
+
reflection.ts Inbox reflection utilities
|
|
66
|
+
db/
|
|
67
|
+
index.ts re-exports schema.ts
|
|
68
|
+
schema.ts drizzle pgSchema('app_inbox') + tables
|
|
69
|
+
components/
|
|
70
|
+
inbox/
|
|
71
|
+
InboxView.tsx Minimal React inbox view
|
|
72
|
+
inbox-view-bundle.ts Vite bundle entry — re-exports InboxView
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Commands
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
bun run --cwd plugins/plugin-inbox typecheck # tsc --noEmit
|
|
79
|
+
bun run --cwd plugins/plugin-inbox lint # biome check src/
|
|
80
|
+
bun run --cwd plugins/plugin-inbox test # vitest run
|
|
81
|
+
bun run --cwd plugins/plugin-inbox build # build:js + build:views + build:types
|
|
82
|
+
bun run --cwd plugins/plugin-inbox build:js # tsup
|
|
83
|
+
bun run --cwd plugins/plugin-inbox build:views # vite build (overlay bundle)
|
|
84
|
+
bun run --cwd plugins/plugin-inbox build:types # tsc declaration emit
|
|
85
|
+
bun run --cwd plugins/plugin-inbox clean # rm -rf dist
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Config / env vars
|
|
89
|
+
|
|
90
|
+
None. Channel credentials are read from each provider plugin (`plugin-discord`, `plugin-telegram`, etc.).
|
|
91
|
+
|
|
92
|
+
## Conventions / gotchas
|
|
93
|
+
|
|
94
|
+
- **`GET /api/lifeops/inbox` lives in `plugin-personal-assistant`.** The `InboxView` fetches from this route (served by PA). The triage domain (classify/persist/search) lives here and is imported by PA.
|
|
95
|
+
- **`@elizaos/plugin-sql` must be loaded first.** The schema registration relies on `runtime.db`.
|
|
96
|
+
- **No Android SMS.** SMS routing intentionally stays in `plugin-messages`. Do not add SMS channel handling here.
|
|
97
|
+
- **Schema name is `app_inbox`** to avoid collision with any host-app `inbox` table the runtime might also surface.
|
|
98
|
+
- **Two build steps.** The JS/types build (tsup + tsc) and the Vite views build are separate. Both must be run for a complete build.
|
|
99
|
+
- See the root `AGENTS.md` for repo-wide architecture rules, logger requirements, ESM/module standards, and the cloud-frontend visual-review gate (if any of this plugin's UI ends up in `cloud-frontend`).
|
package/assets/hero.png
ADDED
|
Binary file
|
package/assets/hero.svg
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024" role="img" aria-label="Inbox">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg-inbox" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#152824"/>
|
|
5
|
+
<stop offset="1" stop-color="#0b1919"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<radialGradient id="blobA-inbox" cx="0.5" cy="0.5" r="0.5">
|
|
8
|
+
<stop offset="0" stop-color="#2fdab8" stop-opacity="0.55"/>
|
|
9
|
+
<stop offset="1" stop-color="#2fdab8" stop-opacity="0"/>
|
|
10
|
+
</radialGradient>
|
|
11
|
+
<radialGradient id="blobB-inbox" cx="0.5" cy="0.5" r="0.5">
|
|
12
|
+
<stop offset="0" stop-color="#2899c3" stop-opacity="0.5"/>
|
|
13
|
+
<stop offset="1" stop-color="#2899c3" stop-opacity="0"/>
|
|
14
|
+
</radialGradient>
|
|
15
|
+
<radialGradient id="vig-inbox" cx="0.5" cy="0.42" r="0.75">
|
|
16
|
+
<stop offset="0" stop-color="#000000" stop-opacity="0"/>
|
|
17
|
+
<stop offset="0.72" stop-color="#000000" stop-opacity="0"/>
|
|
18
|
+
<stop offset="1" stop-color="#000000" stop-opacity="0.5"/>
|
|
19
|
+
</radialGradient>
|
|
20
|
+
<linearGradient id="label-inbox" x1="0" y1="0" x2="0" y2="1">
|
|
21
|
+
<stop offset="0" stop-color="#000000" stop-opacity="0"/>
|
|
22
|
+
<stop offset="1" stop-color="#000000" stop-opacity="0.55"/>
|
|
23
|
+
</linearGradient>
|
|
24
|
+
<filter id="soft-inbox" x="-30%" y="-30%" width="160%" height="160%">
|
|
25
|
+
<feGaussianBlur stdDeviation="46"/>
|
|
26
|
+
</filter>
|
|
27
|
+
<filter id="iglow-inbox" x="-40%" y="-40%" width="180%" height="180%">
|
|
28
|
+
<feDropShadow dx="0" dy="0" stdDeviation="14" flood-color="#45edcb" flood-opacity="0.45"/>
|
|
29
|
+
</filter>
|
|
30
|
+
</defs>
|
|
31
|
+
|
|
32
|
+
<rect width="1024" height="1024" fill="url(#bg-inbox)"/>
|
|
33
|
+
|
|
34
|
+
<g opacity="0.9">
|
|
35
|
+
<circle cx="232" cy="220" r="300" fill="url(#blobA-inbox)" filter="url(#soft-inbox)"/>
|
|
36
|
+
<circle cx="840" cy="800" r="340" fill="url(#blobB-inbox)" filter="url(#soft-inbox)"/>
|
|
37
|
+
</g>
|
|
38
|
+
|
|
39
|
+
<g stroke="#d7eae6" stroke-width="1.4" opacity="0.06">
|
|
40
|
+
<line x1="0" y1="256" x2="1024" y2="256"/>
|
|
41
|
+
<line x1="0" y1="512" x2="1024" y2="512"/>
|
|
42
|
+
<line x1="0" y1="768" x2="1024" y2="768"/>
|
|
43
|
+
<line x1="256" y1="0" x2="256" y2="1024"/>
|
|
44
|
+
<line x1="512" y1="0" x2="512" y2="1024"/>
|
|
45
|
+
<line x1="768" y1="0" x2="768" y2="1024"/>
|
|
46
|
+
</g>
|
|
47
|
+
|
|
48
|
+
<g opacity="0.5">
|
|
49
|
+
<path d="M120 470 A 400 400 0 0 1 904 470" fill="none" stroke="#45edcb" stroke-width="3" opacity="0.35"/>
|
|
50
|
+
</g>
|
|
51
|
+
|
|
52
|
+
<g transform="translate(512 432)" filter="url(#iglow-inbox)"
|
|
53
|
+
color="#d7eae6" stroke="#d7eae6" stroke-width="20"
|
|
54
|
+
stroke-linecap="round" stroke-linejoin="round" fill="none">
|
|
55
|
+
<path d="M-150 -40 L-110 -130 H110 L150 -40 V120 A20 20 0 0 1 130 140 H-130 A20 20 0 0 1 -150 120 Z"/>
|
|
56
|
+
<path d="M-150 -40 H-44 L-10 24 H10 L44 -40 H150"/>
|
|
57
|
+
</g>
|
|
58
|
+
|
|
59
|
+
<rect x="0" y="784" width="1024" height="240" fill="url(#label-inbox)"/>
|
|
60
|
+
<text x="512" y="892" text-anchor="middle"
|
|
61
|
+
font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
|
|
62
|
+
font-size="76" font-weight="600" letter-spacing="0.5"
|
|
63
|
+
fill="#d7eae6">Inbox</text>
|
|
64
|
+
<rect x="460" y="924" width="104" height="6" rx="3" fill="#45edcb"/>
|
|
65
|
+
|
|
66
|
+
<rect width="1024" height="1024" fill="url(#vig-inbox)"/>
|
|
67
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-inbox",
|
|
3
|
+
"version": "2.0.3-beta.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Unified cross-channel inbox triage with unresolved-item tracking, snooze, archive, and follow-up watcher. Drives the inbox-zero workflow across email/Discord/Telegram/WhatsApp/X/Slack and other non-SMS channels.",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
9
|
+
"lint": "bunx @biomejs/biome check src/",
|
|
10
|
+
"test": "bunx vitest run --config ./vitest.config.ts",
|
|
11
|
+
"build": "bun run build:js && bun run build:views && bun run build:types",
|
|
12
|
+
"clean": "rm -rf dist",
|
|
13
|
+
"build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
|
|
14
|
+
"build:views": "bunx --bun vite build --config vite.config.views.ts",
|
|
15
|
+
"build:types": "tsc --noCheck -p tsconfig.build.json"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
"./package.json": "./package.json",
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"eliza-source": {
|
|
22
|
+
"types": "./src/index.ts",
|
|
23
|
+
"import": "./src/index.ts",
|
|
24
|
+
"default": "./src/index.ts"
|
|
25
|
+
},
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./plugin": {
|
|
30
|
+
"types": "./dist/plugin.d.ts",
|
|
31
|
+
"eliza-source": {
|
|
32
|
+
"types": "./src/plugin.ts",
|
|
33
|
+
"import": "./src/plugin.ts",
|
|
34
|
+
"default": "./src/plugin.ts"
|
|
35
|
+
},
|
|
36
|
+
"import": "./dist/plugin.js",
|
|
37
|
+
"default": "./dist/plugin.js"
|
|
38
|
+
},
|
|
39
|
+
"./*.css": "./dist/*.css",
|
|
40
|
+
"./*": {
|
|
41
|
+
"types": "./dist/*.d.ts",
|
|
42
|
+
"eliza-source": {
|
|
43
|
+
"types": "./src/*.ts",
|
|
44
|
+
"import": "./src/*.ts",
|
|
45
|
+
"default": "./src/*.ts"
|
|
46
|
+
},
|
|
47
|
+
"import": "./dist/*.js",
|
|
48
|
+
"default": "./dist/*.js"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@elizaos/agent": "2.0.3-beta.2",
|
|
53
|
+
"@elizaos/app-core": "2.0.3-beta.2",
|
|
54
|
+
"@elizaos/core": "2.0.3-beta.2",
|
|
55
|
+
"@elizaos/plugin-google": "2.0.3-beta.2",
|
|
56
|
+
"@elizaos/shared": "2.0.3-beta.2",
|
|
57
|
+
"@elizaos/ui": "2.0.3-beta.2",
|
|
58
|
+
"drizzle-orm": "^0.45.1",
|
|
59
|
+
"lucide-react": "^1.0.0"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@elizaos/plugin-sql": "2.0.3-beta.2",
|
|
63
|
+
"react": "^19.0.0",
|
|
64
|
+
"react-dom": "^19.0.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@biomejs/biome": "^2.4.14",
|
|
68
|
+
"@types/node": "^25.0.6",
|
|
69
|
+
"@types/react": "^19.0.0",
|
|
70
|
+
"@types/react-dom": "^19.0.0",
|
|
71
|
+
"react": "^19.0.0",
|
|
72
|
+
"react-dom": "^19.0.0",
|
|
73
|
+
"tsup": "^8.5.1",
|
|
74
|
+
"typescript": "^6.0.3",
|
|
75
|
+
"vite": "^8.0.0",
|
|
76
|
+
"vitest": "^4.0.17"
|
|
77
|
+
},
|
|
78
|
+
"elizaos": {
|
|
79
|
+
"app": {
|
|
80
|
+
"displayName": "Inbox",
|
|
81
|
+
"category": "productivity"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"publishConfig": {
|
|
85
|
+
"access": "public"
|
|
86
|
+
},
|
|
87
|
+
"types": "./dist/index.d.ts",
|
|
88
|
+
"files": [
|
|
89
|
+
"assets",
|
|
90
|
+
"dist"
|
|
91
|
+
],
|
|
92
|
+
"gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
|
|
93
|
+
}
|