@deepseek-ai/dsh-spill 0.0.1-rc.2 → 0.1.0-rc.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/LICENSE CHANGED
@@ -1,28 +1,21 @@
1
- BSD 3-Clause License
1
+ MIT License
2
2
 
3
- Copyright (c) 2026, DeepSeek
3
+ Copyright (c) 2026 DeepSeek
4
4
 
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
7
11
 
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
10
14
 
11
- 2. Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
14
-
15
- 3. Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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/spill/spill/README.md
5
- README.md: a9e3ec7169e0239117f7f9222ad2ba53619e0369
6
- README.zh.md: 9bfacda928e30a1338bedaef9d39e43cff4c667d
5
+ README.md: f36dccfa1e6f1f21e80c0b0aa97ee150a0f5fd45
6
+ README.zh.md: 268e390923e30150a8d36b719b7dad75827f99fe
package/README.md CHANGED
@@ -9,10 +9,10 @@ This package is one third of the spill capability, split so each concern evolves
9
9
  | Package | Role |
10
10
  |---|---|
11
11
  | `@deepseek-ai/dsh-spill` (this) | Service Definition: abstract service + vocabulary types |
12
- | `@deepseek-ai/dsh-spill-local` | Service provider: private session-scoped files on the host filesystem |
12
+ | `@deepseek-ai/dsh-spill-local` | Service Provider: private session-scoped files on the host filesystem |
13
13
  | `@deepseek-ai/dsh-spill-policy` | Consumer: the tool-result policy that spills oversized final results |
14
14
 
15
- The split mirrors the bash/fs seams. A future remote or virtual backend (e.g. a `spill://…` URI, a database key, or a backend-specific retrieval tool) implements this Service Definition without touching the policy plugin.
15
+ The split mirrors the shell/fs seams. A future remote or virtual backend (e.g. a `spill://…` URI, a database key, or a backend-specific retrieval tool) implements this Service Definition without touching the policy plugin.
16
16
 
17
17
  ## Service API (`ctx.spillStore`)
18
18
 
