@sylphx/cli 0.14.4 → 0.14.6

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @sylphx/cli
2
2
 
3
+ ## 0.14.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1470](https://github.com/SylphxAI/platform/pull/1470) [`21730d6`](https://github.com/SylphxAI/platform/commit/21730d642b52f8975f8ecb6b726ee75f6887481f) Thanks [@shtse8](https://github.com/shtse8)! - Make `logs --service` truthful to the log contract by applying it as a strict runtime-log filter and rejecting service-scoped build logs until build log chunks carry service attribution.
8
+
9
+ - [#1467](https://github.com/SylphxAI/platform/pull/1467) [`9362845`](https://github.com/SylphxAI/platform/commit/9362845a3756d5114d52233dca1a4f2b9f715e89) Thanks [@shtse8](https://github.com/shtse8)! - Give `sylphx deploy` a 20 minute authoritative fallback wait budget after build-log stream degradation and expose `--wait-timeout` for CI/operator overrides.
10
+
11
+ ## 0.14.5
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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.
16
+
3
17
  ## 0.14.4
4
18
 
5
19
  ### Patch Changes
@@ -356,7 +370,7 @@ All wire types (request bodies, response envelopes, error shapes) derive from [`
356
370
  **New commands:**
357
371
 
358
372
  - `sylphx tasks` — manage task definitions (list/get/create/update/rm), supports job/cron/service modes
359
- - `sylphx promote` — promote staging → production environment
373
+ - `sylphx promote` — promote one environment into another
360
374
  - `sylphx config` — manage per-environment app config (list/get/set/delete)
361
375
  - `sylphx storage` — manage object storage buckets
362
376
  - `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 three auth paths (ADR-059 + ADR-074):
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. Service tokens (`svc_*`, ADR-089 §2.10) or short-lived OAuth access JWTs (`eyJ…`) both work |
45
- | **`SYLPHX_TOKEN_FILE` secret file** | Local agent fleets / mounted secrets | `export SYLPHX_TOKEN_FILE=~/.sylphx/agent-token.env` — reads a raw token or `SYLPHX_TOKEN=...` file, skips OAuth refresh, and never falls back to a human OAuth session when the file is invalid |
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` or `SYLPHX_TOKEN_FILE` and every CLI command honours it
84
- as a Bearer token — no `sylphx login`, no browser, no
85
- `~/.sylphx/config.json` write:
86
-
87
- - The env var **wins** over any stored OAuth session — useful when a
88
- developer's machine doubles as a CI runner.
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_...`, or `export 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 **skipped** when the env var is
94
- active or a token file is configured. Service tokens have no refresh
95
- token (rotate via `sylphx tokens rotate` instead); JWTs supplied here
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 or OIDC-issued
122
- short-lived token. Do not copy `~/.sylphx/config.json` between agents:
123
- the OAuth refresh token is single-use rotation state for one interactive
124
- user session, and sharing it can revoke the chain.
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` | Bearer token for non-interactive auth (CI / agents). Accepts `svc_*` service tokens or `eyJ…` OAuth access JWTs. Wins over any stored OAuth session; refresh interceptor is skipped (stateless). Empty string is treated as unset. |
163
- | `SYLPHX_TOKEN_FILE` | Path to a non-interactive auth secret file. Accepts a raw token, `SYLPHX_TOKEN=...`, or `export SYLPHX_TOKEN="..."`. Used after `SYLPHX_TOKEN` and before stored OAuth; fails closed when set but invalid. |
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
 
@@ -189,12 +201,12 @@ The home config is private operator state only. It does not store per-directory
189
201
 
190
202
  | Command | Purpose |
191
203
  |---|---|
192
- | `sylphx deploy` | Deploy the linked project, or an explicit project with `--project/--org` |
204
+ | `sylphx deploy` | Deploy the linked project, or an explicit project with `--project/--org`; verifies final state from the deployment record if the build-log stream drops |
193
205
  | `sylphx deployments` | List / inspect deployments |
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 staging → production for a linked or explicit project |
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 |