@elizaos/plugin-signal 2.0.0-alpha.7 → 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 +90 -0
- package/auto-enable.ts +20 -0
- package/package.json +52 -11
- package/dist/index.js +0 -1551
- package/dist/index.js.map +0 -19
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,90 @@
|
|
|
1
|
+
# @elizaos/plugin-signal
|
|
2
|
+
|
|
3
|
+
Signal messaging integration for elizaOS. Enables Eliza agents to send and receive end-to-end-encrypted Signal messages via [signal-cli](https://github.com/AsamK/signal-cli) or its REST API.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
- **Receive messages** — inbound Signal DMs and group messages are stored as agent memories and trigger `SIGNAL_MESSAGE_RECEIVED` events.
|
|
8
|
+
- **Send messages** — agents send DMs and group messages through the elizaOS `MessageConnector` surface (LifeOps, workflow automations, explicit send actions).
|
|
9
|
+
- **Contact and group discovery** — the plugin exposes Signal contacts and groups as connector targets so agents can resolve conversation destinations by name, phone number, or group.
|
|
10
|
+
- **QR device linking** — HTTP endpoints drive a pairing flow (QR code → signal-cli device link) without requiring a separate phone.
|
|
11
|
+
- **Multi-account** — configure multiple Signal accounts via `character.settings.signal.accounts`.
|
|
12
|
+
- **Workflow integration** — supplies credentials to the workflow plugin for Signal-backed automations.
|
|
13
|
+
|
|
14
|
+
## Capabilities registered
|
|
15
|
+
|
|
16
|
+
This plugin registers no actions. Messaging is handled through the `MessageConnector` interface.
|
|
17
|
+
|
|
18
|
+
**Services:**
|
|
19
|
+
- `SignalService` — core connector; manages daemon lifecycle, inbound/outbound messages, contacts, and groups.
|
|
20
|
+
- `SignalWorkflowCredentialProvider` — bridges Signal credentials to the workflow plugin.
|
|
21
|
+
|
|
22
|
+
**Setup routes (no auth required, mounted at raw paths):**
|
|
23
|
+
- `GET /api/setup/signal/status` — pairing and connection state
|
|
24
|
+
- `POST /api/setup/signal/start` — begin QR device-linking session
|
|
25
|
+
- `POST /api/setup/signal/cancel` — stop pairing and disconnect
|
|
26
|
+
|
|
27
|
+
## Prerequisites
|
|
28
|
+
|
|
29
|
+
One of:
|
|
30
|
+
- **signal-cli** installed and on `PATH` (the plugin can spawn and manage it as a daemon). On macOS, install via Homebrew: `brew install signal-cli`. Java is required; the plugin auto-detects Homebrew's OpenJDK.
|
|
31
|
+
- A running **signal-cli REST API server** (`signal-cli -a +1... daemon --http 127.0.0.1:8080`) accessible at `SIGNAL_HTTP_URL`.
|
|
32
|
+
- The optional **`@elizaos/signal-native`** peer dependency for QR linking without spawning signal-cli.
|
|
33
|
+
|
|
34
|
+
The agent's Signal account must be linked (registered or device-linked) before the service can connect. Use the `/api/setup/signal/start` endpoint or run `signal-cli -a +1... link` manually.
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
### Environment variables
|
|
39
|
+
|
|
40
|
+
| Variable | Required | Default | Description |
|
|
41
|
+
|---|---|---|---|
|
|
42
|
+
| `SIGNAL_ACCOUNT_NUMBER` | **yes** | — | Phone number in E.164 format (e.g. `+15551234567`) |
|
|
43
|
+
| `SIGNAL_HTTP_URL` | no | `http://127.0.0.1:8080` | signal-cli REST API URL; omit to auto-start a local daemon |
|
|
44
|
+
| `SIGNAL_CLI_PATH` | no | `signal-cli` (PATH) | Path to signal-cli binary |
|
|
45
|
+
| `SIGNAL_CLI_AUTO_INSTALL` | no | `true` | Set `false` to disable Homebrew auto-install |
|
|
46
|
+
| `SIGNAL_AUTH_DIR` | no | `~/.local/share/signal-cli` | signal-cli data directory |
|
|
47
|
+
| `SIGNAL_SHOULD_IGNORE_GROUP_MESSAGES` | no | `false` | Set `true` to respond only to DMs |
|
|
48
|
+
| `SIGNAL_AUTO_REPLY` | no | `false` | Set `true` to have the agent auto-generate replies |
|
|
49
|
+
| `SIGNAL_RECEIVE_MODE` | no | `manual` | `on-start` polls immediately; `manual` lets LifeOps pull |
|
|
50
|
+
| `SIGNAL_STARTUP_TIMEOUT_MS` | no | `30000` | Daemon startup timeout (max 120 000 ms) |
|
|
51
|
+
|
|
52
|
+
### Character settings (multi-account)
|
|
53
|
+
|
|
54
|
+
```jsonc
|
|
55
|
+
{
|
|
56
|
+
"settings": {
|
|
57
|
+
"signal": {
|
|
58
|
+
"account": "+15551234567",
|
|
59
|
+
"httpUrl": "http://127.0.0.1:8080",
|
|
60
|
+
"accounts": {
|
|
61
|
+
"work": {
|
|
62
|
+
"account": "+15559876543",
|
|
63
|
+
"httpUrl": "http://127.0.0.1:8081",
|
|
64
|
+
"enabled": true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Enabling the plugin
|
|
73
|
+
|
|
74
|
+
The plugin auto-enables when a `signal` connector block is present in the agent config and not explicitly set to `enabled: false`. You can also add it directly to the plugins array:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import signalPlugin from "@elizaos/plugin-signal";
|
|
78
|
+
|
|
79
|
+
const agent = new AgentRuntime({
|
|
80
|
+
plugins: [signalPlugin],
|
|
81
|
+
// ...
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Important behavior notes
|
|
86
|
+
|
|
87
|
+
- **Auto-reply is off by default.** Inbound messages are recorded as memories and events, but the agent does not respond unless `SIGNAL_AUTO_REPLY=true`. Use LifeOps or explicit workflow actions to send responses.
|
|
88
|
+
- **Auth directory:** signal-cli always uses `~/.local/share/signal-cli` on all platforms (including macOS). This matches the signal-cli default, so an existing local installation works without extra config.
|
|
89
|
+
- **Message length:** messages over 4 000 characters are split automatically.
|
|
90
|
+
- **Group filtering:** set `SIGNAL_SHOULD_IGNORE_GROUP_MESSAGES=true` to limit the agent to direct messages only.
|
package/auto-enable.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Auto-enable check for @elizaos/plugin-signal.
|
|
2
|
+
//
|
|
3
|
+
// Plugin manifest entry-point — referenced by package.json's
|
|
4
|
+
// `elizaos.plugin.autoEnableModule`. Keep this module light: env reads only,
|
|
5
|
+
// no service init, no transitive imports of the full plugin runtime. The
|
|
6
|
+
// auto-enable engine loads dozens of these per boot.
|
|
7
|
+
import type { PluginAutoEnableContext } from "@elizaos/core";
|
|
8
|
+
|
|
9
|
+
/** Enable when a `signal` connector block is present and not explicitly disabled. */
|
|
10
|
+
export function shouldEnable(ctx: PluginAutoEnableContext): boolean {
|
|
11
|
+
const c = (ctx.config.connectors as Record<string, unknown> | undefined)?.signal;
|
|
12
|
+
if (!c || typeof c !== "object") return false;
|
|
13
|
+
const config = c as Record<string, unknown>;
|
|
14
|
+
if (config.enabled === false) return false;
|
|
15
|
+
// The full per-connector field check (signal-cli endpoint / phone number)
|
|
16
|
+
// lives in the central engine's isConnectorConfigured. We delegate to a
|
|
17
|
+
// simple "block present + not explicitly disabled" check here; the central
|
|
18
|
+
// engine's stricter check remains as a fallback during migration.
|
|
19
|
+
return true;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-signal",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11-beta.7",
|
|
4
4
|
"description": "Signal messaging integration plugin for ElizaOS agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,13 +15,38 @@
|
|
|
15
15
|
"./package.json": "./package.json",
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
|
+
"eliza-source": {
|
|
19
|
+
"types": "./src/index.ts",
|
|
20
|
+
"import": "./src/index.ts",
|
|
21
|
+
"default": "./src/index.ts"
|
|
22
|
+
},
|
|
18
23
|
"import": "./dist/index.js",
|
|
19
24
|
"default": "./dist/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./*.css": "./dist/*.css",
|
|
27
|
+
"./*": {
|
|
28
|
+
"types": "./dist/*.d.ts",
|
|
29
|
+
"eliza-source": {
|
|
30
|
+
"types": "./src/*.ts",
|
|
31
|
+
"import": "./src/*.ts",
|
|
32
|
+
"default": "./src/*.ts"
|
|
33
|
+
},
|
|
34
|
+
"import": "./dist/*.js",
|
|
35
|
+
"default": "./dist/*.js"
|
|
20
36
|
}
|
|
21
37
|
},
|
|
22
38
|
"files": [
|
|
23
|
-
"dist"
|
|
39
|
+
"dist",
|
|
40
|
+
"auto-enable.ts"
|
|
24
41
|
],
|
|
42
|
+
"elizaos": {
|
|
43
|
+
"plugin": {
|
|
44
|
+
"autoEnableModule": "./auto-enable.ts",
|
|
45
|
+
"capabilities": [
|
|
46
|
+
"messaging"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
},
|
|
25
50
|
"keywords": [
|
|
26
51
|
"elizaos",
|
|
27
52
|
"plugin",
|
|
@@ -36,7 +61,7 @@
|
|
|
36
61
|
"build": "bun run build.ts",
|
|
37
62
|
"build:ts": "bun run build.ts",
|
|
38
63
|
"dev": "bun --hot build.ts",
|
|
39
|
-
"clean": "rm -rf dist .turbo
|
|
64
|
+
"clean": "rm -rf dist .turbo",
|
|
40
65
|
"test": "vitest run",
|
|
41
66
|
"typecheck": "echo \"Typecheck skipped for release\"",
|
|
42
67
|
"lint": "echo \"Lint skipped for release\"",
|
|
@@ -45,16 +70,25 @@
|
|
|
45
70
|
"format:check": "bunx @biomejs/biome format ."
|
|
46
71
|
},
|
|
47
72
|
"dependencies": {
|
|
48
|
-
"@elizaos/core": "2.0.
|
|
49
|
-
"
|
|
73
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
74
|
+
"qrcode": "^1.5.4"
|
|
50
75
|
},
|
|
51
76
|
"devDependencies": {
|
|
77
|
+
"@biomejs/biome": "^2.4.14",
|
|
52
78
|
"@types/node": "^25.0.3",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
79
|
+
"@types/qrcode": "^1.5.5",
|
|
80
|
+
"bun-types": "^1.2.25",
|
|
81
|
+
"typescript": "^6.0.3",
|
|
82
|
+
"vitest": "^4.1.4"
|
|
55
83
|
},
|
|
56
84
|
"peerDependencies": {
|
|
57
|
-
"@elizaos/core": "2.0.
|
|
85
|
+
"@elizaos/core": "2.0.11-beta.7",
|
|
86
|
+
"@elizaos/signal-native": "latest"
|
|
87
|
+
},
|
|
88
|
+
"peerDependenciesMeta": {
|
|
89
|
+
"@elizaos/signal-native": {
|
|
90
|
+
"optional": true
|
|
91
|
+
}
|
|
58
92
|
},
|
|
59
93
|
"publishConfig": {
|
|
60
94
|
"access": "public"
|
|
@@ -76,7 +110,13 @@
|
|
|
76
110
|
},
|
|
77
111
|
"SIGNAL_CLI_PATH": {
|
|
78
112
|
"type": "string",
|
|
79
|
-
"description": "Path to signal-cli executable (alternative to HTTP API)",
|
|
113
|
+
"description": "Path to signal-cli executable (alternative to HTTP API). Leave blank to resolve signal-cli from PATH and auto-install with Homebrew on macOS/Linux when available; on Windows or without Homebrew, install signal-cli manually and set this path.",
|
|
114
|
+
"required": false,
|
|
115
|
+
"sensitive": false
|
|
116
|
+
},
|
|
117
|
+
"SIGNAL_CLI_AUTO_INSTALL": {
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"description": "Set false to disable Homebrew auto-install for the default signal-cli binary on macOS/Linux.",
|
|
80
120
|
"required": false,
|
|
81
121
|
"sensitive": false
|
|
82
122
|
},
|
|
@@ -88,7 +128,7 @@
|
|
|
88
128
|
}
|
|
89
129
|
}
|
|
90
130
|
},
|
|
91
|
-
"
|
|
131
|
+
"eliza": {
|
|
92
132
|
"platforms": [
|
|
93
133
|
"node"
|
|
94
134
|
],
|
|
@@ -96,5 +136,6 @@
|
|
|
96
136
|
"platformDetails": {
|
|
97
137
|
"node": "Default export (Node.js)"
|
|
98
138
|
}
|
|
99
|
-
}
|
|
139
|
+
},
|
|
140
|
+
"gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
|
|
100
141
|
}
|