Repository navigation
Welcome to dsh-ops Discussions! #117
Replies: 6 comments
|
喵 |
|
喵 |
|
喵 |
|
喵 |
|
喵 |
|
我踩的坑,供参考 工具恢复了 —— 而且我把这次的根因彻底查清了。这不是 dsh-ops 的锅,是 DSH 内置权限插件里的一个初始化死锁,dsh-ops 只是踩响了这颗地雷。 一、工具现状:已恢复
所以它是"装好了但没启用",真正生效与否只看 二、根因:一个不可自愈的鸡生蛋死锁我把 pinInitialPermission(session) {
const state = this.permissionState(session);
const { preset, sandbox, approval, seeded } = state;
if (preset === "auto") {
if (this.autoAdmit === void 0)
throw new Error('permission: cannot restore preset "auto" without its active integration');
this.autoAdmit();
}
...而它是在自己挂载的时候就地遍历已有会话的: ctx.on("session/created", (session) => { this.pinInitialPermission(session); });
for (const session of ctx.sessions.list()) this.pinInitialPermission(session); // ← 凶手于是形成闭环: 关键点: 这也解释了为什么连 三、地雷的确切位置(已找到)它藏在会话的持久化状态里,不在配置文件里:
"permissions": {
"preset": "auto",
"sandbox": "danger-full-access",
"approval": "ask",
"seeded": true
}也就是说:你之前把权限切到了 "auto",这个选择被持久化了。 之后只要启动时这个会话被恢复,
(另外还有 3 个 2026-10-13 的旧会话也存着 四、关于「dsh-ops 为什么引爆它」这部分我必须如实区分证据等级:
所以更准确的说法是:地雷早就埋好了,dsh-ops 只是让挂载顺序变了一点点,踩响了它。 卸掉它,时序回到原来,地雷就不再被触发。 五、安全的重新启用步骤(纯 GUI,不用命令行)如果你想继续用 dsh-ops,顺序很重要 —— 必须先拆雷,再开插件:
六、我需要你决定我没有擅自去改会话 JSON(那属于运行中的会话状态,程序内存里握着一份,手改会被覆盖,而且风险更高),也没有擅自把 dsh-ops 装回来 —— 在雷还armed着的时候重装,几乎必然再砖一次。 请告诉我你想怎么做:
顺带一提,我上一轮修的 pnpm 那个问题( |
Uh oh!
There was an error while loading. Please reload this page.
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
All reactions