@camstack/system 1.2.91 → 1.2.93

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 (58) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -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.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/blocks-integration.d.ts +34 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.js +69 -22
  15. package/dist/builtins/core-blocks/core-blocks.addon.mjs +69 -22
  16. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  20. package/dist/builtins/hub-forwarder/index.js +1 -1
  21. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  26. package/dist/builtins/local-network/local-network.addon.js +1 -1
  27. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  28. package/dist/builtins/loki-logging/index.js +1 -1
  29. package/dist/builtins/loki-logging/index.mjs +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  32. package/dist/builtins/platform-probe/index.js +1 -1
  33. package/dist/builtins/platform-probe/index.mjs +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  36. package/dist/builtins/snapshot/index.js +27 -6
  37. package/dist/builtins/snapshot/index.mjs +27 -6
  38. package/dist/builtins/snapshot/snapshot-courtesy.d.ts +12 -2
  39. package/dist/builtins/snapshot/snapshot.addon.d.ts +11 -0
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  41. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{dist-9Gfk4KOk.js → dist-BMus2E5R.js} +351 -7
  51. package/dist/{dist-DhrTd8LL.mjs → dist-F1XDQDE1.mjs} +346 -8
  52. package/dist/index.js +41 -6
  53. package/dist/index.mjs +41 -6
  54. package/dist/kernel/addon-health-monitor.d.ts +10 -1
  55. package/dist/logging/log-manager.d.ts +28 -0
  56. package/dist/{manifest-python-deps-C0zkl1Ae.js → manifest-python-deps-BZO_eMn-.js} +1 -7
  57. package/dist/{manifest-python-deps-fWzdEasI.mjs → manifest-python-deps-D3hP9W8D.mjs} +2 -8
  58. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_manifest_python_deps = require("./manifest-python-deps-C0zkl1Ae.js");
2
+ const require_manifest_python_deps = require("./manifest-python-deps-BZO_eMn-.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-fWzdEasI.mjs";
1
+ import { I as createUdsLoggerWithControl, L as LocalChildClient, at as setWorkerNativeCapsChangeListener, bt as installManifestNativeDeps, i as createUdsAddonContext, nt as getWorkerNativeCapProvider, rt as getWorkerNativeCapSnapshot, st as validateProviderRegistrations, t as installManifestPythonDeps, xt as resolveAddonClass } from "./manifest-python-deps-D3hP9W8D.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
3
3
  import { register } from "node:module";
4
4
  import * as path$1 from "node:path";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ut as EventCategory, _t as BaseAddon, gt as errMsg, v as addonPagesCapability } from "../../dist-DhrTd8LL.mjs";
