@hyperscale0/cli 1.0.0-beta.3 → 1.0.0-beta.30

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.
Files changed (3) hide show
  1. package/README.md +58 -56
  2. package/hyperscale.js +51 -120
  3. package/package.json +4 -3
package/README.md CHANGED
@@ -1,66 +1,68 @@
1
1
  # @hyperscale0/cli
2
2
 
3
- The Hyperscale founder command line. It logs a founder in, discovers public
4
- Blueprints, composes Products, manages sandbox API keys, and runs one Product's
5
- frozen public actions.
3
+ The Hyperscale developer command line.
6
4
 
7
- ## Use
5
+ ## Start
8
6
 
9
- Mint a founder PAT in the portal at https://hyperscale0.ai/desk. Open Security,
10
- then Personal access tokens. Unapproved founders can request access at
11
- https://hyperscale0.ai/request-access.
7
+ ```sh
8
+ npm install -g @hyperscale0/cli
9
+ hyperscale auth login --base-url https://dev.hyperscale0.ai
10
+ hyperscale whoami --json
11
+ ```
12
12
 
13
- ```bash
14
- export HYPERSCALE_TOKEN=<your founder PAT>
15
- bunx @hyperscale0/cli auth login
16
- bunx @hyperscale0/cli whoami
17
- bunx @hyperscale0/cli blueprint list
18
- bunx @hyperscale0/cli product create --blueprint luxury-goods-consignment-escrow --name "Luxury Consignment"
19
- bunx @hyperscale0/cli key create --name "Founder laptop"
20
- bunx @hyperscale0/cli compose check product.hsx
21
- bunx @hyperscale0/cli compose plan product.hsx
22
- bunx @hyperscale0/cli compose apply product.hsx --yes
23
- bunx @hyperscale0/cli team list
24
- bunx @hyperscale0/cli team invite --email developer@example.com --role developer
25
- bunx @hyperscale0/cli activity list
26
- bunx @hyperscale0/cli ops list payment
13
+ Use `bunx @hyperscale0/cli@latest` or `npx @hyperscale0/cli@latest`
14
+ without a global install. Browser login requests read-only scopes through
15
+ portal consent. Request different scopes with `auth login --scopes <scope,...>`.
16
+ The login summary shows the authority actually returned by the server.
17
+ Headless callers can use `auth login --no-browser --token <pat>`.
27
18
 
28
- export HYPERSCALE_API_KEY=<your Product API key>
29
- bunx @hyperscale0/cli product actions
30
- bunx @hyperscale0/cli product actions escrow_order.placeBuyerHold --json
31
- bunx @hyperscale0/cli product run escrow_order.placeBuyerHold --input '{"escrowOrderId":"eord_sandbox_..."}'
32
- bunx @hyperscale0/cli call account.list --input '{"limit":5}'
33
- ```
19
+ ## Product commands
20
+
21
+ `product select <id>` saves a Product. Member PATs use that Product's route.
22
+ `product actions` lists the selected Build's exact public action names.
23
+ `product run <instrument.action> --input-file request.json` runs one.
24
+ Product API keys still work through `HYPERSCALE_API_KEY` or `--api-key`.
25
+ The server's frozen operation set resolves aliases, never the bundled catalog.
26
+
27
+ `ops list --catalog` browses catalog command data without authentication.
28
+ `ops list` discovers operations for the active credential and Product.
29
+ `call <operation>` calls one with `--input` or `--input-file`.
30
+ `compose check/plan/apply <file.hsx>` uses the server composer.
31
+ Run `hyperscale help <command>` for options and examples.
32
+
33
+ ## Review and resume
34
+
35
+ HTTP 409 `approval_required` prints the server review URL, approval request
36
+ ID, waiting state and a local resume reference. Review happens in the browser.
37
+ Then run `hyperscale resume <reference>`. Resume replays the same origin,
38
+ environment, credential, path, body bytes and idempotency key from secure local
39
+ storage. Body and credential overrides are refused. `--yes` cannot approve
40
+ money. Approval is not evidence of execution.
41
+
42
+ A lost response does not mean failure. Keep the printed operation reference
43
+ and read its status before retrying. Resume never creates a new idempotency key.
44
+ Successful requests remove their saved credential copy. Review and uncertain
45
+ requests remain local until they complete. Logout removes the login credential;
46
+ it does not revoke separately saved pending requests. Use portal token revocation
47
+ if those requests must lose server authority.
48
+
49
+ ## Automation and storage
34
50
 
