@selfhelp/shared 1.3.2 → 1.4.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
@@ -9,6 +9,53 @@ All notable changes to `@selfhelp/shared` will be documented in this file.
9
9
 
10
10
  This project follows semantic versioning.
11
11
 
12
+ ## [1.4.0]
13
+
14
+ ### Added
15
+
16
+ - `TUpdateOperationStatus` gains the `idle` member: the honest state the backend
17
+ returns for an instance that has never run an update (instead of a misleading
18
+ `succeeded`/100%). Additive contract change — exhaustive consumers (e.g. a
19
+ `Record<TUpdateOperationStatus, …>`) must add an `idle` branch. Ship as the
20
+ next minor (`1.5.0`); the frontend mirror in
21
+ `sh-selfhelp_frontend/src/types/responses/admin/system.types.ts` already
22
+ tracks it.
23
+
24
+ - Instance-scoped **system maintenance / update** contracts under
25
+ `src/types/api/system.ts` for the SelfHelp Manager (`sh-manager`) ↔ CMS ↔
26
+ admin-UI flow (SelfHelp Manager / Docker Distribution MVP): `ISystemVersion`
27
+ / `ISystemVersionResponse`, `IUpdatePreflight` / `IUpdatePreflightResponse`,
28
+ `IUpdateRequest`, `IUpdateStatus` / `IUpdateStatusResponse`,
29
+ `IUpdateRequestResponse`, plus the `SYSTEM_ENDPOINTS` path constants and the
30
+ supporting unions (`TUpdatePreflightStatus`, `TUpdateOperationStatus`, …).
31
+ - Hard cross-repo invariant encoded in the types and a regression test:
32
+ `IUpdateRequest` has **no** `instance_id` — the browser never targets another
33
+ instance; the backend derives and verifies the instance identity server-side.
34
+ - `check-schema-parity.mjs` now also guards the three new admin response schemas
35
+ (`responses/admin/system_version.json`, `update_preflight.json`,
36
+ `update_status.json`) and the `requests/admin/update_request.json` request
37
+ schema against the shared TS mirrors.
38
+ - `ICompatibilityError` in `src/types/api/system.ts` — the standardized
39
+ compatibility-error shape (`component`, `component_id`, `current_version`,
40
+ `target_version`, `required_range`, `blocking`, `message`) shared verbatim by
41
+ the backend `CompatibilityError`, the SelfHelp Manager resolver, and the
42
+ frontend Available/preflight UI, with a parity test
43
+ (`compatibility-error-parity.test.ts`).
44
+
45
+ ### Changed
46
+
47
+ - **Unified registry types** (`src/plugin-sdk/registry.ts`). `IPluginRegistry`
48
+ now mirrors the unified `registry.json`: required `schemaVersion`,
49
+ `requiresManager`, `baseUrl`, and the five release-ref arrays `core` /
50
+ `frontend` / `scheduler` / `worker` / `plugins`. New `IRegistryReleaseRef`
51
+ (`{id, version, channel, releaseUrl, blocked?}`) and `IPluginRelease` (the
52
+ standalone signed plugin release document: `compatibility.{core,pluginApi}`,
53
+ `artifacts.{manifestUrl,archiveUrl,sha256}`, Ed25519 `security`). The legacy
54
+ single-version inline `IPluginRegistryEntry` / `IPluginRegistryVersionEntry`
55
+ were removed (no consumer; replaced by the multi-version release-ref model).
56
+ Mirrors the backend `plugin-registry.schema.json` +
57
+ `config/schemas/registry/plugin-release.schema.json`.
58
+
12
59
  ## [1.3.2]
13
60
 
14
61
  ### Changed