dsh-ops 0.0.0-stage → 0.2.2

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/LICENSE +30 -0
  3. package/NOTICE +106 -0
  4. package/PROVENANCE.md +435 -0
  5. package/README.en.md +126 -0
  6. package/README.md +115 -2
  7. package/README.zh.md +116 -0
  8. package/bin/dsh-ops.mjs +1216 -0
  9. package/cordis.patch.yml +160 -0
  10. package/docs/manual-validation.md +53 -0
  11. package/docs/release-0.2.1.md +72 -0
  12. package/docs/schema-baseline.json +64 -0
  13. package/docs/schema-current.json +84 -0
  14. package/docs/schema-measurement.md +17 -0
  15. package/dsh-plugin.json +88 -0
  16. package/icon.svg +12 -0
  17. package/lib/binary.js +409 -0
  18. package/lib/config.js +198 -0
  19. package/lib/handshake.js +252 -0
  20. package/lib/index.js +108 -0
  21. package/lib/jobs.js +42 -0
  22. package/lib/policy.js +64 -0
  23. package/lib/presentation.js +63 -0
  24. package/lib/profile-install.js +61 -0
  25. package/lib/rust.js +194 -0
  26. package/lib/session-shells.js +78 -0
  27. package/lib/shells.js +998 -0
  28. package/lib/tools.js +657 -0
  29. package/locale/en.json +6 -0
  30. package/locale/zh.json +6 -0
  31. package/package.json +114 -4
  32. package/vendor/fastctx/Cargo.lock +3210 -0
  33. package/vendor/fastctx/Cargo.toml +94 -0
  34. package/vendor/fastctx/FORK.md +119 -0
  35. package/vendor/fastctx/LICENSE-APACHE +201 -0
  36. package/vendor/fastctx/NOTICE +40 -0
  37. package/vendor/fastctx/README.md +439 -0
  38. package/vendor/fastctx/THIRD_PARTY_LICENSES.md +17 -0
  39. package/vendor/fastctx/THIRD_PARTY_LICENSES_RUST.md +7914 -0
  40. package/vendor/fastctx/UPSTREAM.md +49 -0
  41. package/vendor/fastctx/build.rs +413 -0
  42. package/vendor/fastctx/src/background_status.rs +403 -0
  43. package/vendor/fastctx/src/binary.rs +75 -0
  44. package/vendor/fastctx/src/bounded_sort.rs +500 -0
  45. package/vendor/fastctx/src/budget.rs +781 -0
  46. package/vendor/fastctx/src/cli/mod.rs +110 -0
  47. package/vendor/fastctx/src/context_guard.rs +289 -0
  48. package/vendor/fastctx/src/control/mod.rs +6 -0
  49. package/vendor/fastctx/src/control/paths.rs +49 -0
  50. package/vendor/fastctx/src/control/settings.rs +753 -0
  51. package/vendor/fastctx/src/control/transaction.rs +531 -0
  52. package/vendor/fastctx/src/edit/document.rs +535 -0
  53. package/vendor/fastctx/src/edit/locks.rs +371 -0
  54. package/vendor/fastctx/src/edit/mod.rs +213 -0
  55. package/vendor/fastctx/src/edit/private_storage/unix.rs +315 -0
  56. package/vendor/fastctx/src/edit/private_storage/windows.rs +793 -0
  57. package/vendor/fastctx/src/edit/private_storage.rs +234 -0
  58. package/vendor/fastctx/src/edit/replace.rs +1030 -0
  59. package/vendor/fastctx/src/edit_server.rs +53 -0
  60. package/vendor/fastctx/src/encoding/reference_v011.rs +587 -0
  61. package/vendor/fastctx/src/encoding/snapshot_pipeline.rs +1678 -0
  62. package/vendor/fastctx/src/encoding.rs +1118 -0
  63. package/vendor/fastctx/src/file_executor.rs +1151 -0
  64. package/vendor/fastctx/src/file_snapshot.rs +1491 -0
  65. package/vendor/fastctx/src/glob_filter.rs +98 -0
  66. package/vendor/fastctx/src/glob_tool.rs +653 -0
  67. package/vendor/fastctx/src/grep_sink.rs +1162 -0
  68. package/vendor/fastctx/src/grep_tool.rs +2449 -0
  69. package/vendor/fastctx/src/lib.rs +45 -0
  70. package/vendor/fastctx/src/main.rs +15 -0
  71. package/vendor/fastctx/src/model.rs +51 -0
  72. package/vendor/fastctx/src/model_guidance.rs +62 -0
  73. package/vendor/fastctx/src/operation.rs +356 -0
  74. package/vendor/fastctx/src/ordered_window.rs +1235 -0
  75. package/vendor/fastctx/src/os_environment.rs +414 -0
  76. package/vendor/fastctx/src/path_codec.rs +850 -0
  77. package/vendor/fastctx/src/paths.rs +244 -0
  78. package/vendor/fastctx/src/process_identity.rs +763 -0
  79. package/vendor/fastctx/src/process_policy.rs +74 -0
  80. package/vendor/fastctx/src/read_tool/batch.rs +496 -0
  81. package/vendor/fastctx/src/read_tool/hex_file.rs +141 -0
  82. package/vendor/fastctx/src/read_tool/image_file.rs +88 -0
  83. package/vendor/fastctx/src/read_tool/mod.rs +245 -0
  84. package/vendor/fastctx/src/read_tool/pdf.rs +470 -0
  85. package/vendor/fastctx/src/read_tool/pdf_disabled.rs +47 -0
  86. package/vendor/fastctx/src/read_tool/pdf_engine.rs +664 -0
  87. package/vendor/fastctx/src/read_tool/text_file.rs +351 -0
  88. package/vendor/fastctx/src/render_plan.rs +468 -0
  89. package/vendor/fastctx/src/runtime/activity.rs +159 -0
  90. package/vendor/fastctx/src/runtime/hosts.rs +99 -0
  91. package/vendor/fastctx/src/runtime/journal.rs +556 -0
  92. package/vendor/fastctx/src/runtime/local_ipc.rs +186 -0
  93. package/vendor/fastctx/src/runtime/mod.rs +746 -0
  94. package/vendor/fastctx/src/runtime/protocol.rs +296 -0
  95. package/vendor/fastctx/src/runtime/session.rs +536 -0
  96. package/vendor/fastctx/src/runtime/windows_process.rs +66 -0
  97. package/vendor/fastctx/src/search_parallelism.rs +106 -0
  98. package/vendor/fastctx/src/search_text.rs +227 -0
  99. package/vendor/fastctx/src/server.rs +359 -0
  100. package/vendor/fastctx/src/server_manifest.rs +468 -0
  101. package/vendor/fastctx/src/server_support.rs +826 -0
  102. package/vendor/fastctx/src/session.rs +629 -0
  103. package/vendor/fastctx/src/shell/apply_patch_hint.rs +41 -0
  104. package/vendor/fastctx/src/shell/bash.rs +263 -0
  105. package/vendor/fastctx/src/shell/buffer.rs +108 -0
  106. package/vendor/fastctx/src/shell/encoding.rs +403 -0
  107. package/vendor/fastctx/src/shell/foreground.rs +115 -0
  108. package/vendor/fastctx/src/shell/jobs/admission.rs +91 -0
  109. package/vendor/fastctx/src/shell/jobs/background.rs +146 -0
  110. package/vendor/fastctx/src/shell/jobs/host.rs +830 -0
  111. package/vendor/fastctx/src/shell/jobs/identity.rs +29 -0
  112. package/vendor/fastctx/src/shell/jobs/mod.rs +1513 -0
  113. package/vendor/fastctx/src/shell/jobs/model.rs +244 -0
  114. package/vendor/fastctx/src/shell/jobs/output_log.rs +1148 -0
  115. package/vendor/fastctx/src/shell/jobs/store.rs +1300 -0
  116. package/vendor/fastctx/src/shell/mod.rs +345 -0
  117. package/vendor/fastctx/src/shell/normalize.rs +389 -0
  118. package/vendor/fastctx/src/shell/output.rs +406 -0
  119. package/vendor/fastctx/src/shell/process.rs +493 -0
  120. package/vendor/fastctx/src/shell_server.rs +156 -0
  121. package/vendor/fastctx/src/skip_report.rs +83 -0
  122. package/vendor/fastctx/src/stdio_transport.rs +177 -0
  123. package/vendor/fastctx/src/tool_schema.rs +204 -0
  124. package/vendor/fastctx/src/traversal.rs +846 -0
  125. package/vendor/fastctx/third-party/pdfium-7763/LICENSE +9 -0
  126. package/vendor/fastctx/third-party/pdfium-7763/licenses/abseil.txt +202 -0
  127. package/vendor/fastctx/third-party/pdfium-7763/licenses/agg23.txt +14 -0
  128. package/vendor/fastctx/third-party/pdfium-7763/licenses/fast_float.txt +27 -0
  129. package/vendor/fastctx/third-party/pdfium-7763/licenses/freetype.txt +169 -0
  130. package/vendor/fastctx/third-party/pdfium-7763/licenses/icu.txt +542 -0
  131. package/vendor/fastctx/third-party/pdfium-7763/licenses/lcms.txt +27 -0
  132. package/vendor/fastctx/third-party/pdfium-7763/licenses/libjpeg_turbo.ijg +260 -0
  133. package/vendor/fastctx/third-party/pdfium-7763/licenses/libjpeg_turbo.md +135 -0
  134. package/vendor/fastctx/third-party/pdfium-7763/licenses/libopenjpeg.txt +32 -0
  135. package/vendor/fastctx/third-party/pdfium-7763/licenses/libpng.txt +134 -0
  136. package/vendor/fastctx/third-party/pdfium-7763/licenses/libtiff.txt +21 -0
  137. package/vendor/fastctx/third-party/pdfium-7763/licenses/llvm-libc.txt +278 -0
  138. package/vendor/fastctx/third-party/pdfium-7763/licenses/pdfium.txt +230 -0
  139. package/vendor/fastctx/third-party/pdfium-7763/licenses/simdutf.txt +18 -0
  140. package/vendor/fastctx/third-party/pdfium-7763/licenses/zlib.txt +29 -0
