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).
A dynamic Client bundle that imports a dependency's stylesheet, such as
katex/dist/katex.css, now publishes the files that stylesheet's relative
url() values reference under lib/assets/vendor/<dependency>/<path>, with
the same content revision and asset-route URL as the package's own
assets. Each @font-face keeps only its first url() source, so one font
file per face is published. Fonts (.woff2, .woff, .ttf, .otf) become
package-asset media types for the asset route, the WebWorker preview
copy, and the asset import declarations. verify-client-packages reads
the url() references of imported dependency stylesheets, and rejects a
bare stylesheet import that does not resolve from the package.
* feat(office): add frame-forwarded preview and bundle integration
* feat(office): present document and slideshow frames with video
* test(office): simulate video frame cloning across preview sessions
* fix(frame-forwarding): preserve document proportions during resize
* fix(office-preview): resume frames after tab switches and restore margin dragging
* refactor(office-preview): share submitted geometry and simplify fixture cleanup
* refactor(office): remove obsolete viewport discard comparison
* refactor(office): take shared textures from the dsh-shared-texture services
The Office preview spec helper imported the bridge and lease types from the removed @deepseek-ai/dsh-shared-texture-client-types package, passed frame forwarding the failureSource() adapter that its Client service no longer declares, and the specs stubbed globalThis.dshDesktop, which frame forwarding no longer reads.
The helper imports the types from @deepseek-ai/dsh-shared-texture/client and drops the adapter, and the specs stop stubbing dshDesktop. The shared-texture Agent Note drops the PR citation from its NodeNext declaration check sentence, and the README model-experience registry rewords the dsh-shared-texture entry.
* fix(office-preview): take the React 19 ref types
The client moved to React 19, whose types require an initial value for `useRef` and type a DOM ref created with `null`
as `RefObject<T | null>`. Refs that start empty now pass `undefined`, the surface takes its element refs as
`RefObject<HTMLDivElement | null>`, and `RefObject` replaces the deprecated `MutableRefObject`, as the rest of the client
does.
* fix(office-preview): align the producer and receiver tests on Kit 0.2.4
* chore(office-preview): refresh the client slot catalog
* fix(office-preview): drain document releases and handle slideshow frame failures
* refactor(office): expose Kit discovery and editor opening on officeKit
* fix(office-preview): preserve slideshows across same-client event reconnects
* refactor(frame-forwarding): use single-producer channels and retain Office slide previews
* fix(plugins): show native Office preview only in Desktop
* fix(office-preview): reconcile slideshow and document lifetimes on reconnect and refresh
* fix(office-preview): simplify slideshow recovery and retain hidden fallback views
* refactor(office-preview): type document operations and detach playback before refresh
* feat(office-preview): lease documents by tab and reopen expired previews
* fix(office-preview): retire slideshow mounts without blocking channel recovery
* fix(office-preview): restore the last shown slide on channel reconnect
* fix(office-preview): preserve channel loss while waiting for the first viewport
* fix(office-preview): cancel slideshow readiness when playback stops
* test(web): exclude desktop-only bundles in plugin-config e2e
* fix(office): cancel retired viewport waits and count successful redraws
* fix(office-preview): await timed-out open cleanup on plugin disposal
* perf(client-ui-stats): add a PTC fold and publication diagnostic
One root run_code call dispatching 1,000 to 10,000 settled subcalls reports
the Statistics fold, the first and repeated Code-Mode publication, and the
live assembler window. Threshold-free, outside every CI lane.
* perf(client-ui-stats): fold tool calls into Context-private indexes
Every event copied the growing call and dispatch-start records, so one
Code-Mode root call with n nested dispatches cost O(n^2). The four
fold collections are Maps the Context mutates in place now, and update()
returns the same State.
The call list stops sorting the whole index: a Context receives its
matches in ascending seq, so insertion order is the order the table
lists.
* perf(client-ui-stats): publish only the bounded Code-Mode prefix
The Code-Mode node rebuilt every step metric, including a sort of every
dispatch, for each settle, though it publishes at most 12 rows. It now
materializes that prefix from the index, republishes the node it already
published while the prefix is unchanged, and coalesces publications to
one per frame. Targeted snapshot updates skip the rebuild when every
upserted node is the published one.
* docs(client-ui-stats): record the linear Statistics fold
Agent Note for the in-place call index, the bounded Code-Mode prefix, the
retention bound, and the publication cadence, with the measured before and
after table.
* fix(client-ui-stats): reuse the node the Assembler already holds
The Code-Mode Definition kept its own module-level WeakMap of published
nodes, keyed by State. The Assembler already stores each Context's last
published node in `context.current`, which is where the Chat Definition
reads it, so the extra cache hid state ownership for nothing.
It also missed in two reachable cases: a failed dispatch returns a fresh
State, and `callList` rebuilds every row past the step text budget as a
truncated copy, so an unchanged prefix arrived as fresh objects and the
reference comparison failed. The snapshot rebuild the cache was meant to
skip then ran anyway.
Read `context.current` instead and compare rows field by field. Edited
the publication comment to state the real cadence: the Assembler
materializes an `animation-frame` publication after three frames.
* docs(notes): correct the Statistics fold note against the code
Three statements did not match what shipped. The scalar counters the
retention bound leaves alone are `toolPairs`, `toolMs`, `toolOpen`, and
`toolMissing`, not `pairs`/`ms`/`open`/`missing`, and they are written by
the native `tool/call` and `tool/result` branches rather than by the
dispatch branch; only `tools` and `toolErrors` count every dispatch. The
retained records are the first `CALL_LIMIT` displayable dispatches, not
the first `CALL_LIMIT` dispatches, so a nested runner no longer takes a
slot. The publication cadence is three animation frames, not one.
* test(scripts): expect the Statistics diagnostic in the perf inventory
The manual `test:web:perf` inventory is pinned item by item, and the new
`client-ui-stats` entry left the expectation behind, so the required
coverage partition failed on it.
---------
Co-authored-by: imccyu <cc.yu@deepseek.com>
* feat(ui-tool): fold program sub-call lists by default
* feat(ui-tool): show a program call as one row over its source and sub-calls
A run_code or cua_run_code call renders as one collapsed row with the
program's description and its sub-call count. Opening it lists the PTC
source code row and then the sub-calls. A failed call shows its first
error line in place of the count, and an interrupted call shows that it
stopped.
A call with more than 32 sub-calls lists the first 10 and the last 10
around a row that states how many are omitted. The three numbers are
constants in ToolCallTree.
The row replaces the separate collapsed count row. A collapsed program
call mounts neither its own toolview nor its sub-calls.
* feat(ui-tool): title the program source row "Source code"
The row also heads cua_run_code programs in Standard mode, where "PTC"
names a different agent mode.
* test(web): refresh the scoped PTC round goldens for the program call row
The persistent-in-memory variant of the PTC round renders the same
program call row as the per-call variant.
* fix(ui-tool): keep the program call state whole and move the error line to the source row
A failed program call shows "Failed" after its description, the way an
interrupted call shows "Stopped". The count and both states never
shrink, so a narrow row truncates only the description. The error line
could shrink together with the description, which clipped "Stopped"
beside a long description and hid a short description beside a long
error line.
The source code row shows the first error line without its "Error: "
lead.
* feat(ui-tool): mark the program call row with a hub icon
Add the hub-outline product glyph, a central node wired to three
satellite nodes, and use it for the program call header instead of
layers-outline, which keeps its other uses.
* feat(ui-tool): reveal omitted program sub-calls 50 per side on click
Lower the sub-call list threshold to 24. The omission row becomes a
"Show more (N hidden)" button that lists up to 50 more sub-calls on each
side per activation; reopening the program call returns to the first and
last 10.
* docs(ui-tool): describe the sub-call list constants as the initial window
* feat(ui-tool): list the first 20 sub-calls and double the list per show-more click
A program call with more than 24 sub-calls now lists its first 20 followed
by the "Show more" row; each click doubles the listed count (20, 40,
80, ...) until every sub-call is listed. Reopening the program call returns
to the first 20.
* fix(ui-tool): show a failed program call's error line with its "Error: " lead
The source code row of a failed program call shows the result's first
line unchanged, like every other failed tool row. The "Error: " lead is
the tool pipeline's model-facing failure text; removing it in the card
with a pattern match edited recorded text for one tool variant only.
* feat(ui-tool): render a program call's own row through a dedicated source row
`run_code` and `cua_run_code` register `SourceCodeRow` in
`tool.call.toolview`. It shows the program and its output, with the
first error line on failure, and no description, because the program
call's header row shows it. `GenericToolCard` keeps no program-call
branch. Image labels in flattened result text move to
`formatResultImage`, which both rows use.
The two registrations add two occupant lines to the
`tool.call.toolview` slot report, so its catalog budget rises to 136.
The MCP manager takes each server from its own `@deepseek-ai/dsh-mcp-manager/server` row and no longer reads a `servers` list, so the Connectors tab cannot keep custom servers in the manager's Settings namespace. The `connectors` Host service now keeps each custom server as the row `mcp-server-<name>` of the profile patch, and it lists every MCP server row of the composition, including a row that is switched off and a row that did not start.
Reading: the stream `watchServers` replaces `listServers()`. It sends the list when the browser subscribes, after each change made through the service, after `app-boot/config-reload`, and after `plugin-manager/changed`. Each server carries its row id and one of three states: on, off, or failed with the row's error. The revision a change names is a digest of the rows instead of the Settings revision. The config field `mcpManagerNamespace` and the list's `writable` flag are removed: the service needs the configuration editor, the plugin manager, credentials, and the MCP manager, and it reports the section as unavailable when one of them is absent.
Writing: `saveServer(draft, revision, id?)` inserts a new row through the configuration editor, or replaces the config of the row `id` names, after it checks the config against the row plugin's exported `Config`. A row that is switched on must run after the write; when it does not, the configuration editor restores the profile patch and the save is refused with the row's failure. A row that is off is written without starting, and a row that did not start is started with the new config, so both can be edited. Secrets are stored after the row is written, and a reference is deleted only when no other row uses it, whether that row is on or off. `removeServer(id, revision)` removes only a row the profile patch adds. `setServerEnabled(id, enabled, revision)` switches the row through `pluginManager.setPluginEnabled` and reports every outcome other than `applied` as a refusal.
OAuth: a server that is on signs out through the manager. The manager does not hold a server that is off or did not start, so the service deletes that row's grant record itself, unless another row or a registered server uses the same key. Accounts are registered for the OAuth rows that are on.
Browser: the store follows the stream instead of reading after each change and after each Settings event. A row shows why it did not start. The page of a server that is off or did not start keeps the form; only a server that is on has Test connection and the account section. Switching a local command on asks for the risk confirmation, as saving one that the save starts does, and the form no longer has an `enabled` field. When the row of an open page is removed or can no longer be read, a notice takes the page's place. The rows of the header, environment, and argument lists keep their keys while rows are added and removed.
Two style defects seen on the real page are fixed: the validation lines named a color token that does not exist and fell back to the secondary label color, and the button of a notice wrapped below a long message.
The save checks a config with `Config` of `@deepseek-ai/dsh-mcp-manager/server`, and the grant deletion builds the record key with `credentialKey` of `@deepseek-ai/dsh-credentials`, so the package declares both packages as peer dependencies. `scripts/package-dependency-policy.ts` lists the `Config` export under `PEER_REQUIRED_HOST_EXPORTS`; this policy entry needs the domain owner's confirmation.
The Web e2e asserts the row and its override in the profile patch, the stored token, the switch, and the removal of both. The READMEs, the Agent Notes that described the Settings namespace, and the generated catalogs describe the rows.
The package gains a Host half. The `connectors` service lists the MCP
manager's Settings servers with secrets redacted and runs each save,
removal, and switch as one Host operation over Settings, credentials,
and the manager; a change names the revision the list read and fails
with `connectors/conflict` when Settings moved, or `connectors/refused`
at the first refused step. It registers each configured OAuth server's
account with `ctx.mcpAccounts` under `mcp:<name>`. `mcpManagerNamespace`
names the Settings namespace it edits.
The tab declares the `connectors.custom` slot below the official
connectors and holds the section's view in its own state. The browser
half registers the custom servers section there once the `connectors`
and `mcpManager` Remotes exist: the list with each server's switch and
account status, **Add MCP server** beside the heading, and a server's
page in place of the tab's lists, below **Back**. The Plugins page
package is unchanged.
The package splits into Host and Client compiler faces behind a
solution-only root, exports `./remote`, `./typert`, and `./types`, and
builds with the Host phase. The liveshare endpoint classification marks
the four Remote methods owner-only. The `connectors-tab` Web expected
output gains the section's heading, button, and empty state.
The README pairs of the package, the experimental group, and the MCP
manager, and the Agent Note, state the feature. The service joins the
subsystem page and capability-seam registries, and the generated
catalogs, the translation pairings, and the lockfile follow.
The editor had one write, `edit()`, which replaces the config of a row
whose plugin is running. Nothing added a row to the profile patch or
removed one, and `edit()` rejects a row that is switched off or failed, so
a config that makes a row fail could not be corrected through the editor.
`insert()` appends a row to the profile patch and starts it. `remove()`
deletes a row that the profile patch inserted, together with the patch's
override items for that row, and `configuration()` marks such a row as
`inserted`. `editRow()` replaces a row's config as `edit()` does and also
accepts a row that is switched off or failed: that row stores the config
as given, and its plugin validates it at the next start. A written row
that is switched on must be active after the reconciliation. Otherwise the
file gets its prior content back, and the call rejects with the activation
diagnostic.
The four writes share the lock, the higher-layer check, the atomic write,
and the restore. `edit()` keeps its checks and changes in two cases. When
an edit resets an override to the inherited config and deletes the emptied
patch item, the comment above that item stays in the file; for the first
item it is the file header. When the reconciliation with the prior patches
rejects after a rejected write, the caller receives the rejection of its
own write, and the second rejection is logged as a warning.
The editor reads the root context in one place, so its entry in the
root-read baseline drops from 3 to 1.
Refs #9155
* 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>
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
* 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>
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
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.
* 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
* 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
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.
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
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
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
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.
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.
* 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
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
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.
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.
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.