feat(mcp/parity): DSH 桌面 GUI 按工作区连项目地址(会话级插件,P9) #26
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/agent-client-parity-p9"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
蓝图 agent-client-parity P9:让 DSH 桌面版(GUI)按工作区连到炼境的项目专用地址,在 enterprise 工作区新建的会话也能直接用开发变量等项目工具。
为什么要用插件
DSH 桌面版只有一个后台进程,启动目录固定。托管块里的
!!js只在启动时求值一次,拿不到会话信息,所以只改托管块做不到按工作区切换。DSH 自带「Agent 作用域」:每个会话都带着自己的工作目录,会话创建时会触发
agent/created。插件在这时按工作目录匹配炼境登记的项目白名单,命中才在该会话作用域挂项目地址,同名工具覆盖全局 lian-jing,其他会话不受影响。web 和 acp 这类多工作区模式也一并受益。改动
src-tauri/resources/dsh/lianjing-session-mcp.v1.mjs:会话级插件,随二进制打包。刷新 DSH 托管块时写到%USERPROFILE%\.lian-jing\dsh\。自验
cargo test:247 passed。vitest:16 passed,其中插件用例 8 条;typecheck 通过。没验什么
[lian-jing]提示。mcp_server的scoped_mcp_create_pull_request_uses_synthetic_credential在全量并行测试中偶发失败,单独跑能通过。人终验
重启 DSH 桌面版,在 enterprise 工作区新建会话,让它实际调用
list_project_dev_variables和read_project_test_account(name=LJ_PROBE_NONEXISTENT),第二步应返回「开发需求未登记」。再到其他工作区新建会话,应看不到开发变量工具。🤖 Generated with Claude Code