- Create a worktree from a new or existing branch
- Integrate a worktree branch into a target branch by merge commit or cherry-pick, with continue/abort on conflicts
- Delete a worktree with keep, delete-local, or delete-local-and-remote branch options, using safe branch deletion for unmerged branches
- Add a stash tab (list, push, apply, pop, drop) shared across a repository and its worktrees
- Rename and delete branches, optionally deleting the remote branch and updating scheduled base branches
- Detect in-progress merge, rebase, cherry-pick and revert operations and hand conflicts to an agent session
- Generate commit messages from staged changes with the default model
- Add a default git identity and saved per-repository identities written to git config
- Unify git error mapping behind a typed error and one route helper; consolidate git mutations and cache invalidation
- Update repository docs
- Vendor the 36 OpenCode theme palettes into the shared package, synced
from the pinned OpenCode release tag via pnpm themes:sync.
- Add a colorTheme user preference across the settings schema, defaults,
and the assistant internal API.
- Extend palettes with success, warning, info, and diff colors, and add a
resolver that maps palettes to CSS tokens and applies them to the DOM.
- Apply the theme app-wide through a ThemeProvider context, adopting the
tokens in message, repo, session, and settings components, agent
colors, git status styles, and diff viewers.
- Add a theme picker to General settings and make model quick-select
follow the active theme (fixes#355).
* feat(opencode): migrate OpenCode Manager to OpenCode 2
Port the backend lifecycle, generated plugins, event aggregation,
schedules, worktrees, provider credentials, MCP, config handling, the
frontend chat model, and the ocm CLI to OpenCode 2.
Adopt @opencode/client 2.0.15 as the single typed V2 API contract,
require OpenCode 2.0.0 or newer (pinned 2.0.15), and delete every
V1-only code path.
* refactor(opencode): reload config in place and drop v1 compatibility shims
Route config/skill/AGENTS.md changes through the OpenCode location reload
API instead of a full server restart, stop auto-resuming interrupted
sessions, remove the restart coordinator and v1 MCP/version shims, and pin
support to OpenCode >=2.0.15 <3.0.0. Adds integration-ready retries,
service-mode launch, ocm-cli repo proxy, and new frontend form/MCP helpers.
* refactor(opencode): consolidate v2 migration helpers and harden install, proxy, and session flows
- extract shared semver and model-ref utilities, reuse across version checks
- share the OpenCode release download script across Docker, entrypoint, dev setup
- unify install/upgrade failure recovery and guard externally managed OPENCODE_BIN
- scope the repo proxy location rewrite and surface ocm proxy errors
- rework frontend session projection, permission lookup, and cache invalidation
* fix(schedules): reject unavailable agents before creating a session
* feat(opencode): add ocm install, schedule agent fallback, and session move guards
* feat(config): support layered OpenCode config sources with revision-guarded saves
* refactor(config): harden multi-source OpenCode config handling
- extract shared config-source helpers and default source name
- reject shadowed removals with 409 and require sources/revision
- restart the server on reload with session resume
- mirror multiple host config files on import and warn on removals
- skip restart for mcp-only saves
- drop removedFields and CONFIG_PATCH_TIMEOUT_MS
* fix(config): return null when archiving broken OpenCode config fails
* 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
* feat(sandbox): add KVM-backed agent sandboxing via microsandbox
* feat(sandbox): route host-shell surfaces into microVM via shell wrapper
* feat(sandbox): route host-shell surfaces into microVM via shell wrapper
* fix(sandbox): harden enforcement validation and backup handling
* fix(sandbox): bound lifecycle queue and harden install/backup paths
Bound the OpenCode supervisor lifecycle queue to one running plus one
pending operation so repeated restarts cannot stack unbounded HTTP
requests, while exempting stop() so shutdown is never dropped.
Reject enforcement backups that carry no recoverable removed sections,
matching the existing fail-closed handling of unparseable backups.
Install OpenCode through a private mktemp staging directory instead of
the predictable /tmp/opencode path.
Use named path/os imports in the files added by this branch.
* refactor(sandbox): remove OpenCode version allowlist gating under enforcement
* fix(settings): use resolved opencode binary and verify installed version
* refactor(sandbox): scope enforcement to agent bash tool only
* fix(sandbox): plan bash against factory directory and attest runtime tmpfs; align permission reply API
* fix(sandbox): pin neutral entrypoint and persist opencode upgrades across rebuilds
* fix(sandbox): align canonical spec with msb 0.6.8 runtime defaults
* feat(sandbox): show unwrapped sandboxed bash commands in message UI
* refactor(sandbox): pin shell shim to sandbox agent bash without rewriting commands
* feat(sandbox): route notifications through a host-side manager tool
* feat(sandbox): route all assistant capabilities through the ocm tool
Add an allow-listed request action to the generated ocm plugin so agents
reach settings, assistant reload, repos, git-info, workspaces, and
schedules through the tool instead of curling the internal API with a
bearer token, which is impossible under sandboxing.
Rewrite the curl-based skills to use the ocm request action and drop the
apiBaseUrl plumbing. Remove the now-unread .opencode/internal-token file
and the sandbox tmpfs mask that hid it; attestation now rejects any
tmpfs other than the runtime /tmp mount.
* fix(sidebar): wire new-session and new-schedule actions to every page
AssistantRedirect never registered a listener for the sidebar's
new-session event, so the desktop sidebar CTA on /assistant was a
no-op; the Schedules pages had the same gap for new-schedule.
Make useSidebarAction the single source of truth for action keys and
event dispatch, and warn when an action is dispatched with no mounted
handler so an unhandled CTA fails loudly instead of silently. Wire the
missing listeners to the existing per-page handlers.
* feat(sandbox): forward git credentials into the microVM and add sandbox guest image
* feat(sandbox): add git credential forwarding toggle to settings
* test(backend): replace better-sqlite3 test mock with node:sqlite
Reimplement the bun:sqlite test mock on top of node:sqlite with an
explicit BEGIN/COMMIT/ROLLBACK transaction wrapper.
* feat(assistant): self-configuring assistant mode
Add a self-editable assistant workspace and the APIs that support it:
- POST /assistant/reload disposes and re-bootstraps the assistant
instance (directory-scoped, rate-limited) so agent.md edits apply.
- Internal settings API accepts non-secret TTS/STT patches via
dedicated partial schemas.
- Strip the generated agent persona from opencode.json on repair so
user-customized agents are preserved across config recovery.
- Cache the last assistant session id to avoid redundant session
listing on launch.
* style(repo): align worktree and workspace tabs with primary/orange theme