feat(msg-push): ✨ 消息推送配置 MCP 工具 queryMessagePush/manageMessagePush (dc0eaaf9) - #948
Open
binggg wants to merge 4 commits into
Open
feat(msg-push): ✨ 消息推送配置 MCP 工具 queryMessagePush/manageMessagePush (dc0eaaf9)#948binggg wants to merge 4 commits into
binggg wants to merge 4 commits into
Conversation
added 3 commits
August 20, 2026 23:03
- qoder 插件 zip(cloudbase-qoder.zip)与 qoder skill zip(cloudbase-skill.zip) 纳入 release-plugin-zips.yml 白名单,随 release 自动打包上传 - pack-qoder-plugin.mjs / pack-qoder-skill.mjs 默认输出名改为版本无关 (与 kimi 一致:release tag 承载版本,zip-url 跨 release 稳定) - 新增 scripts/releases/release-assets-inventory.md 盘点文档: 12 类分发物清单 + 缺口判定(claude/cursor/codex/.plugin 走独立仓库 分发不挂 assets,ClawHub/SkillHub/npm 走独立 registry)
…geMessagePush (dc0eaaf9) Implement opt-in msg-push plugin for mini-program message push config: - mcp/src/tools/msg-push.ts: queryMessagePush (list/listSupportedEvents) and manageMessagePush (subscribe/unsubscribe/setEnable/ensureCloudFunctionMode) over qbase CGIs (getappconfig/uploadappconfig/getcallbacksupportlist/ get|setcontainercallbackconfig), declarative idempotent merge (read → merge → full overwrite with version optimistic lock, no-op skips POST), RFC 7232 ETag/412-style VERSION_CONFLICT retryable error, CONFIRM_REQUIRED write gate - Transport injected via pluginOptions.msgPush.requestFn (WeChat IDE login session); without it tools return MSG_PUSH_TRANSPORT_UNAVAILABLE guidance - Register msg-push in AVAILABLE_PLUGINS only (NOT in DEFAULT_PLUGINS); XPAY_EVENT_TYPES 7 events as default subscribe set, event_types is open string array validated against getcallbacksupportlist when explicitly passed - Schema tests (enums/idempotent merge/version conflict/invalid event), regenerate scripts/tools.json + doc/mcp-tools.md, extend mcp/scripts/test-with-ticket.cjs with --group msgpush (real ticket or --mock-msgpush), update doc/connection-modes.mdx plugin table
…et (dc0eaaf9) github-code-quality flagged unused variable; CGI base documented in comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
按 spec(
specs/virtual-payment-mcp/,分支feat/virtual-payment-spec)实现消息推送配置 MCP 工具。只开发不发版(发版由 Booker 确认后另行处理),未执行 npm publish。ato-task:dc0eaaf9-61b5-450a-8896-28650d707cf0
变更内容
mcp/src/tools/msg-push.ts:queryMessagePush(action=list / listSupportedEvents)+manageMessagePush(action=subscribe / unsubscribe / setEnable / ensureCloudFunctionMode)getappconfig/route/getcallbacksupportlist/uploadappconfig(全量 overwrite + version 乐观锁)/get|setcontainercallbackconfig(云托管模式)event_types开放字符串数组(任意合法事件,xpay 7 事件为缺省默认集合);显式传入时用getcallbacksupportlist严格校验(非法事件 → INVALID_EVENT_TYPE),缺省集合仅警告confirm="yes"确认机制(CONFIRM_REQUIRED)pluginOptions.msgPush.requestFn注入(微信 IDE 登录态);未注入时返回MSG_PUSH_TRANSPORT_UNAVAILABLE指引错误(安全边界:不直连 qbase)mcp/src/server.ts:msg-push 注册进AVAILABLE_PLUGINS,不进DEFAULT_PLUGINS(默认不启用,需用户/微信侧经 pluginsEnabled 显式启用)mcp/src/types.ts:新增MsgPushOverrides/MsgPushRequestFn/MsgPushRequestFnOptions/MsgPushQbaseResponse,PluginOptions增加msgPush字段mcp/src/tools/msg-push.test.ts(24 用例:schema 枚举/幂等/version 冲突/非法事件/ensureCloudFunctionMode/merge 纯函数)+mcp/src/server.test.ts(默认不注册 + 显式启用注册)mcp/scripts/test-with-ticket.cjs:新增--group msgpush测试组(真实 ticket 调用 getappconfig/uploadappconfig 验证幂等,或--mock-msgpush内存模拟后端,不动真实配置)scripts/tools.json(40 工具)与doc/mcp-tools.md;scripts/generate-tools-json.mjs增加 DOC_PLUGINS 全量插件列表(否则 msg-push 不出现)doc/connection-modes.mdx插件表新增 msg-push 行(默认启用=否)验证
test-with-ticket.cjs --group msgpush --mock-msgpush全过(list / listSupportedEvents / subscribe 幂等 NO_CHANGE / confirm 保护 / unsubscribe 还原)npm run build成功明确不做(任务边界)