dsh-local-link 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,45 @@
2
2
 
3
3
  All notable changes to this project are documented here.
4
4
 
5
+ ## 1.1.1 — 2026-09-12
6
+
7
+ ### Changed
8
+
9
+ - Moved the supported DeepSeek Harness baseline to `0.1.5-rc.1` and expanded the optional Host peer contract for the exact `0.1.5-rc.1` and `0.1.5-rc.2` packages.
10
+ - Updated direct development contracts to `0.1.5-rc.1` while preserving the Local Link gateway, pairing, and trusted-private-LAN boundary unchanged.
11
+ - Documented the new Harness `main`/`rightbar` AppFrame alongside the retained session, composer, sidebar, Settings, and overlay slots used by Local Link.
12
+
13
+ ### Validated
14
+
15
+ - Composed and booted clean Web profiles with the packed plugin source on Harness `0.1.5-rc.1` (`latest`) and `0.1.5-rc.2` (`next`).
16
+ - Rechecked the packed `1.1.1` artifact on `0.1.2-rc.1`, `0.1.1-rc.2`, `0.1.1-rc.1`, and `0.1.0-rc.8`: every isolated profile passed plugin peer checks, pairing, authenticated HTTP and WebSocket traffic, immediate socket closure on revoke, and post-revoke rejection.
17
+ - Verified desktop Local Access and QR generation plus responsive activation and navigation at `390 × 844` without client exceptions on both exact Harness versions.
18
+ - Passed typecheck, all 98 automated tests across 16 files, production build, and package dry-run against both `0.1.5` RC contract sets.
19
+
20
+ ## 1.1.0 — 2026-09-07
21
+
22
+ `1.1.0` updates Local Link for DeepSeek Harness `0.1.2-rc.1` while preserving the existing trusted-private-LAN product and security boundary. It keeps the stock Harness client, session state, permissions, and live stream instead of introducing a second remote client.
23
+
24
+ ### Changed
25
+
26
+ - Migrated the browser client to the DeepSeek Harness `0.1.2-rc.1` Cordis context, API session controller, UI renderer/session services, session projections, and subagent contracts.
27
+ - Pinned the direct development contracts to the exact RC and moved the plugin's Cordis peer contract to `^4.0.2`.
28
+ - Kept the previous trusted-LAN scope after the RC removed method-specific transport tiers: Local Link now rejects configuration, credential, native Host-action, and agent-preset-authoring RPCs at its own gateway.
29
+
30
+ ### Fixed
31
+
32
+ - Revoking a paired device now immediately closes every open Local Link WebSocket tunnel authenticated by that device, while leaving other paired devices and `trusted-lan` connections untouched.
33
+ - The mobile appearance control now follows the left drawer transition instead of appearing abruptly while the drawer opens or closes.
34
+ - Current session statistics now round fractional token throughput consistently instead of exposing the raw floating-point tail.
35
+
36
+ ### Validated
37
+
38
+ - Passed the full TypeScript, test, build, peer-dependency, and package gates against the exact `0.1.2-rc.1` contracts.
39
+ - Passed all 98 automated tests across 16 test files, the production dependency audit with no known vulnerabilities, and `npm publish --dry-run` for `dsh-local-link@1.1.0`.
40
+ - Booted the installed `0.1.2-rc.1` Web profile with Local Link, completed pairing and native browser authentication through the Ethernet gateway, verified the loopback-only Settings RPC returns `403`, and revoked the test device.
41
+ - Verified the new client services in the live boot manifest, opened the desktop QR panel, and exercised the responsive AppFrame at `390 × 844` without browser console errors.
42
+ - Installed the packed `1.1.0` release into fresh `0.1.1-rc.2`, `0.1.1-rc.1`, and `0.1.0-rc.8` profiles. Every RC passed real-client Local Access, `390 × 844` responsive navigation, private-LAN pairing, authenticated HTTP and `/api/events.mux`, plus revoke with immediate socket closure and a subsequent `401`.
43
+
5
44
  ## 1.0.0 — 2026-08-29
6
45
 
7
46
  The first stable Local Link release. It keeps the focused same-LAN access and
