feat: integrate d-back browser runtime#9
Open
NNTin wants to merge 3 commits intofeat/plugin-system-for-runtime-extensibilityfrom
Open
feat: integrate d-back browser runtime#9NNTin wants to merge 3 commits intofeat/plugin-system-for-runtime-extensibilityfrom
NNTin wants to merge 3 commits intofeat/plugin-system-for-runtime-extensibilityfrom
Conversation
Adds DBackRuntime — a browser-side plugin that connects to a d-back WebSocket server (default: wss://hermes.nntin.xyz/dzone) and maps Discord users to pixel agents in real time. - src/dback/DBackRuntime.ts: WebSocket client that handles the d-back protocol (server-list → connect → server-join, presence, message). Each Discord user becomes a pixel agent; presence updates drive agent status; chat messages trigger short Write-tool animations. Reconnects automatically on disconnect. - main.tsx: starts DBackRuntime in browser mode alongside asset loading - .gitignore: ignore the cloned d-back/ directory The live d-back instance at wss://hermes.nntin.xyz/dzone (D-World server, id: dworld) is used by default. Override via VITE_DBACK_WS_URL / VITE_DBACK_SERVER env vars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks
Two bugs fixed: 1. existingAgents post-layout flush (useExtensionMessages.ts): The d-back WebSocket responds asynchronously, so existingAgents arrives after layoutLoaded has already been processed. Previously agents were buffered in pendingAgents and never flushed (no second layoutLoaded fires). Now: if layoutReadyRef.current is true, agents are added to OfficeState immediately instead of buffered. 2. Stop removing agents on 'offline' status (DBackRuntime.ts): The mock d-back server randomly cycles statuses including 'offline', which was immediately closing agents in the pixel office. For a live-demo runtime the 'offline' status is treated as idle — agents stay in the office and just wander. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
webview-ui/src/dback/DBackRuntime.ts): a browser-side WebSocket client that connects to a d-back server and maps Discord users to pixel agentsfeat/plugin-system-for-runtime-extensibility(this branch is rebased on top of it)How it works
wss://hermes.nntin.xyz/dzone, sends{ type: "connect", data: { server: "dworld" } }, receivesserver-joinwith the initial user listuid,username,status,roleColor) becomes a pixel agent dispatched viawindow.dispatchEvent— the same bus the VS Code extension usespresenceevents → agent status changes (dnd→ waiting bubble,offline→ agent removed)messageevents → short Write-tool animation (4 s) to simulate activityVITE_DBACK_WS_URL/VITE_DBACK_SERVERenv varsTest plan
cd webview-ui && npm run devand openhttp://localhost:5173in a browser — pixel agents should appear representing D-World Discord usersnpm run build)cd webview-ui && npm test)🤖 Generated with Claude Code