解决Windows下pwsh报错

325 字
2 分钟
解决Windows下pwsh报错

https://linux.do/t/topic/2773290

Terminal window
irm https://github.com/possible055/agentshim/releases/latest/download/install.ps1 | iex

image-20260912154506507
image-20260912154506507

一个星期前版上大佬开源 fastctx 我心里想着,从来没碰过 Rust 的我 能仅靠 AI 从头开发出这样的工具吗? 所以我就做了下去 (又一颗轮子)

简介#

一共六个工具:

  • read:读取档案、PDF (解析为文字或图像)
  • grep:正则搜寻 (rg)
  • glob:文件匹配
  • run_program:不经 shell,直接执行程式命令
  • bash:基于 git bash,执行 POSIX 风格 bash 命令
  • bash_status:查询背景 Bash 任务状态

安裝#

Windows

Terminal window
irm https://github.com/possible055/agentshim/releases/latest/download/install.ps1 | iex

Linux / macOS

Terminal window
curl -fsSL https://github.com/possible055/agentshim/releases/latest/download/install.sh | sh

MCP 设置模板#

[mcp_servers.agentshim]
required = true
command = "/absolute/path/to/agentshim"
args = ["serve", "--client-profile", "codex"]
# Unrestricted mode (default) allows any absolute read/grep/glob path. To
# restrict to repository and Codex skill/plugin paths, use:
# args = ["serve", "--client-profile", "codex", "--read-scope", "normal"]
supports_parallel_tool_calls = true
tool_timeout_sec = 600
enabled_tools = ["read", "grep", "glob", "run_program", "bash", "bash_status"]
default_tools_approval_mode = "approve"
env = { CODEX_MCP_PROTOCOL_VERSION = "2026-07-28" }
[features]
mcp_2026_07_28 = true

DSH#

本服务会覆盖 DSH 原生的 read, grep, glob, bash 和 job_xxx 三个工具

dsh plugin --profile web add dsh-agentshim
dsh web --dump-config

Bug#

  • 背景 bash 工具没有超时时间
  • DSH 必须启用 Full Access 才能使用 bash 工具
  • 本插件还没有与 DSH 本体连动沙箱权限设置,所以 grep/glob/read 会被默认限制在项目路径
  • 其他尚待发掘

Github#

github.com

img
img

GitHub - possible055/agentshim: High-performance, capability-aware repository…#

High-performance, capability-aware repository tools and process execution for coding agents.

DSH 插件#

https://www.npmjs.com/package/dsh-agentshim

词元总消耗#

ToolsRequestsInputCache HitsOutput
Antigravity2,92921,885,014263,908,8681,245,360
Claude2,4515,971,820694,577,7932,062,689
Codex12,05957,474,4931,577,557,0264,532,479
Devin5,45723,738,514396,549,5672,004,252
All22,896109,069,8412,932,593,2549,844,780
All*22.90K109M2.93B9.84M

文章分享

如果这篇文章对你有帮助,欢迎分享给更多人!

解决Windows下pwsh报错
https://shaio.top/posts/02ai是天坑/dsh/260912解决windows下pwsh报错/
作者
沙海
发布于
2026-09-12
许可协议
CC BY-NC-SA 4.0

评论区

Profile Image of the Author
沙海
Hello, I'm Shai.
公告
欢迎来到我的博客!这是一则示例公告。
音乐
封面

音乐

暂未播放

0:00 0:00
暂无歌词
分类
标签
站点统计
文章
84
分类
15
标签
48
总字数
67,035
运行时长
0 天
最后活动
0 天前
站点信息
构建平台
GitHub Actions
博客版本
Firefly v6.12.2
文章许可
CC BY-NC-SA 4.0

文章目录