@itpay/cli 2.0.12 → 2.0.14
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 +14 -7
- package/dist/src/commands/compatibility.js +5 -0
- package/dist/src/commands/docs.js +1 -0
- package/dist/src/commands/guidance.js +10 -22
- package/dist/src/commands/install.js +3 -3
- package/dist/src/commands/readyz.js +2 -2
- package/dist/src/commands/services.js +17 -7
- package/dist/src/commands/skill.js +11 -11
- package/dist/src/main.js +50 -18
- package/dist/src/state/config.js +5 -4
- package/docs/agent/buyer/cart-checkout.json +16 -3
- package/docs/agent/buyer/catalog-list.json +1 -0
- package/docs/agent/buyer/identity-and-sessions.json +35 -14
- package/docs/agent/buyer/install-and-setup.json +28 -8
- package/docs/agent/buyer/orders-refunds.json +13 -2
- package/docs/agent/buyer/payment-flow.json +17 -3
- package/docs/agent/buyer/quickstart.json +48 -13
- package/docs/agent/buyer/render-hosts.json +14 -2
- package/docs/cli-reference/agent-types.md +2 -0
- package/docs/cli-reference/commands/buy.md +2 -0
- package/docs/cli-reference/commands/cart/add.md +2 -0
- package/docs/cli-reference/commands/cart/clear.md +2 -0
- package/docs/cli-reference/commands/cart/index.md +2 -0
- package/docs/cli-reference/commands/cart/next.md +2 -0
- package/docs/cli-reference/commands/cart/remove.md +3 -1
- package/docs/cli-reference/commands/cart/show.md +2 -0
- package/docs/cli-reference/commands/catalog/index.md +2 -0
- package/docs/cli-reference/commands/catalog/list.md +2 -0
- package/docs/cli-reference/commands/checkout.md +2 -0
- package/docs/cli-reference/commands/device.md +3 -1
- package/docs/cli-reference/commands/docs/index.md +2 -0
- package/docs/cli-reference/commands/docs/list.md +2 -0
- package/docs/cli-reference/commands/docs/search.md +2 -0
- package/docs/cli-reference/commands/docs/show.md +2 -0
- package/docs/cli-reference/commands/install.md +5 -3
- package/docs/cli-reference/commands/next.md +2 -0
- package/docs/cli-reference/commands/order.md +2 -0
- package/docs/cli-reference/commands/orders.md +2 -0
- package/docs/cli-reference/commands/pay.md +2 -0
- package/docs/cli-reference/commands/readyz.md +34 -6
- package/docs/cli-reference/commands/refund/cancel.md +2 -0
- package/docs/cli-reference/commands/refund/create.md +2 -0
- package/docs/cli-reference/commands/refund/get.md +2 -0
- package/docs/cli-reference/commands/refund/index.md +2 -0
- package/docs/cli-reference/commands/refund/list.md +2 -0
- package/docs/cli-reference/commands/refund/watch.md +2 -0
- package/docs/cli-reference/commands/services/action.md +2 -0
- package/docs/cli-reference/commands/services/checkout.md +2 -0
- package/docs/cli-reference/commands/services/events.md +2 -0
- package/docs/cli-reference/commands/services/get.md +2 -0
- package/docs/cli-reference/commands/services/index.md +2 -0
- package/docs/cli-reference/commands/services/invoke.md +73 -4
- package/docs/cli-reference/commands/services/list.md +2 -0
- package/docs/cli-reference/commands/services/next.md +2 -0
- package/docs/cli-reference/commands/services/quote.md +2 -0
- package/docs/cli-reference/commands/services/read-result.md +2 -0
- package/docs/cli-reference/commands/services/start.md +2 -0
- package/docs/cli-reference/commands/skill.md +6 -4
- package/docs/cli-reference/conventions.md +5 -0
- package/docs/cli-reference/index.md +3 -1
- package/package.json +6 -3
- package/skills/{itpay-buyer → itpay}/SKILL.md +43 -16
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "itp.agent_doc.v1",
|
|
3
3
|
"role": "buyer",
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point, and $itpay is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are buy and sell: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.",
|
|
4
5
|
"topic": "install-and-setup",
|
|
5
6
|
"title": "Install And Identify The ItPay Agent Runtime",
|
|
6
|
-
"purpose": "Install the CLI, load the complete
|
|
7
|
+
"purpose": "Install the CLI, load the complete ItPay Skill, and select one stable Agent Type without confusing identity, Backend, Host, target, or chat window.",
|
|
7
8
|
"when_to_use": [
|
|
8
9
|
"The CLI is being installed or upgraded.",
|
|
9
10
|
"The agent needs to confirm its stable runtime identity and default output Host."
|
|
@@ -12,11 +13,11 @@
|
|
|
12
13
|
{
|
|
13
14
|
"intent": "verify the API and enter packaged onboarding",
|
|
14
15
|
"command": "itpay readyz --json",
|
|
15
|
-
"success_signal": "status is ready and next points to skill show itpay
|
|
16
|
+
"success_signal": "status is ready and next points to skill show itpay"
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
19
|
"intent": "read the complete packaged operating contract",
|
|
19
|
-
"command": "itpay skill show itpay
|
|
20
|
+
"command": "itpay skill show itpay --json",
|
|
20
21
|
"success_signal": "status is shown, result.content contains the complete Skill, and next selects Agent Type or Catalog"
|
|
21
22
|
},
|
|
22
23
|
{
|
|
@@ -32,21 +33,40 @@
|
|
|
32
33
|
],
|
|
33
34
|
"agent_rules": [
|
|
34
35
|
"Install with npm install -g @itpay/cli.",
|
|
35
|
-
"
|
|
36
|
+
"The production Backend is fixed to https://app.itpay.ai and cannot be redirected by runtime environment variables.",
|
|
37
|
+
"If backend_contract_incompatible includes result.required_cli_version, stop all ItPay business commands and run only the exact npm install recovery returned by the CLI; never replace its version with latest.",
|
|
38
|
+
"After upgrading, require itpay --version to equal result.required_cli_version before running readyz again; never change Agent Type or Device identity to recover compatibility.",
|
|
39
|
+
"The production Backend is fixed to https://app.itpay.ai and cannot be redirected by runtime environment variables.",
|
|
36
40
|
"Use one exact type: codex-desktop, codex-cli, claude-code-desktop, claude-code-cli, or workbuddy.",
|
|
37
|
-
"One local private key is reused
|
|
38
|
-
"Within
|
|
41
|
+
"One local private key is reused with the https://app.itpay.ai production Device registration and quota lineage.",
|
|
42
|
+
"Within the production Backend registration, each Agent Type has one Agent Instance; all windows and chats of the same type reuse it.",
|
|
39
43
|
"Agent Type identifies the runtime. Host controls rendering and target only identifies a presentation destination.",
|
|
40
44
|
"Keep the exact Agent Type in every next or recovery command; do not fall back to a type previously used by another runtime.",
|
|
41
45
|
"Do not change Agent Type or rotate local identity to reset quota or recover a failed command."
|
|
42
46
|
],
|
|
43
47
|
"forbidden": [
|
|
44
48
|
"Do not use codex, terminal, claude-code, or plain-chat as Agent Types.",
|
|
49
|
+
"Do not set or suggest a Backend URL override; production CLI traffic always targets https://app.itpay.ai.",
|
|
45
50
|
"Do not claim that install writes host configuration or registers a device; it only prints instructions.",
|
|
46
51
|
"Do not create a new identity for a different window, task, chat, or process of the same Agent Type."
|
|
47
52
|
],
|
|
48
53
|
"next_docs": [
|
|
49
|
-
{
|
|
54
|
+
{
|
|
55
|
+
"condition": "Installation is verified",
|
|
56
|
+
"topic": "quickstart"
|
|
57
|
+
}
|
|
50
58
|
],
|
|
51
|
-
"search_terms": [
|
|
59
|
+
"search_terms": [
|
|
60
|
+
"install",
|
|
61
|
+
"agent type",
|
|
62
|
+
"host",
|
|
63
|
+
"target",
|
|
64
|
+
"device",
|
|
65
|
+
"session",
|
|
66
|
+
"identity",
|
|
67
|
+
"backend",
|
|
68
|
+
"codex",
|
|
69
|
+
"claude code",
|
|
70
|
+
"workbuddy"
|
|
71
|
+
]
|
|
52
72
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "itp.agent_doc.v1",
|
|
3
3
|
"role": "buyer",
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point, and $itpay is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are buy and sell: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.",
|
|
4
5
|
"topic": "orders-refunds",
|
|
5
6
|
"title": "Order, Delivery And Refund Recovery",
|
|
6
7
|
"purpose": "Read owned orders and manage refunds through signed Agent authority without guessing payment or refund state.",
|
|
@@ -48,7 +49,17 @@
|
|
|
48
49
|
"Do not claim a refund succeeded before the Refund Owner says succeeded."
|
|
49
50
|
],
|
|
50
51
|
"next_docs": [
|
|
51
|
-
{
|
|
52
|
+
{
|
|
53
|
+
"condition": "Need the original purchase path",
|
|
54
|
+
"topic": "quickstart"
|
|
55
|
+
}
|
|
52
56
|
],
|
|
53
|
-
"search_terms": [
|
|
57
|
+
"search_terms": [
|
|
58
|
+
"order",
|
|
59
|
+
"refund",
|
|
60
|
+
"cancel",
|
|
61
|
+
"watch",
|
|
62
|
+
"delivery lock",
|
|
63
|
+
"grant"
|
|
64
|
+
]
|
|
54
65
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "itp.agent_doc.v1",
|
|
3
3
|
"role": "buyer",
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point, and $itpay is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are buy and sell: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.",
|
|
4
5
|
"topic": "payment-flow",
|
|
5
6
|
"title": "Human Checkout Handoff And Payment Verification",
|
|
6
7
|
"purpose": "Show the ItPay Checkout to the human and recover authoritative payment state without creating duplicate payment resources.",
|
|
@@ -42,8 +43,21 @@
|
|
|
42
43
|
"Do not start another Service Execution to bypass quota, candidate, quote, checkout, or delivery state."
|
|
43
44
|
],
|
|
44
45
|
"next_docs": [
|
|
45
|
-
{
|
|
46
|
-
|
|
46
|
+
{
|
|
47
|
+
"condition": "Payment is verified",
|
|
48
|
+
"topic": "orders-refunds"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"condition": "The current Host cannot display the handoff",
|
|
52
|
+
"topic": "render-hosts"
|
|
53
|
+
}
|
|
47
54
|
],
|
|
48
|
-
"search_terms": [
|
|
55
|
+
"search_terms": [
|
|
56
|
+
"payment",
|
|
57
|
+
"checkout",
|
|
58
|
+
"QR",
|
|
59
|
+
"display token",
|
|
60
|
+
"resume",
|
|
61
|
+
"verified"
|
|
62
|
+
]
|
|
49
63
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "itp.agent_doc.v1",
|
|
3
3
|
"role": "buyer",
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point, and $itpay is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are buy and sell: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.",
|
|
4
5
|
"topic": "quickstart",
|
|
5
6
|
"title": "ItPay CLI Buyer Quickstart",
|
|
6
7
|
"purpose": "Run the shortest safe discovery, Service Execution, Checkout, delivery, and refund flow using server-returned next commands.",
|
|
@@ -11,19 +12,23 @@
|
|
|
11
12
|
"required_state": {
|
|
12
13
|
"needs": [
|
|
13
14
|
"the real supported Agent Type",
|
|
14
|
-
"the
|
|
15
|
+
"the fixed production Backend https://app.itpay.ai"
|
|
15
16
|
],
|
|
16
|
-
"must_not_need": [
|
|
17
|
+
"must_not_need": [
|
|
18
|
+
"Admin access",
|
|
19
|
+
"Provider secrets",
|
|
20
|
+
"raw payload access"
|
|
21
|
+
]
|
|
17
22
|
},
|
|
18
23
|
"commands": [
|
|
19
24
|
{
|
|
20
|
-
"intent": "verify
|
|
25
|
+
"intent": "verify fixed production Backend availability",
|
|
21
26
|
"command": "itpay --agent-type <agent_type> readyz --json",
|
|
22
|
-
"success_signal": "status is ready and next points to the complete packaged
|
|
27
|
+
"success_signal": "status is ready and next points to the complete packaged ItPay Skill"
|
|
23
28
|
},
|
|
24
29
|
{
|
|
25
30
|
"intent": "load the complete operating contract",
|
|
26
|
-
"command": "itpay --agent-type <agent_type> skill show itpay
|
|
31
|
+
"command": "itpay --agent-type <agent_type> skill show itpay --json",
|
|
27
32
|
"success_signal": "status is shown and next points to catalog list with the same Agent Type"
|
|
28
33
|
},
|
|
29
34
|
{
|
|
@@ -65,13 +70,43 @@
|
|
|
65
70
|
"Do not bypass a grant, refund lock, ownership error or compatibility gate."
|
|
66
71
|
],
|
|
67
72
|
"next_docs": [
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
{
|
|
74
|
+
"condition": "Need service catalog language",
|
|
75
|
+
"topic": "catalog-list"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"condition": "Need Cart and Checkout routing",
|
|
79
|
+
"topic": "cart-checkout"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"condition": "Need payment recovery",
|
|
83
|
+
"topic": "payment-flow"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"condition": "Need Host-specific presentation",
|
|
87
|
+
"topic": "render-hosts"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"condition": "Need order or refund recovery",
|
|
91
|
+
"topic": "orders-refunds"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"condition": "Need install or identity details",
|
|
95
|
+
"topic": "install-and-setup"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"condition": "Need device session recovery rules",
|
|
99
|
+
"topic": "identity-and-sessions"
|
|
100
|
+
}
|
|
75
101
|
],
|
|
76
|
-
"search_terms": [
|
|
102
|
+
"search_terms": [
|
|
103
|
+
"quickstart",
|
|
104
|
+
"service",
|
|
105
|
+
"next",
|
|
106
|
+
"recovery",
|
|
107
|
+
"delivery",
|
|
108
|
+
"refund",
|
|
109
|
+
"target",
|
|
110
|
+
"input"
|
|
111
|
+
]
|
|
77
112
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "itp.agent_doc.v1",
|
|
3
3
|
"role": "buyer",
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point, and $itpay is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are buy and sell: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.",
|
|
4
5
|
"topic": "render-hosts",
|
|
5
6
|
"title": "Agent Type And Checkout Handoff Rendering",
|
|
6
7
|
"purpose": "Use only the handoff fields returned for the current Agent Type and make the human Checkout visible on that surface.",
|
|
@@ -61,7 +62,18 @@
|
|
|
61
62
|
"Do not inspect, download, or regenerate a local QR file for WorkBuddy."
|
|
62
63
|
],
|
|
63
64
|
"next_docs": [
|
|
64
|
-
{
|
|
65
|
+
{
|
|
66
|
+
"condition": "Need payment verification rules",
|
|
67
|
+
"topic": "payment-flow"
|
|
68
|
+
}
|
|
65
69
|
],
|
|
66
|
-
"search_terms": [
|
|
70
|
+
"search_terms": [
|
|
71
|
+
"host",
|
|
72
|
+
"agent type",
|
|
73
|
+
"QR",
|
|
74
|
+
"markdown",
|
|
75
|
+
"terminal",
|
|
76
|
+
"desktop",
|
|
77
|
+
"workbuddy"
|
|
78
|
+
]
|
|
67
79
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Agent Type And Host Contract
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
`--agent-type` 表示哪类运行时在运行 CLI,用于 Agent 实例归属和定制 instruction。`--host` 表示输出展示在哪里;`--target` 只是在某些 Host 中指定 chat/channel/open ID。三者不可混用,窗口、任务和对话也不是身份。
|
|
4
6
|
|
|
5
7
|
本地只保存一把 Ed25519 私钥。每个规范化 Backend API base URL 独立登记 Device,因此 dev/test/app 分别拥有自己的 device ID、quota lineage、Agent instances 和 sessions。同一 Backend 下每个 `agent_type` 只有一个 Agent Instance;同类型的不同窗口、任务或聊天复用它,不追踪窗口 ID。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay buy`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
为普通 Catalog 项目或已绑定 Service Quote 的 canonical Cart 创建一个 ItPay Checkout,并按当前 Agent Type 把付款入口交给用户。命令只创建或恢复 ItPay Checkout,不把“用户说已付款”当作付款成功。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart add`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
把一个已发布 Catalog offer 或一个已准备的 Service Quote 加入 canonical server Cart。Catalog 服务行先进入 `services next`;Quote 行已经锁定输入和价格,可以与其他独立 Execution 的 Quote 一起结算。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart clear`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
放弃未锁定的 canonical cart。`--local` 只清理本地句柄和草稿,不声称服务端资源已取消。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 命令范围
|
|
4
6
|
|
|
5
7
|
管理 canonical server Cart。Catalog line 可以创建 Service Execution;已准备好的 Service Quote 则通过 `cart add --quote` 加入 Cart。Cart 聚合交易,但不合并 Execution、候选归属或交付。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart next`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取当前 canonical cart 对应的唯一首选动作。它不修改 cart。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart remove`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
从未锁定的 canonical cart 删除一个 line。删除不会影响已创建的 Checkout 或订单;如果该 line 是某个未付款 Service Execution 在 Cart 中的最后一个引用,Backend 会在同一事务中取消该 execution。
|
|
@@ -16,7 +18,7 @@ itpay cart remove --local --variant <catalog_variant_id> --offer <offer_id> [--j
|
|
|
16
18
|
|
|
17
19
|
| 参数 | 必填 | 说明 |
|
|
18
20
|
| --- | --- | --- |
|
|
19
|
-
| `--line <cart_item_id>` | 否 | canonical Cart line
|
|
21
|
+
| `--line <cart_item_id>` | 否 | canonical Cart line;省略时使用固定 `https://app.itpay.ai` 后端下最后保存的 line。 |
|
|
20
22
|
| `--local` | 否 | 只修改显式本地草稿,不请求 Backend。 |
|
|
21
23
|
| `--variant <catalog_variant_id>` | local 时是 | 与 `--offer` 一起标识本地草稿 line。 |
|
|
22
24
|
| `--offer <offer_id>` | local 时是 | 与 `--variant` 一起标识本地草稿 line。 |
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay cart show`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
显示 canonical server cart 的紧凑摘要和 line 句柄。默认不展开完整 Service Execution。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay catalog`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 命令范围
|
|
4
6
|
|
|
5
7
|
读取已发布的服务目录,帮助 Agent 发现可启动的通用服务。Catalog 只描述产品和入口,不执行服务、不创建购物车。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay catalog list`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
列出当前 published Catalog。每个项目先说明用户真正购买的主服务,再说明免费或付费的辅助能力,避免把辅助消歧误称为最终服务。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay checkout`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取并恢复一笔已存在 Checkout 的公开展示状态。它不创建新 Checkout,也不把“用户说已付款”当作付款成功。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay device recover`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围
|
|
4
6
|
|
|
5
7
|
仅在运营明确确认当前 Backend 的 Device 登记数据库已重建或清空后,删除本地该 Backend 的 v2 registration:
|
|
@@ -8,6 +10,6 @@
|
|
|
8
10
|
itpay --agent-type <agent_type> device recover --confirm-backend-reset --json
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
命令只作用于固定生产后端 `https://app.itpay.ai` 的 Device registration,并保留本地 Ed25519 私钥、Cart 和业务资源。CLI 不接受 Backend URL 覆盖。该命令不访问 Backend、不自动创建新身份;返回的只读 `services list` 是重新登记入口。
|
|
12
14
|
|
|
13
15
|
缺少确认参数返回 `backend_reset_confirmation_required`。普通 session 失效由 CLI 自动续期;revoked、quota、权限或未知 Backend 故障不得使用本命令。所有 Agent Type 使用相同输入和输出合同。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay docs`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 命令范围
|
|
4
6
|
|
|
5
7
|
浏览 npm 包内置的 Agent 操作文档。它是运行时自助说明,不读取服务端业务数据。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay docs list`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
按稳定 topic 名称列出 npm 包内置的 Agent 文档,只返回标题和一句用途,不加载完整内容,也不访问 Backend。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay docs search`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
在内置 topic 的名称、标题、用途和 `search_terms` 中进行不区分大小写的包含搜索。它不搜索完整正文或业务数据。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay docs show`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取一个指定 Agent 文档 topic。这是 docs 命令族中唯一返回完整文档内容的命令;不会级联读取其他 topic,也不访问 Backend。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay install`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取当前 CLI 内置的 Agent Type 安装合同。它只说明 npm 安装、默认 API、默认 Host 和下一条验证命令;不修改宿主配置、不登记设备,也不调用 Backend。
|
|
@@ -35,12 +37,12 @@ itpay install [target] [--json]
|
|
|
35
37
|
"instruction": "在 Codex Desktop 中始终传这个 Agent Type;付款时把返回的二维码和链接实际展示到当前对话。",
|
|
36
38
|
"next": {
|
|
37
39
|
"command": "itpay --agent-type codex-desktop readyz --json",
|
|
38
|
-
"reason": "
|
|
40
|
+
"reason": "验证固定生产 ItPay API 的可用性"
|
|
39
41
|
},
|
|
40
42
|
"recovery": [
|
|
41
43
|
{
|
|
42
44
|
"command": "itpay docs show install-and-setup",
|
|
43
|
-
"reason": "
|
|
45
|
+
"reason": "查看固定生产后端和首次使用说明"
|
|
44
46
|
}
|
|
45
47
|
]
|
|
46
48
|
}
|
|
@@ -83,7 +85,7 @@ itpay install [target] [--json]
|
|
|
83
85
|
| `codex-cli` | `terminal` | 只在用户可见终端展示付款交接。 |
|
|
84
86
|
| `claude-code-desktop` | `claude-code` | 桌面对话必须实际展示二维码和付款链接。 |
|
|
85
87
|
| `claude-code-cli` | `terminal` | 只在用户可见终端展示付款交接。 |
|
|
86
|
-
| `workbuddy` | `plain-chat` | Checkout 返回 `qr_image_url`
|
|
88
|
+
| `workbuddy` | `plain-chat` | 会持久化 `~/.itpay-v3` 的 Bash 调用先设 Shell 工具参数 `dangerouslyDisableSandbox=true`;拒绝权限时停止,不切换 Node、不删除 identity、不处理 lock。Checkout 返回 `qr_image_url` 时按 instruction 调用 `present_files`。 |
|
|
87
89
|
|
|
88
90
|
显式 `--host` 可以在后续 commerce 命令覆盖默认 Host,但不会改变 Agent Type 或设备归属。
|
|
89
91
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay next`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
从本机保存的 canonical Cart、Checkout 或 Service Execution 句柄恢复一个首选动作。它是中断后的总入口,不替代具体资源的 `next/get`,也不读取或复制 Backend DTO。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay order`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取一笔当前 Buyer 或已绑定 Agent 可见的订单摘要、交付模式和退款访问锁。它不会返回受保护交付内容、Vault ID、内部 delivery artifact 或 Checkout token。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay orders`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
列出当前 account-scoped Buyer session 可见的订单摘要,用于恢复订单,不返回交付 payload。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay pay`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
为一个已存在的 Checkout 显式创建或刷新 Payment Intent。它只用于 Checkout 页面无法完成渠道动作时的受控集成恢复,不是普通 Buyer 流程。
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# `itpay readyz`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
检查固定生产 Backend `https://app.itpay.ai` 是否可用。它只调用 `/v1/readyz` 做 liveness 诊断,不执行平台兼容性 gate、不登记设备、不创建业务资源;需要服务端合同的命令仍会在各自入口严格检查 compatibility。
|
|
6
8
|
|
|
7
|
-
**上游:** CLI
|
|
8
|
-
**下游:** 完整 `itpay
|
|
9
|
+
**上游:** CLI 安装;Backend 固定为 `https://app.itpay.ai`,不可由运行时环境覆盖。
|
|
10
|
+
**下游:** 完整 `itpay` Skill,随后选择 Agent Type 或进入当前已支持的 Buyer Catalog。
|
|
9
11
|
|
|
10
12
|
## 语法与参数
|
|
11
13
|
|
|
@@ -23,15 +25,41 @@ itpay readyz [--json]
|
|
|
23
25
|
{
|
|
24
26
|
"status": "ready",
|
|
25
27
|
"result": { "backend": "available" },
|
|
26
|
-
"instruction": "ItPay 可用;先完整读取内置
|
|
27
|
-
"next": { "command": "itpay skill show itpay
|
|
28
|
+
"instruction": "ItPay 可用;先完整读取内置 ItPay Skill,再进入当前已支持的 buy 流程。sell 将来也使用同一入口,但当前尚未实现。",
|
|
29
|
+
"next": { "command": "itpay skill show itpay --json", "reason": "加载完整操作与安全规则" },
|
|
28
30
|
"recovery": []
|
|
29
31
|
}
|
|
30
32
|
```
|
|
31
33
|
|
|
32
34
|
## 异常处理
|
|
33
35
|
|
|
34
|
-
连接失败时返回 `backend_unavailable
|
|
36
|
+
连接失败时返回 `backend_unavailable`,要求等待 `https://app.itpay.ai` 恢复后重试同一命令,不得切换后端或继续下单。
|
|
37
|
+
|
|
38
|
+
CLI 已取得 Backend 的兼容性合同、但当前版本或 contract hash 不匹配时,返回一个可执行且版本固定的恢复动作:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"status": "error",
|
|
43
|
+
"error": {
|
|
44
|
+
"code": "backend_contract_incompatible",
|
|
45
|
+
"message": "CLI 2.0.14 contract sha256:client is incompatible with platform v3.example contract sha256:server (minimum CLI 2.0.15, maximum major 2)"
|
|
46
|
+
},
|
|
47
|
+
"result": {
|
|
48
|
+
"current_cli_version": "2.0.14",
|
|
49
|
+
"required_cli_version": "2.0.15"
|
|
50
|
+
},
|
|
51
|
+
"instruction": "当前 CLI 与 Backend 合约不兼容。停止所有 ItPay 业务命令;只执行 recovery.command,将 @itpay/cli 更新到 Backend 指定的精确版本。安装完成后确认 itpay --version 与 result.required_cli_version 完全一致,再重新运行 readyz。不要安装 latest、猜测版本、切换 Agent Type 或删除 Device 身份。",
|
|
52
|
+
"next": null,
|
|
53
|
+
"recovery": [
|
|
54
|
+
{
|
|
55
|
+
"command": "npm install -g @itpay/cli@2.0.15",
|
|
56
|
+
"reason": "安装 Backend 指定的兼容 CLI 版本"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
只允许使用 Backend 返回的 `minimum_cli_version` 生成精确 npm 版本。兼容性合同不可用、缺少合法版本或仅有无法验证的错误文本时,仍须停止且不得猜测安装版本。
|
|
35
63
|
|
|
36
64
|
## Agent Type / Host
|
|
37
65
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund cancel`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
在 Refund Owner 允许时取消 active refund。取消成功后释放访问锁,但不复活旧 Agent grant。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund create`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
为一笔订单提交退款意图。Refund Owner 从订单推导 Buyer、支付、金额、币种、消费事实和审核策略;Agent 只提交订单和用户原因。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund get`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
读取一笔当前身份可见退款的权威快照、交付锁和可取消性。它只请求一次,不轮询、不改变退款状态。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 命令范围
|
|
4
6
|
|
|
5
7
|
创建、恢复、跟踪和取消退款申请。Refund Owner 决定政策和状态;CLI 只提交用户意图并展示服务端事实。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund list`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
列出指定订单的退款记录,按最新到最旧排序。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay refund watch`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
轮询同一退款直到终态或 timeout。命令内部可以读取多次,但对外只输出一个最终信封,不把无变化轮询刷入 Agent 上下文。中断后可无副作用重跑。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay services action`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
记录用户或 Agent 对 Service Execution 的结构化动作,例如选择候选、批准、拒绝或取消。它不直接调用付费 Provider。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# `itpay services checkout`
|
|
2
2
|
|
|
3
|
+
> **Product boundary:** `itpay` is the single public CLI entry point, and `$itpay` is its user-facing Skill invocation. Under that one product entry point, the two top-level commerce actions are `buy` and `sell`: Buyer workflows are available now; Seller workflows will use the same entry point and are not implemented yet.
|
|
4
|
+
|
|
3
5
|
## 范围与意义
|
|
4
6
|
|
|
5
7
|
为单个 Service Execution 快速创建或恢复 Checkout,并按 Host 向人交接付款入口。它是 `services quote -> cart add --quote -> buy --cart` 的单项快捷方式,必须复用相同的 Quote、Cart 和 Checkout Use Case。
|