@elizaos/plugin-companion 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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -0
  3. package/package.json +102 -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-companion
2
+
3
+ Companion overlay plugin for elizaOS. Adds a 3D VRM avatar to an Eliza agent, with animated emotes, a chat overlay, and performance controls — rendered in a Three.js scene directly on the agent surface.
4
+
5
+ ## What it does
6
+
7
+ - Renders a VRM (Virtual Reality Model) avatar in a 3D Three.js scene on the agent's companion surface.
8
+ - Enables the agent to play named emote animations via the `PLAY_EMOTE` action (wave, dance, cry, salute, and ~35 others).
9
+ - Provides three view surfaces: standard overlay, XR overlay, and a terminal (TUI) view.
10
+ - Bridges live agent state (chat messages, agent status, active coding sessions, triggers/heartbeats) into in-scene overlays rendered above the avatar.
11
+ - Ships a full emote catalog (`EMOTE_CATALOG`) of GLB and Mixamo FBX animations, all served as gzip-compressed assets.
12
+
13
+ ## Capabilities added to the agent
14
+
15
+ ### `PLAY_EMOTE` action
16
+
17
+ The agent can call this action to play a one-shot emote on the VRM avatar. It is silent — it does not generate chat text — and is intended to run alongside speech or reply actions.
18
+
19
+ Valid emote IDs (sample):
20
+
21
+ | ID | Description |
22
+ |----|-------------|
23
+ | `wave` | Waves both hands in greeting |
24
+ | `dance-happy` | Happy dance (loops) |
25
+ | `gangnam-style` | Gangnam style dance (loops) |
26
+ | `crying` | Cries sadly (loops) |
27
+ | `angry` | Expresses anger |
28
+ | `thinking` | Hand-to-chin thinking (loops) |
29
+ | `salute` | Sharp salute |
30
+ | `joyful-jump` | Jumps for joy |
31
+
32
+ Full catalog: `src/emotes/catalog.ts` — `AGENT_EMOTE_CATALOG` lists all IDs the agent can use.
33
+
34
+ ## Required configuration
35
+
36
+ No env vars are required for basic use. Optional:
37
+
38
+ | Variable | Default | Description |
39
+ |----------|---------|-------------|
40
+ | `API_PORT` | `2138` | Port of the agent dashboard API server for emote delivery |
41
+ | `SERVER_PORT` | `2138` | Fallback if `API_PORT` is not set |
42
+
43
+ To disable emote playback for a specific character, set `character.settings.DISABLE_EMOTES` to any truthy value in the character configuration.
44
+
45
+ ## How to enable
46
+
47
+ Add `@elizaos/plugin-companion` to the agent's plugin list. The plugin is session-gated — it only activates when the agent session is scoped to the companion app context.
48
+
49
+ ```ts
50
+ import { appCompanionPlugin } from "@elizaos/plugin-companion";
51
+
52
+ // In your agent character/plugin config:
53
+ plugins: [appCompanionPlugin]
54
+ ```
55
+
56
+ Alternatively, to register the companion as an overlay app (for hosts that use the overlay app registry):
57
+
58
+ ```ts
59
+ import "@elizaos/plugin-companion/register"; // side-effect: calls registerCompanionApp()
60
+ // or explicitly:
61
+ import { registerCompanionApp } from "@elizaos/plugin-companion";
62
+ registerCompanionApp();
63
+ ```
64
+
65
+ ## Peer dependencies
66
+
67
+ Three.js, `@pixiv/three-vrm`, `react`, and `react-dom` must be installed by the host:
68
+
69
+ ```bash
70
+ bun add three @pixiv/three-vrm react react-dom
71
+ ```
72
+
73
+ ## Build
74
+
75
+ ```bash
76
+ bun run --cwd plugins/plugin-companion build # full build (JS + views bundle + types)
77
+ bun run --cwd plugins/plugin-companion build:views # Vite bundle for companion view components
78
+ bun run --cwd plugins/plugin-companion typecheck
79
+ bun run --cwd plugins/plugin-companion test
80
+ ```
package/package.json ADDED
@@ -0,0 +1,102 @@
1
+ {
2
+ "name": "@elizaos/plugin-companion",
3
+ "version": "2.0.11-beta.7",
4
+ "type": "module",
5
+ "description": "Companion app package with the VRM scene runtime and avatar utilities.",
6
+ "main": "./dist/index.js",
7
+ "scripts": {
8
+ "typecheck": "tsc --noEmit -p tsconfig.json",
9
+ "lint": "bunx @biomejs/biome check src/",
10
+ "test": "bunx vitest run --config ./vitest.config.ts",
11
+ "storybook": "storybook dev -p 6007",
12
+ "build-storybook": "storybook build",
13
+ "build": "bun run build:js && bun run build:views && bun run build:types",
14
+ "clean": "rm -rf dist",
15
+ "build:js": "tsup --config ../tsup.plugin-packages.shared.ts",
16
+ "build:views": "bunx --bun vite build --config vite.config.views.ts",
17
+ "build:types": "tsc --noCheck -p tsconfig.build.json"
18
+ },
19
+ "exports": {
20
+ "./package.json": "./package.json",
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "eliza-source": {
24
+ "types": "./src/index.ts",
25
+ "import": "./src/index.ts",
26
+ "default": "./src/index.ts"
27
+ },
28
+ "import": "./dist/index.js",
29
+ "default": "./dist/index.js"
30
+ },
31
+ "./plugin": {
32
+ "types": "./dist/plugin.d.ts",
33
+ "import": "./dist/plugin.js",
34
+ "default": "./dist/plugin.js"
35
+ },
36
+ "./*.css": "./dist/*.css",
37
+ "./*": {
38
+ "types": "./dist/*.d.ts",
39
+ "eliza-source": {
40
+ "types": "./src/*.ts",
41
+ "import": "./src/*.ts",
42
+ "default": "./src/*.ts"
43
+ },
44
+ "import": "./dist/*.js",
45
+ "default": "./dist/*.js"
46
+ }
47
+ },
48
+ "dependencies": {
49
+ "@elizaos/agent": "2.0.11-beta.7",
50
+ "@elizaos/app-core": "2.0.11-beta.7",
51
+ "@elizaos/core": "2.0.11-beta.7",
52
+ "@elizaos/plugin-wallet-ui": "2.0.11-beta.7",
53
+ "@elizaos/shared": "2.0.11-beta.7",
54
+ "@elizaos/ui": "2.0.11-beta.7",
55
+ "lucide-react": "^1.0.0"
56
+ },
57
+ "devDependencies": {
58
+ "@biomejs/biome": "^2.4.14",
59
+ "@pixiv/three-vrm": "^3.5.2",
60
+ "@playwright/test": "^1.58.2",
61
+ "@storybook/addon-a11y": "^10.0.0",
62
+ "@storybook/addon-docs": "^10.0.0",
63
+ "@storybook/addon-themes": "^10.0.0",
64
+ "@storybook/react": "^10.0.0",
65
+ "@storybook/react-vite": "^10.0.0",
66
+ "@types/node": "^25.0.6",
67
+ "@types/react": "^19.0.0",
68
+ "@types/react-dom": "^19.0.0",
69
+ "@types/three": "^0.184.0",
70
+ "dotenv": "^17.2.3",
71
+ "jsdom": "^29.0.0",
72
+ "react": "^19.0.0",
73
+ "react-dom": "^19.0.0",
74
+ "storybook": "^10.0.0",
75
+ "three": "^0.184.0",
76
+ "tsup": "^8.5.1",
77
+ "typescript": "^6.0.3",
78
+ "vite": "^8.0.0",
79
+ "vitest": "^4.0.17"
80
+ },
81
+ "peerDependencies": {
82
+ "@pixiv/three-vrm": "^3.4.5",
83
+ "react": "^19.0.0",
84
+ "react-dom": "^19.0.0",
85
+ "three": "^0.184.0"
86
+ },
87
+ "elizaos": {
88
+ "app": {
89
+ "displayName": "Eliza Companion",
90
+ "category": "game",
91
+ "heroImage": "assets/hero.png"
92
+ }
93
+ },
94
+ "publishConfig": {
95
+ "access": "public"
96
+ },
97
+ "types": "./dist/index.d.ts",
98
+ "files": [
99
+ "dist"
100
+ ],
101
+ "gitHead": "cdbc876f793d96073d7eb0d09715a031ce0cd32e"
102
+ }