@elizaos/plugin-remote-desktop 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 +80 -0
  3. package/package.json +88 -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,80 @@
1
+ # @elizaos/plugin-remote-desktop
2
+
3
+ Owner-only remote desktop session control for Eliza agents. Lets the owner connect to the agent's host machine from another device (typically a phone) over Tailscale VNC/SSH or an ngrok TCP tunnel, gated by an explicit confirmation step and (in cloud mode) a 6-digit pairing code.
4
+
5
+ ## Status: live
6
+
7
+ Extracted from `@elizaos/plugin-personal-assistant` as part of the LifeOps decomposition. This plugin owns the full remote-desktop implementation — the `REMOTE_DESKTOP` action, the backend-detection engine, and the in-process `RemoteSessionService` control plane. PA re-exports `remoteDesktopAction` + `detectRemoteDesktopBackend` through a thin shim for back-compat and loads this plugin at init via `ensureLifeOpsRemoteDesktopPluginRegistered`. Exactly one plugin registers the `REMOTE_DESKTOP` action — this one.
8
+
9
+ ## Migration mapping (complete)
10
+
11
+ | Location (this plugin) | Former source in `@elizaos/plugin-personal-assistant` |
12
+ |---|---|
13
+ | `src/actions/remote-desktop.ts` | `src/actions/remote-desktop.ts` |
14
+ | `src/lifeops/remote-desktop.ts` | `src/lifeops/remote-desktop.ts` |
15
+ | `src/remote/remote-session-service.ts` | `src/remote/remote-session-service.ts` |
16
+ | `src/remote/pairing-code.ts` | `src/remote/pairing-code.ts` |
17
+ | `src/types.ts` | inline in the engine + service (now canonical here) |
18
+
19
+ The handler dispatches subactions via `resolveActionArgs` from `@elizaos/core`. PA's old `src/actions/remote-desktop.ts` is now a thin re-export shim.
20
+
21
+ ## Plugin surface
22
+
23
+ **Action**
24
+
25
+ - `REMOTE_DESKTOP` — umbrella action with op-based dispatch:
26
+ - `start` — open a session. Requires `confirmed: true`. In cloud mode also requires a 6-digit `pairingCode`. `ELIZA_REMOTE_LOCAL_MODE=1` skips the pairing-code requirement.
27
+ - `status` — look up a session by `sessionId`.
28
+ - `end` — close a session by `sessionId`.
29
+ - `list` — list active sessions.
30
+ - `revoke` — revoke an active session by `sessionId`.
31
+
32
+ Role gate: `OWNER`. Contexts: `browser`, `automation`, `settings`, `admin`, `terminal`. The action sets `suppressPostActionContinuation: true` to keep the planner from chaining additional turns after a remote session is opened.
33
+
34
+ No providers. No services. No schema. The session store is in-memory plus a JSON file under `resolveStateDir()/lifeops/remote-sessions.json`.
35
+
36
+ ## Config / env vars
37
+
38
+ Read by this plugin's engine (`src/lifeops/remote-desktop.ts`) and control-plane service (`src/remote/remote-session-service.ts`):
39
+
40
+ | Variable | Required | Description |
41
+ |---|---|---|
42
+ | `ELIZA_REMOTE_LOCAL_MODE` | No | Set to `1` to skip the pairing-code requirement on `start`. Confirmation is still required. |
43
+ | `ELIZA_REMOTE_ACCESS_TOKEN` | No | Token used by external clients that want to attach to a session. |
44
+ | `ELIZA_TAILSCALE_NODE` | No | Override the Tailscale node hostname used for VNC/SSH URLs. |
45
+ | `ELIZA_NGROK_AUTH_TOKEN` | No | ngrok auth token. Required to use the `ngrok-vnc` backend. Passed via env, never argv. |
46
+ | `ELIZA_TEST_REMOTE_DESKTOP_BACKEND` | No | Set to `1`/`true`/`fixture` to force mock mode (no real backend probe). |
47
+
48
+ ## Commands
49
+
50
+ ```bash
51
+ bun run --cwd plugins/plugin-remote-desktop typecheck # tsgo --noEmit
52
+ bun run --cwd plugins/plugin-remote-desktop test # vitest run
53
+ bun run --cwd plugins/plugin-remote-desktop build # bun bundle + tsc decl emit
54
+ bun run --cwd plugins/plugin-remote-desktop check # typecheck + test
55
+ bun run --cwd plugins/plugin-remote-desktop clean # rm -rf dist .turbo
56
+ ```
57
+
58
+ ## Layout
59
+
60
+ ```
61
+ src/
62
+ index.ts Public exports; default-exports remoteDesktopPlugin
63
+ plugin.ts Plugin object (actions: [remoteDesktopAction])
64
+ types.ts Canonical types (RemoteDesktopSession, RemoteSession, ...)
65
+ actions/
66
+ remote-desktop.ts REMOTE_DESKTOP umbrella action (real handler; resolveActionArgs dispatch)
67
+ lifeops/
68
+ remote-desktop.ts Backend detection (Tailscale/ngrok/VNC) + in-process session store
69
+ remote/
70
+ remote-session-service.ts Control-plane service + pairing-code gate + data-plane handoff
71
+ pairing-code.ts 6-digit rolling one-time pairing codes
72
+ ```
73
+
74
+ ## Conventions / gotchas
75
+
76
+ - **OWNER role gate.** `REMOTE_DESKTOP` will not fire for non-owner entities.
77
+ - **`confirmed: true` is mandatory for `start`.** The action's underlying service rejects unconfirmed starts. The confirmation prompt is rendered by `requireConfirmation` from `@elizaos/core`.
78
+ - **`suppressPostActionContinuation`.** The action sets this flag so the planner does not chain another turn after a remote session is opened — opening a session is a side-effect the owner consumes out-of-band (a VNC viewer / SSH client).
79
+ - **No business computation in this plugin's surface.** Session state and ingress URL come from the underlying service; the action just shapes the `ActionResult` for the agent.
80
+ - See root `AGENTS.md` for repo-wide architecture commandments, logger conventions, and ESM rules.
package/package.json ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@elizaos/plugin-remote-desktop",
3
+ "version": "2.0.3-beta.2",
4
+ "description": "Remote desktop session control for Eliza agents. REMOTE_DESKTOP umbrella action (start/status/end/list/revoke) over Tailscale VNC/SSH and ngrok backends with pairing-code confirmation. Extracted from @elizaos/plugin-personal-assistant.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "sideEffects": false,
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/elizaos/eliza.git"
13
+ },
14
+ "exports": {
15
+ "./package.json": "./package.json",
16
+ ".": {
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
+ },
23
+ "import": "./dist/index.js",
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"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist"
40
+ ],
41
+ "keywords": [
42
+ "eliza",
43
+ "plugin",
44
+ "remote-desktop",
45
+ "vnc",
46
+ "tailscale",
47
+ "ngrok",
48
+ "agent"
49
+ ],
50
+ "author": "elizaOS",
51
+ "license": "MIT",
52
+ "dependencies": {
53
+ "@elizaos/agent": "2.0.3-beta.2",
54
+ "@elizaos/core": "2.0.3-beta.2"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^25.0.3",
58
+ "typescript": "^6.0.3",
59
+ "vitest": "^4.0.0"
60
+ },
61
+ "scripts": {
62
+ "build": "bun run build.ts",
63
+ "dev": "bun --hot build.ts",
64
+ "clean": "rm -rf dist .turbo",
65
+ "test": "vitest run",
66
+ "typecheck": "tsgo --noEmit -p tsconfig.json --rootDir ../..",
67
+ "lint": "echo \"Lint skipped\"",
68
+ "lint:check": "bun run lint",
69
+ "check": "bun run typecheck && bun run test"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public"
73
+ },
74
+ "agentConfig": {
75
+ "pluginType": "elizaos:plugin:1.0.0",
76
+ "pluginParameters": {}
77
+ },
78
+ "eliza": {
79
+ "platforms": [
80
+ "node"
81
+ ],
82
+ "runtime": "node",
83
+ "platformDetails": {
84
+ "node": "Default export (Node.js)"
85
+ }
86
+ },
87
+ "gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
88
+ }