@harnessa-fe/vite
v1.0.0
Published
Vite plugin for Harnessa-FE: source-aware transforms, runtime injection, and MCP bridge.
Readme
@harnessa-fe/vite
Vite plugin for Harnessa-FE — the frontend harness for AI agents.
Source-aware transform + runtime injection + MCP bridge for Vite projects. Tags every JSX element with data-morphix-loc / data-morphix-comp so AI agents can map any UI element back to a file:line:column.
Install
pnpm add -D @harnessa-fe/vite @harnessa-fe/runtimeUsage
// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { harnessaFE } from '@harnessa-fe/vite';
export default defineConfig({
plugins: [react(), harnessaFE()],
});The plugin auto-disables in production builds — zero overhead in your shipped bundle.
Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| include | FilterPattern | /\.(jsx?\|tsx?\|vue)$/ | Files to transform |
| exclude | FilterPattern | /node_modules/ | Files to skip |
| wsPort | number | 47729 | MCP server WebSocket port |
Docs
- Root README — quick start, all packages
- Architecture — how the layers fit together
License
MIT
