@deepseek-ai/dsh-timeout 0.1.5-rc.1 → 0.1.6-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 +1 -1
- package/README.zh.md +4 -4
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/util/timeout/README.md
|
|
5
5
|
README.md: 80f8dc7c427ba045e36343d009a93828a45b1a69
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: 9d711ecfd24857e5bb83ea102dd6c3a5c86254d3
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "共享超时运算、截止时间融合与超时和取消分类,供需要限制调用方超时提示、启动 deadline 并在之后区分二者的能力使用。"
|
|
3
3
|
kind: "package-library"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -71,7 +71,7 @@ using watchdog = idleWatchdog(upstream, idleMs, 'LLM_STREAM_IDLE_TIMEOUT')
|
|
|
71
71
|
const next = await watchdog.next(providerIterator) // timer runs only while this read is outstanding
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
timer 只在某个迭代器 `next()` 尚未完成时启动,并会因不产生值的传输活动通过 `pulse()`
|
|
74
|
+
timer 只在某个迭代器 `next()` 尚未完成时启动,并会因不产生值的传输活动通过 `pulse()` 重新启动,因此读取之间的消费方处理时间绝不计入空闲。间隔必须为正有限数,且不得大于 `MAX_TIMER_DELAY_MS`。
|
|
75
75
|
|
|
76
76
|
### 哪些操作不设置超时
|
|
77
77
|
|
|
@@ -92,7 +92,7 @@ timer 只在某个迭代器 `next()` 尚未完成时启动,并会因不产生
|
|
|
92
92
|
| 文件 | 职责 |
|
|
93
93
|
|---|---|
|
|
94
94
|
| [`src/index.ts`](src/index.ts) | `clampTimeout`、`deadline`、`idleWatchdog`、`timeoutOf`、`TimeoutReason`、`MAX_TIMER_DELAY_MS` |
|
|
95
|
-
| — |
|
|
95
|
+
| — | 不发布运行时不变式伴生入口;这个纯工具不拥有事件流或可变运行时数据;其值代数约束由单元测试保障。 |
|
|
96
96
|
|
|
97
97
|
### deadline 如何融合来源
|
|
98
98
|
|
|
@@ -141,7 +141,7 @@ timer 只在某个迭代器 `next()` 尚未完成时启动,并会因不产生
|
|
|
141
141
|
- **只发出通知**——deadline 无法停止忽略其信号的工作;每项能力仍需要自己的 socket、进程或任务终止路径。
|
|
142
142
|
- **`timeoutMs <= 0` 是内部词汇**——只有在所属后端已解析策略后,它才会禁用本地 timer;绝不会作为面向模型或插件的公开开关。
|
|
143
143
|
- **第一个中止原因决定分类**——当上游取消早于本地 timer 发生时,即使自己的超时之后也会到期,该层也无法再报告。
|
|
144
|
-
- **空闲 watchdog 不是总 deadline
|
|
144
|
+
- **空闲 watchdog 不是总 deadline**——它针对每个尚未完成的迭代器需求重新启动,并刻意排除消费方的处理时间。
|
|
145
145
|
|
|
146
146
|
<a id="dev-note"></a>
|
|
147
147
|
### 开发备注
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-timeout",
|
|
3
3
|
"description": "Zero-dependency timeout/deadline primitive: clampTimeout, deadline, timeoutOf, TimeoutReason (timing + classification only, no termination)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|