@camstack/system 1.2.332 → 1.2.333

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 (63) 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/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/camera-grid/index.js +1 -1
  14. package/dist/builtins/camera-grid/index.mjs +1 -1
  15. package/dist/builtins/composer/composer.addon.js +2 -2
  16. package/dist/builtins/composer/composer.addon.mjs +2 -2
  17. package/dist/builtins/console-logging/index.js +1 -1
  18. package/dist/builtins/console-logging/index.mjs +1 -1
  19. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  20. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  21. package/dist/builtins/device-manager/device-manager.addon.js +17 -2
  22. package/dist/builtins/device-manager/device-manager.addon.mjs +17 -2
  23. package/dist/builtins/device-manager/stale-wrapper-activations.d.ts +6 -0
  24. package/dist/builtins/hub-forwarder/index.js +1 -1
  25. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  26. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  27. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  28. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  29. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  30. package/dist/builtins/local-network/local-network.addon.js +1 -1
  31. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  32. package/dist/builtins/loki-logging/index.js +1 -1
  33. package/dist/builtins/loki-logging/index.mjs +1 -1
  34. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  35. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  36. package/dist/builtins/platform-probe/index.js +1 -1
  37. package/dist/builtins/platform-probe/index.mjs +1 -1
  38. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  40. package/dist/builtins/snapshot/index.js +1 -1
  41. package/dist/builtins/snapshot/index.mjs +1 -1
  42. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  43. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  44. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  45. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  46. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  47. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  48. package/dist/builtins/system-config/system-config.addon.js +1 -1
  49. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  50. package/dist/builtins/winston-logging/index.js +1 -1
  51. package/dist/builtins/winston-logging/index.mjs +1 -1
  52. package/dist/{child-cap-dispatch-kLIiU1CG.mjs → child-cap-dispatch-DZBRtBiY.mjs} +39 -0
  53. package/dist/{child-cap-dispatch-93MfsaZL.js → child-cap-dispatch-D_vavR92.js} +39 -0
  54. package/dist/{composition-sources-DK--XR5V.js → composition-sources-BOmLYV5s.js} +1 -1
  55. package/dist/{composition-sources-BpyaHvoR.mjs → composition-sources-pkS2rTOz.mjs} +1 -1
  56. package/dist/{dist-CH3jfPMi.js → dist-Dl2VFsPg.js} +11 -1
  57. package/dist/{dist-BEPK2RUO.mjs → dist-DxkeG_0w.mjs} +11 -1
  58. package/dist/index.js +2 -2
  59. package/dist/index.mjs +2 -2
  60. package/dist/kernel/transport/local-child-registry.d.ts +30 -0
  61. package/dist/{retired-settings-keys-tDI1g7ab.mjs → retired-settings-keys-BPWzEXW3.mjs} +1 -1
  62. package/dist/{retired-settings-keys-C5mSevGV.js → retired-settings-keys-D1iqJKR8.js} +1 -1
  63. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_child_cap_dispatch = require("./child-cap-dispatch-93MfsaZL.js");
2
+ const require_child_cap_dispatch = require("./child-cap-dispatch-D_vavR92.js");
3
3
  const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { $t as RUNNER_RSS_BUDGET_ENV, Ft as resolveAddonClass, H as createUdsLoggerWithControl, Pt as installManifestNativeDeps, U as LocalChildClient, _t as getWorkerNativeCapSnapshot, f as installManifestSystemDeps, fn as startRunnerHeapWatch, g as createUdsAddonContext, gt as getWorkerNativeCapProvider, i as killOwnRunnerGroupAfterParentLoss, n as createChildCapDispatch, p as installManifestPythonDeps, u as startRunnerParentDeathWatchdog, wn as emitHeapDiagnosticReport, xt as validateProviderRegistrations, yt as setWorkerNativeCapsChangeListener } from "./child-cap-dispatch-kLIiU1CG.mjs";
1
+ import { $t as RUNNER_RSS_BUDGET_ENV, Ft as resolveAddonClass, H as createUdsLoggerWithControl, Pt as installManifestNativeDeps, U as LocalChildClient, _t as getWorkerNativeCapSnapshot, f as installManifestSystemDeps, fn as startRunnerHeapWatch, g as createUdsAddonContext, gt as getWorkerNativeCapProvider, i as killOwnRunnerGroupAfterParentLoss, n as createChildCapDispatch, p as installManifestPythonDeps, u as startRunnerParentDeathWatchdog, wn as emitHeapDiagnosticReport, xt as validateProviderRegistrations, yt as setWorkerNativeCapsChangeListener } from "./child-cap-dispatch-DZBRtBiY.mjs";
2
2
  import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Hn as errMsg, Un as BaseAddon, V as addonPagesCapability, mr as EventCategory } from "../../dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, Un as BaseAddon, V as addonPagesCapability, mr as EventCategory } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Hn as errMsg, U as addonWidgetsCapability, Un as BaseAddon, mr as EventCategory } from "../../dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, U as addonWidgetsCapability, Un as BaseAddon, mr as EventCategory } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { $n as createEvent, Hn as errMsg, Un as BaseAddon, W as alertsCapability, mr as EventCategory, n as AlertSchema } from "../../dist-BEPK2RUO.mjs";
1
+ import { $n as createEvent, Hn as errMsg, Un as BaseAddon, W as alertsCapability, mr as EventCategory, n as AlertSchema } from "../../dist-DxkeG_0w.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
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  //#region src/builtins/autotrack/autotrack-config.ts
8
8
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
9
9
  deadZoneFraction: .5,
@@ -1,4 +1,4 @@
1
- import { Hn as errMsg, Un as BaseAddon, ar as isEvent, b as FIRST_LEVEL_MACRO_CLASSES, mr as EventCategory, q as bareAddonId, rn as ptzAutotrackCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, Un as BaseAddon, ar as isEvent, b as FIRST_LEVEL_MACRO_CLASSES, mr as EventCategory, q as bareAddonId, rn as ptzAutotrackCapability } from "../../dist-DxkeG_0w.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Gt as mayWriteToLocation, K as backupCapability, Un as BaseAddon, m as DATABASE_SNAPSHOT_SUFFIX, mr as EventCategory, or as nodePin, pr as toNodeId, vn as storageOccupancyCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Gt as mayWriteToLocation, K as backupCapability, Un as BaseAddon, m as DATABASE_SNAPSHOT_SUFFIX, mr as EventCategory, or as nodePin, pr as toNodeId, vn as storageOccupancyCapability } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  let zod = require("zod");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { $n as createEvent, Hn as errMsg, Kt as memoizePinnedFfmpeg, O as MOTION_CLOSE_AFTER_MS, Un as BaseAddon, Vn as DeviceType, Yt as motionCapability, Z as cameraGridLayoutCapability, _ as DERIVED_CAMERA_SILENCED_CAP_NAMES, bn as streamCatalogCapability, hn as snapshotCapability, i as BaseDevice, kn as buildFfmpegArgs, mr as EventCategory, rr as hydrateSchema, ut as declarationOwnerNodeId, v as DeclaredDevices, zn as DeviceFeature } from "../../dist-BEPK2RUO.mjs";
1
+ import { $n as createEvent, Hn as errMsg, Kt as memoizePinnedFfmpeg, O as MOTION_CLOSE_AFTER_MS, Un as BaseAddon, Vn as DeviceType, Yt as motionCapability, Z as cameraGridLayoutCapability, _ as DERIVED_CAMERA_SILENCED_CAP_NAMES, bn as streamCatalogCapability, hn as snapshotCapability, i as BaseDevice, kn as buildFfmpegArgs, mr as EventCategory, rr as hydrateSchema, ut as declarationOwnerNodeId, v as DeclaredDevices, zn as DeviceFeature } from "../../dist-DxkeG_0w.mjs";
2
2
  import { z } from "zod";
