Skip to content

Sync latest catalog-cli: checkout instruments, UCP messages, hardening - #6

Merged
joerj123 merged 1 commit into
mainfrom
update-catalog-cli-latest
Jun 2, 2026
Merged

Sync latest catalog-cli: checkout instruments, UCP messages, hardening#6
joerj123 merged 1 commit into
mainfrom
update-catalog-cli-latest

Conversation

@joerj123

@joerj123 joerj123 commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Syncs the latest catalog-cli skill from local development into the repo.

Changes

complete_checkout now echoes real payment instruments

  • Replaced the synthetic single-instrument / paymentToken flow with echoing back the payment.instruments returned by create_checkout.
  • complete checkout now reads the create response (or a {"payment":{"instruments":[...]}} block) from stdin via --checkout-stdin, instead of --payment-token-stdin.
  • selectInstrument keeps every field the merchant returned, marks it selected, and sets credential.token to the instrument's own id — the instrument id IS the checkout payment token, so re-sending the exact id is what lets the merchant match the session (mirrors the reference simulator's _select_instrument).
  • Validates that instruments are present and throws a clear error otherwise.

Surface UCP checkout messages[] to the user

  • New renderCheckoutMessages lifts UCP warnings/errors/disclosures (e.g. final_sale, prop65, age_restricted) out of the raw JSON into a clearly-labeled block, since the protocol requires warning/disclosure content be shown to the user.
  • checkout create/update now run through runCheckoutAction, which prints the messages block above the full JSON.

Docs

  • Updated SKILL.md and references/direct-api.md to match the new checkout completion flow.

Verification

  • pnpm typecheck — passes
  • pnpm test — 59/59 passing

@joerj123
joerj123 merged commit cd105ed into main Jun 2, 2026
2 checks passed
@PawanP1808
PawanP1808 deleted the update-catalog-cli-latest branch June 11, 2026 12:56
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.

1 participant