diff --git a/docs/configuration.md b/docs/configuration.md index 091a2deb3..6af56b2a0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -93,7 +93,7 @@ Controls how inbound messages behave when an agent run is already active. { routing: { queue: { - mode: "interrupt", // global default: queue | interrupt | drop + mode: "interrupt", // global default: queue | interrupt bySurface: { whatsapp: "interrupt", telegram: "interrupt", diff --git a/docs/queue.md b/docs/queue.md index 05ce67465..4f8d1083d 100644 --- a/docs/queue.md +++ b/docs/queue.md @@ -22,7 +22,6 @@ We now serialize command-based auto-replies (WhatsApp Web listener) through a ti Inbound messages can either queue or interrupt when a run is already active: - `queue`: serialize per session; if the agent is streaming, the new message is appended to the current run. - `interrupt`: abort the active run for that session, then run the newest message. -- `drop`: ignore the message if the session lane is busy. Defaults (when unset in config): - WhatsApp + Telegram → `interrupt` diff --git a/src/auto-reply/reply.ts b/src/auto-reply/reply.ts index 26fb0c864..6a04cae7e 100644 --- a/src/auto-reply/reply.ts +++ b/src/auto-reply/reply.ts @@ -70,7 +70,7 @@ const SYSTEM_MARK = "⚙️"; const BARE_SESSION_RESET_PROMPT = "A new session was started via /new or /reset. Say hi briefly (1-2 sentences) and ask what the user wants to do next. Do not mention internal steps, files, tools, or reasoning."; -type QueueMode = "queue" | "interrupt" | "drop"; +type QueueMode = "queue" | "interrupt"; export function extractThinkDirective(body?: string): { cleaned: string; @@ -123,7 +123,6 @@ function normalizeQueueMode(raw?: string): QueueMode | undefined { if (cleaned === "queue" || cleaned === "queued") return "queue"; if (cleaned === "interrupt" || cleaned === "interrupts" || cleaned === "abort") return "interrupt"; - if (cleaned === "drop" || cleaned === "discard") return "drop"; return undefined; } @@ -589,7 +588,7 @@ export async function getReplyFromConfig( if (hasQueueDirective && !inlineQueueMode && !inlineQueueReset) { cleanupTyping(); return { - text: `Unrecognized queue mode "${rawQueueMode ?? ""}". Valid modes: queue, interrupt, drop.`, + text: `Unrecognized queue mode "${rawQueueMode ?? ""}". Valid modes: queue, interrupt.`, }; } @@ -1107,13 +1106,6 @@ export async function getReplyFromConfig( sessionKey ?? sessionIdFinal, ); const laneSize = getQueueSize(sessionLaneKey); - if (resolvedQueueMode === "drop" && laneSize > 0) { - logVerbose( - `Dropping inbound message for ${sessionLaneKey} (queue busy, mode=drop)`, - ); - cleanupTyping(); - return undefined; - } if (resolvedQueueMode === "interrupt" && laneSize > 0) { const cleared = clearCommandLane(sessionLaneKey); const aborted = abortEmbeddedPiRun(sessionIdFinal); diff --git a/src/config/config.ts b/src/config/config.ts index 4602709da..9fbf905ac 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -147,7 +147,7 @@ export type DiscordConfig = { mediaMaxMb?: number; }; -export type QueueMode = "queue" | "interrupt" | "drop"; +export type QueueMode = "queue" | "interrupt"; export type QueueModeBySurface = { whatsapp?: QueueMode; @@ -454,11 +454,7 @@ const GroupChatSchema = z }) .optional(); -const QueueModeSchema = z.union([ - z.literal("queue"), - z.literal("interrupt"), - z.literal("drop"), -]); +const QueueModeSchema = z.union([z.literal("queue"), z.literal("interrupt")]); const QueueModeBySurfaceSchema = z .object({ diff --git a/src/config/sessions.ts b/src/config/sessions.ts index 8b8871b45..fc586c320 100644 --- a/src/config/sessions.ts +++ b/src/config/sessions.ts @@ -21,7 +21,7 @@ export type SessionEntry = { modelOverride?: string; groupActivation?: "mention" | "always"; groupActivationNeedsSystemIntro?: boolean; - queueMode?: "queue" | "interrupt" | "drop"; + queueMode?: "queue" | "interrupt"; inputTokens?: number; outputTokens?: number; totalTokens?: number;