acp-runtime
The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run provider ACP sessions, but it should…
All paths are relative to `apps/emdash-desktop/`.
How it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
All paths are relative to `apps/emdash-desktop/`.
All paths are relative to `apps/emdash-desktop/`.
A feature slice's `api/` directory is its contract with other slices, nothing more:
aggregated by `src/core/manifests/browser/browser-contributions.ts`), never through `api/`
(enforced by the `emdash/no-tsx-in-api` lint rule; the shrink-only allowlist at repo-root `tooling/oxlint/allowlists/api-surfaces.json` is empty and must stay that way)
Modals are renderer-only feature contributions. They render as a stack, with only the top modal responding to outside presses and close commands.
store (`modal-store.ts` — active modal state and promise outcomes), and the close-guard hook (`use-close-guard.ts`)
`useModalController`
**Adding a modal:** 1. Create the component in its feature slice. Caller data is ordinary component props; completion uses `useModalController(id)`. 2. Define it with `defineModal<TResult>()({ id, component, ...chrome })`. 3. Add the definition to the owning slice's `modalDefs`. 4. Open it through the typed API and branch on the outcome:
const openMyModal = useOpenModal('myModal');
const outcome = await openMyModal({ projectId: '123' });
if (outcome.success) {
useResult(outcome.data);
}**Rules:**
passive or navigation dismissal
Views use a contributions + catalog + parameterized navigation pattern.
`layout`, and optional `historyKey`) and the React runtime bindings (`registerViewRuntime`, which binds slots such as `MainPanel`, `WrapView`, and `TitlebarSlot`)
`NavigationHistoryStore` (app-scoped), `getNavigation()` selectors, and React hooks (`useNavigate`, `useViewParams`, `useCurrentViewParams`); the renderer bootstrap seeds the catalog through `seedRendererNavigationHost()` before the app scope creates the stores
the per-project workspace chrome command store and exposes the layout-storage facade
**Key behaviors:**
(`taskViewDef({ projectId, taskId })`); the schema validates params at construction, and `safeRef()` is the boundary for untrusted values
optional can be called without an argument
`useCurrentViewParams(def)` also returns `setParams` for updating the active view's params
**Rules:**
entity (for example per task)
`src/core/manifests/browser/view-catalog.ts`
Workbench layout follows a strict ownership model (see `.scratch/workbench-state-architecture/spec.md` history for rationale):
(`sidebarCollapsed`, `sidebarTab`, `terminalDrawerOpen`) and workspace chrome (`leftSidebarOpen`, `zen`) are memento-backed state objects mutated only through named commands (`toggleSidebar`, `openSidebarTab`, `enterZenMode`, ...) — never through field setters. The shared mechanism is `defineChromeStore` in `src/core/primitives/chrome-stores/`.
writes.** Closed = unmounted. Collapsible surfaces bind through `useCollapsiblePanelBinding` from `@emdash/ui` (next to `Resizable`), which turns drag-below-threshold into a semantic close command. No `panel.collapse()` / `expand()` / `resize()` / `setLayout()` calls exist in app code, and no `display:none` toggling of workbench surfaces.
`useResizableDefaultLayout` with a memento-backed `LayoutStorage` facade (`createLayoutStorage` in `src/core/primitives/mementos/browser/`). Sizes are never MobX observables and never persisted to localStorage. The workspace outer layout is app-scoped because it belongs to the workbench shell; task-internal panel layouts are task-scoped.
`space.isHydrated`; the storage facade dev-asserts on reads b
Emdash is the Open-Source Agentic Development Environment (🧡 YC W26). Run multiple coding agents in parallel. Use any provider.
Repo: generalaction/emdash
The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run provider ACP sessions, but it should…
This page defines the target organization of `packages/core/src/`. Core is organized by module type so that shared domain APIs and their platform…
Git is split into a transport contract and a host-scoped runtime. Renderer, desktop, and workspace-server code share the Wire vocabulary without importing Git…
The main process is organized into domain modules under `src/main/core/`. Each domain typically has a `controller.ts` (RPC handlers) and service/implementation…
`@emdash/core/primitives/path/api` is the source of truth for portable file identity and lexical path operations. The detailed package docs live in…