@deepseek-ai/dsh-spill-policy 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/spill/spill-policy/README.md
5
- README.md: 1ccf250bacd0b896e6f140393fd3447de3af1ab0
6
- README.zh.md: e6c537a1c9bd0c24a09063898638a12bfe84466d
5
+ README.md: 94dd23e5c8eb278753fa8a7d325ed15669c1417a
6
+ README.zh.md: e8ee92b1deff9fa8a8ec8af4c0d395bc88fc70c0
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-spill-policy` keeps oversized plain-text tool results out of the model's context: when a final result exceeds `maxInlineBytes`, it saves the full text through `ctx.spillStore` and replaces the model-facing result with a bounded head/tail preview plus the backend's locator and retrieval guidance, which the model can use to read or grep the spill file. It registers no service and owns no storage or preview mechanics — storage is the mounted `SpillStore` backend and previews come from `dsh-output-retention`; it only decides when to spill and composes the notice. It is opt-in and best-effort: omitted `maxInlineBytes` disables it entirely, and a spill failure leaves the original result visible. A second arm applies the same cap to the durable log copy of `run_code` sub-call results, so replay and UIs never grow unbounded either.
12
+ Mount this package when oversized plain-text tool results should stay out of model context. Results above `maxInlineBytes` become a bounded head/tail preview with a locator and retrieval guidance, while the full text remains available through the configured spill backend. Spill failures leave the original result visible, and omitting `maxInlineBytes` disables the policy. The same limit bounds durable `run_code` sub-call log copies without changing the value returned to the program.
13
13
 
14
14
  ## Table of Contents
15
15
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-reference"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-spill-policy` 把过大的纯文本工具结果挡在模型上下文之外:当最终结果超过 `maxInlineBytes` 时,它通过 `ctx.spillStore` 保存完整文本,并把面向模型的结果替换为有界的首尾预览、后端定位信息与取回指引,模型可据此读取或搜索 spill 文件。它不注册任何服务,也不负责存储或预览机制——存储由已挂载的 `SpillStore` 后端负责,预览来自 `dsh-output-retention`;它只决定何时 spill 并组合通知。它是可选且尽力而为的:省略 `maxInlineBytes` 时完全禁用,spill 失败时原始结果仍然可见。第二条分支把同样的上限应用到 `run_code` 子调用结果的持久日志副本,因此回放与 UI 也不会无限增长。
12
+ 当过大的纯文本工具结果不应进入模型上下文时,挂载本包。超过 `maxInlineBytes` 的结果会变成有界的首尾预览,并附带定位信息与取回指引;完整文本仍可通过已配置的 spill 后端访问。spill 失败时原始结果仍然可见,省略 `maxInlineBytes` 则会禁用该策略。同一上限也约束 `run_code` 子调用的持久日志副本,但不会改变程序收到的值。
13
13
 
14
14
  ## 目录
15
15
 
package/lib/index.js CHANGED
@@ -36,7 +36,7 @@ function formatSpillNotice(omitted, ref) {
36
36
  * The policy only decides WHEN to spill and composes the notice.
37
37
  *
38
38
  * A second arm applies the SAME cap to the durable log: the
39
- * `tools/ptc-dispatch-log` waterfall bounds the `tool/code-dispatch` event's
39
+ * `tools/ptc-dispatch-log` waterfall bounds the `tool/ptc-dispatch` event's
40
40
  * copy of an oversized `run_code` sub-call result (the program's value is
41
41
  * untouched; UIs and replay read the full text through the spill artifact).
42
42
  *
@@ -11,7 +11,7 @@
11
11
  * The policy only decides WHEN to spill and composes the notice.
12
12
  *
13
13
  * A second arm applies the SAME cap to the durable log: the
14
- * `tools/ptc-dispatch-log` waterfall bounds the `tool/code-dispatch` event's
14
+ * `tools/ptc-dispatch-log` waterfall bounds the `tool/ptc-dispatch` event's
15
15
  * copy of an oversized `run_code` sub-call result (the program's value is
16
16
  * untouched; UIs and replay read the full text through the spill artifact).
17
17
  *
@@ -11,7 +11,7 @@
11
11
  * The policy only decides WHEN to spill and composes the notice.
12
12
  *
13
13
  * A second arm applies the SAME cap to the durable log: the
14
- * `tools/ptc-dispatch-log` waterfall bounds the `tool/code-dispatch` event's
14
+ * `tools/ptc-dispatch-log` waterfall bounds the `tool/ptc-dispatch` event's
15
15
  * copy of an oversized `run_code` sub-call result (the program's value is
16
16
  * untouched; UIs and replay read the full text through the spill artifact).
17
17
  *
@@ -169,7 +169,7 @@ export function apply(ctx, config) {
169
169
  const replaced = [{ type: 'text', text: replacedText }];
170
170
  return { kind: 'accept', content: replaced, ...decision.additionalContexts ? { additionalContexts: decision.additionalContexts } : {} };
171
171
  }, { prepend: true });
172
- // The durable-log arm: bound the `tool/code-dispatch` event's copy of an
172
+ // The durable-log arm: bound the `tool/ptc-dispatch` event's copy of an
173
173
  // oversized sub-call result the same way the model-facing arm bounds an
174
174
  // outer result. The program's returned value is untouched (it already
175
175
  // crossed the worker boundary whole); only the session log's copy shrinks
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-spill-policy",
3
3
  "description": "Tool-result spill policy for the DeepSeek Harness — replaces oversized plain-text tool results with a retained preview plus a spill-file path (no service API)",
4
- "version": "0.1.3-alpha.2",
4
+ "version": "0.1.5-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,24 +32,24 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
36
- "@deepseek-ai/dsh-output-retention": "^0.1.3-alpha.2",
37
- "@deepseek-ai/dsh-spill": "^0.1.3-alpha.2",
38
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
39
- "@deepseek-ai/dsh-tools": "^0.1.3-alpha.2",
35
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
36
+ "@deepseek-ai/dsh-output-retention": "^0.1.5-alpha.2",
37
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
38
+ "@deepseek-ai/dsh-spill": "^0.1.5-alpha.2",
39
+ "@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
40
40
  "@deepseek-ai/cordis": "^4.0.2"
41
41
  },
42
42
  "dependencies": {
43
43
  "@deepseek-ai/schemastery": "^3.18.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
47
- "@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.3-alpha.2",
48
- "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
49
- "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
50
- "@deepseek-ai/dsh-spill": "^0.1.3-alpha.2",
51
- "@deepseek-ai/dsh-output-retention": "^0.1.3-alpha.2",
52
- "@deepseek-ai/dsh-tools": "^0.1.3-alpha.2",
46
+ "@deepseek-ai/dsh-agent": "^0.1.5-alpha.2",
47
+ "@deepseek-ai/dsh-code-runtime-worker-thread": "^0.1.5-alpha.2",
48
+ "@deepseek-ai/dsh-llm": "^0.1.5-alpha.2",
49
+ "@deepseek-ai/dsh-output-retention": "^0.1.5-alpha.2",
50
+ "@deepseek-ai/dsh-session": "^0.1.5-alpha.2",
51
+ "@deepseek-ai/dsh-spill": "^0.1.5-alpha.2",
52
+ "@deepseek-ai/dsh-tools": "^0.1.5-alpha.2",
53
53
  "@deepseek-ai/cordis": "^4.0.2"
54
54
  }
55
55
  }