@xiashe/cli 0.1.23 → 0.1.25

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/README.md CHANGED
@@ -48,11 +48,11 @@ Production defaults:
48
48
 
49
49
  `xiashe payment` is the shell-capable Agent path for Alipay AI Pay. It delegates only to the official local `alipay-bot` supplied by `@alipay/agent-payment`; it does not implement or expose `Payment-Needed` / `Payment-Proof` itself.
50
50
 
51
- - `xiashe payment bridge-info` checks that the official buyer CLI is available without querying the wallet. `payment doctor` remains a manual diagnostic only.
51
+ - `xiashe payment bridge-info` checks only that the official buyer CLI can run. It does not check wallet authorization, merchant activation, or whether a transaction can be created. `payment doctor` remains a manual wallet-status diagnostic only.
52
52
  - `xiashe payment pay` requests the resource once, saves its exact 402 request in a private local file, and passes that file plus one stable session id to the official buyer CLI. It requires an HTTPS AI-Collect resource URL, a visible purchase-purpose summary, and `--confirm`.
53
53
  - `xiashe payment status` resumes the same local attempt with its official query credential and returns a normalized status only. No wallet protocol payload or proof is printed. A QR or confirmation image is exposed only as `officialMedia` when the official wallet emitted that image in the same invocation; the bridge never generates one itself.
54
- - `xiashe payment preflight` requests the seller resource once and validates the public structure of its 402 bill without opening a wallet or creating a trade. `xiashe payment diagnose` is read-only. It reports the last stored safe diagnosis for that local attempt, without contacting Alipay, replaying the resource, or exposing its local query credential.
54
+ - `xiashe payment preflight` requests the seller resource once and validates the public field shape of its 402 bill without opening a wallet or creating a trade. It does not prove that Alipay accepts the seller signature, service binding, or merchant activation. `xiashe payment diagnose` is read-only. It reports the last stored safe diagnosis for that local attempt, including allow-listed official error/sub-codes, message, and request/trace identifiers when present, without contacting Alipay, replaying the resource, or exposing its local query credential.
55
55
 
56
56
  An Agent must never add `--confirm` before the user has explicitly agreed to the displayed purpose. If the wallet is unavailable, obtain permission before running the official `@alipay/agent-payment` setup, then run `payment doctor` again.
57
57
 
58
- For a clean Codex Task, the XiaShe MCP response provides a version-pinned ephemeral command such as `npx -y @xiashe/cli@0.1.23 payment bridge-info`. No global `xiashe` installation is required for that path. Run the supplied preflight command before requesting payment confirmation, then run the payment and status commands exactly as supplied in the foreground. The Agent must inspect bridge JSON instead of suppressing output or guessing status from shell text. Failed attempts include a redacted `diagnosis` object and `userVisible` next step; do not replace them with a generic payment-failed message.
58
+ For a clean Codex Task, the XiaShe MCP response provides a version-pinned ephemeral command such as `npx -y @xiashe/cli@0.1.24 payment bridge-info`. No global `xiashe` installation is required for that path. Run the supplied preflight command before requesting payment confirmation, then run the payment and status commands exactly as supplied in the foreground. The Agent must inspect bridge JSON instead of suppressing output or guessing status from shell text. Failed attempts include a redacted `diagnosis` object and `userVisible` next step; do not replace them with a generic payment-failed message.
package/bin/xiashe.mjs CHANGED
@@ -40,7 +40,8 @@ const {
40
40
  preflightAlipay402Resource,
41
41
  payAlipay402Resource,
42
42
  queryAlipay402Resource,
43
- diagnoseAlipay402Resource
43
+ diagnoseAlipay402Resource,
44
+ createAlipay402SupportReport
44
45
  } = sdk;
45
46
 
46
47
  const EXIT_USAGE = 2;
@@ -103,6 +104,7 @@ Usage:
103
104
  ${c} payment pay --resource-url <https-url> --intent-summary <text> --confirm [--wallet-timeout-ms <ms>]
104
105
  ${c} payment status --resource-url <https-url>
105
106
  ${c} payment diagnose --resource-url <https-url>
107
+ ${c} payment support-report --resource-url <https-url>
106
108
 
107
109
  ${c} ops doctor
108
110
 
@@ -1196,7 +1198,13 @@ async function cmdPayment(sub, args, global) {
1196
1198
  print(result, global);
1197
1199
  return;
1198
1200
  }
1199
- fail(`Usage: ${COMMAND_NAME} payment bridge-info|doctor|preflight|pay|status|diagnose`, EXIT_USAGE);
1201
+ if (sub === 'support-report') {
1202
+ const resourceUrl = requireArg(flags['resource-url'] || flags.resourceUrl || flags.r, '--resource-url');
1203
+ const result = await createAlipay402SupportReport({ resourceUrl }, { timeoutMs: global.timeoutMs });
1204
+ print(result, global);
1205
+ return;
1206
+ }
1207
+ fail(`Usage: ${COMMAND_NAME} payment bridge-info|doctor|preflight|pay|status|diagnose|support-report`, EXIT_USAGE);
1200
1208
  }
1201
1209
 
1202
1210
  async function cmdOps(sub, args, global) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiashe/cli",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "xiashe": "bin/xiashe.mjs"
@@ -10,7 +10,7 @@
10
10
  "README.md"
11
11
  ],
12
12
  "dependencies": {
13
- "@xiashe/sdk": "0.1.23"
13
+ "@xiashe/sdk": "0.1.25"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=20"