ZCode 3.9.2 Windows:始终允许本项目不持久化(permission 表恒空)+ Bot Channel 重启重连与会话绑定诉求
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
环境
- ZCode 桌面端 3.9.1 → 3.9.2(Windows x64,CLI 0.16.5)
- 复现仓库:任意项目
问题一:MCP/工具授权持久化缺失(核心缺陷)
现象:权限弹窗选择「始终允许本项目」后,授权不落库。每次重启/新会话后同一工具再次弹窗。
证据链(3.9.2 实测):
~/.zcode/cli/db/db.sqlite的permission表在多次「始终允许」后仍为 0 行(含 WAL 视角复核);- 日志中 MCP 工具(如
mcp__node_repl__js)首次调用reason="Approved once"(单次语义),第二次调用即deny; - Bash 工具的 always-allow 同样不入表——影响面为全部工具类型,非 MCP 独有;
- 3.9.2 changelog 无相关修复项,升级后问题依旧。
期望:「始终允许本项目」写入 permission 表并在后续会话命中免弹。
问题二:Bot Channel 重启后无法自动恢复连接
社区已有反馈(#200):电脑重启后重新打开 ZCode,微信/飞书助手无法自动恢复连接,需删除机器人重新扫码绑定。我们在飞书通道实测同样命中。
问题三(功能请求):Bot Channel 支持绑定现有会话
场景:希望飞书/微信 Bot 作为「当前正在运行的主会话的远程入口」——在手机上继续同一个会话的上下文,而不是每次消息都开新任务会话。
现状(3.9.2 源码级确认):findAuthorizedBot/findBoundUser 仅按 provider+providerUserId 做授权绑定,无 session 概念;消息一律路由到新建任务会话。/bind 只解决授权字段(providerUserId 落库),不改变会话路由。
期望:提供「绑定/切换到指定现有会话」的能力(命令或 /bind 扩展),使 Bot 消息续接该会话上下文。这对长任务远程跟进(跨端同一上下文)是关键能力。
关联
- #200(重启重连)
- #49(重启后上下文丢失)
感谢!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are identified. Start by tracing findAuthorizedBot and findBoundUser, then inspect permission persistence and session routing; done means permissions survive restart, bot connections recover, and a bot can bind to an existing session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite
- Domain
- authentication, cli, database, operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100