@deepseek-ai/dsh-compaction-image-offload 0.2.1-alpha.2 → 0.2.1-alpha.3
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 +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +2 -2
- package/lib/types/index.js +2 -2
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +22 -20
package/README.i18n.yaml
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
en: 6a156ba4e44b520a
|
|
25
25
|
zh: a61fc63697f85095
|
|
26
26
|
/deepseek-ai-dsh-compaction-image-offload/use-this-package/failures-and-recovery:
|
|
27
|
-
en:
|
|
28
|
-
zh:
|
|
27
|
+
en: 453802a8e8338955
|
|
28
|
+
zh: c49c3d1871cca863
|
|
29
29
|
/deepseek-ai-dsh-compaction-image-offload/understand-the-implementation:
|
|
30
30
|
en: 61d7de1373f1c420
|
|
31
31
|
zh: bec696992dfa774a
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Each decision appends one `image/offload` event identifying the selected occurre
|
|
|
39
39
|
|
|
40
40
|
### Failures and recovery
|
|
41
41
|
|
|
42
|
-
The plugin acts only on `IMAGE_OFFLOAD_REQUIRED` failures that carry `offloadImages`. It walks the surface in model request order, skips assistant nodes and images already marked, and marks that many occurrences. When nothing remains to offload it delegates on the `agent/request-error` waterfall, so downstream recovery or the ordinary turn error applies. The retry spends no provider retry budget and logs no `llm/retry` event.
|
|
42
|
+
The plugin acts only on `IMAGE_OFFLOAD_REQUIRED` failures that carry `offloadImages`. It walks the surface in model request order, skips assistant nodes and images already marked, and marks that many occurrences. When nothing remains to offload it delegates on the `agent/request-error` waterfall, so downstream recovery or the ordinary turn error applies. The retry spends no provider retry budget and logs no `llm/retry` event. Cancellation before recording a selection delegates without adding an `image/offload` event; cancellation after a committed selection stops retry but preserves the omission.
|
|
43
43
|
|
|
44
44
|
-----
|
|
45
45
|
|
package/README.zh.md
CHANGED
|
@@ -39,7 +39,7 @@ kind: "package-reference"
|
|
|
39
39
|
|
|
40
40
|
### 失败与恢复
|
|
41
41
|
|
|
42
|
-
本插件只处理带 `offloadImages` 的 `IMAGE_OFFLOAD_REQUIRED` 失败。它按模型请求顺序遍历表层,跳过 assistant 节点和已经标记的图片,给指定数量的出现位置打标记。没有可省略的图片时在 `agent/request-error` waterfall 上委派下游,由下游恢复或普通的轮次错误处理。这次重试不占提供方重试预算,也不追加 `llm/retry`
|
|
42
|
+
本插件只处理带 `offloadImages` 的 `IMAGE_OFFLOAD_REQUIRED` 失败。它按模型请求顺序遍历表层,跳过 assistant 节点和已经标记的图片,给指定数量的出现位置打标记。没有可省略的图片时在 `agent/request-error` waterfall 上委派下游,由下游恢复或普通的轮次错误处理。这次重试不占提供方重试预算,也不追加 `llm/retry` 事件。记录选择前发生取消时会委派后续处理,不新增 `image/offload` 事件;选择提交后发生取消时停止重试,但保留省略记录。
|
|
43
43
|
|
|
44
44
|
-----
|
|
45
45
|
|
package/lib/index.js
CHANGED
|
@@ -138,8 +138,8 @@ const inject = ["agents", "sessions"];
|
|
|
138
138
|
*/
|
|
139
139
|
function apply(ctx) {
|
|
140
140
|
ctx.sessions.registerMessageProjection(imageOffloadProjection);
|
|
141
|
-
ctx.on("agent/request-error", ({ agent, failure }, next) => {
|
|
142
|
-
if (failure.code !== IMAGE_OFFLOAD_REQUIRED_CODE || failure.offloadImages === void 0) return next();
|
|
141
|
+
ctx.on("agent/request-error", ({ agent, failure, signal }, next) => {
|
|
142
|
+
if (failure.code !== IMAGE_OFFLOAD_REQUIRED_CODE || failure.offloadImages === void 0 || signal.aborted) return next();
|
|
143
143
|
if (!offloadOldestImages(agent.session, agent.session.surface.nodes, failure.offloadImages)) return next();
|
|
144
144
|
return Promise.resolve({ kind: "retry" });
|
|
145
145
|
});
|
package/lib/types/index.js
CHANGED
|
@@ -18,8 +18,8 @@ export const inject = ['agents', 'sessions'];
|
|
|
18
18
|
*/
|
|
19
19
|
export function apply(ctx) {
|
|
20
20
|
ctx.sessions.registerMessageProjection(imageOffloadProjection);
|
|
21
|
-
ctx.on('agent/request-error', ({ agent, failure }, next) => {
|
|
22
|
-
if (failure.code !== IMAGE_OFFLOAD_REQUIRED_CODE || failure.offloadImages === undefined)
|
|
21
|
+
ctx.on('agent/request-error', ({ agent, failure, signal }, next) => {
|
|
22
|
+
if (failure.code !== IMAGE_OFFLOAD_REQUIRED_CODE || failure.offloadImages === undefined || signal.aborted)
|
|
23
23
|
return next();
|
|
24
24
|
// A durable surface repair, not a provider retry: it spends no retry budget and logs no retry event.
|
|
25
25
|
if (!offloadOldestImages(agent.session, agent.session.surface.nodes, failure.offloadImages))
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-compaction-image-offload",
|
|
3
3
|
"description": "Durable image offload for image-capable routes: replace over-budget request images with placeholders and retry",
|
|
4
|
-
"version": "0.2.1-alpha.
|
|
4
|
+
"version": "0.2.1-alpha.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -22,36 +22,38 @@
|
|
|
22
22
|
"./projection": {
|
|
23
23
|
"types": "./lib/types/projection.d.ts",
|
|
24
24
|
"default": "./lib/types/projection.js"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"./locale/*.json": "./locale/*.json"
|
|
26
27
|
},
|
|
27
28
|
"files": [
|
|
29
|
+
"locale/*.json",
|
|
28
30
|
"lib/index.js",
|
|
29
31
|
"lib/types/**/*.js",
|
|
30
32
|
"lib/types/**/*.d.ts"
|
|
31
33
|
],
|
|
32
34
|
"license": "MIT",
|
|
33
35
|
"peerDependencies": {
|
|
34
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
35
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
36
|
-
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.
|
|
37
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
38
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
36
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
37
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
38
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.3",
|
|
39
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
40
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/cordis": "~4.0.5-alpha.
|
|
42
|
-
"@deepseek-ai/dsh-agent": "0.2.1-alpha.
|
|
43
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.
|
|
44
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.
|
|
45
|
-
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.
|
|
46
|
-
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.
|
|
47
|
-
"@deepseek-ai/dsh-compaction-basic": "0.2.1-alpha.
|
|
48
|
-
"@deepseek-ai/dsh-llm": "0.2.1-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.
|
|
50
|
-
"@deepseek-ai/dsh-session": "0.2.1-alpha.
|
|
51
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.
|
|
52
|
-
"@deepseek-ai/dsh-token-meter": "0.2.1-alpha.
|
|
43
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.2",
|
|
44
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
|
|
45
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.3",
|
|
46
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.3",
|
|
47
|
+
"@deepseek-ai/dsh-attachment": "0.2.1-alpha.3",
|
|
48
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-alpha.3",
|
|
49
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.1-alpha.3",
|
|
50
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
|
|
51
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.2.1-alpha.3",
|
|
52
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.3",
|
|
53
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
|
|
54
|
+
"@deepseek-ai/dsh-token-meter": "0.2.1-alpha.3"
|
|
53
55
|
},
|
|
54
56
|
"dependencies": {
|
|
55
|
-
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.
|
|
57
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.3"
|
|
56
58
|
}
|
|
57
59
|
}
|