@elizaos/plugin-phone 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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/package.json +97 -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,66 @@
1
+ # @elizaos/plugin-phone
2
+
3
+ Phone integration for elizaOS — Android dialer overlay and iOS Phone Companion.
4
+
5
+ ## What it does
6
+
7
+ This plugin ships two independent surfaces:
8
+
9
+ **Android Phone overlay**
10
+ A full-screen dialer app (Dialer, Recent Calls tabs) that runs as an overlay inside the elizaOS Android shell. It reads call history from the native `READ_CALL_LOG` permission via `@elizaos/capacitor-phone` and exposes it to the agent runtime. Tapping a recent-call row places a call through `Phone.placeCall`. The address book lives in the separate Contacts view (`@elizaos/plugin-contacts`); the header "Contacts" button links to it through the `eliza:navigate:view` bus rather than embedding a duplicate contacts pane. When another surface (e.g. a Contacts "Call" control) navigates here with a number, the dialer is pre-seeded with it.
11
+
12
+ **Phone Companion (iOS)**
13
+ A three-screen Capacitor surface (Chat, Pairing, Remote Session) that runs inside the main elizaOS iOS bundle. It pairs with a desktop Eliza agent via a QR code scan, mirrors the agent's chat stream, and can relay touch gestures to a remote VNC/noVNC session running on the paired Mac. APNs push notifications can trigger a Remote Session view automatically when enabled.
14
+
15
+ ## Capabilities added to the agent
16
+
17
+ | Surface | What the agent gains |
18
+ |---------|---------------------|
19
+ | `phoneCallLog` provider | Read-only Android call history injected into the agent's context for questions about recent calls. Fetches up to 50 entries. Requires `ADMIN` role. Available in `contacts` and `messaging` contexts. |
20
+ | `/phone` view | Full-screen dialer overlay (desktop, XR). |
21
+ | `/phone/tui` view | Terminal-mode dialer + transcript UI. Supports the `terminal-phone-state`, `terminal-place-call`, `terminal-open-dialer`, `terminal-save-call-transcript` capabilities via `interact()`. |
22
+ | `/phone-companion` nav tab | iOS companion surface (pairing, chat-mirror, remote-session). |
23
+
24
+ ## Enabling the plugin
25
+
26
+ ```ts
27
+ import { appPhonePlugin } from "@elizaos/plugin-phone";
28
+
29
+ // Pass to the elizaOS runtime plugin list:
30
+ const runtime = new AgentRuntime({
31
+ plugins: [appPhonePlugin],
32
+ // ...
33
+ });
34
+ ```
35
+
36
+ The Android overlay registers automatically when the host is the elizaOS Android shell (`isElizaOS()` returns true). The Phone Companion page registers unconditionally for iOS and desktop hosts.
37
+
38
+ ## Required permissions (Android)
39
+
40
+ The native `@elizaos/capacitor-phone` plugin requires `READ_CALL_LOG` and `CALL_PHONE` permissions in the host APK's `AndroidManifest.xml`. The plugin surface renders correctly without these permissions, but call-log and call-placement features will fail at runtime.
41
+
42
+ ## Environment / config
43
+
44
+ All configuration variables are Vite build-time env vars for the companion surface. They do not affect the Android overlay or the agent-side provider.
45
+
46
+ | Variable | Default | Description |
47
+ |----------|---------|-------------|
48
+ | `VITE_ELIZA_AGENT_URL` | — | Pre-configured agent ingress URL shown in the companion Chat view before pairing |
49
+ | `VITE_ELIZA_APNS_ENABLED` | `"0"` | Set to `"1"` to enable APNs push registration on iOS |
50
+ | `VITE_ELIZA_LOG_LEVEL` | — | Log level for the companion surface |
51
+
52
+ ## Building
53
+
54
+ ```bash
55
+ bun run --cwd plugins/plugin-phone build
56
+ ```
57
+
58
+ The build produces three outputs: `dist/index.js` (main ESM bundle), `dist/views/bundle.js` (plugin view bundle loaded by the elizaOS view registry), and `dist/index.d.ts` (type declarations).
59
+
60
+ ## Native dependencies
61
+
62
+ - `@elizaos/capacitor-phone` — Android dialer and call-log native bridge (workspace package).
63
+ - `@capacitor/push-notifications` — APNs push registration for the iOS companion.
64
+ - `@capacitor/haptics` — Haptic feedback on companion navigation transitions.
65
+ - `@capacitor/preferences` — Navigation stack persistence for the companion.
66
+ - `@capacitor/barcode-scanner` — QR pairing scan in the companion Pairing view.
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@elizaos/plugin-phone",
3
+ "version": "2.0.3-beta.2",
4
+ "type": "module",
5
+ "description": "Phone app for Eliza — Android dialer/call-log overlay (@elizaos/capacitor-phone) and the iOS Phone Companion (pairing, chat-mirror, remote-session).",
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
+ "eliza-source": {
22
+ "types": "./src/plugin.ts",
23
+ "import": "./src/plugin.ts",
24
+ "default": "./src/plugin.ts"
25
+ },
26
+ "import": "./dist/plugin.js",
27
+ "default": "./dist/plugin.js"
28
+ },
29
+ "./*.css": "./dist/*.css",
30
+ "./*": {
31
+ "types": "./dist/*.d.ts",
32
+ "eliza-source": {
33
+ "types": "./src/*.ts",
34
+ "import": "./src/*.ts",
35
+ "default": "./src/*.ts"
36
+ },
37
+ "import": "./dist/*.js",
38
+ "default": "./dist/*.js"
39
+ }
40
+ },
41
+ "scripts": {
42
+ "typecheck": "tsgo --noEmit -p tsconfig.json",
43
+ "lint": "bunx @biomejs/biome check src",
44
+ "test": "bunx vitest run --config ./vitest.config.ts",
45
+ "build": "bun run build:js && bun run build:views && bun run build:types",
46
+ "clean": "rm -rf dist",
47
+ "build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
48
+ "build:views": "bunx --bun vite build --config vite.config.views.ts",
49
+ "build:types": "tsc --noCheck -p tsconfig.build.json"
50
+ },
51
+ "dependencies": {
52
+ "@capacitor/barcode-scanner": "^3.0.0",
53
+ "@capacitor/core": "8.4.0",
54
+ "@capacitor/haptics": "8.0.2",
55
+ "@capacitor/preferences": "^8.0.1",
56
+ "@capacitor/push-notifications": "^8.0.0",
57
+ "@elizaos/capacitor-phone": "2.0.3-beta.2",
58
+ "@elizaos/core": "2.0.3-beta.2",
59
+ "@elizaos/plugin-browser": "2.0.3-beta.2",
60
+ "@elizaos/shared": "2.0.3-beta.2",
61
+ "@elizaos/ui": "2.0.3-beta.2",
62
+ "lucide-react": "^1.0.0"
63
+ },
64
+ "peerDependencies": {
65
+ "react": "^19.0.0",
66
+ "react-dom": "^19.0.0"
67
+ },
68
+ "elizaos": {
69
+ "app": {
70
+ "displayName": "Phone",
71
+ "category": "system",
72
+ "androidOnly": true,
73
+ "heroImage": "assets/hero.png"
74
+ }
75
+ },
76
+ "publishConfig": {
77
+ "access": "public"
78
+ },
79
+ "types": "./dist/index.d.ts",
80
+ "files": [
81
+ "dist"
82
+ ],
83
+ "devDependencies": {
84
+ "@testing-library/react": "^16.3.2",
85
+ "@types/react": "^19.0.0",
86
+ "@types/react-dom": "^19.0.0",
87
+ "bun-types": "^1.3.14",
88
+ "jsdom": "^29.0.0",
89
+ "react": "19.2.5",
90
+ "react-dom": "19.2.5",
91
+ "tsup": "^8.5.1",
92
+ "typescript": "^6.0.3",
93
+ "vite": "^8.0.0",
94
+ "vitest": "^4.0.17"
95
+ },
96
+ "gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
97
+ }