kylon-cli 0.2.4 → 0.2.5-next.456
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 +43 -78
- package/dist/kylon-bundle.mjs +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# kylon-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
workspace.
|
|
3
|
+
Local runtime CLI for running external agents for a P2 workspace.
|
|
5
4
|
|
|
6
5
|
Requires Node.js 22.15.0 or newer.
|
|
7
6
|
|
|
@@ -16,31 +15,33 @@ two distinct copy-paste entry points:
|
|
|
16
15
|
installation for human workspace commands. Its **Use with Your Agents**
|
|
17
16
|
prompt teaches Claude Code, Codex, Hermes, or OpenClaw to discover and use
|
|
18
17
|
`kylon workspace` commands without assuming a provider-specific interface.
|
|
19
|
-
- **An external agent's
|
|
20
|
-
`npx --yes kylon-cli@<version> agent link --url '<one-time link>'`.
|
|
18
|
+
- **An external agent's Profile** shows
|
|
19
|
+
`npx --yes kylon-cli@<version> agent link --url '<one-time link>'`. Custom
|
|
20
|
+
ACP agents append `-- <launch command> [args]` to that same line. The link
|
|
21
21
|
embeds a short-lived credential, so the CLI does not open a browser or reuse
|
|
22
22
|
a human workspace credential. It checks that the selected Claude Code or
|
|
23
23
|
Codex CLI is installed and authenticated, shows the exact agent and
|
|
24
|
-
workspace for confirmation,
|
|
25
|
-
|
|
26
|
-
30 minutes and can be redeemed only once;
|
|
27
|
-
interrupted redemption is idempotent.
|
|
28
|
-
credential, treat the command as a secret until
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
workspace for confirmation, connects the agent, and starts its local
|
|
25
|
+
runtime. For ACP, the same operation also saves the selected launch command.
|
|
26
|
+
The credential expires after 30 minutes and can be redeemed only once;
|
|
27
|
+
rerunning the same installation's interrupted redemption is idempotent.
|
|
28
|
+
Because the link carries the credential, treat the command as a secret until
|
|
29
|
+
it is used or expires.
|
|
30
|
+
|
|
31
|
+
A local runtime may be connected with one Kylon server and workspace at a time.
|
|
31
32
|
Equivalent spellings of the same server (`https://dev.purework.ai/api` and
|
|
32
33
|
`https://api.purework.ai`, `https://app.kylon.io/api` and
|
|
33
34
|
`https://api.kylon.io`) count as the same registration; preview environments
|
|
34
35
|
never do, even though they serve the same workspace ids as dev. Run
|
|
35
|
-
`kylon
|
|
36
|
-
local registration
|
|
37
|
-
agent.
|
|
36
|
+
`kylon disconnect` before connecting it somewhere else. This forgets only the
|
|
37
|
+
local runtime registration; it revokes nothing or changes any workspace-side
|
|
38
|
+
agent configuration.
|
|
38
39
|
|
|
39
40
|
`auth login` browser-authenticates the human operator for `kylon workspace`
|
|
40
41
|
commands. `agent link` authenticates only the link operation with its embedded
|
|
41
|
-
credential; it never creates a human CLI session. Linking mints or reuses
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
credential; it never creates a human CLI session. Linking mints or reuses an
|
|
43
|
+
installation credential stored locally with mode `0600` and starts the local
|
|
44
|
+
agent runtime. In release builds on supported environments a user-level
|
|
44
45
|
`launchd` / `systemd --user` service is installed so the daemon survives
|
|
45
46
|
terminal exit, reboot, and sleep/wake; otherwise the daemon runs in the
|
|
46
47
|
foreground until `Ctrl+C`.
|
|
@@ -53,7 +54,7 @@ Requirements: Node.js 22.15.0+ (npm ships with Node). Linux / macOS only
|
|
|
53
54
|
|
|
54
55
|
### One managed `kylon` for humans and agents
|
|
55
56
|
|
|
56
|
-
The bootstrap commands (`agent link
|
|
57
|
+
The bootstrap commands (`agent link` and `auth login`) pin the CLI under
|
|
57
58
|
`~/.kylon/bin`: the exact bundle the daemon and its agents execute, exposed as
|
|
58
59
|
the `kylon` command. After the bootstrap they offer to add that directory to
|
|
59
60
|
your shell PATH (a marker-wrapped `. "$HOME/.kylon/env"` line in your shell rc,
|
|
@@ -63,23 +64,23 @@ artifact, one version, one upgrade.
|
|
|
63
64
|
|
|
64
65
|
A leftover npm-global or npx-cached copy stays harmless: when it starts and
|
|
65
66
|
finds a strictly newer pinned install, it defers to it automatically
|
|
66
|
-
(installer commands — `agent
|
|
67
|
+
(installer commands — `agent …` and `gateway …` — always run as invoked, so a
|
|
67
68
|
fresh `npx` can still install itself over an older pinned copy; set
|
|
68
69
|
`KYLON_PINNED_TRAMPOLINE=0` to disable the deferral).
|
|
69
70
|
|
|
70
|
-
### Upgrading a
|
|
71
|
+
### Upgrading a local runtime
|
|
71
72
|
|
|
72
73
|
```bash
|
|
73
74
|
npx --yes kylon-cli@latest gateway service upgrade
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
(`@next` on dev.) The daemon and the pinned agent `kylon` both run the
|
|
77
|
-
installed bundle under `~/.kylon/bin`, which only this command (or a
|
|
78
|
-
|
|
78
|
+
installed bundle under `~/.kylon/bin`, which only this command (or a fresh
|
|
79
|
+
`agent link`) refreshes: the freshly-resolved CLI installs its own bundle and
|
|
79
80
|
drain-restarts the running daemon onto it, moving both in lockstep.
|
|
80
81
|
`npm install -g` alone updates the operator's terminal binary and leaves the
|
|
81
|
-
|
|
82
|
-
uses exactly this command; `kylon gateway service repair` is the same
|
|
82
|
+
runtime service on the old build. The update notice the CLI prints for local
|
|
83
|
+
runtimes uses exactly this command; `kylon gateway service repair` is the same
|
|
83
84
|
reconciliation under its recovery-oriented name.
|
|
84
85
|
|
|
85
86
|
The drain waits up to five minutes for in-flight agent work, and a drain that
|
|
@@ -181,8 +182,8 @@ state:
|
|
|
181
182
|
workspace secret grants with browser authorization. Create API keys through
|
|
182
183
|
the secure Connection flow in Kylon.
|
|
183
184
|
- Use `kylon gateway secret list|set|delete --agent <agent-id>` for agent-local
|
|
184
|
-
records, authenticated by this
|
|
185
|
-
|
|
185
|
+
records, authenticated by this installation's saved runtime credential
|
|
186
|
+
through agent-scoped runtime routes.
|
|
186
187
|
|
|
187
188
|
This separation prevents browser credentials from reaching the
|
|
188
189
|
daemon-authenticated secret endpoints and avoids state-dependent command
|
|
@@ -197,59 +198,33 @@ that entry from the local collection. With no `--workspace`, it selects the most
|
|
|
197
198
|
recently authorized entry. If Kylon cannot confirm revocation, it keeps the local
|
|
198
199
|
credential so you can retry. `kylon auth logout --local-only` deliberately skips
|
|
199
200
|
the remote revocation. This logout is deliberately credential-only: it does not
|
|
200
|
-
disconnect
|
|
201
|
-
external agents, it remains listed as an **Authorized device** so its
|
|
202
|
-
|
|
201
|
+
disconnect the local agent runtime or change connected agents. If that installation
|
|
202
|
+
still runs external agents, it remains listed as an **Authorized device** so its
|
|
203
|
+
runtime access can still be removed without signing the CLI in again.
|
|
203
204
|
|
|
204
205
|
You can instead remove an **Authorized device** from **Settings → Kylon CLI**.
|
|
205
206
|
After warning about the impact, that workspace-scoped action revokes any active
|
|
206
|
-
installation credential,
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
installation credential, removes the local runtime access associated with the
|
|
208
|
+
same installation, and disconnects every external agent using it. The device's
|
|
209
|
+
authorizations and runtime access in other workspaces, browser
|
|
209
210
|
sessions, and workspace service keys are unaffected.
|
|
210
211
|
|
|
211
212
|
Credentials created by the earlier browser flow appear as **Legacy user API
|
|
212
213
|
key** in Settings. They can be revoked there, but they are not bound to a single
|
|
213
214
|
workspace; sign in again to replace one with the per-installation flow.
|
|
214
215
|
|
|
215
|
-
### Register a computer for manual placement
|
|
216
|
-
|
|
217
|
-
`kylon connect` remains the advanced computer-first entrypoint when the user
|
|
218
|
-
explicitly wants to register a host before choosing an agent:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
npx --yes kylon-cli@latest connect --workspace <WORKSPACE_ID>
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
This browser-authenticates the operator (the same PKCE flow as `kylon auth
|
|
225
|
-
login`), enrolls the machine as a **computer** keyed on its stable install id
|
|
226
|
-
(re-running is idempotent), persists the machine-scoped credential, and starts
|
|
227
|
-
the host daemon. New external-agent onboarding should use the agent-specific
|
|
228
|
-
`agent link` command instead; creation never asks the user to select a computer.
|
|
229
|
-
|
|
230
|
-
The daemon then reconciles the computer's assigned agents from the server:
|
|
231
|
-
each agent gets an isolated state root under `~/.kylon/agents/<agent-id>/`,
|
|
232
|
-
provider readiness (Codex / Claude Code install + authentication) is reported
|
|
233
|
-
per agent, and assignments arrive over the computer's single SSE stream.
|
|
234
|
-
Linking or relinking an agent later happens from that agent's Onboarding tab;
|
|
235
|
-
the daemon picks the change up without re-running `connect`.
|
|
236
|
-
|
|
237
|
-
Use `--no-start` to register without starting the daemon, `--json` for
|
|
238
|
-
machine-readable output, and `--server-url` to target a non-default API origin
|
|
239
|
-
for direct computer registration.
|
|
240
|
-
|
|
241
216
|
### Run
|
|
242
217
|
|
|
243
|
-
`gateway run` starts the
|
|
244
|
-
|
|
245
|
-
service execs; run it manually to
|
|
218
|
+
`gateway run` starts the local runtime service from this environment's saved
|
|
219
|
+
connection. It is the command the installed `launchd` / `systemd --user`
|
|
220
|
+
service execs; run it manually to keep connected agents available in the foreground.
|
|
246
221
|
|
|
247
222
|
```bash
|
|
248
223
|
kylon gateway run
|
|
249
224
|
```
|
|
250
225
|
|
|
251
|
-
It takes no connection flags:
|
|
252
|
-
saved
|
|
226
|
+
It takes no connection flags: link an agent first with `kylon agent link`.
|
|
227
|
+
Without a saved runtime connection it exits with guidance pointing there.
|
|
253
228
|
|
|
254
229
|
### Sleep, wake, and keep-awake (macOS)
|
|
255
230
|
|
|
@@ -272,7 +247,7 @@ seconds, no service restart required.
|
|
|
272
247
|
When the machine does sleep (battery, lid closed, manual sleep), assignments
|
|
273
248
|
dispatched to its agents queue server-side. The daemon detects the wake
|
|
274
249
|
instantly (a wall-clock jump across its monitor tick) and recovers in one
|
|
275
|
-
pass: it force-reconnects the
|
|
250
|
+
pass: it force-reconnects the runtime event stream with reset backoff,
|
|
276
251
|
re-asserts presence on the fresh connection, and claims the queued work —
|
|
277
252
|
instead of waiting out inactivity timeouts and heartbeat intervals.
|
|
278
253
|
|
|
@@ -280,21 +255,11 @@ instead of waiting out inactivity timeouts and heartbeat intervals.
|
|
|
280
255
|
|
|
281
256
|
| Command | Description |
|
|
282
257
|
|---|---|
|
|
283
|
-
| `kylon
|
|
284
|
-
| `kylon
|
|
285
|
-
| `kylon gateway run` | Run the
|
|
258
|
+
| `kylon agent link --url <link> [-- <launch command>]` | **Recommended.** Connect one agent and start its local runtime. ACP launch commands are saved in the same operation. |
|
|
259
|
+
| `kylon disconnect` | Forget this environment's saved runtime connection. Local only: workspace-side agent configuration is unchanged. |
|
|
260
|
+
| `kylon gateway run` | Run the local runtime service from the saved connection (service entrypoint). |
|
|
286
261
|
| `kylon keep-awake [mode]` | Show or set macOS sleep prevention (`always` (default) / `while-busy` / `off`). |
|
|
287
262
|
|
|
288
|
-
### Connect Options
|
|
289
|
-
|
|
290
|
-
| Flag | Description |
|
|
291
|
-
|---|---|
|
|
292
|
-
| `--workspace <id>` | Workspace to register this computer with |
|
|
293
|
-
| `--url <setup url>` | Agent setup link from Kylon; implies the workspace and assigns that agent after enrollment (alternative to `--workspace`) |
|
|
294
|
-
| `--server-url <url>` | API server URL (defaults to `https://api.kylon.io`; ignored in favor of the origin resolved from `--url`) |
|
|
295
|
-
| `--no-start` | Register only; do not start the daemon |
|
|
296
|
-
| `--json` | Emit machine-readable JSON |
|
|
297
|
-
|
|
298
263
|
### Supported Providers
|
|
299
264
|
|
|
300
265
|
- `codex` — OpenAI Codex CLI
|
|
@@ -599,5 +564,5 @@ npm deprecate kylon-cli@<bad> "Broken release — use <last-good>."
|
|
|
599
564
|
|
|
600
565
|
Operators on `@latest` pick up the re-pointed version the next time they run
|
|
601
566
|
`npx --yes kylon-cli@latest gateway service upgrade` (the command the update
|
|
602
|
-
notice prints
|
|
567
|
+
notice prints for local runtimes); in-flight daemons keep their current pinned
|
|
603
568
|
bundle until that drain-restart. Do not `npm unpublish`.
|