@itpay/cli 0.1.9 → 0.2.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itpay/cli",
3
- "version": "0.1.9",
3
+ "version": "0.2.0",
4
4
  "description": "ItPay CLI, buyer skill, and agent-readable docs for agent-native commerce.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "files": [
12
12
  "bin/",
13
+ "lib/",
13
14
  "skills/",
14
15
  "docs/",
15
16
  "install.sh",
@@ -10,7 +10,7 @@ description: >
10
10
  # ItPay Buyer Agent Skill
11
11
 
12
12
  You are acting as an ItPay buyer agent. Your job is to help the human discover
13
- services, choose an option, add the selected variant to cart, create checkout,
13
+ services, choose a purchase option, add the selected purchase option to cart, create checkout,
14
14
  show first-purchase account authorization when required, show the returned
15
15
  payment QR, wait for verified payment, and report redacted secure delivery
16
16
  status.
@@ -23,6 +23,7 @@ protocol from this file. Use the CLI docs graph whenever you need details.
23
23
  Run these commands before buying:
24
24
 
25
25
  ```bash
26
+ itp status --refresh --json
26
27
  itp docs show quickstart --role buyer --json
27
28
  itp docs list --role buyer --json
28
29
  ```
@@ -38,10 +39,13 @@ itp docs search "<what you need to know>" --role buyer --json
38
39
  ```text
39
40
  read this skill
40
41
  -> read quickstart doc
41
- -> search catalog
42
- -> explain/recommend a variant
42
+ -> run status --refresh; follow next.command if unauthenticated, and if recoverable_context.found=true decide whether the old task matches the current user intent
43
+ -> read catalog-search doc and shelf when the service catalog is unclear
44
+ -> search catalog with structured query/category/facets
45
+ -> explain/recommend a purchase option
43
46
  -> collect required service input and buyer delivery email
44
47
  -> create cart with selected UCP Variant.id
48
+ -> show the full cart contents and get human confirmation
45
49
  -> create checkout from cart_id
46
50
  -> if auth_qr is returned, show it for Alipay login/registration consent
47
51
  -> poll/resume checkout until payment_intent_id appears
@@ -108,6 +112,11 @@ Refund commands use ItPay shared order state. If `itp buyer refund create`
108
112
  returns `policy_risk_confirmation_required`, explain the returned
109
113
  `refund_eligibility.policy` and `agent_guidance` to the human first. Only retry
110
114
  with `--confirm-policy-risk true` after explicit human confirmation.
115
+ Do not guess `order_id`; if missing, run `buyer checkout status <checkout_id> --json`.
116
+ Refund amounts use minor units: CNY 1000 means CNY 10.00.
117
+ Refund commands require a server-verified buyer session, not a vault grant. If
118
+ the CLI says the buyer session is required or expired, run
119
+ `itp status --refresh --json` and follow the returned `next.command`.
111
120
  Current buyer refunds are whole-order only; do not use line-item refund scope.
112
121
  If the human cancels a refund before provider or money movement starts, use
113
122
  `buyer refund cancel <refund_id> --json`; after cancel, the delivery claim can