Skip to content

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

Merge remote-tracking branch 'origin/fix/grok-acp-signals' into train/grok-acp

milind-soni3c4258094c7d
diff --cc server/engine-memory.ts
index db04c99bbf,332be6377e..e8c46127ce
--- a/server/engine-memory.ts
+++ b/server/engine-memory.ts
@@@ -240,10 -217,10 +240,10 @@@ export class EngineMemory
private readonly engines = new Map<number, Engine>();
private readonly active = new Set<string>();
/** Threads admitted in the last RESERVE_MS: when, and what they were let in for. */
- private readonly reserved = new Map<string, { at: number; start: "process" | "session"; browser: boolean; browserSince?: number }>();
+ private readonly reserved = new Map<string, { at: number; start: "process" | "session"; tasks: number; browser: boolean; browserSince?: number }>();
private readonly queue: Waiter[] = [];
/** Threads whose engine was stopped for memory: how many tasks ran then, and whether their browser was running. */
- private readonly stops = new Map<string, { count: number; browser: boolean }>();
+ private readonly stops = new Map<string, { count: number; browser: boolean; only?: true }>();
/** Threads whose turn could not run its engine for want of room: the code its failure names, and whether the engine's own
* spawn was refused (a later spawn in the same turn that works clears that) or the engine was stopped as silent. */
private readonly starved = new Map<string, { code: ShortageCode; why: "refused" | "silent" }>();