3
3
  import { FfmpegProcess } from "@camstack/types/node";
4
4
  import { join } from "node:path";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CH3jfPMi.js");
7
- const require_composition_sources = require("../../composition-sources-DK--XR5V.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
+ const require_composition_sources = require("../../composition-sources-BOmLYV5s.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/shared/device-state-changed.ts
10
10
  /** Structural narrowing helper for untrusted bus payloads. */
@@ -1,5 +1,5 @@
1
- import { $ as composerCapability, $n as createEvent, An as cloneStatefulExpressionMemory, Fn as compositionSliceKey, Hn as errMsg, In as compositionSourceKey, Ln as createStatefulExpressionMemory, Mn as composedDeviceStableId, Nn as compositionFeatureEnabled, On as COMPOSER_ADDON_ID, Pn as compositionItemFieldPath, Rn as toExpressionValue, St as evaluateCompositionField, Un as BaseAddon, Vn as DeviceType, Y as buildCapabilityLookup, c as COMPOSED_ITEM_FIXED_FIELDS, en as planComposition, et as compositionFieldKey, i as BaseDevice, jn as composedDeviceRef, mr as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, v as DeclaredDevices } from "../../dist-BEPK2RUO.mjs";
2
- import { n as normalizedNativeOwner } from "../../composition-sources-BpyaHvoR.mjs";
1
+ import { $ as composerCapability, $n as createEvent, An as cloneStatefulExpressionMemory, Fn as compositionSliceKey, Hn as errMsg, In as compositionSourceKey, Ln as createStatefulExpressionMemory, Mn as composedDeviceStableId, Nn as compositionFeatureEnabled, On as COMPOSER_ADDON_ID, Pn as compositionItemFieldPath, Rn as toExpressionValue, St as evaluateCompositionField, Un as BaseAddon, Vn as DeviceType, Y as buildCapabilityLookup, c as COMPOSED_ITEM_FIXED_FIELDS, en as planComposition, et as compositionFieldKey, i as BaseDevice, jn as composedDeviceRef, mr as EventCategory, t as ALL_CAPABILITY_DEFINITIONS, v as DeclaredDevices } from "../../dist-DxkeG_0w.mjs";
2
+ import { n as normalizedNativeOwner } from "../../composition-sources-pkS2rTOz.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/shared/device-state-changed.ts
5
5
  /** Structural narrowing helper for untrusted bus payloads. */
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-DxkeG_0w.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,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-CH3jfPMi.js");
4
- const require_composition_sources = require("../../composition-sources-DK--XR5V.js");
3
+ const require_dist = require("../../dist-Dl2VFsPg.js");
4
+ const require_composition_sources = require("../../composition-sources-BOmLYV5s.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,5 +1,5 @@
1
- import { Cn as validateComposition, Hn as errMsg, In as compositionSourceKey, Un as BaseAddon, Y as buildCapabilityLookup, an as replacedFieldKeys, at as coreBlockSourceKind, d as CORE_BLOCK_ADDON_PREFIX, en as planComposition, f as CoreBlockSchema, it as coreBlockIdFromAddonId, jn as composedDeviceRef, l as COMPOSER_RUNNER_ID, mt as describeComposableCaps, nt as coreBlockAddonId, ot as coreBlocksCapability, rt as coreBlockComposition, t as ALL_CAPABILITY_DEFINITIONS, tt as compositionSourceRefs, u as CORE_BLOCKS_ADDON_ID, v as DeclaredDevices } from "../../dist-BEPK2RUO.mjs";
2
- import { t as describeCompositionSources } from "../../composition-sources-BpyaHvoR.mjs";
1
+ import { Cn as validateComposition, Hn as errMsg, In as compositionSourceKey, Un as BaseAddon, Y as buildCapabilityLookup, an as replacedFieldKeys, at as coreBlockSourceKind, d as CORE_BLOCK_ADDON_PREFIX, en as planComposition, f as CoreBlockSchema, it as coreBlockIdFromAddonId, jn as composedDeviceRef, l as COMPOSER_RUNNER_ID, mt as describeComposableCaps, nt as coreBlockAddonId, ot as coreBlocksCapability, rt as coreBlockComposition, t as ALL_CAPABILITY_DEFINITIONS, tt as compositionSourceRefs, u as CORE_BLOCKS_ADDON_ID, v as DeclaredDevices } from "../../dist-DxkeG_0w.mjs";
2
+ import { t as describeCompositionSources } from "../../composition-sources-pkS2rTOz.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { customizationBlockName } from "@camstack/types/node";
5
5
  import * as fs from "node:fs/promises";
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CH3jfPMi.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-C5mSevGV.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-D1iqJKR8.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
10
10
  let _camstack_types_node = require("@camstack/types/node");
@@ -1062,6 +1062,20 @@ var RECOVERY = "deviceManager.setWrapperActive({ deviceId, capName, wrapperAddon
1062
1062
  * this for every stored string activation (re-review N2).
1063
1063
  */
1064
1064
  var DECLARED_NON_WRAPPER_CAPS = new Set(require_dist.ALL_CAPABILITY_DEFINITIONS.filter((cap) => cap.kind !== "wrapper").map((cap) => cap.name));
1065
+ /**
1066
+ * Every COLLECTION cap this build declares — the static table, like the set
1067
+ * above, because a stored row must be judged the same whether or not a
1068
+ * provider of the cap is live yet (R1-L1).
1069
+ */
1070
+ var DECLARED_COLLECTION_CAPS = new Set(require_dist.ALL_CAPABILITY_DEFINITIONS.filter((cap) => cap.mode === "collection").map((cap) => cap.name));
1071
+ /**
1072
+ * True when `capName` is a declared COLLECTION cap: its owners are derived by
1073
+ * `getBindings` step 0 and it persists no activation (D556), so a stored row
1074
+ * for it is never an owner.
1075
+ */
1076
+ function isDeclaredCollectionCap(capName) {
1077
+ return DECLARED_COLLECTION_CAPS.has(capName);
1078
+ }
1065
1079
  /** True when `capName` is declared by this build and is NOT a wrapper cap. */
1066
1080
  function isDeclaredNonWrapperCap(capName) {
1067
1081
  return DECLARED_NON_WRAPPER_CAPS.has(capName);
@@ -1421,6 +1435,7 @@ async function resolveBindingsForDevice(deps, deviceId, row, pass) {
1421
1435
  }
1422
1436
  const resolveRemote = (capName) => deps.remoteNativeCaps.get(deviceId)?.get(capName) ?? resolveRemoteNativeCapFromRegistry(deps, capName, deviceId);
1423
1437
  for (const [capName, { wrapperAddonId }] of Object.entries(perDevice)) {
1438
+ if (isDeclaredCollectionCap(capName)) continue;
1424
1439
  if (wrapperAddonId === void 0) continue;
1425
1440
  if (isRetiredWrapperActivation(capName, wrapperAddonId)) {
1426
1441
  deps.staleWrapperActivations.report(deviceId, capName, wrapperAddonId);
@@ -1,5 +1,5 @@
1
- import { $t as parseStreamParamsFormPatch, Bn as DeviceRole, Bt as locationIconKey, D as MINUTES_PER_DAY, Hn as errMsg, It as legacyAutoLinkIds, Ot as formatMinutes, P as STREAM_PROFILE_META, S as FieldClaimSchema, T as LocationIconIdSchema, Un as BaseAddon, Vn as DeviceType, X as buildStreamParamsConfigSchema, Xt as normalizeUnit, Yn as WELL_KNOWN_TAB_MAP, _t as deviceStateCapability, bt as enumerateItemArrayFields, fr as sleep$1, ft as defineExtensionSlotProvider, g as DAY_NAMES, gt as deviceManagerCapability, ht as deviceExtensionCapability, ir as isDeviceConfigCap, ln as runtimeStatePolicyFor, mn as siteZoneKey, mr as EventCategory, o as CAMERA_SWITCH_ORDER, s as CAP_NAMES_WITH_STATUS, st as createDeviceExtensionProvider, t as ALL_CAPABILITY_DEFINITIONS, vt as deviceStatusCapability, wt as expandContainer, x as FieldClaimModeSchema, xt as enumerateSchemaFields, y as DeviceStatusSchema, zn as DeviceFeature } from "../../dist-BEPK2RUO.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-tDI1g7ab.mjs";
1
+ import { $t as parseStreamParamsFormPatch, Bn as DeviceRole, Bt as locationIconKey, D as MINUTES_PER_DAY, Hn as errMsg, It as legacyAutoLinkIds, Ot as formatMinutes, P as STREAM_PROFILE_META, S as FieldClaimSchema, T as LocationIconIdSchema, Un as BaseAddon, Vn as DeviceType, X as buildStreamParamsConfigSchema, Xt as normalizeUnit, Yn as WELL_KNOWN_TAB_MAP, _t as deviceStateCapability, bt as enumerateItemArrayFields, fr as sleep$1, ft as defineExtensionSlotProvider, g as DAY_NAMES, gt as deviceManagerCapability, ht as deviceExtensionCapability, ir as isDeviceConfigCap, ln as runtimeStatePolicyFor, mn as siteZoneKey, mr as EventCategory, o as CAMERA_SWITCH_ORDER, s as CAP_NAMES_WITH_STATUS, st as createDeviceExtensionProvider, t as ALL_CAPABILITY_DEFINITIONS, vt as deviceStatusCapability, wt as expandContainer, x as FieldClaimModeSchema, xt as enumerateSchemaFields, y as DeviceStatusSchema, zn as DeviceFeature } from "../../dist-DxkeG_0w.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-BPWzEXW3.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
@@ -1057,6 +1057,20 @@ var RECOVERY = "deviceManager.setWrapperActive({ deviceId, capName, wrapperAddon
1057
1057
  * this for every stored string activation (re-review N2).
1058
1058
  */
1059
1059
  var DECLARED_NON_WRAPPER_CAPS = new Set(ALL_CAPABILITY_DEFINITIONS.filter((cap) => cap.kind !== "wrapper").map((cap) => cap.name));
1060
+ /**
1061
+ * Every COLLECTION cap this build declares — the static table, like the set
1062
+ * above, because a stored row must be judged the same whether or not a
1063
+ * provider of the cap is live yet (R1-L1).
1064
+ */
1065
+ var DECLARED_COLLECTION_CAPS = new Set(ALL_CAPABILITY_DEFINITIONS.filter((cap) => cap.mode === "collection").map((cap) => cap.name));
1066
+ /**
1067
+ * True when `capName` is a declared COLLECTION cap: its owners are derived by
1068
+ * `getBindings` step 0 and it persists no activation (D556), so a stored row
1069
+ * for it is never an owner.
1070
+ */
1071
+ function isDeclaredCollectionCap(capName) {
1072
+ return DECLARED_COLLECTION_CAPS.has(capName);
1073
+ }
1060
1074
  /** True when `capName` is declared by this build and is NOT a wrapper cap. */
1061
1075
  function isDeclaredNonWrapperCap(capName) {
1062
1076
  return DECLARED_NON_WRAPPER_CAPS.has(capName);
@@ -1416,6 +1430,7 @@ async function resolveBindingsForDevice(deps, deviceId, row, pass) {
1416
1430
  }
1417
1431
  const resolveRemote = (capName) => deps.remoteNativeCaps.get(deviceId)?.get(capName) ?? resolveRemoteNativeCapFromRegistry(deps, capName, deviceId);
1418
1432
  for (const [capName, { wrapperAddonId }] of Object.entries(perDevice)) {
1433
+ if (isDeclaredCollectionCap(capName)) continue;
1419
1434
  if (wrapperAddonId === void 0) continue;
1420
1435
  if (isRetiredWrapperActivation(capName, wrapperAddonId)) {
1421
1436
  deps.staleWrapperActivations.report(deviceId, capName, wrapperAddonId);
@@ -1,5 +1,11 @@
1
1
  import { IScopedLogger } from '@camstack/types';
2
2
  import { DeviceBindingsStore } from './device-meta-types.js';
3
+ /**
4
+ * True when `capName` is a declared COLLECTION cap: its owners are derived by
5
+ * `getBindings` step 0 and it persists no activation (D556), so a stored row
6
+ * for it is never an owner.
7
+ */
8
+ export declare function isDeclaredCollectionCap(capName: string): boolean;
3
9
  /** A persisted activation of a wrapper on a cap that has none (see module docblock). */
4
10
  export declare function isRetiredWrapperActivation(capName: string, wrapperAddonId: string | null | undefined): wrapperAddonId is string;
5
11
  /**
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
3
+ const require_dist = require("../../dist-Dl2VFsPg.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 { $n as createEvent, Hn as errMsg, M as RecordingStatusSchema, Un as BaseAddon, k as RECORDING_SOURCE_CAMSTACK_ADDON, mr as EventCategory } from "../../dist-BEPK2RUO.mjs";
1
+ import { $n as createEvent, Hn as errMsg, M as RecordingStatusSchema, Un as BaseAddon, k as RECORDING_SOURCE_CAMSTACK_ADDON, mr as EventCategory } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { B as UserRecordSchema, F as ScopedTokenSchema, G as authProviderCapability, Sn as userManagementCapability, Un as BaseAddon, r as ApiKeyRecordSchema } from "../../dist-BEPK2RUO.mjs";
2
+ import { B as UserRecordSchema, F as ScopedTokenSchema, G as authProviderCapability, Sn as userManagementCapability, Un as BaseAddon, r as ApiKeyRecordSchema } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
3
+ const require_dist = require("../../dist-Dl2VFsPg.js");
4
4
  const require_tls = require("../../tls-D_wUeOTD.js");
5
5
  let node_fs_promises = require("node:fs/promises");
6
6
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Un as BaseAddon, mr as EventCategory, zt as localNetworkCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, mr as EventCategory, zt as localNetworkCapability } from "../../dist-DxkeG_0w.mjs";
2
2
  import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-IM-v7JV4.mjs";
3
3
  import { mkdir, writeFile } from "node:fs/promises";
4
4
  import { join } 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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  const require_proc_stat = require("../../proc-stat-DL-WUOhl.js");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { $n as createEvent, Dt as foldSnapshotByFunction, Hn as errMsg, Un as BaseAddon, in as reducePoints, mr as EventCategory, on as resolveBucketMs, qt as metricsProviderCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { $n as createEvent, Dt as foldSnapshotByFunction, Hn as errMsg, Un as BaseAddon, in as reducePoints, mr as EventCategory, on as resolveBucketMs, qt as metricsProviderCapability } from "../../dist-DxkeG_0w.mjs";
2
2
  import { a as parseProcStat, i as nodeProcReader, n as elapsedSecSince, o as parseProcStatusRss, r as lifetimeCpuPercent, t as commandFromCmdline } from "../../proc-stat-CbC55Kqi.mjs";
3
3
  import { access, readFile, readdir } from "node:fs/promises";
4
4
  import * as fs from "node:fs";
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Hn as errMsg, Un as BaseAddon, fn as scoreRuntimes, mr as EventCategory, tn as platformProbeCapability, tr as emitReadiness, yt as enumerateInferenceDevices } from "../../dist-BEPK2RUO.mjs";
2
+ import { Hn as errMsg, Un as BaseAddon, fn as scoreRuntimes, mr as EventCategory, tn as platformProbeCapability, tr as emitReadiness, yt as enumerateInferenceDevices } from "../../dist-DxkeG_0w.mjs";
3
3
  import * as fs from "node:fs";
4
4
  import { execFile } from "node:child_process";
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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Un as BaseAddon, mr as EventCategory } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, mr as EventCategory } from "../../dist-DxkeG_0w.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-Cqs7GkOV.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Hn as errMsg, J as batteryCapability, Kt as memoizePinnedFfmpeg, Un as BaseAddon, Vn as DeviceType, a as BatteryStatusSchema, hn as snapshotCapability, mr as EventCategory, or as nodePin, pt as deriveBatteryPresence, q as bareAddonId, xn as streamQualityLabel, zn as DeviceFeature } from "../../dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, J as batteryCapability, Kt as memoizePinnedFfmpeg, Un as BaseAddon, Vn as DeviceType, a as BatteryStatusSchema, hn as snapshotCapability, mr as EventCategory, or as nodePin, pt as deriveBatteryPresence, q as bareAddonId, xn as streamQualityLabel, zn as DeviceFeature } from "../../dist-DxkeG_0w.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CZPvteq2.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Et as filesystemBrowseCapability, Un as BaseAddon, yn as storageProviderCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Et as filesystemBrowseCapability, Un as BaseAddon, yn as storageProviderCapability } from "../../dist-DxkeG_0w.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { A as REDACTED_SECRET, Ct as evictionPolicyOfLocation, Dn as withLocationMode, Gt as mayWriteToLocation, I as StorageCleanupJobSchema, Jt as modeMayWrite, L as StorageLocationModeSchema, Lt as legacyModeOf, Mt as isLocationEnabled, Q as collectSecretConfigKeys, R as StorageLocationTypeSchema, Un as BaseAddon, Wt as mayReadLocation, _n as storageMigrationCapability, gn as storageCapability, kt as gbToBytes, mr as EventCategory, pn as settingsStoreCapability, sn as resolveLocationMode, sr as parseJsonObject, w as LegacyStorageLocationDefaultSchema, z as StorageMigrationJobSchema } from "../../dist-BEPK2RUO.mjs";
1
+ import { A as REDACTED_SECRET, Ct as evictionPolicyOfLocation, Dn as withLocationMode, Gt as mayWriteToLocation, I as StorageCleanupJobSchema, Jt as modeMayWrite, L as StorageLocationModeSchema, Lt as legacyModeOf, Mt as isLocationEnabled, Q as collectSecretConfigKeys, R as StorageLocationTypeSchema, Un as BaseAddon, Wt as mayReadLocation, _n as storageMigrationCapability, gn as storageCapability, kt as gbToBytes, mr as EventCategory, pn as settingsStoreCapability, sn as resolveLocationMode, sr as parseJsonObject, w as LegacyStorageLocationDefaultSchema, z as StorageMigrationJobSchema } from "../../dist-DxkeG_0w.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Hn as errMsg, Un as BaseAddon, rr as hydrateSchema } from "../../dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, Un as BaseAddon, rr as hydrateSchema } from "../../dist-DxkeG_0w.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-CH3jfPMi.js");
6
+ const require_dist = require("../../dist-Dl2VFsPg.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 { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-BEPK2RUO.mjs";
1
+ import { Un as BaseAddon, Vt as logDestinationCapability } from "../../dist-DxkeG_0w.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";
@@ -1,3 +1,4 @@
1
+ import { $n as createEvent, mr as EventCategory$1 } from "./dist-DxkeG_0w.mjs";
1
2
  import { a as parseProcStat, i as nodeProcReader } from "./proc-stat-CbC55Kqi.mjs";
2
3
  import "./hub-cap-forward-BdT320dq.mjs";
3
4
  import * as crypto$1 from "node:crypto";
@@ -8524,6 +8525,11 @@ async function answerClaimedGetStatus(resolve, call) {
8524
8525
  if (answer.kind === "unclaimed") return null;
8525
8526
  return { slice: answer.kind === "claimed" ? answer.slice : null };
8526
8527
  }
8528
+ /** The source every runner lifecycle event this registry emits carries. */
8529
+ var LIFECYCLE_SOURCE = {
8530
+ type: "core",
8531
+ id: "local-child-registry"
8532
+ };
8527
8533
  function readFanoutMode() {
8528
8534
  const raw = process.env.CAMSTACK_UDS_EVENT_FANOUT;
8529
8535
  if (raw === "shadow" || raw === "broadcast") return raw;
@@ -8554,6 +8560,9 @@ var LocalChildRegistry = class {
8554
8560
  server;
8555
8561
  onUnownedCall;
8556
8562
  logger;
8563
+ lifecycleEvents;
8564
+ /** Per childId: the incarnation `WorkerOnline` was last said for. */
8565
+ announcedIncarnation = /* @__PURE__ */ new Map();
8557
8566
  getActiveSingletonAddonId;
8558
8567
  resolveChildIdForAddon;
8559
8568
  /** This node's own Moleculer nodeId (see {@link LocalChildRegistryOptions.ownNodeId}). */
@@ -8615,6 +8624,7 @@ var LocalChildRegistry = class {
8615
8624
  this.server = opts.server;
8616
8625
  this.onUnownedCall = opts.onUnownedCall;
8617
8626
  this.logger = opts.logger;
8627
+ this.lifecycleEvents = opts.lifecycleEvents;
8618
8628
  this.getActiveSingletonAddonId = opts.getActiveSingletonAddonId;
8619
8629
  this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
8620
8630
  this.ownNodeId = opts.ownNodeId;
@@ -9129,6 +9139,33 @@ var LocalChildRegistry = class {
9129
9139
  async close() {
9130
9140
  await this.server.close();
9131
9141
  }
9142
+ /** `WorkerOnline`, once per incarnation: a re-register of the same connection says nothing. */
9143
+ announceOnline(childId, incarnation) {
9144
+ const events = this.lifecycleEvents;
9145
+ if (events === void 0 || this.announcedIncarnation.get(childId) === incarnation) return;
9146
+ this.announcedIncarnation.set(childId, incarnation);
9147
+ const workerId = `${events.parentNodeId()}/${childId}`;
9148
+ this.emitLifecycle(events, createEvent(EventCategory$1.WorkerOnline, LIFECYCLE_SOURCE, { workerId }), incarnation);
9149
+ }
9150
+ /** `WorkerOffline` for the LIVE connection's close (a superseded close never reaches here). */
9151
+ announceOffline(childId, incarnation) {
9152
+ const events = this.lifecycleEvents;
9153
+ if (events === void 0) return;
9154
+ this.announcedIncarnation.delete(childId);
9155
+ const workerId = `${events.parentNodeId()}/${childId}`;
9156
+ this.emitLifecycle(events, createEvent(EventCategory$1.WorkerOffline, LIFECYCLE_SOURCE, { workerId }), incarnation);
9157
+ }
9158
+ emitLifecycle(events, event, incarnation) {
9159
+ try {
9160
+ events.emit(event);
9161
+ } catch (err) {
9162
+ this.logger?.info("runner lifecycle event could not be emitted", {
9163
+ category: event.category,
9164
+ incarnation,
9165
+ error: err instanceof Error ? err.message : String(err)
9166
+ });
9167
+ }
9168
+ }
9132
9169
  onConnection(channel) {
9133
9170
  let childId = null;
9134
9171
  const incarnation = this.nextIncarnation++;
@@ -9184,6 +9221,7 @@ var LocalChildRegistry = class {
9184
9221
  });
9185
9222
  this.invalidateCapIndex();
9186
9223
  this.logPatternSet(msg.childId, eventPatterns);
9224
+ this.announceOnline(msg.childId, incarnation);
9187
9225
  this.registeredHandler({
9188
9226
  childId: msg.childId,
9189
9227
  caps: msg.caps,
@@ -9283,6 +9321,7 @@ var LocalChildRegistry = class {
9283
9321
  this.actionCensus.forget(childId);
9284
9322
  this.loggedPatternSet.delete(childId);
9285
9323
  this.goneHandler(childId, incarnation);
9324
+ this.announceOffline(childId, incarnation);
9286
9325
  });
9287
9326
  }
9288
9327
  };
@@ -1,4 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
+ const require_dist = require("./dist-Dl2VFsPg.js");
2
3
  const require_proc_stat = require("./proc-stat-DL-WUOhl.js");
3
4
  require("./hub-cap-forward-DmHNjbB0.js");
4
5
  let node_crypto = require("node:crypto");
@@ -8527,6 +8528,11 @@ async function answerClaimedGetStatus(resolve, call) {
8527
8528
  if (answer.kind === "unclaimed") return null;
8528
8529
  return { slice: answer.kind === "claimed" ? answer.slice : null };
8529
8530
  }
8531
+ /** The source every runner lifecycle event this registry emits carries. */
8532
+ var LIFECYCLE_SOURCE = {
8533
+ type: "core",
8534
+ id: "local-child-registry"
8535
+ };
8530
8536
  function readFanoutMode() {
8531
8537
  const raw = process.env.CAMSTACK_UDS_EVENT_FANOUT;
8532
8538
  if (raw === "shadow" || raw === "broadcast") return raw;
@@ -8557,6 +8563,9 @@ var LocalChildRegistry = class {
8557
8563
  server;
8558
8564
  onUnownedCall;
8559
8565
  logger;
8566
+ lifecycleEvents;
8567
+ /** Per childId: the incarnation `WorkerOnline` was last said for. */
8568
+ announcedIncarnation = /* @__PURE__ */ new Map();
8560
8569
  getActiveSingletonAddonId;
8561
8570
  resolveChildIdForAddon;
8562
8571
  /** This node's own Moleculer nodeId (see {@link LocalChildRegistryOptions.ownNodeId}). */
@@ -8618,6 +8627,7 @@ var LocalChildRegistry = class {
8618
8627
  this.server = opts.server;
8619
8628
  this.onUnownedCall = opts.onUnownedCall;
8620
8629
  this.logger = opts.logger;
8630
+ this.lifecycleEvents = opts.lifecycleEvents;
8621
8631
  this.getActiveSingletonAddonId = opts.getActiveSingletonAddonId;
8622
8632
  this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
8623
8633
  this.ownNodeId = opts.ownNodeId;
@@ -9132,6 +9142,33 @@ var LocalChildRegistry = class {
9132
9142
  async close() {
9133
9143
  await this.server.close();
9134
9144
  }
9145
+ /** `WorkerOnline`, once per incarnation: a re-register of the same connection says nothing. */
9146
+ announceOnline(childId, incarnation) {
9147
+ const events = this.lifecycleEvents;
9148
+ if (events === void 0 || this.announcedIncarnation.get(childId) === incarnation) return;
9149
+ this.announcedIncarnation.set(childId, incarnation);
9150
+ const workerId = `${events.parentNodeId()}/${childId}`;
9151
+ this.emitLifecycle(events, require_dist.createEvent(require_dist.EventCategory.WorkerOnline, LIFECYCLE_SOURCE, { workerId }), incarnation);
9152
+ }
9153
+ /** `WorkerOffline` for the LIVE connection's close (a superseded close never reaches here). */
9154
+ announceOffline(childId, incarnation) {
9155
+ const events = this.lifecycleEvents;
9156
+ if (events === void 0) return;
9157
+ this.announcedIncarnation.delete(childId);
9158
+ const workerId = `${events.parentNodeId()}/${childId}`;
9159
+ this.emitLifecycle(events, require_dist.createEvent(require_dist.EventCategory.WorkerOffline, LIFECYCLE_SOURCE, { workerId }), incarnation);
9160
+ }
9161
+ emitLifecycle(events, event, incarnation) {
9162
+ try {
9163
+ events.emit(event);
9164
+ } catch (err) {
9165
+ this.logger?.info("runner lifecycle event could not be emitted", {
9166
+ category: event.category,
9167
+ incarnation,
9168
+ error: err instanceof Error ? err.message : String(err)
9169
+ });
9170
+ }
9171
+ }
9135
9172
  onConnection(channel) {
9136
9173
  let childId = null;
9137
9174
  const incarnation = this.nextIncarnation++;
@@ -9187,6 +9224,7 @@ var LocalChildRegistry = class {
9187
9224
  });
9188
9225
  this.invalidateCapIndex();
9189
9226
  this.logPatternSet(msg.childId, eventPatterns);
9227
+ this.announceOnline(msg.childId, incarnation);
9190
9228
  this.registeredHandler({
9191
9229
  childId: msg.childId,
9192
9230
  caps: msg.caps,
@@ -9286,6 +9324,7 @@ var LocalChildRegistry = class {
9286
9324
  this.actionCensus.forget(childId);
9287
9325
  this.loggedPatternSet.delete(childId);
9288
9326
  this.goneHandler(childId, incarnation);
9327
+ this.announceOffline(childId, incarnation);
9289
9328
  });
9290
9329
  }
9291
9330
  };
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CH3jfPMi.js");
1
+ const require_dist = require("./dist-Dl2VFsPg.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { Hn as errMsg, In as compositionSourceKey } from "./dist-BEPK2RUO.mjs";
1
+ import { Hn as errMsg, In as compositionSourceKey } from "./dist-DxkeG_0w.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -14746,7 +14746,17 @@ function siteZoneKey(label) {
14746
14746
  var ProviderStatusSchema = zod.z.object({
14747
14747
  connected: zod.z.boolean(),
14748
14748
  deviceCount: zod.z.number(),
14749
- error: zod.z.string().optional()
14749
+ error: zod.z.string().optional(),
14750
+ /**
14751
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14752
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14753
+ * which every provider bundles, so only a provider BUILT from D696-amended
14754
+ * code says it. ABSENT means an older provider that may still write it (raw
14755
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14756
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14757
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14758
+ */
14759
+ motionSliceWriter: zod.z.literal("orchestrator").optional()
14750
14760
  });
14751
14761
  zod.z.object({
14752
14762
  externalId: zod.z.string(),
@@ -14746,7 +14746,17 @@ function siteZoneKey(label) {
14746
14746
  var ProviderStatusSchema = z.object({
14747
14747
  connected: z.boolean(),
14748
14748
  deviceCount: z.number(),
14749
- error: z.string().optional()
14749
+ error: z.string().optional(),
14750
+ /**
14751
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14752
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14753
+ * which every provider bundles, so only a provider BUILT from D696-amended
14754
+ * code says it. ABSENT means an older provider that may still write it (raw
14755
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14756
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14757
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14758
+ */
14759
+ motionSliceWriter: z.literal("orchestrator").optional()
14750
14760
  });
14751
14761
  z.object({
14752
14762
  externalId: z.string(),
package/dist/index.js CHANGED
@@ -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-CH3jfPMi.js");
3
+ const require_dist = require("./dist-Dl2VFsPg.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_builtins_composer_composer_addon = require("./builtins/composer/composer.addon.js");
@@ -29,7 +29,7 @@ require("./builtins/system-config/index.js");
29
29
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
30
30
  const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-ey4mbofz.js");
31
31
  const require_tls$1 = require("./tls-D_wUeOTD.js");
32
- const require_child_cap_dispatch = require("./child-cap-dispatch-93MfsaZL.js");
32
+ const require_child_cap_dispatch = require("./child-cap-dispatch-D_vavR92.js");
33
33
  const require_resource_monitor = require("./resource-monitor-DzNn_IZK.js");
34
34
  const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
35
35
  let zod = require("zod");
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { $n as createEvent, At as isArrayOutputSchema, C as LOG_LEVEL_RANK, E as METHOD_ACCESS_MAP, Ft as kebabToCamel, Gn as DEVICE_SETTINGS_CONTRIBUTION_METHODS, H as addonSettingsCapability, Hn as errMsg$1, Ht as logLevelAtMost, Jn as ReadinessTimeoutError, Kn as DEVICE_STATUS_METHOD, Nt as isObjectInput, Pt as isVoidInput, Qn as asString$1, Qt as objectInputDeclaresRequiredDeviceId, Rt as lifecycleJobSchema, Tt as extractNestedAddonId, Ut as looseSchema, Wn as DATAPLANE_SECRET_HEADER$1, Xn as asJsonObject$1, Zn as asNumber, Zt as objectInputDeclaresAddonId, cn as resolveMethodAuth, cr as parseJsonUnknown, dn as scopesAllowDeviceCap, dr as scopeKey, er as emitDownForOwnedCaps, j as RUNTIME_DEFAULTS, jt as isCollectionArrayMethod, lr as readinessKey, mr as EventCategory$1, nn as procedureAuthKey, nr as expandCapMethods, qn as ReadinessRegistry, sr as parseJsonObject, t as ALL_CAPABILITY_DEFINITIONS, un as scopesAllowAddon, ur as resolveCapMount } from "./dist-BEPK2RUO.mjs";
2
+ import { $n as createEvent, At as isArrayOutputSchema, C as LOG_LEVEL_RANK, E as METHOD_ACCESS_MAP, Ft as kebabToCamel, Gn as DEVICE_SETTINGS_CONTRIBUTION_METHODS, H as addonSettingsCapability, Hn as errMsg$1, Ht as logLevelAtMost, Jn as ReadinessTimeoutError, Kn as DEVICE_STATUS_METHOD, Nt as isObjectInput, Pt as isVoidInput, Qn as asString$1, Qt as objectInputDeclaresRequiredDeviceId, Rt as lifecycleJobSchema, Tt as extractNestedAddonId, Ut as looseSchema, Wn as DATAPLANE_SECRET_HEADER$1, Xn as asJsonObject$1, Zn as asNumber, Zt as objectInputDeclaresAddonId, cn as resolveMethodAuth, cr as parseJsonUnknown, dn as scopesAllowDeviceCap, dr as scopeKey, er as emitDownForOwnedCaps, j as RUNTIME_DEFAULTS, jt as isCollectionArrayMethod, lr as readinessKey, mr as EventCategory$1, nn as procedureAuthKey, nr as expandCapMethods, qn as ReadinessRegistry, sr as parseJsonObject, t as ALL_CAPABILITY_DEFINITIONS, un as scopesAllowAddon, ur as resolveCapMount } from "./dist-DxkeG_0w.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { ComposerAddon } from "./builtins/composer/composer.addon.mjs";
@@ -28,7 +28,7 @@ import "./builtins/system-config/index.mjs";
28
28
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
29
29
  import { _ as ensureModel, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, g as downloadModel, h as downloadFile, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as deleteModelFromDisk, n as STALL_TICK_MS, o as contentTypeFor, p as collectModelFiles, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as fetchJson, x as isModelDownloaded, y as getModelFilePath } from "./event-loop-stall-monitor-EXjzIxDz.mjs";
30
30
  import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-IM-v7JV4.mjs";
31
- import { $ as classifyCapRoute, $n as EMPTY_CAP_ACTION_READING, $t as RUNNER_RSS_BUDGET_ENV, A as resolveHwAccel, An as OUTBOUND_QUEUE_SUSTAIN_MS, At as DeviceRegistry, B as udsChildLogToWorkerEntry, Bn as createSocketPlaneMeter, Bt as hostNodeIdOf, C as getBrokerEventBus, Cn as HEAP_SPACE_REPORT_MIN_MB, Ct as capActionName, D as subscribePassthrough, Dn as readHeapSpaces, Dt as parseCapAction, E as setNodeEventInterest, En as heapSpaceField, Et as capServiceName, F as ipcParentLink, Fn as createMeshQueueReader, Ft as resolveAddonClass, G as UDS_NO_ROUTE_PREFIX, Gn as EMPTY_SOCKET_DIRECTION, Gt as HEAP_WATCH_INTERVAL_MS, H as createUdsLoggerWithControl, Hn as diffSocketPlane, Ht as HEAP_RECLAIM_MIN_INTERVAL_MS, I as localProviderLink, In as formatMeshQueue, It as buildNpmChildEnv, J as deviceOfGetStatus, Jn as sampleSocketDirection, Jt as HUB_MAIN_RSS_BUDGET_MB, K as GET_STATUS_METHOD, Kn as createSocketDirectionCounters, Kt as HEAP_WATCH_WARN_RATIO, L as createParentUnownedCallHandler, Ln as EMPTY_SOCKET_PLANE_BASELINE, Lt as resolveNpmInvocation, M as brokerTransportLink, Mn as createOutboundQueueGate, Mt as CapabilityUnavailableError, N as buildLinkChain, Nn as formatOutboundQueueVerdict, Nt as copyBundledNativeModules, O as AddonDepsManager, On as selectReportedSpaces, Ot as deserializeTypedArrays, P as deviceCapResolverLink, Pn as MESH_QUEUE_TOP_N, Pt as installManifestNativeDeps, Q as CapRouteError, Qn as CAP_ACTION_UNLABELLED, Qt as RUNNER_HEAP_WATCH_INTERVAL_MS, R as createUdsEventBridge, Rn as SOCKET_PLANE_TOP_N, Rt as runNpm, S as clusterEventTopic, Sn as DECISIVE_HEAP_SPACES, St as NATIVE_PROVIDER_SERVICE_INFIX, T as registerEventBusService, Tn as formatHeapSpaces, Tt as capBareAction, U as LocalChildClient, Un as formatSocketPlane, Ut as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, V as createUdsLogger, Vn as createSocketPlaneReader, Vt as createAddonDataPlaneFacility, W as LocalChildRegistry, Wn as readSocketQueues, Wt as HEAP_RECLAIM_TRIGGER_MB, X as AGENT_CAP_FWD_SERVICE, Xn as socketDirectionMessages, Xt as RSS_BUDGET_REANNOUNCE_MIN_MS, Y as AGENT_CAP_FWD_ACTION, Yn as socketDirectionBytes, Yt as HUB_RSS_BUDGET_ENV, Z as CapRouteResolver, Zn as CAP_ACTION_OVERFLOW_LABEL, Zt as RSS_BUDGET_RELEASE_RATIO, _ as getWorkerDeviceRegistry, _n as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, a as reapProcessGroup, an as describeRss, ar as createEventPlaneMeter, at as getCapUsageRegistry, b as setHubConnected, bn as formatArrayBufferCensus, bt as createAddonService, c as runnerOwnsProcessGroup, cn as parseRssBudgetMb, cr as formatEventPlane, ct as UdsLocalTransportServer, d as summarizeMembers, dn as startHeapWatch, dt as localEndpointPath, en as ZERO_LOOP_DELAY, er as MAX_CAP_ACTIONS_PER_PEER, et as callWithServiceDiscovery, f as installManifestSystemDeps, fn as startRunnerHeapWatch, ft as FrameDecoder, g as createUdsAddonContext, gn as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, h as createAddonContext, hn as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ht as createBrokerDeviceManagerApi, in as createV8Reclaimer, ir as EVENT_PLANE_TOP_N, it as __resetCapUsageRegistryForTests, j as brokerCallForCap, jn as OUTBOUND_QUEUE_THRESHOLD_BYTES, jt as CapabilityHandle, k as createKernelHwAccel, kn as OUTBOUND_QUEUE_COOLDOWN_MS, kt as serializeTypedArrays, l as signalAllRunnerGroups, ln as reclaimIntervalMs, lt as SocketChannel, m as adaptBrokerToCluster, mn as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, mt as buildNativeCapProxy, nn as createDeferredHeapWatchSink, nr as createCapActionCensus, nt as CapUsageRegistry, o as registerRunnerGroup, on as hubMainRssBudget, or as createEventPlaneReader, ot as createLocalTransport, p as installManifestPythonDeps, pn as strandedMb, pt as encodeFrame, q as answerClaimedGetStatus, qn as recordSocketFrame, qt as HUB_MAIN_HEAP_WATCH_LABEL, r as defaultProcessGroupOps, rn as createLoopDelayMeter, rr as diffCapActionCensus, rt as PARENT_ROUTED_PROVIDER_ADDON_ID, s as releaseRunnerGroup, sn as nextRssBudgetState, sr as diffEventPlane, st as UdsLocalTransportClient, t as CAP_METHOD_NOT_IMPLEMENTED, tn as buildHeapSample, tr as capActionLabel, tt as readMoleculerFanoutMode, un as shouldReclaim, ut as PeerAnsweredError, v as getOrInitReadinessRegistry, vn as createArrayBufferCensusGate, vt as mountNativeCapService, w as getMoleculerEventStats, wn as emitHeapDiagnosticReport, wt as capActionSuffix, x as EVENT_TOPIC_PREFIX, xn as isArrayBufferCensusReport, xt as validateProviderRegistrations, y as getOrInitReadinessRegistryForClient, yn as createInspectorArrayBufferCensus, z as createUdsEventBus, zn as SOCKET_QUEUE_TOP_N, zt as createAddonPeerBytesFacility } from "./child-cap-dispatch-kLIiU1CG.mjs";
31
+ import { $ as classifyCapRoute, $n as EMPTY_CAP_ACTION_READING, $t as RUNNER_RSS_BUDGET_ENV, A as resolveHwAccel, An as OUTBOUND_QUEUE_SUSTAIN_MS, At as DeviceRegistry, B as udsChildLogToWorkerEntry, Bn as createSocketPlaneMeter, Bt as hostNodeIdOf, C as getBrokerEventBus, Cn as HEAP_SPACE_REPORT_MIN_MB, Ct as capActionName, D as subscribePassthrough, Dn as readHeapSpaces, Dt as parseCapAction, E as setNodeEventInterest, En as heapSpaceField, Et as capServiceName, F as ipcParentLink, Fn as createMeshQueueReader, Ft as resolveAddonClass, G as UDS_NO_ROUTE_PREFIX, Gn as EMPTY_SOCKET_DIRECTION, Gt as HEAP_WATCH_INTERVAL_MS, H as createUdsLoggerWithControl, Hn as diffSocketPlane, Ht as HEAP_RECLAIM_MIN_INTERVAL_MS, I as localProviderLink, In as formatMeshQueue, It as buildNpmChildEnv, J as deviceOfGetStatus, Jn as sampleSocketDirection, Jt as HUB_MAIN_RSS_BUDGET_MB, K as GET_STATUS_METHOD, Kn as createSocketDirectionCounters, Kt as HEAP_WATCH_WARN_RATIO, L as createParentUnownedCallHandler, Ln as EMPTY_SOCKET_PLANE_BASELINE, Lt as resolveNpmInvocation, M as brokerTransportLink, Mn as createOutboundQueueGate, Mt as CapabilityUnavailableError, N as buildLinkChain, Nn as formatOutboundQueueVerdict, Nt as copyBundledNativeModules, O as AddonDepsManager, On as selectReportedSpaces, Ot as deserializeTypedArrays, P as deviceCapResolverLink, Pn as MESH_QUEUE_TOP_N, Pt as installManifestNativeDeps, Q as CapRouteError, Qn as CAP_ACTION_UNLABELLED, Qt as RUNNER_HEAP_WATCH_INTERVAL_MS, R as createUdsEventBridge, Rn as SOCKET_PLANE_TOP_N, Rt as runNpm, S as clusterEventTopic, Sn as DECISIVE_HEAP_SPACES, St as NATIVE_PROVIDER_SERVICE_INFIX, T as registerEventBusService, Tn as formatHeapSpaces, Tt as capBareAction, U as LocalChildClient, Un as formatSocketPlane, Ut as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, V as createUdsLogger, Vn as createSocketPlaneReader, Vt as createAddonDataPlaneFacility, W as LocalChildRegistry, Wn as readSocketQueues, Wt as HEAP_RECLAIM_TRIGGER_MB, X as AGENT_CAP_FWD_SERVICE, Xn as socketDirectionMessages, Xt as RSS_BUDGET_REANNOUNCE_MIN_MS, Y as AGENT_CAP_FWD_ACTION, Yn as socketDirectionBytes, Yt as HUB_RSS_BUDGET_ENV, Z as CapRouteResolver, Zn as CAP_ACTION_OVERFLOW_LABEL, Zt as RSS_BUDGET_RELEASE_RATIO, _ as getWorkerDeviceRegistry, _n as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, a as reapProcessGroup, an as describeRss, ar as createEventPlaneMeter, at as getCapUsageRegistry, b as setHubConnected, bn as formatArrayBufferCensus, bt as createAddonService, c as runnerOwnsProcessGroup, cn as parseRssBudgetMb, cr as formatEventPlane, ct as UdsLocalTransportServer, d as summarizeMembers, dn as startHeapWatch, dt as localEndpointPath, en as ZERO_LOOP_DELAY, er as MAX_CAP_ACTIONS_PER_PEER, et as callWithServiceDiscovery, f as installManifestSystemDeps, fn as startRunnerHeapWatch, ft as FrameDecoder, g as createUdsAddonContext, gn as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, h as createAddonContext, hn as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ht as createBrokerDeviceManagerApi, in as createV8Reclaimer, ir as EVENT_PLANE_TOP_N, it as __resetCapUsageRegistryForTests, j as brokerCallForCap, jn as OUTBOUND_QUEUE_THRESHOLD_BYTES, jt as CapabilityHandle, k as createKernelHwAccel, kn as OUTBOUND_QUEUE_COOLDOWN_MS, kt as serializeTypedArrays, l as signalAllRunnerGroups, ln as reclaimIntervalMs, lt as SocketChannel, m as adaptBrokerToCluster, mn as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, mt as buildNativeCapProxy, nn as createDeferredHeapWatchSink, nr as createCapActionCensus, nt as CapUsageRegistry, o as registerRunnerGroup, on as hubMainRssBudget, or as createEventPlaneReader, ot as createLocalTransport, p as installManifestPythonDeps, pn as strandedMb, pt as encodeFrame, q as answerClaimedGetStatus, qn as recordSocketFrame, qt as HUB_MAIN_HEAP_WATCH_LABEL, r as defaultProcessGroupOps, rn as createLoopDelayMeter, rr as diffCapActionCensus, rt as PARENT_ROUTED_PROVIDER_ADDON_ID, s as releaseRunnerGroup, sn as nextRssBudgetState, sr as diffEventPlane, st as UdsLocalTransportClient, t as CAP_METHOD_NOT_IMPLEMENTED, tn as buildHeapSample, tr as capActionLabel, tt as readMoleculerFanoutMode, un as shouldReclaim, ut as PeerAnsweredError, v as getOrInitReadinessRegistry, vn as createArrayBufferCensusGate, vt as mountNativeCapService, w as getMoleculerEventStats, wn as emitHeapDiagnosticReport, wt as capActionSuffix, x as EVENT_TOPIC_PREFIX, xn as isArrayBufferCensusReport, xt as validateProviderRegistrations, y as getOrInitReadinessRegistryForClient, yn as createInspectorArrayBufferCensus, z as createUdsEventBus, zn as SOCKET_QUEUE_TOP_N, zt as createAddonPeerBytesFacility } from "./child-cap-dispatch-DZBRtBiY.mjs";
32
32
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-B1v6E07R.mjs";
33
33
  import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.mjs";
34
34
  import { z } from "zod";
@@ -98,8 +98,30 @@ export interface LocalChildRegistryLogger {
98
98
  * The optional `logger` receives a single deduplicated INFO line the first time
99
99
  * each capName is routed child→sibling over UDS.
100
100
  */
101
+ /**
102
+ * Where the registry says that a runner came up or went away — the parent's
103
+ * kernel bus. A forked runner has no Moleculer broker (Phase F), so
104
+ * `$node.connected` never fires for it and the Moleculer-side emitter
105
+ * (`agent-registry.service.ts`) never sees one: this registry is the only place
106
+ * that knows (fix round 1 of the 2026-10-02 motion-release-order work, C1).
107
+ */
108
+ export interface ChildLifecycleEvents {
109
+ /** This parent's node id (`'hub'`, or the bare agent id): the `<node>` of `<node>/<childId>`. */
110
+ readonly parentNodeId: () => string;
111
+ /** The parent's kernel bus `emit`. Telemetry (D8): a consumer must survive a dropped event. */
112
+ readonly emit: (event: SystemEvent) => void;
113
+ }
101
114
  export interface LocalChildRegistryOptions {
102
115
  readonly server: LocalTransportServer;
116
+ /**
117
+ * Emit `WorkerOnline { workerId: '<parent>/<childId>' }` at a new
118
+ * incarnation's FIRST register — the pre-init frame `LocalChildClient.start()`
119
+ * sends before any addon module is loaded, so before `initialize()` and any
120
+ * device restore; it is emitted before that frame is acked — and
121
+ * `WorkerOffline` when the LIVE connection closes (never for a superseded
122
+ * one). Omitted: nothing is emitted.
123
+ */
124
+ readonly lifecycleEvents?: ChildLifecycleEvents;
103
125
  readonly onUnownedCall?: (input: CapCallInput) => Promise<unknown>;
104
126
  readonly logger?: LocalChildRegistryLogger;
105
127
  /**
@@ -275,6 +297,9 @@ export declare class LocalChildRegistry {
275
297
  private readonly server;
276
298
  private readonly onUnownedCall?;
277
299
  private readonly logger?;
300
+ private readonly lifecycleEvents?;
301
+ /** Per childId: the incarnation `WorkerOnline` was last said for. */
302
+ private readonly announcedIncarnation;
278
303
  private readonly getActiveSingletonAddonId?;
279
304
  private readonly resolveChildIdForAddon?;
280
305
  /** This node's own Moleculer nodeId (see {@link LocalChildRegistryOptions.ownNodeId}). */
@@ -605,5 +630,10 @@ export declare class LocalChildRegistry {
605
630
  */
606
631
  setChildLogLevel(childId: string, level: string): boolean;
607
632
  close(): Promise<void>;
633
+ /** `WorkerOnline`, once per incarnation: a re-register of the same connection says nothing. */
634
+ private announceOnline;
635
+ /** `WorkerOffline` for the LIVE connection's close (a superseded close never reaches here). */
636
+ private announceOffline;
637
+ private emitLifecycle;
608
638
  private onConnection;
609
639
  }
@@ -1,4 +1,4 @@
1
- import { Xn as asJsonObject } from "./dist-BEPK2RUO.mjs";
1
+ import { Xn as asJsonObject } from "./dist-DxkeG_0w.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CH3jfPMi.js");
1
+ const require_dist = require("./dist-Dl2VFsPg.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.332",
3
+ "version": "1.2.333",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",