@deepseek-ai/dsh-spill 0.1.5-rc.2 → 0.1.6-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/spill/spill/README.md
5
- README.md: e05dad3f5ea8ed6956b426500f938ad7eba871e4
6
- README.zh.md: 3bc9568bd22c9c3c80c11a7af187fb2c1791d809
5
+ README.md: f951a0d689b66aab641b917e43009038bceae153
6
+ README.zh.md: a8178e0942ef5798ac41634ffc2fcaa428d133c4
package/README.md CHANGED
@@ -93,7 +93,7 @@ The package is built on one separation and a deliberate minimum:
93
93
 
94
94
  ### Data model
95
95
 
96
- `SaveTextSpill` separates storage ownership from descriptive provenance. `SpillSource` accepts either the tool source `{ kind: "tool", toolName, callId, label }` or `{ kind: "session-reference", sessionId, label }`, whose id names the captured source session. Session references never fabricate tool call ids. Neither provenance nor the owner namespace grants read access. Consumers treat the returned locator as opaque and present it with its retrieval hint.
96
+ `SaveTextSpill` separates storage ownership from its source description. `SpillSource` accepts either the tool source `{ kind: "tool", toolName, callId, label }` or `{ kind: "session-reference", sessionId, label }`, whose id names the captured source session. Session references never fabricate tool call ids. Neither the source descriptor nor the owner namespace grants read access. Consumers treat the returned locator as opaque and present it with its retrieval hint.
97
97
 
98
98
  ### Lifecycle
99
99
 
package/README.zh.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "spill 存储服务:保存超大工具文本或已捕获的会话引用,并返回可检索的定位信息。"
2
+ description: "spill 存储服务:保存超大工具文本或已捕获的会话引用,并返回可用于取回内容的定位信息。"
3
3
  kind: "package-reference"
4
4
  ---
5
5
 
@@ -25,11 +25,11 @@ kind: "package-reference"
25
25
  <a id="use-this-package"></a>
26
26
  ## 使用本包
27
27
 
28
- 保存 spill 产物的组合需要挂载一个后端——仅本包本身不存储任何内容。`dsh-spill-policy` 决定工具结果何时 spill;`dsh-session-reference` 直接保存被截断引用的转录,不需要该策略。调用方使用 `ctx.spillStore.saveText()` 并明确指定归属;可选消费方通过 `ctx.get("spillStore")` 获取后端。
28
+ 保存 spill 产物的组合需要挂载一个后端——仅本包本身不存储任何内容。`dsh-spill-policy` 决定工具结果何时 spill;`dsh-session-reference` 直接保存截断后的会话引用 transcript(文本记录),不需要该策略。调用方使用 `ctx.spillStore.saveText()` 并明确指定归属;可选消费方通过 `ctx.get("spillStore")` 获取后端。
29
29
 
30
30
  ### 何时选择
31
31
 
32
- 当部署需要在模型看到有界预览后仍能取回全文时,选择 spill 存储,例如抓取的页面正文或已捕获的会话引用转录。前提是后端的定位信息与取回指引在部署环境中可用;该服务不要求本地文件系统访问。
32
+ 当部署需要在模型看到有界预览后仍能取回全文时,选择 spill 存储,例如抓取的页面正文或已捕获的会话引用 transcript。前提是后端的定位信息与取回指引在部署环境中可用;该服务不要求本地文件系统访问。
33
33
 
34
34
  ### 最小可用组合
35
35
 
@@ -55,7 +55,7 @@ const ref = await ctx.spillStore.saveText({
55
55
  })
