ui-slots, ui-primitives and ui-dockkit stop being statically linked into
the Web shell. Each becomes a dynamic plugin package with
`immediately: true`, like ui-renderer: src/client/index.ts builds
lib/client.js, the ./client export, whose apply registers nothing, and
the web-app composition lists the three rows by package name, so they
register before other plugins and any bundle can require their exports.
Their /client entries still export values, a historical exception that
will be reduced over time. Dynamic bundles keep leaving the three names
to the module table without declaring them.
client-store is unchanged: it stays a staticLinked library that the Web
shell seeds, and ui-slots and ui-primitives keep importing it by package
root, which their dynamic bundles leave to the module table.
For compatibility with code outside the repository, the package root's
runtime is the hand-written Host entry src/index.js with the empty
apply, built to lib/index.js, and its types reuse the ./client
declarations, which check-workspace-constraints accepts. src/index.ts
is gone; the tsconfig path of the root already maps to the src
directory, where tsx finds index.js.
Gates follow the Host entry without a src/index.ts: the dependency and
config-catalog scans resolve ./src/index.js to its source module,
verify-cordis-config accepts a configured root that resolves under src/,
and verify-client-packages accepts a workspace PLATFORM_MODULES name
supplied by an immediately row of the same name, while a seeded
workspace module still has to use the staticLinked preset. The benchmark
workers read the workspace manifests and bundle from source the /client
subpath of each package that declares dsh.client, because its built
lib/client.js registers with a browser module loader; every other
@deepseek-ai specifier, client-store and token-meter/client included,
stays on its built entry. Generated catalogs and the lockfile are
refreshed.
The module table already resolves a `<specifier>/client` it does not hold
exactly to the `<specifier>` entry (stripClientSuffix). The dynamic build
preset now applies the same rule: coversRequest() treats
`<specifier>/client` as requested whenever `<specifier>` is a baseline,
preloaded, or dsh.client.external request, so a bundle that imports
either spelling emits a module-table require and never inlines a private
copy. The static manifest factory records `<platform module>/client`
imports the same way, and verify-client-packages reuses
stripClientSuffix: a declared `<baseline>/client` is a repeated baseline
request, and a declared `<specifier>` is live when production source
imports `<specifier>/client`.
Tests: the module table returns one exports object for require(id) and
require(id + '/client') of a row named by package (it fails without the
normalization); a Web browser test loads a hand-written prebuilt fixture
plugin that requires the package root and `/client` of ui-slots,
ui-primitives and ui-dockkit and receives the same exports with the
expected members; a dynamic bundle importing both spellings of those
three packages emits requires of both and inlines none of their modules
(it fails with a purity error without the normalization).
* feat(client): load package-local chunk dependencies
Chunks of one dynamic Client package may now require each other
synchronously. A registration's deps names the chunks its factory
requires, and the module system registers them before the factory runs;
require.async takes a { deps } prefetch hint so a chunk group downloads
in one round. The dynamic preset writes both lists and moves the chunks
an entry requires into its client.js, shifting the entry source map.
Refs #9275
* fix(client): accept entry-carried chunks in the publication closure check
The dynamic Client build moves the chunks an entry requires into the
entry file and deletes their own files, so a require of such a chunk
names no published file. publint-all now accepts a ./client.<name>.js
request when a script in the same directory registers the package entry
and that chunk, using the shared chunk file-name rule.
Refs #9275
* fix(client): restart entry chunk arrival and keep entry-carried dynamic imports
- arrive() restarts from the entry script when the owner is invalidated
while the entry's registration deps download, as importChunk already
does for lazy chunks.
- A dynamic import of a chunk the entry file carries keeps Rolldown's
synchronous require: the chunk has no file left to download. A chunk
that imports the package entry dynamically now fails the build like a
static import.
- The WebWorker packer reuses CLIENT_CHUNK_FILE from client-modules
instead of its own pattern; the rule is bundled into the packer build.
Refs #9275
* refactor(client): order chunk arrival methods after importChunk
Place arriveChunk directly after importChunk so the download code it took
over from importChunk stays aligned with master, followed by arriveChunks
and requireChunk. No logic or comment changes.
Refs #9275
* fix(client): limit the entry-carried chunk exemption to factory requires
publint-all accepted any relative request for a chunk that the entry file
registers, including an ESM import that Node resolves itself. The
exemption now covers only a synchronous require inside the factory of a
__ModuleLoader__.load registration; every other relative request still
needs its published file.
Refs #9275
* fix(client): let a prefetch hint only start chunk downloads
With a hint, the hinted chunks shared the requested chunk's visited set,
so a failed dependency reached the caller without the registration chain.
Each hinted chunk now arrives with its own visited set and an ignored
failure; the requested chunk waits only for its registration deps and
wraps their failures, so a hinted chunk that no registration requires
cannot fail the request.
Refs #9275
* fix(client): wait for prefetch hint arrivals before a chunk request ends
A chunk request discarded its hinted arrivals, so after an owner
invalidation it could retry and register the new generation while a
hinted download of the dropped generation was still pending; that
download then deleted the new records. The request now waits for every
hinted arrival it started, on success, failure, and before a retry,
while still ignoring their failures.
Refs #9275
lightningcss hashes the stylesheet path into [hash]_[local], and the fixtures
live under random temporary directories. About one hash in 410 begins with
a dash and a digit, which the stylesheet writes escaped (.-\35 ab_root) while
the class map holds the name itself, so the raw selector expectation failed.
The expectations now serialize the class name as CSS.escape does.
Refs #9265
Brings master (fe45cf60271) through the parent branch. The client inline-safe
list keeps master's `plugin-market-index/source` and this branch's
`api-session-controller/client/directories`.
relative() returns an absolute path when a Windows package and its stylesheet sit on different drives, and startsWith('../') read that as inside the package. Reuse the file's pathBelow() so the '..' prefix, an absolute result, and the package root all take the dependency branch, matching resource(). The new symbolic-link case also follows the repository's junction convention on Windows and asserts the compiled text still resolves.
Rolldown canonicalizes module ids through symbolic links, while the package directory arrives as the caller wrote it. On macOS, whose temporary directory sits below the /var -> /private/var link, relative(packageDir, fileId) no longer starts inside the package, so the package's own stylesheets were named node_modules/<own package>/... Compares both paths after resolving links, as the asset paths in the same config already do.
Allow the shared grammar subpath in the client bundle purity gate so the Web bundle builds. A failed bundle-list or inventory read now becomes a per-reference error instead of failing the step. The context omits the dependency source and error diagnostics, which can carry URL query tokens or pnpm output, and locates files for bundles the installation ships.
Raise all 88 workspace zod declarations to exact 4.6.6 and move @browserbasehq/stagehand to 4.4.0, which pins the same version, so the lock keeps a single zod copy. Test expectations and the Typert consumer's node types follow the new declarations; pnpm-workspace.yaml records the release-age exemption for stagehand@4.4.0.
* 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
Every consumer that describes the project to the user or draws the write
boundary reads rootOf(session) instead of the header directory: the sandbox
workspace-write policy, the workspace file service and desktop file drag, the
change recorder, the client Files tree, deliverables, open-in-app actions and
Session rows, new sidebar terminals, @ file candidates, the skill catalog,
project-instruction discovery, and the LSP workspace. The model's relative
paths keep resolving from the current directory.
The sandbox policy derives a linked checkout's Git administration directory
and common directory from its .git pointer and grants them as extra writable
roots; tool executions wait for that derivation through prepare(), and
Session creation and directory changes start it early. Windows ACL
confinement grants each extra root a standing ACE through a repeatable
--writable runner argument instead of refusing the policy.
Refs #2658
The client tsdown presets found a package's own manifest by name: a glob of
every packages/*/*/package.json, parsed until the name matched. tsdown's
native config loader imports each package config without module cache, so
the module-level cache never hit and all 82 configs repeated the glob
(40-125 ms each) synchronously on tsdown's main thread, where it delayed
every other package build. It was 34.5% of the client pass's main thread.
- clientBundle, staticLinked and clientLibrary take the package directory
(import.meta.dirname at every call site) and read <dir>/package.json
once; the package name, loader id and externals come from that manifest.
- A missing, unreadable or nameless manifest throws an actionable error.
- The glob, the name search and the module-level caches are removed.
tsdown client pass 12.78 s -> 8.73 s (median of 3 interleaved runs each,
-31.7%); all 11,566 lib outputs byte-identical; all 82 configs resolve the
same externals and banners.
Refs #5852
Delete @deepseek-ai/dsh-invariants, every package's ./invariant companion
and its tests, the invariant gates and Vitest setup, the scoped-event
resolver generator, and the INVARIANT-coded listener rethrow paths.
Update docs, READMEs, Agent Notes, and add an upgrade guide.
Review of #4539. A refusal pnpm view prints as JSON on stdout was read
as unknown, so no registry was ever asked after a dead one; stderr and
stdout are now read alike, and a lookup killed at its bound is a
network refusal. pnpm's own registry joins the fallback plan only once
pnpm config get registry names npm's own or a configured fallback, so
a company registry in .npmrc is never followed by a public one, and a
registry pnpm already names is asked once. The Host lays each failure
at the registry or the spec's own host, reading the host off error
lines only, and reports it as ChangeResult.failedAt; a stop that lands
between attempts is cancelled, not failed. The package publishes its
registry rule through ./registry so the dialog plans with the Host's
own function, starts from the registry the Host asks first until one
is remembered, tags that one as the default, labels pnpm's own by the
host it names, and words and offers a change of registry from the
Host's attribution. ERR_PNPM_NO_OFFLINE_META is no longer a network
failure.
Add the first-party open-in-app host and client packages with a localized Open In menu in the Web Session header.
Resolve installed applications on macOS, Windows, and Linux, launch workspace directories through platform-specific adapters, and remember the selected application.
Closes#1500.
Co-authored-by: ihsiang <ihsiang@deepseek.com>