mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 21:04:23 +01:00
feat(config): support layered OpenCode config sources with revision-guarded saves (#358)
* 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
This commit is contained in:
1 parent
97370a8296
commit
b5dd900efb
53 files changed
+3003
-1665
No files matched your search
@@ -46,7 +46,6 @@ export const DEFAULTS = {
|
||||
PROCESS_START_WAIT_MS: 2000,
|
||||
PROCESS_VERIFY_WAIT_MS: 1000,
|
||||
HEALTH_CHECK_TIMEOUT_MS: 30000,
|
||||
CONFIG_PATCH_TIMEOUT_MS: 15000,
|
||||
},
|
||||
|
||||
FILE_LIMITS: {
|
||||
@@ -101,6 +100,9 @@ export const GIT_PROVIDERS = {
|
||||
BITBUCKET: 'bitbucket.org',
|
||||
} as const
|
||||
|
||||
export const OPENCODE_CONFIG_SOURCE_NAMES = ['config.json', 'opencode.json', 'opencode.jsonc'] as const
|
||||
export type OpenCodeConfigSourceName = (typeof OPENCODE_CONFIG_SOURCE_NAMES)[number]
|
||||
|
||||
export type Config = typeof DEFAULTS
|
||||
export type AllowedMimeType = (typeof ALLOWED_MIME_TYPES)[number]
|
||||
export type GitProvider = (typeof GIT_PROVIDERS)[keyof typeof GIT_PROVIDERS]
|
||||
Reference in new issue
Block a user