mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Streams one ZIP of the root session artifact plus each subagent descendant verbatim (the persistence readRaw bytes) from GET /api/session.export as a host-only download — no wire envelope, absent from IApiClient. The downloads domain owns the query schema, the fetch handler answers the GET alongside the SSE routes, and compression runs on the host with fflate's streaming Zip API.
26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
/**
|
|
* downloads domain contract: host-only download surfaces — the GET-download
|
|
* channel family, the mirror of the SSE-stream `events` domain. No wire
|
|
* envelope: the carrier's GET routes answer these directly, and the browser
|
|
* `IApiClient` never exposes them.
|
|
*/
|
|
|
|
import type { SessionId } from '@deepseek-ai/dsh-session/types'
|
|
|
|
/** Host-only download surfaces (no wire envelope; absent from IApiClient). */
|
|
export interface DownloadsApi {
|
|
/**
|
|
* Stream one session-log ZIP — the root artifact verbatim plus each subagent
|
|
* descendant's — as an attachment response. The carrier's GET route answers
|
|
* this directly; the browser never calls it.
|
|
* @param request - the root session id and whether to include descendants.
|
|
* @param signal - cancellation for the underlying reads.
|
|
* @returns the ZIP attachment response; missing services answer 500 and a
|
|
* missing root session 404 before any byte is produced.
|
|
*/
|
|
sessionLog(
|
|
request: { sessionId: SessionId; includeDescendants?: boolean },
|
|
signal: AbortSignal,
|
|
): Promise<Response>
|
|
}
|