@camstack/system 1.2.157 → 1.2.160

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 (77) hide show
  1. package/dist/addon-runner.js +17 -16
  2. package/dist/addon-runner.mjs +2 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +10 -7
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +50 -12
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +50 -12
  12. package/dist/builtins/backup-orchestrator/write-targets.d.ts +63 -0
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-bindings-store.d.ts +56 -10
  18. package/dist/builtins/device-manager/device-manager.addon.d.ts +11 -0
  19. package/dist/builtins/device-manager/device-manager.addon.js +216 -81
  20. package/dist/builtins/device-manager/device-manager.addon.mjs +216 -81
  21. package/dist/builtins/device-manager/device-meta-actions.d.ts +9 -3
  22. package/dist/builtins/device-manager/device-meta-store.d.ts +32 -5
  23. package/dist/builtins/device-manager/device-queries.d.ts +7 -3
  24. package/dist/builtins/device-manager/write-lock.d.ts +17 -0
  25. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  26. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  27. package/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  30. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  31. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  32. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  33. package/dist/builtins/local-network/local-network.addon.js +1 -1
  34. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  35. package/dist/builtins/loki-logging/index.js +1 -1
  36. package/dist/builtins/loki-logging/index.mjs +1 -1
  37. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  38. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  39. package/dist/builtins/platform-probe/index.js +1 -1
  40. package/dist/builtins/platform-probe/index.mjs +1 -1
  41. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  42. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  43. package/dist/builtins/snapshot/index.js +1 -1
  44. package/dist/builtins/snapshot/index.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  46. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  47. package/dist/builtins/sqlite-storage/filter-compiler.d.ts +41 -2
  48. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +15 -7
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  50. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  51. package/dist/builtins/sqlite-storage/vector-index-shared.d.ts +30 -5
  52. package/dist/builtins/sqlite-storage/vector-index-vec.d.ts +28 -6
  53. package/dist/builtins/storage-orchestrator/access-guards.d.ts +32 -0
  54. package/dist/builtins/storage-orchestrator/location-secrets.d.ts +33 -0
  55. package/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +74 -3
  56. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +26 -0
  57. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +552 -15
  58. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +552 -15
  59. package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +56 -1
  60. package/dist/builtins/system-config/system-config.addon.js +1 -1
  61. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  62. package/dist/builtins/winston-logging/index.js +1 -1
  63. package/dist/builtins/winston-logging/index.mjs +1 -1
  64. package/dist/{dist-CDgIzo82.js → dist-CcvXUhHK.js} +537 -17
  65. package/dist/{dist-LvKus-mT.mjs → dist-DKs---Vx.mjs} +520 -18
  66. package/dist/index.js +141 -139
  67. package/dist/index.mjs +3 -3
  68. package/dist/kernel/deps/manifest-system-deps.d.ts +15 -0
  69. package/dist/kernel/index.d.ts +4 -2
  70. package/dist/kernel/moleculer/cap-usage-registry.d.ts +132 -7
  71. package/dist/kernel/storage-location-registry.d.ts +16 -1
  72. package/dist/kernel/transport/local-child-registry.d.ts +57 -0
  73. package/dist/{manifest-python-deps-CD14Pv0-.mjs → manifest-system-deps-DnoPpLGp.mjs} +466 -83
  74. package/dist/{manifest-python-deps-DVODn-qc.js → manifest-system-deps-oJMkWSX-.js} +477 -82
  75. package/dist/{retired-settings-keys-CV4QVdXj.mjs → retired-settings-keys-C3eONTvV.mjs} +1 -1
  76. package/dist/{retired-settings-keys-BfAzWvPC.js → retired-settings-keys-DXZ2xe7C.js} +1 -1
  77. package/package.json +2 -1
@@ -1,4 +1,4 @@
1
- import { IScopedLogger, IStorageProviderImpl, StorageLocation, StorageLocationDeclaration, StorageLocationRef } from '@camstack/types';
1
+ import { IScopedLogger, IStorageProviderImpl, StorageAccess, StorageLocation, StorageLocationDeclaration, StorageLocationRef } from '@camstack/types';
2
2
  import { ILocationStore } from './location-store.js';
