Repository navigation
[Grok/dsh 34] 插件内容启停与扩展视图 #166
Copy link
Copy link
Closed
Labels
ready-for-agentAgent-grabbable workAgent-grabbable work
Description
Activity
- added a commit that references this issue
on Sep 25, 2026 已集成到
rewrite/grok-dsh-20260920:5866e2a- 快进范围:
452a09d..5866e2a(普通 fast-forward,未 force-push)。 - rebase:
origin/rewrite/grok-dsh-20260920在提交时仍为452a09d,rebase 为空操作,无冲突;与并行的 [Grok/dsh 43] 后台命令与完成唤醒 #175 / [Grok/dsh 49] Rhai 工作流执行 dsh 子代理 #181 没有交叉提交。
功能
plugin enable|disable(及/plugins中的 Space)让已安装且受信任的插件真正生效或撤回:rules、skills、commands 通过现有资产发现合并(/plugin:name,无原生/内置/其他插件冲突时保留裸名),agents 以plugin:agent类型加入子代理策略,command hooks 交给 dsh 的 hook runner(设置GROK_PLUGIN_ROOT/GROK_PLUGIN_DATA及CLAUDE_*别名,数据目录$GROK_HOME/plugin-data/<name>)。- 项目插件还需要 workspace trust;未受信任的安装或项目保持
blocked。启用不授予任何工具权限。 - 运行中的会话在下一次提示时生效:插件 hooks 或 agent 策略变化时替换 dsh 子进程并在同一会话上恢复;update / disable / uninstall 会撤回旧内容。
- manifest 的
rules/skills/commands/agents/hooks路径限制在插件根目录内;内联 hooks、非 command handler、重名、保留命名空间冲突、缺失根目录都作为逐插件问题报告,一个坏插件不会隐藏其他插件。 plugin list --json/inspect/ 展开的/plugins行显示状态(active/disabled/blocked/missing/shadowed)、贡献摘要和问题;list --json保留status: "installed",新增state、stateDetail、contributions。- 文档:README.md、README.zh.md、CONTEXT.md、CONTRIBUTING.md、packages/cli/README.md;changeset
.changeset/rust-plugin-content.md(codsh-cli / codsh-bundle patch)。 - 新测试:Rust 单元测试(assets 2 个、plugin 5 个、config 1 个),
scripts/rust-plugin-content.spec.mjs(2 个单元 + 2 个真实 dsh e2e,keyless mock + 临时 home),scripts/rust-plugin-content-pty-test.py(Linux/macOS,已加入test:rust:pty)。
检查(Linux,干净 env,真实计数)
pnpm typecheck:通过。pnpm test:89 个文件,2368 通过 / 1 失败(已知的reference-evidence.spec.mjs"drives interactive help" 在负载下 5s 超时;单独以--testTimeout=60000运行 11/11 通过)。新 spec 4/4,rust-hooks.spec.mjs5/5。cargo test --locked --workspace --no-fail-fast:530+498+42+61+2+379 通过,4 个失败均为已知:filesystem_sandbox的strict_requests_network_isolation...、trusted_project_custom_applies...,以及不稳定的privacy::drafts_stay_local...、voice::substitute_route...(单独重跑均通过)。cargo fmt --check:通过。cargo clippy ... --all-targets -- -D warnings:仅有既有的filesystem_sandbox.rs未使用tail_marker与 needlessreturn;加-A dead_code -A clippy::needless_return后通过。pnpm run build:rust后的 PTY:rust-plugin-content-pty-test.py、rust-subagent-pty-test.py、rust-plan-pty-test.py、rust-queue-pty-test.py均通过。
未验证
- 仅 macOS 的
scripts/rust-*-pty-test.py(如 plugin、hook、permission、assets、turn、resume)以及安装产物脚本未在 Linux 上运行。 - 插件 MCP 服务器与 workflow 贡献留给各自的 ticket(MCP 仅检测并展示,不启动)。
main、npm、默认版本和 PR #213 均未改动;未发布、未 release。解锁后续:#195(Ship)、#204、#205。
- 快进范围:
Metadata
Metadata
Assignees
Labels
ready-for-agentAgent-grabbable workAgent-grabbable work
Parent
#132
Ticket: 34
Status: ready-for-agent
User Stories: 37, 38, 41(见父规格)
What to build
用户启用已安装插件后能实际使用它提供的规则、命令、Skills 和 Hooks,停用后相应能力撤回。
Acceptance criteria
Blocked by
Delivery contract
用户于2026-09-20批准当前测试与任务拆分。按父规格的已安装产物/真实终端和公开协议测试验收;实际实现须带适用的文档、Changeset及必要检查。ready-for-agent表示任务已定义,不表示前置任务已完成,也不授权自动开始本轮实施、购买付费资源或发布软件版本。