Skip to content

feat(plugin-export): pack and download a profile plugin as a tarball - #184

Merged
KeepLost merged 3 commits into
masterfrom
dev
Oct 12, 2026
Merged

KeepLost merged 3 commits into
masterfrom
dev

Conversation

@KeepLost

Copy link
Copy Markdown
Owner

Summary

  • dsh plugin --profile <name> export <package> [--out <dir>] packs a profile dependency into a tarball via pnpm pack (source directory preferred for link:/file: installs, installed copy otherwise); export-manifest prints the packable set as JSON. Shared core lives in @deepseek-ai/dsh-app-boot (plugin-export.ts) so CLI and host use one implementation.
  • Host serves the same tarball at GET/HEAD /api/plugin.export?package=<name> under the harniverse.administer capability: temp-dir pack, streamed download with a size ceiling (pluginExportMaxBytes, default 128 MiB → 413), cleanup on close/abort, and errors that never echo host paths.
  • Settings → Plugins gains an export button per module (busy/done/error status) driving the browser downloads manager.
  • Docs: apiproxy/app-boot/ui-settings-plugin-inventory README pairs, publish guide section, api-catalog + config-catalog (bilingual), Agent Note (en/zh).

Test plan

  • app-boot plugin-export.spec.ts — spec classification, source resolution, pack runner (fake spawner), 15 tests
  • CLI plugin-export.spec.ts — real pnpm pack integration, arg validation, provenance, manifest JSON, 11 tests
  • apiproxy plugin-export.spec.ts — download happy path, ceiling 413, abort/cleanup, no-dependencies 404, schema rejections; rpc-map capability row; session-export config defaults updated
  • UI components/browser-plugin specs — export progress, bare rejection, concurrent gesture, download handoff, HTTP error detail, hostBase arms
  • 100% statements/branches on the five touched src files; tsc host/client/cli; repo oxlint on changed files; knip; jscpd 0.50%; full build; test:gui 6869 passed; DSH_SNAPSHOT=replay web e2e 95 files / 344 passed (hmr-live excluded locally — known cold-start-only limitation, green in CI)

Add `dsh plugin --profile <name> export <package> [--out <dir>]` and
`dsh plugin --profile <name> export-manifest [--out <file>]`, backed by a
new app-boot core (dependency-spec classification, source resolution,
`pnpm pack` runner) so CLI and host share one implementation.

Serve the same tarball over HTTP via GET/HEAD /api/plugin.export
(`harniverse.administer` capability): streams the pack output with a
size ceiling (pluginExportMaxBytes, default 128 MiB), cleans its temp
directory on close/abort, and never echoes host paths in errors.

Add the Settings > Plugins export button (per-module busy/done/error
status) using the downloads manager, and document the feature across
the apiproxy/app-boot/ui READMEs, publish guide, API and config
catalogs, with a bilingual Agent Note.
Regenerate the Cordis catalog artifact and the module graph after the
DownloadsApi surface change, document the exported `PluginPackResult`
type and `pluginExportProfileDir` params, and reflow the bilingual
Agent Note to the required header and one-paragraph-per-line format.
Mirror the apiproxy -> app-boot edge and dependency-table row into the
Chinese module graph, and re-record the note and graph pair states
after the Agent Note reflow.
@KeepLost
KeepLost merged commit f531aae into master Oct 12, 2026
50 of 51 checks passed
@KeepLost
KeepLost deleted the dev branch October 12, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant