Files
openclaw/src/agents/tool-catalog.test.ts
Alex Knight 1e4098134a fix: enable browser tools with full profile (#76557)
Summary:
- The PR makes `tools.profile: "full"` resolve to a wildcard allowlist, teaches plugin optional-tool allowlist checks to honor `*`, and updates regression tests, docs, and the changelog for browser tool availability.
- Reproducibility: yes. source-level reproduction is high confidence: current main makes `full` resolve to no  ...  plugin allowlist helpers do not accept `*`. I did not run a live browser session in this read-only review.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs: update full profile description and add changelog for #76507

Validation:
- ClawSweeper review passed for head b5329de33c.
- Required merge gates passed before the squash merge.

Prepared head SHA: b5329de33c
Review: https://github.com/openclaw/openclaw/pull/76557#issuecomment-4365736091

Co-authored-by: Alex Knight <aknight@atlassian.com>
2026-05-03 11:12:30 +00:00

31 lines
1.4 KiB
TypeScript

import { describe, expect, it } from "vitest";
import { resolveCoreToolProfilePolicy } from "./tool-catalog.js";
describe("tool-catalog", () => {
it("includes code_execution, web_search, x_search, web_fetch, and update_plan in the coding profile policy", () => {
const policy = resolveCoreToolProfilePolicy("coding");
expect(policy).toBeDefined();
expect(policy!.allow).toContain("code_execution");
expect(policy!.allow).toContain("web_search");
expect(policy!.allow).toContain("x_search");
expect(policy!.allow).toContain("web_fetch");
expect(policy!.allow).toContain("image_generate");
expect(policy!.allow).toContain("music_generate");
expect(policy!.allow).toContain("video_generate");
expect(policy!.allow).toContain("update_plan");
expect(policy!.allow).not.toContain("browser");
});
it("includes bundle MCP tools in coding and messaging profile policies", () => {
expect(resolveCoreToolProfilePolicy("coding")?.allow).toContain("bundle-mcp");
expect(resolveCoreToolProfilePolicy("messaging")?.allow).toContain("bundle-mcp");
expect(resolveCoreToolProfilePolicy("minimal")?.allow).not.toContain("bundle-mcp");
});
it("full profile uses wildcard to grant all tools (#76507)", () => {
const policy = resolveCoreToolProfilePolicy("full");
expect(policy).toBeDefined();
expect(policy!.allow).toContain("*");
});
});