@elizaos/plugin-contacts 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 +21 -0
- package/README.md +64 -0
- package/package.json +84 -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,64 @@
|
|
|
1
|
+
# @elizaos/plugin-contacts
|
|
2
|
+
|
|
3
|
+
Android address-book overlay app and agent context provider for elizaOS.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
This plugin adds two capabilities to an Eliza agent running on Android:
|
|
8
|
+
|
|
9
|
+
1. **Address-book context** — a dynamic provider (`androidContacts`) reads up to 50 contacts from the device and injects them into the agent's planning context when a conversation involves contacts or messaging. Each entry includes id, display name, phone numbers, email addresses, and starred status.
|
|
10
|
+
|
|
11
|
+
2. **Full-screen Contacts overlay app** — a React UI registered with the elizaOS overlay-app system. Supports:
|
|
12
|
+
- Browsing and searching the address book
|
|
13
|
+
- Viewing contact details (phone numbers, email addresses)
|
|
14
|
+
- Creating new contacts (display name, phone, email)
|
|
15
|
+
- Importing contacts from a `.vcf` vCard file
|
|
16
|
+
- A terminal (TUI) surface for agent-driven interaction
|
|
17
|
+
|
|
18
|
+
The plugin is **Android-only**. On other platforms the overlay app is not registered and the provider returns an empty result set.
|
|
19
|
+
|
|
20
|
+
## Capabilities added to an Eliza agent
|
|
21
|
+
|
|
22
|
+
| Surface | Name | What it does |
|
|
23
|
+
|---------|------|-------------|
|
|
24
|
+
| Provider | `androidContacts` | Injects read-only address-book context (up to 50 contacts) into the planner for `contacts` and `messaging` conversation contexts. Requires ADMIN role session. |
|
|
25
|
+
| Overlay app (UI) | Contacts | Full-screen address-book UI: list, detail, create, import vCard. |
|
|
26
|
+
| Overlay app (TUI) | Contacts TUI | Terminal address-book surface for programmatic agent access. |
|
|
27
|
+
|
|
28
|
+
Note: live dialling is not part of this plugin. Placing a call remains in the Phone app (`PLACE_CALL` action).
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
`@elizaos/plugin-contacts` is an elizaOS plugin. Add it to your agent's plugin list:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
import { appContactsPlugin } from "@elizaos/plugin-contacts/plugin";
|
|
36
|
+
|
|
37
|
+
const agent = new AgentRuntime({
|
|
38
|
+
plugins: [appContactsPlugin],
|
|
39
|
+
// ...
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `./plugin` export is the runtime adapter entry point. The full package entry (`@elizaos/plugin-contacts`) additionally exports the UI components and the overlay-app registration helper.
|
|
44
|
+
|
|
45
|
+
To register the overlay app (done automatically via the side-effect import on elizaOS):
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
import "@elizaos/plugin-contacts/register"; // leaves the catalog unchanged on non-elizaOS
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Required permissions
|
|
52
|
+
|
|
53
|
+
No environment variables are needed. The plugin requires the following Android permissions to be granted at the OS level:
|
|
54
|
+
|
|
55
|
+
- `READ_CONTACTS`
|
|
56
|
+
- `WRITE_CONTACTS`
|
|
57
|
+
|
|
58
|
+
These are requested by `@elizaos/capacitor-contacts` at runtime.
|
|
59
|
+
|
|
60
|
+
## Limitations
|
|
61
|
+
|
|
62
|
+
- **Android only.** The native Contacts API is not available on iOS, web, or desktop.
|
|
63
|
+
- **Read-mostly.** The native layer does not expose contact update or delete. The detail view is read-only; create and import (vCard) are the only write operations.
|
|
64
|
+
- **Provider limit.** The `androidContacts` provider fetches at most 50 contacts per turn.
|
package/package.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-contacts",
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Android Contacts overlay app — wraps the @elizaos/capacitor-contacts native plugin.",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"typecheck": "tsgo --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": "bunx 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
|
+
"import": "./dist/plugin.js",
|
|
32
|
+
"default": "./dist/plugin.js"
|
|
33
|
+
},
|
|
34
|
+
"./*.css": "./dist/*.css",
|
|
35
|
+
"./*": {
|
|
36
|
+
"types": "./dist/*.d.ts",
|
|
37
|
+
"eliza-source": {
|
|
38
|
+
"types": "./src/*.ts",
|
|
39
|
+
"import": "./src/*.ts",
|
|
40
|
+
"default": "./src/*.ts"
|
|
41
|
+
},
|
|
42
|
+
"import": "./dist/*.js",
|
|
43
|
+
"default": "./dist/*.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@elizaos/capacitor-contacts": "2.0.11-beta.7",
|
|
48
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
49
|
+
"@elizaos/ui": "2.0.11-beta.7",
|
|
50
|
+
"lucide-react": "^1.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"react": "^19.0.0",
|
|
54
|
+
"react-dom": "^19.0.0"
|
|
55
|
+
},
|
|
56
|
+
"elizaos": {
|
|
57
|
+
"app": {
|
|
58
|
+
"displayName": "Contacts",
|
|
59
|
+
"category": "system",
|
|
60
|
+
"androidOnly": true,
|
|
61
|
+
"heroImage": "assets/hero.png"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
66
|
+
},
|
|
67
|
+
"types": "./dist/index.d.ts",
|
|
68
|
+
"files": [
|
|
69
|
+
"dist"
|
|
70
|
+
],
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@biomejs/biome": "^2.4.14",
|
|
73
|
+
"@testing-library/react": "^16.3.2",
|
|
74
|
+
"@types/react": "^19.0.0",
|
|
75
|
+
"@types/react-dom": "^19.0.0",
|
|
76
|
+
"react": "^19.0.0",
|
|
77
|
+
"react-dom": "^19.0.0",
|
|
78
|
+
"tsup": "^8.5.1",
|
|
79
|
+
"typescript": "^6.0.3",
|
|
80
|
+
"vite": "^8.0.0",
|
|
81
|
+
"vitest": "^4.0.17"
|
|
82
|
+
},
|
|
83
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
84
|
+
}
|