Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Hand-offs: the crossed-request words sit beside the other notes, away from the constants other work adds
milind-soni7562b4533c1a
diff --git a/server/runtime-coordinator.ts b/server/runtime-coordinator.tsindex 93ab7afd37..5862a38c57 100644--- a/server/runtime-coordinator.ts+++ b/server/runtime-coordinator.ts@@ -19,13 +19,6 @@ const ROOM_ANCESTOR = "A room request cannot return to an ancestor room; resultsconst DEPTH = "Room handoff depth limit reached";const BUDGET = "Room handoff budget exhausted";const NO_TURN = "The requesting turn has no root (no turn)";-/** A request back to a bot that waits on the asker's answer would leave each waiting on the other, as two bots did on a real- * day, each then working the same problem with its own plan. The ancestor rule covers this within one request; this covers- * two requests. The waiting request's words are not repeated: it may come from another person's private chat. */-const crossed = (asker: string, request: Assignment): string => `@${asker} is already waiting on you: it handed you a request (assignment ${- request.id}), and ${request.status === "queued" ? "that has not reached you yet" : request.status === "running" ? "you are answering it in another conversation now"- : "you have not finished it yet"}. Asking @${asker} for something now would leave each of you waiting on the other, so this was not sent. Answer the person here from what you know; @${- asker}'s request reaches you in its own thread, and your answer there goes back to it. Once @${asker} has that answer, you can ask it again.`;const BRIEF_MAX = 12_000;const RUNTIME_DEPTH = /^Assignment depth limit reached/;@@ -120,6 +113,14 @@ function announcingWrites(store: RuntimeStore, wrote: () => void): RuntimeStoremarkDelivered: announced(store.markDelivered), prune: announced(store.prune) };}+/** A request back to a bot that waits on the asker's answer would leave each waiting on the other, as two bots did on a real+ * day, each then working the same problem with its own plan. The ancestor rule covers this within one request; this covers+ * two requests. The waiting request's words are not repeated: it may come from another person's private chat. */+const crossed = (asker: string, request: Assignment): string => `@${asker} is already waiting on you: it handed you a request (assignment ${+ request.id}), and ${request.status === "queued" ? "that has not reached you yet" : request.status === "running" ? "you are answering it in another conversation now"+ : "you have not finished it yet"}. Asking @${asker} for something now would leave each of you waiting on the other, so this was not sent. Answer the person here from what you know; @${+ asker}'s request reaches you in its own thread, and your answer there goes back to it. Once @${asker} has that answer, you can ask it again.`;+/** How often a request that joined another looks at it. */const JOIN_POLL_MS = 1_000;const JOINED_NOTE = "Another teammate asked this a moment ago, so it was answered once, for both of you:";