1
+ import { Wt as EventCategory, _t as errMsg, v as addonPagesCapability, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ut as EventCategory, _t as BaseAddon, b as addonWidgetsCapability, gt as errMsg } from "../../dist-DhrTd8LL.mjs";
1
+ import { Wt as EventCategory, _t as errMsg, b as addonWidgetsCapability, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  //#region src/builtins/alerts/prune-policy.ts
8
8
  /**
9
9
  * Ids older than `cutoffMs`, oldest first.
@@ -1,4 +1,4 @@
1
- import { At as createEvent, Ut as EventCategory, _t as BaseAddon, gt as errMsg, n as AlertSchema, x as alertsCapability } from "../../dist-DhrTd8LL.mjs";
1
+ import { Wt as EventCategory, _t as errMsg, jt as createEvent, n as AlertSchema, vt as BaseAddon, x as alertsCapability } from "../../dist-F1XDQDE1.mjs";
2
2
  //#region src/builtins/alerts/prune-policy.ts
3
3
  /**
4
4
  * Ids older than `cutoffMs`, oldest first.
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let buffer = require("buffer");
9
9
  let node_fs_promises = require("node:fs/promises");
@@ -1,4 +1,4 @@
1
- import { C as backupCapability, Ut as EventCategory, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { C as backupCapability, Wt as EventCategory, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { randomBytes, randomUUID } from "node:crypto";
3
3
  import { Buffer as Buffer$1 } from "buffer";
4
4
  import * as fsp from "node:fs/promises";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { J as logDestinationCapability, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { Y as logDestinationCapability, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { DeclaredDevicePorts } from '@camstack/types';
1
+ import { DeclaredDevicePorts, IScopedLogger } from '@camstack/types';
2
2
  /** Operator-visible name of the shared integration. Seeded once, at create. */
3
3
  export declare const BLOCKS_INTEGRATION_NAME = "Blocks";
4
4
  /**
@@ -22,3 +22,36 @@ export type BlocksIntegrationPorts = Omit<DeclaredDevicePorts, 'addonId'>;
22
22
  * convenience; the spec test pins both.
23
23
  */
24
24
  export declare function reconcileBlocksIntegration(ports: BlocksIntegrationPorts): Promise<string | null>;
25
+ /** What {@link armBlocksIntegration} needs, and the seam its spec drives. */
26
+ export interface ArmBlocksIntegrationOptions {
27
+ readonly logger: IScopedLogger;
28
+ readonly reconcile: () => Promise<string | null>;
29
+ readonly onLanded: (integrationId: string | null) => void;
30
+ readonly retryDelayMs?: number;
31
+ readonly maxAttempts?: number;
32
+ }
33
+ /** A reconcile running in the background, and a handle to await in tests. */
34
+ export interface ArmedBlocksIntegration {
35
+ readonly settled: Promise<void>;
36
+ }
37
+ /**
38
+ * Arm the shared integration WITHOUT putting it on the boot path (D167).
39
+ *
40
+ * `integrations` is a hub-core namespace served by the `$core-caps` Moleculer
41
+ * service, and that service is registered only after `app.init()` returns —
42
+ * which is where the entire addon boot runs. During boot the read is therefore
43
+ * not slow, it is unanswerable: it burns the full 30 s discovery deadline and
44
+ * fast-fails, with no boot-window retry (core caps are excluded from it).
45
+ *
46
+ * Awaited inside `onInitialize()`, that 30 s sat on the hub's SERIAL in-process
47
+ * builtin loop and delayed `device-manager` — which every provider runner waits
48
+ * on before it may publish a single capability. Measured 2026-08-15: builtins
49
+ * stalled t0+10 s → t0+40 s, and the first camera's first keyframe landed at
50
+ * t0+75 s.
51
+ *
52
+ * So: arm it, let boot finish, and let the retry land it a few seconds later. A
53
+ * block that declares a device before it lands finds `null` and gets the
54
+ * integration on the next converge tick — which was already the documented
55
+ * behaviour when the API was unavailable.
56
+ */
57
+ export declare function armBlocksIntegration(options: ArmBlocksIntegrationOptions): ArmedBlocksIntegration;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-9Gfk4KOk.js");
3
+ const require_dist = require("../../dist-BMus2E5R.js");
4
4
  let node_crypto = require("node:crypto");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -732,6 +732,52 @@ async function reconcileBlocksIntegration(ports) {
732
732
  devices: []
733
733
  })).integrationId;
734
734
  }
