fix: make remote server pairing failures actionable (#11510)

* fix: make remote server pairing failures actionable

* refactor: extract daemon router event types

* fix: address remote pairing review findings

* fix: address final remote pairing review feedback
This commit is contained in:
Jinjing
2026-07-30 00:31:34 -07:00
committed by GitHub
parent 191fdf2ae6
commit a60aa85592
48 changed files with 3389 additions and 522 deletions
+14 -1
View File
@@ -1,3 +1,5 @@
export type RemoteRuntimePairingStage = 'connect' | 'host-identity' | 'access-grant' | 'runtime'
/**
* Error type for the remote-runtime client, split out from
* `remote-runtime-client.ts` so type-only consumers can reference it without
@@ -7,10 +9,21 @@
*/
export class RemoteRuntimeClientError extends Error {
readonly code: string
readonly pairingStage?: RemoteRuntimePairingStage
readonly closeCode?: number
constructor(code: string, message: string) {
constructor(
code: string,
message: string,
details?: {
pairingStage?: RemoteRuntimePairingStage
closeCode?: number
}
) {
super(message)
this.name = 'RemoteRuntimeClientError'
this.code = code
this.pairingStage = details?.pairingStage
this.closeCode = details?.closeCode
}
}