@tempoxyz/mercator 0.0.614 → 0.0.619
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.
|
@@ -53,12 +53,12 @@ If payment capability is uncertain, or `create_job` unexpectedly requests paymen
|
|
|
53
53
|
schema, example, payment offer, route detail, or unresolved required argument is needed. Use exact
|
|
54
54
|
cataloged service IDs, methods, and paths; catalog examples are documentation, not input.
|
|
55
55
|
3. **Quote before execution.** Call `quote_plan` on the complete plan. Discovery, descriptions, and
|
|
56
|
-
quoting are free. If the plan changes, quote it again.
|
|
56
|
+
quoting are free. If the plan changes or `validUntil` has elapsed, quote it again.
|
|
57
57
|
4. **Respect scope and spending limits.** With hosted OAuth, the connected access key authorizes
|
|
58
58
|
Mercator spending within its signed limits; do not ask for per-job spend approval. Respect any explicit user budget
|
|
59
59
|
and execute only the requested actions. Legacy `mcp_challenge` clients have no hosted grant:
|
|
60
60
|
get quote approval or use a sufficient explicit budget before paid execution, including REST fallback.
|
|
61
|
-
5. **Submit once.** Generate one stable 8-200 character
|
|
61
|
+
5. **Submit once.** Generate and persist one stable 8-200 character `idempotency_key` and call `create_job` with
|
|
62
62
|
the unchanged quoted plan and `totalAmount` as `approved_total`.
|
|
63
63
|
- Changed quote: no charge occurs. Quote again and continue only within the access-key limits and
|
|
64
64
|
any explicit user budget. Legacy clients need approval unless that budget covers the new total.
|
|
@@ -66,7 +66,7 @@ If payment capability is uncertain, or `create_job` unexpectedly requests paymen
|
|
|
66
66
|
receives no wallet private key.
|
|
67
67
|
- Legacy client: complete the payment challenge through MCP metadata.
|
|
68
68
|
- Failed MCP submission and one identical retry: use REST only when the host already has a ready
|
|
69
|
-
local Mercator wallet. Keep the plan,
|
|
69
|
+
local Mercator wallet. Keep the plan, `idempotency_key`, and approved total unchanged. Obtain quote
|
|
70
70
|
approval or stay within an explicit budget; the hosted grant does not authorize the local wallet.
|
|
71
71
|
- Never install, create, or connect a wallet for fallback.
|
|
72
72
|
6. **Listen for completion.** Persist the returned `jobId` immediately; it is the only status and
|
|
@@ -83,11 +83,25 @@ Ask for that address; do not invent it or quietly remove the email step.
|
|
|
83
83
|
|
|
84
84
|
## MCP submission and status
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
1. Generate and persist an 8–200 character `idempotency_key` before submission; a UUID works.
|
|
87
|
+
2. Call `create_job` once with the unchanged quoted plan, that key, and the quoted `totalAmount` as
|
|
88
|
+
`approved_total`.
|
|
89
|
+
3. After a timeout or lost response, retry with the same plan, key, and approved total.
|
|
90
|
+
|
|
91
|
+
- Use a new key for a new logical job. A new key during recovery can create a second paid job.
|
|
92
|
+
- Omitting the key fails validation. Never reuse a key with a changed plan.
|
|
93
|
+
- OAuth-connected hosts charge the bounded wallet inside Mercator.
|
|
94
|
+
- Legacy challenge clients require quote approval or a sufficient explicit budget, including after
|
|
95
|
+
a price change.
|
|
96
|
+
- Never install a CLI or translate MCP submission into a REST request.
|
|
97
|
+
|
|
98
|
+
For an illustrative quote with `totalAmount: "0.007"`, pass `approved_total: "0.007"`.
|
|
99
|
+
Preserve the exact decimal string; never guess a total or infer it from a discovery estimate.
|
|
100
|
+
Hosted OAuth spending is authorized by the signed access-key limits, subject to explicit user
|
|
101
|
+
budgets. Legacy clients need quote approval or a sufficient explicit budget. If `validUntil`
|
|
102
|
+
has elapsed, refresh the quote before submitting and apply the same authorization rules to any
|
|
103
|
+
changed price. An `approval_required` response means the quoted total was not supplied and no
|
|
104
|
+
charge was made: supply the actual quote total with the same plan and idempotency key.
|
|
91
105
|
|
|
92
106
|
A successful submission returns either a terminal job or a pending response:
|
|
93
107
|
|