735
+ /** Retry cadence for {@link armBlocksIntegration}. The gap it waits out is the
736
+ * rest of hub boot — `$core-caps` is registered once `app.init()` returns — so
737
+ * seconds, and a handful of them, is the right shape. */
738
+ var ARM_RETRY_DELAY_MS = 5e3;
739
+ /** Bounded, because an integration that will never reconcile must say so once
740
+ * rather than log forever. Roughly two minutes at the default cadence. */
741
+ var ARM_MAX_ATTEMPTS = 24;
742
+ /**
743
+ * Arm the shared integration WITHOUT putting it on the boot path (D167).
744
+ *
745
+ * `integrations` is a hub-core namespace served by the `$core-caps` Moleculer
746
+ * service, and that service is registered only after `app.init()` returns —
747
+ * which is where the entire addon boot runs. During boot the read is therefore
748
+ * not slow, it is unanswerable: it burns the full 30 s discovery deadline and
749
+ * fast-fails, with no boot-window retry (core caps are excluded from it).
750
+ *
751
+ * Awaited inside `onInitialize()`, that 30 s sat on the hub's SERIAL in-process
752
+ * builtin loop and delayed `device-manager` — which every provider runner waits
753
+ * on before it may publish a single capability. Measured 2026-08-15: builtins
754
+ * stalled t0+10 s → t0+40 s, and the first camera's first keyframe landed at
755
+ * t0+75 s.
756
+ *
757
+ * So: arm it, let boot finish, and let the retry land it a few seconds later. A
758
+ * block that declares a device before it lands finds `null` and gets the
759
+ * integration on the next converge tick — which was already the documented
760
+ * behaviour when the API was unavailable.
761
+ */
762
+ function armBlocksIntegration(options) {
763
+ const retryDelayMs = options.retryDelayMs ?? ARM_RETRY_DELAY_MS;
764
+ const maxAttempts = options.maxAttempts ?? ARM_MAX_ATTEMPTS;
765
+ return { settled: (async () => {
766
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
767
+ options.onLanded(await options.reconcile());
768
+ return;
769
+ } catch (err) {
770
+ if (attempt === maxAttempts) {
771
+ options.logger.warn("core-blocks: the shared integration never reconciled — a block that declares a device has nowhere to hang it", { meta: {
772
+ attempts: attempt,
773
+ error: require_dist.errMsg(err)
774
+ } });
775
+ return;
776
+ }
777
+ await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
778
+ }
779
+ })() };
780
+ }
735
781
  //#endregion
736
782
  //#region src/builtins/core-blocks/core-blocks.addon.ts
