Skip to content

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 (.nvmrc is 26).
  • 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 ​

bash
pnpm install

The 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.

bash
# terminal 1 — the app under development
pnpm dev:demo
bash
# terminal 2 — the Veya environment
pnpm dev

pnpm 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:

text
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:5173 by 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:

json
{
  "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:

json
{
  "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:

json
{
  "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:

json
{
  "tool": "veya_inspect",
  "arguments": { "depth": 3 }
}

Evaluate the signal rules, including a mobile layout probe:

json
{
  "tool": "veya_signals",
  "arguments": {
    "viewport": { "width": 390, "height": 844 }
  }
}

Perform a click and verify the result by product behaviour:

json
{
  "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 ​

CommandWhat it does
pnpm installInstall the workspace and Electron.
pnpm dev:demoServe the instrumented demo on 127.0.0.1:5173.
pnpm devStart the Electron environment, hub, MCP endpoint and console.
pnpm checkFormat, lint, type check, run unit tests and docs checks, then build the docs site.
pnpm testRun package tests plus the docs i18n check.
pnpm test:e2eRun the Electron acceptance suite. Separate from the docs path.
pnpm docs:devServe this documentation site on 127.0.0.1:5175.
pnpm docs:buildBuild the static documentation site.

Environment variables ​

The desktop app reads these variables at startup. Defaults are suitable for local work.

VariableDefaultMeaning
VEYA_HUB_PORT7317Hub and MCP port. Update MCP client URLs when you change it.
VEYA_TARGEThttp://127.0.0.1:5173URL loaded in the human product window.
VEYA_AGENT_TARGETVEYA_TARGETURL loaded in the agent product window.
VEYA_HEADLESSunset1 hides all windows and disables GPU acceleration.
VEYA_WAIT_FOR_SESSIONunset1 waits for both human and agent sessions before ready.
VEYA_READY_FILEunsetAppend the veya:ready line to this file.
VEYA_RENDERER_URLunsetLoad the console from a URL instead of the built renderer.

Verify the checkout ​

bash
pnpm check

This runs the formatter, linter, type checker, unit tests, the bilingual docs check and the documentation build. The Electron acceptance suite is separate:

bash
pnpm test:e2e

Next ​

Released under the Apache-2.0 License.