* feat(release): publish package source, declaration maps, and documentation Every release member publishes its TypeScript source and the declaration maps that resolve into it, and @deepseek-ai/dsh publishes the repository Markdown documentation staged from docs/ at prepack time. The ./src/* export most members already declared now resolves for an installed consumer, and a consumer editor follows a declaration to the implementation. Bundled JavaScript maps stay unpublished; the vendored family and the Desktop runtime file policy are unchanged. Rationale: .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md * feat(release): publish JavaScript maps and compress bundles Every emitted JavaScript map ships beside the bundle it describes, and the workspace build and the client preset compress bundles without mangling identifiers. The documentation payload now mirrors the website publication manifest and is removed again by `postpack`; Desktop and the Python executable exclude the published source, documentation, and maps; `clean` removes a staged copy. Typert's publication contract gains the Remote declaration map. * fix(release): keep node bundles readable for the worker image The browser worker image lowers `yield*` only as a whole statement and rewrites `for await` loops by their source layout, so compressed node-side entries either fail that lowering or lower to unparseable code. Only the browser bundles keep compression, which removes about a third of their text. The bundle-purity assertion now matches the module-loader call regardless of the quote style compression picks, and the release-pack fixture exercises the installed package's new documentation requirement. * feat(release): publish the whole documentation tree `@deepseek-ai/dsh` copies `docs/` in full instead of the website's page set: the maintainer documents, the generated migration records, the translation guidelines, and the `*.i18n.yaml` consistency records ship with the installed package, so the documentation's own links resolve without a checkout. * feat(release): publish the upgrade guides with the documentation The staged documentation keeps the website's page set and adds every `docs/upgrade-guide/` document, which is what an installed reader consults when a released change breaks something. The rest of the maintainer tree stays out. * test(release): expect source and maps in master's new payload cases * feat(release): keep installed docs and source readable in Desktop Desktop keeps the published src/ and docs/ trees inside app.asar, and every model shell call receives DSH_INSTALL_DIR and DSH_NODE_EXECUTABLE so an agent can read them through Electron's Node mode. Staging also generates docs/upgrade-guide/README.md, an index of the upgrade guides grouped by the release they upgrade from. Minified client bundles print string literals with backticks: the worker image packer now recognizes those chunk requests, client license banners are prepended after minification so their text survives, and the affected artifact tests accept either quote. * test(desktop): read archived docs through the Windows PowerShell form Regenerate the config catalog for the shifted shell-env source line. * test(desktop): wait for the GUI-subsystem Electron process from PowerShell * build(release): publish source and maps from the message-quotes package * build(release): publish source and maps from packages new on master * build(release): publish source and maps from the tool-office package
description, kind
| description | kind |
|---|---|
| Browser-worker VFS image packaging for maintainers building or debugging the experimental preview deployment. | package-library |
@deepseek-ai/dsh-experimental-webworker-packer
English | 中文
Summary
The VFS image packer: turns one shipped profile's bundles and the installation's optional bundles into the gzip-compressed base tar the browser worker mounts as its filesystem, one archive per lazily loaded page chunk, and opaque data trees into ordered overlay tars (experimental group). Nothing is compiled from source — the base image carries the repository's real build products, so a preview deployment debugs exactly what the served deployment ships. Read this page when packaging a preview image or diagnosing its contents.
Table of Contents
Use this package
The public npm package exposes packVfsImage and packVfsOverlay through its library entry. Callers supply the profile name, the package roster, the installation manifest, package directories, and the resolution root; no profile layer is installed and no composed configuration is packed — the worker composes the bundle layers at boot. An optional homePatch is written to home/cordis.patch.yml, the home layer the image's app-boot reads. The runtime's library entry supplies the module-proxy and replacement tables used during packing.
The packer owns the internal dsh.configTrees declaration, its validation, and source directory resolution in src/repository.ts. This field is not part of the public plugin manifest API.
The pack is a three-layer standard stack:
- Roster — the shipped profile template's bundles and every bundle in
OPTIONAL_BUNDLESfromdsh-official-bundles, each resolved from the CLI manifest as the launcher resolves it, plus every package their patch files name (insert lists and grouped rows included), plus the rows of every config tree the CLI declares in itspackage.jsondsh.configTrees, materialized as a Node-style dependency closure. External peer edges never bind the worker; workspace peers stay on the chain. The CLI manifest itself enters the image alone atnode_modules/@deepseek-ai/dsh/package.json, as the worker's bundle resolution anchor; the manifest records its name and the profile. - Publish view — each workspace or vendored package contributes its built npm slice (
filesthrough picomatch) without source or workspacedist/. External packages retain published JavaScript under bothsrc/anddist/because theirmainorexportsmay point there; only generic test, map, declaration, and archive exclusions apply. - Reachability sweep — the runtime loader's own resolution walks from every non-wildcard workspace runtime export plus the worker assembly's seeds (
IMAGE_ENTRY_SEEDS), lowering each reached module to the wrapper contract at pack time. Declaration-only condition trees do not seed the sweep; runtime requests for those exports still fail. The transform reports statically named imports, re-exports, and dynamic imports; calls throughrequire; and module-scope direct calls of the formcreateRequire(import.meta.url)('pkg')through a named import fromnode:moduleormodule, including an import alias. Page assets (lib/client.jsbehind./clientexports) ship verbatim; an unresolvable request from our own code fails the pack, third-party ones are tolerated to fail loud at require time. - Lazy chunks — every page chunk a page asset requests as a literal
require.async("./client.<name>.js"), the only form the dynamic Client build emits, leaves the base image unless a./clientexport names it. Each becomes its own deterministic archive namedlazy/<sha256 of the archive>.tar.gzbeside the base image, and the manifest registers its path, size, and archive for the worker's lazy filesystem. A request for a chunk the package does not publish fails the pack.
repository.ts owns the repo-shaped inputs (workspace scan of vendor/, packages/, native/system/packages/, and apps/; the profile roster through the shipped templates and optional-bundle list of dsh-official-bundles and app-boot's bundle patch readers; the CLI manifest as the installation; the home patch, which sets the runtime's PLATFORM_ENTRY_CONFIG fields over each named row's config composed from the template's bundle layers); pack.ts owns none of them, so the same library packs a different tree by being called differently. The native scan makes the Landlock entry package an ordinary published-view dependency while its executable remains a Worker platform implementation. The CLI is dsh-pack-vfs-image --out <file> [--profile web]; it writes the lazy archives beside the base image, and apps/web's build:preview runs it after the preview shell build.
The repository adapter also declares the preview-only fixture trees under webworker-runtime/tests/fixtures/. The CLI packs each named fixture into a separate deterministic overlay archive plus a browser-readable manifest. Overlay files bypass npm publish-view and module-reachability exclusions, so dot directories and example source files remain intact; their mounts are limited to home/ and workspace/. packVfsOverlay treats all files as opaque bytes.
packPreviewFixture prepares the newest canonical raw Session generation in each fixture directory through the Session format catalog in Node. It collects direct-child discovery evidence from the same fixture root before completing historical parent catalogs. It strictly restores the source, encodes and strictly validates the current successor, and packs that successor beside unchanged source files. A malformed, unsupported, or future selected generation refuses the build without falling back. Temporary successors are removed after packing. Browser write-open then uses current data without invoking Node's migration-verification Worker. Projection caches remain owner-validated; an older generation cannot supply a current fold checkpoint.
Model Experience
None, as this package runs at build time and writes an image file; nothing it produces reaches a model request on its own.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
- The rule tables are judgement calls (
rules.ts: exclude globs, page-asset patterns, entry seeds) pinned bytests/; a new asset class the worker must reach needs a table row, not a scanner change. - Reachability infers only exact request forms — computed
importandrequirearguments, storedcreateRequireresults, CommonJS-obtainedcreateRequire, and bases other thanimport.meta.urlresolve only at runtime and fail loud if the target was otherwise pruned; a target reachable only through those forms needs an explicit image entry seed. - Vendored package sources (
src/*.ts) are excluded — nothing resolves them at runtime; a future in-worker source-inspection feature would need a dedicated include rule. - The packer assumes built
lib/artifacts are current: it never compiles, so a stale workspace build packs stale bytes. Run the repository build first. - The CLI requires its original repository location:
dsh-pack-vfs-imagefinds the checkout relative to its own installed file and reads the source CLI, configuration trees, and preview fixtures there. An npm installation supports the parameterized library API; the CLI and repository helpers require a complete, built DeepSeek Harness checkout. - Preview Session inputs use raw JSONL —
packPreviewFixturerejects compressed and noncanonical Session generation filenames. Generic overlays remain byte-preserving.
Dev Note
Working context for maintainers — click to expand
None.