@hyperscale0/cli 1.0.329 → 1.0.330

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/AGENTS.md CHANGED
@@ -31,16 +31,24 @@ and product IDs come from the login and the selected product. Lists accept
31
31
  pass `--idempotency-key` to retry safely. Without a TTY a missing required flag
32
32
  exits 2 and names the flag.
33
33
 
34
- Start with `hyperscale auth login --no-open --json`. The URL and code go to
35
- stderr. A person approves them in the browser. Rerun to resume a pending login.
36
- Verify with `hyperscale whoami --json`. To create an account, pipe the
34
+ Check `hyperscale whoami --json` first. To sign in a founder who has an
35
+ account, pipe their password on stdin to `auth login --email <email> --json`;
36
+ it mails a six-digit code and exits. Ask the founder for the code, then run
37
+ `auth login --code <code> --json`. To approve in a browser instead, run
38
+ `auth login --no-open --json`: the first stdout line is `approval_needed` with
39
+ the code and URL, and the last is `signed_in`. Rerun to resume a pending login.
40
+ For CI, pipe a `hyperscale_pat_` token to `auth login --with-token`. To create an account, pipe the
37
41
  founder's password on stdin to `auth signup --email <email> --name <name>
38
42
  --company <company> --json`; it mails a six-digit code and exits. Ask the
39
43
  founder for the code, then run `auth signup --code <code> --json`. The account
40
44
  starts in sandbox. `auth verify` confirms an existing account's email the same
41
45
  way. Do not print or persist credentials in project files.
42
46
 
43
- Browser login creates a named agent member with its own CLI grant. Access
47
+ Either login creates a named agent member with its own CLI grant. In sandbox
48
+ it acts as the founder, `--on-behalf-of` included; `whoami` shows the
49
+ founder's team role. The grant ends after 30 days, or 7 days unused, and so do
50
+ sandbox keys `key create --name <name>` makes from it. `doctor` names where the
51
+ token is stored. Access
44
52
  tokens last ten minutes; the CLI rotates the refresh token and keeps both in
45
53
  Keychain or a mode 0600 file. Logout removes them locally. Revoke the member or
46
54
  grant in the browser; `--revoke` only revokes a human PAT. Sandbox work within
package/README.md CHANGED
@@ -24,6 +24,20 @@ Approve the URL and code in your browser. The CLI saves your login on this
24
24
  device. Use `--no-open` to approve on another device. A pending sign-in resumes
25
25
  when you run the command again.
26
26
 
27
+ On a machine with no browser, sign in with your password and an emailed code:
28
+ `hyperscale auth login --email you@example.com`. Without a terminal, pipe the
29
+ password and finish in a second call:
30
+
31
+ ```sh
32
+ printf '%s\n' "$PASSWORD" | hyperscale auth login --email you@example.com --json
33
+ hyperscale auth login --code 123456 --json
34
+ ```
35
+
36
+ A login ends after 30 days, or 7 days unused. `whoami` shows when.
37
+ `hyperscale doctor` names where the token is stored: the macOS Keychain or a
38
+ private file in the config folder. For CI, pipe a personal access token to
39
+ `hyperscale auth login --with-token`, or set `HYPERSCALE_TOKEN`.
40
+
27
41
  To create an account without a browser, run `hyperscale auth signup`. It asks
28
42
  for your name, work email, company and a password, solves a short proof of work,
29
43
  and mails a six-digit code. Type the code and the CLI is signed in to the new
@@ -93,20 +107,20 @@ step that fails:
93
107
  ```json
94
108
  {
95
109
  "scenario": "A first rental",
96
- "customers": { "maya": { "name": "Maya Brooks", "fund": "100000" } },
110
+ "customers": { "maya": { "name": "Maya Brooks", "fund": "1000" } },
97
111
  "steps": [
98
112
  {
99
113
  "create": "rental",
100
114
  "as": "camera",
101
115
  "by": "maya",
102
- "fields": { "item": "Camera", "renter": "Maya", "price": "75000" }
116
+ "fields": { "item": "Camera", "renter": "Maya", "price": "750" }
103
117
  },
104
118
  { "run": "agree_rental", "on": "camera", "by": "maya" },
105
119
  { "advance": "4d" },
106
- { "fund": "maya", "amount": "5000" },
120
+ { "fund": "maya", "amount": "50" },
107
121
  {
108
122
  "name": "Maya has her change",
109
- "expect": { "balances": { "maya": { "settled": "30000" } } }
123
+ "expect": { "balances": { "maya": { "settled": "300.00" } } }
110
124
  }
111
125
  ]
112
126
  }
@@ -116,9 +130,10 @@ Each customer is created, given a sandbox account and funded first. `create`
116
130
  makes an object, `run` runs an action on it, `fund` adds sandbox money,
117
131
  `advance` moves the sandbox clock (`30m`, `4h`, `2d`, `1w` or an ISO time) and
118
132
  `expect` checks balances. A plain balance compares to `available`; an object
119
- can name `available`, `settled` or `pending`. Amounts are minor-unit strings,
120
- as in the API. Funding and actions need the Product key in
121
- `HYPERSCALE_API_KEY`. `scenario init` writes a working example for the
133
+ can name `available`, `settled` or `pending`. Amounts are major units, as
134
+ `fund` takes them (`"750"` or `"750.50"` in SAR), in money fields and action
135
+ input too; the runner sends the API minor units. Funding and actions need the
136
+ Product key in `HYPERSCALE_API_KEY`. `scenario init` writes a working example for the
122
137
  Product.
123
138
 
124
139
  ```sh
@@ -137,7 +152,7 @@ with the `whsec_` secret it prints. The secret stays the same for a profile,
137
152
  so your handler keeps verifying across restarts. `log tail` reads the developer
138
153
  log of your API calls with their request ids; `log explain` shows one call's
139
154
  inputs, error, fix and receipt with secrets redacted. `doctor` checks the CLI,
140
- config directory, API, login, Product and sandbox clock and prints a fix for
155
+ config directory, API, login, token store, Product and sandbox clock and prints a fix for
141
156
  each failure. `export records` prints transfers, receipts or one account's
142
157
  statements as CSV.
143
158
 
@@ -180,6 +195,10 @@ hyperscale architect chat --brief "Review this product" --json
180
195
  hyperscale open
181
196
  ```
182
197
 
198
+ `key create --name` names the key, and `key list` shows each name and expiry.
199
+ A key made from a CLI login ends when that login ends; `key create` prints the
200
+ date. A key made in the browser lasts 90 days.
201
+
183
202
  API access covers all published operations. A request that needs browser
184
203
  review prints a URL and a saved reference. Approve it, then use `api resume`.
185
204
  Approval alone does not mean the request completed.