feat(cli): render the cloud catalog view in connect cloud list

TH
12m ago
+456-369

Summary

connect cloud list now renders a display tree that the cloud service sends from <cloud endpoint>. The service decides groups, labels, order and notes. The CLI has one generic renderer for heading, group, row, text and note, and skips unknown kinds. --platform, --form (new, listing only), --device and --os pass through as query parameters. --live still works. --json prints the view's data rows. The old catalog formatter is removed. Help, docs and the skill card gain a pick-a-device flow, and the book example names --session <name>. Needs the companion cloud-service PR.

Before / after

Local cloud API with seeded data. Offer names, isolation labels and prerequisite text are redacted; the companion PR shows them.

$ agent-device connect cloud list --device iphone-17e --os "iOS 27"
iOS
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.

$ agent-device connect cloud list --device android-tv --os 14
Android
Android TV (android-tv), tv
  Android 14
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.

$ agent-device connect cloud list --device nokia-3310
Note: No cloud device matches --device nokia-3310.
Run connect cloud list without filters to see every device.

Before: one flat line per offer and platform, with no device or OS view and no filters.

connect cloud list --platform ios
iOS
iPhone (iphone), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 26"
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17e
iPhone Duo (iphone-duo), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-duo --os "iOS 27"
iPhone SE (iphone-se), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-se --os "iOS 27"
iPhone 17 (iphone-17), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17
iPhone 17 Pro (iphone-17-pro), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro
iPhone 17 Pro Max (iphone-17-pro-max), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro-max
iPhone Air (iphone-air), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-air
iPad (ipad), tablet
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 26"
iPad (A16) (ipad-a16), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-a16
iPad Air 11" (ipad-air-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-11
iPad Air 13" (ipad-air-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-13
iPad mini (ipad-mini), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-mini
iPad Pro 11" (ipad-pro-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-11
iPad Pro 13" (ipad-pro-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-13
Apple Watch (apple-watch), watch
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device apple-watch --os "iOS 26"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.
connect cloud list
Android
Android phone (android-phone), phone
  Android 16
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 16"
    Note: offer-b <CLI prerequisite from the service>.
  Android 15
    offer   price       connect p50  isolation       vendor capacity  book
    offer-a <price/min>   <time> s          <isolation>    <availability>        --platform android --vendor <offer> --device android-phone --os "Android 15"
    offer-b <price/min>  <time> s        <isolation>    <availability>        --platform android --vendor <offer> --device android-phone --os "Android 15"
    offer-c <price/min>   <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device android-phone
    Note: offer-b <CLI prerequisite from the service>.
  Android 14
    offer   price       connect p50  isolation      vendor capacity  book
    offer-a <price/min>   <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 14"
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
  Android 13
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 13"
    Note: offer-b <CLI prerequisite from the service>.
  Android 12
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-phone --os "Android 12"
    Note: offer-b <CLI prerequisite from the service>.
Pixel 9 (pixel-9), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9
Pixel 9 Pro (pixel-9-pro), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9-pro
Pixel 9 Pro XL (pixel-9-pro-xl), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9-pro-xl
Pixel 9a (pixel-9a), phone
  Android 15
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform android --vendor <offer> --device pixel-9a
Android tablet (android-tablet), tablet
  Android 15
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-tablet --os "Android 15"
  Android 14
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s          <isolation>   <availability>        --platform android --vendor <offer> --device android-tablet --os "Android 14"
Android TV (android-tv), tv
  Android 15
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 15"
    Note: offer-b <CLI prerequisite from the service>.
  Android 14
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 14"
    Note: offer-b <CLI prerequisite from the service>.
  Android 13
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 13"
    Note: offer-b <CLI prerequisite from the service>.
  Android 12
    offer  price       connect p50  isolation      vendor capacity  book
    offer-b <price/min>  <time> s        <isolation>   <availability>        --platform android --vendor <offer> --device android-tv --os "Android 12"
    Note: offer-b <CLI prerequisite from the service>.

iOS
iPhone (iphone), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone --os "iOS 26"
iPhone 17e (iphone-17e), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-17e --os "iOS 27"
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17e
iPhone Duo (iphone-duo), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-duo --os "iOS 27"
iPhone SE (iphone-se), phone
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device iphone-se --os "iOS 27"
iPhone 17 (iphone-17), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17
iPhone 17 Pro (iphone-17-pro), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro
iPhone 17 Pro Max (iphone-17-pro-max), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-17-pro-max
iPhone Air (iphone-air), phone
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device iphone-air
iPad (ipad), tablet
  iOS 27
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 27"
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device ipad --os "iOS 26"
iPad (A16) (ipad-a16), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-a16
iPad Air 11" (ipad-air-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-11
iPad Air 13" (ipad-air-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-air-13
iPad mini (ipad-mini), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-mini
iPad Pro 11" (ipad-pro-11), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-11
iPad Pro 13" (ipad-pro-13), tablet
  iOS 26
    offer  price      connect p50  isolation       vendor capacity  book
    offer-c <price/min>  <time> s       <isolation>     <availability>        --platform ios --vendor <offer> --device ipad-pro-13
Apple Watch (apple-watch), watch
  iOS 26
    offer   price      connect p50  isolation      vendor capacity  book
    offer-a <price/min>  <time> s        <isolation>   <availability>        --platform ios --vendor <offer> --device apple-watch --os "iOS 26"
Book an offer: agent-device connect cloud --session <name> <book flags>.
Note: Availability and session limits in this example are illustrative.
Note: Narrow the list with --platform, --form, --device or --os.

Wall time, p50 of 10 runs: comparable across base, head and filtered listings.

pnpm install --frozen-lockfile && pnpm build
export AGENT_DEVICE_CLOUD_BASE_URL=http://127.0.0.1:8787 AGENT_DEVICE_CLOUD_API_KEY_ORIGIN=http://127.0.0.1:8787
export AGENT_DEVICE_CLOUD_API_KEY=<key from the companion PR's seed script>
node bin/agent-device.mjs connect cloud list --platform ios
node bin/agent-device.mjs connect cloud list --device iphone-17e --os "iOS 27" --json

Release notes

connect cloud list --json changes shape. Before (the Dec-1 nightly): one row per vendor and platform with capabilities. Now: the service's data, one row per offer, with device, OS, price, connect P50, availability scope and book flags. The repository keeps no changelog file.

Validation

At ae45a2b007, the full unit-ci gate, typecheck, and lint passed locally on Node 26. Changed-line coverage reached 92/92. Hosted CI and companion endpoint verification are pending.