Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Assist and MCP: tests that the soundtrack tools stay the owner's under public sign-up

Claude717037967b74
diff --git a/tests/assist-soundtrack-tools.test.ts b/tests/assist-soundtrack-tools.test.ts
index bf70df46..cd1868f1 100644
--- a/tests/assist-soundtrack-tools.test.ts
+++ b/tests/assist-soundtrack-tools.test.ts
@@ -300,3 +300,14 @@ describe("the offline planner", () => {
expect(agent.offlineSoundtrack("a red fox in the snow")).toBeNull();
});
});
+
+describe("public sign-up: the tools are the owner's (docs/public-signup.md)", () => {
+ it("a visitor's change to an Assist chat (where the tools run) is refused, and MCP is owner-only, so a visitor never runs them", async () => {
+ const access = await import("@/lib/guest-access");
+ // Approving a split_soundtrack / remove_dialogue card is a change to the chat: assist-owner for guests and accounts.
+ expect(access.isAssistChange("POST", "/api/assist/abc123/approval")).toBe(true);
+ expect(access.isAssistChange("POST", "/api/assist/abc123/messages")).toBe(true);
+ expect(access.ownerOnly("POST", "/api/mcp")).toBe(true);
+ expect(access.ownerOnly("GET", "/api/mcp")).toBe(true);
+ });
+});