refactor(api): converge the Remote failure vocabulary and client surface

Single RemoteError with a merge-extensible, domain-prefixed code map;
owners throw at the failure point; streams surface marked failures;
clients consume ctx.remote directly with isRemoteFailure as the only
discrimination point and construct no failure instances.
This commit is contained in:
imccyu
2026-08-28 22:37:36 +08:00
parent 12d7b4ed0c
commit 804b1ffbfc
252 changed files with 3182 additions and 3832 deletions
+7
View File
@@ -415,3 +415,10 @@ export type SessionEvent<T extends SessionEventType = SessionEventType> = {
surfaceOp?: SurfaceOp
} : object)
}[T]
declare module '@deepseek-ai/dsh-typert-protocol' {
interface RemoteErrorDetailsMap {
/** The named Session does not exist; produced by every layer that resolves a SessionId. */
'session/not-found': { readonly sessionId: SessionId }
}
}