* 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 |
|---|---|
| Download and save original files without changing their encoding | package-reference |
@deepseek-ai/dsh-client-ui-file-actions
English | 中文
Summary
Download and save original files without changing their encoding. Copy images as pasteable PNG content while retaining the original format for saves. Desktop can reveal a successfully saved file; a browser download never claims to know its local destination.
Table of Contents
- Use this package
- Understand the implementation
- Further Exploration
- Model Experience
- Known Limitations and Deferred Work
- Dev Note
Use this package
The Web application bundle mounts this Client plugin without configuration fields. Consumers import /client types and inject fileActions. Desktop supplies an optional trusted-frame adapter for Chromium downloads and cross-origin clipboard reads. Both Desktop and Web write PNG images through the browser Clipboard API.
Original content
Pass an original URL, optional filename and MIME, or an authorized read(signal) callback for Session-owned files. Saves preserve bytes. MIME determines the suffix when it conflicts with the supplied name; compatible and unknown suffixes remain. Suggested names exclude platform-reserved characters and device names and fit a 255-byte filename.
save(source, mode) returns cancelled, requested for a browser download, or saved with the absolute destination path after a native save completes. Web menus offer Download for files and images and omit Save as. Web downloads pass original content to the browser with a suggested filename; the browser owns the destination and completion. They return no local path. Save as requires Desktop: canSaveAs is false on Web and Web saveAs calls reject without reading the source.
Desktop completion toasts offer a Show in folder text action (Show in Finder on macOS), capturing that operation's destination. The action uses session.openWorkspacePath with the existing Host path validation; no download history or separate reveal IPC is retained. Context-menu reveal belongs to ui-open-in-app and always targets the original local file, regardless of previous saves.
Filename and MIME normalization reuse the file-drag utility, so saving and dragging retain the same original format and filename policy.
Response MIME takes precedence over a suggested filename or media type when naming downloaded originals. Image copying decodes the captured original into PNG for clipboard interoperability. copyImageAt addresses the current pixels at a coordinate, provides no completion result, and cannot bind the image captured by a card or keyboard menu. Copying therefore reads the captured source even when an image moves, changes, or is covered by the menu. Downloads and save-as never use that conversion. The plugin contributes file and image copy, download, save-as, and localized feedback through ctx.contextMenus, independently of ui-open-in-app. Other service callers own their feedback. Rejected reads do not start writes. Desktop downloads use webContents.downloadURL and DownloadItem: direct originals remain URLs; authorized Session reads become temporary Blob URLs retained until completion. Response MIME names the original file, downloads reserve distinct paths, and save-as uses Chromium’s save dialog and replacement behavior. Only the completed event returns a destination; cancellation is silent and interruption reports failure. Navigation or window closure cancels pending downloads. Plugin disposal aborts browser reads and pending reveal requests and releases object URLs.
Desktop downloads follow Chromium’s session and network policy. Only clipboard fallback reads use the bounded credential-free HTTP(S) reader, rejecting the application Host at every redirect. Other destinations use the machine’s network policy. Ordinary Web reads require the remote server to allow browser CORS; a denied response produces failure feedback without starting a save.
Understand the implementation
Implementation internals — click to expand
The Client selects browser or native operations once per plugin lifetime. Client implementation owns MIME normalization and clipboard conversion. Desktop adapter validates IPC inputs and revalidates the trusted window before returning the completed destination path.
Further Exploration
- Context menus — contributed actions.
- Workspace files — authorized Session reads.
- Desktop — native operation settings.
Model Experience
None, as explicit user file and clipboard operations do not construct model input.
KV Cache effect
None; saving and copying do not change model requests.
Known Limitations and Deferred Work
- Save as is Desktop-only; clipboard operations depend on browser permission and image decoding support.
- Native downloads have a configurable startup deadline; once Chromium accepts the download, its completion or cancellation ends the operation; HTTP(S) clipboard reads omit credentials and stop on window navigation, close, timeout, or the configured byte limit.
- Browser downloads have no reveal action unless a separate, actual Host file is known.
Dev Note
Working context for maintainers — click to expand
None.