Skip to content

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

Merge origin/main into train/nov24-m

milind-soni350771811c3a
diff --cc server/coordinator.ts
index 08b007ca75,c72161159f..1ea005f8f3
--- a/server/coordinator.ts
+++ b/server/coordinator.ts
@@@ -261,15 -261,10 +261,17 @@@ export interface CoordinatorOptions
legacyThreads?: LegacyThreadResolver;
/** After every write to the assignment store, so a host that ticks only when work is due can tick again. */
wrote?: () => void;
+ /** What a turn a restart cut ends with in place of starting again, or null (runtime/runtime.ts RuntimeOptions). */
+ restartCut?: (threadId: string, startedAt: number | undefined) => string | null;
}
+/** The outcome clause for the same-turn "finish your response" answer about an assignment this turn handed out, from its
+ * reply mode — the same wording the coordinate_bots receipt gives. */
+export const sameTurnReturns = (reply: Reply | undefined): string =>
+ reply === "none" ? "nothing comes back from it"
+ : reply === "poll" ? "read its result with assignment_status"
+ : "its result returns to this conversation and resumes you";
+
export function createCoordinator(options: CoordinatorOptions): Coordinator {
return new RuntimeCoordinator(options);
}