fix(config): respect user's external_directory permission setting
applyToolConfig() forcibly overrode the user's external_directory permission to 'allow' by placing OMO defaults after the user config spread. Reorder so defaults come first and user config spreads on top, allowing users to set 'ask' or 'deny'. The task permission remains forced to 'deny' after the spread for security. Closes #1973
This commit is contained in:
@@ -99,9 +99,9 @@ export function applyToolConfig(params: {
|
||||
}
|
||||
|
||||
params.config.permission = {
|
||||
...(params.config.permission as Record<string, unknown>),
|
||||
webfetch: "allow",
|
||||
external_directory: "allow",
|
||||
...(params.config.permission as Record<string, unknown>),
|
||||
task: "deny",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user