@deepseek-ai/dsh-repeat-tool-reminder 0.1.5-rc.1 → 0.1.6-alpha.1
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 +1 -1
- package/README.zh.md +5 -5
- package/lib/index.js +6 -3
- package/package.json +11 -11
package/README.i18n.yaml
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/guard/repeat-tool-reminder/README.md
|
|
5
5
|
README.md: 13035b68e80c9eea3e87bb7c8315fbaf9b84a3c3
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: 27d142988f77c8ab03a81701ff7b89f55ca1668b
|
package/README.zh.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "建议性循环卫生 guard:当 agent
|
|
2
|
+
description: "建议性循环卫生 guard:当 agent(智能体)重复完全相同的工具调用时提醒模型,供选择、配置或排查此插件的用户与维护者阅读。"
|
|
3
3
|
kind: "package-reference"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
本包帮助模型跳出以相同参数反复调用同一工具却没有进展的循环。达到配置的重复次数时,它会要求模型检查上一次结果并改变方法或结束任务。提醒只是建议,绝不会阻止或延迟合理的重复调用。每个 agent 的重复分别跟踪,新的用户消息会清除计数。`dsh`
|
|
12
|
+
本包帮助模型跳出以相同参数反复调用同一工具却没有进展的循环。达到配置的重复次数时,它会要求模型检查上一次结果并改变方法或结束任务。提醒只是建议,绝不会阻止或延迟合理的重复调用。每个 agent 的重复分别跟踪,新的用户消息会清除计数。`dsh` 基础组合包默认启用本包,并在重复 3、5、8 次时提醒。
|
|
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
|
-
当模型应当自行发现自己在相同工具调用上循环时,挂载此插件。无需学习或接线:`dsh`
|
|
28
|
+
当模型应当自行发现自己在相同工具调用上循环时,挂载此插件。无需学习或接线:`dsh` 基础组合包已经运行它,默认值适用于大多数会话——想更早、更晚或在更少的工具上收到提醒时,调优下面的阈值与工具范围即可。
|
|
29
29
|
|
|
30
30
|
### 何时选择
|
|
31
31
|
|
|
@@ -95,7 +95,7 @@ guard 建立在四项承诺之上:
|
|
|
95
95
|
| 文件 | 职责 |
|
|
96
96
|
|---|---|
|
|
97
97
|
| [`src/index.ts`](src/index.ts) | 插件入口:`Config` schema、快速失败校验、链监听器 |
|
|
98
|
-
| — |
|
|
98
|
+
| — | 不发布运行时不变式配套组件;重复链私有于一个 post-execute 监听器,且不公开任何可供独立配套组件观察的包自有事件或快照。 |
|
|
99
99
|
|
|
100
100
|
</details>
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ guard 建立在四项承诺之上:
|
|
|
104
104
|
<a id="further-exploration"></a>
|
|
105
105
|
## 进一步探索
|
|
106
106
|
|
|
107
|
-
当包级约定不够用时阅读以下页面。它们从工具 waterfall
|
|
107
|
+
当包级约定不够用时阅读以下页面。它们从工具 waterfall(瀑布式事件)逐步进入穷尽式配置与 guard 组映射。
|
|
108
108
|
|
|
109
109
|
- [工具子系统参考](../../../docs/subsystems/tools.zh.md)——本 guard 消费的 `tools/execute` waterfall、`additionalContexts` 与决策形态。
|
|
110
110
|
- [生成配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-repeat-tool-reminder)——每个受支持配置字段及其源声明。
|
package/lib/index.js
CHANGED
|
@@ -469,13 +469,15 @@ function failureSnapshot(value) {
|
|
|
469
469
|
const status = candidate.status;
|
|
470
470
|
const providerRetryAfterMs = candidate.providerRetryAfterMs;
|
|
471
471
|
const requestId = candidate.requestId;
|
|
472
|
-
|
|
472
|
+
const offloadImages = candidate.offloadImages;
|
|
473
|
+
if (typeof message !== "string" || message.length === 0 || typeof code !== "string" || code.length === 0 || status !== void 0 && (!Number.isInteger(status) || status < 100 || status > 599) || providerRetryAfterMs !== void 0 && (!Number.isFinite(providerRetryAfterMs) || providerRetryAfterMs <= 0) || requestId !== void 0 && (typeof requestId !== "string" || requestId.length === 0) || offloadImages !== void 0 && (!Number.isSafeInteger(offloadImages) || offloadImages <= 0)) return void 0;
|
|
473
474
|
return Object.freeze({
|
|
474
475
|
message,
|
|
475
476
|
code,
|
|
476
477
|
...status === void 0 ? {} : { status },
|
|
477
478
|
...providerRetryAfterMs === void 0 ? {} : { providerRetryAfterMs },
|
|
478
|
-
...requestId === void 0 ? {} : { requestId }
|
|
479
|
+
...requestId === void 0 ? {} : { requestId },
|
|
480
|
+
...offloadImages === void 0 ? {} : { offloadImages }
|
|
479
481
|
});
|
|
480
482
|
} catch (_sdkFailureGetter) {
|
|
481
483
|
return;
|
|
@@ -712,7 +714,8 @@ var LlmError = class extends HarnessError {
|
|
|
712
714
|
code,
|
|
713
715
|
...options?.status === void 0 ? {} : { status: options.status },
|
|
714
716
|
...options?.providerRetryAfterMs === void 0 ? {} : { providerRetryAfterMs: options.providerRetryAfterMs },
|
|
715
|
-
...options?.requestId === void 0 ? {} : { requestId: options.requestId }
|
|
717
|
+
...options?.requestId === void 0 ? {} : { requestId: options.requestId },
|
|
718
|
+
...options?.offloadImages === void 0 ? {} : { offloadImages: options.offloadImages }
|
|
716
719
|
});
|
|
717
720
|
}
|
|
718
721
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-repeat-tool-reminder",
|
|
3
3
|
"description": "Repeat-tool-call guard plugin: advisory reminders when an agent loops on identical tool calls",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.6-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
"@deepseek-ai/schemastery": "^3.18.2"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/
|
|
33
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
34
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
35
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
39
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
40
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.
|
|
41
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
42
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
38
|
+
"@deepseek-ai/dsh-agent": "^0.1.6-alpha.1",
|
|
39
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.6-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-llm": "^0.1.6-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-tools": "^0.1.6-alpha.1",
|
|
43
44
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
44
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-tools": "^0.1.5-rc.1"
|
|
45
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1"
|
|
46
46
|
}
|
|
47
47
|
}
|