diff --git a/packages/experimental/liveshare-protocol/README.i18n.yaml b/packages/experimental/liveshare-protocol/README.i18n.yaml index 2ec36812f8..19752ea66f 100644 --- a/packages/experimental/liveshare-protocol/README.i18n.yaml +++ b/packages/experimental/liveshare-protocol/README.i18n.yaml @@ -9,8 +9,8 @@ en: 023b0ec3130c921a zh: 83a7492f544eed39 /deepseek-ai-dsh-experimental-liveshare-protocol/summary: - en: 7cab2a1bc2ae0661 - zh: 04e22b2531a2cb4e + en: cf4bc338899afa65 + zh: e8376bead1d99529 /deepseek-ai-dsh-experimental-liveshare-protocol/table-of-contents: en: 80b31a934611cb4a zh: 05f3f7f9cb2fd881 @@ -18,8 +18,8 @@ en: bbff250eba0f1b89 zh: 0a618f05cc88ee2b /deepseek-ai-dsh-experimental-liveshare-protocol/use-this-package/when-to-use-it: - en: d6c56fd1c60b71cd - zh: ec4c5105034cb8c4 + en: fc94a4bd3119d40d + zh: e85f74bbacb4fd09 /deepseek-ai-dsh-experimental-liveshare-protocol/use-this-package/entry-point: en: 452b98f914e90804 zh: 20c344a12a23f9c1 @@ -27,11 +27,11 @@ en: ae0264f375192b04 zh: ba1d95ab72fc003c /deepseek-ai-dsh-experimental-liveshare-protocol/further-exploration: - en: d80868b3f0050542 - zh: 56bad4bab440b2bd + en: e773c21200a61a9d + zh: 57108786433cf892 /deepseek-ai-dsh-experimental-liveshare-protocol/known-limitations-and-deferred-work: - en: 9061ed82c5c3f8ea - zh: 2c7a6f5c9dae117f + en: eae54e021b06b41b + zh: 23fffbaf6d34250a /deepseek-ai-dsh-experimental-liveshare-protocol/known-limitations-and-deferred-work/dev-note: en: e67f633dc6fe7773 zh: e88aeb617ffb74ea diff --git a/packages/experimental/liveshare-protocol/README.md b/packages/experimental/liveshare-protocol/README.md index 18994d5954..dd03330bd4 100644 --- a/packages/experimental/liveshare-protocol/README.md +++ b/packages/experimental/liveshare-protocol/README.md @@ -9,7 +9,7 @@ English | [中文](README.zh.md) ## Summary -`dsh-experimental-liveshare-protocol` gives the Liveshare owner bundle and the Relay one copy of what they must agree on: the owner/worker IPC frames, the gateway frames the Relay forwards without interpreting, and the provider-neutral identity contract and the loopback mock implementation. Both packages import it, so neither depends on the other and the Relay never loads owner code. Its only DSH dependency is the stateless `dsh-brand` primitive library. +`dsh-experimental-liveshare-protocol` gives the Liveshare owner bundle and the Relay one copy of what they must agree on: the owner/worker IPC frames, the gateway frames the Relay forwards without interpreting, the viewer carrier script the Relay places in the served page, and the provider-neutral identity contract with its loopback mock implementation. It exists so the owner bundle and the Relay share these definitions without either importing the other; the Relay never loads owner code. It depends on the stateless `dsh-brand` type library and declares `cordis` as a peer. ## Table of Contents @@ -26,7 +26,7 @@ English | [中文](README.zh.md) ### When to use it -Import `./protocol` and `./identity` from this package whenever code must speak the Liveshare wire or resolve one viewer identity: the owner host and its gateway worker, the Relay server and its acceptance tests. This is a library — no profile mounts it and no `cordis.yml` row names it. +Import `./protocol` and `./identity` from this package whenever code must speak the Liveshare wire or resolve one viewer identity: the owner host and its gateway worker, the Relay server and its acceptance tests. The viewer carrier and the viewer-state vocabulary are imported from the package root. This is a library — no profile mounts it and no `cordis.yml` row names it. ### Entry point @@ -74,9 +74,8 @@ Relay compatibility uses declared versions, capabilities, and explicit refusals, ----- -## Known Limitations and Deferred Work - +## Known Limitations and Deferred Work - Gateway requests require the Relay's authenticated actor outside the opaque body; frames without that actor are refused. - The Owner Host and worker ship together. The supervisor mints a branded UUID `registrationToken` per logical add, invalidates it on removal, and replays it only for the same retained registration after process restart. Lifecycle, requests, and cancellations echo that token with the share id; per-request `TunnelRequestToken` remains independent. IPC decoders refuse missing identities, and neither token enters Relay URLs or wire frames. Same-package IPC does not negotiate versions; Relay wire frames retain numeric ids and protocol version 1. Compatibility capabilities include `file-upload`, `actor-credential`, and `direct-connection`. An actor may carry an optional owner-verifiable `credential` (the protocol validates its type only; an owner verifies it before trusting the asserted identity, and absence keeps today's Relay-asserted semantics). A share spec may carry `connection`; absence reads as `{ mode: 'relay' }`, and a Relay that still owns the data path refuses a `direct` registration.: a relay registration that declares it may carry `allowsFileUpload` on the share support and access-state frames; every other peer keeps the stored value and a frame without the field reads as uploads off. diff --git a/packages/experimental/liveshare-protocol/README.zh.md b/packages/experimental/liveshare-protocol/README.zh.md index 055df7e199..fe60223423 100644 --- a/packages/experimental/liveshare-protocol/README.zh.md +++ b/packages/experimental/liveshare-protocol/README.zh.md @@ -9,7 +9,7 @@ kind: "package-library" ## 概述 -`dsh-experimental-liveshare-protocol` 让 Liveshare owner bundle 与 Relay 共用同一份必须一致的定义:owner/worker 的 IPC 帧、Relay 不解析只转发的 gateway 帧,以及与 provider 无关的身份契约及回环 mock 实现。两个包都依赖它,因此谁也不依赖谁,Relay 也不会加载 owner 侧代码。它唯一的 DSH 依赖是无状态的 `dsh-brand` 基础类型库。 +`dsh-experimental-liveshare-protocol` 让 Liveshare owner bundle 与 Relay 共用同一份必须一致的定义:owner/worker 的 IPC 帧、Relay 不解析只转发的 gateway 帧、Relay 放进被服务页面的查看页载体脚本,以及与 provider 无关的身份契约及其回环 mock 实现。它让 owner bundle 与 Relay 共享这些定义而不必互相依赖,Relay 也不会加载 owner 侧代码。它依赖无状态的 `dsh-brand` 类型库,并把 `cordis` 声明为 peer。 ## 目录 @@ -26,7 +26,7 @@ kind: "package-library" ### 何时使用 -凡是需要说 Liveshare 线路协议或解析某个 viewer 身份的代码,都从本包导入 `./protocol` 与 `./identity`:owner host 及其 gateway worker、Relay server 及其验收测试。这是一个库——没有 profile 会挂载它,也没有 `cordis.yml` 行引用它。 +凡是需要说 Liveshare 线路协议或解析某个 viewer 身份的代码,都从本包导入 `./protocol` 与 `./identity`:owner host 及其 gateway worker、Relay server 及其验收测试。查看页载体与查看页状态词汇从包根入口导入。这是一个库——没有 profile 会挂载它,也没有 `cordis.yml` 行引用它。 ### 入口 @@ -74,9 +74,8 @@ Relay 兼容性依靠声明版本、能力和明确拒绝,不提供逐发布 ----- -## 已知限制与延期工作 - +## 已知限制与延期工作 - 网关请求必须在不透明请求体之外携带 Relay 已认证主体;没有该主体的帧被拒绝。 - Owner Host 与 worker 同包发布。Supervisor 为每次逻辑添加生成品牌化 UUID `registrationToken`,移除时使其失效,进程重启只为仍保留的同一注册重播该身份。生命周期、请求及取消事件回传该 token 与分享 ID;逐请求 `TunnelRequestToken` 独立存在。IPC 编解码拒绝缺失身份,两种 token 都不进入 Relay URL 或线协议帧。同包 IPC 不协商版本;Relay 线协议帧保留数字 ID 与协议版本 1。兼容能力包含 `file-upload`、`actor-credential` 与 `direct-connection`。actor 可携带可选的、owner 可验证的 `credential`(协议只校验类型;owner 在采信断言身份前自行验证,缺失时保持今天由 Relay 断言的语义)。分享 spec 可携带 `connection`;缺失读作 `{ mode: 'relay' }`,仍拥有数据面的 Relay 会拒绝 `direct` 注册。:声明它的 Relay 注册可在分享支持与 access-state 帧上携带 `allowsFileUpload`;其它 peer 保留已存值,而缺少该字段的帧读作上传关闭。