- fix(context-limit): check modelContextLimitsCache for all Anthropic models, not just GA-model set; user config/cache wins over 200K default (fixes #2836) - fix(agent-key-remapper): preserve config key aliases alongside display names so `opencode run --agent sisyphus` resolves correctly (fixes #2858) - fix(tool-config): respect host permission.skill=deny by disabling skill/skill_mcp tools when host denies them (fixes #2873) - test: update context-limit and agent-key-remapper tests to match new behavior
This commit is contained in:
@@ -29,6 +29,9 @@ export function applyToolConfig(params: {
|
||||
? { todowrite: "deny", todoread: "deny" }
|
||||
: {}
|
||||
|
||||
const existingPermission = params.config.permission as Record<string, unknown> | undefined;
|
||||
const skillDeniedByHost = existingPermission?.skill === "deny";
|
||||
|
||||
params.config.tools = {
|
||||
...(params.config.tools as Record<string, unknown>),
|
||||
"grep_app_*": false,
|
||||
@@ -40,6 +43,9 @@ export function applyToolConfig(params: {
|
||||
...(params.pluginConfig.experimental?.task_system
|
||||
? { todowrite: false, todoread: false }
|
||||
: {}),
|
||||
...(skillDeniedByHost
|
||||
? { skill: false, skill_mcp: false }
|
||||
: {}),
|
||||
};
|
||||
|
||||
const isCliRunMode = process.env.OPENCODE_CLI_RUN_MODE === "true";
|
||||
|
||||
Reference in New Issue
Block a user