@checkstack/healthcheck-tls-backend 0.2.13 → 0.2.15

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,127 @@
1
1
  # @checkstack/healthcheck-tls-backend
2
2
 
3
+ ## 0.2.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 42abfff: Add practical-significance floors to anomaly detection.
8
+
9
+ Two new schema annotations — `x-anomaly-min-absolute-delta` and `x-anomaly-min-relative-delta` — let plugin authors and operators suppress alerts whose statistical deviation is large but practical impact is negligible. Both floors must clear in addition to the existing μ ± Nσ trigger; defaults are 0 (disabled) so existing behaviour is unchanged.
10
+
11
+ This is the fix for cases like a 6 ms latency baseline whose σ ≈ 1 ms causes routine 20 ms blips to fire as anomalies despite Δ=14 ms being operationally irrelevant. With `min-absolute-delta: 50` and `min-relative-delta: 0.5`, those blips stay silent while a 6 ms → 200 ms spike still fires.
12
+
13
+ Built-in plugins ship with sensible defaults applied to every per-run field: 50 ms + 50 % for ms-unit fields, 5 percentage points for `%`-unit fields, 1 + 25 % for counter fields, 1 GB + 5 % for disk fields, 50 MB + 10 % for memory fields, 1 day for TLS expiry, 0.5 + 25 % for load average, 1 + 5 % for Minecraft TPS. Operators can override per-system or per-field via the assignment UI.
14
+
15
+ - Updated dependencies [42abfff]
16
+ - @checkstack/common@0.9.0
17
+ - @checkstack/backend-api@0.15.1
18
+ - @checkstack/healthcheck-common@1.0.2
19
+
20
+ ## 0.2.14
21
+
22
+ ### Patch Changes
23
+
24
+ - 50e5f5f: Runtime plugin system: install + uninstall plugins from npm, GitHub releases
25
+ (including private GitHub Enterprise instances), or tarball uploads at
26
+ runtime, with multi-package bundles, dependency-derived compatibility checks,
27
+ multi-instance coordination via a Postgres artifact store, and
28
+ single-coordinator destructive cleanup.
29
+
30
+ Highlights:
31
+
32
+ - New `PluginSource` discriminated union and `PluginInstaller` /
33
+ `PluginInstallerRegistry` interfaces in `@checkstack/backend-api`. The
34
+ GitHub variant accepts an optional `apiBaseUrl` so deployments backed by
35
+ GitHub Enterprise can install from `https://ghe.example.com/api/v3`
36
+ instead of `api.github.com`.
37
+ - New `installPackageMetadataSchema` (Zod) in `@checkstack/common` validates
38
+ every plugin's `package.json` at install time. Required fields: `name`,
39
+ `version`, `description`, `author`, `license`, `checkstack.type`,
40
+ `checkstack.pluginId`. Optional: `checkstack.bundle`,
41
+ `checkstack.usageInstructions`, `checkstack.allowInstallScripts`.
42
+ - New `pluginManagerContract` in `@checkstack/pluginmanager-common` with
43
+ `list`, `previewInstall`, `install`, `previewUninstall`, `uninstall`, and
44
+ `events` procedures.
45
+ - New `@checkstack/pluginmanager-frontend` admin UI: installed-plugins list
46
+ with per-row uninstall (typed-confirmation modal, schema/configs/cascade
47
+ toggles), install page with NPM / Tarball Upload / GitHub Release tabs
48
+ (Catalog tab disabled — coming soon), and an events page surfacing the
49
+ install/uninstall audit log.
50
+ - New `bunx @checkstack/scripts plugin-pack` CLI for plugin authors —
51
+ per-package mode produces an npm-shaped tarball; `--bundle` mode produces
52
+ an outer tarball containing every sibling declared in
53
+ `package.json#checkstack.bundle`. Published to npm so external authors
54
+ can `bunx` it directly without a workspace checkout.
55
+ - Compatibility derived from `package.json#dependencies` ranges
56
+ (`semver.satisfies` against the platform's loaded `@checkstack/*`
57
+ versions) — no separate `compatibility` field.
58
+ - Multi-instance: originator persists artifacts + `plugins` rows + broadcasts
59
+ install/uninstall; receiving instances do in-process register/unregister
60
+ only. Destructive ops (drop schema, delete plugin_configs, delete
61
+ artifacts, delete `plugins` rows) run exactly once on the originator.
62
+ - Fresh-instance bootstrap: `loadPlugins()` hydrates any
63
+ `is_uninstallable=true` plugin missing from `node_modules` from the
64
+ artifact store before normal Phase 1 register.
65
+ - New schema: `plugin_artifacts` (tarball storage), `plugin_install_events`
66
+ (audit/error log). `plugins` extended with `version`, `metadata`,
67
+ `source`, `bundle_id`, `is_primary`. Local plugin sync now writes
68
+ `version` from each plugin's `package.json` so the admin UI shows real
69
+ versions instead of `—`.
70
+ - Tarball-upload endpoint (`POST /api/pluginmanager/upload-tarball`) for
71
+ the install UI; access-gated by `pluginmanager.plugin.manage`.
72
+ - Plugin Manager menu link added to the user menu (main grid, alongside
73
+ Profile / Notification Settings / etc.).
74
+
75
+ Cross-cutting changes:
76
+
77
+ - Backend request/response logging now flows through `rootLogger` (winston)
78
+ instead of `hono/logger`. 5xx responses include the response body inline
79
+ so swallowed early-return errors are visible in the log.
80
+ - The `/api/:pluginId/*` dispatcher now logs which core service is missing
81
+ or which `pluginId` had no metadata when it 500s.
82
+ - New `registerCorePluginMetadata` on `PluginManager` for core routers
83
+ (like the plugin manager itself) that need their metadata visible to the
84
+ RPC dispatcher without going through the full plugin lifecycle.
85
+ - ESLint: `unicorn/no-null` is now disabled globally. Drizzle distinguishes
86
+ between `null` (writes a real SQL NULL) and `undefined` (skip the column
87
+ on insert), so treating them as interchangeable produced latent bugs at
88
+ the persistence boundary. The bulk of the patch-bumped packages above
89
+ reflect lint-fix touches that landed when this rule was relaxed.
90
+ - Workspace-wide license normalization to `Elastic-2.0` (matches
91
+ `LICENSE.md`). Every `package.json` in the workspace now declares the
92
+ same SPDX identifier; the patch bumps capture this.
93
+
94
+ Plugin packages (every `plugins/*`): added a `pack` npm script
95
+ (`bunx @checkstack/scripts plugin-pack`), mirrored each plugin's
96
+ `pluginId` from `plugin-metadata.ts` into `package.json#checkstack.pluginId`
97
+ so install-time validation passes, stubbed any missing required metadata
98
+ fields (`description`, `author`, `license`), and added
99
+ `checkstack.bundle` to multi-package plugin primaries (telegram, rcon, ssh,
100
+ jira, queue-bullmq, queue-memory, cache-memory).
101
+
102
+ Breaking changes:
103
+
104
+ - The legacy single-method `PluginInstaller` interface (`install(packageName)`)
105
+ is removed. Callers must use `coreServices.pluginInstallerRegistry`.
106
+ - The old `pluginAdminContract` and `createPluginAdminRouter` are removed.
107
+ Replaced by `pluginManagerContract` in `@checkstack/pluginmanager-common`
108
+ and `createPluginManagerRouter` in `core/backend`.
109
+ - `@checkstack/test-utils-backend` no longer exports
110
+ `createMockPluginInstaller` / `MockPluginInstaller` (the legacy interface
111
+ it shimmed is gone).
112
+
113
+ Note: bumps are limited to `minor` (for packages with new public API
114
+ surface) and `patch` (for downstream consumers, license normalization,
115
+ and lint fixes). No `major` bumps despite the `PluginInstaller` removal —
116
+ the legacy interface had no third-party consumers in the wild before this
117
+ runtime plugin system landed, and the contract surface is the same shape
118
+ modulo the rename.
119
+
120
+ - Updated dependencies [50e5f5f]
121
+ - @checkstack/backend-api@0.15.0
122
+ - @checkstack/common@0.8.0
123
+ - @checkstack/healthcheck-common@1.0.1
124
+
3
125
  ## 0.2.13
