feat(gateway): complete openclaw phase1 queue parity v2

This commit is contained in:
William Valentin
2026-02-16 12:04:33 -08:00
parent 78da226542
commit 813a0dc5c5
19 changed files with 678 additions and 53 deletions
+11 -3
View File
@@ -34,27 +34,35 @@ const wsRateLimitSchema = z.object({
const laneQueueSchema = z.object({
/** Queue behavior for concurrent requests in the same session lane. */
mode: z.enum(['collect', 'steer', 'interrupt']).default('collect'),
mode: z.enum(['collect', 'followup', 'steer', 'steer_backlog', 'interrupt']).default('collect'),
/** Max queued (pending) requests per lane. */
cap: z.number().min(1).max(1000).default(50),
/** Overflow strategy when cap is reached. */
overflow: z.enum(['drop_old', 'drop_new']).default('drop_old'),
/** Debounce window before starting next queued request (ms). */
debounce_ms: z.number().min(0).max(60_000).default(0),
/** Include contextual summary details in overflow rejections. */
summarize_overflow: z.boolean().default(true),
/** Optional per-channel/per-session queue policy overrides. */
overrides: z.object({
channels: z.record(
z.string(),
z.object({
mode: z.enum(['collect', 'steer', 'interrupt']).optional(),
mode: z.enum(['collect', 'followup', 'steer', 'steer_backlog', 'interrupt']).optional(),
cap: z.number().min(1).max(1000).optional(),
overflow: z.enum(['drop_old', 'drop_new']).optional(),
debounce_ms: z.number().min(0).max(60_000).optional(),
summarize_overflow: z.boolean().optional(),
}),
).default({}),
sessions: z.record(
z.string(),
z.object({
mode: z.enum(['collect', 'steer', 'interrupt']).optional(),
mode: z.enum(['collect', 'followup', 'steer', 'steer_backlog', 'interrupt']).optional(),
cap: z.number().min(1).max(1000).optional(),
overflow: z.enum(['drop_old', 'drop_new']).optional(),
debounce_ms: z.number().min(0).max(60_000).optional(),
summarize_overflow: z.boolean().optional(),
}),
).default({}),
}).default({}),