/** * Stable marker for "the transport never accepted this frame". * * A submission that failed on the wire is still the user's text, so the host * puts it back in the editor. Deciding that from error messages cannot work: * the writer forwards whatever the stream callback produced — `write EPIPE`, * `Cannot call write after a stream was destroyed`, `ERR_STREAM_WRITE_AFTER_END` * — and Node documents `error.message` as free to change in any release. The * transport boundary already knows the answer, so it says so here. * * The marker is additive on purpose. Native errors keep their identity, their * `instanceof`, and their `code`/`errno`/`syscall` fields, because `RpcClient` * rejections are public and callers already inspect them. */ export interface RpcTransportFailure extends Error { readonly rpcFailureKind: "transport"; } export declare function isRpcTransportFailure(error: unknown): error is RpcTransportFailure; /** * Mark a failure as a transport failure, preserving the original error. * * Idempotent, so every boundary on the way out can call it. A value that is not * an extensible `Error` — a frozen error, a thrown string — is wrapped, with the * original kept as `cause` and a string `code` copied across so callers that * branch on `code` still work. */ export declare function markRpcTransportFailure(error: unknown): RpcTransportFailure; /** Build an already-classified transport failure. */ export declare function rpcTransportError(message: string): RpcTransportFailure; /** * A transport failure for a request the child had already taken ownership of. * * The frame reached the engine and its handler started, so side effects may * already have happened: the submission is no longer the user's to retype, and * restoring it would invite a duplicate run. */ export interface RpcAcceptedRequestFailure extends RpcTransportFailure { readonly rpcRequestAccepted: true; } export declare function isRpcRequestAcceptedFailure(error: unknown): error is RpcAcceptedRequestFailure; /** * Per-request copy of a transport failure, marked as accepted. * * A copy rather than a mutation: one engine exit rejects every pending request * at once and only some of them were accepted. Native `code`, `errno`, and * `syscall` are carried over and the original is kept as `cause`. */ export declare function asAcceptedRequestFailure(error: Error): RpcAcceptedRequestFailure; //# sourceMappingURL=rpc-transport-error.d.ts.map