# @sanity/workbench

Workbench component for the Sanity Content Operating System. Provides the domain model, system state machines, and framework-agnostic host entry point for rendering the workbench shell.

## Structure

```
src/
  core/        → Domain types: projects, organisations, applications, canvases, media libraries, config, logging
  dashboard/   → Typed URL builders for Workbench destinations, exported from the root
  system/      → XState v5 machines: OS root, auth, telemetry, system preferences
  runtime/     → OS communication bus: typed in-process message bus (os), shared across the federation boundary
  _internal/   → Module Federation and OS internals
```

### Entry points

| Import path                   | Purpose                                                           |
| ----------------------------- | ----------------------------------------------------------------- |
| `@sanity/workbench`           | OS communication bus (`os`) and the typed URL builders (`urlFor`) |
| `@sanity/workbench/core`      | Shared domain layer — Zod schemas and branded types               |
| `@sanity/workbench/system`    | State machines that drive the workbench runtime                   |
| `@sanity/workbench/_internal` | Module Federation and OS internals                                |

## License

MIT
