dsh-extra-folders 0.1.0 → 0.1.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.en.md +50 -39
- package/README.md +51 -40
- package/assets/approval.png +0 -0
- package/assets/dialog.png +0 -0
- package/assets/menu.png +0 -0
- package/package.json +2 -1
package/README.en.md
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
# dsh-extra-folders
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
When a project spans several folders, or you temporarily need to write outside the workspace, add those folders to the workspace. Sessions and subagents can then write them directly, without repeated approvals and without granting full access.
|
|
4
|
+
|
|
5
|
+
Before adding a folder, writing outside the workspace triggers an approval:
|
|
6
|
+
|
|
7
|
+

|
|
4
8
|
|
|
5
9
|
| Workspace menu | Dialog |
|
|
6
10
|
| --- | --- |
|
|
7
11
|
|  |  |
|
|
8
12
|
|
|
9
|
-
## Install
|
|
13
|
+
## Install and update
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
DSH 0.2.2-alpha.3 or later.
|
|
12
16
|
|
|
13
|
-
### Option 1: Add from the
|
|
17
|
+
### Option 1: Add from the UI
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
**Settings → Plugins → Add plugin**
|
|
16
20
|
|
|
17
21
|
```text
|
|
18
|
-
|
|
22
|
+
dsh-extra-folders@latest
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
After it installs, make sure the plugin row is on.
|
|
22
|
-
|
|
23
25
|
### Option 2: Command line
|
|
24
26
|
|
|
25
27
|
```sh
|
|
26
|
-
dsh plugin --profile desktop add
|
|
28
|
+
dsh plugin --profile desktop add dsh-extra-folders@latest
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
### Option 3: Ask an agent
|
|
31
|
+
### Option 3: Ask an agent for help
|
|
30
32
|
|
|
31
33
|
<details>
|
|
32
|
-
<summary><strong>
|
|
34
|
+
<summary><strong>Expand the install prompt</strong></summary>
|
|
33
35
|
|
|
34
36
|
```text
|
|
35
37
|
Please install dsh-extra-folders into the current profile:
|
|
36
|
-
https://github.com/kingOfSoySauce/dsh-extra-folders
|
|
38
|
+
npm package dsh-extra-folders@latest (source https://github.com/kingOfSoySauce/dsh-extra-folders)
|
|
37
39
|
|
|
38
40
|
First, confirm three things in read-only mode: whether the host is Desktop or Web, the current profile name, and whether the dsh version is >= 0.2.2-alpha.3.
|
|
39
41
|
If the version is too low, tell me and do not try to install.
|
|
40
42
|
|
|
41
43
|
On Desktop, prefer Plugins → Add plugin and paste
|
|
42
|
-
|
|
44
|
+
dsh-extra-folders@latest
|
|
43
45
|
If the current host provides plugin management tools, you can also run
|
|
44
|
-
dsh plugin --profile <profile> add
|
|
46
|
+
dsh plugin --profile <profile> add dsh-extra-folders@latest.
|
|
45
47
|
|
|
46
48
|
After install, check that the plugin row is enabled. If a restart is needed, tell me and I will restart it myself.
|
|
47
49
|
Do not edit the profile's package.json by hand, and do not touch other plugins.
|
|
@@ -50,6 +52,30 @@ When it is installed, take me to the more menu of a sidebar workspace row and co
|
|
|
50
52
|
|
|
51
53
|
</details>
|
|
52
54
|
|
|
55
|
+
<details>
|
|
56
|
+
<summary><strong>Expand the update prompt</strong></summary>
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
Please update dsh-extra-folders to the latest version:
|
|
60
|
+
npm package dsh-extra-folders@latest (source https://github.com/kingOfSoySauce/dsh-extra-folders)
|
|
61
|
+
|
|
62
|
+
First, confirm four things in read-only mode: whether the host is Desktop or Web, the current profile name, the installed version, and the latest version on npm.
|
|
63
|
+
If it is already the latest, tell me and do not reinstall.
|
|
64
|
+
|
|
65
|
+
On Desktop, prefer Plugins → Add plugin and add
|
|
66
|
+
dsh-extra-folders@latest
|
|
67
|
+
If the current host provides plugin management tools, you can also run
|
|
68
|
+
dsh plugin --profile <profile> add dsh-extra-folders@latest.
|
|
69
|
+
|
|
70
|
+
After the update, check that the plugin row is enabled. If a restart is needed, tell me and I will restart it myself.
|
|
71
|
+
Do not edit the profile's package.json by hand, and do not touch other plugins.
|
|
72
|
+
When it is updated, take me to the more menu of a sidebar workspace row and confirm that "Add folder" is there and the folders I added before are still listed.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
Whichever option you use, if the version still looks old after updating, turn the plugin row off and on in Plugins.
|
|
78
|
+
|
|
53
79
|
## Usage
|
|
54
80
|
|
|
55
81
|
Sidebar workspace row → the more button at the end of the row → **Add folder**.
|
|
@@ -58,23 +84,16 @@ The first row in the dialog is the workspace itself. It is always writable and c
|
|
|
58
84
|
|
|
59
85
|
The grant follows the workspace. Subagents are covered too. Sessions in other workspaces do not see these folders.
|
|
60
86
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
| | This plugin | multi-root-workspace | union-workspace |
|
|
64
|
-
| --- | --- | --- | --- |
|
|
65
|
-
| Registers model tools | No | No | Yes, 5 |
|
|
66
|
-
| Changes upstream components | Only wraps `sandboxPolicy.resolve()` | Disables the `fs-sandbox` and `sandbox` rows, replaces both implementations | No replacement. Adds separate tools to bypass it |
|
|
67
|
-
| Runtime dependencies | None | `koffi`, `zod` | None |
|
|
68
|
-
| Per-folder read-only or read-write levels | No | Yes | No |
|
|
69
|
-
| Sidebar management panel | No | Yes | Yes |
|
|
70
|
-
| Minimum DSH version | 0.2.2-alpha.3 | 0.1.5-rc.2 | 0.1.7-rc.2 (from peer deps) |
|
|
71
|
-
| bash can write to attached folders on macOS | Yes | Yes | No (needs the danger-full-access preset) |
|
|
72
|
-
|
|
73
|
-
This plugin does one thing: it adds the attached folders to the session's writable scope. It registers no tools, replaces no implementation, and adds no dependencies. Turn it off and the host behaves like stock DSH again.
|
|
87
|
+
## Strengths
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
- **Native UI**: the dialog and buttons belong to the host, opened from the workspace row menu. Colors and fonts follow the host, so appearance plugins are naturally compatible.
|
|
90
|
+
- **No new tools**: the model sees the same toolset as before, and prefix-cache hits are unaffected.
|
|
91
|
+
- **No prompt text**: the plugin writes nothing into the context. DSH's own writable-directories note is updated at the end of the session history when folders change; earlier prefixes stay put.
|
|
92
|
+
- **No kernel patch**: the filesystem and the sandbox are untouched. One resolve method is wrapped, and disabling the plugin restores stock behavior.
|
|
93
|
+
- **Scoped grant**: grants are stored per workspace; other workspaces do not see these folders. Folders can only be added or removed from the UI, and the model has no way to widen its own access.
|
|
94
|
+
- **Zero dependencies**: one host file, one client file, no build step, no third-party packages.
|
|
76
95
|
|
|
77
|
-
|
|
96
|
+
How grants work, where state lives, and what does not apply: see [Design notes](https://github.com/kingOfSoySauce/dsh-extra-folders/blob/main/DESIGN.en.md).
|
|
78
97
|
|
|
79
98
|
## Compatibility
|
|
80
99
|
|
|
@@ -86,17 +105,9 @@ If you need per-folder permission levels or a sidebar panel, use multi-root-work
|
|
|
86
105
|
| Web (`dsh web`) | Same code as desktop. The folder picker is replaced by in-app browsing. Not tested |
|
|
87
106
|
| Windows | Applies to the file tools only. The sandboxed shell is not affected. This limit comes from DSH. Not tested |
|
|
88
107
|
|
|
89
|
-
The kernel is checked when the host starts. If the kernel is not supported, the plugin writes one clear log line and stops.
|
|
90
|
-
|
|
91
|
-
## Update and uninstall
|
|
92
|
-
|
|
93
|
-
To update, pull the latest code, then turn the plugin row off and on again in Plugins.
|
|
94
|
-
|
|
95
|
-
```sh
|
|
96
|
-
cd /absolute/path/dsh-extra-folders && git pull
|
|
97
|
-
```
|
|
108
|
+
The kernel is checked when the host starts. If the kernel is not supported, the plugin writes one clear log line and stops.
|
|
98
109
|
|
|
99
|
-
|
|
110
|
+
## Uninstall
|
|
100
111
|
|
|
101
112
|
```sh
|
|
102
113
|
dsh plugin --profile desktop remove dsh-extra-folders
|
package/README.md
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH工作区添加文件夹插件
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
项目跨了几个文件夹,或者临时要访问工作区外的文件时,把文件夹加进工作区。之后工作区里的会话和子 agent 都能直接写,不用再逐次点授权,也不用放开全部权限。
|
|
4
|
+
|
|
5
|
+
加文件夹之前,写工作区外的文件会触发审批:
|
|
6
|
+
|
|
7
|
+

