import { describe, expect, it } from "vitest"; import { formatProductSelfModificationInstruction } from "./product-self-modification.js"; describe("formatProductSelfModificationInstruction", () => { it("steers evOo UI changes to source code, not browser or third-party login", () => { const instruction = formatProductSelfModificationInstruction({ teamComputer: false, cloudAgentEnabled: false, }); expect(instruction).toContain("evOo"); expect(instruction).toMatch(/source code/i); expect(instruction).toMatch(/read_file, write_file, and shell/); expect(instruction).toMatch(/Do not use browser_\*/); expect(instruction).toMatch(/never ask the user to sign in to claude\.ai/i); expect(instruction).toMatch(/Claude Space/); expect(instruction).toMatch(/update_bot only changes this bot's chat profile/); }); it("mentions project/ on team computers", () => { const instruction = formatProductSelfModificationInstruction({ teamComputer: true, cloudAgentEnabled: false, }); expect(instruction).toContain("project/"); }); it("mentions cloud_agent_launch when the tool is available", () => { const instruction = formatProductSelfModificationInstruction({ teamComputer: false, cloudAgentEnabled: true, }); expect(instruction).toContain("cloud_agent_launch"); }); });