// Copyright 2026 The KCP Authors. // SPDX-License-Identifier: Apache-2.0 /** * Drive the browser page through the VM demo and record it. * * Needs the dev server started with --debug-log= and * --debug-control= (scripts/kubectl_wasm_web.ts). Run this, then load * the page (on a phone, say): the program attaches to the first page that * connects its debug control after it started, and then * * waits for kcp and the signed-in MarketIdentity, * releases VMs left from earlier runs, * taps Request VM (the page itself runs kubectl get computecontracts), * waits for Held, runs ssh (over WebRTC) in the page terminal, * types each --cmd and waits for its output, * exits, releases the VM and runs kubectl until it shows Released. * * Every step waits for the page's own output (the debug log), never a fixed * sleep. The page's lines, a step timeline and the terminal transcript are * written to --out/