Skip to main content

pilot-harness/packages/session-query/session-log-export

240Stars13Forks16Issues1Watchers

Provides an `/export` slash command and session header button for DSH web, downloading the current Session as a ZIP file containing sub-sessions and attachments.

Evidence4/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki

ⓘ This plugin is a sub-package of the op7418/pilot-harness monorepo — stars and activity count the whole repository.

Language
TypeScript
License
MIT
Branch
main
ai-agentcodepilotdeepseekdeepseek-harnessdesktop-appdshdsh-pluginelectron

Install

cmdweb profile
$ dsh plugin --profile web add github:op7418/pilot-harness#path:packages/session-query/session-log-export

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin op7418/pilot-harness/packages/session-query/session-log-export for me: review the repository at https://github.com/op7418/pilot-harness first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Sentence Positioning

Provides one-click Session log download for DSH Web: adds an "Export Logs" button in the session header and recognizes the /export slash command in conversations, triggering the browser to download a ZIP file containing the current Session, sub-sessions, and attachments.

Core Capabilities

  • Register the /export slash command and route the user's download intent to the browser-side download controller
  • Render a 111×32 "Export Logs" button in the session header toolbar, sharing the same download flow with the slash command
  • Automatically perform HEAD pre-check to confirm Host-side /api/session.export availability before handing over to browser download manager, avoiding mid-download interruptions
  • Display three states via unified popup: "Preparing / Download Started / Failed"
  • Only one download per Session allowed at a time; repeated clicks reuse the same in-progress download operation
  • Plugin disposal cancels all pending pre-check requests

Technical Implementation

  • Language: TypeScript (with React 18 browser-side components)
  • Key Dependencies: @deepseek-ai/dsh-commands (register /export slash command), @deepseek-ai/dsh-client-ui-trajectory (toolbar slot), @deepseek-ai/dsh-client-runtime (session snapshot storage), @deepseek-ai/dsh-client-ui-primitives (buttons, icons, dialogs)
  • Architecture Pattern: Dual-sided plugin—Host side registers /export command and triggers command/executed event; Browser side subscribes to this event and drives the download controller; actual ZIP generation is owned by the host-side dsh-host-apiproxy
  • Entry Files: src/index.ts (Host side command registration), src/client/index.ts (Browser side download controller and slot injection)

Use Cases

Suitable for users who need to share a complete AI assistant conversation (including sub-tasks, attachments, command history) with colleagues, archive it for records, or upload it to a ticket system. Click Export to get a fully extractable ZIP without manually copying conversation content.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DSH0.1.0-rc.7Web bundle only; requires dsh-host-apiproxy (provides ZIP endpoint), dsh-commands, dsh-client-ui-commands, dsh-client-ui-trajectory to be installed simultaneously
Node.js>=22.19.0Follows the host root package package.json engines.node version requirement
PlatformCross-platformRuns on browser side, no native modules, relies on host's persistent backend

Installation

dsh plugin --profile web add github:op7418/pilot-harness/packages/session-query/session-log-export

Configuration

No additional configuration required. After installing to Web profile and restarting, the "Export Logs" button will appear in the session header, and the /export command will be recognized in conversations.

FAQ

Q: How do I download a Session's logs?

A: Click the "Export Logs" button on the right side of the session header in the browser interface, or type /export in the conversation and send it—both will trigger a ZIP file download.

Q: What's included in the ZIP package?

A: Contains the current Session, all sub-sessions, and attachments. ZIP generation, streaming reads, and error handling are completed by the backend's dsh-host-apiproxy; this plugin only initiates the download.

Q: Can I download the same Session multiple times simultaneously?

A: No. Each Session allows only one download at a time. Repeated button clicks or repeated /export commands will reuse the same in-progress download operation and won't start a new download.

Q: Does it support SQLite backend Session export?

A: Currently not supported. The download endpoint requires the persistent backend to provide raw artifacts by Session; the accompanying JSONL backend supports plaintext and zstd artifacts; SQLite export is out of scope for this release.

Q: What happens if the download fails?

A: Failures discovered before download starts (during HEAD pre-check) are reported via the plugin's popup with error messages; failures that occur after the browser has received the download request are handled by the browser's own download manager and won't trigger the plugin's popup.

Q: Does closing the popup cancel an in-progress download?

A: No. Closing the popup only closes the UI and won't cancel the browser's in-progress download; the popup won't reappear after the operation completes.

Q: How do I uninstall it?

A: Run dsh plugin --profile web remove @deepseek-ai/dsh-session-log-export, then restart the Web profile.

Difficulty Level

Beginner — Plug-and-play with no additional configuration required; adds one button + one slash command to the interface, with all interaction logic handled on the browser side.

Known Issues and Limitations

  • Only Web bundle available; does not affect CLI, ACP, or other profiles.
  • Depends on persistent backend providing raw artifacts by Session; SQLite backend export not currently implemented.
  • Download target is local browser; target path is determined by the browser, unable to specify Host-side path or invoke native folder picker.
  • HEAD pre-check only reports errors before ZIP streaming starts; after browser receives download, sub-session or attachment read failures are提示 by the browser's download manager and won't be displayed via the plugin's popup.

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/op7418/pilot-harness/packages/session-query/session-log-export)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory