kylon-cli 0.3.9 → 0.3.10-next.696
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 +60 -23
- package/dist/kylon-bundle.manifest.json +5 -0
- package/dist/kylon-bundle.mjs +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -67,16 +67,20 @@ hosted install script in `~/.kylon/server-url`, then production.
|
|
|
67
67
|
`agent link` authenticates only the link operation with its embedded
|
|
68
68
|
credential; it never creates a human CLI session. Linking mints or reuses an
|
|
69
69
|
installation credential stored locally with mode `0600` and starts the local
|
|
70
|
-
agent runtime. In release builds
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
agent runtime. In release builds a user-level service is installed so the
|
|
71
|
+
daemon survives terminal exit, reboot, and sleep/wake: `launchd` on macOS,
|
|
72
|
+
`systemd --user` on Linux, and on Windows a logon-triggered Scheduled Task
|
|
73
|
+
named `Kylon Gateway` that runs `kylon gateway supervise`, a small loop that
|
|
74
|
+
restarts `gateway run` after a crash and after a drained upgrade. When no
|
|
75
|
+
service can be installed (a source build, or a Windows machine whose policy
|
|
76
|
+
blocks scheduled tasks) the daemon runs in the foreground until `Ctrl+C`, and
|
|
77
|
+
`connect` says so.
|
|
74
78
|
|
|
75
79
|
The dist-tag tracks the environment: production uses `@latest`, dev uses
|
|
76
80
|
`@next` (newest prerelease). To pin a specific build, use `kylon-cli@X.Y.Z`.
|
|
77
81
|
|
|
78
|
-
Requirements: Linux
|
|
79
|
-
|
|
82
|
+
Requirements: macOS, Linux, or Windows. The hosted `install.sh` needs no
|
|
83
|
+
preinstalled Node.js; the Windows `install.ps1` and the `npx` spellings need
|
|
80
84
|
Node.js 22.15.0+ (npm ships with Node).
|
|
81
85
|
|
|
82
86
|
### One managed `kylon` for humans and agents
|
|
@@ -117,20 +121,50 @@ The setting controls future automatic requests only. Turning it off does not
|
|
|
117
121
|
cancel an upgrade whose drain has already started, and manual upgrades remain
|
|
118
122
|
available.
|
|
119
123
|
|
|
120
|
-
To
|
|
124
|
+
To update manually, rerun the hosted install script — the same command that
|
|
125
|
+
installed Kylon:
|
|
121
126
|
|
|
122
127
|
```bash
|
|
123
|
-
|
|
128
|
+
curl -fsSL https://api.kylon.io/install.sh | sh
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
(`https://api.purework.ai/install.sh` on dev; Windows:
|
|
132
|
+
`powershell -c "irm https://api.kylon.io/install.ps1 | iex"`.) On a machine
|
|
133
|
+
that already has Kylon the script never overwrites the managed bundle. It
|
|
134
|
+
repairs the environment around it — a vanished Node.js gets the private
|
|
135
|
+
runtime, the launcher and PATH snippet are rewritten, the serving deployment
|
|
136
|
+
is re-recorded — and then asks the installed CLI to update itself with
|
|
137
|
+
`kylon upgrade`. This is the command the CLI's update notice, `kylon gateway
|
|
138
|
+
status`, the unknown-command hint, and the workspace's update surfaces all
|
|
139
|
+
print; each spells it for the deployment the machine was set up against.
|
|
140
|
+
|
|
141
|
+
`kylon upgrade` is the engine underneath the script, and can be run on its
|
|
142
|
+
own when the environment is known to be healthy. It resolves the newest build
|
|
143
|
+
on the channel this installation tracks (`latest` in production, `next` on
|
|
144
|
+
dev), compares it with the **installed** bundle's recorded version, and picks
|
|
145
|
+
the owner for the host's layout: on a gateway host the drained service
|
|
146
|
+
upgrade described below, on a credential-only host the daemon-guarded
|
|
147
|
+
self-pin, and on a host with only an npm global the `npm install -g` hint
|
|
148
|
+
(that copy stays the operator's own). When it is already the resolved target
|
|
149
|
+
— `npx --yes kylon-cli@latest upgrade` runs the newest copy — it installs
|
|
150
|
+
in-process rather than downloading itself a second time. `--force` skips the
|
|
151
|
+
drain (see the interrupts below).
|
|
152
|
+
|
|
153
|
+
The mechanism underneath is `gateway service upgrade`:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npx --yes kylon-cli@<exact version> gateway service upgrade
|
|
124
157
|
```
|
|
125
158
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
`
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
159
|
+
It installs the running copy's *own* bundle under `~/.kylon/bin` and
|
|
160
|
+
drain-restarts the daemon onto it, moving the daemon and the pinned agent
|
|
161
|
+
`kylon` in lockstep — so it must be run by the target version, which is why
|
|
162
|
+
it is spelled through `npx` with an exact version. Reach for it directly only
|
|
163
|
+
when an exact version matters; the workspace's update notice, the remote
|
|
164
|
+
upgrade button, and automatic updates all resolve to it with the exact version
|
|
165
|
+
they want. `npm install -g` alone updates the operator's terminal binary and
|
|
166
|
+
leaves the runtime service on the old build. `kylon gateway service repair`
|
|
167
|
+
is the same reconciliation under its recovery-oriented name.
|
|
134
168
|
|
|
135
169
|
`repair` goes one step further than `upgrade`: after reconciling the Kylon
|
|
136
170
|
side it installs any provider CLI this machine's placements need but do not
|
|
@@ -152,8 +186,8 @@ The drain waits up to five minutes for in-flight agent work, and a drain that
|
|
|
152
186
|
exhausts its window rolls the upgrade back — so a persistently busy host would
|
|
153
187
|
never upgrade without an operator interrupt. Two are available:
|
|
154
188
|
|
|
155
|
-
- `kylon gateway service upgrade --force` skips
|
|
156
|
-
already in progress: in-flight assignments are aborted with the same
|
|
189
|
+
- `kylon upgrade --force` (or `kylon gateway service upgrade --force`) skips
|
|
190
|
+
the drain, or escalates one already in progress: in-flight assignments are aborted with the same
|
|
157
191
|
recovery semantics as a daemon crash (the durable inbox re-drives
|
|
158
192
|
interrupted work on the restarted daemon), and the new version activates
|
|
159
193
|
immediately.
|
|
@@ -289,7 +323,8 @@ workspace; sign in again to replace one with the per-installation flow.
|
|
|
289
323
|
|
|
290
324
|
`gateway run` starts the local runtime service from this environment's saved
|
|
291
325
|
connection. It is the command the installed `launchd` / `systemd --user`
|
|
292
|
-
service execs
|
|
326
|
+
service execs, and the child the Windows `gateway supervise` loop keeps
|
|
327
|
+
running; run it manually to keep connected agents available in the foreground.
|
|
293
328
|
|
|
294
329
|
```bash
|
|
295
330
|
kylon gateway run
|
|
@@ -653,7 +688,9 @@ npm dist-tag add kylon-cli@<last-good> latest # move the channel back
|
|
|
653
688
|
npm deprecate kylon-cli@<bad> "Broken release — use <last-good>."
|
|
654
689
|
```
|
|
655
690
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
bundle
|
|
691
|
+
Re-pointing the tag stops the bad build from spreading: hosts that have not
|
|
692
|
+
upgraded yet resolve `<last-good>` on their next `kylon upgrade` or automatic
|
|
693
|
+
update. It does not walk a host back that already runs `<bad>` — the install's
|
|
694
|
+
direction guard keeps a newer installed bundle over an older invoked copy, and
|
|
695
|
+
`kylon upgrade` reports such a host as already current — so the way back for
|
|
696
|
+
those hosts is publishing a fixed, higher version. Do not `npm unpublish`.
|