* feat(browser): generalize browser automation hosts Rename the browser automation client capability to a host-neutral payload, advertise supported commands, and route tab-scoped commands by browserId affinity so future browser hosts can register without another protocol shape change. * fix(browser): harden browser host registration Reject unusable browser host capabilities, clean up pending requests when a host registration is replaced, and defer list_tabs affinity updates until every host in the aggregation succeeds. * fix(browser): preserve host tab affinity across reconnects Keep stranded tab ownership tied to the disconnected host so the same host can reclaim open tabs after reconnect, and tolerate future command names in browser_host capability payloads while retaining only known commands.
18 lines
971 B
TypeScript
18 lines
971 B
TypeScript
export const CLIENT_CAPS = {
|
|
reasoningMergeEnum: "reasoning_merge_enum",
|
|
// COMPAT(customModeIcons): added in v0.1.84. Old clients pin AgentModeIcon to
|
|
// a closed enum and crash rendering unknown values; daemon downgrades icons
|
|
// outside the legacy set to "ShieldCheck" when this cap is absent. Drop the
|
|
// gate when floor >= v0.1.84.
|
|
customModeIcons: "custom_mode_icons",
|
|
// COMPAT(terminalReflowableSnapshot): added in v0.1.88. The daemon attaches
|
|
// per-row soft-wrap flags (gridWrapped/scrollbackWrapped) to terminal snapshots
|
|
// only when the client advertises this, so restored content can reflow on resize.
|
|
// Old clients use a strict TerminalState schema and would reject the extra fields.
|
|
// Drop the gate (always send the flags) when floor >= v0.1.88.
|
|
terminalReflowableSnapshot: "terminal_reflowable_snapshot",
|
|
browserHost: "browser_host",
|
|
} as const;
|
|
|
|
export type ClientCapability = (typeof CLIENT_CAPS)[keyof typeof CLIENT_CAPS];
|