@elizaos/plugin-messages 2.0.11-beta.7

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 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,73 @@
1
+ # @elizaos/plugin-messages
2
+
3
+ Android SMS plugin for elizaOS. Adds an SMS inbox, thread viewer, and compose surface to the elizaOS agent shell on Android.
4
+
5
+ ## What it does
6
+
7
+ - Reads SMS threads and message history from the Android SMS store via the native capacitor bridge.
8
+ - Lets users and agents compose and send text messages.
9
+ - Surfaces the Android default SMS role status and prompts to request it when not held.
10
+ - Registers three views: a full overlay app, an XR variant, and a TUI (terminal) variant for agent automation.
11
+
12
+ ## Platform requirement
13
+
14
+ **Android only.** The plugin is marked `androidOnly: true`. Non-Android runtimes leave overlay app registration unchanged.
15
+
16
+ ## Enabling the plugin
17
+
18
+ Add `@elizaos/plugin-messages` to the agent's plugin list when constructing the runtime:
19
+
20
+ ```ts
21
+ import messagesPlugin from "@elizaos/plugin-messages";
22
+
23
+ const runtime = new AgentRuntime({
24
+ // ...
25
+ plugins: [messagesPlugin],
26
+ });
27
+ ```
28
+
29
+ ## Views registered
30
+
31
+ | Path | Description |
32
+ |---|---|
33
+ | `/messages` | Full SMS inbox and composer overlay |
34
+ | `/messages` (XR) | XR variant of the same surface |
35
+ | `/messages/tui` | Terminal-style view for agent automation |
36
+
37
+ ## Android SMS role
38
+
39
+ Reading and sending SMS requires Android to grant the default SMS role (`android.app.role.SMS`) to the elizaOS app. When the role is not held, the UI shows a "Set default SMS" banner. The role can also be requested programmatically through the TUI `interact()` API.
40
+
41
+ ## Agent automation (TUI)
42
+
43
+ The `MessagesTuiView` component and `interact()` function expose a programmatic terminal API:
44
+
45
+ ```ts
46
+ import { interact } from "@elizaos/plugin-messages/components/MessagesAppView";
47
+
48
+ // List threads
49
+ const { threads, ownsSmsRole } = await interact("terminal-list-threads", { limit: 50 });
50
+
51
+ // Send an SMS
52
+ await interact("terminal-send-sms", { address: "+15550100", body: "Hello" });
53
+
54
+ // Request the default SMS role
55
+ await interact("terminal-request-sms-role");
56
+ ```
57
+
58
+ The TUI view also writes its full state to a `data-view-state` attribute on the root element, which test harnesses and agents can read without parsing inner DOM structure.
59
+
60
+ ## Dependencies
61
+
62
+ - `@elizaos/capacitor-messages` — native SMS bridge (`Messages.listMessages`, `Messages.sendSms`)
63
+ - `@elizaos/capacitor-system` — system role API (`System.getStatus`, `System.requestRole`)
64
+ - `@elizaos/ui` — shared component library and overlay app registration
65
+ - `@elizaos/core` — plugin type definitions
66
+
67
+ ## Building
68
+
69
+ ```bash
70
+ bun run --cwd plugins/plugin-messages build
71
+ ```
72
+
73
+ This runs `build:js` (tsup library bundle), `build:views` (vite view bundle at `dist/views/bundle.js`), and `build:types` (TypeScript declarations).
@@ -0,0 +1,68 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024" role="img" aria-label="Messages">
2
+ <defs>
3
+ <linearGradient id="bg-messages" x1="0" y1="0" x2="1" y2="1">
4
+ <stop offset="0" stop-color="#1a1528"/>
5
+ <stop offset="1" stop-color="#120b19"/>
6
+ </linearGradient>
7
+ <radialGradient id="blobA-messages" cx="0.5" cy="0.5" r="0.5">
8
+ <stop offset="0" stop-color="#5d2fda" stop-opacity="0.55"/>
9
+ <stop offset="1" stop-color="#5d2fda" stop-opacity="0"/>
10
+ </radialGradient>
11
+ <radialGradient id="blobB-messages" cx="0.5" cy="0.5" r="0.5">
12
+ <stop offset="0" stop-color="#9928c3" stop-opacity="0.5"/>
13
+ <stop offset="1" stop-color="#9928c3" stop-opacity="0"/>
14
+ </radialGradient>
15
+ <radialGradient id="vig-messages" 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-messages" 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-messages" x="-30%" y="-30%" width="160%" height="160%">
25
+ <feGaussianBlur stdDeviation="46"/>
26
+ </filter>
27
+ <filter id="iglow-messages" x="-40%" y="-40%" width="180%" height="180%">
28
+ <feDropShadow dx="0" dy="0" stdDeviation="14" flood-color="#7245ed" flood-opacity="0.45"/>
29
+ </filter>
30
+ </defs>
31
+
32
+ <rect width="1024" height="1024" fill="url(#bg-messages)"/>
33
+
34
+ <g opacity="0.9">
35
+ <circle cx="232" cy="220" r="300" fill="url(#blobA-messages)" filter="url(#soft-messages)"/>
36
+ <circle cx="840" cy="800" r="340" fill="url(#blobB-messages)" filter="url(#soft-messages)"/>
37
+ </g>
38
+
39
+ <g stroke="#dcd7ea" 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="#7245ed" stroke-width="3" opacity="0.35"/>
50
+ </g>
51
+
52
+ <g transform="translate(512 432)" filter="url(#iglow-messages)"
53
+ color="#dcd7ea" stroke="#dcd7ea" stroke-width="20"
54
+ stroke-linecap="round" stroke-linejoin="round" fill="none">
55
+ <path d="M-150 -120 H150 A24 24 0 0 1 174 -96 V60 A24 24 0 0 1 150 84 H-30 L-100 150 V84 H-150 A24 24 0 0 1 -174 60 V-96 A24 24 0 0 1 -150 -120 Z"/>
56
+ <line x1="-100" y1="-44" x2="100" y2="-44"/>
57
+ <line x1="-100" y1="16" x2="40" y2="16"/>
58
+ </g>
59
+
60
+ <rect x="0" y="784" width="1024" height="240" fill="url(#label-messages)"/>
61
+ <text x="512" y="892" text-anchor="middle"
62
+ font-family="system-ui, -apple-system, Segoe UI, Roboto, sans-serif"
63
+ font-size="76" font-weight="600" letter-spacing="0.5"
64
+ fill="#dcd7ea">Messages</text>
65
+ <rect x="460" y="924" width="104" height="6" rx="3" fill="#7245ed"/>
66
+
67
+ <rect width="1024" height="1024" fill="url(#vig-messages)"/>
68
+ </svg>
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@elizaos/plugin-messages",
3
+ "version": "2.0.11-beta.7",
4
+ "type": "module",
5
+ "description": "Android Messages overlay app for ElizaOS — SMS inbox and compose surface backed by @elizaos/capacitor-messages.",
6
+ "main": "./dist/index.js",
7
+ "exports": {
8
+ "./package.json": "./package.json",
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "eliza-source": {
12
+ "types": "./src/index.ts",
13
+ "import": "./src/index.ts",
14
+ "default": "./src/index.ts"
15
+ },
16
+ "import": "./dist/index.js",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "./plugin": {
20
+ "types": "./dist/plugin.d.ts",
21
+ "import": "./dist/plugin.js",
22
+ "default": "./dist/plugin.js"
23
+ },
24
+ "./*.css": "./dist/*.css",
25
+ "./*": {
26
+ "types": "./dist/*.d.ts",
27
+ "eliza-source": {
28
+ "types": "./src/*.ts",
29
+ "import": "./src/*.ts",
30
+ "default": "./src/*.ts"
31
+ },
32
+ "import": "./dist/*.js",
33
+ "default": "./dist/*.js"
34
+ }
35
+ },
36
+ "scripts": {
37
+ "typecheck": "tsgo --noEmit -p tsconfig.json",
38
+ "lint": "bunx @biomejs/biome check src",
39
+ "test": "bunx vitest run --config ./vitest.config.ts",
40
+ "build": "bun run build:js && bun run build:views && bun run build:types",
41
+ "clean": "rm -rf dist",
42
+ "build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
43
+ "build:views": "bunx --bun vite build --config vite.config.views.ts",
44
+ "build:types": "tsc --noCheck -p tsconfig.build.json"
45
+ },
46
+ "dependencies": {
47
+ "@elizaos/app-core": "2.0.11-beta.7",
48
+ "@elizaos/capacitor-messages": "2.0.11-beta.7",
49
+ "@elizaos/capacitor-system": "2.0.11-beta.7",
50
+ "@elizaos/core": "2.0.11-beta.7",
51
+ "@elizaos/shared": "2.0.11-beta.7",
52
+ "@elizaos/ui": "2.0.11-beta.7",
53
+ "lucide-react": "^1.0.0"
54
+ },
55
+ "peerDependencies": {
56
+ "react": "^19.0.0",
57
+ "react-dom": "^19.0.0"
58
+ },
59
+ "elizaos": {
60
+ "app": {
61
+ "displayName": "Messages",
62
+ "category": "system",
63
+ "androidOnly": true,
64
+ "heroImage": "assets/hero.png"
65
+ }
66
+ },
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "types": "./dist/index.d.ts",
71
+ "files": [
72
+ "assets",
73
+ "dist"
74
+ ],
75
+ "devDependencies": {
76
+ "@testing-library/react": "^16.3.2",
77
+ "@types/react": "^19.0.0",
78
+ "@types/react-dom": "^19.0.0",
79
+ "jsdom": "^29.0.0",
80
+ "react": "^19.0.0",
81
+ "react-dom": "^19.0.0",
82
+ "tsup": "^8.5.1",
83
+ "typescript": "^6.0.3",
84
+ "vite": "^8.0.0",
85
+ "vitest": "^4.0.17"
86
+ },
87
+ "gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
88
+ }