Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
test(skills): give the two new cases the state their routes read
milind-soni729c79cf2d74
diff --git a/server/imported-skills.test.ts b/server/imported-skills.test.tsindex 3f76340493..f833a2fd1d 100644--- a/server/imported-skills.test.ts+++ b/server/imported-skills.test.ts@@ -173,7 +173,7 @@ describe("skills brought in from this computer", () => {installSkill(bot, "mine", [{ path: "SKILL.md", content: skillMd("zeta-own", "My own.") }]);setSkillEnabled(bot, "zeta-own", true);const host = createSkillsLibraryHost({- store: { bot: () => undefined, messagesFor: () => [] } as unknown as Store,+ store: { bot: () => undefined, messagesFor: () => [], taskByThread: () => undefined } as unknown as Store,cfg: {} as AppConfig,appendSkillRequestCard: () => ({ requestId: "", summary: "" }),});diff --git a/server/routes/bot-messages.test.ts b/server/routes/bot-messages.test.tsindex 5ecd62818b..092c7b5e1a 100644--- a/server/routes/bot-messages.test.ts+++ b/server/routes/bot-messages.test.ts@@ -173,10 +173,11 @@ describe("POST /api/bots/:id/messages and who typed it", () => {});it("takes neither a press, whose words the widget wrote, nor a relay as a person's", async () => {- const { store, threadId, post, show } = await fixture();+ const { store, bot, threadId, post, show } = await fixture();const pressed = await post({ threadId, sendId: SEND, text: words, widgetAction: { messageId: show("routineForm"), ref: "confirm", values: { days: "mon,tue,wed,thu,fri,sat,sun", report: "discord:releases" } } });expect(pressed.status, JSON.stringify(pressed.body)).toBe(202);expect(typedWords(threadId, [pressed.body.message])).toBe("");+ store.patchBot(bot.id, { approvalMode: "ask", autoApprove: false });const relayed = await post({ threadId, sendId: OTHER_SEND, text: words, expectedActiveLeafId: store.activeLeaf(threadId), expectedApprovalMode: "ask" }, "/guarded");expect(relayed.status, JSON.stringify(relayed.body)).toBe(202);expect(typedWords(threadId, [relayed.body.message])).toBe("");