Skip to content

docs(order-compute): tokens, catalog-first attestation check, and a fast path - #15

Open
GigaHierz wants to merge 1 commit into
mainfrom
docs/order-compute-tokens-and-catalog
Open

GigaHierz wants to merge 1 commit into
mainfrom
docs/order-compute-tokens-and-catalog

Conversation

@GigaHierz

Copy link
Copy Markdown
Contributor

Why

Three findings in #12 and one in #11, all confirmed against the live gateway and the published @celo/buy@0.5.0 tarball today:

  • GET /gcloud/catalog returns tokens: ["USDC","USDT","USAT"] and the 402 carries three accepts, but @celo/buy-core@0.5.0 has addresses only for USDC and USDT. The skill said "USDC or USDT" in every price cell and never stated what --token accepts, so an agent could neither know the valid values nor explain the third entry.
  • The catalog already exposes attestationRequired per machine type. The skill told agents to discover it by POSTing each type and reasoning from an absent extra.selfRequirements, which costs a request per type.
  • insufficient_balance names only the selected token (USDC by default), so a USDT-only wallet is told to go fund USDC when --token USDT would settle immediately.
  • setup cannot import a key, so anyone who declared an agent wallet elsewhere ends up paying from a second, undeclared address.

Beyond the issues, the skill had no single place saying how few calls a purchase needs. Agents were probing per type and re-quoting, which is most of the latency between "rent me a VM" and a result.

What

skills/order-compute/SKILL.md only.

  • New Fast path section at the top: catalog → quote → pay → poll, and "do not add calls between them".
  • Price column is plain USD. New Tokens paragraph: USDC and USDT are the only values for --token / token; the gateway's third entry (Tether America USD) is accepted upstream but not signable with the pinned release, so do not offer or pass it.
  • Attestation section reads attestationRequired from the catalog; the 402 stays as the confirmation for the exact body.
  • insufficient_balance row: check balances, retry with the other accepted token before asking the user to fund.
  • Wallet section: buy pays only from a wallet it generated; declare that address wherever an agent wallet was already declared; funding it is an ordinary ERC-20 transfer outside the CLI.

The third token is deliberately named by its display name rather than its symbol so that PR #10's token check (which fails on any mention of a symbol the pinned CLI cannot sign for) passes; once a release ships the address, that same check will flag the skill for not documenting it.

Verification

  • curl https://usebuy.ai/gcloud/catalog — prices and attestationRequired match the table.
  • PR ci: check the skill against the deployed gateway, not a branch #10's scripts/check-against-gateway.mjs run against this branch:
    catalog: https://usebuy.ai/gcloud/catalog -> 200, 6 machine types
    tokens: catalog USDC/USDT/USAT, @celo/buy-core@0.5.0 signs USDC/USDT
    the published skill matches the deployed gateway at @celo/buy@0.5.0
    
  • @celo/buy-core@0.5.0 dist/chains.js TOKENS.celo has USDC and USDT only.

Closes #12 (items 1–3; item 4 is a file-feedback fix in its own PR). Refs #11 (the CLI-side fix is tracked upstream).

🤖 Generated with Claude Code

- Add a "Fast path" section: one free catalog GET, one quote, one paid
  call, then poll. Tells the agent not to probe each machine type with
  a POST, which is where most of the round trips were going.
- Price column is now plain USD; a Tokens paragraph states that USDC and
  USDT are the only values the pinned CLI can sign for, and that the
  gateway's third accepts entry (Tether America USD) must not be offered
  or passed with @celo/buy@0.5.0.
- Attestation: read `attestationRequired` from the catalog instead of
  inferring it from a missing `extra.selfRequirements` on a per-type 402.
- `insufficient_balance` row: the message names only the selected token;
  retry with `--token USDT` / `token: "USDT"` before asking to fund.
- Wallet section: buy pays only from a wallet it generated; declare that
  address wherever an agent wallet was already declared.

Closes #12 (items 1-3; item 4 is in a separate PR). Refs #11.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Four fixes from a real rental: stale hostname caveat, missing USAT, catalog attestationRequired, and a broken gh search example

1 participant