package/README.md CHANGED
@@ -5,14 +5,20 @@
5
5
  [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
6
6
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
 
8
- Lightweight, self-hosted [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin for paired LAN access and a practical Mobile View of the existing DSH Web client.
8
+ Use the same [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web session from a phone, tablet, or another computer on your trusted private network. `dsh-local-link` adds one-time QR pairing and a responsive Mobile View to the stock DSH client—without a hosted relay, cloud account, native app, replacement chat UI, or second workspace picker.
9
9
 
10
- Open `Local access`, scan one QR code, and continue the desktop's currently selected Harness session from a phone, tablet, or another computer on the same private network. There is no hosted relay, tunnel provider, native application, account, replacement chat UI, or second workspace picker.
10
+ Open `Local access`, scan the QR code, and the paired browser arrives at the desktop's currently selected Harness session with the same live conversation, permissions, workspaces, and plugin surfaces.
11
11
 
12
- The stable `1.0.0` release also addresses the stock Web client's desktop-first behavior on narrow touch screens. It reorganizes the existing Harness interface into responsive drawers, compact session controls, and touch-friendly actions while keeping the same client, session, plugin slots, permissions, and live agent stream.
12
+ The `1.1.x` line supports DeepSeek Harness `0.1.5-rc.1` and keeps the stock Web client usable on narrow touch screens. It reorganizes the existing Harness interface into responsive drawers, compact session controls, and touch-friendly actions while keeping the same client, session, plugin slots, permissions, and live agent stream.
13
13
 
14
14
  > **Security boundary:** the gateway uses plain HTTP and is intended only for a trusted private network. Do not expose its port to the internet or use it on public Wi-Fi.
15
15
 
16
+ <p align="center">
17
+ <img src="docs/images/local-access-qr.jpg" width="960" alt="DeepSeek Harness with dsh-local-link open: one-time QR pairing to the current stock Harness session">
18
+ </p>
19
+
20
+ <p align="center"><sub>One Harness session, paired directly across the trusted LAN.</sub></p>
21
+
16
22
  ## Focused product scope
17
23
 
18
24
  Local Link is intentionally a small LAN companion for the existing Harness Web client, not a general remote-access platform. Its purpose is to make one path dependable: open the Harness instance already running on a computer from another trusted device on the same private network, then use the same sessions and interface in a browser.
@@ -63,16 +69,20 @@ The profile points at the checkout, so rebuild after changing client code and re
63
69
 
64
70
  ## Compatibility
65
71
 
66
- Compatibility is checked against exact DeepSeek Harness versions, including the real Web client, Local Access pairing flow, responsive navigation, Current session, and subagent surfaces. A successful package installation alone is not treated as compatibility proof.
72
+ Compatibility is checked against exact DeepSeek Harness versions—not inferred from a successful installation.
67
73
 
68
- | DeepSeek Harness | Local Link status | Notes |
69
- | --- | --- | --- |
70
- | `0.1.2-alpha.1` | **Supported prerelease** | `1.0.0` includes the native browser-authentication and stream compatibility required by this alpha. |
71
- | `0.1.1-rc.2` | **Supported baseline** | Primary development and complete repository verification target. |
72
- | `0.1.1-rc.1` | **Verified** | Core LAN, pairing, session, and Mobile View surfaces checked. |
73
- | `0.1.0-rc.8` | **Verified** | Core LAN, pairing, session, and Mobile View surfaces checked. |
74
+ | DeepSeek Harness | Local Link status |
75
+ | --- | --- |
76
+ | `0.1.5-rc.2` | **Verified next** |
77
+ | `0.1.5-rc.1` | **Supported release** |
78
+ | `0.1.2-rc.1` | **Verified** |
79
+ | `0.1.1-rc.2` | **Verified** |
80
+ | `0.1.1-rc.1` | **Verified** |
81
+ | `0.1.0-rc.8` | **Verified** |
82
+
83
+ All six rows were checked with the packed `1.1.1` source. Every exact version passed isolated profile composition, plugin peer checks, pairing, authenticated HTTP and WebSocket traffic, immediate socket closure on revoke, and rejection of the revoked device. The `0.1.5` rows also received the current real-client responsive check at `390 × 844`; historical responsive evidence remains recorded separately. `0.1.5-rc.1` is the development baseline. `0.1.5-rc.2` is an exact `next` check, not a promise about future movement of that tag.
74
84
 
75
- Versions older than `0.1.0-rc.8` are untested and unsupported. Every newer Harness prerelease is checked independently before support is claimed. See the full [compatibility policy](docs/COMPATIBILITY.md).
85
+ Only the exact versions listed above carry a compatibility claim. Alpha builds—including the removed `0.1.2-alpha.1` row—versions older than `0.1.0-rc.8`, and whatever package a moving `next` tag points to later are unsupported until checked independently. See [Compatibility](docs/COMPATIBILITY.md) for the evidence and remaining real-device boundary.
76
86
 
77
87
  ## Use
78
88
 
@@ -87,15 +97,11 @@ The invitation is one-use, expires after five minutes by default, and is replace
87
97
 
88
98
  Phone and tablet browsers automatically receive Mobile View when the viewport is at most 834 CSS pixels wide. The same responsive behavior can be previewed with browser device emulation; no URL parameter, user-agent switch, or second client is involved.
89
99
 
90
- <p align="center">
91
- <img src="docs/images/local-access-qr.jpg" width="960" alt="DeepSeek Harness with the Local access QR panel, one-time link, and Paired devices shortcut">
92
- </p>
93
-
94
100
  ## Mobile View
95
101
 
96
102
  The stock Harness Web interface is difficult to operate on a phone: persistent desktop navigation consumes the viewport, session controls compete with the conversation title, several actions depend on hover or long press, and subagent information is too dense for a narrow screen. Mobile View makes that existing interface usable without introducing a second client or duplicating Harness business logic.
97
103
 
98
- | Stock narrow-screen behavior | Mobile View in `1.0.0` |
104
+ | Stock narrow-screen behavior | Mobile View in `1.1.x` |
99
105
  | --- | --- |
100
106
  | Desktop navigation competes with the conversation | Workspace and session navigation opens as a dismissible left drawer |
101
107
  | Session metadata crowds the header | Context, model, access, preset, activity, and export move into a compact right drawer |
@@ -134,7 +140,7 @@ The responsive enhancements target viewports from 360 through 834 CSS pixels wid
134
140
  On the Harness computer, use `Paired devices` in the QR panel or open `Settings → Local access`. Each new browser starts as `My device`; its subtitle is detected automatically, for example `Phone · Chrome`, `Tablet · Safari`, or `Computer · Edge`.
135
141
 
136
142
  - `Rename` changes display metadata only.
137
- - `Revoke` invalidates the browser credential for subsequent HTTP requests and reconnects.
143
+ - `Revoke` invalidates the browser credential and immediately closes its open Local Link WebSocket connections.
138
144
  - A cleared cookie, private window, new browser profile, or revoked device needs a new invitation.
139
145
 
140
146
  Browsers do not reliably distinguish laptops from desktop computers, so both are shown as `Computer`.
@@ -177,7 +183,7 @@ The gateway does not create a second Harness session. During first connection it
177
183
 
178
184
  Authorization uses a 256-bit random cookie credential. Only its SHA-256 hash is stored. The editable name and detected device/browser text never grant access.
179
185
 
180
- The LAN authority is declared through Harness's official connection `trustedHosts` contract. This enables ordinary session API and WebSocket traffic without pretending that the phone is loopback; Settings, credentials, native Host actions, and agent-preset authoring remain loopback-only.
186
+ The LAN authority is declared through Harness's official connection `trustedHosts` contract. This enables authenticated session API and WebSocket traffic without pretending that the phone is loopback. Harness `0.1.2-rc.1` and the verified `0.1.5` builds authenticate the transport as a whole, so Local Link itself rejects the configuration, credential, native Host-action, and agent-preset-authoring RPCs that earlier supported Harness builds kept loopback-only.
181
187
 
182
188
  ## Configuration
183
189
 
@@ -250,14 +256,14 @@ Project documentation:
250
256
 
251
257
  ## Known limitations
252
258
 
253
- - LAN traffic is not encrypted in the current preview gateway.
254
- - Revocation blocks new requests and reconnects but does not yet terminate an already-open WebSocket.
255
- - A light/dark choice made from a remote browser is memory-backed by Harness `0.1.1-rc.2`; reload returns to the Host preference and resolves `system` against the remote device.
259
+ - LAN traffic is not encrypted; the current gateway uses plain HTTP.
260
+ - Revocation blocks new requests and reconnects and terminates every open Local Link WebSocket authenticated by the revoked device.
261
+ - A light/dark choice made from a remote browser is page-scoped in the supported Harness builds; reload returns to the Host preference and resolves `system` against the remote device.
256
262
  - Invitations use the highest-ranked private IPv4 interface detected at startup; choosing among multiple LAN interfaces is not exposed yet.
257
- - The shortcut that opens a specific Settings section uses a small semantic compatibility bridge because Harness `0.1.1-rc.2` exposes `openSection` only to onboarding.
263
+ - The shortcut that opens a specific Settings section uses a small semantic compatibility bridge because Harness does not expose a general settings-navigation service.
258
264
  - Harness's footer-action container needs a compatibility layout rule when the full-width Cordis action is present.
259
265
  - Mobile View targets viewports from 360 CSS pixels wide, but third-party fixed-width views, virtual keyboards, orientation changes, split-screen browsers, and operating-system text scaling still require real-device acceptance.
260
- - Plugin-owned buttons and text inputs use Harness `Button` and `Input` primitives and their semantic variants. Harness `0.1.1-rc.2` still has no public responsive-shell, spacing, or radius contract, so mobile geometry, responsive compositions, and the few missing primitive icons remain documented design-system compatibility risks.
266
+ - Plugin-owned buttons and text inputs use Harness `Button` and `Input` primitives and their semantic variants. Harness `0.1.5-rc.1` still has no complete public responsive-shell, spacing, or radius contract, so mobile geometry, responsive compositions, and the few missing primitive icons remain documented design-system compatibility risks.
261
267
 
262
268
  ## Development disclosure
263
269
 
package/SECURITY.md CHANGED
@@ -4,4 +4,4 @@
4
4
 
5
5
  Until a private reporting address is configured, open a GitHub Security Advisory in the repository. Include the affected version, deployment topology, reproduction steps, and expected impact.
6
6
 
7
- The current preview uses unencrypted HTTP on the local network. This is a documented limitation rather than a supported internet-facing deployment. See [docs/SECURITY.md](docs/SECURITY.md) for the complete threat model and safe-use boundary.
7
+ The current release uses unencrypted HTTP on the local network. This is a documented limitation rather than a supported internet-facing deployment. See [docs/SECURITY.md](docs/SECURITY.md) for the complete threat model and safe-use boundary.
@@ -8,7 +8,7 @@ The architecture follows six constraints:
8
8
 
9
9
  1. Keep the stock Harness listener loopback-only.
10
10
  2. Put the network boundary in a dedicated Host-side gateway.
11
- 3. Use Cordis lifecycle and Harness slots for all rendered UI; isolate the one settings-navigation compatibility bridge required by Harness `0.1.1-rc.2`.
11
+ 3. Use Cordis lifecycle and Harness slots for all rendered UI; isolate the settings-navigation compatibility bridge not covered by a public Harness service.
12
12
  4. Make automatic QR pairing and paired-device state explicit and revocable.
13
13
  5. Keep presentation text outside implementation code.
14
14
  6. Keep support diagnostics local, bounded, structured, and free of credentials or user content.
@@ -46,9 +46,9 @@ Configuration accepts only the wildcard `0.0.0.0` or an explicit private/loopbac
46
46
 
47
47
  After authentication, the gateway forwards the browser's original `Host`, `Origin`, referrer, and fetch-site headers to the loopback Harness listener. The Cordis profile patch supplies the gateway's current LAN authorities to the official connection module through its public `trustedHosts` option. Ordinary Harness API and WebSocket traffic can therefore pass the declared origin check without pretending to be loopback.
48
48
 
49
- Harness `0.1.2-alpha.1` additionally requires a native browser-authentication exchange. After Local Link pairing succeeds, the plugin asks the injected Harness connection service for an authenticated URL at the gateway origin, validates that the result stays on that origin, and lets the stock root consume the short-lived token. The gateway forwards Harness authentication cookies but strips its own device cookie before proxying, so the two credentials remain independent. Older release candidates do not expose this service and keep the direct-root redirect.
49
+ Harness `0.1.2-rc.1` and the verified `0.1.5` builds require a native browser-authentication exchange. After Local Link pairing succeeds, the plugin asks the injected Harness connection service for an authenticated URL at the gateway origin, validates that the result stays on that origin, and lets the stock root consume the short-lived token. The gateway forwards Harness authentication cookies but strips its own device cookie before proxying, so the two credentials remain independent. Older supported builds that do not expose this service keep the direct-root redirect.
50
50
 
51
- The connection module separately rechecks privileged configuration, credential, native Host-action, and agent-preset-authoring methods with an empty trust extension. Those operations remain loopback-only. `tests/trust-boundary.test.ts` exercises this split against the real connection package: a trusted gateway authority reaches ordinary dispatch while every privileged method returns `403`.
51
+ Harness `0.1.2-rc.1` and the verified `0.1.5` builds authenticate the connection transport as a whole and no longer apply the older method-specific loopback tier. To preserve Local Link's established scope, the LAN gateway rejects the former privileged configuration, credential, native Host-action, and agent-preset-authoring RPCs before proxying. This applies equally to `pairing` and `trusted-lan`; enabling `trusted-lan` never grants those Host administration operations. `tests/trust-boundary.test.ts` exercises the RC Host/Origin and browser-authentication fence, while `tests/gateway.test.ts` pins the Local Link RPC restriction including the renamed RC Settings methods and encoded-path handling.
52
52
 
53
53
  ### Authentication state
54
54
 
@@ -66,11 +66,13 @@ The loopback administration route exposes list, clear, and a narrow allowlisted
66
66
 
67
67
  `src/client.tsx` registers two normal Harness contributions: a compact desktop `sidebar.footer.action` that shows a QR code and copyable one-time link, and a desktop-only `settings.section` that manages paired devices and the local diagnostic report. It does not replace the root layout. The desktop surfaces use plugin-owned classes and semantic selectors; version-sensitive stock-DOM hooks are isolated in `src/mobile-layout.tsx` and documented below.
68
68
 
69
- The Harness `sidebar.footer.action` contract is a list, but `0.1.1-rc.2` renders that list as a horizontal flex row while the stock Cordis action reserves `width: 100%` with `flex: none`. Without a compatibility rule, Cordis reduces later actions to zero width. Local Link orders its entry first and changes only the footer container that semantically contains `.dsh-local-link-footer` into a vertical stack. The same scoped rule normalizes the list gap and removes the following action's private top margin so Local access, Cordis, and Settings keep one visual rhythm. The selector is anchored on the plugin-owned class and accounts for the slot renderer's `display: contents` wrapper; it never names a generated Harness class.
69
+ The `0.1.5-rc.1` browser graph is a normal Cordis `Context`. Session state comes from `@deepseek-ai/dsh-api-session-controller/client`; React slot hooks are supplied by `@deepseek-ai/dsh-client-ui-session/client`, and slot ownership/rendering comes from `@deepseek-ai/dsh-client-ui-renderer/client`. Agent-preset display reads `SessionSummary.projectionValues.agentPreset`, while subagent types come from `@deepseek-ai/dsh-subagent/client`. The removed `@deepseek-ai/dsh-client-runtime` aggregate is neither injected nor imported.
70
+
71
+ The Harness `sidebar.footer.action` contract is a list, but the supported Web client renders that list as a horizontal flex row while the stock Cordis action reserves `width: 100%` with `flex: none`. Without a compatibility rule, Cordis reduces later actions to zero width. Local Link orders its entry first and changes only the footer container that semantically contains `.dsh-local-link-footer` into a vertical stack. The same scoped rule normalizes the list gap and removes the following action's private top margin so Local access, Cordis, and Settings keep one visual rhythm. The selector is anchored on the plugin-owned class and accounts for the slot renderer's `display: contents` wrapper; it never names a generated Harness class.
70
72
 
71
73
  The connection card is fixed to the viewport and positioned from the rendered Local access action. On desktop it opens just beyond the sidebar edge and remains vertically centered. Its final QR-state height is reserved before the pairing request resolves, so loading the QR cannot move the card after its first visible frame. On narrow or short viewports it is clamped to a 12 px viewport gutter and scrolls internally instead of moving footer actions or covering them.
72
74
 
73
- Harness `0.1.1-rc.2` keeps settings open state and section selection private inside its shell; the public `openSection` callback is only projected to onboarding steps. The popover's `Paired devices` shortcut therefore uses one bounded compatibility bridge: it clicks the semantic settings dialog trigger and then the nav row matching this plugin's own localized section label. The bridge uses no generated class names, mutates no DOM, and can be removed when Harness exposes a general settings-navigation service.
75
+ Harness keeps settings open state and section selection private inside its shell; the public `openSection` callback is not a general navigation service. The popover's `Paired devices` shortcut therefore uses one bounded compatibility bridge: it clicks the semantic settings dialog trigger and then the nav row matching this plugin's own localized section label. The bridge uses no generated class names, mutates no DOM, and can be removed when Harness exposes a general settings-navigation service.
74
76
 
75
77
  The Host plugin exposes the running gateway authorities as a Cordis service. `cordis.patch.yml` merges that service with `webRuntime.trustedHosts` before the stock connection module starts. Trust is therefore declared once on the Host; client code neither mutates `connection.isLoopback` nor carries an authentication marker.
76
78
 
@@ -80,7 +82,7 @@ Plain HTTP on a private IP is not a browser secure context, while the stock Harn
80
82
 
81
83
  `src/mobile-layout.tsx` is mounted through the normal client plugin and activated by `matchMedia('(max-width: 834px)')`. Crossing the viewport boundary mounts or disposes one scoped set of enhancements. The gateway does not inspect user agents, parse `view` parameters, set layout cookies, load a second bundle, or alter the root-layout boot entry.
82
84
 
83
- The shipped Harness root and AppFrame continue to own `sidebar`, `conversation`, `details`, and `shell.overlay`. Local Link contributes only additive overlay, session-information, and subagent surfaces, then applies scoped responsive geometry to the existing frame. It never enumerates Chat, Trajectory, composer, dock, node, or third-party registrations, so those continue to resolve through the native dynamic slots.
85
+ The shipped Harness root and AppFrame own `sidebar`, `main`, `rightbar`, and `shell.overlay`; Conversation remains the native `main.conversation` panel. Local Link contributes only additive overlay, session-information, and subagent surfaces, then applies scoped responsive geometry to the existing frame. It never enumerates Chat, Trajectory, composer, dock, node, rightbar panel, or third-party registrations, so those continue to resolve through the native dynamic slots.
84
86
 
85
87
  The existing `layout` controller opens and closes the stock sidebar. Responsive styles project that sidebar and the plugin's details surface as dismissible drawers, preserve overlay contributions, apply safe-area insets, and keep dynamic tab lists horizontally scrollable. At wider viewports the enhancement fiber is disposed and the untouched desktop presentation remains.
86
88
 
@@ -90,7 +92,7 @@ The stock Settings dialog is intentionally not exposed inside the narrow mobile
90
92
 
91
93
  The compact appearance button is visually placed in the stock sidebar brand row without becoming part of the Harness brand action. A scoped mobile geometry rule changes the stock flexible brand button to a content-sized hit area and leaves the remaining row space to the separate appearance and sidebar-toggle controls. This keeps all three hit areas disjoint while preserving Harness's own buttons, actions, focus behavior, and tap highlight. Harness exposes no sibling slot in this row, so the compatibility rule identifies the stock CSS-module button by its semantic `_brand` class suffix; Harness upgrades must verify that hook.
92
94
 
93
- Theme persistence remains entirely owned by Harness SettingsScope. In Harness `0.1.1-rc.2`, the client Settings binder selects durable `host` storage only for loopback connections and `memory` storage for non-loopback connections. A phone can therefore change the theme for its current page, but reload creates a new remote SettingsScope and returns to the durable host preference—often `system`, which is then resolved using the phone's own color scheme. Local Link does not impersonate a loopback client and does not add a competing cookie or browser-storage preference. Persistent per-device theme selection requires a safe client/device preference scope from Harness.
95
+ Theme persistence remains entirely owned by Harness. A phone can change the theme for its current page, but reload returns to the durable Host preference—often `system`, which is then resolved using the phone's own color scheme. Local Link does not impersonate a loopback client and does not add a competing cookie or browser-storage preference. Persistent per-device theme selection requires a safe client/device preference scope from Harness.
94
96
 
95
97
  The authenticated gateway manifest omits Harness's host directory-picker client capability. The stock WorkspaceBrowser already treats `sidebar.workspaces.directoryFlow` as optional, so it naturally keeps Search, View options, existing workspaces, and sessions while withholding `Add workspace` from every remote gateway viewport. In alpha manifests the same entry is removed from the batch activation list without rewriting the server-registered batch URL. Loopback desktop boot entries are unchanged; no DOM selector or duplicated workspace browser is involved.
96
98
 
@@ -106,11 +108,11 @@ The automatic pairing page runs before the Harness client and locale service loa
106
108
 
107
109
  Local Link uses Harness semantic color, state, border, background, elevation, and typography variables wherever the supported client exports an applicable token. Icons are imported from `@deepseek-ai/dsh-client-ui-primitives` when that package exposes the required glyph, and stock Harness menus, dialogs, conversation actions, Settings surfaces, and session operations that Local Link does not replace remain their native components. Literal colors following a `var(--dsw-*, fallback)` expression are defensive fallbacks and are not selected in the supported Harness build. The context breakdown's purple tools segment intentionally matches the stock Harness `ContextMeter` implementation exactly.
108
110
 
109
- Harness `0.1.1-rc.2` does not expose a public responsive-shell or Drawer component, spacing scale, radius scale, or mobile component recipes. Mobile geometry—safe-area placement, drawer widths, tap-target dimensions, spacing, radii, and transition timing—therefore remains plugin-owned CSS. One plugin-scoped `--dllm-side-drawer-width` value keeps the stock sidebar projection, the right details surface, and Current session visually identical instead of duplicating width literals. A small set of concepts also has no exported Harness primitive: Local access/device, navigation, current-session information, permission variants, and the subagent group glyph. The compact feedback-note affordance is a scoped presentation adapter because the stock feedback action accepts text only and exposes no icon-mode contract.
111
+ Harness `0.1.5-rc.1` does not expose a complete public responsive-shell or Drawer contract, spacing scale, radius scale, or mobile component recipes. Mobile geometry—safe-area placement, drawer widths, tap-target dimensions, spacing, radii, and transition timing—therefore remains plugin-owned CSS. One plugin-scoped `--dllm-side-drawer-width` value keeps the stock sidebar projection, the rightbar surface, and Current session visually identical instead of duplicating width literals. A small set of concepts also has no exported Harness primitive: Local access/device, navigation, current-session information, permission variants, and the subagent group glyph. The compact feedback-note affordance is a scoped presentation adapter because the stock feedback action accepts text only and exposes no icon-mode contract.
110
112
 
111
113
  All plugin-owned button and text-input controls use the exported Harness `Button` and `Input` primitives. Their semantic variants (`primary`, `outline`, `ghost`, and `toolbar`) remain owned by Harness; Local Link adds only the geometry required by its composed surfaces, such as a full-width sidebar row, a segmented copy action, a scrim, or a tree row. A source-level test rejects new raw `<button>` and `<input>` elements in the plugin UI.
112
114
 
113
- Component-level alignment remains bounded by the contracts Harness actually exports. The responsive shell, side drawer, bottom sheet, QR composition, context card, and diagnostics disclosure have no equivalent public responsive component contract in `0.1.1-rc.2`, so their structure remains semantic HTML plus scoped CSS. They use Harness tokens and primitive controls internally and should migrate if Harness later publishes compatible responsive components.
115
+ Component-level alignment remains bounded by the contracts Harness actually exports. The responsive shell, side drawer, bottom sheet, QR composition, context card, and diagnostics disclosure have no equivalent complete public responsive component contract in `0.1.5-rc.1`, so their structure remains semantic HTML plus scoped CSS. They use Harness tokens and primitive controls internally and should migrate if Harness later publishes compatible responsive components.
114
116
 
115
117
  These are compatibility surfaces, not an independent theme. Every Harness upgrade must compare them against the current token vocabulary, primitive icon catalog, slot contracts, and stock mobile behavior. They should be deleted in favor of upstream tokens or components as soon as equivalent public contracts exist.
116
118
 
@@ -153,11 +155,12 @@ This boundary keeps connection setup in one place and persistent access manageme
153
155
  2. Reject a `Host` that is not one of the machine's current private IP literals and configured port.
154
156
  3. Reject the gateway administration prefix.
155
157
  4. Validate the paired-device cookie unless `trusted-lan` was explicitly configured.
156
- 5. Proxy to the loopback Harness listener.
158
+ 5. Reject the established loopback-only RPC set, including the RC Settings method names.
159
+ 6. Proxy all remaining traffic to the loopback Harness listener.
157
160
 
158
161
  ### WebSocket upgrade
159
162
 
160
- The same network, Host, and credential checks run before an exact supported stream path is passed to the upstream server. Release candidates use `/api/events.mux` or `/api/events.host`; `0.1.2-alpha.1` uses `/api/remote.mux`. Query-bearing and arbitrary WebSocket paths remain rejected. Revocation affects new connections; a future milestone will actively close already-open sockets for a revoked device.
163
+ The same network, Host, and credential checks run before an exact supported stream path is passed to the upstream server. The compatibility allowlist contains `/api/events.mux`, `/api/events.host`, and the current `/api/remote.mux`; query-bearing and arbitrary WebSocket paths remain rejected. In `pairing` mode, the gateway retains an in-memory association between each upgraded tunnel and the paired-device ID that authorized it. Revocation destroys both sides of every tunnel for that ID after removing the credential, without disconnecting other devices. `trusted-lan` tunnels have no paired-device identity and remain outside this lifecycle.
161
164
 
162
165
  ## Dependency policy
163
166
 
@@ -172,16 +175,17 @@ No service discovery, certificate generator, tunnel client, native application,
172
175
 
173
176
  ## Compatibility strategy
174
177
 
175
- The plugin uses DeepSeek Harness `0.1.1-rc.2` as its development baseline and explicitly adapts `0.1.2-alpha.1`. Most integration uses declared package contracts, but several adapters are intentionally version-sensitive:
178
+ The plugin develops against the exact DeepSeek Harness `0.1.5-rc.1` contracts and separately checks `0.1.5-rc.2`. Most integration uses declared package contracts, but several adapters are intentionally version-sensitive:
176
179
 
177
180
  | Adapter | Why it exists | Failure behavior | Removal condition |
178
181
  | --- | --- | --- | --- |
179
- | Connection `trustedHosts` profile patch | Authenticated non-loopback pages need an explicitly declared LAN authority for ordinary API and WebSocket traffic. | An undeclared authority is rejected; privileged RPCs remain loopback-only independently. | Harness exposes a first-class authenticated-gateway registration contract. |
180
- | Alpha browser-authentication handoff | `0.1.2-alpha.1` requires a native one-time browser token in addition to Local Link device pairing. | An absent or invalid handoff fails closed and records `BROWSER_AUTH_HANDOFF_FAILED`; older release candidates keep their direct-root path. | Harness publishes a stable gateway-authentication contract across releases. |
182
+ | Connection `trustedHosts` profile patch | Authenticated non-loopback pages need an explicitly declared LAN authority for ordinary API and WebSocket traffic. | An undeclared authority is rejected before browser authentication. | Harness exposes a first-class authenticated-gateway registration contract. |
183
+ | Browser-authentication handoff | `0.1.2-rc.1` requires a native one-time browser token in addition to Local Link device pairing. | An absent or invalid handoff fails closed and records `BROWSER_AUTH_HANDOFF_FAILED`; older builds without the service keep their direct-root path. | Harness publishes a stable authenticated-gateway handoff contract across releases. |
184
+ | Loopback-only RPC filter | The RC connection transport authenticates all methods uniformly, while Local Link must preserve its narrower pre-RC remote scope. | Configuration, credential, native Host-action, and agent-preset-authoring methods return `403` from the LAN gateway in both access modes. | Harness exposes a server-side authenticated-gateway capability policy with an equivalent restriction. |
181
185
  | Remote boot capability filter | The native directory picker targets the Host filesystem and is misleading from a remote browser. | If the known picker entries change, `Add workspace` can reappear; server authorization remains unchanged. | Harness exposes a remote-client capability policy. |
182
186
  | Settings navigation bridge | The shell keeps `openSection` private outside onboarding. | The shortcut does nothing; ordinary `Settings → Local access` remains available. | Harness exposes general settings navigation. |
183
187
  | Footer stack rule | Cordis reserves a full-width cell inside a horizontal list container. | Without it, Local access has zero width while Cordis is mounted. | Harness stacks full-width footer actions or gives entries an explicit layout contract. |
184
- | Remote theme persistence | Harness `0.1.1-rc.2` gives non-loopback clients a memory-backed SettingsScope. | An explicit mobile light/dark choice resets on reload to the host preference, commonly `system`. | Harness exposes a safe per-client or per-device preference scope. |
188
+ | Remote theme persistence | Remote clients have no durable per-device theme preference. | An explicit mobile light/dark choice resets on reload to the host preference, commonly `system`. | Harness exposes a safe per-client or per-device preference scope. |
185
189
  | Responsive AppFrame adapter | Harness exposes its root, layout controller, semantic tokens, and button/input primitives, but no public responsive-shell recipe, spacing/radius scale, several required glyphs, or icon mode for the feedback note action. | Token, component, or stock DOM/action changes can degrade mobile presentation while business operations remain intact. | Harness publishes responsive contracts and glyphs for the remaining plugin-owned surfaces. |
186
190
  | Mobile stock-DOM touch adapters | Harness has no touch-visible contract for session/workspace overflow actions, a separately slotted brand-row action, or compact feedback-note mode. | A CSS-module or stock DOM change can hide an action or enlarge its hit area while the underlying Harness operation remains available. | Harness exposes mobile action visibility and brand-row/feedback extension contracts. |
187
191
 
@@ -190,7 +194,7 @@ The manifest transformation and scoped adapter invariants have source-level test
190
194
  ## Known pressure points
191
195
 
192
196
  - **Plain HTTP:** avoids certificate onboarding but offers no confidentiality from other machines able to capture LAN traffic.
193
- - **Socket revocation:** the credential is checked before an upgrade; an already-upgraded socket survives until it disconnects or Harness restarts.
197
+ - **RPC compatibility list:** the gateway pins the administration methods that must stay loopback-only. New Harness configuration or native Host RPCs require an explicit review before the RC support claim moves forward.
194
198
  - **Browser metadata:** category and browser are coarse display hints supplied during pairing, not trusted identity. Laptop versus desktop is intentionally reported as `Computer`.
195
199
  - **Interface selection:** the first private IPv4 address is used in invitations. Multi-interface selection is not exposed yet.
196
200
  - **Harness upgrades:** directory-picker boot IDs, AppFrame DOM semantics, or connection contracts may change even when TypeScript package contracts still compile.
@@ -1,44 +1,70 @@
1
1
  # DeepSeek Harness compatibility
2
2
 
3
- Local Link extends version-sensitive Harness Host, client-slot, theme, layout,
4
- session, and Settings contracts. Compatibility is verified against exact Harness
5
- versions and is never inferred from package installation alone.
3
+ Local Link touches version-sensitive Harness Host, slot, theme, layout, session,
4
+ and Settings contracts. Each supported version is therefore checked directly.
6
5
 
7
6
  ## Compatibility matrix
8
7
 
9
- Last checked on 2026-08-29 with Node.js 22 and Windows using the
10
- `dsh-local-link@1.0.0` release source. Versions are listed newest first.
8
+ Last checked on 2026-09-12 with Node.js 22 and Windows using packed
9
+ `dsh-local-link@1.1.1` source for every row. Versions are newest first.
11
10
 
12
- | DeepSeek Harness | Status | Last checked |
13
- | --- | --- | --- |
14
- | `0.1.2-alpha.1` | **Supported prerelease** | 2026-08-29 |
15
- | `0.1.1-rc.2` | **Supported baseline** | 2026-08-29 |
16
- | `0.1.1-rc.1` | **Verified** | 2026-08-29 |
17
- | `0.1.0-rc.8` | **Verified** | 2026-08-29 |
11
+ | DeepSeek Harness | Status | Local Link source | Last checked |
12
+ | --- | --- | --- | --- |
13
+ | `0.1.5-rc.2` | **Verified next** | `1.1.1` | 2026-09-12 |
14
+ | `0.1.5-rc.1` | **Supported release** | `1.1.1` | 2026-09-12 |
15
+ | `0.1.2-rc.1` | **Verified** | `1.1.1` | 2026-09-12 |
16
+ | `0.1.1-rc.2` | **Verified** | `1.1.1` | 2026-09-12 |
17
+ | `0.1.1-rc.1` | **Verified** | `1.1.1` | 2026-09-12 |
18
+ | `0.1.0-rc.8` | **Verified** | `1.1.1` | 2026-09-12 |
18
19
 
19
- Versions older than `0.1.0-rc.8` are untested and unsupported.
20
+ Only the exact versions in the matrix are supported or verified. Alpha builds,
21
+ including the previously tested `0.1.2-alpha.1`, versions older than
22
+ `0.1.0-rc.8`, and future versions reached through a moving dist-tag are
23
+ unsupported until they pass a new check.
20
24
 
21
25
  ### Status meanings
22
26
 
23
- - **Supported baseline** is the Harness version used for current development
24
- and the complete repository verification gate.
25
- - **Supported prerelease** is an exact Harness prerelease included in the
26
- release gate without implying compatibility with later alpha builds.
27
- - **Verified** means the published plugin was installed and its core LAN,
28
- pairing, session, and responsive surfaces were checked on that version.
27
+ - **Supported release** is the current development target and receives the
28
+ complete repository and installed-runtime gate.
29
+ - **Verified next** means the exact package version currently published under
30
+ `next` passed the compatibility gate; the moving tag itself is not supported.
31
+ - **Verified** means the current packed Local Link artifact passed the historical
32
+ RC gate on that exact version.
29
33
  - **Untested** means no compatibility claim is made.
30
34
 
31
- Every newer Harness alpha still requires an independent check; support for
32
- `0.1.2-alpha.1` does not imply support for the moving alpha branch.
35
+ Every newer Harness version still requires an independent check; support for
36
+ `0.1.5-rc.1` does not imply support for a moving `next` tag or later alpha.
33
37
 
34
38
  ## Verification policy
35
39
 
36
- Every new Harness prerelease or release is checked in a fresh isolated
37
- installation. A version is promoted only after the plugin boots, the LAN and
38
- pairing boundary works, the current session opens, and the responsive
39
- navigation, conversation, Current session, and subagent surfaces have been
40
- exercised. Real-phone portrait and landscape checks are required for a new
41
- supported baseline.
40
+ The historical RC gate starts from a fresh isolated installation. The packed
41
+ release must compose into the Web profile, boot in the real client, render Local
42
+ Access, preserve the private-LAN and loopback-admin boundaries, complete one-use
43
+ pairing, proxy authenticated HTTP and a supported WebSocket, close that socket
44
+ on revoke, reject the revoked device, and activate the responsive shell at
45
+ `390 × 844`. Automated tests cover Current session, subagent, locale, slot, and
46
+ composition contracts.
47
+
48
+ All six exact Harness versions installed the packed `1.1.1` artifact without a
49
+ peer conflict and passed an isolated installed-runtime gate: profile composition
50
+ and boot, Local Link pairing, the version-appropriate browser-authentication
51
+ handoff, authenticated root access, an authenticated supported WebSocket,
52
+ immediate socket closure on revoke, and a `401` response when the revoked device
53
+ retried. `0.1.0-rc.8`, `0.1.1-rc.1`, and `0.1.1-rc.2` used `/api/events.mux`;
54
+ `0.1.2-rc.1` and the `0.1.5` builds used the current `/api/remote.mux` path.
55
+
56
+ The `0.1.5` rows compose and boot with the new `main`/`rightbar` AppFrame while
57
+ retaining the session header, composer, sidebar, Settings, and overlay slots
58
+ used by Local Link. Both exact RCs additionally passed typecheck, all 98
59
+ automated tests, production build/package verification, desktop Local Access
60
+ rendering, and the responsive shell at `390 × 844` without client exceptions.
61
+ The historical versions retain their earlier real-client responsive evidence;
62
+ the `1.1.1` patch changes package compatibility contracts and documentation, not
63
+ the shipped client or gateway implementation.
64
+
65
+ Historical RC runs used empty profiles, so they did not create provider-backed
66
+ conversations. Physical-phone portrait and landscape acceptance also remains a
67
+ separate release check.
42
68
 
43
69
  A successful package installation alone is not compatibility proof. Harness
44
70
  may change authentication, DOM semantics, client slots, exported primitives,
@@ -15,7 +15,7 @@ Presentation remains independent of authorization: changing the viewport never g
15
15
  - **Dynamic views:** Chat, Trajectory, composer extensions, overlays, and third-party conversation tabs continue to resolve from Harness plugin slots.
16
16
  - **Current session:** a right drawer shows context usage and its System prompt / Tools / Messages breakdown, model, workspace access, agent preset, activity statistics, and session-log download.
17
17
  - **Subagents:** a compact status chip exposes total and active counts with the native activity state, then opens the nested subagent catalog as a touch-friendly bottom sheet.
18
- - **Appearance:** a sun/moon action uses the Harness theme service. In Harness `0.1.1-rc.2`, remote theme storage is page-memory-backed, so reload returns to the host preference and resolves `system` against the phone or tablet.
18
+ - **Appearance:** a sun/moon action uses the Harness theme service. Remote theme selection remains page-scoped, so reload returns to the host preference and resolves `system` against the phone or tablet.
19
19
  - **Touch behavior:** native session and active-workspace overflow actions remain visible without a long press, and switching sessions does not automatically focus the composer or open the software keyboard.
20
20
  - **Keyboard accessibility:** plugin-owned modal drawers receive and contain focus, close with Escape, and restore focus to their invoking control.
21
21
  - **Responsive AppFrame:** safe-area insets, full-viewport scrims, scrollable tab groups, media bounds, and matching left/right drawers enhance the shipped Harness layout only while the media query matches.
@@ -51,13 +51,13 @@ Landscape phones, split-screen browsers, virtual keyboards, third-party fixed-wi
51
51
 
52
52
  Mobile View keeps the official Harness root and AppFrame mounted. It contributes controls through overlay, conversation, theme, session, locale, button, and input contracts wherever Harness exposes them. The stock desktop presentation is unchanged when the media query does not match.
53
53
 
54
- Harness `0.1.1-rc.2` does not expose a public responsive shell, drawer recipe, spacing/radius scale, or every required glyph. The plugin therefore owns mobile geometry and a small number of scoped presentation adapters for stock brand, workspace, session-action, and feedback elements. Those hooks are documented in [Architecture and compatibility boundaries](ARCHITECTURE.md) and must be retested for each supported Harness version.
54
+ Harness `0.1.5-rc.1` does not expose a complete public responsive shell, drawer recipe, spacing/radius scale, or every required glyph. The plugin therefore owns mobile geometry and a small number of scoped presentation adapters for stock brand, workspace, session-action, and feedback elements. Those hooks are documented in [Architecture and compatibility boundaries](ARCHITECTURE.md) and must be retested for each supported Harness version.
55
55
 
56
56
  ## Security
57
57
 
58
58
  Mobile View uses the same one-use invitation, paired-browser credential, private-network validation, HTTP/WebSocket gateway, and revocation behavior as desktop-shaped remote access. It adds no relay, account, analytics, fingerprinting, polling loop, or duplicate conversation store.
59
59
 
60
- LAN traffic remains plain HTTP in this preview, and an already-open WebSocket is not immediately terminated by revoke. See the full [security model](SECURITY.md) before enabling the gateway.
60
+ LAN traffic remains plain HTTP in this release. Revoking a paired device blocks its next request or reconnect and immediately terminates its open Local Link WebSocket tunnels. See the full [security model](SECURITY.md) before enabling the gateway.
61
61
 
62
62
  ## Release acceptance checklist
63
63
 
@@ -70,4 +70,4 @@ LAN traffic remains plain HTTP in this preview, and an already-open WebSocket is
70
70
  - Confirm `Add workspace` is absent on every authenticated remote gateway page and remains available on the loopback desktop.
71
71
  - Check a third-party conversation tab and Cordis panel if installed.
72
72
  - Test the four viewport sizes above plus one real phone in portrait and landscape.
73
- - Revoke the device and verify subsequent requests and reconnects are rejected.
73
+ - Revoke the device and verify its live stream disconnects immediately while subsequent requests and reconnects are rejected.
package/docs/SECURITY.md CHANGED
@@ -24,11 +24,11 @@ Mobile View does not reduce that authority. It inherits the selected Harness ses
24
24
  - `HttpOnly` and `SameSite=Strict` device cookie.
25
25
  - Device expiry and explicit revocation.
26
26
  - Authentication before HTTP proxying and WebSocket upgrade.
27
- - Separation of the Local Link device credential from Harness browser-authentication cookies during proxying and alpha token exchange.
27
+ - Separation of the Local Link device credential from Harness browser-authentication cookies during proxying and the native browser-token exchange.
28
28
  - Gateway-side block for desktop administration paths.
29
29
  - Structural loopback source, Host, and Origin validation for every desktop administration request; lookalike DNS names fail closed.
30
30
  - Gateway authorities declared through the stock connection `trustedHosts` contract without claiming loopback identity.
31
- - Independent loopback enforcement for Settings, credentials, native Host actions, and agent-preset authoring.
31
+ - Gateway enforcement that keeps Settings, credentials, native Host actions, and agent-preset authoring outside both Local Link access modes even though the RC connection transport authenticates methods uniformly.
32
32
  - Bounded local diagnostics with an explicit context allowlist and no credentials, addresses, identifiers, names, paths, or user content.
33
33
  - No external relay, telemetry, analytics, or remote log collector.
34
34
 
@@ -38,19 +38,19 @@ Diagnostics are enabled by default because a local networking plugin otherwise b
38
38
 
39
39
  The report is designed to be safe to review and attach to a public bug report, but users should still inspect copied JSON before sharing it. Disabling `diagnosticsEnabled` prevents new events from being retained.
40
40
 
41
- ## Known limitations of the preview
41
+ ## Known limitations
42
42
 
43
43
  ### Plain HTTP
44
44
 
45
- The initial release does not encrypt LAN traffic. Pairing credentials and Harness traffic can be observed by an attacker who can capture traffic on the local network. Use only on a trusted home network while HTTPS support is under development.
45
+ The current release does not encrypt LAN traffic. Pairing credentials and Harness traffic can be observed by an attacker who can capture traffic on the local network. Use only on a trusted private network while HTTPS support is under development.
46
46
 
47
- ### Existing WebSockets
47
+ ### WebSocket revocation
48
48
 
49
- Revoking a device blocks subsequent requests and reconnects, but an already-upgraded WebSocket is not actively terminated yet. Restart the Harness Web process to close every active connection immediately.
49
+ Revoking a paired device blocks subsequent requests and reconnects and immediately destroys both sides of every open Local Link WebSocket tunnel authenticated by that device. Tunnels belonging to other paired devices remain connected. Connections opened in the explicit `trusted-lan` mode are not associated with paired-device records and therefore are not affected by paired-device revocation.
50
50
 
51
51
  ### Version-sensitive Harness integration
52
52
 
53
- Authenticated LAN trust, browser-authentication handoff, remote boot capability filtering, direct Settings navigation, coexistence with the stock Cordis footer action, and responsive AppFrame presentation need small version-sensitive adapters. They do not grant privileged loopback methods, but a Harness upgrade can break presentation or fail closed. Before declaring another Harness version supported, rerun the trust-boundary suite and manually retest pairing, live conversation streaming, Settings navigation, rename, revoke, Cordis coexistence, mobile workspace/session actions, Current session, subagents, theme switching, and third-party conversation tabs.
53
+ Authenticated LAN trust, browser-authentication handoff, the loopback-only RPC list, remote boot capability filtering, direct Settings navigation, coexistence with the stock Cordis footer action, and responsive AppFrame presentation need small version-sensitive adapters. They do not grant privileged Host administration methods, but a Harness upgrade can add or rename a method, break presentation, or fail closed. Before declaring another Harness version supported, audit the current Remote namespaces, rerun the trust-boundary suite, and manually retest pairing, live conversation streaming, Settings navigation, rename, revoke, Cordis coexistence, mobile workspace/session actions, Current session, subagents, theme switching, and third-party conversation tabs.
54
54
 
55
55
  ### Firewall automation
56
56
 
package/lib/client.js CHANGED
@@ -443,6 +443,9 @@ window.__ModuleLoader__.load({
443
443
  const MOBILE_AGENT_PRESET_PRIORITY = -100;
444
444
  const MOBILE_SESSION_LOG_PRIORITY = -100;
445
445
  const MOBILE_STATS_PRIORITY = -100;
446
+ function sessionAgentPreset(summary) {
447
+ return summary.projectionValues?.agentPreset;
448
+ }
446
449
  var MobileSessionInfoController = class {
447
450
  snapshot = Object.freeze({ open: false });
448
451
  listeners = /* @__PURE__ */ new Set();
@@ -536,7 +539,7 @@ window.__ModuleLoader__.load({
536
539
  }
537
540
  function formatSessionTokens(value) {
538
541
  const scaled = (n) => n >= 100 ? String(Math.round(n)) : String(Math.round(n * 10) / 10);
539
- if (value < 1e3) return String(value);
542
+ if (value < 1e3) return scaled(value);
540
543
  if (value < 1e6) return `${scaled(value / 1e3)}K`;
541
544
  return `${scaled(value / 1e6)}M`;
542
545
  }
@@ -815,7 +818,7 @@ window.__ModuleLoader__.load({
815
818
  }), /* @__PURE__ */ react.default.createElement("span", {
816
819
  className: "dllm-context-segment dllm-context-messages",
817
820
  style: { width: `${occupancy.percent * breakdown.messageTokens / (breakdown.systemTokens + breakdown.toolsTokens + breakdown.messageTokens)}%` }
818
- })), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-context-breakdown-rows" }, /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-system" }), t("mobile.sessionInfo.context.system")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.systemTokens))), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-tools" }), t("mobile.sessionInfo.context.tools")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.toolsTokens))), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-messages" }), t("mobile.sessionInfo.context.messages")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.messageTokens)))))), /* @__PURE__ */ react.default.createElement("section", { className: "dllm-session-info-card dllm-session-properties-card" }, /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", null, t("mobile.sessionInfo.model")), /* @__PURE__ */ react.default.createElement("span", null, model ?? t("mobile.sessionInfo.notRecorded"))), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", { className: "dllm-session-property-label" }, /* @__PURE__ */ react.default.createElement(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutline16, { size: 13 }), t("mobile.sessionInfo.permissions")), /* @__PURE__ */ react.default.createElement("span", { className: "dllm-session-property-value dllm-session-property-access" }, /* @__PURE__ */ react.default.createElement(PermissionGlyph, { value: accessValue }), access ?? t("mobile.sessionInfo.notRecorded"))), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", { className: "dllm-session-property-label" }, /* @__PURE__ */ react.default.createElement(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutline16, { size: 13 }), t("mobile.sessionInfo.agentPreset")), /* @__PURE__ */ react.default.createElement("span", null, mobilePresetLabel(session.agentPreset, t)))), stats.length > 0 && /* @__PURE__ */ react.default.createElement("section", { className: "dllm-session-info-card dllm-session-stats-card" }, /* @__PURE__ */ react.default.createElement("div", {
821
+ })), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-context-breakdown-rows" }, /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-system" }), t("mobile.sessionInfo.context.system")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.systemTokens))), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-tools" }), t("mobile.sessionInfo.context.tools")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.toolsTokens))), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("span", null, /* @__PURE__ */ react.default.createElement("i", { className: "dllm-context-swatch dllm-context-messages" }), t("mobile.sessionInfo.context.messages")), /* @__PURE__ */ react.default.createElement("span", null, "~", formatSessionTokens(breakdown.messageTokens)))))), /* @__PURE__ */ react.default.createElement("section", { className: "dllm-session-info-card dllm-session-properties-card" }, /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", null, t("mobile.sessionInfo.model")), /* @__PURE__ */ react.default.createElement("span", null, model ?? t("mobile.sessionInfo.notRecorded"))), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", { className: "dllm-session-property-label" }, /* @__PURE__ */ react.default.createElement(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutline16, { size: 13 }), t("mobile.sessionInfo.permissions")), /* @__PURE__ */ react.default.createElement("span", { className: "dllm-session-property-value dllm-session-property-access" }, /* @__PURE__ */ react.default.createElement(PermissionGlyph, { value: accessValue }), access ?? t("mobile.sessionInfo.notRecorded"))), /* @__PURE__ */ react.default.createElement("div", { className: "dllm-session-property" }, /* @__PURE__ */ react.default.createElement("small", { className: "dllm-session-property-label" }, /* @__PURE__ */ react.default.createElement(_deepseek_ai_dsh_client_ui_primitives.IconAgentPresetOutline16, { size: 13 }), t("mobile.sessionInfo.agentPreset")), /* @__PURE__ */ react.default.createElement("span", null, mobilePresetLabel(sessionAgentPreset(session), t)))), stats.length > 0 && /* @__PURE__ */ react.default.createElement("section", { className: "dllm-session-info-card dllm-session-stats-card" }, /* @__PURE__ */ react.default.createElement("div", {
819
822
  className: "dllm-session-info-icon",
