fix(server): bound stale websocket connections

Track application ownership per physical socket and terminate abandoned or backpressured transports without disrupting replacement connections.
This commit is contained in:
Mohamed Boudra
2026-07-17 19:39:45 +00:00
parent a1de743ef6
commit 5feaa01dc2
13 changed files with 735 additions and 75 deletions
@@ -664,6 +664,7 @@ test("advertises client capabilities in hello", async () => {
clientType: "cli",
protocolVersion: 1,
capabilities: {
application_socket_lease: true,
custom_mode_icons: true,
project_updates: true,
provider_subagents: true,
+1
View File
@@ -5151,6 +5151,7 @@ export class DaemonClient {
[CLIENT_CAPS.providerSubagents]: true,
[CLIENT_CAPS.projectUpdates]: true,
...this.config.capabilities,
[CLIENT_CAPS.applicationSocketLease]: true,
},
...(this.config.appVersion ? { appVersion: this.config.appVersion } : {}),
}),