/** * The slice of the Client Remote this package calls: the generated * `workspaceFiles` methods by name, and the stream supervisor structurally, so * the feed and the provider are testable against a scripted face. */ import type { ClientRemote } from '@deepseek-ai/dsh-api-gateway/client'; /** One item of a supervised stream; `accept` marks the delivering generation as healthy. */ export interface SupervisedStreamItem { /** The decoded frame. */ readonly value: Item; /** Reset the reconnect backoff: this generation is delivering. */ accept(): void; } /** A reconnecting single-consumer stream the Remote supervises. */ export interface SupervisedStream extends AsyncIterable> { /** * Stop the stream for good. * @returns once the active generation and the consumer iterator are closed. */ dispose(): Promise; } /** What one supervised stream needs from its owner. */ export interface SupervisedStreamOptions { /** Diagnostic owner name. */ readonly name: string; /** Open one physical generation; `signal` aborts it. */ readonly open: (signal: AbortSignal) => AsyncIterable; /** The error a generation's normal end amounts to; a carrier error asks for a reopen, anything else is terminal. */ readonly ended: (accepted: boolean) => Error; } /** The `workspaceFiles` namespace methods this package calls, as the generated Remote declares them. */ export type WorkspaceFilesNamespace = Pick; /** The Client Remote as this package sees it. */ export interface WorkspaceFilesRemote { /** * Create one reconnecting stream. * @param options - opener and end classification. * @returns the supervised stream, unstarted until iterated. */ $stream(options: SupervisedStreamOptions): SupervisedStream; /** The `workspaceFiles` namespace. */ readonly workspaceFiles: WorkspaceFilesNamespace; } //# sourceMappingURL=remote.d.ts.map