64 Commits
Author SHA1 Message Date
imccyu 6480899de0 feat(client): load three Client packages as immediately dynamic plugins
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.
2026-11-28 02:28:52 +08:00
imccyu 588f5a57d8 feat(client): leave <request>/client to the module table at build time
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).
2026-11-28 02:08:16 +08:00
imccyu 28dfa06cca feat(client): load package-local chunk dependencies (#9286)
* 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
2026-11-26 15:21:49 +08:00
imccyu aff6333d8d test(client): escape generated CSS Modules class names in selector expectations
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
2026-11-26 01:34:29 +08:00
Turtle c32bf604d9 Merge remote-tracking branch 'origin/master' into turtle/fix-conflict-6542-b5f7dd515337
# Conflicts:
#	packages/client/tsdown.client.ts
#	scripts/client-bundle-purity.spec.ts
2026-11-18 13:28:22 +08:00
LegGasai 8e6fc70ea7 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
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`.
2026-11-13 17:05:16 +08:00
Turtle d300d96267 Merge remote-tracking branch 'origin/master' into turtle/fix-conflict-6542-b5f7dd515337
# Conflicts:
#	docs/persistence-catalog.i18n.yaml
#	packages/client/tsdown.client.ts
2026-11-13 16:14:59 +08:00
acehinnnqru 2405642774 Merge pull request #8159 from deepseek-harness/feat/git-plugin-index-sources
feat(plugin-market): support Git index sources
2026-11-13 16:13:03 +08:00
Turtle 8e1eae689e Merge remote-tracking branch 'origin/master' into turtle/fix-conflict-6542-b5f7dd515337
# Conflicts:
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-changes/historical-formats/README.i18n.yaml
#	docs/persistence-changes/historical-formats/README.md
#	docs/persistence-changes/historical-formats/README.zh.md
#	docs/persistence-schema.json
#	packages/client/tsdown.client.ts
#	packages/client/ui-plugin-manager/README.i18n.yaml
#	packages/client/ui-plugin-manager/README.md
#	packages/client/ui-plugin-manager/README.zh.md
#	packages/client/ui-plugin-manager/src/client/PluginManagerPage.tsx
#	packages/client/ui-plugin-manager/tests/components.client.spec.tsx
2026-11-13 14:17:33 +08:00
LegGasai f0bc702c5a Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	apps/desktop-host/tests/file-drag.spec.ts
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/module-graph.md
#	docs/module-graph.zh.md
#	docs/persistence-catalog.i18n.yaml
#	docs/persistence-catalog.md
#	docs/persistence-catalog.zh.md
#	docs/persistence-schema.json
#	docs/subsystems/worktrees.i18n.yaml
#	packages/api/session-controller/tests/session-skills.host.spec.ts
#	packages/api/workspace-files/tests/scope.spec.ts
#	packages/client/tsdown.client.ts
#	packages/deliverables/workspace-changes/tests/git.spec.ts
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/worktree/README.i18n.yaml
#	packages/experimental/worktree/src/index.ts
#	packages/sandbox/sandbox-policy/package.json
#	packages/session/working-directory/package.json
#	packages/test-support/agent-loop-testkit/tests/agent-loop-testkit.spec.ts
#	pnpm-lock.yaml
2026-11-13 13:30:22 +08:00
dsh-ci-bot 1732b2685b fix(client): judge stylesheet containment with pathBelow
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.
2026-11-13 12:02:19 +08:00
dsh-ci-bot 16cc3b594e fix(client): key stylesheets by the real package path
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.
2026-11-13 11:40:46 +08:00
imccyu 695f640063 Merge pull request #8133 from deepseek-harness/discuss-client-iframe
refactor(client): add client module js realm (with module manifest and style operation)
2026-11-13 10:11:54 +08:00
turtle1999 bab3d111f4 fix(plugins): keep cited plugin context safe when profile reads fail
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.
2026-11-11 19:00:13 +08:00
LegGasai e7a1c26e04 Merge branch 'feat/session-workspace-root' into feat/session-workspace-root-consumers
# Conflicts:
#	apps/desktop-host/package.json
#	docs/capability-seams.i18n.yaml
#	docs/config-catalog.md
#	docs/config-catalog.zh.md
#	docs/event-producer-consumer.md
#	docs/event-producer-consumer.zh.md
#	docs/subsystems/sandbox.md
#	docs/subsystems/sandbox.zh.md
#	packages/api/terminal-controller/README.i18n.yaml
#	packages/api/terminal-controller/README.md
#	packages/api/terminal-controller/README.zh.md
#	packages/api/terminal-controller/src/index.ts
#	packages/client/tsdown.client.ts
#	packages/client/ui-open-in-app/src/client/index.ts
#	packages/client/ui-open-in-app/src/client/session-reveal.tsx
#	packages/experimental/client-ui-forge/README.i18n.yaml
#	packages/experimental/client-ui-forge/README.md
#	packages/experimental/client-ui-forge/README.zh.md
#	packages/experimental/worktree/src/index.ts
#	packages/extensions/tool-cordis/src/api-catalog.ts
#	packages/sandbox/sandbox-local/README.i18n.yaml
#	packages/sandbox/sandbox-local/README.md
#	packages/sandbox/sandbox-local/README.zh.md
#	packages/sandbox/sandbox-local/src/index.ts
#	packages/sandbox/sandbox-local/tests/local.spec.ts
#	packages/sandbox/sandbox-policy/README.i18n.yaml
#	packages/sandbox/sandbox-policy/README.md
#	packages/sandbox/sandbox-policy/README.zh.md
#	packages/sandbox/sandbox-policy/src/index.ts
#	packages/sandbox/sandbox/README.i18n.yaml
#	packages/sandbox/sandbox/README.md
#	packages/sandbox/sandbox/README.zh.md
#	packages/sandbox/sandbox/tests/roots.spec.ts
#	pnpm-lock.yaml
2026-11-05 20:34:00 +08:00
imccyu 6b8d868008 chore(deps): unify zod to 4.6.6
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.
2026-11-05 11:27:26 +08:00
Turtle 38c7a9fbf4 feat(release): publish package source, declaration maps, and documentation (#5884)
* 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
2026-11-05 00:22:36 +08:00
LegGasai b6aa7b437c feat(working-directory): route sandbox, file views, and discovery through the Session workspace root
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
2026-11-03 18:49:34 +08:00
Dudu-0223 43c4919f86 merge: refresh ID-only Team UI from core master updates 2026-10-30 15:13:05 +08:00
Dudu-0223 0eb1bb52e2 refactor(team): keep session UI and task tools keyed by IDs 2026-10-30 14:25:27 +08:00
liukx0205 7fc5c2ecb2 Merge remote-tracking branch 'origin/master' into perf/client-static-production-mode 2026-10-30 04:44:55 +08:00
ZiyaandMagolor 341ea6eea4 feat(schedule): integrate standalone tasks with the existing WebUI (#6189)
* feat(schedule): manage Host tasks with typed timing and delivery targets

* fix(schedule): align task creation button halves

* refactor(schedule): remove obsolete Session reminder runtime

* refactor(schedule): simplify task UI and preserve keyboard navigation

* fix(schedule): address task delivery and interface review findings

* test(schedule): normalize bundle module paths on Windows

* fix(schedule): cover reserved targets and trim unrelated changes

* refactor(schedule): minimize task management changes after rebase

* test(schedule): align rebased fixtures and documentation records

* test(schedule): refresh SDK scenarios added on master

---------

Co-authored-by: Magolor <magolor@qq.com>
2026-10-29 18:11:48 +08:00
liukx0205 812c9ec2aa test(client): share in-memory bundle fixture 2026-10-29 14:55:11 +08:00
liukx0205 135423b457 fix(client): default static client bundles to production mode 2026-10-29 14:08:41 +08:00
zhc 49e9d42a00 refactor(context-menu): inject shared trigger bindings through slots 2026-10-28 17:08:06 +08:00
zhc c89be0a88a refactor: extract context menu utilities and merge master 2026-10-28 14:51:01 +08:00
imccyu 3ddab34194 Revert "perf(web): 压缩动态插件资源以加快冷启动" 2026-10-27 23:25:57 +08:00
liukx0205 0bfa572080 test(web): retain minified bundles in real-host smoke coverage 2026-10-27 17:55:51 +08:00
liukx0205 4f851948a5 perf(web): minify dynamic client bundles 2026-10-27 15:42:21 +08:00
zhc 9cf8c35179 refactor(file-drag): 统一 util 包命名与路径引用 2026-10-21 11:36:08 +08:00
zhc d6fdabd274 refactor(file-drag): 将传输常量归属通用文件包 2026-10-20 21:12:18 +08:00
Shigma 23356d9c9c Merge pull request #6193 from deepseek-harness/chore/cordis-timer-1.1.4
chore(cordis): sync Timer 1.1.4 and reuse it in Client
2026-10-19 13:51:40 +08:00
Shigma e821bc31d6 refactor(cordis): reuse TimerService in Client runner 2026-10-16 21:30:57 +08:00
imccyu 30d48c4d49 test(client): share dynamic import bundle fixture 2026-10-14 14:44:00 +08:00
imccyu e137ebaaa1 Build shared Client bundles independently for Node and browser 2026-10-14 14:43:59 +08:00
imccyu e4410b2764 perf(client): read each tsdown preset's own package manifest
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
2026-10-11 18:19:23 +08:00
kingwl 0bfc4b97f2 Merge master and resolve integration conflicts for #5576 2026-10-08 14:57:40 +08:00
Tianyi Cui 582c9ab7b7 fix(experimental): retain published names and centralize identity policy 2026-10-06 16:42:25 +08:00
kingwl f78b104b20 fix(deps): retain Worker-compatible Zod and align dependency checks 2026-10-01 03:19:25 +08:00
Turtle f028f25667 refactor: remove runtime invariant plugins
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.
2026-09-30 12:52:18 +08:00
creatixchu 03fde971e2 build: allow browser-safe file association metadata validation 2026-09-20 14:02:18 +08:00
Yichen Jiang cb2750019a fix(plugin-manager): read pnpm's own registry, its stdout refusals, and lay failures where they belong
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.
2026-09-18 17:03:04 +08:00
imccyu b1471fd73c perf(client): load split bundles on demand 2026-09-15 20:45:49 +08:00
Tianyi Cui 8f14f98a1a ci(web): verify composed profiles, live registries, and bundle inputs 2026-09-12 20:56:26 +08:00
ihsiang 9292dd8a2d feat(workspace): open the workspace in local apps from the web UI (#3409)
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>
2026-09-07 17:58:11 +08:00
Tianyi Cui b25d4faaaa fix(spill): share persisted notice formatting with client recognition 2026-09-05 23:52:59 +08:00
imccyu 34bdc81b47 test(deps): enforce runtime dependency ownership 2026-08-30 02:29:52 +08:00
Dudu-0223 51a6eabb27 perf(api): replace shift-backed stream queues 2026-08-28 17:37:03 +08:00
imccyu e14d354e83 refactor(connection): own RPC transport contracts 2026-08-27 22:26:29 +08:00
ZiyaandZiyaZhang b565df3442 feat(web): show exact per-turn token usage (#3005)
* feat(web): show exact per-turn token usage

* test(runtime): refresh exact token usage snapshots

* refactor(token-meter): own per-turn usage folding

* perf(ui-chat): bound paging anchor layout reads

* test(web): align usage golden with system prompt row

* fix(test): resolve token-meter client from source

* test(token-meter): cover retry without usage

---------

Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com>
2026-08-25 19:05:52 +08:00