@@ -20,7 +20,7 @@ The split mirrors the bash/fs seams. A future remote or virtual backend (e.g. a
20
20
  |---|---|
21
21
  | `saveText(input)` | Persist `input.content` verbatim; resolves with a `SpillRef` (opaque locator, exact bytes written, and retrieval hint). **Rejects on a real storage failure** (permissions, ENOSPC, backend unavailable) — the caller decides how to degrade. |
22
22
 
23
- Storage is grouped by the request's `owner` session as a save-time namespace; the backend chooses its own private representation and may derive names from — never trust as a path — the caller's `suggestedName`. The seam owns storage only: NO retention policy (that is [`@deepseek-ai/dsh-retention`](../../util/retention)), NO tool-result replacement (that is `@deepseek-ai/dsh-spill-policy`), NO retrieval/search API (the backend's `retrievalHint` tells the model what to do with the locator).
23
+ Storage is grouped by the request's `owner` session as a save-time namespace; the backend chooses its own private representation and may derive names from — never trust as a path — the caller's `suggestedName`. The seam owns storage only: NO retention policy (that is [`@deepseek-ai/dsh-output-retention`](../../util/output-retention)), NO tool-result replacement (that is `@deepseek-ai/dsh-spill-policy`), NO retrieval/search API (the backend's `retrievalHint` tells the model what to do with the locator).
24
24
 
25
25
  ## Vocabulary
26
26
 
package/README.zh.md CHANGED
@@ -9,22 +9,22 @@
9
9
  | 包 | 职责 |
10
10
  |---|---|
11
11
  | `@deepseek-ai/dsh-spill`(本包) | Service Definition:抽象服务与词汇类型 |
12
- | `@deepseek-ai/dsh-spill-local` | Service provider:位于宿主文件系统中的私有会话级文件 |
12
+ | `@deepseek-ai/dsh-spill-local` | Service Provider:位于宿主文件系统中的私有会话级文件 |
13
13
  | `@deepseek-ai/dsh-spill-policy` | Consumer:对过大最终结果执行 spill 的工具结果策略 |
14
14
 
15
- 这种拆分方式与 bash/fs seam 相同。未来的远程或虚拟后端(例如 `spill://…` URI、数据库键或后端专用取回工具)可实现此 Service Definition,无需修改策略插件。
15
+ 这种拆分方式与 shell/fs seam 相同。未来的远程或虚拟后端(例如 `spill://…` URI、数据库键或后端专用取回工具)可实现此 Service Definition,无需修改策略插件。
16
16
 
17
17
  ## 服务 API(`ctx.spillStore`)
18
18
 
19
19
  | 成员 | 语义 |
20
20
  |---|---|
21
- | `saveText(input)` | 逐字保存 `input.content`;成功时返回 `SpillRef`(不透明定位信息、写入的精确字节数和取回指引)。**如果出现真实存储故障,则返回拒绝**(权限、ENOSPC、后端不可用);由调用方决定如何降级。 |
21
+ | `saveText(input)` | 逐字保存 `input.content`;成功时返回 `SpillRef`(不透明定位信息、写入的精确字节数和取回指引)。**发生真实存储故障时,调用会以拒绝状态结束**(权限、ENOSPC、后端不可用);由调用方决定如何降级。 |
22
22
 
23
- 存储操作以请求的 `owner` 会话作为保存时命名空间进行分组;后端自行选择私有表示,并可以从调用方的 `suggestedName` 派生名称,但绝不能将其当作可信路径。该 seam 只负责存储:不提供保留策略(由 [`@deepseek-ai/dsh-retention`](../../util/retention) 负责),不替换工具结果(由 `@deepseek-ai/dsh-spill-policy` 负责),也不提供取回/搜索 API(后端的 `retrievalHint` 会告诉模型如何使用定位信息)。
23
+ 存储操作以请求的 `owner` 会话作为保存时命名空间进行分组;后端自行选择私有表示,并可以从调用方的 `suggestedName` 派生名称,但绝不能将其当作可信路径。该 seam 只负责存储:不提供保留策略(由 [`@deepseek-ai/dsh-output-retention`](../../util/output-retention) 负责),不替换工具结果(由 `@deepseek-ai/dsh-spill-policy` 负责),也不提供取回/搜索 API(后端的 `retrievalHint` 会告诉模型如何使用定位信息)。
24
24
 
25
25
  ## 词汇
26
26
 
27
- `SaveTextSpill`(owner、source、suggestedName、content)是请求;`SpillRef`(locator、bytes、retrievalHint)是结果。`SpillLocator` 是[带品牌类型](../../util/brand)的值,并以不透明字符串的形式呈现给模型;对 `dsh-spill-local` 而言它是本地路径,但未来的后端可以返回 URI、键或命令 token,无需修改策略/工具消费方。`SpillOwner.sessionId` 是保存时存储命名空间:fork 后的会话会从种子日志继承现有定位信息,无需复制文件或更改其归属;fork 后新产生的 spill 使用子会话 id。`SpillSource` 记录产生该 spill 的 `toolName`、`callId` 和 `label`,供后端命名和检查使用,不用于访问控制。完整约定见 `src/types.ts`。
27
+ `SaveTextSpill`(owner、source、suggestedName、content)是请求;`SpillRef`(locator、bytes、retrievalHint)是结果。`SpillLocator` 是[带品牌类型](../../util/brand)的值,并以不透明字符串的形式呈现给模型;对 `dsh-spill-local` 而言它是本地路径,但未来的后端可以返回 URI、键或命令 token,无需修改策略/工具消费方。`SpillOwner.sessionId` 是保存时存储命名空间:fork 后的会话会从种子日志继承现有定位信息,无需复制或更改其归属;fork 后新产生的 spill 使用子会话 id。`SpillSource` 记录产生该 spill 的 `toolName`、`callId` 和 `label`,供后端命名和检查使用,不用于访问控制。完整约定见 `src/types.ts`。
28
28
 
29
29
  设计原理见[工具输出 spill Agent Note](../../../.agents/notes/implemented/architecture/2026-07-08-tool-output-spill-files.md),其中说明了为什么创建操作应由运行时 spill seam 而非面向模型的 `write` 工具承担。
30
30
 
@@ -39,4 +39,4 @@
39
39
  ## 已知限制与暂缓事项
40
40
 
41
41
  - **该 seam 没有取回或删除 API**:消费方只能渲染后端的定位信息与指引;生命周期和访问语义仍由后端自行决定。
42
- - **存储不等于访问控制**:`SpillOwner` 会区分写入命名空间,但不会授予定位信息的读取权限;每个后端和取回消费方都必须自行强制执行访问边界。
42
+ - **存储不等于访问控制**:`SpillOwner` 会区分写入命名空间,但不会授予通过定位信息读取内容的权限;每个后端和取回消费方都必须自行强制执行访问边界。
package/lib/index.js CHANGED
@@ -26,7 +26,7 @@ function SpillLocator(locator) {
26
26
  * `@deepseek-ai/dsh-spill-local` (host filesystem) is the first.
27
27
  *
28
28
  * The Service Definition is deliberately minimal: `saveText` and nothing else. It owns NO
29
- * retention policy (that is `@deepseek-ai/dsh-retention`), NO tool-result
29
+ * retention policy (that is `@deepseek-ai/dsh-output-retention`), NO tool-result
30
30
  * replacement (that is `@deepseek-ai/dsh-spill-policy`), and NO retrieval or
31
31
  * search API. The backend supplies the locator and retrieval hint appropriate
32
32
  * for its storage substrate.
@@ -6,7 +6,7 @@
6
6
  * `@deepseek-ai/dsh-spill-local` (host filesystem) is the first.
7
7
  *
8
8
  * The Service Definition is deliberately minimal: `saveText` and nothing else. It owns NO
9
- * retention policy (that is `@deepseek-ai/dsh-retention`), NO tool-result
9
+ * retention policy (that is `@deepseek-ai/dsh-output-retention`), NO tool-result
10
10
  * replacement (that is `@deepseek-ai/dsh-spill-policy`), and NO retrieval or
11
11
  * search API. The backend supplies the locator and retrieval hint appropriate
12
12
  * for its storage substrate.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-spill",
3
3
  "description": "Abstract spill storage seam (ctx.spillStore) for the DeepSeek Harness — save oversized tool text and return a retrieval locator",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.1.0-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -30,19 +30,19 @@
30
30
  "lib/invariant.js",
31
31
  "lib/types/**/*.d.ts"
32
32
  ],
33
- "license": "BSD-3-Clause",
33
+ "license": "MIT",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
36
- "@deepseek-ai/dsh-brand": "^0.0.1-rc.2",
37
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
38
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
39
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
35
+ "@deepseek-ai/dsh-brand": "^0.1.0-rc.2",
36
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.2",
37
+ "@deepseek-ai/cordis": "^4.0.1",
38
+ "@deepseek-ai/dsh-invariants": "^0.1.0-rc.2",
39
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.2"
40
40
  },
41
41
  "devDependencies": {
42
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
43
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
44
- "@deepseek-ai/dsh-brand": "^0.0.1-rc.2",
45
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
46
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
42
+ "@deepseek-ai/dsh-brand": "^0.1.0-rc.2",
43
+ "@deepseek-ai/dsh-invariants": "^0.1.0-rc.2",
44
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.2",
45
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.2",
46
+ "@deepseek-ai/cordis": "^4.0.1"
47
47
  }
48
48
  }