@linxin666/dsh-remote-bridge 0.4.12 → 0.4.14

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.
Files changed (65) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +53 -11
  3. package/README.zh.md +53 -11
  4. package/lib/client.js +112 -90
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +18800 -334
  7. package/lib/types/client/PairPanel.d.ts +7 -0
  8. package/lib/types/client/locales.d.ts +13 -10
  9. package/lib/types/core/connection.d.ts +50 -0
  10. package/lib/types/core/devices.d.ts +80 -6
  11. package/lib/types/core/liveactivity.d.ts +7 -0
  12. package/lib/types/core/model-efforts.d.ts +83 -0
  13. package/lib/types/core/protocol.d.ts +24 -0
  14. package/lib/types/core/push.d.ts +70 -3
  15. package/lib/types/host/firewall.d.ts +74 -0
  16. package/lib/types/host/host-bind-capability.d.ts +90 -0
  17. package/lib/types/host/ingress-gate.d.ts +59 -0
  18. package/lib/types/host/ingress-sync.d.ts +429 -0
  19. package/lib/types/host/lan-bind-plan.d.ts +96 -0
  20. package/lib/types/host/lan-bind.d.ts +106 -0
  21. package/lib/types/host/lan-forward.d.ts +112 -0
  22. package/lib/types/host/lan.d.ts +61 -0
  23. package/lib/types/host/pair-origin.d.ts +34 -19
  24. package/lib/types/host/relay-bridge-connector.d.ts +234 -0
  25. package/lib/types/host/relay-connector.d.ts +156 -0
  26. package/lib/types/host/relay-control.d.ts +195 -0
  27. package/lib/types/host/relay-registry.d.ts +123 -0
  28. package/lib/types/host/relay-secondary.d.ts +209 -0
  29. package/lib/types/host/relay.d.ts +170 -0
  30. package/lib/types/host/routes.d.ts +29 -1
  31. package/lib/types/host/tunnel-orphan.d.ts +145 -0
  32. package/lib/types/host/tunnel-plan.d.ts +41 -0
  33. package/lib/types/host/tunnel.d.ts +289 -0
  34. package/lib/types/index.d.ts +488 -1
  35. package/package.json +4 -2
  36. package/src/client/PairPanel.tsx +21 -0
  37. package/src/client/locales.ts +19 -15
  38. package/src/client/panel.module.css +48 -1
  39. package/src/core/connection.ts +316 -11
  40. package/src/core/devices.ts +165 -16
  41. package/src/core/hub.ts +17 -5
  42. package/src/core/liveactivity.ts +16 -2
  43. package/src/core/model-efforts.ts +223 -0
  44. package/src/core/protocol.ts +27 -0
  45. package/src/core/push.ts +90 -5
  46. package/src/host/firewall.ts +230 -0
  47. package/src/host/host-bind-capability.ts +249 -0
  48. package/src/host/ingress-gate.ts +203 -0
  49. package/src/host/ingress-sync.ts +1074 -0
  50. package/src/host/lan-bind-plan.ts +134 -0
  51. package/src/host/lan-bind.ts +250 -0
  52. package/src/host/lan-forward.ts +321 -0
  53. package/src/host/lan.ts +142 -0
  54. package/src/host/pair-origin.ts +44 -38
  55. package/src/host/relay-bridge-connector.ts +849 -0
  56. package/src/host/relay-connector.ts +324 -0
  57. package/src/host/relay-control.ts +315 -0
  58. package/src/host/relay-registry.ts +275 -0
  59. package/src/host/relay-secondary.ts +478 -0
  60. package/src/host/relay.ts +294 -0
  61. package/src/host/routes.ts +57 -3
  62. package/src/host/tunnel-orphan.ts +325 -0
  63. package/src/host/tunnel-plan.ts +58 -0
  64. package/src/host/tunnel.ts +688 -0
  65. package/src/index.ts +1516 -23
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: e535b6c20d2c587b910107c33df225d9504f56dc
6
- README.zh.md: b8f8675b1af492825ef85ff66111776de6ce8c5e
5
+ README.md: ace1c8b53b33dc58da128a48c8f663a88aa3b1a3
6
+ README.zh.md: 18a9d176979ab0366db0662c626dadbead5419cf
package/README.md CHANGED
@@ -10,9 +10,9 @@ English | [中文](README.zh.md)
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
12
12
 
13
- A host-side adaptor that publishes DeepSeek Harness (DSH) itself as protocol v1: one WebSocket surface at `/ios/v1` that a native client — a phone app, a tablet, a terminal — can drive without a browser, without the Web GUI bundle, and without a relay change.
13
+ The sole remote access path in this repository: native phone apps connecting to the host via protocol v1. This host-side adaptor publishes DeepSeek Harness (DSH) itself as protocol v1 over a single WebSocket surface at `/ios/v1` that native phone apps can drive directly without a browser. Browser-based remote control has retired, and its WAN/LAN ingress capabilities have migrated into this package.
14
14
 
15
- Protocol v1 is deliberately a second, independent surface: the browser path (the paired-device cookie and the gated `/remote` channel) belongs to `dsh-remote-web-ui`, and the bridge does not replay that credential. It consumes the harness in-process instead — the Typert gateway for session work, the approval waterfall for permission requests — and mints its own one-time bootstrap token without changing `dsh-remote-web-ui`'s pairing service.
15
+ The adaptor consumes the harness in-process — the Typert gateway for session work and the approval waterfall for permission requests — and mints its own one-time bootstrap token on a loopback-only route, backed by an independent public relay, Cloudflare tunnels, and LAN ingress stack.
16
16
 
17
17
  ## What it does
18
18
 
@@ -31,7 +31,7 @@ The package publishes one protocol and, beside it, one small browser surface. Wh
31
31
  - **A subscription, not a poll.** `session.snapshot` opens the harness follow stream and keeps it, so the baseline and every later increment arrive over the same socket.
32
32
  - **Approvals reach the client, and a reconnecting phone is handed the ones still waiting.** A tool that asks for permission arrives as an `approval.request` event and is answered with `approval.resolve`; a request nobody answers is rejected, and a connection that declared `approvals.v1` receives every unsettled approval again after its handshake.
33
33
  - **Pairing.** A one-time bootstrap token plus a P-256 challenge-response mint a revocable device token; an unpaired connection reaches three methods only.
34
- - **A pairing panel.** The same plugin row declares a `dsh.client` browser half: a sidebar-foot seat that opens the official modal holding one QR symbol, one status line, one address line and one action row, over the live one-time code.
34
+ - **A pairing panel.** The same plugin row declares a `dsh.client` browser half: a QR code icon at the bottom of the sidebar (aria-label "Pair an iPhone") that opens a modal displaying a 30 s single-use pairing QR code and a "New code" action.
35
35
  - **No relay change.** The protocol rides whatever origin the instance already publishes, and the relay hop forwards it exactly as it forwards everything else.
36
36
 
37
37
  ## Transport
@@ -181,14 +181,16 @@ The device token rides the WebSocket upgrade as `Authorization: Bearer <deviceTo
181
181
 
182
182
  ### Bootstrap token
183
183
 
184
- `GET /remote-bridge/pair/token` is an exact host route behind a two-condition loopback gate: the socket address must be `127.0.0.1`, `::1` or `::ffff:127.0.0.1`, and the `Host` header must name `127.0.0.1`, `localhost` or `[::1]` (its port is ignored). A tunneled request fails the second condition even though its tunnel client connects from this same machine, so the endpoint stays unreachable from the public origin; anything else gets 403. The token is held in memory, expires after 30 s, is spent by the first `pair.begin`, and the same link is printed to the host log while the code itself is rendered in the pairing panel, so a desktop operator can reach it either way.
184
+ The pairing entry is a QR code icon at the bottom of the sidebar, with the accessible label "Pair an iPhone". Clicking it opens the pairing panel. The panel is strictly available on localhost: its token route `GET /remote-bridge/pair/token` is guarded by a two-condition loopback gate where both the socket address and the `Host` header must name this machine (remote or tunneled requests return 403).
185
+
186
+ The pairing code is single-use and valid for 30 seconds (`BOOTSTRAP_TOKEN_TTL_MS = 30_000`), consumed immediately upon the first `pair.begin`; clicking "New code" in the panel voids the previous code and mints a fresh one. There is no "Stop" button and no action to revoke all connected devices. The link is printed to the host log, while the code itself renders in the pairing panel for scanning.
185
187
 
186
188
  ```sh
187
189
  curl -s http://127.0.0.1:3080/remote-bridge/pair/token
188
190
  # {"token":"...","expiresAt":1760000030000,"url":"ws://127.0.0.1:3080/ios/v1?token=..."}
189
191
  ```
190
192
 
191
- When this machine can name its own public origin — `DSH_REMOTE_PUBLIC_BASE_URL`, else the relay registry row `$DSH_HOME/remote-web-ui-registry/<profile>.json` that `dsh-remote-web-ui` keeps — the same answer carries the address half too:
193
+ When this machine can determine a public or LAN origin — from live relay lease/tunnel state, `DSH_REMOTE_PUBLIC_BASE_URL`, or a listening LAN forwarder — the same answer carries the address half:
192
194
 
193
195
  ```json
