* 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 |
|---|---|
| Workspace-directory picking seam for the web GUI host: the service contract, capability vocabulary, and error codes the native and browse backends implement. | package-reference |
@deepseek-ai/dsh-host-directory-picker
English | 中文
Summary
The web GUI lets an operator choose a workspace directory with either an OS chooser or an in-app browser. Use the native option when the operator can reach the host display; use the browser option for remote clients or when directory listing and creation must stay in the app. Consumers receive the interaction kind and can present the matching workflow. Directory picking is limited to the GUI host and never affects the agent loop. The browser workflow exposes one directory tree at a time; multiple roots are unsupported.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
Mount exactly one directory-picker backend and let the workspace flow drive it: the seam itself is only the service contract, so a composition without a backend has no way to pick a directory.
Choosing a backend
The native backend is the right choice when the operator sits at the host's display: directoryPicker/pick opens one OS chooser and returns the chosen absolute path, or null on cancel. The browse backend works everywhere — it lists one directory level and creates child directories from the browser, so remote clients that cannot reach an OS dialog still pick a workspace. When the host situation varies between boots, compose the adaptive chooser, which resolves the situation once at boot and mounts the matching backend.
The capability contract
capability() returns a discriminated union describing how an operator selects a directory: { kind: 'native', pick(signal) } for the OS chooser, or { kind: 'browse', list(path?), createDirectory(path, name) } for the in-app browser. Consumers switch on kind; a capability kind no composition implements means the UI hides the picking affordance rather than failing. Browse failures throw the typed DirectoryPickerError with a closed code set — directory-unreadable, directory-exists, or directory-create-failed — each carrying the subject path, which the picking Remote controller maps 1:1 onto wire failure codes.
What rows carry
DirectoryEntry rows expose the absolute path and a host-owned hidden flag (dot-prefixed on POSIX) so display policy stays client-side; clients never join path segments themselves. DirectoryListing.crumbs is the ancestor chain from the filesystem root to the listed directory — every crumb is a jump target, and the root crumb is labeled by its full path.
Understand the implementation
Implementation internals — click to expand
Design concept
The seam is built on one separation: the interaction shape a backend provides is a contract, not an implementation detail. DirectoryPicker is an abstract Cordis service with a single capability() method; a backend subclass registers as ctx.directoryPicker, and loading a second implementation throws the standard duplicate-service error. The capability object must be stable for the service lifetime because consumers may capture it across calls.
The merge-extensible vocabulary
DirectoryPickerCapabilities is a merge-extensible map keyed by capability kind, and DirectoryPickerCapability derives the union from it. A new backend declaration-merges its shape here (the entry's kind literal must equal its key) instead of editing this package. Each backend package also ships a browser entrypoint that registers the matching interaction in ui-workspace's directory-flow slots, so one composition row selects both the host capability and the client flow.
Source map
| File | Role |
|---|---|
src/index.ts |
Service Definition: abstract DirectoryPicker, capability vocabulary, typed error, Context merge |
Failure vocabulary
DirectoryPickerError carries a closed DirectoryPickerErrorCode plus the absolute subject path, so consumers map business codes without string matching. The seam Agent Note records the design rationale, the separation from ctx.fs, and the policy decisions.
Further Exploration
Read these when the seam contract is not enough: the decision record first, then the two backends and the adaptive chooser that compose it.
- Directory-picker capability seam decision — design rationale, the
ctx.fsseparation, and the policy decisions. - Native backend — the OS-chooser interaction and its platform tooling.
- Browse backend — the in-app listing and creation interaction for remote clients.
- Adaptive chooser — boot-time resolution between the two backends.
- Workspace subsystem — the workspace records the picked directory feeds.
Model Experience
None, as the GUI-host picking seam registers nothing model-facing.
KV Cache effect
None; this package neither assembles nor sends a provider request.
Known Limitations and Deferred Work
These limits define when the seam contract leaves a decision to a future consumer. They are current package constraints, not a task backlog.
- No multi-root support — the browse contract exposes one ancestry chain per listing; per-deployment root scoping (and Windows drive-root enumeration above a drive) waits for a consumer that needs it, per the DirectoryPicker Agent Note.
Dev Note
Working context for maintainers — click to expand
None.