@selfhelp/shared 1.3.2 → 1.5.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,71 @@ 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.5.0]
13
+
14
+ ### Added
15
+
16
+ - `ISystemVersion.deployment` (`TSystemDeployment = 'docker' | 'source'`): the
17
+ backend now reports how it is deployed so the admin maintenance UI can
18
+ distinguish a managed Docker-image install from a source/dev checkout.
19
+ Additive but **required** in the response — consumers' fixtures/mocks must
20
+ add the field (the backend schema `responses/admin/system_version.json`
21
+ requires it).
22
+ - Update-picker contracts for `GET /admin/system/update/releases`:
23
+ `IUpdateRelease`, `IUpdateReleases`, `IUpdateReleasesResponse`, and the
24
+ `SYSTEM_ENDPOINTS.UPDATE_RELEASES` path constant. The endpoint lists
25
+ registry-published core versions (newest first) and fails soft to
26
+ `available: false` when the registry is unreachable.
27
+ - `check-schema-parity.mjs` now also guards
28
+ `responses/admin/update_releases.json` against `IUpdateReleases`.
29
+
30
+ ## [1.4.0]
31
+
32
+ ### Added
33
+
34
+ - `TUpdateOperationStatus` gains the `idle` member: the honest state the backend
35
+ returns for an instance that has never run an update (instead of a misleading
36
+ `succeeded`/100%). Additive contract change — exhaustive consumers (e.g. a
37
+ `Record<TUpdateOperationStatus, …>`) must add an `idle` branch. Ship as the
38
+ next minor (`1.5.0`); the frontend mirror in
39
+ `sh-selfhelp_frontend/src/types/responses/admin/system.types.ts` already
40
+ tracks it.
41
+
42
+ - Instance-scoped **system maintenance / update** contracts under
43
+ `src/types/api/system.ts` for the SelfHelp Manager (`sh-manager`) ↔ CMS ↔
44
+ admin-UI flow (SelfHelp Manager / Docker Distribution MVP): `ISystemVersion`
45
+ / `ISystemVersionResponse`, `IUpdatePreflight` / `IUpdatePreflightResponse`,
46
+ `IUpdateRequest`, `IUpdateStatus` / `IUpdateStatusResponse`,
47
+ `IUpdateRequestResponse`, plus the `SYSTEM_ENDPOINTS` path constants and the
48
+ supporting unions (`TUpdatePreflightStatus`, `TUpdateOperationStatus`, …).
49
+ - Hard cross-repo invariant encoded in the types and a regression test:
50
+ `IUpdateRequest` has **no** `instance_id` — the browser never targets another
51
+ instance; the backend derives and verifies the instance identity server-side.
52
+ - `check-schema-parity.mjs` now also guards the three new admin response schemas
53
+ (`responses/admin/system_version.json`, `update_preflight.json`,
54
+ `update_status.json`) and the `requests/admin/update_request.json` request
55
+ schema against the shared TS mirrors.
56
+ - `ICompatibilityError` in `src/types/api/system.ts` — the standardized
57
+ compatibility-error shape (`component`, `component_id`, `current_version`,
58
+ `target_version`, `required_range`, `blocking`, `message`) shared verbatim by
59
+ the backend `CompatibilityError`, the SelfHelp Manager resolver, and the
60
+ frontend Available/preflight UI, with a parity test
61
+ (`compatibility-error-parity.test.ts`).
62
+
63
+ ### Changed
64
+
65
+ - **Unified registry types** (`src/plugin-sdk/registry.ts`). `IPluginRegistry`
66
+ now mirrors the unified `registry.json`: required `schemaVersion`,
67
+ `requiresManager`, `baseUrl`, and the five release-ref arrays `core` /
68
+ `frontend` / `scheduler` / `worker` / `plugins`. New `IRegistryReleaseRef`
69
+ (`{id, version, channel, releaseUrl, blocked?}`) and `IPluginRelease` (the
70
+ standalone signed plugin release document: `compatibility.{core,pluginApi}`,
71
+ `artifacts.{manifestUrl,archiveUrl,sha256}`, Ed25519 `security`). The legacy
72
+ single-version inline `IPluginRegistryEntry` / `IPluginRegistryVersionEntry`
73
+ were removed (no consumer; replaced by the multi-version release-ref model).
74
+ Mirrors the backend `plugin-registry.schema.json` +
75
+ `config/schemas/registry/plugin-release.schema.json`.
76
+
12
77
  ## [1.3.2]
13
78
 
14
79
  ### Changed