@checkstack/dependency-common 1.0.0 → 1.0.2

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/package.json +10 -9
  3. package/tsconfig.json +17 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,126 @@
1
1
  # @checkstack/dependency-common
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [42abfff]
8
+ - Updated dependencies [1ef2e79]
9
+ - Updated dependencies [aa89bc5]
10
+ - Updated dependencies [950d6ec]
11
+ - @checkstack/common@0.9.0
12
+ - @checkstack/catalog-common@2.1.0
13
+ - @checkstack/frontend-api@0.5.0
14
+ - @checkstack/notification-common@1.0.2
15
+ - @checkstack/signal-common@0.2.2
16
+
17
+ ## 1.0.1
18
+
19
+ ### Patch Changes
20
+
21
+ - 50e5f5f: Runtime plugin system: install + uninstall plugins from npm, GitHub releases
22
+ (including private GitHub Enterprise instances), or tarball uploads at
23
+ runtime, with multi-package bundles, dependency-derived compatibility checks,
24
+ multi-instance coordination via a Postgres artifact store, and
25
+ single-coordinator destructive cleanup.
26
+
27
+ Highlights:
28
+
29
+ - New `PluginSource` discriminated union and `PluginInstaller` /
30
+ `PluginInstallerRegistry` interfaces in `@checkstack/backend-api`. The
31
+ GitHub variant accepts an optional `apiBaseUrl` so deployments backed by
32
+ GitHub Enterprise can install from `https://ghe.example.com/api/v3`
33
+ instead of `api.github.com`.
34
+ - New `installPackageMetadataSchema` (Zod) in `@checkstack/common` validates
35
+ every plugin's `package.json` at install time. Required fields: `name`,
36
+ `version`, `description`, `author`, `license`, `checkstack.type`,
37
+ `checkstack.pluginId`. Optional: `checkstack.bundle`,
38
+ `checkstack.usageInstructions`, `checkstack.allowInstallScripts`.
39
+ - New `pluginManagerContract` in `@checkstack/pluginmanager-common` with
40
+ `list`, `previewInstall`, `install`, `previewUninstall`, `uninstall`, and
41
+ `events` procedures.
42
+ - New `@checkstack/pluginmanager-frontend` admin UI: installed-plugins list
43
+ with per-row uninstall (typed-confirmation modal, schema/configs/cascade
44
+ toggles), install page with NPM / Tarball Upload / GitHub Release tabs
45
+ (Catalog tab disabled — coming soon), and an events page surfacing the
46
+ install/uninstall audit log.
47
+ - New `bunx @checkstack/scripts plugin-pack` CLI for plugin authors —
48
+ per-package mode produces an npm-shaped tarball; `--bundle` mode produces
49
+ an outer tarball containing every sibling declared in
50
+ `package.json#checkstack.bundle`. Published to npm so external authors
51
+ can `bunx` it directly without a workspace checkout.
52
+ - Compatibility derived from `package.json#dependencies` ranges
53
+ (`semver.satisfies` against the platform's loaded `@checkstack/*`
54
+ versions) — no separate `compatibility` field.
55
+ - Multi-instance: originator persists artifacts + `plugins` rows + broadcasts
56
+ install/uninstall; receiving instances do in-process register/unregister
57
+ only. Destructive ops (drop schema, delete plugin_configs, delete
58
+ artifacts, delete `plugins` rows) run exactly once on the originator.
59
+ - Fresh-instance bootstrap: `loadPlugins()` hydrates any
60
+ `is_uninstallable=true` plugin missing from `node_modules` from the
61
+ artifact store before normal Phase 1 register.
62
+ - New schema: `plugin_artifacts` (tarball storage), `plugin_install_events`
63
+ (audit/error log). `plugins` extended with `version`, `metadata`,
64
+ `source`, `bundle_id`, `is_primary`. Local plugin sync now writes
65
+ `version` from each plugin's `package.json` so the admin UI shows real
66
+ versions instead of `—`.
67
+ - Tarball-upload endpoint (`POST /api/pluginmanager/upload-tarball`) for
68
+ the install UI; access-gated by `pluginmanager.plugin.manage`.
69
+ - Plugin Manager menu link added to the user menu (main grid, alongside
70
+ Profile / Notification Settings / etc.).
71
+
72
+ Cross-cutting changes:
73
+
74
+ - Backend request/response logging now flows through `rootLogger` (winston)
75
+ instead of `hono/logger`. 5xx responses include the response body inline
76
+ so swallowed early-return errors are visible in the log.
77
+ - The `/api/:pluginId/*` dispatcher now logs which core service is missing
78
+ or which `pluginId` had no metadata when it 500s.
79
+ - New `registerCorePluginMetadata` on `PluginManager` for core routers
80
+ (like the plugin manager itself) that need their metadata visible to the
81
+ RPC dispatcher without going through the full plugin lifecycle.
82
+ - ESLint: `unicorn/no-null` is now disabled globally. Drizzle distinguishes
83
+ between `null` (writes a real SQL NULL) and `undefined` (skip the column
84
+ on insert), so treating them as interchangeable produced latent bugs at
85
+ the persistence boundary. The bulk of the patch-bumped packages above
86
+ reflect lint-fix touches that landed when this rule was relaxed.
87
+ - Workspace-wide license normalization to `Elastic-2.0` (matches
88
+ `LICENSE.md`). Every `package.json` in the workspace now declares the
89
+ same SPDX identifier; the patch bumps capture this.
90
+
91
+ Plugin packages (every `plugins/*`): added a `pack` npm script
92
+ (`bunx @checkstack/scripts plugin-pack`), mirrored each plugin's
93
+ `pluginId` from `plugin-metadata.ts` into `package.json#checkstack.pluginId`
94
+ so install-time validation passes, stubbed any missing required metadata
95
+ fields (`description`, `author`, `license`), and added
96
+ `checkstack.bundle` to multi-package plugin primaries (telegram, rcon, ssh,
97
+ jira, queue-bullmq, queue-memory, cache-memory).
98
+
99
+ Breaking changes:
100
+
101
+ - The legacy single-method `PluginInstaller` interface (`install(packageName)`)
102
+ is removed. Callers must use `coreServices.pluginInstallerRegistry`.
103
+ - The old `pluginAdminContract` and `createPluginAdminRouter` are removed.
104
+ Replaced by `pluginManagerContract` in `@checkstack/pluginmanager-common`
105
+ and `createPluginManagerRouter` in `core/backend`.
106
+ - `@checkstack/test-utils-backend` no longer exports
107
+ `createMockPluginInstaller` / `MockPluginInstaller` (the legacy interface
108
+ it shimmed is gone).
109
+
110
+ Note: bumps are limited to `minor` (for packages with new public API
111
+ surface) and `patch` (for downstream consumers, license normalization,
112
+ and lint fixes). No `major` bumps despite the `PluginInstaller` removal —
113
+ the legacy interface had no third-party consumers in the wild before this
114
+ runtime plugin system landed, and the contract surface is the same shape
115
+ modulo the rename.
116
+
117
+ - Updated dependencies [50e5f5f]
118
+ - @checkstack/catalog-common@2.0.1
119
+ - @checkstack/common@0.8.0
120
+ - @checkstack/frontend-api@0.4.2
121
+ - @checkstack/notification-common@1.0.1
122
+ - @checkstack/signal-common@0.2.1
123
+
3
124
  ## 1.0.0
