Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/builtins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const BUILTIN_TOOLS: ReadonlySet<string> = new Set([
"NotebookEdit",
"PushNotification",
"Read",
"ReadNotifications",
"RemoteTrigger",
"ScheduleWakeup",
"SendMessage",
Expand All @@ -37,6 +38,7 @@ export const BUILTIN_TOOLS: ReadonlySet<string> = new Set([
"ToolSearch",
"WebFetch",
"WebSearch",
"Workflow",
"Write",
]);

Expand Down
8 changes: 8 additions & 0 deletions test/builtins.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ describe("builtins", () => {
expect(BUILTIN_TOOLS.has("SendMessage")).toBe(true);
});

it("BUILTIN_TOOLS includes ReadNotifications", () => {
expect(BUILTIN_TOOLS.has("ReadNotifications")).toBe(true);
});

it("BUILTIN_TOOLS includes Workflow", () => {
expect(BUILTIN_TOOLS.has("Workflow")).toBe(true);
});

it("isMcpTool detects mcp__ prefix", () => {
expect(isMcpTool("mcp__github__create_issue")).toBe(true);
expect(isMcpTool("Read")).toBe(false);
Expand Down
20 changes: 20 additions & 0 deletions test/checks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,26 @@ describe("runChecks", () => {
const d = ds.find((d) => d.rule === "model-unknown");
expect(d?.message).toContain("us.claude-fable-6");
});

it("does not flag ReadNotifications as an unknown tool", () => {
const s = mkSkill("/test/foo/SKILL.md", {
name: "foo",
description: "do the foo thing",
"allowed-tools": "ReadNotifications Read",
});
const ds = runChecks([s], config);
expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined();
});

it("does not flag Workflow as an unknown tool", () => {
const s = mkSkill("/test/foo/SKILL.md", {
name: "foo",
description: "do the foo thing",
"allowed-tools": "Workflow",
});
const ds = runChecks([s], config);
expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined();
});
});

describe("buildValidated", () => {
Expand Down