@sylphx/cli 0.14.4 → 0.14.5
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/CHANGELOG.md +7 -1
- package/README.md +33 -21
- package/dist/main.js +5482 -5016
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sylphx/cli
|
|
2
2
|
|
|
3
|
+
## 0.14.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1424](https://github.com/SylphxAI/platform/pull/1424) [`48e9d25`](https://github.com/SylphxAI/platform/commit/48e9d2539e1efa03fec39431f9828c9cf21470c9) Thanks [@shtse8](https://github.com/shtse8)! - Add refreshable injected OAuth credentials for local agent fleets. The CLI now treats `SYLPHX_ACCESS_TOKEN` + `SYLPHX_REFRESH_TOKEN`, and OAuth pairs in `SYLPHX_TOKEN_FILE`, as managed sessions that use the existing refresh lock instead of stateless bearer tokens.
|
|
8
|
+
|
|
3
9
|
## 0.14.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -356,7 +362,7 @@ All wire types (request bodies, response envelopes, error shapes) derive from [`
|
|
|
356
362
|
**New commands:**
|
|
357
363
|
|
|
358
364
|
- `sylphx tasks` — manage task definitions (list/get/create/update/rm), supports job/cron/service modes
|
|
359
|
-
- `sylphx promote` — promote
|
|
365
|
+
- `sylphx promote` — promote one environment into another
|
|
360
366
|
- `sylphx config` — manage per-environment app config (list/get/set/delete)
|
|
361
367
|
- `sylphx storage` — manage object storage buckets
|
|
362
368
|
- `sylphx volumes` — manage persistent volumes
|
package/README.md
CHANGED
|
@@ -36,13 +36,14 @@ sylphx deploy
|
|
|
36
36
|
|
|
37
37
|
## Authentication
|
|
38
38
|
|
|
39
|
-
The CLI supports
|
|
39
|
+
The CLI supports four auth paths (ADR-059 + ADR-074):
|
|
40
40
|
|
|
41
41
|
| Mode | Use case | How |
|
|
42
42
|
|---|---|---|
|
|
43
43
|
| **OAuth device flow** (default) | Interactive dev | `sylphx login` — browser-backed device flow, 15-min access + 30-day refresh token stored at `~/.sylphx/config.json` (`0600`), auto-refresh built in |
|
|
44
|
-
| **`SYLPHX_TOKEN` env var** | CI / CD / agents | `export SYLPHX_TOKEN=svc_...` — no login step, no disk write, stateless
|
|
45
|
-
|
|
|
44
|
+
| **`SYLPHX_TOKEN` env var** | CI / CD / agents | `export SYLPHX_TOKEN=svc_...` — no login step, no disk write, stateless service-token auth |
|
|
45
|
+
| **Injected OAuth pair** | Managed local agent fleets | `SYLPHX_ACCESS_TOKEN=eyJ...` + `SYLPHX_REFRESH_TOKEN=...` — imports the pair into the normal refresh chain and uses the cross-process refresh lock |
|
|
46
|
+
| **`SYLPHX_TOKEN_FILE` secret file** | Local agent fleets / mounted secrets | `export SYLPHX_TOKEN_FILE=~/.sylphx/agent-token.env` — reads a raw service token, `SYLPHX_TOKEN=...`, or an access+refresh OAuth pair; fails closed when the file is invalid |
|
|
46
47
|
|
|
47
48
|
Legacy `slx_*` personal access tokens were eliminated 2026-04-21 (ADR-059 §1.4) and are no longer accepted by the API.
|
|
48
49
|
|
|
@@ -58,6 +59,10 @@ sylphx logout
|
|
|
58
59
|
export SYLPHX_TOKEN=svc_…
|
|
59
60
|
sylphx whoami # → "Auth: SYLPHX_TOKEN env var"
|
|
60
61
|
|
|
62
|
+
export SYLPHX_ACCESS_TOKEN=eyJ…
|
|
63
|
+
export SYLPHX_REFRESH_TOKEN=...
|
|
64
|
+
sylphx whoami # → "Auth: SYLPHX_ACCESS_TOKEN/SYLPHX_REFRESH_TOKEN env vars"
|
|
65
|
+
|
|
61
66
|
printf '%s\n' 'SYLPHX_TOKEN=svc_…' > ~/.sylphx/agent-token.env
|
|
62
67
|
chmod 600 ~/.sylphx/agent-token.env
|
|
63
68
|
export SYLPHX_TOKEN_FILE=~/.sylphx/agent-token.env
|
|
@@ -80,20 +85,25 @@ sylphx releases list --project=proj_abc123 --org=my-org
|
|
|
80
85
|
|
|
81
86
|
### Non-interactive use (CI / agents)
|
|
82
87
|
|
|
83
|
-
Set `SYLPHX_TOKEN`
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
88
|
+
Set `SYLPHX_TOKEN` to a `svc_*` service token for stateless CI, or inject
|
|
89
|
+
`SYLPHX_ACCESS_TOKEN` + `SYLPHX_REFRESH_TOKEN` when a managed credential
|
|
90
|
+
broker owns an OAuth session. Every CLI command honours the active source:
|
|
91
|
+
|
|
92
|
+
- `SYLPHX_ACCESS_TOKEN` + `SYLPHX_REFRESH_TOKEN` wins first. The CLI
|
|
93
|
+
writes the pair into `~/.sylphx/config.json`, then uses the same
|
|
94
|
+
proactive/reactive refresh path and cross-process refresh lock as
|
|
95
|
+
`sylphx login`. `SYLPHX_TOKEN` may supply the access token only when
|
|
96
|
+
`SYLPHX_REFRESH_TOKEN` is present and the token is not `svc_*`.
|
|
97
|
+
- `SYLPHX_TOKEN=svc_...` is next and stays stateless: no login step, no
|
|
98
|
+
browser, no config write.
|
|
89
99
|
- `SYLPHX_TOKEN_FILE` is next in precedence and supports a raw token,
|
|
90
|
-
`SYLPHX_TOKEN=svc_...`,
|
|
100
|
+
`SYLPHX_TOKEN=svc_...`, `export SYLPHX_TOKEN="svc_..."`, or
|
|
101
|
+
`SYLPHX_ACCESS_TOKEN=...` + `SYLPHX_REFRESH_TOKEN=...`.
|
|
91
102
|
- If `SYLPHX_TOKEN_FILE` is set but unreadable or empty, the CLI fails
|
|
92
103
|
closed instead of silently using a stored human OAuth session.
|
|
93
|
-
- The OAuth refresh interceptor is
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
are operator-rotated.
|
|
104
|
+
- The OAuth refresh interceptor is skipped only for stateless service
|
|
105
|
+
token sources. Access-token-only OAuth JWTs are short-lived and should
|
|
106
|
+
be paired with `SYLPHX_REFRESH_TOKEN` or replaced by a service token.
|
|
97
107
|
- Empty string (`SYLPHX_TOKEN=`) is treated as unset and falls back to
|
|
98
108
|
the stored session — defends against misconfigured CI shell exports.
|
|
99
109
|
- The same `SYLPHX_TOKEN` GitHub Actions output minted by `sylphx ci
|
|
@@ -118,10 +128,10 @@ export SYLPHX_TOKEN_FILE=~/.sylphx/agent-token.env
|
|
|
118
128
|
sylphx doctor
|
|
119
129
|
```
|
|
120
130
|
|
|
121
|
-
Agents should prefer a scope-limited `svc_*` service token
|
|
122
|
-
|
|
123
|
-
the
|
|
124
|
-
|
|
131
|
+
Agents should prefer a scope-limited `svc_*` service token for long-running
|
|
132
|
+
automation. If a broker injects OAuth, inject both access and refresh tokens
|
|
133
|
+
so the CLI can rotate the chain. Do not copy `~/.sylphx/config.json` between
|
|
134
|
+
machines: the OAuth refresh token is single-use rotation state.
|
|
125
135
|
|
|
126
136
|
## Configuration
|
|
127
137
|
|
|
@@ -159,8 +169,10 @@ The home config is private operator state only. It does not store per-directory
|
|
|
159
169
|
|
|
160
170
|
| Variable | Description |
|
|
161
171
|
|---|---|
|
|
162
|
-
| `SYLPHX_TOKEN` |
|
|
163
|
-
| `
|
|
172
|
+
| `SYLPHX_TOKEN` | Stateless bearer token for non-interactive auth (CI / agents). Use `svc_*` service tokens. Empty string is treated as unset. |
|
|
173
|
+
| `SYLPHX_ACCESS_TOKEN` | OAuth access token for managed agents. Must be paired with `SYLPHX_REFRESH_TOKEN`; wins over stateless `SYLPHX_TOKEN` and participates in CLI refresh. |
|
|
174
|
+
| `SYLPHX_REFRESH_TOKEN` | OAuth refresh token for managed agents. Used only with `SYLPHX_ACCESS_TOKEN` or a non-service-token `SYLPHX_TOKEN`. |
|
|
175
|
+
| `SYLPHX_TOKEN_FILE` | Path to a non-interactive auth secret file. Accepts a raw service token, `SYLPHX_TOKEN=...`, `export SYLPHX_TOKEN="..."`, or `SYLPHX_ACCESS_TOKEN=...` + `SYLPHX_REFRESH_TOKEN=...`. Fails closed when set but invalid. |
|
|
164
176
|
| `SYLPHX_CONFIG_DIR` | Advanced automation override for the CLI config directory. Use in CI, tests, and hermetic agent sandboxes to avoid reading or writing the operator's real `~/.sylphx` credentials. |
|
|
165
177
|
| `SYLPHX_API_URL` | Override API base URL (default: `https://sylphx.com`) |
|
|
166
178
|
|
|
@@ -194,7 +206,7 @@ The home config is private operator state only. It does not store per-directory
|
|
|
194
206
|
| `sylphx releases` | Browse release history for a linked or explicit project |
|
|
195
207
|
| `sylphx inspect` | Inspect a deployment's build + run metadata |
|
|
196
208
|
| `sylphx bisect` | Git-bisect-style regression hunt across deployments for a linked or explicit project |
|
|
197
|
-
| `sylphx promote` | Promote
|
|
209
|
+
| `sylphx promote` | Promote one environment into another for a linked or explicit project |
|
|
198
210
|
| `sylphx rollback` | Roll back a linked or explicit project deployment |
|
|
199
211
|
| `sylphx status` | Deployment + health status for a linked or explicit project |
|
|
200
212
|
| `sylphx logs` | Inspect bounded runtime logs for a linked or explicit project; add `--follow` for SSE or `--type=build` for deploy logs |
|