Codebase map
Clumsies is an active Bun, Swift, and Rust monorepo. Ownership follows runtime boundaries rather than language alone. The retired Zig client is preserved only as historical source under archive/zig-cli/; it is outside active builds, tests, packaging, and release artifacts.
| Path | Responsibility |
|---|---|
apps/macos/ | Native macOS product client built with AppKit and SwiftUI |
crates/server/ | deployable Rust authority service and PostgreSQL schema |
crates/daemon/ | resident macOS launchd daemon, local state and workers, Agent runtime proxies, native adapter installer, and XPC contracts |
packages/api-contract/ | Public, Admin, and daemon OpenAPI contracts |
packages/api-client/ | generated-type-backed TypeScript clients |
assets/adapters/ | host-specific integration assets |
archive/zig-cli/ | historical Zig CLI, MCP, TUI, and attestation source; not a supported runtime |
docs/ | VitePress public documentation |
Authority boundaries
crates/server owns authoritative organization and project memory, identity, authorization, Bundles, review lifecycle, and Commit history.
crates/daemon owns local drafts, queued operations, automatic synchronization, token refresh, retrieval, native Server transport, and both short-lived Agent proxy modes. A proxy validates and forwards typed requests to the resident process over XPC; it does not initialize daemon state. The crate is not an authority source.
apps/macos is the primary human product. It uses typed XPC requests and never persists Server credentials. Hub in this UI means organization-scoped shared memory; Local means project and local draft work.
The App bundle contains one signed clumsiesd. launchd runs it as the resident daemon, while supported Agent hosts run the same binary as mcp serve or _agent issue-run-event. Adapter manifests pin the bundled path and release identity so another checkout or stale helper cannot become the runtime.
Read in this order
- Read the OpenAPI files in
packages/api-contract/openapi. - Read
crates/server/src/http.rsandrepository.rsfor authority behavior. - Read
crates/daemon/src/lib.rsandipc.rsfor local synchronization. - Read
crates/daemon/src/main.rsandagent_runtime/for resident/proxy process boundaries. - Read
crates/daemon/src/agent_adapter.rsfor host installation and migration. - Read
apps/macos/Sources/Infrastructure/DaemonXPCClient.swiftfor daemon transport. - Read
apps/macos/Sources/Features/WorkspaceView.swiftfor product workflow composition.