@harnessa-fe/runtime
v3.0.0
Published
Browser-side SDK injected into the dev page. Connects to the MCP server via WebSocket and executes commands.
Readme
@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/runtimeWhat it does
- Connects to the MCP server via WebSocket on dev page load
- Streams
console.*,fetch/XHR,window.error,unhandledrejectionevents - 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
