dsh-plugin-thinking-guard 0.0.0-stage → 0.4.0

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/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Thinking guard",
4
+ "description": "Some OpenAI-compatible relays leak a thinking model's chain-of-thought into assistant text (wrapped in literal <thinking>/<analysis> tags), and stream DeepSeek's native tool calls (DSML, <invoke>…) as text, which ends the turn early, or wrap a whole preamble in an invented tag such as <概述>, or even keep writing the conversation's next turns themselves (<user_message>continue</user_message>…) until the output limit. This plugin fixes both while streaming: leaked thinking and wrapped preambles become collapsed reasoning blocks; leaked tool-call markup is removed from the answer and, when the response carried no real tool call, emitted as real tool calls (toolMarkup: salvage; strip only removes it). Invented turns are cut off where they begin, so the call written before them still runs and the turn continues. Replay metadata is realigned so the markup is not replayed. It does not change model parameters or reroute the provider."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "思考护栏",
4
+ "description": "某些 OpenAI 兼容中转会把思考模型的 chain-of-thought 塞进正文(包着 <thinking>/<analysis> 字面标签),还会把 DeepSeek 的原生工具调用(DSML、<invoke>…)当正文吐出来,导致 turn 提前结束;或者用自造标签(如 <概述>)把开工前的独白整块包进正文;甚至顺着对话记录替用户往下编(<user_message>请继续</user_message>…),一直写到输出上限。本插件在流式阶段修正两者:思考和自造标签包着的独白改回可折叠的「思考」块;伪工具调用从正文删掉,并在这次响应没有真调用时补发成真正的工具调用(toolMarkup: salvage,可改为 strip 只删不执行)。替用户编的后续轮次在编的地方截掉,前面写成文字的调用照常执行、turn 接着跑。同时对齐回放元数据,历史里不再回放这些标记。不改模型参数,也不会替你换上游。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,63 @@
1
1
  {
2
2
  "name": "dsh-plugin-thinking-guard",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "private": false,
5
+ "description": "Thinking guard for DeepSeek Harness: rewrite chain-of-thought and leaked tool-call markup that an OpenAI-compatible relay put into assistant text back into reasoning blocks and real tool calls. 把漏进正文的思考与伪工具调用还原成真正的 reasoning / tool call。",
6
+ "type": "module",
7
+ "main": "./index.js",
8
+ "license": "MIT",
9
+ "icon": "icon.svg",
10
+ "keywords": [
11
+ "dsh",
12
+ "dsh-plugin",
13
+ "deepseek-harness",
14
+ "deepseek",
15
+ "chain-of-thought",
16
+ "reasoning",
17
+ "thinking",
18
+ "stream",
19
+ "tool-call",
20
+ "openai-compatible",
21
+ "relay"
22
+ ],
23
+ "homepage": "https://github.com/yuna78/dsh-thinking-guard#readme",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/yuna78/dsh-thinking-guard.git"
27
+ },
28
+ "bugs": {
29
+ "url": "https://github.com/yuna78/dsh-thinking-guard/issues"
30
+ },
31
+ "engines": {
32
+ "dsh": ">=0.2.1-rc.2 <0.3.0"
33
+ },
34
+ "peerDependencies": {
35
+ "@deepseek-ai/dsh": ">=0.2.1-rc.2 <0.3.0"
36
+ },
37
+ "exports": {
38
+ ".": "./index.js",
39
+ "./locale/*.json": "./locale/*.json",
40
+ "./icon": "./icon.svg",
41
+ "./package.json": "./package.json"
42
+ },
43
+ "files": [
44
+ "index.js",
45
+ "lib/",
46
+ "cordis.patch.yml",
47
+ "locale/*.json",
48
+ "icon.svg",
49
+ "README.md",
50
+ "README.en.md",
51
+ "CHANGELOG.md",
52
+ "LICENSE"
53
+ ],
54
+ "scripts": {
55
+ "test": "node --test test/*.test.mjs",
56
+ "prepublishOnly": "node verify/smoke.mjs"
57
+ },
58
+ "dsh": {
59
+ "bundle": {
60
+ "patch": "./cordis.patch.yml"
61
+ }
62
+ }
63
+ }