package/README.md CHANGED
@@ -1,3 +1,116 @@
1
- # Temporary Holding Version
1
+ # dsh-ops
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token、时间和模型注意力浪费。本插件提供:
4
+
5
+ - 独立 **bash 5.3.15**,用于通用命令、构建、Git、管道和脚本。
6
+ - 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。
7
+ - Rust 编写的高性能增强工具,支持批量读取、搜索、替换和有界输出,减少不必要的输入输出。由于部分工具不经过 DSH 的受限终端后端,命令与后台任务工具只在**完全权限**时启用。
8
+
9
+ 执行顺序:**工具包 → bash → PowerShell 7**。bash 报错在 bash 内修正,不随意换 shell,不混用两套语法。
10
+
11
+ 仅支持 **Windows x64**;目标宿主 DSH `0.2.0-rc.2`。[English](README.en.md)
12
+
13
+ ## 安装、更新、卸载
14
+
15
+ ### 官方插件市场
16
+
17
+ 在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
18
+
19
+ ### npm 一键安装
20
+
21
+ ```console
22
+ npx --yes dsh-ops@latest install --profile desktop
23
+ npx --yes dsh-ops@latest install --profile web
24
+ npx --yes dsh-ops@latest install --profile tui
25
+ ```
26
+
27
+ 必须显式选择目标 profile;`tui` 映射到 **dsh-TUI 产品的 `dsh-tui` profile**,不是旧的 `tui` 目录。请先初始化目标应用。该入口委托官方 DSH CLI 安装,不另写一套 profile 锁与回滚逻辑。
28
+
29
+ 桌面端必须使用桌面应用自带的 CLI;默认探测 `%LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd`。安装在其它位置时加 `--dsh-cli "<安装目录>\resources\runtime\cli\bin\dsh.cmd"`。Web/TUI 需要可用的 DSH CLI,可同样显式指定。
30
+
31
+ 也可以直接使用官方命令:
32
+
33
+ ```console
34
+ dsh plugin --profile web add dsh-ops
35
+ dsh plugin --profile dsh-tui add dsh-ops
36
+ "<桌面安装目录>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-ops
37
+ ```
38
+
39
+ 普通 DSH CLI 不能管理保留的 `desktop` profile;不要把它与桌面自带入口混淆。
40
+
41
+ **更新**:重新运行相同的 `npx --yes dsh-ops@latest install --profile ...`,或用官方 CLI `add dsh-ops@latest`。按应用提示重载;替换已加载代码时重启应用。
42
+
43
+ 当前 npm 补丁版本为 `0.2.2`,修复官方市场安装后 `ops_bash` 参数 schema 缺少对象根导致模型请求失败的问题;三个运行包仍使用 `0.2.1`。原始载荷发布记录见 [docs/release-0.2.1.md](docs/release-0.2.1.md)。
44
+
45
+ **卸载与查看状态**:
46
+
47
+ ```console
48
+ npx --yes dsh-ops@latest status --profile desktop
49
+ npx --yes dsh-ops@latest uninstall --profile desktop
50
+ ```
51
+
52
+ 把 `desktop` 换成 `web` 或 `tui` 即可。也可在市场卸载,或执行官方 `dsh plugin --profile ... remove dsh-ops`。二进制随 profile 的插件依赖管理;卸载移除依赖引用,不误删系统 shell、其它 profile 的副本或包管理器共享缓存。
53
+
54
+ 旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx`。卸载/降权不保证已经启动的持久后台任务终止,先处理自己的任务。
55
+
56
+ ## 配置方式与工具列表
57
+
58
+ 在 DSH 的配置编辑器中找到 `dsh-ops` 行,调整 `config` 后保存;未知配置键会点名报错。主要默认值:
59
+
60
+ ```yaml
61
+ config:
62
+ enableShellTools: true
63
+ publishBashTool: true
64
+ promptPolicy: true
65
+ toolCallTimeoutMs: 300000
66
+ required: false
67
+ shellPolicy: advise
68
+ allowSystemShellFallback: true
69
+ # binaryPath: 'C:\tools\fastctx.exe'
70
+ # bashPath: 'C:\tools\bash.exe'
71
+ ```
72
+
73
+ - `enableShellTools`:部署开关,开启仍须会话 `danger-full-access` 才发布 FastCtx 命令/job 组。
74
+ - `publishBashTool`:是否发布 `ops_bash`,同样要求完全权限和宿主 subprocess 服务。
75
+ - `promptPolicy`:是否注入紧凑三层路由说明;可用 `extraGuidance` 追加指导。
76
+ - `toolCallTimeoutMs`:FastCtx RPC 等待超时,不代表服务端工作已终止。
77
+ - `required`:运行时不可用时是否拒绝激活。
78
+ - `shellPolicy`:默认 `advise`;`deny-host-shell` 拒绝 `deniedHostTools` 列表中的宿主 shell(默认 `[pwsh, bash, pwsh_persistent]`)。这也会禁用第三层 pwsh,谨慎开启。
79
+ - `binaryPath` / `bashPath`:可选显式路径;不可用时报错,不悄悄换执行器。一般无需配置。
80
+
81
+ | 工具 | 用途 | 完全权限要求 |
82
+ | --- | --- | --- |
83
+ | `ops_inspect_local_file` | 批量文本范围、编码、PDF 文本、hex | 无命令权限门¹ |
84
+ | `ops_grep` | Rust 正则搜索、多文件过滤、计数/摘要 | 无命令权限门¹ |
85
+ | `ops_glob` | 多模式找路径,支持排除 | 无命令权限门¹ |
86
+ | `ops_replace` | 跨文件批量替换;精确编辑仍用宿主 edit | 无命令权限门¹ |
87
+ | `ops_bash` | 优先的通用 bash 命令执行器 | 是 |
88
+ | `ops_run` | 有界 bash 命令结果 | 是 |
89
+ | `ops_run_background` | 启动后台任务 | 是 |
90
+ | `ops_job_output` / `ops_job_list` / `ops_job_kill` | 查看、列出、停止当前会话启动的任务 | 是 |
91
+ | 宿主 `pwsh` | 使用随包 PowerShell 7 的 Windows 原生操作 | 沿用宿主策略 |
92
+
93
+ ¹ **文件工具不是宿主文件系统沙箱。** 它们未接入 DSH 的受限文件后端,尤其 `ops_replace` 没有 workspace confinement。不要把该插件视为不可信受限环境的安全方案。图片交给宿主 `read_image`,插件不会假装已看过图片。
94
+
95
+ 命令工具随会话权限变化发布/撤销,调用前重查权限。后台 job 按会话和当前连接隔离;断线后不能重新认领旧任务。[手动验证清单](docs/manual-validation.md)与[schema 测量](docs/schema-measurement.md)记录了验证范围,不构成运行时无缺陷保证。
96
+
97
+ ## 许可证
98
+
99
+ 插件源码分发采用 **`MIT AND Apache-2.0`**:`vendor/fastctx/` 之外为 MIT;vendored FastCtx 为 Apache-2.0。见 [NOTICE](NOTICE)、`vendor/fastctx/LICENSE-APACHE` 与 `vendor/fastctx/NOTICE`。
100
+
101
+ 独立的 Windows 载荷包另按上游组件许可证分发:Git for Windows 包含 GPL 等许可组件,PowerShell 包含 MIT 与第三方组件。其原始许可证、声明及来源记录随载荷保留;插件的 MIT 许可不替代这些许可。详见 [PROVENANCE.md](PROVENANCE.md)。
102
+
103
+ ## 致谢
104
+
105
+ Rust 工具基于 [yc-duan](https://github.com/yc-duan) 的 Codex 插件 FastCtx 并使用其源代码。vendor 标识与删除型分发改动记在 [vendor/fastctx/FORK.md](vendor/fastctx/FORK.md) 和 [vendor/fastctx/UPSTREAM.md](vendor/fastctx/UPSTREAM.md)。需要转载的 FastCtx 声明如下:
106
+
107
+ > This product includes FastCtx
108
+ > (https://github.com/yc-duan/fastctx), Copyright (c) 2026 yc-duan,
109
+ > used under the Apache License 2.0.
110
+ >
111
+ > FastCtx is redistributed and/or modified here by the maintainer of
112
+ > this distribution. Any such change is that maintainer's own work
113
+ > and their sole responsibility. It is not endorsed by, not
114
+ > supported by, and not attributable to the author of FastCtx, who
115
+ > accepts no liability of any kind arising from this distribution or
116
+ > from anything built on top of it.
package/README.zh.md ADDED
@@ -0,0 +1,116 @@
1
+ # dsh-ops
2
+
3
+ 解决 Windows 下 DSH 反复使用 PowerShell 报错造成的 token、时间和模型注意力浪费。本插件提供:
4
+
5
+ - 独立 **bash 5.3.15**,用于通用命令、构建、Git、管道和脚本。
6
+ - 独立 **PowerShell 7.6.6**,用于必要的 Windows 原生操作,沿用宿主 `pwsh` 工具。
7
+ - Rust 编写的高性能增强工具,支持批量读取、搜索、替换和有界输出,减少不必要的输入输出。由于部分工具不经过 DSH 的受限终端后端,命令与后台任务工具只在**完全权限**时启用。
8
+
9
+ 执行顺序:**工具包 → bash → PowerShell 7**。bash 报错在 bash 内修正,不随意换 shell,不混用两套语法。
10
+
11
+ 仅支持 **Windows x64**;目标宿主 DSH `0.2.0-rc.2`。[English](README.en.md)
12
+
13
+ ## 安装、更新、卸载
14
+
15
+ ### 官方插件市场
16
+
17
+ 在目标 DSH 应用的插件市场中输入 npm 包名 **`dsh-ops`**,安装后选择启用。安装归属于当前运行的 profile,桌面端为 `desktop`。发布包依赖完整 FastCtx、bash 和 PowerShell 7 载荷;不使用安装脚本下载,不改系统 PATH。
18
+
19
+ ### npm 一键安装
20
+
21
+ ```console
22
+ npx --yes dsh-ops@latest install --profile desktop
23
+ npx --yes dsh-ops@latest install --profile web
24
+ npx --yes dsh-ops@latest install --profile tui
25
+ ```
26
+
27
+ 必须显式选择目标 profile;`tui` 映射到 **dsh-TUI 产品的 `dsh-tui` profile**,不是旧的 `tui` 目录。请先初始化目标应用。该入口委托官方 DSH CLI 安装,不另写一套 profile 锁与回滚逻辑。
28
+
29
+ 桌面端必须使用桌面应用自带的 CLI;默认探测 `%LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd`。安装在其它位置时加 `--dsh-cli "<安装目录>\resources\runtime\cli\bin\dsh.cmd"`。Web/TUI 需要可用的 DSH CLI,可同样显式指定。
30
+
31
+ 也可以直接使用官方命令:
32
+
33
+ ```console
34
+ dsh plugin --profile web add dsh-ops
35
+ dsh plugin --profile dsh-tui add dsh-ops
36
+ "<桌面安装目录>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-ops
37
+ ```
38
+
39
+ 普通 DSH CLI 不能管理保留的 `desktop` profile;不要把它与桌面自带入口混淆。
40
+
41
+ **更新**:重新运行相同的 `npx --yes dsh-ops@latest install --profile ...`,或用官方 CLI `add dsh-ops@latest`。按应用提示重载;替换已加载代码时重启应用。
42
+
43
+ 当前 npm 补丁版本为 `0.2.2`,修复官方市场安装后 `ops_bash` 参数 schema 缺少对象根导致模型请求失败的问题;三个运行包仍使用 `0.2.1`。原始载荷发布记录见 [docs/release-0.2.1.md](docs/release-0.2.1.md)。
44
+
45
+ **卸载与查看状态**:
46
+
47
+ ```console
48
+ npx --yes dsh-ops@latest status --profile desktop
49
+ npx --yes dsh-ops@latest uninstall --profile desktop
50
+ ```
51
+
52
+ 把 `desktop` 换成 `web` 或 `tui` 即可。也可在市场卸载,或执行官方 `dsh plugin --profile ... remove dsh-ops`。二进制随 profile 的插件依赖管理;卸载移除依赖引用,不误删系统 shell、其它 profile 的副本或包管理器共享缓存。
53
+
54
+ 旧版显式 provision 的 `<DSH_HOME>/dsh-ops/` 文件需单独清理:`npx --yes dsh-ops@latest uninstall --yes`。默认不删 `~/.fastctx/` 持久状态;需要时显式加 `--purge-fastctx`。卸载/降权不保证已经启动的持久后台任务终止,先处理自己的任务。
55
+
56
+ ## 配置方式与工具列表
57
+
58
+ 在 DSH 的配置编辑器中找到 `dsh-ops` 行,调整 `config` 后保存;未知配置键会点名报错。主要默认值:
59
+
60
+ ```yaml
61
+ config:
62
+ enableShellTools: true
63
+ publishBashTool: true
64
+ promptPolicy: true
65
+ toolCallTimeoutMs: 300000
66
+ required: false
67
+ shellPolicy: advise
68
+ allowSystemShellFallback: true
69
+ # binaryPath: 'C:\tools\fastctx.exe'
70
+ # bashPath: 'C:\tools\bash.exe'
71
+ ```
72
+
73
+ - `enableShellTools`:部署开关,开启仍须会话 `danger-full-access` 才发布 FastCtx 命令/job 组。
74
+ - `publishBashTool`:是否发布 `ops_bash`,同样要求完全权限和宿主 subprocess 服务。
75
+ - `promptPolicy`:是否注入紧凑三层路由说明;可用 `extraGuidance` 追加指导。
76
+ - `toolCallTimeoutMs`:FastCtx RPC 等待超时,不代表服务端工作已终止。
77
+ - `required`:运行时不可用时是否拒绝激活。
78
+ - `shellPolicy`:默认 `advise`;`deny-host-shell` 拒绝 `deniedHostTools` 列表中的宿主 shell(默认 `[pwsh, bash, pwsh_persistent]`)。这也会禁用第三层 pwsh,谨慎开启。
79
+ - `binaryPath` / `bashPath`:可选显式路径;不可用时报错,不悄悄换执行器。一般无需配置。
80
+
81
+ | 工具 | 用途 | 完全权限要求 |
82
+ | --- | --- | --- |
83
+ | `ops_inspect_local_file` | 批量文本范围、编码、PDF 文本、hex | 无命令权限门¹ |
84
+ | `ops_grep` | Rust 正则搜索、多文件过滤、计数/摘要 | 无命令权限门¹ |
85
+ | `ops_glob` | 多模式找路径,支持排除 | 无命令权限门¹ |
86
+ | `ops_replace` | 跨文件批量替换;精确编辑仍用宿主 edit | 无命令权限门¹ |
87
+ | `ops_bash` | 优先的通用 bash 命令执行器 | 是 |
88
+ | `ops_run` | 有界 bash 命令结果 | 是 |
89
+ | `ops_run_background` | 启动后台任务 | 是 |
90
+ | `ops_job_output` / `ops_job_list` / `ops_job_kill` | 查看、列出、停止当前会话启动的任务 | 是 |
91
+ | 宿主 `pwsh` | 使用随包 PowerShell 7 的 Windows 原生操作 | 沿用宿主策略 |
92
+
93
+ ¹ **文件工具不是宿主文件系统沙箱。** 它们未接入 DSH 的受限文件后端,尤其 `ops_replace` 没有 workspace confinement。不要把该插件视为不可信受限环境的安全方案。图片交给宿主 `read_image`,插件不会假装已看过图片。
94
+
95
+ 命令工具随会话权限变化发布/撤销,调用前重查权限。后台 job 按会话和当前连接隔离;断线后不能重新认领旧任务。[手动验证清单](docs/manual-validation.md)与[schema 测量](docs/schema-measurement.md)记录了验证范围,不构成运行时无缺陷保证。
96
+
97
+ ## 许可证
98
+
99
+ 插件源码分发采用 **`MIT AND Apache-2.0`**:`vendor/fastctx/` 之外为 MIT;vendored FastCtx 为 Apache-2.0。见 [NOTICE](NOTICE)、`vendor/fastctx/LICENSE-APACHE` 与 `vendor/fastctx/NOTICE`。
100
+
101
+ 独立的 Windows 载荷包另按上游组件许可证分发:Git for Windows 包含 GPL 等许可组件,PowerShell 包含 MIT 与第三方组件。其原始许可证、声明及来源记录随载荷保留;插件的 MIT 许可不替代这些许可。详见 [PROVENANCE.md](PROVENANCE.md)。
102
+
103
+ ## 致谢
104
+
105
+ Rust 工具基于 [yc-duan](https://github.com/yc-duan) 的 Codex 插件 FastCtx 并使用其源代码。vendor 标识与删除型分发改动记在 [vendor/fastctx/FORK.md](vendor/fastctx/FORK.md) 和 [vendor/fastctx/UPSTREAM.md](vendor/fastctx/UPSTREAM.md)。需要转载的 FastCtx 声明如下:
106
+
107
+ > This product includes FastCtx
108
+ > (https://github.com/yc-duan/fastctx), Copyright (c) 2026 yc-duan,
109
+ > used under the Apache License 2.0.
110
+ >
111
+ > FastCtx is redistributed and/or modified here by the maintainer of
112
+ > this distribution. Any such change is that maintainer's own work
113
+ > and their sole responsibility. It is not endorsed by, not
114
+ > supported by, and not attributable to the author of FastCtx, who
115
+ > accepts no liability of any kind arising from this distribution or
116
+ > from anything built on top of it.