4
125
 
5
126
  ### Major Changes
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@checkstack/dependency-common",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
+ "license": "Elastic-2.0",
4
5
  "type": "module",
5
6
  "exports": {
6
7
  ".": {
@@ -8,21 +9,21 @@
8
9
  }
9
10
  },
10
11
  "dependencies": {
11
- "@checkstack/common": "0.7.0",
12
- "@checkstack/catalog-common": "1.5.3",
13
- "@checkstack/frontend-api": "0.4.0",
14
- "@checkstack/notification-common": "0.3.0",
15
- "@checkstack/signal-common": "0.2.0",
12
+ "@checkstack/common": "0.8.0",
13
+ "@checkstack/catalog-common": "2.0.1",
14
+ "@checkstack/frontend-api": "0.4.2",
15
+ "@checkstack/notification-common": "1.0.1",
16
+ "@checkstack/signal-common": "0.2.1",
16
17
  "@orpc/contract": "^1.13.14",
17
18
  "zod": "^4.2.1"
18
19
  },
19
20
  "devDependencies": {
20
21
  "typescript": "^5.7.2",
21
- "@checkstack/tsconfig": "0.0.5",
22
- "@checkstack/scripts": "0.1.2"
22
+ "@checkstack/tsconfig": "0.0.7",
23
+ "@checkstack/scripts": "0.3.0"
23
24
  },
24
25
  "scripts": {
25
- "typecheck": "tsc --noEmit",
26
+ "typecheck": "tsgo -b",
26
27
  "lint": "bun run lint:code",
27
28
  "lint:code": "eslint . --max-warnings 0"
28
29
  },
package/tsconfig.json CHANGED
@@ -2,5 +2,22 @@
2
2
  "extends": "@checkstack/tsconfig/common.json",
3
3
  "include": [
4
4
  "src"
5
+ ],
6
+ "references": [
7
+ {
8
+ "path": "../catalog-common"
9
+ },
10
+ {
11
+ "path": "../common"
12
+ },
13
+ {
14
+ "path": "../frontend-api"
15
+ },
16
+ {
17
+ "path": "../notification-common"
18
+ },
19
+ {
20
+ "path": "../signal-common"
21
+ }
5
22
  ]
6
23
  }