3
3
  export interface ListLocationsFilter {
4
4
  readonly type?: string;
@@ -14,6 +14,12 @@ export interface ListLocationsFilter {
14
14
  */
15
15
  export interface DeclarationSource {
16
16
  cardinalityOf(id: string): 'single' | 'multi' | null;
17
+ /**
18
+ * Effective {@link StorageAccess} of a declared location kind — the
19
+ * constraint that decides which providers may back it. `null` = the kind
20
+ * was never declared. See `upsertLocation`'s remote-provider refusal.
21
+ */
22
+ accessOf(id: string): StorageAccess | null;
17
23
  list(): readonly StorageLocationDeclaration[];
18
24
  }
19
25
  /**
@@ -177,6 +183,25 @@ export declare class StorageOrchestratorService {
177
183
  * `__tests__/storage-orchestrator-persistence.spec.ts`.
178
184
  */
179
185
  attachStore(store: ILocationStore): Promise<void>;
186
+ /**
187
+ * Shout about a persisted row that is BOTH the type default and disabled.
188
+ *
189
+ * `upsertLocation` cannot produce this (`resolveEnabled` force-enables a
190
+ * default) and neither can `setDefaultLocations` — but hydrate writes rows
191
+ * straight into the map without either, so a hand-edited store, a partial
192
+ * migration or a row written by another build can. It matters because every
193
+ * bare-type ref resolves through {@link getDefaultLocation}: on such a row
194
+ * `storage.write({ location: 'eventMedia' })` and the migration coordinator's
195
+ * drain destination both point at a disk the operator turned off. That is the
196
+ * one thing this model must never do silently.
197
+ *
198
+ * Reported, never repaired: flipping an operator's flag back on at boot would
199
+ * be the system overruling the switch instead of obeying it. The coordinator
200
+ * refuses the drain (`storage-migration-coordinator.drain`); the bare-ref read
201
+ * path is deliberately left working, because narrowing a READ is a worse bug
202
+ * than the one this line reports.
203
+ */
204
+ private reportDisabledDefaults;
180
205
  /**
181
206
  * Inject the declaration-driven cardinality source. Called once by the
182
207
  * addon after the kernel aggregates every addon's `storageLocations`
@@ -252,6 +277,36 @@ export declare class StorageOrchestratorService {
252
277
  * implicitly-demoted siblings are persisted before the in-memory map
253
278
  * mutation returns. Persistence errors propagate to the caller.
254
279
  */
280
+ /**
281
+ * Refuse a `(location kind, provider)` pair the kind cannot use.
282
+ *
283
+ * The rule, in one line: a `'local-path'` kind requires a provider whose
284
+ * `getProviderInfo().nodeLocal` is `true`.
285
+ *
286
+ * `nodeLocal` is the honest name for "this provider's `resolve` returns a
287
+ * path on the filesystem of the node that resolved it". The
288
+ * `storage-provider` cap's own discriminated union already forces every
289
+ * provider to declare it, and all four remote providers declare `false`, so
290
+ * no new cap surface is needed to ask the question.
291
+ *
292
+ * Three-valued on purpose. Only a POSITIVE `false` refuses:
293
+ * - `true` → node-local, always fine.
294
+ * - `false` → the provider is known and known to be remote. REFUSE.
295
+ * - `undefined` → the provider has not registered yet (early boot, an addon
296
+ * still loading). That is "unknown", not "remote", and a read that could
297
+ * not be made must never destroy work (D49) — the system seed runs
298
+ * through this path before any provider registers. Allowed, and logged,
299
+ * so the allowance is never silent.
300
+ *
301
+ * The DECLARATION side is read the same way. A kind the registry does not
302
+ * know is `local-path` (fail-closed: an unknown kind is not a permissive
303
+ * one), but NO REGISTRY AT ALL is a different statement — nothing has been
304
+ * loaded, so nothing can be concluded about any kind. The addon injects the
305
+ * registry inside `onInitialize`, before the `storage` cap is mounted, so
306
+ * there is no window in which an operator upsert sees this branch; a service
307
+ * constructed without one is the in-memory/early-boot path.
308
+ */
309
+ private refuseIncompatibleProvider;
255
310
  upsertLocation(input: Omit<StorageLocation, 'createdAt' | 'updatedAt'>): StorageLocation;
256
311
  /**
257
312
  * Remove a location. Refuses to remove the default of a type unless a
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CDgIzo82.js");
6
+ const require_dist = require("../../dist-CcvXUhHK.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { Kt as hydrateSchema, Ot as errMsg, kt as BaseAddon } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, Yt as hydrateSchema, jt as errMsg } from "../../dist-DKs---Vx.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CDgIzo82.js");
6
+ const require_dist = require("../../dist-CcvXUhHK.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { kt as BaseAddon, rt as logDestinationCapability } from "../../dist-LvKus-mT.mjs";
1
+ import { Mt as BaseAddon, ot as logDestinationCapability } from "../../dist-DKs---Vx.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";