@xth26/dsh-plan-build-mode 0.1.0 → 0.2.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/README.md +18 -6
- package/README.zh.md +18 -4
- package/lib/helpers.js +1 -1
- package/lib/helpers.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -13
- package/lib/index.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -70,10 +70,11 @@ Then start DSH with that profile. The `dsh.bundle.patch` field in the plugin's
|
|
|
70
70
|
|
|
71
71
|
| Command | Effect |
|
|
72
72
|
|---|---|
|
|
73
|
-
| `/plan-build` |
|
|
73
|
+
| `/plan-build` | Toggle between Plan and Build modes |
|
|
74
|
+
| `/plan-build status` | Show the current mode |
|
|
74
75
|
| `/plan-build switch plan` | Enter Plan mode (read-only) |
|
|
75
76
|
| `/plan-build switch build` | Enter Build mode (writable) |
|
|
76
|
-
| `/plan-build switch` |
|
|
77
|
+
| `/plan-build switch` | Same as `/plan-build`; toggles between modes |
|
|
77
78
|
|
|
78
79
|
## Configuration
|
|
79
80
|
|
|
@@ -87,17 +88,28 @@ Then start DSH with that profile. The `dsh.bundle.patch` field in the plugin's
|
|
|
87
88
|
section: true
|
|
88
89
|
```
|
|
89
90
|
|
|
91
|
+
## Plan mode: command-line Python for inspection
|
|
92
|
+
|
|
93
|
+
While Plan mode is read-only and blocks `write`/`edit` tools, it is **encouraged** to run short, read-only command-line Python snippets to inspect data and validate assumptions. For example:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python -B -c "import json, sys; data = json.load(open('data/sample.json')); print(len(data))"
|
|
97
|
+
python -B -c "import pandas as pd; print(pd.read_csv('data.csv').describe())"
|
|
98
|
+
pytest -p no:cacheprovider -q tests/test_sanity.py
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use `-B` (or set `PYTHONDONTWRITEBYTECODE=1`) and `pytest -p no:cacheprovider` to avoid writing `__pycache__` or `.pytest_cache`. The read-only sandbox is the final guardrail; any command that tries to write files will still be blocked at the sandbox layer.
|
|
102
|
+
|
|
90
103
|
## Local integration check
|
|
91
104
|
|
|
92
105
|
After installing/linking the plugin in a DSH profile:
|
|
93
106
|
|
|
94
107
|
1. Start DSH with that profile.
|
|
95
|
-
2. Run `/plan-build
|
|
96
|
-
is active.
|
|
108
|
+
2. Run `/plan-build` to enter Plan mode (read-only). You should see a confirmation.
|
|
97
109
|
3. Ask the agent to call the `write` tool. It should be denied with a reason.
|
|
98
|
-
4. Run `/plan-build
|
|
99
|
-
is active.
|
|
110
|
+
4. Run `/plan-build` again to enter Build mode (writable). You should see a confirmation.
|
|
100
111
|
5. Ask the agent to call `write` again. It should now be allowed.
|
|
112
|
+
6. Run `/plan-build status` to check the current mode without switching.
|
|
101
113
|
|
|
102
114
|
## License
|
|
103
115
|
|
package/README.zh.md
CHANGED
|
@@ -67,10 +67,11 @@ pnpm link --global @xth26/dsh-plan-build-mode
|
|
|
67
67
|
|
|
68
68
|
| 命令 | 效果 |
|
|
69
69
|
|---|---|
|
|
70
|
-
| `/plan-build` |
|
|
70
|
+
| `/plan-build` | 在 Plan 与 Build 模式之间切换 |
|
|
71
|
+
| `/plan-build status` | 显示当前模式 |
|
|
71
72
|
| `/plan-build switch plan` | 进入 Plan 模式(只读) |
|
|
72
73
|
| `/plan-build switch build` | 进入 Build 模式(可写) |
|
|
73
|
-
| `/plan-build switch` |
|
|
74
|
+
| `/plan-build switch` | 同 `/plan-build`,切换当前模式 |
|
|
74
75
|
|
|
75
76
|
## 配置
|
|
76
77
|
|
|
@@ -84,15 +85,28 @@ pnpm link --global @xth26/dsh-plan-build-mode
|
|
|
84
85
|
section: true
|
|
85
86
|
```
|
|
86
87
|
|
|
88
|
+
## Plan 模式:命令行 Python 做数据检查
|
|
89
|
+
|
|
90
|
+
Plan 模式只读并拦截 `write`/`edit` 工具,但**鼓励**在命令行里跑简短、只读的 Python 片段来读数据和验证假设。例如:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
python -B -c "import json, sys; data = json.load(open('data/sample.json')); print(len(data))"
|
|
94
|
+
python -B -c "import pandas as pd; print(pd.read_csv('data.csv').describe())"
|
|
95
|
+
pytest -p no:cacheprovider -q tests/test_sanity.py
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
使用 `-B`(或设置 `PYTHONDONTWRITEBYTECODE=1`)以及 `pytest -p no:cacheprovider`,避免写入 `__pycache__` 或 `.pytest_cache`。read-only 沙箱仍是最终防线,任何试图写文件的命令仍会在沙箱层被拒绝。
|
|
99
|
+
|
|
87
100
|
## 本地集成验证
|
|
88
101
|
|
|
89
102
|
安装或 link 插件到 DSH profile 后:
|
|
90
103
|
|
|
91
104
|
1. 启动 DSH。
|
|
92
|
-
2. 输入 `/plan-build
|
|
105
|
+
2. 输入 `/plan-build`,应提示进入 Plan 模式。
|
|
93
106
|
3. 让 agent 调用 `write` 工具,应被拒绝。
|
|
94
|
-
4.
|
|
107
|
+
4. 再次输入 `/plan-build`,应提示进入 Build 模式。
|
|
95
108
|
5. 再次让 agent 调用 `write`,应允许执行。
|
|
109
|
+
6. 输入 `/plan-build status`,可只查看当前模式而不切换。
|
|
96
110
|
|
|
97
111
|
## 许可证
|
|
98
112
|
|
package/lib/helpers.js
CHANGED
|
@@ -53,7 +53,7 @@ export function planModeDenial(exec, planSandbox, writeTools = WRITE_TOOLS) {
|
|
|
53
53
|
if (!isPlanModeActive(exec.agent.session.events, planSandbox))
|
|
54
54
|
return undefined;
|
|
55
55
|
if (writeTools.has(exec.name)) {
|
|
56
|
-
return `Tool '${exec.name}' is forbidden in Plan Mode.
|
|
56
|
+
return `Tool '${exec.name}' is forbidden in Plan Mode. Run /plan-build (or /plan-build switch build) to leave Plan Mode before editing files.`;
|
|
57
57
|
}
|
|
58
58
|
return undefined;
|
|
59
59
|
}
|
package/lib/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
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ACH,MAAM,UAAU,gBAAgB,CAAC,KAAY,EAAE,IAAsB,EAAE,WAAwB,EAAE,YAAyB;IACxH,MAAM,MAAM,GAAgB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY,CAAA;IACxE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AACxD,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAmB,EACnB,WAAwB,EACxB,aAAkC,WAAW;IAE7C,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IAC9C,IAAI,WAAW,KAAK,WAAW;QAAE,OAAO,SAAS,CAAA;IACjD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,WAAW,CAAC;QAAE,OAAO,SAAS,CAAA;IAC/E,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,OAAO,SAAS,IAAI,CAAC,IAAI,qHAAqH,CAAA;IAChJ,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Implements an OpenCode-style Plan / Build mode that is independent from
|
|
5
5
|
* DSH's built-in `/plan` soft-guidance mode:
|
|
6
6
|
*
|
|
7
|
+
* - `/plan-build` -> Toggle between Plan and Build modes
|
|
8
|
+
* - `/plan-build status` -> Show the current mode
|
|
7
9
|
* - `/plan-build switch plan` -> Plan mode + read-only sandbox
|
|
8
10
|
* - `/plan-build switch build` -> Build mode + workspace-write sandbox
|
|
9
11
|
* - Blocks `write`/`edit` tool calls while in Plan mode
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAmBxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,0BAA0B;AAC1B,eAAO,MAAM,IAAI,wBAAwB,CAAA;AACzC,8CAA8C;AAC9C,eAAO,MAAM,MAAM,8CAA+C,CAAA;AAClE,4BAA4B;AAC5B,eAAO,MAAM,MAAM;;;;;;;;;;GAajB,CAAA;AAEF;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,GAAE,mBAAwB,GAAG,IAAI,CAoG1E"}
|
package/lib/index.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Implements an OpenCode-style Plan / Build mode that is independent from
|
|
5
5
|
* DSH's built-in `/plan` soft-guidance mode:
|
|
6
6
|
*
|
|
7
|
+
* - `/plan-build` -> Toggle between Plan and Build modes
|
|
8
|
+
* - `/plan-build status` -> Show the current mode
|
|
7
9
|
* - `/plan-build switch plan` -> Plan mode + read-only sandbox
|
|
8
10
|
* - `/plan-build switch build` -> Build mode + workspace-write sandbox
|
|
9
11
|
* - Blocks `write`/`edit` tool calls while in Plan mode
|
|
@@ -62,8 +64,8 @@ export function apply(ctx, config = {}) {
|
|
|
62
64
|
if (agent === undefined)
|
|
63
65
|
return '';
|
|
64
66
|
return isPlanModeActive(agent.session.events, planSandbox)
|
|
65
|
-
? 'You are in OpenCode Plan Mode. You are READ-ONLY. You may read files, search code, browse directories, and
|
|
66
|
-
: 'You are in OpenCode Build Mode. You may edit files, run commands, and execute the approved plan. Make minimal changes, run tests/verification after changes, and ask for confirmation before destructive git operations or system-wide changes.';
|
|
67
|
+
? 'You are in OpenCode Plan Mode. You are READ-ONLY. You may read files, search code, browse directories, ask questions, and inspect data or run quick read-only sanity checks. You are encouraged to write short command-line Python snippets (for example, python -B -c "...") to read data files, compute statistics, sample records, or run fast tests that do not modify the filesystem or write caches. Avoid commands that install packages, write files, generate build artifacts, or change the system. If a verification requires writing files, leave it for Build Mode. Present a complete plan and use /plan-build (or /plan-build switch build) to enter Build Mode before implementing.'
|
|
68
|
+
: 'You are in OpenCode Build Mode. You may edit files, run commands, and execute the approved plan. Make minimal changes, run tests/verification after changes, and ask for confirmation before destructive git operations or system-wide changes. Run /plan-build (or /plan-build switch plan) to return to Plan Mode when you need to re-plan.';
|
|
67
69
|
},
|
|
68
70
|
}));
|
|
69
71
|
}
|
|
@@ -81,31 +83,34 @@ export function apply(ctx, config = {}) {
|
|
|
81
83
|
ctx.inject(['commands'], (commandCtx) => {
|
|
82
84
|
disposers.push(commandCtx.commands.register({
|
|
83
85
|
name: 'plan-build',
|
|
84
|
-
description: '
|
|
85
|
-
input: { hint: '[switch [plan|build]]' },
|
|
86
|
+
description: 'Toggle between OpenCode Plan and Build modes',
|
|
87
|
+
input: { hint: '[status | switch [plan|build]]' },
|
|
86
88
|
handler: ({ agent, rawInput }) => {
|
|
87
89
|
const arg = rawInput.trim().toLowerCase();
|
|
88
90
|
const active = isPlanModeActive(agent.session.events, planSandbox);
|
|
89
|
-
if (arg === '') {
|
|
91
|
+
if (arg === '' || arg === 'switch') {
|
|
92
|
+
const next = active ? 'build' : 'plan';
|
|
93
|
+
setPlanBuildMode(agent, next, planSandbox, buildSandbox);
|
|
94
|
+
return {
|
|
95
|
+
kind: 'success',
|
|
96
|
+
text: `Switched to ${next} mode. Run /plan-build again to switch back.`,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (arg === 'status') {
|
|
90
100
|
return {
|
|
91
101
|
kind: 'success',
|
|
92
102
|
text: active
|
|
93
|
-
? 'Plan mode is active (read-only).
|
|
94
|
-
: 'Build mode is active.
|
|
103
|
+
? 'Plan mode is active (read-only). Run /plan-build to enter Build mode, or /plan-build switch build.'
|
|
104
|
+
: 'Build mode is active. Run /plan-build to enter Plan mode, or /plan-build switch plan.',
|
|
95
105
|
};
|
|
96
106
|
}
|
|
97
107
|
if (!arg.startsWith('switch')) {
|
|
98
108
|
return {
|
|
99
109
|
kind: 'error',
|
|
100
|
-
text: 'Usage: /plan-build
|
|
110
|
+
text: 'Usage: /plan-build (toggle), /plan-build status, or /plan-build switch [plan|build].',
|
|
101
111
|
};
|
|
102
112
|
}
|
|
103
113
|
const target = arg.slice('switch'.length).trim().toLowerCase();
|
|
104
|
-
if (target === '') {
|
|
105
|
-
const next = active ? 'build' : 'plan';
|
|
106
|
-
setPlanBuildMode(agent, next, planSandbox, buildSandbox);
|
|
107
|
-
return { kind: 'success', text: `Switched to ${next} mode.` };
|
|
108
|
-
}
|
|
109
114
|
if (target !== 'plan' && target !== 'build') {
|
|
110
115
|
return {
|
|
111
116
|
kind: 'error',
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAWxC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,WAAW,GACZ,MAAM,cAAc,CAAA;AAGrB,0BAA0B;AAC1B,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAA;AACzC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAU,CAAA;AAClE,4BAA4B;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IA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,EAAE,CAAC;wBAC5B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,cAAc,MAAM,QAAQ,EAAE,CAAA;oBAChE,CAAC;oBAED,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;oBAC1D,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,MAAM,QAAQ,EAAE,CAAA;gBACjE,CAAC;aACF,CAAC,CAAC,CAAA;QACL,CAAC,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,OAAO,IAAI,SAAS;gBAAE,OAAO,EAAE,CAAA;QAC5C,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xth26/dsh-plan-build-mode",
|
|
3
3
|
"description": "OpenCode-style Plan / Build hard permission model for DSH",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -32,11 +32,6 @@
|
|
|
32
32
|
"patch": "./cordis.patch.yml"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "tsc -b tsconfig.json",
|
|
37
|
-
"test": "vitest run",
|
|
38
|
-
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
39
|
-
},
|
|
40
35
|
"license": "MIT",
|
|
41
36
|
"peerDependencies": {
|
|
42
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -96,5 +91,10 @@
|
|
|
96
91
|
"@types/node": "^22.0.0",
|
|
97
92
|
"typescript": "^5.7.0",
|
|
98
93
|
"vitest": "^2.1.0"
|
|
94
|
+
},
|
|
95
|
+
"scripts": {
|
|
96
|
+
"build": "tsc -b tsconfig.json",
|
|
97
|
+
"test": "vitest run",
|
|
98
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
99
99
|
}
|
|
100
|
-
}
|
|
100
|
+
}
|