dsh-ops 0.2.3 → 0.2.5-beta.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/CHANGELOG.md +18 -0
- package/PROVENANCE.md +24 -0
- package/README.en.md +51 -9
- package/README.md +36 -11
- package/README.zh.md +36 -11
- package/cordis.patch.yml +27 -155
- package/docs/auto-compact.md +102 -0
- package/docs/manual-validation.md +10 -5
- package/docs/schema-current.json +20 -13
- package/docs/schema-measurement.md +29 -9
- package/dsh-plugin.json +40 -7
- package/lib/components/background/icon.png +0 -0
- package/lib/components/background/index.js +3 -0
- package/lib/components/background/locale/en.json +6 -0
- package/lib/components/background/locale/zh.json +6 -0
- package/lib/components/background/package.json +6 -0
- package/lib/components/file/icon.png +0 -0
- package/lib/components/file/index.js +3 -0
- package/lib/components/file/locale/en.json +6 -0
- package/lib/components/file/locale/zh.json +6 -0
- package/lib/components/file/package.json +6 -0
- package/lib/components/shell/icon.png +0 -0
- package/lib/components/shell/index.js +3 -0
- package/lib/components/shell/locale/en.json +6 -0
- package/lib/components/shell/locale/zh.json +6 -0
- package/lib/components/shell/package.json +6 -0
- package/lib/index.js +46 -32
- package/lib/policy.js +16 -8
- package/lib/profile-install.js +1 -1
- package/lib/runtime-pool.js +42 -0
- package/lib/session-pwsh.js +31 -0
- package/lib/tools.js +64 -16
- package/node_modules/@dsh-ops/auto-compact/LICENSE +30 -0
- package/node_modules/@dsh-ops/auto-compact/README.md +23 -0
- package/node_modules/@dsh-ops/auto-compact/lib/client.js +79 -0
- package/node_modules/@dsh-ops/auto-compact/lib/config.js +60 -0
- package/node_modules/@dsh-ops/auto-compact/lib/index.js +132 -0
- package/node_modules/@dsh-ops/auto-compact/locale/en.json +6 -0
- package/node_modules/@dsh-ops/auto-compact/locale/zh.json +6 -0
- package/node_modules/@dsh-ops/auto-compact/package.json +31 -0
- package/package.json +27 -4
- package/packages/README.md +87 -0
- package/packages/auto-compact/LICENSE +30 -0
- package/packages/auto-compact/README.md +23 -0
- package/packages/auto-compact/lib/client.js +79 -0
- package/packages/auto-compact/lib/config.js +60 -0
- package/packages/auto-compact/lib/index.js +132 -0
- package/packages/auto-compact/locale/en.json +6 -0
- package/packages/auto-compact/locale/zh.json +6 -0
- package/packages/auto-compact/package.json +31 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ All notable changes to this package are recorded here.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
6
6
|
this package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.5-beta.1] — Automatic context compaction (prerelease candidate)
|
|
9
|
+
|
|
10
|
+
- Add the fourth independent marketplace row, `@dsh-ops/auto-compact`, enabled by default; background remains opt-in. Bundle its internal companion package with dsh-ops so rc.2 discovers its browser face through a package-root row, with no separate publishing requirement.
|
|
11
|
+
- Add a settings control on this row in the existing Plugins component region: live threshold (50%), cooldown (120 seconds) and compaction deadline (120 seconds), with revision-fenced profile writes and restore defaults.
|
|
12
|
+
- Use the Web context-pressure projection and the same public `compactNow` API as `/compact`, only after a non-cancelled turn becomes idle; do not publish a model-callable compaction tool or modify the host's own automatic policy.
|
|
13
|
+
- Serialize this component's compactions, suppress unchanged surfaces and self-generated replacements, back off failures, suspend sessions after commit/persistence failures, and abort/drain owned work on disable.
|
|
14
|
+
- Keep host activation free of host value imports: a dependency-free Standard Schema descriptor and a scoped update hook retain validated live references. No Schemastery vendor impersonation.
|
|
15
|
+
- Add targeted safety/lifecycle/schema/browser-registration regressions. Full historical gates still contain stale pre-0.2.4 expectations; no claim of a fully green legacy suite or live Desktop acceptance.
|
|
16
|
+
|
|
17
|
+
## [0.2.4] — Independently toggled components
|
|
18
|
+
|
|
19
|
+
- Split the market bundle into shell (on), file (on), and background (off) rows with exported per-component titles, descriptions, icons and locales.
|
|
20
|
+
- Publish five tools by default, nine with background enabled. Stop publishing duplicate foreground ops_run. Preserve the bash/PowerShell 7 routing and the object-root bash schema.
|
|
21
|
+
- Own separate prompt sections for each component; visibility and shutdown withdraw only the matching guidance/tools. Do not append to AGENTS.md.
|
|
22
|
+
- Share one ref-counted plugin-owned FastCtx connection for file/background. Drain in-flight calls and attempt to kill only remembered owned jobs when background stops; report cleanup failures.
|
|
23
|
+
- Replace the unconditional bundle pwshPath override with a runtime-only official config lifecycle overlay; shell OFF recomputes the executor's current owning raw config without persisting changes.
|
|
24
|
+
- Document release-age version selection and the limits of token savings. No host/vendor implementation, old regression suite, or Actions changes.
|
|
25
|
+
|
|
8
26
|
## [0.2.3] — Strict-argument guidance and display metadata
|
|
9
27
|
|
|
10
28
|
- Add one routing-section reminder: `ops_* arguments are strict: pass only declared fields.` Keep FastCtx's portable schema subset and runtime guards unchanged.
|
package/PROVENANCE.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
What this repository is, where its parts came from, what was verified, and what
|
|
4
4
|
was not.
|
|
5
5
|
|
|
6
|
+
## 0.2.4 Component lifecycle
|
|
7
|
+
|
|
8
|
+
Three exported subpath plugins replace the single bundle row: shell/file on by
|
|
9
|
+
default, background off. Each owns its registrations and system-prompt section;
|
|
10
|
+
file and background lease one plugin-owned MCP connection scoped to the Cordis root.
|
|
11
|
+
No global host registry or service methods are replaced. Foreground ops_run is no
|
|
12
|
+
longer published. Background shutdown drains tracked calls, attempts to kill only
|
|
13
|
+
remembered job IDs, then releases its connection lease; disconnect can still lose
|
|
14
|
+
ownership, so cleanup is not guaranteed for unknown durable jobs.
|
|
15
|
+
|
|
16
|
+
The unconditional pwsh-sandbox patch is removed. Shell mounts an internal/config
|
|
17
|
+
waterfall hook targeted at the official pwsh-sandbox row, then uses public
|
|
18
|
+
Fiber.update(rawConfig, true) to apply/revoke the temporary path via the official
|
|
19
|
+
config lifecycle (noSave). Removing the hook recomputes from the latest owning raw
|
|
20
|
+
config, not a stale saved copy. It does not mutate a service/config reference, write
|
|
21
|
+
profile files, change OS defaults or cancel existing host shell processes. An
|
|
22
|
+
isolated real Cordis/ToolRuntime inspection verified independent tool/prompt
|
|
23
|
+
withdrawal, permission-gated commands, shared-client leases, and config restoration
|
|
24
|
+
with a stand-in executor. Real desktop marketplace toggles and the real sandbox
|
|
25
|
+
executor require user validation; no model requests/old suites were run.
|
|
26
|
+
|
|
27
|
+
Default schema bytes drop from 10,700 (0.2.3 ten tools) to 7,685 (five tools).
|
|
28
|
+
This is a byte metric, not a tokenizer or proof of lower whole-task usage.
|
|
29
|
+
|
|
6
30
|
## 0.2.3 Prompt and display update
|
|
7
31
|
|
|
8
32
|
Add one model-facing sentence in `lib/policy.js`: `ops_* arguments are strict:
|
package/README.en.md
CHANGED
|
@@ -8,6 +8,16 @@ Routing: **file tools → bash → PowerShell 7**. Prefer bash for general comma
|
|
|
8
8
|
use pwsh only for necessary Windows-native operations. Fix bash errors in bash.
|
|
9
9
|
Windows x64 only; target DSH `0.2.0-rc.2`. [中文](README.md)
|
|
10
10
|
|
|
11
|
+
## Beta candidate
|
|
12
|
+
|
|
13
|
+
`0.2.5-beta.1` adds the fourth component and its row configuration page. It is
|
|
14
|
+
intended for the npm `beta` tag, without changing `latest`. Registry metadata is
|
|
15
|
+
the authority for publication status. Once published, explicitly install
|
|
16
|
+
`dsh-ops@0.2.5-beta.1` from the official npm registry. Exact version selection does
|
|
17
|
+
not bypass pnpm's minimum release age: wait or narrowly exempt this version,
|
|
18
|
+
never delete the lockfile or disable global policy. Fully quit/restart the app
|
|
19
|
+
and verify the installed main version and four components.
|
|
20
|
+
|
|
11
21
|
## Install, update and remove
|
|
12
22
|
|
|
13
23
|
In the official marketplace, enter **`dsh-ops`**, install, then enable. This installs
|
|
@@ -41,10 +51,12 @@ dsh plugin --profile dsh-tui add dsh-ops
|
|
|
41
51
|
Update by repeating the npx install command, or official `add dsh-ops@latest`.
|
|
42
52
|
Reload/restart as the application requests; replacing loaded code may require restart.
|
|
43
53
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
Version `0.2.4` adds three independently toggled components and retains the bash
|
|
55
|
+
object-root schema fix and custom icon. Runtime dependencies remain at `0.2.1` and
|
|
56
|
+
install automatically. Desktop pnpm's 24-hour release-age policy may show new metadata
|
|
57
|
+
but select an older package for a bare name: specify `dsh-ops@0.2.4` from the official
|
|
58
|
+
npm registry, confirm the installed version, then fully quit/restart. See the original
|
|
59
|
+
[payload release record](docs/release-0.2.1.md).
|
|
48
60
|
|
|
49
61
|
```console
|
|
50
62
|
npx --yes dsh-ops@latest status --profile desktop
|
|
@@ -56,11 +68,42 @@ also remove profile dependency references. Runtime files are package dependencie
|
|
|
56
68
|
not a new shared provisioned directory. System shells, other profiles and package
|
|
57
69
|
manager caches are never manually deleted. Clean legacy provisioned files separately
|
|
58
70
|
with `npx --yes dsh-ops@latest uninstall --yes`; `~/.fastctx/` is kept unless
|
|
59
|
-
`--purge-fastctx` is explicit.
|
|
71
|
+
`--purge-fastctx` is explicit. Background OFF drains in-flight calls and attempts to
|
|
72
|
+
kill only jobs remembered by this component on its current connection; failures warn.
|
|
73
|
+
Lost ownership after disconnect and permission downgrade do not guarantee termination.
|
|
74
|
+
|
|
75
|
+
## Components and prompts
|
|
76
|
+
|
|
77
|
+
| Component | Default | Capability |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| dsh-ops-bash & powershell 7 | On | Prefer ops_bash for general commands; bundled PowerShell 7 for Windows-native work |
|
|
80
|
+
| dsh-ops-file | On | Rust batch reads, search, path discovery and replacement |
|
|
81
|
+
| dsh-ops-background | Off | Scientific simulations, model training and other long-running tasks |
|
|
82
|
+
| Automatic context compaction | On | Idle-only host /compact service above a configurable Web context threshold; no additional model-facing tool |
|
|
83
|
+
|
|
84
|
+
Each row owns its tools and runtime prompt section; OFF withdraws both. Nothing is
|
|
85
|
+
appended to AGENTS.md. Shell ON adds a runtime-only configuration overlay for the
|
|
86
|
+
stock pwsh-sandbox path; OFF recomputes its latest owning raw configuration via the
|
|
87
|
+
official lifecycle, without writing profile files. It does not change the OS default
|
|
88
|
+
terminal or cancel already-running host commands. File/background share one owned
|
|
89
|
+
FastCtx connection; turning one off does not stop the other. Default tool count is
|
|
90
|
+
five; duplicate ops_run is no longer published. Reduced fixed schema cost is not a
|
|
91
|
+
promise of lower task-total tokens. Minimal's complete persona excludes extra sections;
|
|
92
|
+
PTC invokes the tools through its generated SDK with unchanged permission checks.
|
|
60
93
|
|
|
61
94
|
## Configuration and tools
|
|
62
95
|
|
|
63
|
-
|
|
96
|
+
**Beta candidate feature:** the fourth row's configuration control is in
|
|
97
|
+
Plugins → dsh-ops → Included components. Configure the threshold (default **50%**),
|
|
98
|
+
cooldown (120 seconds) and timeout (120 seconds). The policy uses the Web meter,
|
|
99
|
+
requires strictly more than the threshold, and waits for a non-cancelled idle turn.
|
|
100
|
+
It uses revision-fenced host profile persistence and does not interrupt active tools.
|
|
101
|
+
Summarization may call your model and incur cost. Disabling aborts/drains only owned
|
|
102
|
+
compaction. Installed npm `0.2.4` does not yet include this feature. See
|
|
103
|
+
[safety boundaries and validation](docs/auto-compact.md).
|
|
104
|
+
|
|
105
|
+
Edit the corresponding dsh-ops/shell, dsh-ops/file or dsh-ops/background row's config.
|
|
106
|
+
Unknown keys fail; normal component enablement is available in the marketplace.
|
|
64
107
|
|
|
65
108
|
```yaml
|
|
66
109
|
config:
|
|
@@ -75,8 +118,8 @@ config:
|
|
|
75
118
|
# bashPath: 'C:\tools\bash.exe'
|
|
76
119
|
```
|
|
77
120
|
|
|
78
|
-
`enableShellTools` controls the
|
|
79
|
-
bash. Both additionally require authoritative session `danger-full-access`; bash
|
|
121
|
+
`enableShellTools` controls the background component's four run/job tools; file never
|
|
122
|
+
publishes commands. `publishBashTool` controls bash. Both additionally require authoritative session `danger-full-access`; bash
|
|
80
123
|
also requires the host subprocess service. `promptPolicy` controls compact routing;
|
|
81
124
|
`extraGuidance` appends text. RPC wait timeout does not prove server termination.
|
|
82
125
|
`required` fails activation on unavailable runtime. Explicit binary/bash paths are
|
|
@@ -90,7 +133,6 @@ authoritative. `shellPolicy: deny-host-shell` blocks `deniedHostTools` (default
|
|
|
90
133
|
| ops_glob | Multiple path patterns and exclusions | No command gate¹ |
|
|
91
134
|
| ops_replace | Mechanical cross-file replacement; host edit for precise edits | No command gate¹ |
|
|
92
135
|
| ops_bash | Preferred general bash executor | Required |
|
|
93
|
-
| ops_run | Bounded bash result | Required |
|
|
94
136
|
| ops_run_background | Start background jobs | Required |
|
|
95
137
|
| ops_job_output / ops_job_list / ops_job_kill | Operate on this session's owned jobs | Required |
|
|
96
138
|
| Host pwsh | Bundled PowerShell 7 Windows-native operations | Host policy |
|
package/README.md
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
# dsh-ops
|
|
2
2
|
|
|
3
|
-
解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token
|
|
3
|
+
解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token、时间和模型注意力浪费。本插件的三个主要功能提供:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。
|
|
7
|
-
- Rust
|
|
5
|
+
- 提供独立 **bash 5.3.15** 并优先使用bash,让你的AI不再和PowerShell打架
|
|
6
|
+
- 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。PowerShell 7 比自带的 PowerShell 5 也有不少优化
|
|
7
|
+
- 一些 Rust 编写的性能更好的,更快的读取、查找、替换工具,加速任务运行,减少不必要的输入输出。由于部分工具不经过 DSH 的受限终端后端,命令与后台任务工具只在**完全权限**时启用。
|
|
8
8
|
|
|
9
9
|
执行顺序:**工具包 → bash → PowerShell 7**。bash 报错在 bash 内修正,不随意换 shell,不混用两套语法。
|
|
10
10
|
|
|
11
11
|
仅支持 **Windows x64**;目标宿主 DSH `0.2.0-rc.2`。[English](README.en.md)
|
|
12
12
|
|
|
13
|
+
## Beta 测试版候选
|
|
14
|
+
|
|
15
|
+
`0.2.5-beta.1` 增加「上下文自动压缩」及其组件配置入口,默认阈值 50%。它仅计划发布到 npm 的 `beta` 标签;`latest` 保持正式版,不自动给普通用户升级。发布状态以 registry 查询为准,发布前不能据此认定包已在线。
|
|
16
|
+
|
|
17
|
+
发布后在插件市场指定 **`dsh-ops@0.2.5-beta.1`**、选择 npm 官方源。精确指定版本**不会绕过** pnpm 的发布冷却策略;如被拦截,应等待冷却期结束或由用户对该精确版本设置豁免,不删除锁文件、不关闭全局供应链检查。安装后完全退出并重启应用,确认主包版本与四个组件。
|
|
18
|
+
|
|
13
19
|
## 安装、更新、卸载
|
|
14
20
|
|
|
15
21
|
### 官方插件市场
|
|
16
22
|
|
|
17
|
-
在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
|
|
23
|
+
在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops@0.2.4`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
|
|
24
|
+
|
|
25
|
+
注:新发布版本暂时明确写 dsh-ops@0.2.4,避免 pnpm 安全冷却期使裸包名选择旧版本。
|
|
18
26
|
|
|
19
27
|
### npm 一键安装
|
|
20
28
|
|
|
@@ -40,7 +48,7 @@ dsh plugin --profile dsh-tui add dsh-ops
|
|
|
40
48
|
|
|
41
49
|
**更新**:重新运行相同的 `npx --yes dsh-ops@latest install --profile ...`,或用官方 CLI `add dsh-ops@latest`。按应用提示重载;替换已加载代码时重启应用。
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
当前版本 `0.2.4` 支持三个独立组件;bash 参数 schema 修复和自定义图标保留。三个二进制依赖继续使用 `0.2.1`,它们会自动安装,不影响主插件版本。新发布版本可能受桌面 pnpm 的 24 小时安全冷却策略影响:如果市场分析版号与安装结果不一致,指定 `dsh-ops@0.2.4` 并选择 npm 官方源,确认实际版本后完全退出并重启。原始载荷记录见 [docs/release-0.2.1.md](docs/release-0.2.1.md)。
|
|
44
52
|
|
|
45
53
|
**卸载与查看状态**:
|
|
46
54
|
|
|
@@ -51,14 +59,32 @@ npx --yes dsh-ops@latest uninstall --profile desktop
|
|
|
51
59
|
|
|
52
60
|
把 `desktop` 换成 `web` 或 `tui` 即可。也可在市场卸载,或执行官方 `dsh plugin --profile ... remove dsh-ops`。二进制随 profile 的插件依赖管理;卸载移除依赖引用,不误删系统 shell、其它 profile 的副本或包管理器共享缓存。
|
|
53
61
|
|
|
54
|
-
旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx
|
|
62
|
+
旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx`。关闭后台组件会等待已发出的调用,然后尝试终止该组件当前连接记住的自有任务;失败会告警。断线丢失归属的旧任务及单纯降权不保证终止,先处理自己的任务。
|
|
63
|
+
|
|
64
|
+
## 组件开关与提示词
|
|
65
|
+
|
|
66
|
+
官方市场显示四个组件,分别启停,首次安装默认开启 shell、file 和自动压缩:
|
|
67
|
+
|
|
68
|
+
| 组件 | 介绍 | 默认 | 发布的工具 |
|
|
69
|
+
| --- | --- | --- | --- |
|
|
70
|
+
| `dsh-ops-bash & powershell 7` | 将默认终端改为bash,以及bash覆盖不到时提供powershell7 | 开 | `ops_bash`;宿主 `pwsh` 使用随包 PowerShell 7 |
|
|
71
|
+
| `dsh-ops-file` | 更快、更高性能、输出更精简更省token的rust文件检索 | 开 | 四个文件工具 |
|
|
72
|
+
| `dsh-ops-background` | 为科研仿真、模型训练及其他长进程后台任务提供托管 | 关 | 启动、输出、列出、终止后台任务 |
|
|
73
|
+
| `上下文自动压缩` | Web 占用高于可设置阈值时,空闲后调用宿主 `/compact` 服务 | 开 | 自动策略,不新增模型工具 |
|
|
74
|
+
|
|
75
|
+
“默认终端改为 bash”指模型提示优先使用 `ops_bash`,**不修改系统默认终端、PATH 或宿主原有 shell 工具名称**。Shell 组件开时,通过官方配置生命周期临时指定 `pwsh-sandbox` 的 PowerShell 7 路径;关时按执行器最新原配置恢复,不写 profile 配置。执行器配置切换不代表取消已在运行的宿主命令。
|
|
76
|
+
|
|
77
|
+
提示词注册为独立运行时段,**不写 AGENTS.md**:Shell 关就撤销 bash/pwsh 路由;文件关就撤销检索说明;后台关就不发布后台工具及自有 job 指导。文件与后台共享一个插件拥有的 FastCtx 连接,关闭其中一个不关闭另一个。默认仅新增五个工具,不发布重复前台 `ops_run`。这些改变减少固定声明成本,**不保证任意任务总 token 降低**。极简预设会覆盖附加 system sections;PTC 模式经 SDK 调用底层工具,权限门不变。
|
|
55
78
|
|
|
56
79
|
## 配置方式与工具列表
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
**Beta 测试版新增组件**:在上面的「包含的组件」中打开「上下文自动压缩」的配置入口,设置阈值(默认 **50%**)、冷却(120 秒)、超时(120 秒)。严格高于阈值、正常会话进入空闲后才触发,不打断运行中的工具;保存使用宿主 profile 持久化和版本冲突检查。压缩可能调用模型并产生费用。关闭组件会取消并等待它自己启动的压缩,不取消用户任务。该组件属于 `0.2.5-beta.1` 测试版候选,已安装的正式版 npm `0.2.4` 不含它;是否已发布请查 npm。详见[安全边界与验证记录](docs/auto-compact.md)。
|
|
82
|
+
|
|
83
|
+
在 DSH 的配置编辑器中找到对应的 `dsh-ops/shell`、`dsh-ops/file` 或 `dsh-ops/background` 行,调整 `config` 后保存;未知配置键会点名报错。也可直接在市场切换组件。主要配置:
|
|
59
84
|
|
|
60
85
|
```yaml
|
|
61
86
|
config:
|
|
87
|
+
# background component only; its market row is disabled by default
|
|
62
88
|
enableShellTools: true
|
|
63
89
|
publishBashTool: true
|
|
64
90
|
promptPolicy: true
|
|
@@ -70,9 +96,9 @@ config:
|
|
|
70
96
|
# bashPath: 'C:\tools\bash.exe'
|
|
71
97
|
```
|
|
72
98
|
|
|
73
|
-
- `enableShellTools
|
|
99
|
+
- `enableShellTools`:后台组件的部署开关,开启仍须会话 `danger-full-access` 才发布四个后台工具;文件组件不发布命令工具。
|
|
74
100
|
- `publishBashTool`:是否发布 `ops_bash`,同样要求完全权限和宿主 subprocess 服务。
|
|
75
|
-
- `promptPolicy
|
|
101
|
+
- `promptPolicy`:是否注入该组件的运行时说明;可用 `extraGuidance` 追加指导。
|
|
76
102
|
- `toolCallTimeoutMs`:FastCtx RPC 等待超时,不代表服务端工作已终止。
|
|
77
103
|
- `required`:运行时不可用时是否拒绝激活。
|
|
78
104
|
- `shellPolicy`:默认 `advise`;`deny-host-shell` 拒绝 `deniedHostTools` 列表中的宿主 shell(默认 `[pwsh, bash, pwsh_persistent]`)。这也会禁用第三层 pwsh,谨慎开启。
|
|
@@ -85,7 +111,6 @@ config:
|
|
|
85
111
|
| `ops_glob` | 多模式找路径,支持排除 | 无命令权限门¹ |
|
|
86
112
|
| `ops_replace` | 跨文件批量替换;精确编辑仍用宿主 edit | 无命令权限门¹ |
|
|
87
113
|
| `ops_bash` | 优先的通用 bash 命令执行器 | 是 |
|
|
88
|
-
| `ops_run` | 有界 bash 命令结果 | 是 |
|
|
89
114
|
| `ops_run_background` | 启动后台任务 | 是 |
|
|
90
115
|
| `ops_job_output` / `ops_job_list` / `ops_job_kill` | 查看、列出、停止当前会话启动的任务 | 是 |
|
|
91
116
|
| 宿主 `pwsh` | 使用随包 PowerShell 7 的 Windows 原生操作 | 沿用宿主策略 |
|
package/README.zh.md
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
# dsh-ops
|
|
2
2
|
|
|
3
|
-
解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token
|
|
3
|
+
解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token、时间和模型注意力浪费。本插件的三个主要功能提供:
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。
|
|
7
|
-
- Rust
|
|
5
|
+
- 提供独立 **bash 5.3.15** 并优先使用bash,让你的AI不再和PowerShell打架
|
|
6
|
+
- 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。PowerShell 7 比自带的 PowerShell 5 也有不少优化
|
|
7
|
+
- 一些 Rust 编写的性能更好的,更快的读取、查找、替换工具,加速任务运行,减少不必要的输入输出。由于部分工具不经过 DSH 的受限终端后端,命令与后台任务工具只在**完全权限**时启用。
|
|
8
8
|
|
|
9
9
|
执行顺序:**工具包 → bash → PowerShell 7**。bash 报错在 bash 内修正,不随意换 shell,不混用两套语法。
|
|
10
10
|
|
|
11
11
|
仅支持 **Windows x64**;目标宿主 DSH `0.2.0-rc.2`。[English](README.en.md)
|
|
12
12
|
|
|
13
|
+
## Beta 测试版候选
|
|
14
|
+
|
|
15
|
+
`0.2.5-beta.1` 增加「上下文自动压缩」及其组件配置入口,默认阈值 50%。它仅计划发布到 npm 的 `beta` 标签;`latest` 保持正式版,不自动给普通用户升级。发布状态以 registry 查询为准,发布前不能据此认定包已在线。
|
|
16
|
+
|
|
17
|
+
发布后在插件市场指定 **`dsh-ops@0.2.5-beta.1`**、选择 npm 官方源。精确指定版本**不会绕过** pnpm 的发布冷却策略;如被拦截,应等待冷却期结束或由用户对该精确版本设置豁免,不删除锁文件、不关闭全局供应链检查。安装后完全退出并重启应用,确认主包版本与四个组件。
|
|
18
|
+
|
|
13
19
|
## 安装、更新、卸载
|
|
14
20
|
|
|
15
21
|
### 官方插件市场
|
|
16
22
|
|
|
17
|
-
在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
|
|
23
|
+
在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops@0.2.4`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
|
|
24
|
+
|
|
25
|
+
注:新发布版本暂时明确写 dsh-ops@0.2.4,避免 pnpm 安全冷却期使裸包名选择旧版本。
|
|
18
26
|
|
|
19
27
|
### npm 一键安装
|
|
20
28
|
|
|
@@ -40,7 +48,7 @@ dsh plugin --profile dsh-tui add dsh-ops
|
|
|
40
48
|
|
|
41
49
|
**更新**:重新运行相同的 `npx --yes dsh-ops@latest install --profile ...`,或用官方 CLI `add dsh-ops@latest`。按应用提示重载;替换已加载代码时重启应用。
|
|
42
50
|
|
|
43
|
-
|
|
51
|
+
当前版本 `0.2.4` 支持三个独立组件;bash 参数 schema 修复和自定义图标保留。三个二进制依赖继续使用 `0.2.1`,它们会自动安装,不影响主插件版本。新发布版本可能受桌面 pnpm 的 24 小时安全冷却策略影响:如果市场分析版号与安装结果不一致,指定 `dsh-ops@0.2.4` 并选择 npm 官方源,确认实际版本后完全退出并重启。原始载荷记录见 [docs/release-0.2.1.md](docs/release-0.2.1.md)。
|
|
44
52
|
|
|
45
53
|
**卸载与查看状态**:
|
|
46
54
|
|
|
@@ -51,14 +59,32 @@ npx --yes dsh-ops@latest uninstall --profile desktop
|
|
|
51
59
|
|
|
52
60
|
把 `desktop` 换成 `web` 或 `tui` 即可。也可在市场卸载,或执行官方 `dsh plugin --profile ... remove dsh-ops`。二进制随 profile 的插件依赖管理;卸载移除依赖引用,不误删系统 shell、其它 profile 的副本或包管理器共享缓存。
|
|
53
61
|
|
|
54
|
-
旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx
|
|
62
|
+
旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx`。关闭后台组件会等待已发出的调用,然后尝试终止该组件当前连接记住的自有任务;失败会告警。断线丢失归属的旧任务及单纯降权不保证终止,先处理自己的任务。
|
|
63
|
+
|
|
64
|
+
## 组件开关与提示词
|
|
65
|
+
|
|
66
|
+
官方市场显示四个组件,分别启停,首次安装默认开启 shell、file 和自动压缩:
|
|
67
|
+
|
|
68
|
+
| 组件 | 介绍 | 默认 | 发布的工具 |
|
|
69
|
+
| --- | --- | --- | --- |
|
|
70
|
+
| `dsh-ops-bash & powershell 7` | 将默认终端改为bash,以及bash覆盖不到时提供powershell7 | 开 | `ops_bash`;宿主 `pwsh` 使用随包 PowerShell 7 |
|
|
71
|
+
| `dsh-ops-file` | 更快、更高性能、输出更精简更省token的rust文件检索 | 开 | 四个文件工具 |
|
|
72
|
+
| `dsh-ops-background` | 为科研仿真、模型训练及其他长进程后台任务提供托管 | 关 | 启动、输出、列出、终止后台任务 |
|
|
73
|
+
| `上下文自动压缩` | Web 占用高于可设置阈值时,空闲后调用宿主 `/compact` 服务 | 开 | 自动策略,不新增模型工具 |
|
|
74
|
+
|
|
75
|
+
“默认终端改为 bash”指模型提示优先使用 `ops_bash`,**不修改系统默认终端、PATH 或宿主原有 shell 工具名称**。Shell 组件开时,通过官方配置生命周期临时指定 `pwsh-sandbox` 的 PowerShell 7 路径;关时按执行器最新原配置恢复,不写 profile 配置。执行器配置切换不代表取消已在运行的宿主命令。
|
|
76
|
+
|
|
77
|
+
提示词注册为独立运行时段,**不写 AGENTS.md**:Shell 关就撤销 bash/pwsh 路由;文件关就撤销检索说明;后台关就不发布后台工具及自有 job 指导。文件与后台共享一个插件拥有的 FastCtx 连接,关闭其中一个不关闭另一个。默认仅新增五个工具,不发布重复前台 `ops_run`。这些改变减少固定声明成本,**不保证任意任务总 token 降低**。极简预设会覆盖附加 system sections;PTC 模式经 SDK 调用底层工具,权限门不变。
|
|
55
78
|
|
|
56
79
|
## 配置方式与工具列表
|
|
57
80
|
|
|
58
|
-
|
|
81
|
+
**Beta 测试版新增组件**:在上面的「包含的组件」中打开「上下文自动压缩」的配置入口,设置阈值(默认 **50%**)、冷却(120 秒)、超时(120 秒)。严格高于阈值、正常会话进入空闲后才触发,不打断运行中的工具;保存使用宿主 profile 持久化和版本冲突检查。压缩可能调用模型并产生费用。关闭组件会取消并等待它自己启动的压缩,不取消用户任务。该组件属于 `0.2.5-beta.1` 测试版候选,已安装的正式版 npm `0.2.4` 不含它;是否已发布请查 npm。详见[安全边界与验证记录](docs/auto-compact.md)。
|
|
82
|
+
|
|
83
|
+
在 DSH 的配置编辑器中找到对应的 `dsh-ops/shell`、`dsh-ops/file` 或 `dsh-ops/background` 行,调整 `config` 后保存;未知配置键会点名报错。也可直接在市场切换组件。主要配置:
|
|
59
84
|
|
|
60
85
|
```yaml
|
|
61
86
|
config:
|
|
87
|
+
# background component only; its market row is disabled by default
|
|
62
88
|
enableShellTools: true
|
|
63
89
|
publishBashTool: true
|
|
64
90
|
promptPolicy: true
|
|
@@ -70,9 +96,9 @@ config:
|
|
|
70
96
|
# bashPath: 'C:\tools\bash.exe'
|
|
71
97
|
```
|
|
72
98
|
|
|
73
|
-
- `enableShellTools
|
|
99
|
+
- `enableShellTools`:后台组件的部署开关,开启仍须会话 `danger-full-access` 才发布四个后台工具;文件组件不发布命令工具。
|
|
74
100
|
- `publishBashTool`:是否发布 `ops_bash`,同样要求完全权限和宿主 subprocess 服务。
|
|
75
|
-
- `promptPolicy
|
|
101
|
+
- `promptPolicy`:是否注入该组件的运行时说明;可用 `extraGuidance` 追加指导。
|
|
76
102
|
- `toolCallTimeoutMs`:FastCtx RPC 等待超时,不代表服务端工作已终止。
|
|
77
103
|
- `required`:运行时不可用时是否拒绝激活。
|
|
78
104
|
- `shellPolicy`:默认 `advise`;`deny-host-shell` 拒绝 `deniedHostTools` 列表中的宿主 shell(默认 `[pwsh, bash, pwsh_persistent]`)。这也会禁用第三层 pwsh,谨慎开启。
|
|
@@ -85,7 +111,6 @@ config:
|
|
|
85
111
|
| `ops_glob` | 多模式找路径,支持排除 | 无命令权限门¹ |
|
|
86
112
|
| `ops_replace` | 跨文件批量替换;精确编辑仍用宿主 edit | 无命令权限门¹ |
|
|
87
113
|
| `ops_bash` | 优先的通用 bash 命令执行器 | 是 |
|
|
88
|
-
| `ops_run` | 有界 bash 命令结果 | 是 |
|
|
89
114
|
| `ops_run_background` | 启动后台任务 | 是 |
|
|
90
115
|
| `ops_job_output` / `ops_job_list` / `ops_job_kill` | 查看、列出、停止当前会话启动的任务 | 是 |
|
|
91
116
|
| 宿主 `pwsh` | 使用随包 PowerShell 7 的 Windows 原生操作 | 沿用宿主策略 |
|
package/cordis.patch.yml
CHANGED
|
@@ -1,160 +1,32 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
# This is the plugin's "mount declaration". DSH applies every bundle patch in
|
|
5
|
-
# the profile's `dsh.profile.bundles` order at startup; this file inserts the
|
|
6
|
-
# dsh-ops row into that tree.
|
|
7
|
-
#
|
|
8
|
-
# Install:
|
|
9
|
-
# dsh plugin --profile desktop add <path to this package>
|
|
10
|
-
# dsh plugin --profile web add <path to this package>
|
|
11
|
-
#
|
|
12
|
-
# The row's config is validated by lib/config.js; every key below is optional
|
|
13
|
-
# and the values shown are the defaults. An unknown key fails the plugin at load
|
|
14
|
-
# rather than being ignored.
|
|
15
|
-
# ----------------------------------------------------------------------------
|
|
16
|
-
|
|
1
|
+
# Four independent market components; no unconditional host executor override.
|
|
2
|
+
# Shell, file and idle-only automatic compaction are enabled by default.
|
|
3
|
+
# Background remains explicitly opt-in.
|
|
17
4
|
- insert:
|
|
18
|
-
- id: dsh-ops
|
|
19
|
-
name: dsh-ops
|
|
5
|
+
- id: dsh-ops-shell
|
|
6
|
+
name: dsh-ops/shell
|
|
20
7
|
config:
|
|
21
|
-
# Absolute path to the FastCtx executable. When set, the plugin hosts
|
|
22
|
-
# exactly this file and fails loud if it is unusable.
|
|
23
|
-
# binaryPath: 'C:\path\to\fastctx.exe'
|
|
24
|
-
|
|
25
|
-
# The FastCtx server's own name, used to attribute the server
|
|
26
|
-
# instructions this plugin publishes as a prompt section. The model
|
|
27
|
-
# never sees it: this plugin speaks MCP to the server it spawns itself
|
|
28
|
-
# and registers every tool under its own ops_<tool> name.
|
|
29
|
-
serverName: fastctx
|
|
30
|
-
|
|
31
|
-
# Deployment opt-in only. Command/job tools are published per session
|
|
32
|
-
# only when sandboxPolicy.resolve() reports danger-full-access.
|
|
33
|
-
enableShellTools: true
|
|
34
|
-
|
|
35
|
-
# Per-call deadline for one FastCtx tool call, in milliseconds.
|
|
36
|
-
toolCallTimeoutMs: 300000
|
|
37
|
-
|
|
38
|
-
# Fail plugin activation when the FastCtx server cannot start. Keep
|
|
39
|
-
# false so a missing runtime degrades to "prompt policy only" instead of
|
|
40
|
-
# taking the plugin down.
|
|
41
|
-
required: false
|
|
42
|
-
|
|
43
|
-
# 'advise' — inject the prompt policy only.
|
|
44
|
-
# 'deny-host-shell' — additionally refuse the host shell tools below at
|
|
45
|
-
# the tools/pre-execute gate.
|
|
46
|
-
shellPolicy: advise
|
|
47
|
-
|
|
48
|
-
# Host tool names refused under 'deny-host-shell'.
|
|
49
|
-
deniedHostTools:
|
|
50
|
-
- pwsh
|
|
51
|
-
- bash
|
|
52
|
-
- pwsh_persistent
|
|
53
|
-
|
|
54
|
-
# Inject the repository-tooling prompt section.
|
|
55
8
|
promptPolicy: true
|
|
56
|
-
|
|
57
|
-
# ---- L2: the plugin's own bash -------------------------------------
|
|
58
|
-
# Absolute path to the bash this plugin runs `ops_bash` through. When
|
|
59
|
-
# set, the plugin runs exactly this file and refuses the rung when it is
|
|
60
|
-
# unusable; leave it unset to search the plugin's own bundled copy
|
|
61
|
-
# first, then PATH, then the well-known Git for Windows locations.
|
|
62
|
-
# bashPath: 'C:\Program Files\Git\bin\bash.exe'
|
|
63
|
-
|
|
64
|
-
# Layer 2: preferred executor for general commands, pipelines and scripts.
|
|
65
|
-
# Requires a resolved bash, host subprocess and session full access.
|
|
66
9
|
publishBashTool: true
|
|
67
|
-
|
|
68
|
-
# Fall back to a system-installed bash when the plugin carries no copy
|
|
69
|
-
# of its own. Set false to confine the bash rung to plugin-provided
|
|
70
|
-
# shells. (L3 needs no such switch: whether the host's pwsh row runs
|
|
71
|
-
# the plugin's own pwsh is decided by the executable's presence — see
|
|
72
|
-
# the L3 override below.)
|
|
10
|
+
shellPolicy: advise
|
|
73
11
|
allowSystemShellFallback: true
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# plugin's own probe in `lib/shells.js` (`PWSH_LAYOUT_ORDER`): first the
|
|
96
|
-
# provisioned store, `<DSH_HOME>/dsh-ops/shells/pwsh/<version>/bin/pwsh.exe`
|
|
97
|
-
# (what `dsh-ops provision-shells` installs, and the copy the plugin
|
|
98
|
-
# prefers), then `@dsh-ops/pwsh-<platform>-<arch>` with the shell at
|
|
99
|
-
# `bin/pwsh.exe` (a deployment that installed the platform package), then
|
|
100
|
-
# the vendored `vendor/pwsh/<platform>-<arch>/pwsh.exe` (a checkout that
|
|
101
|
-
# carries its own copy). Keeping the order identical is what makes the
|
|
102
|
-
# ladder's L3 and the host row the same fact rather than two guesses;
|
|
103
|
-
# 3. a `lstat`-based usability test, so a Windows Store execution alias (a
|
|
104
|
-
# symlink whose target is not statable) counts, while a directory named
|
|
105
|
-
# `pwsh.exe` does not — the same rule `resolveShells` applies;
|
|
106
|
-
# 4. a wrapping `try`/`catch` around the whole body, plus a `try` each for the
|
|
107
|
-
# store scan, the plugin-package resolution, and the platform-package
|
|
108
|
-
# resolution: an absent store, an unresolvable package, and a malformed
|
|
109
|
-
# manifest alike may not fail the boot. The store scan sits outside the
|
|
110
|
-
# plugin resolution on purpose — a provisioned copy is an absolute path
|
|
111
|
-
# under `DSH_HOME`, so a profile whose `baseUrl` cannot resolve `dsh-ops`
|
|
112
|
-
# still gets it rather than losing the rung.
|
|
113
|
-
#
|
|
114
|
-
# The store scan picks the greatest version name that holds the executable —
|
|
115
|
-
# the identical comparison `provisionedShell` makes in `lib/shells.js`, which is
|
|
116
|
-
# why it is one expression rather than a version list repeated here. The store's
|
|
117
|
-
# root mirrors `dshHome` there too: `DSH_HOME` when the deployment names one,
|
|
118
|
-
# `~/.dsh` otherwise.
|
|
119
|
-
#
|
|
120
|
-
# Until one of those three places actually carries the executable, the
|
|
121
|
-
# expression yields `undefined` and the host row is left completely untouched.
|
|
122
|
-
#
|
|
123
|
-
# "Installed means used" is the point of the rung: a deployment that carries
|
|
124
|
-
# the plugin's pwsh 7 wants the host's pwsh tool to run it, not the machine's.
|
|
125
|
-
# A deployment that does NOT want this rewrite removes or edits this patch
|
|
126
|
-
# entry in its OWN profile `cordis.patch.yml` — that layer applies after every
|
|
127
|
-
# bundle layer (docs/user/develop/basic/publish.md:118-130), so it has the last
|
|
128
|
-
# word. There is deliberately no plugin config key for it: a bundle patch is
|
|
129
|
-
# evaluated before any dsh-ops row is mounted (the Loader defers a row's `!!js`
|
|
130
|
-
# interpolation until that row's own injections are active), so a config key
|
|
131
|
-
# could not reach this expression, and a key that pretends to is a ladder that
|
|
132
|
-
# lies about the row it never changed.
|
|
133
|
-
#
|
|
134
|
-
# `!!js` SCOPE, VERIFIED IN THE VENDORED LOADER. The Loader evaluates these
|
|
135
|
-
# expressions as `with (ctx) { return eval(expr) }`
|
|
136
|
-
# (vendor/loader/src/config/utils.ts:5-9), so bare `baseUrl` (the owning config
|
|
137
|
-
# tree's base URL) and `ctx` are both in scope — the same convention the shipped
|
|
138
|
-
# bundle uses at packages/bundle/web-app/presets/cordis.patch.yml:147.
|
|
139
|
-
# `dsh-ops` is a dependency of the profile, so
|
|
140
|
-
# `createRequire(baseUrl).resolve('dsh-ops/package.json')` finds the package
|
|
141
|
-
# whether it was installed as a link or from the registry.
|
|
142
|
-
#
|
|
143
|
-
# WHOLE-OBJECT REPLACEMENT — AUDITED, NOT ASSUMED. A patch replaces the target
|
|
144
|
-
# row's ENTIRE `config` object rather than deep-merging it
|
|
145
|
-
# (docs/user/develop/basic/publish.md:129), so every non-default field of the
|
|
146
|
-
# target must be restated here. The base row this targets is
|
|
147
|
-
# packages/bundle/base/cordis.patch.yml:241-243:
|
|
148
|
-
#
|
|
149
|
-
# - id: pwsh-sandbox
|
|
150
|
-
# name: '@deepseek-ai/dsh-pwsh-sandbox'
|
|
151
|
-
# disabled: !!js process.platform !== 'win32'
|
|
152
|
-
#
|
|
153
|
-
# It declares NO `config` at all, and this patch writes only `config` (the
|
|
154
|
-
# row's `name` and its platform `disabled` gate are untouched), so there is no
|
|
155
|
-
# non-default field to restate and nothing is silently dropped. If the base row
|
|
156
|
-
# ever gains one, it must be restated here.
|
|
157
|
-
# ----------------------------------------------------------------------------
|
|
158
|
-
- id: pwsh-sandbox
|
|
159
|
-
config:
|
|
160
|
-
pwshPath: !!js "(() => { if (process.platform !== 'win32') return undefined; try { const builtin = (name) => process.getBuiltinModule(name); const fs = builtin('node:fs'); const nodePath = builtin('node:path'); const win = process.platform + '-' + process.arch; const usable = (file) => { try { const stat = fs.lstatSync(file); return stat.isFile() || stat.isSymbolicLink(); } catch { return false; } }; const named = process.env.DSH_HOME; const home = typeof named === 'string' && named.trim() !== '' ? nodePath.resolve(named) : nodePath.join(builtin('node:os').homedir(), '.dsh'); const layouts = []; try { const store = nodePath.join(home, 'dsh-ops', 'shells', 'pwsh'); const versions = fs.readdirSync(store, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort().reverse(); for (const version of versions) layouts.push(nodePath.join(store, version, 'bin', 'pwsh.exe')); } catch {} try { const requires = builtin('node:module').createRequire(String(baseUrl).replace(/[^/]*$/, 'noop.json')); const dir = nodePath.dirname(requires.resolve('dsh-ops/package.json')); try { const pluginRequire = builtin('node:module').createRequire(nodePath.join(dir, 'package.json')); const pkg = nodePath.dirname(pluginRequire.resolve('@dsh-ops/pwsh-' + win + '/package.json')); layouts.push(nodePath.join(pkg, 'bin', 'pwsh.exe')); } catch {} layouts.push(nodePath.join(dir, 'vendor', 'pwsh', win, 'pwsh.exe')); } catch {} for (const candidate of layouts) { if (usable(candidate)) return candidate; } return undefined; } catch { return undefined; } })()"
|
|
12
|
+
- id: dsh-ops-file
|
|
13
|
+
name: dsh-ops/file
|
|
14
|
+
config:
|
|
15
|
+
promptPolicy: true
|
|
16
|
+
enableShellTools: false
|
|
17
|
+
required: false
|
|
18
|
+
toolCallTimeoutMs: 300000
|
|
19
|
+
- id: dsh-ops-background
|
|
20
|
+
name: dsh-ops/background
|
|
21
|
+
disabled: true
|
|
22
|
+
config:
|
|
23
|
+
promptPolicy: true
|
|
24
|
+
enableShellTools: true
|
|
25
|
+
required: false
|
|
26
|
+
toolCallTimeoutMs: 300000
|
|
27
|
+
- id: dsh-ops-auto-compact
|
|
28
|
+
name: '@dsh-ops/auto-compact'
|
|
29
|
+
config:
|
|
30
|
+
thresholdPercent: 50
|
|
31
|
+
cooldownSeconds: 120
|
|
32
|
+
timeoutSeconds: 120
|