Getting started
This guide runs the repository's demo app inside Veya and reads it through MCP. The demo is the fastest way to see the whole loop; it contains planted defects that the signal rules are designed to find.
Requirements
- Node.js 26 or newer (
.nvmrcis26). - pnpm 12.23.0, the version pinned by
packageManager. - A desktop session capable of running Electron. Headless environments need extra setup and are not the default path.
- No published packages:
@veya/*are workspace packages in this repository.
Install
pnpm installThe install runs vp config --no-agent and downloads Electron. If the Electron binary cannot be reached, see Electron installation.
Start the demo and the environment
Use two terminals. The order does not matter: both product windows retry every second until the app under development is listening.
# terminal 1 — the app under development
pnpm dev:demo# terminal 2 — the Veya environment
pnpm devpnpm dev:demo serves the instrumented dashboard at http://127.0.0.1:5173. pnpm dev starts the Electron app, the hub on port 7317, the MCP endpoint and the console.
Wait for a line like this in the Veya terminal:
veya:ready {"hub":"http://127.0.0.1:7317","mcp":"http://127.0.0.1:7317/mcp"}Three windows open:
- Human product — the page under development in the default profile, loaded from
http://127.0.0.1:5173by default. - Agent product — the same page in a separate persistent profile (
persist:veya-agent). Agent actions default here. - Veya console — the session, timeline, components, agent context and signals, with a session picker.
Both product windows keep retrying until the demo is up; the Veya terminal logs veya:load-waiting periodically. Start pnpm dev:demo if the retries do not stop.
Connect an MCP client
Point any MCP client that supports Streamable HTTP at the running app:
{
"mcpServers": {
"veya": {
"url": "http://127.0.0.1:7317/mcp"
}
}
}Some clients spell the transport key differently, for example "type": "http". Use the client's documented form; the URL and the protocol are the constants.
The endpoint is local-only and has no authentication. Do not expose port 7317 to a network.
First queries
Ask for sessions:
{
"tool": "veya_sessions",
"arguments": {}
}Each session reports its mode. Without a sessionId, the tools use the newest agent session; pass the human session id to read or act on the human window.
Read the budgeted brief:
{
"tool": "veya_context",
"arguments": {}
}Pass the returned cursor as since on the next call to get only what changed. When you need the full tree, ask for the snapshot:
{
"tool": "veya_inspect",
"arguments": { "depth": 3 }
}Evaluate the signal rules, including a mobile layout probe:
{
"tool": "veya_signals",
"arguments": {
"viewport": { "width": 390, "height": 844 }
}
}Perform a click and verify the result by product behaviour:
{
"tool": "veya_perform",
"arguments": {
"steps": [
{ "kind": "click", "target": "project.create" },
{
"kind": "expect",
"expect": { "state": { "dashboard.dialogOpen": true } }
},
{ "kind": "click", "target": "dialog.confirm" },
{
"kind": "expect",
"expect": {
"events": ["network.request.completed", "state.changed"],
"state": { "dashboard.projectCount": 1 }
}
}
],
"timeoutMs": 5000
}
}veya_perform runs the steps in order and answers ok: true only when every expectation held. The first failing expectation stops the list and reports its stepIndex and missing checks. A click that lands is not a behaviour that worked.
Commands
| Command | What it does |
|---|---|
pnpm install | Install the workspace and Electron. |
pnpm dev:demo | Serve the instrumented demo on 127.0.0.1:5173. |
pnpm dev | Start the Electron environment, hub, MCP endpoint and console. |
pnpm check | Format, lint, type check, run unit tests and docs checks, then build the docs site. |
pnpm test | Run package tests plus the docs i18n check. |
pnpm test:e2e | Run the Electron acceptance suite. Separate from the docs path. |
pnpm docs:dev | Serve this documentation site on 127.0.0.1:5175. |
pnpm docs:build | Build the static documentation site. |
Environment variables
The desktop app reads these variables at startup. Defaults are suitable for local work.
| Variable | Default | Meaning |
|---|---|---|
VEYA_HUB_PORT | 7317 | Hub and MCP port. Update MCP client URLs when you change it. |
VEYA_TARGET | http://127.0.0.1:5173 | URL loaded in the human product window. |
VEYA_AGENT_TARGET | VEYA_TARGET | URL loaded in the agent product window. |
VEYA_HEADLESS | unset | 1 hides all windows and disables GPU acceleration. |
VEYA_WAIT_FOR_SESSION | unset | 1 waits for both human and agent sessions before ready. |
VEYA_READY_FILE | unset | Append the veya:ready line to this file. |
VEYA_RENDERER_URL | unset | Load the console from a URL instead of the built renderer. |
Verify the checkout
pnpm checkThis runs the formatter, linter, type checker, unit tests, the bilingual docs check and the documentation build. The Electron acceptance suite is separate:
pnpm test:e2eNext
- Instrument your app so Veya can see your components and state.
- Use the console to read a session as it happens.
- Connect an agent over MCP for the full tool reference.