Skip to content
Agent Workspaces
Agent

shared

The desktop app no longer has a `src/shared/` directory. Shared code has an explicit owner under `src/core/`:

From plugin
emdash
6.2k33 skills33 agents

Agent definition

shared.md

Shared Modules

The desktop app no longer has a `src/shared/` directory. Shared code has an explicit owner under `src/core/`:

  • `src/core/primitives/<domain>/api/` contains portable vocabulary, schemas, and pure helpers.
  • `src/core/features/<domain>/api/` contains feature Wire contracts.
  • `src/core/features/<domain>/node/` contains main-process Wire controllers and event hosts.
  • `src/core/features/<domain>/browser/` contains renderer stores, hooks, and UI.
  • `src/core/features/<domain>/contributions/` exposes view, modal, tab, subject, and memento

contributions.

  • `src/core/services/` owns reusable active capabilities.
  • `src/core/manifests/{shared,node,browser}/` are the application composition roots for portable

contracts, main-process registries, and renderer contributions.

Renderer-main traffic uses Wire. The desktop contract is assembled in `src/core/manifests/shared/desktop-wire-contract.ts`, served by `src/main/gateway/desktop-wire.ts`, and consumed through per-slice typed domain clients built on the seeded connection seam in `src/core/primitives/wire/browser/connection.ts` (the renderer bootstrap seeds the connection once via `src/renderer/lib/runtime/seed-desktop-wire.ts`). The shared manifest imports only slice API contracts. A drift test compares its keys and contract references with the lazy Node controller registry in `src/core/manifests/node/controllers.ts`.

Package Resolution

Workspace packages are consumed exclusively through their `package.json` `exports` maps. Every `packages/*` package exposes a `development` condition pointing at `src/`; `dist` stays the default, so dev and packaged builds resolve differently by design. `tsconfig.base.json` sets `customConditions: ["development"]` so TypeScript follows the same resolution. There are no `@emdash/*` path aliases in any tsconfig or Vite config.

Within `packages/core`, internal imports use `#`-prefixed subpath imports declared in its `package.json` `imports` map (`#runtimes/*`, `#services/*`, `#primitives/*`).

App-internal aliases (`@/*`, `@core/*`, `@renderer/*`, `@main/*`, `@root/*`, `@tooling/*`) are defined in `apps/emdash-desktop/tsconfig.json` and mirrored in its `electron.vite.config.ts`.

Provider Metadata Rules

When adding a provider:

1. add or update its plugin in `packages/plugins/src/agents/impl/` and register it in `packages/plugins/src/agents/registry.ts` 2. add any required env passthrough in the provider's plugin definition (`packages/plugins/src/agents/impl/`); PTY env construction lives in `packages/core/src/services/pty/api/terminal-env.ts` 3. add or update hook/plugin installation and parsing in provider plugin behavior if the provider supports explicit events; the TUI runtime installs and hosts hooks 4. update renderer surfaces that consume agent metadata through their slice domain clients 5. add tests for non-standard spawn or detection behavior

Read more
@generalaction
Ships withemdash

Emdash is the Open-Source Agentic Development Environment (🧡 YC W26). Run multiple coding agents in parallel. Use any provider.

Stars on GitHub

Momentum

stars in total
6.2k
Star history of generalaction/emdash on GitHub, a chart by star-history.com

Other agents on emdash.

acp-runtime

acp-runtime

Agent

The ACP runtime is the domain service that serves the ACP API contract. It owns the host-scoped dependencies needed to run…

core-modules

core-modules

Agent

This page defines the target organization of `packages/core/src/`. Core is organized by module type so that shared domain APIs…

git-runtime

git-runtime

Agent

Git is split into a transport contract and a host-scoped runtime. Renderer, desktop, and workspace-server code share the Wire…

main-process

main-process

Agent

The main process is organized into domain modules under `src/main/core/`. Each domain typically has a `controller.ts` (RPC…

path-system

path-system

Agent

`@emdash/core/primitives/path/api` is the source of truth for portable file identity and lexical path operations. The detailed…

More agents from other plugins.

api-builder

api-builder

Agent

Deprecated placeholder. Do not use; follow root AGENTS.md and package instructions instead.

happier3d2.2k
@happier-dev@happier-devInstall Agent

Questions about shared.

Which coding agents can use shared?
shared installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.