@deepseek-ai/dsh-spill-local 0.1.2-rc.1 → 0.1.3-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 +2 -2
- package/README.md +5 -5
- package/README.zh.md +5 -5
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +7 -7
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-local/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 1c7ea86631a7da51c774081c7178d1f29c5094c9
|
|
6
|
+
README.zh.md: bb0d0d71f80c4ab7ee1bf863902ddfaba72e2084
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "The local filesystem spill backend: how spilled
|
|
2
|
+
description: "The local filesystem spill backend: how spilled text is saved to private session-scoped files and retrieved with read or grep."
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-spill-local` saves a
|
|
12
|
+
`dsh-spill-local` saves a caller's oversized text to a private, session-scoped file on the host filesystem and returns that file's path as the locator, with retrieval guidance telling the model to read or grep it. Mount it whenever a composition needs spill storage on the same machine the agent runs on. Files are private to the current user, names are unpredictable, and each session's files group under a stable directory, so a shared root cannot leak output or be redirected by a planted symlink. Configuration selects the root and the startup-cleanup retention period; previews and spill decisions live in other packages.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ English | [中文](README.zh.md)
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## Use this package
|
|
27
27
|
|
|
28
|
-
Mount this backend in a composition that spills
|
|
28
|
+
Mount this backend in a composition that spills text to the local filesystem. It registers as the `ctx.spillStore` service that the `dsh-spill-policy` plugin and other callers use.
|
|
29
29
|
|
|
30
30
|
### Minimal configuration
|
|
31
31
|
|
|
@@ -53,6 +53,7 @@ Each `saveText` call writes the full text to a fresh file and returns three fiel
|
|
|
53
53
|
|
|
54
54
|
Files are stored at `<root>/session-<hash>/<random>-<safeName>`, where `session-<hash>` is a short hash of the owning session id (so one session's files group together) and `<random>-<safeName>` pairs an unpredictable hex prefix with the caller's suggested name sanitized to one safe path segment. A relative `root` resolves from the process working directory.
|
|
55
55
|
|
|
56
|
+
<a id="startup-cleanup"></a>
|
|
56
57
|
### Startup cleanup
|
|
57
58
|
|
|
58
59
|
One best-effort sweep starts after activation without delaying service availability. It scans the configured root and prior default `dsh-spill-*` roots under the OS temp directory, deletes regular files whose modification time is strictly older than the configured cutoff, prunes empty session directories, and removes only empty prior-default roots. A long-lived process does not sweep again until restart. Disposal waits for the sweep, and a concurrent write recreates a session directory if cleanup removes it.
|
|
@@ -75,7 +76,7 @@ This section explains the design decisions behind the backend; the observable be
|
|
|
75
76
|
|
|
76
77
|
### Design philosophy
|
|
77
78
|
|
|
78
|
-
The backend owns storage details only, on one principle: **a spilled
|
|
79
|
+
The backend owns storage details only, on one principle: **a spilled artifact must be private and unredirectable**. The root is private (0700), the session directory is a stable hash, the leaf name is unpredictable, and the write is exclusive and owner-only. The storage mechanics live in a Cordis-free module so they are unit-testable without a context.
|
|
79
80
|
|
|
80
81
|
### Source map
|
|
81
82
|
|
|
@@ -104,7 +105,6 @@ Read these pages when the package-level contract is not enough.
|
|
|
104
105
|
- [dsh-spill-policy](../spill-policy/README.md) — the policy that calls this backend when a result is too large.
|
|
105
106
|
- [Spill subsystem](../../../docs/subsystems/spill.md) — the exhaustive vocabulary and ownership.
|
|
106
107
|
- [Tool output spill decision](../../../.agents/notes/implemented/architecture/2026-07-08-tool-output-spill-files.md) — the capability boundary and design rationale.
|
|
107
|
-
- [Local spill startup cleanup](../../../.agents/notes/implemented/architecture/2026-07-17-local-spill-startup-cleanup.md) — retention, race handling, and safe deletion rules.
|
|
108
108
|
|
|
109
109
|
-----
|
|
110
110
|
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "本地文件系统 spill 后端:spill
|
|
2
|
+
description: "本地文件系统 spill 后端:spill 文本如何保存到私有会话级文件,并用 read 或 grep 取回。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-spill-local`
|
|
12
|
+
`dsh-spill-local` 把调用方的超大文本保存到宿主文件系统中私有的会话级文件,并以该文件路径作为定位信息返回,同时给出告诉模型读取或搜索它的取回指引。只要组合需要在与 agent 相同的机器上进行 spill 存储,就挂载它。文件对当前用户私有、名称不可预测,且每个会话的文件归入稳定的目录,因此共享根目录既不会泄露输出,也不会被预置的符号链接重定向。配置选择根目录与启动清理保留期;预览与 spill 决策由其他包负责。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -25,7 +25,7 @@ kind: "package-reference"
|
|
|
25
25
|
<a id="use-this-package"></a>
|
|
26
26
|
## 使用本包
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
在需要把文本 spill 到本地文件系统的组合中挂载此后端。它注册为 `dsh-spill-policy` 插件与其他调用方使用的 `ctx.spillStore` 服务。
|
|
29
29
|
|
|
30
30
|
### 最小配置
|
|
31
31
|
|
|
@@ -53,6 +53,7 @@ kind: "package-reference"
|
|
|
53
53
|
|
|
54
54
|
文件存放在 `<root>/session-<hash>/<random>-<safeName>`:`session-<hash>` 是所属会话 id 的短哈希(让同一会话的文件归在一起),`<random>-<safeName>` 把不可预测的十六进制前缀与清理为单个安全路径段的调用方建议名配对。相对 `root` 从进程工作目录解析。
|
|
55
55
|
|
|
56
|
+
<a id="startup-cleanup"></a>
|
|
56
57
|
### 启动清理
|
|
57
58
|
|
|
58
59
|
一次尽力而为的扫描会在激活后启动,不延迟服务可用性。它扫描配置的根目录和操作系统临时目录下先前的默认 `dsh-spill-*` 根目录,删除修改时间严格早于配置截止时间的常规文件,修剪空会话目录,并只删除已经变空的先前默认根目录。长期运行的进程要到重启时才会再次扫描。dispose 会等待扫描结束;如果清理移除了会话目录,并发写入会重新创建它。
|
|
@@ -75,7 +76,7 @@ kind: "package-reference"
|
|
|
75
76
|
|
|
76
77
|
### 设计理念
|
|
77
78
|
|
|
78
|
-
后端只负责存储细节,建立在一个原则之上:**spill
|
|
79
|
+
后端只负责存储细节,建立在一个原则之上:**spill 产物必须私有且不可重定向**。根目录私有(0700)、会话目录是稳定哈希、文件名不可预测、写入采用排他且仅所有者模式。存储机制放在与 Cordis 无关的模块中,以便无需上下文即可单元测试。
|
|
79
80
|
|
|
80
81
|
### 源码地图
|
|
81
82
|
|
|
@@ -104,7 +105,6 @@ kind: "package-reference"
|
|
|
104
105
|
- [dsh-spill-policy](../spill-policy/README.zh.md)——结果过大时调用此后端的策略。
|
|
105
106
|
- [spill 子系统](../../../docs/subsystems/spill.zh.md)——穷尽式词汇与归属。
|
|
106
107
|
- [工具输出 spill 决策](../../../.agents/notes/implemented/architecture/2026-07-08-tool-output-spill-files.zh.md)——能力边界与设计依据。
|
|
107
|
-
- [本地 spill 启动清理](../../../.agents/notes/implemented/architecture/2026-07-17-local-spill-startup-cleanup.zh.md)——保留期、竞态处理与安全删除规则。
|
|
108
108
|
|
|
109
109
|
-----
|
|
110
110
|
|
package/lib/index.js
CHANGED
|
@@ -457,7 +457,7 @@ async function gatherSweepRoots(activeRoot, warn, defaultRootsBase = tmpdir()) {
|
|
|
457
457
|
//#region lib/types/index.js
|
|
458
458
|
/**
|
|
459
459
|
* `LocalSpillStore`: the host-filesystem implementation of the
|
|
460
|
-
* `@deepseek-ai/dsh-spill` storage seam. Persists
|
|
460
|
+
* `@deepseek-ai/dsh-spill` storage seam. Persists oversized text to a
|
|
461
461
|
* private, session-scoped file (see `./store.ts` for the traversal-safe naming
|
|
462
462
|
* and exclusive owner-only write) and returns a path locator plus local
|
|
463
463
|
* read/grep retrieval guidance. After activation it runs one best-effort
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `LocalSpillStore`: the host-filesystem implementation of the
|
|
3
|
-
* `@deepseek-ai/dsh-spill` storage seam. Persists
|
|
3
|
+
* `@deepseek-ai/dsh-spill` storage seam. Persists oversized text to a
|
|
4
4
|
* private, session-scoped file (see `./store.ts` for the traversal-safe naming
|
|
5
5
|
* and exclusive owner-only write) and returns a path locator plus local
|
|
6
6
|
* read/grep retrieval guidance. After activation it runs one best-effort
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-spill-local",
|
|
3
3
|
"description": "Local-filesystem implementation of the DeepSeek Harness spill storage seam (private session-scoped files)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/
|
|
31
|
-
"@deepseek-ai/
|
|
30
|
+
"@deepseek-ai/dsh-spill": "^0.1.3-alpha.2",
|
|
31
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis-plugin-include": "^1.0.7",
|
|
38
38
|
"@deepseek-ai/cordis-plugin-loader": "^1.0.3",
|
|
39
|
-
"@deepseek-ai/dsh-brand": "^0.1.
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-spill": "^0.1.
|
|
39
|
+
"@deepseek-ai/dsh-brand": "^0.1.3-alpha.2",
|
|
40
|
+
"@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
|
|
41
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
42
|
+
"@deepseek-ai/dsh-spill": "^0.1.3-alpha.2",
|
|
43
43
|
"@deepseek-ai/cordis": "^4.0.2"
|
|
44
44
|
}
|
|
45
45
|
}
|