820
823
  "aria-hidden": "true"
821
824
  }, /* @__PURE__ */ react.default.createElement(_deepseek_ai_dsh_client_ui_primitives.IconDataOutline16, { size: 15 })), /* @__PURE__ */ react.default.createElement("div", null, /* @__PURE__ */ react.default.createElement("small", null, t("mobile.sessionInfo.statistics")), stats.map((line) => /* @__PURE__ */ react.default.createElement("p", { key: line }, line)))), /* @__PURE__ */ react.default.createElement("section", { className: "dllm-session-info-card dllm-session-log-card" }, /* @__PURE__ */ react.default.createElement("div", {
@@ -997,11 +1000,11 @@ window.__ModuleLoader__.load({
997
1000
  }
998
1001
  const MOBILE_STOCK_LAYOUT_STYLES = `
999
1002
  body[data-dsh-local-link-mobile]{overflow:hidden}
1000
- body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay]){--dllm-side-drawer-width:min(88vw,340px);grid-template-columns:minmax(0,1fr)!important}
1003
+ body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay]){--dllm-side-drawer-width:min(88vw,340px);--dllm-side-drawer-closed-transform:translateX(calc(-1 * var(--dllm-side-drawer-width) - 14px));grid-template-columns:minmax(0,1fr)!important}
1001
1004
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:first-child{position:fixed;z-index:70;inset:0 auto 0 0;box-sizing:border-box;width:var(--dllm-side-drawer-width);transform:translateX(0);transition:transform 190ms cubic-bezier(.22,1,.36,1);box-shadow:18px 0 46px rgb(15 23 42 / 18%)}
1002
1005
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:first-child>[data-slot="sidebar"]>*{width:100%!important;height:100%!important}
1003
1006
  body[data-dsh-local-link-mobile] [data-slot="sidebar"] button[class*="_brand"]{flex:0 0 auto!important;inline-size:max-content!important;width:max-content!important;min-width:0!important;max-width:calc(100% - 72px)!important;margin-right:auto!important}
1004
- body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div[data-sidebar-collapsed]:has(>[data-shell-overlay])>:first-child{transform:translateX(-104%);pointer-events:none}
1007
+ body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div[data-sidebar-collapsed]:has(>[data-shell-overlay])>:first-child{transform:var(--dllm-side-drawer-closed-transform);pointer-events:none}
1005
1008
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:nth-child(2){grid-column:1;grid-row:1;min-width:0}
1006
1009
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:nth-child(3){display:none}
1007
1010
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>[data-shell-overlay]{z-index:90}
@@ -1011,9 +1014,9 @@ body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-o
1011
1014
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:not([data-sidebar-collapsed]):has(>[data-shell-overlay]) .dllm-stock-menu{opacity:0;transform:scale(.9);pointer-events:none}
1012
1015
  .dllm-stock-scrim{position:absolute;inset:0 0 0 var(--dllm-side-drawer-width);width:auto;height:auto;min-height:0;padding:0;border:0;border-radius:0;background:var(--dsw-alias-bg-mask-1,rgb(15 23 42 / 40%))!important;pointer-events:auto}
1013
1016
  body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div[data-sidebar-collapsed]:has(>[data-shell-overlay]) .dllm-stock-scrim{opacity:0;pointer-events:none}
1014
- .dllm-stock-theme{position:absolute;top:calc(env(safe-area-inset-top) + 22px);left:calc(var(--dllm-side-drawer-width) - 76px);display:grid;width:28px;height:28px;place-items:center;pointer-events:auto}
1017
+ .dllm-stock-theme{position:absolute;top:calc(env(safe-area-inset-top) + 22px);left:calc(var(--dllm-side-drawer-width) - 76px);display:grid;width:28px;height:28px;place-items:center;opacity:1;visibility:visible;transform:translateX(0);pointer-events:auto;transition:opacity 120ms ease,transform 190ms cubic-bezier(.22,1,.36,1),visibility 0s linear 0s}
1015
1018
  .dllm-stock-theme .dllm-theme-button{box-sizing:border-box!important;width:28px!important;min-width:28px!important;max-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;border-radius:50%!important}
1016
- body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div[data-sidebar-collapsed]:has(>[data-shell-overlay]) .dllm-stock-theme{display:none}
1019
+ body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div[data-sidebar-collapsed]:has(>[data-shell-overlay]) .dllm-stock-theme{opacity:0;visibility:hidden;transform:var(--dllm-side-drawer-closed-transform);pointer-events:none;transition:opacity 120ms ease,transform 190ms cubic-bezier(.22,1,.36,1),visibility 0s linear 190ms}
1017
1020
  body[data-dsh-local-link-mobile] [data-slot="sidebar.workspaces"] button[aria-label="Add workspace"],body[data-dsh-local-link-mobile] [data-slot="sidebar.workspaces"] button[aria-label="添加工作区"]{display:none!important}
1018
1021
  body[data-dsh-local-link-mobile] [role="treeitem"][aria-selected="true"]>span:has(button[aria-label]){display:inline-flex!important;margin-left:4px}
1019
1022
  body[data-dsh-local-link-mobile] [role="treeitem"][aria-selected="true"]>span:has(button[aria-label]) button{width:28px!important;height:28px!important}
@@ -1030,7 +1033,7 @@ body[data-dsh-local-link-mobile] [data-turn-tail]>div:last-child>button[aria-has
1030
1033
  body[data-dsh-local-link-mobile] [data-turn-tail]>div:last-child>button[aria-haspopup=dialog][aria-expanded]::before{content:"";display:block;width:16px;height:16px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.8 2.4a1.7 1.7 0 0 1 2.4 2.4L6 12l-3 .6.6-3 7.2-7.2Z'/%3E%3Cpath d='m9.8 3.4 2.8 2.8'/%3E%3C/svg%3E") center/16px 16px no-repeat}
1031
1034
  body[data-dsh-local-link-mobile] [data-cordis-panel]{left:max(12px,env(safe-area-inset-left))!important;right:max(12px,env(safe-area-inset-right))!important;bottom:max(12px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:calc(100dvh - max(24px,env(safe-area-inset-top) + env(safe-area-inset-bottom)))!important}
1032
1035
  body[data-dsh-local-link-mobile] [data-cordis-row]{min-width:0}body[data-dsh-local-link-mobile] [data-cordis-row]>div{min-width:0;flex-wrap:wrap}body[data-dsh-local-link-mobile] [data-cordis-row] span{max-width:100%;white-space:normal;overflow-wrap:anywhere;text-overflow:clip}
1033
- @media(prefers-reduced-motion:reduce){body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:first-child{transition:none!important}}
1036
+ @media(prefers-reduced-motion:reduce){body[data-dsh-local-link-mobile] #root>[data-slot="root"]>div:has(>[data-shell-overlay])>:first-child,.dllm-stock-theme{transition:none!important}}
1034
1037
  ${MOBILE_SUBAGENT_STYLES}
1035
1038
  ${MOBILE_SESSION_INFO_STYLES}
1036
1039
  `;