Skip to content

feat(plugin): 迁移 setup helper 到 Commands - #3

Closed
kachofugetsu09 wants to merge 2 commits into
mainfrom
codex/setup-helper-v3-commands
Closed

feat(plugin): 迁移 setup helper 到 Commands#3
kachofugetsu09 wants to merge 2 commits into
mainfrom
codex/setup-helper-v3-commands

Conversation

@kachofugetsu09

@kachofugetsu09 kachofugetsu09 commented Aug 14, 2026

Copy link
Copy Markdown
Member

结果

  • 增加 v3 module entry,通过 Core core.commands 注册 canonical /chatid 与隐藏兼容 alias /myid
  • 保留 SetupHelper v2 class 作为同输入行为 oracle;本 PR 不删除 legacy 壳。
  • stable command 命中后直接回复,不进入 Session acquisition、Context、Reasoner 或消息持久化。

语义边界

  • change_type: migration
  • semantic_delta: compatible
  • 用户可见输出、Telegram command catalog、大小写、@botname/myid 和 QQ allowlist 文本保持等价。
  • 明确差异:旧 v2 在新会话上先执行 get_or_create,会持久化一条空 Session 元数据;v3 从 Commands admission 直接返回,SessionDB 保持不变。这是有意移除 lifecycle 偶然副作用,不是 durable write-set 等价。
  • Core 拥有 command namespace、stable snapshot admission 与 handler result boundary;本插件只拥有参数解释、配置与回复文本。
  • 不增加 command/run/done、plugin-data 或外部发送。

不可变依赖

验证

  • pytest -q -W error tests/: 12 passed
  • BasedPyright: 0 errors;其余为外部 Core stub 与既有 strict warnings
  • Plugin API v3 static contract: passed,source SHA-256 008a31a9e42c30d7663de55162d756158915b44b0495584c59b6347fcf1b34b0
  • compileall 与 git diff --check: passed
  • 真实 v2 BeforeTurn 顺序:新会话可由新 SessionManager 重新打开、messages 为空、Context prepare 为 0 调用。
  • 真实 v3 PluginManager + stable snapshot lease + PassiveTurnPipeline:输出等价;Session acquire、Context prepare、Reasoner 与 append 均为 0 调用;teardown 后 service/effect 归零。
  • GitHub Actions:以本 PR 状态为准。

回滚

Revert 本 PR,或回到 backup/setup-helper-before-v3-20260814@29c210f3c9e90864edbe8e4ebfd0442c9a492b63。v2 class 仍在,未修改正式安装、workspace 或 manifest。

@kachofugetsu09

Copy link
Copy Markdown
Member Author

当前 main 已包含 pure-v3 最终实现与对应验收结果;此旧迁移 PR 已被总迁移版本取代,关闭以收敛唯一事实。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant