description: "Web Session-log ZIP export: Host streaming, the authenticated download route, the Session Header action, and the /export command."
English | 中文
dsh-session-log-export lets the Web interface download a session's full history: a Session log button in the Session Header and an /export slash command both hand the session tree — the session, its sub-sessions, and attachments — to the browser as a ZIP download. The package owns the Host archive stream, its authenticated Fetch route, and the browser controls and feedback. The browser chooses the download destination. Setup and usage come first; implementation details follow.
Use this package when the Web bundle should let users export a session log. It requires Connection, the command registry, Session query and persistence, and attachments. Mount the plugin, then click Session log in the Session Header or type /export; the browser downloads dsh-session-<id>.zip.
Choose it for a Web deployment that needs user-facing session export with a visible download dialog. Avoid it when a programmatic or Host-side export is needed: this package produces a browser download, not a Host path write. The logs are serialized from persistence read handles, so any mounted backend is supported.
- id: session-log-download
name: '@deepseek-ai/dsh-session-log-export'
The Web bundle mounts the package with Connection, dsh-commands, dsh-client-ui-commands, and dsh-client-ui-conversation.
| Field | Default | Meaning |
|---|---|---|
compressionLevel |
6 |
DEFLATE level from 0 through 9 for each ZIP entry. |
| Input | Result |
|---|---|
/export |
Records a human-command lifecycle; the submitting browser downloads GET /api/session.export?sessionId=<id>&includeDescendants=true |
/export <path> |
An error; browser downloads choose their destination through the browser's ordinary download behavior |
The dialog reports three phases: preparing, download started, or failed. Closing the dialog does not cancel an in-flight download, and the dialog does not reopen when that operation later settles. One session admits one active download at a time; repeated gestures share that operation. The export includes the live session's newest events: the host endpoint flushes a live root session before reading, so a slash-triggered ZIP includes the command/run and command/done pair that started the download; cold persisted sessions need no flush. Each logical log uses the current generation's canonical filename inside the archive (session.jsonl for v0, otherwise session.vN.jsonl), including beneath each sub-session directory. Images use media/<attachmentId>.<ext>, and generic files use files/<digest-prefix>/<digest>/<name>. Generic-file bytes are read and compressed as bounded chunks, so exporting a large upload does not buffer it in full.
The dialog shows a preparation error when the preflight fails before ZIP streaming starts — for example an unreachable or misconfigured host endpoint. A descendant or attachment read failure after the browser accepts the GET is reported by the browser download manager, not by the dialog.
Read these pages when the package-level contract is not enough. They move from the Web control to the host endpoint and the surrounding command and session surfaces.
/export command registers on./export./export controlNothing. /export stays on the human-command plane, and the ZIP download does not enter model history.
Zero. The command creates no model turn.
None. The log-only command lifecycle and browser download do not change the derived request prefix.
These limits define when this package is a poor fit or needs special operational care. They are current package constraints, not a task backlog.
Runtime invariant: No companion is published. Connection and the command registry own both registrations, while each export reads authoritative Session services.