How to work on Supaplane day-to-day.
mise install # installs node 22.23 + bun 1.3.14
bun install # installs all workspace depsBoth are pinned in mise.toml. Use mise run <task> for the convenience wrappers, or bun run <script> directly from the root.
# Full build (protocol → client → server-deps → server → web → desktop)
bun run build
# Just protocol + client (fast iteration on the wire types)
bun run build:client
# Watch a single package
bun run watch:serverbun run typecheckUses @typescript/native-preview (tsgo) for fast native type-checking.
bun run lint # oxlint
bun run lint:fix # auto-fix
bun run format # oxfmt write
bun run format:check # CI check (no write)Both are enforced on commit via lefthook (.lefthook.yml).
bun test # vitest across all workspaces
bun run knip # dead-code detection# Run the daemon in dev mode (auto-reload on src/ changes)
mise run dev:daemon
# Run the web renderer (Vite HMR on http://127.0.0.1:5179)
mise run dev:web
# Run the desktop shell (Electron + the running daemon)
mise run dev:desktop
# All three concurrently
mise run dev:allThe Vite dev server proxies /api and /ws to http://127.0.0.1:17687 (the daemon). The desktop shell expects the daemon to be running separately. Default ports avoid conflicts with Paseo (6767), Vite default (5173), Metro/Expo (8081, 19000), and other well-known dev tools.
- Make a change in a package (e.g.
packages/server/src/handshake.ts). bun run watch:serverfor type-check feedback.- Restart the daemon (
mise run dev:daemon) —--watchreloads on save. - Run tests in that package:
bun test --cwd packages/server. - Commit. Lefthook runs format + lint + typecheck on staged files.
mkdir packages/foo- Add
package.json(private,"type": "module"). - Add
tsconfig.jsonextending../../tsconfig.base.json, with references to the packages it depends on. - Add
tsconfig.typecheck.jsonwith"noEmit": true. - Add
src/index.tsas the entry. - Add
packages/footo the rootpackage.jsonworkspacesarray (auto-picked-up by Bun glob, but explicit is clearer). - Add
docs/<concern>.mddescribing the package.
- Create
packages/server/src/server/agent/providers/<id>/agent.tsimplementingAgentClient. - Register in
packages/server/src/server/agent/provider-registry.ts'sPROVIDER_CLIENT_FACTORIESmap. - Add the provider id to
BUILTIN_PROVIDER_IDSinpackages/protocol/src/provider-manifest.ts. - Declare default modes/models in
packages/protocol/src/provider-manifest.ts. - Add a
getDiagnostic()probe so the onboarding wizard can show status. - Document in
docs/providers.md.
AGENTS.md— operating manual for AI agentsdocs/architecture.mddocs/onboarding-relay.mddocs/providers.md