Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Merge pull request #6349 from Anil-matcha/add-muapi-media-skill

milind-soni769d31cac8af
diff --cc server/skill-library.test.ts
index 19582274b2,dbf0877fdb..73f2268cc3
--- a/server/skill-library.test.ts
+++ b/server/skill-library.test.ts
@@@ -151,29 -151,23 +151,50 @@@ describe("bundled data-dashboards skill
});
});
+describe("bundled phone-connection skill", () => {
+ const skills = loadBundledSkills(join(process.cwd(), "skills"));
+ const guide = skills.find((skill) => skill.manifest.id === "phone-connection")?.instructions ?? "";
+ const ids = (text: string) => selectBundledSkills(text, [], skills).map((skill) => skill.manifest.id);
+
+ it("mounts when the phone can't reach the computer, with no capability, and stays out of other turns", () => {
+ for (const text of ["My phone stopped connecting when I'm away from Wi-Fi", "the app says No route to your computer at 192.168.1.20",
+ "Anywhere, through MausBot doesn't work", "why won't my phone connect on mobile data? my phone won't connect", "how do I pair my phone again?"]) {
+ expect(ids(text), text).toContain("phone-connection");
+ }
+ for (const text of ["call my phone at 5pm", "Write a paragraph about photography", "book a call for Friday", "summarize this email", "check the wifi password in my notes"]) {
+ expect(ids(text), text).not.toContain("phone-connection");
+ }
+ });
+
+ it("tells the cause only from the live Phone link line, gives the fix, and rules out what can't help", () => {
+ expect(guide).toContain("Same Wi-Fi"); expect(guide).toContain("Anywhere, through MausBot");
+ expect(guide).toContain('starts "Phone link:"');
+ expect(guide).toContain("update the MausBot app on that phone");
+ expect(guide).toMatch(/open it once\s+on the same Wi-Fi as this computer/);
+ expect(guide.indexOf("open it once"), "the easy way first").toBeLessThan(guide.indexOf("pair it again"));
+ expect(guide).toContain("never say the link ended or that their app is too old");
+ for (const futile of ["off and on", "Try reconnecting", "force-quitting", "VPN"]) expect(guide).toContain(futile);
+ expect(guide.split("\n").length).toBeLessThanOrEqual(60);
+ });
+});
++
+ describe("bundled muapi-media skill", () => {
+ const skills = loadBundledSkills(join(process.cwd(), "skills"));
+ const ids = (text: string) => selectBundledSkills(text, [], skills).map((skill) => skill.manifest.id);
+
+ it("mounts for MuAPI and image or video generation requests, and stays out of other turns", () => {
+ for (const text of ["use muapi to render this", "generate a video of a wave", "Make an image of a cat", "text to video please"]) {
+ expect(ids(text), text).toContain("muapi-media");
+ }
+ for (const text of ["summarise this thread", "fix the failing test", "chart revenue by month"]) {
+ expect(ids(text), text).not.toContain("muapi-media");
+ }
+ });
+
+ it("names the MCP endpoint and never asks for a key in the chat", () => {
+ const guide = skills.find((skill) => skill.manifest.id === "muapi-media")?.instructions ?? "";
+ expect(guide).toContain("https://api.muapi.ai/mcp");
+ expect(guide).toContain("Never ask for the key in the chat");
+ expect(guide).toContain("muapi_account_topup");
+ });
+ });