Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Outbound: placing a call, dialing and buying count as reaching someone
aivsomkar84b13621b220
diff --git a/shared/outbound.test.ts b/shared/outbound.test.tsindex cb622e05e7..a3ad3defbc 100644--- a/shared/outbound.test.ts+++ b/shared/outbound.test.ts@@ -25,6 +25,17 @@ describe("isOutboundTool", () => {"mcp__x__post","mcp__other__x_post","TWITTER_X_POST",+ // Placing a phone call reaches a person; buying a number moves money.+ "mcp__vapi__create_call",+ "mcp__agentphone__make_call",+ "mcp__agentphone__make_conversation_call",+ "mcp__agentphone__buy_number",+ "TWILIO_MAKE_CALL",+ "mcp__telnyx__dial",+ "mcp__shop__purchase_item",+ // A raw API call can place a call, send a text or buy a number.+ "mcp__telnyx__invoke_api_endpoint",+ "mcp__telnyx-2__invoke_api_endpoint",]) {expect(isOutboundTool(name), name).toBe(true);}@@ -52,6 +63,13 @@ describe("isOutboundTool", () => {"agents_x_post","x_post","mcp__agents__x_user_posts",+ "mcp__vapi__get_call",+ "mcp__vapi__list_calls",+ "mcp__vapi__create_assistant",+ "mcp__agentphone__end_call",+ "mcp__agentphone__list_numbers",+ "mcp__telnyx__list_api_endpoints",+ "mcp__telnyx__get_api_endpoint_schema","Bash","Read","Edit",diff --git a/shared/outbound.ts b/shared/outbound.tsindex 95f92681b5..4c9d9f8383 100644--- a/shared/outbound.ts+++ b/shared/outbound.ts@@ -34,12 +34,18 @@ const SEND_VERBS = new Set(["PAY","PAYOUT","TRANSFER",+ "BUY",+ "PURCHASE",+ "DIAL",]);/** Creating one of these is sending it: a created comment is a comment- * someone reads, a created invoice is one someone receives. */-const CREATE_VERBS = new Set(["CREATE", "CREATION", "ADD", "NEW"]);-const SENT_NOUNS = new Set(["MESSAGE", "COMMENT", "POST", "EMAIL", "MAIL", "INVOICE", "PAYMENT", "REFUND", "REPLY", "TWEET", "DM"]);+ * someone reads, a created invoice is one someone receives, a created call rings someone. */+const CREATE_VERBS = new Set(["CREATE", "CREATION", "ADD", "NEW", "MAKE"]);+const SENT_NOUNS = new Set(["MESSAGE", "COMMENT", "POST", "EMAIL", "MAIL", "INVOICE", "PAYMENT", "REFUND", "REPLY", "TWEET", "DM", "CALL"]);++/** Telnyx's hosted server reaches its whole API through one tool, so any call of it may ring, text or buy. */+const RAW_API_ACTION = /^mcp__.+__invoke_api_endpoint$/;/** A read verb first means the rest of the name is what is being read:* REDDIT_GET_POST fetches a post, it does not post. */@@ -92,7 +98,7 @@ const AGENTS_X_READS = /^(?:mcp__agents__|agents__|agents_)?x_(?:search|user_posexport function isOutboundTool(name: string): boolean {// A raw API call from the workbench can do anything an app tool can, and// nothing here can read which; it is treated as a send.- if (name === "COMPOSIO_PROXY_EXECUTE") return true;+ if (name === "COMPOSIO_PROXY_EXECUTE" || RAW_API_ACTION.test(name)) return true;if (AGENTS_X_READS.test(name)) return false;const tokens = actionTokens(name);if (tokens.length === 0) return false;