|
|
4
8
|
|
|
5
9
|
| 工作区菜单 | 对话框 |
|
|
6
10
|
| --- | --- |
|
|
7
11
|
|  |  |
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## 安装、更新
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
DSH 0.2.2-alpha.3 及以上。
|
|
12
16
|
|
|
13
|
-
###
|
|
17
|
+
### 方式一:界面添加
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
**插件 → 添加插件**
|
|
16
20
|
|
|
17
21
|
```text
|
|
18
|
-
|
|
22
|
+
dsh-extra-folders@latest
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
装完确认插件行是开着的。
|
|
22
|
-
|
|
23
25
|
### 方式二:命令行
|
|
24
26
|
|
|
25
27
|
```sh
|
|
26
|
-
dsh plugin --profile desktop add
|
|
28
|
+
dsh plugin --profile desktop add dsh-extra-folders@latest
|
|
27
29
|
```
|
|
28
30
|
|
|
29
|
-
###
|
|
31
|
+
### 方式三:Agent 帮忙
|
|
30
32
|
|
|
31
33
|
<details>
|
|
32
|
-
<summary><strong
|
|
34
|
+
<summary><strong>展开安装提示词</strong></summary>
|
|
33
35
|
|
|
34
36
|
```text
|
|
35
37
|
请帮我把 dsh-extra-folders 装到当前 profile:
|
|
36
|
-
https://github.com/kingOfSoySauce/dsh-extra-folders
|
|
38
|
+
npm 包 dsh-extra-folders@latest(源码 https://github.com/kingOfSoySauce/dsh-extra-folders)
|
|
37
39
|
|
|
38
40
|
先只读确认三件事:宿主是桌面端还是 Web、当前 profile 名、dsh 版本是否 >= 0.2.2-alpha.3。
|
|
39
41
|
版本不够就直接告诉我,不要尝试安装。
|
|
40
42
|
|
|
41
43
|
桌面端优先用 Plugins → Add plugin,粘贴
|
|
42
|
-
|
|
44
|
+
dsh-extra-folders@latest
|
|
43
45
|
如果当前宿主提供了插件管理工具,也可以执行
|
|
44
|
-
dsh plugin --profile <profile> add
|
|
46
|
+
dsh plugin --profile <profile> add dsh-extra-folders@latest。
|
|
45
47
|
|
|
46
48
|
装完核对插件行是启用状态。需要重启时告诉我,由我自己重启。
|
|
47
49
|
不要手改 profile 的 package.json,不要动其他插件。
|
|
@@ -50,6 +52,30 @@ dsh plugin --profile <profile> add github:kingOfSoySauce/dsh-extra-folders。
|
|
|
50
52
|
|
|
51
53
|
</details>
|
|
52
54
|
|
|
55
|
+
<details>
|
|
56
|
+
<summary><strong>展开更新提示词</strong></summary>
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
请帮我把 dsh-extra-folders 更新到最新版:
|
|
60
|
+
npm 包 dsh-extra-folders@latest(源码 https://github.com/kingOfSoySauce/dsh-extra-folders)
|
|
61
|
+
|
|
62
|
+
先只读确认四件事:宿主是桌面端还是 Web、当前 profile 名、已装版本、npm 上的最新版本。
|
|
63
|
+
已经是最新就直接告诉我,不要重装。
|
|
64
|
+
|
|
65
|
+
桌面端优先用 Plugins → Add plugin 重新添加
|
|
66
|
+
dsh-extra-folders@latest
|
|
67
|
+
如果当前宿主提供了插件管理工具,也可以执行
|
|
68
|
+
dsh plugin --profile <profile> add dsh-extra-folders@latest。
|
|
69
|
+
|
|
70
|
+
更新完核对插件行是启用状态。需要重启时告诉我,由我自己重启。
|
|
71
|
+
不要手改 profile 的 package.json,不要动其他插件。
|
|
72
|
+
更新后带我到侧栏工作区行的更多菜单,确认「添加文件夹」还在,之前加的文件夹也还在。
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
不管用哪种方式,更新后如果版本号没变,在 Plugins 里把插件行关掉再打开。
|
|
78
|
+
|
|
53
79
|
## 使用
|
|
54
80
|
|
|
55
81
|
侧栏工作区行 → 行尾的更多按钮 → **添加文件夹**。
|
|
@@ -58,23 +84,16 @@ dsh plugin --profile <profile> add github:kingOfSoySauce/dsh-extra-folders。
|
|
|
58
84
|
|
|
59
85
|
授权跟着工作区走。子 agent 也算在内,其他工作区的会话看不到这些文件夹。
|
|
60
86
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
| | 本插件 | multi-root-workspace | union-workspace |
|
|
64
|
-
| --- | --- | --- | --- |
|
|
65
|
-
| 注册模型工具 | 不注册 | 不注册 | 注册 5 个 |
|
|
66
|
-
| 改动上游组件 | 只包 `sandboxPolicy.resolve()` | 禁用 fs-sandbox、sandbox 两行,换掉 fs 与 sandbox 实现 | 不替换,另建工具绕开 |
|
|
67
|
-
| 运行时依赖 | 无 | `koffi`、`zod` | 无 |
|
|
68
|
-
| 每目录只读或读写分级 | 没有 | 有 | 没有 |
|
|
69
|
-
| 侧栏管理面板 | 没有 | 有 | 有 |
|
|
70
|
-
| macOS 上 bash 可写附加目录 | 是 | 是 | 否(要 danger-full-access 预设) |
|
|
71
|
-
| 最低 DSH 版本 | 0.2.2-alpha.3 | 0.1.5-rc.2 | 0.1.7-rc.2(按 peer 依赖推断) |
|
|
72
|
-
|
|
73
|
-
这插件只做一件事:把附加目录并进会话的可写范围。不加工具、不换实现、不加依赖,关掉就回到原生行为。
|
|
87
|
+
## 优点
|
|
74
88
|
|
|
75
|
-
|
|
89
|
+
- **原生界面**:弹框和按钮都是官方的,入口在工作区行的更多菜单里。颜色、字体这些全跟宿主走,天然兼容各种外观插件。
|
|
90
|
+
- **不加工具**:模型看到的工具和没装时一样,不影响前缀缓存命中。
|
|
91
|
+
- **零提示词**:插件不往上下文里写东西。提示词和工具说明都没有,连进度提示也不写。DSH 自己的策略说明会跟着目录更新末尾那一条,前面的前缀不动。
|
|
92
|
+
- **不换内核**:没换文件系统,也没换沙箱。只包了权限解析那一个方法,插件一关就回到原生行为。
|
|
93
|
+
- **范围可控**:授权按工作区存,别的工作区看不到;加和删只能从界面点,模型没有扩权入口。
|
|
94
|
+
- **零依赖**:宿主一个文件,界面一个文件,不用构建,也没有第三方包。
|
|
76
95
|
|
|
77
|
-
|
|
96
|
+
怎么授权、状态放哪,见 [设计说明](https://github.com/kingOfSoySauce/dsh-extra-folders/blob/main/DESIGN.md)。不适用的场景也写在那里。
|
|
78
97
|
|
|
79
98
|
## 兼容性
|
|
80
99
|
|
|
@@ -86,17 +105,9 @@ dsh plugin --profile <profile> add github:kingOfSoySauce/dsh-extra-folders。
|
|
|
86
105
|
| Web(`dsh web`) | 代码与桌面端相同,文件夹选择器换成应用内浏览。未实测 |
|
|
87
106
|
| Windows | 只对文件工具生效,沙箱里的 shell 不受影响。这条限制来自 DSH 本身,未实测 |
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
## 更新与卸载
|
|
92
|
-
|
|
93
|
-
更新:拉最新代码,然后在 Plugins 里把插件行关掉再打开。
|
|
94
|
-
|
|
95
|
-
```sh
|
|
96
|
-
cd /绝对路径/dsh-extra-folders && git pull
|
|
97
|
-
```
|
|
108
|
+
宿主启动时会检查内核。不支持就写一条明确日志并退出。
|
|
98
109
|
|
|
99
|
-
|
|
110
|
+
## 卸载
|
|
100
111
|
|
|
101
112
|
```sh
|
|
102
113
|
dsh plugin --profile desktop remove dsh-extra-folders
|
|
Binary file
|
package/assets/dialog.png
CHANGED
|
Binary file
|
package/assets/menu.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-extra-folders",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Attach extra writable folders to one workspace, granted per session, not profile-wide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"cordis.patch.yml",
|
|
38
38
|
"locale/*.json",
|
|
39
39
|
"icon.svg",
|
|
40
|
+
"assets/approval.png",
|
|
40
41
|
"assets/menu.png",
|
|
41
42
|
"assets/dialog.png",
|
|
42
43
|
"README.md",
|