kylon-cli 0.7.5-next.1111 → 0.7.5-next.1113
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 +72 -8
- package/dist/kylon-bundle.manifest.json +3 -3
- package/dist/kylon-bundle.mjs +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,9 @@ It installs the pinned CLI bundle under `~/.kylon` (no sudo; a machine
|
|
|
26
26
|
without Node.js gets a private, checksum-verified runtime under
|
|
27
27
|
`~/.kylon/runtime` that only Kylon uses), puts `kylon` on your PATH, records
|
|
28
28
|
the serving environment as the default `--server-url`, and chains straight
|
|
29
|
-
into `kylon login`. Rerunning it is safe
|
|
29
|
+
into `kylon login`. Rerunning it is safe: on a machine that already has
|
|
30
|
+
Kylon, it verifies the installation and repairs a damaged one before it
|
|
31
|
+
updates it. Non-production deployments serve
|
|
30
32
|
the same script from their own API origin (for example
|
|
31
33
|
`https://api.purework.ai/install.sh` installs `@next` and logs into dev).
|
|
32
34
|
`KYLON_INSTALL_NO_LOGIN=1` installs without starting the login;
|
|
@@ -84,6 +86,61 @@ service can be installed (a source build, or a Windows machine whose policy
|
|
|
84
86
|
blocks scheduled tasks) the daemon runs in the foreground until `Ctrl+C`, and
|
|
85
87
|
`connect` says so.
|
|
86
88
|
|
|
89
|
+
### Connecting with a setup command: `kylon connect --intent computer`
|
|
90
|
+
|
|
91
|
+
The Kylon app connects this computer through the installed CLI, without a
|
|
92
|
+
browser and without signing anyone in:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
kylon connect --setup-token <token> --workspace <id> --server-url <url> --intent computer --attempt <id> --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The setup token (single use, 30 minutes, minted for one workspace) is the
|
|
99
|
+
approval: the CLI starts a device authorization with `intent: "computer"`,
|
|
100
|
+
receives this computer's key, writes the registration, and installs and starts
|
|
101
|
+
the gateway service as `kylon connect` does (`--no-start` registers only). It
|
|
102
|
+
writes no human credential: `workspace-auth.json` is never read or written, so
|
|
103
|
+
`kylon workspace` commands still need `kylon login`. `--setup-token`,
|
|
104
|
+
`--workspace` and an explicit `--server-url` are all required (the production
|
|
105
|
+
default never applies), and `--attempt` names the app's attempt (a standalone
|
|
106
|
+
run mints one).
|
|
107
|
+
|
|
108
|
+
Nothing is spent before the checks pass: a registration of another server
|
|
109
|
+
refuses with the usual "already connected to a different server" message, and
|
|
110
|
+
a registration of another workspace refuses with `computer_in_other_workspace`
|
|
111
|
+
until `kylon disconnect` clears it. A registration of this workspace only runs
|
|
112
|
+
the service step. An enrollment in flight is recorded in
|
|
113
|
+
`desktop-onboarding/enrollment-<digest>.json` (mode 0600; the request's
|
|
114
|
+
capability and the key's fingerprint, never the key) before the request is
|
|
115
|
+
sent, so a run that stopped part way is finished by the next one: it asks the
|
|
116
|
+
server again and commits the same key, or cancels what is owed first.
|
|
117
|
+
|
|
118
|
+
With `--json`, stdout carries exactly one document,
|
|
119
|
+
`{ ok, workspace_id, computer_id, install_id, connected_at, credential_id, created, attempt_id, generation, service, placement }`,
|
|
120
|
+
and progress goes to stderr. A failure is `{ ok: false, kind: "error", code,
|
|
121
|
+
text, details }` with `details.retryable`, for example `setup_token_rejected`
|
|
122
|
+
(generate a new setup command), `computer_intent_unsupported` (the server
|
|
123
|
+
predates this form), `enrollment_in_progress`, or `enrollment_poll_exhausted`
|
|
124
|
+
(run the same command again to pick up where it left off); an argument error
|
|
125
|
+
of these forms (a flag without its value included) is the same document with
|
|
126
|
+
`missing_required_argument` or `invalid_arguments` and exit code 2. A request
|
|
127
|
+
the server ends (`denied`, or `expired` past its re-delivery window) is
|
|
128
|
+
cancelled on the server before a new one starts, since its key may already
|
|
129
|
+
have been delivered.
|
|
130
|
+
|
|
131
|
+
`kylon connect --cancel --attempt <id> --json` cancels that attempt's pending
|
|
132
|
+
connection: it settles the request on the server the record names (whatever
|
|
133
|
+
this installation is registered with meanwhile, and without touching that
|
|
134
|
+
registration or its service), or keeps a connection the attempt had already
|
|
135
|
+
completed and revokes nothing. Its answer is
|
|
136
|
+
`{ ok, outcome, generation, request_id?, destroyed? }`, where `outcome` is
|
|
137
|
+
`cancelled`, `committed`, `sealed_only` (another attempt has taken the
|
|
138
|
+
connection over; nothing changed), `no_journal`, or `incomplete` (Kylon could
|
|
139
|
+
not be reached, or this computer's saved connection could not be read while a
|
|
140
|
+
delivered key may be in it, `reason: "registration_unreadable"`; the same
|
|
141
|
+
command finishes it). Its failure reports go to the record's server only,
|
|
142
|
+
never to the default one.
|
|
143
|
+
|
|
87
144
|
### `kylon onboard`
|
|
88
145
|
|
|
89
146
|
`kylon onboard` is the terminal-first way to start: it creates a **new**
|
|
@@ -328,13 +385,20 @@ curl -fsSL https://api.kylon.io/install.sh | sh
|
|
|
328
385
|
|
|
329
386
|
(`https://api.purework.ai/install.sh` on dev; Windows:
|
|
330
387
|
`powershell -c "irm https://api.kylon.io/install.ps1 | iex"`.) On a machine
|
|
331
|
-
that already has Kylon
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
388
|
+
that already has Kylon, `install.sh` first verifies the managed bundle. One
|
|
389
|
+
that does not answer `--version` with `kylon <version>`, or answers another
|
|
390
|
+
version than its sidecar records, is replaced with the release the script
|
|
391
|
+
pins unless another installation holds the installation lock, and the
|
|
392
|
+
damaged copy stays beside it as `kylon-bundle.mjs.broken-<time>`. A bundle
|
|
393
|
+
that answers is never overwritten, even without a readable sidecar, which is
|
|
394
|
+
how the CLI's own rollback leaves it (`install.ps1` never overwrites the
|
|
395
|
+
bundle). The script also repairs the environment around it — a vanished
|
|
396
|
+
Node.js gets the private runtime, the launcher and PATH snippet are
|
|
397
|
+
rewritten, the serving deployment is re-recorded — and then asks the
|
|
398
|
+
installed CLI to update itself with `kylon upgrade`. This is the command the
|
|
399
|
+
CLI's update notice, `kylon gateway status`, the unknown-command hint, and the
|
|
400
|
+
workspace's update surfaces all print; each spells it for the deployment the
|
|
401
|
+
machine was set up against.
|
|
338
402
|
|
|
339
403
|
`kylon upgrade` is the engine underneath the script, and can be run on its
|
|
340
404
|
own when the environment is known to be healthy. It resolves the newest build
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.7.5-next.
|
|
3
|
-
"fingerprint": "
|
|
4
|
-
"source_commit": "
|
|
2
|
+
"version": "0.7.5-next.1113",
|
|
3
|
+
"fingerprint": "a3b074989af11825dc7c1afe484cb4e5bec070d8b0c1be6c082edcdca79ccb22",
|
|
4
|
+
"source_commit": "99e212702e94382b8c1423179f5598cf2f6c1fd2"
|
|
5
5
|
}
|