56
56
  ```
57
57
 
58
- 返回的 `SpillRef` 携带三个字段:`locator`,后端产生的不透明模型面向句柄(对 `dsh-spill-local` 是本地文件路径,对其他后端可能是 URI 或键);`bytes`,写入的精确 UTF-8 字节数;`retrievalHint`,消费方展示给模型的指引——对本地后端而言是读取或搜索该路径。消费方按指引渲染定位信息,绝不自行解析定位信息。
58
+ 返回的 `SpillRef` 携带三个字段:`locator`,后端产生的面向模型的不透明句柄(对 `dsh-spill-local` 是本地文件路径,对其他后端可能是 URI 或键);`bytes`,写入的精确 UTF-8 字节数;`retrievalHint`,消费方展示给模型的指引——对本地后端而言是读取或搜索该路径。消费方将定位信息与指引一同呈现,绝不自行解析定位信息。
59
59
 
60
60
  ### 归属与边界
61
61
 
@@ -63,7 +63,7 @@ const ref = await ctx.spillStore.saveText({
63
63
 
64
64
  ### 故障与恢复
65
65
 
66
- `saveText` 只在真实存储故障时拒绝——权限不足、磁盘已满或后端不可用。由调用方决定如何降级:随附策略把拒绝当作尽力而为处理,记录警告并保留原始内联结果,因此 spill 失败绝不会把成功的工具调用变成错误或隐藏内容。如果没有挂载后端,就没有可保存的目标;请在组合中加载 `dsh-spill-local` 或其他后端。
66
+ `saveText` 只在真实存储故障时拒绝——权限不足、磁盘已满或后端不可用。由调用方决定如何降级:已交付的策略把拒绝当作尽力而为处理,记录警告并保留原始内联结果,因此 spill 失败绝不会把成功的工具调用变成错误或隐藏内容。如果没有挂载后端,就没有可保存的目标;请在组合中加载 `dsh-spill-local` 或其他后端。
67
67
 
68
68
  -----
69
69
 
@@ -89,7 +89,7 @@ const ref = await ctx.spillStore.saveText({
89
89
  |---|---|
90
90
  | [`src/index.ts`](src/index.ts) | 插件入口:抽象 `SpillStore` 服务及其 `saveText` 约定 |
91
91
  | [`src/types.ts`](src/types.ts) | 词汇:`SaveTextSpill`、`SpillRef`、带品牌类型 `SpillLocator`、`SpillOwner`、`SpillSource` |
92
- | — | 不发布运行时不变式伴生入口;约定在 seam 处强制执行。 |
92
+ | — | 不发布运行时不变式伴生入口;除归属 seam 强制执行的约定外,本包不暴露独立的事件序列或可变数据关系。 |
93
93
 
94
94
  ### 数据模型
95
95
 
@@ -97,7 +97,7 @@ const ref = await ctx.spillStore.saveText({
97
97
 
98
98
  ### 生命周期
99
99
 
100
- 后端继承 `SpillStore` 并以插件方式加载,注册为 `ctx.spillStore`;每个上下文只有一个实现,第二次加载会失败。dispose 会释放该服务。抽象类本身不注册任何内容——本包只提供约定与词汇。
100
+ 后端继承 `SpillStore` 并以插件方式加载,注册为 `ctx.spillStore`;每个上下文只有一个实现,第二次加载会失败。执行 dispose(资源释放)时会释放该服务。抽象类本身不注册任何内容——本包只提供约定与词汇。
101
101
 
102
102
  </details>
103
103
 
@@ -120,11 +120,11 @@ const ref = await ctx.spillStore.saveText({
120
120
  <a id="model-experience"></a>
121
121
  ## 模型体验
122
122
 
123
- 间接地,通过把后端定位信息与取回指引渲染给模型的 spill 消费方。
123
+ spill 消费方将后端的定位信息与取回指引渲染给模型,从而间接影响模型体验。
124
124
 
125
125
  #### KV Cache 影响
126
126
 
127
- 无直接失效;请求前缀变更由上述消费方负责。
127
+ 不会直接导致 KV Cache 失效;请求前缀变更由上述消费方负责。
128
128
 
129
129
  ## 已知限制与延期工作
130
130
 
@@ -34,7 +34,7 @@ export interface SpillOwner {
34
34
  /**
35
35
  * Producer of a spilled artifact. Tool results carry their model-issued call id;
36
36
  * session references identify the captured source session instead. Descriptive
37
- * provenance only, never access control.
37
+ * source description only, never access control.
38
38
  */
39
39
  export type SpillSource = {
40
40
  kind: 'tool';
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.1.5-rc.2",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,15 +27,15 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.2",
31
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
32
- "@deepseek-ai/cordis": "^4.0.2",
33
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2"
30
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2",
31
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
32
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
33
+ "@deepseek-ai/cordis": "^4.0.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@deepseek-ai/dsh-brand": "^0.1.5-rc.2",
37
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
38
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
39
- "@deepseek-ai/cordis": "^4.0.2"
36
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2",
37
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
38
+ "@deepseek-ai/cordis": "^4.0.2",
39
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2"
40
40
  }
41
41
  }