fix(plan): allowlist get_internal_docs in Plan Mode (#22668)

This commit is contained in:
Adib234
2026-03-16 20:34:30 -04:00
committed by GitHub
parent cddd9e7148
commit 61fd71dc29
5 changed files with 14 additions and 3 deletions

View File

@@ -120,7 +120,8 @@ These are the only allowed tools:
[`list_directory`](../tools/file-system.md#1-list_directory-readfolder),
[`glob`](../tools/file-system.md#4-glob-findfiles)
- **Search:** [`grep_search`](../tools/file-system.md#5-grep_search-searchtext),
[`google_web_search`](../tools/web-search.md)
[`google_web_search`](../tools/web-search.md),
[`get_internal_docs`](../tools/internal-docs.md)
- **Research Subagents:**
[`codebase_investigator`](../core/subagents.md#codebase-investigator),
[`cli_help`](../core/subagents.md#cli-help-agent)

View File

@@ -346,6 +346,12 @@ describe('Policy Engine Integration Tests', () => {
expect(
(await engine.check({ name: 'list_directory' }, undefined)).decision,
).toBe(PolicyDecision.ALLOW);
expect(
(await engine.check({ name: 'get_internal_docs' }, undefined)).decision,
).toBe(PolicyDecision.ALLOW);
expect(
(await engine.check({ name: 'cli_help' }, undefined)).decision,
).toBe(PolicyDecision.ALLOW);
// Other tools should be denied via catch all
expect(

View File

@@ -80,7 +80,8 @@ toolName = [
"google_web_search",
"activate_skill",
"codebase_investigator",
"cli_help"
"cli_help",
"get_internal_docs"
]
decision = "allow"
priority = 70

View File

@@ -53,6 +53,6 @@ decision = "allow"
priority = 50
[[rule]]
toolName = ["codebase_investigator", "cli_help"]
toolName = ["codebase_investigator", "cli_help", "get_internal_docs"]
decision = "allow"
priority = 50

View File

@@ -266,6 +266,9 @@ export const PLAN_MODE_TOOLS = [
WEB_SEARCH_TOOL_NAME,
ASK_USER_TOOL_NAME,
ACTIVATE_SKILL_TOOL_NAME,
GET_INTERNAL_DOCS_TOOL_NAME,
'codebase_investigator',
'cli_help',
] as const;
/**