psinetron-opencode-visualizer 1.0.4 → 1.0.6
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 +53 -75
- package/index.ts +1 -1
- package/package.json +13 -2
- package/visualizer/person1/person1/rotations/east.png +0 -0
- package/visualizer/person1/person1/rotations/north-east.png +0 -0
- package/visualizer/person1/person1/rotations/north-west.png +0 -0
- package/visualizer/person1/person1/rotations/north.png +0 -0
- package/visualizer/person1/person1/rotations/south-east.png +0 -0
- package/visualizer/person1/person1/rotations/south-west.png +0 -0
- package/visualizer/person1/person1/rotations/south.png +0 -0
- package/visualizer/person1/person1/rotations/west.png +0 -0
- package/visualizer/person2/person2/rotations/east.png +0 -0
- package/visualizer/person2/person2/rotations/north-east.png +0 -0
- package/visualizer/person2/person2/rotations/north-west.png +0 -0
- package/visualizer/person2/person2/rotations/north.png +0 -0
- package/visualizer/person2/person2/rotations/south-east.png +0 -0
- package/visualizer/person2/person2/rotations/south-west.png +0 -0
- package/visualizer/person2/person2/rotations/south.png +0 -0
- package/visualizer/person2/person2/rotations/west.png +0 -0
- package/visualizer/person3/person3/rotations/east.png +0 -0
- package/visualizer/person3/person3/rotations/north-east.png +0 -0
- package/visualizer/person3/person3/rotations/north-west.png +0 -0
- package/visualizer/person3/person3/rotations/north.png +0 -0
- package/visualizer/person3/person3/rotations/south-east.png +0 -0
- package/visualizer/person3/person3/rotations/south-west.png +0 -0
- package/visualizer/person3/person3/rotations/south.png +0 -0
- package/visualizer/person3/person3/rotations/west.png +0 -0
- package/visualizer/person4/person4/rotations/east.png +0 -0
- package/visualizer/person4/person4/rotations/north-east.png +0 -0
- package/visualizer/person4/person4/rotations/north-west.png +0 -0
- package/visualizer/person4/person4/rotations/north.png +0 -0
- package/visualizer/person4/person4/rotations/south-east.png +0 -0
- package/visualizer/person4/person4/rotations/south-west.png +0 -0
- package/visualizer/person4/person4/rotations/south.png +0 -0
- package/visualizer/person4/person4/rotations/west.png +0 -0
- package/visualizer/person5/person5/rotations/east.png +0 -0
- package/visualizer/person5/person5/rotations/north-east.png +0 -0
- package/visualizer/person5/person5/rotations/north-west.png +0 -0
- package/visualizer/person5/person5/rotations/north.png +0 -0
- package/visualizer/person5/person5/rotations/south-east.png +0 -0
- package/visualizer/person5/person5/rotations/south-west.png +0 -0
- package/visualizer/person5/person5/rotations/south.png +0 -0
- package/visualizer/person5/person5/rotations/west.png +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fail
|
|
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
CHANGED
|
@@ -1,40 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 👾 psinetron-opencode-visualizer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/psinetron/opencode-visualiser/blob/main/LICENSE)
|
|
4
|
+
[](https://github.com/psinetron/opencode-visualiser/stargazers)
|
|
5
|
+
[](https://www.npmjs.com/package/psinetron-opencode-visualizer)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Turning raw OpenCode terminal logs into cozy 2D pixel office chaos.** Watch your agents work, idle, and celebrate success in a bustling virtual office.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
---
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- **12 animation states** — idle, walking, sitting, typing, drinking coffee, scratching head, yawning, error reactions, and more
|
|
11
|
-
- **Persistent office layout** — 5 desks, a coffee zone, and a rest area with Y-sorted rendering
|
|
12
|
-
- **Real-time WebSocket sync** — events stream from OpenCode sessions to the visualizer instantly
|
|
13
|
-
- **Cross-platform standalone window** — automatically opens in Chrome app mode on macOS, Windows, and Linux; falls back to default browser
|
|
11
|
+
## 🔥 Witness the Chaos
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
<img src="images/cover.png" width="100%" alt="OpenCode Visualizer" />
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
15
|
+
<!--
|
|
16
|
+
THIS IS THE MOST IMPORTANT PART FOR HYPE.
|
|
17
|
+
When you create your video-demo for X.com (MP4), convert it to a small GIF (e.g., using CapCut or online converters like ezgif) and place it here.
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
For example, uncomment the line below when you have a GIF in your repo:
|
|
20
|
+
|
|
21
|
+
<img src="visualizer-demo.gif" width="100%" alt="OpenCode Visualizer Demo" />
|
|
22
|
+
|
|
23
|
+
*Placeholder for the awesome video demo you are going to record. It should show the JSON logs in the terminal transforming into the pixel art office.*
|
|
24
|
+
-->
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## ✨ Features
|
|
29
|
+
|
|
30
|
+
- **Real-time Visualization:** Watch your OpenCode agents move around their office as they execute tools, search files, and write code.
|
|
31
|
+
- **Cozy Pixel Art Aesthetic:** A calming, gamified view of complex AI orchestration.
|
|
32
|
+
- **Mult-Agent Support:** Visualizes multiple agents (Explore, Scout, etc.) simultaneously in the same shared office space.
|
|
33
|
+
- **Customization (Skins):** Each agent has a custom skin saved in `.opencode/viz-skin.json`.
|
|
34
|
+
- **Unique Agent Animations:** Each of the 5 characters has its own set of unique idle, walk, work, and reaction animations.
|
|
35
|
+
- **Zero Friction Launch:** Pure Bun & TypeScript. Launches a cross-platform, isolated Chrome "app" window using native OS calls. No heavy Electron needed.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 🚀 Installation
|
|
40
|
+
|
|
41
|
+
*Note: Requires [Bun](https://bun.sh) to be installed.*
|
|
22
42
|
|
|
23
43
|
### Via OpenCode UI (recommended)
|
|
24
44
|
|
|
25
|
-
1. Press `
|
|
45
|
+
1. Press `Control+P` (`Ctrl+P` on Windows/Linux) to open the command palette
|
|
26
46
|
2. Select **Install plugin**
|
|
27
|
-
3. Enter the package name: `
|
|
47
|
+
3. Enter the package name: `psinetron-opencode-visualizer`
|
|
28
48
|
|
|
29
49
|
OpenCode will install the plugin and automatically add it to your project's `opencode.json`.
|
|
30
50
|
|
|
31
51
|
### Manual configuration
|
|
32
52
|
|
|
33
|
-
Add the plugin to your OpenCode config (`opencode.json`
|
|
53
|
+
Add the plugin to your OpenCode config (`opencode.json`):
|
|
34
54
|
|
|
35
55
|
```json
|
|
36
56
|
{
|
|
37
|
-
"plugin": ["
|
|
57
|
+
"plugin": ["psinetron-opencode-visualizer"]
|
|
38
58
|
}
|
|
39
59
|
```
|
|
40
60
|
|
|
@@ -46,68 +66,26 @@ Or install from a local path:
|
|
|
46
66
|
}
|
|
47
67
|
```
|
|
48
68
|
|
|
49
|
-
## How It Works
|
|
50
69
|
|
|
51
|
-
```
|
|
52
|
-
OpenCode session
|
|
53
|
-
│ event hook
|
|
54
|
-
▼
|
|
55
|
-
Plugin (index.ts) ─── WebSocket ───► Bun Server (port 5173)
|
|
56
|
-
│ broadcast
|
|
57
|
-
▼
|
|
58
|
-
Frontend (Canvas, 1024×768)
|
|
59
|
-
Pixel-art office with animated agents
|
|
60
|
-
```
|
|
61
70
|
|
|
62
|
-
|
|
63
|
-
2. It opens the visualizer in a Chrome app window (or your default browser)
|
|
64
|
-
3. OpenCode session events stream through WebSocket to the visualizer
|
|
65
|
-
4. The canvas renders agents navigating the office, sitting at desks, and animating in real time
|
|
71
|
+
---
|
|
66
72
|
|
|
67
|
-
##
|
|
73
|
+
## 🎨 Customization (Skins)
|
|
68
74
|
|
|
69
|
-
|
|
70
|
-
├── index.ts # Plugin entry point (server + WebSocket + Chrome launcher)
|
|
71
|
-
├── opencode.json # OpenCode plugin manifest
|
|
72
|
-
├── package.json # npm metadata
|
|
73
|
-
├── visualizer/
|
|
74
|
-
│ ├── index.html # SPA canvas app (all rendering logic in <script>)
|
|
75
|
-
│ ├── textures/ # Background, desk, and coffee table sprites
|
|
76
|
-
│ └── person1-5/ # Character sprites (8 rotation + 6-8 animation types each)
|
|
77
|
-
│ └── personN/
|
|
78
|
-
│ ├── rotations/ # Direction sprites (N, S, E, W, NE, NW, SE, SW)
|
|
79
|
-
│ └── animations/ # Frame-by-frame animation sprites (idle, walk, sit, work, coffee, scratch, yawn)
|
|
80
|
-
```
|
|
75
|
+
The plugin automatically assigns a random pixel art skin to each agent and saves it to `.opencode/viz-skin.json` in your project folder. You can manually edit this file to change skins.
|
|
81
76
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
| `drinking` | At the coffee zone |
|
|
92
|
-
| `scratching` | Idle desk animation — scratching head |
|
|
93
|
-
| `yawning` | Idle desk animation — yawning |
|
|
94
|
-
| `error` | Reacting to an error |
|
|
95
|
-
| `flash` | White flash on session diff |
|
|
96
|
-
| `idle_rest` | Standing in the rest area |
|
|
97
|
-
| `leaving` | Walking to the exit door |
|
|
98
|
-
|
|
99
|
-
## Development
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
# Run the plugin (requires OpenCode)
|
|
103
|
-
opencode
|
|
104
|
-
|
|
105
|
-
# The visualizer runs at http://localhost:5173
|
|
106
|
-
# Open it manually in any browser
|
|
107
|
-
```
|
|
77
|
+
Available skins: `person1`, `person2`, `person3`, `person4`, `person5`.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 💙 Support OpenCode
|
|
82
|
+
|
|
83
|
+
This plugin is built on top of [OpenCode](https://opencode.ai) — an open-source AI coding tool. If you find it useful, consider supporting the project by subscribing to **OpenCode GO**. Using the link below gives you **50% off** and helps fund continued development:
|
|
84
|
+
|
|
85
|
+
👉 [opencode.ai/go?ref=EZW07YHVTG](https://opencode.ai/go?ref=EZW07YHVTG)
|
|
108
86
|
|
|
109
|
-
|
|
87
|
+
---
|
|
110
88
|
|
|
111
|
-
## License
|
|
89
|
+
## 📜 License
|
|
112
90
|
|
|
113
|
-
MIT
|
|
91
|
+
MIT License. See LICENSE for more information. Built, not bought, by psinetron.
|
package/index.ts
CHANGED
|
@@ -39,7 +39,7 @@ function resolveSkin(cwd: string): string {
|
|
|
39
39
|
|
|
40
40
|
let ws: WebSocket | null = null
|
|
41
41
|
let reconnectTimer: ReturnType<typeof setTimeout> | null = null
|
|
42
|
-
const instanceId = `oc-${process.pid}-${Math.random().toString(36).
|
|
42
|
+
const instanceId = `oc-${process.pid}-${Math.random().toString(36).substring(2, 10)}`
|
|
43
43
|
|
|
44
44
|
function connectToServer(skin: string): Promise<void> {
|
|
45
45
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "psinetron-opencode-visualizer",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"description": "OpenCode session visualizer — real-time pixel-art office scene with animated agents",
|
|
6
6
|
"files": [
|
|
@@ -9,5 +9,16 @@
|
|
|
9
9
|
],
|
|
10
10
|
"keywords": ["opencode", "opencode-plugin", "visualizer", "monitor"],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"type": "module"
|
|
12
|
+
"type": "module",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@opencode-ai/plugin": ">=1.16.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^22.0.0",
|
|
18
|
+
"typescript": "^5.8.0"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/psinetron/opencode-visualiser.git"
|
|
23
|
+
}
|
|
13
24
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|