@camstack/system 1.2.29 → 1.2.31

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 (53) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +135 -92
  8. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +135 -92
  9. package/dist/builtins/backup-orchestrator/destination-policy.d.ts +12 -14
  10. package/dist/builtins/backup-orchestrator/schedule-store.d.ts +6 -6
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  15. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  16. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  17. package/dist/builtins/hub-forwarder/index.js +1 -1
  18. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  19. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  20. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  21. package/dist/builtins/local-network/local-network.addon.js +1 -1
  22. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  23. package/dist/builtins/loki-logging/index.js +1 -1
  24. package/dist/builtins/loki-logging/index.mjs +1 -1
  25. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  26. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  27. package/dist/builtins/platform-probe/index.js +1 -1
  28. package/dist/builtins/platform-probe/index.mjs +1 -1
  29. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  30. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  31. package/dist/builtins/snapshot/index.js +1 -1
  32. package/dist/builtins/snapshot/index.mjs +1 -1
  33. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  34. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  35. package/dist/builtins/sqlite-storage/filter-compiler.d.ts +61 -0
  36. package/dist/builtins/sqlite-storage/integration-registry.d.ts +3 -3
  37. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +49 -8
  38. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +117 -85
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +117 -85
  40. package/dist/builtins/storage-orchestrator/location-store.d.ts +17 -24
  41. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +0 -6
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +132 -121
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +132 -121
  44. package/dist/builtins/system-config/system-config.addon.js +1 -1
  45. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  46. package/dist/builtins/winston-logging/index.js +1 -1
  47. package/dist/builtins/winston-logging/index.mjs +1 -1
  48. package/dist/{dist-CPmFYLqq.js → dist-CDv5YTHQ.js} +93 -1
  49. package/dist/{dist-B7hOpr5i.mjs → dist-CNmXITJ-.mjs} +93 -1
  50. package/dist/index.js +406 -224
  51. package/dist/index.mjs +406 -224
  52. package/dist/kernel/addon-installer.d.ts +38 -0
  53. package/package.json +1 -1
@@ -22,6 +22,25 @@ import { AddonManifest } from './addon-manifest.js';
22
22
  * `addonsDir/<pkg>` → `packages/<pkg>`.
23
23
  */
24
24
  export type InstallSource = 'npm' | 'local' | 'symlink';
25
+ /** The one bootstrap package the server closure carries itself. */
26
+ export declare const CLOSURE_PROVIDED_PACKAGE = "@camstack/system";
27
+ /**
28
+ * Should the bootstrap SKIP seeding `packageName` into /data/addons?
29
+ *
30
+ * True only for the package the closure provides, and only when it actually
31
+ * resolves. Both halves are load-bearing:
32
+ *
33
+ * - seeding a copy the closure already provides creates one that WINS over
34
+ * the closure and is never refreshed (bootstrap is seed-only, and
35
+ * `camstack deploy` of a framework package is rejected on an image hub), so
36
+ * the node runs first-boot builtins forever while reporting the new
37
+ * version;
38
+ * - skipping it when it does NOT resolve is how a fresh deployment was once
39
+ * made unbootable ("No addon provides required infrastructure capability
40
+ * storage-provider"). That is why the guard is resolvability rather than a
41
+ * blanket removal from the bootstrap list.
42
+ */
43
+ export declare function shouldSkipClosureProvidedSeed(packageName: string, isResolvable: boolean): boolean;
25
44
  export interface AddonInstallerConfig {
26
45
  /** Directory where addons are stored (e.g., {dataDir}/addons) */
27
46
  readonly addonsDir: string;
@@ -31,6 +50,13 @@ export interface AddonInstallerConfig {
31
50
  readonly workspacePackagesDir?: string;
32
51
  /** Install source mode. Default: auto-detect */
33
52
  readonly installSource?: InstallSource;
53
+ /**
54
+ * Override for "does the running closure already provide this package?".
55
+ * Production leaves it unset (real `require.resolve`); a spec sets it to
56
+ * reach the branch that still seeds `@camstack/system`, which is otherwise
57
+ * unreachable in a process where that package always resolves.
58
+ */
59
+ readonly isPackageResolvable?: (packageName: string) => boolean;
34
60
  }
35
61
  export type { InstalledPackage };
36
62
  /** Outcome of {@link AddonInstaller.sweepBackups}. Absolute paths. */
@@ -46,6 +72,7 @@ export declare class AddonInstaller {
46
72
  readonly workspaceDir: string | undefined;
47
73
  readonly installSource: InstallSource;
48
74
  private readonly logger;
75
+ private readonly isPackageResolvable?;
49
76
  /**
50
77
  * Central manifest of installed addons. Tracks version + source +
51
78
  * timestamps + last-backup pointer per package, written atomically
@@ -71,6 +98,17 @@ export declare class AddonInstaller {
71
98
  * hardcoded lists — see design spec
72
99
  * docs/superpowers/specs/2026-05-20-docker-install-from-npm-design.md.
73
100
  */
101
+ /**
102
+ * Is `packageName` reachable through normal resolution — i.e. does the
103
+ * running closure already provide it?
104
+ *
105
+ * Overridable via `AddonInstallerConfig.isPackageResolvable` so a spec can
106
+ * exercise BOTH sides. That matters more than it looks: the branch that
107
+ * still seeds is the one protecting a fresh deployment from an unbootable
108
+ * node, and it is unreachable in a test process where `@camstack/system`
109
+ * always resolves.
110
+ */
111
+ private isResolvableFromClosure;
74
112
  private static deriveBootstrapList;
75
113
  /**
76
114
  * Bootstrap packages installed on first boot — derived from the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.29",
3
+ "version": "1.2.31",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",