fix(tools): remove cron from coding profile

This commit is contained in:
biefan 2026-03-17 16:40:01 +00:00
parent f036ed27f4
commit 68838cdd9c
3 changed files with 4 additions and 3 deletions

View File

@ -198,7 +198,7 @@ const CORE_TOOL_DEFINITIONS: CoreToolDefinition[] = [
label: "cron",
description: "Schedule tasks",
sectionId: "automation",
profiles: ["coding"],
profiles: [],
includeInOpenClawGroup: true,
},
{

View File

@ -56,7 +56,7 @@ describe("tool-policy", () => {
it("resolves known profiles and ignores unknown ones", () => {
const coding = resolveToolProfilePolicy("coding");
expect(coding?.allow).toContain("read");
expect(coding?.allow).toContain("cron");
expect(coding?.allow).not.toContain("cron");
expect(coding?.allow).not.toContain("gateway");
expect(resolveToolProfilePolicy("nope")).toBeUndefined();
});

View File

@ -125,10 +125,11 @@ describe("tools invoke HTTP denylist", () => {
expect(cronRes.status).toBe(200);
});
it("keeps cron available under coding profile without exposing gateway", async () => {
it("requires an explicit tool allow override to expose cron under coding profile", async () => {
cfg = {
tools: {
profile: "coding",
allow: ["cron"],
},
gateway: {
tools: {