Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

build(web): move the website into the main repository

leepokaib19040a4401a
diff --cc AGENTS.md
index a5ffa64d,8bd0e390..f38bb600
--- a/AGENTS.md
+++ b/AGENTS.md
@@@ -1,59 -1,5 +1,59 @@@
-<!-- BEGIN:nextjs-agent-rules -->
-# This is NOT the Next.js you know
+# Repository Guidelines
-This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
-<!-- END:nextjs-agent-rules -->
+## Project Structure & Module Organization
+
+- `host/`: Rust daemon, ACP integration, SQLite storage, HTTP/SSE API, and terminal UI; unit tests live alongside modules in `src/`.
+- `kit/`: shared Swift package. `CodyncKit` contains models, clients, and design primitives; `CodyncUI` contains shared screens and stores. Tests and fixtures live in `kit/Tests/CodyncKitTests/`.
+- `apps/`: iOS, macOS, and Linux clients, plus `screen-macos` and `screen-linux` helpers. Apple assets live in each target’s `Resources/`; widgets live in `apps/ios/Widgets/`.
+- `cloud/`: Cloudflare accounts, encrypted relay, Durable Objects and D1; tests live in `cloud/test/`.
- - `relay/`: Cloudflare push worker and `test/`; `web/`: website git submodule; `packaging/`: distribution templates; `docs/`: architecture and naming guidance.
++- `relay/`: Cloudflare push worker and `test/`; `web/`: website (Next.js); `packaging/`: distribution templates; `docs/`: architecture and naming guidance.
+
+## Build, Test, and Development Commands
+
+Run from the repository root unless a command changes directories:
+
+- `xcodegen generate --spec apps/project.yml`: regenerate `apps/Codync.xcodeproj` after editing `apps/project.yml`; never edit `project.pbxproj` directly.
+- `xcodebuild build -project apps/Codync.xcodeproj -scheme macOS -configuration Debug`: build the Mac app. Use Xcode’s `iOS` scheme to run on a simulator or device.
+- `cd host && cargo build`: build the host; `cargo run -- serve` starts it in the foreground.
+- `cd host && cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test`: run host CI checks.
+- `cd kit && swift test`: run shared Swift tests.
+- `cd apps/linux && cargo test`: test Linux code; requires GTK 4, libadwaita and VTE GTK 4 development packages.
+- `cd cloud && npm ci && npm test && npm run typecheck`: validate the cloud service; see `docs/guides/cloudflare-testing.md` for integration checks.
+- `cd relay && npm ci && npm test && npm run typecheck`: install dependencies and validate the relay.
+
+## Installing a new build: kill the old one first
+
+Whenever you build and install/run a new build, stop the old copies so nothing stale keeps running (old host = old protocol, old app = old UI):
+- **Mac app**: quit every running Codync (including copies from Xcode DerivedData) before opening the new one: `osascript -e 'tell application id "com.pokai.Codync" to quit'; pkill -x Codync`, then `open build/dd/Build/Products/Debug/Codync.app`.
+- **Host**: the launchd agent `com.pokai.codync.host` runs `build/dd/.../Codync.app/Contents/MacOS/codync-host`; after rebuilding, restart it with `launchctl kickstart -k gui/$(id -u)/com.pokai.codync.host`, and kill any other `codync-host` still running from a different path (`pgrep -fl codync-host`). Test hosts you start yourself must be stopped when done.
+- **iPhone**: after `xcrun devicectl device install app …`, relaunch with `xcrun devicectl device process launch --terminate-existing --device <id> com.pokai.Codync.ios` so the old process doesn't linger.
+
+## Coding Style & Naming Conventions
+
+Use four-space indentation for Swift and Rust. Follow Swift 6 strict concurrency, SwiftUI, and structured `async/await`; avoid unchecked sendability. Rust uses edition 2024, rustfmt, and Clippy; avoid `unwrap()` outside tests.
+
+Name Swift files after their main `UpperCamelCase` type; use `snake_case.rs` and `kebab-case.ts`. Follow role suffixes such as `View`, `Row`, and `Store`. See `docs/architecture/file-structure.md` and `CLAUDE.md` for architectural conventions.
+
+- UI controls default to the shared custom components. Explicit exception: iOS BotListView and ThreadView use native navigation/toolbar items and automatic back navigation for system Liquid Glass, as specified in `docs/design/ui-conventions.md`. The macOS menu bar also uses native `MenuBarExtra(.menu)`, menus, pickers and toggles. Keep system authentication and widget containers native. Outside these exceptions, avoid: no `Menu`/`Picker`, `.switch` toggles, `Form`/`List` styling, `confirmationDialog`/`alert`, `ProgressView`, `.sheet`/`.popover`/`.fullScreenCover`, `.toolbar`/navigation bars, `TabView`, `ContentUnavailableView`. Use `kit/Sources/CodyncUI/Controls.swift` + `Chrome.swift` (`.codyncSheet`, `ModalHeader`, `ScreenHeader`, `TabBar`, `.codyncMenu`, `.codyncDialog`, `ToggleStyle.codync`). Every tap that shows/hides something animates (`Motion`). Anything with a background fill gets no border line.
+
+## Cross-platform UI changes
+
+- Any UI change in any client must include the corresponding updates to all other native clients and the TUI in the same change: shared SwiftUI (`kit/Sources/CodyncUI/`), iOS (`apps/ios/`), macOS (`apps/macos/`), Linux GTK (`apps/linux/src/`), and terminal UI (`host/src/tui/`). This applies in every direction; Linux and TUI changes must also be reflected in SwiftUI.
+- Keep shared features, actions, terminology, displayed information, and loading, empty, error, and permission states consistent. Adapt layout, controls, and input to each platform, including terminal keyboard interaction, while preserving the same user-facing behavior.
+- Inspect every client's corresponding implementation before finishing a UI task. Implement applicable changes together; do not silently defer another client. For a platform-only change or an unsupported capability, document which clients are unaffected and the concrete reason in the change summary.
+- Validate each affected client with its relevant build/tests and UI checks. Report any checks that could not run and why.
+
+## Testing Guidelines
+
+Use Swift Testing (`@Test`, `#expect`), Rust unit tests, and the relay’s Node assertion tests. Name tests after observable behavior. Add regression coverage for changed logic; no numeric coverage threshold is configured.
+
+## Commit & Pull Request Guidelines
+
+- Conventional Commits: `type(scope): subject`. Types: `feat`, `fix`, `refactor`, `perf`, `docs`, `test`, `build`, `ci`, `chore`. Scope is the area touched: `ios`, `macos`, `kit`, `host`, `linux`, `cloud`, `relay`, `web`, `docs`.
+- Subject: imperative mood ("add", not "added"), lowercase after the colon, no trailing period, at most 72 characters (aim for 50). Say what changes for the user, not which files moved.
+- Body (after a blank line, wrapped at 72 columns) when the change isn't obvious from the subject: what and why, not how. Bullets are fine.
+- One logical change per commit. Don't mix unrelated work, and stage only your own hunks when others have uncommitted changes in the tree.
+- Breaking changes: `!` after the type/scope, or a `BREAKING CHANGE:` footer.
+- English only; no `Co-Authored-By` or other AI attribution trailers (the commit-msg hook rejects them).
+
+PRs should explain behavior changes, link relevant issues, list validation performed, and include screenshots for UI changes. Update affected documentation in the same change.
diff --cc README.md
index d6117b1c,e215bc4c..14d50585
--- a/README.md
+++ b/README.md
@@@ -1,167 -1,36 +1,167 @@@
-This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
+<div align="center">
-## Getting Started
+<img src="apps/linux/data/com.pokai.Codync.svg" width="128" alt="Codync icon">
-First, run the development server:
+# Codync
+
+**The open-source, 1:1 alternative to Grok Bot and Muse.**<br>
+Your coding agents, as teammates you can message.
+
+[![App Store](https://img.shields.io/badge/App_Store-iOS-0D96F6?logo=apple&logoColor=white)](https://apps.apple.com/tw/app/codync/id6760984418?l=en-GB)
+[![Homebrew](https://img.shields.io/badge/Homebrew-codync-FBB040?logo=homebrew&logoColor=white)](https://github.com/leepokai/homebrew-codync)
+[![Release](https://img.shields.io/github/v/release/leepokai/Codync?color=black)](https://github.com/leepokai/Codync/releases/latest)
+[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
+<br>
+![iOS](https://img.shields.io/badge/iOS-18+-black?logo=apple)
+![macOS](https://img.shields.io/badge/macOS-14+-black?logo=apple)
+![Linux](https://img.shields.io/badge/Linux-x86__64%20%7C%20arm64-black?logo=linux&logoColor=white)
+![Rust](https://img.shields.io/badge/host-Rust-B7410E?logo=rust)
+![Swift](https://img.shields.io/badge/apps-SwiftUI-F05138?logo=swift&logoColor=white)
+
+<a href="https://youtu.be/awhZJPjJaPc"><img src="docs/screenshots/launch-film.jpg" width="760" alt="Watch the Codync launch film on YouTube (1:26)"></a>
+
+</div>
+
+Codync turns the coding agents on your computer — Claude Code, Codex, Cursor, Pi, OpenCode, Grok Build, Gemini, Copilot and ~40 more — into persistent *bots* you delegate to from your iPhone, Mac, Linux desktop or any terminal, the way you'd message a colleague. Pick who, say what, put the phone away. You get a notification when a bot finishes or needs your approval.
+
+> Why bots? On a phone, "find the right working session, then pick an environment" is too slow. With bots you already know who to hand the intent to: open the chat, type, done.
+
+## Why Codync
+
+- **Free and open source.** No subscription, no paid tier, MIT licensed. It runs on your computer with the agents and accounts you already have.
+- **Bring any coding agent.** Claude Code, Codex, Cursor, Gemini, Copilot, OpenCode, Pi, Grok Build and ~40 more — everything in the [ACP registry](https://agentclientprotocol.com/registry). Installed agents are found automatically, the rest are fetched on first use, and every bot picks its own. Mix them freely: a Claude bot can ask a Codex bot for a review.
+- **Many bots, one team.** Run as many bots as you like side by side, each with its own agent, project folder and approvals, all working at once. Put several in a **group chat** and they answer in turn, like a team channel; `@name` picks who replies. Start a **thread** on any message to branch off without cluttering the main chat.
+- **Built in Rust.** `codync-host` is one small, fast Rust binary for macOS and Linux (static on Linux, runs on any distro) that drives every agent, keeps the transcripts and serves every client.
+- **Native on every platform.** SwiftUI on iPhone and Mac, GTK 4 / libadwaita on Linux, and a terminal UI for SSH. No web views, no Electron.
+- **A 1:1 Grok Bot / Muse alternative.** Persistent named bots, group chats, reply threads, bots asking each other for help, approval cards, per-bot memory, remote screen, voice calls and "needs you / done" notifications — the same features, without being tied to one model or one subscription.
+- **Reach your computer from anywhere, free.** The hosted Cloudflare relay is included at no cost: no Tailscale, no VPN, no port forwarding. Traffic is end-to-end encrypted between your phone and your computer, so the relay only forwards ciphertext. Same Wi-Fi or Tailscale? The phone connects directly instead.
+- **Every computer, one app.** Sign in and your iPhone lists every computer on your account (Mac, Linux desktop, server or cloud VM); tap **Connect**, confirm a 6-digit code on that computer, and its bots show up next to the others. A new bot can live on any of them, and the Mac app reaches your SSH machines too. Each computer approves each device itself, so an account alone never unlocks a computer.
+- **Remote screen.** See and control your computer from the iPhone over WebRTC (hardware H.264), and let bots use the screen themselves through the built-in `computer` tool.
+- **Voice calls.** Talk to a bot hands-free from the iPhone and hear its replies read aloud.
+- **Private push.** Notification text is sealed to your phone's key, so the push relay never sees what your bots said.
+
+## Platforms
+
+| | Platform | App | Highlights |
+|---|---|---|---|
+| 📱 | **iPhone** | Native SwiftUI | Chat with bots, approvals, push notifications, Live Activity, widgets, remote screen, voice calls |
+| 💻 | **macOS** | Native SwiftUI, menu bar + window | Runs the host, chat window, usage in the menu bar, iPhone pairing |
+| 🐧 | **Linux** | Native GTK 4 / libadwaita | Runs the host (desktop or headless server), chat app |
+| ⌨️ | **Terminal** | `codync-host tui` | Message your bots from any terminal, over SSH too |
+
+The host (`codync-host`, Rust) runs on macOS and Linux; every client talks to it, so all your bots and chats are the same everywhere.
+
+## How it works
+
+```text
+Remote Apple client ⇄ encrypted channel (direct or Cloudflare cloud/) ⇄ codync-host ⇄ ACP agent
+Local / SSH client ⇄ loopback HTTP + SSE ⇄ codync-host
+Host notifications → APNs worker (relay/) → iPhone
+```
+
+- **Bots** have a name, a character avatar, standing instructions, an agent backend, a project folder and a permission policy. Each bot has **a persistent main chat and optional reply threads**; the agent sessions underneath are an implementation detail (resumed with `session/load`, restarted with *New session*).
+- **Group chats** hold several bots and you. Each message starts a short room turn: the bots you @-mention (or everyone) reply one at a time, each in its own session, and can react to each other, up to 3 rounds. See [group chats and threads](docs/features/groups-and-threads.md).
+- **Bots can ask each other for help.** Tell one “ask Reviewer to check these changes.” The built-in `team` MCP server lets it discover your other visible bots and wait for a reply. Requests appear in both chats; each recipient keeps its own agent, folder and approvals. Native subagents stay under the coding agent's control. See [bot collaboration](docs/features/bot-collaboration.md).
+- **The chat only shows what matters**: your messages, each turn's final reply, approval cards and notices. Every tool call, diff, plan and thought is one tap away in *Full conversation*. While a bot works, its row shows what it's doing right now.
+- **Agents are detected automatically**: the host hydrates PATH from your login shell (plus Homebrew, ~/.local/bin, nvm, bun, volta, asdf, mise, pnpm…), finds every harness you have installed, and prefers its native ACP mode. Anything else in the official [ACP registry](https://agentclientprotocol.com/registry) can be picked too — Codync fetches it on first use (npx, uvx or a checksummed binary).
+- **codync-host** (Rust, macOS + Linux) runs on your computer. It speaks the [Agent Client Protocol](https://agentclientprotocol.com) to each agent, keeps transcripts in SQLite, and serves the phone. Every change carries a global `rev`, so the phone reconnects with `since: rev` and never misses anything.
+- **Usage limits** come from your local installs, with no extra login: Claude via `claude -p /usage` (a local command, no model call) plus Claude Code's status line, Codex via `~/.codex/sessions`. The phone, widgets and menu bar only see percentages.
+- **Push** goes through a tiny relay that holds the APNs key. The phone trades its device token for an encrypted ticket; the host only ever holds tickets.
+
+UI patterns (roster, character avatars, approval cards, trace sheet, "needs you / done" notifications) follow Grok Bot.
+
+## Install
+
+**One line** (macOS or Linux):
```bash
-npm run dev
-# or
-yarn dev
-# or
-pnpm dev
-# or
-bun dev
+curl -fsSL https://raw.githubusercontent.com/leepokai/Codync/main/packaging/install.sh | sh
```
-Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
+On a Mac it installs the app (the host ships inside it); on Linux the host, plus the desktop app when a display is present. Add `sh -s -- --host-only` for servers and headless Macs. Re-run it to upgrade.
-You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
+**Mac** — [download codync-macos.dmg](https://github.com/leepokai/Codync/releases/latest/download/codync-macos.dmg) and drag it to Applications, or:
-This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
+```bash
+brew install --cask leepokai/codync/codync
+```
-## Learn More
+All three install the same signed, notarized app.
-To learn more about Next.js, take a look at the following resources:
+Open Codync: it sets up the host on first launch. **Open Codync** opens the full window; **Pair iPhone…** shows the QR code.
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+**Linux** — the host, plus the native GTK 4 / libadwaita app:
+
+```bash
+curl -fsSL https://raw.githubusercontent.com/leepokai/Codync/main/packaging/install.sh | sh
+# or: brew install leepokai/codync/codync-host
+codync-host install # systemd --user service
+codync-host pair # QR code in the terminal, or Settings in the app
+```
+
+The script also installs the desktop app (`codync`, with its `.desktop` file and icon) when you're in a graphical session; it needs GTK 4 and libadwaita. By hand: unpack `codync-linux-<arch>.tar.gz` from [Releases](https://github.com/leepokai/Codync/releases/latest) and run `bin/codync`.
+
+Building the Linux app yourself needs `libgtk-4-dev libadwaita-1-dev`: `cargo install --path apps/linux`.
+
+**Linux server / cloud VM** — the host runs headless on any distro (static binary, x86_64 + arm64). Setup, remote access and limitations: [docs/guides/linux-servers.md](docs/guides/linux-servers.md).
+
+**Remote access** works out of the box through the free Cloudflare relay, end-to-end encrypted; the phone switches to a direct connection on the same network or over Tailscale. Details: [remote relay](docs/reference/remote-relay.md).
+
+**Agents** — install and sign in to whichever you use; Codync finds them. Claude Code, Codex and Pi run through their ACP adapters (fetched by `npx`, so Node.js is needed for those).
+
+`codync-host install` also routes Claude Code's status line through `codync-host statusline` so live limits reach the host; an existing status line keeps working (it's wrapped, and restored on `uninstall`).
+
+## `codync-host`
+
+| Command | |
+|---|---|
+| `codync-host install` / `uninstall` | background service (launchd on macOS, systemd `--user` on Linux) |
+| `codync-host tui [--url … --token …]` | message your bots from a terminal (this computer by default; SSH-friendly) |
+| `codync-host pair [--json]` | pairing QR code / link |
+| `codync-host status` | installed? running? |
+| `codync-host serve [--port 19222]` | run in the foreground |
+| `codync-host statusline [-- <your command>]` | Claude Code status line command (wraps yours) |
+| `codync-host reset-token` | rotate the local loopback bearer token |
+| `codync-host cloud` | cloud enablement, URL and status |
+| `codync-host devices` | list/revoke authorized remote devices |
+| `codync-host access` | review device access requests |
+
+Data lives in `~/.codync`. The local bearer token authorizes loopback helpers and SSH-forwarded callers. Remote devices use individual keys and grants over the encrypted channel; revoke a lost device through device management rather than rotating the loopback token. Host methods and caller permissions live in `host/src/api/mod.rs`.
+
+## Repository
+
+| Path | |
+|---|---|
+| `host/` | `codync-host` — Rust daemon: ACP client, SQLite transcript, HTTP/SSE API, push, usage |
+| `kit/` | Swift package: `CodyncKit` (wire models, host client, theme, avatars) and `CodyncUI` (store + chat screens shared by iPhone and Mac) |
+| `apps/ios/` | iOS app: pairing, roster, push, Live Activity glue |
+| `apps/ios/Widgets/` | Bots, usage and per-provider usage widgets + bot Live Activity |
+| `apps/macos/` | Menu bar + native chat window; installs/monitors the host |
+| `apps/linux/` | Native Linux app (GTK 4 + libadwaita, Rust) |
+| `cloud/` | Cloudflare accounts, D1, encrypted channel relay and offline mailbox |
+| `apps/shared/` | Shared Apple account integration and environment configuration |
+| `apps/screen-macos/`, `apps/screen-linux/` | Platform screen capture/input helpers |
+| `docs/` | [Documentation index](docs/README.md) and [file structure](docs/architecture/file-structure.md) |
+| `relay/` | Cloudflare Worker APNs relay with encrypted per-device tickets |
- | `web/` | Website (git submodule) |
++| `web/` | Website (Next.js static export, deployed on Vercel) |
+| `packaging/` | Homebrew formula template and `install.sh` (the curl installer) |
+
+Build, install, restart and full checks: [development guide](docs/guides/development.md).
+
+The Xcode project is generated: `xcodegen generate --spec apps/project.yml`.
+
+```bash
+cd host && cargo test # host
+cd kit && swift test # shared Swift
+cd apps/linux && cargo test # Linux app (needs GTK dev packages)
+cd cloud && npm test # cloud API / channel relay
+cd relay && npm test # relay tickets
+```
-You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
+## Versioning
-## Deploy on Vercel
+The major version is the phone ↔ host protocol: apps work with hosts of the same major version.
-The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
+## License
-Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
+MIT
diff --cc docs/architecture/file-structure.md
index 02dd1017,00000000..4e7088fc
mode 100644,000000..100644
--- a/docs/architecture/file-structure.md
+++ b/docs/architecture/file-structure.md
@@@ -1,117 -1,0 +1,116 @@@
+# File structure and naming
+
+This is the map of the current repository. Paths below are repository-relative. Start with the [architecture overview](overview.md) for runtime relationships.
+
+## Top-level layout
+
+```text
+Codync/
+├── host/ # Rust daemon and terminal client
+│ ├── src/
+│ │ ├── main.rs # CLI entry, shared helpers (LockExt, http)
+│ │ ├── hub.rs, store.rs # Shared state + event fan-out / SQLite persistence
+│ │ ├── service.rs # Data dir, launchd/systemd install, keep-awake
+│ │ ├── usage.rs, screen.rs, mcp.rs
+│ │ ├── api/ # HTTP/SSE dispatch, caller permissions (devices.rs)
+│ │ ├── agent/ # ACP client, harness discovery, registry, sign-in, setup PTYs, bot actor
+│ │ ├── chat/ # Groups, bot-to-bot requests, prompt snapshots, memory
+│ │ ├── remote/ # Identity, wire crypto, E2E channel, cloud, relay socket, push
+│ │ ├── market/ # Marketplace, Composio, MCP OAuth
+│ │ └── tui/ # Terminal client (manage.rs + sheets.rs: settings; connections.rs: secure connection requests)
+│ └── tests/ # Host integration tests and scripted ACP agents
+├── kit/ # Shared Swift package
+│ ├── Sources/
+│ │ ├── CodyncKit/ # Wire models, transports, design; widget-safe
+│ │ │ ├── Client/
+│ │ │ ├── Models/
+│ │ │ ├── Design/
+│ │ │ └── Resources/
+│ │ └── CodyncUI/ # Stores, shared screens and custom controls
+│ │ ├── Store/
+│ │ ├── Bots/
+│ │ ├── Thread/
+│ │ ├── Call/
+│ │ ├── Screen/
+│ │ ├── Marketplace/
+│ │ ├── Usage/
+│ │ └── Resources/
+│ └── Tests/ # CodyncKitTests and CodyncUITests
+├── apps/
+│ ├── project.yml # XcodeGen source of truth for every Apple target
+│ ├── Codync.xcodeproj/ # Generated Xcode project
+│ ├── shared/ # AccountSession, ComputerStatus, Config/{dev,main}.plist
+│ ├── ios/ # App/, Views/, Resources/, Widgets/, NotificationService/
+│ ├── macos/ # App/, Views/, Resources/, LaunchAgents/
+│ ├── linux/ # GTK 4/libadwaita desktop client
+│ ├── screen-macos/ # macOS screen helper
+│ └── screen-linux/ # Linux portal/GStreamer screen helper
+├── cloud/ # Account API + encrypted relay Worker and Durable Object
+│ ├── src/
+│ ├── migrations/ # D1 migrations
+│ └── test/ # workerd tests; e2e/ runs against a real test host
+├── relay/ # Separate APNs push Worker; src/ and test/
+├── docs/ # Architecture, guides, reference, features, design, archive
+├── tools/ # Widget rendering utilities
+├── packaging/ # Distribution templates
+├── marketing/app-store-screenshots/ # App Store screenshot editor (bun dev; Export bundle → out/)
- ├── web/ # Website git submodule
++├── web/ # Website (Next.js static export)
+└── .github/workflows/ # CI, signing and release automation
+```
+
+`build/`, `kit/.build/`, Cargo `target/`, `node_modules/` and Wrangler local state are generated working data. They are not source modules and should not become documentation locations. Edit `apps/project.yml` and run `xcodegen generate --spec apps/project.yml`; never hand-edit `project.pbxproj`.
+
+## Where to make a change
+
+| Responsibility | Source entry points |
+|---|---|
+| CLI and background service | `host/src/main.rs`, `service.rs` |
+| API, caller permissions, event ordering | `host/src/api/`, `hub.rs` |
+| SQLite transcript, bots, lanes and sessions | `host/src/store.rs` |
+| Agent process, ACP, queue and session lifecycle | `host/src/agent/bot.rs`, `acp.rs` |
+| Group room turns / bot-to-bot requests | `host/src/chat/group.rs` / `team.rs` |
+| Prompt snapshots and memory keeper | `host/src/chat/context.rs`, `memory.rs` |
+| Identity, encryption and direct channel | `host/src/remote/identity.rs`, `crypto.rs`, `channel.rs` |
+| Host cloud state and relay connection | `host/src/remote/cloud.rs`, `relay.rs` |
+| Agent discovery, sign-in, setup terminal | `host/src/agent/backends.rs`, `registry.rs`, `auth.rs`, `term.rs` |
+| Marketplace, Composio, connector OAuth | `host/src/market/` |
+| Screen bridge and built-in MCP tools | `host/src/screen.rs`, `mcp.rs` |
+| Swift transport and cloud API | `kit/Sources/CodyncKit/Client/` |
+| Account aggregation / one host mirror | `kit/Sources/CodyncUI/Store/AccountStore.swift` / `BotStore.swift` |
+| Chat, replies, composer and trace | `kit/Sources/CodyncUI/Thread/` |
+| Reusable Apple UI chrome | `kit/Sources/CodyncUI/Chrome.swift`, `Controls.swift`, `Platform.swift` |
+| iOS navigation, pairing, account settings | `apps/ios/Views/RootView.swift`, `BotListView.swift`, `PairingView.swift`, `AccountSwitcherView.swift`, `SettingsView.swift` |
+| Apple account sessions / public environment config | `apps/shared/AccountSession.swift`, `apps/shared/Config/` |
+| Mac local host / SSH lifecycle | `apps/macos/App/HostController.swift`, `SSHTunnel.swift` |
+| Cloud routes / authentication / relay | `cloud/src/index.ts`, `api.ts`, `auth.ts`, `relay.ts` |
+| Push encryption / APNs delivery / decryption | `host/src/remote/push.rs`, `relay/src/`, `apps/ios/NotificationService/` |
+| Widget and activity rendering | `kit/Sources/CodyncKit/Design/`, `apps/ios/Widgets/` |
+
+## Dependency rules
+
+- `CodyncKit` owns serializable models, clients and rendering primitives shared with widgets. It must not import `CodyncUI` or ClerkKit.
+- `CodyncUI` owns observable stores and shared application screens. App-specific lifecycle, OAuth configuration and device hooks belong in `apps/`.
+- Each `BotStore` talks to one computer. `AccountStore` aggregates stores and routes by `BotReference`; bare bot IDs are not globally unique.
+- The host owns routing, reply counts, permissions and group turn scheduling. Clients render these results; they do not reimplement host policy.
+- `cloud/` transports encrypted chat traffic and manages account metadata. `relay/` delivers APNs pushes. The two Workers have separate configuration and tests.
- - `web/` is its own git repository; website changes require working in that submodule explicitly.
+
+## Names
+
+| Term | Meaning |
+|---|---|
+| bot | Named agent persona; a group is also a roster entry with `kind: group` |
+| agent / backend | Coding harness and its ACP adapter |
+| chat | Main, persistent conversation with a bot or group |
+| thread | Replies under a main-chat root message |
+| group | Chat with several bots and the user; no agent process of its own |
+| lane | `(chat, thread)` destination of a turn |
+| session | Harness-owned ACP model context; distinct from stored chat history |
+| trace | Full conversation, including intermediate/tool events |
+| computer / host | User-facing paired environment / the daemon that serves it |
+| cloud / relay | Account + E2E service / context-dependent transport or APNs Worker; always name the directory when ambiguous |
+
+Use lowercase repository folders; PascalCase folders inside Swift targets. Swift files follow their main type (`UpperCamelCase.swift`), Rust uses `snake_case.rs` (a folder module is `name/mod.rs`), and TypeScript uses `kebab-case.ts`. Prefer one main type per file; small related view siblings can share a plural file such as `ChatRows.swift`.
+
+Role suffixes: `View`, `Row`, `Card`, `Window`, `Store`, `Controller`; button styles describe the effect (`PressScale`). Keep feature vocabulary aligned across Swift, Rust, Linux and the terminal client.
+
+UI-specific rules, including the native iPhone toolbar exception, live in [UI conventions](../design/ui-conventions.md).
diff --cc web/.gitignore
index 00000000,00000000..5ef6a520
new file mode 100644
--- /dev/null
+++ b/web/.gitignore
@@@ -1,0 -1,0 +1,41 @@@
++# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
++
++# dependencies
++/node_modules
++/.pnp
++.pnp.*
++.yarn/*
++!.yarn/patches
++!.yarn/plugins
++!.yarn/releases
++!.yarn/versions
++
++# testing
++/coverage
++
++# next.js
++/.next/
++/out/
++
++# production
++/build
++
++# misc
++.DS_Store
++*.pem
++
++# debug
++npm-debug.log*
++yarn-debug.log*
++yarn-error.log*
++.pnpm-debug.log*
++
++# env files (can opt-in for committing if needed)
++.env*
++
++# vercel
++.vercel
++
++# typescript
++*.tsbuildinfo
++next-env.d.ts
diff --cc web/AGENTS.md
index 00000000,00000000..8bd0e390
new file mode 100644
--- /dev/null
+++ b/web/AGENTS.md
@@@ -1,0 -1,0 +1,5 @@@
++<!-- BEGIN:nextjs-agent-rules -->
++# This is NOT the Next.js you know
++
++This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` before writing any code. Heed deprecation notices.
++<!-- END:nextjs-agent-rules -->
diff --cc web/CLAUDE.md
index 00000000,00000000..43c994c2
new file mode 100644
--- /dev/null
+++ b/web/CLAUDE.md
@@@ -1,0 -1,0 +1,1 @@@
diff --cc web/README.md
index 00000000,00000000..e215bc4c
new file mode 100644
--- /dev/null
+++ b/web/README.md
@@@ -1,0 -1,0 +1,36 @@@
++This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
++
++## Getting Started
++
++First, run the development server:
++
++```bash
++npm run dev
++# or
++yarn dev
++# or
++pnpm dev
++# or
++bun dev
++```
++
++Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
++
++You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
++
++This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
++
++## Learn More
++
++To learn more about Next.js, take a look at the following resources:
++
++- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
++- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
++
++You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
++
++## Deploy on Vercel
++
++The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
++
++Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
diff --cc web/app/components/compare.tsx
index 00000000,cbea9ecb..cbea9ecb
mode 000000,100644..100644
--- a/web/app/components/compare.tsx
+++ b/web/app/components/compare.tsx
diff --cc web/app/components/copy-command.tsx
index 00000000,e4fcd786..e4fcd786
mode 000000,100644..100644
--- a/web/app/components/copy-command.tsx
+++ b/web/app/components/copy-command.tsx
diff --cc web/app/components/features.tsx
index 00000000,0a5deda0..0a5deda0
mode 000000,100644..100644
--- a/web/app/components/features.tsx
+++ b/web/app/components/features.tsx
diff --cc web/app/components/film.tsx
index 00000000,ee66c0ec..ee66c0ec
mode 000000,100644..100644
--- a/web/app/components/film.tsx
+++ b/web/app/components/film.tsx
diff --cc web/app/components/hero.tsx
index 00000000,81a97986..81a97986
mode 000000,100644..100644
--- a/web/app/components/hero.tsx
+++ b/web/app/components/hero.tsx
diff --cc web/app/components/install.tsx
index 00000000,eb89909b..eb89909b
mode 000000,100644..100644
--- a/web/app/components/install.tsx
+++ b/web/app/components/install.tsx
diff --cc web/app/components/mac.tsx
index 00000000,d51fc044..d51fc044
mode 000000,100644..100644
--- a/web/app/components/mac.tsx
+++ b/web/app/components/mac.tsx
diff --cc web/app/components/phone.tsx
index 00000000,a0b50473..a0b50473
mode 000000,100644..100644
--- a/web/app/components/phone.tsx
+++ b/web/app/components/phone.tsx
diff --cc web/app/components/privacy.tsx
index 00000000,3488fc05..3488fc05
mode 000000,100644..100644
--- a/web/app/components/privacy.tsx
+++ b/web/app/components/privacy.tsx
diff --cc web/app/components/reveal.tsx
index 00000000,129c2673..129c2673
mode 000000,100644..100644
--- a/web/app/components/reveal.tsx
+++ b/web/app/components/reveal.tsx
diff --cc web/app/components/surfaces.tsx
index 00000000,54b14277..54b14277
mode 000000,100644..100644
--- a/web/app/components/surfaces.tsx
+++ b/web/app/components/surfaces.tsx
diff --cc web/app/favicon.ico
index 00000000,24223f34..24223f34
mode 000000,100644..100644
Binary files differ
diff --cc web/app/globals.css
index 00000000,6c9c0542..6c9c0542
mode 000000,100644..100644
--- a/web/app/globals.css
+++ b/web/app/globals.css
diff --cc web/app/layout.tsx
index 00000000,de6fe7f6..de6fe7f6
mode 000000,100644..100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
diff --cc web/app/links.ts
index 00000000,3754218d..3754218d
mode 000000,100644..100644
--- a/web/app/links.ts
+++ b/web/app/links.ts
diff --cc web/app/opengraph-image.png
index 00000000,ca049a12..ca049a12
mode 000000,100644..100644
Binary files differ
diff --cc web/app/page.tsx
index 00000000,d01c3083..d01c3083
mode 000000,100644..100644
--- a/web/app/page.tsx
+++ b/web/app/page.tsx
diff --cc web/app/privacy/page.tsx
index 00000000,bc23de90..bc23de90
mode 000000,100644..100644
--- a/web/app/privacy/page.tsx
+++ b/web/app/privacy/page.tsx
diff --cc web/app/terms/page.tsx
index 00000000,5886da68..5886da68
mode 000000,100644..100644
--- a/web/app/terms/page.tsx
+++ b/web/app/terms/page.tsx
diff --cc web/app/twitter-image.png
index 00000000,ca049a12..ca049a12
mode 000000,100644..100644
Binary files differ
diff --cc web/eslint.config.mjs
index 00000000,05e726d1..05e726d1
mode 000000,100644..100644
--- a/web/eslint.config.mjs
+++ b/web/eslint.config.mjs
diff --cc web/next.config.ts
index 00000000,1c20344e..1c20344e
mode 000000,100644..100644
--- a/web/next.config.ts
+++ b/web/next.config.ts
diff --cc web/package-lock.json
index 00000000,0436422f..0436422f
mode 000000,100644..100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
diff --cc web/package.json
index 00000000,c05dcbd1..c05dcbd1
mode 000000,100644..100644
--- a/web/package.json
+++ b/web/package.json
diff --cc web/postcss.config.mjs
index 00000000,61e36849..61e36849
mode 000000,100644..100644
--- a/web/postcss.config.mjs
+++ b/web/postcss.config.mjs
diff --cc web/public/CNAME
index 00000000,94f303af..94f303af
mode 000000,100644..100644
--- a/web/public/CNAME
+++ b/web/public/CNAME
diff --cc web/public/apple-touch-icon.png
index 00000000,23507b04..23507b04
mode 000000,100644..100644
Binary files differ
diff --cc web/public/file.svg
index 00000000,004145cd..004145cd
mode 000000,100644..100644
--- a/web/public/file.svg
+++ b/web/public/file.svg
diff --cc web/public/globe.svg
index 00000000,567f17b0..567f17b0
mode 000000,100644..100644
--- a/web/public/globe.svg
+++ b/web/public/globe.svg
diff --cc web/public/icon.png
index 00000000,85b02cd7..85b02cd7
mode 000000,100644..100644
Binary files differ
diff --cc web/public/icon.svg
index 00000000,00000000..b0bc6aa6
new file mode 100644
--- /dev/null
+++ b/web/public/icon.svg
@@@ -1,0 -1,0 +1,1 @@@
++<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><rect width="256" height="256" rx="57.6" fill="#000"/><g fill="#fff"><circle cx="68.27" cy="48.36" r="7.17"/><circle cx="88.18" cy="48.36" r="7.17"/><circle cx="108.09" cy="48.36" r="7.17"/><circle cx="128.00" cy="48.36" r="7.17"/><circle cx="147.91" cy="48.36" r="7.13"/><circle cx="167.82" cy="48.36" r="6.92"/><circle cx="187.73" cy="48.36" r="6.70"/><circle cx="48.36" cy="68.27" r="7.17"/><circle cx="68.27" cy="68.27" r="7.17"/><circle cx="88.18" cy="68.27" r="7.17"/><circle cx="108.09" cy="68.27" r="7.17"/><circle cx="128.00" cy="68.27" r="7.06"/><circle cx="147.91" cy="68.27" r="6.85"/><circle cx="167.82" cy="68.27" r="6.63"/><circle cx="187.73" cy="68.27" r="6.42"/><circle cx="207.64" cy="68.27" r="6.20"/><circle cx="48.36" cy="88.18" r="7.17"/><circle cx="68.27" cy="88.18" r="7.17"/><circle cx="88.18" cy="88.18" r="7.17"/><circle cx="108.09" cy="88.18" r="6.99"/><circle cx="128.00" cy="88.18" r="6.77"/><circle cx="147.91" cy="88.18" r="6.56"/><circle cx="167.82" cy="88.18" r="6.34"/><circle cx="187.73" cy="88.18" r="6.13"/><circle cx="207.64" cy="88.18" r="5.91"/><circle cx="48.36" cy="108.09" r="7.17"/><circle cx="68.27" cy="108.09" r="7.13"/><circle cx="88.18" cy="108.09" r="6.92"/><circle cx="128.00" cy="108.09" r="6.49"/><circle cx="167.82" cy="108.09" r="6.06"/><circle cx="187.73" cy="108.09" r="5.84"/><circle cx="207.64" cy="108.09" r="5.63"/><circle cx="48.36" cy="128.00" r="7.06"/><circle cx="68.27" cy="128.00" r="6.85"/><circle cx="88.18" cy="128.00" r="6.63"/><circle cx="128.00" cy="128.00" r="6.20"/><circle cx="167.82" cy="128.00" r="5.77"/><circle cx="187.73" cy="128.00" r="5.56"/><circle cx="207.64" cy="128.00" r="5.34"/><circle cx="48.36" cy="147.91" r="6.77"/><circle cx="68.27" cy="147.91" r="6.56"/><circle cx="88.18" cy="147.91" r="6.34"/><circle cx="108.09" cy="147.91" r="6.13"/><circle cx="128.00" cy="147.91" r="5.91"/><circle cx="147.91" cy="147.91" r="5.70"/><circle cx="167.82" cy="147.91" r="5.48"/><circle cx="187.73" cy="147.91" r="5.27"/><circle cx="207.64" cy="147.91" r="5.05"/><circle cx="48.36" cy="167.82" r="6.49"/><circle cx="68.27" cy="167.82" r="6.27"/><circle cx="88.18" cy="167.82" r="6.06"/><circle cx="108.09" cy="167.82" r="5.84"/><circle cx="128.00" cy="167.82" r="5.63"/><circle cx="147.91" cy="167.82" r="5.41"/><circle cx="167.82" cy="167.82" r="5.20"/><circle cx="187.73" cy="167.82" r="4.98"/><circle cx="207.64" cy="167.82" r="4.77"/><circle cx="48.36" cy="187.73" r="6.20"/><circle cx="68.27" cy="187.73" r="5.99"/><circle cx="88.18" cy="187.73" r="5.77"/><circle cx="108.09" cy="187.73" r="5.56"/><circle cx="128.00" cy="187.73" r="5.34"/><circle cx="147.91" cy="187.73" r="5.13"/><circle cx="167.82" cy="187.73" r="4.91"/><circle cx="187.73" cy="187.73" r="4.70"/><circle cx="207.64" cy="187.73" r="4.48"/><circle cx="68.27" cy="207.64" r="5.70"/><circle cx="88.18" cy="207.64" r="5.48"/><circle cx="108.09" cy="207.64" r="5.27"/><circle cx="128.00" cy="207.64" r="5.05"/><circle cx="147.91" cy="207.64" r="4.84"/><circle cx="167.82" cy="207.64" r="4.62"/><circle cx="187.73" cy="207.64" r="4.41"/></g></svg>
diff --cc web/public/next.svg
index 00000000,5174b28c..5174b28c
mode 000000,100644..100644
--- a/web/public/next.svg
+++ b/web/public/next.svg
diff --cc web/public/screens/activity.webp
index 00000000,b5d70dfb..b5d70dfb
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/answer.webp
index 00000000,69f4909f..69f4909f
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/approval.webp
index 00000000,d1d02456..d1d02456
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/group.webp
index 00000000,2bf9f8d0..2bf9f8d0
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/island.webp
index 00000000,354fcccc..354fcccc
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/mac-chat.webp
index 00000000,222abb5f..222abb5f
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/mac-menu.webp
index 00000000,7e15c2cf..7e15c2cf
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/roster.webp
index 00000000,fbfe45ef..fbfe45ef
mode 000000,100644..100644
Binary files differ
diff --cc web/public/screens/widget.webp
index 00000000,5c43dccb..5c43dccb
mode 000000,100644..100644
Binary files differ
diff --cc web/public/vercel.svg
index 00000000,77053960..77053960
mode 000000,100644..100644
--- a/web/public/vercel.svg
+++ b/web/public/vercel.svg
diff --cc web/public/window.svg
index 00000000,b2b2a44f..b2b2a44f
mode 000000,100644..100644
--- a/web/public/window.svg
+++ b/web/public/window.svg
diff --cc web/tsconfig.json
index 00000000,f87b53c2..f87b53c2
mode 000000,100644..100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json