acp-runtime
AgentThe ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run…
The index of every first-class developer flow, one blessed command each. Conventions that apply throughout:
The index of every first-class developer flow, one blessed command each. Conventions that apply throughout:
`db:setup`, `run:docker-ssh`) no longer exist.
flows from `apps/emdash-desktop/`, package-local flows from that package.
prerequisite, the check for it is `pnpm run doctor` (root) — report-only, every failing line names the fixing command.
orchestration (app-only dev, Storybook) start with `tooling/scripts/ensure-packages-built.mjs`, which builds the workspace packages through Nx and no-ops when the flow is already running as an Nx task. Both orderings are verified to work on a fresh clone that never built anything; warm re-runs are Nx cache hits and cost about a second.
| Flow | Command | Where | | --- | --- | --- | | Bootstrap | `pnpm install` | root | | Environment health | `pnpm run doctor` | root |
`pnpm install` is the whole setup: any pnpm on PATH provisions the pinned pnpm and Node itself (see [quickstart](../quickstart.md)), installs dependencies, builds the isolated system-Node better-sqlite3 side project, and rebuilds the app's better-sqlite3 for the Electron ABI. Playwright browsers for the app's browser test project are the one extra step, only needed for tests: `pnpm exec playwright install` (the doctor checks it).
| Flow | Command | Where | | --- | --- | --- | | Full workspace dev | `pnpm run dev` | root | | App-only dev | `pnpm run dev` | `apps/emdash-desktop/` | | App dev, verbose Vite logs | `pnpm run dev:debug` | `apps/emdash-desktop/` | | Main-only / renderer-only watch | `pnpm run dev:main` / `pnpm run dev:renderer` | `apps/emdash-desktop/` | | One package in isolation | `pnpm run dev` | that `packages/*` dir | | Storybook (ui) | `pnpm --filter @emdash/ui run storybook` (port 6006) | root | | Storybook (chat-ui) | `pnpm --filter @emdash/chat-ui run storybook` (port 6007) | root | | Theme codegen | `pnpm run build:theme` / `pnpm run watch:theme` | `packages/theme/` |
Notes:
`apps/emdash-desktop/.emdash-logs/emdash.log`.
watch flow is only for working on one package in isolation.
`pnpm exec nx daemon --stop` if task results ever look stale (the doctor reports a running daemon).
only when iterating on the token codegen itself.
| Flow | Command | Where | | --- | --- | --- | | Generate a migration | `pnpm run db:generate <schema>` | `apps/emdash-desktop/` | | Regenerate fixture DBs | `pnpm run db:fixtures` | `apps/emdash-desktop/` | | Validate migrations | `pnpm run test:migrations` | `apps/emdash-desktop/` | | Reset dev databases | `pnpm run db:reset` | `apps/emdash-desktop/` |
The `db:generate` dispatcher covers all five Drizzle schemas in the repo and prints the follow-up obligations (fixtures, migration tests) after generating:
| Schema | Owner | Migrations directory | | --- | --- | --- | | `app` | `apps/emdash-desktop` | `apps/emdash-desktop/drizzle/` | | `automations` | `packages/core` | `packages/core/src/runtimes/automations/node/persistence/migrations/` | | `conversations` | `packages/core` | `packages/core/src/runtimes/conversations/node/persistence/migrations/` | | `file-search` | `packages/core` | `packages/core/src/runtimes/file-search/node/storage/migrations/` | | `workspace-registry` | `packages/core` | `packages/core/src/runtimes/workspace-registry/node/persistence/migrations/` |
`db:reset` honors `EMDASH_DB_FILE`: when set it deletes that database family (main file plus the derived `-file-search` / `-automations` / `-operations` siblings and SQLite `-wal`/`-shm` sidecars); otherwise it deletes the default dev databases in the platform user-data dir. Use `EMDASH_DB_FILE` isolation for schema work: `EMDASH_DB_FILE=/tmp/emdash-scratch.db pnpm run dev`.
| Flow | Command | Where | | --- | --- | --- | | Full merge gate | `pnpm run check` | root | | Individual gates | `pnpm run format` / `lint` / `typecheck` / `test` | root | | One package's tests | `pnpm test` | that app or package directory | | One package's tests from root | `pnpm --filter @emdash/plugins test` | root | | CI-style scoping | `pnpm run affected` | root | | One app Vitest project | `pnpm test -- --project <name>` | `apps/emdash-desktop/` | | Plugin tests in watch mode | `pnpm run test:watch` | `packages/plugins/` | | chat-ui perf / bench | `pnpm run test:perf` / `pnpm run test:bench` | `packages/chat-ui/` | | Remote WSS integration test | `pnpm run test:workspace-server-remote` | `apps/emdash-desktop/` |
equivalent to running them by hand.
prepare required builds automatically. Selecting a package does not run its dependencies' tests. Arguments after `test --`, such as a test-file path or `--project`, go to Vitest rather than Nx. Use pnpm's `--filter` before `test` to select packages.
`browser`. The browser project needs Playwright browsers — run the doctor.
and `test` via `nx affected`. The Playwright-backed `browser` projects (app and chat-ui) are skipped when Vitest detects CI until browser provisioning is proven stable there.
Emdash is the Open-Source Agentic Development Environment (🧡 YC W26). Run multiple coding agents in parallel. Use any provider.
The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run…
This page defines the target organization of `packages/core/src/`. Core is organized by module type so that shared domain APIs…
Git is split into a transport contract and a host-scoped runtime. Renderer, desktop, and workspace-server code share the Wire…
The main process is organized into domain modules under `src/main/core/`. Each domain typically has a `controller.ts` (RPC…
`@emdash/core/primitives/path/api` is the source of truth for portable file identity and lexical path operations. The detailed…
Validates project structure against co-location and architecture patterns defined in AGENTS.md
Deprecated placeholder. Do not use; follow root AGENTS.md and package instructions instead.
Use this agent when you need to create or update technical documentation that helps developers understand the deep patterns,…
Orchestration patterns learned from experience. Review at startup and before heartbeat responses.