@alipay/alipay-aipay 1.6.6-beta2 → 1.6.6-beta3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skill/VERSION +1 -1
- package/skill/references/integration/flow.md +1 -1
- package/skill/references/integration/modules/sandbox/alipay-sandbox-tool.md +3 -3
- package/skill/references/normal/alipay-cli-env.md +2 -2
- package/skill/references/normal/json/customer-messages.json +1 -1
- package/skill/references/normal/scripts/common.sh +22 -2
- package/skill/references/normal/scripts/onboarding_message_runner.mjs +39 -30
- package/skill/references/normal/scripts/onboarding_recovery_runner.mjs +2 -4
- package/skill/references/normal/scripts/render_customer_message.mjs +50 -10
- package/skill/references/normal/scripts/telemetry.mjs +6 -1
- package/skill/references/onboarding/flow.md +8 -8
- package/skill/references/onboarding/modules/app-release.md +3 -1
- package/skill/references/onboarding/modules/product-sign.md +1 -1
- package/skill/references/onboarding/modules/scripts/auth.sh +5 -5
- package/skill/references/onboarding/modules/scripts/upload_special_license.sh +24 -26
package/package.json
CHANGED
package/skill/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.6.6-
|
|
1
|
+
1.6.6-beta3
|
|
@@ -163,7 +163,7 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" integration-message win
|
|
|
163
163
|
资料校验通过后必须建立适用的版本控制忽略和访问保护。该例外只适用于当前沙箱资料;生产环境应用私钥和密码禁止提供给 Agent。Agent 不得在回复、摘要或普通日志中复述收到的值。
|
|
164
164
|
|
|
165
165
|
5. Unix/macOS/Linux 的 `ensure` 只依据同一目标项目的 `.alipay-sandbox.json` 当前事实分流:文件不存在时执行既有 `create`;文件存在或为符号链接时执行既有 `verify` 安全路径。已存在配置不得再次调用 `createAnonymousSandbox`、不得覆盖,也不得因为中断重来要求用户删除配置;无效、不安全或被 Git 跟踪时不得使用,脚本按待配置终态统一输出后继续代码开发。
|
|
166
|
-
6. 只有 Unix/macOS/Linux 创建分支会调用冻结的 `alipay-anonymous-sandbox.createAnonymousSandbox`、`{"request":{"appType":"PUBLICAPP"}}`、`PLATFORM`、`PLATFORM_ID`、`ALIPAYCLI_BIZ_INFO` 环境变量和 `result.content[0].text -> success -> data` 解包逻辑;`ALIPAYCLI_BIZ_INFO` 固定标识当前调用方 Skill
|
|
166
|
+
6. 只有 Unix/macOS/Linux 创建分支会调用冻结的 `alipay-anonymous-sandbox.createAnonymousSandbox`、`{"request":{"appType":"PUBLICAPP"}}`、`PLATFORM`、`PLATFORM_ID`、`ALIPAYCLI_BIZ_INFO` 环境变量和 `result.content[0].text -> success -> data` 解包逻辑;`ALIPAYCLI_BIZ_INFO` 固定标识当前调用方 Skill、当前生效版本和匿名 `skill_user_id`,禁止传入 `PRODUCT`。Windows 不调用该方法或 `sandbox_config.sh`。
|
|
167
167
|
7. Unix/macOS/Linux 只接受以下互斥最终结果和一个临时恢复结果;待配置不算成功:
|
|
168
168
|
- `READY`:退出码为 0;唯一带 `ALIPAY_AIPAY_INTERNAL:` 前缀的 `SANDBOX_ENSURE_ACTION=CREATED|VERIFIED`、`SANDBOX_CONFIG_PATH=<同一目标项目绝对路径>/.alipay-sandbox.json` 和 `FLOW:SANDBOX_CONFIG_READY` 内部事实。
|
|
169
169
|
- `CREATE_PENDING`:退出码为 0;脚本 stdout 已渲染唯一 `sandbox.configuration.pending/CREATE` 正文;唯一带 `ALIPAY_AIPAY_INTERNAL:` 前缀的 `SANDBOX_PENDING_PATH=<同一目标项目绝对路径>/.alipay-sandbox.json` 和 `FLOW:SANDBOX_CONFIG_PENDING_CREATE` 内部事实;不得出现 READY 标记。
|
|
@@ -23,7 +23,7 @@ which alipay-cli 2>/dev/null && alipay-cli version
|
|
|
23
23
|
```bash
|
|
24
24
|
PLATFORM="<PLATFORM>" \
|
|
25
25
|
PLATFORM_ID="<run_id>" \
|
|
26
|
-
ALIPAYCLI_BIZ_INFO='{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>"}' \
|
|
26
|
+
ALIPAYCLI_BIZ_INFO='{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>","skill_user_id":"machine_<32位匿名机器哈希>"}' \
|
|
27
27
|
alipay-cli mcp call alipay-anonymous-sandbox.createAnonymousSandbox \
|
|
28
28
|
--data '{"request":{"appType":"PUBLICAPP"}}' \
|
|
29
29
|
--json
|
|
@@ -41,7 +41,7 @@ alipay-cli mcp call alipay-anonymous-sandbox.createAnonymousSandbox \
|
|
|
41
41
|
|------|------|----------|
|
|
42
42
|
| `PLATFORM` | AI 编程工具识别结果 | 参考通用脚本 `../../../normal/scripts/detect_dev_tool.sh` 识别当前工具后使用其输出值;缺失时使用 `unknown`。例如 Codex 环境检测结果为 `codex` |
|
|
43
43
|
| `PLATFORM_ID` | 当前流程 `run_id` | 由 `sandbox_config.sh` 通过 `common.sh` 从当前流程 run context 读取,遥测开启或关闭都不影响该值;若宿主提供 `COZE_PROJECT_ID`、`MEOO_PROJECT_ID`,或 `MIAODA` 环境下的 `VITE_APP_ID`/`PLATFORM_ID`,新建 run 时优先以该项目 ID 为 `run_id`;缺失时不阻断沙箱创建 |
|
|
44
|
-
| `ALIPAYCLI_BIZ_INFO` | 当前生效 Skill 的 `VERSION` | 由 `common.sh` 动态生成 JSON:`{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>"}`;`skill` 固定,版本统一带 `v`
|
|
44
|
+
| `ALIPAYCLI_BIZ_INFO` | 当前生效 Skill 的 `VERSION` 与匿名机器哈希 | 由 `common.sh` 动态生成 JSON:`{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>","skill_user_id":"machine_<32位匿名机器哈希>"}`;`skill` 固定,版本统一带 `v` 前缀,`skill_user_id` 复用 telemetry 的 `machineUserID`,极端环境无法取得合法 `machine_` 标识时省略该字段;禁止由 Agent 手写或沿用外部同名值 |
|
|
45
45
|
| `PRODUCT` | 不再传入 | 该 MCP 方法当前不需要产品上下文;不得把产品名写入 `--data` 或 CLI 环境变量 |
|
|
46
46
|
|
|
47
47
|
**Codex 环境示例:**
|
|
@@ -49,7 +49,7 @@ alipay-cli mcp call alipay-anonymous-sandbox.createAnonymousSandbox \
|
|
|
49
49
|
```bash
|
|
50
50
|
PLATFORM=codex \
|
|
51
51
|
PLATFORM_ID=<run_id> \
|
|
52
|
-
ALIPAYCLI_BIZ_INFO='{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>"}' \
|
|
52
|
+
ALIPAYCLI_BIZ_INFO='{"skill":"alipay-aipay","skill_version":"v<当前 VERSION>","skill_user_id":"machine_<32位匿名机器哈希>"}' \
|
|
53
53
|
alipay-cli mcp call alipay-anonymous-sandbox.createAnonymousSandbox \
|
|
54
54
|
--data '{"request":{"appType":"PUBLICAPP"}}' \
|
|
55
55
|
--json
|
|
@@ -141,12 +141,12 @@ source ~/.bashrc # Linux/bash
|
|
|
141
141
|
|
|
142
142
|
> ⚠️ **强制规范:检测结果仅供内部使用,禁止向用户输出!**
|
|
143
143
|
|
|
144
|
-
AI 工具由 `scripts/detect_dev_tool.sh` 检测;`init_alipay_cli_context` 设置 `DEV_TOOL_NAME`、`PLATFORM`,把当前 `run_id` 作为 `PLATFORM_ID`(不受遥测开关影响),并从当前生效 Skill 的 `VERSION` 动态生成 `ALIPAYCLI_BIZ_INFO={"skill":"alipay-aipay","skill_version":"v<当前 VERSION>"}
|
|
144
|
+
AI 工具由 `scripts/detect_dev_tool.sh` 检测;`init_alipay_cli_context` 设置 `DEV_TOOL_NAME`、`PLATFORM`,把当前 `run_id` 作为 `PLATFORM_ID`(不受遥测开关影响),并从当前生效 Skill 的 `VERSION` 和同源 `machineUserID` 动态生成 `ALIPAYCLI_BIZ_INFO={"skill":"alipay-aipay","skill_version":"v<当前 VERSION>","skill_user_id":"machine_<32位匿名机器哈希>"}`;极端环境无法取得合法 `machine_` 标识时只省略 `skill_user_id`,不写 `anonymous_uid` 且不阻断业务调用。所有携带 `PLATFORM` 的 Skill 业务 CLI 调用均携带该 JSON,外部同名值会被覆盖;`alipay-cli version` 等不携带 `PLATFORM` 的安装和环境探测不注入该变量。产品确认后,Onboarding 还严格映射 `aipay|webpay|apppay` 为 `PRODUCT=AIPAY|WEBPAY|APPPAY`,其环境检查、登录、查询、写入和上传均携带该值,但 `PRODUCT` 和 `ALIPAYCLI_BIZ_INFO` 都不写入 MCP JSON;Integration 产品确定前的环境检查和快速沙箱不传 `PRODUCT`。新建 run 优先采用宿主 `COZE_PROJECT_ID`、`MEOO_PROJECT_ID` 或 MIAODA 的 `VITE_APP_ID`/`PLATFORM_ID`,并复用为 `PLATFORM_ID`。
|
|
145
145
|
|
|
146
146
|
```
|
|
147
147
|
❌ 禁止:向用户输出"环境检查完成,检测到您正在使用 Claude Code 环境"等检测结果
|
|
148
148
|
❌ 禁止:向用户透出任何关于 AI 编程工具检测的信息
|
|
149
|
-
✅ 正确:检测结果仅供内部使用,只用于脚本设置 `PLATFORM`;`PLATFORM_ID` 由脚本从当前 `run_id` 派生,`ALIPAYCLI_BIZ_INFO` 由当前 Skill
|
|
149
|
+
✅ 正确:检测结果仅供内部使用,只用于脚本设置 `PLATFORM`;`PLATFORM_ID` 由脚本从当前 `run_id` 派生,`ALIPAYCLI_BIZ_INFO` 由当前 Skill 版本和匿名 `skill_user_id` 派生,Onboarding 的 `PRODUCT` 由已确认产品映射
|
|
150
150
|
✅ 正确:静默完成检测,直接进入下一步流程
|
|
151
151
|
```
|
|
152
152
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"interactionPrompts":{"confirmInputHint":"如确认,可以回复“继续”“确认”“OK”,也可以输入 1;如需调整,请直接说明。","planAdjustmentHint":"我会继续执行,无需回复;如需调整方案,请中断 Agent 执行并说明。","authorizationCompletionInputHint":"授权完成后可回复“继续”“好了”“OK”或输入 1","publicKeyConfirmationCompletionInputHint":"支付宝扫码确认应用公钥完成后可回复“继续”“好了”“OK”或输入 1","completionInputHint":"完成后可回复“继续”“好了”“已完成”“OK”或输入 1;如需调整,请直接说明。","scanReturnHint":"扫码完成后请回到 Agent 对话页面"},"interactionReplySets":{"affirmative":["1","继续","继续推进","继续执行","继续处理","继续下一步","请继续","请继续推进","继续吧","确认","确认继续","确定","同意","可以","可以继续","可以继续推进","没问题","好","好的","好了","好的继续","已完成","完成","完成了","操作完成","操作好了","已经完成","已经好了","处理好了","确认好了","弄好了","OK","Okay","Yes","Y"]},"messages":[{"messageId":"product.unsupported","owner":"catalog_owned","trigger":"route.unsupported_product","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"singleLine","required":true}],"requiredPolicyIds":["P-MCP-CONTRACT-FROZEN"],"variants":{"DEFAULT":{"templateLines":["当前 Skill 只支持接入 AI 按量付费、AI 网页应用收款和 AI 移动应用收款,不支持 `{{productName}}`。","","- 查看支付宝其他收单产品请前往:[支付宝开放平台](https://open.alipay.com)","- 开通支付宝其他收单产品请前往:[支付宝商家平台](https://b.alipay.com/page/portal/home)"]}}},{"messageId":"onboarding.enterprise.unsupported","owner":"catalog_owned","trigger":"onboarding.enterprise_account","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"ONBOARDING_ONLY":{"templateLines":["暂不支持企业账号通过 Skill 完成产品开通。","","请前往支付宝商家平台开通:https://b.alipay.com/page/portal/home","","如需继续进行代码开发,试试对 Agent 说:为我集成 AI 网页应用收款/AI 移动应用收款/AI 按量付费"]},"FULL_PROCESS":{"templateLines":["暂不支持企业账号通过 Skill 完成产品开通。","","请前往支付宝商家平台开通:https://b.alipay.com/page/portal/home"]}}},{"messageId":"onboarding.windows.redirect","owner":"catalog_owned","trigger":"onboarding.windows_platform","blocking":false,"allowedReplies":[],"variables":[{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"windowsOnboardingRedirect"}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["当前为 Windows 系统,请您暂时前往支付宝 AI 付站点完成产品开通:","{{officialUrl}}"]}}},{"messageId":"product.clarify","owner":"catalog_owned","trigger":"route.product_unclear","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["请确认您的业务场景:","","1. AI 按量付费:买家通过 Agent 使用支付宝完成支付,适用于 API、MCP、算力资源等按调用付费。","2. AI 网页应用收款:买家在电脑网页或手机浏览器页面使用支付宝付款。","3. AI 移动应用收款:买家在 APP 内调起支付宝完成付款。"]}}},{"messageId":"onboarding.mcc.clarify","owner":"catalog_owned","trigger":"onboarding.mcc_unclear","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["MCC 与经营类目强相关,无法仅从“{{productName}}”确定。","","请补充本次接入的经营内容,例如:","","- 电商购物(实物商品销售)","- 在线工具","- 软件开发服务","- 售卖宠物用品","","也可以直接提供你已知的 MCC 二级类目名称或编码。"]}}},{"messageId":"onboarding.mcc.no_match","owner":"catalog_owned","trigger":"onboarding.mcc_search.none","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["没有匹配到符合描述的经营类目,请重新澄清经营描述。"]}}},{"messageId":"onboarding.mcc.candidates","owner":"catalog_owned","trigger":"onboarding.mcc_candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"runtime_enum","variables":[{"name":"mccCandidates","type":"mccCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["我找到了几个可能匹配的经营类目,请选择最接近的一项:","","{{candidateTable}}","","请回复序号、MCC 二级类目名称或编码;如果都不匹配,请补充实际销售的商品或服务类型。"]}}},{"messageId":"integration.start.confirm","owner":"catalog_owned","trigger":"integration.step2.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"planAdjustment","variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"projectPath","type":"path","required":true},{"name":"projectOriginLabel","type":"enum","required":true,"values":["现有项目","本轮新建项目"]},{"name":"integrationStatus","type":"enum","required":true,"values":["TARGET_PARTIAL","OTHER_PRODUCT_ONLY","NO_PAYMENT"]},{"name":"otherProducts","type":"singleLine","required":false},{"name":"language","type":"singleLine","required":true},{"name":"framework","type":"singleLine","required":true},{"name":"nextFlow","type":"enum","required":true,"values":["integration"]}],"requiredPolicyIds":["P-PROJECT-PROTECT","P-SENSITIVE-STATE"],"variants":{"AIPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | {{productName}} |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]},"WEBPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | AI 网页应用收款 |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]},"APPPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | AI 移动应用收款 |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","【前置提醒】接 AI 移动应用收款需要你有自己的 APP,本轮代码开发主要覆盖商家服务端支付接口的实现,APP 还需接入支付宝客户端 SDK 后才能调起支付。你可以在当前 AI 移动应用收款服务端代码开发完毕后,对 Agent 说:“给我做个 APP /给我的 APP 接支付宝客户端 SDK /把我的 APP 客户端和接了支付宝的服务端联动起来”。","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]}}},{"messageId":"onboarding.plan.confirm","owner":"catalog_owned","trigger":"onboarding.step2.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"planAdjustment","variables":[{"name":"mccCode","type":"mccCode","required":true},{"name":"mccName","type":"singleLine","required":true},{"name":"mccContextReceipt","type":"string","required":true},{"name":"mccQualification","type":"singleLine","required":true}],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"AIPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 按量付费 |","| 产品码 | `I1080300001000160457` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,machine_pay:write,agmnt:write` |","| 材料预告 | 1、签约申请无需页面截图;2、新建或修改服务时收集服务资料;3、新建应用设置应用公钥时由用户提供 |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]},"WEBPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 网页应用收款 |","| 产品码 | `I1080300001000041203` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,fast_instant_trade_pay:write` |","| 材料预告 | 1、未签约时收集首页、商品页、支付页 3 张截图;支付页是展示支付宝付款方式,等待用户去支付的页面;2、新建应用设置应用公钥时由用户提供 |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]},"APPPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 移动应用收款 |","| 产品码 | `I1080300001000041313` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,auth_alipay_apppay:write` |","| 材料预告 | 1、未签约时收集 APP 名称和首页、商品页、支付页 3 张截图;支付页是展示支付宝付款方式,等待用户去支付的页面;2、新建应用支持 iOS、Android 或 ALL(二者同时);3、新建应用设置应用公钥时由用户提供 |","| 特别提醒 | 鸿蒙系统移动应用暂不支持通过 Skill 创建,请前往支付宝开放平台-控制台手动创建:https://open.alipay.com/ |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]}}},{"messageId":"auth.page","owner":"catalog_owned","trigger":"AUTH_FLOW:READY_TO_OPEN","blocking":false,"allowedReplies":[],"postRenderHintType":"scanReturn","expiresWithPrompt":true,"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"deviceCode","type":"singleLine","required":true},{"name":"mccCode","type":"mccCode","required":true},{"name":"mccName","type":"singleLine","required":true},{"name":"mccContextReceipt","type":"string","required":true},{"name":"verificationCode","type":"singleLine","required":true},{"name":"expiresDisplay","type":"singleLine","required":true},{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"authorization"}],"requiredPolicyIds":["P-AUTH-URL","P-AUTH-URL-AUTO-OPEN"],"variants":{"READY":{"templateLines":["接下来会自动打开支付宝扫码授权页面,请在页面中扫码完成授权。","","| 授权信息 | 内容 |","|---|---|","| 产品类型 | {{productName}} |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 确认码 | {{verificationCode}} |","| 授权链接有效期 | {{expiresDisplay}} |","","安全提示:支付宝扫码后,请核对授权页面显示的确认码是否与上方一致;如不一致,请勿授权并立即停止操作。确认码只用于核对,不需要输入。","","如果自动跳转失败,请复制下方链接到网页浏览器打开。","授权链接:","{{officialUrl}}"]}}},{"messageId":"auth.open.manual","owner":"catalog_owned","trigger":"AUTH_OPEN:OPEN_FAILED|GUI_UNAVAILABLE|LINK_ONLY","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-URL-AUTO-OPEN"],"variants":{"DEFAULT":{"templateLines":["未能自动打开支付宝授权页面,请手动打开上一条消息中的授权链接并完成扫码。我会继续检查授权结果,无需回复。"]}}},{"messageId":"application.key.page","owner":"catalog_owned","trigger":"application.key_page.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"scanReturn","expiresWithPrompt":true,"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"publicKeyConfirmation"}],"requiredPolicyIds":["P-KEY-URL","P-KEY-URL-AUTO-OPEN"],"variants":{"READY":{"templateLines":["接下来会自动打开应用 `{{appId}}` 的公钥确认页面,请打开支付宝扫码确认应用公钥。","","如果自动跳转失败,请复制下方链接到网页浏览器打开。","公钥确认链接:","{{officialUrl}}"]}}},{"messageId":"application.key.pending","owner":"catalog_owned","trigger":"FLOW:KEY_NOT_CONFIRMED","blocking":true,"allowedReplySet":"affirmative","inputHintType":"publicKeyConfirmationComplete","variables":[],"requiredPolicyIds":["P-KEY-PUBLIC-USER"],"variants":{"DEFAULT":{"templateLines":["应用公钥尚未确认,请先完成公钥设置确认。"]}}},{"messageId":"onboarding.discovery.summary","owner":"catalog_owned","trigger":"onboarding.discovery.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"signingStatus","type":"enum","required":true,"values":["未签约","已提交待生效","已生效","其他状态待核验","查询失败"]},{"name":"serviceStatus","type":"enum","required":false,"values":["无已有服务","已有服务候选","查询失败"]},{"name":"applicationStatus","type":"enum","required":true,"values":["无同类型应用","有上线应用可复用","仅有未上线应用","查询失败"]}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-MATERIAL-CATEGORY"],"variants":{"AIPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | {{serviceStatus}} |","| 应用发布 | {{applicationStatus}} |"]},"WEBPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | 无需处理 |","| 应用发布 | {{applicationStatus}} |"]},"APPPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | 无需处理 |","| 应用发布 | {{applicationStatus}} |"]}}},{"messageId":"materials.category.collect","owner":"catalog_owned","trigger":"materials.category.ready","blocking":true,"allowedReplies":[],"replyMode":"freeform","expiresWithPrompt":true,"variables":[{"name":"categoryName","type":"enum","required":true,"values":["签约材料","服务资料","应用资料"]},{"name":"currentStatus","type":"enum","required":true,"values":["待补充","部分已提供,待补充","校验失败,需更正"]},{"name":"missingFields","type":"enumList","required":true,"values":["APP名称","首页截图","商品页截图","支付页截图","特殊资质材料","服务名称","服务描述","服务地址","服务单价","请求示例JSON","应用平台和对应资料","iOS Bundle ID(bundleId)","Android 应用包名(appPackage)","Android 应用签名摘要(appSign)","应用公钥"]},{"name":"paymentPageHint","type":"string","derived":true,"values":["支付页说明:支付页是展示支付宝付款方式,等待用户去支付的页面,不是支付成功页。"]},{"name":"serviceUrlHint","type":"string","derived":true,"values":["请提供有效的 URL 地址(以 http:// 或 https:// 开头)"]},{"name":"servicePricingHint","type":"string","derived":true,"values":["请提供不低于 0.01 元的有效服务单价,可输入 0.03、0.03元或 0.03 元/次。"]},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"specialQualificationHint","type":"string","required":false}],"requiredPolicyIds":["P-MATERIAL-CATEGORY"],"variants":{"INITIAL":{"templateLines":["当前收集类别:{{categoryName}}","","请在一条回复中提供:{{missingFields}}。","{{paymentPageHint}}","{{specialQualificationHint}}"]},"APP_WEB_INITIAL":{"templateLines":["当前收集类别:应用资料","","请在一条回复中提供应用公钥;请勿提供应用私钥。无需另行回复 `新建`。","","填写示例(请替换为实际内容):","```text","应用公钥:<你自行生成的完整应用公钥>","```","需要支付宝开放平台密钥工具时,可从官方地址下载:","{{keyToolManual}}","","","{{specialQualificationHint}}"]},"APP_MOBILE_INITIAL":{"templateLines":["当前收集类别:应用资料","","请在一条回复中选择平台并提供以下材料:","","- iOS:`IOS`、iOS Bundle ID(bundleId)、应用公钥。","- Android:`ANDROID`、Android 应用包名(appPackage)、Android 应用签名摘要(appSign,不是应用公钥)、应用公钥。","- iOS + Android:`ALL`、`bundleId`、`appPackage`、`appSign`、应用公钥。","","填写示例(请替换为实际内容):","```text","ANDROID","Android 应用包名(appPackage):com.example.app","Android 应用签名摘要(appSign):<你的 Android 应用签名摘要>","应用公钥:<你自行生成的完整应用公钥>","```","","请勿提供应用私钥。无需另行回复 `新建`。","","需要支付宝开放平台密钥工具时,可从官方地址下载:","{{keyToolManual}}","","鸿蒙系统移动应用暂不支持通过 Skill 创建,请前往支付宝开放平台-控制台手动创建:https://open.alipay.com/","{{specialQualificationHint}}"]},"PARTIAL":{"templateLines":["当前收集类别:{{categoryName}}","","还需补充:{{missingFields}}。","{{paymentPageHint}}","{{specialQualificationHint}}","已校验字段无需重复提供。"]},"INVALID":{"templateLines":["当前收集类别:{{categoryName}}","","以下内容需要更正:{{missingFields}}。","{{serviceUrlHint}}","{{servicePricingHint}}","{{paymentPageHint}}","{{specialQualificationHint}}","已校验字段无需重复提供。"]},"SERVICE_INITIAL":{"templateLines":["当前收集类别:服务资料","","请在一条回复中提供:服务名称、服务描述、服务地址、服务单价、请求示例JSON。","","填写示例(请替换为实际内容):","```text","服务名称:天气查询","服务描述:按城市查询天气","服务地址:以 http:// 或 https:// 开头的实际服务地址","服务单价:0.08 元/次","请求示例 JSON:{\"city\":\"杭州\"}","```","{{specialQualificationHint}}"]}}},{"messageId":"service.create.summary","owner":"catalog_owned","trigger":"service.create.ready","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceName","type":"singleLine","required":true},{"name":"serviceDescription","type":"singleLine","required":true},{"name":"serviceUrl","type":"runtimeUrl","required":true},{"name":"servicePricing","type":"singleLine","required":true},{"name":"serviceSchema","type":"string","required":true}],"requiredPolicyIds":["P-SERVICE-WRITE","P-WRITE-UNKNOWN"],"variants":{"DEFAULT":{"templateLines":["将创建以下 AI 按量付费服务:","","服务名称:{{serviceName}}","服务描述:{{serviceDescription}}","服务地址:`{{serviceUrl}}`","服务单价:{{servicePricing}} 元/次","请求示例 JSON:","```json","{{serviceSchema}}","```"]}}},{"messageId":"onboarding.write.confirm","owner":"catalog_owned","trigger":"external_write.ready","blocking":true,"allowedReplySet":"affirmative","inputHintType":"confirm","expiresWithPrompt":true,"variables":[{"name":"sessionSummary","type":"singleLine","required":true},{"name":"subjectSummary","type":"singleLine","required":true},{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"actionTypes","type":"enumList","required":true,"values":["服务修改"]},{"name":"serviceId","type":"singleLine","required":false},{"name":"serviceName","type":"singleLine","required":false},{"name":"serviceDescription","type":"singleLine","required":false},{"name":"serviceUrl","type":"runtimeUrl","required":false},{"name":"servicePricing","type":"singleLine","required":false},{"name":"serviceSchema","type":"string","required":false}],"requiredPolicyIds":["P-SERVICE-WRITE","P-WRITE-UNKNOWN"],"variants":{"SERVICE_UPDATE_ONLY":{"templateLines":["请确认以下支付宝操作:","","- 当前会话:{{sessionSummary}}","- 操作主体:{{subjectSummary}}","- 产品:AI 按量付费","- 动作:服务修改","","服务ID:`{{serviceId}}`","服务名称:{{serviceName}}","服务描述:{{serviceDescription}}","服务地址:`{{serviceUrl}}`","服务单价:{{servicePricing}} 元/次","请求示例 JSON:","```json","{{serviceSchema}}","```","","本次只执行上述服务修改;签约、应用创建、公钥设置和应用提审不包含在本确认中。"]}}},{"messageId":"process.partial_result","owner":"catalog_owned","trigger":"process.current_endpoint","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"processResultTitle","type":"enum","required":true,"values":["支付产品-产品开通已完成","流程进展"]},{"name":"integrationResult","type":"enum","required":true,"values":["不在本轮执行范围","已完成","部分完成,沙箱配置待完成","部分完成,人工待验证","未完成","结果未知"]},{"name":"sandboxConfigState","type":"enum","required":false,"values":["READY","CREATE_PENDING","VERIFY_PENDING"]},{"name":"signingResult","type":"enum","required":true,"values":["未签约","已提交,等待生效","已生效","失败","结果未知"]},{"name":"serviceResult","type":"enum","required":true,"values":["无需处理","已复用","创建成功,状态未取得","修改成功,状态未取得","已完成","失败","结果未知"]},{"name":"applicationResult","type":"enum","required":true,"values":["待选择","已创建,待设置公钥","公钥待确认","HarmonyOS 应用待平台侧创建、配置或上线","已提交审核,等待上线","已上线且配置完整","需人工配置","失败","结果未知"]},{"name":"remainingActions","type":"singleLine","required":true},{"name":"manualVerificationItems","type":"singleLine","required":false},{"name":"applicationOperationAppId","type":"singleLine","required":false},{"name":"applicationOperationActualStatus","type":"singleLine","required":false},{"name":"applicationOperationNextAction","type":"singleLine","required":false},{"name":"applicationOperationAppKeySavePath","type":"singleLine","required":false},{"name":"applicationManualConfigurationNextAction","type":"string","required":false,"derived":true,"values":["前往支付宝 AI 付站点,进入一站式接入 → 密钥配置,按当前 appId 获取对应的支付宝公钥,并手动配置到项目:https://aipay.alipay.com/?from=alipay-aipay-skill"]},{"name":"applicationOperationBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"manualVerificationLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"productionReadinessBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"statusQueryHint","type":"enum","required":false,"derived":true,"values":["。这期间,你也可以试着对 Agent 说:“帮我查询产品签约状态”或“帮我查询应用状态”。"]},{"name":"sandboxRecoveryHint","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"nextFlowReminderLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"nextFlowReminder","type":"enum","required":true,"values":["还需完成支付产品-代码开发,才能在业务系统中实际发起支付。","代码开发已在本轮执行;后续只按上表实际待办继续。"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["{{processResultTitle}}:","","| 分支 | 实际结果 |","|---|---|","| 产品 | {{productName}} |","| 代码开发 | {{integrationResult}} |","| 产品开通 | {{signingResult}} |","| 服务市场 | {{serviceResult}} |","| 应用发布 | {{applicationResult}} |","","本轮流程仍需处理:{{remainingActions}}{{statusQueryHint}}","{{manualVerificationLine}}","{{sandboxRecoveryHint}}","{{applicationOperationBlock}}","","{{productionReadinessBlock}}","","{{nextFlowReminderLine}}"]}}},{"messageId":"key_tool.download.result","owner":"catalog_owned","trigger":"key_tool.download.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"downloadPath","type":"existingPath","required":true}],"requiredPolicyIds":["P-KEY-TOOL-DOWNLOAD"],"fallbackMessageId":"key_tool.download.fallback","variants":{"DOWNLOADED":{"templateLines":["支付宝开放平台密钥工具已下载到:`{{downloadPath}}`。","","请打开该安装包并按页面引导完成安装;Agent 不会自动安装、启动工具或生成密钥。生成后只向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。",""]}}},{"messageId":"key_tool.download.fallback","owner":"catalog_owned","trigger":"key_tool.download.fallback","blocking":false,"allowedReplies":[],"variables":[{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-KEY-TOOL-DOWNLOAD"],"variants":{"DEFAULT":{"templateLines":["未能完成自动下载,可能是当前环境不支持、无法访问下载源、本地目录不可写或安装包校验未通过。请访问支付宝开放平台手动下载支付宝开放平台密钥工具:","","{{keyToolManual}}","","仅向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。"]}}},{"messageId":"sandbox.windows.manual_setup","owner":"catalog_owned","trigger":"integration.sandbox.windows.manual_setup","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["当前 Windows 环境暂不支持自动创建快速沙箱,请前往支付宝 AI 付站点-选择产品-一站式接入-技术集成页面获取沙箱配置:https://aipay.alipay.com/?from=alipay-aipay-skill","","请把沙箱应用的 APPID、支付宝公钥、应用公钥、与当前开发语言(JAVA语言/非JAVA语言)匹配的应用私钥、沙箱账号信息告诉我,我会帮你完成项目配置,并继续进行支付产品代码开发。","","生产环境应用私钥和密码切勿暴露给 Agent。"]}}},{"messageId":"sandbox.environment.summary","owner":"catalog_owned","trigger":"integration.sandbox.persisted","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"configPath","type":"existingPath","required":true},{"name":"environmentRows","type":"sandboxTableRows","required":true}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["沙箱环境摘要","","| 项目 | 信息 |","|---|---|","| 产品 | {{productName}} |","| 配置文件目录 | `{{configPath}}` |","{{environmentRows}}","| 密钥字段 | 已写入本地配置文件,默认不在对话中展开 |"]}}},{"messageId":"sandbox.configuration.pending","owner":"catalog_owned","trigger":"integration.sandbox.pending","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"CREATE":{"templateLines":["快速沙箱暂未创建成功,当前沙箱配置尚未完成。","","本轮将继续代码开发。代码开发完成后,请对 Agent 说:“重新创建并配置沙箱”。"]},"VERIFY":{"templateLines":["快速沙箱配置复核未通过,当前沙箱配置尚未完成。","","本轮将继续代码开发。代码开发完成后,请对 Agent 说:“重新创建并配置沙箱”。"]}}},{"messageId":"sandbox.create.failure","owner":"catalog_owned","trigger":"integration.sandbox.failed","blocking":false,"allowedReplies":[],"variables":[{"name":"failureReason","type":"singleLine","required":true},{"name":"recoveryAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"WINDOWS":{"templateLines":["Windows 沙箱本地配置未准备完成:{{failureReason}}","","恢复动作:{{recoveryAction}}","","字段缺失、来源不明或本地保护未完成时不能继续,也不能把当前配置表述为可用。"]}}},{"messageId":"sandbox.environment.reminder","owner":"catalog_owned","trigger":"integration.sandbox.persisted.reminder","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-A2M-SANDBOX","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["快速沙箱环境配置已准备完成,仅用于测试,不涉及真实资金。","","完整配置已写入上述本地文件。"]},"WINDOWS":{"templateLines":["Windows 沙箱本地配置已准备完成,仅用于测试,不涉及真实资金。","","配置已保存至上述本机路径。"]}}},{"messageId":"a2m.test.start","owner":"catalog_owned","trigger":"integration.a2m.test.start","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-A2M-SANDBOX","P-A2M-SUCCESS"],"variants":{"DEFAULT":{"templateLines":["开始执行 AI 按量付费沙箱服务端联调。","","我将连续验证 `402 Payment-Needed`、沙箱收银、`Payment-Proof` 重试和资源交付,完成后输出实际结论;这里不需要额外确认。"]}}},{"messageId":"a2m.test.result","owner":"catalog_owned","trigger":"integration.a2m.test.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"evidenceSummary","type":"singleLine","required":true},{"name":"recoveryAction","type":"singleLine","required":false}],"requiredPolicyIds":["P-A2M-SUCCESS","P-SENSITIVE-STATE"],"variants":{"PASSED":{"templateLines":["AI 按量付费沙箱服务端联调通过。","","通过证据:{{evidenceSummary}}"]},"FAILED":{"templateLines":["AI 按量付费沙箱服务端联调未通过。","","实际证据:{{evidenceSummary}}","","恢复动作:{{recoveryAction}}"]}}},{"messageId":"a2m.payment.experience","owner":"catalog_owned","trigger":"integration.a2m.optional_payment_experience","blocking":false,"allowedReplies":[],"variables":[{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"buyerAccount","type":"singleLine","required":true},{"name":"buyerLoginPassword","type":"sandboxCredential","required":true},{"name":"buyerPayPassword","type":"sandboxCredential","required":true}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION"],"variants":{"FULL":{"templateLines":["可选:体验 AI 按量付费沙箱付款","","付款链接(复制到网页浏览器打开):{{paymentUrl}}","沙箱买家账号:{{buyerAccount}}","登录密码:{{buyerLoginPassword}}","支付密码:{{buyerPayPassword}}"]}}},{"messageId":"webpay.sandbox.experience","owner":"catalog_owned","trigger":"integration.webpay.sandbox_experience","blocking":false,"allowedReplies":[],"variables":[{"name":"startCommand","type":"command","required":true},{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"buyerAccount","type":"singleLine","required":true},{"name":"buyerLoginPassword","type":"sandboxCredential","required":true},{"name":"buyerPayPassword","type":"sandboxCredential","required":true},{"name":"resultPageInstruction","type":"enum","required":true,"values":["付款后确认浏览器自动返回商户结果页,页面可正常展示并通过服务端查询呈现订单状态。","付款后不会自动返回商户网站;请手动返回商户订单查询页并刷新或查询订单状态。"]}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION"],"variants":{"DEFAULT":{"templateLines":["AI 网页应用收款沙箱付款指引","","1. 启动服务:`{{startCommand}}`","2. 在浏览器打开:{{paymentUrl}}","3. 在沙箱收银台二选一:使用沙箱买家账号登录,或仅在 Android 沙箱支付宝中扫描收银台页面二维码。","4. 沙箱买家账号:{{buyerAccount}}","5. 登录密码:{{buyerLoginPassword}}","6. 支付密码:{{buyerPayPassword}}","7. {{resultPageInstruction}}","","沙箱测试环境不稳定,可能出现跳转到支付宝收银台页面后报错,如:504 Gateway Time-out;输入完测试买家账号后展示系统繁忙;输入完测试买家支付密码后展示系统繁忙。您可以回到支付页重新发起支付以完成沙箱测试。","","前台页面和同步回跳参数不是支付成功依据,最终以验签通过的异步通知或交易查询为准。用户暂不付款只记为待体验,不得表述为沙箱测试通过。"]}}},{"messageId":"sandbox.android.client","owner":"catalog_owned","trigger":"integration.sandbox_android_client","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["沙箱支付宝当前仅支持 Android。请复制以下支付宝官方地址到网页浏览器打开,并扫描屏幕二维码下载沙箱版支付宝安装包:","","https://mdn.alipayobjects.com/sandboxsys/afts/img/_itHRrdOD9oAAAAAAAAAAAAADgSLAQBr/original","","如果直链或页面二维码无法打开,请前往支付宝开放平台-沙箱工具页下载:","","https://open.alipay.com/develop/sandbox/tool"]}}},{"messageId":"webpay.sandbox.experience.windows","owner":"catalog_owned","trigger":"integration.webpay.sandbox_experience.windows","blocking":false,"allowedReplies":[],"variables":[{"name":"startCommand","type":"command","required":true},{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"resultPageInstruction","type":"enum","required":true,"values":["付款后确认浏览器自动返回商户结果页,页面可正常展示并通过服务端查询呈现订单状态。","付款后不会自动返回商户网站;请手动返回商户订单查询页并刷新或查询订单状态。"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["AI 网页应用收款沙箱付款指引","","1. 启动服务:`{{startCommand}}`","2. 在浏览器打开:{{paymentUrl}}","3. 在沙箱收银台使用支付宝开放平台控制台中的沙箱买家账号登录,或仅在 Android 沙箱支付宝中扫描收银台页面二维码。","4. 登录密码和支付密码请直接从本机保存的信息或支付宝开放平台控制台取得,无需再次提供给 Agent。","5. {{resultPageInstruction}}","","沙箱测试环境不稳定,可能出现跳转到支付宝收银台页面后报错,如:504 Gateway Time-out;输入完测试买家账号后展示系统繁忙;输入完测试买家支付密码后展示系统繁忙。您可以回到支付页重新发起支付以完成沙箱测试。","","前台页面和同步回跳参数不是支付成功依据,最终以验签通过的异步通知或交易查询为准。用户暂不付款只记为待体验,不得表述为沙箱测试通过。"]}}},{"messageId":"integration.safety.closeout","owner":"catalog_owned","trigger":"integration.step7.safety","blocking":false,"allowedReplies":[],"variables":[{"name":"acceptanceSummary","type":"singleLine","required":true}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"AIPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- `Payment-Proof` 必须调用 `alipay.aipay.agent.payment.verify` 验证;无效或过期凭证拒绝服务,结果不明时不得要求用户重复付款。","- 资源交付后必须调用 `alipay.aipay.agent.fulfillment.confirm`;履约确认失败必须可重试且保持幂等。","- 沙箱配置仅用于开发调试;正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥,并将 `api_mock_service_id` 替换为真实 `serviceId`。`serviceId` 获取方式:支付宝扫码登录支付宝 AI 付站点 → 控制台 → 服务管理 → 复制审核已通过的服务 ID:https://aipay.alipay.com/?from=alipay-aipay-skill","- 收款商户 PID/2088 用于 AI 按量付费 `seller_id` 和 `seller_unique_id`,不由 Agent 猜测。获取方式:支付宝扫码登录支付宝商家平台 → 点击头像 → 复制账户名下方 2088 开头的商家 ID:https://b.alipay.com/page/portal/home","- 生产环境必须严格校验本地订单、金额与资源关系;正式收款必须完成 `Payment-Proof` 验付和异步履约回执确认。","","当前验收口径:{{acceptanceSummary}}"]},"WEBPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- 同步回跳和前台结果不作为支付成功依据;必须以验签通过的异步通知或交易查询为准。","- 正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥。","- AI 网页应用收款生产上线必须配置并联调公网 HTTPS `notify_url`;异步通知必须验签、校验关键字段、幂等处理并返回 `success`,同时配置交易查询补偿。若当前仅完成本地生产参数验收,该项仍需在上线前补齐;localhost、局域网地址或其他不可公网访问的地址不能用于生产异步通知。支付结果不明时不得要求用户重复付款。","","当前验收口径:{{acceptanceSummary}}"]},"APPPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入 APP 客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- 客户端支付结果不作为成功依据;必须以验签通过的异步通知或服务端交易查询为准。","- 正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥。","- AI 移动应用收款生产上线必须配置并联调公网 HTTPS `notify_url`;异步通知必须验签、校验关键字段、幂等处理并返回 `success`,同时配置交易查询补偿。若当前仅完成本地生产参数验收,该项仍需在上线前补齐;localhost、局域网地址或其他不可公网访问的地址不能用于生产异步通知。支付结果不明时不得要求用户重复付款。","- 本轮代码开发只覆盖商家服务端;APP 客户端仍需接入支付宝客户端 SDK,使用服务端返回的 `orderStr` 调起支付,并与服务端异步通知或交易查询完成联调。","","当前验收口径:{{acceptanceSummary}}"]}}},{"messageId":"integration.checklist.result","owner":"catalog_owned","trigger":"integration.checklist.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"overallResult","type":"enum","required":true,"values":["通过","部分通过","未通过"]},{"name":"failedItems","type":"singleLine","required":true},{"name":"manualItems","type":"singleLine","required":true},{"name":"sandboxResult","type":"enum","required":false,"values":["AI 按量付费沙箱服务端联调通过","AI 按量付费沙箱服务端联调未通过"]},{"name":"webpayExperienceResult","type":"enum","required":false,"values":["已提供浏览器付款入口和操作指引,实际付款及结果验证仍以用户完成情况为准","未提供浏览器付款入口或完整操作指引,需先补齐","已提供浏览器付款入口和操作指引;用户已完成一笔沙箱付款,结果只按实际核验证据记录"]},{"name":"sandboxConfigState","type":"enum","required":true,"values":["READY","CREATE_PENDING","VERIFY_PENDING"]},{"name":"blockingDefectState","type":"enum","required":true,"values":["NONE","PRESENT"]},{"name":"executionMode","type":"enum","required":true,"values":["仅代码开发","完整接入"]},{"name":"nextFlowReminder","type":"enum","required":true,"values":["正式上线前还需完成支付产品-产品开通。","代码开发校验通过后将自动进入支付产品-产品开通;未通过时停留在代码开发。","沙箱配置尚未完成,但不阻塞本轮继续支付产品-产品开通;完成配置后再进行沙箱测试。","代码开发自动校验已完成,仍有人工待验证项;本轮继续产品开通。"]}],"requiredPolicyIds":[],"variants":{"AIPAY_PASSED":{"templateLines":["AI 按量付费代码开发校验通过。","","{{nextFlowReminder}}"]},"AIPAY_INCOMPLETE":{"templateLines":["AI 按量付费代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]},"WEBPAY_PASSED":{"templateLines":["AI 网页应用收款代码开发校验通过。","","{{nextFlowReminder}}"]},"WEBPAY_INCOMPLETE":{"templateLines":["AI 网页应用收款代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]},"APPPAY_PASSED":{"maintenanceTodo":"TODO: 后续确定 AI 移动应用收款沙箱测试的对客引导动作后,在本变体补充;同步 integration flow、checklist 和测试。","templateLines":["AI 移动应用收款代码开发校验通过。","","{{nextFlowReminder}}"]},"APPPAY_INCOMPLETE":{"maintenanceTodo":"TODO: 后续确定 AI 移动应用收款沙箱测试的对客引导动作后,在本变体补充;同步 integration flow、checklist 和测试。","templateLines":["AI 移动应用收款代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]}}},{"messageId":"auth.pending","owner":"catalog_owned","trigger":"AUTH_FLOW:PENDING","blocking":true,"allowedReplySet":"affirmative","inputHintType":"authorizationComplete","variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["支付宝授权尚未完成,当前流程保持等待,请在已打开的网页二维码页面完成扫码确认后,再回复当前授权提示。"]}}},{"messageId":"auth.expired","owner":"catalog_owned","trigger":"AUTH_FLOW:EXPIRED","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["本次支付宝授权链接已过期,旧链接和旧回复均已失效。正在重新生成授权链接,请使用新的授权页面完成授权。"]}}},{"messageId":"auth.mismatch","owner":"catalog_owned","trigger":"AUTH_FLOW:SCOPE_MISMATCH|MCC_MISMATCH","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["当前授权范围或经营类目不匹配,需要退出当前登录并重新生成授权页面。"]}}},{"messageId":"error.mcp.auth","owner":"catalog_owned","trigger":"error.mcp_auth","blocking":false,"allowedReplies":[],"variables":[{"name":"errorMessage","type":"customerErrorText","required":false}],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING","P-SENSITIVE-STATE"],"variants":{"START":{"templateLines":["🔐 未登录或授权已过期","","当前登录状态已失效,无法继续操作。MCP 调用返回认证错误,正在退出当前登录。"]},"LOGOUT_UNCONFIRMED":{"templateLines":["无法确认退出当前登录结果,已停止重新授权。","","这通常表示当前 Agent 执行环境缺少联网权限、CLI wrapper 混入输出,或 stdout/stderr 无法唯一解析;不代表用户本机 logout 失败,也不能据此判断支付宝业务失败。","","Agent 应申请可联网权限后重试同一动作;不要要求用户手动 logout 代替本轮事实。"]},"LOGOUT_FAILED":{"templateLines":["退出当前登录失败,已停止重新授权。","错误信息:{{errorMessage}}","","请先重试退出登录;确认退出成功后再重新授权。"]},"LOGOUT_SUCCESS":{"templateLines":["已退出登录状态。","","请重新执行登录授权流程:生成授权链接后,使用支付宝扫码授权,授权成功后继续当前操作。","","产品、MCC 和授权范围未变化时,沿用已有确认立即重新生成授权链接;发生变化时先重新确认受影响内容。"]}}},{"messageId":"error.mcp.service","owner":"catalog_owned","trigger":"error.mcp_service","blocking":false,"allowedReplies":[],"variables":[{"name":"errorDetail","type":"customerErrorText","required":false}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-SENSITIVE-STATE"],"variants":{"AGENT_NETWORK":{"templateLines":["MCP 服务暂时不可用。","","当前命令需要访问支付宝服务,但当前 Agent 执行环境可能没有外网权限。Agent 应申请可联网权限后重试同一条命令,不要要求用户排查本机网络,也不要更换业务参数。","","请授权 Agent 联网重试,或稍后重新执行当前命令。"]},"GENERIC":{"templateLines":["MCP 服务暂时不可用。","","无法连接到支付宝服务,请稍后重试。","错误详情:{{errorDetail}}","","当前动作已停止重试;由主流程记录受影响分支,并在不受其依赖的情况下继续其他分支。本轮收口时将一次说明未恢复的动作、受影响分支和后续恢复方式。"]}}},{"messageId":"error.backend","owner":"catalog_owned","trigger":"error.backend_business","blocking":false,"allowedReplies":[],"variables":[{"name":"errorCode","type":"customerErrorText","required":true},{"name":"errorMessage","type":"customerErrorText","required":true},{"name":"errorScene","type":"customerErrorText","required":false},{"name":"errorSpecific","type":"customerErrorText","required":false},{"name":"checkedErrors","type":"customerErrorDetails","required":false},{"name":"bizTips","type":"customerErrorText","required":false},{"name":"appMax","type":"enum","required":true,"values":["YES","NO"]},{"name":"errorSceneLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"checkedErrorsBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"bizTipsLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"appMaxLine","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["业务处理失败。","","错误码:{{errorCode}}","错误信息:{{errorMessage}}","{{errorSceneLine}}","","{{checkedErrorsBlock}}","","{{bizTipsLine}}","","{{appMaxLine}}","","当前业务错误不会自动重试;请先按以上错误信息修正受影响分支的业务条件。","如需帮助,请联系技术支持并提供以上脱敏错误信息。"]}}},{"messageId":"error.service.unstable","owner":"catalog_owned","trigger":"error.service_unstable","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["MCP 服务暂时不稳定。","","当前动作已停止重试;由主流程记录受影响分支,并在不受其依赖的情况下继续其他分支。","本轮收口时将一次说明未恢复的动作、受影响分支和后续恢复方式。"]}}},{"messageId":"error.cli","owner":"catalog_owned","trigger":"error.cli_output","blocking":false,"allowedReplies":[],"variables":[{"name":"errorMessage","type":"customerErrorText","required":true},{"name":"bizTips","type":"customerErrorText","required":false},{"name":"checkedErrors","type":"customerErrorDetails","required":false},{"name":"bizTipsLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"checkedErrorsBlock","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["命令执行失败:{{errorMessage}}","{{bizTipsLine}}","{{checkedErrorsBlock}}"]}}},{"messageId":"integration.service.not_ready","owner":"catalog_owned","trigger":"integration.a2m.service_not_ready","blocking":false,"allowedReplies":[],"variables":[{"name":"recoveryAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-A2M-SUCCESS"],"variants":{"DEFAULT":{"templateLines":["AI 按量付费本地服务尚未达到自动联调前置条件。","","需要处理:{{recoveryAction}}","","该条件未满足前不会运行自动联调,也不会把服务标记为可用。"]}}},{"messageId":"integration.project_path.required","owner":"catalog_owned","trigger":"integration.project_path.unresolved","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["现有项目及文件保持不变。请在一条回复中说明新项目要放在哪里;可以说“在当前目录新建 pay-demo”、提供当前目录下的新子目录名,或提供电脑上的完整路径。若不想指定位置,可以说“新建项目”或“帮我新建默认项目”,我会在用户目录下选择安全的新目录并告知项目地址。路径解析和确认完成前不会创建或修改文件。"]}}},{"messageId":"integration.context.required","owner":"catalog_owned","trigger":"integration.context.unresolved","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"missingItems","type":"enumList","required":true,"values":["项目路径","技术栈"]}],"requiredPolicyIds":["P-PROJECT-PROTECT"],"variants":{"DEFAULT":{"templateLines":["为继续代码开发,请先确定:{{missingItems}}。","","- 要新建项目:可以说“在当前目录新建 pay-demo”,或提供一个新的文件夹位置;不想指定位置时,可以说“新建项目”或“帮我新建默认项目”。","- 要复用已有项目:请告诉我项目文件夹;如果不知道在哪,可以说“帮我在当前目录下找项目”;如果大概知道在哪,可以说“帮我在 server 下找项目”。我会先定位候选目录,再让你选择。","- “当前项目/当前目录”只有在当前目录本身就是可识别项目根时才会使用;否则不会扫描整个大目录。","- 技术栈:例如 Node.js + Express、Java + Spring Boot、Python + Flask、PHP + Laravel、C# + ASP.NET;不确定时可以说“请推荐默认技术栈”。","","项目和技术栈明确前,不会创建或修改文件。"]},"PROJECT_PATH_ONLY":{"templateLines":["为继续代码开发,请先确定:{{missingItems}}。","","- 要新建项目:可以说“在当前目录新建 pay-demo”,或提供一个新的文件夹位置;不想指定位置时,可以说“新建项目”或“帮我新建默认项目”。","- 要复用已有项目:请告诉我项目文件夹;如果不知道在哪,可以说“帮我在当前目录下找项目”;如果大概知道在哪,可以说“帮我在 server 下找项目”。我会先定位候选目录,再让你选择。","- “当前项目/当前目录”只有在当前目录本身就是可识别项目根时才会使用;否则不会扫描整个大目录。","","项目路径明确前,不会创建或修改文件。"]}}},{"messageId":"integration.project_candidates.select","owner":"catalog_owned","trigger":"integration.project_candidates.located","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"searchBasePath","type":"existingPath","required":true},{"name":"candidateRows","type":"string","required":true}],"requiredPolicyIds":["P-PROJECT-PROTECT"],"variants":{"DEFAULT":{"templateLines":["我先在 `{{searchBasePath}}` 下做了轻量项目定位;这里只看项目标记文件,不扫描代码内容。","","{{candidateRows}}","","如果要复用已有项目,请回复候选序号或具体项目文件夹。","如果要新建项目,可以回复“在当前目录新建 pay-demo”,或直接回复“新建项目”使用用户目录下的默认安全目录。","","选定具体项目目录前,不会扫描整个大目录,也不会创建或修改文件。"]}}},{"messageId":"integration.local_acceptance.notice","owner":"catalog_owned","trigger":"integration.local_acceptance.enabled","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["当前使用本地生产参数验收模式:本轮可以暂不发起公网异步通知,但生产上线前必须恢复并验证 `notify_url`。这不是生产最终配置,也不能据此宣称生产就绪。"]}}},{"messageId":"application.reuse.no_key","owner":"catalog_owned","trigger":"FLOW:REUSE_NO_KEY","blocking":false,"allowedReplies":[],"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-KEY-PUBLIC-USER"],"variants":{"DEFAULT":{"templateLines":["应用 `{{appId}}` 当前为可复用的上线应用,但尚未确认 RSA2 应用公钥,应用分支仍未完成。","","接下来需要为该应用设置应用公钥;如果你已经准备好应用公钥,请直接提供。","","本次不会自动下载支付宝开放平台密钥工具。如需我下载请直接说明,或访问官方地址手动下载:{{keyToolManual}}","只向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。","","如果不想继续复用这个应用,请说明要重新选择或新建应用。"]}}},{"messageId":"application.candidates.facts","owner":"catalog_owned","trigger":"application.candidates.queried","blocking":false,"allowedReplies":[],"variables":[{"name":"applicationType","type":"enum","required":true,"values":["WEBAPP","MOBILEAPP"]},{"name":"applicationCandidates","type":"applicationCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-KEY-TOOL-DOWNLOAD"],"variants":{"EMPTY":{"templateLines":["📋 暂无 {{applicationType}} 应用。","","支付宝开放平台密钥工具可用于生成应用公私钥对。无论是否需要自动下载,都可以访问官方地址:","{{keyToolManual}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"PENDING_ONLY":{"templateLines":["📋 当前已有以下尚未上线的 {{applicationType}} 应用:","","{{candidateTable}}","","以上应用当前不可复用。"]},"ONLINE_WITH_OPTIONAL_PENDING":{"templateLines":["📋 发现您已有以下上线 {{applicationType}} 应用:","","{{candidateTable}}"]}}},{"messageId":"application.candidate.invalid","owner":"catalog_owned","trigger":"application.candidates.selection_invalid","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["上一次回复未匹配当前应用候选或支持的选择格式。已重新展示当前候选,请按下方方式重新选择。","序号、非上线、历史或候选外 `appId` 均不会触发应用操作。"]}}},{"messageId":"application.candidate.select","owner":"catalog_owned","trigger":"application.candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":[],"variants":{"ONLINE_WEB_OR_NEW":{"templateLines":["请选择应用分支下一步:","","- 回复上方事实表中状态为“已上线”的完整 `appId`:复用对应应用。","- 新建应用:在同一条回复中提供 `新建` 和应用公钥,材料完整后将创建应用、设置公钥并进入公钥确认。","","新建回复示例(请替换为实际内容):","```text","新建","应用公钥:<你自行生成的完整应用公钥>","```","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","只向 Agent 提供【应用公钥】,请勿提供应用私钥。","","候选、状态或目标变化后旧回复自动失效;不接受序号、历史候选或其他 `appId`。"]},"PENDING_WEB_OR_NEW":{"templateLines":["当前同类型应用均未上线,不能复用。","","- 新建应用:在同一条回复中提供 `新建` 和应用公钥,材料完整后将创建应用、设置公钥并进入公钥确认。","- 回复 `暂不新建`:本轮应用分支保持待办。","","新建回复示例(请替换为实际内容):","```text","新建","应用公钥:<你自行生成的完整应用公钥>","```","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"ONLINE_MOBILE_OR_NEW":{"templateLines":["请选择应用分支下一步:","","- 回复上方事实表中状态为“已上线”的完整 `appId`:复用对应应用。","- 新建 `IOS`:回复 `新建 IOS`、iOS Bundle ID(`bundleId`)和应用公钥。","- 新建 `ANDROID`:回复 `新建 ANDROID`、Android 应用包名(`appPackage`)、Android 应用签名摘要(`appSign`)和应用公钥。","- 新建 `ALL`:回复 `新建 ALL`、iOS Bundle ID(`bundleId`)、Android 应用包名(`appPackage`)、Android 应用签名摘要(`appSign`)和应用公钥。","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","只向 Agent 提供【应用公钥】,请勿提供应用私钥。","","候选、状态或目标变化后旧回复自动失效;不接受序号、历史候选或其他 `appId`。"]},"PENDING_MOBILE_OR_NEW":{"templateLines":["当前同类型应用均未上线,不能复用。","","- 新建 `IOS`:回复 `新建 IOS`、iOS Bundle ID(`bundleId`)和应用公钥。","- 新建 `ANDROID`:回复 `新建 ANDROID`、Android 应用包名(`appPackage`)、Android 应用签名摘要(`appSign`)和应用公钥。","- 新建 `ALL`:回复 `新建 ALL`、iOS Bundle ID(`bundleId`)、Android 应用包名(`appPackage`)、Android 应用签名摘要(`appSign`)和应用公钥。","- 回复 `暂不新建`:本轮应用分支保持待办。","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]}}},{"messageId":"application.operation.result","owner":"catalog_owned","trigger":"application.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"actualStatus","type":"singleLine","required":true},{"name":"nextAction","type":"singleLine","required":false},{"name":"appKeySavePath","type":"singleLine","required":false},{"name":"appKeySaveLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"manualConfigurationNextAction","type":"string","required":false,"derived":true,"values":["前往支付宝 AI 付站点,进入一站式接入 → 密钥配置,按当前 appId 获取对应的支付宝公钥,并手动配置到项目:https://aipay.alipay.com/?from=alipay-aipay-skill"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["应用 `{{appId}}` 的实际状态:{{actualStatus}}。","{{appKeySaveLine}}","","下一步:{{nextAction}}","","待审核、待设置公钥或待人工配置时不会表述为应用发布完成。"]},"ALIPAY_PUBLIC_KEY_MANUAL_CONFIGURATION":{"templateLines":["应用 `{{appId}}` 的实际状态:需人工配置。","","下一步:{{manualConfigurationNextAction}}","","待人工配置时不会表述为应用发布完成。"]}}},{"messageId":"application.harmony.manual_create","owner":"catalog_owned","trigger":"application.harmony.manual_create","blocking":true,"allowedReplySet":"affirmative","inputHintType":"complete","variables":[],"requiredPolicyIds":["P-MCP-CONTRACT-FROZEN"],"variants":{"DEFAULT":{"templateLines":["当前 Skill 不支持创建 HarmonyOS 移动应用。","","请前往支付宝开放平台,进入“控制台” → “创建移动应用”,完成平台要求的创建、配置和审核:https://open.alipay.com/","","完成后将重新查询移动应用列表。"]}}},{"messageId":"service.operation.result","owner":"catalog_owned","trigger":"service.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceId","type":"singleLine","required":true},{"name":"actualResult","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["服务市场实际结果:{{actualResult}}。","已确认的 `serviceId`:`{{serviceId}}`。","","查看服务状态和服务详情:请前往支付宝 AI 付站点,登录后进入控制台 → 服务管理。","https://aipay.alipay.com/?from=alipay-aipay-skill","","该结果只代表服务分支,不会覆盖签约或应用分支的实际状态。"]}}},{"messageId":"signing.operation.result","owner":"catalog_owned","trigger":"signing.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"actualStatus","type":"singleLine","required":true},{"name":"feeDisplay","type":"singleLine","required":false},{"name":"nextAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"WITHOUT_FEE":{"templateLines":["产品当前签约状态:{{actualStatus}}。","","下一步:{{nextAction}}"]},"WITH_FEE":{"templateLines":["产品当前签约状态:{{actualStatus}}。","费率:{{feeDisplay}}","","下一步:{{nextAction}}"]}}},{"messageId":"service.candidates.facts","owner":"catalog_owned","trigger":"service.candidates.queried","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceCandidates","type":"serviceCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"EMPTY":{"templateLines":["📋 暂无已有服务。"]},"DEFAULT":{"templateLines":["📋 发现您已有以下服务:","","{{candidateTable}}"]}}},{"messageId":"service.candidate.invalid","owner":"catalog_owned","trigger":"service.candidates.selection_invalid","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["上一次回复没有匹配到有效的服务操作。","仅回复序号,或提供不在当前事实表中的 `serviceId`,均不会触发服务操作。"]}}},{"messageId":"service.candidate.select","owner":"catalog_owned","trigger":"service.candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["请选择下一步:","","- 回复上方事实表中的完整 `serviceId`:复用对应服务。","- 新建服务:回复 `新建`,并在同一条回复中提供服务名称、服务描述、服务地址、服务单价、请求示例 JSON。","- 回复 `修改:<serviceId>`:修改对应服务。","","- 如果只回复 `新建` 或材料不完整,我会再提示补充缺失项。","","新建回复示例(请替换为实际内容):","```text","新建","服务名称:天气查询","服务描述:按城市查询天气","服务地址:以 http:// 或 https:// 开头的实际服务地址","服务单价:0.08 元/次","请求示例 JSON:{\"city\":\"杭州\"}","```","","如需核对服务状态或服务详情,可前往支付宝 AI 付站点,登录后进入控制台 → 服务管理查看。","https://aipay.alipay.com/?from=alipay-aipay-skill"]}}},{"messageId":"service.id.missing","owner":"catalog_owned","trigger":"service.save.id_missing","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceName","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["服务 `{{serviceName}}` 的创建或修改调用已返回成功,但未解析到 `serviceId`,因此服务分支尚未完成。接下来会重新查询完整服务列表,并使用本次实际提交资料与列表可见字段做唯一匹配;没有唯一结果时保持未知。在取得实际 `serviceId` 前不会宣称 AI 按量付费产品开通完成。","","如需自行核对服务状态或服务详情,可前往支付宝 AI 付站点,登录后进入控制台 → 服务管理查看。","https://aipay.alipay.com/?from=alipay-aipay-skill"]}}}]}
|
|
1
|
+
{"schemaVersion":1,"interactionPrompts":{"confirmInputHint":"如确认,可以回复“继续”“确认”“OK”,也可以输入 1;如需调整,请直接说明。","planAdjustmentHint":"我会继续执行,无需回复;如需调整方案,请中断 Agent 执行并说明。","authorizationCompletionInputHint":"授权完成后可回复“继续”“好了”“OK”或输入 1","publicKeyConfirmationCompletionInputHint":"支付宝扫码确认应用公钥完成后可回复“继续”“好了”“OK”或输入 1","completionInputHint":"完成后可回复“继续”“好了”“已完成”“OK”或输入 1;如需调整,请直接说明。","scanReturnHint":"扫码完成后请回到 Agent 对话页面"},"interactionReplySets":{"affirmative":["1","继续","继续推进","继续执行","继续处理","继续下一步","请继续","请继续推进","继续吧","确认","确认继续","确定","同意","可以","可以继续","可以继续推进","没问题","好","好的","好了","好的继续","已完成","完成","完成了","操作完成","操作好了","已经完成","已经好了","处理好了","确认好了","弄好了","OK","Okay","Yes","Y"]},"messages":[{"messageId":"product.unsupported","owner":"catalog_owned","trigger":"route.unsupported_product","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"singleLine","required":true}],"requiredPolicyIds":["P-MCP-CONTRACT-FROZEN"],"variants":{"DEFAULT":{"templateLines":["当前 Skill 只支持接入 AI 按量付费、AI 网页应用收款和 AI 移动应用收款,不支持 `{{productName}}`。","","- 查看支付宝其他收单产品请前往:[支付宝开放平台](https://open.alipay.com)","- 开通支付宝其他收单产品请前往:[支付宝商家平台](https://b.alipay.com/page/portal/home)"]}}},{"messageId":"onboarding.enterprise.unsupported","owner":"catalog_owned","trigger":"onboarding.enterprise_account","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"ONBOARDING_ONLY":{"templateLines":["暂不支持企业账号通过 Skill 完成产品开通。","","请前往支付宝商家平台开通:https://b.alipay.com/page/portal/home","","如需继续进行代码开发,试试对 Agent 说:为我集成 AI 网页应用收款/AI 移动应用收款/AI 按量付费"]},"FULL_PROCESS":{"templateLines":["暂不支持企业账号通过 Skill 完成产品开通。","","请前往支付宝商家平台开通:https://b.alipay.com/page/portal/home"]}}},{"messageId":"onboarding.windows.redirect","owner":"catalog_owned","trigger":"onboarding.windows_platform","blocking":false,"allowedReplies":[],"variables":[{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"windowsOnboardingRedirect"}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["当前为 Windows 系统,请您暂时前往支付宝 AI 付站点完成产品开通:","{{officialUrl}}"]}}},{"messageId":"product.clarify","owner":"catalog_owned","trigger":"route.product_unclear","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["请确认您的业务场景:","","1. AI 按量付费:买家通过 Agent 使用支付宝完成支付,适用于 API、MCP、算力资源等按调用付费。","2. AI 网页应用收款:买家在电脑网页或手机浏览器页面使用支付宝付款。","3. AI 移动应用收款:买家在 APP 内调起支付宝完成付款。"]}}},{"messageId":"onboarding.mcc.clarify","owner":"catalog_owned","trigger":"onboarding.mcc_unclear","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["MCC 与经营类目强相关,无法仅从“{{productName}}”确定。","","请补充本次接入的经营内容,例如:","","- 电商购物(实物商品销售)","- 在线工具","- 软件开发服务","- 售卖宠物用品","","也可以直接提供你已知的 MCC 二级类目名称或编码。"]}}},{"messageId":"onboarding.mcc.no_match","owner":"catalog_owned","trigger":"onboarding.mcc_search.none","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["没有匹配到符合描述的经营类目,请重新澄清经营描述。"]}}},{"messageId":"onboarding.mcc.candidates","owner":"catalog_owned","trigger":"onboarding.mcc_candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"runtime_enum","variables":[{"name":"mccCandidates","type":"mccCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["我找到了几个可能匹配的经营类目,请选择最接近的一项:","","{{candidateTable}}","","请回复序号、MCC 二级类目名称或编码;如果都不匹配,请补充实际销售的商品或服务类型。"]}}},{"messageId":"integration.start.confirm","owner":"catalog_owned","trigger":"integration.step2.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"planAdjustment","variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"projectPath","type":"path","required":true},{"name":"projectOriginLabel","type":"enum","required":true,"values":["现有项目","本轮新建项目"]},{"name":"integrationStatus","type":"enum","required":true,"values":["TARGET_PARTIAL","OTHER_PRODUCT_ONLY","NO_PAYMENT"]},{"name":"otherProducts","type":"singleLine","required":false},{"name":"language","type":"singleLine","required":true},{"name":"framework","type":"singleLine","required":true},{"name":"nextFlow","type":"enum","required":true,"values":["integration"]}],"requiredPolicyIds":["P-PROJECT-PROTECT","P-SENSITIVE-STATE"],"variants":{"AIPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | {{productName}} |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]},"WEBPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | AI 网页应用收款 |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]},"APPPAY":{"templateLines":["代码开发方案:","","| 项目 | 内容 |","|---|---|","| 目标产品 | AI 移动应用收款 |","| 项目路径 | `{{projectPath}}` |","| 项目来源 | {{projectOriginLabel}} |","| 代码开发状态 | {{integrationStatus}} |","| 检测到的其他支付产品 | {{otherProducts}} |","| 语言 / 框架 | {{language}} / {{framework}} |","","【前置提醒】接 AI 移动应用收款需要你有自己的 APP,本轮代码开发主要覆盖商家服务端支付接口的实现,APP 还需接入支付宝客户端 SDK 后才能调起支付。你可以在当前 AI 移动应用收款服务端代码开发完毕后,对 Agent 说:“给我做个 APP /给我的 APP 接支付宝客户端 SDK /把我的 APP 客户端和接了支付宝的服务端联动起来”。","","服务声明:","1. 使用本服务需遵守法律法规、自行审核测试并承担使用责任,我方不对使用效果、正确性担保。","2. 生产环境账号密码、API Keys、应用私钥等敏感信息切勿暴露给 Agent;仅沙箱环境信息可按本 Skill 的沙箱配置流程提供和使用。"]}}},{"messageId":"onboarding.plan.confirm","owner":"catalog_owned","trigger":"onboarding.step2.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"planAdjustment","variables":[{"name":"mccCode","type":"mccCode","required":true},{"name":"mccName","type":"singleLine","required":true},{"name":"mccContextReceipt","type":"string","required":true},{"name":"mccQualification","type":"singleLine","required":true}],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"AIPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 按量付费 |","| 产品码 | `I1080300001000160457` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,machine_pay:write,agmnt:write` |","| 材料预告 | 1、签约申请无需页面截图;2、新建或修改服务时收集服务资料;3、新建应用设置应用公钥时由用户提供 |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]},"WEBPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 网页应用收款 |","| 产品码 | `I1080300001000041203` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,fast_instant_trade_pay:write` |","| 材料预告 | 1、未签约时收集首页、商品页、支付页 3 张截图;支付页是展示支付宝付款方式,等待用户去支付的页面;2、新建应用设置应用公钥时由用户提供 |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]},"APPPAY":{"templateLines":["产品开通方案:","","| 项目 | 内容 |","|---|---|","| 产品 | AI 移动应用收款 |","| 产品码 | `I1080300001000041313` |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 特殊资质 | {{mccQualification}} |","| 授权范围 | `app:all,auth_alipay_apppay:write` |","| 材料预告 | 1、未签约时收集 APP 名称和首页、商品页、支付页 3 张截图;支付页是展示支付宝付款方式,等待用户去支付的页面;2、新建应用支持 iOS、Android 或 ALL(二者同时);3、新建应用设置应用公钥时由用户提供 |","| 特别提醒 | 鸿蒙系统移动应用暂不支持通过 Skill 创建,请前往支付宝开放平台-控制台手动创建:https://open.alipay.com/ |","","你也可以选择前往支付宝 AI 付站点完成产品开通:","https://aipay.alipay.com/?from=alipay-aipay-skill","","暂不支持企业账号通过 Skill 完成产品开通,企业账号如需开通请前往支付宝商家平台(https://b.alipay.com/page/portal/home)"]}}},{"messageId":"auth.page","owner":"catalog_owned","trigger":"AUTH_FLOW:READY_TO_OPEN","blocking":false,"allowedReplies":[],"postRenderHintType":"scanReturn","expiresWithPrompt":true,"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"deviceCode","type":"singleLine","required":true},{"name":"mccCode","type":"mccCode","required":true},{"name":"mccName","type":"singleLine","required":true},{"name":"mccContextReceipt","type":"string","required":true},{"name":"verificationCode","type":"singleLine","required":true},{"name":"expiresDisplay","type":"singleLine","required":true},{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"authorization"}],"requiredPolicyIds":["P-AUTH-URL","P-AUTH-URL-AUTO-OPEN"],"variants":{"READY":{"templateLines":["接下来会自动打开支付宝扫码授权页面,请在页面中扫码完成授权。","","| 授权信息 | 内容 |","|---|---|","| 产品类型 | {{productName}} |","| 经营类目 | {{mccName}} (`{{mccCode}}`) |","| 确认码 | {{verificationCode}} |","| 授权链接有效期 | {{expiresDisplay}} |","","安全提示:支付宝扫码后,请核对授权页面显示的确认码是否与上方一致;如不一致,请勿授权并立即停止操作。确认码只用于核对,不需要输入。","","如果自动跳转失败,请复制下方链接到网页浏览器打开。","授权链接:","{{officialUrl}}"]}}},{"messageId":"auth.open.manual","owner":"catalog_owned","trigger":"AUTH_OPEN:OPEN_FAILED|GUI_UNAVAILABLE|LINK_ONLY","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-URL-AUTO-OPEN"],"variants":{"DEFAULT":{"templateLines":["未能自动打开支付宝授权页面,请手动打开上一条消息中的授权链接并完成扫码。我会继续检查授权结果,无需回复。"]}}},{"messageId":"application.key.page","owner":"catalog_owned","trigger":"application.key_page.ready","blocking":false,"allowedReplies":[],"postRenderHintType":"scanReturn","expiresWithPrompt":true,"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"officialUrl","type":"officialTemporaryUrl","required":true,"urlKind":"publicKeyConfirmation"}],"requiredPolicyIds":["P-KEY-URL","P-KEY-URL-AUTO-OPEN"],"variants":{"READY":{"templateLines":["接下来会自动打开应用 `{{appId}}` 的公钥确认页面,请打开支付宝扫码确认应用公钥。","","如果自动跳转失败,请复制下方链接到网页浏览器打开。","公钥确认链接:","{{officialUrl}}"]}}},{"messageId":"application.key.pending","owner":"catalog_owned","trigger":"FLOW:KEY_NOT_CONFIRMED","blocking":true,"allowedReplySet":"affirmative","inputHintType":"publicKeyConfirmationComplete","variables":[],"requiredPolicyIds":["P-KEY-PUBLIC-USER"],"variants":{"DEFAULT":{"templateLines":["应用公钥尚未确认,请先完成公钥设置确认。"]}}},{"messageId":"onboarding.discovery.summary","owner":"catalog_owned","trigger":"onboarding.discovery.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"signingStatus","type":"enum","required":true,"values":["未签约","已提交待生效","已生效","其他状态待核验","查询失败"]},{"name":"serviceStatus","type":"enum","required":false,"values":["无已有服务","已有服务候选","查询失败"]},{"name":"applicationStatus","type":"enum","required":true,"values":["无同类型应用","有上线应用可复用","仅有未上线应用","查询失败"]}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-MATERIAL-CATEGORY"],"variants":{"AIPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | {{serviceStatus}} |","| 应用发布 | {{applicationStatus}} |"]},"WEBPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | 无需处理 |","| 应用发布 | {{applicationStatus}} |"]},"APPPAY":{"templateLines":["当前查询结果:","","| 流程 | 当前状态 |","|---|---|","| 产品签约 | {{signingStatus}} |","| 服务市场 | 无需处理 |","| 应用发布 | {{applicationStatus}} |"]}}},{"messageId":"materials.category.collect","owner":"catalog_owned","trigger":"materials.category.ready","blocking":true,"allowedReplies":[],"replyMode":"freeform","expiresWithPrompt":true,"variables":[{"name":"categoryName","type":"enum","required":true,"values":["签约材料","服务资料","应用资料"]},{"name":"currentStatus","type":"enum","required":true,"values":["待补充","部分已提供,待补充","校验失败,需更正"]},{"name":"missingFields","type":"enumList","required":true,"values":["APP名称","首页截图","商品页截图","支付页截图","特殊资质材料","服务名称","服务描述","服务地址","服务单价","请求示例JSON","应用平台和对应资料","iOS Bundle ID(bundleId)","Android 应用包名(appPackage)","Android 应用签名摘要(appSign)","应用公钥"]},{"name":"paymentPageHint","type":"string","derived":true,"values":["支付页说明:支付页是展示支付宝付款方式,等待用户去支付的页面,不是支付成功页。"]},{"name":"serviceUrlHint","type":"string","derived":true,"values":["请提供有效的 URL 地址(以 http:// 或 https:// 开头)"]},{"name":"servicePricingHint","type":"string","derived":true,"values":["请提供不低于 0.01 元的有效服务单价,可输入 0.03、0.03元或 0.03 元/次。"]},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]},{"name":"specialQualificationHint","type":"string","required":false}],"requiredPolicyIds":["P-MATERIAL-CATEGORY"],"variants":{"INITIAL":{"templateLines":["当前收集类别:{{categoryName}}","","请在一条回复中提供:{{missingFields}}。","{{paymentPageHint}}","{{specialQualificationHint}}"]},"APP_WEB_INITIAL":{"templateLines":["当前收集类别:应用资料","","请在一条回复中提供【应用公钥】;请勿提供应用私钥。无需另行回复 `新建`。","","填写示例(请替换为实际内容):","```text","应用公钥:<你自行生成的完整应用公钥>","```","需要支付宝开放平台密钥工具时,可从官方地址下载:{{keyToolManual}}","","{{keyToolFormatHint}}"]},"APP_MOBILE_INITIAL":{"templateLines":["当前收集类别:应用资料","","请在一条回复中选择平台并提供以下材料:","","- iOS:我选择 iOS + iOS Bundle ID(bundleId)+【应用公钥】","- Android:我选择 Android + Android 应用包名(appPackage)+ Android 应用签名摘要(appSign)+【应用公钥】","- iOS + Android:我要同时支持两类系统 + iOS Bundle ID + Android 应用包名 + Android 应用签名摘要 +【应用公钥】","","填写示例(请替换为实际内容):","```text","我选择 Android","Android 应用包名(appPackage):com.example.app","Android 应用签名摘要(appSign):<你的 Android 应用签名摘要>","应用公钥:<你自行生成的完整应用公钥>","```","","请勿提供应用私钥。无需另行回复 `新建`。需要支付宝开放平台密钥工具时,可从官方地址下载:{{keyToolManual}}","","{{keyToolFormatHint}}","","注:鸿蒙系统移动应用暂不支持通过 Skill 创建,请前往支付宝开放平台-控制台手动创建:https://open.alipay.com/"]},"PARTIAL":{"templateLines":["当前收集类别:{{categoryName}}","","还需补充:{{missingFields}}。","{{paymentPageHint}}","{{specialQualificationHint}}","已校验字段无需重复提供。"]},"INVALID":{"templateLines":["当前收集类别:{{categoryName}}","","以下内容需要更正:{{missingFields}}。","{{serviceUrlHint}}","{{servicePricingHint}}","{{paymentPageHint}}","{{specialQualificationHint}}","已校验字段无需重复提供。"]},"SERVICE_INITIAL":{"templateLines":["当前收集类别:服务资料","","请在一条回复中提供:服务名称、服务描述、服务地址、服务单价、请求示例JSON。","","填写示例(请替换为实际内容):","```text","服务名称:天气查询","服务描述:按城市查询天气","服务地址:以 http:// 或 https:// 开头的实际服务地址","服务单价:0.08 元/次","请求示例 JSON:{\"city\":\"杭州\"}","```","{{specialQualificationHint}}"]}}},{"messageId":"service.create.summary","owner":"catalog_owned","trigger":"service.create.ready","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceName","type":"singleLine","required":true},{"name":"serviceDescription","type":"singleLine","required":true},{"name":"serviceUrl","type":"runtimeUrl","required":true},{"name":"servicePricing","type":"singleLine","required":true},{"name":"serviceSchema","type":"string","required":true}],"requiredPolicyIds":["P-SERVICE-WRITE","P-WRITE-UNKNOWN"],"variants":{"DEFAULT":{"templateLines":["将创建以下 AI 按量付费服务:","","服务名称:{{serviceName}}","服务描述:{{serviceDescription}}","服务地址:`{{serviceUrl}}`","服务单价:{{servicePricing}} 元/次","请求示例 JSON:","```json","{{serviceSchema}}","```"]}}},{"messageId":"onboarding.write.confirm","owner":"catalog_owned","trigger":"external_write.ready","blocking":true,"allowedReplySet":"affirmative","inputHintType":"confirm","expiresWithPrompt":true,"variables":[{"name":"sessionSummary","type":"singleLine","required":true},{"name":"subjectSummary","type":"singleLine","required":true},{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"actionTypes","type":"enumList","required":true,"values":["服务修改"]},{"name":"serviceId","type":"singleLine","required":false},{"name":"serviceName","type":"singleLine","required":false},{"name":"serviceDescription","type":"singleLine","required":false},{"name":"serviceUrl","type":"runtimeUrl","required":false},{"name":"servicePricing","type":"singleLine","required":false},{"name":"serviceSchema","type":"string","required":false}],"requiredPolicyIds":["P-SERVICE-WRITE","P-WRITE-UNKNOWN"],"variants":{"SERVICE_UPDATE_ONLY":{"templateLines":["请确认以下支付宝操作:","","- 当前会话:{{sessionSummary}}","- 操作主体:{{subjectSummary}}","- 产品:AI 按量付费","- 动作:服务修改","","服务ID:`{{serviceId}}`","服务名称:{{serviceName}}","服务描述:{{serviceDescription}}","服务地址:`{{serviceUrl}}`","服务单价:{{servicePricing}} 元/次","请求示例 JSON:","```json","{{serviceSchema}}","```","","本次只执行上述服务修改;签约、应用创建、公钥设置和应用提审不包含在本确认中。"]}}},{"messageId":"process.partial_result","owner":"catalog_owned","trigger":"process.current_endpoint","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"processResultTitle","type":"enum","required":true,"values":["支付产品-产品开通已完成","流程进展"]},{"name":"integrationResult","type":"enum","required":true,"values":["不在本轮执行范围","已完成","部分完成,沙箱配置待完成","部分完成,人工待验证","未完成","结果未知"]},{"name":"sandboxConfigState","type":"enum","required":false,"values":["READY","CREATE_PENDING","VERIFY_PENDING"]},{"name":"signingResult","type":"enum","required":true,"values":["未签约","已提交,等待生效","已生效","失败","结果未知"]},{"name":"serviceResult","type":"enum","required":true,"values":["无需处理","已复用","创建成功,状态未取得","修改成功,状态未取得","已完成","失败","结果未知"]},{"name":"applicationResult","type":"enum","required":true,"values":["待选择","已创建,待设置公钥","公钥待确认","HarmonyOS 应用待平台侧创建、配置或上线","已提交审核,等待上线","已上线且配置完整","需人工配置","失败","结果未知"]},{"name":"remainingActions","type":"singleLine","required":true},{"name":"manualVerificationItems","type":"singleLine","required":false},{"name":"applicationOperationAppId","type":"singleLine","required":false},{"name":"applicationOperationActualStatus","type":"singleLine","required":false},{"name":"applicationOperationNextAction","type":"singleLine","required":false},{"name":"applicationOperationAppKeySavePath","type":"singleLine","required":false},{"name":"applicationManualConfigurationNextAction","type":"string","required":false,"derived":true,"values":["前往支付宝 AI 付站点,进入一站式接入 → 密钥配置,按当前 appId 获取对应的支付宝公钥,并手动配置到项目:https://aipay.alipay.com/?from=alipay-aipay-skill"]},{"name":"applicationOperationBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"manualVerificationLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"productionReadinessBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"statusQueryHint","type":"enum","required":false,"derived":true,"values":["。这期间,你也可以试着对 Agent 说:“帮我查询产品签约状态”或“帮我查询应用状态”。"]},{"name":"sandboxRecoveryHint","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"nextFlowReminderLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"nextFlowReminder","type":"enum","required":true,"values":["还需完成支付产品-代码开发,才能在业务系统中实际发起支付。","代码开发已在本轮执行;后续只按上表实际待办继续。"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["{{processResultTitle}}:","","| 分支 | 实际结果 |","|---|---|","| 产品 | {{productName}} |","| 代码开发 | {{integrationResult}} |","| 产品开通 | {{signingResult}} |","| 服务市场 | {{serviceResult}} |","| 应用发布 | {{applicationResult}} |","","本轮流程仍需处理:{{remainingActions}}{{statusQueryHint}}","{{manualVerificationLine}}","{{sandboxRecoveryHint}}","{{applicationOperationBlock}}","","{{productionReadinessBlock}}","","{{nextFlowReminderLine}}"]}}},{"messageId":"key_tool.download.result","owner":"catalog_owned","trigger":"key_tool.download.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"downloadPath","type":"existingPath","required":true},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]}],"requiredPolicyIds":["P-KEY-TOOL-DOWNLOAD"],"fallbackMessageId":"key_tool.download.fallback","variants":{"DOWNLOADED":{"templateLines":["支付宝开放平台密钥工具已下载到:`{{downloadPath}}`。","","请打开该安装包并按页面引导完成安装;Agent 不会自动安装、启动工具或生成密钥。","","{{keyToolFormatHint}}","","生成后只向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。",""]}}},{"messageId":"key_tool.download.fallback","owner":"catalog_owned","trigger":"key_tool.download.fallback","blocking":false,"allowedReplies":[],"variables":[{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]}],"requiredPolicyIds":["P-KEY-TOOL-DOWNLOAD"],"variants":{"DEFAULT":{"templateLines":["未能完成自动下载,可能是当前环境不支持、无法访问下载源、本地目录不可写或安装包校验未通过。请访问支付宝开放平台手动下载支付宝开放平台密钥工具:","","{{keyToolManual}}","","{{keyToolFormatHint}}","","仅向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。"]}}},{"messageId":"sandbox.windows.manual_setup","owner":"catalog_owned","trigger":"integration.sandbox.windows.manual_setup","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["当前 Windows 环境暂不支持自动创建快速沙箱,请前往支付宝 AI 付站点-选择产品-一站式接入-技术集成页面获取沙箱配置:https://aipay.alipay.com/?from=alipay-aipay-skill","","请把沙箱应用的 APPID、支付宝公钥、应用公钥、与当前开发语言(JAVA语言/非JAVA语言)匹配的应用私钥、沙箱账号信息告诉我,我会帮你完成项目配置,并继续进行支付产品代码开发。","","生产环境应用私钥和密码切勿暴露给 Agent。"]}}},{"messageId":"sandbox.environment.summary","owner":"catalog_owned","trigger":"integration.sandbox.persisted","blocking":false,"allowedReplies":[],"variables":[{"name":"productName","type":"enum","required":true,"values":["AI 按量付费","AI 网页应用收款","AI 移动应用收款"]},{"name":"configPath","type":"existingPath","required":true},{"name":"environmentRows","type":"sandboxTableRows","required":true}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["沙箱环境摘要","","| 项目 | 信息 |","|---|---|","| 产品 | {{productName}} |","| 配置文件目录 | `{{configPath}}` |","{{environmentRows}}","| 密钥字段 | 已写入本地配置文件,默认不在对话中展开 |"]}}},{"messageId":"sandbox.configuration.pending","owner":"catalog_owned","trigger":"integration.sandbox.pending","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"CREATE":{"templateLines":["快速沙箱暂未创建成功,当前沙箱配置尚未完成。","","本轮将继续代码开发。代码开发完成后,请对 Agent 说:“重新创建并配置沙箱”。"]},"VERIFY":{"templateLines":["快速沙箱配置复核未通过,当前沙箱配置尚未完成。","","本轮将继续代码开发。代码开发完成后,请对 Agent 说:“重新创建并配置沙箱”。"]}}},{"messageId":"sandbox.create.failure","owner":"catalog_owned","trigger":"integration.sandbox.failed","blocking":false,"allowedReplies":[],"variables":[{"name":"failureReason","type":"singleLine","required":true},{"name":"recoveryAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"WINDOWS":{"templateLines":["Windows 沙箱本地配置未准备完成:{{failureReason}}","","恢复动作:{{recoveryAction}}","","字段缺失、来源不明或本地保护未完成时不能继续,也不能把当前配置表述为可用。"]}}},{"messageId":"sandbox.environment.reminder","owner":"catalog_owned","trigger":"integration.sandbox.persisted.reminder","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-A2M-SANDBOX","P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["快速沙箱环境配置已准备完成,仅用于测试,不涉及真实资金。","","完整配置已写入上述本地文件。"]},"WINDOWS":{"templateLines":["Windows 沙箱本地配置已准备完成,仅用于测试,不涉及真实资金。","","配置已保存至上述本机路径。"]}}},{"messageId":"a2m.test.start","owner":"catalog_owned","trigger":"integration.a2m.test.start","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-A2M-SANDBOX","P-A2M-SUCCESS"],"variants":{"DEFAULT":{"templateLines":["开始执行 AI 按量付费沙箱服务端联调。","","我将连续验证 `402 Payment-Needed`、沙箱收银、`Payment-Proof` 重试和资源交付,完成后输出实际结论;这里不需要额外确认。"]}}},{"messageId":"a2m.test.result","owner":"catalog_owned","trigger":"integration.a2m.test.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"evidenceSummary","type":"singleLine","required":true},{"name":"recoveryAction","type":"singleLine","required":false}],"requiredPolicyIds":["P-A2M-SUCCESS","P-SENSITIVE-STATE"],"variants":{"PASSED":{"templateLines":["AI 按量付费沙箱服务端联调通过。","","通过证据:{{evidenceSummary}}"]},"FAILED":{"templateLines":["AI 按量付费沙箱服务端联调未通过。","","实际证据:{{evidenceSummary}}","","恢复动作:{{recoveryAction}}"]}}},{"messageId":"a2m.payment.experience","owner":"catalog_owned","trigger":"integration.a2m.optional_payment_experience","blocking":false,"allowedReplies":[],"variables":[{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"buyerAccount","type":"singleLine","required":true},{"name":"buyerLoginPassword","type":"sandboxCredential","required":true},{"name":"buyerPayPassword","type":"sandboxCredential","required":true}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION"],"variants":{"FULL":{"templateLines":["可选:体验 AI 按量付费沙箱付款","","付款链接(复制到网页浏览器打开):{{paymentUrl}}","沙箱买家账号:{{buyerAccount}}","登录密码:{{buyerLoginPassword}}","支付密码:{{buyerPayPassword}}"]}}},{"messageId":"webpay.sandbox.experience","owner":"catalog_owned","trigger":"integration.webpay.sandbox_experience","blocking":false,"allowedReplies":[],"variables":[{"name":"startCommand","type":"command","required":true},{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"buyerAccount","type":"singleLine","required":true},{"name":"buyerLoginPassword","type":"sandboxCredential","required":true},{"name":"buyerPayPassword","type":"sandboxCredential","required":true},{"name":"resultPageInstruction","type":"enum","required":true,"values":["付款后确认浏览器自动返回商户结果页,页面可正常展示并通过服务端查询呈现订单状态。","付款后不会自动返回商户网站;请手动返回商户订单查询页并刷新或查询订单状态。"]}],"requiredPolicyIds":["P-SANDBOX-CREDENTIAL-EXCEPTION"],"variants":{"DEFAULT":{"templateLines":["AI 网页应用收款沙箱付款指引","","1. 启动服务:`{{startCommand}}`","2. 在浏览器打开:{{paymentUrl}}","3. 在沙箱收银台二选一:使用沙箱买家账号登录,或仅在 Android 沙箱支付宝中扫描收银台页面二维码。","4. 沙箱买家账号:{{buyerAccount}}","5. 登录密码:{{buyerLoginPassword}}","6. 支付密码:{{buyerPayPassword}}","7. {{resultPageInstruction}}","","沙箱测试环境不稳定,可能出现跳转到支付宝收银台页面后报错,如:504 Gateway Time-out;输入完测试买家账号后展示系统繁忙;输入完测试买家支付密码后展示系统繁忙。您可以回到支付页重新发起支付以完成沙箱测试。","","前台页面和同步回跳参数不是支付成功依据,最终以验签通过的异步通知或交易查询为准。用户暂不付款只记为待体验,不得表述为沙箱测试通过。"]}}},{"messageId":"sandbox.android.client","owner":"catalog_owned","trigger":"integration.sandbox_android_client","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["沙箱支付宝当前仅支持 Android。请复制以下支付宝官方地址到网页浏览器打开,并扫描屏幕二维码下载沙箱版支付宝安装包:","","https://mdn.alipayobjects.com/sandboxsys/afts/img/_itHRrdOD9oAAAAAAAAAAAAADgSLAQBr/original","","如果直链或页面二维码无法打开,请前往支付宝开放平台-沙箱工具页下载:","","https://open.alipay.com/develop/sandbox/tool"]}}},{"messageId":"webpay.sandbox.experience.windows","owner":"catalog_owned","trigger":"integration.webpay.sandbox_experience.windows","blocking":false,"allowedReplies":[],"variables":[{"name":"startCommand","type":"command","required":true},{"name":"paymentUrl","type":"runtimeUrl","required":true},{"name":"resultPageInstruction","type":"enum","required":true,"values":["付款后确认浏览器自动返回商户结果页,页面可正常展示并通过服务端查询呈现订单状态。","付款后不会自动返回商户网站;请手动返回商户订单查询页并刷新或查询订单状态。"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["AI 网页应用收款沙箱付款指引","","1. 启动服务:`{{startCommand}}`","2. 在浏览器打开:{{paymentUrl}}","3. 在沙箱收银台使用支付宝开放平台控制台中的沙箱买家账号登录,或仅在 Android 沙箱支付宝中扫描收银台页面二维码。","4. 登录密码和支付密码请直接从本机保存的信息或支付宝开放平台控制台取得,无需再次提供给 Agent。","5. {{resultPageInstruction}}","","沙箱测试环境不稳定,可能出现跳转到支付宝收银台页面后报错,如:504 Gateway Time-out;输入完测试买家账号后展示系统繁忙;输入完测试买家支付密码后展示系统繁忙。您可以回到支付页重新发起支付以完成沙箱测试。","","前台页面和同步回跳参数不是支付成功依据,最终以验签通过的异步通知或交易查询为准。用户暂不付款只记为待体验,不得表述为沙箱测试通过。"]}}},{"messageId":"integration.safety.closeout","owner":"catalog_owned","trigger":"integration.step7.safety","blocking":false,"allowedReplies":[],"variables":[{"name":"acceptanceSummary","type":"singleLine","required":true}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"AIPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- `Payment-Proof` 必须调用 `alipay.aipay.agent.payment.verify` 验证;无效或过期凭证拒绝服务,结果不明时不得要求用户重复付款。","- 资源交付后必须调用 `alipay.aipay.agent.fulfillment.confirm`;履约确认失败必须可重试且保持幂等。","- 沙箱配置仅用于开发调试;正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥,并将 `api_mock_service_id` 替换为真实 `serviceId`。`serviceId` 获取方式:支付宝扫码登录支付宝 AI 付站点 → 控制台 → 服务管理 → 复制审核已通过的服务 ID:https://aipay.alipay.com/?from=alipay-aipay-skill","- 收款商户 PID/2088 用于 AI 按量付费 `seller_id` 和 `seller_unique_id`,不由 Agent 猜测。获取方式:支付宝扫码登录支付宝商家平台 → 点击头像 → 复制账户名下方 2088 开头的商家 ID:https://b.alipay.com/page/portal/home","- 生产环境必须严格校验本地订单、金额与资源关系;正式收款必须完成 `Payment-Proof` 验付和异步履约回执确认。","","当前验收口径:{{acceptanceSummary}}"]},"WEBPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- 同步回跳和前台结果不作为支付成功依据;必须以验签通过的异步通知或交易查询为准。","- 正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥。","- AI 网页应用收款生产上线必须配置并联调公网 HTTPS `notify_url`;异步通知必须验签、校验关键字段、幂等处理并返回 `success`,同时配置交易查询补偿。若当前仅完成本地生产参数验收,该项仍需在上线前补齐;localhost、局域网地址或其他不可公网访问的地址不能用于生产异步通知。支付结果不明时不得要求用户重复付款。","","当前验收口径:{{acceptanceSummary}}"]},"APPPAY":{"templateLines":["代码开发安全与上线提醒","","- 上线前必须完成人工代码审查;私钥只保存在商家服务端,禁止写入 APP 客户端、日志或公共仓库。Java 使用 `PKCS#8` 私钥,非 Java 使用 `PKCS#1` 私钥,格式不匹配时只用支付宝官方密钥工具转换。","- 客户端支付结果不作为成功依据;必须以验签通过的异步通知或服务端交易查询为准。","- 正式上线前必须替换为同一套生产 `appId`、应用公钥、应用私钥和支付宝公钥。","- AI 移动应用收款生产上线必须配置并联调公网 HTTPS `notify_url`;异步通知必须验签、校验关键字段、幂等处理并返回 `success`,同时配置交易查询补偿。若当前仅完成本地生产参数验收,该项仍需在上线前补齐;localhost、局域网地址或其他不可公网访问的地址不能用于生产异步通知。支付结果不明时不得要求用户重复付款。","- 本轮代码开发只覆盖商家服务端;APP 客户端仍需接入支付宝客户端 SDK,使用服务端返回的 `orderStr` 调起支付,并与服务端异步通知或交易查询完成联调。","","当前验收口径:{{acceptanceSummary}}"]}}},{"messageId":"integration.checklist.result","owner":"catalog_owned","trigger":"integration.checklist.finished","blocking":false,"allowedReplies":[],"variables":[{"name":"overallResult","type":"enum","required":true,"values":["通过","部分通过","未通过"]},{"name":"failedItems","type":"singleLine","required":true},{"name":"manualItems","type":"singleLine","required":true},{"name":"sandboxResult","type":"enum","required":false,"values":["AI 按量付费沙箱服务端联调通过","AI 按量付费沙箱服务端联调未通过"]},{"name":"webpayExperienceResult","type":"enum","required":false,"values":["已提供浏览器付款入口和操作指引,实际付款及结果验证仍以用户完成情况为准","未提供浏览器付款入口或完整操作指引,需先补齐","已提供浏览器付款入口和操作指引;用户已完成一笔沙箱付款,结果只按实际核验证据记录"]},{"name":"sandboxConfigState","type":"enum","required":true,"values":["READY","CREATE_PENDING","VERIFY_PENDING"]},{"name":"blockingDefectState","type":"enum","required":true,"values":["NONE","PRESENT"]},{"name":"executionMode","type":"enum","required":true,"values":["仅代码开发","完整接入"]},{"name":"nextFlowReminder","type":"enum","required":true,"values":["正式上线前还需完成支付产品-产品开通。","代码开发校验通过后将自动进入支付产品-产品开通;未通过时停留在代码开发。","沙箱配置尚未完成,但不阻塞本轮继续支付产品-产品开通;完成配置后再进行沙箱测试。","代码开发自动校验已完成,仍有人工待验证项;本轮继续产品开通。"]}],"requiredPolicyIds":[],"variants":{"AIPAY_PASSED":{"templateLines":["AI 按量付费代码开发校验通过。","","{{nextFlowReminder}}"]},"AIPAY_INCOMPLETE":{"templateLines":["AI 按量付费代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]},"WEBPAY_PASSED":{"templateLines":["AI 网页应用收款代码开发校验通过。","","{{nextFlowReminder}}"]},"WEBPAY_INCOMPLETE":{"templateLines":["AI 网页应用收款代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]},"APPPAY_PASSED":{"maintenanceTodo":"TODO: 后续确定 AI 移动应用收款沙箱测试的对客引导动作后,在本变体补充;同步 integration flow、checklist 和测试。","templateLines":["AI 移动应用收款代码开发校验通过。","","{{nextFlowReminder}}"]},"APPPAY_INCOMPLETE":{"maintenanceTodo":"TODO: 后续确定 AI 移动应用收款沙箱测试的对客引导动作后,在本变体补充;同步 integration flow、checklist 和测试。","templateLines":["AI 移动应用收款代码开发校验:{{overallResult}}。","","未完成项:{{failedItems}}","人工待验证:{{manualItems}}","","{{nextFlowReminder}}"]}}},{"messageId":"auth.pending","owner":"catalog_owned","trigger":"AUTH_FLOW:PENDING","blocking":true,"allowedReplySet":"affirmative","inputHintType":"authorizationComplete","variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["支付宝授权尚未完成,当前流程保持等待,请在已打开的网页二维码页面完成扫码确认后,再回复当前授权提示。"]}}},{"messageId":"auth.expired","owner":"catalog_owned","trigger":"AUTH_FLOW:EXPIRED","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["本次支付宝授权链接已过期,旧链接和旧回复均已失效。正在重新生成授权链接,请使用新的授权页面完成授权。"]}}},{"messageId":"auth.mismatch","owner":"catalog_owned","trigger":"AUTH_FLOW:SCOPE_MISMATCH|MCC_MISMATCH","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING"],"variants":{"DEFAULT":{"templateLines":["当前授权范围或经营类目不匹配,需要退出当前登录并重新生成授权页面。"]}}},{"messageId":"error.mcp.auth","owner":"catalog_owned","trigger":"error.mcp_auth","blocking":false,"allowedReplies":[],"variables":[{"name":"errorMessage","type":"customerErrorText","required":false}],"requiredPolicyIds":["P-AUTH-BEFORE-ONBOARDING","P-SENSITIVE-STATE"],"variants":{"START":{"templateLines":["🔐 未登录或授权已过期","","当前登录状态已失效,无法继续操作。MCP 调用返回认证错误,正在退出当前登录。"]},"LOGOUT_UNCONFIRMED":{"templateLines":["无法确认退出当前登录结果,已停止重新授权。","","这通常表示当前 Agent 执行环境缺少联网权限、CLI wrapper 混入输出,或 stdout/stderr 无法唯一解析;不代表用户本机 logout 失败,也不能据此判断支付宝业务失败。","","Agent 应申请可联网权限后重试同一动作;不要要求用户手动 logout 代替本轮事实。"]},"LOGOUT_FAILED":{"templateLines":["退出当前登录失败,已停止重新授权。","错误信息:{{errorMessage}}","","请先重试退出登录;确认退出成功后再重新授权。"]},"LOGOUT_SUCCESS":{"templateLines":["已退出登录状态。","","请重新执行登录授权流程:生成授权链接后,使用支付宝扫码授权,授权成功后继续当前操作。","","产品、MCC 和授权范围未变化时,沿用已有确认立即重新生成授权链接;发生变化时先重新确认受影响内容。"]}}},{"messageId":"error.mcp.service","owner":"catalog_owned","trigger":"error.mcp_service","blocking":false,"allowedReplies":[],"variables":[{"name":"errorDetail","type":"customerErrorText","required":false}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-SENSITIVE-STATE"],"variants":{"AGENT_NETWORK":{"templateLines":["MCP 服务暂时不可用。","","当前命令需要访问支付宝服务,但当前 Agent 执行环境可能没有外网权限。Agent 应申请可联网权限后重试同一条命令,不要要求用户排查本机网络,也不要更换业务参数。","","请授权 Agent 联网重试,或稍后重新执行当前命令。"]},"GENERIC":{"templateLines":["MCP 服务暂时不可用。","","无法连接到支付宝服务,请稍后重试。","错误详情:{{errorDetail}}","","当前动作已停止重试;由主流程记录受影响分支,并在不受其依赖的情况下继续其他分支。本轮收口时将一次说明未恢复的动作、受影响分支和后续恢复方式。"]}}},{"messageId":"error.backend","owner":"catalog_owned","trigger":"error.backend_business","blocking":false,"allowedReplies":[],"variables":[{"name":"errorCode","type":"customerErrorText","required":true},{"name":"errorMessage","type":"customerErrorText","required":true},{"name":"errorScene","type":"customerErrorText","required":false},{"name":"errorSpecific","type":"customerErrorText","required":false},{"name":"checkedErrors","type":"customerErrorDetails","required":false},{"name":"bizTips","type":"customerErrorText","required":false},{"name":"appMax","type":"enum","required":true,"values":["YES","NO"]},{"name":"errorSceneLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"checkedErrorsBlock","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"bizTipsLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"appMaxLine","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["业务处理失败。","","错误码:{{errorCode}}","错误信息:{{errorMessage}}","{{errorSceneLine}}","","{{checkedErrorsBlock}}","","{{bizTipsLine}}","","{{appMaxLine}}","","当前业务错误不会自动重试;请先按以上错误信息修正受影响分支的业务条件。","如需帮助,请联系技术支持并提供以上脱敏错误信息。"]}}},{"messageId":"error.service.unstable","owner":"catalog_owned","trigger":"error.service_unstable","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["MCP 服务暂时不稳定。","","当前动作已停止重试;由主流程记录受影响分支,并在不受其依赖的情况下继续其他分支。","本轮收口时将一次说明未恢复的动作、受影响分支和后续恢复方式。"]}}},{"messageId":"error.cli","owner":"catalog_owned","trigger":"error.cli_output","blocking":false,"allowedReplies":[],"variables":[{"name":"errorMessage","type":"customerErrorText","required":true},{"name":"bizTips","type":"customerErrorText","required":false},{"name":"checkedErrors","type":"customerErrorDetails","required":false},{"name":"bizTipsLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"checkedErrorsBlock","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-SENSITIVE-STATE"],"variants":{"DEFAULT":{"templateLines":["命令执行失败:{{errorMessage}}","{{bizTipsLine}}","{{checkedErrorsBlock}}"]}}},{"messageId":"integration.service.not_ready","owner":"catalog_owned","trigger":"integration.a2m.service_not_ready","blocking":false,"allowedReplies":[],"variables":[{"name":"recoveryAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-A2M-SUCCESS"],"variants":{"DEFAULT":{"templateLines":["AI 按量付费本地服务尚未达到自动联调前置条件。","","需要处理:{{recoveryAction}}","","该条件未满足前不会运行自动联调,也不会把服务标记为可用。"]}}},{"messageId":"integration.project_path.required","owner":"catalog_owned","trigger":"integration.project_path.unresolved","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["现有项目及文件保持不变。请在一条回复中说明新项目要放在哪里;可以说“在当前目录新建 pay-demo”、提供当前目录下的新子目录名,或提供电脑上的完整路径。若不想指定位置,可以说“新建项目”或“帮我新建默认项目”,我会在用户目录下选择安全的新目录并告知项目地址。路径解析和确认完成前不会创建或修改文件。"]}}},{"messageId":"integration.context.required","owner":"catalog_owned","trigger":"integration.context.unresolved","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"missingItems","type":"enumList","required":true,"values":["项目路径","技术栈"]}],"requiredPolicyIds":["P-PROJECT-PROTECT"],"variants":{"DEFAULT":{"templateLines":["为继续代码开发,请先确定:{{missingItems}}。","","- 要新建项目:可以说“在当前目录新建 pay-demo”,或提供一个新的文件夹位置;不想指定位置时,可以说“新建项目”或“帮我新建默认项目”。","- 要复用已有项目:请告诉我项目文件夹;如果不知道在哪,可以说“帮我在当前目录下找项目”;如果大概知道在哪,可以说“帮我在 server 下找项目”。我会先定位候选目录,再让你选择。","- “当前项目/当前目录”只有在当前目录本身就是可识别项目根时才会使用;否则不会扫描整个大目录。","- 技术栈:例如 Node.js + Express、Java + Spring Boot、Python + Flask、PHP + Laravel、C# + ASP.NET;不确定时可以说“请推荐默认技术栈”。","","项目和技术栈明确前,不会创建或修改文件。"]},"PROJECT_PATH_ONLY":{"templateLines":["为继续代码开发,请先确定:{{missingItems}}。","","- 要新建项目:可以说“在当前目录新建 pay-demo”,或提供一个新的文件夹位置;不想指定位置时,可以说“新建项目”或“帮我新建默认项目”。","- 要复用已有项目:请告诉我项目文件夹;如果不知道在哪,可以说“帮我在当前目录下找项目”;如果大概知道在哪,可以说“帮我在 server 下找项目”。我会先定位候选目录,再让你选择。","- “当前项目/当前目录”只有在当前目录本身就是可识别项目根时才会使用;否则不会扫描整个大目录。","","项目路径明确前,不会创建或修改文件。"]}}},{"messageId":"integration.project_candidates.select","owner":"catalog_owned","trigger":"integration.project_candidates.located","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"searchBasePath","type":"existingPath","required":true},{"name":"candidateRows","type":"string","required":true}],"requiredPolicyIds":["P-PROJECT-PROTECT"],"variants":{"DEFAULT":{"templateLines":["我先在 `{{searchBasePath}}` 下做了轻量项目定位;这里只看项目标记文件,不扫描代码内容。","","{{candidateRows}}","","如果要复用已有项目,请回复候选序号或具体项目文件夹。","如果要新建项目,可以回复“在当前目录新建 pay-demo”,或直接回复“新建项目”使用用户目录下的默认安全目录。","","选定具体项目目录前,不会扫描整个大目录,也不会创建或修改文件。"]}}},{"messageId":"integration.local_acceptance.notice","owner":"catalog_owned","trigger":"integration.local_acceptance.enabled","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["当前使用本地生产参数验收模式:本轮可以暂不发起公网异步通知,但生产上线前必须恢复并验证 `notify_url`。这不是生产最终配置,也不能据此宣称生产就绪。"]}}},{"messageId":"application.reuse.no_key","owner":"catalog_owned","trigger":"FLOW:REUSE_NO_KEY","blocking":false,"allowedReplies":[],"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]}],"requiredPolicyIds":["P-KEY-PUBLIC-USER"],"variants":{"DEFAULT":{"templateLines":["应用 `{{appId}}` 当前为可复用的上线应用,但尚未确认 RSA2 应用公钥,应用分支仍未完成。","","接下来需要为该应用设置【应用公钥】;如果你已经准备好应用公钥,请直接提供。","","本次不会自动下载支付宝开放平台密钥工具。如需我下载请直接说明,或访问官方地址手动下载:{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,应用私钥请自行妥善保管。","","如果不想继续复用这个应用,请说明要“重新选择”或“新建应用”。"]}}},{"messageId":"application.candidates.facts","owner":"catalog_owned","trigger":"application.candidates.queried","blocking":false,"allowedReplies":[],"variables":[{"name":"applicationType","type":"enum","required":true,"values":["WEBAPP","MOBILEAPP"]},{"name":"applicationCandidates","type":"applicationCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]}],"requiredPolicyIds":["P-PARTIAL-RESULT","P-KEY-TOOL-DOWNLOAD"],"variants":{"EMPTY":{"templateLines":["📋 暂无 {{applicationType}} 应用。","","支付宝开放平台密钥工具可用于生成应用公私钥对。无论是否需要自动下载,都可以访问官方地址:","{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"PENDING_ONLY":{"templateLines":["📋 当前已有以下尚未上线的 {{applicationType}} 应用:","","{{candidateTable}}","","以上应用当前不可复用。"]},"ONLINE_WITH_OPTIONAL_PENDING":{"templateLines":["📋 发现您已有以下上线 {{applicationType}} 应用:","","{{candidateTable}}"]}}},{"messageId":"application.candidate.invalid","owner":"catalog_owned","trigger":"application.candidates.selection_invalid","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["上一次回复未匹配当前应用候选或支持的选择格式。已重新展示当前候选,请按下方方式重新选择。","序号、非上线、历史或候选外 `appId` 均不会触发应用操作。"]}}},{"messageId":"application.candidate.select","owner":"catalog_owned","trigger":"application.candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[{"name":"keyToolManual","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"keyToolFormatHint","type":"string","required":false,"derived":true,"values":["【密钥格式说明】支付宝开放平台密钥工具“生成密钥”默认生成适用于 Java 编程语言的 PKCS#8 格式应用私钥;非 Java 语言请使用“密钥工具-格式转换”转换获取 PKCS#1 格式的应用私钥。"]}],"requiredPolicyIds":[],"variants":{"ONLINE_WEB_OR_NEW":{"templateLines":["请选择应用分支下一步:","","- 回复上方事实表中状态为“已上线”的完整 `appId`:复用对应应用。","- 新建应用:在同一条回复中表明要新建并提供【应用公钥】,材料完整后将创建应用、设置公钥并进入公钥确认。","","新建回复示例(请替换为实际内容):","```text","新建","应用公钥:<你自行生成的完整应用公钥>","```","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"PENDING_WEB_OR_NEW":{"templateLines":["当前同类型应用均未上线,不能复用。","","- 新建应用:在同一条回复中表明要新建并提供【应用公钥】,材料完整后将创建应用、设置公钥并进入公钥确认。","- 回复 `暂不新建`:本轮应用分支保持待办。","","新建回复示例(请替换为实际内容):","```text","新建","应用公钥:<你自行生成的完整应用公钥>","```","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"ONLINE_MOBILE_OR_NEW":{"templateLines":["请选择应用分支下一步:","","- 回复上方事实表中状态为“已上线”的完整 `appId`:复用对应应用。","- 新建 iOS:新建,我选择 iOS + iOS Bundle ID(bundleId)+【应用公钥】","- 新建 Android:新建,我选择 Android + Android 应用包名(appPackage)+ Android 应用签名摘要(appSign)+【应用公钥】","- 新建 iOS + Android:新建,我要同时支持两类系统 + iOS Bundle ID + Android 应用包名 + Android 应用签名摘要 +【应用公钥】","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]},"PENDING_MOBILE_OR_NEW":{"templateLines":["当前同类型应用均未上线,不能复用。","","- 新建 iOS:新建,我选择 iOS + iOS Bundle ID(bundleId)+【应用公钥】","- 新建 Android:新建,我选择 Android + Android 应用包名(appPackage)+ Android 应用签名摘要(appSign)+【应用公钥】","- 新建 iOS + Android:新建,我要同时支持两类系统 + iOS Bundle ID + Android 应用包名 + Android 应用签名摘要 +【应用公钥】","- 回复 `暂不新建`:本轮应用分支保持待办。","","支付宝开放平台密钥工具可用于生成应用公私钥对;本分支不会自动下载。如需我下载请直接说明,或访问:{{keyToolManual}}","","{{keyToolFormatHint}}","","只向 Agent 提供【应用公钥】,请勿提供应用私钥。"]}}},{"messageId":"application.operation.result","owner":"catalog_owned","trigger":"application.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"appId","type":"singleLine","required":true},{"name":"actualStatus","type":"singleLine","required":true},{"name":"nextAction","type":"singleLine","required":false},{"name":"appKeySavePath","type":"singleLine","required":false},{"name":"appKeySaveLine","type":"string","required":false,"derived":true,"values":["renderer"]},{"name":"manualConfigurationNextAction","type":"string","required":false,"derived":true,"values":["前往支付宝 AI 付站点,进入一站式接入 → 密钥配置,按当前 appId 获取对应的支付宝公钥,并手动配置到项目:https://aipay.alipay.com/?from=alipay-aipay-skill"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["应用 `{{appId}}` 的实际状态:{{actualStatus}}。","{{appKeySaveLine}}","","下一步:{{nextAction}}","","待审核、待设置公钥或待人工配置时不会表述为应用发布完成。"]},"ALIPAY_PUBLIC_KEY_MANUAL_CONFIGURATION":{"templateLines":["应用 `{{appId}}` 的实际状态:需人工配置。","","下一步:{{manualConfigurationNextAction}}","","待人工配置时不会表述为应用发布完成。"]}}},{"messageId":"application.harmony.manual_create","owner":"catalog_owned","trigger":"application.harmony.manual_create","blocking":true,"allowedReplySet":"affirmative","inputHintType":"complete","variables":[],"requiredPolicyIds":["P-MCP-CONTRACT-FROZEN"],"variants":{"DEFAULT":{"templateLines":["当前 Skill 不支持创建 HarmonyOS 移动应用。","","请前往支付宝开放平台,进入“控制台” → “创建移动应用”,完成平台要求的创建、配置和审核:https://open.alipay.com/","","完成后将重新查询移动应用列表。"]}}},{"messageId":"service.operation.result","owner":"catalog_owned","trigger":"service.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceId","type":"singleLine","required":true},{"name":"actualResult","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["服务市场实际结果:{{actualResult}}。","已确认的 `serviceId`:`{{serviceId}}`。","","查看服务状态和服务详情:请前往支付宝 AI 付站点,登录后进入控制台 → 服务管理。","https://aipay.alipay.com/?from=alipay-aipay-skill","","该结果只代表服务分支,不会覆盖签约或应用分支的实际状态。"]}}},{"messageId":"signing.operation.result","owner":"catalog_owned","trigger":"signing.operation.completed","blocking":false,"allowedReplies":[],"variables":[{"name":"actualStatus","type":"singleLine","required":true},{"name":"feeDisplay","type":"singleLine","required":false},{"name":"nextAction","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"WITHOUT_FEE":{"templateLines":["产品当前签约状态:{{actualStatus}}。","","下一步:{{nextAction}}"]},"WITH_FEE":{"templateLines":["产品当前签约状态:{{actualStatus}}。","费率:{{feeDisplay}}","","下一步:{{nextAction}}"]}}},{"messageId":"service.candidates.facts","owner":"catalog_owned","trigger":"service.candidates.queried","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceCandidates","type":"serviceCandidates","required":true},{"name":"candidateTable","type":"string","required":false,"derived":true,"values":["renderer"]}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"EMPTY":{"templateLines":["📋 暂无已有服务。"]},"DEFAULT":{"templateLines":["📋 发现您已有以下服务:","","{{candidateTable}}"]}}},{"messageId":"service.candidate.invalid","owner":"catalog_owned","trigger":"service.candidates.selection_invalid","blocking":false,"allowedReplies":[],"variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["上一次回复没有匹配到有效的服务操作。","仅回复序号,或提供不在当前事实表中的 `serviceId`,均不会触发服务操作。"]}}},{"messageId":"service.candidate.select","owner":"catalog_owned","trigger":"service.candidates.selection_required","blocking":true,"allowedReplies":[],"replyMode":"freeform","variables":[],"requiredPolicyIds":[],"variants":{"DEFAULT":{"templateLines":["请选择下一步:","","- 回复上方事实表中的完整 `serviceId`:复用对应服务。","- 新建服务:回复 `新建`,并在同一条回复中提供服务名称、服务描述、服务地址、服务单价、请求示例 JSON。","- 回复 `修改:<serviceId>`:修改对应服务。","","- 如果只回复 `新建` 或材料不完整,我会再提示补充缺失项。","","新建回复示例(请替换为实际内容):","```text","新建","服务名称:天气查询","服务描述:按城市查询天气","服务地址:以 http:// 或 https:// 开头的实际服务地址","服务单价:0.08 元/次","请求示例 JSON:{\"city\":\"杭州\"}","```","","如需核对服务状态或服务详情,可前往支付宝 AI 付站点,登录后进入控制台 → 服务管理查看。","https://aipay.alipay.com/?from=alipay-aipay-skill"]}}},{"messageId":"service.id.missing","owner":"catalog_owned","trigger":"service.save.id_missing","blocking":false,"allowedReplies":[],"variables":[{"name":"serviceName","type":"singleLine","required":true}],"requiredPolicyIds":["P-PARTIAL-RESULT"],"variants":{"DEFAULT":{"templateLines":["服务 `{{serviceName}}` 的创建或修改调用已返回成功,但未解析到 `serviceId`,因此服务分支尚未完成。接下来会重新查询完整服务列表,并使用本次实际提交资料与列表可见字段做唯一匹配;没有唯一结果时保持未知。在取得实际 `serviceId` 前不会宣称 AI 按量付费产品开通完成。","","如需自行核对服务状态或服务详情,可前往支付宝 AI 付站点,登录后进入控制台 → 服务管理查看。","https://aipay.alipay.com/?from=alipay-aipay-skill"]}}}]}
|
|
@@ -244,7 +244,7 @@ init_platform_id() {
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
init_alipay_cli_biz_info() {
|
|
247
|
-
local common_dir version_file version
|
|
247
|
+
local common_dir version_file version skill_user_id
|
|
248
248
|
|
|
249
249
|
common_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
250
250
|
version_file="${common_dir}/../../../VERSION"
|
|
@@ -259,10 +259,30 @@ init_alipay_cli_biz_info() {
|
|
|
259
259
|
return 1
|
|
260
260
|
fi
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
skill_user_id="$(machine_user_id_for_biz_info "$common_dir" || true)"
|
|
263
|
+
if [[ "$skill_user_id" =~ ^machine_[0-9a-f]{32}$ ]]; then
|
|
264
|
+
printf -v ALIPAYCLI_BIZ_INFO '{"skill":"alipay-aipay","skill_version":"v%s","skill_user_id":"%s"}' "$version" "$skill_user_id"
|
|
265
|
+
else
|
|
266
|
+
printf -v ALIPAYCLI_BIZ_INFO '{"skill":"alipay-aipay","skill_version":"v%s"}' "$version"
|
|
267
|
+
fi
|
|
263
268
|
export ALIPAYCLI_BIZ_INFO
|
|
264
269
|
}
|
|
265
270
|
|
|
271
|
+
machine_user_id_for_biz_info() {
|
|
272
|
+
local common_dir="${1:-}" telemetry_script marker candidate
|
|
273
|
+
|
|
274
|
+
if [ -z "$common_dir" ]; then
|
|
275
|
+
common_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
276
|
+
fi
|
|
277
|
+
telemetry_script="${common_dir}/telemetry.mjs"
|
|
278
|
+
[ -f "$telemetry_script" ] && command -v node >/dev/null 2>&1 || return 1
|
|
279
|
+
|
|
280
|
+
marker="$(node "$telemetry_script" machine-user-id 2>&1 >/dev/null || true)"
|
|
281
|
+
candidate="$(printf '%s\n' "$marker" | sed -n 's/^ALIPAY_AIPAY_INTERNAL:MACHINE_USER_ID=//p' | head -n 1)"
|
|
282
|
+
[[ "$candidate" =~ ^machine_[0-9a-f]{32}$ ]] || return 1
|
|
283
|
+
printf '%s' "$candidate"
|
|
284
|
+
}
|
|
285
|
+
|
|
266
286
|
init_alipay_cli_context() {
|
|
267
287
|
init_dev_tool_name
|
|
268
288
|
init_platform_id
|
|
@@ -229,14 +229,18 @@ const ignoredMccQueryTokens = new Set([
|
|
|
229
229
|
'业务', '相关', '主体', '从事'
|
|
230
230
|
]);
|
|
231
231
|
|
|
232
|
-
function activeMccRunId() {
|
|
233
|
-
const candidate =
|
|
234
|
-
||
|
|
235
|
-
|| currentRunContext()?.run_id
|
|
232
|
+
function activeMccRunId(env = process.env) {
|
|
233
|
+
const candidate = env.ALIPAY_AIPAY_RUN_ID
|
|
234
|
+
|| env.ALIPAY_AIPAY_FLOW_RUN_ID
|
|
235
|
+
|| currentRunContext(env)?.run_id
|
|
236
236
|
|| '';
|
|
237
237
|
return typeof candidate === 'string' && candidate && !/[\u0000-\u001f\u007f,^=]/u.test(candidate) ? candidate : '';
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
function captureMccRunContext(env = process.env) {
|
|
241
|
+
return Object.freeze({ runId: activeMccRunId(env) });
|
|
242
|
+
}
|
|
243
|
+
|
|
240
244
|
function productSalesCode(productType) {
|
|
241
245
|
return {
|
|
242
246
|
aipay: 'I1080300001000160457',
|
|
@@ -245,7 +249,7 @@ function productSalesCode(productType) {
|
|
|
245
249
|
}[productType] || '';
|
|
246
250
|
}
|
|
247
251
|
|
|
248
|
-
function mccCandidateFromRecord(record, productType = '') {
|
|
252
|
+
function mccCandidateFromRecord(record, productType = '', mccRunContext = captureMccRunContext()) {
|
|
249
253
|
const qualification = record.qualification ?? mccQualificationSummary(record);
|
|
250
254
|
const candidate = {
|
|
251
255
|
mccCode: record.code,
|
|
@@ -269,7 +273,7 @@ function mccCandidateFromRecord(record, productType = '') {
|
|
|
269
273
|
mcc_description: record.applicableBusinesses,
|
|
270
274
|
need_special_qual: record.needSpecialQual === true,
|
|
271
275
|
qualification_groups: record.qualificationGroups || [],
|
|
272
|
-
run_id:
|
|
276
|
+
run_id: mccRunContext.runId || undefined
|
|
273
277
|
});
|
|
274
278
|
}
|
|
275
279
|
return {
|
|
@@ -541,11 +545,11 @@ function deterministicMccMatches(query, records, { limit = 8, semanticTerms = []
|
|
|
541
545
|
.slice(0, limit);
|
|
542
546
|
}
|
|
543
547
|
|
|
544
|
-
function createMccSelectionReceipt(productType, query, result) {
|
|
548
|
+
function createMccSelectionReceipt(productType, query, result, mccRunContext = captureMccRunContext()) {
|
|
545
549
|
const codes = result.mergedCandidateCodes.join(',');
|
|
546
550
|
const table = result.mccTableSummary;
|
|
547
551
|
const binding = [
|
|
548
|
-
|
|
552
|
+
mccRunContext.runId,
|
|
549
553
|
productType,
|
|
550
554
|
assertMccQuery(query),
|
|
551
555
|
JSON.stringify(result.semanticTerms || []),
|
|
@@ -556,13 +560,13 @@ function createMccSelectionReceipt(productType, query, result) {
|
|
|
556
560
|
return `${mccSelectionReceiptPrefix}${codes}.${createHash('sha256').update(binding).digest('base64url')}`;
|
|
557
561
|
}
|
|
558
562
|
|
|
559
|
-
function resolveMccSelection(productType, query, selectedInput, receipt, records, semanticTerms) {
|
|
560
|
-
const candidateCodes = mccSelectionReceiptCodes(productType, query, receipt, records, semanticTerms);
|
|
563
|
+
function resolveMccSelection(productType, query, selectedInput, receipt, records, semanticTerms, mccRunContext) {
|
|
564
|
+
const candidateCodes = mccSelectionReceiptCodes(productType, query, receipt, records, semanticTerms, mccRunContext);
|
|
561
565
|
if (!candidateCodes) {
|
|
562
566
|
const semanticStatus = typeof receipt === 'string' && receipt.startsWith(mccSelectionReceiptPrefix)
|
|
563
567
|
? 'SELECTION_RECEIPT_STALE'
|
|
564
568
|
: 'SELECTION_RECEIPT_INVALID';
|
|
565
|
-
const refreshed = resolveMccResultFromRecords(query, productType, records, semanticTerms, semanticStatus);
|
|
569
|
+
const refreshed = resolveMccResultFromRecords(query, productType, records, semanticTerms, semanticStatus, mccRunContext);
|
|
566
570
|
return {
|
|
567
571
|
...refreshed,
|
|
568
572
|
matchType: refreshed.matchType === 'NONE' ? 'NONE' : 'MULTIPLE',
|
|
@@ -582,10 +586,10 @@ function resolveMccSelection(productType, query, selectedInput, receipt, records
|
|
|
582
586
|
semanticTerms,
|
|
583
587
|
mergedCandidateCodes: candidateCodes,
|
|
584
588
|
mccTableSummary: currentTable,
|
|
585
|
-
candidates: candidateCodes.map((code) => mccCandidateFromRecord(records.get(code), productType))
|
|
589
|
+
candidates: candidateCodes.map((code) => mccCandidateFromRecord(records.get(code), productType, mccRunContext))
|
|
586
590
|
};
|
|
587
591
|
}
|
|
588
|
-
const candidate = mccCandidateFromRecord(records.get(selectedCode), productType);
|
|
592
|
+
const candidate = mccCandidateFromRecord(records.get(selectedCode), productType, mccRunContext);
|
|
589
593
|
return {
|
|
590
594
|
matchType: 'UNIQUE',
|
|
591
595
|
semanticStatus: 'NOT_REQUIRED_SELECTION',
|
|
@@ -600,7 +604,7 @@ function resolveMccSelection(productType, query, selectedInput, receipt, records
|
|
|
600
604
|
};
|
|
601
605
|
}
|
|
602
606
|
|
|
603
|
-
function mccSelectionReceiptCodes(productType, query, receipt, records, semanticTerms) {
|
|
607
|
+
function mccSelectionReceiptCodes(productType, query, receipt, records, semanticTerms, mccRunContext = captureMccRunContext()) {
|
|
604
608
|
if (typeof receipt !== 'string' || !receipt.startsWith(mccSelectionReceiptPrefix)) return null;
|
|
605
609
|
const body = receipt.slice(mccSelectionReceiptPrefix.length);
|
|
606
610
|
const separator = body.lastIndexOf('.');
|
|
@@ -613,18 +617,18 @@ function mccSelectionReceiptCodes(productType, query, receipt, records, semantic
|
|
|
613
617
|
mergedCandidateCodes: candidateCodes,
|
|
614
618
|
mccTableSummary: currentTable,
|
|
615
619
|
semanticTerms
|
|
616
|
-
})) {
|
|
620
|
+
}, mccRunContext)) {
|
|
617
621
|
return null;
|
|
618
622
|
}
|
|
619
623
|
return candidateCodes;
|
|
620
624
|
}
|
|
621
625
|
|
|
622
|
-
function resolveMccResultFromRecords(query, productType, records, semanticTerms = [], semanticStatus) {
|
|
626
|
+
function resolveMccResultFromRecords(query, productType, records, semanticTerms = [], semanticStatus, mccRunContext = captureMccRunContext()) {
|
|
623
627
|
const directCode = directMccCode(query, records);
|
|
624
628
|
if (directCode.isCode) {
|
|
625
629
|
if (directCode.matches.length === 1) {
|
|
626
630
|
const code = directCode.matches[0];
|
|
627
|
-
const candidate = mccCandidateFromRecord(records.get(code), productType);
|
|
631
|
+
const candidate = mccCandidateFromRecord(records.get(code), productType, mccRunContext);
|
|
628
632
|
return {
|
|
629
633
|
matchType: 'UNIQUE',
|
|
630
634
|
semanticStatus: 'NOT_REQUIRED_DIRECT_CODE',
|
|
@@ -649,7 +653,7 @@ function resolveMccResultFromRecords(query, productType, records, semanticTerms
|
|
|
649
653
|
semanticTerms,
|
|
650
654
|
mergedCandidateCodes: finalCodes,
|
|
651
655
|
mccTableSummary: mccTableSummary(records),
|
|
652
|
-
candidates: finalCodes.map((code) => mccCandidateFromRecord(records.get(code), productType))
|
|
656
|
+
candidates: finalCodes.map((code) => mccCandidateFromRecord(records.get(code), productType, mccRunContext))
|
|
653
657
|
};
|
|
654
658
|
}
|
|
655
659
|
|
|
@@ -657,7 +661,7 @@ function resolveMccResultFromRecords(query, productType, records, semanticTerms
|
|
|
657
661
|
const deterministicCodes = matches.filter(({ originalEligible }) => originalEligible).map(({ record }) => record.code);
|
|
658
662
|
const semanticCodes = matches.filter(({ semanticEligible }) => semanticEligible).map(({ record }) => record.code);
|
|
659
663
|
const finalCodes = matches.map(({ record }) => record.code).slice(0, 8);
|
|
660
|
-
const candidates = finalCodes.map((code) => mccCandidateFromRecord(records.get(code), productType));
|
|
664
|
+
const candidates = finalCodes.map((code) => mccCandidateFromRecord(records.get(code), productType, mccRunContext));
|
|
661
665
|
return {
|
|
662
666
|
matchType: candidates.length === 1 ? 'UNIQUE' : candidates.length === 0 ? 'NONE' : 'MULTIPLE',
|
|
663
667
|
semanticStatus: semanticStatus || (semanticTerms.length > 0 ? 'AGENT_SEMANTIC_TERMS_USED' : 'DYNAMIC_CATALOG'),
|
|
@@ -672,7 +676,7 @@ function resolveMccResultFromRecords(query, productType, records, semanticTerms
|
|
|
672
676
|
};
|
|
673
677
|
}
|
|
674
678
|
|
|
675
|
-
function renderPlanConfirm(productType, mccCandidate) {
|
|
679
|
+
function renderPlanConfirm(productType, mccCandidate, mccRunContext = captureMccRunContext()) {
|
|
676
680
|
const product = productFor({ 'product-type': productType });
|
|
677
681
|
const variables = {
|
|
678
682
|
mccCode: mccCandidate.mccCode,
|
|
@@ -680,7 +684,7 @@ function renderPlanConfirm(productType, mccCandidate) {
|
|
|
680
684
|
mccQualification: mccCandidate.qualification
|
|
681
685
|
};
|
|
682
686
|
if (mccCandidate.mccContextReceipt) variables.mccContextReceipt = mccCandidate.mccContextReceipt;
|
|
683
|
-
return renderMessage('onboarding.plan.confirm', product.variant, variables, { productType });
|
|
687
|
+
return renderMessage('onboarding.plan.confirm', product.variant, variables, { productType, runId: mccRunContext.runId, mccRunId: mccRunContext.runId });
|
|
684
688
|
}
|
|
685
689
|
|
|
686
690
|
function requireCustomerMessageDelivery(messageId, message) {
|
|
@@ -691,18 +695,20 @@ function requireCustomerMessageDelivery(messageId, message) {
|
|
|
691
695
|
async function runPlanConfirm(args) {
|
|
692
696
|
const productType = required(args, 'product-type');
|
|
693
697
|
productFor({ ...args, 'product-type': productType });
|
|
698
|
+
const mccRunContext = captureMccRunContext();
|
|
694
699
|
return requireCustomerMessageDelivery('onboarding.plan.confirm', renderPlanConfirm(productType, {
|
|
695
700
|
mccCode: required(args, 'mcc-code'),
|
|
696
701
|
mccName: required(args, 'mcc-name'),
|
|
697
702
|
qualification: required(args, 'mcc-qualification'),
|
|
698
703
|
mccContextReceipt: optional(args, 'mcc-context-receipt')
|
|
699
|
-
}));
|
|
704
|
+
}, mccRunContext));
|
|
700
705
|
}
|
|
701
706
|
|
|
702
707
|
async function runMccResolvePlan(args) {
|
|
703
708
|
const productType = required(args, 'product-type');
|
|
704
709
|
productFor({ ...args, 'product-type': productType });
|
|
705
|
-
|
|
710
|
+
const mccRunContext = captureMccRunContext();
|
|
711
|
+
emitStageMetricAsync('onboarding.mcc_prepare.start', { productType, runId: mccRunContext.runId });
|
|
706
712
|
const query = required(args, 'query');
|
|
707
713
|
const selected = optional(args, 'select');
|
|
708
714
|
const selectionReceipt = optional(args, 'selection-receipt');
|
|
@@ -722,8 +728,8 @@ async function runMccResolvePlan(args) {
|
|
|
722
728
|
}
|
|
723
729
|
const records = recordsForArgs(args);
|
|
724
730
|
let result = selected === undefined
|
|
725
|
-
? resolveMccResultFromRecords(query, productType, records, semanticTerms)
|
|
726
|
-
: resolveMccSelection(productType, query, selected, selectionReceipt, records, semanticTerms);
|
|
731
|
+
? resolveMccResultFromRecords(query, productType, records, semanticTerms, undefined, mccRunContext)
|
|
732
|
+
: resolveMccSelection(productType, query, selected, selectionReceipt, records, semanticTerms, mccRunContext);
|
|
727
733
|
if (selectionState === 'STALE') {
|
|
728
734
|
result = {
|
|
729
735
|
...result,
|
|
@@ -739,16 +745,16 @@ async function runMccResolvePlan(args) {
|
|
|
739
745
|
}
|
|
740
746
|
return requireCustomerMessageDelivery(
|
|
741
747
|
'onboarding.plan.confirm',
|
|
742
|
-
renderPlanConfirm(productType, result.candidates[0])
|
|
748
|
+
renderPlanConfirm(productType, result.candidates[0], mccRunContext)
|
|
743
749
|
);
|
|
744
750
|
}
|
|
745
751
|
if (result.matchType === 'NONE') {
|
|
746
752
|
return renderMessage('onboarding.mcc.no_match', 'DEFAULT', {}, { productType });
|
|
747
753
|
}
|
|
748
|
-
process.stderr.write(`ALIPAY_AIPAY_INTERNAL:MCC_SELECTION_RECEIPT=${createMccSelectionReceipt(productType, query, result)}\n`);
|
|
754
|
+
process.stderr.write(`ALIPAY_AIPAY_INTERNAL:MCC_SELECTION_RECEIPT=${createMccSelectionReceipt(productType, query, result, mccRunContext)}\n`);
|
|
749
755
|
return renderMessage('onboarding.mcc.candidates', 'DEFAULT', {
|
|
750
756
|
mccCandidates: result.candidates
|
|
751
|
-
}, { productType });
|
|
757
|
+
}, { productType, runId: mccRunContext.runId, mccRunId: mccRunContext.runId });
|
|
752
758
|
}
|
|
753
759
|
|
|
754
760
|
async function runMccMatchCodes(args) {
|
|
@@ -759,7 +765,8 @@ async function runMccMatchCodes(args) {
|
|
|
759
765
|
if (args['agent-mcc-status'] !== undefined || args['agent-mcc-codes'] !== undefined) {
|
|
760
766
|
throw new Error('mcc-match-codes 不接受 --agent-mcc-status 或 --agent-mcc-codes;MCC 匹配只使用本轮动态 catalog');
|
|
761
767
|
}
|
|
762
|
-
const
|
|
768
|
+
const mccRunContext = captureMccRunContext();
|
|
769
|
+
const result = resolveMccResultFromRecords(query, productType, recordsForArgs(args), semanticTerms, undefined, mccRunContext);
|
|
763
770
|
const { candidates: _internalCandidates, ...controlResult } = result;
|
|
764
771
|
process.stderr.write(`ALIPAY_AIPAY_INTERNAL:MCC_RESOLUTION=${JSON.stringify(controlResult)}\n`);
|
|
765
772
|
return '';
|
|
@@ -770,12 +777,14 @@ function runMccValidateSelectionCache(args) {
|
|
|
770
777
|
productFor({ ...args, 'product-type': productType });
|
|
771
778
|
const records = recordsForArgs(args);
|
|
772
779
|
const semanticTerms = parseMccSemanticTerms(args);
|
|
780
|
+
const mccRunContext = captureMccRunContext();
|
|
773
781
|
if (!mccSelectionReceiptCodes(
|
|
774
782
|
productType,
|
|
775
783
|
required(args, 'query'),
|
|
776
784
|
required(args, 'selection-receipt'),
|
|
777
785
|
records,
|
|
778
|
-
semanticTerms
|
|
786
|
+
semanticTerms,
|
|
787
|
+
mccRunContext
|
|
779
788
|
)) {
|
|
780
789
|
throw new Error('MCC 候选详情缓存与本轮选择回执不一致');
|
|
781
790
|
}
|
|
@@ -63,11 +63,9 @@ function runAuthConfirm(args) {
|
|
|
63
63
|
['sales-code', required(args, 'sales-code')],
|
|
64
64
|
['mcc-code', required(args, 'mcc-code')],
|
|
65
65
|
['product-name', required(args, 'product-name')],
|
|
66
|
-
['mcc-name', required(args, 'mcc-name')]
|
|
66
|
+
['mcc-name', required(args, 'mcc-name')],
|
|
67
|
+
['mcc-context-receipt', required(args, 'mcc-context-receipt')]
|
|
67
68
|
].flatMap(([name, value]) => [`--${name}`, value]);
|
|
68
|
-
if (args['mcc-context-receipt'] !== undefined) {
|
|
69
|
-
context.push('--mcc-context-receipt', required(args, 'mcc-context-receipt'));
|
|
70
|
-
}
|
|
71
69
|
runScript('auth.sh', ['confirm', ...context]);
|
|
72
70
|
}
|
|
73
71
|
|
|
@@ -67,6 +67,17 @@ function keyToolManualUrl(policy) {
|
|
|
67
67
|
return value;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
function derivedCatalogText(definitions, name) {
|
|
71
|
+
const definition = definitions.get(name);
|
|
72
|
+
const values = definition?.values;
|
|
73
|
+
if (!definition?.derived || definition.type !== 'string'
|
|
74
|
+
|| !Array.isArray(values) || values.length !== 1
|
|
75
|
+
|| typeof values[0] !== 'string' || !values[0]) {
|
|
76
|
+
throw new Error(`消息目录缺少合法派生文案 ${name}`);
|
|
77
|
+
}
|
|
78
|
+
return values[0];
|
|
79
|
+
}
|
|
80
|
+
|
|
70
81
|
function allowedRepliesFor(catalog, message) {
|
|
71
82
|
if (!message.allowedReplySet) return message.allowedReplies || [];
|
|
72
83
|
const replies = catalog.interactionReplySets?.[message.allowedReplySet];
|
|
@@ -124,7 +135,7 @@ function normalizeQualificationGroups(groups, { allowEmpty = true } = {}) {
|
|
|
124
135
|
function qualificationGroupSummary(group) {
|
|
125
136
|
return group.qualifications
|
|
126
137
|
.map((qualification) => qualification.attaType
|
|
127
|
-
? `${qualification.qualName}
|
|
138
|
+
? `${qualification.qualName}(需上传材料)`
|
|
128
139
|
: `${qualification.qualName}(无需上传,按文字条件核验)`)
|
|
129
140
|
.join(' + ');
|
|
130
141
|
}
|
|
@@ -208,8 +219,25 @@ function activeMccRunId(env = process.env) {
|
|
|
208
219
|
return candidate;
|
|
209
220
|
}
|
|
210
221
|
|
|
211
|
-
function
|
|
212
|
-
|
|
222
|
+
function normalizeExpectedMccRunId(value) {
|
|
223
|
+
if (value === undefined || value === null || value === '') return '';
|
|
224
|
+
const candidate = String(value);
|
|
225
|
+
if (/[\u0000-\u001f\u007f,^=]/u.test(candidate)) throw new Error('MCC 上下文期望 run_id 无效');
|
|
226
|
+
return candidate;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function expectedMccRunIdFromContext(context = {}) {
|
|
230
|
+
return normalizeExpectedMccRunId(
|
|
231
|
+
context.mccRunId
|
|
232
|
+
|| context.expectedMccRunId
|
|
233
|
+
|| context.mcc_run_id
|
|
234
|
+
|| context.expected_mcc_run_id
|
|
235
|
+
|| ''
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function assertCurrentMccRun(receiptPayload, env = process.env, expectedRunId = '') {
|
|
240
|
+
const currentRunId = normalizeExpectedMccRunId(expectedRunId) || activeMccRunId(env);
|
|
213
241
|
if (currentRunId && receiptPayload.run_id !== currentRunId) {
|
|
214
242
|
throw new Error('MCC 上下文回执不属于当前 run');
|
|
215
243
|
}
|
|
@@ -253,20 +281,25 @@ function signingMccContext(input) {
|
|
|
253
281
|
}
|
|
254
282
|
|
|
255
283
|
export function validateSpecialLicenseUploadRequest(input) {
|
|
256
|
-
const
|
|
257
|
-
...input,
|
|
258
|
-
salesCode: input?.salesCode || verifyMccContextReceipt(input?.mccContextReceipt).sales_code,
|
|
259
|
-
mccCode: input?.mccCode || verifyMccContextReceipt(input?.mccContextReceipt).mcc_code
|
|
260
|
-
});
|
|
284
|
+
const expectedLicenseTypes = specialLicenseTypesForUploadRequest(input);
|
|
261
285
|
if (!Array.isArray(input.licenseTypes)
|
|
262
286
|
|| input.licenseTypes.some((value) => typeof value !== 'string' || !value || /[\u0000-\u001f\u007f]/u.test(value))
|
|
263
287
|
|| JSON.stringify(input.licenseTypes) !== JSON.stringify(expectedLicenseTypes)) {
|
|
264
288
|
throw new Error('待上传特殊资质类型与所选 MCC 资质组合不一致');
|
|
265
289
|
}
|
|
266
|
-
if (expectedLicenseTypes.length === 0) throw new Error('所选资质组合没有需要上传的材料');
|
|
267
290
|
return true;
|
|
268
291
|
}
|
|
269
292
|
|
|
293
|
+
export function specialLicenseTypesForUploadRequest(input) {
|
|
294
|
+
const { expectedLicenseTypes } = signingMccContext({
|
|
295
|
+
...input,
|
|
296
|
+
salesCode: input?.salesCode || verifyMccContextReceipt(input?.mccContextReceipt).sales_code,
|
|
297
|
+
mccCode: input?.mccCode || verifyMccContextReceipt(input?.mccContextReceipt).mcc_code
|
|
298
|
+
});
|
|
299
|
+
if (expectedLicenseTypes.length === 0) throw new Error('所选资质组合没有需要上传的材料');
|
|
300
|
+
return expectedLicenseTypes;
|
|
301
|
+
}
|
|
302
|
+
|
|
270
303
|
export function validateSigningSpecialLicenseContext(input) {
|
|
271
304
|
const { expectedLicenseTypes } = signingMccContext(input);
|
|
272
305
|
if (!Array.isArray(input.specialLicense)) throw new Error('specialLicense 必须是数组');
|
|
@@ -1315,6 +1348,9 @@ export function renderMessage(messageId, variantName, variables, telemetryContex
|
|
|
1315
1348
|
normalized.candidateTable = applicationCandidateTable(variantName, variables.applicationCandidates);
|
|
1316
1349
|
}
|
|
1317
1350
|
if (definitions.has('keyToolManual')) normalized.keyToolManual = keyToolManualUrl(policy);
|
|
1351
|
+
if (definitions.has('keyToolFormatHint')) {
|
|
1352
|
+
normalized.keyToolFormatHint = derivedCatalogText(definitions, 'keyToolFormatHint');
|
|
1353
|
+
}
|
|
1318
1354
|
if (messageId === 'service.candidates.facts') {
|
|
1319
1355
|
normalized.candidateTable = serviceCandidateTable(variantName, variables.serviceCandidates);
|
|
1320
1356
|
}
|
|
@@ -1368,7 +1404,7 @@ export function renderMessage(messageId, variantName, variables, telemetryContex
|
|
|
1368
1404
|
? verifyMccContextReceipt(variables.mccContextReceipt)
|
|
1369
1405
|
: null;
|
|
1370
1406
|
if (!dynamicReceipt) throw new Error('MCC 消息必须提供本轮 MCC_CONTEXT_RECEIPT');
|
|
1371
|
-
assertCurrentMccRun(dynamicReceipt);
|
|
1407
|
+
assertCurrentMccRun(dynamicReceipt, process.env, expectedMccRunIdFromContext(telemetryContext));
|
|
1372
1408
|
const expectedReceiptProductType = messageId === 'onboarding.plan.confirm'
|
|
1373
1409
|
? { AIPAY: 'aipay', WEBPAY: 'webpay', APPPAY: 'apppay' }[variantName]
|
|
1374
1410
|
: '';
|
|
@@ -1762,6 +1798,10 @@ export async function runRenderCustomerMessageCli(argv = process.argv) {
|
|
|
1762
1798
|
console.log('special license request: OK');
|
|
1763
1799
|
return;
|
|
1764
1800
|
}
|
|
1801
|
+
if (argv.includes('--resolve-special-license-types')) {
|
|
1802
|
+
console.log(JSON.stringify(specialLicenseTypesForUploadRequest(await readStdin())));
|
|
1803
|
+
return;
|
|
1804
|
+
}
|
|
1765
1805
|
if (argv.includes('--validate-signing-special-license-context')) {
|
|
1766
1806
|
validateSigningSpecialLicenseContext(await readStdin());
|
|
1767
1807
|
console.log('signing special license context: OK');
|
|
@@ -1158,7 +1158,7 @@ function machineCodeRaw(env = process.env) {
|
|
|
1158
1158
|
return '';
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
|
-
function machineUserID(env = process.env) {
|
|
1161
|
+
export function machineUserID(env = process.env) {
|
|
1162
1162
|
const raw = machineCodeRaw(env);
|
|
1163
1163
|
if (!raw) return 'anonymous_uid';
|
|
1164
1164
|
const hash = crypto.createHash('sha256').update(String(raw)).digest('hex').slice(0, 32);
|
|
@@ -1807,6 +1807,11 @@ export async function runTelemetryCli(argv = process.argv) {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
return 0;
|
|
1809
1809
|
}
|
|
1810
|
+
if (command === 'machine-user-id') {
|
|
1811
|
+
assertCliArgs(args, new Set(), 0);
|
|
1812
|
+
process.stderr.write(`${internalPrefix}MACHINE_USER_ID=${machineUserID(process.env)}\n`);
|
|
1813
|
+
return 0;
|
|
1814
|
+
}
|
|
1810
1815
|
if (command === 'count-user-input' && args._.length === 0) {
|
|
1811
1816
|
assertCliArgs(args, new Set(['phase', 'input-id']), 0);
|
|
1812
1817
|
const counts = recordTelemetryUserInput(args.phase, process.env, Date.now(), args['input-id']);
|
|
@@ -149,7 +149,7 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-execute-read
|
|
|
149
149
|
|
|
150
150
|
若组合动作本身不可用,原子 fallback 固定为先执行 `node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" flow onboarding execute --product-type "$PRODUCT_TYPE"`,再执行 `node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" env check --product-type "$PRODUCT_TYPE"`;fallback 不得重复 stage 或重复环境检查。
|
|
151
151
|
|
|
152
|
-
签约脚本仍通过 `error_handler.sh -> common.sh` 初始化 `DEV_TOOL_NAME`、`PLATFORM`、当前 `run_id` 的 `PLATFORM_ID`、当前 Skill
|
|
152
|
+
签约脚本仍通过 `error_handler.sh -> common.sh` 初始化 `DEV_TOOL_NAME`、`PLATFORM`、当前 `run_id` 的 `PLATFORM_ID`、当前 Skill 版本和匿名 `skill_user_id` 的 `ALIPAYCLI_BIZ_INFO`,以及当前产品 `PRODUCT`。有任务工具时只内部记录实际阶段,不维护任务数量;只保留当前对话最小上下文,不创建业务进度文件。
|
|
153
153
|
|
|
154
154
|
本步骤成功时不输出“环境检查完成”“任务已创建”等对客消息,直接进 Step 3;只有安装失败、权限不足或缺工具时才输出实际问题和恢复动作。工具能力差异不得省略任务、步骤或完成状态。
|
|
155
155
|
|
|
@@ -191,8 +191,8 @@ Step 1 的产品/MCC 唯一事实校验和方案送达、Step 2 的环境 READY
|
|
|
191
191
|
├─ AUTH_FLOW:RETRY_WITH_LOCAL_FS_PERMISSION → 保留当前授权页短时状态,取得 CLI 私有状态目录权限后原样重试当前 wait 命令一次
|
|
192
192
|
├─ AUTH_FLOW:FAILED → 停止并按错误输出恢复,禁止进入 Step 3.1
|
|
193
193
|
└─ AUTH_FLOW:SCOPE_MISMATCH / MCC_MISMATCH → 执行第 4 项
|
|
194
|
-
3. 仅 PENDING 后把用户原始回复传给 `node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-recovery auth-confirm --reply "$USER_REPLY" --input-id "$USER_INPUT_ID" --scope "$SCOPE" --sales-code "$SALES_CODE" --mcc-code "$MCC_CODE" --product-name "$PRODUCT_NAME" --mcc-name "$MCC_NAME"
|
|
195
|
-
4. node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" auth mismatch --defer-open --scope "$SCOPE" --sales-code "$SALES_CODE" --mcc-code "$MCC_CODE" --product-name "$PRODUCT_NAME" --mcc-name "$MCC_NAME"
|
|
194
|
+
3. 仅 PENDING 后把用户原始回复传给 `node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-recovery auth-confirm --reply "$USER_REPLY" --input-id "$USER_INPUT_ID" --scope "$SCOPE" --sales-code "$SALES_CODE" --mcc-code "$MCC_CODE" --product-name "$PRODUCT_NAME" --mcc-name "$MCC_NAME" --mcc-context-receipt "$MCC_CONTEXT_RECEIPT"`;runner 复用统一肯定语义判定(包括 `1`、“继续”“好了”“已完成”“OK”等)并按当前用户消息幂等计数,接受后只执行一次原 `auth.sh confirm`。否定、疑问、取消、修改意见或含糊输入返回内部拒绝且不得查询;成功后的转移同第 2 项,PENDING 继续等待且不重启轮询
|
|
195
|
+
4. node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" auth mismatch --defer-open --scope "$SCOPE" --sales-code "$SALES_CODE" --mcc-code "$MCC_CODE" --product-name "$PRODUCT_NAME" --mcc-name "$MCC_NAME" --mcc-context-receipt "$MCC_CONTEXT_RECEIPT"
|
|
196
196
|
├─ AUTH_FLOW:READY_TO_OPEN → 输出非阻塞授权页并按第 2 项执行 open + wait
|
|
197
197
|
├─ AUTH_FLOW:CONTEXT_MISMATCH → 未执行 logout;使用当前已确认的完整参数重新执行第 1 项
|
|
198
198
|
├─ AUTH_FLOW:RETRY_WITH_NETWORK → 取得联网权限后重试同一完整命令
|
|
@@ -236,7 +236,7 @@ Step 5 直接使用对应 phase 的完整命令;仅出现脚本异常、需要
|
|
|
236
236
|
2. 服务:仅按量付费由 runner 执行原 `service.sh list`;其他产品 envelope 固定为 `NOT_APPLICABLE`。成功候选只取 envelope 的 `service.candidates`。
|
|
237
237
|
3. 应用:runner 执行原 `app.sh list --product-type "$PRODUCT_TYPE" --sales-code "$SALES_CODE"`。成功候选和 `WEBAPP|MOBILEAPP` 只取 envelope 的 application 分支;不得宣称返回应用已与当前支付产品绑定。
|
|
238
238
|
|
|
239
|
-
> ⚠️ 脚本通过 `error_handler.sh` 间接初始化 `DEV_TOOL_NAME`、当前 `run_id` 对应的 `PLATFORM_ID`、当前 Skill
|
|
239
|
+
> ⚠️ 脚本通过 `error_handler.sh` 间接初始化 `DEV_TOOL_NAME`、当前 `run_id` 对应的 `PLATFORM_ID`、当前 Skill 版本和匿名 `skill_user_id` 对应的 `ALIPAYCLI_BIZ_INFO`,以及 CLI `PRODUCT`;签约查询必须传入当前产品的 `--sales-code` 和 `--product-type`(aipay|webpay|apppay)做一致性校验。AI 网页应用收款和 AI 移动应用收款使用不同 salesCode,禁止混用。
|
|
240
240
|
|
|
241
241
|
各适用查询仍是独立 CLI/MCP 调用,runner 只编排现有脚本,必须分别完成原有错误检测,禁止伪造合并 MCP。失败后按错误类型处理:
|
|
242
242
|
|
|
@@ -317,10 +317,10 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-message mate
|
|
|
317
317
|
|
|
318
318
|
网站支付收首页、商品页、支付页;APP 支付再加 APP 名称且签约状态参数固定 `OFFLINE`。支付页必须展示支付宝付款方式并等待付款,不是支付成功页。三张截图按序执行 `node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" screenshots --product-type "$PRODUCT_TYPE" <img1> <img2> <img3>`;串行上传三次,禁并发。只送达 stdout,引用只取 `SCREENSHOT_HOME_REF|SCREENSHOT_SHOP_REF|SCREENSHOT_PAY_REF`。特殊资质由 `special-license` 调 `alipay-cli file upload -s payMerchantcodeSkill --json`,返回 `licensePic`;不得要求 HTTPS URL 或复述 fileKey。认证失效仅一条事实;不 logout、不显示退出文案,保留 APP 名称。
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
特殊资质上传按提示顺序传所选组合中 `attaType` 非空项对应的文件;脚本从已校验回执派生内部 `licenseType` 并核对文件数量,Agent 和用户都不提供或看到类型码。纯文字组合不调用上传命令,签约时传所选组合序号和空数组:
|
|
321
321
|
|
|
322
322
|
```bash
|
|
323
|
-
node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" special-license --product-type "$PRODUCT_TYPE" --mcc-context-receipt "$MCC_CONTEXT_RECEIPT" --qualification-group-index "$SPECIAL_QUALIFICATION_GROUP_INDEX" --
|
|
323
|
+
node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" special-license --product-type "$PRODUCT_TYPE" --mcc-context-receipt "$MCC_CONTEXT_RECEIPT" --qualification-group-index "$SPECIAL_QUALIFICATION_GROUP_INDEX" --file "<localFile1>" [--file "<localFile2>" ...]
|
|
324
324
|
```
|
|
325
325
|
|
|
326
326
|
只接受唯一 `ALIPAY_AIPAY_INTERNAL:SPECIAL_LICENSE_JSON=<json>`;纯文字为 `[]`。`AUTH_FLOW:*`/`CLI_FLOW:RETRY_WITH_LOCAL_FS_PERMISSION` 按 Step 3/本阶段权限恢复。缺唯一 `SPECIAL_LICENSE_JSON` 时送 stdout,禁 `sign`:有 `SPECIAL_LICENSE_UPLOAD_RESULT=UNKNOWN` 则未调 `ar-sign.apply`,`SIGNING_RESULT=未签约`,`remainingActions=特殊资质上传未知,核对后继续上传`,禁自动重放;其他失败回 Step 4 invalid,缺特殊资质材料。
|
|
@@ -407,9 +407,9 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" service save --service-
|
|
|
407
407
|
|
|
408
408
|
候选为空:首次等待或创建前先送达事实消息,其中固定含密钥工具用途、`https://opendocs.alipay.com/isv/02kipk` 和私钥边界;无需回复 `新建`。本会话缺公钥时依次送达 `key-tool`、材料消息;应用资料首次收集消息继续带同一官方入口,保证恢复或前序消息不可见时仍可下载。已有公钥则不下载,缺料直接补,材料齐直接重查。公钥只能由本会话用户输入证明,禁默认、占位或猜测。
|
|
409
409
|
|
|
410
|
-
候选非空:有 `ON_LINE`
|
|
410
|
+
候选非空:有 `ON_LINE` 时接受完整 `appId` 或明确新建+材料;非上线时接受暂不新建。示例非口令;新建/材料有误则补缺,其他走 Step 4 `invalid` 且不写。含工具地址但不自动下载;要求时送达 `key-tool` 后等待。
|
|
411
411
|
|
|
412
|
-
`WEBAPP`
|
|
412
|
+
`WEBAPP` 需公钥。`MOBILEAPP` 按明确语义归一化:iOS→`IOS+bundleId`,Android→`ANDROID+appPackage+appSign`,两类→`ALL+三项`;示例非口令,枚举兼容,含糊/矛盾补问。脚本只收 `IOS|ANDROID|ALL`。接口无名称/描述。`APP_WEB_INITIAL` 仅限 `aipay|webpay`,`APP_MOBILE_INITIAL` 仅限 `apppay`;`PARTIAL|INVALID` 只补缺项:
|
|
413
413
|
|
|
414
414
|
```bash
|
|
415
415
|
node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" key-tool
|
|
@@ -48,7 +48,7 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" app create-from-snapsho
|
|
|
48
48
|
|
|
49
49
|
组合入口只编排既有 `list -> comparator -> create -> key`。写入前 `CONTRACT_ERROR|PREWRITE_FAILED` 自动恢复一次,`SNAPSHOT_REFRESH_REQUIRED` 刷新候选;耗尽按 flow 收口并继续其他分支。子步骤只转发登记终态,技术正文和 marker 禁止对客。权限/授权按 flow 恢复;写入前恢复后可继续,写入后禁止重放。创建 `UNKNOWN` 只重查列表,公钥页 `FAILED|UNKNOWN` 只查公钥状态;核验后仍不明则输出业务待办并收口,禁止重建应用/页面。独立 `app key` 只用于复用缺钥应用,或新建成功后公钥页调用前权限阻断;`app create` 仅由组合入口调用。HarmonyOS 仍独立 `app list`。
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
材料齐或非空明确新建即确认创建;`新建/我要新建` 只是示例,不要求逐字回复,等价明确意图均接受;之后只补缺项。`WEBAPP` 需公钥;`MOBILEAPP` 需平台资料和公钥。Agent 按明确语义归一化:仅 iOS→`IOS`,仅 Android→`ANDROID`,两类→`ALL`;原枚举兼容,含糊/矛盾时不猜。脚本只传这三个枚举。`APP_WEB_INITIAL` 仅限 `aipay|webpay`,`APP_MOBILE_INITIAL` 仅限 `apppay`:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
54
|
node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-message material-collect --category application --state APP_WEB_INITIAL --product-type "$PRODUCT_TYPE"
|
|
@@ -57,6 +57,8 @@ node "<SKILL_DIR>/references/normal/scripts/runtime.mjs" onboarding-message mate
|
|
|
57
57
|
|
|
58
58
|
Skill 新建 `WEBAPP` 或 `MOBILEAPP IOS|ANDROID|ALL` 时,首次等待或创建写操作前必须展示 `https://opendocs.alipay.com/isv/02kipk`。空候选由事实消息展示,缺公钥再执行 `runtime.mjs key-tool`;应用资料首次收集消息也保留同一入口以覆盖恢复场景。非空由选择消息展示,用户要求才下载。只下载,不安装/启动/生成密钥。材料齐且重查允许才创建、设钥和提审。HarmonyOS 保持人工引导,不适用本门禁。
|
|
59
59
|
|
|
60
|
+
所有展示密钥工具地址、下载结果或下载失败兜底的标准消息必须同时说明:工具“生成密钥”默认生成适用于 Java 的 PKCS#8 格式应用私钥;非 Java 语言需使用“密钥工具-格式转换”转换为 PKCS#1 格式。该说明只解释用户在本机使用工具时的私钥格式,不放宽下方公钥边界;应用私钥仍只保存在用户本机,不得提供给 Agent。
|
|
61
|
+
|
|
60
62
|
## 公钥边界
|
|
61
63
|
|
|
62
64
|
应用公钥必须由用户自行生成并明确提供。Agent 禁止生成密钥对、请求或处理私钥、补全/改写公钥、添加 PEM 头尾,或在缺少公钥时调用 `createKeyConfirmPage`。公钥输入只用于当前 `app.sh key|verify-key|verify-key-and-audit`,不得在回复、摘要、普通日志、跨会话状态或宽权限临时文件中复述或保存。
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
材料缺失或校验失败时使用 flow 登记的 `materials.category.collect`,不得提交。完整通过后直接执行签约脚本,不增加确认。截图只走 `upload_screenshots.sh`。特殊资质上传和签约都必须携带本轮 run 的 `MCC_CONTEXT_RECEIPT` 与用户所选组合序号;脚本按回执精确校验 `licenseType` 顺序,纯文字组合不上传并在签约校验中使用空数组。
|
|
42
42
|
|
|
43
|
-
特殊资质图片上传与首页/商品页/支付页截图上传一致,均调用 `alipay-cli file upload -s payMerchantcodeSkill --json` 并使用返回的图片引用值;三张页面截图固定串行上传,避免多个 CLI 进程并发读取认证态。`scripts/upload_special_license.sh`
|
|
43
|
+
特殊资质图片上传与首页/商品页/支付页截图上传一致,均调用 `alipay-cli file upload -s payMerchantcodeSkill --json` 并使用返回的图片引用值;三张页面截图固定串行上传,避免多个 CLI 进程并发读取认证态。`scripts/upload_special_license.sh` 按所选组合的材料顺序接收文件,从已校验回执派生内部 `licenseType`,再转换为 `[{licenseType,licensePic}]`;Agent 和用户不提供或看到类型码,`licensePic` 使用上传返回值,不要求 HTTPS URL。提交签约时,非空 `specialLicense` 作为 `businessProperty` 中与 `mccCode` 并列的字段传给 `ar-sign.apply`。
|
|
44
44
|
|
|
45
45
|
提交成功只表示申请已受理,不等于签约生效;服务和应用分支按各自前置条件继续,不依赖本次签约写成功。写操作仅明确 `NOT_SENT` 时可自动重试;`MAYBE_SENT` 必须先用现有签约查询核验,无法确认进入 `UNKNOWN`,禁止重复提交。
|
|
46
46
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# 调用位置: Step 3 登录授权
|
|
6
6
|
# 调用前置: 脚本通过 error_handler.sh 间接初始化 DEV_TOOL_NAME/PLATFORM_ID;必要时可用 DEV_TOOL_NAME 环境变量覆盖
|
|
7
7
|
# 用法:
|
|
8
|
-
# auth init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name>
|
|
8
|
+
# auth init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>
|
|
9
9
|
# auth open [--scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>]
|
|
10
10
|
# auth manual-open
|
|
11
11
|
# auth confirm [--scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>]
|
|
@@ -629,14 +629,14 @@ auth_init() {
|
|
|
629
629
|
esac
|
|
630
630
|
done
|
|
631
631
|
|
|
632
|
-
if [ -z "$SCOPE" ] || [ -z "$SALES_CODE" ] || [ -z "$MCC_CODE" ] || [ -z "$PRODUCT_NAME" ] || [ -z "$MCC_NAME" ]; then
|
|
632
|
+
if [ -z "$SCOPE" ] || [ -z "$SALES_CODE" ] || [ -z "$MCC_CODE" ] || [ -z "$PRODUCT_NAME" ] || [ -z "$MCC_NAME" ] || [ -z "$MCC_CONTEXT_RECEIPT" ]; then
|
|
633
633
|
echo "❌ 缺少必填参数"
|
|
634
|
-
echo "用法: bash auth.sh init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name>
|
|
634
|
+
echo "用法: bash auth.sh init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>"
|
|
635
635
|
exit 1
|
|
636
636
|
fi
|
|
637
637
|
if [ "$DEFER_OPEN" != true ]; then
|
|
638
638
|
echo "❌ 参数格式错误:auth init 必须使用 --defer-open,确保先展示授权说明和链接,再自动打开页面"
|
|
639
|
-
echo "用法: bash auth.sh init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name>
|
|
639
|
+
echo "用法: bash auth.sh init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>"
|
|
640
640
|
exit 1
|
|
641
641
|
fi
|
|
642
642
|
validate_auth_context || return 1
|
|
@@ -1026,7 +1026,7 @@ case "${1:-}" in
|
|
|
1026
1026
|
*)
|
|
1027
1027
|
echo "用法: bash auth.sh <init|open|manual-open|wait|confirm|mismatch> [参数...]"
|
|
1028
1028
|
echo ""
|
|
1029
|
-
echo " auth init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name>
|
|
1029
|
+
echo " auth init --defer-open --scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>"
|
|
1030
1030
|
echo " auth open [--scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>]"
|
|
1031
1031
|
echo " auth manual-open - 输出手动访问提示"
|
|
1032
1032
|
echo " auth wait [--scope <scope> --sales-code <code> --mcc-code <code> --product-name <name> --mcc-name <name> --mcc-context-receipt <receipt>]"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# 功能描述: 上传特殊资质材料并生成 ar-sign.apply 的 specialLicense 数组
|
|
5
5
|
# 调用位置: Step 4 签约材料类别
|
|
6
6
|
# 用法:
|
|
7
|
-
# bash upload_special_license.sh --product-type <aipay|webpay|apppay> --mcc-context-receipt <receipt> --qualification-group-index <1-based> --
|
|
7
|
+
# bash upload_special_license.sh --product-type <aipay|webpay|apppay> --mcc-context-receipt <receipt> --qualification-group-index <1-based> --file <localFile> [--file <localFile> ...]
|
|
8
8
|
#=============================================================================
|
|
9
9
|
|
|
10
10
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -26,7 +26,7 @@ require_command mktemp || exit 1
|
|
|
26
26
|
PRODUCT_TYPE=""
|
|
27
27
|
MCC_CONTEXT_RECEIPT=""
|
|
28
28
|
QUALIFICATION_GROUP_INDEX=""
|
|
29
|
-
|
|
29
|
+
FILE_PATHS=()
|
|
30
30
|
|
|
31
31
|
while [[ $# -gt 0 ]]; do
|
|
32
32
|
case "$1" in
|
|
@@ -39,9 +39,9 @@ while [[ $# -gt 0 ]]; do
|
|
|
39
39
|
--qualification-group-index)
|
|
40
40
|
[ $# -ge 2 ] || { echo "❌ 缺少参数值: $1"; exit 1; }
|
|
41
41
|
QUALIFICATION_GROUP_INDEX="$2"; shift 2 ;;
|
|
42
|
-
--
|
|
42
|
+
--file)
|
|
43
43
|
[ $# -ge 2 ] || { echo "❌ 缺少参数值: $1"; exit 1; }
|
|
44
|
-
|
|
44
|
+
FILE_PATHS+=("$2"); shift 2 ;;
|
|
45
45
|
*)
|
|
46
46
|
echo "❌ 未知参数: $1"; exit 1 ;;
|
|
47
47
|
esac
|
|
@@ -51,8 +51,8 @@ case "$PRODUCT_TYPE" in
|
|
|
51
51
|
aipay|webpay|apppay) ;;
|
|
52
52
|
*) echo "❌ 请先传入 --product-type aipay|webpay|apppay"; exit 1 ;;
|
|
53
53
|
esac
|
|
54
|
-
if [ "${#
|
|
55
|
-
echo "❌ 请至少提供一个 --
|
|
54
|
+
if [ "${#FILE_PATHS[@]}" -eq 0 ]; then
|
|
55
|
+
echo "❌ 请至少提供一个 --file <localFile>"
|
|
56
56
|
exit 1
|
|
57
57
|
fi
|
|
58
58
|
if [ -z "$MCC_CONTEXT_RECEIPT" ] || ! [[ "$QUALIFICATION_GROUP_INDEX" =~ ^[1-9][0-9]*$ ]]; then
|
|
@@ -60,41 +60,39 @@ if [ -z "$MCC_CONTEXT_RECEIPT" ] || ! [[ "$QUALIFICATION_GROUP_INDEX" =~ ^[1-9][
|
|
|
60
60
|
exit 1
|
|
61
61
|
fi
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
LICENSE_TYPE="${spec%%:*}"
|
|
67
|
-
FILE_PATH="${spec#*:}"
|
|
68
|
-
if [ -z "$LICENSE_TYPE" ] || [ "$FILE_PATH" = "$spec" ] || [ -z "$FILE_PATH" ]; then
|
|
69
|
-
echo "❌ --license 格式必须是 <licenseType>:<localFile>"
|
|
70
|
-
exit 1
|
|
71
|
-
fi
|
|
72
|
-
if ! validate_control_value "$LICENSE_TYPE"; then
|
|
73
|
-
echo "❌ licenseType 包含非法控制字符"
|
|
63
|
+
for FILE_PATH in "${FILE_PATHS[@]}"; do
|
|
64
|
+
if [ -z "$FILE_PATH" ]; then
|
|
65
|
+
echo "❌ --file 不能为空"
|
|
74
66
|
exit 1
|
|
75
67
|
fi
|
|
76
68
|
if [ ! -f "$FILE_PATH" ]; then
|
|
77
69
|
echo "❌ 特殊资质文件不存在: $FILE_PATH"
|
|
78
70
|
exit 1
|
|
79
71
|
fi
|
|
80
|
-
LICENSE_TYPES+=("$LICENSE_TYPE")
|
|
81
|
-
FILE_PATHS+=("$FILE_PATH")
|
|
82
72
|
done
|
|
83
73
|
|
|
84
|
-
LICENSE_TYPES_JSON='[]'
|
|
85
|
-
for LICENSE_TYPE in "${LICENSE_TYPES[@]}"; do
|
|
86
|
-
LICENSE_TYPES_JSON=$(jq -cn --argjson current "$LICENSE_TYPES_JSON" --arg value "$LICENSE_TYPE" '$current + [$value]') || exit 1
|
|
87
|
-
done
|
|
88
74
|
VALIDATION_JSON=$(jq -cn \
|
|
89
75
|
--arg productType "$PRODUCT_TYPE" \
|
|
90
76
|
--arg mccContextReceipt "$MCC_CONTEXT_RECEIPT" \
|
|
91
77
|
--argjson qualificationGroupIndex "$QUALIFICATION_GROUP_INDEX" \
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if ! printf '%s' "$VALIDATION_JSON" | node "$ERROR_RENDERER" --validate-special-license-request >/dev/null 2>&1; then
|
|
78
|
+
'{productType:$productType,mccContextReceipt:$mccContextReceipt,qualificationGroupIndex:$qualificationGroupIndex}') || exit 1
|
|
79
|
+
EXPECTED_LICENSE_TYPES_JSON=$(printf '%s' "$VALIDATION_JSON" | node "$ERROR_RENDERER" --resolve-special-license-types 2>/dev/null) || {
|
|
95
80
|
echo "❌ 待上传特殊资质与本轮 MCC 资质组合不一致,已停止上传"
|
|
96
81
|
exit 1
|
|
82
|
+
}
|
|
83
|
+
if ! printf '%s' "$EXPECTED_LICENSE_TYPES_JSON" | jq -e \
|
|
84
|
+
--argjson fileCount "${#FILE_PATHS[@]}" \
|
|
85
|
+
'type == "array" and length == $fileCount and all(.[]; type == "string" and length > 0)' >/dev/null 2>&1; then
|
|
86
|
+
echo "❌ 特殊资质文件数量与所选组合要求不一致,请按材料提示顺序完整提供"
|
|
87
|
+
exit 1
|
|
97
88
|
fi
|
|
89
|
+
LICENSE_TYPES=()
|
|
90
|
+
INDEX=0
|
|
91
|
+
while [ "$INDEX" -lt "${#FILE_PATHS[@]}" ]; do
|
|
92
|
+
LICENSE_TYPE=$(printf '%s' "$EXPECTED_LICENSE_TYPES_JSON" | jq -r --argjson index "$INDEX" '.[$index]') || exit 1
|
|
93
|
+
LICENSE_TYPES+=("$LICENSE_TYPE")
|
|
94
|
+
INDEX=$((INDEX + 1))
|
|
95
|
+
done
|
|
98
96
|
|
|
99
97
|
init_alipay_cli_product "$PRODUCT_TYPE" || exit 1
|
|
100
98
|
export ALIPAY_AIPAY_SUPPRESS_AUTH_LOGOUT=1
|