Treat agent mode icons as open strings

Old clients pinned AgentModeIcon to a closed enum and rendered
undefined for unknown values, crashing the route in production
Hermes with no stack trace. Loosen the type to a plain string,
let the client skip rendering when an icon is unregistered, and
add the customModeIcons capability so the daemon downgrades
non-legacy icons to ShieldCheck for clients that pre-date the
open-string contract.
This commit is contained in:
Mohamed Boudra
2026-05-27 09:30:50 +07:00
parent a5b82d2a3b
commit 4911b627f2
6 changed files with 62 additions and 17 deletions
+1
View File
@@ -4053,6 +4053,7 @@ export const WSHelloMessageSchema = z.object({
voice: z.boolean().optional(),
pushNotifications: z.boolean().optional(),
[CLIENT_CAPS.reasoningMergeEnum]: z.boolean().optional(),
[CLIENT_CAPS.customModeIcons]: z.boolean().optional(),
})
.passthrough()
.optional(),