A decentralised mesh of agent nodes, driven from a web app. Nodes find each other through Nostr relays, talk over WebRTC, and run coding agents (Claude Code, Codex, pi) in threads you can watch and steer from any of your devices. There is no central server: relays and STUN are interchangeable and yours to choose.
One repository, one npm install: an npm workspace with a single lockfile at the root. Libraries live in packages/, the things you run or ship in apps/. Each has its own package.json, tsconfig and README, and uses the others from the workspace ("@patisserie/core": "*").
| Folder | What it is | Depends on |
|---|---|---|
packages/core |
Keys, mesh records and authority (foldMesh), mesh-key rotation, the vault, WebRTC transport, JSON-RPC, the thread event model, the RPC Api. A dev relay for tests and local use. |
|
packages/meshd |
The node runtime: joins the mesh, serves RPC and event streams, runs harness sessions, bridges SSH, handles link requests, spawns child nodes. | core |
apps/orchestrator |
meshd that starts a child node per thread: in a container (Docker, or Apple’s containers on macOS) or as a plain process. Holds the compose stack and the smoke tests. |
core, meshd |
apps/node |
The image a spawned thread runs in (patisserie/node). Only a Dockerfile: it’s built from meshd’s bundle. |
meshd (its bundle) |
apps/web |
The Vue app: account, pairing, adoption, credentials, links, threads, chat. | core |
apps/desktop |
The Tauri app for macOS and Linux: the web app in the system’s webview, plus local environments (orchestrators on this computer, downloaded with only the agents picked), in the tray. | everything above |
Everything runs on Node (22.13 or later, Alpine included). meshd and the orchestrator are bundled with esbuild into single .mjs files (npm run build); the npm packages they leave out (WebRTC, the Claude CLI, Docker’s client) are installed beside the bundle for the platform it runs on. The images are built from those bundles.
Needs Node 22.13 or later. From the repository root:
npm install # every package, once
npm run build # meshd and orchestrator bundles, the web build
npm run check # typecheck everything, then run the tests
npm run desktop # the desktop app, built and running (needs Rust: see apps/desktop)
npm run dist # the desktop app, packaged for this platform (see apps/desktop)
npm run images # the orchestrator's and the thread's Docker images
Any package’s own scripts run from the root with -w, as in npm test -w @patisserie/meshd, or from its folder as before.
Needs git too; sshd and socat for the SSH bridge. In three terminals, from the root:
npm run relay # ws://localhost:7777, or use public relays
npm run web # create an account; copy its ID from Settings → Account
MESHD_ACCOUNT=npub1… MESHD_RELAYS=ws://localhost:7777 npm run meshd
meshd prints its fingerprint. In the app, Settings → Servers → Waiting to be adopted: check the fingerprint matches and adopt it. Without Docker, threads run directly on the node, in whatever folder you pick, so one meshd on your laptop is a general agent for the whole machine. For the Docker setup, see apps/orchestrator; for running servers from the desktop app, apps/desktop.
codex app-server) and pi (pi --mode rpc) are used from the PATH, or installed into the harness cache the first time a node starts. The app lists the models each server actually offers.CLAUDE_CODE_OAUTH_TOKEN or OPENAI_API_KEY, readable by your devices and no node. Saving pushes them to your servers, which hand them to the containers they start.ssh b.mesh. Draw them in Settings → Links. An agent can ask for one itself with meshd request-link <node> "<why>": inside its spawner’s own links it is granted at once, otherwise it waits in Settings for you.npm run check at the root typechecks every package and runs the tests (core, meshd and web have them). npm run smoke -w @patisserie/orchestrator tests the Docker stack end to end, and npm run smoke:local -w @patisserie/orchestrator -- host|docker|apple an orchestrator on this machine with each runtime.
These were the starting notes, kept for reference; the design doc supersedes them where they differ (adverts are signed rather than per-device encrypted, for one).
uPriv/uPub is the root identity; it authorizes devices and adopted servers.dPriv/dPub, signed by uPriv.sPub with uPriv.(server, device) pair derives a unique address from DH(sPriv, dPub).uPriv.sessionId, avoiding ambiguity and stale signaling races.