737
783
  /**
@@ -788,7 +834,13 @@ var CoreBlocksAddon = class extends require_dist.BaseAddon {
788
834
  });
789
835
  await this.store.load();
790
836
  this.transpiler = await loadTranspiler(this.ctx.logger);
791
- this.blocksIntegrationId = await this.declareBlocksIntegration();
837
+ armBlocksIntegration({
838
+ logger: this.ctx.logger,
839
+ reconcile: () => this.declareBlocksIntegration(),
840
+ onLanded: (integrationId) => {
841
+ this.blocksIntegrationId = integrationId;
842
+ }
843
+ });
792
844
  this.supervisor = this.buildSupervisor();
793
845
  this.supervisor?.start(CONVERGE_INTERVAL_MS);
794
846
  this.ctx.logger.info("core-blocks ready", { meta: {
@@ -868,26 +920,21 @@ var CoreBlocksAddon = class extends require_dist.BaseAddon {
868
920
  this.ctx.logger.warn("core-blocks: no integrations API — a block that declares a device will have nowhere to hang it");
869
921
  return null;
870
922
  }
871
- try {
872
- return await reconcileBlocksIntegration({
873
- logger: this.ctx.logger.child("integration"),
874
- devices: this.ctx.kernel.devices,
875
- localNodeId: this.ctx.kernel.localNodeId,
876
- getIntegration: async (addonId) => api.integrations.getByAddonId.query({ addonId }),
877
- createIntegration: async (input) => api.integrations.create.mutate(input),
878
- updateIntegration: async ({ id, info }) => {
879
- await api.integrations.update.mutate({
880
- id,
881
- info,
882
- skipRestart: true
883
- });
884
- },
885
- listOwnDevices: async () => api.deviceManager.listAll.query({ addonId: require_dist.CORE_BLOCKS_ADDON_ID })
886
- });
887
- } catch (err) {
888
- this.ctx.logger.warn("core-blocks: the shared integration could not be reconciled", { meta: { error: err instanceof Error ? err.message : String(err) } });
889
- return null;
890
- }
923
+ return reconcileBlocksIntegration({
924
+ logger: this.ctx.logger.child("integration"),
925
+ devices: this.ctx.kernel.devices,
926
+ localNodeId: this.ctx.kernel.localNodeId,
927
+ getIntegration: async (addonId) => api.integrations.getByAddonId.query({ addonId }),
928
+ createIntegration: async (input) => api.integrations.create.mutate(input),
929
+ updateIntegration: async ({ id, info }) => {
930
+ await api.integrations.update.mutate({
931
+ id,
932
+ info,
933
+ skipRestart: true
934
+ });
935
+ },
936
+ listOwnDevices: async () => api.deviceManager.listAll.query({ addonId: require_dist.CORE_BLOCKS_ADDON_ID })
937
+ });
891
938
  }
892
939
  /**
893
940
  * Reconcile now, after a write.
@@ -1,4 +1,4 @@
1
- import { D as coreBlockIdFromAddonId, E as coreBlockAddonId, O as coreBlocksCapability, _t as BaseAddon, c as CoreBlockSchema, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX } from "../../dist-DhrTd8LL.mjs";
1
+ import { D as coreBlockIdFromAddonId, E as coreBlockAddonId, O as coreBlocksCapability, _t as errMsg, c as CoreBlockSchema, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as fs from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -728,6 +728,52 @@ async function reconcileBlocksIntegration(ports) {
728
728
  devices: []
729
729
  })).integrationId;
730
730
  }
731
+ /** Retry cadence for {@link armBlocksIntegration}. The gap it waits out is the
732
+ * rest of hub boot — `$core-caps` is registered once `app.init()` returns — so
733
+ * seconds, and a handful of them, is the right shape. */
734
+ var ARM_RETRY_DELAY_MS = 5e3;
735
+ /** Bounded, because an integration that will never reconcile must say so once
736
+ * rather than log forever. Roughly two minutes at the default cadence. */
737
+ var ARM_MAX_ATTEMPTS = 24;
738
+ /**
739
+ * Arm the shared integration WITHOUT putting it on the boot path (D167).
740
+ *
741
+ * `integrations` is a hub-core namespace served by the `$core-caps` Moleculer
742
+ * service, and that service is registered only after `app.init()` returns —
743
+ * which is where the entire addon boot runs. During boot the read is therefore
744
+ * not slow, it is unanswerable: it burns the full 30 s discovery deadline and
745
+ * fast-fails, with no boot-window retry (core caps are excluded from it).
746
+ *
747
+ * Awaited inside `onInitialize()`, that 30 s sat on the hub's SERIAL in-process
748
+ * builtin loop and delayed `device-manager` — which every provider runner waits
749
+ * on before it may publish a single capability. Measured 2026-08-15: builtins
750
+ * stalled t0+10 s → t0+40 s, and the first camera's first keyframe landed at
751
+ * t0+75 s.
752
+ *
753
+ * So: arm it, let boot finish, and let the retry land it a few seconds later. A
754
+ * block that declares a device before it lands finds `null` and gets the
755
+ * integration on the next converge tick — which was already the documented
756
+ * behaviour when the API was unavailable.
757
+ */
758
+ function armBlocksIntegration(options) {
759
+ const retryDelayMs = options.retryDelayMs ?? ARM_RETRY_DELAY_MS;
760
+ const maxAttempts = options.maxAttempts ?? ARM_MAX_ATTEMPTS;
761
+ return { settled: (async () => {
762
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) try {
763
+ options.onLanded(await options.reconcile());
764
+ return;
765
+ } catch (err) {
766
+ if (attempt === maxAttempts) {
767
+ options.logger.warn("core-blocks: the shared integration never reconciled — a block that declares a device has nowhere to hang it", { meta: {
768
+ attempts: attempt,
769
+ error: errMsg(err)
770
+ } });
771
+ return;
772
+ }
773
+ await new Promise((resolve) => setTimeout(resolve, retryDelayMs));
774
+ }
775
+ })() };
776
+ }
731
777
  //#endregion
732
778
  //#region src/builtins/core-blocks/core-blocks.addon.ts
