feat: standalone server for running Pixel Agents outside VS Code#166
Open
MikaelDDavidd wants to merge 1 commit intopablodelucca:mainfrom
Open
feat: standalone server for running Pixel Agents outside VS Code#166MikaelDDavidd wants to merge 1 commit intopablodelucca:mainfrom
MikaelDDavidd wants to merge 1 commit intopablodelucca:mainfrom
Conversation
Adds a `standalone/` directory with a Node.js server that serves the Pixel Agents webview in any browser, detecting Claude Code sessions from any terminal (Warp, iTerm, Hyper, etc.) by scanning JSONL transcript files directly. - Express + WebSocket server on port 3333 - JSONL scanner with hybrid fs.watch + polling - WS adapter replacing VS Code postMessage API - Full asset loading (characters, furniture, floors, walls) - Auto-discovery of new Claude Code sessions every 5s - Layout shared with VS Code extension (~/.pixel-agents/layout.json)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
standalone/directory with a lightweight Node.js server that serves the Pixel Agents webview in any browser, making it work with Claude Code sessions running in any terminal (Warp, iTerm, Hyper, native Terminal, etc.) — not just VS Code's integrated terminal.Motivation
Many Claude Code users don't use VS Code as their primary editor. They use Warp, iTerm, or other terminals. Currently, Pixel Agents only works inside VS Code because it relies on
vscode.window.createTerminal()to detect agents.This standalone server solves that by scanning
~/.claude/projects/directly for active JSONL transcript files, regardless of which terminal created them.How it works
Server (
src/server.js): Express + WebSocket server on port 3333. Loads all assets (characters, furniture, floors, walls) from the installed VS Code extension's built files. Serves the existing React webview with an injected WebSocket adapter.Scanner (
src/scanner.js): Scans~/.claude/projects/every 5 seconds for JSONL files modified in the last 15 minutes. Parses Claude Code transcript events (tool_use,tool_result,turn_duration) and broadcasts agent activity to all connected browser clients via WebSocket.WS Adapter (
public/ws-adapter.js): ReplacesacquireVsCodeApi()with a WebSocket-based fake that routespostMessagecalls over WebSocket. The React app runs unmodified — it thinks it's inside VS Code.Usage
```bash
cd standalone
npm install
node build.js
node dist/server.js
Open http://localhost:3333
```
Features
Test plan