Wand-Enhancer Remote Panel Bridge IPC Channels: Complete Technical Reference
The Wand-Enhancer remote panel bridge utilizes nine predefined IPC channels—including wand-remote-command, wand-remote-game-status, and wand-remote-sync—to facilitate bidirectional communication between the Electron main process, the web panel, and the Wand application runtime.
The remote panel bridge in Wand-Enhancer serves as the critical messaging layer that connects the Electron main process with the Wand application. According to the source code in k1tbyte/Wand-Enhancer, these IPC channels enable seamless synchronization of game states, command execution, and real-time updates without reintroducing duplicate logic or compromising the ASAR patch pipeline.
Complete List of IPC Channels in constants.ts
The channel definitions are centralized in web-panel/bridge/src/constants.ts at lines 13-21. These nine channels form the backbone of the bridge's messaging protocol:
wand-remote-set-handler-bind: Registers a handler that the bridge can invoke from the main process.wand-remote-command: Sends a command request from the bridge to the Wand runtime (e.g., launching a trainer).wand-remote-command-response: Returns the result of a command request back to the bridge.wand-remote-game-status: Publishes real-time game status updates including launch events, end events, and trainer changes.wand-remote-installed-apps: Synchronizes the list of installed games and applications for the "My Games" panel.wand-remote-url: Provides the local URL of the remote panel, used primarily for QR-code fallback generation.wand-remote-set-value: Updates a generic value in the bridge's state store.wand-remote-sync: Core synchronization channel that carries the full bridge state snapshot.wand-remote-value-changed: Emits a notification when a stored value changes in the bridge state.
Implementation Architecture
Channel Constants Declaration
In web-panel/bridge/src/constants.ts, the IPC channel names are exported as constants to ensure type safety across the bridge implementation. This centralization prevents string typos and provides a single source of truth for channel names used throughout the remote panel bridge.
Protocol Routing
The web-panel/bridge/src/protocol-router.ts file routes incoming IPC messages to their appropriate handlers based on the channel constants. This router ensures that game status updates reach the correct UI components and that command responses are dispatched to the originating request handlers.
Runtime Integration
The web-panel/bridge/src/runtime.ts file implements the bridge runtime that actively uses these IPC channels. The runtime manages the connection lifecycle, handles the wand-remote-sync state snapshots, and processes wand-remote-value-changed events to keep the web panel state consistent with the Wand application.
Payload Normalization
The web-panel/bridge/src/normalizers/ directory contains channel-specific normalizers that standardize payloads for complex channels. These normalizers ensure that data transmitted via wand-remote-game-status and wand-remote-installed-apps conforms to the expected schema before reaching the web panel UI.
Code Examples for IPC Communication
Sending Commands to the Wand Runtime
To execute actions such as launching a trainer, the bridge sends structured payloads via the wand-remote-command channel (referenced as IPC_CHANNELS.COMMAND_REQUEST in the constant exports):
import { IPC_CHANNELS } from '../constants';
import { sendIpcMessage } from '../utils';
// Build the command payload
const payload = {
type: 'launch-trainer',
gameId: '12345',
trainerId: '69482.vO',
};
// Dispatch via the command channel
sendIpcMessage(IPC_CHANNELS.COMMAND_REQUEST, payload);
Listening for Game Status Updates
Subscribe to real-time game state changes using the wand-remote-game-status channel (referenced as IPC_CHANNELS.GAME_STATUS):
import { IPC_CHANNELS } from '../constants';
import { onIpcMessage } from '../utils';
onIpcMessage(IPC_CHANNELS.GAME_STATUS, (status) => {
console.log('Game status changed:', status);
});
Synchronizing Installed Applications
Update the "My Games" panel by transmitting the installed apps list through the dedicated channel (referenced as IPC_CHANNELS.INSTALLED_APPS):
import { IPC_CHANNELS } from '../constants';
import { sendIpcMessage } from '../utils';
function syncInstalledApps(apps) {
sendIpcMessage(IPC_CHANNELS.INSTALLED_APPS, apps);
}
Summary
- The Wand-Enhancer remote panel bridge defines nine IPC channels in
web-panel/bridge/src/constants.ts(lines 13-21). - Channels like
wand-remote-commandandwand-remote-command-responsehandle request-response patterns for runtime operations. - State synchronization relies on
wand-remote-syncfor full snapshots andwand-remote-value-changedfor incremental updates. - The
web-panel/bridge/src/protocol-router.tsandruntime.tsfiles implement the routing and processing logic for these channels. - Payload normalization occurs in
web-panel/bridge/src/normalizers/to ensure data integrity across the IPC boundary.
Frequently Asked Questions
What is the purpose of the wand-remote-sync channel?
The wand-remote-sync channel serves as the core synchronization mechanism that transmits full bridge state snapshots from the Wand application to the web panel. This ensures the remote panel maintains an accurate representation of the current application state when establishing connections or recovering from disconnections.
How does the bridge handle command responses from the Wand runtime?
When the bridge sends a command via wand-remote-command, the Wand runtime processes the request and returns results through the wand-remote-command-response channel. The protocol-router.ts file routes these responses back to the appropriate callbacks or Promise resolvers in the bridge's runtime layer.
Where are the IPC channel names defined in the Wand-Enhancer repository?
All IPC channel constants are declared in web-panel/bridge/src/constants.ts between lines 13 and 21. This file exports the channel names as type-safe constants (such as IPC_CHANNELS.COMMAND_REQUEST) that map to the underlying string values (like wand-remote-command) and are imported by protocol-router.ts, runtime.ts, and various handler modules throughout the bridge implementation.
What is the difference between wand-remote-set-value and wand-remote-value-changed?
The wand-remote-set-value channel is used to write updates to the bridge's state store from external processes, while wand-remote-value-changed is the notification channel that broadcasts when values in the store have actually changed. This separation creates a clear distinction between write operations and state change events, preventing infinite update loops.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →