mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
fix(sandbox): harden enforcement validation and backup handling
This commit is contained in:
1 parent
f315dda3f3
commit
0481160f5e
13 files changed
+180
-101
No files matched your search
@@ -48,9 +48,16 @@ export function sanitizeConfigForEnforcementResult(
|
||||
return { sanitized, removed }
|
||||
}
|
||||
|
||||
export function isProvablyRemoteMcpEntry(entry: unknown): boolean {
|
||||
return isRecord(entry)
|
||||
&& entry.type === 'remote'
|
||||
&& typeof entry.url === 'string'
|
||||
&& entry.command === undefined
|
||||
&& entry.environment === undefined
|
||||
}
|
||||
|
||||
export function isLocalMcpServerEntry(entry: unknown): boolean {
|
||||
if (!isRecord(entry)) return false
|
||||
return entry.type === 'local' || Array.isArray(entry.command)
|
||||
return !isProvablyRemoteMcpEntry(entry)
|
||||
}
|
||||
|
||||
export function isCustomProviderEntry(entry: unknown): boolean {
|
||||
|
||||
Reference in new issue
Block a user