@deepseek-ai/dsh-client-connection 0.2.0-rc.1 → 0.2.1-alpha.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/README.i18n.yaml +4 -4
- package/README.md +1 -3
- package/README.zh.md +1 -3
- package/package.json +13 -13
package/README.i18n.yaml
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
en: ab52ef146d0b5b42
|
|
22
22
|
zh: 6314d50cfe5683e1
|
|
23
23
|
/deepseek-ai-dsh-client-connection/connection-generation:
|
|
24
|
-
en:
|
|
25
|
-
zh:
|
|
24
|
+
en: 116f94e44c0d87e7
|
|
25
|
+
zh: 59ef48984154d858
|
|
26
26
|
/deepseek-ai-dsh-client-connection/model-experience:
|
|
27
27
|
en: 88bbc33fe9ae9df8
|
|
28
28
|
zh: bfbab6d51b4abd40
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
en: 2c964a7546604347
|
|
34
34
|
zh: c30b59fc92a01c36
|
|
35
35
|
/deepseek-ai-dsh-client-connection/known-limitations-and-deferred-work/dev-note:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: e67f633dc6fe7773
|
|
37
|
+
zh: e88aeb617ffb74ea
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Authenticated shared HTTP requests pass through the `connection/request` waterfa
|
|
|
51
51
|
|
|
52
52
|
API Gateway Client registers the internal `$events` logical stream as the sole generation source, independently of whether any `$on` listener exists. The Host attaches all incremental listeners in the API Remotes source factory, then sends one `{ type: 'ready', clientId, host: { home } }` item before events. `ConnectionController` publishes that generation and calls `onConnected` only after the ready item arrives, so baseline acquisition cannot race ahead of incremental observation.
|
|
53
53
|
|
|
54
|
-
An ended `$events` stream, a Remote stream error, a non-ready opening item, or a malformed event item invalidates the current generation. A pending handshake logs a slow-Host warning after 3 seconds and logs the readiness timeout and aborts after 15 seconds by default, including time spent waiting for the physical socket. The source must stop delivery, release resources, and settle after cancellation before a replacement starts; late readiness from a cancelled source cannot publish a generation. While the browser reports network availability, the controller publishes `connecting` and retries with 50%–100% jitter under caps of 500ms, 1s, 2s, 4s, 8s, and 10s, continuing at the final cap until recovery. Every retry asks Gateway to replace the physical WebSocket once and reopens `$events`.
|
|
54
|
+
An ended `$events` stream, a Remote stream error, a non-ready opening item, or a malformed event item invalidates the current generation. A pending handshake logs a slow-Host warning after 3 seconds and logs the readiness timeout and aborts after 15 seconds by default, including time spent waiting for the physical socket. The source must stop delivery, release resources, and settle after cancellation before a replacement starts; late readiness from a cancelled source cannot publish a generation. While the browser reports network availability, the controller publishes `connecting` and retries with 50%–100% jitter under caps of 500ms, 1s, 2s, 4s, 8s, and 10s, continuing at the final cap until recovery. Every retry asks Gateway to replace the physical WebSocket once and reopens `$events`.
|
|
55
55
|
|
|
56
56
|
`ctx.connection.reconnect()` interrupts active work, resets the sequence, and starts retry 1 immediately. Browser `offline` aborts active work, publishes `disconnected`, and suspends automatic attempts; the next `online` transition resets the sequence and starts at the 500ms tier. Only a ready item publishes `connected`. Gateway mux owns no independent retry schedule.
|
|
57
57
|
|
|
@@ -85,5 +85,3 @@ None; this package neither assembles nor sends a provider request.
|
|
|
85
85
|
None.
|
|
86
86
|
|
|
87
87
|
</details>
|
|
88
|
-
|
|
89
|
-
**Runtime invariant:** No companion is published. Browser-session verification reads the credential record asynchronously at the request that authorizes work, while the credentials companion owns record commit-event lifetime. Stream/reconnect sequencing and rpcId round-trip discipline are exercised directly by behavior specs, and route register/dispose symmetry is audited by the webserver companion.
|
package/README.zh.md
CHANGED
|
@@ -51,7 +51,7 @@ cookie 签名密钥是 `ctx.credentials` 中由 `client-connection/browser-sessi
|
|
|
51
51
|
|
|
52
52
|
API Gateway Client 把内部 `$events` 逻辑流注册为唯一 generation source,与有无 `$on` 订阅无关。Host 在 API Remotes source factory 同步挂好所有增量 listener 后,先发送唯一 `{ type: 'ready', clientId, host: { home } }` 项,再发送事件。`ConnectionController` 仅在收到该 ready 项后发布 generation 并调用 `onConnected`,因此 baseline 不会跑在增量 listener 前面。
|
|
53
53
|
|
|
54
|
-
`$events` 结束、Remote 流报错、收到非 ready 首项或畸形事件项,都会使当前 generation 失效。默认情况下,挂起的握手在 3 秒后记录 Host 响应缓慢告警,在 15 秒后记录就绪超时并中止,包含等待物理 socket 的时间。取消后,source 必须停止投递、释放资源并结束,替换 source 才能启动;已取消 source 迟到的 ready 不能发布 generation。浏览器报告网络可用时,Controller 发布 `connecting`,并在 500ms、1s、2s、4s、8s 与 10s 上限内采用 50%–100% 抖动重试,达到终档后继续尝试直到恢复。每次重试都要求 Gateway 替换一次物理 WebSocket,再重开 `$events`。
|
|
54
|
+
`$events` 结束、Remote 流报错、收到非 ready 首项或畸形事件项,都会使当前 generation 失效。默认情况下,挂起的握手在 3 秒后记录 Host 响应缓慢告警,在 15 秒后记录就绪超时并中止,包含等待物理 socket 的时间。取消后,source 必须停止投递、释放资源并结束,替换 source 才能启动;已取消 source 迟到的 ready 不能发布 generation。浏览器报告网络可用时,Controller 发布 `connecting`,并在 500ms、1s、2s、4s、8s 与 10s 上限内采用 50%–100% 抖动重试,达到终档后继续尝试直到恢复。每次重试都要求 Gateway 替换一次物理 WebSocket,再重开 `$events`。
|
|
55
55
|
|
|
56
56
|
`ctx.connection.reconnect()` 会中断活动工作、重置序列,并立即开始 retry 1。浏览器 `offline` 会中断活动工作、发布 `disconnected` 并暂停自动尝试;下一次 `online` 转换会重置序列并从 500ms 档开始。只有 ready 项会发布 `connected`。Gateway mux 不拥有独立重试调度。
|
|
57
57
|
|
|
@@ -85,5 +85,3 @@ API Gateway Client 把内部 `$events` 逻辑流注册为唯一 generation sourc
|
|
|
85
85
|
无。
|
|
86
86
|
|
|
87
87
|
</details>
|
|
88
|
-
|
|
89
|
-
**运行时不变式:** 不发布伴生入口。浏览器会话验证会在请求授权工作时异步读取凭据记录,而记录的 commit-event 生命周期由 credentials 伴生入口负责;流与重连的时序及 rpcId 往返约束由行为规范直接验证,路由注册与 dispose(资源释放)的对称性由 webserver 伴生入口审计。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-client-connection",
|
|
3
3
|
"description": "Authenticated RPC transport and generation lifecycle",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"zod": "^4.4.3",
|
|
38
|
-
"@deepseek-ai/schemastery": "~3.18.
|
|
39
|
-
"@deepseek-ai/dsh-credentials": "0.2.
|
|
38
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-credentials": "0.2.1-alpha.1"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"lib/index.js",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"lib/types/**/*.d.ts"
|
|
45
45
|
],
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@deepseek-ai/
|
|
48
|
-
"@deepseek-ai/
|
|
47
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
|
|
48
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
52
|
-
"@deepseek-ai/dsh-attachment": "0.2.
|
|
53
|
-
"@deepseek-ai/dsh-brand": "0.2.
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
51
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1"
|
|
59
59
|
}
|
|
60
60
|
}
|