## Theme Showcase
@@ -55,7 +55,7 @@ docker-compose up -d
On first launch, you'll be prompted to create an admin account. That's it!
-For local development setup, see the [Development Guide](https://chriswritescode-dev.github.io/opencode-manager/development/setup/).
+For local development setup, see the [Development Guide](https://opencodemanager.app/docs/development/setup).
## Features
@@ -82,7 +82,7 @@ OpenCode Manager is a pnpm workspace with four TypeScript packages:
- `shared/` — shared Zod schemas, config helpers, types, and utilities consumed by both backend and frontend.
- `ocm-cli/` — `ocm` CLI that attaches your local OpenCode TUI to a repo hosted on the Manager.
-A MkDocs Material site (`docs/`) provides guides, feature docs, configuration, and troubleshooting.
+Guides, feature docs, configuration, and troubleshooting are published at [opencodemanager.app/docs](https://opencodemanager.app/docs).
## Development
@@ -96,7 +96,7 @@ pnpm typecheck
pnpm test
```
-See the [Development Guide](https://chriswritescode-dev.github.io/opencode-manager/development/setup/) for local setup, scripts, database notes, and testing.
+See the [Development Guide](https://opencodemanager.app/docs/development/setup) for local setup, scripts, database notes, and testing.
## Configuration
@@ -113,22 +113,22 @@ AUTH_TRUSTED_ORIGINS=http://localhost:5003,https://yourl33tdomain.com
AUTH_SECURE_COOKIES=false # Set to true when using HTTPS
```
-For OAuth, Passkeys, Push Notifications (VAPID), and advanced configuration, see the [Configuration Guide](https://chriswritescode-dev.github.io/opencode-manager/configuration/environment/).
+For OAuth, Passkeys, Push Notifications (VAPID), and advanced configuration, see the [Configuration Guide](https://opencodemanager.app/docs/configuration/environment).
## `ocm` CLI
OpenCode Manager ships an `ocm` CLI (from `ocm-cli/`) that attaches your local OpenCode TUI to a repo hosted on the Manager. It lists ready repos, attaches with `opencode --server` through the Manager's repo-scoped `/api/opencode-proxy/repos/:repoId` route (so prompts run on the Manager's filesystem against a single shared OpenCode server), and can sync the working tree up or down with `ocm push` / `ocm pull` (fast git bundle + working-tree patch by default; pass `--full` for the legacy tarball mirror). Running `ocm` inside a local clone auto-detects the matching Manager repo by `origin` URL.
-See the [`ocm` CLI guide](docs/ocm-cli.md) for setup and commands.
+See the [`ocm` CLI guide](https://opencodemanager.app/docs/ocm-cli) for setup and commands.
## Documentation
-- [Getting Started](https://chriswritescode-dev.github.io/opencode-manager/getting-started/installation/) — Installation and first-run setup
-- [Features](https://chriswritescode-dev.github.io/opencode-manager/features/overview/) — Deep dive on all features
-- [Configuration](https://chriswritescode-dev.github.io/opencode-manager/configuration/environment/) — Environment variables and advanced setup
-- [Troubleshooting](https://chriswritescode-dev.github.io/opencode-manager/troubleshooting/) — Common issues and solutions
-- [Development](https://chriswritescode-dev.github.io/opencode-manager/development/setup/) — Contributing and local development
-- [`ocm` CLI](docs/ocm-cli.md) — Attach local OpenCode TUI to Manager repos
+- [Getting Started](https://opencodemanager.app/docs/getting-started/installation) — Installation and first-run setup
+- [Features](https://opencodemanager.app/docs/features/overview) — Deep dive on all features
+- [Configuration](https://opencodemanager.app/docs/configuration/environment) — Environment variables and advanced setup
+- [Troubleshooting](https://opencodemanager.app/docs/troubleshooting) — Common issues and solutions
+- [Development](https://opencodemanager.app/docs/development/setup) — Contributing and local development
+- [`ocm` CLI](https://opencodemanager.app/docs/ocm-cli) — Attach local OpenCode TUI to Manager repos
## License
diff --git a/backend/test/scripts/docker-config.test.ts b/backend/test/scripts/docker-config.test.ts
index 45b511c1..13cf317c 100644
--- a/backend/test/scripts/docker-config.test.ts
+++ b/backend/test/scripts/docker-config.test.ts
@@ -9,7 +9,6 @@ const entrypointPath = join(repoRoot, 'scripts/docker-entrypoint.sh')
const dockerfilePath = join(repoRoot, 'Dockerfile')
const composePath = join(repoRoot, 'docker-compose.yml')
const envExamplePath = join(repoRoot, '.env.example')
-const dockerDocsPath = join(repoRoot, 'docs/configuration/docker.md')
const read = (path: string) => readFileSync(path, 'utf-8')
@@ -232,45 +231,12 @@ describe('workspace ownership configuration', () => {
expect(compose).not.toMatch(/:\/home\/node\/\.opencode(?:\s|$)/)
})
- it('lists the opencode-bin volume in the installation docs table', () => {
- const docs = read(join(repoRoot, 'docs/getting-started/installation.md'))
- expect(docs).toContain('| `opencode-bin` | `/home/node/.opencode/bin` |')
- })
-
- it('keeps the docker docs compose snippet in sync with docker-compose.yml', () => {
- const compose = read(composePath)
- const docs = read(dockerDocsPath)
-
- const fenceStart = docs.indexOf('```yaml\nservices:')
- expect(fenceStart, 'docs must contain a fenced compose yaml block').toBeGreaterThan(-1)
- const contentStart = fenceStart + '```yaml\n'.length
- const fenceEnd = docs.indexOf('\n```\n', contentStart)
- expect(fenceEnd, 'docs compose yaml block must be closed').toBeGreaterThan(-1)
- const docsBlock = docs.slice(contentStart, fenceEnd)
-
- const normalize = (s: string) => s.replace(/\s+$/, '').split('\n').map((l) => l.replace(/\s+$/, '')).join('\n')
- expect(normalize(docsBlock)).toBe(normalize(compose))
- })
-
- it('documents the Accessing Repositories From the Host subsection', () => {
- const docs = read(dockerDocsPath)
- expect(docs).toContain('#### Accessing Repositories From the Host')
- })
-
it('documents the new workspace ownership env vars in .env.example', () => {
const envExample = read(envExamplePath)
expect(envExample).toContain('OCM_WORKSPACE_HOST_PATH')
expect(envExample).toContain('# PUID=1000')
expect(envExample).toContain('# PGID=1000')
})
-
- it('documents the migration empty-destination guard and quoted host path', () => {
- const docs = read(dockerDocsPath)
- expect(docs).toContain('if [ -n "$(ls -A "")" ]; then')
- expect(docs).toContain('mkdir -p ""')
- expect(docs).toContain('-v "":/to')
- expect(docs).toContain('chown -R "$(id -u):$(id -g)" ""')
- })
})
describe('docker lifecycle scripts', () => {
@@ -279,18 +245,6 @@ describe('docker lifecycle scripts', () => {
expect(pkg).toContain('"docker:down": "docker-compose down"')
expect(pkg).toContain('"docker:reset": "docker-compose down -v"')
})
-
- it('documents the preserved-volume shutdown and the destructive reset', () => {
- const docs = read(dockerDocsPath)
- expect(docs).toContain('named volumes are preserved')
- expect(docs).toContain('docker-compose down -v')
- })
-
- it('documents a targeted opencode-bin volume reset that preserves the other volumes', () => {
- const docs = read(join(repoRoot, 'docs/troubleshooting.md'))
- expect(docs).toContain('docker volume rm _opencode-bin')
- expect(docs).toContain('without touching the workspace or database volumes')
- })
})
describe('sandbox guest image', () => {
@@ -476,20 +430,6 @@ describe('sandbox compose overlay', () => {
it('grants only the devices and capability msb needs, never full container privilege', () => {
expect(overlayDirectives.join('\n')).not.toContain('privileged')
})
-
- it('keeps the sandbox overlay docs snippet in sync with docker-compose.sandbox.yml', () => {
- const docs = read(dockerDocsPath)
- const docsOverlay = [...docs.matchAll(/```yaml\n([\s\S]*?)\n```/g)]
- .map((match) => match[1]!)
- .find((block) => block.includes('microsandbox-data'))
-
- expect(docsOverlay, 'docs must contain the sandbox overlay yaml block').toBeDefined()
-
- const significantLines = (source: string[]) =>
- source.filter((line) => line.trim() !== '').map((line) => line.replace(/\s+$/, '')).join('\n')
-
- expect(significantLines(docsOverlay!.split('\n'))).toBe(significantLines(overlayDirectives))
- })
})
describe('named-volume migration recipe', () => {
diff --git a/docs/configuration/authentication.md b/docs/configuration/authentication.md
deleted file mode 100644
index 6efe5580..00000000
--- a/docs/configuration/authentication.md
+++ /dev/null
@@ -1,202 +0,0 @@
-# Authentication
-
-OpenCode Manager uses single-user authentication designed for personal deployments.
-
-## Overview
-
-The authentication system supports:
-
-- Email/password login
-- Passkey/WebAuthn authentication
-- OAuth social login (optional)
-- Session-based auth with secure cookies
-
-## First-Run Setup
-
-On first launch with no admin account:
-
-1. You're redirected to the Setup page
-2. Create your admin account
-3. Optionally configure providers
-4. Start using the application
-
-## Pre-Configured Admin
-
-Skip interactive setup for automated deployments:
-
-```bash
-ADMIN_EMAIL=admin@example.com
-ADMIN_PASSWORD=your-secure-password
-```
-
-When set:
-
-- Admin user is created automatically
-- Setup wizard is skipped
-- New account registration is rejected server-side, including account creation through OAuth; the registration page is hidden too. Internal startup provisioning can create the configured admin account.
-
-Both variables must be set. This does not revoke existing accounts or sessions, or restrict API access to an admin role: authenticated users can access Manager resources. Without a preconfigured admin, registration remains enabled. Use Manager for trusted personal deployments, not as a multi-user isolation boundary.
-
-## Password Reset
-
-If you forget your password:
-
-1. Set environment variables:
-
-```bash
-ADMIN_EMAIL=your@email.com
-ADMIN_PASSWORD=new-password
-ADMIN_PASSWORD_RESET=true
-```
-
-2. Recreate the container so it picks up the new environment variables:
-
-```bash
-docker compose up -d --force-recreate app
-```
-
-3. Log in with new password
-
-4. Remove `ADMIN_PASSWORD_RESET=true` from environment and recreate again:
-
-```bash
-docker compose up -d --force-recreate app
-```
-
-!!! warning
- Remove the reset flag after successful reset to prevent accidental password changes.
-
-## Session Security
-
-### AUTH_SECRET
-
-Required for production. Signs session cookies, so changing it signs every user out.
-
-Generate:
-```bash
-openssl rand -base64 32
-```
-
-Configure:
-```bash
-AUTH_SECRET=your-generated-secret
-```
-
-### Session Duration
-
-Sessions last 7 days and slide: once a session is more than a day old, the next request extends it by another 7 days, so an active session does not expire. A new session is created on each login.
-
-### Secure Cookies
-
-Outside Docker, secure cookies default to `true` when `NODE_ENV=production` and `false` otherwise. The default `docker-compose.yml` forwards `AUTH_SECURE_COOKIES=${AUTH_SECURE_COOKIES:-false}`, so a Compose deployment defaults to non-secure cookies even though Compose sets `NODE_ENV=production`. Set it explicitly:
-
-```bash
-# HTTPS
-AUTH_SECURE_COOKIES=true
-
-# For HTTP on trusted networks only
-AUTH_SECURE_COOKIES=false
-```
-
-## Remote Access
-
-### Local Network (HTTP)
-
-For accessing via IP on a local network:
-
-```bash
-# Include every URL you open the Manager from
-AUTH_TRUSTED_ORIGINS=http://localhost:5003,http://192.168.1.244:5003
-
-# Disable secure cookies for HTTP
-AUTH_SECURE_COOKIES=false
-```
-
-!!! note "Origin order"
- The first entry in `AUTH_TRUSTED_ORIGINS` is the Manager's auth base URL, which OAuth providers redirect back to. Put the URL you sign in from first. For `pnpm dev`, that is `http://localhost:5173`.
-
-### Production (HTTPS)
-
-For production with HTTPS:
-
-```bash
-AUTH_TRUSTED_ORIGINS=https://yourdomain.com
-AUTH_SECURE_COOKIES=true
-```
-
-### Cloudflare Tunnel
-
-To reach a Manager on your local network through a Cloudflare Tunnel, including the Preview panel, follow [Cloudflare Tunnel](cloudflare-tunnel.md).
-
-## Passkeys
-
-Passwordless authentication using WebAuthn.
-
-### Setup
-
-Configure your domain:
-
-```bash
-# Docker or a production build on this machine
-PASSKEY_RP_ID=localhost
-PASSKEY_RP_NAME=OpenCode Manager
-PASSKEY_ORIGIN=http://localhost:5003
-
-# Local development with pnpm dev (the page is served by Vite)
-PASSKEY_RP_ID=localhost
-PASSKEY_RP_NAME=OpenCode Manager
-PASSKEY_ORIGIN=http://localhost:5173
-
-# Production
-PASSKEY_RP_ID=yourdomain.com
-PASSKEY_RP_NAME=OpenCode Manager
-PASSKEY_ORIGIN=https://yourdomain.com
-```
-
-!!! note "Origin selection"
- - `PASSKEY_ORIGIN` must be the origin of the page you sign in from, which is the URL in the browser's address bar
- - `PASSKEY_RP_ID` must be that page's hostname or a parent domain of it
- - Browsers only offer passkeys on HTTPS or `localhost`, so plain-HTTP access by LAN IP cannot use passkeys. For LAN or remote access, serve the Manager over HTTPS on a domain (for example, through a [Cloudflare Tunnel](cloudflare-tunnel.md)) and use that domain
-
-### Adding a Passkey
-
-1. Log in with password
-2. Go to **Settings > Account**
-3. Optionally enter a passkey name
-4. Click **Add Passkey**
-5. Follow browser/device prompts
-
-### Supported Authenticators
-
-- Touch ID / Face ID (macOS, iOS)
-- Windows Hello
-- Hardware security keys (YubiKey, etc.)
-- Android fingerprint/face
-
-### Passkey Requirements
-
-- RP ID must match the domain
-- Origin must match exactly (including port)
-- HTTPS recommended (required for some browsers)
-
-## Troubleshooting
-
-### Can't Log In
-
-1. Clear browser cookies
-2. Check credentials are correct
-3. Verify AUTH_SECRET hasn't changed
-4. Check AUTH_TRUSTED_ORIGINS includes your URL
-
-### Session Keeps Expiring
-
-1. Check AUTH_SECRET is persistent across restarts
-2. Verify cookies aren't being blocked
-3. Check AUTH_SECURE_COOKIES setting
-
-### Passkey Not Working
-
-1. Verify PASSKEY_RP_ID matches domain
-2. Check PASSKEY_ORIGIN is exact
-3. Try a different browser
-4. Ensure WebAuthn is supported
diff --git a/docs/configuration/cloudflare-tunnel.md b/docs/configuration/cloudflare-tunnel.md
deleted file mode 100644
index 79c69598..00000000
--- a/docs/configuration/cloudflare-tunnel.md
+++ /dev/null
@@ -1,170 +0,0 @@
-# Cloudflare Tunnel
-
-Reach an OpenCode Manager running on your local network from anywhere over HTTPS, without opening ports on your router. This guide covers the Manager itself and the [Preview](../features/preview.md) panel, which needs a hostname of its own.
-
-## What You Need
-
-- A domain managed by Cloudflare, for example `example.com`.
-- A Cloudflare Tunnel with `cloudflared` running on a machine that can reach the Manager. See Cloudflare's [Create a tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/get-started/create-remote-tunnel/) guide.
-- Two hostnames on that domain:
-
-| Hostname | Serves | Manager port |
-|----------|--------|--------------|
-| `oc.example.com` | The Manager | 5003 |
-| `preview.example.com` | The [preview gateway](../features/preview.md#gateway) | 5004 |
-
-The examples below use these names; replace them with your own.
-
-!!! info "Why Preview needs its own hostname"
- Preview shows pages from dev servers you run, which is untrusted content. It is served from a separate origin so it can never act as the Manager. Both hostnames must be on the **same domain**: the preview login cookie is `SameSite=Lax`, which the browser only sends to a frame on the same site as the page around it.
-
-!!! warning "Quick tunnels are not supported"
- `trycloudflare.com` quick tunnels get a random hostname each time they start, so `PREVIEW_PUBLIC_URL` would change on every restart. Use a named tunnel on your own domain.
-
-## 1. Publish Both Hostnames
-
-In your tunnel, add a **published application route** for each hostname. The service URL depends on where `cloudflared` runs.
-
-=== "cloudflared in Docker Compose"
-
- Run `cloudflared` next to the Manager in the same `docker-compose.yml`, so it reaches the Manager over the Compose network:
-
- ```yaml
- services:
- app:
- # the existing OpenCode Manager service
-
- cloudflared:
- image: cloudflare/cloudflared:latest
- command: tunnel --no-autoupdate run
- environment:
- - TUNNEL_TOKEN=${CLOUDFLARE_TUNNEL_TOKEN}
- restart: unless-stopped
- ```
-
- Put the tunnel token from the Cloudflare dashboard in `.env` as `CLOUDFLARE_TUNNEL_TOKEN`, then add these routes:
-
- | Hostname | Service |
- |----------|---------|
- | `oc.example.com` | `http://app:5003` |
- | `preview.example.com` | `http://app:5004` |
-
-=== "cloudflared on another machine"
-
- Point the routes at the Manager's LAN address:
-
- | Hostname | Service |
- |----------|---------|
- | `oc.example.com` | `http://192.168.1.10:5003` |
- | `preview.example.com` | `http://192.168.1.10:5004` |
-
- With Docker, ports 5003 and 5004 must be published, as they are in the default `docker-compose.yml`.
-
-=== "Locally managed tunnel"
-
- For a tunnel configured with a `config.yml` file:
-
- ```yaml
- tunnel:
- credentials-file: /etc/cloudflared/.json
-
- ingress:
- - hostname: oc.example.com
- service: http://192.168.1.10:5003
- - hostname: preview.example.com
- service: http://192.168.1.10:5004
- - service: http_status:404
- ```
-
-## 2. Configure the Manager
-
-Add to `.env`:
-
-```bash
-AUTH_TRUSTED_ORIGINS=https://oc.example.com
-AUTH_SECURE_COOKIES=true
-
-PASSKEY_RP_ID=oc.example.com
-PASSKEY_ORIGIN=https://oc.example.com
-
-PREVIEW_PUBLIC_URL=https://preview.example.com
-```
-
-Then restart the Manager. With Docker: `docker compose up -d`.
-
-| Variable | Why |
-|----------|-----|
-| `AUTH_TRUSTED_ORIGINS` | Lets the browser sign in from the tunnel hostname. |
-| `AUTH_SECURE_COOKIES` | The tunnel serves HTTPS, so session cookies are marked secure. |
-| `PASSKEY_RP_ID`, `PASSKEY_ORIGIN` | Passkeys are bound to the hostname. Passkeys added under another hostname (such as `localhost`) do not work here; add a new one from **Settings > Account**. |
-| `PREVIEW_PUBLIC_URL` | Without it, the Preview panel loads `https://oc.example.com:5004`, which the tunnel does not serve, and the preview stays blank. |
-
-!!! danger "Never add the preview hostname to `AUTH_TRUSTED_ORIGINS`"
- The Manager rejects state-changing requests from other origins on the same site unless they are trusted. Trusting the preview hostname would let any page you preview act as you in the Manager. See [Isolation level](../features/preview.md#isolation-level).
-
-## 3. Turn Off Caching for the Preview Hostname
-
-**This step is required.** Cloudflare caches JavaScript, CSS, images and fonts by default, and keeps responses that have no cache headers for up to two hours ([Cloudflare default cache behavior](https://developers.cloudflare.com/cache/concepts/default-cache-behavior/)). The cache cannot tell dev servers or users apart. Every dev server shares the one preview hostname, and the gateway picks the target from your login cookie. Without this rule:
-
-- Changes to your files do not appear for up to two hours.
-- Two projects that serve the same path, such as `/main.js`, can receive each other's files.
-- Cloudflare serves a cached file without going through the preview login, so anyone with its URL can download it.
-
-Create a cache rule in the Cloudflare dashboard:
-
-1. Go to **Caching > Cache Rules** and select **Create rule**.
-2. Name it, for example `OpenCode Manager preview: bypass cache`.
-3. Under **When incoming requests match**, choose **Custom filter expression**: **Hostname** **equals** `preview.example.com`.
-4. Under **Cache eligibility**, select **Bypass cache**.
-5. Select **Deploy**.
-
-The Manager hostname does not need this rule.
-
-## 4. Check WebSockets
-
-The Terminal and Preview live reload (HMR) use WebSockets. On your domain's **Network** page in the Cloudflare dashboard, make sure **WebSockets** is **On**.
-
-## 5. Cloudflare Access (Optional)
-
-If you protect `oc.example.com` with [Cloudflare Access](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/), choose one of these for the preview hostname:
-
-- **Add it to the same Access application.** In an application with several domains, Access issues the login cookie for the other domains after you sign in once, so the Preview frame never shows a login page ([multi-domain applications](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/authorization-cookie/#multi-domain-applications)).
-- **Leave it out of Access.** The preview gateway has its own login: it only opens a preview from a single-use token issued by a signed-in Manager, and answers every other request with `401`.
-
-Do not put the preview hostname in a **separate** Access application. The Preview frame would be sent to the Access login page, which cannot be shown inside a frame, and the preview stays blank.
-
-## Using the LAN Address as Well
-
-`PREVIEW_PUBLIC_URL` applies however you open the Manager:
-
-- **Through the tunnel** (`https://oc.example.com`): Preview works in the panel.
-- **Through a LAN address** (`http://192.168.1.10:5003`): the panel still loads the preview from `https://preview.example.com`. That is a different site, so the browser blocks the preview cookie inside the frame. Use **Open in new tab** in the Preview toolbar, or use the tunnel hostname.
-
-With `AUTH_SECURE_COOKIES=true` you also cannot sign in over plain HTTP, because browsers do not store secure cookies for `http://` addresses. Sign in through the tunnel hostname.
-
-## Check the Setup
-
-1. Open `https://oc.example.com` and sign in.
-2. Start a dev server from the [Terminal](../features/terminal.md) or [Actions](../features/project-actions.md).
-3. Open **Preview** and select its port. The page appears in the panel.
-4. Edit a file the dev server serves. The change appears after live reload or a refresh.
-5. Optional: open `https://preview.example.com` in a private window. It shows **Preview session expired. Reopen it from OpenCode Manager.** (or the Access login page, if the hostname is behind Access), which confirms that the preview cannot be opened without signing in.
-
-## Troubleshooting
-
-| Symptom | Cause | Fix |
-|---------|-------|-----|
-| Preview stays blank or cannot connect | `PREVIEW_PUBLIC_URL` is not set, so the panel uses port 5004 on the Manager hostname | Set `PREVIEW_PUBLIC_URL` and restart the Manager |
-| **Preview session expired. Reopen it from OpenCode Manager.** inside the panel right after selecting a port | The browser blocked the preview cookie: the hostnames are on different domains, or the Manager was opened by its LAN address | Put both hostnames on the same domain and open the Manager through the tunnel, or use **Open in new tab** |
-| **Preview must run on a different origin than OpenCode Manager.** | `PREVIEW_PUBLIC_URL` points at the Manager's own hostname | Use a separate hostname for the preview |
-| Old file contents, or another project's files | Cloudflare cached the files | Add the [cache rule](#3-turn-off-caching-for-the-preview-hostname), then purge the cache under **Caching > Configuration** |
-| Live reload does not work, or the Terminal does not connect | WebSockets are off | Turn on [WebSockets](#4-check-websockets) |
-| Access login page or a blank frame in the Preview panel | The preview hostname is in a separate Access application | Follow [Cloudflare Access](#5-cloudflare-access-optional) |
-| Sign-in fails on the tunnel hostname | `AUTH_TRUSTED_ORIGINS` does not include `https://oc.example.com` | Add it and restart the Manager |
-
-## Related
-
-- [Preview](../features/preview.md) — how the preview gateway works.
-- [Authentication](authentication.md) — trusted origins, secure cookies and passkeys.
-- [Docker](docker.md) — ports and environment variables.
-- [Environment Variables](environment.md#preview-gateway) — `PREVIEW_PORT` and `PREVIEW_PUBLIC_URL`.
diff --git a/docs/configuration/docker.md b/docs/configuration/docker.md
deleted file mode 100644
index 33809a77..00000000
--- a/docs/configuration/docker.md
+++ /dev/null
@@ -1,568 +0,0 @@
-# Docker Configuration
-
-Advanced Docker setup and configuration options.
-
-## Basic Setup
-
-```bash
-git clone https://github.com/chriswritescode-dev/opencode-manager.git
-cd opencode-manager
-
-# Copy and configure environment
-cp .env.example .env
-
-# Generate a secure AUTH_SECRET
-openssl rand -base64 32
-# Add the output to AUTH_SECRET in .env
-
-# Start the container
-docker-compose up -d
-```
-
-!!! warning "AUTH_SECRET Required"
- The container will not start without `AUTH_SECRET` set in your `.env` file. Generate one with:
- ```bash
- openssl rand -base64 32
- ```
-
-## docker-compose.yml
-
-Default configuration:
-
-```yaml
-services:
- app:
- build:
- context: .
- dockerfile: Dockerfile
- args:
- TOOLS_CACHEBUST: ${TOOLS_CACHEBUST:-0}
- container_name: opencode-manager
- ports:
- - "5003:5003"
- - "5004:5004"
- - "5100:5100"
- - "5101:5101"
- - "5102:5102"
- - "5103:5103"
- environment:
- - NODE_ENV=${NODE_ENV:-production}
- - PUID=${PUID:-1000}
- - PGID=${PGID:-1000}
- - HOST=0.0.0.0
- - PORT=5003
- - OPENCODE_SERVER_PORT=5551
- - OPENCODE_HOST=127.0.0.1
- - DATABASE_PATH=/app/data/opencode.db
- - WORKSPACE_PATH=/workspace
- - PROCESS_START_WAIT_MS=2000
- - PROCESS_VERIFY_WAIT_MS=1000
- - HEALTH_CHECK_TIMEOUT_MS=30000
- - MAX_FILE_SIZE_MB=50
- - MAX_UPLOAD_SIZE_MB=50
- - DEBUG=false
- - AUTH_SECRET=${AUTH_SECRET}
- - AUTH_TRUSTED_ORIGINS=${AUTH_TRUSTED_ORIGINS:-http://localhost:5003}
- - ADMIN_EMAIL=${ADMIN_EMAIL:-}
- - ADMIN_PASSWORD=${ADMIN_PASSWORD:-}
- - ADMIN_PASSWORD_RESET=${ADMIN_PASSWORD_RESET:-false}
- - GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID:-}
- - GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET:-}
- - GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID:-}
- - GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET:-}
- - DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID:-}
- - DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET:-}
- - AUTH_SECURE_COOKIES=${AUTH_SECURE_COOKIES:-false}
- - PASSKEY_RP_ID=${PASSKEY_RP_ID:-localhost}
- - PASSKEY_RP_NAME=${PASSKEY_RP_NAME:-OpenCode Manager}
- - PASSKEY_ORIGIN=${PASSKEY_ORIGIN:-http://localhost:5003}
- - PREVIEW_PUBLIC_URL=${PREVIEW_PUBLIC_URL:-}
- - VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY:-}
- - VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY:-}
- - VAPID_SUBJECT=${VAPID_SUBJECT:-}
- volumes:
- - ${OCM_WORKSPACE_HOST_PATH:-opencode-workspace}:/workspace
- - opencode-data:/app/data
- - opencode-bin:/home/node/.opencode/bin
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
- interval: 30s
- timeout: 3s
- retries: 3
- start_period: 40s
-
-volumes:
- opencode-workspace:
- driver: local
- opencode-data:
- driver: local
- opencode-bin:
- driver: local
-```
-
-## Environment Variables
-
-Create a `.env` file in the project root. The docker-compose.yml automatically reads variables from `.env`:
-
-```bash
-# Required
-AUTH_SECRET=generate-with-openssl-rand-base64-32
-
-# Optional - pre-configured admin
-ADMIN_EMAIL=admin@example.com
-ADMIN_PASSWORD=your-secure-password
-
-# Optional - OAuth providers
-GITHUB_CLIENT_ID=your-client-id
-GITHUB_CLIENT_SECRET=your-client-secret
-
-# Optional - passkeys
-PASSKEY_RP_ID=localhost
-PASSKEY_ORIGIN=http://localhost:5003
-
-# Optional - preview gateway behind HTTPS (see Cloudflare Tunnel)
-PREVIEW_PUBLIC_URL=https://preview.example.com
-
-# Optional - push notifications
-VAPID_PUBLIC_KEY=BMx-1234567890abcdefghijklmnopqrstuv...
-VAPID_PRIVATE_KEY=abcd1234567890abcdef...
-VAPID_SUBJECT=mailto:you@example.com
-```
-
-## Entrypoint Behavior
-
-The container entrypoint (`scripts/docker-entrypoint.sh`) automatically:
-
-1. **Verifies Bun** is installed (installed at build time, fallback install if missing)
-2. **Reconciles the persisted OpenCode home binary** (`/home/node/.opencode/bin/opencode`):
- - a persisted binary inside the supported range is retained, including a user-selected version newer than the image-bundled `OPENCODE_BUNDLED_VERSION`. The supported range is a stable `X.Y.Z` release at or above the bundled version with the same major version (`>=OPENCODE_BUNDLED_VERSION ` already exists or not, and avoids depending on Docker's internal storage path (`/var/lib/docker/...` differs on Docker Desktop, rootless Docker, and custom data roots). The destination must be empty; if it is not, the recipe aborts without copying anything so existing files are never overwritten:
-
-```bash
-docker compose stop
-mkdir -p ""
-# Abort if the destination is non-empty so we never overwrite existing files.
-if [ -n "$(ls -A "")" ]; then
- echo "destination '' is not empty; aborting migration" >&2
- exit 1
-fi
-# `` is the Compose project name, usually the directory containing docker-compose.yml.
-docker run --rm \
- -v _opencode-workspace:/from:ro \
- -v "":/to alpine sh -c 'cp -a /from/. /to/'
-sudo chown -R "$(id -u):$(id -g)" ""
-docker compose up -d
-# After confirming /workspace contains your repositories, remove the old volume:
-docker volume rm _opencode-workspace
-```
-
-The quoted `""` keeps paths containing spaces (for example `/Users/name/My Repositories`) intact across `mkdir`, the Docker `-v` argument, and `chown`. With the empty-destination guard in place, `cp -a /from/. /to/` copies the volume's *contents* (not its `_data` directory) directly into the bind-mount root, so repositories land directly beneath the mounted `/workspace`. The named volume is left in place until you confirm the migration succeeded.
-
-!!! warning "Set PUID before switching to a bind mount"
- A wrong `PUID` makes startup chown the whole host directory. The entrypoint prints a warning naming both uids, but it does not block the chown.
-
-!!! warning "Concurrent git access"
- Editing a repository from the host while an agent works in the same repository or worktree can collide on `index.lock` and branch state.
-
-!!! note "/app keeps the build-time uid"
- `/app` and its `node_modules` are chowned to uid 1000 at build time and are read-only at runtime. When `PUID` differs, the container runs the code as a different uid, but since `/app` is only read (never written) at runtime, it is left untouched and startup stays fast.
-
-### Data
-
-Database and configuration:
-
-```yaml
-volumes:
- - opencode-data:/app/data
-```
-
-Contains:
-- SQLite database
-- User settings
-- Session data
-
-Uses a named volume for data persistence.
-
-### OpenCode Binary
-
-```yaml
-volumes:
- - opencode-bin:/home/node/.opencode/bin
-```
-
-Persists the OpenCode binary that the Manager's installer (from the UI's OpenCode settings) writes into `~/.opencode/bin`, so an upgrade survives container recreations. The volume is limited to the binary and leaves existing workspace and XDG persistence behavior for config, auth, and chat state unchanged.
-
-On startup the entrypoint reconciles the persisted binary:
-
-- a persisted binary inside the supported range (a stable release `>=OPENCODE_BUNDLED_VERSION` with the same major version) is retained, including a user-selected version newer than the image-bundled one;
-- a malformed or unversioned persisted binary is removed so `PATH` falls back to the image-bundled `/usr/local/bin/opencode`, avoiding a download;
-- a persisted binary outside the supported range (older than the bundled version, a prerelease, or a different major version) is removed so the pinned bundled OpenCode 2 binary is used; it is downloaded from `https://opencode.ai/files/bin/` into this volume only when no supported binary remains on `PATH`.
-
-A fresh volume starts empty and the image-bundled binary is used until an upgrade installs into the volume.
-
-### Import Existing OpenCode Chats From Your Host
-
-If you already use standalone OpenCode on your machine and want Dockerized OpenCode Manager to show those chats on first setup, bind your host OpenCode config/state into the container and bind your repo root to the same absolute path that standalone OpenCode used.
-
-Add to `.env`:
-
-```bash
-OCM_REPOS_HOST_PATH=/Users/you/Development
-OCM_OPENCODE_CONFIG_HOST_PATH=/Users/you/.config/opencode
-OCM_OPENCODE_STATE_HOST_PATH=/Users/you/.local/share/opencode
-```
-
-Then add a compose override:
-
-```yaml
-services:
- app:
- environment:
- - OPENCODE_IMPORT_CONFIG_PATH=/import/opencode-config/opencode.json
- - OPENCODE_IMPORT_STATE_PATH=/import/opencode-state
- volumes:
- - ${OCM_REPOS_HOST_PATH}:${OCM_REPOS_HOST_PATH}:ro
- - ${OCM_OPENCODE_CONFIG_HOST_PATH}:/import/opencode-config:ro
- - ${OCM_OPENCODE_STATE_HOST_PATH}:/import/opencode-state:ro
-```
-
-`OPENCODE_IMPORT_CONFIG_PATH` imports a single file. For a host with multiple config files (`opencode.json`, `opencode.jsonc`, and a legacy `config.json`), omit it and mount `${OCM_OPENCODE_CONFIG_HOST_PATH}` writable at the container's OpenCode config directory (`/home/node/.config/opencode`) instead. Import mirrors the host's files into the workspace, removes workspace copies absent on the host, and folds a mirrored legacy `config.json` into the workspace config.
-
-Why the repo mount uses the host path as the container path:
-
-- standalone OpenCode stores chats against absolute directory paths
-- mounting `${OCM_REPOS_HOST_PATH}` to the same path inside the container preserves those paths exactly
-- OpenCode Manager can then discover that folder and create its normal workspace links under `/workspace/repos`
-
-With a fresh Docker volume, first startup imports the host OpenCode config and state, and after you add `${OCM_REPOS_HOST_PATH}` in the Manager UI, previously existing chats appear under the discovered repositories.
-
-## Agent Sandboxing Overlay
-
-Optional KVM-backed agent sandboxing (see [Agent Sandboxing](../features/sandboxing.md)). The sandbox overlay (`docker-compose.sandbox.yml`) grants the container KVM and guest-networking access, passes sandbox tuning through from `.env`, and persists microsandbox state. It deliberately avoids `privileged: true`, granting only the specific devices and capability `msb` needs:
-
-```yaml
-services:
- app:
- devices:
- - "/dev/kvm:/dev/kvm"
- - "/dev/net/tun:/dev/net/tun"
- cap_add:
- - NET_ADMIN
- environment:
- - SANDBOX_IMAGE=${SANDBOX_IMAGE:-docker.io/cstechdev/ocm-sandbox@sha256:9df035cfb1a7c367bac6edbfd660d084b08e02faa051a93e0a6e381272b85342}
- - SANDBOX_MEMORY=${SANDBOX_MEMORY:-4G}
- - SANDBOX_CPUS=${SANDBOX_CPUS:-2}
- - SANDBOX_EXEC_USER=${SANDBOX_EXEC_USER:-${PUID:-1000}}
- - SANDBOX_NET=${SANDBOX_NET:-public}
- - SANDBOX_START_TIMEOUT_MS=${SANDBOX_START_TIMEOUT_MS:-300000}
- - SANDBOX_EXEC_TIMEOUT_MS=${SANDBOX_EXEC_TIMEOUT_MS:-600000}
- volumes:
- - microsandbox-data:/home/node/.microsandbox
-
-volumes:
- microsandbox-data:
- driver: local
-```
-
-Start the Manager with the overlay:
-
-```bash
-docker compose -f docker-compose.yml -f docker-compose.sandbox.yml up -d
-```
-
-The overlay requires a Linux host with `/dev/kvm`. Docker Desktop on macOS and Windows cannot provide `/dev/kvm`, so the sandbox toggle in Settings stays disabled there. `/dev/net/tun` and `NET_ADMIN` provide guest networking for `SANDBOX_NET=public`; if `msb` reports a missing device or capability on a particular host, add that specific entry rather than enabling full privilege.
-
-`SANDBOX_EXEC_USER` defaults to the numeric `PUID` (falling back to `1000`), and the Manager runs every sandboxed command as that numeric uid (with the Manager's gid). Because the entrypoint realigns the container's `node` account to `PUID`/`PGID` and re-owns `/workspace`, a non-1000 `PUID` (for example `PUID=1001`) writes to the mounted repositories with the same identity as the workspace owner. If a configured `SANDBOX_EXEC_USER` cannot match the workspace owner, the toggle reports enforcement as unavailable instead of running broken commands.
-
-The `microsandbox-data` volume persists microsandbox's own state (downloaded images, firmware cache) across container recreations, alongside the workspace and data volumes.
-
-## Health Checks
-
-The container includes health checks:
-
-```yaml
-healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:5003/api/health"]
- interval: 30s
- timeout: 3s
- retries: 3
- start_period: 40s
-```
-
-Check health status:
-
-```bash
-docker inspect --format='{{.State.Health.Status}}' opencode-manager
-```
-
-## Resource Limits
-
-Limit container resources:
-
-```yaml
-services:
- app:
- # ... other config
- deploy:
- resources:
- limits:
- cpus: '2'
- memory: 4G
- reservations:
- cpus: '0.5'
- memory: 1G
-```
-
-## Networking
-
-### Custom Network
-
-Create an isolated network:
-
-```yaml
-services:
- app:
- networks:
- - opencode-net
-
-networks:
- opencode-net:
- driver: bridge
-```
-
-### Host Network
-
-Use host networking (Linux only):
-
-```yaml
-services:
- app:
- network_mode: host
-```
-
-## Commands
-
-### Basic Operations
-
-```bash
-# Start
-docker-compose up -d
-
-# Stop (containers removed; named volumes are preserved)
-docker-compose down
-
-# Stop and remove containers and all named volumes (workspace, database, OpenCode binary)
-docker-compose down -v
-
-# Restart
-docker-compose restart
-
-# View logs
-docker-compose logs -f
-
-# View logs (last 100 lines)
-docker-compose logs --tail 100
-```
-
-The package scripts mirror these: `pnpm docker:down` stops and removes containers while preserving all named volumes, and `pnpm docker:reset` is the destructive variant that also deletes the workspace, database, and OpenCode binary volumes.
-
-### Maintenance
-
-```bash
-# Rebuild image
-docker-compose build
-
-# Rebuild without cache
-docker-compose build --no-cache
-
-# Update and restart (run from the repo root)
-./scripts/docker-upgrade.sh # cached rebuild, pulls first (~1-2 min)
-./scripts/docker-upgrade.sh --tools # cached rebuild with a fresh uv/opencode install (~17 min)
-./scripts/docker-upgrade.sh --full # full --no-cache rebuild (~25 min)
-# Add --no-pull to skip `git pull`, or --logs to follow logs after starting.
-
-# Or manually (equivalent to --full):
-docker-compose down
-git pull
-docker-compose build --no-cache
-docker-compose up -d
-```
-
-### Debugging
-
-```bash
-# Access shell
-docker exec -it opencode-manager sh
-
-# View running processes
-docker exec opencode-manager ps aux
-
-# Check disk usage
-docker exec opencode-manager df -h
-
-# View environment
-docker exec opencode-manager env
-```
-
-## Global Agent Instructions
-
-The container creates a default `AGENTS.md` file at `/workspace/.config/opencode/AGENTS.md`.
-
-### Default Content
-
-Instructions for AI agents working in the container:
-- Reserved ports information
-- Available dev server ports
-- Docker-specific guidelines
-- Pre-installed browser automation (Playwright and Chromium)
-
-### Editing
-
-**Via UI:** Settings > OpenCode > Global Agent Instructions
-
-**Via File:**
-```bash
-docker exec -it opencode-manager vi /workspace/.config/opencode/AGENTS.md
-```
-
-### Precedence
-
-Global instructions merge with repository-specific `AGENTS.md` files. Repository instructions take precedence.
-
-## Exposing the OpenCode Server (Advanced)
-
-By default, the OpenCode server binds to `127.0.0.1` inside the container and is **not reachable from outside the container**. This is the correct and safe default for nearly all users.
-
-### When to Expose Externally
-
-You only need to expose the OpenCode server on an external interface if you have a specific use case that requires other services or machines to connect directly to it.
-
-!!! warning "Sandbox enforcement is shell-scoped"
- Sandbox enforcement applies to every shell spawn that goes through OpenCode's `Shell.create`: the agent `shell` tool, the WebUI `!command` shell, and the shell API (`POST /api/shell`). The rewrite runs as a plugin hook inside the OpenCode process, so it guards both proxied and direct connections to the OpenCode server. PTY terminals, slash-command shell interpolation (a `` !`cmd` `` template is expanded by OpenCode with the configured shell directly on the host), and server binding follow normal OpenCode behavior while sandboxing is enabled (see [Agent Sandboxing](../features/sandboxing.md)).
-
-### How to Expose Safely
-
-To expose the OpenCode server on the host network:
-
-1. **Set `OPENCODE_HOST=0.0.0.0`** in your environment
-2. **Add port `5551:5551`** to the compose ports
-3. **Set `OPENCODE_SERVER_PASSWORD`** — recommended so the exposed server uses a password you control; without it OpenCode Manager generates and persists one
-
-Example compose override:
-
-```yaml
-services:
- app:
- ports:
- - "5551:5551"
- environment:
- - OPENCODE_HOST=0.0.0.0
- - OPENCODE_SERVER_PASSWORD=${OPENCODE_SERVER_PASSWORD:?Set OPENCODE_SERVER_PASSWORD before exposing OpenCode on port 5551}
-```
-
-### Password Configuration
-
-OpenCode 2 always requires Basic Auth on the managed server, so a password is always in effect. It is resolved in this order:
-
-1. **Via UI:** Use Settings → OpenCode → Server Auth to set a password at runtime
-2. **Environment variable:** Set `OPENCODE_SERVER_PASSWORD` in the compose `environment:` block. The default `docker-compose.yml` does not forward it from `.env`, so setting it there alone has no effect in Docker; use `.env` only for local runs outside Docker
-3. **Auto-generated:** When neither is configured, OpenCode Manager generates a random password and persists it in its database
-
-**DB-stored passwords take precedence over the environment variable, which takes precedence over the auto-generated password.**
diff --git a/docs/configuration/environment.md b/docs/configuration/environment.md
deleted file mode 100644
index b60cc84f..00000000
--- a/docs/configuration/environment.md
+++ /dev/null
@@ -1,246 +0,0 @@
-# Environment Variables
-
-Complete reference for all configuration options.
-
-## Authentication
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `AUTH_SECRET` | Session encryption secret (required for production) | Auto-generated in dev |
-| `ADMIN_EMAIL` | Pre-configured admin email | - |
-| `ADMIN_PASSWORD` | Pre-configured admin password | - |
-| `ADMIN_PASSWORD_RESET` | Set to `true` to reset admin password | `false` |
-| `AUTH_TRUSTED_ORIGINS` | Comma-separated list of trusted origins (frontend + backend). Browser requests that change state from another site (`Sec-Fetch-Site: same-site` or `cross-site`) are rejected unless their `Origin` is listed here. Never list the preview gateway origin. | `http://localhost:5173,http://localhost:5003` |
-| `AUTH_SECURE_COOKIES` | Use secure cookies (HTTPS only) | Runtime: `true` in prod, `false` in dev; Compose: `false` unless set |
-
-## OAuth Providers
-
-| Variable | Description |
-|----------|-------------|
-| `GITHUB_CLIENT_ID` | GitHub OAuth client ID |
-| `GITHUB_CLIENT_SECRET` | GitHub OAuth client secret |
-| `GOOGLE_CLIENT_ID` | Google OAuth client ID |
-| `GOOGLE_CLIENT_SECRET` | Google OAuth client secret |
-| `DISCORD_CLIENT_ID` | Discord OAuth client ID |
-| `DISCORD_CLIENT_SECRET` | Discord OAuth client secret |
-
-## Passkeys (WebAuthn)
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `PASSKEY_RP_ID` | Relying party ID (your domain) | `localhost` |
-| `PASSKEY_RP_NAME` | Display name for passkey prompts | `OpenCode Manager` |
-| `PASSKEY_ORIGIN` | Origin URL for WebAuthn (backend port) | `http://localhost:5003` |
-
-
-## Push Notifications (VAPID)
-
-| Variable | Description | Required |
-|----------|-------------|----------|
-| `VAPID_PUBLIC_KEY` | VAPID public key for push notifications | Yes |
-| `VAPID_PRIVATE_KEY` | VAPID private key for push notifications | Yes |
-| `VAPID_SUBJECT` | Contact email for VAPID (MUST use `mailto:` format) | Yes |
-
-### Generating VAPID Keys
-
-Generate VAPID public/private key pair:
-
-```bash
-pnpm dlx web-push generate-vapid-keys
-```
-
-Add to `.env`:
-
-```bash
-VAPID_PUBLIC_KEY=BMx-1234567890abcdefghijklmnopqrstuv...
-VAPID_PRIVATE_KEY=abcd1234567890abcdef...
-VAPID_SUBJECT=mailto:you@example.com
-```
-
-!!! warning "iOS/Safari Requirement"
- `VAPID_SUBJECT` **MUST** use `mailto:` format for iOS/Safari push notifications to work. Apple's push service rejects `https://` subjects.
-
- **Correct:** `VAPID_SUBJECT=mailto:you@yourdomain.com`
- **Incorrect:** `VAPID_SUBJECT=https://yourdomain.com`
-
-When configured, users can enable push notifications in Settings → Notifications to receive background alerts for agent events.
-
-## Server
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `PORT` | Server port | `5003` |
-| `HOST` | Server bind address | `0.0.0.0` |
-| `NODE_ENV` | Environment (`development` or `production`) | `development` |
-| `CORS_ORIGIN` | CORS origin for frontend | `http://localhost:5173` |
-| `LOG_LEVEL` | Accepted but currently unused; debug output is controlled by `DEBUG` | `info` |
-| `DEBUG` | Enable debug logging | `false` |
-
-## Preview Gateway
-
-The preview gateway serves dev servers through an authenticated, separate origin (see [Preview](../features/preview.md)).
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `PREVIEW_PORT` | Port for the preview gateway. Set to `0` to disable preview entirely. If the port is already in use, the Manager starts anyway, logs a warning and reports preview as unavailable. | `5004` |
-| `PREVIEW_PUBLIC_URL` | Same-site HTTPS origin that proxies the preview gateway; do not add it to `AUTH_TRUSTED_ORIGINS`. Set this when the Manager is served over HTTPS or behind a reverse proxy, where mixed content and third-party cookies otherwise block the preview iframe. | empty |
-
-## Database
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `DATABASE_PATH` | Path to SQLite database file | `./data/opencode.db` |
-
-## Workspace
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `WORKSPACE_PATH` | Path to workspace directory | `./workspace` (Docker: `/workspace`) |
-| `REPO_BROWSE_ROOT` | Root directory the folder browser may browse. When unset, folder browsing is disabled | empty (disabled) |
-
-## OpenCode Server
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `OPENCODE_SERVER_PORT` | Port for the OpenCode CLI server | `5551` |
-| `OPENCODE_HOST` | OpenCode server bind address | `127.0.0.1` |
-| `OPENCODE_HEALTH_WATCH_ENABLED` | Enable OpenCode health watcher and recovery | `true` (`false` in tests) |
-| `OPENCODE_HEALTH_POLL_MS` | OpenCode health watcher poll interval | `30000` |
-| `OPENCODE_HEALTH_FAILURE_THRESHOLD` | Failed health checks before recovery starts | `2` |
-| `OPENCODE_SERVER_PASSWORD` | Basic Auth password for the managed OpenCode server. OpenCode 2 always requires one: when unset, OpenCode Manager generates and persists a password (override it any time via Settings → OpenCode → Server Auth). DB-stored passwords override this env var. The default `docker-compose.yml` does not forward this variable from `.env`; add it to the compose `environment:` block or set it via Settings → OpenCode → Server Auth. | auto-generated |
-| `OPENCODE_BIN` | Path to an externally managed OpenCode binary. Overrides binary discovery; while set, in-app upgrade and version install are disabled (HTTP 409) | - |
-
-> **Upgrade note:** `OPENCODE_PUBLIC_URL` is no longer used. MCP OAuth redirects now point at the Manager's `/api/mcp-oauth-proxy/callback`, built from the request: the scheme comes from `X-Forwarded-Proto` (first value, `http` or `https` only), then the `Origin` header, then `http`; the host comes from `X-Forwarded-Host` when present, otherwise `Host`. Behind a reverse proxy, forward `X-Forwarded-Proto` and `X-Forwarded-Host` (or preserve `Host`) and remove `OPENCODE_PUBLIC_URL`; the Manager logs a warning at startup while it is still set.
-
-## OpenCode Import
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `OPENCODE_IMPORT_CONFIG_PATH` | Existing standalone OpenCode config file to import on first startup. When set to a single file, only that file is imported. When unset, the host's `opencode.json`, `opencode.jsonc`, and legacy `config.json` are mirrored into the workspace, workspace copies absent on the host are removed, and the mirrored legacy file is folded into the workspace config | - |
-| `OPENCODE_IMPORT_STATE_PATH` | Existing standalone OpenCode state directory to import on first startup | - |
-
-## Agent Sandboxing
-
-Sandboxed agent commands run inside a microVM managed by `msb` (see [Agent Sandboxing](../features/sandboxing.md)). Requires a Linux host with `/dev/kvm` and the sandbox compose overlay.
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `MSB_PATH` | Path to the `msb` executable | `msb` |
-| `MSB_LIBKRUNFW_PATH` | Path to the `libkrunfw` firmware library used by `msb` (set in the container image) | `/opt/microsandbox/lib/libkrunfw.so` |
-| `MSB_BACKEND` | Backend the microsandbox client uses | `local` |
-| `MSB_HOME` | Microsandbox home directory for state | `~/.microsandbox` |
-| `MSB_PROFILE` | Microsandbox profile passed through to the client | - |
-| `MSB_API_URL` | Microsandbox API URL passed through to the client | - |
-| `MSB_API_KEY` | Microsandbox API key passed through to the client | - |
-| `SANDBOX_IMAGE` | OCI image the microVM boots from. Digest-pinned by default so a rebuilt guest image is actually adopted; see [Sandbox Guest Image](../features/sandboxing.md#sandbox-guest-image) for what the default ships and how to build your own | `docker.io/cstechdev/ocm-sandbox@sha256:9df035cf…` |
-| `SANDBOX_MEMORY` | MicroVM memory (e.g. `4G`) | `4G` |
-| `SANDBOX_CPUS` | MicroVM CPU count | `2` |
-| `SANDBOX_EXEC_USER` | Guest identity sandboxed commands run as: a numeric `uid`, a numeric `uid:gid`, or a guest username. A numeric uid must match the Manager's effective uid (`PUID`); the compose overlay defaults it to `${PUID:-1000}`. A guest username is resolved to the Manager's effective `uid:gid` so writes to the mounted project roots always succeed. When a configured numeric identity cannot write the workspace, enforcement is reported unavailable | `${PUID:-1000}` via the overlay, otherwise `node` |
-| `SANDBOX_NET` | Network mode for the microVM: `public`, `private`, or `host`, or a comma-separated composition (for example `public,host`). Passed to `msb run --net` and attested against the profile's canonical network policy | `public` |
-| `SANDBOX_START_TIMEOUT_MS` | Timeout for microVM startup, in milliseconds | `300000` |
-| `SANDBOX_EXEC_TIMEOUT_MS` | Timeout for a single sandboxed command, in milliseconds | `600000` |
-
-## Timeouts
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `PROCESS_START_WAIT_MS` | Wait time for OpenCode process to start | `2000` |
-| `PROCESS_VERIFY_WAIT_MS` | Wait time for process health verification | `1000` |
-| `HEALTH_CHECK_TIMEOUT_MS` | OpenCode liveness probe timeout | `30000` |
-
-## File Limits
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `MAX_FILE_SIZE_MB` | Maximum file size for reading/preview | `50` |
-| `MAX_UPLOAD_SIZE_MB` | Maximum upload file size | `50` |
-
-## Frontend (Vite)
-
-| Variable | Description | Default |
-|----------|-------------|---------|
-| `VITE_API_URL` | Backend API URL for frontend. Empty (the default) means same-origin requests; the Vite dev server proxies `/api` to the backend | empty (same origin) |
-| `VITE_SERVER_PORT` | Backend port hint for frontend | `5003` |
-| `VITE_OPENCODE_PORT` | OpenCode server port hint | `5551` |
-| `VITE_MAX_FILE_SIZE_MB` | File size limit for frontend | `50` |
-| `VITE_MAX_UPLOAD_SIZE_MB` | Upload size limit for frontend | `50` |
-
-## Example .env File
-
-```bash
-# Server
-PORT=5003
-HOST=0.0.0.0
-NODE_ENV=production
-
-# Required for production
-AUTH_SECRET=generate-with-openssl-rand-base64-32
-
-# Pre-configured admin (optional)
-ADMIN_EMAIL=admin@example.com
-ADMIN_PASSWORD=your-secure-password
-
-# Remote access (optional - include both frontend and backend ports)
-AUTH_TRUSTED_ORIGINS=http://localhost:5173,http://localhost:5003,http://192.168.1.244:5003
-AUTH_SECURE_COOKIES=false
-
-# OAuth providers (optional)
-GITHUB_CLIENT_ID=your-client-id
-GITHUB_CLIENT_SECRET=your-client-secret
-
-# Passkeys (optional - use BACKEND port)
-PASSKEY_RP_ID=localhost
-PASSKEY_RP_NAME=OpenCode Manager
-PASSKEY_ORIGIN=http://localhost:5003
-
-# Push notifications (optional)
-VAPID_PUBLIC_KEY=BMx-1234567890abcdefghijklmnopqrstuv...
-VAPID_PRIVATE_KEY=abcd1234567890abcdef...
-VAPID_SUBJECT=mailto:you@example.com
-```
-
-## Generating Secrets
-
-### AUTH_SECRET
-
-Generate a secure random secret:
-
-```bash
-openssl rand -base64 32
-```
-
-Output example:
-```
-K7gNU3sdo+OL0wNhqoVWhr3g6s1xYv72ol/pe/Unols=
-```
-
-
-### VAPID Keys
-
-Generate VAPID public/private key pair for push notifications:
-
-```bash
-pnpm dlx web-push generate-vapid-keys
-```
-
-Output example:
-```
-=======================================
-Public Key:
-BMx-1234567890abcdefghijklmnopqrstuv...
-
-Private Key:
-abcd1234567890abcdef...
-
-Subject:
-mailto:you@example.com
-===========================================
-```
-
-!!! warning "iOS/Safari Requirement"
- `VAPID_SUBJECT` **MUST** use `mailto:` format for iOS/Safari push notifications to work.
-
-
-## Environment Precedence
-
-Local runtime loads `.env` from the project root with `dotenv` without overriding variables that are already present in the process environment. Docker Compose reads `.env` for interpolation, then passes the explicit `environment` entries from `docker-compose.yml` into the container.
diff --git a/docs/configuration/oauth.md b/docs/configuration/oauth.md
deleted file mode 100644
index bc774a4f..00000000
--- a/docs/configuration/oauth.md
+++ /dev/null
@@ -1,170 +0,0 @@
-# OAuth Providers
-
-Configure social login with OAuth providers.
-
-## Supported Providers
-
-| Provider | Purpose |
-|----------|---------|
-| GitHub | Social login |
-| Google | Social login |
-| Discord | Social login |
-
-!!! note "Callback base URL"
- Callback URLs are built from the **first** entry in `AUTH_TRUSTED_ORIGINS`. The `localhost:5003` examples below match the Docker default. With `pnpm dev`, the default first origin is `http://localhost:5173`, so register `http://localhost:5173/api/auth/callback/` instead.
-
-## GitHub OAuth
-
-### Create OAuth App
-
-1. Go to [GitHub Developer Settings](https://github.com/settings/developers)
-2. Click **OAuth Apps** > **New OAuth App**
-3. Fill in:
- - **Application name**: `OpenCode Manager`
- - **Homepage URL**: `http://localhost:5003`
- - **Authorization callback URL**: `http://localhost:5003/api/auth/callback/github`
-4. Click **Register application**
-5. Copy **Client ID**
-6. Generate and copy **Client Secret**
-
-### Configure
-
-```bash
-GITHUB_CLIENT_ID=your-client-id
-GITHUB_CLIENT_SECRET=your-client-secret
-```
-
-### Callback URL
-
-Adjust the callback URL for your environment:
-
-| Environment | Callback URL |
-|-------------|--------------|
-| Local | `http://localhost:5003/api/auth/callback/github` |
-| Production | `https://yourdomain.com/api/auth/callback/github` |
-
-## Google OAuth
-
-### Create OAuth Client
-
-1. Go to [Google Cloud Console](https://console.cloud.google.com/)
-2. Create a new project or select existing
-3. Go to **APIs & Services** > **Credentials**
-4. Click **Create Credentials** > **OAuth client ID**
-5. Select **Web application**
-6. Configure:
- - **Name**: `OpenCode Manager`
- - **Authorized redirect URIs**: `http://localhost:5003/api/auth/callback/google`
-7. Click **Create**
-8. Copy **Client ID** and **Client Secret**
-
-### Configure
-
-```bash
-GOOGLE_CLIENT_ID=your-client-id
-GOOGLE_CLIENT_SECRET=your-client-secret
-```
-
-### Consent Screen
-
-You may need to configure the OAuth consent screen:
-
-1. Go to **APIs & Services** > **OAuth consent screen**
-2. Select **External** (or Internal for Workspace)
-3. Fill in required fields
-4. Add scopes: `email`, `profile`
-5. Save
-
-## Discord OAuth
-
-### Create Application
-
-1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
-2. Click **New Application**
-3. Name it `OpenCode Manager`
-4. Go to **OAuth2** section
-5. Add redirect: `http://localhost:5003/api/auth/callback/discord`
-6. Copy **Client ID** and **Client Secret**
-
-### Configure
-
-```bash
-DISCORD_CLIENT_ID=your-client-id
-DISCORD_CLIENT_SECRET=your-client-secret
-```
-
-## Using OAuth Login
-
-Once configured:
-
-1. Go to the login page
-2. Click the provider button (GitHub, Google, Discord)
-3. Authorize on the provider's page (the browser redirects there and back)
-4. You're logged in
-
-### First OAuth Login
-
-On first OAuth login:
-
-- An account is created automatically, unless a preconfigured admin (`ADMIN_EMAIL` and `ADMIN_PASSWORD`) is set; then sign-up is disabled and an OAuth login without an existing account is rejected
-- Email from provider is used
-- No password is set (OAuth-only)
-
-### Linking Accounts
-
-If you have an existing account, logging in with an OAuth provider that uses the same email links the accounts automatically, as long as the provider reports that email as verified. Otherwise the login fails with an "account not linked" error.
-
-## Production Considerations
-
-### Update Callback URLs
-
-Before deploying, update OAuth apps with production URLs:
-
-```
-https://yourdomain.com/api/auth/callback/github
-https://yourdomain.com/api/auth/callback/google
-https://yourdomain.com/api/auth/callback/discord
-```
-
-### Verify Domains
-
-Some providers require domain verification:
-
-- Google requires verification for production
-- Discord may require verification for many users
-
-### Secrets Management
-
-- Never commit OAuth secrets to version control
-- Use environment variables or secrets management
-- Rotate secrets periodically
-
-## Troubleshooting
-
-### Redirect URI Mismatch
-
-Error: "redirect_uri_mismatch" or similar
-
-**Solution:**
-1. Check callback URL in provider settings
-2. Ensure exact match (including trailing slash)
-3. Verify protocol (http vs https)
-4. Check port number
-
-### Invalid Client
-
-Error: "invalid_client" or "unauthorized_client"
-
-**Solution:**
-1. Verify Client ID is correct
-2. Check Client Secret hasn't changed
-3. Ensure OAuth app is not suspended
-
-### Access Denied
-
-Error: "access_denied" or user cancels
-
-**Solution:**
-1. User may have denied permission
-2. Check required scopes are configured
-3. Verify consent screen is configured properly
diff --git a/docs/development/contributing.md b/docs/development/contributing.md
deleted file mode 100644
index 848d2560..00000000
--- a/docs/development/contributing.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# Contributing
-
-Guide for contributing to OpenCode Manager.
-
-## Getting Started
-
-1. Fork the repository
-2. Clone your fork
-3. Set up local development (see [Local Setup](setup.md))
-4. Create a feature branch
-5. Make changes
-6. Submit a pull request
-
-## Code Style
-
-- No comments — code should be self-documenting
-- No console.log — use proper logging
-- Strict TypeScript — proper typing everywhere
-- Named imports — no default imports
-- DRY principles — don't repeat yourself
-- SOLID design — follow SOLID principles
-
-## Pull Request Process
-
-### Before Submitting
-
-1. Run linting: `pnpm lint`
-2. Run tests: `pnpm test`
-3. Check types: `pnpm typecheck`
-4. Verify your changes work manually
-
-### Commit Messages
-
-Format: `type: brief description`
-
-Types:
-- `feat` - New feature
-- `fix` - Bug fix
-- `docs` - Documentation
-- `refactor` - Code refactoring
-- `test` - Adding tests
-- `chore` - Maintenance
-
-Examples:
-```
-feat: add file upload progress indicator
-fix: resolve session expiry on mobile
-docs: update installation guide
-refactor: extract git service from routes
-```
diff --git a/docs/development/setup.md b/docs/development/setup.md
deleted file mode 100644
index 81d37c9c..00000000
--- a/docs/development/setup.md
+++ /dev/null
@@ -1,261 +0,0 @@
-# Local Development Setup
-
-Guide for setting up a local development environment.
-
-## Prerequisites
-
-- [pnpm](https://pnpm.io/installation) - Package manager (required for workspaces)
-- [Bun](https://bun.sh) - Backend runtime
-- [OpenCode TUI](https://opencode.ai) 2.x, 2.0.15 or newer - `curl -fsSL https://opencode.ai/v2/install | bash`
-
-## Installation
-
-```bash
-# Clone the repository
-git clone https://github.com/chriswritescode-dev/opencode-manager.git
-cd opencode-manager
-
-# Install dependencies
-pnpm install
-```
-
-The `pnpm dev` command automatically runs `scripts/setup-dev.sh` first, which:
-- Checks prerequisites (pnpm, bun, git, OpenCode TUI)
-- Creates required workspace directories
-- Copies `.env.example` to `.env` if missing
-
-Then start development servers:
-
-```bash
-pnpm dev
-```
-
-This starts:
-
-- **Backend** on http://localhost:5003
-- **Frontend** on http://localhost:5173 (with HMR)
-
-## Project Structure
-
-```
-opencode-manager/
-├── backend/ # Bun + Hono API server
-│ ├── src/
-│ │ ├── routes/ # API route handlers
-│ │ ├── services/ # Business logic
-│ │ ├── db/ # Database migrations and queries
-│ │ │ └── migrations/ # Numbered migration files
-│ │ ├── types/ # TypeScript types
-│ │ ├── utils/ # Utility functions
-│ │ └── index.ts # Entry point
-│ └── test/ # Backend tests
-├── frontend/ # React + Vite SPA
-│ ├── src/
-│ │ ├── components/ # UI components
-│ │ ├── pages/ # Page components
-│ │ ├── hooks/ # Custom React hooks
-│ │ ├── api/ # API client
-│ │ ├── lib/ # Utilities
-│ │ ├── stores/ # Zustand stores
-│ │ └── contexts/ # React contexts
-│ └── public/ # Static assets
-├── shared/ # @opencode-manager/shared types and utilities
-├── ocm-cli/ # ocm CLI for attaching a local OpenCode TUI to Manager repos
-├── workspace/ # Runtime workspace for OpenCode
-├── docs/ # Documentation
-├── scripts/ # Build and utility scripts
-├── Dockerfile # Docker image definition
-└── docker-compose.yml # Docker Compose configuration
-```
-
-## Available Scripts
-
-### Root Level
-
-```bash
-pnpm dev # Start both backend and frontend (runs setup-dev.sh first)
-pnpm dev:backend # Start backend only
-pnpm dev:frontend # Start frontend only
-pnpm build # Build CLI, backend, and frontend
-pnpm lint # Lint CLI, frontend, and backend
-pnpm test # Run CLI, backend, and frontend tests
-```
-
-### Backend
-
-```bash
-cd backend
-bun --watch-path src --watch src/index.ts # Start with hot reload
-pnpm test # Run bun tests, then Vitest with coverage
-vitest # Run single test file
-vitest --ui # Test UI
-vitest --coverage # Coverage report
-eslint . --ext .ts # Lint
-tsc --noEmit # TypeScript check
-```
-
-### Frontend
-
-```bash
-cd frontend
-pnpm dev # Start Vite dev server
-pnpm build # Production build
-pnpm lint # ESLint
-pnpm typecheck # TypeScript check
-```
-
-## Database
-
-Using Bun's built-in SQLite (`bun:sqlite`) with numbered migrations.
-
-### Location
-
-- **Development**: `./data/opencode.db`
-- **Docker**: `/app/data/opencode.db`
-
-### Schema Changes
-
-1. Add new migration file in `backend/src/db/migrations/` (e.g., `007-new-feature.ts`)
-2. Export the migration in `backend/src/db/migrations/index.ts`
-3. Migrations run automatically on startup
-
-### Inspection
-
-```bash
-sqlite3 ./data/opencode.db
-
-# Useful commands
-.tables # List tables
-.schema user # Show table schema
-SELECT * FROM user; # View data
-```
-
-## Testing
-
-### Running Tests
-
-```bash
-# All tests
-cd backend && pnpm test
-
-# Single file
-cd backend && pnpm test src/services/repo.test.ts
-
-# With UI
-cd backend && pnpm test:ui
-
-# With coverage
-cd backend && pnpm test -- --coverage
-```
-
-### Writing Tests
-
-```typescript
-import path from 'path'
-import { describe, it, expect } from 'vitest'
-import { Database } from 'bun:sqlite'
-import { getReposPath } from '@opencode-manager/shared/config/env'
-import { migrate } from '../src/db/migration-runner'
-import { allMigrations } from '../src/db/migrations'
-import { createRepoRow } from '../src/services/repo'
-
-describe('createRepoRow', () => {
- it('creates a ready local repo row', () => {
- const db = new Database(':memory:')
- migrate(db, allMigrations)
-
- const { repo, created } = createRepoRow(db, {
- name: 'demo',
- localPath: 'demo',
- fullPath: path.join(getReposPath(), 'demo'),
- })
-
- expect(created).toBe(true)
- expect(repo.cloneStatus).toBe('ready')
- expect(repo.isLocal).toBe(true)
-
- db.close()
- })
-})
-```
-
-### Coverage Requirements
-
-Minimum 80% coverage is enforced.
-
-## Debugging
-
-### Backend
-
-Logs output to terminal when running `pnpm dev`. For verbose debug logging:
-
-```bash
-# Add to .env
-DEBUG=true
-```
-
-### Frontend
-
-1. Open browser DevTools (F12)
-2. Check Console for errors
-3. Check Network tab for API calls
-4. Use React DevTools extension
-
-## Building
-
-### Development Build
-
-```bash
-pnpm build
-```
-
-### Production Build
-
-```bash
-NODE_ENV=production pnpm build
-```
-
-### Docker Build
-
-```bash
-docker build -t opencode-manager .
-```
-
-## Common Issues
-
-### Port Already in Use
-
-```bash
-# Find process using port
-lsof -i :5003
-
-# Kill process
-kill -9
-```
-
-### Module Not Found
-
-```bash
-# Clear node_modules and reinstall
-rm -rf node_modules
-rm -rf */node_modules
-pnpm install
-```
-
-### TypeScript Errors
-
-```bash
-# Check types
-pnpm typecheck
-
-# Clear TypeScript cache
-rm -rf */tsconfig.tsbuildinfo
-```
-
-### Database Issues
-
-```bash
-# Reset database
-rm -f data/opencode.db
-pnpm dev # Database is recreated
-```
diff --git a/docs/features/ai-config.md b/docs/features/ai-config.md
deleted file mode 100644
index 979b6018..00000000
--- a/docs/features/ai-config.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# AI Configuration
-
-Configure AI models, providers, and custom agents.
-
-## Model Selection
-
-### Quick Model Switcher
-
-A compact model switcher is embedded directly in the chat interface. Click the **model name** in the prompt area or chat header to open the quick-select popover:
-
-| Item | Description |
-|------|-------------|
-| **Active model** | Shown at the top with a checkmark. Click the star icon to add or remove from favorites. |
-| **Favorites** | Pinned models always appear first in the list. |
-| **Recents** | Last 10 used models appear below favorites (excluding the active one and any favorites). |
-| **Variants** | Some models offer tier options (e.g., fast or pro). Variant items are highlighted and show a checkmark on the active selection. |
-| **More models** | Opens the full model browser when you need a model not in recents or favorites. |
-
-Favorites, recents, and variant choices are stored in OpenCode's own state file (`.opencode/state/opencode/model.json` in the workspace), so they are shared with the OpenCode TUI and survive Manager restarts. The active model itself is not persisted: on page load it resolves the same way the OpenCode TUI does — the `model` set in `opencode.json`, otherwise your most recent valid model, otherwise the provider default. A model you pick during a session stays active until the page is reloaded.
-
-### Per-Agent and Per-Session Models
-
-Each agent can declare its own `model` in `opencode.json`, which becomes that agent's default. When you open an existing session, the model, agent, and variant used by its last message are restored from the session itself, so switching between sessions keeps each one's selection.
-
-### Full Model Browser
-
-To browse all available models:
-
-1. Click **More models** in the quick-select popover
-2. Filter by provider or search by name
-3. Click a model to select it
-
-### Changing Models Mid-Session
-
-You can switch models at any point during a session without losing context. The new model is used for all subsequent messages.
-
-## Providers
-
-Configure API keys or OAuth for AI providers.
-
-
-
-### API Key Method
-
-1. Go to **Settings > Providers**
-2. Select a provider (OpenAI, Anthropic, etc.)
-3. Enter your API key
-4. Click **Save**
-
-### OAuth Method
-
-For providers that support OAuth (Anthropic, GitHub Copilot):
-
-1. Go to **Settings > Providers**
-2. Under **OAuth Providers**, click **Connect** (or **Reconnect**) on the provider
-3. In the **Connect to ** dialog, choose an authentication method
-4. Complete the flow:
- - Browser-based methods open the provider's sign-in page
- - Code-based methods show an **Authorization Code** field; paste the code and click **Complete Authentication**
-
-### Testing Credentials
-
-After adding credentials:
-
-1. Open a chat session and click the model selector
-2. Models from that provider should appear
-3. Select a model and try sending a message
-
-If models don't appear, verify your API key and check for errors.
-
-## Custom Agents
-
-Create specialized AI agents with custom configurations.
-
-### Creating an Agent
-
-1. Go to **Settings → OpenCode Config → Agents**
-2. Click **Add Agent**
-3. Configure:
- - **Name** - Display name for the agent
- - **Description** - What this agent does
- - **System Prompt** - Instructions for the AI
- - **Default Model** - Model to use
- - **Tools Configuration** - Toggle the built-in Write, Edit, Bash, and Web Fetch tools
-
-4. Click **Save**
-
-### System Prompt Tips
-
-Write effective system prompts:
-
-```
-You are a code review expert specializing in TypeScript and React.
-
-When reviewing code:
-1. Check for type safety issues
-2. Look for potential bugs
-3. Suggest performance improvements
-4. Ensure consistent code style
-
-Be concise but thorough. Prioritize issues by severity.
-```
-
-### Tool Permissions
-
-The **Tools Configuration** section toggles each built-in tool on or off:
-
-- **Write** - Create and modify files
-- **Edit** - Edit existing files
-- **Bash** - Run shell commands
-- **Web Fetch** - Fetch content from the web
-
-The **Permissions** section sets each of **Edit**, **Bash**, and **Web Fetch** to **Ask**, **Allow**, or **Deny**.
-
-This is useful for:
-
-- Security-focused agents that shouldn't modify files
-- Research agents that only need read access
-- Specialized agents for specific tasks
-
-### Using Custom Agents
-
-1. Start a new session
-2. Click the agent selector
-3. Choose your custom agent
-4. Chat with the specialized agent
-
-## Context Usage
-
-Monitor token usage with the context indicator:
-
-- Progress bar shows current usage
-- Updates as conversation grows
-- Warning when approaching limits
-
-### Managing Context
-
-When context is running low:
-
-1. Use `/compact` to summarize history
-2. Start a new session with `/new`
-3. Be more concise in prompts
-4. Remove unnecessary file mentions
-
-### Context Limits
-
-Different models have different context limits. Check your provider's documentation for exact limits per model.
diff --git a/docs/features/assistant-internal-api.md b/docs/features/assistant-internal-api.md
deleted file mode 100644
index 0c3c6335..00000000
--- a/docs/features/assistant-internal-api.md
+++ /dev/null
@@ -1,534 +0,0 @@
-# Assistant Internal API
-
-The Assistant Internal API provides capabilities for OpenCode agents to interact with the manager backend. Agents reach it through the `ocm` tool, which authenticates on their behalf; the HTTP surface itself is a secure bearer-token API.
-
-> For a user-facing overview of how to use and set up assistant mode, see [Assistant Mode](assistant-mode.md).
-
-## Authentication
-
-The raw HTTP endpoints require a bearer token:
-
-```
-Authorization: Bearer
-```
-
-The token has two in-product consumers, neither of which is an agent:
-
-| Consumer | How it obtains the token |
-|----------|--------------------------|
-| Generated plugins (`ocm-manager.js`, `ocm-sandbox.js`, `ocm-gh-env.js`) | The `OCM_INTERNAL_TOKEN` environment variable, injected into the OpenCode child process |
-| External clients such as the `ocm` CLI | Settings → OpenCode Config → Server maintenance → Manager Internal Token, served by `GET /api/settings/manager-token` |
-
-The generated plugins are OpenCode 2 plugin modules — plain, dependency-free objects that default-export `{ id, setup }` and register their hooks and tools through the `setup` context. The Manager writes them to `/opencode/plugins/`; the legacy `opencode/plugin/` files are removed on install.
-
-Agents never authenticate against this API themselves. They call the `ocm` tool, which holds the token inside the Manager process.
-
-## The `ocm` Tool
-
-The Manager installs a generated plugin (`ocm-manager.js`) that gives every agent an `ocm` tool. The tool calls this API from inside the Manager's own OpenCode process, so it needs no token, no base URL, and no network access from the agent shell.
-
-That makes it the only path that works everywhere: a scheduled run executes in a throwaway worktree with no token of its own, and a sandboxed `shell` call runs in a microVM where `localhost` is the guest, not the Manager.
-
-OpenCode 2 validates the tool's arguments against a JSON Schema before it calls `execute`, so the `ocm` tool declares its `action` and `params` shape as a JSON Schema derived from the same Zod definitions the tool uses.
-
-The tool has two actions.
-
-### `send_notification`
-
-Send a push notification to every device the user has registered.
-
-```ts
-{
- action: 'send_notification',
- params: { title: string, body: string, url?: string, tag?: string, priority?: 'normal' | 'high' }
-}
-```
-
-### `request`
-
-Call an allow-listed internal API route and return the raw response body text.
-
-```ts
-{
- action: 'request',
- params: { method: 'GET' | 'POST' | 'PATCH' | 'DELETE', path: string, body?: object }
-}
-```
-
-The `path` is relative to the internal API base (for example `/settings` or `/repos/0/schedules`) and query strings are allowed. The action resolves the path against the internal API base and rejects anything that resolves outside it (absolute URLs and `..` traversal), then rejects any method plus path that is not in the allow-list.
-
-**Allow-listed routes:**
-
-```
-GET /settings
-PATCH /settings
-GET /opencode-config
-GET /opencode-config/effective
-GET /opencode-config/mcp
-PATCH /opencode-config
-POST /assistant/reload
-GET /repos
-GET /repos/*/git-info
-GET /opencode-workspaces
-GET /schedules/all
-GET /schedules/all/runs
-GET /repos/*/schedules
-POST /repos/*/schedules
-GET /repos/*/schedules/*
-PATCH /repos/*/schedules/*
-DELETE /repos/*/schedules/*
-POST /repos/*/schedules/*/run
-GET /repos/*/schedules/*/runs
-DELETE /repos/*/schedules/*/runs
-GET /repos/*/schedules/*/runs/*
-DELETE /repos/*/schedules/*/runs/*
-POST /repos/*/schedules/*/runs/*/cancel
-GET /sessions
-POST /sessions
-POST /sessions/*/prompt
-GET /sessions/*/reply
-POST /sessions/*/fork
-```
-
-**Deliberately not allow-listed:**
-
-- `POST /notifications/send` — use the `send_notification` action instead.
-- `GET /git-credentials/gh-env` — returns the GitHub CLI environment (`GH_TOKEN`, `GITHUB_TOKEN`) for a working directory for the OpenCode host process; it must not be readable by the agent.
-- `POST /sandbox/shell` — the sandbox planner's internal route that resolves and pins the shell for a `shell` call; exposing it would let the agent drive shell planning directly.
-- `/repos/*/mirror/*` — the repo mirror protocol that the `ocm` CLI uses to sync entire repositories; it can create, replace, patch, or delete whole repos, so it stays reserved for the CLI.
-
-Agents should use the `ocm` tool rather than the raw bearer-token endpoints below. Those endpoints remain available to the frontend, generated plugins, and other Manager-internal clients.
-
-## Endpoints
-
-### Notifications
-
-**POST `/api/internal/notifications/send`**
-
-Send push notifications to the user's registered devices. Prefer the `ocm` tool with the `send_notification` action.
-
-**Request Body:**
-```ts
-{
- title: string // 1-120 characters
- body: string // 1-500 characters
- url?: string // Optional: deep link (1-500 chars)
- tag?: string // Optional: notification tag (max 80 chars)
- priority?: 'normal' | 'high'
-}
-```
-
-**Query Parameters:**
-- `userId` (optional): Defaults to `"default"`
-
-**Response:**
-```ts
-{
- delivered: number
- expired: number
- failed: number
- noSubscriptions: boolean
-}
-```
-
-**Rate Limiting:** 10 requests per minute per token. Returns `429 Too Many Requests` with `Retry-After` header when exceeded.
-
-**Status Codes:**
-- `200`: Notification sent
-- `400`: Invalid request body
-- `401`: Missing or invalid bearer token
-- `429`: Rate limit exceeded
-- `503`: Push notifications not configured (missing VAPID)
-
-### Settings
-
-**GET `/api/internal/settings`**
-
-Retrieve the user's full settings and preferences.
-
-**Query Parameters:**
-- `userId` (optional): Defaults to `"default"`
-
-**Response:**
-```ts
-{
- preferences: {
- theme: 'dark' | 'light' | 'system',
- colorTheme?: string, // 'manager' or an OpenCode theme id from shared/src/themes; unknown stored ids read as 'manager'
- mode: 'plan' | 'build',
- defaultModel?: string,
- defaultAgent?: string,
- autoScroll: boolean,
- expandDiffs: boolean,
- expandToolCalls: boolean,
- showReasoning: boolean,
- simpleChatMode: boolean,
- leaderKey?: string,
- directShortcuts?: string[],
- keyboardShortcuts: Record,
- customCommands: Array<{ name: string; description: string; promptTemplate: string }>,
- notifications?: { enabled: boolean; ... },
- repoOrder?: number[],
- repoSortMode: 'recent' | 'manual' | 'name',
- gitCredentials?: [...], // Read-only
- gitIdentity?: {...}, // Read-only
- gitIdentities?: [...], // Read-only
- tts?: {...}, // Read-only
- stt?: {...}, // Read-only
- },
- updatedAt: number
-}
-```
-
-**PATCH `/api/internal/settings`**
-
-Update a subset of safe user preferences.
-
-**Allowed Keys:**
-The following preference keys can be modified:
-- `theme`, `colorTheme`, `mode`, `defaultModel`, `defaultAgent`
-- `autoScroll`, `expandDiffs`, `expandToolCalls`, `showReasoning`
-- `simpleChatMode`, `leaderKey`, `directShortcuts`
-- `keyboardShortcuts`, `customCommands`, `notifications`
-- `repoOrder`, `repoSortMode`
-- `colorTheme` must be `manager` or a catalog theme id; unknown ids return 400.
-- `tts` — Non-secret TTS preferences (`enabled`, `provider`, `autoPlay`, `voice`, `model`, `speed`). TTS must already be configured in the UI (the endpoint returns 400 otherwise).
-- `stt` — Non-secret STT preferences (`enabled`, `provider`, `model`, `language`). STT must already be configured in the UI (the endpoint returns 400 otherwise).
-
-**Restricted Keys:**
-The following keys are **NOT** allowed and will be rejected:
-- `gitCredentials` - Git credentials must be managed via the full UI
-- `gitIdentity` - Git identity must be managed via the full UI
-- `gitIdentities` - Git identity presets must be managed via the full UI
-- `tts.apiKey` - TTS credentials must be managed via the full UI
-- `tts.endpoint` - TTS endpoint must be managed via the full UI
-- `stt.apiKey` - STT credentials must be managed via the full UI
-- `stt.endpoint` - STT endpoint must be managed via the full UI
-- `lastKnownGoodConfig` - Internal state, do not modify
-
-**Request Body:**
-Partial object with any of the allowed keys.
-
-**Response:**
-Returns the updated settings object.
-
-**Status Codes:**
-- `200`: Settings updated
-- `400`: Invalid request body or disallowed key
-- `401`: Missing or invalid bearer token
-
-### OpenCode Configuration
-
-The global OpenCode configuration files in the workspace `.config/opencode/` directory are the source of truth, and these endpoints are the only supported way to change them. The two sources OpenCode 2 reads are merged in order — `opencode.json`, `opencode.jsonc` — with later files overriding earlier ones. A legacy `config.json` is folded into a recognized source and archived; it is never read as a live source. The schema accepts both V1-compatible keys and native OpenCode 2 fields, so a V2-native config passes validation. The endpoints apply the same rules as the Settings UI: any semantic change is written to disk and applied to the running server, and it is flagged as restart required only when that apply fails; comment-only edits do nothing, and `mcp` changes go through the same location reload, which reconnects only the servers whose configuration changed.
-
-The agent-facing surface is redacted: every read and write response replaces secret values with `` and omits the raw source text, a write containing `` is rejected, and `PATCH` changes only the paths it names, so an agent never has to read or reproduce the whole file. The public surface the Settings UI uses keeps full fidelity and the whole-document `PUT`.
-
-**GET `/api/internal/opencode-config`**
-
-Read the merged persisted configuration and its source files, with secret values redacted and the raw source text omitted. This is not the running instance configuration: project overrides and expanded environment values are not included.
-
-**Response:**
-```ts
-{
- path: string // Absolute path of the preferred write target
- content: object // Merged configuration across all sources, secrets replaced with ""
- sources: Array<{ // Recognized source files, in merge order, raw content omitted
- name: 'opencode.json' | 'opencode.jsonc'
- path: string
- content: object
- isValid: boolean
- validationIssues?: Array<{ path: string, message: string }>
- updatedAt: number
- }>
- revision: string // Hash of the source set; send back as expectedRevision
- isValid: boolean // Whether every source passes schema validation
- validationIssues?: Array<{ path: string, message: string }>
- updatedAt: number // Newest source mtime
- redactedPaths: string[] // Dotted paths whose values were replaced
-}
-```
-
-**Status Codes:**
-- `200`: Configuration state returned
-- `401`: Missing or invalid bearer token
-- `404`: No config source found
-- `500`: Server error
-
-**GET `/api/internal/opencode-config/mcp`**
-
-List the configured MCP servers with their stored shape, enabled state, and live connection status. Header and environment values are never returned.
-
-**Response:**
-```ts
-{
- revision: string | null
- servers: Array<{
- name: string
- type: 'local' | 'remote'
- command?: string[] // For local servers
- url?: string // For remote servers
- enabled: boolean
- shape: 'servers' | 'legacy' // Native mcp.servers. or flat mcp.
- status?: 'connected' | 'pending' | 'disabled' | 'failed' | 'needs_auth'
- error?: string
- }>
-}
-```
-
-**Status Codes:**
-- `200`: MCP server list returned
-- `401`: Missing or invalid bearer token
-- `500`: Server error
-
-**GET `/api/internal/opencode-config/effective`**
-
-Read the configuration OpenCode resolves for the workspace location as `entries`: the configuration documents and discovery directories in precedence order, lowest first, each shaped as `{ type: 'document', path, info }` or `{ type: 'directory', path }`. Its `info` values are expanded for the running server, so never copy this response into a save. Secret values in `info` are replaced with ``.
-
-**Status Codes:**
-- `200`: Effective configuration returned
-- `401`: Missing or invalid bearer token
-- `502`: OpenCode returned an error
-- `503`: OpenCode server unavailable
-
-**PATCH `/api/internal/opencode-config`**
-
-Change only the paths the request names. Only those paths are patched into the preferred existing source (`opencode.jsonc` > `opencode.json`; a new installation gets `opencode.jsonc`); comments, unknown keys, and untouched inherited values are preserved. A `null` value removes a path. Removing a path defined only in a lower-priority source is rejected (`409`).
-
-The public route keeps the whole-document `PUT` for the Settings UI; the internal route exposes `PATCH` instead.
-
-**Request Body:**
-```ts
-{
- patch: object // Nested paths to set; null removes a path
- expectedRevision?: string // From GET; a stale value is rejected with 409
- source?: 'opencode.json' | 'opencode.jsonc'
-}
-```
-
-**Response:**
-Returns the refreshed redacted configuration. Semantic changes, including `mcp`, are applied with an OpenCode location reload, without a restart; only the MCP servers whose configuration changed reconnect. Adds `restartRequired: true` only when that apply fails.
-
-**Status Codes:**
-- `200`: Configuration written
-- `400`: Invalid request body, invalid configuration, a source file that is not valid JSON/JSONC (`sources` lists them), or a value equal to `` (`paths` lists them)
-- `401`: Missing or invalid bearer token
-- `409`: Stale `expectedRevision` (`expectedRevision`/`actualRevision` in the body), or the patch would remove a value defined only in a lower-priority source (`paths`/`sources` in the body)
-- `500`: Server error
-
-### Assistant
-
-**POST `/api/internal/assistant/reload`**
-
-Reload the OpenCode server configuration, rebuilding every loaded location. Use this after editing `.opencode/agents/assistant.md` or `opencode.json` so changes take effect on the next message. Returns `400` with `validationIssues` when the OpenCode configuration is invalid.
-
-**Rate Limiting:** 5 requests per minute per token. Returns `429 Too Many Requests` with `Retry-After` header when exceeded.
-
-**Example:**
-```json
-{
- "action": "request",
- "params": {
- "method": "POST",
- "path": "/assistant/reload"
- }
-}
-```
-
-**Response:**
-```ts
-{ "success": true }
-```
-
-**Status Codes:**
-- `200`: Assistant workspace reloaded
-- `400`: OpenCode configuration is invalid (`validationIssues` in the body)
-- `401`: Missing or invalid bearer token
-- `429`: Rate limit exceeded
-- `502`: Failed to reload (upstream OpenCode error)
-
-### Repos
-
-**GET `/api/internal/repos`**
-
-Retrieve a list of all managed repositories, ordered by the user's repo preference order.
-
-**Response:**
-```ts
-{
- repos: Array<{
- id: number
- repoUrl?: string // Git remote URL (absent for local-only repos)
- localPath: string // Relative path under repos root
- fullPath: string // Absolute filesystem path
- sourcePath?: string // Source worktree path (for worktrees)
- branch?: string // Current branch name (for worktrees)
- defaultBranch: string // e.g. "main"
- cloneStatus: 'cloning' | 'ready' | 'error'
- clonedAt: number // Timestamp when repo was cloned
- lastPulled?: number // Timestamp of last pull
- lastAccessedAt?: number // Timestamp of last access
- isWorktree?: boolean // Whether repo is a worktree
- isLocal?: boolean // Whether repo is local-only
- }>
-}
-```
-
-**Status Codes:**
-- `200`: Repository list returned
-- `401`: Missing or invalid bearer token
-- `500`: Server error (database failure)
-
-### Sessions
-
-These routes back the `session-management` skill, so an agent can start work in a repo, hand a task to a new session, follow it up, read its reply, and fork it. Session creation always goes through the Manager's session launcher, which validates the repository and the requested model before creating anything. Malformed JSON is rejected with `{ "error": "Invalid JSON" }`; a body that fails validation is rejected with `{ "error": "", "details": [...] }`; unknown upstream failures return `502`.
-
-**GET `/api/internal/sessions`**
-
-List sessions, newest first. Pass `repoId` to restrict the list to one repo — this covers every OpenCode workspace of that repo, not only the repo directory — and `limit` (1-50, default 10) to bound it.
-
-**Query Parameters:**
-- `repoId` (optional): Restrict to a repository. An unknown id returns `404`.
-- `limit` (optional): 1-50, default 10.
-
-**Response:**
-```ts
-{
- sessions: Array<{
- id: string
- title: string | null
- directory: string
- repoId: number | null // null only when the directory belongs to no known repo
- busy: boolean // true while the session is running
- outcome: 'succeeded' | 'failed' | 'interrupted' | null
- updated: number
- }>
-}
-```
-
-**Status Codes:**
-- `200`: Session list returned
-- `400`: Invalid query
-- `401`: Missing or invalid bearer token
-- `404`: Repository not found
-- `502`: OpenCode error
-
-**POST `/api/internal/sessions`**
-
-Create a session in a repo and send the first prompt. The response returns as soon as the prompt is queued, not when the run finishes; poll `GET /api/internal/sessions/:sessionId/reply` for the result. Pass `worktree: true` to run in a new isolated workspace, with `ref` selecting its base ref. A requested `model` must be available; an unavailable model is rejected with `400` rather than silently substituted. Sessions created here are pinned to **ask** permission mode. With `worktree: true`, creation can take tens of seconds; a request that times out may still have succeeded, so check `GET /api/internal/sessions` before retrying.
-
-**Request Body:**
-```ts
-{
- repoId: number
- prompt: string // 1-20000 characters
- title?: string // max 200 characters
- model?: string
- agent?: string
- worktree?: boolean
- ref?: string
-}
-```
-
-**Response (`201`):**
-```ts
-{
- sessionId: string
- repoId: number
- directory: string
- workspaceDirectory: string | null
- model: string
- title: string | null
- url: string // deep link to open the session in the UI
-}
-```
-
-**Status Codes:**
-- `201`: Session created and prompt queued
-- `400`: Invalid request body, or the requested model is unavailable
-- `401`: Missing or invalid bearer token
-- `404`: Repository not found
-- `502`: OpenCode error
-
-**POST `/api/internal/sessions/:sessionId/prompt`**
-
-Queue a follow-up prompt for an existing session.
-
-**Request Body:**
-```ts
-{
- text: string // 1-20000 characters
-}
-```
-
-**Response (`202`):**
-```ts
-{ queued: true }
-```
-
-**Status Codes:**
-- `202`: Prompt queued
-- `400`: Invalid request body
-- `401`: Missing or invalid bearer token
-- `404`: Session not found
-- `502`: OpenCode error
-
-**GET `/api/internal/sessions/:sessionId/reply`**
-
-Read the latest assistant reply for a session and whether it is still running. Poll this after creating a session or queueing a prompt until `busy` is `false`. Pass `waitMs` (0-45000) to wait until the session settles instead of polling in a loop; the response returns when it settles or the timeout elapses. `responseText` is capped at 20,000 characters, with a truncation marker appended when it is longer.
-
-**Response:**
-```ts
-{
- busy: boolean
- responseText: string | null // latest assistant text, null when there is none yet
- errorText: string | null // assistant error message, null when the turn succeeded
- completed: boolean // true once the latest assistant turn finished
-}
-```
-
-**Status Codes:**
-- `200`: Reply state returned
-- `400`: Invalid `waitMs`
-- `401`: Missing or invalid bearer token
-- `404`: Session not found
-- `502`: OpenCode error
-
-**POST `/api/internal/sessions/:sessionId/fork`**
-
-Fork a session, optionally before a specific message. Omit `beforeMessageId` to fork from the current point. The forked session is pinned to **ask** permission mode.
-
-**Request Body:**
-```ts
-{
- beforeMessageId?: string
-}
-```
-
-**Response:**
-```ts
-{
- sessionId: string // the new forked session
- directory: string
-}
-```
-
-**Status Codes:**
-- `200`: Session forked
-- `400`: Invalid request body
-- `401`: Missing or invalid bearer token
-- `404`: Session not found
-- `502`: OpenCode error
-
-There is no delete route for sessions. Deleting sessions and workspaces stays out of this tool, as does changing permission modes and starting goals.
-
-## Skills
-
-The assistant workspace includes five skills that document these capabilities:
-
-1. **Schedule Management** (`.opencode/skills/schedule-management/SKILL.md`) — manage schedule jobs and runs through the `ocm` `request` action.
-2. **Notifications** (`.opencode/skills/notifications/SKILL.md`) — send push notifications through the `ocm` `send_notification` action.
-3. **Manager Settings** (`.opencode/skills/manager-settings/SKILL.md`) — read and patch user preferences, read and update the OpenCode configuration file, and reload the assistant workspace through the `ocm` `request` action.
-4. **Repo Management** (`.opencode/skills/repo-management/SKILL.md`) — list managed repositories through the `ocm` `request` action.
-5. **Session Management** (`.opencode/skills/session-management/SKILL.md`) — list, create, follow up, read the reply of, and fork sessions through the `ocm` `request` action.
-
-These skills are automatically provisioned when assistant mode is initialized and contain detailed examples and usage patterns.
diff --git a/docs/features/assistant-mode.md b/docs/features/assistant-mode.md
deleted file mode 100644
index 408863fb..00000000
--- a/docs/features/assistant-mode.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Assistant Mode
-
-Assistant Mode gives OpenCode Manager a dedicated AI workspace — an isolated directory (`repos/assistant/`) where a built-in assistant agent can manage scheduled jobs, send push notifications, and read or update settings through the `ocm` tool.
-
-## What Is Assistant Mode?
-
-The assistant workspace is a special repository-like directory managed and maintained by OpenCode Manager. When initialized it contains:
-
-| File | Purpose |
-|------|---------|
-| `AGENTS.md` | Workspace description the agent reads on every session start |
-| `opencode.json` | OpenCode configuration scoped to the assistant agent |
-| `.opencode/agents/assistant.md` | Agent definition with system prompt and permissions |
-| `.opencode/skills/` | Auto-generated skills teaching the agent to use the `ocm` tool |
-
-## Skills Provided
-
-Five skills are provisioned automatically when assistant mode is initialized:
-
-| Skill | What it teaches |
-|-------|----------------|
-| `schedule-management` | Create, list, update, delete, and run scheduled jobs through the `ocm` `request` action |
-| `notifications` | Send push notifications to registered user devices with the `ocm` `send_notification` action |
-| `manager-settings` | Read and patch user preferences, read and update the OpenCode configuration file, and reload the assistant workspace, through the `ocm` `request` action |
-| `repo-management` | List all managed repositories through the `ocm` `request` action |
-| `session-management` | List, create, follow up, read the reply of, and fork sessions through the `ocm` `request` action |
-
-The assistant manages the Manager's global OpenCode configuration file through the `ocm` tool (`/opencode-config`), and the file on disk is the source of truth.
-
-See [Assistant Internal API](assistant-internal-api.md) for the full API reference these skills expose.
-
-## Assistant Persona
-
-The assistant's system prompt, behavior, and durable preferences live solely in `.opencode/agents/assistant.md`. This file is the single source of truth for the assistant agent's personality and self-editing rules. The `opencode.json` configuration no longer duplicates the agent persona — it only stores agent mode and workspace-level settings.
-
-When the assistant self-edits its agent definition (e.g., to refine behavior or add durable preferences), it uses the `manager-settings` skill to call the `POST /assistant/reload` endpoint through the `ocm` `request` action. This rebuilds every loaded location so the changes take effect on the next message. The reload endpoint is rate-limited to 5 requests per minute; the assistant always asks the user before reloading.
-
-## Getting Started
-
-1. Click **Assistant** in the sidebar or mobile tab bar
-2. The page opens the Assistant session list
-3. Click **New Session** to start a session with the built-in assistant
-
-
-
-No manual setup is required. The workspace directory and all managed files are created automatically when the Manager starts.
-
-## Session Views
-
-The Assistant page (`/assistant`) shows the Assistant session list. Selecting a session opens it; **New Session** starts a new one. The page exposes the same management panels as regular repos — file browser, MCP servers, skills, source control, and permissions reset.
-
-## Workspace Initialization
-
-The workspace is initialized idempotently. Managed files are only rewritten when OpenCode Manager has updated their content. User customizations to managed files are preserved.
-
-### Warnings
-
-If a managed file was modified after initialization, the next session will receive an inline prompt explaining which files were preserved and what the expected content is. This surfaces configuration drift without silently overwriting your changes.
-
-### Re-initializing
-
-The workspace is re-applied to its latest defaults automatically when the Manager starts; managed files are only rewritten when their content changed. To clear the Assistant workspace's saved "Allow Always" permissions, open the **Reset Permissions** dialog from the Assistant sidebar (desktop) or the **More** drawer (mobile) and confirm.
diff --git a/docs/features/chat.md b/docs/features/chat.md
deleted file mode 100644
index 49232c86..00000000
--- a/docs/features/chat.md
+++ /dev/null
@@ -1,233 +0,0 @@
-# Chat & Sessions
-
-Real-time chat interface for interacting with AI agents.
-
-## Real-time Streaming
-
-Messages stream in real-time using Server-Sent Events (SSE):
-
-- See responses as they're generated
-- No waiting for complete responses
-- Can interrupt generation if needed
-
-
-
-## Background Work
-
-While a shell command or subagent is running, **Move to background** above the prompt lets it keep running while the session continues. The background tasks bar lists each background shell and subagent with its status:
-
-- **running** - still working
-- **completed** / **failed** - finished, using the shell exit code or the subagent outcome
-- **killed** - you stopped the shell from the bar
-- **interrupted** - the subagent was interrupted
-- **unavailable** - OpenCode no longer knows the shell and the session has no completion notice for it
-
-Shell rows can show live output and be killed; subagent rows open the child session. Statuses are reconciled when the connection returns, so work that finished while you were away is shown as finished. After a page reload, a shell you killed is shown as **failed**, which matches OpenCode's own notice for it.
-
-## Model Selection
-
-Click the **model name** in the chat prompt area to open the quick model switcher, where you can switch models, mark favorites, and pick variants without leaving the chat. Switching agents applies that agent's configured model. See [AI Configuration](ai-config.md#model-selection) for the full reference.
-
-## Slash Commands
-
-Type `/` to see available commands. Built-in commands are covered in the [Quick Start](../getting-started/quickstart.md#useful-commands). OpenCode's own commands, such as `/init` and `/review`, appear in the same list.
-
-The fork keyboard shortcut opens the same message picker as `/fork`.
-
-### Custom Commands
-
-Create your own commands in **Settings → OpenCode Config → Commands**:
-
-```yaml
-name: review
-description: Request a code review
-template: |
- Please review the following code for:
- - Security vulnerabilities
- - Performance issues
- - Best practices
- - Code style
-
- {{selection}}
-```
-
-Use with `/review` in chat. A custom command with the same name as a built-in command replaces the built-in.
-
-## File Mentions
-
-Reference files and folders in prompts with `@`. Type `@`, start typing a name, and select from the autocomplete dropdown; the AI then has access to that file's contents.
-
-### Multiple Files
-
-You can mention multiple files in one message:
-
-```
-@src/components/Button.tsx @src/styles/button.css
-Can you refactor the Button component to use CSS modules?
-```
-
-### Folder Mentions
-
-Mention entire folders to include all files:
-
-```
-@src/utils/
-Review all utility functions for consistency
-```
-
-## Plan/Build Mode
-
-Toggle between two operational modes:
-
-### Plan Mode (Read-Only)
-
-- AI can read and analyze files
-- AI cannot modify, create, or delete files
-- Safe for exploration and planning
-
-### Build Mode (Full Access)
-
-- AI can create new files
-- AI can edit existing files
-- AI can delete files
-- Use for implementation tasks
-
-Toggle modes using the mode selector in the composer toolbar.
-
-## Permission modes
-
-Control who answers OpenCode permission requests for a session. The shield button in the composer toggles between two modes:
-
-- **Ask every time** (default) - each permission request waits for you in the permission dialog.
-- **Accept everything** - every "ask" request is answered automatically.
-
-The mode is owned by the backend, so a session in Accept everything keeps working while the browser is closed. Accept everything answers each request once and never saves a permanent rule, and it never overrides a `deny` rule. When you switch a session to Accept everything, requests already waiting are answered immediately.
-
-Child sessions inherit the mode of their root session and cannot change it, and the composer toggle is disabled for them with an explanation. A session forked from another starts with the source session's mode, except that forks of scheduled runs stay **Ask every time**.
-
-Sessions started by a scheduled run always use their schedule's own permission configuration; the composer toggle is disabled there with an explanation. Sessions created or forked by an agent through the `ocm` tool always start in **Ask every time**, regardless of the default, though an agent can still send follow-ups to a session you switched to **Accept everything**.
-
-If Manager restarts or loses its connection to OpenCode, permission requests already waiting in **Accept everything** sessions are answered when it reconnects.
-
-To change the default for new sessions, go to **Settings → General → Sessions** and pick a **Default permission mode for new sessions**. The default is stamped onto a session when it is created, so changing it only affects sessions created afterwards, never existing ones.
-
-Auto-accepted requests send no push notification, so you are not alerted for a request the session answered itself.
-
-## Session goals
-
-A goal keeps a session working on an objective until an auditor model decides it is done or blocked, without you sending follow-up messages.
-
-Arm goal mode with the target button in the composer, then send your message. That message becomes the goal objective, and it is sent to the session as usual. Goals cannot be started on scheduled-run sessions or subagent (child) sessions, and the goal button is disabled there. If you arm a goal and send while the agent is still responding, the message is queued and the goal starts; auditing begins after that queued turn. While a goal is active, each time the session goes idle the auditor decides the next step:
-
-- **done** - the objective is verifiably achieved, and the goal completes.
-- **blocked** - the agent needs a decision or access it cannot obtain. Three consecutive blocked verdicts stop the goal as blocked.
-- **continue** - the agent keeps working toward the objective.
-
-The auditor only sees the objective and the agent's latest reply; it cannot run tools or read files. Automatic continuations are capped by **Max automatic continuations**, and you can also set a **Token budget per goal** to stop a goal once it has spent that many tokens. A failed turn stops the goal, an interrupted turn pauses it, and deleting the session stops it.
-
-The goal is persisted and driven by the backend, so it survives closing the browser and a Manager restart: an active goal resumes auditing once the session is idle again.
-
-A status bar above the message list shows the goal state, the turn count, token usage, and the latest reason, with **Pause** (or **Resume**), **Cancel**, and **Dismiss** actions.
-
-Goal settings live in **Settings → General → Sessions**:
-
-- **Goal auditor model** - the model that decides whether the goal is done, as `provider/model`. Leave empty to use the OpenCode default model.
-- **Max automatic continuations** - how many times a goal may continue before it stops (1-200, default 20).
-- **Token budget per goal** - stop once the goal has spent this many tokens. Empty means no limit.
-
-## Mermaid Diagrams
-
-AI responses can include Mermaid diagrams that render automatically:
-
-```mermaid
-graph TD
- A[User Request] --> B[AI Processing]
- B --> C{Valid?}
- C -->|Yes| D[Execute]
- C -->|No| E[Error Response]
- D --> F[Return Result]
-```
-
-Supported diagram types:
-
-- Flowcharts
-- Sequence diagrams
-- Class diagrams
-- State diagrams
-- Entity-relationship diagrams
-- Gantt charts
-- And more...
-
-## Session Management
-
-### Viewing Sessions
-
-Access your sessions from the sidebar:
-
-- Sessions are organized by repository; the current repository is expanded and one repository is open at a time
-- Pinned sessions appear first, followed by the most recent sessions
-- A live indicator marks sessions that are working, retrying, or compacting
-- **All sessions** opens the repository's full session list when it has more sessions than the sidebar shows
-- Repositories that are still cloning, or whose clone failed, show **Repository not ready** until they are ready
-- On desktop, type in the sidebar search box and press **Enter** to search sessions across all repositories; press **Escape** to clear
-- Click a session to resume
-
-
-
-### Searching Sessions
-
-Find sessions by title:
-
-1. Type in the always-visible **Search sessions...** box in the sessions panel
-2. Results filter as you type
-
-### Pinning Sessions
-
-Pin important sessions to the top of the list. See [Session Pinning](session-pins.md) for details.
-
-### Deleting Sessions
-
-Remove sessions you no longer need:
-
-1. Swipe a session left to reveal the delete button, then tap it
-2. Or click the **Manage sessions** icon and use the trash button on a session
-3. Confirm deletion
-
-### Bulk Delete
-
-Remove multiple sessions at once:
-
-1. Click the **Manage sessions** icon in the sessions panel
-2. Check the sessions to delete
-3. Click **Delete**
-4. Confirm deletion
-
-## Context Management
-
-Sessions maintain context of your conversation. As context grows, you may need to manage it:
-
-### Compacting Context
-
-Use `/compact` to reduce context size:
-
-- Summarizes earlier messages
-- Preserves important information
-- Frees up context for new messages
-
-### Starting Fresh
-
-Use `/new` to start a new session when:
-
-- Context is too large
-- Topic has changed significantly
-- You want a clean slate
-
-## Keyboard Shortcuts
-
-| Shortcut | Action |
-|----------|--------|
-| `/` | Open command menu |
-| `@` | Open file mention menu |
-| `Escape` | Close autocomplete menus |
-
-To edit a message, use the edit action on the last user message while the session is idle.
diff --git a/docs/features/files.md b/docs/features/files.md
deleted file mode 100644
index c144a832..00000000
--- a/docs/features/files.md
+++ /dev/null
@@ -1,150 +0,0 @@
-# File Browser
-
-Navigate, view, and manage files within your repositories.
-
-## Directory Navigation
-
-### Tree View
-
-The file browser displays your repository as an expandable tree:
-
-- Click folders to expand/collapse
-- Click files to preview content
-- Icons indicate file types
-
-
-
-### Breadcrumbs
-
-Navigate quickly using the breadcrumb path at the top:
-
-- Click any segment to jump to that directory
-- Shows current location in the file tree
-
-### Search
-
-Filter files by name:
-
-1. Type in the always-visible **Search** box
-2. Results update as you type
-
-## File Preview
-
-Click any file to preview with:
-
-- **Syntax Highlighting** - Support for common languages
-- **Line Numbers** - Easy reference for code discussions
-- **Large File Support** - Virtualization for files with many lines
-
-### Supported Languages
-
-Syntax highlighting is provided for common languages including:
-
-- JavaScript, TypeScript, JSX, TSX
-- Python, Ruby, Go, Rust
-- HTML, CSS, SCSS
-- JSON, YAML, TOML, XML
-- Markdown, SQL, Shell scripts
-- And many more...
-
-## File Operations
-
-### Create File
-
-1. Click the **+** button in the file browser toolbar
-2. In the **Create New** dialog, choose **File**
-3. Enter a filename with extension
-4. Click **Create**; the list refreshes with the new file
-
-### Create Folder
-
-1. Click the **+** button in the file browser toolbar
-2. In the **Create New** dialog, choose **Folder**
-3. Enter a folder name
-4. Click **Create**; the folder is created in the current directory
-
-### Rename
-
-1. Click the **rename** action on a file or folder
-2. Enter new name
-3. Press Enter to confirm
-
-### Delete
-
-1. Click the **delete** action on a file or folder
-2. Confirm deletion
-
-!!! warning
- Deletion is permanent and cannot be undone through the UI. Use git to recover deleted files if needed.
-
-## File Upload
-
-### Drag and Drop
-
-Upload files by dragging them into the browser:
-
-1. Open the target folder
-2. Drag files from your computer
-3. Drop into the file browser area
-4. Files are uploaded to current directory
-
-### Multiple Files
-
-You can drag multiple files at once. They'll all be uploaded to the current directory.
-
-### Upload Limitations
-
-- Large files may take time to upload
-- Binary files are supported
-- File permissions are set by the server
-
-## ZIP Download
-
-Download directories or repositories as ZIP archives directly from the file browser:
-
-### Download Options
-
-Click the download icon in the file browser header to access download options:
-
-**Current Directory**
-- Downloads the folder you're currently viewing
-- Includes all subfolders and files
-- Useful for archiving specific parts of a project
-
-**Entire Repository**
-- Downloads the complete repository
-- Same as the download button on repository cards
-- Perfect for full repository backups
-
-### Download Process
-
-Both download options follow the same process:
-
-1. Click the download icon in the file browser header
-2. Choose **Current Directory** or **Entire Repository**
-3. Review the confirmation dialog showing what will be downloaded
-4. Click **Download** to begin
-5. Wait while the ZIP archive is created (progress indicator shown)
-6. ZIP automatically downloads to your computer
-
-### Archive Features
-
-The ZIP archives:
-
-- Respects `.gitignore` - ignored files are excluded
-- Excludes `.git` directory
-- Uses compression to reduce file size
-- Includes proper file permissions
-- Preserves directory structure
-
-!!! note
- Download confirmation ensures you're downloading the correct content. Large repositories may take time to create the archive.
-
-## Large File Handling
-
-For files with many lines, the viewer uses virtualization:
-
-- Only visible lines are rendered
-- Smooth scrolling through large files
-- Memory-efficient display
-
diff --git a/docs/features/git.md b/docs/features/git.md
deleted file mode 100644
index 428dfc23..00000000
--- a/docs/features/git.md
+++ /dev/null
@@ -1,193 +0,0 @@
-# Repository & Git
-
-Comprehensive git integration for managing repositories and source control.
-
-## Cloning Repositories
-
-Clone any git repository:
-
-1. Click the **Repos** button in the sidebar
-2. Click **Add Repository**
-3. Paste the repository URL
-4. Click **Add Repository**
-
-## Discovering Existing Repositories
-
-Import repositories you already have on disk without recloning them:
-
-1. Click the **Repos** button in the sidebar
-2. Click **Add Repository**
-3. Select **Folder**
-4. Enter a parent folder such as `/Users/you/Development`
-5. Click **Discover Repositories**
-
-OpenCode Manager scans that folder for nested git repositories and links each one into the workspace. If standalone OpenCode already has chats stored for those same paths, the sessions show up automatically.
-
-### Private Repositories
-
-For private repositories, configure a GitHub Personal Access Token:
-
-1. Go to **Settings > Git > Credentials**
-2. Enter your GitHub PAT
-3. Ensure the token has `repo` scope
-
-### SSH Repositories
-
-SSH key authentication added for git repositories. Configure SSH keys in Settings > Git > Credentials.
-
-## Git Worktrees
-
-Work on multiple branches simultaneously without switching:
-
-1. Select a repository
-2. Click **Create Worktree**
-3. Choose **New branch** (enter a name and pick a base branch) or **Existing branch** (pick a local or remote branch to check out)
-4. A new workspace is created with that branch checked out
-
-Worktrees share the same git history but have independent working directories. This is useful for:
-
-- Comparing implementations across branches
-- Working on a feature while keeping main branch accessible
-- Testing changes without disrupting your main work
-
-### Integrating a Worktree Branch
-
-From a worktree's Branches tab, click **Integrate** to bring its commits into another branch:
-
-1. Choose the target branch. It must be checked out cleanly in another managed worktree, with no uncommitted changes or operation already in progress.
-2. Choose a strategy: **Merge commit** integrates all commits with a merge commit, while **Cherry-pick commits** replays each commit onto the target. Cherry-pick integration skips commits already applied to the target and skips merge commits.
-3. Click **Integrate**.
-
-If the target stops on conflicts, the operation banner appears in the dialog so you can resolve, continue, or abort the integration.
-
-### Deleting a Worktree
-
-Deleting a worktree offers three branch options:
-
-- **Keep branch** - Leave the branch in the parent repository.
-- **Delete local branch** - Remove the branch from the parent repository.
-- **Delete local and remote branch** - Also delete the branch from origin.
-
-**Delete local branch** and **Delete local and remote branch** use a safe delete: if the branch has unmerged commits it is kept, and a warning names it. Force-delete it from the Branches tab if intended.
-
-The remote branch is deleted only when the branch's upstream has the same name. If the upstream has a different name, nothing is deleted and the reason is shown. Without force, deleting the remote branch also requires the branch to be merged into the checked-out branch.
-
-## Source Control Panel
-
-Access comprehensive git operations via the source control button.
-
-### Changes Tab
-
-- View all modified, added, deleted, and untracked files
-- Stage/unstage individual files or all changes
-- Discard changes to revert modifications
-- View diffs inline for any changed file
-
-{ .phone }
-
-### Commits Tab
-
-- Browse commit history
-- View commit details including message, author, and date
-- See file changes in each commit
-- Track ahead/behind status with remote
-
-{ .phone }
-
-### Branches Tab
-
-- List all local and remote branches
-- Create new branches from current HEAD
-- Switch branches (checks out the branch)
-- Rename a local branch from its actions menu. Renaming also updates the base branch of schedules in every checkout of the same git repository that used the old name. A worktree's folder keeps the old branch name; `ocm` mirroring looks for a folder named after the new branch, so mirroring the renamed branch fails while that worktree exists.
-- Delete local branches, optionally force-deleting an unmerged branch and, when the branch's upstream has the same name, also deleting the remote branch. The current branch and branches checked out in another worktree cannot be deleted.
-
-{ .phone }
-
-### Stash Tab
-
-Stash work in progress and restore it later:
-
-- Enter an optional message and choose whether to include untracked files
-- **Stash changes** saves the working tree and index
-- Each stash shows its branch and date, with **Apply** (restore and keep the stash), **Pop** (restore and remove the stash), and **Drop** (delete the stash)
-- The stash list is shared by a repository and all its worktrees. Apply, Pop, and Drop verify the stash is still the one shown and ask you to refresh if the list changed.
-
-### Merge, Rebase and Cherry-pick Conflicts
-
-When a merge, rebase, or cherry-pick stops on conflicts, an operation banner appears at the top of the source control panel:
-
-- Shows the operation kind and the list of conflicted files
-- **Continue** finishes the operation once every conflict is resolved
-- **Abort** cancels the operation and restores the previous state
-- **Resolve with agent** opens a new session in the repository, primed with the conflicted files, so an agent can resolve them
-
-### Committing
-
-Commit staged changes with a message. Press ⌘/Ctrl+Enter to commit without clicking the button.
-
-#### AI Commit Messages
-
-Use the sparkle button in the commit box to generate a commit message from the staged changes using OpenCode's default model. Only staged changes are used, and the generated message replaces the current text after confirmation.
-
-#### Commit Identities
-
-Configure identities in **Settings > Git**:
-
-- **Default identity** - Written to Manager's own git config file (`.config/git/config` in the workspace). When the name or email is empty and a GitHub token credential is configured, the missing parts come from the GitHub account. It applies to Manager commits, agent shells, terminals, and scheduled runs without restarting OpenCode. Because it is a global-level git config file, a repository's own identity and, on non-Docker installs, your `~/.gitconfig` identity take precedence over it.
-- **Saved identities** - Presets that can be applied to individual repositories.
-
-Each repository has a **Commit as** selector in the commit box. Choosing a saved preset writes it into the repository's local git config (`user.name` / `user.email`), which git shares with all worktrees of the repository (Manager worktrees, OpenCode workspaces, and scheduled-run worktrees). Choosing **Default** removes the repository's local identity. An identity you set yourself in the repository's local git config is respected and shown as **Custom**; the selector asks before replacing it. The selector shows the effective identity and where it comes from (repository, Manager default, git global config, or not configured). Removing a saved preset does not change repositories that use it.
-
-Sandboxed shells receive the resolved identity for their directory.
-
-## Diff Viewer
-
-View file changes with a unified diff format:
-
-- **Line Numbers** - Both old and new line numbers displayed
-- **Syntax Highlighting** - Code is highlighted based on file type
-- **Change Markers** - Additions in green, deletions in red
-- **Change Counts** - Summary of lines added/removed
-
-### Accessing Diffs
-
-- Click any changed file in the Source Control panel
-- Diffs appear inline or in a modal depending on context
-- Use the expand/collapse toggle for large diffs
-
-{ .phone }
-
-## Repository Actions
-
-### Pull
-
-Fetch and merge remote changes:
-
-1. Select a repository
-2. Click the **Pull** button
-3. Changes are fetched and merged
-
-### Fetch
-
-Download remote changes without merging:
-
-1. Select a repository
-2. Click the **Fetch** button
-3. Remote tracking branches are updated
-
-### Delete Repository
-
-Remove a repository from the workspace:
-
-1. Select a repository
-2. Click **Delete**
-3. Confirm deletion
-
-## Ahead/Behind Tracking
-
-The UI shows your branch's relationship to its remote:
-
-- **↑ N** - You have N commits not pushed to remote
-- **↓ N** - Remote has N commits you haven't pulled
-- **↑ N ↓ M** - Both local and remote have diverged
diff --git a/docs/features/logs.md b/docs/features/logs.md
deleted file mode 100644
index b282b702..00000000
--- a/docs/features/logs.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Manager Logs
-
-View the Manager's own log lines and the managed OpenCode server's output directly in the Settings UI, without shell access to the container or host.
-
-## Overview
-
-The **Logs** tab in Settings shows a live stream of what the Manager and the OpenCode server are doing — startup messages, session activity, warnings, and errors. This is the quickest way to answer "why did that just fail?" while the app is running.
-
-Each entry shows a timestamp, severity level, source, and message:
-
-- **Manager** — Lines emitted by the Manager's own logger (the same lines written to the console/container logs)
-- **OpenCode server** — stdout and stderr captured from the supervised OpenCode server process
-
-## Filters
-
-| Control | Behavior |
-|---------|----------|
-| **Level** | Minimum severity filter: *All levels*, *Info and above*, *Warnings and above*, or *Errors* |
-| **Source** | Show only **Manager** lines, only **OpenCode server** lines, or both |
-| **Search messages** | Case-insensitive text search applied to the displayed entries |
-
-## Controls
-
-- **Pause / Resume** — Stop and resume the live stream. While paused, entries arriving from the backend are not added to the view.
-- **Clear** — Empty the local view without affecting the backend buffer.
-- **Copy** — Copy the currently visible (filtered and searched) entries to the clipboard.
-- **Follow scrolling** — The view scrolls to the newest entry automatically. Scrolling up pauses following; scrolling back to the bottom resumes it.
-
-When the buffer has evicted entries, a notice below the view reports how many earlier entries have been dropped since the Manager started.
-
-## OpenCode Server Issues
-
-While the OpenCode server is unhealthy, recovering, or failed, a panel above the log stream shows the current failure reason (including the server's exit code and stderr tail when it crashed during startup) and the recovery actions already attempted. **Show errors only** switches the filters to errors from all sources, so the Manager's startup messages appear alongside the server's own output.
-
-## Limits and Behavior
-
-- The buffer is **in-memory** on the Manager backend and holds up to **2,000** entries (`DEFAULTS.LOGS.BUFFER_CAPACITY`). Older entries are evicted first.
-- Individual entries are truncated at **4,000** characters (`DEFAULTS.LOGS.MAX_ENTRY_LENGTH`).
-- The buffer is **cleared when the Manager process restarts**. When the frontend detects a backend restart it resets its view and re-polls from the start.
-- OpenCode server stdout and stderr are captured in every mode; in development they are also mirrored to the terminal.
-- The frontend polls the backend every **3 seconds** (`DEFAULTS.LOGS.POLL_INTERVAL_MS`); backend pages are capped at 1,000 entries per response.
-- `docker-compose logs` remains the fallback for failures that happen **before** the Manager's HTTP server is up — nothing can be captured in-app at that point.
diff --git a/docs/features/mcp.md b/docs/features/mcp.md
deleted file mode 100644
index 8eb55f68..00000000
--- a/docs/features/mcp.md
+++ /dev/null
@@ -1,244 +0,0 @@
-# MCP Servers
-
-Configure Model Context Protocol (MCP) servers to extend AI capabilities.
-
-## What is MCP?
-
-MCP (Model Context Protocol) allows AI models to interact with external tools and data sources. Servers provide:
-
-- **Tools** - Functions the AI can call
-- **Resources** - Data the AI can access
-- **Prompts** - Pre-defined prompt templates
-
-## Adding Servers
-
-### Local Servers (Command-based)
-
-Local servers run as processes on your machine:
-
-1. Open a repository and click **MCP** in the sidebar
-2. Click **Add Server**
-3. Select **Local (Command)**
-4. Configure:
-
-
-
-```json
-{
- "mcp": {
- "servers": {
- "filesystem": {
- "type": "local",
- "command": [
- "npx",
- "-y",
- "@modelcontextprotocol/server-filesystem",
- "/workspace"
- ]
- }
- }
- }
-}
-```
-
-| Field | Description |
-|-------|-------------|
-| Name (key under `mcp.servers`) | Unique identifier |
-| `command` | Executable and its arguments, as one array |
-| `environment` | Environment variables (optional) |
-
-### Remote Servers (HTTP)
-
-Remote servers are accessed over HTTP/SSE:
-
-1. Go to **Settings → OpenCode Config → MCP Servers**
-2. Click **Add Server**
-3. Select **Remote (HTTP)**
-4. Configure:
-
-```json
-{
- "mcp": {
- "servers": {
- "remote-tools": {
- "type": "remote",
- "url": "https://mcp.example.com/sse"
- }
- }
- }
-}
-```
-
-| Field | Description |
-|-------|-------------|
-| Name (key under `mcp.servers`) | Unique identifier |
-| `url` | Server endpoint |
-| `headers` | HTTP headers (optional) |
-
-## Server Templates
-
-Pre-built configurations for common MCP servers, in the OpenCode 2 `mcp.servers` shape the Manager writes:
-
-### Filesystem
-
-Access local files and directories:
-
-```json
-{
- "mcp": {
- "servers": {
- "filesystem": {
- "type": "local",
- "command": [
- "npx",
- "-y",
- "@modelcontextprotocol/server-filesystem",
- "/path/to/dir"
- ]
- }
- }
- }
-}
-```
-
-### GitHub
-
-Interact with GitHub repositories:
-
-```json
-{
- "mcp": {
- "servers": {
- "github": {
- "type": "local",
- "command": [
- "npx",
- "-y",
- "@modelcontextprotocol/server-github"
- ],
- "environment": {
- "GITHUB_TOKEN": "your-token-here"
- }
- }
- }
- }
-}
-```
-
-### PostgreSQL
-
-Query PostgreSQL databases:
-
-```json
-{
- "mcp": {
- "servers": {
- "postgres": {
- "type": "local",
- "command": [
- "npx",
- "-y",
- "@modelcontextprotocol/server-postgres"
- ],
- "environment": {
- "DATABASE_URL": "postgres://user:pass@host:5432/db"
- }
- }
- }
- }
-}
-```
-
-### Brave Search
-
-Web search capabilities:
-
-```json
-{
- "mcp": {
- "servers": {
- "brave-search": {
- "type": "local",
- "command": [
- "npx",
- "-y",
- "@modelcontextprotocol/server-brave-search"
- ],
- "environment": {
- "BRAVE_API_KEY": "your-api-key"
- }
- }
- }
- }
-}
-```
-
-## Managing Servers
-
-### Enable/Disable
-
-Toggle servers on/off:
-
-1. Go to **Settings → OpenCode Config → MCP Servers**
-2. Find the server
-3. Click the toggle switch
-
-Disabled servers won't be started or connected.
-
-### Delete Server
-
-Remove a server:
-
-1. Click the **Delete Server** action
-2. Confirm deletion
-
-### Refresh Status
-
-Use the refresh button in **Settings → OpenCode Config → MCP Servers** to reload the current connection status after changing a server outside the UI or completing OAuth.
-
-### Configuration Shape
-
-The Manager writes and edits the OpenCode 2 shape, `mcp.servers.`, with `disabled` for the toggle. OpenCode also still accepts the older flat `mcp.` shape with `enabled` and normalizes it on load, so a configuration written by an earlier version (or by hand) keeps working. The Manager manages only `mcp.servers` entries; move a flat entry under `mcp.servers` to manage it.
-
-Saving an MCP change reloads the OpenCode configuration, which reconnects only the servers whose configuration changed, with `{env:}` and `{file:}` values expanded. A remote server that has gone through OAuth in the Manager holds a runtime override that takes precedence over the file, so later edits to that server take effect after an OpenCode restart from Settings.
-
-## Server Status
-
-Monitor server health:
-
-| Status | Description |
-|--------|-------------|
-| Connected | Server is active and connected |
-| Connecting | Connection is pending |
-| Disabled | Server is configured but disabled |
-| Auth Required | Remote server needs OAuth authentication |
-| Failed | Server failed to start or connect |
-
-## Tool Permissions
-
-The MCP server manager adds, toggles, authenticates, and deletes server configurations. Tool access is controlled by the active OpenCode configuration and any custom agent configuration, not by a separate global MCP permission mode in this screen.
-
-## Troubleshooting
-
-### Server Won't Start
-
-1. Check the command is installed: `npx -y @modelcontextprotocol/server-`
-2. Verify environment variables are set
-3. Check the displayed status error
-4. Try running the command manually
-
-### Tools Not Appearing
-
-1. Verify server status is "Connected"
-2. Check server provides the expected tools
-3. Refresh server status
-4. Check AI model supports tool use
-
-### Connection Issues
-
-For remote servers:
-
-1. Verify URL is correct
-2. Check network connectivity
-3. Verify authentication headers
-4. Check server is running and accessible
diff --git a/docs/features/mobile.md b/docs/features/mobile.md
deleted file mode 100644
index c0a8ed28..00000000
--- a/docs/features/mobile.md
+++ /dev/null
@@ -1,134 +0,0 @@
-# Mobile & PWA
-
-OpenCode Manager is designed mobile-first and works as a Progressive Web App.
-
-## Mobile-First Design
-
-The UI is optimized for mobile devices:
-
-- Touch-friendly controls
-- Responsive layouts
-- Adaptive components
-- Gesture support
-
-{ .phone }
-
-## Installing as PWA
-
-### iOS
-
-1. Open OpenCode Manager in **Safari**
-2. Tap the **Share** button (square with arrow)
-3. Scroll down and tap **Add to Home Screen**
-4. Name the app and tap **Add**
-
-!!! note
- PWA installation only works in Safari on iOS. Chrome and other browsers don't support PWA on iOS.
-
-### Android
-
-1. Open OpenCode Manager in **Chrome**
-2. Tap the **menu** (three dots)
-3. Tap **Install app** or **Add to Home Screen**
-4. Confirm installation
-
-### Desktop
-
-#### Chrome
-
-1. Look for the install icon in the address bar
-2. Click **Install**
-3. App opens in its own window
-
-#### Edge
-
-1. Click the menu (three dots)
-2. Select **Apps > Install this site as an app**
-3. Name and install
-
-## PWA Features
-
-### App Shell Caching
-
-Static assets are cached for faster loads:
-
-- App shell (HTML, CSS, JS)
-- Icons and images
-- Fonts and static assets
-
-Full functionality requires network connection to the backend.
-
-### Background Updates
-
-The PWA updates automatically:
-
-- New versions download in background
-- Prompt to refresh when ready
-- No manual update needed
-
-### Native-Like Experience
-
-- Runs in its own window
-- No browser chrome
-- App icon on home screen
-- Task switcher integration
-
-## Mobile Keyboard
-
-### iOS Keyboard Handling
-
-Special handling for iOS virtual keyboard:
-
-- Input field stays above keyboard
-- Viewport adjusts automatically
-- No content hidden behind keyboard
-
-### Enter Key Behavior
-
-On mobile, pressing Enter:
-
-1. Closes the virtual keyboard
-2. Sends the message
-
-Use **Shift+Enter** for new lines.
-
-### Keyboard Shortcuts
-
-Mobile keyboards have limited shortcut support. Type directly in the composer:
-
-- Type **@** to mention files
-- Type **/** to access commands
-- Toggle Plan/Build modes with the mode selector
-- Use the composer **+** menu to accept all permissions, arm goal mode, or attach an image or PDF
-
-## Swipe Navigation
-
-Navigate with gestures:
-
-### Swipe Right
-
-Swipe from the left edge to go back to the previous view, wherever a back target exists.
-
-### Swipe Left
-
-On a session route, swipe from the right edge to open the More drawer.
-
-### Swipe Requirements
-
-- Start from the left edge (first 30px) to go back
-- Swipe at least 80px right
-
-## Touch Optimizations
-
-### Larger Touch Targets
-
-All interactive elements have minimum 44x44px touch targets for easy tapping.
-
-### Row Actions
-
-Per-item actions are available without a context menu:
-
-- Files: open the **⋯** menu on a row for download, rename, and delete
-- Messages: use the **copy** button on a message block
-- Sessions: swipe a session left to reveal **delete**, or use manage mode to delete several
-
diff --git a/docs/features/multi-run.md b/docs/features/multi-run.md
deleted file mode 100644
index ba02e414..00000000
--- a/docs/features/multi-run.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Multi-run
-
-Run one prompt across several models at once to compare their results.
-
-## Launching a Multi-run
-
-Open a repository and click **Multi-run** in the header, next to **New Session**. In the **Launch** tab:
-
-1. Give the run group a **Group name**.
-2. Enter the **Prompt** to send to every model.
-3. Select up to **five models** from the checkbox list, grouped by provider.
-4. Leave **Isolate runs** on to give each model its own workspace.
-5. With **Isolate runs** on, optionally change **Start from**: a local or `origin` branch. It defaults to the repository's current branch.
-
-Click **Launch**. Each selected model gets its own session, and the same prompt is sent to all of them. Models are checked before any workspace is created, so a model that is not available fails its entry without creating a workspace while the other models still launch. Launching is parallel, and one model failing does not stop the others: the failed entry records its error while the rest keep running.
-
-## Isolation
-
-With **Isolate runs** on, each run is created in its own OpenCode workspace: a detached checkout of the repository at the chosen ref, with no branch created. These workspaces appear in the repository's **Workspaces** tab, and the session for an isolated run opens with that tab selected. With isolation off, every run shares the repository directory.
-
-## Runs
-
-The **Runs** tab lists the 20 most recent groups and their entries. Every entry shows the model, its status, and for a started run the live session status indicator. From here you can:
-
-- **Open** a run to view its session and compare the result.
-- **Discard** a run after confirmation. Discarding an isolated run also removes its workspace directory from the Workspaces tab; if that workspace was already removed, for example from the Workspaces tab, discarding still succeeds. A non-isolated run keeps its session in the repository.
-
-Discarding is irreversible and cannot be repeated on an already discarded run. Deleting a repository removes its multi-run history.
diff --git a/docs/features/notifications.md b/docs/features/notifications.md
deleted file mode 100644
index cf664409..00000000
--- a/docs/features/notifications.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Push Notifications
-
-Send background notifications when the OpenCode Manager PWA is closed, keeping you informed of agent activity without keeping the app open.
-
-## Overview
-
-Push notifications allow you to receive alerts on your mobile device or desktop when:
-
-- The **agent needs permission** to continue (file operations, tool use, etc.)
-- The **agent has a question** for you (clarifications, confirmations)
-- A **session encounters an error** during execution
-- A **session completes successfully**
-
-A notification is suppressed when a visible tab is already viewing the session that raised it, preventing duplicate alerts while you're actively monitoring that session. Subagent sessions never notify. A permission request that a session answers automatically (Accept everything mode) sends no notification. Goal outcome pushes are not sent when you paused or cancelled the goal yourself, when the turn failed (the regular error notification covers it), or while you are viewing the session.
-
-## Supported Events
-
-| Event | Description | Default |
-|-------|-------------|---------|
-| `permissionAsked` | Agent requests permission for an action | Enabled |
-| `questionAsked` | Agent asks a clarifying question | Enabled |
-| `sessionError` | Session encounters an error | Enabled |
-| `sessionIdle` | Session completes successfully | Disabled |
-| `goalOutcome` | A session goal completes, is blocked, stops, or pauses | Enabled |
-
-## Content and Click Behaviour
-
-The title is the action (`Run Command`, `Edit File`, `Question`, `Error`, `Session complete`) and the body is ` · `, for example `oc-manager · pnpm test`. Bodies are truncated to 140 characters. Permission and question notifications stay on screen until dismissed; every notification carries the event timestamp and re-alerts when a newer event for the same session replaces it.
-
-Clicking a notification opens the session that raised it (`/repos//sessions/`). The exception is a **Session complete** or **Session error** event for a session started by a scheduled run: those open the run's report (`/schedules?scheduleTab=runs&runId=`) instead, landing on the run history rather than the raw session. The service worker prefers a tab already showing that session, then the focused tab, then any visible tab, and only that one tab navigates; with no tab open a new window is opened. Sessions running in OpenCode worktrees or opencode-forge loop worktrees resolve to their parent repository through the shared OpenCode project id, and Assistant sessions open with the `assistant=1` parameter the Assistant view requires.
-
-## Browser Compatibility
-
-Push notifications require HTTPS (except on `localhost`) and browser support:
-
-| Browser | Support | Notes |
-|---------|---------|-------|
-| Chrome/Edge | ✅ Full | Works well |
-| Firefox | ✅ Full | Works well |
-| Safari (iOS/macOS) | ✅ Full | Requires `mailto:` VAPID subject |
-| Android browser | ✅ Full | Works well |
-
-### iOS/Safari Requirements
-
-Apple's Push Notification Service (APNs) has strict requirements:
-
-1. **HTTPS is required** - `localhost` testing requires Safari Dev Tools
-2. **VAPID_SUBJECT must use `mailto:` format** - `https://` subjects are rejected
-
-**Correct:** `VAPID_SUBJECT=mailto:you@yourdomain.com`
-**Incorrect:** `VAPID_SUBJECT=https://yourdomain.com`
-
-## Setup
-
-### 1. Generate VAPID Keys
-
-
-
-Generate VAPID public/private key pair:
-
-```bash
-pnpm dlx web-push generate-vapid-keys
-```
-
-Output:
-```
-=======================================
-Public Key:
-BMx-123456... (your public key here)
-
-Private Key:
-abcd1234... (your private key here)
-
-Subject:
-mailto:your-email@example.com
-=======================================
-```
-
-### 2. Configure Environment Variables
-
-Add to your `.env` file:
-
-```bash
-VAPID_PUBLIC_KEY=BMx-123456...
-VAPID_PRIVATE_KEY=abcd1234...
-VAPID_SUBJECT=mailto:you@yourdomain.com
-```
-
-### 3. Subscribe Devices
-
-1. Open OpenCode Manager in your browser
-2. Go to **Settings** → **Notifications**
-3. Click **Enable Push Notifications**
-4. Allow browser permission when prompted
-5. Your device is now subscribed
-
-## Managing Subscriptions
-
-### View Subscribed Devices
-
-Navigate to **Settings** → **Notifications** to see all registered devices:
-
-- Device name, or a truncated endpoint when the device has no name
-- One relative timestamp: when it was last used, or when it was added if it has never been used
-
-### Remove a Device
-
-Click the **trash** icon next to a device to remove it from receiving notifications.
-
-### Test Notifications
-
-Go to **Settings** → **Notifications** and click **Send Test Notification** to verify your setup is working.
-
-## Notification Preferences
-
-Control which events trigger notifications:
-
-**Notification Settings:**
-- **Enable Push Notifications** - Master toggle (default: off)
-- **Permission requests** - Get notified when agent needs permission (default: on)
-- **Agent questions** - Get notified when agent has a question (default: on)
-- **Session errors** - Get notified on session errors (default: on)
-- **Session completion** - Get notified when session finishes (default: off)
-- **Goal outcomes** - Get notified when a session goal completes, is blocked, stops, or pauses (default: on)
diff --git a/docs/features/opencode-workspaces.md b/docs/features/opencode-workspaces.md
deleted file mode 100644
index 4384c953..00000000
--- a/docs/features/opencode-workspaces.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# OpenCode Workspaces (Repo Targets)
-
-> This page has been relocated to the [`ocm` CLI guide](../ocm-cli.md).
-
-See the full documentation at [docs/ocm-cli.md](../ocm-cli.md).
diff --git a/docs/features/overview.md b/docs/features/overview.md
deleted file mode 100644
index 03b1b875..00000000
--- a/docs/features/overview.md
+++ /dev/null
@@ -1,167 +0,0 @@
-# Features Overview
-
-OpenCode Manager provides a comprehensive web interface for managing OpenCode AI agents.
-
-## Core Features
-
-### Repository & Git
-
-- **Multi-Repository Support** - Clone and manage multiple git repos with private repo support via GitHub PAT
-- **SSH Authentication** - SSH key authentication for git repositories
-- **Git Worktrees** - Work on multiple branches simultaneously, integrate a worktree branch into another branch, and delete worktrees with optional local and remote branch cleanup
-- **Source Control Panel** - View changes, commits, branches, and stashes in a unified interface
-- **Diff Viewer** - Unified diffs with line numbers and change counts
-- **Conflict Resolution** - Continue or abort merge, rebase, and cherry-pick operations, or hand conflicts to an agent session
-- **AI Commit Messages** - Generate commit messages from staged changes using OpenCode's default model
-- **Per-Repository Identities** - A default git identity plus saved presets, written to each repository's git config (shared by its worktrees) for Manager commits and agent shells
-
-[Learn more →](git.md)
-
-### File Management
-
-- **Directory Browser** - Navigate files with tree view and search
-- **Syntax Highlighting** - Code preview with highlighting for common languages
-- **File Operations** - Create, rename, delete, and drag-and-drop upload
-- **ZIP Download** - Download repos as ZIP (respects .gitignore)
-
-[Learn more →](files.md)
-
-### Terminal & Dev Loop
-
-- **Terminal** — Interactive PTY terminals scoped to a repo or workspace directory, with tabs and reconnect after reload
-- **Project Actions** — Run and stop repo commands from the header menu, with shared `.ocm/project.json` actions and worktree setup commands
-- **Preview** — View a running dev server through an authenticated, same-origin-safe preview gateway with HMR support
-
-[Terminal →](terminal.md) · [Project Actions →](project-actions.md) · [Preview →](preview.md)
-
-### Chat & Sessions
-
-- **Real-time Streaming** - Live message streaming with SSE
-- **Slash Commands** - Built-in (`/help`, `/new`, `/compact`) and custom commands
-- **File Mentions** - Reference files with `@filename` autocomplete
-- **Plan/Build Modes** - Toggle between read-only and file-change modes
-- **Permission Modes** — Ask every time or Accept everything, per session, with a default for new sessions
-- **Session Goals** — Keep a session working toward an objective until an auditor model says it is done or blocked
-- **Multi-run** — Run one prompt across up to five models at once, optionally each in its own workspace
-- **Agent Model Selection** — Switching agents applies that agent's configured model
-- **Session Pinning** — Pin important sessions to a dedicated section at the top of the session list
-- **Mermaid Diagrams** - Visual diagram rendering in chat
-
-[Learn more →](chat.md)
-
-### Schedules & Recurring Jobs
-
-- **Recurring Repo Jobs** - Run reusable prompts against a repository on an interval or cron schedule
-- **Prompt Templates** - Start with built-in reviews for repo health, dependencies, release readiness, docs drift, and more
-- **Run History** - Inspect statuses, logs, errors, and assistant output from past runs
-- **Session Handoff** - Open the linked OpenCode session for any run and continue from there
-- **Manual Runs** - Trigger the same job on demand when you want a fresh report immediately
-
-[Learn more →](schedules.md)
-
-### AI Configuration
-
-- **Model Selection** - Browse and filter available AI models
-- **Provider Management** - Configure API keys or OAuth for providers
-- **OAuth Support** - Secure OAuth login for Anthropic and GitHub Copilot
-- **Custom Agents** - Create agents with custom system prompts and tool permissions
-
-[Learn more →](ai-config.md)
-
-### MCP Servers
-
-- **Local Servers** - Add command-based MCP servers
-- **Remote Servers** - Connect to HTTP-based MCP servers
-- **Management** - Enable, disable, and configure servers
-
-[Learn more →](mcp.md)
-
-### Skills
-
-- **Reusable Instructions** - `SKILL.md` instruction sets that give agents domain-specific workflows
-- **Global and Project Scopes** - Share skills across all repositories or scope them to one repo
-
-[Learn more →](skills.md)
-
-### Agent Sandboxing
-
-- **Isolated Shell Commands** - Run agent `shell` tool commands inside a microVM instead of the Manager container
-- **Same Files, Separate Kernel** - Repositories are bind-mounted at the same paths, without access to Manager configuration, provider credentials, or SSH keys
-
-[Learn more →](sandboxing.md)
-
-### `ocm` CLI
-
-- **Local TUI, Remote Repo** - Attach your local OpenCode TUI to a repo hosted on the Manager
-- **Push and Pull** - Sync a local working tree with the Manager repo
-
-[Learn more →](../ocm-cli.md)
-
-### Text-to-Speech
-
-- **Browser TTS** - Built-in Web Speech API support
-- **External TTS** - Connect to OpenAI-compatible endpoints
-- **Audio Caching** - 24-hour cache with 200MB limit
-- **Voice Controls** - Configurable voice and speed settings
-
-[Learn more →](tts.md)
-
-### Speech-to-Text
-
-- **Browser STT** - Built-in Web Speech API support
-- **External STT** - Connect to OpenAI-compatible Whisper endpoints
-- **Voice Input** - Dictate messages with microphone button
-
-[Learn more →](stt.md)
-
-### Mobile & PWA
-
-- **Mobile-First Design** - Responsive UI optimized for mobile
-- **PWA Installable** - Add to home screen on any device
-- **iOS Optimized** - Proper keyboard handling and swipe navigation
-
-[Learn more →](mobile.md)
-
-### Appearance & Themes
-
-- **Appearance** - Switch between light, dark, or system to match your device
-- **Theme** - Choose the Manager palette or one of 36 bundled OpenCode color themes
-- **Server-Stored** - Appearance preferences are saved on the Manager server, not only in your browser
-
-Both pickers live under **Settings → General**.
-
-### Push Notifications
-
-- **Background Alerts** - Receive notifications when the app is closed
-- **Agent Events** - Get alerted for permissions, questions, errors, and completions
-- **Multi-Device** - Subscribe multiple devices (phone, tablet, desktop)
-- **Customizable** - Control which events trigger notifications
-
-[Learn more →](notifications.md)
-
-### Assistant Mode
-
-- **Dedicated AI Workspace** — Isolated assistant directory with managed configuration and a built-in bearer-token API
-- **Auto-Provisioned Skills** — Schedule management, notifications, settings, repo listing, and session management skills available out of the box
-- **Session Management** — List, create, follow up, read the reply of, and fork sessions through the `ocm` tool
-- **Session Continuity** — Navigating to the assistant always resumes the most recent session or creates one automatically
-
-[Learn more →](assistant-mode.md)
-
-### OpenCode Server Health
-
-- **Live Status** — Server health indicator in Settings (Healthy/Unhealthy)
-- **Graceful Restart** — Interrupted sessions resume natively after restart
-- **Auto-Recovery** — Configurable health monitoring with automatic recovery on failure
-- **Version Management** — View current versions and trigger OpenCode 2 upgrades from the UI
-
-[Learn more →](server-health.md)
-
-### Manager Logs
-
-- **In-App Log Viewer** — Manager and OpenCode server output in the Settings Logs tab, no shell access needed
-- **Filtering** — Minimum severity, source, and case-insensitive text search
-- **Live Controls** — Pause/resume, clear, copy, and automatic follow scrolling
-- **Bounded Memory** — In-memory ring buffer with explicit dropped-entry notice
-
-[Learn more →](logs.md)
diff --git a/docs/features/preview.md b/docs/features/preview.md
deleted file mode 100644
index 80ec527e..00000000
--- a/docs/features/preview.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# Preview
-
-Open a running dev server inside the WebUI through an authenticated gateway.
-
-The Preview panel lists the loopback ports that are currently listening, then proxies the selected one through a dedicated gateway origin. This lets you view a Vite, Next.js, or other dev server without exposing its raw port or weakening the Manager's own origin.
-
-## Port List
-
-Open **Preview** from the desktop sidebar tool list or the **More** drawer, including in the Assistant workspace. The port menu at the start of the toolbar lists every listening loopback port on the host as `:PORT command`, with the process's working directory underneath. Type in the menu to filter by port, command or directory. Working directories are read on Linux hosts (including the Docker image) and macOS; ports whose process runs inside the selected repository or workspace directory are grouped under **This repo** at the top, and the rest under **Other ports**. When no port belongs to the repository, the list is shown without group headings. Other platforms list no ports.
-
-Until a port is selected, the panel body lists the dev servers of this repo so one click opens the preview, and counts the other listening ports. When nothing is listening, it points to the Terminal and Actions to start a dev server.
-
-The list excludes reserved ports — the Manager port (`PORT`, default 5003), the OpenCode server port (default 5551) and the preview gateway port itself — and only includes ports at or above 1024. Any other listening loopback port can be previewed; there is no per-port allow-list. This grants nothing an authenticated user does not already have, because the [Terminal](terminal.md) can reach the same ports.
-
-Until a preview is open, the port list refreshes every 2 seconds. While a preview is open it refreshes only when you open the port menu.
-
-Selecting a port creates a preview session and renders the target in an iframe on the gateway origin. The iframe keeps that origin (`allow-same-origin`) so dev servers can use cookies and storage; isolation from the Manager comes from the separate origin, not from an opaque sandbox. Selecting a different port starts a new session for it.
-
-When preview is unavailable — `PREVIEW_PORT=0`, or the gateway could not listen on its port — the panel shows **Preview is unavailable**.
-
-If the requested port is not listening yet, the panel shows **Waiting for port N…** and refetches the list every 2 seconds. After 60 seconds it shows an error with a **Retry** button, but keeps polling, so the preview still opens if the port starts listening later.
-
-## Gateway
-
-The preview gateway listens on `PREVIEW_PORT` (default 5004) on its own origin. It is a separate origin from the Manager on purpose: preview content is untrusted and must not share the Manager origin. Setting `PREVIEW_PORT=0` disables the gateway. If the port is already in use, the Manager still starts, logs a warning, and reports preview as unavailable.
-
-Access requires an authenticated preview session:
-
-1. The Manager API mints a **single-use start token** for a listening port.
-2. The browser navigates to `/__ocm_preview/start?token=…&path=…` on the gateway origin.
-3. The gateway consumes the token (it expires after 60 seconds and cannot be reused) and sets an `ocm_preview` session cookie.
-
-Requests then carry the cookie. Manager auth cookies are stripped before proxying, because host-scoped cookies are shared across ports; the preview target never sees them. In the other direction, any `Set-Cookie` from the preview target that names a Manager auth cookie or `ocm_preview` is dropped, so preview content cannot overwrite the Manager session. The start `path` must stay on the gateway origin; anything else redirects to `/`.
-
-The gateway asks the target for uncompressed responses. When you use the preview remotely, put a compressing reverse proxy in front of it.
-
-The gateway also proxies **WebSocket upgrades** on the same origin, so dev-server HMR works through the panel.
-
-### Isolation level
-
-A gateway on another port of the same host — or a `PREVIEW_PUBLIC_URL` on a subdomain of the Manager's domain — is a different origin but the **same site** as the Manager, so the browser still sends the Manager's `SameSite=Lax` session cookie with requests from preview content. The Manager therefore rejects state-changing API requests (`POST`, `PUT`, `PATCH`, `DELETE`) whose `Sec-Fetch-Site` is `same-site` or `cross-site` unless their `Origin` is listed in `AUTH_TRUSTED_ORIGINS`. Never add the preview gateway origin to `AUTH_TRUSTED_ORIGINS`.
-
-A browser can hold one preview target per gateway origin at a time: the `ocm_preview` cookie names a single session. Opening a different port replaces the current target.
-
-## Opening Previews
-
-A preview can be opened from more than one place:
-
-- **Port menu** — pick a port in the toolbar, or a dev server listed in the panel body.
-- **Terminal links** — clicking a local dev URL (`http://localhost:PORT`, `127.0.0.1`, `0.0.0.0`, or `[::1]`) printed in a terminal opens the Preview panel at that port and path instead of a new browser tab. External links still open in a new tab.
-- **Project actions** — an action's resolved URL opens in the Preview panel when **Auto-open URL** is enabled.
-
-## Toolbar
-
-- **Port** — the port menu described in [Port List](#port-list). Press Escape to close the menu without closing the panel.
-- **Path** — enter a path and press **Go** (or Enter) to start a session for that path.
-- **Reload** — creates a fresh preview session and remounts the iframe with it.
-- **Open in new tab** — creates a fresh session and opens its start URL in a new tab with `noopener`. Start tokens are single-use, so this always mints a new one.
-- **Viewport** — switch between Mobile (390 px), Tablet (820 px), and Full width. Hidden on small screens, where the panel is already phone-width.
-
-## Behind HTTPS or a Reverse Proxy
-
-By default the panel builds the gateway origin as `${location.protocol}//${location.hostname}:${PREVIEW_PORT}`. When the Manager is served over HTTPS (directly or behind a reverse proxy), the browser blocks the iframe for two reasons:
-
-- **Mixed content** — an `https://` page cannot embed an `http://` preview.
-- **Third-party cookies** — the `ocm_preview` cookie is blocked in a cross-site iframe.
-
-Set `PREVIEW_PUBLIC_URL` to a same-site HTTPS origin that proxies the preview gateway, for example `https://preview.example.com`. Do not add it to `AUTH_TRUSTED_ORIGINS` (see [Isolation level](#isolation-level)). The panel then builds preview URLs from that origin instead, however the Manager itself was opened. As a fallback, **Open in new tab** opens the preview as a top-level page, where the session cookie is first-party.
-
-!!! warning "Turn off caching for the preview origin"
- The gateway passes the dev server's cache headers through unchanged, and every port shares the one preview origin. A CDN or caching proxy in front of the gateway can therefore serve stale files, mix files between projects, and serve cached files without the preview login. Bypass caching for the preview hostname.
-
-For a complete setup through a Cloudflare Tunnel, including the cache rule and Cloudflare Access, see [Cloudflare Tunnel](../configuration/cloudflare-tunnel.md).
-
-## Related
-
-- [Environment Variables](../configuration/environment.md) — `PREVIEW_PORT` and `PREVIEW_PUBLIC_URL`.
-- [Docker](../configuration/docker.md) — exposing the preview gateway port.
-- [Terminal & Dev Loop](terminal.md) — start a dev server in a terminal.
diff --git a/docs/features/project-actions.md b/docs/features/project-actions.md
deleted file mode 100644
index c4bfd9e8..00000000
--- a/docs/features/project-actions.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# Project Actions
-
-Define repeatable commands for a repository and run them from the header menu.
-
-Project actions are long-lived commands — a dev server, a build watcher, a test runner — that run in a terminal. They are configured in one of two places:
-
-- **My settings** (personal) — stored in the Manager database, keyed to the repository's main checkout, so they apply across the repository and all its worktrees.
-- **The repository file** — `.ocm/project.json` at the repo root, committed and shared with everyone who clones it.
-
-Both sources are merged in the **Project Actions** dialog and the header menu.
-
-## Actions
-
-An action has these fields:
-
-| Field | Description |
-|-------|-------------|
-| `id` | Stable identifier. Letters, digits, `_` and `-`, up to 64 characters. |
-| `name` | Label shown in the menu, up to 60 characters. |
-| `command` | Shell command, up to 4000 characters. |
-| `icon` | Optional icon: `play`, `build`, `test`, `lint`, `terminal`, `server`, `bug`, or `rocket`. |
-| `url` | Optional URL template opened for the action. |
-| `autoOpenUrl` | When enabled, the resolved URL opens automatically after the action starts. |
-
-Actions run as `/bin/sh -c ` in a PTY. Starting an action that is already running focuses its existing terminal instead of starting a second process. Stopping an action removes its PTY.
-
-### URL Templates
-
-The `url` field accepts two placeholders:
-
-| Placeholder | Resolves to |
-|-------------|-------------|
-| `{worktree}` | The basename of the current directory. |
-| `{branch}` | The current git branch of the directory, from `git rev-parse --abbrev-ref HEAD`. |
-
-For example, `http://localhost:5173/{worktree}` becomes `http://localhost:5173/feature-login` in a worktree named `feature-login`. On a detached HEAD, `{branch}` becomes `HEAD`. If the git command fails (for example, the directory is not a git checkout), the whole template is left unchanged, including `{worktree}`.
-
-When the resolved URL is a local dev URL (`http://localhost:PORT`, `127.0.0.1`, `0.0.0.0`, or `[::1]`), it opens in the [Preview](preview.md) panel rather than a new browser tab.
-
-## Running and Stopping
-
-The repository and session headers show a **Project actions** play button. The menu lists every configured action:
-
-- Select an action to start it. The terminal opens automatically.
-- A running action shows a dot. Select **Stop** under it to remove its PTY.
-- Select **Manage actions…** to open the Project Actions dialog.
-
-Actions defined in the repository file never run until trusted (see [Trust](#trust)).
-
-## Repository Configuration File
-
-`.ocm/project.json` defines actions and worktree setup commands for the repository. The format:
-
-```json
-{
- "version": 1,
- "projectActions": [
- {
- "id": "dev",
- "name": "Dev server",
- "command": "pnpm dev",
- "icon": "server",
- "url": "http://localhost:5173/{worktree}",
- "autoOpenUrl": true
- }
- ],
- "setupWorktree": [
- "pnpm install"
- ]
-}
-```
-
-- `version` is required and must be `1`.
-- `projectActions` and `setupWorktree` are optional. Up to 20 setup commands are allowed. Personal actions are limited to 50; the file itself has no action limit.
-- An action `url` must start with `http://` or `https://`.
-- A repository action whose `id` matches a personal action is not listed or run, and the dialog reports a warning, so personal actions always win. It is still part of the file's trusted content (see [Trust](#trust)).
-- `.ocm` and `.ocm/project.json` must be regular files and directories. A symbolic link at either path is reported as an invalid file and is never written through.
-- The file is read from the selected repository or workspace directory, so each worktree can carry its own version. Trust is stored once per project, so trusting the file in one worktree does not trust a different version of it in another.
-
-Project actions are not available in the Assistant workspace.
-
-## Moving Actions and Setup Commands
-
-The Project Actions dialog moves items between personal settings and the repository file from each row's **⋯** menu:
-
-- **Move to repository** writes the item into `.ocm/project.json` and removes it from personal settings. Because the user authored it, the file is trusted automatically, unless it already holds untrusted actions or setup commands; in that case it stays untrusted until reviewed.
-- **Move to my settings** removes the item from `.ocm/project.json` (deleting the file if it becomes empty) and stores it in personal settings.
-
-Moves are transactional: if the file write or the settings update fails, the file is restored.
-
-## Trust
-
-Commands in `.ocm/project.json` run on your machine, so the Manager does not run them until you trust the file:
-
-- Trust covers everything in the file that can run or open: each action's `id`, `name`, `command`, `url` and `autoOpenUrl` (including actions hidden because a personal action has the same `id`), plus every setup command. Changing any of these resets trust; changing an icon does not.
-- Both trust prompts — **Review** in the dialog and **Trust and run** in the header menu — list every action and setup command that trusting covers, not only the one you clicked.
-- Trusting requires echoing the exact hash of the content shown, so a file cannot be swapped between review and trust.
-- Untrusted repository commands never run — not from the header menu, and not as worktree setup commands.
-- The dialog shows a banner above its tabs while the file is untrusted. **Review** lists the untrusted commands, and **Trust these commands** confirms. Attempting to run an untrusted action prompts for trust first.
-- Moving an item into the file auto-trusts it, because the user authored it, unless the file already holds untrusted actions or setup commands.
-
-## Worktree Setup Commands
-
-Setup commands run once after a new working directory is created — Manager worktrees and OpenCode workspaces created through the Manager, including workspaces created by multi-run and by agents through `ocm`. Workspaces created directly in OpenCode do not run setup commands. They run in a PTY with `set -e`, so the first failing command stops the rest.
-
-- `$ROOT_PROJECT_PATH` is available in the environment and points at the repository's main checkout.
-- Personal setup commands always run. Repository setup commands are skipped while the file is untrusted; the skipped result is reported.
-- Setup commands are configured in the **Worktree setup** tab of the Project Actions dialog. Edits are saved together with **Save setup**, which is enabled once there are unsaved changes.
-
-## Related
-
-- [Terminal & Dev Loop](terminal.md) — the PTY terminals actions run in.
-- [Preview](preview.md) — open an action's URL in the preview panel.
diff --git a/docs/features/sandboxing.md b/docs/features/sandboxing.md
deleted file mode 100644
index 64f32205..00000000
--- a/docs/features/sandboxing.md
+++ /dev/null
@@ -1,262 +0,0 @@
-# Agent Sandboxing
-
-Run OpenCode agent `shell` tool commands inside an isolated microVM instead of directly in the Manager container. Sandboxing does not restrict trusted OpenCode configuration or extensions and is not a per-project permission boundary.
-
-## Overview
-
-When sandboxing is enabled, every command an OpenCode agent runs through the `shell` tool is executed inside a microVM managed by [`msb`](https://github.com/superradcompany/microsandbox). OpenCode itself continues to run in the Manager container and loads the same global and project configuration, providers, models, plugins, tools, MCP servers, formatters, LSP servers, hooks, and shell settings as it does with sandboxing disabled.
-
-The microVM sees repositories through bind mounts at the same paths used by the Manager. Agent commands therefore operate on the same files while running under a separate kernel without access to Manager configuration, provider credentials, or SSH keys.
-
-## What Gets Sandboxed
-
-| Execution path | Through the microVM |
-|----------------|---------------------|
-| Chat session `shell` tool calls | Yes |
-| Scheduled run `shell` tool calls | Yes |
-| Subagent `shell` tool calls | Yes |
-| WebUI `!command` shell mode (`POST /api/session/:sessionID/shell`) | Yes; it spawns through the same `Shell.create` path as the `shell` tool, so it is planned and routed into the microVM. It is not badged in the UI because the surface fires no `tool.execute.after` hook |
-| Shell API (`POST /api/shell`) | Yes; it spawns through the same `Shell.create` path as the `shell` tool. It is not badged in the UI because the surface fires no `tool.execute.after` hook |
-| Slash-command shell templates (`` !`cmd` ``, `POST /api/session/:sessionID/command`) | No; OpenCode expands each interpolation itself with the configured shell, directly on the host and outside `Shell.create`, so the `create.before` hook never sees it |
-| PTY terminals (`POST /api/pty`, `GET /api/pty/:ptyID/connect`), including the Manager Terminal panel and project action terminals | No; normal OpenCode behavior, with the user's configured shell. Manager terminals and project actions receive the repo-scoped GitHub token env through `CredentialProvider.getGhCliEnv` at creation; commits take their identity from git config |
-| OpenCode file tools | No; while enforcement is on they are denied the global configuration directory (see [Mounts and Secrets](#mounts-and-secrets)) |
-| Manager-side git operations | No |
-| Plugins and custom tools | No; normal OpenCode behavior |
-| The `ocm` tool (`ocm-manager.js`) | No; runs in the Manager's OpenCode process |
-| Local MCP servers | No; normal OpenCode behavior |
-| Formatters, LSP servers, and hooks | No; normal OpenCode behavior |
-| Custom provider modules | No; normal OpenCode behavior |
-
-OpenCode 2 routes the agent `shell` tool, WebUI `!command` shell mode, and the shell API through `Shell.create`, which triggers the `shell` domain `create.before` hook with a mutable `{ command, cwd, timeout, shell, env }` before spawning. The Manager-owned `ocm-sandbox.js` plugin registers that hook: while enforcement is on, it asks the Manager for the sandbox working directory and pins both the generated shim as the shell and that directory as `OCM_SANDBOX_WORKDIR` on the event. The event carries no tool call id, so every `Shell.create` spawn is sandboxed rather than only the ones with a tool call. PTY terminals and slash-command shell templates use separate paths and are not affected.
-
-Both pinned values are locked accessors, and the plugin verifies each lock, so a later plugin cannot silently restore host execution. The shim fails closed as well: without `OCM_SANDBOX_WORKDIR` it prints an error to stderr and exits 126 instead of running the command on the host. If the sandbox cannot be prepared, the spawn fails instead of running on the host.
-
-The command the agent wrote is never rewritten. It reaches `msb exec` as a single argument, so the recorded tool call, the permission rules, and the model's own context all keep the original command.
-
-Each sandboxed `shell` call is marked `sandbox` in its tool metadata, which the WebUI shows as a green badge on the tool call. Metadata is not sent to the model.
-
-## OpenCode Configuration
-
-Sandbox enforcement does not sanitize, rewrite, filter, or replace OpenCode configuration files. Global and project configuration loads normally, configured plugins are installed normally, and config, MCP, and authentication API requests are forwarded unchanged.
-
-Enforcement does not change the configured `shell` setting. The plugin pins the shim per spawn instead, so the setting is left as the user configured it and the shell it names still applies to PTY terminals and to slash-command shell templates.
-
-Existing `.ocm-sandbox-backup` and `.ocm-quarantine` artifacts created by older releases are restored during startup and are no longer created.
-
-Configured extensions execute with OpenCode's normal host-process privileges. This includes plugins, custom tools, local MCP servers, formatters, LSP servers, hooks, custom provider modules, explicit shell configuration, and slash-command shell templates. These are trusted configuration outside the agent `shell` isolation boundary.
-
-## Other Shell Surfaces
-
-WebUI `!command` shell mode and the shell API (`POST /api/shell`) **are** sandboxed: both spawn through the same `Shell.create` path as the `shell` tool, so they are planned and routed into the microVM.
-
-PTY terminals follow OpenCode's normal host-process behavior during enforcement and use the user's configured shell. This includes the Manager [Terminal panel](terminal.md) and [project actions](project-actions.md): they run as OpenCode PTYs on the host, receive the repo-scoped GitHub token env through `CredentialProvider.getGhCliEnv` at creation, take their commit identity from git config, and still bypass the sandbox shell hook. Slash-command shell templates are not sandboxed either: when a command template contains a `` !`cmd` `` interpolation, OpenCode resolves the configured shell and runs the command directly on the host before the resulting prompt is sent, without going through `Shell.create` or its `create.before` hook. That interpolation is trusted configuration outside the agent `shell` isolation boundary.
-
-There is no fallback to a host shell in the `Shell.create` path: the shim refuses to run without a pinned sandbox working directory, so a spawn whose plan, shim, or lock is unavailable is refused instead of running on the host.
-
-The OpenCode server binds to the configured `OPENCODE_HOST` regardless of enforcement; OpenCode 2 always requires a password, so the managed server always starts with the password resolved by the Manager.
-
-## Host Requirements
-
-Sandboxing requires KVM on a Linux host and access to Linux `/proc` for process identity attestation. Start the Manager with the sandbox overlay:
-
-```bash
-docker compose -f docker-compose.yml -f docker-compose.sandbox.yml up -d
-```
-
-The overlay exposes `/dev/kvm`, `/dev/net/tun`, and `NET_ADMIN` without enabling full container privilege. Docker Desktop on macOS and Windows cannot provide `/dev/kvm`, so the sandbox toggle remains unavailable there.
-
-## Scope and Lifecycle
-
-All projects share one microVM named `ocm-workspace`:
-
-- It mounts the four project roots plus the OpenCode tool-output, global-skills, and agent temporary directories, at identical guest paths. See [Mounts and Secrets](#mounts-and-secrets).
-- Repositories and worktrees created after boot are visible immediately because their parent roots are mounted.
-- Each command supplies its own working directory through `msb exec -w`.
-- A session outside the mounted roots is refused rather than executed on the host.
-- The Manager verifies the microVM image, resources, user, network policy, mounts (including the `/tmp` tmpfs size and mount options), and labels before reuse. `/tmp` is the only tmpfs the microVM may carry; any other tmpfs fails attestation.
-- MSB pulls the configured `SANDBOX_IMAGE` (a digest-pinned `docker.io/cstechdev/ocm-sandbox` by default) automatically; see [Sandbox Guest Image](#sandbox-guest-image) to build your own.
-- The Manager pins a neutral `/usr/bin/env` entrypoint, so the image's own OCI entrypoint is never inherited.
-- A stale or unverifiable microVM is removed and recreated.
-- Manager shutdown and an enforced-to-disabled restart stop the managed microVM.
-
-To remove it manually:
-
-```bash
-msb rm --force --label ocm.managed=true
-```
-
-## Mounts and Secrets
-
-The microVM receives writable bind mounts for:
-
-| Host path | Why it is mounted |
-|-----------|-------------------|
-| `/workspace/repos` | Project root |
-| `/workspace/schedule-worktrees` | Project root |
-| `/workspace/.opencode/state/opencode/worktree` | Project root: worktrees created through OpenCode's worktree API |
-| `/workspace/.opencode/state/opencode/forge/worktrees` | Project root: worktrees created by the opencode-forge plugin for its loops |
-| `/workspace/.opencode/state/opencode/tool-output` | Where OpenCode saves the full content of a truncated tool result before handing the agent that absolute path |
-| `/workspace/.config/opencode/skills` | Global skills, including the scripts and reference files a skill bundles and refers to by absolute path |
-| `/workspace/.opencode/tmp/opencode` | The temporary directory OpenCode's environment instructions tell agents to prefer for work outside the workspace |
-
-Each is mounted at the identical guest path. That is the point: OpenCode hands the model absolute host paths, and the host-side `read`, `write`, and `glob` tools resolve them against the container. A path that is not mounted resolves for those tools but not for a sandboxed `shell` call, which is how an agent ends up searching for a file it was just told the exact location of.
-
-!!! warning "Known gap: shell output files"
- OpenCode writes background and truncated `shell` output to files under `/workspace/.opencode/state/opencode/shell/` and tells the agent their paths. That directory is not mounted, so a sandboxed `shell` call cannot read them; the host-side `read` tool can.
-
-Only the four project roots are accepted as working directories. The other three mounts are readable and writable but are never a valid working directory, so `shell` calls still have to run inside a repository or a worktree.
-
-No internal API token exists anywhere under the mounted roots. The token lives in the Manager's database and reaches the generated plugins only through the `OCM_INTERNAL_TOKEN` environment variable of the Manager's own OpenCode process, which is never part of the guest environment.
-
-Because `localhost` inside the microVM is the guest rather than the Manager, and because the guest has no token to present, an agent command cannot call the internal API with `curl`. Agents reach the Manager through the `ocm` tool instead, which executes in the Manager's own OpenCode process. The tool's `request` action covers settings, repos, OpenCode workspaces, and schedules through an allow-list of internal API routes, while `send_notification` covers push notifications.
-
-The microVM also mounts a runtime-owned tmpfs at `/tmp`. It is sized to one quarter of the microVM memory, clamped to 1-512 MiB, so agent commands get guest-only scratch space that is not backed by a host filesystem.
-
-The agent temporary directory is separate from that tmpfs. The Manager sets `TMPDIR=/workspace/.opencode/tmp` on the OpenCode child, which puts OpenCode's own temporary directory at `/workspace/.opencode/tmp/opencode` — the path its environment instructions advertise — so the same files are visible to sandboxed commands and to the host-side file tools. Everything else under `TMPDIR` (temporary files from host-side `git`, `gh`, and MCP servers) stays out of the guest. The Manager empties the mounted directory each time it starts the OpenCode child, matching the lifetime it had in the container's `/tmp`; it clears the contents rather than the directory itself, because replacing the directory would detach a running microVM's bind mount.
-
-The following remain outside the microVM:
-
-| Host path | Contents |
-|-----------|----------|
-| `/workspace/config` | SSH configuration and known hosts |
-| `/workspace/.ssh-keys` | Repository SSH private keys |
-| `/workspace/.config/opencode/plugins`, `/workspace/.config/ocm` | Generated plugins and the shell shim — the enforcement mechanism itself |
-| `/workspace/.config/opencode` (except `skills`) | OpenCode configuration |
-| `/workspace/.opencode/state` (except `opencode/tool-output`, `opencode/worktree`, and `opencode/forge/worktrees`) | Provider and MCP credentials, the forge database |
-
-OpenCode's host process still reads these paths normally. They are omitted only from the agent command environment.
-
-The configuration directory also holds `service.json`, where the Manager writes the managed OpenCode server password for service mode. OpenCode's default agent permissions allow the host-side file tools to read the global configuration directory, and that password grants the full OpenCode API, including unsandboxed PTY terminals. While enforcement is on, `ocm-sandbox.js` therefore denies, through OpenCode's permission `evaluate` hook:
-
-- `read` of `service.json` itself;
-- `grep` and `glob` whose absolute search path is the configuration directory or one of its ancestors;
-- `external_directory` access to the configuration directory or one of its ancestors.
-
-The denial is specific to `service.json`. A sibling configuration file such as `opencode.json` or `opencode.jsonc` is not denied for `read`, and the `grep`/`glob` check only matches an absolute search path that resolves to the configuration directory or an ancestor — a relative path is not matched. The `skills` subdirectory is unaffected.
-
-## Enabling and Enforcement
-
-1. Enable **Sandbox** in Settings.
-2. Restart the OpenCode server when prompted.
-3. The Manager starts the new child with `OCM_SANDBOX_ENFORCED=true`.
-4. The Manager writes the shell shim next to the generated plugins and refuses to start an enforced server if it cannot.
-5. The sandbox plugin resolves the `Shell.create` working directory through the internal planner and pins the shim and that directory for the spawn.
-6. If capability detection, planning, boot, attestation, or shell pinning fails, the spawn fails instead of running on the host.
-
-A directory outside the mounted roots fails with:
-
-```text
-Sandbox enforcement is on but the sandbox is unavailable: working directory is outside the sandboxed project roots (/workspace/repos, /workspace/schedule-worktrees, /workspace/.opencode/state/opencode/worktree, /workspace/.opencode/state/opencode/forge/worktrees)
-```
-
-The enforcement stamp remains authoritative for the lifetime of the OpenCode child, even if the setting changes before the required restart.
-
-## Worktree Placement
-
-- Scheduled runs use raw git worktrees under `/workspace/schedule-worktrees`.
-- OpenCode's own worktrees (`/workspace/.opencode/state/opencode/worktree`, created through its `/api/worktree` API) and opencode-forge loop worktrees (`/workspace/.opencode/state/opencode/forge/worktrees`) are project roots, so agent `shell` calls run inside them without further configuration. Both live under OpenCode's data directory because the Manager sets `XDG_DATA_HOME=/workspace/.opencode/state`.
-- Any other worktree location outside the mounted roots is created normally; only a later agent `shell` call whose working directory is outside the mounts is refused by the planner.
-- External repositories symlinked into `/workspace/repos` remain outside the microVM because the link target is not mounted.
-
-## Git Credentials in the Sandbox
-
-By default the guest receives no credentials, so a sandboxed `git push`, `git pull`, or `gh` call fails to authenticate. The repo's git identity (`GIT_AUTHOR_*` / `GIT_COMMITTER_*`) is always forwarded, so `git commit` works either way. This applies to agent `shell` calls, WebUI `!command` shell mode, and the shell API alike, since all three are routed into the microVM.
-
-Forwarding is opt-in, off by default:
-
-| Scope | Where | Effect |
-| --- | --- | --- |
-| Global | Settings → Sandbox → *Git credentials in sandbox* (`preferences.sandbox.gitCredentials`) | Default for every repo |
-| Per repo | `repo_settings.sandboxGitCredentials` | Overrides the global default in either direction. The planner honours it when resolving credentials, but nothing writes it yet — there is no UI or API for the per-repo override |
-
-When enabled, the planner resolves credentials on the host and the shim forwards them into the microVM with `msb exec -e`:
-
-- One `http..extraheader` pair per configured host, so a command can authenticate against every host you have a credential for, not just the repo's own remote.
-- Where several credentials share a host, the repo-bound credential wins, then `defaultGitCredentialId`. Exactly one credential is ever sent per host — git treats `http..extraheader` as multi-valued and would otherwise send competing `Authorization` headers.
-- `GH_TOKEN` / `GITHUB_TOKEN` for `gh`.
-- At most 16 hosts. Beyond that the Manager logs a warning and forwards the first 16 rather than emitting a `GIT_CONFIG_COUNT` that git would reject.
-
-Both the switch and the credentials themselves are resolved per command, so turning forwarding on or off, or changing a credential, takes effect on the next sandboxed command without restarting the OpenCode server. Only the sandbox enable toggle requires a restart.
-
-Understand the trade-off before enabling it. `msb exec -e` is the only injection mechanism microsandbox offers, so the token is visible in the `msb` process arguments on the host and in the guest environment for that command's lifetime. A prompt-injected agent inside the microVM can read and exfiltrate any credential you forward. The global switch is the only exposed control today, so enabling it applies to every repo; leave it off while any agent handles untrusted input.
-
-## Sandbox Guest Image
-
-`SANDBOX_IMAGE` defaults to a digest-pinned reference of `docker.io/cstechdev/ocm-sandbox`. The `Sandbox Image` workflow (`.github/workflows/sandbox-image.yml`) builds `Dockerfile.sandbox` natively: `linux/amd64` on `ubuntu-latest` and `linux/arm64` on `ubuntu-24.04-arm`. Pull requests from this repository that touch the Dockerfile, the workflow, or `scripts/sandbox-dockerd-start.sh` run build-time verification without publishing or requiring registry credentials. A manual `workflow_dispatch` publishes both platforms by digest and merges them into one manifest list, tagged with the commit SHA, package version, and optional `tag` input (default `latest`). Publishing requires `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` repository secrets. The job summary prints the index digest to pin.
-
-Native runners avoid the x86_64 `rustc` segmentation fault observed under qemu-user on the arm64 build host. Later uv releases also failed in that environment. Neither platform skips toolchain execution to work around emulation failures. A single-platform local build on an arm64 host is:
-
-```bash
-docker buildx build --platform linux/arm64 -t ocm-sandbox:local -f Dockerfile.sandbox --load .
-```
-
-After a publish, update the pin in `shared/src/config/defaults.ts` (`SANDBOX.IMAGE`) and in the `docker-compose.sandbox.yml` default to the new `@sha256:` digest. That bump is what makes deployments adopt a rebuilt guest image, and it is deliberate rather than convenient:
-
-- msb caches images by reference. `msb pull docker.io/cstechdev/ocm-sandbox:latest` reports "already cached" without contacting the registry, and `pull_policy: IfMissing` never re-pulls, so a host that pulled a mutable tag once keeps that content forever.
-- Sandbox attestation compares the image *reference string*. A floating tag therefore keeps passing attestation while its content drifts, so the running microVM is never recreated either.
-
-A digest reference sidesteps both: it is a cache key no host has seen before, so `IfMissing` pulls it, and it fails the reference comparison against a microVM created from the old reference, so the Manager removes and recreates that microVM on its own. No manual cleanup is required on deploy; to reclaim the superseded image afterwards, run `msb image prune` or `msb image rm `.
-
-It is built from the same `node:24.21.0-trixie` tag as the Manager image (Debian 13, `buildpack-deps` based), so both track one Node and one Debian release and the compile toolchain is already present. pnpm, Bun, uv, fallow, Rust, Go, and Playwright have build-argument version pins; base-image and apt tools follow their package sources:
-
-| Tool | Source | Notes |
-| --- | --- | --- |
-| `gcc` / `g++` / `make` / `ld` / `pkg-config` | base image | GCC 14, GNU Make 4.4 |
-| `glib-2.0` | base image | With `pkg-config` metadata |
-| `git`, `ssh`, `python3`, `curl`, `wget`, `unzip` | base image | |
-| `python` | apt (`python-is-python3`) | The base image ships only `python3`; a skill or script invoking `python` would otherwise fail |
-| `ping`, `ip`, `ss`, `netstat`, `dig`, `host`, `nslookup`, `nc`, `traceroute`, `lsof`, `rsync` | apt | The base image ships no network diagnostics at all. The image build fails if any of these is missing |
-| `pnpm` | `npm install -g` (`PNPM_VERSION`) | Installed into `/usr/local` as root. A project `packageManager` pin of a different version is honoured by pnpm itself, which downloads it into the pnpm store on first use; the build verifies that as an unknown uid |
-| `bun`, `bunx` | official installer (`BUN_VERSION`) | Installed to `/opt/bun`, world-readable, both symlinked onto `PATH` |
-| `uv`, `uvx` | Astral installer (`UV_VERSION`) | Standalone binaries on `PATH`; `uv tool` shims land in `/opt/agent-tools/bin`, which is on `PATH`. Pinned at 0.12.7 |
-| `fallow` | `npm install -g` (`FALLOW_VERSION`) | Dead-code and unused-export analysis CLI |
-| `rustc`, `cargo`, `rustup` | rustup (`RUST_VERSION`, minimal profile) | `RUSTUP_HOME=/usr/local/rustup` and `CARGO_HOME=/usr/local/cargo` follow the official rust image layout and are opened to every uid afterwards, so the exec user can `cargo install` and add toolchains; `/usr/local/cargo/bin` is on `PATH` |
-| `go` | official tarball (`GO_VERSION`) | Unpacked to `/usr/local/go`, on `PATH`. `GOBIN=/opt/agent-tools/bin` puts `go install` binaries next to the other agent tools; `GOPATH` and the module cache default under the writable `HOME` |
-| `npm -g`, `pnpm -g` | npm / pnpm | Global installs redirect to `/opt/agent-tools` (`npm_config_prefix`, `PNPM_HOME`), so they are writable for the exec user and their binaries are on `PATH` |
-| `sudo` | apt | Passwordless for every guest user via `/etc/sudoers.d/ocm-guest`; system-wide `apt-get install` works from the exec user |
-| `pip`, `venv` | apt | `python3-pip` and `python3-venv` on top of the base `python3`. Debian's externally-managed marker is removed, so `pip` and `uv pip --system` are not refused; system-wide writes still need `sudo`, so use `--user` or a venv |
-| `jq`, `ripgrep`, `less`, `tree`, `file`, `procps` | apt | Common CLI tools agent workflows expect; Debian 13 carries jq 1.7 and ripgrep 14 |
-| `gh` | official `cli.github.com` apt repo | Current release. Debian's own package is several years stale |
-| Docker Engine, CLI, Buildx, Compose | official Docker Debian apt repo | `ocm-dockerd-start` starts the guest daemon on demand and waits for readiness. The Manager adds the provisioned exec user to the guest's Docker group. No host Docker socket is mounted |
-| Chromium | Playwright (`PLAYWRIGHT_VERSION`, default `1.63.0`) | Installed to `PLAYWRIGHT_BROWSERS_PATH=/ms-playwright`, world-readable so `SANDBOX_EXEC_USER` can launch it |
-
-`NODE_PATH=/usr/local/lib/node_modules` is set so agent code can `require("playwright")` from any working directory. It is only a resolution fallback; a project-local `node_modules` still wins.
-
-Before using Docker inside the guest, run `ocm-dockerd-start`. The helper is safe to call repeatedly, serializes concurrent starts, and probes only the guest's Unix socket regardless of `DOCKER_HOST` or `DOCKER_CONTEXT`. Daemon startup logs are in `/var/log/dockerd.log`. Docker data lives on the 20 GiB sparse ext4 named volume `ocm-workspace-docker-data`, mounted at `/var/lib/docker`; Docker's overlay storage cannot use the sandbox's overlay root filesystem. The named volume survives sandbox restarts and recreation, remains private to the guest, and is not shared with the host Docker daemon. Removing that named volume deletes its Docker images, containers, and volumes. Sandbox attestation requires exactly this named mount in addition to the existing project mounts.
-
-The guest runs every command as a numeric host uid that has no `/etc/passwd` entry in the image, so the uncorrected default `HOME` is `/` and anything that writes per-user state — the pnpm store, uv and pip caches, `git config`, `gh` config, the cargo registry, the Go module cache — dies with `EACCES` on the first run. The image therefore sets `HOME=/home/ocm-agent` (mode 1777), opens the rust homes to every uid, and puts a world-writable `/opt/agent-tools/bin` on `PATH` for `uv tool`, `go install` and global package-manager installs. Image `ENV` reaches `msb exec` commands verbatim, including for unknown uids. The image build verifies the whole toolchain as an unprivileged uid — including a `cargo build` and a `go run` — so a root-only regression fails the build instead of the agent.
-
-The pnpm store itself is pinned to a container-internal path with `PNPM_CONFIG_STORE_DIR=/home/ocm-agent/.local/share/pnpm/store`. The pin goes through pnpm's own config env var because pnpm 11 no longer reads `npm_config_*` variables; with the store unpinned, pnpm places it on the mounted project filesystem, which pollutes the repository, slows installs over the host bind mount, and can end up committed.
-
-`sudo` also needs the exec user to exist in the guest, which the image cannot know at build time. The Manager provisions the `/etc/passwd`, `/etc/group`, and `/etc/shadow` entries for the exec uid through an idempotent root exec (verified by `getent`, so repeats are no-ops) at three points: when the workspace sandbox is created, when a stopped sandbox is started, and at Manager startup. A freshly created microVM does not accept `msb exec` until its guest agent is up, so provisioning first waits on `msb ping` (bounded by `SANDBOX_START_TIMEOUT_MS`) instead of racing the boot. Without the entries, `sudo` refuses with "you do not exist in the passwd database" or a PAM "account validation failure". Provisioning is deliberately non-fatal: if it fails, the Manager logs a warning and the sandbox still runs commands — only `sudo` is unavailable. A microVM created from an older image reference is replaced automatically when the digest pin changes, so it picks up both sudo and the fixed toolchain without manual cleanup.
-
-Chromium launches headless as the non-root exec user without extra flags. If your host kernel restricts user namespaces so Chromium's own sandbox fails, pass `--no-sandbox` — the microVM is already the isolation boundary.
-
-The image is around 5 GB unpacked against a 1.6 GB base; Chromium with its dependencies (about 1.1 GB) and the Rust and Go toolchains (about 0.8 GB) account for most of the rest. When sandboxing is enabled, the Manager gets everything ready before the first command instead of on it: at startup, and whenever enforcement is switched on, it pulls the image and then boots the shared microVM in the background (`msb pull`, then the same create/start/attest/provision path a command would trigger, bounded by `SANDBOX_START_TIMEOUT_MS`; raise it on slow links). One microVM serves every repo and schedule worktree, so a single warm-up covers the whole workspace. The pull is a no-op once cached, `docker-compose.sandbox.yml` persists the microsandbox store in the `microsandbox-data` volume so the download survives container replacement, and the shutdown handler stops the microVM again. Because the warm-up runs in the background, server startup never waits for it, and a command issued while it is still running joins the same in-flight boot rather than starting a second one.
-
-### Using your own image
-
-Point `SANDBOX_IMAGE` at any OCI reference the host can pull. It must contain every tool the agent expects to run, and a shell at `/bin/sh`. Changing the value is safe at runtime: the running microVM fails image attestation and is recreated automatically.
-
-To build it on the server instead of pulling:
-
-```bash
-docker build -f Dockerfile.sandbox -t my-sandbox:local .
-# then set SANDBOX_IMAGE=my-sandbox:local
-```
-
-Pin a concrete tag or digest rather than a floating one. Attestation compares the image *reference string*, so a mutable tag keeps passing attestation while the underlying image drifts.
-
-Override any tool pin at build time with its `ARG`, for example `--build-arg PLAYWRIGHT_VERSION=1.62.0` or `--build-arg RUST_VERSION=1.97.0`; the build asserts the installed version, so a typo fails early instead of shipping a stale tool. If your project drives Playwright itself, match this version to the one in your `package.json`; a mismatched browser revision makes Playwright refuse to launch. Rebuild and republish the guest image, then update the `SANDBOX.IMAGE` digest, whenever you change a pin.
-
-The Manager image itself carries the same Chromium browser and `playwright` package, installed by `playwright install --with-deps chromium` for the same `PLAYWRIGHT_VERSION` at build time and made world-readable. That is what makes browser automation run in a container with sandboxing off, where the agent has no root or sudo to install them at runtime; `NODE_PATH=/usr/local/lib/node_modules` lets agent code resolve `playwright` from any working directory. Both images track one pin, so bumping `PLAYWRIGHT_VERSION` refreshes the sandbox browser and the Manager's browser together.
-
-## Caveats
-
-- With sandboxing enabled the image pull and microVM boot happen at Manager startup, so commands normally pay neither. A command that runs before the warm-up finishes waits on that same boot, bounded by `SANDBOX_START_TIMEOUT_MS`.
-- `SANDBOX_IMAGE` must contain every tool the agent expects to run.
-- `SANDBOX_EXEC_USER` must match the workspace owner so commands can write mounted files.
-- A `shell` the user configured does not apply to the `shell` tool, `!command` shell mode, or the shell API while enforcement is on, because all three are routed into the microVM; PTY terminals and slash-command shell templates still use it.
-- Credentials injected into OpenCode's host shell environment are not forwarded into the microVM unless git credential forwarding is enabled; see [Git Credentials in the Sandbox](#git-credentials-in-the-sandbox).
-- Message parts recorded by older releases still hold the old `msb exec` wrapper; the WebUI unwraps them for display and still badges them.
-- Plugins and other configured host-process extensions are trusted and are not isolated by agent `shell` sandboxing.
diff --git a/docs/features/schedules.md b/docs/features/schedules.md
deleted file mode 100644
index 6cfdd641..00000000
--- a/docs/features/schedules.md
+++ /dev/null
@@ -1,203 +0,0 @@
-# Schedules & Recurring Jobs
-
-Create recurring repo jobs that run reusable prompts against a repository, store run history, and link every run back to a normal OpenCode session.
-
-## What Schedules Are Good For
-
-Schedules make OpenCode Manager proactive instead of purely session-driven. Good examples include:
-
-- **Repo health reports** for a quick morning review
-- **Dependency watchlists** to catch upgrade pressure early
-- **Release readiness checks** before a ship window
-- **Docs drift reviews** to spot stale setup instructions
-- **Tech debt triage** for recurring cleanup planning
-
-Each run is stored with status, timestamps, logs, assistant output, and a linked session you can open and continue.
-
-Cancelling during startup stops model loading and prevents later prompt submission. If session creation was already in flight, the returned session is interrupted rather than prompted.
-
-## Creating a Schedule
-
-1. Open a repository
-2. Click **Schedules**
-3. Click **New Schedule**
-4. Configure the job name, prompt, timing, and optional overrides
-5. Save the schedule
-
-The schedule is scoped to the current repository.
-
-
-
-## Timing Options
-
-The schedule builder supports both simple presets and advanced cron:
-
-- **Interval** - Repeat every N minutes
-- **Hourly** - Run once each hour at a chosen minute
-- **Daily** - Run once per day at a chosen time
-- **Weekdays** - Run Monday through Friday
-- **Weekly** - Pick one or more weekdays and a time
-- **Monthly** - Run on a day of the month
-- **Advanced** - Enter a cron expression directly
-
-Cron-based schedules also store a timezone so runs happen when expected.
-
-
-
-## Prompt Templates
-
-Built-in prompt templates help you start quickly with recurring jobs like:
-
-- Repo health report
-- Dependency watchlist
-- Release readiness review
-- Test stability audit
-- Docs drift review
-- Tech debt triage
-- Security and config review
-- CI and ops review
-
-Applying a template fills the schedule name, description, and prompt so you can customize from a strong default instead of starting from scratch.
-
-## Agent and Model Overrides
-
-Schedules can run with:
-
-- the default workspace agent and model
-- a custom agent slug
-- a specific model override when needed
-
-OpenCode Manager allows up to 15 seconds for a fresh worktree's model catalog to load before treating a missing requested or configured model as unavailable. It prefers the schedule override, then the configured model, then OpenCode's default, then the first enabled model. A fallback can use a different provider. Model-catalog requests are bounded by that deadline.
-
-## Skills
-
-Each schedule can optionally attach skill slugs and notes. Skills modify the agent's behavior during the run — for example, you could attach a review-focused skill to a weekly code review schedule.
-
-
-
-The **Skills** tab in the schedule dialog lets you:
-
-- Select one or more **skill slugs** from a multi-select input
-- Add free-form **notes** (max 2000 characters) that the agent receives as additional context
-
-When the run starts, the Manager resolves the selected skill slugs against the skills available in the run's location and attaches the matching skills directly to the submitted prompt, making them available to the agent for that run only. Skill slugs that are not available in the location are omitted, and if the available skills cannot be listed the run continues without any skill attachments.
-
-## MCP Servers
-
-The **MCP** tab attaches MCP servers to a schedule. Each run starts in a fresh worktree, which OpenCode treats as a new location. MCP servers you connected by hand in the repo are not connected there, so any server a run needs has to be attached here.
-
-- **Configured MCP servers** - Choose from the servers available in the repo, including ones turned off in the OpenCode configuration. Each run connects the selected servers before it starts.
-- **Schedule-only MCP servers** - Define a local or remote server that exists only for this schedule. It is added to each run's location and never written to the OpenCode configuration. The definition is stored with the schedule, so use `{env:NAME}` or `{file:path}` placeholders instead of pasting secrets.
-
-The Manager connects every attached server before it creates the run's session. The run fails with the server name and reason if a server is not configured for the location, cannot connect, or needs OAuth authorization. Runs are unattended and cannot complete an OAuth flow, so authorize OAuth servers in **Settings > MCP Servers** before attaching them.
-
-Connections are made at the run's directory, so they do not affect other sessions. OpenCode stops a run location's MCP servers once that location has been idle for about an hour. Schedules without a worktree, such as Assistant schedules, run in the repo directory itself. There, a connection stays until OpenCode restarts, just like turning on the server in the repo's MCP dialog.
-
-## Worktree Isolation
-
-Each scheduled run executes in a **throwaway git worktree** — an isolated working copy branched off the repository's base branch. This provides two key guarantees:
-
-- **Separate checkout** — ordinary checkout changes and branch switches happen in the run's worktree. A worktree is not a filesystem jail: shell commands may affect other accessible paths, including the main checkout.
-- **Clean state per run** — every run starts from a fresh branch (`schedule/{jobId}/run-{runId}`) based off the latest remote state.
-
-When the run completes or fails, finalization commits changed files locally to the run branch (`schedule/{jobId}/run-{runId}`), records the commit hash, and removes the worktree. A branch with a commit is retained; a branch without a commit is deleted. Manager does not automatically push these commits, but an agent with shell access can push explicitly. Deleting a run or clearing its history removes the run branch; it does not guarantee immediate erasure of Git objects or outputs saved elsewhere.
-
-### Branch Configuration
-
-By default, runs branch off the repository's default branch. You can override this by specifying a **base branch** in the schedule settings — the worktree branches off your chosen branch instead.
-
-
-
-## Permission Configuration
-
-Every schedule includes a **Permissions** section in the General tab. These settings control what the agent can access and execute during unattended runs.
-
-
-
-### Allow Access Outside the Working Directory
-
-When **disabled** (the default), OpenCode's `external_directory` permission is denied. This blocks file-tool operations that request that permission; it is not comprehensive filesystem confinement. Enable this if the schedule requires file tools to access paths outside its working directory (e.g., a shared configuration directory).
-
-This is a file-tool boundary, not a per-worktree jail for shell commands. A sandboxed `shell` command can read and write every project root mounted into the sandbox, including other repositories and worktrees; see [Agent Sandboxing](./sandboxing.md#mounts-and-secrets).
-
-### Allow Questions
-
-When **disabled** (the default), the agent's `question` tool is denied so an unattended run cannot stall waiting for an answer nobody is there to give. Enable it only when the run is supervised, since an unattended run that asks a question can stall waiting for an answer.
-
-### Blocked Bash Commands
-
-The following bash command patterns are always blocked by default:
-
-```
-git push --force*
-git push -f *
-sudo *
-dd *
-mkfs*
-shutdown*
-reboot*
-halt*
-kill -9 *
-killall *
-```
-
-These patterns prevent dangerous commands whose blast radius escapes the throwaway worktree. File-mutating commands (`rm -rf`, `git reset --hard`, etc.) are intentionally omitted because the worktree itself is disposable; a shell command can still reach paths outside the worktree, so treat the deny list as a guard against the worst host-level commands rather than a complete sandbox.
-
-You can customize the deny list by adding or removing glob patterns. One pattern per line. Changes apply to all future runs of that schedule.
-
-## Run History
-
-Each schedule stores a run history panel with:
-
-- **Status** - Running, completed, failed, or cancelled (a running run can be stopped with **Cancel run**)
-- **Trigger source** - Manual or scheduled
-- **Log output** - Execution metadata and captured results
-- **Assistant output** - Rendered markdown, with a **Read aloud** button when Text-to-Speech is enabled
-- **Errors** - Failure details when a run does not complete
-
-This makes recurring jobs easy to review without digging through raw session data first.
-
-
-
-## Linked Sessions
-
-Every run creates or attaches to a normal OpenCode session.
-
-Use **Open session** to continue from the generated report, answer follow-up questions, or debug provider, permission, or tool issues.
-
-What it opens depends on where the run worked:
-
-- **In the repository, or still running**: the run's own session.
-- **In a temporary worktree that has finished**: the worktree is removed when the run ends, so the original session can no longer do any work. Instead, a new session opens in the repository with the run's full output, any error, and the branch and commit holding the run's changes added as context. It uses your normal permissions rather than the run's unattended ones, and nothing is sent to the model until you write a message.
-
-This keeps automation connected to the rest of the OpenCode Manager workflow instead of creating a separate silo.
-
-## Best Practices
-
-- Keep prompts focused on one recurring outcome
-- Prefer a few high-value schedules per repo over many overlapping jobs
-- Use manual runs to validate a prompt before relying on the schedule
-- Review failed runs quickly so broken provider or permission setups do not go unnoticed
-- Treat schedules as reusable repo routines, not long-running background workers
-
-## Troubleshooting
-
-### Run Failed
-
-1. Open the run from **Run History**
-2. Check the **Error** tab for the failure message
-3. Use **Open session** to follow up on the failure with the agent
-4. Verify provider credentials, model availability, and any pending agent questions or permissions
-
-### No Assistant Output
-
-If a run starts but does not produce assistant output:
-
-1. Open the linked session
-2. Check for a provider error
-3. Check whether the agent asked a question or needed permission
-4. Re-run the schedule manually after fixing the issue
-
-### Prompt Needs Iteration
-
-Use **Run now** to test prompt changes immediately before waiting for the next scheduled run.
diff --git a/docs/features/server-health.md b/docs/features/server-health.md
deleted file mode 100644
index 0af3f6a0..00000000
--- a/docs/features/server-health.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# OpenCode Server Health & Restart
-
-Monitor the managed OpenCode server's status and control restarts and upgrades from the Settings UI.
-
-## Overview
-
-OpenCode Manager runs a supervised OpenCode server process to handle agent sessions. The **OpenCode Config** tab in Settings shows the server's current status, version information, and provides controls for restarting or upgrading the server without bringing down the Manager itself.
-
-
-
-## Server Status
-
-| Indicator | Meaning |
-|-----------|---------|
-| **Healthy** | The OpenCode server is running and responding to health checks |
-| **Unhealthy** | The server is not responding. The Manager will attempt automatic recovery. |
-
-The panel shows a single **Server Status** value, `Healthy` or `Unhealthy`. A server that is still starting after a restart or Manager startup is reported as **Unhealthy** until its first successful health check.
-
-The panel also displays:
-
-- **OpenCode version** — The installed version of the OpenCode server (e.g., `v2.0.15`). OpenCode Manager requires OpenCode 2.x at 2.0.15 or newer; a 1.x or older 2.x binary fails to start.
-- **Manager version** — The current OpenCode Manager version (e.g., `v0.14.5`)
-
-## Health Monitoring
-
-The Manager periodically polls the OpenCode server's health endpoint (`GET /api/info`, authenticated with the managed password). A 401 or a non-JSON response counts as unhealthy. If the server becomes unresponsive:
-
-1. The Manager logs the failure and increments a failure counter
-2. After a configurable number of consecutive failures (default: 2), automatic recovery begins
-3. Recovery restarts the OpenCode server process
-4. OpenCode 2 resumes interrupted executions natively on boot, so the Manager makes no abort or `continue` calls itself
-
-### Configuration
-
-Health monitoring is configured through environment variables:
-
-| Variable | Default | Description |
-|----------|---------|-------------|
-| `OPENCODE_HEALTH_WATCH_ENABLED` | `true` | Enable health watcher and recovery (`false` in tests) |
-| `OPENCODE_HEALTH_POLL_MS` | `30000` | Poll interval in milliseconds |
-| `OPENCODE_HEALTH_FAILURE_THRESHOLD` | `2` | Failed checks before recovery starts |
-
-## Configuration Recovery
-
-The on-disk global configuration files in `.config/opencode/` are the source of truth. OpenCode 2 reads the two recognized sources in order — `opencode.json`, then `opencode.jsonc` — with later files overriding matching keys from earlier ones. The Manager reads and edits the same set: saves patch only the changed paths into the preferred existing source (`opencode.jsonc` > `opencode.json`), preserving comments and untouched keys, and a fresh installation is seeded with `opencode.jsonc`. The schema accepts both V1-compatible keys and native OpenCode 2 fields, so a V2-native config is not flagged invalid. MCP servers are always written in the native OpenCode 2 shape under `mcp.servers.` — `type` (`local` with `command`, optional `cwd` and `environment`; or `remote` with `url`, optional `headers` and `oauth` using `client_id`, `client_secret`, `scope`, and `redirect_uri`), plus optional `disabled` and `timeout` (`startup`, `catalog`, `execution` in milliseconds). Legacy flat `mcp.` entries are never written; OpenCode 2 still normalizes them on load, so they appear in Settings → MCP from the running server's status but must be moved under `mcp.servers` to be edited or removed from the Manager. A legacy `config.json`, which OpenCode 2 ignores, is folded into the lowest-precedence source it does not override and archived on startup. When a source exists at boot but fails validation, the Manager logs a warning and starts with the files unchanged — an invalid config is never automatically replaced or rolled back during boot.
-
-The health-watch ladder is the only automatic repair path. When the supervised OpenCode server fails repeated health checks, recovery runs these actions in order until the server is healthy:
-
-1. **Restart** — restart the server process
-2. **Debug capture** — capture a diagnostic snapshot, then restart
-3. **Rollback to last known good** — archive the broken config and restore the last known good config
-4. **Seed default config** — write the minimal seed config and restart
-
-Because the ladder only runs after repeated failed health checks, a config file that fails validation but does not make the server unhealthy is left in place. Setting `OPENCODE_HEALTH_WATCH_ENABLED=false` disables the ladder entirely, leaving no automatic repair path.
-
-## Failure Reporting
-
-When startup fails without a recovery path, or every recovery action has been tried, the server enters the **failed** state:
-
-- A persistent error toast shows the failure reason, with **View logs** (opens Settings → Logs) and **Restart** actions. It appears once per distinct failure, including when the app is opened while the server is already failed, and is replaced by a "back online" notice once the server is healthy again. Transient unhealthy or recovering states do not toast.
-- The Settings → Logs tab shows the failure reason and the recovery actions already attempted above the log stream.
-- A server process that exits or cannot be launched (for example, a missing executable) fails startup immediately with its exit code and the tail of its stderr, rather than waiting for the 30-second health timeout.
-
-The last known good config is a snapshot of every recognized source file (including which ones exist), captured before every write made through the Settings UI, the internal API, or a host config import, so any of those can be undone with `POST /api/settings/opencode-rollback` or by the ladder. Restoring a snapshot rewrites the sources it contains and removes recognized sources it does not. Archived broken configs and debug snapshots are kept under `.opencode/state/health-watch/` in the workspace, pruned to the newest 20 files.
-
-Earlier releases stored named configuration profiles in the Manager database. On first start after upgrading, each profile is archived to `.config/opencode-configs-archive/.json` in the workspace, the default profile is restored to `opencode.json` if that file does not exist yet, and the database table is dropped.
-
-## Restart with Session Resume
-
-When you restart the OpenCode server (manually or through an upgrade), active sessions are handled gracefully:
-
-1. **Restart** — The OpenCode server process is stopped with a grace period so in-flight turns are suspended, then started fresh
-2. **Resume** — OpenCode 2 resumes interrupted executions natively on boot and continues each turn in its transcript; the Manager makes no abort or `continue` calls itself and does not report individual sessions
-
-### Confirmation
-
-If there are active sessions when you click **Restart**, a confirmation dialog shows how many sessions will be interrupted. You can proceed or cancel.
-
-## Upgrading OpenCode
-
-Click **Update** to check for and install the newest supported OpenCode 2 version. The process:
-
-1. Checks the currently installed version against the newest stable release of the `@opencode/cli` package on npm that is inside the supported range (at or above the pinned version, same major version); newer major versions are never selected
-2. Downloads the matching binary from `https://opencode.ai/files/bin//` and verifies it before installing to `~/.opencode/bin/opencode`
-3. Restarts the server using the same session-resume flow described above
-4. The new version is displayed in the status panel after restart
-
-Installing a specific version from Settings → OpenCode Config works the same way; versions outside the supported range are rejected before any download. A failure before the installed binary is replaced (registry lookup, download, or extraction) returns an error without restarting the server. If the failure happens after the binary is replaced and the server recovers to a usable state, a recovery notice is shown with the fallback version.
-
-When `OPENCODE_BIN` is set, the OpenCode binary is managed outside the Manager: **Update** and version installs are refused with `409` and nothing is downloaded or restarted.
-
-## Manual Restart Triggers
-
-Besides the explicit **Restart** button, the server is automatically restarted when:
-
-- **Config import completes** — Importing a standalone OpenCode config into the workspace
-- **Version upgrade** — After installing a new OpenCode version
-
-Saving the OpenCode configuration never restarts the server. A change to the merged configuration is written to disk and applied immediately with an OpenCode location reload, which re-reads the configuration, agents, commands, skills, plugins, and `AGENTS.md` for every loaded location without interrupting running sessions. Comment-only edits do nothing, and changes limited to the `mcp` section are applied by the Settings UI through the MCP API. The change is flagged as **restart required** only when the reload fails, for example because the server is unavailable. Changes to how the server process is launched still need a restart: server environment variables, Git credentials, sandbox enforcement, manager token rotation, the server password, and OpenCode version installs. The default git identity applies without a restart: it is written to Manager's own git config file, which the running OpenCode process and its agent shells already read. Saving a provider credential, or completing a provider OAuth flow, applies to the running server immediately without a restart, because OpenCode 2 stores credentials in its database and broadcasts the change.
-
-A save is rejected with `409` when the files changed since you loaded them (stale revision), or when it would remove a value that is defined only in a lower-priority source file — removing it from the preferred file would leave the inherited value in effect.
diff --git a/docs/features/session-pins.md b/docs/features/session-pins.md
deleted file mode 100644
index 1ace2e00..00000000
--- a/docs/features/session-pins.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# Session Pinning
-
-Pin important sessions to the top of your session list so you can find them quickly without searching.
-
-## Overview
-
-Session pinning lets you mark any session as "pinned" — it moves to a dedicated **Pinned** section above your other sessions. This is useful for:
-
-- Active feature branches you switch between throughout the day
-- Long-running investigations or debugging sessions
-- Sessions with important context you want to keep accessible
-
-## Pinning a Session
-
-Each session card has an actions menu (the **⋮** button, hidden in manage mode); its entry toggles pinning:
-
-
-
-The pinned session appears in a **Pinned** section above the **Today** section and older sessions. Unpinned sessions stay in those sections, sorted by last activity.
-
-
-
-Pin state persists across page reloads and browser sessions. Pinned sessions remain at the top until you unpin them.
-
-## Managing Pins
-
-| Action | How |
-|--------|-----|
-| **Pin a session** | Open the session actions menu and select **Pin to top** |
-| **Unpin a session** | Open the session actions menu and select **Unpin** — it moves back to the Today or older sessions |
-| **Bulk operations** | Pin/unpin is per-session. Bulk delete and other management tools work as normal on pinned sessions |
-
-## What Happens When a Pinned Session is Deleted
-
-Deleting a pinned session from the Manager also removes its pin. A pinned session deleted elsewhere, such as from the OpenCode TUI, disappears from the Pinned section, but its pin record stays in the Manager database.
-
-## Notes
-
-- In the sidebar, pinned sessions are always shown, even ones too old to have loaded. The full session list loads 25 sessions at a time, so an older pinned session appears in its Pinned section only after scrolling loads it.
-- The Pinned section supports any number of pinned sessions.
-- Pinning is stored server-side in the Manager and is Manager-wide rather than per-user, so the same pins are shown on every device and browser.
diff --git a/docs/features/skills.md b/docs/features/skills.md
deleted file mode 100644
index 36c73b3a..00000000
--- a/docs/features/skills.md
+++ /dev/null
@@ -1,84 +0,0 @@
-# Skills
-
-Skills are reusable instruction sets that provide domain-specific workflows and guidance to OpenCode AI agents. They are stored as `SKILL.md` files and can be scoped globally or per-project.
-
-## Scopes
-
-| Scope | Location | Description |
-|-------|----------|-------------|
-| **Global** | `$WORKSPACE_PATH/.config/opencode/skills//SKILL.md` (defaults to `./workspace/.config/opencode/skills/`) | Available across all repositories |
-| **Project** | `/.opencode/skills//SKILL.md` | Scoped to a specific repository |
-
-Both scopes are mounted into the microVM when [sandboxing](./sandboxing.md) is enforced, so a skill that bundles scripts or reference files can run them from a sandboxed `bash` call. Because the mount is writable, an agent command can also modify a global skill, which affects every later session in every repository.
-
-## Skill File Format
-
-Each skill is a `SKILL.md` file with YAML frontmatter and a markdown body:
-
-```markdown
----
-name: my-skill
-description: Short description of what this skill does
----
-Your skill instructions go here. This is the content that gets
-injected into the AI agent's context when the skill is loaded.
-```
-
-### Frontmatter Fields
-
-| Field | Required | Description |
-|-------|----------|-------------|
-| `name` | Yes | Lowercase alphanumeric with hyphens (e.g., `my-skill`). Max 64 characters. |
-| `description` | Yes | What the skill does. Max 1024 characters. |
-
-### Naming Rules
-
-Skill names must match the pattern `^[a-z0-9]+(-[a-z0-9]+)*$`:
-
-- Lowercase letters and numbers only
-- Hyphens allowed between words
-- No spaces, underscores, or uppercase letters
-- Examples: `test-skill`, `code-review`, `deploy-helper`
-
-## Managing Skills
-
-Create and edit skills in **Settings → OpenCode Config → Skills**. The **Skills** panel in a repository's sidebar lists the skills available there and can install, delete, and load them into a session. Skills can also be managed through the API.
-
-
-
-### API Endpoints
-
-All paths are relative to `/api/settings`. `repoId` is required whenever `scope=project`.
-
-| Method | Path | Description |
-|--------|------|-------------|
-| `GET` | `/skills` | List all skills (optional `?repoId=` or `?directory=` filter) |
-| `POST` | `/skills/install` | Install a skill from a GitHub URL (JSON body with `sourceType: "github"`, `url`, `scope`, `repoId`, `overwrite`) or from uploaded files (multipart form) |
-| `GET` | `/skills/:name` | Get a specific skill (requires `scope` query param) |
-| `POST` | `/skills` | Create a new skill |
-| `PUT` | `/skills/:name` | Update an existing skill (requires `scope` query param) |
-| `DELETE` | `/skills/:name` | Delete a skill (requires `scope` query param) |
-
-### Create Request
-
-```json
-{
- "name": "my-skill",
- "description": "Runs type check and lint",
- "body": "Instructions for the AI agent...",
- "scope": "global"
-}
-```
-
-`repoId` is required when `scope` is `"project"`.
-
-### Update Request
-
-All fields are optional. Omit fields you do not want to change.
-
-```json
-{
- "description": "Updated description",
- "body": "Updated instructions"
-}
-```
diff --git a/docs/features/stt.md b/docs/features/stt.md
deleted file mode 100644
index 65b805c5..00000000
--- a/docs/features/stt.md
+++ /dev/null
@@ -1,98 +0,0 @@
-# Speech-to-Text
-
-Dictate messages to AI agents using voice input.
-
-## Overview
-
-OpenCode Manager supports two STT providers:
-
-
-
-1. **Built-in Browser** - Uses your browser's Web Speech API
-2. **External API** - OpenAI-compatible STT endpoints (Whisper)
-
-## Built-in Browser STT
-
-Uses your browser's built-in speech recognition via the Web Speech API.
-
-### Advantages
-
-- No API key required
-- Works without server communication
-- Free to use
-- Interim results while speaking
-
-### Limitations
-
-- Voice recognition quality varies by browser/OS
-- Not supported in all browsers
-- Language support depends on browser
-
-### Setup
-
-1. Go to **Settings > Voice**
-2. Under **Speech-to-Text**, select **Built-in Browser** provider
-3. Optionally configure language
-4. Click the microphone button in the chat input to test
-
-## External API STT
-
-Connect to OpenAI-compatible STT endpoints for higher accuracy transcription.
-
-### Advantages
-
-- Higher accuracy transcription
-- Consistent across devices
-- Supports many languages
-
-### Limitations
-
-- Requires API key and endpoint
-- Requires network connection
-- Server-side processing
-
-### Setup
-
-1. Go to **Settings > Voice**
-2. Under **Speech-to-Text**, select **External API** provider
-3. Enter the **API Endpoint**:
- - OpenAI: `https://api.openai.com`
-4. Enter your **API Key**
-5. Wait for model discovery
-6. Choose a model (e.g., `whisper-1`)
-7. Optionally set language
-
-### Compatible Services
-
-Any OpenAI-compatible transcription API works:
-
-- OpenAI Whisper
-- Azure OpenAI
-- Self-hosted Whisper servers
-- Local STT servers with OpenAI-compatible API
-
-## Using Voice Input
-
-### Tap-to-Start / Tap-to-Stop
-
-1. **Tap the microphone button** in the chat input to begin recording
-2. The button shows active recording status
-3. **Tap the stop button** when you have finished speaking
-4. The transcribed text is inserted into the input field
-5. Review and send
-
-### Recording States
-
-| State | Indicator | When it appears |
-|-------|-----------|-----------------|
-| Recording | "Recording…" | Microphone is active; audio is being captured |
-| Processing | "Processing…" | Audio sent to STT backend; waiting for transcript (external provider only) |
-| Interim text | Live partial transcript | Browser is streaming partial results in real time (built-in provider only) |
-
-### Cancelling
-
-Tap the **cancel (×) button** during recording to discard the recording without transcribing.
-
-### Errors
-
-If recording fails — microphone permission denied, startup timeout, or transcription error — a brief error message appears and auto-dismisses after 3 seconds. No text is inserted.
diff --git a/docs/features/terminal.md b/docs/features/terminal.md
deleted file mode 100644
index 262bc126..00000000
--- a/docs/features/terminal.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Terminal & Dev Loop
-
-Run interactive shells against a repository or workspace directory without leaving the WebUI.
-
-## Opening a Terminal
-
-Open the terminal from either surface:
-
-- **Desktop sidebar** — click **Terminal** in the tool list for a repository or session.
-- **More drawer** — on mobile or from the overflow menu, open **More** and select **Terminal**.
-
-The terminal panel opens as a dialog. If nothing is running in the selected directory, opening the panel starts a shell automatically; exited terminals do not count. Opening a specific terminal — such as a project action or worktree setup — shows that terminal instead and starts nothing extra.
-
-Terminals are scoped to the selected repository or OpenCode workspace directory. A terminal opened from a repo runs in that repo's path; a terminal opened from a session runs in the session's working directory. Switching directories shows that directory's terminals.
-
-## Tabs and Reconnect
-
-Each terminal runs in its own tab:
-
-- Click **+** to create another terminal in the same directory.
-- Click a tab to focus it.
-- Click the **×** on a tab to close it. Closing a running terminal asks for confirmation, then stops the process.
-- An exited terminal keeps its tab and shows `exited` with its exit code.
-
-Terminals are backed by OpenCode PTYs, so they survive a browser close or reload: reopening the panel reattaches and replays the buffered output. They do **not** survive an OpenCode restart, which ends every PTY.
-
-## Mobile Key Bar
-
-On mobile, the panel shows a key bar above the keyboard with keys that are awkward to reach on a soft keyboard:
-
-- **Esc**, **Tab**
-- **Ctrl** — tap to arm, then tap a key to send the modified combination; arming is consumed by the next key.
-- Arrow keys
-- `|`, `~`, `/`
-
-## Runtime and Environment
-
-Terminals run as OpenCode PTYs on the host, using the user's configured shell. They are **not sandboxed**: sandbox enforcement applies to agent `shell` tool calls, not to PTY terminals (see [Agent Sandboxing](sandboxing.md)).
-
-Each terminal receives the repository's GitHub token environment (`GH_TOKEN`, `GITHUB_TOKEN`) resolved for its directory, so `gh` authenticates with the repo's GitHub credential. Commits made in the terminal take their author from git config: the repository's own identity when one is set, otherwise the Manager default identity (see [Git identities](git.md)).
-
-`git` itself authenticates with the same credentials as the OpenCode server process, which the Manager configures from its saved git credentials.
-
-## Related
-
-- [Project Actions](project-actions.md) — run and stop long-lived commands as terminals from the header menu.
-- [Preview](preview.md) — open a dev server started in a terminal.
diff --git a/docs/features/tts.md b/docs/features/tts.md
deleted file mode 100644
index 5bd76c13..00000000
--- a/docs/features/tts.md
+++ /dev/null
@@ -1,147 +0,0 @@
-# Text-to-Speech
-
-Listen to AI responses with built-in or external TTS.
-
-## Overview
-
-OpenCode Manager supports two TTS providers:
-
-
-
-1. **Built-in Browser** - Uses your browser's Web Speech API
-2. **External API** - OpenAI-compatible TTS endpoints
-
-## Built-in Browser TTS
-
-Uses your browser's built-in speech synthesis via Web Speech API.
-
-### Advantages
-
-- No API key required
-- Works offline
-- No server communication needed
-- Free to use
-
-### Limitations
-
-- Voice quality varies by browser/OS
-- Limited voice selection
-- No audio caching
-- Requires browser support
-
-### Browser Support
-
-Works in modern browsers:
-- Chrome, Edge, Safari, Firefox
-
-### Setup
-
-1. Go to **Settings > Voice**
-2. Enable **TTS**
-3. Select **Built-in Browser** provider
-4. Choose a voice from available browser voices
-5. Adjust speed if desired
-6. Click **Test** to verify
-
-### Voice Selection
-
-Available voices depend on your operating system:
-
-- **Chrome** - Google voices and system voices
-- **Safari** - macOS voices (Alex, Samantha, etc.)
-- **Firefox** - System voices
-- **Edge** - Microsoft voices
-
-### Web Speech API Detection
-
-The system automatically detects if your browser supports Web Speech API. If not supported, you'll see a warning and should switch to External API.
-
-## External API TTS
-
-Connect to OpenAI-compatible TTS endpoints for higher quality voices.
-
-### Advantages
-
-- Higher quality voices
-- Consistent across devices
-- Audio caching on server
-- More voice options
-- Composite voice support
-
-### Limitations
-
-- Requires API key and endpoint
-- Requires network connection
-- Server-side processing
-
-### Setup
-
-1. Go to **Settings > Voice**
-2. Enable **TTS**
-3. Select **External API** provider
-4. Enter the **TTS Server URL**:
- - OpenAI: `https://api.openai.com`
- - Kokoro: `https://your-kokoro-server.com:port`
-5. Enter your **API Key**
-6. Wait for voice/model discovery
-7. Choose voice and model
-8. Click **Test** to verify
-
-### Compatible Services
-
-Any OpenAI-compatible TTS API works:
-
-- OpenAI TTS
-- Kokoro TTS
-- Azure OpenAI
-- Local TTS servers
-- Self-hosted alternatives
-
-## Voice Configuration
-
-### Voice Discovery
-
-The system automatically discovers available voices and models:
-
-1. On first connection with API key, voices/models are fetched
-2. Voice list is cached for 1 hour
-3. Click **Refresh** button to force re-discovery if voices change
-
-### Composite Voices
-
-Kokoro-style composite voices are supported. Combine multiple voices for unique effects:
-- Example: `am_adam+am_echo`
-- Example: `af_bella+af_nova`
-
-## Audio Playback
-
-### Playing Responses
-
-To listen to an AI response:
-
-1. Click the **Read aloud** button on a message
-2. Audio streams and plays
-
-### Playback Controls
-
-While audio is playing:
-
-- **Stop playback** - End playback immediately
-- Audio stops if you navigate away
-
-## Markdown Sanitization
-
-Before sending text to TTS, markdown is cleaned for better speech:
-
-- Code blocks removed entirely
-- Inline code: `code` → code
-- Links: `[text](url)` → text
-- Images: `` → alt
-- Bold/italic/strikethrough markers removed
-- Headers: ### Header → Header
-- List markers removed
-- Tables converted to readable text
-- HTML tags removed
-- Whitespace cleaned up
-
-This ensures natural, readable speech playback.
diff --git a/docs/getting-started/first-run.md b/docs/getting-started/first-run.md
deleted file mode 100644
index c5604c46..00000000
--- a/docs/getting-started/first-run.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# First Run Setup
-
-On your first visit to OpenCode Manager, you'll complete a guided setup process.
-
-## Interactive Setup
-
-When no admin account exists, you'll be automatically redirected to the setup page.
-
-### Step 1: Create Admin Account
-
-Fill in your account details:
-
-- **Name** - Your display name
-- **Email** - Used for login
-- **Password** - At least 8 characters (required)
-
-Click **Create Admin Account** to continue.
-
-### Step 2: Configure Provider (Optional)
-
-After account creation, configure an AI provider:
-
-1. Navigate to **Settings > Providers**
-2. Select a provider
-3. Enter API key or connect via OAuth
-4. Save configuration
-
-You can skip this and configure providers later.
-
-## Pre-Configured Admin
-
-For automated or headless deployments, skip interactive setup by setting environment variables:
-
-```bash
-# In docker-compose.yml or .env
-ADMIN_EMAIL=admin@example.com
-ADMIN_PASSWORD=your-secure-password
-```
-
-When these are set:
-
-- Admin user is created automatically on first startup
-- Setup wizard is skipped
-- Registration is disabled, so no new accounts can be created
-- `ADMIN_PASSWORD` sets the password only when the admin is first created, or when `ADMIN_PASSWORD_RESET=true`; changing it later has no effect otherwise
-
-## Adding Passkeys
-
-After initial setup, you can add passkey authentication for passwordless login:
-
-1. Go to **Settings > Account**
-2. Optionally enter a passkey name (e.g., "MacBook Touch ID")
-3. Click **Add Passkey**
-4. Follow your browser/device prompts
-
-Passkeys provide:
-
-- Passwordless login
-- Phishing-resistant authentication
-- Biometric support (Touch ID, Face ID, Windows Hello)
-
-## Password Reset
-
-If you forget your password:
-
-1. Set environment variables:
-```bash
-ADMIN_EMAIL=your@email.com
-ADMIN_PASSWORD=new-password
-ADMIN_PASSWORD_RESET=true
-```
-
-2. Recreate the container so it picks up the new environment variables:
-
-```bash
-docker compose up -d --force-recreate app
-```
-
-3. Log in with new password
-
-4. **Important:** Remove `ADMIN_PASSWORD_RESET=true` and recreate the container again:
-
-```bash
-docker compose up -d --force-recreate app
-```
-
-## Security Recommendations
-
-### Production Deployments
-
-- Set a strong `AUTH_SECRET` for session encryption
-- Use HTTPS with valid SSL certificate
-- Use strong, unique passwords
-- Enable passkey authentication
-- Regularly rotate API keys
-
-### Generate AUTH_SECRET
-
-```bash
-openssl rand -base64 32
-```
-
-Add to your environment:
-
-```bash
-AUTH_SECRET=your-generated-secret-here
-```
-
-## Next Steps
-
-- [Configure OAuth Providers](../configuration/oauth.md) - Enable social login
-- [Environment Variables](../configuration/environment.md) - All configuration options
-- [Features Overview](../features/overview.md) - Explore capabilities
diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md
deleted file mode 100644
index ca1a7629..00000000
--- a/docs/getting-started/installation.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# Installation
-
-Choose your preferred installation method.
-
-## Docker (Recommended)
-
-Docker is the fastest way to get started and recommended for production use.
-
-```bash
-git clone https://github.com/chriswritescode-dev/opencode-manager.git
-cd opencode-manager
-cp .env.example .env
-# Generate AUTH_SECRET and add to .env
-echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
-docker-compose up -d
-```
-
-Open [http://localhost:5003](http://localhost:5003) in your browser.
-
-### What Docker Sets Up
-
-The container automatically:
-
-- Installs OpenCode 2 if not present (bundled 2.0.15; 2.x at 2.0.15 or newer required)
-- Builds and serves the frontend
-- Creates persistent volumes for the workspace, database, and OpenCode binary
-- Configures health checks and auto-restart
-
-### Docker Commands
-
-```bash
-# Start the container
-docker-compose up -d
-
-# Stop and remove containers (named volumes are preserved)
-docker-compose down
-
-# Stop and remove containers and all named volumes (workspace, database, OpenCode binary)
-docker-compose down -v
-
-# Rebuild the image
-docker-compose build
-
-# View logs
-docker-compose logs -f
-
-# Restart
-docker-compose restart
-
-# Access container shell
-docker exec -it opencode-manager sh
-```
-
-### Volumes
-
-| Volume | Container Path | Purpose |
-|--------|---------------|---------|
-| `opencode-workspace` | `/workspace` | Repository storage, plus OpenCode configuration and state |
-| `opencode-data` | `/app/data` | SQLite database |
-| `opencode-bin` | `/home/node/.opencode/bin` | OpenCode versions installed from Settings, persisted across container recreations (the bundled binary is part of the image) |
-
-## Local Development
-
-For contributors who want to develop locally instead of using Docker.
-
-### Prerequisites
-
-- [Git](https://git-scm.com/downloads) - Required; `pnpm dev` checks for it
-- [pnpm](https://pnpm.io/installation) - Package manager (required for workspaces)
-- [Bun](https://bun.sh) - Backend runtime
-- [OpenCode TUI](https://opencode.ai) 2.x, 2.0.15 or newer - `curl -fsSL https://opencode.ai/v2/install | bash`
-- [Node.js 24+](https://nodejs.org/en/about/previous-releases)
-
-### Setup
-
-```bash
-# Clone the repository
-git clone https://github.com/chriswritescode-dev/opencode-manager.git
-cd opencode-manager
-
-# Install dependencies
-pnpm install
-
-# Copy environment configuration
-cp .env.example .env
-
-# Start development servers
-pnpm dev
-```
-
-This starts:
-
-- Backend on http://localhost:5003
-- Frontend on http://localhost:5173 (with HMR)
-
-## Verifying Installation
-
-After starting the application:
-
-1. Open your browser to the appropriate URL
-2. You should see the login page or setup wizard
-3. Check logs if you encounter issues: `docker-compose logs -f`
-
-## Next Steps
-
-- [Quick Start](quickstart.md) - First steps after installation
-- [First Run Setup](first-run.md) - Creating your admin account
-- [Docker Configuration](../configuration/docker.md) - Advanced Docker settings
diff --git a/docs/getting-started/quickstart.md b/docs/getting-started/quickstart.md
deleted file mode 100644
index c69d67dc..00000000
--- a/docs/getting-started/quickstart.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# Quick Start
-
-Get up and running with OpenCode Manager in minutes.
-
-## 1. Start the Application
-
-=== "Docker"
-
- ```bash
- git clone https://github.com/chriswritescode-dev/opencode-manager.git
- cd opencode-manager
- cp .env.example .env
- echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
- docker-compose up -d
- ```
-
- Open [http://localhost:5003](http://localhost:5003)
-
-=== "Local Development"
-
- ```bash
- git clone https://github.com/chriswritescode-dev/opencode-manager.git
- cd opencode-manager
- pnpm install
- cp .env.example .env
- pnpm dev
- ```
-
- Open [http://localhost:5173](http://localhost:5173)
-
-## 2. Create Admin Account
-
-On first launch, you'll be redirected to the setup page:
-
-1. Enter your **name**
-2. Enter your **email**
-3. Create a **password**
-4. Click **Create Account**
-
-!!! tip "Pre-configured Admin"
- For automated deployments, you can skip this step by setting `ADMIN_EMAIL` and `ADMIN_PASSWORD` environment variables.
-
-## 3. Configure AI Provider
-
-Before chatting, you need to configure at least one AI provider:
-
-1. Go to **Settings** (gear icon)
-2. Select **Providers**
-3. Choose a provider (e.g., Anthropic, OpenAI)
-4. Enter your **API key** or click **Add OAuth** for supported providers
-5. Click **Save**
-
-## 4. Add Repositories
-
-Choose the onboarding flow that matches your setup:
-
-### Clone a Remote Repository
-
-1. Click the **folder icon** in the sidebar
-2. Click **Add Repository**
-3. Select **Remote**
-4. Paste a repository URL (HTTPS or SSH)
-5. Click **Add Repository**
-
-### Discover Existing Local Repositories
-
-1. Click the **folder icon** in the sidebar
-2. Click **Add Repository**
-3. Select **Folder**
-4. Enter a parent folder such as `/Users/you/Development`
-5. Click **Discover Repositories**
-
-If you already used standalone OpenCode in those repositories, existing chats appear as soon as the discovered repo path matches the original OpenCode path.
-
-!!! note "Private Repositories"
- For private repos, configure a GitHub Personal Access Token in Settings > Git > Credentials first.
-
-## 5. Start Chatting
-
-1. Select your repository from the sidebar
-2. Click **New Session** or type `/new`
-3. Type your message
-4. Press **Cmd+Enter** (`Ctrl+Enter` on other platforms) to send, or **Enter** on mobile
-
-### Useful Commands
-
-| Command | Description |
-|---------|-------------|
-| `/help`, `/settings` | Open settings |
-| `/new`, `/clear` | Start a new session |
-| `/sessions`, `/resume`, `/continue` | List and switch between sessions |
-| `/model`, `/models` | Open the model picker, also while a response is running |
-| `/agent` | Switch to the next primary agent |
-| `/variants` | Cycle the model's reasoning variant |
-| `/compact` | Reduce session context |
-| `/rename [title]` | Rename the session; with no title, regenerate it |
-| `/fork` | Fork the session from a chosen message, or the entire conversation |
-| `/timeline` | Jump to a loaded message in the conversation |
-| `/btw ` | Ask a side question without adding it to the conversation |
-| `/copy` | Copy the full transcript as Markdown |
-| `/export` | Download the full transcript as Markdown |
-| `/undo`, `/redo` | Undo or redo the last message |
-| `/details` | Toggle tool execution details |
-| `/mcp` | Manage MCP servers |
-| `/skills` | Load a skill |
-| `/connect` | Connect a provider |
-
-Press **Enter** to run a command once its name is complete; use **Shift+Enter** to continue its text on a new line. Built-in commands use only the command text. Attached files and images are kept in the composer for your next message.
-
-### File Mentions
-
-Reference files in your prompts:
-
-1. Type `@` in the chat input
-2. Start typing a filename
-3. Select from the autocomplete dropdown
-4. The AI will have access to that file's contents
-
-## 6. Explore Features
-
-Now that you're set up, explore more features:
-
-- **[Git Integration](../features/git.md)** - View diffs, manage branches
-- **[File Browser](../features/files.md)** - Navigate and edit files
-- **[MCP Servers](../features/mcp.md)** - Add tools and integrations
-- **[Mobile PWA](../features/mobile.md)** - Install on your phone
-
-## Keyboard Shortcuts
-
-| Shortcut | Action |
-|----------|--------|
-| `Cmd+Enter` / `Ctrl+Enter` | Send message |
-| `Enter` | Run a slash command, such as `/btw `; otherwise a new line on desktop, send on mobile |
-| `Shift+Enter` | New line |
-
-The app uses a configurable leader key system (`Cmd+O` on Mac, `Ctrl+O` on other platforms) for additional shortcuts. Customize in Settings > Keyboard Shortcuts.
diff --git a/docs/images/ai-config-providers.png b/docs/images/ai-config-providers.png
deleted file mode 100644
index b82d459c..00000000
Binary files a/docs/images/ai-config-providers.png and /dev/null differ
diff --git a/docs/images/assistant-page.png b/docs/images/assistant-page.png
deleted file mode 100644
index 5025eccd..00000000
Binary files a/docs/images/assistant-page.png and /dev/null differ
diff --git a/docs/images/chat-conversation.png b/docs/images/chat-conversation.png
deleted file mode 100644
index a13fccff..00000000
Binary files a/docs/images/chat-conversation.png and /dev/null differ
diff --git a/docs/images/chat-session-list.png b/docs/images/chat-session-list.png
deleted file mode 100644
index 41d4fb05..00000000
Binary files a/docs/images/chat-session-list.png and /dev/null differ
diff --git a/docs/images/file-browser.png b/docs/images/file-browser.png
deleted file mode 100644
index 6f60488b..00000000
Binary files a/docs/images/file-browser.png and /dev/null differ
diff --git a/docs/images/git/git-branch.png b/docs/images/git/git-branch.png
deleted file mode 100644
index c8af0824..00000000
Binary files a/docs/images/git/git-branch.png and /dev/null differ
diff --git a/docs/images/git/git-changes.png b/docs/images/git/git-changes.png
deleted file mode 100644
index 246cf6ef..00000000
Binary files a/docs/images/git/git-changes.png and /dev/null differ
diff --git a/docs/images/git/git-commits.png b/docs/images/git/git-commits.png
deleted file mode 100644
index 50b91dd7..00000000
Binary files a/docs/images/git/git-commits.png and /dev/null differ
diff --git a/docs/images/git/git-diffview.png b/docs/images/git/git-diffview.png
deleted file mode 100644
index 1ae3f8bb..00000000
Binary files a/docs/images/git/git-diffview.png and /dev/null differ
diff --git a/docs/images/mcp-servers-list.png b/docs/images/mcp-servers-list.png
deleted file mode 100644
index 20678731..00000000
Binary files a/docs/images/mcp-servers-list.png and /dev/null differ
diff --git a/docs/images/mobile-repo-session-sheet.webp b/docs/images/mobile-repo-session-sheet.webp
deleted file mode 100644
index 6b489431..00000000
Binary files a/docs/images/mobile-repo-session-sheet.webp and /dev/null differ
diff --git a/docs/images/mobile-sessions.png b/docs/images/mobile-sessions.png
deleted file mode 100644
index d39039dc..00000000
Binary files a/docs/images/mobile-sessions.png and /dev/null differ
diff --git a/docs/images/notifications-settings.png b/docs/images/notifications-settings.png
deleted file mode 100644
index 67f24b72..00000000
Binary files a/docs/images/notifications-settings.png and /dev/null differ
diff --git a/docs/images/ocmgr-main.webp b/docs/images/ocmgr-main.webp
deleted file mode 100644
index 72e07b2b..00000000
Binary files a/docs/images/ocmgr-main.webp and /dev/null differ
diff --git a/docs/images/ocmgr-mobile.webp b/docs/images/ocmgr-mobile.webp
deleted file mode 100644
index a7c1cc0c..00000000
Binary files a/docs/images/ocmgr-mobile.webp and /dev/null differ
diff --git a/docs/images/schedule-permissions.png b/docs/images/schedule-permissions.png
deleted file mode 100644
index 09dea1b4..00000000
Binary files a/docs/images/schedule-permissions.png and /dev/null differ
diff --git a/docs/images/schedule-skills-tab.png b/docs/images/schedule-skills-tab.png
deleted file mode 100644
index 5adefb3b..00000000
Binary files a/docs/images/schedule-skills-tab.png and /dev/null differ
diff --git a/docs/images/schedules/09-schedule-creation.png b/docs/images/schedules/09-schedule-creation.png
deleted file mode 100644
index e8741d33..00000000
Binary files a/docs/images/schedules/09-schedule-creation.png and /dev/null differ
diff --git a/docs/images/schedules/10-timing-options.png b/docs/images/schedules/10-timing-options.png
deleted file mode 100644
index 091c36b3..00000000
Binary files a/docs/images/schedules/10-timing-options.png and /dev/null differ
diff --git a/docs/images/schedules/11-run-history-view.png b/docs/images/schedules/11-run-history-view.png
deleted file mode 100644
index 294a2dc9..00000000
Binary files a/docs/images/schedules/11-run-history-view.png and /dev/null differ
diff --git a/docs/images/server-health-status.png b/docs/images/server-health-status.png
deleted file mode 100644
index 662ba7e7..00000000
Binary files a/docs/images/server-health-status.png and /dev/null differ
diff --git a/docs/images/session-pin-dropdown.png b/docs/images/session-pin-dropdown.png
deleted file mode 100644
index 20431fa6..00000000
Binary files a/docs/images/session-pin-dropdown.png and /dev/null differ
diff --git a/docs/images/session-pins-list.png b/docs/images/session-pins-list.png
deleted file mode 100644
index f1259096..00000000
Binary files a/docs/images/session-pins-list.png and /dev/null differ
diff --git a/docs/images/skills-manager.png b/docs/images/skills-manager.png
deleted file mode 100644
index 46f0e6a3..00000000
Binary files a/docs/images/skills-manager.png and /dev/null differ
diff --git a/docs/images/stt-settings.png b/docs/images/stt-settings.png
deleted file mode 100644
index 624f3ea1..00000000
Binary files a/docs/images/stt-settings.png and /dev/null differ
diff --git a/docs/images/tts-settings.png b/docs/images/tts-settings.png
deleted file mode 100644
index 9317cd52..00000000
Binary files a/docs/images/tts-settings.png and /dev/null differ
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 08809deb..00000000
--- a/docs/index.md
+++ /dev/null
@@ -1,90 +0,0 @@
----
-hide:
- - toc
----
-
-# OpenCode Manager
-
-Mobile-first web interface for [OpenCode](https://opencode.ai) AI agents. Manage, control, and code from any device - your phone, tablet, or desktop.
-
-
-
-
-
-
-
-!!! warning "Requires OpenCode 2"
- OpenCode Manager requires **OpenCode 2.x at 2.0.15 or newer** (bundled 2.0.15); OpenCode 1.x is not supported. Upgrading from 1.x? See the [v1 → v2 migration guide](https://opencode.ai/v2/docs/migrate-v1).
-
-## Quick Start
-
-```bash
-git clone https://github.com/chriswritescode-dev/opencode-manager.git
-cd opencode-manager
-cp .env.example .env
-echo "AUTH_SECRET=$(openssl rand -base64 32)" >> .env
-docker-compose up -d
-```
-
-Open [http://localhost:5003](http://localhost:5003) and create your admin account. That's it!
-
-## What is OpenCode Manager?
-
-OpenCode Manager is a mobile-first web interface for [OpenCode](https://opencode.ai) AI agents. It combines repository management, chat/session control, Git and file tools, schedules, AI configuration, MCP server management, push notifications, and full PWA support into a single responsive application.
-
-- **Repository management** — Clone, discover, and manage multiple Git repos with SSH authentication and worktree support
-- **Chat & sessions** — Real-time SSE streaming with slash commands, `@file` mentions, Plan/Build modes, and agent switching with configured models
-- **Schedules** — Recurring repo jobs with reusable prompts, run history, and linked sessions
-- **AI configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents
-- **MCP & Skills** — MCP server management and skill support
-- **Audio** — Text-to-speech and speech-to-text (browser + OpenAI-compatible)
-- **Mobile & notifications** — Installable PWA with push notifications and mobile-first navigation
-
-## How It Works
-
-OpenCode Manager runs as a pnpm workspace:
-
-- The Bun/Hono backend initializes SQLite, Better Auth, settings, schedules, notifications, and an OpenCode client.
-- A supervised OpenCode server handles agent sessions while the backend proxies API calls and streams events over SSE.
-- The React/Vite frontend uses React Router and TanStack Query to render repositories, sessions, schedules, settings, and mobile navigation.
-- The shared package keeps config, schemas, and TypeScript types aligned between backend and frontend.
-- The `ocm-cli/` package provides the `ocm` CLI that attaches a local OpenCode TUI to a Manager-hosted repo.
-
-## Key Features
-
-- **Repositories & Git** — Multi-repo management, local discovery, SSH auth, worktrees, unified diffs, branch/commit management — [Learn more](features/git.md)
-- **Chat & Sessions** — Real-time SSE streaming, slash commands, `@file` mentions, Plan/Build modes, Mermaid diagrams — [Learn more](features/chat.md)
-- **Files** — Directory browser with tree view, syntax highlighting, create/rename/delete, ZIP download — [Learn more](features/files.md)
-- **Terminal & Dev Loop** — Repo terminals, project actions, and an authenticated dev-server preview — [Learn more](features/terminal.md)
-- **Schedules** — Recurring repo jobs with reusable prompts, run history, linked sessions — [Learn more](features/schedules.md)
-- **Session Pinning** — Pin important sessions to the top of the session list — [Learn more](features/session-pins.md)
-- **Assistant Mode** — Dedicated AI workspace with auto-provisioned skills for schedule management, notifications, settings, repo listing, and session management — [Learn more](features/assistant-mode.md)
-- **AI Configuration** — Model/provider setup, OAuth for Anthropic/GitHub Copilot, custom agents — [Learn more](features/ai-config.md)
-- **Server Health & Restart** — Monitor server status, graceful restarts with session resume, auto-recovery — [Learn more](features/server-health.md)
-- **Manager Logs** — Manager log lines plus captured OpenCode server stdout/stderr in Settings, with level/source filters, search, and pause/copy controls — [Learn more](features/logs.md)
-- **MCP Servers** — Add local or remote MCP servers with OAuth support — [Learn more](features/mcp.md)
-- **Skills** — Skill support for extended agent capabilities — [Learn more](features/skills.md)
-- **Agent Sandboxing** — Run agent shell commands inside an isolated microVM — [Learn more](features/sandboxing.md)
-- **`ocm` CLI** — Attach your local OpenCode TUI to a Manager-hosted repo — [Learn more](ocm-cli.md)
-- **Mobile & PWA** — Responsive UI, installable on any device, iOS-optimized — [Learn more](features/mobile.md)
-- **Push Notifications** — Background alerts for agent events — [Learn more](features/notifications.md)
-- **Audio** — Text-to-speech and speech-to-text (browser + OpenAI-compatible) — [Learn more](features/tts.md) | [Learn more](features/stt.md)
-
-## Project Layout
-
-- `backend/` — Bun + Hono API routes, services, database migrations, auth, schedules, and OpenCode integration.
-- `frontend/` — React + Vite app, pages, components, hooks, API clients, stores, contexts, and PWA assets.
-- `shared/` — Workspace package for schemas, types, config, and utilities.
-- `ocm-cli/` — `ocm` CLI that attaches a local OpenCode TUI to a Manager-hosted repo.
-- `docs/` — MkDocs Material documentation.
-- `scripts/`, `Dockerfile`, `docker-compose.yml` — Setup, build, and deployment support.
-
-## Next Steps
-
-- [Installation Guide](getting-started/installation.md) - Detailed setup instructions
-- [Quick Start](getting-started/quickstart.md) - Get up and running fast
-- [Development Setup](development/setup.md) - Local environment, scripts, and testing
-- [Contributing](development/contributing.md) - How to contribute to OpenCode Manager
-- [Features Overview](features/overview.md) - Explore all features
-- [Schedules & Recurring Jobs](features/schedules.md) - Automate recurring repo reviews and follow-ups
-- [Configuration](configuration/environment.md) - Environment variables and setup
diff --git a/docs/ocm-cli.md b/docs/ocm-cli.md
deleted file mode 100644
index 14ee6c88..00000000
--- a/docs/ocm-cli.md
+++ /dev/null
@@ -1,235 +0,0 @@
-# `ocm` CLI
-
-`ocm` is a small CLI that attaches your local OpenCode TUI to a repo hosted on an OpenCode Manager. Prompts execute on the Manager's filesystem against a single shared OpenCode server, while your laptop terminal hosts the TUI.
-
-## Quickstart
-
-1. **Get your Manager URL** — the web UI address where your OpenCode Manager is running (e.g., `https://manager.example.com`)
-2. **Copy your internal token** — open **Settings → OpenCode Config → Server maintenance**, expand **Manager Internal Token**, and copy the token
-3. **Install the CLI** — `pnpm add -g @opencode-manager/ocm-cli`
-4. **Log in** — `ocm login https://your-manager-url` (paste the token when prompted)
-5. **List repos** — `ocm list` to see repos configured on the Manager
-6. **Attach** — `ocm use ` to start an OpenCode session attached to that repo
-
-## Compatibility
-
-| ocm | OpenCode Manager | Local OpenCode |
-|---|---|---|
-| 0.3.x | >= 0.19.0 | >= 2.0.15, < 3 |
-
-ocm 0.3.0 requires a local OpenCode 2 client (>= 2.0.15, same major), is configured through the OpenCode 2 `cli.json` `plugins` list, attaches through the repo-scoped Manager route `/api/opencode-proxy/repos/:repoId`, and moves sessions with OpenCode 2 session export/import. When the Manager does not serve the repo-scoped route (it answers `404`), `ocm` and `/ocm-move` stop before attaching or pushing with:
-
-```text
-OpenCode Manager at is too old for ocm 0.3.0; upgrade the Manager to >= 0.19.0
-```
-
-Keep ocm 0.2.x for OpenCode Manager < 0.19.0 and OpenCode 1.x: install it pinned with
-`pnpm add -g @opencode-manager/ocm-cli@0.2`, and pin the plugin entry to
-`@opencode-manager/ocm-cli@0.2` in your OpenCode 1.x TUI config so it does not resolve to
-the latest release. ocm is published together with each OpenCode Manager release.
-
-When the Manager rejects the stored token (`401`), returns another error, or cannot be
-reached while `ocm` prepares the repo-scoped route, `ocm` and `/ocm-move` stop before
-attaching with a message naming the cause.
-
-## Architecture Overview
-
-| Component | Where it runs | Role |
-|---|---|---|
-| **`ocm` CLI** | Laptop / local shell | Lists repos, attaches `opencode` against the Manager proxy, mirrors `$PWD` up/down |
-| **Manager backend** | Manager server | Exposes repo metadata + token-protected OpenCode proxy + tarball mirror endpoints |
-| **Manager web UI** | Manager server | Reads from the shared OpenCode server; sessions created via `ocm` appear normally |
-
-There is no per-repo OpenCode process. All sessions share one OpenCode server on the Manager, with file-level isolation via the location directory (`x-opencode-directory` / `location[directory]`).
-
----
-
-## 1. Install
-
-The CLI is published as `@opencode-manager/ocm-cli`. There are four install paths.
-
-### Option A — install via OpenCode's plugin loader (recommended)
-
-Add the package to your OpenCode 2 CLI config and OpenCode will fetch it on next start. The package exposes a `./tui` entrypoint, and OpenCode resolves that entrypoint automatically from the package name. The package `postinstall` script self-installs a `~/.local/bin/ocm` symlink for local plugin installs, so the `ocm` binary becomes available on your PATH automatically.
-
-```jsonc
-// ~/.config/opencode/cli.json
-{
- "$schema": "https://opencode.ai/v2/cli.json",
- "plugins": ["@opencode-manager/ocm-cli"]
-}
-```
-
-The next time OpenCode starts it will run `bun install` for the plugin. The installer stays quiet so it does not break the TUI layout; after the plugin loads, OpenCode shows a one-time toast confirming where `ocm` was linked.
-
-If `~/.local/bin` is not on your PATH, add this to your shell rc:
-
-```bash
-export PATH="$HOME/.local/bin:$PATH"
-```
-
-The `@opencode-manager/ocm-cli` package entry registers `/ocm-move`, a TUI command that keeps the local session and copies the active session to the Manager after pushing the current repo state. Run it from inside a local OpenCode session after `ocm login` and after the repo exists on the Manager (`ocm push --create` if needed).
-
-### Option B — global package manager install
-
-If you don't use the OpenCode plugin loader, install globally:
-
-```bash
-pnpm add -g @opencode-manager/ocm-cli
-```
-
-This puts `ocm` on your PATH via the package manager's own bin shim. The `~/.local/bin` symlink is skipped for global installs.
-
-### Option C — vendored, self-contained
-
-The package needs no install step: `dist/ocm.js` bundles everything, and `dist/tui.js` bundles everything except `@opencode/plugin/tui`, `@opentui/core`, `@opentui/solid`, and `solid-js`, which OpenCode provides at runtime. `ocm install` copies the package into your OpenCode config directory, registers the plugin in `cli.json`, and links the binary onto your PATH:
-
-```bash
-pnpm dlx @opencode-manager/ocm-cli install
-```
-
-If `ocm` is already installed (Option A or B), run the same command directly:
-
-```bash
-ocm install
-```
-
-The command is idempotent: re-run it to upgrade after a new release, or run the wrapper script below to vendor a local build. It writes the plugin as `./plugin/ocm-cli/dist`, a directory entry — OpenCode 2 loads `tui.js` from a directory entry and skips entries that name a file directly.
-
-| Flag | Effect |
-|---|---|
-| `--dir ` | Install into a different OpenCode config directory (default: `$OPENCODE_CONFIG_DIR`, else `$XDG_CONFIG_HOME/opencode`, else `~/.config/opencode`) |
-| `--no-link` | Skip the `~/.local/bin/ocm` symlink |
-| `--force` | Replace a non-symlink `ocm` already at the link path |
-
-From this repository, build the package and run the wrapper script instead:
-
-```bash
-pnpm --filter @opencode-manager/ocm-cli build
-./ocm-cli/scripts/install.sh
-```
-
-### Option D — from this repository (dev)
-
-```bash
-pnpm install
-pnpm --filter @opencode-manager/ocm-cli build
-# postinstall creates ~/.local/bin/ocm symlink
-```
-
-## 2. Log in
-
-Use the URL where your Manager web UI is accessible:
-
-```bash
-ocm login https://your-manager-url
-# paste your Manager internal token when prompted
-```
-
-The token is stored in a platform-specific token store: the macOS Keychain (service `opencode-manager`, account = manager URL) on macOS, or `~/.config/opencode-manager/credentials.json` at mode `0600` on Linux. On Linux the token is plaintext JSON protected only by file permissions. Run `ocm status` to see the active store. The manager URL itself is persisted to `~/.config/opencode-manager/state.json`.
-
-Windows is not supported: the CLI falls back to the same file store, but the `0600` mode is not enforced there and hidden token entry requires `bash`.
-
-View, copy, or rotate your internal token from **Settings → OpenCode Config → Server maintenance → Manager Internal Token** (Settings cog in the sidebar). A token exists by default: the disclosure shows it behind an eye toggle with a copy button. Click the refresh icon to rotate it; a second click confirms, invalidating the previous token and marking an OpenCode server restart as pending.
-
----
-
-## 3. Commands
-
-```text
-ocm Attach to the Manager repo matching $PWD's OpenCode
- project id, or (outside a git repo) fall back to the
- last selected repo
-ocm login [token] Save manager URL + token (token via stdin if omitted)
-ocm logout Forget saved token and state
-ocm status Show current manager URL, repo, and whether token is set
-ocm list List ready repos from the manager
-ocm use Attach to a specific repo and remember it as last
-ocm push [repoId] [--force] [--create] [--yes] [--full] Mirror $PWD to the matching Manager repo (fast bundle/patch sync by default)
-ocm pull [repoId] [--force] [--full] Mirror the matching Manager repo over $PWD (fast bundle/patch sync by default)
-ocm install [--dir ] [--force] [--no-link] Vendor the CLI + TUI plugin into the OpenCode config dir
-ocm --help Show this help
-```
-
-### How bare `ocm` resolves the target
-
-1. If `$PWD` is inside a git repo, compute its OpenCode project id (the same identity OpenCode uses: the normalized origin remote hash, else the cached `/opencode` id, else the sorted first root commit). If exactly one ready Manager repo shares that project id, attach to it and remember it as `last`.
-2. If multiple Manager repos share it, fail with a hint to use `ocm use `, listing each match's id, kind (repo or worktree), branch, and path.
-3. If `$PWD` is inside a git repo but no Manager repo matches, launch local `opencode`; the last selected repo is not consulted.
-4. Only when `$PWD` is outside a git repo does `ocm` fall back to the previously used repo (`last`), and launch local `opencode` when there is no `last`.
-
-### Attach command equivalent
-
-Under the hood, `ocm` execs (OpenCode 2 connects with `--server` and reads the password from `OPENCODE_PASSWORD`):
-
-```bash
-OCM_REMOTE_MANAGER_URL=https://manager.example.com \
-OCM_REMOTE_REPO_NAME=my-repo \
-OPENCODE_PASSWORD= \
- opencode --server https://manager.example.com/api/opencode-proxy/repos/42
-```
-
-`OPENCODE_PASSWORD` is set only on this local `opencode` client invocation that `ocm` execs, from the stored Manager token; you do not need to export it yourself. Never put `OPENCODE_PASSWORD` in the OpenCode Manager server environment: the Manager strips it from its own env because it would override the Manager-managed OpenCode server password.
-
-The repo-scoped proxy mount sets the repo directory as the default request location
-(the `x-opencode-directory` header, a `location[directory]` query, the session list
-`directory` filter, and a `location` in a JSON body), so the child TUI can run from any
-local working directory. It is convenience scoping, not isolation: routes addressed by
-session ID are not restricted to the repo, and the Manager token grants full access to
-the OpenCode API through the unscoped `/api/opencode-proxy/*` route as well. The child takes over the terminal
-(`stdio: inherit`); closing the TUI exits `ocm` but leaves the Manager-side session
-intact.
-
-When the TUI plugin is installed, these internal child-process variables add a `REMOTE · ` indicator to the bottom of Manager-attached TUI windows. Local launches show no indicator.
-
-### Mirror commands
-
-`ocm push` uses a fast git bundle + working-tree patch by default to sync `$PWD` to the matching Manager repo. Pass `--full` to use the legacy tarball mirror (skipping `node_modules`, `dist`, `.next`, `.venv`, `__pycache__`, `.turbo`, and anything matched by `.gitignore`). If the fast path fails, `ocm` prompts before reverting to the tarball mirror (and proceeds automatically when there is no TTY to prompt).
-
-`ocm pull` uses a fast git bundle + working-tree patch by default to sync the matching Manager repo over `$PWD`. Pass `--full` to use the legacy tarball mirror. If the fast path fails, `ocm` prompts before reverting to the tarball mirror (and proceeds automatically when there is no TTY to prompt).
-
-### TUI `/ocm-move`
-
-When the TUI plugin entry is installed, `/ocm-move` is available in local OpenCode sessions. It replaces the Manager repo's working tree with your local one (commits, staged, unstaged, and untracked files; gitignored files on the Manager are preserved). The Manager's current checkout is never switched: if it is on your branch the repo is replaced in place; otherwise your branch goes into a sibling worktree (`-`, registered as its own Manager repo), created on demand if it does not exist yet. When multiple Manager repos match, the one already on your branch is chosen; otherwise a select dialog lets you pick the destination. A confirmation dialog gates the move before any push, states where the state will land, and lists any server-side work (uncommitted changes or commits not present locally) that will be discarded there; the push itself is forced. It then exports the active session through the local OpenCode 2 server (`session.export`), rewrites local repo directories and file attachment URIs to the Manager repo directory, imports the session's messages through the Manager proxy (`session.import`), and sends a synthetic reminder (`session.synthetic`) to the remote session (best-effort, never fails the move). The local session is retained. On success you can choose to warp — exit the local TUI and attach to the moved session on the Manager immediately — or keep the local copy with the previous toast behavior.
-
-- `--force` skips the dirty-working-tree check on `pull` and the safety bail on `push`.
-- `--create` (on `push`) creates or reuses a Manager repo when no project match is found.
-- `--yes` skips the interactive create confirmation.
-
----
-
-## 4. Environment variables
-
-The CLI's environment and token inputs:
-
-| Variable | Description |
-|---|---|
-| `OPENCODE_MANAGER_URL` | Manager base URL (e.g., `https://manager.example.com`). Not currently consumed by the CLI — use `ocm login`. |
-| `OPENCODE_PASSWORD` | Set by `ocm` on the local `opencode` child only (value = Manager token). Client-side only; never set it in the Manager server environment, which strips it. |
-| `OCM_REMOTE_MANAGER_URL` | Internal child-process context set by `ocm attach`; controls the remote TUI indicator. Not a login setting. |
-| `OCM_REMOTE_REPO_NAME` | Internal child-process context set by `ocm attach`; labels the remote TUI indicator. Not a login setting. |
-| `OCM_TOKEN` | Read-only override for the stored token; takes priority over the platform token store. `ocm login` never writes it, and `ocm logout` cannot remove it. Because the manager URL still comes from `state.json`, CI must run `ocm login` first, so this override does not yet avoid writing a token to disk. |
-| Token store entry under `` | Token used for Bearer auth on Manager API calls and Basic auth on the OpenCode proxy. macOS Keychain (service `opencode-manager`) or `~/.config/opencode-manager/credentials.json` (mode `0600`) on Linux. |
-
----
-
-## 5. Related endpoints
-
-| Endpoint | Method | Purpose |
-|---|---|---|
-| `/api/internal/opencode-workspaces` | GET | List ready repos with directory + originUrl |
-| `/api/internal/repos/:repoId/mirror/begin` | POST | Begin a chunked tarball upload (pass `repoId` `0` with `create` to create the repo) |
-| `/api/internal/repos/:repoId/mirror/parts/:uploadId/:index` | PUT | Upload one tarball chunk |
-| `/api/internal/repos/:repoId/mirror/commit` | POST | Commit the uploaded chunks into the repo dir |
-| `/api/internal/repos/:repoId/mirror/uploads/:uploadId` | DELETE | Abort an upload and clean up staging |
-| `/api/internal/repos/:repoId/mirror` | GET | Stream a tarball of the repo dir (the `--full` pull) |
-| `/api/internal/repos/:repoId/mirror/bundle` | POST | Upload a git bundle (fast push) |
-| `/api/internal/repos/:repoId/mirror/bundle` | GET | Download a git bundle (fast pull) |
-| `/api/internal/repos/:repoId/mirror/patch` | GET | Snapshot branch, HEAD, and working-tree patch |
-| `/api/internal/repos/:repoId/mirror/patch` | POST | Apply a working-tree patch (fast push) |
-| `/api/internal/repos/:repoId/mirror/head` | GET | Read the server branch, HEAD, and dirty state |
-| `/api/internal/repos/:repoId/mirror/contains/:sha` | GET | Check whether a commit is contained in the server HEAD |
-| `/api/internal/repos/:repoId/mirror/target` | GET | Plan the repo/worktree a branch maps to |
-| `/api/internal/repos/:repoId/mirror/target` | POST | Ensure that target repo/worktree exists |
-| `/api/opencode-proxy/*` | ALL | Token-protected proxy from Manager to single OpenCode server |
-| `/api/opencode-proxy/repos/:repoId/*` | ALL | Token-protected proxy that defaults the request location to the repo directory |
diff --git a/docs/stylesheets/extra.css b/docs/stylesheets/extra.css
deleted file mode 100644
index 807a8154..00000000
--- a/docs/stylesheets/extra.css
+++ /dev/null
@@ -1,275 +0,0 @@
-:root > [data-md-color-scheme="slate"] {
- --md-default-bg-color: #141414;
- --md-default-fg-color: #fafafa;
- --md-default-fg-color--light: #d4d4d8;
- --md-default-fg-color--lighter: #71717a;
- --md-default-fg-color--lightest: #3f3f46;
- --md-code-bg-color: #1a1a1a;
- --md-code-fg-color: #fafafa;
- --md-typeset-a-color: #60a5fa;
- --md-typeset-a-color--light: #93c5fd;
- --md-primary-fg-color: #0d0d0d;
- --md-primary-fg-color--light: #1a1a1a;
- --md-primary-bg-color: #fafafa;
- --md-accent-fg-color: #60a5fa;
- --md-accent-bg-color: #fb923c;
- --md-header-bg-color: #0d0d0d;
- --md-footer-bg-color: #0d0d0d;
- --md-sidebar-bg-color: #141414;
- --md-border-color: #2a2a2a;
- --md-typeset-mark-bg: #1d4ed833;
- --md-typeset-kbd-bg: #27272a;
- --md-typeset-kbd-border-color: #3f3f46;
- --md-typeset-table-header-bg: #141414;
- --md-typeset-table-row-alt-bg: #141414;
-}
-
-.md-header {
- background-color: var(--md-header-bg-color) !important;
-}
-
-.md-header__title {
- font-weight: 600;
-}
-
-.md-sidebar {
- background-color: var(--md-sidebar-bg-color) !important;
-}
-
-.md-tabs {
- background-color: #1a1a1a !important;
-}
-
-.md-tabs__link--active,
-.md-tabs__link:hover {
- color: #60a5fa !important;
-}
-
-.md-nav__link--active,
-.md-nav__link:hover {
- color: #60a5fa !important;
-}
-
-.md-nav__item--active > .md-nav__link {
- color: #60a5fa !important;
-}
-
-.md-header__topic .md-ellipsis {
- color: #fafafa;
-}
-
-.md-header__button.md-logo,
-.md-header__button[for="__search"] {
- color: #fafafa !important;
-}
-
-.md-source__repository {
- color: #fb923c !important;
-}
-
-.md-source__fact {
- color: #fb923c99 !important;
-}
-
-.md-footer {
- background-color: var(--md-footer-bg-color) !important;
-}
-
-.md-typeset table:not([class*="narrow"]) th {
- background-color: var(--md-typeset-table-header-bg);
-}
-
-.md-typeset table:not([class*="narrow"]) tr:nth-child(even) {
- background-color: var(--md-typeset-table-row-alt-bg);
-}
-
-.md-typeset .admonition,
-.md-typeset details {
- background-color: #141414;
- border-color: #2a2a2a;
-}
-
-.md-typeset .admonition-title,
-.md-typeset details > summary {
- background-color: #1a1a1a;
- border-color: #2a2a2a;
-}
-
-.md-typeset kbd {
- background-color: var(--md-typeset-kbd-bg);
- border-color: var(--md-typeset-kbd-border-color);
- color: var(--md-default-fg-color);
-}
-
-.md-search__input {
- background-color: #141414 !important;
-}
-
-.md-search__input::placeholder {
- color: #71717a;
-}
-
-.md-source-file {
- color: #71717a;
-}
-
-.screenshot-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 1.5rem;
- margin: 2rem 0;
-}
-
-.screenshot-grid figure {
- margin: 0;
- text-align: center;
-}
-
-.screenshot-grid img {
- max-width: 100%;
- border-radius: 8px;
- box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
-}
-
-.md-typeset img {
- max-width: 100%;
- height: auto;
- border-radius: 8px;
- box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3);
-}
-
-.md-typeset img.phone,
-.md-typeset img.hero-mobile {
- border: 1px solid rgba(255, 255, 255, 0.4);
-}
-
-.md-typeset img.phone {
- max-width: 300px;
-}
-
-.md-typeset img.hero {
- border-radius: 0;
- box-shadow: none;
-}
-
-.md-typeset img.hero-desktop {
- width: 100%;
- max-width: 1100px;
- max-height: none;
-}
-
-.md-typeset img.hero-mobile {
- max-width: calc(50% - 16px);
- margin-left: 12px;
-}
-
-@keyframes progress {
- 0% {
- width: 0%;
- }
- 50% {
- width: 70%;
- }
- 100% {
- width: 100%;
- }
-}
-
-.animate-progress {
- animation: progress 2s ease-in-out infinite;
-}
-
-.screenshot-grid figcaption {
- margin-top: 0.5rem;
- font-size: 0.875rem;
- color: var(--md-default-fg-color--light);
-}
-
-.md-typeset h1 {
- font-weight: 700;
- letter-spacing: -0.02em;
-}
-
-.md-typeset h2 {
- font-weight: 600;
- border-bottom: 1px solid var(--md-border-color);
- padding-bottom: 0.3em;
-}
-
-.md-typeset h3,
-.md-typeset h4 {
- font-weight: 600;
-}
-
-.md-typeset table {
- display: table;
- width: 100%;
- table-layout: auto;
- word-wrap: break-word;
-}
-
-.md-typeset table td,
-.md-typeset table th {
- max-width: 500px;
-}
-
-.md-typeset table th:first-child,
-.md-typeset table td:first-child {
- width: 35%;
- min-width: 250px;
-}
-
-@media screen and (max-width: 76.25em) {
- .md-typeset__table {
- display: block;
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
- }
-
- .md-typeset__table > table {
- display: table;
- min-width: 100%;
- }
-
- .md-typeset__table thead th {
- position: sticky;
- top: 0;
- background-color: var(--md-typeset-table-header-bg);
- z-index: 1;
- }
-
- .md-typeset table {
- display: inline-table;
- width: auto;
- min-width: 100%;
- }
-
- .md-typeset table td,
- .md-typeset table th {
- max-width: none;
- padding: 0.5em 0.75em;
- }
-
- .md-typeset table th:first-child,
- .md-typeset table td:first-child {
- width: auto;
- min-width: auto;
- }
-
- .md-typeset table code {
- word-break: break-all;
- }
-}
-
-.md-grid {
- max-width: 1400px;
-}
-
-.md-content {
- max-width: 1200px;
-}
-
-.md-typeset .admonition,
-.md-typeset details {
- font-size: 0.85rem;
-}
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
deleted file mode 100644
index 1428d817..00000000
--- a/docs/troubleshooting.md
+++ /dev/null
@@ -1,308 +0,0 @@
-# Troubleshooting
-
-Common issues and their solutions.
-
-## Installation Issues
-
-### Docker Container Won't Start
-
-**Symptoms:** Container exits immediately or fails health check
-
-**Solutions:**
-
-1. Check logs:
-```bash
-docker-compose logs -f
-```
-
-Once the Manager is running, **Settings → Logs** shows the Manager's own log lines in-app, plus the OpenCode server's stdout/stderr, which the Manager captures in memory and does **not** forward to the container console — so those OpenCode-server lines are visible in-app only. If the container or the Manager itself fails before the Manager's HTTP server is up, use `docker-compose logs`; the in-app viewer has nothing to show at that point.
-
-2. Verify Docker resources (2GB RAM minimum)
-
- 3. Check ports aren't in use:
-```bash
-lsof -i :5003
-```
-
-4. Rebuild without cache:
-```bash
-docker-compose build --no-cache
-```
-
-### Reset a Broken OpenCode Binary
-
-**Symptoms:** Container won't start after an OpenCode upgrade, or the OpenCode settings show a malformed binary
-
-OpenCode versions installed from Settings live in their own named volume (`opencode-bin`); the bundled version is part of the image. On start, the entrypoint already removes a persisted binary that is malformed or outside the supported range. If a persisted version still misbehaves, remove only that volume so the container falls back to the bundled binary, without touching the workspace or database volumes:
-
-```bash
-docker-compose down
-# is the Compose project name, usually the directory containing docker-compose.yml
-docker volume rm _opencode-bin
-docker-compose up -d
-```
-
-Or via the package scripts:
-
-```bash
-pnpm docker:down
-docker volume rm _opencode-bin
-pnpm docker:up
-```
-
-Do not use `docker-compose down -v` (or `pnpm docker:reset`) here: that also deletes the workspace and database volumes.
-
-### Port Already in Use
-
-**Symptoms:** Error about port 5003 being in use
-
-**Solutions:**
-
-1. Find process using port:
-```bash
-lsof -i :5003
-```
-
-2. Stop the process or change port in `docker-compose.yml`:
-```yaml
-ports:
- - "8080:5003" # Use different host port
-```
-
-Then add the new URL to the allowed origins in `.env`, or sign-in fails with an invalid-origin error:
-
-```bash
-AUTH_TRUSTED_ORIGINS=http://localhost:8080
-PASSKEY_ORIGIN=http://localhost:8080
-```
-
-### Permission Denied Errors
-
-**Symptoms:** Container can't write to volumes
-
-Startup tolerates workspace directories that already exist with wrong ownership; permission errors then appear on the first write into the directory rather than at startup.
-
-**Solutions:**
-
-1. In Docker, the entrypoint re-owns `/app/data` and `/workspace` on every start, so a host-side `chown` is overwritten. When you bind-mount a host directory with `OCM_WORKSPACE_HOST_PATH`, set `PUID` and `PGID` in `.env` to the host user that owns it:
-```bash
-PUID=1000
-PGID=1000
-```
-
-2. For local development, fix ownership of the local directories:
-```bash
-sudo chown -R $(id -u):$(id -g) ./workspace ./data
-```
-
-## Authentication Issues
-
-### Can't Log In
-
-**Solutions:**
-
-1. Clear browser cookies
-2. Try incognito/private mode
-3. Check `AUTH_SECRET` is set in production
-4. Verify `AUTH_TRUSTED_ORIGINS` includes your URL
-
-### Session Keeps Expiring
-
-**Solutions:**
-
-1. Ensure `AUTH_SECRET` is persistent across restarts
-2. Check browser isn't blocking cookies
-3. Verify `AUTH_SECURE_COOKIES=false` if using HTTP
-
-### OAuth Redirect Error
-
-**Solutions:**
-
-1. Verify callback URL matches exactly in provider settings
-2. Check for trailing slashes
-3. Ensure protocol matches (http vs https)
-
-### Passkey Not Working
-
-**Solutions:**
-
-1. Verify `PASSKEY_RP_ID` matches your domain
-2. Check `PASSKEY_ORIGIN` includes correct protocol and port
-3. Try a different browser
-4. Ensure WebAuthn is supported
-
-### Password Reset Not Working
-
-**Solutions:**
-
-1. Set all required variables:
-```bash
-ADMIN_EMAIL=your@email.com
-ADMIN_PASSWORD=new-password
-ADMIN_PASSWORD_RESET=true
-```
-
-2. Recreate the container so it picks up the new environment variables:
-```bash
-docker compose up -d --force-recreate app
-```
-3. Remove `ADMIN_PASSWORD_RESET=true` and recreate the container again:
-```bash
-docker compose up -d --force-recreate app
-```
-
-## Git Issues
-
-### Clone Fails for Private Repository
-
-**Solutions:**
-
-1. Configure GitHub PAT in Settings > Git > Credentials
-2. Ensure PAT has `repo` scope
-3. Check PAT hasn't expired
-
-### Push/Pull Fails
-
-**Solutions:**
-
-1. Verify GitHub PAT is valid
-2. Check PAT has write permissions
-3. Verify remote URL: `git remote -v`
-
-### Worktree Creation Fails
-
-**Solutions:**
-
-1. Ensure branch doesn't already exist
-2. Check disk space
-3. Verify repo isn't in detached HEAD state
-
-## Chat Issues
-
-### Messages Not Sending
-
-**Solutions:**
-
-1. Check OpenCode server is running:
-```bash
-docker exec opencode-manager ps aux | grep opencode
-```
-
-2. Verify model is configured
-3. Check API key is valid
-
-### Streaming Stops Unexpectedly
-
-**Solutions:**
-
-1. Check network connection
-2. Look for errors in browser console (F12)
-3. Check container logs for errors
-
-### File Mentions Not Working
-
-**Solutions:**
-
-1. Ensure repository is selected
-2. Check file exists
-3. Refresh the file browser
-
-## File Browser Issues
-
-### Files Not Loading
-
-**Solutions:**
-
-1. Refresh the page
-2. Check repository is properly cloned
-3. Verify workspace volume is mounted
-
-### Upload Fails
-
-**Solutions:**
-
-1. Check file size
-2. Verify write permissions
-3. Check browser console for errors
-
-## Performance Issues
-
-### Slow Response Times
-
-**Solutions:**
-
-1. Check Docker resources:
-```bash
-docker stats
-```
-
-2. Clear old sessions
-3. Use `/compact` to reduce session size
-
-### High Memory Usage
-
-**Solutions:**
-
-1. Limit session count
-2. Delete unused sessions
-3. Restart container:
-```bash
-docker-compose restart
-```
-
-### Database Errors
-
-**Solutions:**
-
-1. Stop the container without removing it:
-```bash
-docker compose stop app
-```
-2. Back up the data directory from the stopped container (`DATABASE_PATH=/app/data/opencode.db` in Compose), including any SQLite WAL/SHM sidecar files:
-```bash
-mkdir -p ./opencode-data-backup
-docker cp opencode-manager:/app/data/. ./opencode-data-backup/
-```
-3. Start the container again:
-```bash
-docker compose start app
-```
-
-## Mobile Issues
-
-### Keyboard Doesn't Close
-
-**Solutions:**
-
-1. Tap outside input field
-2. Update device OS
-3. Try Safari on iOS
-
-### PWA Won't Install
-
-**Solutions:**
-
-1. iOS: Must use Safari
-2. Android: Must use Chrome
-3. Check HTTPS is enabled
-
-### Touch Gestures Not Working
-
-**Solutions:**
-
-1. Start the swipe within 30px of the screen edge
-2. Swipe at least 80px
-3. Check no UI element is blocking
-
-## Getting More Help
-
-If your issue isn't covered:
-
-1. Check [GitHub Issues](https://github.com/chriswritescode-dev/opencode-manager/issues)
-2. Search [GitHub Discussions](https://github.com/chriswritescode-dev/opencode-manager/discussions)
-3. Open a new issue with:
- - Steps to reproduce
- - Expected vs actual behavior
- - Container logs: `docker-compose logs` — required when the Manager fails to start; **Settings → Logs** in-app covers the same Manager lines plus captured OpenCode server output once the Manager is up
- - Browser console errors
- - Environment info (OS, browser, Docker version)
diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg
index bf8f9075..2a6e10f0 100644
--- a/frontend/public/favicon.svg
+++ b/frontend/public/favicon.svg
@@ -1,4 +1,5 @@
-