@hyperscale0/cli 1.0.330 → 1.0.332

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
@@ -56,18 +56,33 @@ the grant runs directly. A live action exits 3 with `agent_approval_required`
56
56
  and a browser link; a human approves it with their password. The CLI cannot
57
57
  approve its own work.
58
58
 
59
- `agent setup [claude-code|codex|cursor]` writes the Hyperscale MCP server into
60
- that host's project config and prints the file it wrote. The config reads a
61
- sandbox Product key from `HYPERSCALE_API_KEY` (`--key-env` names another
62
- variable) and never contains the key. `--oauth` writes browser sign-in instead.
59
+ `agent setup [claude-code|codex|cursor]` uses the founder's CLI login to mint
60
+ a named, sandbox-only agent credential (`agent_grant.create`). It keeps the
61
+ token in the login's store, writes the host's MCP entry with
62
+ `HYPERSCALE_TOKEN` as the bearer variable, and installs the skill into the
63
+ host's skills folder. `agent token <host>` prints the stored token so the
64
+ shell can export it as `HYPERSCALE_TOKEN`; MCP and the CLI then use the same
65
+ door.
66
+ `--oauth` writes browser sign-in instead and mints nothing.
67
+
68
+ Credential order for product commands: `--api-key`, `HYPERSCALE_API_KEY`,
69
+ `--token`, `HYPERSCALE_TOKEN`, then the stored login. A key never moves a
70
+ command off the selected Product: a key for another Product exits 2 with
71
+ `api_key_product_mismatch`, names both Products and says what to unset.
72
+ `whoami` names the credential in use; `--verbose` adds grant and token ids.
73
+ The Keychain item is keyed by the config folder, so two folders hold two
74
+ logins; `doctor` names the item it reads.
63
75
 
64
76
  Every command accepts `--json`. Ordinary success is one JSON value on stdout;
65
77
  failure is an error object on stderr. Errors retain status, code, message,
66
78
  fix, details and available request, operation, receipt and trace IDs.
67
79
  JSON output has no ANSI codes, banners, spinners or prompts.
68
- Exit codes: 0 success, 1 failure, 2 usage error or HSX check or plan cannot
69
- proceed, 3 live action waiting for human approval, 4 not signed in or missing
70
- scope, 5 not found, 6 conflict such as a reused idempotency key.
80
+ Exit codes: 0 success, 1 server refusal or failure, 2 usage (unknown command
81
+ or option, or an argument, flag or input refused before any request; also an
82
+ HSX check or plan that cannot proceed), 3 live action waiting for human
83
+ approval, 4 not signed in or not allowed (401, 403), 5 not found (404), 6
84
+ conflict with the current state (409). `refusals.js` holds the table;
85
+ `help --json` prints it as `exitCodes`.
71
86
 
72
87
  `hsx watch --json` emits one JSON object per line with `type` set to `check`,
73
88
  `plan` or `error`. Check and plan events contain `data`; errors contain `error`.
package/README.md CHANGED
@@ -252,14 +252,28 @@ run `npm install -g @hyperscale0/cli@latest`.
252
252
 
253
253
  `hyperscale help --json` returns the whole command tree with flags, examples,
254
254
  scopes and operations; `help --all` adds the advanced operations.
255
- Use `hyperscale <group> <command> --help` for one command. Exit codes are 0 for
256
- success, 1 for failure, 2 for a usage error or an HSX check or plan that cannot
257
- proceed, 3 for a live action waiting for approval, 4 for a missing login or
258
- scope, 5 for not found and 6 for a conflict.
255
+ Use `hyperscale <group> <command> --help` for one command.
256
+
257
+ | Exit | Meaning |
258
+ | ---- | -------------------------------------------------------------------------------------------------------------------- |
259
+ | 0 | Success. |
260
+ | 1 | The server refused the request or could not finish it. |
261
+ | 2 | Usage: an unknown command or option, an argument, flag or input refused before any request, or an HSX check failure. |
262
+ | 3 | A live action is waiting for a person to approve it. |
263
+ | 4 | Not signed in, or this login or key may not do that (HTTP 401 or 403). |
264
+ | 5 | The thing named does not exist (HTTP 404). |
265
+ | 6 | The request conflicts with the current state (HTTP 409). |
266
+
267
+ `help --json` lists the same table under `exitCodes`. A mistyped command or
268
+ option suggests the nearest one, and every refusal carries a runnable `fix`.
259
269
 
260
270
  Set `HYPERSCALE_BASE_URL` for the API origin and `HYPERSCALE_ENVIRONMENT` for
261
271
  `sandbox` or `live`. `HYPERSCALE_TOKEN` supplies a login token and
262
272
  `HYPERSCALE_API_KEY` supplies a product key. Each has a matching command flag.
273
+ Product commands use the first one set: `--api-key`, `HYPERSCALE_API_KEY`,
274
+ `--token`, `HYPERSCALE_TOKEN`, then the stored login. `whoami` names it.
275
+ `agent setup <host>` gives a coding agent its own sandbox token for both MCP
276
+ and the CLI; see https://hyperscale0.ai/auth.md.
263
277
 
264
278
  The API defaults to `https://hyperscale0.ai`, which maps to the Launch and
265
279
  Build portals. `open` refuses other API origins because they do not identify