733
779
  /**
@@ -784,7 +830,13 @@ var CoreBlocksAddon = class extends BaseAddon {
784
830
  });
785
831
  await this.store.load();
786
832
  this.transpiler = await loadTranspiler(this.ctx.logger);
787
- this.blocksIntegrationId = await this.declareBlocksIntegration();
833
+ armBlocksIntegration({
834
+ logger: this.ctx.logger,
835
+ reconcile: () => this.declareBlocksIntegration(),
836
+ onLanded: (integrationId) => {
837
+ this.blocksIntegrationId = integrationId;
838
+ }
839
+ });
788
840
  this.supervisor = this.buildSupervisor();
789
841
  this.supervisor?.start(CONVERGE_INTERVAL_MS);
790
842
  this.ctx.logger.info("core-blocks ready", { meta: {
@@ -864,26 +916,21 @@ var CoreBlocksAddon = class extends BaseAddon {
864
916
  this.ctx.logger.warn("core-blocks: no integrations API — a block that declares a device will have nowhere to hang it");
865
917
  return null;
866
918
  }
867
- try {
868
- return await reconcileBlocksIntegration({
869
- logger: this.ctx.logger.child("integration"),
870
- devices: this.ctx.kernel.devices,
871
- localNodeId: this.ctx.kernel.localNodeId,
872
- getIntegration: async (addonId) => api.integrations.getByAddonId.query({ addonId }),
873
- createIntegration: async (input) => api.integrations.create.mutate(input),
874
- updateIntegration: async ({ id, info }) => {
875
- await api.integrations.update.mutate({
876
- id,
877
- info,
878
- skipRestart: true
879
- });
880
- },
881
- listOwnDevices: async () => api.deviceManager.listAll.query({ addonId: CORE_BLOCKS_ADDON_ID })
882
- });
883
- } catch (err) {
884
- this.ctx.logger.warn("core-blocks: the shared integration could not be reconciled", { meta: { error: err instanceof Error ? err.message : String(err) } });
885
- return null;
886
- }
919
+ return reconcileBlocksIntegration({
920
+ logger: this.ctx.logger.child("integration"),
921
+ devices: this.ctx.kernel.devices,
922
+ localNodeId: this.ctx.kernel.localNodeId,
923
+ getIntegration: async (addonId) => api.integrations.getByAddonId.query({ addonId }),
924
+ createIntegration: async (input) => api.integrations.create.mutate(input),
925
+ updateIntegration: async ({ id, info }) => {
926
+ await api.integrations.update.mutate({
927
+ id,
928
+ info,
929
+ skipRestart: true
930
+ });
931
+ },
932
+ listOwnDevices: async () => api.deviceManager.listAll.query({ addonId: CORE_BLOCKS_ADDON_ID })
933
+ });
887
934
  }
888
935
  /**
889
936
  * Reconcile now, after a write.
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -1,4 +1,4 @@
1
- import { Ct as DeviceType, Et as WELL_KNOWN_TAB_MAP, Ft as isDeviceConfigCap, Ht as sleep, I as enumerateItemArrayFields, L as enumerateSchemaFields, M as deviceStateCapability, N as deviceStatusCapability, Q as normalizeUnit, St as DeviceRole, T as buildStreamParamsConfigSchema, Ut as EventCategory, _t as BaseAddon, a as CAP_NAMES_WITH_STATUS, et as parseStreamParamsFormPatch, gt as errMsg, j as deviceManagerCapability, p as STREAM_PROFILE_META, rt as runtimeStatePolicyFor, t as ALL_CAPABILITY_DEFINITIONS, u as DeviceStatusSchema, xt as DeviceFeature } from "../../dist-DhrTd8LL.mjs";
1
+ import { $ as normalizeUnit, Ct as DeviceRole, Dt as WELL_KNOWN_TAB_MAP, It as isDeviceConfigCap, L as enumerateItemArrayFields, M as deviceManagerCapability, N as deviceStateCapability, P as deviceStatusCapability, R as enumerateSchemaFields, St as DeviceFeature, T as buildStreamParamsConfigSchema, Ut as sleep, Wt as EventCategory, _t as errMsg, a as CAP_NAMES_WITH_STATUS, it as runtimeStatePolicyFor, p as STREAM_PROFILE_META, t as ALL_CAPABILITY_DEFINITIONS, tt as parseStreamParamsFormPatch, u as DeviceStatusSchema, vt as BaseAddon, wt as DeviceType } from "../../dist-F1XDQDE1.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
4
4
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  //#region src/builtins/doorbell/trigger-engine.ts
8
8
  /**
9
9
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -1,4 +1,4 @@
1
- import { At as createEvent, Ct as DeviceType, P as doorbellCapability, U as isSameAddonId, Ut as EventCategory, _t as BaseAddon, gt as errMsg, w as bareAddonId } from "../../dist-DhrTd8LL.mjs";
1
+ import { F as doorbellCapability, W as isSameAddonId, Wt as EventCategory, _t as errMsg, jt as createEvent, vt as BaseAddon, w as bareAddonId, wt as DeviceType } from "../../dist-F1XDQDE1.mjs";
2
2
  //#region src/builtins/doorbell/trigger-engine.ts
3
3
  /**
4
4
  * Pure trigger logic for the virtual-doorbell builtin — edge detection over
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
9
9
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,4 +1,4 @@
1
- import { J as logDestinationCapability, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { Y as logDestinationCapability, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  //#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
4
4
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-9Gfk4KOk.js");
3
+ const require_dist = require("../../dist-BMus2E5R.js");
4
4
  //#region src/builtins/liveness-monitor/liveness-checks.ts
5
5
  var NO_DEVICES = "liveness:no-devices";
6
6
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -1,4 +1,4 @@
1
- import { At as createEvent, Ut as EventCategory, _t as BaseAddon, gt as errMsg } from "../../dist-DhrTd8LL.mjs";
1
+ import { Wt as EventCategory, _t as errMsg, jt as createEvent, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  //#region src/builtins/liveness-monitor/liveness-checks.ts
3
3
  var NO_DEVICES = "liveness:no-devices";
4
4
  var ALL_OFFLINE = "liveness:all-devices-offline";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  let crypto$1 = require("crypto");
@@ -1,5 +1,5 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { S as authProviderCapability, _ as UserRecordSchema, _t as BaseAddon, m as ScopedTokenSchema, pt as userManagementCapability, r as ApiKeyRecordSchema } from "../../dist-DhrTd8LL.mjs";
2
+ import { S as authProviderCapability, _ as UserRecordSchema, m as ScopedTokenSchema, mt as userManagementCapability, r as ApiKeyRecordSchema, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
3
3
  import * as crypto$2 from "node:crypto";
4
4
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
5
5
  import nodeCrypto from "crypto";
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-9Gfk4KOk.js");
3
+ const require_dist = require("../../dist-BMus2E5R.js");
4
4
  let node_os = require("node:os");
5
5
  node_os = require_chunk.__toESM(node_os);
6
6
  //#region src/builtins/local-network/local-network.addon.ts
@@ -1,4 +1,4 @@
1
- import { Ut as EventCategory, _t as BaseAddon, q as localNetworkCapability } from "../../dist-DhrTd8LL.mjs";
1
+ import { J as localNetworkCapability, Wt as EventCategory, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import * as os from "node:os";
3
3
  //#region src/builtins/local-network/local-network.addon.ts
4
4
  /**
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { J as logDestinationCapability, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { Y as logDestinationCapability, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
9
  let node_os = require("node:os");
@@ -1,4 +1,4 @@
1
- import { At as createEvent, Ut as EventCategory, Z as metricsProviderCapability, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { Q as metricsProviderCapability, Wt as EventCategory, jt as createEvent, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  import { execFile, execFileSync } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as os from "node:os";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  let node_child_process = require("node:child_process");
8
8
  let node_util = require("node:util");
9
9
  let node_os = require("node:os");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { F as enumerateInferenceDevices, Mt as emitReadiness, Ut as EventCategory, _t as BaseAddon, gt as errMsg, ot as scoreRuntimes, tt as platformProbeCapability } from "../../dist-DhrTd8LL.mjs";
2
+ import { I as enumerateInferenceDevices, Nt as emitReadiness, Wt as EventCategory, _t as errMsg, nt as platformProbeCapability, st as scoreRuntimes, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
5
5
  import * as os from "node:os";
@@ -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-9Gfk4KOk.js");
6
+ const require_dist = require("../../dist-BMus2E5R.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { Ut as EventCategory, _t as BaseAddon } from "../../dist-DhrTd8LL.mjs";
1
+ import { Wt as EventCategory, vt as BaseAddon } from "../../dist-F1XDQDE1.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative