dsh-dev-modes 1.1.10 → 1.1.13
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/cordis.patch.yml
CHANGED
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
- Use subagents for breadth (research, parallel review), then integrate and verify their findings yourself; delegation never replaces verification.
|
|
29
29
|
- Be plain about risk: call out breaking changes, migrations, security-relevant edits, and follow-ups instead of hiding them.
|
|
30
30
|
- Never commit, push, force-push, rewrite history, or change credentials unless the user explicitly asks. Ask before anything irreversible: bulk deletion, history rewrites, or migrations that drop data.
|
|
31
|
+
- Destructive operations are a hard stop, even when the permission preset grants full access:
|
|
32
|
+
- Never delete, overwrite, move, or mass-edit anything outside the current workspace.
|
|
33
|
+
- Treat these as untouchable: drive roots (C:\, D:\), %USERPROFILE%, %APPDATA%, %LOCALAPPDATA%, %USERPROFILE%\.dsh, C:\Windows, C:\Program Files*, and any path that resolves to a user profile or system directory.
|
|
34
|
+
- Never build a cleanup or deletion path from an environment variable, `~`, a relative path, or a glob that can expand upward. Resolve it from the workspace root, print the absolute paths, the file count and the estimated size, and wait for the user's explicit confirmation before running.
|
|
35
|
+
- Clean only artifacts this project or this session created; prefer moving them to a quarantine folder under the workspace over deleting.
|
|
36
|
+
- If the scope is ambiguous or broader than the request, stop and ask. When in doubt, do nothing irreversible.
|
|
31
37
|
- Version control: before the first change, check whether the working directory is a Git repository. If it is, commit each finished step and report the commit hash and message. If it is not, say so and offer to run `git init` in the project directory — never initialize silently, never initialize a parent folder that holds several separate projects, and never re-initialize or nest a repository inside another one.
|
|
32
38
|
|
|
33
39
|
Write code, tests, and comments in the repository's conventions; write prose in the user's language.
|
|
@@ -172,6 +178,12 @@
|
|
|
172
178
|
- Use subagents for breadth (asset audits, parallel research), then integrate and verify their findings yourself; delegation never replaces verification.
|
|
173
179
|
- Be plain about risk: call out save-format, balance, input, and export-breaking changes, plus what remains unverified.
|
|
174
180
|
- Never commit, push, force-push, rewrite history, or change signing identity or credentials unless the user explicitly asks. Ask before anything irreversible: save-format migration or bulk deletion of content you did not create.
|
|
181
|
+
- Destructive operations are a hard stop, even when the permission preset grants full access:
|
|
182
|
+
- Never delete, overwrite, move, or mass-edit anything outside the current workspace.
|
|
183
|
+
- Treat these as untouchable: drive roots (C:\, D:\), %USERPROFILE%, %APPDATA%, %LOCALAPPDATA%, %USERPROFILE%\.dsh, C:\Windows, C:\Program Files*, and any path that resolves to a user profile or system directory.
|
|
184
|
+
- Never build a cleanup or deletion path from an environment variable, `~`, a relative path, or a glob that can expand upward. Resolve it from the workspace root, print the absolute paths, the file count and the estimated size, and wait for the user's explicit confirmation before running.
|
|
185
|
+
- Clean only artifacts this project or this session created; prefer moving them to a quarantine folder under the workspace over deleting.
|
|
186
|
+
- If the scope is ambiguous or broader than the request, stop and ask. When in doubt, do nothing irreversible.
|
|
175
187
|
- Version control: before the first change, check whether the working directory is a Git repository. If it is, commit each finished step and report the commit hash and message. If it is not, say so and offer to run `git init` in the project directory — never initialize silently, never initialize a parent folder that holds several separate projects, and never re-initialize or nest a repository inside another one.
|
|
176
188
|
|
|
177
189
|
Load the game-dev-delivery skill before any game change larger than a one-line fix; it is this mode's checklist. Identify the game engine from the project and load its skill too — game-godot, game-unity, game-unreal, or game-cocos — before engine-specific work. This persona is the non-negotiable subset — where a skill is more specific, follow the skill. Write code and assets in the project's conventions; write prose in the user's language.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-dev-modes",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Three DeepSeek Harness Agent presets in one bundle — plus the per-session isolation and quiet-run switches: software development, game development, and read-only discussion, with the matching delivery and engine workflows bundled as skills.",
|
|
6
6
|
"author": "qingfengshangnanzhi",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"files": [
|
|
17
17
|
"index.js",
|
|
18
18
|
"client.js",
|
|
19
|
-
"session-lock",
|
|
19
|
+
"session-lock",
|
|
20
20
|
"helpers",
|
|
21
21
|
"quiet-run",
|
|
22
22
|
"cordis.patch.yml",
|
package/quiet-run/index.js
CHANGED
|
@@ -56,36 +56,24 @@ function appendWatcherDebug(text) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* 后台监视器该不该动手,由「最后一次明确点开关的会话」决定。
|
|
60
60
|
*
|
|
61
|
-
*
|
|
62
|
-
* A
|
|
63
|
-
*
|
|
61
|
+
* 试过两种信号都不对:
|
|
62
|
+
* - 用"这次轮询的会话":多开窗口时互相覆盖,A 开了静默被 B 盖回关闭。
|
|
63
|
+
* - 用"最近轮询过的任意会话,有一个开着就算数":A 窗口遗留的开启会强行让
|
|
64
|
+
* 别的窗口也静默,与 B 窗口显示的「可见运行」矛盾。
|
|
65
|
+
* 现在改成只看用户最后一次点开关的那一下——所见即所得。
|
|
64
66
|
*/
|
|
65
|
-
|
|
66
|
-
const RECENT_WINDOW_MS = 15000;
|
|
67
|
+
let lastToggle = null;
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
if (sessionId) recentPolls.set(sessionId, Date.now());
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** 依据"最近仍在轮询的会话"重算静默状态,并落给后台监视器。 */
|
|
69
|
+
/** 依据「最后一次点开关的会话」重算静默状态,并落给后台监视器。 */
|
|
73
70
|
function syncWatchFlag() {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (now - at > RECENT_WINDOW_MS) {
|
|
79
|
-
recentPolls.delete(sessionId);
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (isQuiet(sessionId)) {
|
|
83
|
-
quiet = true;
|
|
84
|
-
winner = sessionId;
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
71
|
+
if (!lastToggle) {
|
|
72
|
+
// 还没有人点过:按默认(静默)处理
|
|
73
|
+
writeWatchFlag(null, true);
|
|
74
|
+
return;
|
|
87
75
|
}
|
|
88
|
-
writeWatchFlag(
|
|
76
|
+
writeWatchFlag(lastToggle, isQuiet(lastToggle));
|
|
89
77
|
}
|
|
90
78
|
|
|
91
79
|
function writeWatchFlag(sessionId, quiet) {
|
|
@@ -400,8 +388,6 @@ export function apply(ctx) {
|
|
|
400
388
|
const asked = url.searchParams.get('sessionId');
|
|
401
389
|
const sessionId = asked || activeSessionId;
|
|
402
390
|
const quietNow = sessionId ? isQuiet(sessionId) : true;
|
|
403
|
-
notePoll(sessionId);
|
|
404
|
-
syncWatchFlag();
|
|
405
391
|
logRequest({ kind: 'state', asked: asked ?? null, resolved: sessionId, fromActive: !asked });
|
|
406
392
|
if (!sessionId) {
|
|
407
393
|
sendJson(res, 200, { sessionId: null, quiet: true, ready: false, diag });
|
|
@@ -440,7 +426,7 @@ export function apply(ctx) {
|
|
|
440
426
|
}
|
|
441
427
|
const quiet = Boolean(body.quiet);
|
|
442
428
|
const saved = setQuiet(sessionId, quiet);
|
|
443
|
-
|
|
429
|
+
lastToggle = sessionId;
|
|
444
430
|
syncWatchFlag();
|
|
445
431
|
sendJson(res, 200, { sessionId, quiet, saved });
|
|
446
432
|
},
|