@itpay/cli 2.1.19 → 2.1.22
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/dist/src/commands/catalog.js +1 -0
- package/dist/src/commands/rail_catalog.js +160 -11
- package/dist/src/commands/services.js +215 -47
- package/dist/src/commands/skill.js +1 -1
- package/dist/src/main.js +7 -3
- package/dist/src/render/markdown.js +0 -3
- package/dist/src/state/account_auth.js +6 -2
- package/dist/src/state/cart_session.js +4 -1
- package/dist/src/state/config.js +1 -1
- package/dist/src/state/task_journal.js +2 -0
- package/docs/agent/buyer/cart-checkout.json +5 -4
- package/docs/agent/buyer/catalog-list.json +24 -6
- package/docs/agent/buyer/identity-and-sessions.json +15 -10
- package/docs/agent/buyer/install-and-setup.json +5 -4
- package/docs/agent/buyer/orders-refunds.json +4 -4
- package/docs/agent/buyer/payment-flow.json +3 -3
- package/docs/agent/buyer/purchased-content.json +17 -3
- package/docs/agent/buyer/quickstart.json +18 -11
- package/docs/agent/buyer/rail-booking.json +79 -166
- package/docs/agent/buyer/rail-fast-checkout.json +21 -44
- package/docs/agent/buyer/render-hosts.json +8 -5
- package/docs/agent/buyer/service-feedback.json +2 -1
- package/docs/cli-reference/agent-types.md +1 -1
- package/docs/cli-reference/commands/auth.md +2 -0
- package/docs/cli-reference/commands/buy.md +1 -1
- package/docs/cli-reference/commands/cart/add.md +1 -1
- package/docs/cli-reference/commands/cart/clear.md +1 -1
- package/docs/cli-reference/commands/cart/index.md +1 -1
- package/docs/cli-reference/commands/cart/next.md +1 -1
- package/docs/cli-reference/commands/cart/remove.md +1 -1
- package/docs/cli-reference/commands/cart/show.md +1 -1
- package/docs/cli-reference/commands/catalog/index.md +1 -1
- package/docs/cli-reference/commands/catalog/list.md +1 -1
- package/docs/cli-reference/commands/checkout.md +1 -1
- package/docs/cli-reference/commands/device.md +4 -2
- package/docs/cli-reference/commands/docs/index.md +1 -1
- package/docs/cli-reference/commands/docs/list.md +1 -1
- package/docs/cli-reference/commands/docs/search.md +1 -1
- package/docs/cli-reference/commands/docs/show.md +1 -1
- package/docs/cli-reference/commands/install.md +2 -2
- package/docs/cli-reference/commands/next.md +1 -1
- package/docs/cli-reference/commands/order.md +1 -1
- package/docs/cli-reference/commands/pay.md +1 -1
- package/docs/cli-reference/commands/readyz.md +1 -1
- package/docs/cli-reference/commands/refund/cancel.md +1 -1
- package/docs/cli-reference/commands/refund/create.md +1 -1
- package/docs/cli-reference/commands/refund/get.md +2 -2
- package/docs/cli-reference/commands/refund/index.md +1 -1
- package/docs/cli-reference/commands/refund/list.md +1 -1
- package/docs/cli-reference/commands/refund/watch.md +1 -1
- package/docs/cli-reference/commands/services/action.md +3 -3
- package/docs/cli-reference/commands/services/checkout.md +1 -1
- package/docs/cli-reference/commands/services/events.md +1 -1
- package/docs/cli-reference/commands/services/get.md +1 -1
- package/docs/cli-reference/commands/services/index.md +1 -1
- package/docs/cli-reference/commands/services/invoke.md +3 -11
- package/docs/cli-reference/commands/services/list.md +1 -1
- package/docs/cli-reference/commands/services/next.md +12 -10
- package/docs/cli-reference/commands/services/page.md +9 -7
- package/docs/cli-reference/commands/services/quote.md +1 -1
- package/docs/cli-reference/commands/services/read-result.md +8 -8
- package/docs/cli-reference/commands/services/run.md +2 -2
- package/docs/cli-reference/commands/services/start.md +1 -1
- package/docs/cli-reference/conventions.md +2 -2
- package/package.json +7 -5
- package/skills/itpay/SKILL.md +70 -238
- package/docs/reviews/agent-ux-handoff-2026-09-23/IMPLEMENTATION-EVIDENCE.md +0 -174
- package/docs/skill-bundle-rollout/01-mcp-authentication.md +0 -134
- package/docs/skill-bundle-rollout/02-platform-bundle-repositories.md +0 -210
- package/docs/skill-bundle-rollout/03-platform-publishing.md +0 -161
- package/docs/skill-bundle-rollout/04-first-wave-platforms.md +0 -70
- package/docs/skill-bundle-rollout/05-sync-operations.md +0 -62
- package/docs/skill-bundle-rollout/README.md +0 -151
- /package/bin/{itp → itp.mjs} +0 -0
|
@@ -1,7 +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
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point for Buyer services and the existing itpay sell Seller workflow; $itpay is its user-facing Skill invocation.",
|
|
5
5
|
"topic": "catalog-list",
|
|
6
6
|
"title": "Browse ItPay V3 Service Catalog",
|
|
7
7
|
"purpose": "Explain available services, outcomes, conditions, and prices in human language without exposing catalog identifiers.",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"item_format": "Explain the title, what the human receives, any auxiliary discovery step, and the published price.",
|
|
21
21
|
"service_flow": "Explain discovery as an auxiliary identity-confirmation step, including free quota and paid continuation. Present primary_service as the actual paid outcome. Read all values from the manifest.",
|
|
22
22
|
"variant_selection": "Internal IDs are for the Agent's next command only and are never shown or requested from the human.",
|
|
23
|
-
"price_note": "amount_minor is in minor units (e.g., 10000 = 100.00 CNY). The CLI formats prices as XX.YY currency automatically."
|
|
23
|
+
"price_note": "amount_minor is in minor units (e.g., 10000 = 100.00 CNY). The CLI formats prices as XX.YY currency automatically.",
|
|
24
|
+
"railway": "Railway entries point to itpay docs show rail-booking --json; use its query and booking contracts instead of a generic start→invoke→cart sequence."
|
|
24
25
|
},
|
|
25
26
|
"agent_rules": [
|
|
26
27
|
"Use catalog list only when the human asks for a new service, not when they want an earlier purchase.",
|
|
@@ -28,15 +29,32 @@
|
|
|
28
29
|
"Explain the customer journey from service_flow instead of presenting every variant as an unrelated service.",
|
|
29
30
|
"State free quota, paid continuation price, email requirement, and claim purpose exactly as published; do not exaggerate or omit conditions.",
|
|
30
31
|
"Ask the human to choose only when multiple services could satisfy the goal; never make them choose an internal variant or offer ID.",
|
|
31
|
-
"
|
|
32
|
+
"Use each service’s returned input contract; railway planning and booking follow rail-booking, not a universal Cart route."
|
|
32
33
|
],
|
|
33
34
|
"human_language": {
|
|
34
|
-
"prefer": [
|
|
35
|
-
|
|
35
|
+
"prefer": [
|
|
36
|
+
"服务",
|
|
37
|
+
"查询",
|
|
38
|
+
"报告",
|
|
39
|
+
"免费次数",
|
|
40
|
+
"价格",
|
|
41
|
+
"你会得到什么"
|
|
42
|
+
],
|
|
43
|
+
"avoid": [
|
|
44
|
+
"service_id",
|
|
45
|
+
"variant_id",
|
|
46
|
+
"offer_id",
|
|
47
|
+
"capability",
|
|
48
|
+
"manifest"
|
|
49
|
+
]
|
|
36
50
|
},
|
|
37
51
|
"next_docs": [
|
|
38
52
|
{
|
|
39
|
-
"condition": "
|
|
53
|
+
"condition": "Railway service selected",
|
|
54
|
+
"topic": "rail-booking"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"condition": "Non-rail Buyer selected a service and wants to purchase",
|
|
40
58
|
"topic": "cart-checkout",
|
|
41
59
|
"file": "docs/agent/buyer/cart-checkout.json"
|
|
42
60
|
}
|
|
@@ -1,7 +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
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point for Buyer services and the existing itpay sell Seller workflow; $itpay is its user-facing Skill invocation.",
|
|
5
5
|
"topic": "identity-and-sessions",
|
|
6
6
|
"title": "Device Identity And Session Recovery",
|
|
7
7
|
"purpose": "Explain stable local identity, official Backend-scoped registrations, Agent Type instances, and bounded automatic session recovery.",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"identity_model": {
|
|
14
14
|
"local_key": "One owner-only Ed25519 private key for the local installation.",
|
|
15
|
-
"backend_registration": "One registration per official Backend
|
|
15
|
+
"backend_registration": "One registration per configured official Backend. Follow the current CLI backend allowlist; do not switch to evade failures.",
|
|
16
16
|
"agent_instance": "One instance per agent_type under each Backend registration; same-type windows and chats reuse it.",
|
|
17
17
|
"presentation": "Host and target route output only and never identify the Agent or provide business input."
|
|
18
18
|
},
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"Re-enrolling a public key the Backend already holds re-attaches to the existing device and quota lineage after proof-of-possession; it never creates a duplicate device. If enrollment verification keeps failing with internal_error, or returns agent_device_key_rotated or agent_device_key_conflict, `itpay device reset-key --confirm-key-reset` is the supported way to start over with a fresh key."
|
|
27
27
|
],
|
|
28
28
|
"local_state_recovery": [
|
|
29
|
-
"Device state
|
|
29
|
+
"Device state uses an owner-only atomic file replacement and a lock that the CLI can inspect. On a stale lock, run the returned device repair-lock command; it only reclaims a proven stale owner.",
|
|
30
30
|
"Operation idempotency uses one immutable owner-only record per operation key. Different commands and Agent processes do not share a global operation-journal lock; legacy operations.json is read only.",
|
|
31
31
|
"On device_state_unwritable, use the reported operation and errno to diagnose the failing stage without exposing local paths; keep the same Agent Type and CLI/Node launcher, restore Host-approved persistent access to ~/.itpay-v3, then retry the original command.",
|
|
32
|
-
"Do not
|
|
32
|
+
"Do not delete a live lock, switch Node runtimes, delete identity, or rotate Agent Type as a retry strategy."
|
|
33
33
|
],
|
|
34
34
|
"commands": [
|
|
35
35
|
{
|
|
@@ -51,19 +51,24 @@
|
|
|
51
51
|
"intent": "abandon the local device key after the Backend refuses to complete enrollment with it (persistent internal_error, agent_device_key_rotated, or agent_device_key_conflict)",
|
|
52
52
|
"command": "itpay device reset-key --confirm-key-reset --json",
|
|
53
53
|
"success_signal": "the local private key is discarded and the next command enrolls as a brand-new device"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"intent": "repair only a proven stale local device lock",
|
|
57
|
+
"command": "itpay device repair-lock --json",
|
|
58
|
+
"success_signal": "the CLI reports whether the lock was stale and reclaimed; an active owner stays protected"
|
|
54
59
|
}
|
|
55
60
|
],
|
|
56
61
|
"agent_rules": [
|
|
57
62
|
"Use the real runtime type and keep it stable across every command in the flow.",
|
|
58
63
|
"Keep the same CLI/Node launcher and Host-approved permission context for the whole flow.",
|
|
59
64
|
"Treat a new window, chat, task, or process of the same runtime as the same Agent Type, not a new identity.",
|
|
60
|
-
"
|
|
65
|
+
"Production defaults to https://app.itpay.ai; explicit sandbox or dev testing uses https://sandbox.itpay.ai or https://dev.itpay.ai. Keep the complete returned Backend-prefixed command for that flow.",
|
|
61
66
|
"After automatic recovery fails, stop and report the exact code, selected official Backend, Agent Type, and command family without exposing private keys or tokens."
|
|
62
67
|
],
|
|
63
68
|
"forbidden": [
|
|
64
69
|
"Do not delete ~/.itpay-v3, rotate the key, switch Agent Type, or repeatedly retry to obtain fresh quota.",
|
|
65
70
|
"Do not use device recover for session expiry, revocation, quota recovery, or an unconfirmed Backend failure.",
|
|
66
|
-
"Do not
|
|
71
|
+
"Do not switch Backend to evade a failure. Allowed public URLs are app.itpay.ai, sandbox.itpay.ai and dev.itpay.ai; local loopback requires the explicit CLI development flag.",
|
|
67
72
|
"Do not use --target as identity or service input."
|
|
68
73
|
],
|
|
69
74
|
"next_docs": [
|
|
@@ -93,10 +98,10 @@
|
|
|
93
98
|
],
|
|
94
99
|
"auth_session_states": {
|
|
95
100
|
"stages": "The CLI now reports the auth session stage exactly as the server returns it: waiting_provider (show the handoff and wait), email_verification_required (the human must verify the emailed code on the auth page), merge_confirmation_required (an existing account matches — the human must confirm the merge on the auth page), provider_pending/pending (generic wait), completed (session done — bind it, do not restart).",
|
|
96
|
-
"terminal_states": "auth_expired/auth_denied/auth_cancelled/auth_failed mean this session is over; say so plainly and
|
|
97
|
-
"transport_unknown": "
|
|
98
|
-
"missing": "
|
|
99
|
-
"completed_resume": "
|
|
101
|
+
"terminal_states": "auth_expired/auth_denied/auth_cancelled/auth_failed mean this session is over; say so plainly and respect denial or cancellation. Start a new session only on an explicit login request; never keep polling a dead one.",
|
|
102
|
+
"transport_unknown": "auth_status_unknown means a network error while polling — the outcome is unknown. Keep waiting on the SAME session (it may still complete); do NOT restart auth, and do not assume denial.",
|
|
103
|
+
"missing": "auth_session_missing means the cached session is gone. An explicit auth login opens one fresh official session in that call; auth status stays read-only.",
|
|
104
|
+
"completed_resume": "After login completes, execute the returned command to resume the same paused service execution. Login does not silently run that command.",
|
|
100
105
|
"path_b": "A buyer who reaches checkout without a login completes identity inside the protected checkout page; never force a separate itpay auth login first."
|
|
101
106
|
}
|
|
102
107
|
}
|
|
@@ -35,20 +35,21 @@
|
|
|
35
35
|
"For first setup or a runtime change, identify the real Agent Type once, run itpay install <agent_type> --json yourself, and follow its setup continuation until the packaged Skill is loaded. Ordinary service requests start from the Skill's service command, without repeating install or readyz.",
|
|
36
36
|
"After setup, tell the human only that ItPay is ready; never ask them to run setup commands or explain technical setup steps.",
|
|
37
37
|
"Use the CLI distribution already provided by the current npm package, Skill, or plugin; update only through that distribution's own instructions.",
|
|
38
|
-
"Production defaults to https://app.itpay.ai. Testing may set ITPAY_BACKEND_URL to the exact official URL
|
|
38
|
+
"Production defaults to https://app.itpay.ai. Testing may set ITPAY_BACKEND_URL to the exact official URL the configured official test Backend only when explicitly requested; follow the CLI allowlist.",
|
|
39
39
|
"If backend_contract_incompatible includes result.required_cli_version, stop all ItPay business commands and use only the exact distribution-specific update recovery returned by the CLI; never replace its version with latest.",
|
|
40
40
|
"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.",
|
|
41
41
|
"Use one exact type: codex-desktop, codex-cli, claude-code-desktop, claude-code-cli, workbuddy, zcode, doubao-work, kimi-code, or openclaw.",
|
|
42
42
|
"For compatibility, a global --agent-type codex declaration is normalized immediately to codex-desktop; all registration, output, and returned commands use codex-desktop. Never generate the alias, and do not use codex as an install target.",
|
|
43
|
-
"One local private key is reused, while Device registrations and quota lineage remain separate for app.itpay.ai and
|
|
43
|
+
"One local private key is reused, while Device registrations and quota lineage remain separate for app.itpay.ai, sandbox.itpay.ai and dev.itpay.ai.",
|
|
44
44
|
"Within each official Backend registration, each Agent Type has one Agent Instance; all windows and chats of the same type reuse it.",
|
|
45
45
|
"Agent Type identifies the runtime. Host and target only select a presentation destination; load render-hosts only when a handoff cannot be shown.",
|
|
46
46
|
"Keep the exact Agent Type in every next or recovery command; do not fall back to a type previously used by another runtime.",
|
|
47
|
-
"Do not change Agent Type or rotate local identity to reset quota or recover a failed command."
|
|
47
|
+
"Do not change Agent Type or rotate local identity to reset quota or recover a failed command.",
|
|
48
|
+
"Skillhub and local host bundles are separate installed artifacts; verify their version and packaged Skill/docs instead of assuming an npm update changed them."
|
|
48
49
|
],
|
|
49
50
|
"forbidden": [
|
|
50
51
|
"Do not use terminal, claude-code, or plain-chat as Agent Types. Do not generate codex as an Agent Type; it is accepted only as a legacy global declaration and becomes codex-desktop before any request.",
|
|
51
|
-
"Do not set or suggest
|
|
52
|
+
"Do not set or suggest a Backend outside the CLI allowlist: https://app.itpay.ai, https://sandbox.itpay.ai, https://dev.itpay.ai; local loopback requires the CLI development flag. Do not switch Backend to evade a failure.",
|
|
52
53
|
"Do not claim that install writes host configuration or registers a device; it only prints instructions.",
|
|
53
54
|
"Do not create a new identity for a different window, task, chat, or process of the same Agent Type."
|
|
54
55
|
],
|
|
@@ -1,7 +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
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point for Buyer services and the existing itpay sell Seller workflow; $itpay is its user-facing Skill invocation.",
|
|
5
5
|
"topic": "orders-refunds",
|
|
6
6
|
"title": "Order, Delivery, Customer Care And Refund Recovery",
|
|
7
7
|
"purpose": "Explain paid-order and delivery problems to the human, then read or manage the same owned Order without guessing payment, consumption, or refund state.",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
{
|
|
35
35
|
"intent": "cancel before provider submission",
|
|
36
36
|
"command": "itpay --agent-type <agent_type> refund cancel <refund_request_id> --json",
|
|
37
|
-
"success_signal": "the Refund Owner
|
|
37
|
+
"success_signal": "the Refund Owner returns the current cancellation and access state; old grants do not revive"
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
"agent_rules": [
|
|
41
41
|
"Act as the human's ItPay service representative: explain payment, delivery, access, and refund facts in plain language before giving the next action.",
|
|
42
42
|
"After verified payment, say the Order is recorded and the human must not pay again. Recover that same Order or Service Execution if delivery is delayed or fails.",
|
|
43
43
|
"ItPay derives payment, amount, currency, account ownership, and refund policy from the owned order; explain only their user-facing meaning.",
|
|
44
|
-
"
|
|
44
|
+
"Read this order’s current refund policy. Railway return depends on supplier ticket facts and may require manual review; platform refund status alone does not prove a train ticket was returned.",
|
|
45
45
|
"A refund request freezes all delivery paths and revokes existing grants immediately.",
|
|
46
|
-
"Cancellation or rejection
|
|
46
|
+
"Cancellation or rejection follows the returned order policy and never reactivates an old grant automatically.",
|
|
47
47
|
"Use get or watch after interruption; do not infer success from elapsed time.",
|
|
48
48
|
"Never switch CLI/MCP lanes or identities to recover an order or refund error.",
|
|
49
49
|
"A read-only MCP Agent may explain policy and order facts, but directs refund actions to the ItPay Dashboard or a full Local CLI Agent."
|
|
@@ -1,7 +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
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point for Buyer services and the existing itpay sell Seller workflow; $itpay is its user-facing Skill invocation.",
|
|
5
5
|
"topic": "payment-flow",
|
|
6
6
|
"title": "Human Checkout Handoff And Payment Verification",
|
|
7
7
|
"purpose": "Show the ItPay Checkout to the human and recover authoritative payment state without creating duplicate payment resources.",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"intent": "present the Checkout handoff",
|
|
15
15
|
"command": "<execute the exact command returned by buy or services checkout>",
|
|
16
|
-
"success_signal": "the
|
|
16
|
+
"success_signal": "the returned official URL and/or QR supported by the actual Host is visible to the human"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"intent": "read authoritative Checkout state",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"agent_rules": [
|
|
30
30
|
"Normal buyer flow opens the ItPay Checkout page; itpay pay and buy --pay are operator escape hatches.",
|
|
31
31
|
"Use only handoff fields returned for the current Host and make them actually visible to the human.",
|
|
32
|
-
"
|
|
32
|
+
"Obtain only missing required agreement or material price/term changes. Reuse a valid explicit confirmation for unchanged terms; never invent it.",
|
|
33
33
|
"After presenting a Checkout, stop. Run the returned next.command only after the human completes the payment action or asks to query the same Checkout.",
|
|
34
34
|
"Use only the handoff fields returned for the current Host. Load render-hosts if the official handoff is not visible.",
|
|
35
35
|
"Payment is verified only by Backend Checkout or Order state, never by QR rendering, redirect, or user claim.",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"intent_routing": {
|
|
30
30
|
"previous_content": "Use vault list, optionally with the subject as --query.",
|
|
31
31
|
"purchase_history": "Use orders.",
|
|
32
|
-
"new_service": "
|
|
32
|
+
"new_service": "For a new railway request, read rail-booking; for other new services, use catalog. No previous-content match does not block a separately requested new railway query.",
|
|
33
33
|
"ambiguous": "Ask whether the human wants an earlier purchase or a new query before calling ItPay."
|
|
34
34
|
},
|
|
35
35
|
"authorization_flow": [
|
|
@@ -41,8 +41,22 @@
|
|
|
41
41
|
"Never rerun vault access as a status check."
|
|
42
42
|
],
|
|
43
43
|
"human_language": {
|
|
44
|
-
"prefer": [
|
|
45
|
-
|
|
44
|
+
"prefer": [
|
|
45
|
+
"previously purchased content",
|
|
46
|
+
"past report",
|
|
47
|
+
"purchase history",
|
|
48
|
+
"已购内容",
|
|
49
|
+
"以前购买的报告",
|
|
50
|
+
"购买记录"
|
|
51
|
+
],
|
|
52
|
+
"avoid": [
|
|
53
|
+
"Vault",
|
|
54
|
+
"artifact",
|
|
55
|
+
"Device",
|
|
56
|
+
"Buyer",
|
|
57
|
+
"grant",
|
|
58
|
+
"start token"
|
|
59
|
+
]
|
|
46
60
|
},
|
|
47
61
|
"partial_results": {
|
|
48
62
|
"available": "Explain the returned section normally.",
|
|
@@ -1,7 +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
|
|
4
|
+
"product_scope": "itpay is the single public CLI entry point for Buyer services and the existing itpay sell Seller workflow; $itpay is its user-facing Skill invocation.",
|
|
5
5
|
"topic": "quickstart",
|
|
6
6
|
"title": "Route One Human Intent Through ItPay",
|
|
7
7
|
"purpose": "Choose the correct first action from the human's words and continue through one authoritative CLI envelope at a time.",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"required_state": {
|
|
13
13
|
"needs": [
|
|
14
14
|
"the real supported Agent Type",
|
|
15
|
-
"one
|
|
15
|
+
"one allowed Backend: production https://app.itpay.ai by default; explicit https://sandbox.itpay.ai or https://dev.itpay.ai for the corresponding test environment"
|
|
16
16
|
],
|
|
17
17
|
"must_not_need": [
|
|
18
18
|
"Admin access",
|
|
@@ -21,18 +21,21 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"intent_routing": {
|
|
24
|
-
"new_service": "
|
|
24
|
+
"new_service": "For other new services, use itpay catalog list --json and the selected input contract.",
|
|
25
25
|
"previous_content": "Use vault list, optionally with the subject as --query.",
|
|
26
26
|
"purchase_history": "Use orders.",
|
|
27
27
|
"refund_or_paid_problem": "Resume the known Order or Refund before creating anything new.",
|
|
28
28
|
"service_feedback": "Finish the original order outcome first, then submit one safe Agent postmortem; include a rating or comment only when the human explicitly gives it.",
|
|
29
|
-
"ambiguous": "Ask whether the human wants an earlier purchase or a new query before calling ItPay."
|
|
29
|
+
"ambiguous": "Ask whether the human wants an earlier purchase or a new query before calling ItPay.",
|
|
30
|
+
"railway": "Known railway intent: itpay docs show rail-booking --json. Read once, then follow its Exact/Smart route."
|
|
30
31
|
},
|
|
31
|
-
"commands": [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
"commands": [
|
|
33
|
+
{
|
|
34
|
+
"intent": "continue the selected flow",
|
|
35
|
+
"command": "<execute the exact next.command returned by the previous CLI envelope>",
|
|
36
|
+
"success_signal": "the next envelope reports one current state and at most one preferred action"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
36
39
|
"agent_rules": [
|
|
37
40
|
"Use the CLI as the control surface; infer the human's intent before the first command and never hardcode a service workflow.",
|
|
38
41
|
"Treat result as current facts, instruction as how to use those facts, next as the preferred executable action, and recovery as exceptional paths.",
|
|
@@ -40,10 +43,10 @@
|
|
|
40
43
|
"Keep the same explicit Agent Type through next and recovery commands; same-type windows reuse one Backend Agent Instance.",
|
|
41
44
|
"When testing sandbox, execute every returned command unchanged so its ITPAY_BACKEND_URL=https://sandbox.itpay.ai prefix is preserved.",
|
|
42
45
|
"Use --target only for a Host presentation destination. Put capability business values in --input key=value exactly as required by the schema.",
|
|
43
|
-
"Start a separate Service Execution for each independent service intent; quota remains shared according to Backend identity policy.",
|
|
44
46
|
"Ask the user for required email or contact values and explain their purpose; never invent them.",
|
|
45
47
|
"Explain useful service facts in ordinary language; never ask the human to run commands or learn internal IDs.",
|
|
46
|
-
"Normal payment uses the returned ItPay Checkout handoff."
|
|
48
|
+
"Normal payment uses the returned ItPay Checkout handoff.",
|
|
49
|
+
"A railway query execution and its separate booking execution may serve one purchase intent; keep both references."
|
|
47
50
|
],
|
|
48
51
|
"forbidden": [
|
|
49
52
|
"Do not invent catalog, variant, offer, capability, result item, order or refund IDs.",
|
|
@@ -51,6 +54,10 @@
|
|
|
51
54
|
"Do not bypass a grant, refund lock, ownership error or compatibility gate."
|
|
52
55
|
],
|
|
53
56
|
"next_docs": [
|
|
57
|
+
{
|
|
58
|
+
"condition": "Known railway request",
|
|
59
|
+
"topic": "rail-booking"
|
|
60
|
+
},
|
|
54
61
|
{
|
|
55
62
|
"condition": "Need service catalog language",
|
|
56
63
|
"topic": "catalog-list"
|