@checkstack/auth-common 0.6.4 → 0.6.6

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