mirror of
https://github.com/stablyai/orca.git
synced 2026-09-23 00:02:29 +00:00
* 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
30 lines
930 B
TypeScript
30 lines
930 B
TypeScript
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
|
|
* pulling in that module's `ws`/`tweetnacl` value imports. Mobile reaches this
|
|
* type transitively (runtime-types → shared-control-types) and its typecheck
|
|
* has no Node-only deps installed.
|
|
*/
|
|
export class RemoteRuntimeClientError extends Error {
|
|
readonly code: string
|
|
readonly pairingStage?: RemoteRuntimePairingStage
|
|
readonly closeCode?: number
|
|
|
|
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
|
|
}
|
|
}
|