194
196
  {
@@ -201,7 +203,7 @@ When this machine can name its own public origin — `DSH_REMOTE_PUBLIC_BASE_URL
201
203
  }
202
204
  ```
203
205
 
204
- `pairingUrl` is what a pairing QR should carry: the iOS client parses `{token, url}` and adopts the origin from `url`, so one scan sets both the address and the one-shot token and the operator types nothing on the phone. With no discoverable origin those two fields are absent rather than guessed, the panel falls back to a bare-token code, and the phone keeps whatever origin it already has.
206
+ The QR code encodes a `{token, url}` document where `url` takes the form `wss://<origin>/ios/v1?token=...` (derived via `pairingDialUrlOf`, converting https to wss and http to ws). Scanning with the mobile phone app acquires both the address and token at once without manual entry. With no discoverable origin those fields are absent rather than guessed, the panel falls back to a bare-token code, and the phone keeps whatever origin it already has.
205
207
 
206
208
  ### Device token
207
209
 
@@ -235,22 +237,61 @@ The relay that publishes a private instance on the public internet is a full rev
235
237
 
236
238
  Two consequences follow from that hop. It sees the request URL, so a `?token=` connection hands the device token to the relay, the Cloudflare edge and the origin access log — prefer the header. And `GET /remote-bridge/pair/token` is forwarded like any other path, but its loopback gate rejects the forwarded request, so pairing can only be started from the machine itself.
237
239
 
240
+ ## Ingress stack and security model
241
+
242
+ `@linxin666/dsh-remote-bridge` owns the complete public and local network ingress stack for remote access:
243
+ - **Relay identity and leases**: `relay-registry` persists the relay ID and secret under `$DSH_HOME/remote-web-ui-registry/<profile>.json`; changing relay config remounts the plugin row. When no tunnel is configured (`tunnel.mode === 'off'`) and no remote device is paired yet, the bridge stays idle at startup without minting an identity or claiming a relay lease; lease claiming is armed on demand once the roster loads a paired device, a local pairing token is requested, a device finishes pairing, or a tunnel is enabled (while suppressing transient `idle`/`claiming`/`dialing` state logs and deduplicating repeated identical failure lines). When mounting with `relay=false` and an on-disk identity already exists, it unregisters the previous registration row and releases its lease once via `pair.release()` (best-effort, logging any errors; unmounting neither releases nor unregisters, preserving bookmarked origins for server-side GC; mounting with `relay=false` never mints a new identity and has zero side effects if no identity file exists).
244
+ - **Relay connectors**: `relay-connector` manages quick and named tunnel connectors side by side, and `relay-bridge-connector` connects to the Cloudflare Durable Object meeting point over WSS, recording connection state in `$DSH_HOME/remote-web-ui-relay-bridge.json` (state file writing is verified behaviorally, defaulting to `$DSH_HOME` when unspecified, not checked via source text assertions).
245
+ - **Tunnel lifecycle**: `tunnel`, `tunnel-plan`, and `tunnel-orphan` manage platform `cloudflared` child processes with exponential backoff and reap orphaned processes left behind by crashes.
246
+ - **Ingress sync**: `ingress-sync` converges Cloudflare named tunnel ingress rules to the local gate port when the host listens on a different port.
247
+ - **LAN forwarder and firewall**: `lan`, `lan-bind`, `lan-bind-plan`, `lan-forward`, `host-bind-capability`, and `firewall` manage the LAN-edge forwarder and OS firewall rules (Windows Defender and Linux firewalld/ufw/iptables) while keeping the host webserver bound strictly to loopback.
248
+
249
+ The security model enforces strict whitelisting across all external ingress paths:
250
+ - **Internal ingress gate (`src/host/ingress-gate.ts`)**: binds exclusively to `127.0.0.1` and forwards only WebSocket upgrades to `/ios/v1` to the host's own protocol port, rewriting the `Host` header to the loopback authority. Every other plain HTTP request and non-whitelisted upgrade is answered immediately with `404 {"error":"not-found"}` and closed without opening any upstream connection.
251
+ - **Tunnel target is the ingress gate, not the webServer**: cloudflared quick and named tunnels target the dynamic loopback port bound by `ingress-gate`, never the harness `webServer` port. A request routed through the tunnel cannot reach webServer routes, internal APIs, or other plugins.
252
+ - **Relay registration and public exposure**: the relay registration row only writes the quick tunnel URL, which points to the ingress gate, so the public internet still only sees /ios/v1. When the plan is quick and the tunnel is running, the gate URL is announced to the relay Worker (proxying the stable subdomain to this machine; endpoints and suffix are determined by configuration, defaulting to `<id>.dsh-market.com`); plugin disposal clears local references without withdrawing the row. QR public address selection is decided by `livePublicOriginOf`: bridge or named leases prioritize the stable subdomain; quick leases fall back to the tunnel running URL while registration is unconfirmed; no lease uses the tunnel URL; none returns no address. Fallbacks then check `DSH_REMOTE_PUBLIC_BASE_URL`, and the LAN fallback provides an address only when the LAN forwarder is actually listening using its snapshot's bound address and port (never guessing the first IP in the address list, returning no address when stopped; the disk registry row fallback has been completely removed, eliminating the last data dependency on legacy data files).
253
+ - **LAN forwarder target is the ingress gate**: the LAN forwarder listens on the machine's LAN IPv4 address and re-issues traffic exclusively to the `ingress-gate` port, so local network reachability is also constrained strictly to `/ios/v1`.
254
+ - **Relay bridge connector whitelist**: the Durable Object multiplexer in `relay-bridge-connector.ts` applies the same whitelist. Non-`/ios/v1` HTTP streams receive `404 {"error":"not-found"}`, and non-whitelisted WebSocket upgrades return `ws-fail 404 {"error":"not-found"}`, establishing no upstream connection.
255
+ - **Historical spelling retention and coexistence caveat**: the registry directory `$DSH_HOME/remote-web-ui-registry/` and state file `remote-web-ui-relay-bridge.json` intentionally retain their historical names so existing profiles maintain identity continuity and previously paired devices keep their credentials across upgrades. **Known risk and coexistence caveat**: never enable relay concurrently on both this plugin and the deprecated `dsh-remote-web-ui` in the same profile — both share the same identity file per profile; mounting the bridge with `relay=false` withdraws the registration row and releases the lease for that shared identity, breaking the legacy plugin's active relay, while running both with relay enabled causes bridge connectors to compete over the same Durable Object connection (or quick tunnel registrations to overwrite each other). This cleanup behavior is intentional.
256
+ - **No browser pairing surface**: this package does not include browser pairing cookie gates, `/api/pair` endpoints, `/remote` proxy routes, or mobile web touch CSS adaptation layers.
257
+
258
+ ## Configuration
259
+
260
+ The plugin is configured through profile YAML (`cordis.patch.yml` or profile configuration files); it provides no settings UI. Unconfigured fields fall back to their built-in defaults:
261
+
262
+ | Key | Type | Default | Description |
263
+ | --- | --- | --- | --- |
264
+ | `relay` | boolean | `true` | Whether to claim relay leases. Enabled by default; when no tunnel is configured, leases are claimed on demand once a device is paired or pairing is requested. |
265
+ | `relayControlUrl` | string | `'https://dsh-market.com/api/relay'` | Relay control-plane base URL; claim, release, register, and unregister endpoints are all derived from it. |
266
+ | `relayPublicSuffix` | string | `'.dsh-market.com'` | Stable hostname suffix. |
267
+ | `autoTunnel` | boolean | `false` | Whether to start a Cloudflare quick tunnel targeting the ingress gate. |
268
+ | `lanBind` | boolean | `undefined` (off) | Whether to start the LAN-edge forwarder listening on the machine's local IPv4 address. |
269
+ | `tunnelToken` | string | `undefined` | Cloudflare named tunnel token for running named tunnels. |
270
+ | `publicBaseUrl` | string | `undefined` | Fixed public HTTPS base URL for named tunnels. |
271
+ | `ingressSync` | boolean | `false` | Whether to sync named tunnel ingress service ports with Cloudflare. |
272
+ | `cfApiToken` | string | `undefined` | Account-level Cloudflare API token for ingress sync. |
273
+ | `cfAccountId` | string | `undefined` | Cloudflare account ID for ingress sync. |
274
+ | `cfTunnelId` | string | `undefined` | Cloudflare named tunnel ID for ingress sync. |
275
+ | `profile` | string | `'desktop'` | Managed profile name (defaults to `$DSH_PROFILE` or `'desktop'`). |
276
+
238
277
  ## Web GUI pairing panel
239
278
 
240
- The browser half exists so that an operator who never opens a terminal still has a way to start pairing. It follows the family's sidebar-foot convention: the trigger registers into the official `sidebar.footer.action` list slot (declared by ui-sidebar — the seat `dsh-remote-web-ui`'s phone trigger and `dsh-update`'s updater already share) and opens the official `Modal`, whose headless card this package fills. Every control it renders is a library primitive — the dialog, the three actions and their glyphs — so the mask, the card, the focus trap, Escape, focus restoration and each hover/focus/disabled state are the shell's behavior rather than a copy of it. It is delivered by the same plugin row: `exports["./client"]` is the artifact and `dsh.client` declares the client modules that must be live first.
279
+ The browser half exists so that an operator who never opens a terminal still has a way to start pairing. It follows the family's sidebar-foot convention: the trigger registers into the official `sidebar.footer.action` list slot (declared by ui-sidebar, sharing this list slot with `dsh-update`'s updater) and opens the official `Modal`, whose headless card this package fills. Every control it renders is a library primitive — the dialog, the three actions and their glyphs — so the mask, the card, the focus trap, Escape, focus restoration and each hover/focus/disabled state are the shell's behavior rather than a copy of it. It is delivered by the same plugin row: `exports["./client"]` is the artifact and `dsh.client` declares the client modules that must be live first.
241
280
 
