* 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
* fix(cua-windows): keep accessibility reads when elements disappear mid-traversal
A descendant that disappears during a UI Automation read becomes a [One child could not be read.] or [Child list incomplete.] row and sets hasUnreadableElements, matching the macOS provider. Only a vanished window root still fails with STALE_SNAPSHOT. Incomplete trees are returned in full under showDiff and are not used as a diff baseline.
Refs #9205
* docs(cua-windows): document partial accessibility reads on upgrade
---------
Co-authored-by: Dudu-0223 <290591114+Dudu-0223@users.noreply.github.com>
* build(deps): upgrade the client to React 19
Raise react and react-dom to ^19.3.1 in every workspace manifest and the
root @types/react and @types/react-dom to 19.3, then regenerate the
lockfile on the current master. The website keeps the React 18 optional
peer of @docsearch/react 3.8.2, whose peer range excludes React 19.
Refs #9214
* fix(client): adopt React 19-only ref types and coverage arm
These adaptations compile or cover only under React 19:
- RefObject replaces MutableRefObject, which @types/react 19 deprecates;
RefObject.current is writable only in the React 19 types.
- Tooltip excludes its React 18 element.ref arm from coverage instead of
the React 19 props arm, which now always runs, and writes an object
ref through RefObject.
- THIRD_PARTY_NOTICES.md takes the React 19.3.1 repository URL.
Refs #9214
* docs(upgrade-guide): describe the React 19 client runtime
Client plugins receive React 19 from the shared module table and compile
against React 19 types; the guide lists the runtime and type changes
plugin authors must handle and the new test-runtime peer range.
Refs #9214
* test(ui-directory-picker-browse): wait for the passive refocus after a failed pick
The browser re-parks focus on the edit zone in a passive effect after the
commit that shows the failure alert. The test asserted focus right after
the alert appeared, so on Windows CI under React 19 it could run before
the effect. It now waits for the focus.
Refs #9214
* 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.
define(fn, options) now returns runner(handle, args, options), so one
definition serves every environment and tools that select an environment
per call no longer keep one runner per handle.
Refs #9338
* feat(agent-loop): recover inbox claims before step start
* fix(acp): withdraw pending prompts at settlement
* fix(goal): withdraw stale rounds when restoring agents
* refactor(agent-loop): fold inbox claims with the queue
* fix(agent-loop): preserve the inbox wire conversion
* refactor(agent-loop): clarify inbox projection updates
* refactor(agent-loop): keep inbox recovery internal
* refactor(agent-loop): simplify inbox recovery
* refactor(agent-loop): clarify inbox claim recovery
* refactor(agent-loop): clarify when input returns to inbox
* refactor(agent-loop): let the inbox own claim return
The inbox projection groups queues and claims symmetrically and
ReactLoopInbox decides whether a failed turn returns its claim from its
own clear() and claim() calls; the loop's running phase keeps no return
flag. Resume restores the interrupted claim through an unconditional
inbox call after announce. The projection tests become a transition
table and the two Agent Notes merge into one.
* fix(agent-loop): drop inherited claims at a fork's seed cut
A cold read of a crashed parent closes its open turn as interrupted
inside the inherited prefix, so the child projected the parent's claim
and restored it into its own queue. The inbox fold now empties both
claim lists at an inherited session/end-seed; a fork keeps the parent's
queue but never the input the parent had taken out of it.
* test(agent-loop): resume a stored fork of a crashed parent without reviving its claim
* fix(compaction-basic): check model-switch pressure at pre-step so a failed switch returns the input
The switch check ran in agent/request, after step/start had settled the
claimed batch, so a Stop, a failed summary, or an exit during that
summary lost the prompt. The step's route is already fixed at
agent/pre-step, where the inbox still owns the claim; the check now
prices the selected route there and the agent/request listener is gone.
* docs: regenerate the event graph after compaction-basic left agent/request
* fix(agent): keep the model-switch notice ahead of context snapshots
With the switch compaction at pre-step, the runtime-context snapshot is
already part of the admitted batch when the notice is added, so an
appended notice landed after it. The notice now precedes the first
context snapshot, keeping the order the model saw before; the
model-switch-compaction snapshot is refreshed for the compaction events
now preceding step/start.
Conflicts with the Models settings layout change on master:
- ProviderEditor keeps the read-only saved key and takes master's refused-save
marking; CustomProviderCard passes the key failure through `invalid`.
- The Chinese locale keeps master's wording; the three removed hint keys stay removed.
- Browser specs find an open card by its row name, since an open row has no
Edit button, and the ARIA outputs are refreshed on the merged tree.
* 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
While no base branch is chosen, a branch shown in place of the Session's
checkout was compared with the remote's default branch, as the Session's own
checkout is. A repository without a remote then had no fork point, and a
Session that had commits of its own before it delegated saw those commits in
the delegated branch's changes.
The automatic fork point of a head branch is now its merge base with the commit
the Session's own HEAD names, under the name of the Session's checked-out
branch or the abbreviated commit of a detached HEAD. The base listing leaves
that branch out, because the automatic base already stands for it. The
Session's own checkout keeps its rule.
The head picker of the local changes view lists the Session's own checkout and
the repository's local and remote-tracking branches, and no longer lists
delegated Sessions. A branch that a worktree of the repository has checked out
is read in that worktree with every scope; a branch that no worktree has
checked out is read from its commits in the branch scope alone. A scope names
the branch by its full ref, and each read looks the worktree up again and
confirms that a checkout of the same repository holds the branch there.
The Session panel's local changes row shows in every Git checkout, with an
empty size while the branch scope changes nothing, so the view opens from a
clean checkout.
`forgePanel.diffBases` and `forgePanel.localCommits` take the head as a branch
ref, `relatedCheckouts` is removed, and the package no longer depends on the
subagent package. The API catalog, the config catalog, and two web expected
outputs are regenerated.
A lock is a live writer, not damage. SQLite holds its locks as operating-system
locks that the kernel releases when a process exits, so a lock that outlives the
busy timeout belongs to a process that is still inside it. Replacing its file
does not stop that writer: it keeps appending to the moved bytes while the new
database starts empty, splitting one history across two files.
Windows made the inconsistency visible: it refuses to move a file another handle
holds open, so the replacement could never work there, and the tests had to
assert different outcomes per platform. The rule is now uniform and simpler.
- `recovery: replace` keeps its meaning for damage only: a database this build
cannot read moves to `<name>.unreadable-<timestamp>` and an empty one takes
its place, so every byte survives and Sessions stay available.
- A lock always fails with `SESSION_STORAGE_LOCKED` after the busy timeout, on
every platform, and the database is left where it is.
- A damaged file whose move fails is never replaced either: returning false
reports the storage fault instead of discarding the only copy of the bytes.
- `ReplaceReason` and the `locked` tag are gone; only damage reaches the tag.
This matches SQLite's own SQLITE_BUSY contract, LevelDB's LOCK behaviour, and
Chrome's singleton lock handling, which reports an owner it cannot prove dead
rather than breaking a live one. README, upgrade guide, and the decision record
state the rule in both languages.
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.
Replace the Windows known-application list with provider-reported permission attributes. Shared consent treats records sharing any attribute value as one permission object, learns observed values on match, and revokes connected records together. macOS keeps its single authorization ID. Windows discovery IDs, window association and launch waiting are unchanged.
Close the six review findings against the event-row store, add provisioned
recovery, and make the derived tables' indexes actually reachable.
Data carried over from the frame layout:
- Carry over the readable prefix of a frame recorded longer than its lines.
The frame layout served whatever prefix a read asked for, so only a sequence
with no readable line gets a row no reader decodes.
- Drop lines past a frame's recorded range: the frame layout never read them,
so reporting them as damage would fail a read that used to succeed.
- Repeat the nearest readable event's `time` in the stand-in row instead of 0,
so `session_summary.last_event_time` stays a real instant.
- Tolerate an absent version 1 trigger or index. A build that narrowed the
frame layout dropped some, and losing a trigger costs no stored event.
- Refuse a child Segment that does not start where its parent ends instead of
giving it a history the frame layout rejected.
- Set aside a frame whose Segment row is absent, which the version 1 foreign
key never checked.
Derived tables:
- Compare every declared object (table, session view, indexes, further views)
so a dropped view or index is rebuilt rather than silently missing forever.
- Analyze once when no statistics exist and `PRAGMA optimize` on close. Without
statistics SQLite scanned every result in the Segment per tool call:
`session_tools` took 2.3 s on 84,000 tool calls against 22 ms analyzed.
Recovery, new `recovery` setting defaulting to `replace`:
- An absent database becomes a new empty one.
- A lock waits the busy timeout, then the file moves to
`<name>.locked-<timestamp>` and a new empty database takes its place.
- An unreadable file moves to `<name>.unreadable-<timestamp>` the same way.
- `report` keeps the previous refusal for a storage root another process
may write. A newer schema version is never replaced under either mode.
Documentation records the recovery setting, the raw-state damage behavior, the
compression limit on JSON queries, and the statistics step. 488 tests with full
coverage on the package sources.
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 upgrade from the frame layout replaced a whole frame when one of its
lines was unreadable, so a read that stopped before the damaged event
failed after the upgrade although it succeeded before. A frame that
splits into its recorded lines is now carried over event by event, and
only an unreadable event gets a stand-in row.
Drop the two indexes on sessions that no statement or documented query
uses, and state the cross-build limitation of derived tables exactly.
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.
A staged removal leaves only the environment-fallback placeholder in the
input. The environment status behind the saved key is unknown until Apply,
so the field reports none.
After Clear API key, the field shows the placeholder and environment hint of a
route without a saved key. The "Apply to clear the saved API key. Environment
authentication will be used" text is removed with its locale key.
* 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