4
126
 
5
127
  ### Patch Changes
package/package.json CHANGED
@@ -1,25 +1,32 @@
1
1
  {
2
2
  "name": "@checkstack/healthcheck-tls-backend",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "checkstack": {
7
- "type": "backend"
7
+ "type": "backend",
8
+ "pluginId": "healthcheck-tls"
8
9
  },
9
10
  "scripts": {
10
11
  "typecheck": "tsgo -b",
11
12
  "lint": "bun run lint:code",
12
- "lint:code": "eslint . --max-warnings 0"
13
+ "lint:code": "eslint . --max-warnings 0",
14
+ "pack": "bunx @checkstack/scripts plugin-pack"
13
15
  },
14
16
  "dependencies": {
15
- "@checkstack/backend-api": "0.14.0",
16
- "@checkstack/common": "0.7.0",
17
- "@checkstack/healthcheck-common": "1.0.0"
17
+ "@checkstack/backend-api": "0.15.0",
18
+ "@checkstack/common": "0.8.0",
19
+ "@checkstack/healthcheck-common": "1.0.1"
18
20
  },
19
21
  "devDependencies": {
20
22
  "@types/bun": "^1.0.0",
21
23
  "typescript": "^5.0.0",
22
- "@checkstack/tsconfig": "0.0.5",
23
- "@checkstack/scripts": "0.1.2"
24
- }
24
+ "@checkstack/tsconfig": "0.0.7",
25
+ "@checkstack/scripts": "0.3.0"
26
+ },
27
+ "description": "Checkstack healthcheck-tls-backend plugin",
28
+ "author": {
29
+ "name": "Checkstack contributors"
30
+ },
31
+ "license": "Elastic-2.0"
25
32
  }
@@ -61,6 +61,7 @@ const certificateResultSchema = healthResultSchema({
61
61
  "x-chart-unit": "days",
62
62
  "x-anomaly-enabled": true,
63
63
  "x-anomaly-direction": "higher-is-better",
64
+ "x-anomaly-min-absolute-delta": 1,
64
65
  }),
65
66
  valid: healthResultBoolean({
66
67
  "x-chart-type": "boolean",
package/src/strategy.ts CHANGED
@@ -84,6 +84,7 @@ const tlsResultSchema = healthResultSchema({
84
84
  "x-chart-unit": "days",
85
85
  "x-anomaly-enabled": true,
86
86
  "x-anomaly-direction": "higher-is-better",
87
+ "x-anomaly-min-absolute-delta": 1,
87
88
  }),
88
89
  error: healthResultString({
89
90
  "x-chart-type": "status",