@itpay/cli 2.0.13 → 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/docs.js +1 -0
- package/dist/src/commands/guidance.js +3 -8
- package/dist/src/commands/install.js +2 -2
- package/dist/src/commands/readyz.js +2 -2
- package/dist/src/commands/skill.js +10 -10
- package/dist/src/main.js +8 -10
- package/dist/src/state/config.js +4 -3
- 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 +26 -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 +4 -2
- 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 +12 -10
- 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 +2 -0
- 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 +5 -3
- package/docs/cli-reference/conventions.md +2 -0
- package/docs/cli-reference/index.md +3 -1
- package/package.json +6 -3
- package/skills/{itpay-buyer → itpay}/SKILL.md +39 -17
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: itpay
|
|
2
|
+
name: itpay
|
|
3
3
|
description: >
|
|
4
|
-
Use the ItPay
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Use the single ItPay entry point when a human asks an Agent to buy or sell
|
|
5
|
+
through ItPay. Buyer workflows cover service discovery, purchase, Checkout,
|
|
6
|
+
delivery, recovery, and refunds. Seller workflows are not yet implemented.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# ItPay
|
|
9
|
+
# ItPay
|
|
10
10
|
|
|
11
11
|
Use the CLI as the only ItPay control surface. Never recreate API calls or hardcode a service-specific sequence.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## One Entry Point, Two Action Domains
|
|
14
|
+
|
|
15
|
+
- `itpay` is the only CLI entry point, and `$itpay` is the only user-facing Skill invocation. Never create or route users to a separate Buyer or Seller entry point.
|
|
16
|
+
- `buy` and `sell` are the two top-level ItPay action domains.
|
|
17
|
+
- Buyer workflows are available now. Seller workflows will use this same `itpay` entry point, but are not implemented in the current release.
|
|
18
|
+
- Do not invent Seller commands, onboarding, listings, or successful Seller state before that workflow ships.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
## Critical Rules
|
|
21
|
+
|
|
22
|
+
- The production CLI Backend is fixed to `https://app.itpay.ai`. Never use an environment variable, alternate launcher, or recovery path to redirect it.
|
|
23
|
+
- Keep one honest Agent Type, one CLI/Node launcher, and one Host-approved permission context for the whole flow. Supported types: `codex-desktop`, `codex-cli`, `claude-code-desktop`, `claude-code-cli`, `workbuddy`.
|
|
24
|
+
- WorkBuddy: before any ItPay Bash command that persists `~/.itpay-v3`, set the Shell tool parameter `dangerouslyDisableSandbox` to `true`. If the human denies that permission, the command did not run: stop and report it.
|
|
17
25
|
- Windows, tasks, chats, processes, and model sessions are not new Agents. Never rotate Agent Type or identity to reset quota.
|
|
18
|
-
-
|
|
19
|
-
-
|
|
26
|
+
- Treat `next.command` as the preferred continuation, not an unconditional command. If the current result already satisfies the user's stated goal, present it and stop.
|
|
27
|
+
- Keep internal parsing, retries, sandbox diagnosis, and command translation out of the user response; report useful progress, results, and real human decisions only.
|
|
28
|
+
- If Device state is not writable, stop. Do not switch Node, manually create lock files, delete identity, or rotate Agent Type.
|
|
20
29
|
|
|
21
30
|
## Bootstrap
|
|
22
31
|
|
|
23
32
|
```bash
|
|
24
33
|
npm install -g @itpay/cli
|
|
25
34
|
itpay readyz --json
|
|
26
|
-
itpay skill show itpay
|
|
35
|
+
itpay skill show itpay --json
|
|
27
36
|
itpay install --json
|
|
28
37
|
itpay install <agent_type> --json
|
|
29
38
|
itpay --agent-type <agent_type> readyz --json
|
|
@@ -35,11 +44,24 @@ If `backend_contract_incompatible` returns `result.required_cli_version`, stop e
|
|
|
35
44
|
|
|
36
45
|
## Identity And Sessions
|
|
37
46
|
|
|
38
|
-
- One local Ed25519 private key represents this installation. Never expose, copy,
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- The CLI
|
|
42
|
-
-
|
|
47
|
+
- One local Ed25519 private key represents this ItPay installation. Never expose, copy, or rotate it to recover quota.
|
|
48
|
+
- The CLI uses one production Device registration at `https://app.itpay.ai` with one Agent Instance per `agent_type`. Different windows and chats of the same type reuse it; different types get separate instances under that registration.
|
|
49
|
+
- Every commerce command must keep the explicit `--agent-type` returned in `next` and `recovery`, or use one stable `ITPAY_AGENT_TYPE`. Never fall back to another type previously used on the machine.
|
|
50
|
+
- The CLI renews an expired or rejected device session and retries the same request exactly once. If that retry still fails, stop and report it; do not loop, create a new identity, or switch Agent Type.
|
|
51
|
+
- A revoked v2 device is not replaced automatically. It requires an explicit operator recovery path.
|
|
52
|
+
- If an operator confirms that the `https://app.itpay.ai` Device registration database was reset, use `device recover --confirm-backend-reset`. This preserves the private key; never use it for ordinary session expiry or revocation.
|
|
53
|
+
- `--host` selects presentation. `--target` is only the destination chat/channel/open ID required by some Hosts. Neither is business input or identity.
|
|
54
|
+
|
|
55
|
+
## Envelope Rule
|
|
56
|
+
|
|
57
|
+
For every JSON response:
|
|
58
|
+
|
|
59
|
+
1. Read `status` and `result` as current facts.
|
|
60
|
+
2. Follow `instruction` when explaining or presenting those facts.
|
|
61
|
+
3. Execute at most the one `next.command`, filling only explicit placeholders or required user data.
|
|
62
|
+
4. Use `recovery` only when the normal next step cannot continue.
|
|
63
|
+
|
|
64
|
+
Do not print the whole envelope to the user. Return the useful result, a short explanation, and the next human action when needed.
|
|
43
65
|
|
|
44
66
|
## Golden Flow
|
|
45
67
|
|
|
@@ -110,7 +132,7 @@ Reuse the same Execution and Checkout. Never start another Execution, create ano
|
|
|
110
132
|
itpay docs list --json
|
|
111
133
|
itpay docs search <term> --json
|
|
112
134
|
itpay docs show <topic> --json
|
|
113
|
-
itpay skill show itpay
|
|
135
|
+
itpay skill show itpay --json
|
|
114
136
|
```
|
|
115
137
|
|
|
116
138
|
Normative command contracts are packaged under `docs/cli-reference`.
|