dsh-agy-link 0.6.40 → 0.6.41
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/CHANGELOG.md +10 -0
- package/dist/cli-image.mjs +6 -6
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.41 (2026-11-19)
|
|
4
|
+
|
|
5
|
+
### English
|
|
6
|
+
|
|
7
|
+
- **Fix(regression from v0.6.27): plan mode is decided from the current turn, not from history (fixes #136).** `isPlanMode()` scanned **every** message backwards, so once a session's history contained `"You are in plan mode"` — in source code the user read, in tool output, or in a planning turn that had already exited — every later turn was forced to `--mode plan`. With `permissionMode: skip` that flipped the run back to `request-review`, denied every `run_command` / outside-workspace `read_file`, and ended with DSH rejecting the synthesized `exit_plan_mode` (`only available in plan mode`); the session was unrecoverable without starting a new one. `isPlanMode()` now reads **only the last message**, and only when it is a `user`/`system` turn. Two further guards: the presence of `exit_plan_mode` in the tool list is no longer treated as proof of plan mode (current DSH ships it in standard mode too), and a `exit_plan_mode is only available in plan mode` rejection is decisive evidence that the session is NOT planning, so a false positive can self-correct instead of locking the session. Regression tests cover history-in-tool-output, a genuine current-turn instruction, and the rejection signal, plus an adapter-level check that `--dangerously-skip-permissions` survives a historical mention.
|
|
8
|
+
|
|
9
|
+
### 中文
|
|
10
|
+
|
|
11
|
+
- **修复(v0.6.27 引入的回归):plan 模式只看当前轮,不再扫历史(修复 #136)。** `isPlanMode()` 原先**从后往前扫描全部消息**,只要会话历史里出现过 `"You are in plan mode"`——用户读过的源码、工具输出、或一次已经退出的规划轮——之后每一轮都会被强制 `--mode plan`。在 `permissionMode: skip` 下,这会退回 `request-review`、拒绝所有 `run_command` 与工作区外 `read_file`,并在回合结束时报 `exit_plan_mode is only available in plan mode`;会话无法恢复,只能新开。现在 `isPlanMode()` **只读最后一条消息**,且要求其角色为 `user`/`system`。另加两道保险:工具列表里出现 `exit_plan_mode` 不再被当作 plan 模式的证据(当前 DSH 标准模式也会下发该工具);出现 `exit_plan_mode is only available in plan mode` 的拒绝即判定为非 plan,使误判能自我纠正而不是永久锁死。回归测试覆盖「历史工具输出误命中」「当前轮真实指令」「拒绝信号」三种情形,并补一条 adapter 级验证:历史提及不得抹掉 `--dangerously-skip-permissions`。
|
|
12
|
+
|
|
3
13
|
## 0.6.40 (2026-11-19)
|
|
4
14
|
|
|
5
15
|
### English
|
package/dist/cli-image.mjs
CHANGED
|
@@ -1938,12 +1938,12 @@ function resolveGoalContext(messages, live) {
|
|
|
1938
1938
|
* DSH plan-mode injects "You are in plan mode" into the runtime context prompt.
|
|
1939
1939
|
*/
|
|
1940
1940
|
function isPlanMode(messages) {
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
return
|
|
1941
|
+
const last = messages[messages.length - 1];
|
|
1942
|
+
if (!last) return false;
|
|
1943
|
+
const text = extractText$1(last);
|
|
1944
|
+
if (/exit_plan_mode is only available in plan mode/i.test(text)) return false;
|
|
1945
|
+
if (last.role !== "user" && last.role !== "system") return false;
|
|
1946
|
+
return text.includes("You are in plan mode");
|
|
1947
1947
|
}
|
|
1948
1948
|
/**
|
|
1949
1949
|
* Harness-injected user-role texts (turn-preparation time samples, system
|
package/dist/index.js
CHANGED
|
@@ -29870,12 +29870,12 @@ function resolveGoalContext(messages, live) {
|
|
|
29870
29870
|
* DSH plan-mode injects "You are in plan mode" into the runtime context prompt.
|
|
29871
29871
|
*/
|
|
29872
29872
|
function isPlanMode(messages) {
|
|
29873
|
-
|
|
29874
|
-
|
|
29875
|
-
|
|
29876
|
-
|
|
29877
|
-
|
|
29878
|
-
return
|
|
29873
|
+
const last = messages[messages.length - 1];
|
|
29874
|
+
if (!last) return false;
|
|
29875
|
+
const text = extractText(last);
|
|
29876
|
+
if (/exit_plan_mode is only available in plan mode/i.test(text)) return false;
|
|
29877
|
+
if (last.role !== "user" && last.role !== "system") return false;
|
|
29878
|
+
return text.includes("You are in plan mode");
|
|
29879
29879
|
}
|
|
29880
29880
|
/**
|
|
29881
29881
|
* Harness-injected user-role texts (turn-preparation time samples, system
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.41",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|