242
281
  The panel has one job — put the live one-time code in front of the operator, in one reading order:
243
282
 
244
- - **The QR symbol is the code.** It encodes either the bare 43-character base64url token or, when the host can name its own public origin, the `{token,url}` document one scan turns into a fully configured phone. A URL the host did not vouch for would let the phone's own parser rewrite its origin onto this machine's loopback address, which is precisely the address a phone cannot reach. The encoded string is mirrored once, as the `data-dsh-qr-value` attribute on the symbol's part, so a UI check can compare it without decoding anything; it is never rendered as text.
283
+ - **Header and subtitle set the scope.** Title "iOS app pairing"; subtitle "Scan the QR code with the iOS app (beta) to connect an iPhone to this computer. The code is shown only on this machine.", stating the target and security boundary.
284
+ - **The QR symbol is the code.** It encodes either the bare 43-character base64url token or, when the host can name its own public origin, the `{token,url}` document one scan turns into a fully configured iPhone. A URL the host did not vouch for would let the app's own parser rewrite its origin onto this machine's loopback address, which is precisely the address an iPhone cannot reach. The encoded string is mirrored once, as the `data-dsh-qr-value` attribute on the symbol's part, so a UI check can compare it without decoding anything; it is never rendered as text.
245
285
  - **One status line under the symbol.** A live code counts its 30 s window down beside a progress bar; an expired code states the expiry in the same fixed box, so only the sentence changes.
246
- - **One address line.** When the host located its relay origin, the line names the address the phone will dial; otherwise it says outright that no public address was found, that the phone's connection address has to be the public relay set by hand, and that `127.0.0.1:<port>` (this page) is reachable only from this machine.
247
- - **One single-use note.** The code is spent the moment the phone starts pairing, and a new code voids the previous one.
286
+ - **One address line.** When the host located its relay origin, the line states "The iPhone will dial {origin}"; otherwise it says outright "No public address found: set the connection address in the app to your public relay first, then scan. {host} (this page) is reachable only from this machine."
287
+ - **One single-use note.** The code is single-use: pairing spends it, and a new code voids the previous one.
248
288
  - **One action row.** Copy puts the very string the symbol encodes on the clipboard, and **New code** mints a fresh token and voids the previous one; both are one library control at one size, so their states never diverge. Once the code expires, mint-again is the only way back to a scannable symbol: copy is disabled and the symbol is dimmed in place instead of resized or removed.
289
+ - **One beta entry.** Provides "[The iOS app is in beta. Come talk to us on Discord](https://discord.gg/nBy28kjun)", clickable across the entire line.
249
290
  - **A refusal is never silent.** The read is the same loopback-only route an operator would curl: a `403` renders as "this page is not open on this machine" and offers nothing to press, a request that never arrives renders as its own unreachable state with a retry, and an unexpected answer names the status it got.
250
291
 
251
292
  Opening and closing are one motion in both directions: the card stays mounted and plays the dialog's own enter fade backwards, and the reduced-motion path keeps that lifecycle as one short opacity fade rather than dropping the exit. Geometry is held across every state — the symbol's box, the status row, the address line and the copy label keep their height and width — so a countdown, an expiry and a copy confirmation never move their neighbours.
252
293
 
