Skip to content

Commit f65ca2b

Browse files
committed
Mount skill_search and use_skill on every worker tool surface
1 parent a76f1c6 commit f65ca2b

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

‎src/agent/directors/tool-sets.test.ts‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,19 @@ describe("SKYWALKER_TOOLS / ORCHESTRATOR_TOOLS", () => {
9292
);
9393
});
9494

95-
test("skill_search is not on Skywalker or worker orchestrator allowlists", () => {
96-
expect(SKYWALKER_TOOLS as readonly string[]).not.toContain("skill_search");
97-
expect(ORCHESTRATOR_TOOLS as readonly string[]).not.toContain(
98-
"skill_search",
99-
);
95+
test("skill_search + use_skill mount on every worker surface", () => {
96+
for (const surface of [
97+
READ_TOOLS,
98+
BUILD_TOOLS,
99+
DOCS_TOOLS,
100+
REVIEW_TOOLS,
101+
INTERN_TOOLS,
102+
ORCHESTRATOR_TOOLS,
103+
SKYWALKER_TOOLS,
104+
] as const) {
105+
expect(surface as readonly string[]).toContain("skill_search");
106+
expect(surface as readonly string[]).toContain("use_skill");
107+
}
100108
});
101109
});
102110

‎src/agent/directors/tool-sets.ts‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
// Small, explicit tool allowlists for director packages.
22
// Prefer tools.allow at mount (CapabilityFilter include) over huge deny lists.
33
// manage_tasks is always mounted by runSubAgent after the filter — omit it here.
4-
// use_skill / tool_search / ask_operator are primary-session tools: fleet agents /
5-
// workers do not mount ask_operator (skill guidance is baked into package system prompts).
4+
// skill_search + use_skill mount on every worker through runSubAgent (scoped to
5+
// the dispatch's optionalSkills); they ride the allowlists below so the
6+
// capability filter keeps them. ask_operator stays primary-only.
7+
8+
/**
9+
* Skill discovery/loading, mounted on every worker surface (read/build/docs/
10+
* review/intern/orchestrator). runSubAgent scopes both tools to the
11+
* dispatch's optionalSkills before the capability filter.
12+
*/
13+
export const SKILL_TOOLS = ["skill_search", "use_skill"] as const;
614

715
/** Read/search/shell — no product mutation. */
816
export const READ_TOOLS = [
@@ -15,6 +23,7 @@ export const READ_TOOLS = [
1523
"shell_collect",
1624
"web_fetch",
1725
"web_search",
26+
...SKILL_TOOLS,
1827
] as const;
1928

2029
/**
@@ -69,6 +78,7 @@ export const INTERN_TOOLS = [
6978
"read_file",
7079
"list_dir",
7180
...PRODUCT_WRITE_TOOLS,
81+
...SKILL_TOOLS,
7282
] as const;
7383

7484
/**

0 commit comments

Comments
 (0)