@itpay/cli 2.1.64 → 2.1.65

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.
@@ -1,4 +1,4 @@
1
- const CLI_VERSION = "2.1.64";
1
+ const CLI_VERSION = "2.1.65";
2
2
  const API_CONTRACT_REVISION = "sha256:f20af3780a0e12a79a6ca9507ba65167a4018338495af66d87931e55619b618a";
3
3
  export {
4
4
  API_CONTRACT_REVISION,
@@ -34,3 +34,21 @@ The current local candidate includes this reference and the independent API Skil
34
34
  ## Entry selection
35
35
 
36
36
  For a new task, prefer the official pinned ItPay CLI when execution is permitted and available in the current host. Install only through the host-permitted official installation path when authorized. Services tasks use the Services Skill; API tasks use the independent API Skill and `itpay api`. CLI calls HTTP APIs directly, never MCP transport. Without permitted CLI capability, use the corresponding ItPay-hosted user Services MCP or Hub MCP and only its actually available tools; ordinary users do not self-host another MCP. Platform-required workflows and explicit connection tests follow the actual available capability. Entry selection never authorizes a permission bypass: preserve the original identity, entry, request/run and current grant after acceptance or an unknown result. Continue across entries only when the owner explicitly supports recovery under the same actual authority; CLI errors never license a substitute transaction or raw HTTP workaround.
37
+
38
+
39
+ ## Original OAuth connection recovery
40
+
41
+ `itpay api recover-connection --json` is an explicit, noninteractive identity operation. It uses only the selected original profile's refresh proof, verifies the authority-issued original buyer/client/resource/consumer at the server, then checks `/v1/me` before committing that same binding. It never creates a connection, grant, run, continuation, hold or charge. Existing `api connect` refuses to replace a saved profile. Account equality or a client-family prefix is not original-connection proof.
42
+
43
+ Keep the original state directory and endpoint configuration. Missing/revoked proof, a wrong account or consumer, or an unavailable paired server stops recovery and preserves the original profile and local tasks. A rotated session is kept in a private `.recovery.json` candidate until verification succeeds; ordinary business commands stop while it exists. An unknown refresh result must not be retried automatically. An unknown recovery reply can reuse the same unexpired candidate via this recovery command without another refresh. Never delete recovery material or restore an old rotated refresh token to bypass this stop. An expired candidate can rotate its saved same-binding refresh proof; it never reuses the consumed original refresh. Lost or rejected original proof needs owner review, not a replacement login.
44
+
45
+ After successful recovery, only read original references with `api tasks --refresh --request-id <original_request_id> --json` or `api run-status <original_run_id> --json`. Recovery does not authorize `resume`, a new run or a payment. Interactive new-login recovery without original delegation proof is unsupported; stop and report the required evidence category instead of asking the user to log in blindly.
46
+
47
+ If another active connection occupies the original client slot, recovery returns `connection_recovery_conflict` without replacing or revoking it. Preserve both connections and the private candidate for owner review; do not delete a connection to force recovery.
48
+
49
+
50
+ ### Original consumer historical receipt
51
+
52
+ `itpay api original-receipt <exact_original_request_key> --json` reads a saved run result and actual charge using the original OAuth consumer. It does not activate the original connection, displace another active connection, resume a run or authorize spending. Use the exact original admission key (including any `cli-req-` prefix), not a new task key. This requires the paired historical receipt server and a still-valid, unrevoked original delegation.
53
+
54
+ A refreshed token stays in the existing private recovery candidate; the operational profile and tasks remain unchanged. Normal business commands continue to stop while recovery is pending. Lost GET replies may reuse the candidate; an unknown refresh result stops further refresh. Rejected proof or unavailable pairing requires owner review, never a replacement login or connection revocation. Expired saved results are not regenerated; retained charge facts remain readable. No automatic continuation is offered.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itpay/cli",
3
- "version": "2.1.64",
3
+ "version": "2.1.65",
4
4
  "description": "The ItPay CLI for services, orders, and human-authorized purchased content.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -148,5 +148,5 @@
148
148
  "services",
149
149
  "api"
150
150
  ],
151
- "gitHead": "1e5b2e4cbc612afbb963612015e29eefd735d006"
151
+ "gitHead": "9838867719610e7d25120c5874c0cc50bcaa292e"
152
152
  }
@@ -28,3 +28,14 @@ Read the full authoritative `terminal`, `pending_stage`, execution, settlement a
28
28
  Wallet atoms use the returned scale; don't confuse them with Payment minor units. Insufficient funds does not authorize a top-up. Only create an explicitly requested top-up using the advertised SKU/channel and supported presentation; keep the original intent. Native host confirmation and business consent are separate. Do not route around channel policy through Services, another CLI or raw HTTP.
29
29
 
30
30
  Show useful results, actual charges/limits and required human action plainly. A Payment URL/QR or callback does not prove credit, completion or fulfillment. Payment unknown/refund pending stays unresolved until the owner reports facts. Do not expose credentials, raw private requests or customer data. The API command reference is optional and only needed for the current command.
31
+
32
+
33
+ ## Original OAuth connection recovery
34
+
35
+ `itpay api recover-connection --json` is an explicit, noninteractive identity operation. It uses only the selected original profile's refresh proof, verifies the authority-issued original buyer/client/resource/consumer at the server, then checks `/v1/me` before committing that same binding. It never creates a connection, grant, run, continuation, hold or charge. Existing `api connect` refuses to replace a saved profile. Account equality or a client-family prefix is not original-connection proof.
36
+
37
+ Keep the original state directory and endpoint configuration. Missing/revoked proof, a wrong account or consumer, or an unavailable paired server stops recovery and preserves the original profile and local tasks. A rotated session is kept in a private `.recovery.json` candidate until verification succeeds; ordinary business commands stop while it exists. An unknown refresh result must not be retried automatically. An unknown recovery reply can reuse the same unexpired candidate via this recovery command without another refresh. Never delete recovery material or restore an old rotated refresh token to bypass this stop. An expired candidate can rotate its saved same-binding refresh proof; it never reuses the consumed original refresh. Lost or rejected original proof needs owner review, not a replacement login.
38
+
39
+ After successful recovery, only read original references with `api tasks --refresh --request-id <original_request_id> --json` or `api run-status <original_run_id> --json`. Recovery does not authorize `resume`, a new run or a payment. Interactive new-login recovery without original delegation proof is unsupported; stop and report the required evidence category instead of asking the user to log in blindly.
40
+
41
+ If another active connection occupies the original client slot, recovery returns `connection_recovery_conflict` without replacing or revoking it. Preserve both connections and the private candidate for owner review; do not delete a connection to force recovery.