@sylphx/cli 0.10.0 → 0.12.0

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,62 @@
1
1
  # @sylphx/cli
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1126](https://github.com/SylphxAI/platform/pull/1126) [`b5c6c14`](https://github.com/SylphxAI/platform/commit/b5c6c142ba89078edf460807282337dc315b77df) Thanks [@shtse8](https://github.com/shtse8)! - ADR-141..146 — health observability stack lands across the SDK, CLI, contract, and management surfaces.
8
+
9
+ ## `@sylphx/sdk` (`@sylphx/sdk/health`) — new public surface
10
+
11
+ - **`withHealth.{hono,express,fastify,fetch}`** — framework-agnostic Zero-Config `/healthz` middleware. Drop one line into your Hono / Express / Fastify / Next.js / Bun.serve app and you get a multi-signal continuous-score health endpoint, OTel emission, causality propagation, and audit-grade history out of the box.
12
+ - **Seven built-in signals**: `eventLoopLagSignal`, `queueDepthSignal`, `errorRateSignal`, `memoryPressureSignal`, `pingSignal`, `databaseSignal`, `redisSignal`. Compose them via `sylphxHealth({ signals: [...] })`; the default scoring strategy is weighted geometric mean per ADR-111 §4.5.
13
+ - **ADR-142 OTel-native emission** — `health.score`, `health.signal.factor`, `health.signal.value`, `health.signal.value_state`, `health.downstream_cause` metrics + `service.health.*` span attributes + `health.evaluated` event. Default-on; graceful no-op when `@opentelemetry/api` is not installed.
14
+ - **ADR-143 causality propagation** — read/write OTel Baggage entries `sylphx.health.cause` + `sylphx.health.cause_chain`. A Postgres outage produces one paged alert at the root plus N silent downstream-impact rows, not 12 red dots. Default-on with a 0.5 score threshold.
15
+ - **ADR-144 audit-grade history** — every `evaluate()` produces a SHA-256 prev-hash chained `HistoryEntry` (CloudTrail-style integrity), retrievable via `getHistory(query?)` / verifiable via `verifyHistory(query?)`. Pluggable `HistoryStore` interface; in-memory ring buffer is the reference implementation.
16
+
17
+ ## `@sylphx/cli`
18
+
19
+ - **`sylphx migrate health-checks`** — idempotent codemod that wires `withHealth.*` into your app's entry file (Hono / Express / Fastify / Next.js auto-detected) and removes hand-rolled `/health` + `/ready` routes. Supports `--dry-run` and `--check` (CI-grade exit-1-on-pending).
20
+ - **`sylphx migrate status`** — per-service fleet visibility. Queries the Management API for every visible project and reports which services have `frameworkSignals.sdkHealthDetected = true`. The answer to "which of my services still need ADR-141?".
21
+ - **`sylphx health verify --file <path>`** — offline verifier for an exported ADR-144 history chain. Walks the SHA-256 chain and reports the first break with a clear reason. Mirrors AWS CloudTrail `validate-logs`.
22
+
23
+ ## `@sylphx/management` + `@sylphx/contract`
24
+
25
+ - **`TriggerDeploymentInput.frameworkSignals`** — optional map of `service slug → { sdkHealthDetected?: boolean }`. The CLI now scans `package.json` at deploy time and forwards these signals; the Management API merges them into `project_services.machine_config.frameworkSignals` before the reconciler picks up the deploy. Used by the reconciler smart-default (HTTP `/healthz` probe when the SDK is detected) and by the new ADR-111 Phase B sidecar SDK-detection gate.
26
+ - **`Service.frameworkSignals`** — new read-only field on the Service response so `sylphx migrate status` can render the fleet scorecard.
27
+
28
+ ## Why upgrade
29
+
30
+ Every Sylphx service gets the SOTA dataplane for free — continuous score in `[0, 1]`, multi-signal composition, OTel-native observability, causality-aware alert routing, audit-grade evidence, and (post-ADR-111 Phase B sidecar) automatic drain/kill enforcement. The legacy `/live` + `/ready` split-probe pattern is retired in a single migration.
31
+
32
+ See `docs/how-to/health-checks.md`, `docs/explanation/health-check-ownership.md`, and the runbook `docs/runbooks/health-alert-routing-adr143.md` for the operator surface.
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [[`b5c6c14`](https://github.com/SylphxAI/platform/commit/b5c6c142ba89078edf460807282337dc315b77df)]:
37
+ - @sylphx/sdk@0.13.0
38
+
39
+ ## 0.11.0
40
+
41
+ ### Minor Changes
42
+
43
+ - [#1105](https://github.com/SylphxAI/platform/pull/1105) [`ab0491b`](https://github.com/SylphxAI/platform/commit/ab0491b892ecb9e96eb2843d2b6519f8eb52e3c9) Thanks [@shtse8](https://github.com/shtse8)! - ADR-137 §2.3 / §2.4 — per-PR cost browser, step 2 (API + SDK + CLI).
44
+
45
+ - **API**: `GET /projects/:id/previews/:prNumber/cost` returns a per-PR cost envelope (build / preview env / BaaS breakdown + 30-day project monthly-average comparison). `GET /projects/:id/previews/cost` lists the most recent 50 PRs (cursor paginated by `(prNumber, windowOpenedAt)`). Both require `project:read`.
46
+ - **SDK** (`@sylphx/management`): new `previews.cost(client, projectId, prNumber, opts?)` and `previews.listCosts(client, projectId, opts?)` capability namespace.
47
+ - **CLI** (`@sylphx/cli`): new `sylphx previews cost <pr-number>` and `sylphx previews list-costs [--project <slug>]` subcommands. Headline cost is coloured by comparison ratio (green < 1×, yellow 1–2×, red ≥ 2×) per ADR-137 §2.5.
48
+
49
+ No DB migration. Cost math reuses the aggregator landed in ADR-137 Step 1 (#1092).
50
+
51
+ - [#1090](https://github.com/SylphxAI/platform/pull/1090) [`7493f41`](https://github.com/SylphxAI/platform/commit/7493f41af30f565428f0335c6c6c3a491065c89d) Thanks [@shtse8](https://github.com/shtse8)! - Fail loudly on SSE log-stream transport failures instead of silently switching `sylphx deploy` to deployment polling. Deployment state remains available through explicit `sylphx deployments get` and `sylphx deployments wait` commands.
52
+
53
+ ### Patch Changes
54
+
55
+ - [#1097](https://github.com/SylphxAI/platform/pull/1097) [`7065be6`](https://github.com/SylphxAI/platform/commit/7065be6ccf978f76e8e2e518bf57f7e144e3954e) Thanks [@shtse8](https://github.com/shtse8)! - Validate configured CLI credentials in `sylphx doctor` with a read-only Management API principal check so revoked or expired agent tokens fail loudly instead of appearing logged in.
56
+
57
+ - Updated dependencies []:
58
+ - @sylphx/sdk@0.12.3
59
+
3
60
  ## 0.10.0
4
61
 
5
62
  ### Minor Changes