35
- `product actions` lists the frozen Product surface. Pass one exact public
36
- operation id such as `escrow_order.placeBuyerHold` to return its full input
37
- schema, output schema, policies, build id, surface version, and operation-set
38
- digest.
39
- `compose check` compiles textual HSX and runs the independent composer check.
40
- `compose plan` diffs it against the selected Product. `compose apply`
41
- recomposes that Product and requires `--confirm`, or `--yes` for an agent.
42
- Compiler or composer refusal exits 2. Transport and server failure exit 1.
43
- `npx @hyperscale0/cli` runs the same commands. Add
44
- `--json` for machine-readable success and failure output.
51
+ `--json` writes success to stdout and one error object to stderr on failure.
52
+ Errors retain HTTP status, code, message, fix, details and available correlation
53
+ IDs. Approval details include `approvalRequestId`, `reviewUrl`, `state`
54
+ and `resumeReference`. Exit 0 means success, 1 means failure or waiting for
55
+ review, and 2 means composer refusal. JSON help is also available.
45
56
 
46
- Founder PAT commands are `auth`, `whoami`, `product create/list/show`,
47
- `compose plan/apply`, `key`, `team`, and `activity`. They use
48
- `--token`, `HYPERSCALE_TOKEN`, or a stored login in that order. Product API
49
- key commands are `product actions/run`, `ops list`, and `call`. They use
50
- `HYPERSCALE_API_KEY` and need no founder login profile. `compose check`
51
- runs locally when no founder credential exists. On a clean machine, set the
52
- Product API key and pass `--product <id>`. Use `--base-url` and
53
- `--environment` when their defaults do not name the Product's plane.
57
+ Human output honors non-TTY streams, narrow terminals and NO_COLOR, including
58
+ an empty NO_COLOR value. Identifiers are never shortened.
54
59
 
55
- Point it at another host with `--base-url`, and at the live plane with
56
- `--environment live`. Live keys and sandbox keys are never interchangeable.
57
- The CLI stores the founder PAT in macOS Keychain by default. If Keychain is
58
- unavailable, it falls back to an owner-only 0600 file under
59
- `HYPERSCALE_CONFIG_DIR`, or `~/.config/hyperscale` by default. Set
60
- `HYPERSCALE_CREDENTIAL_STORE=file` to choose that file store and skip
61
- Keychain access. `auth logout` deletes local state and does not revoke the
62
- PAT. `auth logout --revoke` revokes the active PAT before deleting local
63
- state. Passkey login stays in the portal at
64
- https://hyperscale0.ai/signin.
60
+ Credentials and saved requests use macOS Keychain with an owner-only 0600 file
61
+ fallback under `HYPERSCALE_CONFIG_DIR` or `~/.config/hyperscale`.
62
+ `HYPERSCALE_CREDENTIAL_STORE=file` explicitly selects file storage.
63
+ Use `--base-url` or `HYPERSCALE_BASE_URL` for the API origin and
64
+ `--environment sandbox|live` for the environment partition.
65
+ Neither current estate connects to real bank infrastructure.
65
66
 
66
- Run `bunx @hyperscale0/cli --help` for the full option list.
67
+ License: LicenseRef-Hyperscale-Proprietary.
68
+ Hyperscale is a trademark of Hyperscale LLC.