Commit Graph
6215 Commits
Author SHA1 Message Date
Yudong Hanandimccyu f7cb4926dc feat(frame-forwarding): video-frame forwarding support (#8440)
* fix(desktop): hide the Windows menu entries while the document is fullscreen

Frame forwarding offers plugins the Fullscreen API; the Application and Edit caption entries now stay hidden during fullscreen and return when it ends.

* feat(desktop): build declared native addons for development and packaging

* feat(frame-forwarding): receive native frames and submit them to the Desktop sink

* feat(frame-forwarding): route Host channels to video mounts in the Client

Keep the producer interface internal while Office integration evolves. Include channel lifecycle, receiver integration and video presentation tests.

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>

* test(frame-forwarding): cover wire packet and endpoint parsing with fuzz tests

* refactor(desktop): preinstall the native frame receiver

* build(desktop): compile the preinstalled receiver from the plugin workspace

* refactor(frame-forwarding): load the preinstalled receiver inside the plugin

* refactor(desktop): pass the frame receiver path as a Host argument

---------

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-27 06:39:04 +00:00
imccyu 3174e692ab refactor(client): re-export platform libraries from the package root
Each of client-store, ui-slots, ui-primitives and ui-dockkit gains
src/index.ts, which only re-exports src/client/index.ts. The packages
remain staticLinked libraries: package.json, the tsconfig package-root
paths, the Web shell's PLATFORM_MODULES and seed.ts, apps/cli, and
business imports are unchanged, and the built lib/index.js keeps the same
exports.

References to the moved files follow: package tests, other packages'
tests that read or import the ./src/* subpath, the Desktop welcome page's
./src/* imports, Vitest coverage excludes, the CSS selector baseline, the
client catalog comment, the liveshare and client-ui-forge fixtures,
READMEs, Agent Notes and the plugin-artwork skill. The 48
markdown-dom-parity snapshots change only their CSS Module class hashes,
which include the file path, and the ui-dockkit stylesheet's data-path
becomes src/client/components/dockkit.module.css.

Refs #9275
2026-11-27 13:17:47 +08:00
Turtle edd1f4ad64 Merge pull request #9360 from deepseek-harness/turtle/diagnose-wg-websocket-f21ed379448e
feat(cli): leave heap diagnostics when a source launch runs out of memory
2026-11-27 11:12:21 +08:00
Yudong Hanandimccyu 5cff6056ba feat(desktop): add shared texture interface and transport (#8439)
* feat(desktop): add shared texture transport and native presentation layers

* fix(desktop): keep split fixtures and generated notices self-contained

* refactor(theme): defer presentation stage token to Office layer

* refactor(desktop): move frame integration into its consumer layer

* refactor(sidebar-right): move native-layer visibility support to frame layer

The fullscreen tab-body background and the tab visibility test only serve
the frame integration that hides native layers through tab.visible, so they
belong with that consumer layer.

* refactor(desktop): keep shared textures on the renderer path

* fix(desktop): settle shared textures across GPU loss and teardown

* fix(desktop): correlate late texture arrivals and settlements by request

* test(desktop): exercise late ingress delivery after presenter reset

* fix(desktop): bound unsettled textures before handle export

* fix(desktop): retain probe handles and invalidate unsynchronized imports

* refactor(desktop): leave the fullscreen caption rule to frame forwarding

The caption-menu fullscreen rule, its test, and the README sentences describe fullscreen that frame forwarding offers to plugins. They belong with frame forwarding, not the texture transport.

* refactor(desktop): validate Host texture limits in the channel only

The Host channel already shortens deadlines to 30 seconds and refuses dimensions above 8192 before Main's presenter sees a request, and it is the presenter's only caller. Remove the repeated checks from the presenter and assert the limits where they are enforced.

* fix(desktop): drop only the surface that finds the ingress queue full

A full delivery queue ended the macOS ingress reader, so a Main JavaScript thread that stalled for 16 surfaces failed every waiting presentation and left the Host without an endpoint until its next capability query. Release that one surface and keep reading; its presentation fails at the delivery deadline. A closing delivery function still ends the reader.

* fix(desktop): reach Main through one process handle for Windows texture handles

The Windows adapter opened Main by process identifier for every export, import, and reclamation. After Main exited, the Host's disconnect cleanup reclaimed each unsettled handle with DUPLICATE_CLOSE_SOURCE, which closes the source handle even when the call fails; an identifier reassigned by then named an unrelated process. Keep one handle to Main's process until the endpoint closes, refuse to reclaim without it, and leave duplicates to Main's exit after a disconnect.

* feat(desktop): carry shared-texture frames on a native Host-Main channel

Each frame was a Node IPC request from the Host's JavaScript thread, answered by a reply and a later notification on the same channel, with the macOS surface sent separately and paired in Main by token, and the Windows handle duplicated into Main by the Host through Koffi.

The hop and ingress addons now form a two-way native channel on both platforms: a Mach port pair on macOS and a duplex message pipe on Windows. A frame's handle and description reach Main in one message, and Main returns the delivery reply and the settlement on the same channel. On Windows, Main verifies the pipe client's process and duplicates the Host's handle into its own process, so the Host opens no process and closes no remote handle. The Host IPC channel keeps only the capability and probe controls.

A frame that finds Main's 32-frame delivery queue full is refused at once and stays reusable. When the channel is lost, the hop settles every unsettled frame as invalidated. The hop also exposes its connection to other Host addons as a C function table, which the sharedTexture claim returns from nativeSink, so a native producer can submit frames without the Host's JavaScript event loop.

* refactor(desktop): drop unused parts of the shared-texture ingress

Main never closed a handle inside the Host, never read a frame's delivery deadline, and waited for the Host's pipe connection only to cover the instant before the ingress registers it. Remove reclaimFromPeer, the timeoutMs field of the frame event, and the peer event with the probe's wait for it: a probe that arrives in that instant now fails with the export error.

With frames as the only queued deliveries, the delivery function's own queue limit bounds them again.

* refactor(desktop): submit shared-texture frames through the native sink only

The Host had two entries for submitting a frame: the hop's JavaScript present, wrapped as SharedTextureService.present with promises fed by per-frame events, and the C sink for native addons. Frame forwarding, the only consumer, submits through the sink.

Remove the JavaScript entry: the hop's present function and its delivered and settled events, the service's present with its frame, presented, and settlement types, and the wrapper's request table. The hop reports only the loss of a connection to JavaScript. The sink ABI and the wire format are unchanged.

* feat(desktop): tell a refused shared-texture frame from a lost connection

Every sink refusal returned 1, so a native consumer could not tell whether to keep its sink or replace it: a frame refused at the 128-request limit and a present after Main disappeared looked the same.

present now returns DSH_SHARED_TEXTURE_PRESENT_OK (0) when the request left the Host, DSH_SHARED_TEXTURE_PRESENT_REJECTED (1) when only that frame was refused (invalid arguments or fields, the request limit, an identifier in use, or a failed send on a live connection), and DSH_SHARED_TEXTURE_PRESENT_DISCONNECTED (2) when the connection was closed or lost, including a send that found Main gone before the reader did. A sent request still returns 0 and settles through the reader when the connection ends during its send.

* refactor(desktop)!: drop frame identifiers and the wire deadline from shared-texture presentation

Each frame carried a Host-chosen identifier that the hop and Main both kept unique among unsettled frames, and a delivery deadline that Main never read. Frame forwarding tracks its own deliveries, so the identifiers only cost a string copy, a set lookup on each side, and an extra refusal reason.

The sink ABI becomes version 2: dsh_shared_texture_frame_v2 drops id and id_len, and a consumer built for version 1 refuses the version 2 sink. DSTX becomes version 3: its present header drops timeout_ms and id_length and is followed by the metadata alone, and both sides refuse other versions and nonzero reserved fields. The hop still enforces each request's delivery deadline locally and still admits at most 128 unsettled requests; Main bounds admitted frames with a count instead of an identifier set.

The native e2e labels frames through their metadata, proves that a timed-out request keeps its slot through the request limit, and forges version 2 and malformed version 3 headers.

* refactor(desktop)!: read the Windows compositor adapter in Main

To learn which adapter Chromium's compositor renders on, the Host asked Main for a probe texture, Main duplicated it into the Host and kept its own handle and hidden window until the Host released the probe, and the Host closed its duplicate after reading the adapter. The exchange needed the native connection to be open first, a probe table and late-reply cleanup on both sides, and two handle-transfer operations that nothing else used.

Main now reads the adapter itself: the ingress addon reports the LUID of a Main-local shared texture through DXGI, formatted as "<HighPart>:<LowPart>" in unpadded lowercase hexadecimal, the text Host addons derive from an adapter LUID. Main exports one compositor texture, reads its adapter, and releases the texture and its window at once. The answer is kept for the GPU process generation, which a GPU process exit or Host teardown advances; concurrent queries share one probe, a probe that finds nothing or fails is not kept, a cleanup cancels a pending probe, and a probe that a GPU process exit overtook records nothing.

SharedTextureService.probe becomes adapterLuid(timeoutMs), which resolves to that text or null, returns null outside Windows without asking Main, rejects when Desktop does not present shared textures, and no longer opens the native connection. The Host control requests are capabilities and adapter-luid; the probe and release-probe requests, the ingress exportToPeer, and the hop closeHandle are removed.

* perf(desktop): block the macOS shared-texture ingress reader until a request or stop

The macOS ingress reader woke every 100 ms to check for a stop request, so an idle Desktop woke the reader ten times a second and a close waited for the next wake-up.

The reader now waits without a timeout. stop sets the flag and then sends an empty message to the ingress port through the send right Main already holds; a full queue already wakes the reader, so a wake-up that does not fit is dropped. Once stopped, the reader destroys whatever it receives, including its own wake-up, and Host requests still pass the audit-token check unchanged.

* perf(desktop): trim per-frame work on the shared-texture path

Every frame repeated work that only the first frame of a connection or no frame needs. On macOS each request carried a new send right to the Host's reply port, which Main merged and deallocated under a lock; the hop allocated and cleared a 4 KB message per request and the ingress cleared its whole receive buffer per message; the hop copied each frame's metadata into a string, and the Windows hop allocated a message vector; Main parsed every frame's metadata as JSON only to have Electron serialize the value again; and the product preload imported textures that no consumer would read.

The first request of a macOS connection that reaches Main carries the reply port, and Main keeps it for that connection. Main drops the right when a reply cannot be delivered, as the Windows ingress disconnects the pipe, and the hop then receives a no-senders notification and settles every request as invalidated; Main discards requests that arrive on the dropped connection, and the endpoint serves the Host's next connection. Sends reuse a buffer per connection under the send lock and clear only the header fields and alignment padding, the ingress clears only the fixed message fields, and the hop passes metadata to the transport as a view of the caller's bytes.

Main forwards the metadata text, and the product preload parses it before importing the texture. A transfer with metadata that is not JSON, or one that arrives while no consumer is registered, is refused before import, so the Host sees a failed delivery and a released settlement once Main drops its own reference.

* fix(desktop): never import a handle from a closed Windows shared-texture connection

A Windows request names its texture only by a handle value inside the Host, and Main duplicates it when its reader reaches the request. When the Host closed a connection itself, it settled every unsettled request as invalidated right after closing its pipe end, and the owner could then close the handle. A request still queued in the pipe stays readable after that close, so Main could duplicate a value that already named another object and present that texture as the settled frame.

After duplicating, Main now checks that the Host's end of the pipe is still connected. The Host closes its end before it reports any settlement, so a duplicate taken while the end is open names the texture the request was sent with. Otherwise Main closes the duplicate and ends the connection, which discards the requests still queued; the endpoint then serves the Host's next connection. macOS needs no check because each request carries the IOSurface port itself.

A Windows e2e suspends Main, presents a frame, closes the connection, and replaces the texture with one that takes over its handle value before resuming Main. Without the check Main delivered that frame with the replacement texture; with it Main delivers only the frames of open connections.

* chore(desktop): state how long an ingress reply can block, and end a build script with a newline

SharedTextureIngress.reply described a non-blocking queue, but it writes the reply on the calling thread and waits up to the 100 ms reply timeout while the Host is not reading. The comment now says so, together with the connection drop that follows a reply that cannot be written in time.

native-package-builds.mjs ended without a newline.

* fix(desktop): accept every enabled GPU compositing status in the adapter probe

The probe required gpu_compositing to be exactly 'enabled', while support() accepts any 'enabled*' status, so adapterLuid returned null where capabilities reported support. Also type the e2e frame tuple to satisfy no-unsafe-return.

* chore(desktop): end native-package-builds.d.mts with a newline

* refactor(desktop)!: provide shared textures through the dsh-shared-texture plugin

Desktop Host imported its shared-texture types from the private Electron application package, frame forwarding publishes declarations that referenced it, so an installed consumer could not resolve them, and renderer plugins read the texture bridge from globalThis.dshDesktop.

@deepseek-ai/dsh-shared-texture (packages/shared-texture/shared-texture) is a Host and Client plugin package that owns the contract:

- its Host root exports the abstract Cordis service SharedTexture, registered as ctx.sharedTexture and declaring only claim(), with the claim, capability, and native-sink types; its apply does nothing, because the Loader mounts the package only to deliver the Client half;
- ./client is the Client plugin: where Desktop's product preload exposes dshDesktop.textures, it provides that bridge as the Client ctx.sharedTexture, typed SharedTextureBridge, and otherwise provides nothing;
- ./bridge carries the type-only renderer SharedTextureBridge and SharedTextureLease;
- ./protocol carries the type-only private control protocol between Desktop Main and the Desktop Host, including the hop addon types; it is not a plugin API.

web-app mounts the package, so plugins inject ctx.sharedTexture instead of reading host globals. Desktop Host's SharedTexture extends the abstract Host service. Desktop Main and the Desktop Host take the low-frequency control message types from ./protocol and each still validates every message it receives at runtime, so Desktop Host no longer depends on Desktop. Desktop drops its ./shared-texture/host, ./shared-texture/client, and ./shared-texture/internal exports. The shared-texture subsystem page describes the entry points, and the capability-seam graph lists the service.

* refactor(desktop): keep the shared-texture protocol in Desktop Host

Main and the Desktop Host now share the child-process message types from
`apps/desktop-host/src/types.ts`, imported as `@deepseek-ai/dsh-desktop-host/types`,
so the published package no longer carries a private protocol subpath. The hop
addon interfaces return to the Host module that is their only user.

The renderer vocabulary keeps one Cordis-free module, renamed from `bridge` to
`types`: `SharedTextureClientExport`, `SharedTextureHostExport`, and
`SharedTextureLease`, imported by preload and IPC modules from
`@deepseek-ai/dsh-shared-texture/types`. The module is required because the two
compiler faces declare `ctx.sharedTexture` with different types: one program
holding `src/index.ts` and `src/client/index.ts` fails with TS2717.

---------

Co-authored-by: imccyu <276526105+imccyu@users.noreply.github.com>
2026-11-27 02:15:04 +08:00
Turtle 0daacca2ed feat(cli): leave heap diagnostics when a source launch runs out of memory
pnpm dsh, start:web, and dev:web now start Node with
--heapsnapshot-near-heap-limit=1 and --report-on-fatalerror, so a Host
that exhausts its V8 heap leaves a heap snapshot and a diagnostic report
in the repository root, which Git ignores.

Refs #9359
2026-11-27 00:44:30 +08:00
Turtle 74cf97c265 Merge pull request #8882 from deepseek-harness/turtle/scoped-tool-registries
refactor(tools)!: compose tool registries under scoped roots
2026-11-27 00:11:09 +08:00
yudshj 92e65be447 fix(office): upgrade LibreOffice Kit to 0.2.4 and select its glibc engines on Linux
LibreOffice Kit 0.2.4 publishes its Linux engines as linux-x64-glibc and linux-arm64-glibc, but the sidecar and Desktop packaging looked for linux-<arch>, so a Linux target always fell back to WASM even when the kit declared a native engine. DSH's Linux distributions are glibc builds, so a Linux target now selects the glibc engine for its CPU. The third-party notices accept the two Linux engine packages under the same MPL-2.0 identity rule as the other engines.

The web app and office-kit take Kit 0.2.4, the first release with those engines. Its release-age exclusions name the API and the six native engines; WASM is no longer an optional dependency of the kit and is no longer excluded.

Because DSH no longer installs WASM, packaging now requires the target's declared native engine and rejects a target without one, naming its platform and CPU, instead of selecting a WASM package that cannot be present. The Python runtime smoke derives the same glibc package name and checks that the Office sidecar holds exactly that native engine. The Office provider, subsystem, package-surface and Desktop packaging documents describe Kit 0.2.4 and the native-only rule.
2026-11-26 23:15:45 +08:00
winewill a22f351c54 Merge pull request #9223 from deepseek-harness/feat/desktop-channel-convergence
feat(desktop): converge update channels on stable and decouple target publication
2026-11-26 19:58:56 +08:00
Kexin Liu 28a2442748 Merge pull request #9209 from deepseek-harness/feat/sqlite-event-rows
feat(session)!: store SQLite events as rows with derived tables
2026-11-26 19:45:02 +08:00
Chinesezjc 9e891d50a4 Merge branch 'master' into fix/weighted-approval-app-read 2026-11-26 18:10:23 +08:00
Turtle 2099 3f5fdd5a2f Merge pull request #7840 from deepseek-harness/turtle/remote-tool-executor-d0d21ac6d7e4
feat(experimental): add provider-contributed execution environments
2026-11-26 17:53:25 +08:00
Chinesezjc 26b87b086d Merge branch 'master' into fix/weighted-approval-app-read 2026-11-26 17:00:07 +08:00
Ziya a9c0a1f496 Merge pull request #9171 from deepseek-harness/feat/recommend-connectors
feat(plugin-recommendations): 个性化推荐加入官方连接器,可在卡片上安装并启用
2026-11-26 00:44:31 -08:00
Dudu-0223 93d9ded727 feat(llm): 在 DeepSeek 推理请求头中标记子代理和直接父会话 (#9298)
* feat(llm): mark DeepSeek subagent inference requests

* docs: refresh the module graph for subagent headers

* refactor(llm): register subagent headers through the DeepSeek extension registry

Add registerHeader()/headers() to ctx.deepseekLlmApiExtensions for x-dsh- request
headers. session-log-deepseek registers x-dsh-session-type and
x-dsh-subagent-parent-session-id independently of its enabled switch, and
llm-deepseek adds the registered headers without reading Sessions itself.

Remove the ./session-headers export and revert the llm-pi-ai changes.

* fix(llm): keep route credentials ahead of registered DeepSeek headers

Spread the route credential after plugin-registered x-dsh- headers so a
registration named x-dsh-auth-token cannot replace the account token, and
pin that order with an account-route regression test.

Document that the DeepSeek API defines the subagent header names, that the
parent id is supplementary, that removing session-log-deepseek also stops
the subagent headers, and that SDK subagents carry neither header.

* feat(llm): unify Harness attribution header names
2026-11-26 16:39:30 +08:00
Chinesezjc 4b0d1aba81 fix(ci): allow the approval job token to maintain issue comments 2026-11-26 15:32:58 +08:00
Chinesezjc 1c93d8915f Merge pull request #8577 from deepseek-harness/feat/schedule-source-model
feat(schedule): submit Source observations to automation tasks
2026-11-26 15:31:32 +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
winewill 42cac85266 chore(desktop): remove unused installed-update manual qualification suite 2026-11-26 14:23:37 +08:00
Chinesezjc 606f8c508f Merge pull request #8722 from deepseek-harness/ci/weighted-approval-review
feat(ci): approve weighted pull requests instead of gating CI
2026-11-26 14:19:33 +08:00
Chinesezjc 203ffa5ab9 test(ci): assert the approval credential description without an unsafe matcher 2026-11-26 14:02:31 +08:00
Ruilin Geng 69be60151e Merge pull request #9141 from deepseek-harness/refactor/mcp-manager-server-rows
feat(mcp-manager): declare a managed server as its own row beside the servers dictionary
2026-11-26 13:57:05 +08:00
ZiyaZhang 2850ff90f9 refactor(plugin-recommendations): take the official connectors from a generated catalog
List the seven official connectors in dsh-official-bundles as
CONNECTOR_BUNDLES, and let the official bundle catalog generator embed
OFFICIAL_CONNECTOR_CATALOG beside the on-demand catalog under the same
freshness check. Plugin recommendations read that catalog instead of a
hand-copied list, so the card of a connector the profile does not hold shows
its title and description in every shipped language, not only English and
Chinese. The skill's catalog entry and the catalog it loads are unchanged.

Catalog entries type their title and description as per-language text, which
the generator has always required.
2026-11-25 20:22:09 -08:00
imccyu 67ccd52835 Merge pull request #9285 from deepseek-harness/client-isolation-scoped-css-and-media
fix(client): keep plugin styles, theme reads, and media queries working under client isolation
2026-11-26 11:37:35 +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
imccyu c1093c65a1 test(lint): copy the Oxlint contract repository from the Git index
The private copy walked the live working tree with fs.cp while suites in the same gate created and deleted untracked mkdtemp directories inside it, so a vanished entry failed beforeAll with ENOENT. The sequential per-entry stat and chmod calls also pushed the Windows copy past the 90 s hook budget, after which afterAll removed the root under the still-running copy (ENOTEMPTY).

List the copied files from the Git index, minus files deleted in the working tree, copy them with bounded concurrency, and make afterAll wait for the copy to settle before removing it.

Fixes #9230
2026-11-26 00:32:27 +08:00
gengruilin 720075b06e feat(mcp-manager): declare a managed server as its own row beside the servers dictionary
The manager read every server that a deployment declared from one `servers`
dictionary in its row config. A patch that sets a row's `config` replaces
the whole config of the layers before it, so no layer could add or change
one server without restating the others. A dictionary entry has no
`disabled` key, and one invalid entry fails the manager row, so no server
starts.

`@deepseek-ai/dsh-mcp-manager/server` is a second plugin of the manager
package, and one row declares one server. Its config holds `serverName`
beside the fields of one `servers` entry except `enabled`, and the row
calls `ctx.mcpManager.register()`, the call that connector plugins already
use. A patch adds a server with `insert`, edits one by its row id, and
switches one off with the row's `disabled`. A changed row restarts alone,
and an invalid row fails alone.

The `servers` dictionary, its Settings namespace, the entry field
`enabled`, and the `disabled` status are unchanged, so no stored
configuration needs a rewrite. Rows and dictionary entries share one
namespace of server names: a row that names the server of a dictionary
entry fails alone, and a dictionary write that names the server of a
running row is refused. A row whose config carries `enabled` fails,
because a registration is enabled while it exists.

Refs #9134
2026-11-26 00:31:25 +08:00
Magolor 6da7ed3f6e refactor(session): keep the SQLite store's SQL in versioned .sql resources
The schema and every static statement of the SQLite Session store were
string literals in TypeScript, and the upgrade step from the frame layout
executed whatever the current schema constant held. They now live under
resources/sql: schema/vN.sql is the whole schema of one version and is
not edited once released, upgrade/A-to-B holds the statements of one
upgrade step, and store/ and derived/ hold the statements of the store
and of the derived-table runtime. src/sql.ts is their only reader.

Two internal views, segment_extents and session_heads, replace the SQL
fragments the store shared by string interpolation. Transaction control,
connection pragmas and the DDL generated from a derivation stay inline.
2026-11-25 18:47:26 +08:00
Chinesezjc 1b8b42fa54 fix(ci): pass only the environment secret name to the reusable job 2026-11-25 18:00:09 +08:00
Chinesezjc 799da26c32 fix(ci): read the approval token from the protected environment 2026-11-25 17:54:17 +08:00
Chinesezjc f7b143959f test(ci): share weighted approval routing assertions 2026-11-25 17:40:12 +08:00
Turtle 42e16d663f Merge pull request #9165 from deepseek-harness/turtle/default-mock-llm-185de0078cad
feat(webworker-preview): start the Preview on a keyless mock model
2026-11-25 17:32:27 +08:00
Chinesezjc 7ccf814fcb fix(ci): re-evaluate weighted approval on scoring events 2026-11-25 17:31:24 +08:00
winewill 36770db9ce ci(desktop): default packaging to stable and use channel checkboxes in publish workflows 2026-11-25 17:29:58 +08:00
Magolor cbc6457226 feat(session)!: store SQLite events as rows with derived tables
The opt-in SQLite Session store kept each durable write as one compressed
frame, so SQL could not see an event's sequence, type or time. It now
stores one row per event: the envelope members are columns and data is
JSON text, or one Zstandard frame when it is large. Segments use integer
ids and a segment_paths table that lists each Segment's history, so the
session_* views return a Session's events in one join, forks included.

Derived tables for model calls, tool calls, tool results and compactions
are written in the events' transaction and rebuilt from events when a
table is missing, its version changes, or its derivation was absent.

Opening a database runs ordered upgrade steps under src/migrations. The
first rewrites the frame layout (schema version 1) in place; a frame it
cannot read is set aside without blocking the other Sessions.

BREAKING CHANGE: the frameEvents setting is removed, and a database
upgraded to schema version 2 cannot be opened by earlier releases.
2026-11-25 17:23:45 +08:00
LegGasai f535813467 feat(forge): stage, unstage, and restore files in the local changes view (#9166)
* feat(client-ui-forge): stage, unstage, and restore files in the local changes view

The Unstaged scope of the local changes view stages and restores whole
files, and the Staged scope unstages them, each from an icon button on
the file header, the file menu, or a header button for every shown file.

A new forgePanel.localWrite Remote runs Git under the Session's sandbox
policy. Staging and restoring refuse a file whose change is not the one
the reader saw. Staging and unstaging return the index as a tree, which
the notice's Undo returns the index entries to. Restoring asks first.

The viewed mark draws as a ring, and a pane at most 380px wide shows a
file's writes under the pointer or once the keyboard reaches them.

Refs #9162

* test(client-ui-forge): give the older local diff fixtures the writable field

* docs(forge): document local writes on the subsystem page and refresh the catalogs

* test(client-ui-forge): run the local write specs on Windows

Refusals come from the recording sandbox instead of a POSIX stand-in Git,
the pathspec-magic file name is used only where the file system takes a
colon, and the batching case uses short names under the Windows path limit.

* feat(client-ui-forge): run local writes on the reader's authorization, outside the Session sandbox

A press in the changes view is the reader's own action, as archiving is for
the worktree service's removal of a checkout, so staging, unstaging, and
restoring no longer run under the Session's sandbox policy. They work in a
read-only Session and from a Session directory below the checkout's root.

ForgeLocalDiff.writable, the forgePanel/local-write-denied error, and its
notice are removed with the confinement they described. A restore passes
--no-recurse-submodules.

Refs #9162

* fix(client-ui-forge): refuse writes that reach past the chosen file

Three review findings on the local writes of the changes view:

- A deleted file whose path holds a directory is refused before anything
  is written. Git takes a path for the directory and everything in it, so
  staging the deletion staged those files and restoring the file deleted
  them.
- A submodule is offered no restore. git restore exits with success and
  leaves the commit it has checked out, so the view reported a
  restoration that did not happen. ForgeDiffFile gains `submodule`, read
  from the 160000 mode of the patch header.
- The file menu's rows for the writes cannot be activated while a write
  is in flight or the scope is read again, as the header's buttons.

Refs #9162

* docs(forge): record why local writes carry no filter guard

* test(web): wait for the last file's text before reading its scroll position

The file navigation case read the scroll position two frames after the
last file drew. A drawn file shows a row for the lines after its last
hunk until the Host answers the read of its text; the row then leaves,
the scroll range shrinks by its 26px, and the position falls from 3347
to 3321. When the answer took longer than two frames, the case recorded
the earlier position and failed with "expected 3321 to be 3347".

The case now waits for that row to leave. With the Host's answer delayed
by 600ms the old wait fails with that message and the new wait passes.

Refs #9162
2026-11-25 08:04:39 +00:00
Turtle 03439d43c7 feat(webworker-preview): start the Preview on a keyless mock model
Add the experimental @deepseek-ai/dsh-llm-mock plugin, which registers a mock
provider route that answers every call with fixed text. The Preview image
seeds its profile patch with the mock row, starts new Agents on it, and keeps
the first-run API-key prompt closed. Users can still add a real provider key
in Settings > Models and select that model.

Refs #9163
2026-11-25 15:16:00 +08:00
Xu Hanxiang 7355ddbb7d Merge pull request #8966 from deepseek-harness/feat/liveshare-share-reconnect
feat(liveshare): 限制断线重试并支持原链接立即重连
2026-11-25 07:07:23 +00:00
liukx0205 e340e40c5b test(sidechat): cover the package and document it
Restore the unit tests for the control, resource provider, views and
plugin lifecycle, adapted to the /side command, so the per-file coverage
gate passes. Add the package README pair and its model-experience audit
entry for the README gates.
2026-11-25 14:44:50 +08:00
liukx0205 656036e2c9 fix(sidechat): keep /side consumable and align with the release version
The command stays available so a typed /side never reaches the model as a
message; the control already declines a source with a fork in flight. The
/client entry re-exports its slot, resource and locale augmentations. The
side tab derives its phase from the retained Session's open state instead of
copying the subagent Sidebar's hero derivation. Drop the unconsumed task set
from the control. Match the root release version and list the package in the
release family.
2026-11-25 14:44:50 +08:00
liukx0205 09a85dbac5 feat(web): optional side conversations in the right Sidebar
Add @deepseek-ai/dsh-client-ui-sidechat, an experimental Client plugin that
default profiles do not install. The /side command forks the conversation at
its latest completed Turn through the ordinary Session fork and opens the
child in the right Sidebar of the Session on screen, rendered through
conversation.content with a fixed embedded Chat view. The child is an
ordinary Session listed under Ungrouped; tabs are window-local and restore
from the saved Sidebar layout.
2026-11-25 14:44:50 +08:00
Turtle 373769c622 Merge pull request #9168 from deepseek-harness/turtle/add-preview-fixture-rule-578e68ea890f
docs(agents): require PR preview showcase to show changed rendering
2026-11-25 12:58:00 +08:00
Turtle 2ee08e0abd docs(agents): move preview showcase rule to root AGENTS.md
Refs #9167
2026-11-25 12:35:06 +08:00
LegGasai 3fef3cd8bc Merge pull request #9116 from deepseek-harness/fix/npm-zod-single-install
fix(deps): install one zod copy from npm
2026-11-25 12:29:11 +08:00
LegGasai cc2d601b8b fix(deps): keep the exact zod pin
Review asked to keep zod pinned instead of loosening it to ~4.6.6, so every installation runs the reviewed version.

- The 106 manifests return to exact 4.6.6, as on master.
- dsh-connector-feishu moves from ^4.4.3 to 4.6.6.
- dsh-acp, dsh-subagent-acp, dsh-experimental-subagent-oar and dsh-session-snapshot pin zod 4.6.6, so npm places that version before the ACP SDK's zod peer can hoist a newer one.

The layout gate and its messages name the pin instead of a range.

Refs #7501
2026-11-25 12:16:22 +08:00
ZiyaZhang 00e4adcaa1 feat(plugin-recommendations): recommend official connectors and install them from the card
List the seven official connectors in the official-plugins skill catalog and
offer one when the user's own request needs its app. The skill's catalog
entry names only the apps whose connector a card could offer, so a task that
needs the app of an enabled connector does not load the skill.

A click on the card of a connector the profile does not hold installs it at
the DSH version through Plugin Manager, switches on the Connectors tab, and
enables it; install scripts that pnpm stopped on need a separate approval on
the card. The card of an enabled connector opens its page in Plugins to
connect the account.
2026-11-24 20:02:56 -08:00
imccyu 1f1590430e refactor(ui-renderer): bind document hooks to the application mount 2026-11-25 02:55:56 +08:00
imccyu 897ab671f6 feat(ui-renderer): scope opted-in package styles on existing slot roots (#9033)
* feat(ui-renderer): scope opted-in package styles on existing slot roots

Share the package style policy between slot dispatch and stylesheet installation. Preserve global themes, root identity and component state through style-only toggles, including nested Factory, HOC and list output.

* fix(dev-web): keep launcher validation independent of package sources

* refactor(ui-renderer): identify generated scope CSS as stylesheet content

* fix(client): keep panel indicators visible under style isolation

Position a shared indicator area on the Session panel toggle. Jobs, Subagents, and Forge paint their own marks without crossing package scopes.

* refactor(ui-renderer): fix each package style scope for the page

Stamp the content supplier on existing slot roots. Read its page-owned mode when registering content and writing stylesheets instead of subscribing the render tree to live policy changes.

* fix(ui-renderer): keep scoped styles with their actual package

Resolve Loader aliases against the page module table and stamp contributions from the renderer’s own module source. Let a valid package stylesheet take over a path rejected during scope preflight or by the destination.

* fix(client-modules): declare the row callback receiver-free

* refactor(ui-renderer): scope styles from their module records

* test(ui-renderer): verify module-record style scoping

* chore(ui-renderer): restore scoped slots to the PR base

* fix(ui-renderer): mark slot roots with their supplying module

* refactor(ui-renderer): bind Factory child slots once per supplier

An outlet belongs to whoever called renderSlot for it, wherever it later
renders. A Factory's child-slot methods are now kept per Factory and per
supplier: the Factory itself for its own Component and fallback locals,
the occurrence's caller for a local it selected. One caller mounting its
local in several places shares one method, and no per-mount binding or
extra occurrence context field remains.

* refactor(ui-renderer): scan a Factory's chain children once

Whether a Factory declares a chain child is recorded once per Factory
beside its per-supplier child-slot methods, instead of once per
supplier. The Factory kit assigns `renderSlot` and `renderSlotChain`
by name rather than copying whichever keys the methods object holds.

* test(client-runtime): expect data-plugin on the mounted slot root

The slot outlet names its supplier on the existing root; the test runtime registers without a package, so the two DOM snapshots gain data-plugin="".

* test(web): launch the panel indicator scenario per isolation mode

The Host reads an entry's client isolation when its plugin starts, so
updating that field on a running entry never reached the boot graph and
the scenario waited forever. Each mode now starts its own Host: the
shipped composition, and one whose overlay declares style isolation for
the panel and the two packages drawing on its toggle. Both check the
boot graph first, then run the same interaction and indicator
assertions.
2026-11-25 02:52:49 +08:00
imccyu f5d022c58e feat(client): run script-isolated package bundles in iframe Realms
Publish the unstable per-entry script switch in the Host boot graph and keep opted-in bundles out of the Main Realm batches. Activate the Realm providers before isolated code, reuse a frame across its package-local chunks, and release it on replacement or teardown. Dev Web can opt entries in through a transient final overlay.

Refs #8131
2026-11-24 21:33:52 +08:00
Turtle cdbfa8bb1c Merge pull request #6542 from deepseek-harness/plugin-filter-all-locales
feat(web): add plugin references and cross-language plugin filtering
2026-11-24 20:11:33 +08:00
LegGasai dfe4bfa821 fix(deps): declare zod wherever a dependency requires it as a peer
dsh-subagent-acp, dsh-experimental-subagent-oar and dsh-session-snapshot depend on @agentclientprotocol/sdk, which requires zod as a peer, without declaring zod. Installed alone they resolve one zod today, but where npm places an unprovided peer depends on the order it processes the tree.

- The three packages declare zod with the range other DSH packages use.
- verify-npm-install-layout reads every DSH manifest and rejects a package whose dependency requires zod as a peer while the package declares none, so the rule also holds outside the @deepseek-ai/dsh graph.

Refs #7501
2026-11-24 18:45:47 +08:00