253
- The panel is display-only for the native path. It never spends the token (`pair.begin` stays the phone's call), it never touches the roster, and it adds no wire surface — the envelope, the method names, the topic names and the events are unchanged. `dsh-remote-web-ui`'s pairing service, roster and browser credential are not involved either, so the two remote surfaces keep their own access controls.
294
+ The panel is display-only for the native path. It never spends the token (`pair.begin` stays the phone's call), it never touches the roster, and it adds no wire surface — the envelope, the method names, the topic names and the events are unchanged. The package provides no browser pairing surface or cookie gate.
254
295
 
255
296
  ## Interactive cards in the transcript
256
297
 
@@ -312,6 +353,7 @@ The bridge is mounted like any other host plugin row. It carries no user-facing
312
353
  - **The token comparison does not leak length.** It is a fixed-length comparison rather than an early-exit one, so a wrong token cannot be narrowed byte by byte.
313
354
  - **Approvals fail closed while a client is connected.** The bridge claims a tool's permission request only while at least one paired client is connected; with none, the request goes to the next answerer rather than stalling. A claimed request that nobody answers normalizes to `unavailable`, which the harness treats as a rejection: silence from the phone is never consent.
314
355
  - **The header is the safer carrier.** `Authorization: Bearer <deviceToken>` keeps the credential out of the URL; `?token=` exists for clients that cannot set handshake headers, and the relay, the edge and the access log all see a URL that authenticates as that device.
356
+ - **Relay tier routing and grant credential boundaries.** The device roster (`devices.json`) schema upgrades from 3 to 4, adding an optional `relay: {grant, receivedAt}` to each device row. That `grant` is a 30-day HS256 credential signed by the account service, handed from the phone to the host over an **authenticated, paired connection**; the host merely passes it verbatim in the claim request body. The host therefore still does not know who the account is or what tier it holds: it only knows whether it holds a lease admitted by the relay. Tier evaluation occurs in a single loopback request between the self-hosted relay and the account service; the relay writes quotas into the lease row without recording any user identifier. The `hello.relay` announcement, capability identifier `relay.tier.v1`, and the `relay.grant` frame **exist only when a second meeting point is configured**; without configuration, the handshake is byte-for-byte identical to today, and that frame answers `unknown-method`. The two configuration keys are `relaySecondaryControlUrl` and `relaySecondaryPublicSuffix`, both unconfigured by default.
315
357
 
316
358
  ## Known limitations
317
359
 
package/README.zh.md CHANGED
@@ -10,9 +10,9 @@
10
10
  <img src="https://img.shields.io/badge/license-Apache--2.0-blue?style=flat-square" alt="License">
11
11
  </p>
12
12
 
13
- 把 DeepSeek Harness(DSH)本体发布成协议 v1 的宿主侧适配包:一个 `/ios/v1` 的 WebSocket 面,原生客户端(手机 App、平板、终端脚本)无需浏览器、无需 Web GUI 包体、也无需改动中继即可驱动它。
13
+ 本仓库唯一的远程访问路径:手机 App 通过协议 v1 连上宿主。本包把 DeepSeek Harness(DSH)本体发布成协议 v1,在 `/ios/v1` 提供单个 WebSocket 面,原生手机 App 无需浏览器即可直连并驱动宿主。浏览器远程控制已退役,公网与局域网接入栈能力已迁入本包。
14
14
 
15
- 协议 v1 是有意独立于浏览器路径的第二条面:配对设备 cookie 与受门禁的 `/remote` 通道属于 `dsh-remote-web-ui`,本包不回放那份凭据。它在同一进程内消费宿主——会话工作走 Typert gateway,权限请求走审批瀑布——并自行签发一次性 bootstrap token,不改动 `dsh-remote-web-ui` 的配对服务面。
15
+ 本包在同一进程内消费宿主——会话工作走 Typert gateway,权限请求走审批瀑布——并在仅回环路由上自行签发一次性 bootstrap token,拥有独立的公网中继、Cloudflare 隧道与局域网接入栈。
16
16
 
17
17
  ## 功能
18
18
 
@@ -30,7 +30,7 @@
30
30
  - **订阅而非轮询。** `session.snapshot` 打开宿主的 follow 流并保持它,基线与其后的每一条增量都走同一条 socket。
31
31
  - **审批直达客户端,重连的手机还能拿回仍悬着的那些。** 需要授权的工具以 `approval.request` 事件到达,客户端用 `approval.resolve` 作答;无人应答的请求按拒绝处理,而声明了 `approvals.v1` 的连接会在握手之后再次收到所有未结算的审批。
32
32
  - **配对。** 一次性 bootstrap token 加 P-256 挑战应答产出可吊销的设备令牌;未配对连接只能触达三个方法。
33
- - **一个配对面板。** 同一插件行声明 `dsh.client` 浏览器半区:侧栏底部一个座位,点开官方弹窗,里面只有一张二维码、一条状态行、一条地址说明与一行动作,摆着当前那个一次性配对码。
33
+ - **一个配对面板。** 同一插件行声明 `dsh.client` 浏览器半区:侧栏底部一个二维码图标(aria-label 为「配对 iPhone」),点开弹窗展示 30 秒有效的一次性配对二维码与「重新取码」动作。
34
34
  - **中继无需改动。** 协议搭在实例本来就发布的那个 origin 上,中继这一跳照原样转发它,与其他所有请求无异。
35
35
 
36
36
  ## 传输
@@ -178,14 +178,16 @@ fork 的方法同样什么都不解释。`session.fork` 把 `sessionId` 与客
178
178
 
179
179
  ### Bootstrap token
180
180
 
181
- `GET /remote-bridge/pair/token` 是宿主上的精确路由,门禁同时看两个条件:来源地址必须是 `127.0.0.1`、`::1` 或 `::ffff:127.0.0.1`,且 `Host` header 必须写本机(`127.0.0.1`、`localhost` 或 `[::1]`,端口忽略)。经隧道进来的请求即使其隧道客户端就从本机连出,也会在第二个条件上被拒,因此该端点在公网 origin 上够不到;其余情况一律 403。token 只存内存,30 秒后过期,被第一次 `pair.begin` 用掉即焚;同一条链接会打到宿主日志,配对码本身则渲染在配对面板里,桌面端两条路都能取。
181
+ 配对入口位于侧栏底部的二维码图标,按钮的 aria-label 为「配对 iPhone」。点击后打开配对面板。该面板只在本机可用:令牌路由 `GET /remote-bridge/pair/token` 受回环门控保护,来源地址与 `Host` header 必须均为本机(非本机或经隧道访问一律返回 403)。
182
+
183
+ 配对码一次性有效且具备 30 秒时效(`BOOTSTRAP_TOKEN_TTL_MS = 30_000`),被首次 `pair.begin` 用掉即失效;在面板中点击「重新取码」会使上一张配对码作废并生成新码。面板中没有「停止」按钮,也没有「吊销所有已连接设备」的操作。同一条链接会打印到宿主日志,配对码本身则渲染在配对面板中供扫码。
182
184
 
183
185
  ```sh
184
186
  curl -s http://127.0.0.1:3080/remote-bridge/pair/token
185
187
  # {"token":"...","expiresAt":1760000030000,"url":"ws://127.0.0.1:3080/ios/v1?token=..."}
186
188
  ```
187
189
 
188
- 当这台机器能说出自己的公网地址时——先看 `DSH_REMOTE_PUBLIC_BASE_URL`,其次看 `dsh-remote-web-ui` 维护的中继注册表 `$DSH_HOME/remote-web-ui-registry/<profile>.json`——同一个响应里会多出地址那一半:
190
+ 当这台机器能解析出公网或局域网地址时——无论来自实时的中继租约/隧道状态、`DSH_REMOTE_PUBLIC_BASE_URL` 还是正在监听的局域网转发器——同一个响应里会多出地址那一半:
189
191
 
190
192
  ```json
191
193
  {
@@ -198,7 +200,7 @@ curl -s http://127.0.0.1:3080/remote-bridge/pair/token
198
200
  }
199
201
  ```
200
202
 
201
- `pairingUrl` 就是二维码该装的东西:iOS 客户端会解析 `{token, url}` 并从 `url` 取 origin,所以扫一次就同时设好地址与一次性 token,手机上什么都不用输。查不到公网地址时这两个字段**缺省而非瞎猜**,面板退回只装裸配对码,手机保持它已有的地址不变。
203
+ 二维码编码一个 `{token, url}` 文档,其中 `url` 形如 `wss://<origin>/ios/v1?token=...`(由 `pairingDialUrlOf` 将 https 转为 wss、http 转为 ws)。手机 App 扫码即同时得到地址与令牌,无需手动输入。查不到可用地址时字段缺省而非盲目猜测,面板退回裸配对码,手机保持已有地址不变。
202
204
 
203
205
  ### 设备令牌
204
206
 
@@ -232,22 +234,61 @@ curl -s http://127.0.0.1:3080/remote-bridge/pair/token
232
234
 
233
235
  这一跳带来两条后果。它看得见请求 URL,所以用 `?token=` 连接等于把设备令牌交给中继、Cloudflare 边缘与 origin 访问日志——优先用 header。而 `GET /remote-bridge/pair/token` 会像其他路径一样被转发,但它的 loopback 门禁会拒掉这条转发请求,因此配对只能从本机发起。
234
236
 
237
+ ## 接入栈与安全模型
238
+
239
+ `@linxin666/dsh-remote-bridge` 拥有完整的公网与局域网接入栈:
240
+ - **中继身份与租约**:`relay-registry` 在 `$DSH_HOME/remote-web-ui-registry/<profile>.json` 下持久化中继身份(id 与 secret);改 relay 配置会重挂载插件行。在未配置隧道(`tunnel.mode === 'off'`)且尚无已配对设备时,插件启动保持静默,不铸造身份也不申领租约;仅当名册读出已配对设备、本机打开配对面板取码、新设备完成配对或开启隧道时才按需触发申领(同时过滤 `idle`/`claiming`/`dialing` 过渡态日志并对连续相同的失败日志去重)。当以 `relay=false` 挂载且盘上存在身份时,挂载时撤销上一次留下的注册行并 `pair.release()` 释放租约各一次(失败各记一行;卸载时不释放也不撤行,保留手机收藏地址由服务端 GC 回收;`relay=false` 挂载绝不铸造新身份,盘上无身份时零副作用、不写盘)。
241
+ - **中继连接器**:`relay-connector` 并行维护快速隧道与命名隧道连接器;`relay-bridge-connector` 经 WSS 连接 Cloudflare Durable Object 会合点,并将连接状态记录在 `$DSH_HOME/remote-web-ui-relay-bridge.json`(状态文件写入经行为级验证,缺省落到 `$DSH_HOME`,非源码文本断言)。
242
+ - **隧道生命周期**:`tunnel`、`tunnel-plan` 与 `tunnel-orphan` 管理平台原生 `cloudflared` 子进程,具备指数退避重启机制并自动清理崩溃遗留的孤儿进程。
243
+ - **命名隧道端口同步**:`ingress-sync` 在宿主监听端口变化时,把 Cloudflare 命名隧道的 ingress 规则原子收敛到本机闸门端口。
244
+ - **局域网转发与防火墙**:`lan`、`lan-bind`、`lan-bind-plan`、`lan-forward`、`host-bind-capability` 与 `firewall` 管理局域网边缘转发器与操作系统防火墙规则(Windows Defender 与 Linux firewalld/ufw/iptables),宿主 webserver 本身始终严格保持回环绑定。
245
+
246
+ 本包的安全模型对所有外部接入入口实施严格的白名单隔离:
247
+ - **入站网关(`src/host/ingress-gate.ts`)**:仅绑定 `127.0.0.1`,且仅将 `/ios/v1` 的 WebSocket 升级转发到本机协议端口,同时将 `Host` 头改写为回环权威。其余任何普通 HTTP 请求与非白名单升级一律直接返回 `404 {"error":"not-found"}` 并关闭连接,绝不建立上游连接。
248
+ - **隧道的目标是入站网关而非 webServer 端口**:cloudflared 快速隧道与命名隧道的目标均指向 `ingress-gate` 的动态回环端口,绝不直连 `webServer` 端口。外界经隧道传入的请求无法触达 webServer 路由、内部 API 或其他插件。
249
+ - **中继注册行与公网暴露面**:中继注册行只写入快速隧道的 URL,也就是入站闸门,公网因此只看得见 /ios/v1。计划为 quick 且隧道 running 时把闸门 URL 注册给中继 Worker(代理稳定子域名到本机,端点与后缀由配置决定、缺省为 `<id>.dsh-market.com`);卸载时只清本地引用不撤行。二维码公网地址由 `livePublicOriginOf` 裁定:bridge 或 named 租约优先稳定子域名;quick 租约在注册未成功时退回隧道 running URL;无租约用隧道 URL;皆无则无地址。其后退回 `DSH_REMOTE_PUBLIC_BASE_URL`,局域网兜底仅当局域网转发器真的在监听时才按实际绑定的 address 与 port 给出(不猜地址列表首项,转发器停止即无兜底;已彻底移除磁盘 registry 行作为兜底地址,消除了对老插件数据文件的最后一处依赖)。
250
+ - **局域网转发器的目标同样是入站网关**:局域网转发器监听本机局域网 IPv4 地址,并将请求严格转发至 `ingress-gate` 端口,因此局域网入口的暴露面同样仅有 `/ios/v1`。
251
+ - **中继桥会合点白名单**:`relay-bridge-connector.ts` 对 Durable Object 汇聚的入站流执行完全相同的白名单检查,非 `/ios/v1` 的 HTTP 流直接应答 `404 {"error":"not-found"}`,非白名单 WebSocket 升级直接回复 `ws-fail 404 {"error":"not-found"}`,两条路都不建立上游连接。
252
+ - **身份目录沿用历史拼写与并存禁忌**:中继身份目录 `$DSH_HOME/remote-web-ui-registry/` 与状态文件 `remote-web-ui-relay-bridge.json` 有意沿用历史拼写,确保既有 profile 保持身份连续性,已配对设备升级后无需重新配对。**已知风险与并存禁忌**:同一 profile 切勿同时启用本插件与已弃用的 `dsh-remote-web-ui` 的中继——两者按 profile 共用同一份身份文件;若新桥以 `relay=false` 挂载,会撤销该身份下的注册行并释放租约,从而打断老插件正在使用的公网中继;若两侧 relay 同时开启,bridge 传输下两个连接器会拿同一凭据竞争同一个 Durable Object 连接互相顶掉,quick 传输下后注册者覆盖前者。该收尾行为是有意设计的。
253
+ - **本插件不含浏览器配对面**:本包不包含配对 cookie 门控、`/api/pair` 路由族、`/remote` 代理通道以及手机浏览器竖屏触控适配层。
254
+
255
+ ## 配置
256
+
257
+ 本插件通过 profile YAML(如 `cordis.patch.yml` 或 profile 配置)进行配置,不提供设置界面。未配置的字段回退到内置默认值:
258
+
259
+ | 配置项 | 类型 | 默认值 | 说明 |
260
+ | --- | --- | --- | --- |
261
+ | `relay` | boolean | `true` | 是否申领 relay 租约。默认开启;无隧道时在已有配对设备或发起配对时按需 claim 租约。 |
262
+ | `relayControlUrl` | string | `'https://dsh-market.com/api/relay'` | 中继控制面基址,claim/release/register/unregister 都从它派生。 |
263
+ | `relayPublicSuffix` | string | `'.dsh-market.com'` | 稳定主机名后缀。 |
264
+ | `autoTunnel` | boolean | `false` | 是否启动指向入站网关的 Cloudflare 快速隧道。 |
265
+ | `lanBind` | boolean | `undefined`(关) | 是否启动监听本机局域网 IPv4 地址的局域网转发器。 |
266
+ | `tunnelToken` | string | `undefined` | 运行 Cloudflare 命名隧道所需的隧道令牌。 |
267
+ | `publicBaseUrl` | string | `undefined` | 命名隧道的固定公网 HTTPS 基地址。 |
268
+ | `ingressSync` | boolean | `false` | 是否自动将命名隧道 ingress 服务端口同步至 Cloudflare。 |
269
+ | `cfApiToken` | string | `undefined` | 用于 ingress-sync 的 Cloudflare 账户级 API 令牌。 |
270
+ | `cfAccountId` | string | `undefined` | 用于 ingress-sync 的 Cloudflare 账户 ID。 |
271
+ | `cfTunnelId` | string | `undefined` | 用于 ingress-sync 的 Cloudflare 命名隧道 ID。 |
272
+ | `profile` | string | `'desktop'` | 受管 profile 名称(缺省读取 `$DSH_PROFILE` 或 `'desktop'`)。 |
273
+
235
274
  ## Web GUI 配对面板
236
275
 
237
- 浏览器半区存在的理由,是让从不开终端的操作者也有一条发起配对的路径。它沿用家族在侧栏底部的惯例:触发器注册进官方 `sidebar.footer.action` 列表槽位(由 ui-sidebar 声明——`dsh-remote-web-ui` 的手机触发器与 `dsh-update` 的更新器已经共用的那个座位),点开后是官方 `Modal`,这张无头卡片由本包填充。它渲染的每个控件都是库里已有的 primitive——弹窗、三个动作与它们的字形——因此遮罩、卡片、焦点圈定、Esc、焦点归还,以及每个 hover/focus/disabled 状态都是官方壳自己的行为,而不是本包的一份复制品。它由同一插件行承载:产物是 `exports["./client"]`,`dsh.client` 声明必须先就位的 client 模块。
276
+ 浏览器半区存在的理由,是让从不开终端的操作者也有一条发起配对的路径。它沿用家族在侧栏底部的惯例:触发器注册进官方 `sidebar.footer.action` 列表槽位(由 ui-sidebar 声明,与 `dsh-update` 的更新器共用该列表槽位),点开后是官方 `Modal`,这张无头卡片由本包填充。它渲染的每个控件都是库里已有的 primitive——弹窗、三个动作与它们的字形——因此遮罩、卡片、焦点圈定、Esc、焦点归还,以及每个 hover/focus/disabled 状态都是官方壳自己的行为,而不是本包的一份复制品。它由同一插件行承载:产物是 `exports["./client"]`,`dsh.client` 声明必须先就位的 client 模块。
238
277
 
239
278
  面板只做一件事——把活着的那个一次性配对码摆到操作者面前,且只有这一个阅读顺序:
240
279
 
241
- - **二维码本身就是那个码。** 它要么装 43 个 base64url 字符的裸 token,要么在宿主说得出自己公网地址时装 `{token,url}` 文档,扫一次就把手机配好。若放一个宿主没背书过的 URL,手机端的解析器会顺手把 origin 改写成这台机器的 loopback 地址,而那恰恰是手机够不到的地址。编码串只在二维码部件的 `data-dsh-qr-value` 属性里留一份镜像,供 UI 检查不必解码就比对;它从不以文字形式渲染。
280
+ - **卡头与副标题说明目标。** 标题为「iOS App 配对」,副标题「用 iOS App(内测)扫描二维码,把 iPhone 连到这台电脑上。配对码只在本机显示。」,说明操作对象与安全边界。
281
+ - **二维码本身就是那个码。** 它要么装 43 个 base64url 字符的裸 token,要么在宿主说得出自己公网地址时装 `{token,url}` 文档,扫一次就把 iPhone 配好。若放一个宿主没背书过的 URL,App 端的解析器会顺手把 origin 改写成这台机器的 loopback 地址,而那恰恰是 iPhone 够不到的地址。编码串只在二维码部件的 `data-dsh-qr-value` 属性里留一份镜像,供 UI 检查不必解码就比对;它从不以文字形式渲染。
242
282
  - **二维码下方只有一条状态行。** 活着的码在进度条旁倒数那 30 秒;过期的码在同一个固定高度里直说过期,变的只有那句话。
243
- - **一条地址说明。** 宿主定位到中继地址时,这一行就写明手机将要连到哪儿;定位不到时,它直说没找到公网地址、手机里的连接地址得手填公网中继,并点明本页所在的 `127.0.0.1:<端口>` 只有本机能连。
244
- - **一条一次性说明。** 手机一开始配对,这个码就作废;重新取码同样会作废上一张。
283
+ - **一条地址说明。** 宿主定位到中继地址时,这一行写明「iPhone 将连到 {origin}」;定位不到时,它直说「没有找到公网地址:先在 App 里把连接地址填成你的公网中继,再扫码。本页的 {host} 只有本机能连。」。
284
+ - **一条一次性说明。** 配对码一次性有效:iPhone 一开始配对就作废,重新取码也会作废上一张。
245
285
  - **一行动作。** 复制把二维码里那个字符串原样放进剪贴板,「重新取码」签发新 token 并作废上一张;两者都是同一个库控件、同一个尺寸,交互态不会各走一套。码一旦过期,回到可扫状态的唯一路径就是重新取码:复制被禁用,二维码原地降级变暗,而不是缩小或被移除。
286
+ - **一行内测入口。** 提供「[iOS App 还在内测,欢迎来 Discord 交流](https://discord.gg/nBy28kjun)」,整行可点击打开。
246
287
  - **失败不静默。** 取码走的就是操作者本可以用 curl 打的那条仅 loopback 路由:`403` 渲染成「这个页面不是从本机打开的」且不给出可点的动作;请求没到达则渲染成它自己的不可达状态并给出重试;宿主回了别的状态就把那个状态码说出来。
247
288
 
248
289
  开与关是同一段动效的两条腿:卡片保持挂载,把弹窗自己的进场淡入反向播完才卸载;reduced-motion 下这条生命周期换成一段短淡出,而不是干脆没有出场。几何在每种状态里都钉住——二维码的盒子、状态行、地址说明与复制标签都不改高度和宽度——所以倒计时、过期与复制确认都不会挪动它们旁边的元素。
249
290
 
250
- 面板对原生路径而言只是显示层。它从不消耗配对码(`pair.begin` 始终是手机那一侧的动作),从不碰名册,也不新增任何 wire 面——信封、方法名、主题名与事件一律不动。`dsh-remote-web-ui` 的配对服务、名册与浏览器凭据同样不参与其中,因此两条远程面各自保留自己的访问控制。
291
+ 面板对原生路径而言只是显示层。它从不消耗配对码(`pair.begin` 始终是手机那一侧的动作),从不碰名册,也不新增任何 wire 面——信封、方法名、主题名与事件一律不动。本插件不提供任何浏览器配对面或 cookie 门控。
251
292
 
252
293
  ## 会话里的整页卡
253
294
 
@@ -309,6 +350,7 @@ dsh plugin --profile web add link:$(pwd)/packages/dsh-remote-bridge
309
350
  - **令牌比对不泄漏长度。** 用的是定长比较而非提前返回的比较,因此错误令牌无法被逐字节逼近。
310
351
  - **审批在客户端在线时 fail closed。** 只要还有一个已配对客户端在线,桥才认领工具的权限请求;一个都没有时,请求交给下一个应答者而不是卡住。已认领而无人应答的审批会被归一为 `unavailable`,宿主按拒绝处理:手机沉默永远不等于同意。
311
352
  - **header 是更安全的载体。** `Authorization: Bearer <deviceToken>` 让凭据不进入 URL;`?token=` 是给无法设置握手 header 的客户端的,此时中继、边缘与访问日志都会看到一条以该设备身份鉴权的 URL。
353
+ - **中继档位分流与授权凭据边界。** 名册(`devices.json`)schema 3 → 4,每台设备行新增可选的 `relay: {grant, receivedAt}`。那枚 `grant` 是账号服务签发的 30 天 HS256 凭据,经**已配对的加密连接**由手机交给宿主,宿主只把它原样放进 claim 请求体。宿主因此仍然不知道账号是谁、也不知道档位:它只知道「我有没有一份被中继承认的租约」。档位判定发生在自建中继与账号服务之间的一次回环请求里,中继只把额度写进租约行,不落任何用户标识。`hello.relay`、能力名 `relay.tier.v1`、`relay.grant` 这一帧**只在配置了第二个会合点时才存在**;不配置时握手逐字节等于今天,那一帧回 `unknown-method`。两个配置项名:`relaySecondaryControlUrl` 与 `relaySecondaryPublicSuffix`,缺省都不配置。
312
354
 
313
355
  ## 已知限制
314
356
 
package/lib/client.js CHANGED
@@ -1226,7 +1226,7 @@ window.__ModuleLoader__.load({
1226
1226
  const PART_PANEL = "panel";
1227
1227
  //#endregion
1228
1228
  //#region \0dsh-css:packages/dsh-remote-bridge/src/client/panel.module.css.mjs
1229
- const css$1 = ".sd7VOG_panel,.sd7VOG_trigger,.sd7VOG_dialog{--pair-space-1:4px;--pair-space-2:8px;--pair-space-3:12px;--pair-space-4:24px;--pair-title-size:15px;--pair-title-line:24px;--pair-text-size:13px;--pair-text-line:20px;--pair-state-size:12px;--pair-state-line:18px;--pair-qr:184px;--pair-bar:4px;--pair-seat:36px;--pair-close:28px;--pair-hit:44px;--pair-width:460px;--pair-faded:.35;--pair-focus-offset:2px;--pair-status:calc(var(--pair-state-line) + var(--pair-space-1) + var(--pair-bar));--pair-address:calc(var(--pair-text-line) * 2)}.sd7VOG_trigger{width:var(--pair-seat);height:var(--pair-seat);color:var(--dsw-alias-label-secondary);cursor:pointer;transition:background-color var(--ds-transition-duration) ease, color var(--ds-transition-duration) ease;background:0 0;border:none;border-radius:50%;flex:none;order:-1;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.sd7VOG_trigger:after{content:\"\";inset:calc((var(--pair-hit) - var(--pair-seat)) / -2);border-radius:50%;position:absolute}.sd7VOG_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.sd7VOG_trigger:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}.sd7VOG_trigger:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:var(--pair-focus-offset)}[class*=footerActions]:has([data-dsh-plugin=remote-bridge][data-wide=rail]){align-items:center;gap:var(--pair-space-1,4px);flex-direction:column}.sd7VOG_dialog.sd7VOG_dialog{width:min(var(--pair-width), 100%);max-height:100%;padding:var(--pair-space-4);overflow:auto}.sd7VOG_panel{gap:var(--pair-space-3);box-sizing:border-box;width:100%;max-width:100%;color:var(--dsw-alias-label-primary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);transition:opacity var(--ds-transition-duration) var(--ds-ease-in-out);flex-direction:column;display:flex}.sd7VOG_panel[data-closing]{opacity:0;animation:var(--pair-exit-name,none) var(--ds-transition-duration) var(--ds-ease-in-out) reverse both}@media (prefers-reduced-motion:reduce){.sd7VOG_panel[data-closing]{animation:none}}.sd7VOG_header{align-items:flex-start;gap:var(--pair-space-3);display:flex}.sd7VOG_heading{flex:1;min-width:0}.sd7VOG_title{font-size:var(--pair-title-size);font-weight:600;line-height:var(--pair-title-line);margin:0}.sd7VOG_subtitle{margin:var(--pair-space-1) 0 0;color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line)}.sd7VOG_close{width:var(--pair-close);color:var(--dsw-alias-label-secondary);flex:none;padding:0;position:relative}.sd7VOG_close:after{content:\"\";inset:calc((var(--pair-hit) - var(--pair-close)) / -2);border-radius:50%;position:absolute}.sd7VOG_body{gap:var(--pair-space-2);flex-direction:column;display:flex}.sd7VOG_qrCard{align-items:center;gap:var(--pair-space-2);padding:var(--pair-space-3);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);flex-direction:column;display:flex}.sd7VOG_qrSlot{width:var(--pair-qr);height:var(--pair-qr);justify-content:center;align-items:center;display:flex}.sd7VOG_qrSlot[data-expired]{opacity:var(--pair-faded)}.sd7VOG_skeleton{width:var(--pair-qr);height:var(--pair-qr);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);display:block}.sd7VOG_status{justify-content:center;align-items:center;gap:var(--pair-space-1);box-sizing:border-box;width:100%;height:var(--pair-status);flex-direction:column;display:flex}.sd7VOG_statusText{color:var(--dsw-alias-label-secondary);font-size:var(--pair-state-size);line-height:var(--pair-state-line);font-variant-numeric:tabular-nums;margin:0}.sd7VOG_bar{width:100%;height:var(--pair-bar);border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-interactive-bg-hover);display:block;overflow:hidden}.sd7VOG_barFill{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-brand-primary);height:100%;transition:width var(--ds-transition-duration) linear;display:block}.sd7VOG_address{min-height:var(--pair-address);color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);align-items:center;margin:0;display:flex}.sd7VOG_address[data-tone=warning]{color:var(--dsw-alias-state-warn-primary)}.sd7VOG_hint{color:var(--dsw-alias-label-tertiary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);margin:0}.sd7VOG_notice{align-items:flex-start;gap:var(--pair-space-2);padding:var(--pair-space-3);border:1px solid var(--dsw-alias-state-error-primary);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);display:flex}.sd7VOG_noticeIcon{color:var(--dsw-alias-state-error-primary);flex:none;display:inline-flex}.sd7VOG_noticeCopy{min-width:0}.sd7VOG_noticeTitle{font-size:var(--pair-text-size);font-weight:600;line-height:var(--pair-text-line);margin:0}.sd7VOG_noticeText{margin:var(--pair-space-1) 0 0;color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line)}.sd7VOG_actions{justify-content:flex-end;align-items:center;gap:var(--pair-space-2);display:flex}.sd7VOG_labels{display:grid}.sd7VOG_label{grid-area:1/1}.sd7VOG_label[data-visible=false]{visibility:hidden}.sd7VOG_announce{clip:rect(0, 0, 0, 0);clip-path:inset(0);width:0;height:0;margin:0;position:absolute;overflow:hidden}";
1229
+ const css$1 = ".sd7VOG_panel,.sd7VOG_trigger,.sd7VOG_dialog{--pair-space-1:4px;--pair-space-2:8px;--pair-space-3:12px;--pair-space-4:24px;--pair-title-size:15px;--pair-title-line:24px;--pair-text-size:13px;--pair-text-line:20px;--pair-state-size:12px;--pair-state-line:18px;--pair-qr:184px;--pair-bar:4px;--pair-seat:36px;--pair-close:28px;--pair-hit:44px;--pair-width:460px;--pair-faded:.35;--pair-focus-offset:2px;--pair-status:calc(var(--pair-state-line) + var(--pair-space-1) + var(--pair-bar));--pair-address:calc(var(--pair-text-line) * 2)}.sd7VOG_trigger{width:var(--pair-seat);height:var(--pair-seat);color:var(--dsw-alias-label-secondary);cursor:pointer;transition:background-color var(--ds-transition-duration) ease, color var(--ds-transition-duration) ease;background:0 0;border:none;border-radius:50%;flex:none;order:-1;justify-content:center;align-items:center;padding:0;display:inline-flex;position:relative}.sd7VOG_trigger:after{content:\"\";inset:calc((var(--pair-hit) - var(--pair-seat)) / -2);border-radius:50%;position:absolute}.sd7VOG_trigger:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.sd7VOG_trigger:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}.sd7VOG_trigger:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:var(--pair-focus-offset)}.sd7VOG_trigger[data-wide=wide]{order:1;margin-inline-start:auto}[class*=footerActions]:has([data-dsh-plugin=remote-bridge][data-wide=rail]){align-items:center;gap:var(--pair-space-1,4px);flex-direction:column}.sd7VOG_dialog.sd7VOG_dialog{width:min(var(--pair-width), 100%);max-height:100%;padding:var(--pair-space-4);overflow:auto}.sd7VOG_panel{gap:var(--pair-space-3);box-sizing:border-box;width:100%;max-width:100%;color:var(--dsw-alias-label-primary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);transition:opacity var(--ds-transition-duration) var(--ds-ease-in-out);flex-direction:column;display:flex}.sd7VOG_panel[data-closing]{opacity:0;animation:var(--pair-exit-name,none) var(--ds-transition-duration) var(--ds-ease-in-out) reverse both}@media (prefers-reduced-motion:reduce){.sd7VOG_panel[data-closing]{animation:none}}.sd7VOG_header{align-items:flex-start;gap:var(--pair-space-3);display:flex}.sd7VOG_heading{flex:1;min-width:0}.sd7VOG_title{font-size:var(--pair-title-size);font-weight:600;line-height:var(--pair-title-line);margin:0}.sd7VOG_subtitle{margin:var(--pair-space-1) 0 0;color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line)}.sd7VOG_close{width:var(--pair-close);color:var(--dsw-alias-label-secondary);flex:none;padding:0;position:relative}.sd7VOG_close:after{content:\"\";inset:calc((var(--pair-hit) - var(--pair-close)) / -2);border-radius:50%;position:absolute}.sd7VOG_body{gap:var(--pair-space-2);flex-direction:column;display:flex}.sd7VOG_qrCard{align-items:center;gap:var(--pair-space-2);padding:var(--pair-space-3);border:1px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-layer-1);flex-direction:column;display:flex}.sd7VOG_qrSlot{width:var(--pair-qr);height:var(--pair-qr);justify-content:center;align-items:center;display:flex}.sd7VOG_qrSlot[data-expired]{opacity:var(--pair-faded)}.sd7VOG_skeleton{width:var(--pair-qr);height:var(--pair-qr);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);display:block}.sd7VOG_status{justify-content:center;align-items:center;gap:var(--pair-space-1);box-sizing:border-box;width:100%;height:var(--pair-status);flex-direction:column;display:flex}.sd7VOG_statusText{color:var(--dsw-alias-label-secondary);font-size:var(--pair-state-size);line-height:var(--pair-state-line);font-variant-numeric:tabular-nums;margin:0}.sd7VOG_bar{width:100%;height:var(--pair-bar);border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-interactive-bg-hover);display:block;overflow:hidden}.sd7VOG_barFill{border-radius:var(--dsw-radius-xs);background:var(--dsw-alias-brand-primary);height:100%;transition:width var(--ds-transition-duration) linear;display:block}.sd7VOG_address{min-height:var(--pair-address);color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);align-items:center;margin:0;display:flex}.sd7VOG_address[data-tone=warning]{color:var(--dsw-alias-state-warn-primary)}.sd7VOG_hint{color:var(--dsw-alias-label-tertiary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);margin:0}.sd7VOG_invite{color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line);transition:color var(--ds-transition-duration) ease;align-self:flex-start;margin:0;text-decoration:underline}.sd7VOG_invite:hover{color:var(--dsw-alias-label-primary)}.sd7VOG_invite:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:var(--pair-focus-offset)}.sd7VOG_notice{align-items:flex-start;gap:var(--pair-space-2);padding:var(--pair-space-3);border:1px solid var(--dsw-alias-state-error-primary);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);display:flex}.sd7VOG_noticeIcon{color:var(--dsw-alias-state-error-primary);flex:none;display:inline-flex}.sd7VOG_noticeCopy{min-width:0}.sd7VOG_noticeTitle{font-size:var(--pair-text-size);font-weight:600;line-height:var(--pair-text-line);margin:0}.sd7VOG_noticeText{margin:var(--pair-space-1) 0 0;color:var(--dsw-alias-label-secondary);font-size:var(--pair-text-size);line-height:var(--pair-text-line)}.sd7VOG_actions{justify-content:flex-end;align-items:center;gap:var(--pair-space-2);display:flex}.sd7VOG_labels{display:grid}.sd7VOG_label{grid-area:1/1}.sd7VOG_label[data-visible=false]{visibility:hidden}.sd7VOG_announce{clip:rect(0, 0, 0, 0);clip-path:inset(0);width:0;height:0;margin:0;position:absolute;overflow:hidden}";
1230
1230
  const tagId$1 = "@linxin666/dsh-remote-bridge/packages/dsh-remote-bridge/src/client/panel.module.css";
1231
1231
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]") === null) {
1232
1232
  const tag = document.createElement("style");
@@ -1247,6 +1247,7 @@ window.__ModuleLoader__.load({
1247
1247
  "header": "sd7VOG_header",
1248
1248
  "heading": "sd7VOG_heading",
1249
1249
  "hint": "sd7VOG_hint",
1250
+ "invite": "sd7VOG_invite",
1250
1251
  "label": "sd7VOG_label",
1251
1252
  "labels": "sd7VOG_labels",
1252
1253
  "notice": "sd7VOG_notice",
@@ -1281,6 +1282,13 @@ window.__ModuleLoader__.load({
1281
1282
  /** The custom property carrying the dialog's own enter keyframe name. */
1282
1283
  const EXIT_NAME_VAR = "--pair-exit-name";
1283
1284
  /**
1285
+ * Where a reader of the beta build can reach the people running it. The URL is
1286
+ * code, not copy: the dictionaries carry the sentence, this constant carries the
1287
+ * destination, so a translation cannot retarget the link and a check can assert
1288
+ * the real one.
1289
+ */
1290
+ const COMMUNITY_INVITE_URL = "https://discord.gg/nBy28kjun";
1291
+ /**
1284
1292
  * The QR symbol, memoized on the secret: the countdown re-renders the panel
1285
1293
  * every second, and qrcode.react rebuilds the whole module path on each render.
1286
1294
  * The encoded value is the host's own `pairingUrl` verbatim when there is one —
@@ -1371,84 +1379,94 @@ window.__ModuleLoader__.load({
1371
1379
  }),
1372
1380
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1373
1381
  className: panel_module_css_default.body,
1374
- children: [(state.kind === "forbidden" || state.kind === "failed" || state.kind === "unreachable") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1375
- className: panel_module_css_default.notice,
1376
- "data-dsh-part": "notice",
1377
- "data-tone": "alert",
1378
- role: "alert",
1379
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1380
- className: panel_module_css_default.noticeIcon,
1381
- "aria-hidden": "true",
1382
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {})
1383
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1384
- className: panel_module_css_default.noticeCopy,
1385
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1386
- className: panel_module_css_default.noticeTitle,
1387
- children: [
1388
- state.kind === "forbidden" && t("forbidden.title"),
1389
- state.kind === "failed" && t("failed.title"),
1390
- state.kind === "unreachable" && t("unreachable.title")
1391
- ]
1392
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1393
- className: panel_module_css_default.noticeText,
1394
- children: [
1395
- state.kind === "forbidden" && t("forbidden.body"),
1396
- state.kind === "failed" && t("failed.body", { status: String(state.status) }),
1397
- state.kind === "unreachable" && t("unreachable.body")
1398
- ]
1399
- })]
1400
- })]
1401
- }), (state.kind === "reading" || ready) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1402
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1403
- className: panel_module_css_default.qrCard,
1404
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1405
- className: panel_module_css_default.qrSlot,
1406
- "data-dsh-part": "qr",
1407
- ["data-dsh-qr-value"]: payload,
1408
- ["data-expired"]: expired || void 0,
1409
- children: ready ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PairQrCode, {
1410
- value: payload,
1411
- label: t("pair.qrLabel")
1412
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1413
- className: panel_module_css_default.skeleton,
1414
- "aria-hidden": "true"
1415
- })
1382
+ children: [
1383
+ (state.kind === "forbidden" || state.kind === "failed" || state.kind === "unreachable") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1384
+ className: panel_module_css_default.notice,
1385
+ "data-dsh-part": "notice",
1386
+ "data-tone": "alert",
1387
+ role: "alert",
1388
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1389
+ className: panel_module_css_default.noticeIcon,
1390
+ "aria-hidden": "true",
1391
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {})
1416
1392
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1417
- className: panel_module_css_default.status,
1418
- children: [
1419
- !ready && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1420
- className: panel_module_css_default.statusText,
1421
- children: t("state.reading")
1422
- }),
1423
- ready && expired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1424
- className: panel_module_css_default.statusText,
1425
- role: "status",
1426
- children: t("pair.expired")
1427
- }),
1428
- ready && !expired && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1429
- className: panel_module_css_default.statusText,
1430
- children: t("pair.countdown", { s: String(seconds) })
1431
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1432
- className: panel_module_css_default.bar,
1433
- "aria-hidden": "true",
1434
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1435
- className: panel_module_css_default.barFill,
1436
- style: { width: `${String(percent)}%` }
1437
- })
1438
- })] })
1439
- ]
1393
+ className: panel_module_css_default.noticeCopy,
1394
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1395
+ className: panel_module_css_default.noticeTitle,
1396
+ children: [
1397
+ state.kind === "forbidden" && t("forbidden.title"),
1398
+ state.kind === "failed" && t("failed.title"),
1399
+ state.kind === "unreachable" && t("unreachable.title")
1400
+ ]
1401
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1402
+ className: panel_module_css_default.noticeText,
1403
+ children: [
1404
+ state.kind === "forbidden" && t("forbidden.body"),
1405
+ state.kind === "failed" && t("failed.body", { status: String(state.status) }),
1406
+ state.kind === "unreachable" && t("unreachable.body")
1407
+ ]
1408
+ })]
1440
1409
  })]
1441
1410
  }),
1442
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1443
- className: panel_module_css_default.address,
1444
- "data-tone": located ? "plain" : "warning",
1445
- children: [ready && located && t("origin.located", { origin: state.origin ?? "" }), ready && !located && t("origin.missing", { host })]
1446
- }),
1447
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1448
- className: panel_module_css_default.hint,
1449
- children: t("pair.usedHint")
1411
+ (state.kind === "reading" || ready) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
1412
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1413
+ className: panel_module_css_default.qrCard,
1414
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1415
+ className: panel_module_css_default.qrSlot,
1416
+ "data-dsh-part": "qr",
1417
+ ["data-dsh-qr-value"]: payload,
1418
+ ["data-expired"]: expired || void 0,
1419
+ children: ready ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PairQrCode, {
1420
+ value: payload,
1421
+ label: t("pair.qrLabel")
1422
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1423
+ className: panel_module_css_default.skeleton,
1424
+ "aria-hidden": "true"
1425
+ })
1426
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1427
+ className: panel_module_css_default.status,
1428
+ children: [
1429
+ !ready && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1430
+ className: panel_module_css_default.statusText,
1431
+ children: t("state.reading")
1432
+ }),
1433
+ ready && expired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1434
+ className: panel_module_css_default.statusText,
1435
+ role: "status",
1436
+ children: t("pair.expired")
1437
+ }),
1438
+ ready && !expired && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1439
+ className: panel_module_css_default.statusText,
1440
+ children: t("pair.countdown", { s: String(seconds) })
1441
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1442
+ className: panel_module_css_default.bar,
1443
+ "aria-hidden": "true",
1444
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1445
+ className: panel_module_css_default.barFill,
1446
+ style: { width: `${String(percent)}%` }
1447
+ })
1448
+ })] })
1449
+ ]
1450
+ })]
1451
+ }),
1452
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1453
+ className: panel_module_css_default.address,
1454
+ "data-tone": located ? "plain" : "warning",
1455
+ children: [ready && located && t("origin.located", { origin: state.origin ?? "" }), ready && !located && t("origin.missing", { host })]
1456
+ }),
1457
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1458
+ className: panel_module_css_default.hint,
1459
+ children: t("pair.usedHint")
1460
+ })
1461
+ ] }),
1462
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
1463
+ className: panel_module_css_default.invite,
1464
+ href: COMMUNITY_INVITE_URL,
1465
+ target: "_blank",
1466
+ rel: "noopener noreferrer",
1467
+ children: t("community.invite")
1450
1468
  })
1451
- ] })]
1469
+ ]
1452
1470
  }),
1453
1471
  state.kind !== "forbidden" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", {
1454
1472
  className: panel_module_css_default.actions,
@@ -2229,10 +2247,12 @@ window.__ModuleLoader__.load({
2229
2247
  * the header of an interactive card (§35.11).
2230
2248
  *
2231
2249
  * The panel has one job — put the live one-shot code in front of the operator as
2232
- * a QR symbol — so its copy carries exactly four things: what to do with the
2233
- * symbol, how long it lives, which address the phone will actually dial, and why
2234
- * the code is single-use. No key states how the host finds its public address:
2235
- * that is an implementation fact the reader cannot act on.
2250
+ * a QR symbol — so its copy carries what to do with the symbol, how long it
2251
+ * lives, which address the phone will actually dial, why the code is single-use,
2252
+ * and that the app is still in testing: the reader is told what they are joining
2253
+ * and where to ask about it. No key states how the host finds its public
2254
+ * address, and no key names the wire protocol: both are implementation facts the
2255
+ * reader cannot act on.
2236
2256
  *
2237
2257
  * The card's keys say only what the transcript row can act on: whether the page
2238
2258
  * is still waiting for the operator, that it is over, that this desktop renders
@@ -2241,17 +2261,18 @@ window.__ModuleLoader__.load({
2241
2261
  */
2242
2262
  /** Simplified Chinese dictionary (the key-set source of truth). */
2243
2263
  const zh = {
2244
- "entry.label": "配对手机(协议 v1)",
2245
- "title": "协议 v1 配对",
2246
- "subtitle": "用手机 App 扫描二维码,即可让手机以协议 v1 连上这台宿主。配对码由本机签发,只在本机显示。",
2264
+ "entry.label": "配对 iPhone",
2265
+ "title": "iOS App 配对",
2266
+ "subtitle": "用 iOS App(内测)扫描二维码,把 iPhone 连到这台电脑上。配对码只在本机显示。",
2247
2267
  "state.reading": "正在取配对码…",
2248
2268
  "pair.qrLabel": "配对二维码",
2249
2269
  "pair.countdown": "剩余 {s} 秒",
2250
2270
  "pair.expired": "配对码已过期",
2251
2271
  "pair.refresh": "重新取码",
2252
- "pair.usedHint": "配对码一次性有效:手机一开始配对即作废,重新取码也会作废上一张。",
2253
- "origin.located": "手机将连到 {origin}",
2254
- "origin.missing": "没有找到公网地址:请先在手机里把连接地址填成你的公网中继,再扫码。本页的 {host} 只有本机能连。",
2272
+ "pair.usedHint": "配对码一次性有效:iPhone 一开始配对就作废,重新取码也会作废上一张。",
2273
+ "origin.located": "iPhone 将连到 {origin}",
2274
+ "origin.missing": "没有找到公网地址:先在 App 里把连接地址填成你的公网中继,再扫码。本页的 {host} 只有本机能连。",
2275
+ "community.invite": "iOS App 还在内测,欢迎来 Discord 交流",
2255
2276
  "forbidden.title": "这个页面不是从本机打开的",
2256
2277
  "forbidden.body": "配对码只能在本机 Web UI 上取。请在本机浏览器打开 http://127.0.0.1:<端口> 后重试。",
2257
2278
  "failed.title": "取配对码失败",
@@ -2273,17 +2294,18 @@ window.__ModuleLoader__.load({
2273
2294
  };
2274
2295
  /** English dictionary, key-for-key with the zh source. */
2275
2296
  const en = {
2276
- "entry.label": "Pair a phone (protocol v1)",
2277
- "title": "Protocol v1 pairing",
2278
- "subtitle": "Scan the QR code with the phone app to let the phone reach this host over protocol v1. The code is minted by this machine and shown only here.",
2297
+ "entry.label": "Pair an iPhone",
2298
+ "title": "iOS app pairing",
2299
+ "subtitle": "Scan the QR code with the iOS app (beta) to connect an iPhone to this computer. The code is shown only on this machine.",
2279
2300
  "state.reading": "Requesting a pairing code…",
2280
2301
  "pair.qrLabel": "Pairing QR code",
2281
2302
  "pair.countdown": "{s} s left",
2282
2303
  "pair.expired": "The pairing code expired",
2283
2304
  "pair.refresh": "New code",
2284
2305
  "pair.usedHint": "The code is single-use: pairing spends it, and a new code voids the previous one.",
2285
- "origin.located": "The phone will dial {origin}",
2286
- "origin.missing": "No public address found: set the phone app to your public relay first, then scan. {host} (this page) is reachable only from this machine.",
2306
+ "origin.located": "The iPhone will dial {origin}",
2307
+ "origin.missing": "No public address found: set the connection address in the app to your public relay first, then scan. {host} (this page) is reachable only from this machine.",
2308
+ "community.invite": "The iOS app is in beta. Come talk to us on Discord",
2287
2309
  "forbidden.title": "This page is not open on this machine",
2288
2310
  "forbidden.body": "Pairing codes can only be read from the machine itself. Open http://127.0.0.1:<port> in a browser on this machine and retry.",
2289
2311
  "failed.title": "Could not read a pairing code",