@deepseek-ai/dsh-timeout 0.1.3-alpha.2 → 0.1.5-alpha.2

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 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
  # pnpm run verify-translation-pairing --write packages/util/timeout/README.md
5
- README.md: 2c633aea176ffb268fa7ad5cf914944296165f92
6
- README.zh.md: 9681bf953268a3e99768f257e065a159f73148ad
5
+ README.md: 80f8dc7c427ba045e36343d009a93828a45b1a69
6
+ README.zh.md: 088f1b65e1085778c76a6b8820a57bfff6d72eba
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-timeout` lets a capability run one unit of work under a caller-visible timeout and later tell a timeout apart from a cancellation. A caller's optional hint is clamped against a backend default and cap, and upstream cancellation fuses with the deadline into one `AbortSignal`. The deadline signal only notifies — each capability owns the mechanism that stops its work, so no shared layer needs to know how to stop anything. For streamed transports an idle watchdog arms a timeout only while a provider read is outstanding, so consumer think time never counts as idle. A `timeoutMs` of zero is the internal no-timeout sentinel for backend-owned background work, never a public disable switch; the zero-dependency library is shared by the bash, web, subprocess, and tool-timeout-policy consumers.
12
+ `dsh-timeout` lets callers apply bounded deadlines to work, distinguish local timeout from upstream cancellation, and monitor streamed reads for inactivity. `clampTimeout` fills a missing hint from a backend default, caps it at the allowed maximum, and rejects invalid values before work starts. `deadline` combines the chosen timeout with upstream cancellation in one signal, while the caller remains responsible for actually stopping its process, socket, or task. `idleWatchdog` counts only time spent waiting for provider reads, and zero remains reserved for backend-owned untimed work rather than public configuration.
13
13
 
14
14
  ## Table of Contents
15
15
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-library"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-timeout` 让能力在调用方可见的超时下运行一个工作单元,之后能把超时与取消区分开。调用方的可选提示会按后端默认值补齐、并按后端上限封顶,上游取消与截止时间融合为一个 `AbortSignal`。deadline 信号只负责通知——停止工作的机制由各能力自己拥有,因此没有任何共享层需要知道如何停止任何东西。对于流式传输,空闲 watchdog 只在提供方读取尚未完成时启动超时,因此消费方的思考时间绝不计入空闲。`timeoutMs` 为 0 是后端自有后台工作使用的内部「无超时」哨兵值,绝不是公开的禁用开关;这个零依赖库由 bash、web、subprocess 与 tool-timeout-policy 消费方共享。
12
+ `dsh-timeout` 让调用方为工作设置有上限的截止时间、区分本地超时与上游取消,并监测流式读取是否空闲。`clampTimeout` 在提示缺失时填入后端默认值,把结果限制在允许的最大值以内,并在工作开始前拒绝无效值。`deadline` 将选定的超时与上游取消合并到一个信号中,而调用方仍负责真正停止自己的进程、套接字或任务。`idleWatchdog` 只计算等待提供方读取所花的时间;零仍保留给后端自有的不计时工作,而不是公开配置。
13
13
 
14
14
  ## 目录
15
15
 
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.3-alpha.2",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },