@computesdk/cli 2.6.14 → 2.6.15

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.
package/README.md CHANGED
@@ -3,15 +3,20 @@
3
3
  The `compute` CLI for the ComputeSDK platform — Actions CI, the compute market,
4
4
  sandboxes, and the benchmarks toolchain.
5
5
 
6
+ Start with the [CLI quickstart](https://docs.computesdk.com/start-here/quick-start), [project sync](https://docs.computesdk.com/cli/project-sync), or [Platform SDK quickstart](https://docs.computesdk.com/start-here/sdk-quick-start).
7
+
6
8
  ## Install
7
9
 
8
10
  ```bash
9
11
  npm i -g @computesdk/cli # or: pnpm dlx @computesdk/cli <cmd>
10
12
  ```
11
13
 
14
+ CLI 2.6.14 includes the onboarding and sync commands below. For other installation methods, see [installation](https://docs.computesdk.com/start-here/installation). Check `compute --version` and update before using newer commands.
15
+
12
16
  ## First sandbox
13
17
 
14
18
  ```bash
19
+ compute sandboxes route # preview placement and price without creating
15
20
  compute new # sign in if needed, create and select a sandbox
16
21
  compute exec echo hello # run on the selected sandbox
17
22
  compute list # see your sandboxes
@@ -86,17 +91,15 @@ Avoid concurrent edits at the destination while a sync runs.
86
91
  ## Login
87
92
 
88
93
  ```bash
89
- compute login # browser sign-in → ~/.benchsdk/credentials.json
94
+ compute login # browser sign-in
90
95
  compute login --no-browser # print the URL and code for manual sign-in
91
96
  compute logout # clear stored credentials
92
97
  compute --login / --logout # same, as flags
93
98
  ```
94
99
 
95
- Login uses the same OAuth device flow as `bench auth login` — every first-party
96
- CLI shares one credential store (`~/.benchsdk/credentials.json`) and refresh
97
- tokens renew automatically. Login opens the verification URL and prints the URL
98
- and code as a fallback. Press Ctrl-C to cancel; denied or expired codes produce
99
- an actionable error.
100
+ Login opens your browser and saves your session locally. Access tokens refresh
101
+ automatically. The CLI also prints a URL and code for manual sign-in. Press
102
+ Ctrl-C to cancel; denied or expired codes produce an actionable error.
100
103
 
101
104
  Interactive `compute new`, `compute instances create`, and `compute run` start
102
105
  login only when there are no stored credentials or explicit API keys. After
@@ -142,7 +145,6 @@ with `sandboxId`, `jobId`, `exitCode`, `elapsedSeconds`, `provider`, `deleted`,
142
145
  compute actions … # Actions API — repos, workflows, dispatch, runs, schedule, logs, vault (see below)
143
146
  compute market … # buy and sell on the compute market (cap, bids, credits, listings)
144
147
  compute sandboxes … # platform sandbox control plane
145
- compute bench … # benchmarks CLI (run, auth, org, results, …)
146
148
  compute providers # SDK provider credentials in this environment
147
149
  compute byok … # the org's BYOK provider keys and custom rates (see below)
148
150
  compute org list # your organizations (* = active)
@@ -437,7 +439,7 @@ With a user login, run `compute login` again once to pick up the `providers`
437
439
  scopes these commands need. `compute actions providers configure|verify|remove`
438
440
  still work but are deprecated in favour of `compute byok`;
439
441
  `compute actions providers` itself stays the Actions placement inventory
440
- (order, act capability).
442
+ (order, workflow readiness).
441
443
 
442
444
  ## compute org members and invitations
443
445
 
@@ -504,141 +506,8 @@ logged in for that org, run `compute login` again.
504
506
  platform has no email configured (`emailSent: false`), share the link
505
507
  yourself.
506
508
 
507
- ## compute bench
508
-
509
- `compute bench …` runs the benchmarks CLI (`bench`) in-process: the same
510
- commands, flags and output as `bench …`; `compute bench --version` prints the
511
- version of the bench CLI it runs. The last release bundles `@benchsdk/runner`
512
- 0.8.3 with `@benchsdk/cli` 0.9.3, which adds `bench fork`, `bench runs run-again`
513
- and the result filters `--participant`, `--since`, `--until`, `--day`, `--tz`
514
- and `--source-org`.
515
-
516
- This branch also links the benchmarks branch build (see "Developing against a
517
- bench branch build" below), so `compute bench` has the newer bench commands:
518
-
519
- ```bash
520
- compute bench benchmarks archive|restore|describe|mute|unmute|pause|resume <slug>
521
- compute bench benchmarks list --status active|archived|all
522
- compute bench runs archive|unarchive <runId...> -y
523
- compute bench runs feed | runs days | runs day <YYYY-MM-DD> [--all]
524
- compute bench reliability <slug> | reliability cards
525
- compute bench activity [--days N]
526
- compute bench run-again <slug> [--wait] | run-again status <slug> # daily Run again; needs a user login
527
- ```
528
-
529
- compute's settings are forwarded to bench:
530
-
531
- | compute | bench | |
532
- |---|---|---|
533
- | `COMPUTE_PLATFORM_URL` | `BENCHMARKS_PLATFORM_URL` | only when `BENCHMARKS_PLATFORM_URL` is unset |
534
- | `COMPUTE_API_KEY` | `BENCHMARKS_PLATFORM_API_KEY` | only when `BENCHMARKS_PLATFORM_API_KEY` is unset, and only to a computesdk.com or localhost host over HTTPS (bench's `--base-url`, else its URL env, else `COMPUTE_PLATFORM_URL`); anything else is refused |
535
- | `compute --org <slug> bench …`, else `COMPUTE_ORG` | `--org <slug>` | only when the bench command has no `--org` of its own; not added to `run` / `check` |
536
-
537
- ```bash
538
- COMPUTE_API_KEY=bp_… compute bench runs list my-benchmark --json
539
- COMPUTE_ORG=acme compute bench auth status --json # same as: compute bench --org acme auth status
540
- ```
509
+ ## Sync retention
541
510
 
542
- `compute whoami` and `compute org current` also read `COMPUTE_API_KEY`, under the same host rule. To use a key with a self-hosted platform, set `BENCHMARKS_PLATFORM_API_KEY` for it yourself. An
543
- org API key has no user, so they print the key's organization and
544
- `API key (no user identity)` (with `--json`: `"user": null`,
545
- `"credential": "api_key"`).
546
-
547
- ## Command manifest
548
-
549
- `cli-manifest.json` (shipped in the package) lists every `compute` command:
550
- its canonical path, alias spellings, arguments and flags, plus the global
551
- flags and the `@benchsdk/runner` / `@benchsdk/cli` versions behind
552
- `compute bench …`. The bench commands themselves are described by the bench
553
- manifest in `@benchsdk/runner`. The benchmarks platform vendors both files
554
- to check that the commands its API surface map names exist.
555
-
556
- The hidden `compute __manifest` command prints the manifest (`--released`
557
- marks it as describing a published version; `--check <file>` exits 1 when
558
- `<file>` is out of date, ignoring a vendored `source.ref`). After adding,
559
- renaming or removing commands or flags, regenerate the committed file:
560
-
561
- ```bash
562
- pnpm --filter @computesdk/cli run manifest # builds, then writes cli-manifest.json
563
- ```
564
-
565
- `src/__tests__/manifest.test.ts` fails when the committed file differs from
566
- the built CLI's output.
567
-
568
- ### Developing against a bench branch build
569
-
570
- `@benchsdk/cli` and `@benchsdk/runner` can be pointed at a local checkout of
571
- [computesdk/benchmarks](https://github.com/computesdk/benchmarks) with a pnpm
572
- `link:` override in the root `package.json`, so `compute bench` runs bench
573
- commands that are not published yet:
574
-
575
- ```json
576
- "pnpm": {
577
- "overrides": {
578
- "@benchsdk/cli": "link:../benchmarks-surface-parity/packages/benchsdk-cli",
579
- "@benchsdk/runner": "link:../benchmarks-surface-parity/packages/benchsdk-runner"
580
- }
581
- }
582
- ```
511
+ Sync needs the managed sync snapshot API on the target platform. Copies retain their filtered source capture before destination writes; failure to retain stops the pass. JSON output includes `snapshot: {id, expiresAt}` (or `syncSnapshot` on project creation). Use the returned expiry. Dry runs, unchanged and delete-only passes create no capture; failed destination writes leave an existing capture available.
583
512
 
584
- The paths are relative to the repository root, so the benchmarks checkout must
585
- sit next to it (`../benchmarks-surface-parity`, branch `droid/surface-parity`)
586
- and be installed and built first (`pnpm install && pnpm build` there; the
587
- linked packages use that checkout's own `node_modules` and `dist/`). Then run
588
- `pnpm install` here; the override is recorded in `pnpm-lock.yaml`, and
589
- `pnpm install --frozen-lockfile` accepts it. Without the sibling checkout pnpm
590
- still installs, with a "non-existent directory" warning and a dangling
591
- symlink, but typecheck and the CLI tests fail because `@benchsdk/cli` cannot
592
- be resolved. The override also covers `@computesdk/platform`'s optional
593
- `@benchsdk/cli` peer, so the workspace has one bench CLI.
594
-
595
- While the bench packages resolve to a checkout rather than to an npm install,
596
- `cli-manifest.json` marks them `"linked": true, "released": false` under
597
- `passthrough.bench.runner` and `passthrough.bench.cli`: the checkout's version
598
- number (`0.9.4` / `0.8.4`, the last bench release, until the branch is
599
- released as `@benchsdk/cli` 0.9.5) does not tell which commands it has, so consumers of the manifest should treat every bench
600
- command as present but unreleased.
601
-
602
- Before a release, publish the bench packages, remove the `pnpm.overrides`
603
- block, set `@benchsdk/cli` / `@benchsdk/runner` in `packages/cli/package.json`
604
- to the published caret ranges, run `pnpm install`, and regenerate the
605
- manifest (the `linked` / `released` fields disappear).
606
-
607
- ## Migrating from @computesdk/cli 1.x
608
-
609
- v2 removes the legacy console authentication and its commands:
610
-
611
- - **Removed commands**: `compute create`, `compute sandbox`, `compute connect`,
612
- `compute workspace`, `compute run`, and the interactive REPL. Sandbox
613
- management moved to `compute sandboxes`, which drives the platform's
614
- `/api/v1/sandboxes` API.
615
- - **Auth**: `compute login` no longer opens a browser flow against
616
- console.computesdk.com or writes `~/.computesdk/credentials.json` — that
617
- credential store is gone. `compute login` now runs the platform's OAuth
618
- device flow and writes `~/.benchsdk/credentials.json` (the same store `bench
619
- auth login` uses). Run `compute login` once after upgrading.
620
- - `compute providers` is unchanged.
621
-
622
- ### Maintaining the sync checkpoint engine
623
-
624
- The CLI bundles an exact copy of the platform checkpoint module;
625
- `checkpoint-provenance.json` records its upstream commit and SHA-256 digest.
626
- Refresh it with `node scripts/sync-checkpoint-engine.mjs /path/to/benchmarks-platform [revision]`
627
- from the repository root, then run the CLI tests. Do not edit the bundled engine
628
- directly. Every invocation uses a private temporary directory and restrictive
629
- file permissions for upstream scratch archives. Sync-specific filtering and destination guards live in the adapter.
630
- Literal `*` and `?` characters in addressed paths are unsupported because checkpoint
631
- selectors use glob syntax. Watch passes skip capture when nothing changed. Each pass that copies entries
632
- retains its full filtered source capture in platform-owned Tigris storage for
633
- 30 days. Snapshot namespaces are isolated, so expiring a sync capture cannot
634
- delete permanent snapshot layers. Cross-snapshot layer deduplication is not yet
635
- implemented. Only local and sandbox scratch files are removed after the pass.
636
-
637
- Retained sync snapshots must finish uploading and pass platform integrity checks
638
- before destination changes begin. `sync --json` includes `snapshot: {id, expiresAt}`
639
- when a capture is created; project creation includes `syncSnapshot` in its JSON
640
- result. Human output shows the same ID and expiry. Dry runs, unchanged passes and
641
- delete-only passes do not create captures. A failed destination copy leaves the
642
- retained capture available until expiry. There is no new storage charge in this
643
- release. Deploy the managed sync snapshot API before releasing this CLI; failure
644
- to retain a capture stops sync rather than falling back to disposable snapshots.
513
+ Maintainers: see [CLI contributor notes](./CONTRIBUTING.md) for bundled engine updates and manifest generation.
package/cli-manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "schemaVersion": 1,
3
3
  "bin": "compute",
4
4
  "package": "@computesdk/cli",
5
- "version": "2.6.14",
5
+ "version": "2.6.15",
6
6
  "source": {
7
7
  "repo": "computesdk/computesdk",
8
8
  "released": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@computesdk/cli",
3
- "version": "2.6.14",
3
+ "version": "2.6.15",
4
4
  "description": "ComputeSDK CLI - Cloud-native workspace management",
5
5
  "author": "ComputeSDK",
6
6
  "license": "MIT",
@@ -42,8 +42,8 @@
42
42
  "ignore": "^7.0.5",
43
43
  "picocolors": "^1.0.0",
44
44
  "tar": "^7.4.3",
45
- "@computesdk/platform": "0.2.6",
46
- "computesdk": "4.1.18"
45
+ "@computesdk/platform": "0.2.7",
46
+ "computesdk": "4.1.19"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^20.0.0",