@itpay/cli 0.1.10 → 0.2.1
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/bin/itp +53 -4563
- package/docs/agent/buyer/cart-checkout.json +20 -11
- package/docs/agent/buyer/catalog-search.json +23 -16
- package/docs/agent/buyer/human-claim-ui.json +2 -0
- package/docs/agent/buyer/payment-qr.json +1 -0
- package/docs/agent/buyer/payment-wait.json +5 -1
- package/docs/agent/buyer/qr-refresh.json +2 -0
- package/docs/agent/buyer/quickstart.json +5 -3
- package/docs/agent/buyer/recovery.json +3 -0
- package/docs/agent/buyer/secure-delivery.json +2 -0
- package/docs/agent/buyer/vault-agent-read.json +4 -0
- package/install.ps1 +15 -3
- package/install.sh +16 -3
- package/lib/buyer.js +1675 -0
- package/lib/docs.js +200 -0
- package/lib/env.js +719 -0
- package/lib/http.js +151 -0
- package/lib/ops.js +135 -0
- package/lib/render-human.js +463 -0
- package/lib/runtime.js +1532 -0
- package/package.json +2 -1
- package/skills/itpay-buyer/SKILL.md +8 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itpay/cli",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
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
|
|
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.
|
|
@@ -38,12 +38,14 @@ itp docs search "<what you need to know>" --role buyer --json
|
|
|
38
38
|
|
|
39
39
|
```text
|
|
40
40
|
read this skill
|
|
41
|
-
-> run status --refresh and follow next.command if unauthenticated
|
|
42
41
|
-> read quickstart doc
|
|
43
|
-
->
|
|
44
|
-
->
|
|
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
|
|
45
46
|
-> collect required service input and buyer delivery email
|
|
46
47
|
-> create cart with selected UCP Variant.id
|
|
48
|
+
-> show the full cart contents and get human confirmation
|
|
47
49
|
-> create checkout from cart_id
|
|
48
50
|
-> if auth_qr is returned, show it for Alipay login/registration consent
|
|
49
51
|
-> poll/resume checkout until payment_intent_id appears
|
|
@@ -110,6 +112,8 @@ Refund commands use ItPay shared order state. If `itp buyer refund create`
|
|
|
110
112
|
returns `policy_risk_confirmation_required`, explain the returned
|
|
111
113
|
`refund_eligibility.policy` and `agent_guidance` to the human first. Only retry
|
|
112
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.
|
|
113
117
|
Refund commands require a server-verified buyer session, not a vault grant. If
|
|
114
118
|
the CLI says the buyer session is required or expired, run
|
|
115
119
|
`itp status --refresh --json` and follow the returned `next.command`.
|