feat(gateway): support per-channel and per-session queue policy overrides

This commit is contained in:
William Valentin
2026-02-16 11:51:26 -08:00
parent f7284a4ef1
commit fbd24d4379
11 changed files with 181 additions and 9 deletions
+19
View File
@@ -39,6 +39,25 @@ const laneQueueSchema = z.object({
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'),
/** 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(),
cap: z.number().min(1).max(1000).optional(),
overflow: z.enum(['drop_old', 'drop_new']).optional(),
}),
).default({}),
sessions: z.record(
z.string(),
z.object({
mode: z.enum(['collect', 'steer', 'interrupt']).optional(),
cap: z.number().min(1).max(1000).optional(),
overflow: z.enum(['drop_old', 'drop_new']).optional(),
}),
).default({}),
}).default({}),
}).default({});
const serverDiscoverySchema = z.object({