* 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 |
|---|---|
| The load_workspace_dependencies tool: absolute paths into a bundled Python, Node.js, and pnpm payload, used in place or installed under the Harness home. | package-reference |
@deepseek-ai/dsh-tool-workspace-dependencies
English | 中文
Summary
Deployments that ship their own script runtimes (Desktop's primary runtime, or a container image layer) mount this tool so the agent can ask where the bundled Python, Node.js, and pnpm live instead of discovering a system interpreter. The tool returns absolute paths and recorded distribution versions; it changes neither PATH nor package-manager settings. The payload is either copied under the Harness home on first use (Desktop) or used where it lies (read-only carriers).
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
Mount the plugin beside the tool registry with the payload directory. Configuration validation requires a nonempty source and rejects empty root values before activation; both paths must be absolute. With pythonEnvironment: 'workspace-dependencies', the bundled Office skills (@deepseek-ai/dsh-skill-office) reference this tool by name for their default interpreter.
Minimal configuration
- name: '@deepseek-ai/dsh-tool-workspace-dependencies'
config:
source: /path/to/primary-runtime
| Field | Default | Meaning |
|---|---|---|
source |
required | Absolute payload directory carrying runtime.json and dependencies/. |
root |
unset | Absolute installation directory under the Harness home. Set: the payload is copied there on the first call and reused while runtime.json is unchanged. Unset: the payload is validated and used in place; nothing is copied. |
Payload layout
runtime.json records desktopVersion, platform (win32, darwin, or linux), arch, optional payloadDigest, top-level python, optional node/pnpm versions, and the complete pythonPackages distribution-version map. A pnpm entry requires Node.js. Python libraries, including numpy and pandas, appear only in pythonPackages. Entries live under dependencies/: python/bin/python3 (python/python.exe on Windows) with site-packages beneath it, and, when declared, node/bin/node with node/node_modules and pnpm/bin/pnpm.mjs. A manifest whose platform or architecture differs from the running process is rejected.
On macOS and Linux, the builder retains python and python3 as relative links to the sibling versioned interpreter (for example, python3.12). Installation preserves these two aliases and materializes other links. Alias validation requires the exact sibling filename and a regular target file; carriers that cannot preserve links, including Python wheels, retain supported regular command files. Windows keeps its ordinary python.exe file.
The packaged sdk profile uses its bundled Python and Office skills by default; DSH_PRIMARY_RUNTIME overrides the resource location, and an empty value opts out of the bundled environment. Without a primary runtime, including source launches, the sdk profile leaves this tool unmounted and still mounts the Office skills, which direct the model to the user's Python. See runtime configuration for independent skill selection. Missing skill resources are reported once through ctx.logger.warn during catalog discovery; invalid or incomplete external runtime payloads fail the first tool call. Profile configuration changes require restarting the SDK process.
Build a carrier payload
From a repository checkout with dependencies installed, CI=true pnpm run prepare:primary-runtime --target linux-x64 --output /tmp/dsh-office writes primary-runtime/. The shared download lock also covers linux-arm64, mac-arm64, mac-x64, and win-x64. --python-only omits Node.js and pnpm; --cache selects the hash-verified archive cache. The entry executes interpreter and Office read/write checks only for a native target. Cross-target builds require those checks on the target host before deployment.
A container can copy that directory into an immutable image layer and set DSH_PRIMARY_RUNTIME to the absolute primary-runtime/ path. The SDK queries that payload in place. Desktop uses the same builder and retains its Harness-home installation and signing checks.
Understand the implementation
Implementation internals — click to expand
readPrimaryRuntime and build smoke checks share parsePrimaryRuntime. It validates the flat manifest and rejects duplicate normalized distribution names. Legacy components metadata is normalized in memory, retaining its consistency checks; a missing legacy distribution map becomes empty. Mixed flat and legacy version fields are rejected. Reads do not rewrite metadata, and equivalent normalized manifests can reuse an installed payload. workspaceDependencyPaths derives the platform-specific entries. installPrimaryRuntime copies into a staging directory, requires declared interpreters and scripts to be files and package roots to be directories, and swaps it into place while retaining the previous tree on failure; resolvePrimaryRuntime verifies the same entries without copying. The tool memoizes the first successful preparation for the plugin's lifetime.
| File | Responsibility |
|---|---|
src/index.ts |
Manifest validation, path derivation, in-place and installed preparation, tool registration. |
Further Exploration
- Office skills — the workflows that call this tool for their interpreter.
- Tool registry — registration and schemas.
Model Experience
Tool schema
What the model sees
The model sees the generated load_workspace_dependencies schema.
Token effect
Fixed schema cost per request where the tool is visible; the description names the bundled Office libraries so the model can choose the interpreter without loading a skill first.
KV Cache effect
Prefix-stable while the tool definition and visibility are unchanged.
Tool result
What the model sees
One JSON object with absolute python and pythonPackages paths, pythonDistributions from runtime.json, and node, nodePackages, and pnpm when the payload declares them. Repeated calls return the same object.
Token effect
A few hundred characters per call; paths dominate.
KV Cache effect
Append-only tool result in the turn history; no prompt section is added.
Known Limitations and Deferred Work
- Linux targets require glibc; musl payloads are not locked.
- Windows payloads used in place must already be executable from their carrier; the in-place mode performs no permission repair.