@harnessa-fe/runtime
Browser runtime client for Harnessa-FE. Captures DOM/console/network events and executes commands from the MCP server in the user's real browser tab.
Auto-injected by the Vite plugin / Webpack plugin — you typically install it as a peer of the plugin.
Install
pnpm add -D @harnessa-fe/runtime
What it does
- Connects to the MCP server via WebSocket on dev page load
- Streams
console.*, fetch/XHR, window.error, unhandledrejection events
- Captures rrweb session recordings for replay
- Executes commands (
page.click, page.type, page.dom_query, etc.)
- Renders the annotation overlay (point-and-task)
Disabled automatically in production builds.
Manual usage (advanced)
For non-Vite/Webpack setups:
import { RuntimeClient } from '@harnessa-fe/runtime';
const client = new RuntimeClient({
projectId: 'my-app',
wsUrl: 'ws://localhost:47729',
});
client.start();
Docs
License
MIT