mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
* 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
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import type { Migration } from '../migration-runner'
|
|
import migration001 from './001-base-schema'
|
|
import migration002 from './002-repos-nullable-url'
|
|
import migration003 from './003-repos-add-columns'
|
|
import migration004 from './004-repos-indexes'
|
|
import migration005 from './005-repos-local-path-prefix'
|
|
import migration006 from './006-git-token-to-credentials'
|
|
import migration007 from './007-schedules'
|
|
import migration008 from './008-schedule-cron-support'
|
|
import migration009 from './009-repo-source-path'
|
|
import migration010 from './009-prompt-templates'
|
|
import migration011 from './011-repo-last-accessed'
|
|
import migration012 from './012-opencode-model-state'
|
|
import migration013 from './013-app-secrets'
|
|
import migration014 from './014-repos-add-name'
|
|
import migration015 from './015-schedule-worktree-isolation'
|
|
import migration016 from './016-schedule-permission-config'
|
|
import migration017 from './017-schedule-run-workspace-id'
|
|
import migration018 from './018-session-pins'
|
|
import migration019 from './019-drop-opencode-configs'
|
|
import migration020 from './020-drop-opencode-model-state'
|
|
|
|
export const allMigrations: Migration[] = [
|
|
migration001,
|
|
migration002,
|
|
migration003,
|
|
migration004,
|
|
migration005,
|
|
migration006,
|
|
migration007,
|
|
migration008,
|
|
migration009,
|
|
migration010,
|
|
migration011,
|
|
migration012,
|
|
migration013,
|
|
migration014,
|
|
migration015,
|
|
migration016,
|
|
migration017,
|
|
migration018,
|
|
migration019,
|
|
migration020,
|
|
]
|