@ekanos/harness) is a local development environment that renders every surface of your integration—widgets, the marketplace tile, activation form, and triggers—in actual Ekanos chrome, without Supabase, authentication, or network traffic.
Key features
- Everything in one repo — at the root of an Ekanos repo,
ekanos devserves every integration and experience together; see Repo mode - An integration console — Overview, Connect, Operations, Events, Health, Run log and Preview tabs for each integration; see The integration console
- An experience view — Overview, Widgets, Pages, Workflows, Review queue and Run log for each experience; see The experience view
- Real chrome, no backend — widgets render in the actual Ekanos dashboard grid with real
Widget.*compound components and design tokens - Fixtures by default — HTTP exchanges recorded per variant (
default,empty,error) answer all requests; the network is refused - Live mode opt-in — switch the toolbar to Live API to send real requests to your vendor under your declared egress, with a real localhost OAuth loop for OAuth integrations. In a repo each integration chooses Live or Fixtures for itself
- Fixture variants — switch between happy path, empty state, and error from the toolbar; the widget subtree is rebuilt, so any widget that re-fetches gets the new recording
- Triggers surface — run webhooks and schedules locally, and (in live mode) the OAuth loop against your own developer app
- Actions surface — invoke your declared
actionshandlers from a widget’s Save button; runs in fixtures or live - No configuration required —
useIntegrationFetch()anduseActivationData()from@ekanos/sdk/hooksalready work; write fixtures and you’re done
Installation
A project created byekanos init already lists @ekanos/harness in its package.json. Install dependencies, then run:
ekanos dev checks that the harness and its peers (next, react, react-dom, tailwindcss, @tailwindcss/postcss) are installed, generates the shell under .ekanos/harness/, writes a starter harness.config.ts at your project root the first time (the only file you edit), and starts the dev server. The generated shell is rewritten on upgrade; your harness.config.ts is never touched after it is created.
Quick start
Set upharness.config.ts with one integration:
ekanos dev serves the harness at http://localhost:3100 by default (bound to loopback; --port and --host change that). Open it and you land on your integration’s console, with tabs for Overview, Connect, Operations, Events, Health, Run log and Preview. Your widgets, marketplace tile, activation form and triggers are in Preview.
Surfaces
Each integration has a console at/integrations/<slug>. The surfaces your integration renders live under its Preview tab, at /integrations/<slug>/preview:
- Widgets (
/preview/widgets) — your dashboard grid, rendered with realWidget.*components - Marketplace tile (
/preview/tile) — your marketplace card, in the catalogue grid (if declared) - Activation form (
/preview/activation) — the form users see when connecting your integration - Triggers (
/preview/triggers) — your declared webhooks, schedules, and OAuth (requiresdefinition)
/integrations/<slug>/preview/widgets/<widgetId>.
The old addresses redirect.
/<slug>, /<slug>/widgets,
/<slug>/widgets/<widgetId>, /<slug>/tile, /<slug>/activation and
/<slug>/triggers send you to the matching /integrations/<slug>/preview/...
address, with the query string kept. Older versions of these docs and of your
own notes still work.The toolbar
Where widgets render (an integration’s Preview › Widgets and an experience’s Widgets tab), the preview controls sit in a bar directly above the grid and stay in view while you scroll. On the marketplace tile, activation form and triggers they sit at the top of the page. Each control has an info button that says what it simulates:- Render state: the state the dashboard hands every widget (
active,loading,error,inactive,disabled) - Scenario: the fixture variant (
default,empty,error) - Data: Fixtures or Live API, in a single-integration project. In a repo the Data selector is gone: each integration picks for itself, see Repo mode
- Viewport (Mobile, Tablet, Desktop, Full) and Unhealthy, where widgets render
- A reset button that puts every control back to its default
How data flows
Fixtures mode (default)
- The toolbar’s Data dropdown is on Fixtures (the default)
globalThis.fetchis patched to intercept third-party and/api/…requests- Requests match against your
fixtureslist for the active variant - A matching fixture is returned; no request leaves the machine
- An unmatched request rejects with
NoRecordedResponseError, whose message includes the fixture line to paste
Live mode (opt-in)
- A
liveblock is declared on the integration entry - The toolbar’s Data dropdown is set to Live API
- Widgets’ own requests reach your real API
- Requests are checked against your definition’s
egressallowlist - The OAuth loop runs on localhost using client credentials from
.ekanos/local-secrets.json - One server-held context per integration holds tokens and storage for the life of the dev server
Staying up to date
The line at the foot of every harness page names the harness and CLI versions you are running, the Ekanos host the harness reads and whether you are signed in. It says Up to date, or how many@ekanos/* packages are behind.
When something is behind, the home page shows a card with each package’s installed version and the one to move to. Copy prompt for your agent copies a prompt that updates a globally installed CLI, runs ekanos upgrade, reads the changelog between the two versions and checks the project still builds. The same commands are under Do it yourself. A version the host no longer accepts is marked Required.
The versions to be on come from the Ekanos host when you are signed in, and from npm otherwise. EKANOS_NO_UPDATE_CHECK=1 turns the check off; the footer then shows the installed versions only. Restart ekanos dev after an upgrade.
What’s in the bundle
Everything inharness.config.ts is compiled into the browser bundle, including triggerMocks.secrets. Keep mock values fake. The .ekanos/ directory (and its .next build output) is gitignored; never commit the generated build.