@hyperscale0/cli 1.0.330 → 1.0.334
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 +28 -7
- package/README.md +18 -4
- package/hyperscale.js +101 -101
- package/package.json +2 -2
package/AGENTS.md
CHANGED
|
@@ -56,18 +56,39 @@ 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]`
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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. `--name` names the agent member, so two projects can
|
|
64
|
+
each keep their own. `agent token [host] [--name <name>] [--dir <path>]`
|
|
65
|
+
prints the stored token so the shell can export it as `HYPERSCALE_TOKEN`; MCP
|
|
66
|
+
and the CLI then use the same door. With no `--name`, it reads the agent set
|
|
67
|
+
up for the directory, then the host's default name.
|
|
68
|
+
|
|
69
|
+
`hsx catalog` lists every HSX template in one line each. `hsx catalog
|
|
70
|
+
<template>` reads one: tunables with their meaning, who runs each action, what
|
|
71
|
+
create takes and an example program the compiler accepts.
|
|
72
|
+
`--oauth` writes browser sign-in instead and mints nothing.
|
|
73
|
+
|
|
74
|
+
Credential order for product commands: `--api-key`, `HYPERSCALE_API_KEY`,
|
|
75
|
+
`--token`, `HYPERSCALE_TOKEN`, then the stored login. A key never moves a
|
|
76
|
+
command off the selected Product: a key for another Product exits 2 with
|
|
77
|
+
`api_key_product_mismatch`, names both Products and says what to unset.
|
|
78
|
+
`whoami` names the credential in use; `--verbose` adds grant and token ids.
|
|
79
|
+
The Keychain item is keyed by the config folder, so two folders hold two
|
|
80
|
+
logins; `doctor` names the item it reads.
|
|
63
81
|
|
|
64
82
|
Every command accepts `--json`. Ordinary success is one JSON value on stdout;
|
|
65
83
|
failure is an error object on stderr. Errors retain status, code, message,
|
|
66
84
|
fix, details and available request, operation, receipt and trace IDs.
|
|
67
85
|
JSON output has no ANSI codes, banners, spinners or prompts.
|
|
68
|
-
Exit codes: 0 success, 1 failure, 2 usage
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
Exit codes: 0 success, 1 server refusal or failure, 2 usage (unknown command
|
|
87
|
+
or option, or an argument, flag or input refused before any request; also an
|
|
88
|
+
HSX check or plan that cannot proceed), 3 live action waiting for human
|
|
89
|
+
approval, 4 not signed in or not allowed (401, 403), 5 not found (404), 6
|
|
90
|
+
conflict with the current state (409). `refusals.js` holds the table;
|
|
91
|
+
`help --json` prints it as `exitCodes`.
|
|
71
92
|
|
|
72
93
|
`hsx watch --json` emits one JSON object per line with `type` set to `check`,
|
|
73
94
|
`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.
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
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
|