The admin password reset finds the admin case-insensitively and deletes the push subscriptions of the sessions it ends. The app re-sends its push subscription once per signed-in session so revoke reaches re-signed-in devices, and the upsert keeps the stored device name. Plain-HTTP and URL parsing checks are shared helpers.
The admin password reset and the first-user check read and wrote the
Better Auth tables with raw SQL, so session delete hooks never ran on the
reset path.
- the admin is found with findUserByEmail and its credential account is
updated by id with the configured password hasher
- sessions are removed with deleteUserSessions, which runs the session
delete hooks
- a missing credential account logs a warning instead of updating nothing
- /api/auth-info/config counts users through the adapter
Settings -> Account gets "Connect a device", a paired-devices list, and a
remote access headers editor, so the mobile app and other browsers can sign
in without typing a password and pass a reverse proxy such as Cloudflare
Access.
- one-time pairing codes (3 min TTL) minted by a Better Auth plugin and
redeemed into a new session that records the device name
- POST /api/device-pairing/links builds the ocm://link app link with the
stored headers as h= parameters and a browser /pair link; plain-HTTP and
loopback origins are blocked or warned about
- remote access headers are stored encrypted, returned by name only, and
validated (8 headers, 512-char values, 1800 encoded characters, reserved
transport names blocked); a Cloudflare Access service token preset fills
CF-Access-Client-Id and CF-Access-Client-Secret
- login offers "Sign in with QR code" and /pair redeems a scanned code,
returning to the login redirect target
- revoking a device deletes its session, closes its live connections and
removes its push subscriptions; the current session cannot be revoked
- auth: drop the AUTH_TRUSTED_PROXY_HEADERS opt-in. Configured headers were
trusted from any peer, so direct access to the published port could still
rotate them. Better Auth now reads only the Manager-set socket address
header; the env, compose forwarding, docs and tests are removed.
- composer: a send that completes after the composer unmounted (session
switched mid-send) left the submitted text in the per-session draft store.
Sends now complete through mutateAsync and clear the stored draft only if
it still matches what was submitted, so newer edits are kept.
Critical and high:
- repos: unlinking a local repo removes only the Manager reference and alias,
never the repository files; confirm button reads "Unlink"
- auth: rate-limit by the socket address; trust proxy headers only when
AUTH_TRUSTED_PROXY_HEADERS is set (documented and forwarded in compose)
- composer: per-session in-memory drafts (text, bash mode, attachments);
Escape no longer clears the prompt
- url params: compose same-tick updates so schedule dialogs stay closed after
create/delete; delete dialog names the job
Medium:
- tool rows show failures (non-zero shell exit, failed exploration members)
- voice conversation shows the specific error and a starting state
- settings: Escape in dropdowns and the shortcut recorder no longer closes
the dialog; mobile deep links open the requested section; one content tree
per platform
- closing pushed sheets, settings, tool panels and schedule dialogs goes back
in history
- login returns to the requested page; signed-out pages make no
authenticated requests
- action terminals keep their output (Manager-side output capture and replay)
- unpushed-commit detection, commit message kept on failure
- binary files with unknown extensions are detected and not editable
- tool panel resizes when docked and floats as a dismissible sheet when the
page is too narrow
- Docker image runs tini as PID 1
Low: not-found states, add-repo and branch validation errors (4xx),
search-aware empty states, mobile repo sort/filter/select cues, sidebar
resize affordance and collapse shortcut, mobile unread badge, preview port
filtering, terminal close handling, walkthrough empty state and helper
session filtering, placeholder contrast, permission labels and focus,
TTS task-list sanitizing, git identity email validation, quieter git
logging, hermetic worktree tests, and accessible names for icon-only
controls.
Deleting session rows did not end a session while the 5 minute cookie
cache served the signed cookie without reading the database, so an admin
password reset left the old session usable. Drop the cache so session
state is always authoritative, and cover revocation with a test.
Upgrade better-auth and @better-auth/passkey to 1.7.12 and hono to
4.13.13, which clears every auth-related advisory in pnpm audit. The
lockfile also picks up patched kysely, @simplewebauthn/server and defu.
Drop the Set-Cookie and cookie-name logging that exposed session tokens,
match ADMIN_EMAIL case-insensitively, revoke admin sessions when
ADMIN_PASSWORD_RESET rotates the password, and require user verification
for passkeys.
Add a shared rehype pipeline (rehype-raw -> rehype-sanitize -> rehype-highlight) to every markdown renderer so scripts, frames and event handlers are stripped from model output and repository files while safe HTML and highlighting survive.
Also delete change walkthroughs when their session is deleted (including in-flight generation), build schedule model options from default/favorite/recent state, and include 127.0.0.1 origins in the default trusted origins.
Security:
- Reject same-site and cross-site state-changing requests on cookie-authenticated routes unless the origin is trusted
- Drop Manager and ocm_preview Set-Cookie headers from preview responses
- Show and hash the full executable content of .ocm/project.json at trust time
- Restrict action URLs to http(s) and refuse symlinked repo config paths
- Keep the preview start redirect on the gateway origin
Lifecycle:
- Stop terminals in OpenCode workspace siblings when a repo is deleted
- Report preview as unavailable instead of crashing when the gateway port cannot be bound
Performance:
- Skip branch lookups when validating terminal and project-config directories
- Stop the /proc scan once all listening sockets are mapped and pause port polling while a preview is open
- Close slow WebSocket clients with 1013 so they reconnect with replay
- Lazy-load the xterm terminal view and skip unchanged resize requests
- Request uncompressed responses from preview targets
Cleanup:
- Share one repo directory resolver, trusted-origins parser, cookie prefix, WebSocket frame forwarder, header filter, icon map and dialog-param helper
- Remove unused props, options and exports
Docs: update terminal, preview, project actions, sandboxing, internal API and environment pages
* refactor(config): make on-disk opencode.json the single source of truth
Make <workspace>/.config/opencode/opencode.json the only store for the active OpenCode configuration. One owner (opencode-config-file.ts) reads, validates, writes, archives, and seeds the file; one owner (opencode-config-apply.ts) decides how an edit is applied: restart pending, or a live patch with recovery. Settings routes, the internal assistant API, the health-watch supervisor, boot, and host import all go through them, so an edit that lands on the file without going through the database is visible immediately instead of at the next Manager boot.
Remove the named-config profiles. Migration 019 archives every opencode_configs row to .config/opencode-configs-archive/<name>.json, restores the default row to opencode.json when no file exists, then drops the table, its indexes, and repos.opencode_config_name. The /opencode-configs* and config/switch routes and the CreateConfigDialog/SwitchConfigDialog dialogs are gone, and the ocm tool gains GET/PUT /opencode-config backed by the same apply owner.
Harden the write path: serialize and atomically write config updates while preserving the file mode, keep withFileLock usable after a rejection, route reloadConfig's cleaned-config write through the file owner, stop boot from rewriting an existing valid config when importing state, prune the health-watch directory to its newest 20 entries, resolve archive paths with realpath, and share one frontend config query across dialogs.
* fix(mirror): canonicalize worktree paths before branch ownership check
* refactor(config): unify opencode config apply and rollback paths
- share one config route factory between public and internal mounts
- capture last-known-good before every config write and restore via one helper
- stop auto-restarting on save; flag restart-required fields and live-patch the rest
- add CONFIG_PATCH_TIMEOUT_MS for config patch requests
- extract canonicalPath helpers, health-watch artifact writer, and useProvidersWithModels hook
* refactor(model-state): use OpenCode state file as model state source of truth