kylon-cli 0.2.0-next.154 → 0.2.1-next.156
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 +77 -21
- package/dist/kylon-bundle.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -65,17 +65,63 @@ for the debugger-friendly tsx-based dev loop.
|
|
|
65
65
|
|
|
66
66
|
npm dist-tags are the version pointer — there is no server-side version
|
|
67
67
|
policy. Every merge to `develop` publishes a prerelease to the `next` tag
|
|
68
|
-
(`.github/workflows/cli-publish.yml`)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
(`.github/workflows/cli-publish.yml`). A production deployment dispatched from
|
|
69
|
+
`main` automatically invokes the same workflow in stable mode and publishes the
|
|
70
|
+
exact `packages/cli/package.json` version to `latest`; it is idempotent when that
|
|
71
|
+
version already exists. A CLI change intended for production must therefore bump
|
|
72
|
+
the package version before the production deploy, or the stable publish will
|
|
73
|
+
correctly no-op and `latest` will remain on the existing build.
|
|
74
|
+
|
|
75
|
+
A matching `kylon-cli-vX.Y.Z` tag is an alternative supported stable-release
|
|
76
|
+
trigger, not a required extra step after a production deploy. Do not run
|
|
77
|
+
`npm publish` ad hoc: both paths use the CI workflow and its OIDC publisher.
|
|
78
|
+
Development installs `@next` and production installs `@latest`, so each
|
|
79
|
+
environment tracks its own release train.
|
|
76
80
|
|
|
77
81
|
## Usage
|
|
78
82
|
|
|
83
|
+
### Sign in for workspace commands
|
|
84
|
+
|
|
85
|
+
For a person using `kylon workspace ...` from their own terminal, open the
|
|
86
|
+
workspace's **Settings → Kylon CLI** section, expand it, and copy its setup
|
|
87
|
+
command, or run:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install -g kylon-cli@latest && kylon auth login --workspace <WORKSPACE_ID>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
The CLI opens Kylon in your browser. After you sign in, confirm the installation
|
|
94
|
+
and workspace shown on the authorization page, and verify that its confirmation
|
|
95
|
+
code matches the one printed in your terminal. The browser approves a short-lived
|
|
96
|
+
request but never receives the credential. The CLI proves possession of its PKCE
|
|
97
|
+
verifier while polling Kylon over HTTPS, receives the credential directly from
|
|
98
|
+
the API, and saves it in the versioned credential collection at
|
|
99
|
+
`~/.kylon/workspace-auth.json` with mode `0600`. No loopback listener, incoming
|
|
100
|
+
port, or browser request to localhost is used.
|
|
101
|
+
The collection keeps credentials separately by server and workspace, and
|
|
102
|
+
`--scope-workspace` selects the matching entry.
|
|
103
|
+
|
|
104
|
+
Each installation credential expires after 90 days. Re-running `kylon auth
|
|
105
|
+
login` for the same installation and workspace rotates that credential, making
|
|
106
|
+
the previous value invalid. Use `kylon auth status` to inspect the bound
|
|
107
|
+
workspace and expiration time.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
kylon auth logout --workspace <WORKSPACE_ID>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Logout revokes the selected installation credential remotely before removing
|
|
114
|
+
that entry from the local collection. With no `--workspace`, it selects the most
|
|
115
|
+
recently authorized entry. If Kylon cannot confirm revocation, it keeps the local
|
|
116
|
+
credential so you can retry. `kylon auth logout --local-only` deliberately skips
|
|
117
|
+
the remote revocation. You can also revoke any installation independently from
|
|
118
|
+
**Settings → Kylon CLI**. Other installations, browser sessions, external-agent
|
|
119
|
+
keys, and workspace service keys are unaffected.
|
|
120
|
+
|
|
121
|
+
Credentials created by the earlier browser flow appear as **Legacy user API
|
|
122
|
+
key** in Settings. They can be revoked there, but they are not bound to a single
|
|
123
|
+
workspace; sign in again to replace one with the per-installation flow.
|
|
124
|
+
|
|
79
125
|
### Onboard an invited external agent
|
|
80
126
|
|
|
81
127
|
The Web UI provides one operator-run command after an external agent is
|
|
@@ -95,6 +141,10 @@ by the displaced connection, and replaces the foreground daemon. If Codex or
|
|
|
95
141
|
Claude Code is logged out, an interactive terminal launches the provider's own
|
|
96
142
|
login flow and verifies authentication again before connecting.
|
|
97
143
|
|
|
144
|
+
External-agent onboarding is intentionally separate from human `kylon auth
|
|
145
|
+
login`: it continues to use the agent principal's API key and gateway session.
|
|
146
|
+
It does not create a human CLI installation credential.
|
|
147
|
+
|
|
98
148
|
Each invited agent is installed below `~/.kylon/agents/<agent-id>/`, so several
|
|
99
149
|
Claude Code, Codex, or mixed-provider agents can run on the same host without
|
|
100
150
|
sharing credentials or provider resume state. Different agents cannot use the
|
|
@@ -470,9 +520,10 @@ API server is the security boundary.
|
|
|
470
520
|
|
|
471
521
|
The CLI ships via **npm dist-tags** — there is no server-side version policy.
|
|
472
522
|
`cli-verify.yml` validates on PRs and pushes; `cli-publish.yml` publishes via
|
|
473
|
-
OIDC (no token): a prerelease to the `next` tag on every merge to
|
|
474
|
-
|
|
475
|
-
|
|
523
|
+
OIDC (no token): a prerelease to the `next` tag on every qualifying merge to
|
|
524
|
+
`develop`, and the package version to `latest` when the production deploy runs
|
|
525
|
+
from `main`. A matching `kylon-cli-vX.Y.Z` tag can also publish that stable
|
|
526
|
+
version. Development installs `@next`; production installs `@latest`.
|
|
476
527
|
|
|
477
528
|
### Versioning
|
|
478
529
|
|
|
@@ -484,18 +535,23 @@ Use explicit semver in `packages/cli/package.json`:
|
|
|
484
535
|
| minor (`0.1.x → 0.2.0`) | backward-compatible capability (new command, new flag) |
|
|
485
536
|
| major (`0.x.x → 1.0.0`) | breaking change to CLI contract or runtime behavior |
|
|
486
537
|
|
|
487
|
-
Prerelease builds are versioned
|
|
488
|
-
`cli-publish.yml
|
|
489
|
-
`packages/cli/package.json`
|
|
490
|
-
|
|
538
|
+
Prerelease builds are versioned `<package-version>-next.<run>` automatically by
|
|
539
|
+
`cli-publish.yml`. Stable mode publishes the exact package version and skips
|
|
540
|
+
idempotently if npm already has it. Bump `packages/cli/package.json` whenever a
|
|
541
|
+
new production CLI build must be published; otherwise the production deploy
|
|
542
|
+
will intentionally leave `latest` unchanged.
|
|
491
543
|
|
|
492
544
|
### Publishing
|
|
493
545
|
|
|
494
|
-
- **Prerelease (automatic):** every merge to `
|
|
495
|
-
|
|
546
|
+
- **Prerelease (automatic):** every merge to `develop` touching the CLI publishes
|
|
547
|
+
`<package-version>-next.<run>` to the `next` tag via `cli-publish.yml` (OIDC, no
|
|
496
548
|
`NPM_TOKEN`). dev tracks this tag, so dev always dogfoods the newest build.
|
|
497
|
-
- **Stable (
|
|
498
|
-
|
|
549
|
+
- **Stable (automatic with a production deploy):** a production deployment
|
|
550
|
+
dispatched from `main` calls `cli-publish.yml` in stable mode. It publishes
|
|
551
|
+
the package version only when that exact version is absent from npm. CLI
|
|
552
|
+
changes therefore need a package-version bump before the production deploy.
|
|
553
|
+
- **Stable tag (alternative):** after bumping the package version, a matching
|
|
554
|
+
tag on `main` invokes the same stable workflow directly:
|
|
499
555
|
|
|
500
556
|
```bash
|
|
501
557
|
git pull
|
|
@@ -504,8 +560,8 @@ Prerelease builds are versioned `0.1.0-next.<run>` automatically by
|
|
|
504
560
|
npm view kylon-cli dist-tags # verify
|
|
505
561
|
```
|
|
506
562
|
|
|
507
|
-
|
|
508
|
-
|
|
563
|
+
Do not `npm publish` ad hoc: production deploys and release tags both go through
|
|
564
|
+
the workflow so the OIDC provenance path is exercised end to end.
|
|
509
565
|
|
|
510
566
|
### Rollback
|
|
511
567
|
|