@camstack/system 1.2.111 → 1.2.113

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 (52) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  8. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  9. package/dist/builtins/console-logging/index.js +1 -1
  10. package/dist/builtins/console-logging/index.mjs +1 -1
  11. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  12. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  13. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  15. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  16. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  17. package/dist/builtins/hub-forwarder/index.js +1 -1
  18. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  19. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  20. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  21. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  22. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  23. package/dist/builtins/local-network/local-network.addon.js +1 -1
  24. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  25. package/dist/builtins/loki-logging/index.js +1 -1
  26. package/dist/builtins/loki-logging/index.mjs +1 -1
  27. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  28. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  29. package/dist/builtins/platform-probe/index.js +1 -1
  30. package/dist/builtins/platform-probe/index.mjs +1 -1
  31. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  32. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  33. package/dist/builtins/snapshot/index.js +72 -18
  34. package/dist/builtins/snapshot/index.mjs +72 -18
  35. package/dist/builtins/snapshot/snapshot.addon.d.ts +16 -0
  36. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  38. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  40. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  41. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  42. package/dist/builtins/system-config/system-config.addon.js +1 -1
  43. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  44. package/dist/builtins/winston-logging/index.js +1 -1
  45. package/dist/builtins/winston-logging/index.mjs +1 -1
  46. package/dist/{dist-CQkr5Kw0.js → dist-B2CtwVW2.js} +107 -5
  47. package/dist/{dist-CW4Cims4.mjs → dist-Duz_uJSQ.mjs} +107 -5
  48. package/dist/index.js +1 -1
  49. package/dist/index.mjs +1 -1
  50. package/dist/{retired-settings-keys-DGgOxOir.mjs → retired-settings-keys-BtVT2f6O.mjs} +1 -1
  51. package/dist/{retired-settings-keys-DCESas5O.js → retired-settings-keys-CYDGGkyM.js} +1 -1
  52. package/package.json +1 -1
@@ -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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, v as addonPagesCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, v as addonPagesCapability, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, b as addonWidgetsCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, b as addonWidgetsCapability, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, Mt as createEvent, n as AlertSchema, vt as errMsg, x as alertsCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, Mt as createEvent, n as AlertSchema, vt as errMsg, x as alertsCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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, Gt as EventCategory, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { C as backupCapability, Gt as EventCategory, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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,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-CQkr5Kw0.js");
3
+ const require_dist = require("../../dist-B2CtwVW2.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);
@@ -1,4 +1,4 @@
1
- import { D as coreBlockAddonId, O as coreBlockIdFromAddonId, c as CoreBlockSchema, k as coreBlocksCapability, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { D as coreBlockAddonId, O as coreBlockIdFromAddonId, c as CoreBlockSchema, k as coreBlocksCapability, l as DeclaredDevices, o as CORE_BLOCKS_ADDON_ID, s as CORE_BLOCK_ADDON_PREFIX, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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";
@@ -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-CQkr5Kw0.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-DCESas5O.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-CYDGGkyM.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
10
10
  //#region src/builtins/device-manager/adoption-job-engine.ts
@@ -1,5 +1,5 @@
1
- import { Ct as DeviceFeature, E as buildStreamParamsConfigSchema, F as deviceStatusCapability, Gt as EventCategory, Lt as isDeviceConfigCap, N as deviceManagerCapability, Ot as WELL_KNOWN_TAB_MAP, P as deviceStateCapability, R as enumerateItemArrayFields, Tt as DeviceType, Wt as sleep, a as CAP_NAMES_WITH_STATUS, at as runtimeStatePolicyFor, et as normalizeUnit, nt as parseStreamParamsFormPatch, p as STREAM_PROFILE_META, t as ALL_CAPABILITY_DEFINITIONS, u as DeviceStatusSchema, vt as errMsg, wt as DeviceRole, yt as BaseAddon, z as enumerateSchemaFields } from "../../dist-CW4Cims4.mjs";
2
- import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-DGgOxOir.mjs";
1
+ import { Ct as DeviceFeature, E as buildStreamParamsConfigSchema, F as deviceStatusCapability, Gt as EventCategory, Lt as isDeviceConfigCap, N as deviceManagerCapability, Ot as WELL_KNOWN_TAB_MAP, P as deviceStateCapability, R as enumerateItemArrayFields, Tt as DeviceType, Wt as sleep, a as CAP_NAMES_WITH_STATUS, at as runtimeStatePolicyFor, et as normalizeUnit, nt as parseStreamParamsFormPatch, p as STREAM_PROFILE_META, t as ALL_CAPABILITY_DEFINITIONS, u as DeviceStatusSchema, vt as errMsg, wt as DeviceRole, yt as BaseAddon, z as enumerateSchemaFields } from "../../dist-Duz_uJSQ.mjs";
2
+ import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-BtVT2f6O.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { canonicalDeviceFingerprint } from "@camstack/types/node";
5
5
  //#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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { G as isSameAddonId, Gt as EventCategory, I as doorbellCapability, Mt as createEvent, Tt as DeviceType, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { G as isSameAddonId, Gt as EventCategory, I as doorbellCapability, Mt as createEvent, Tt as DeviceType, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
3
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, Mt as createEvent, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, Mt as createEvent, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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, ht as userManagementCapability, m as ScopedTokenSchema, r as ApiKeyRecordSchema, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
2
+ import { S as authProviderCapability, _ as UserRecordSchema, ht as userManagementCapability, m as ScopedTokenSchema, r as ApiKeyRecordSchema, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
3
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, Y as localNetworkCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, Y as localNetworkCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { $ as metricsProviderCapability, Gt as EventCategory, Mt as createEvent, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { $ as metricsProviderCapability, Gt as EventCategory, Mt as createEvent, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, L as enumerateInferenceDevices, Pt as emitReadiness, ct as scoreRuntimes, rt as platformProbeCapability, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
2
+ import { Gt as EventCategory, L as enumerateInferenceDevices, Pt as emitReadiness, ct as scoreRuntimes, rt as platformProbeCapability, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { Gt as EventCategory, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Gt as EventCategory, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -939,6 +939,24 @@ function pickWarmSnapshotBroker(ranked, devicePrefix) {
939
939
  //#endregion
940
940
  //#region src/builtins/snapshot/snapshot.addon.ts
941
941
  /**
942
+ * States that make a dial pointless — the ladder is skipped entirely.
943
+ *
944
+ * `offline` is deliberately absent: a camera that is never probed can never be
945
+ * observed to come back, and this layer's own capture is one of the two ways a
946
+ * wrong `online:false` gets discovered (the other is the reachability poller
947
+ * that set it).
948
+ */
949
+ var CAPTURE_BLOCKING_REASONS = [
950
+ "disabled",
951
+ "sleeping",
952
+ "unreachable",
953
+ "waking"
954
+ ];
955
+ /** True when this state must answer WITHOUT touching the camera. */
956
+ function blocksCapture(reason) {
957
+ return CAPTURE_BLOCKING_REASONS.includes(reason);
958
+ }
959
+ /**
942
960
  * How long `getSnapshotLinks` waits for the capture it triggered before minting
943
961
  * the link over whatever frame it has.
944
962
  *
@@ -1681,7 +1699,7 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
1681
1699
  resolutionMeta.isBattery = isBatteryDevice;
1682
1700
  delete resolutionMeta.stateReason;
1683
1701
  }
1684
- if (state.reason !== void 0 && (!force || state.reason === "disabled" || state.reason === "unreachable" || state.reason === "waking")) {
1702
+ if (state.reason !== void 0 && blocksCapture(state.reason) && (!force || state.reason !== "sleeping")) {
1685
1703
  if (resolutionMeta) resolutionMeta.stateReason = state.reason;
1686
1704
  log.debug("snapshot: camera state overrides raw cache", {
1687
1705
  tags: { deviceId },
@@ -1709,7 +1727,8 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
1709
1727
  isBattery: isBatteryDevice
1710
1728
  }
1711
1729
  });
1712
- return hit ? hit.data : null;
1730
+ if (!hit) return null;
1731
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, hit, resolutionMeta) : hit.data;
1713
1732
  }
1714
1733
  const flightKey = `${deviceId}:${effectiveStreamId ?? "auto"}`;
1715
1734
  const flight = this.captureFlight.run(flightKey, () => this.captureFresh({
@@ -1722,16 +1741,19 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
1722
1741
  flight.catch(() => void 0);
1723
1742
  const waitMs = !force && decision.staleFallback && hit !== void 0 ? Math.min(decision.waitMs, staleWaitCapMs) : decision.waitMs;
1724
1743
  const raced = await raceForResult(flight, Math.min(Math.max(waitMs, minimumCaptureWaitMs), maximumCaptureWaitMs));
1725
- if (raced.settled) try {
1726
- const resolved = await this.resolveOutcome(raced.value, deviceId, hit, log);
1727
- if (resolved !== null) return resolved;
1728
- return meta?.online === false ? await this.courtesyImage(deviceId, "offline", deviceName) : null;
1729
- } catch (err) {
1730
- if (meta?.online === false) {
1731
- const courtesy = await this.courtesyImage(deviceId, "offline", deviceName);
1732
- if (courtesy !== null) return courtesy;
1744
+ if (raced.settled) {
1745
+ const captured = raced.value.ok && raced.value.image !== null;
1746
+ try {
1747
+ const resolved = await this.resolveOutcome(raced.value, deviceId, hit, log);
1748
+ if (resolved !== null) return captured || state.reason !== "offline" ? resolved : await this.offlineImage(deviceId, deviceName, hit, resolutionMeta);
1749
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, void 0, resolutionMeta) : null;
1750
+ } catch (err) {
1751
+ if (state.reason === "offline") {
1752
+ const stateFrame = await this.offlineImage(deviceId, deviceName, hit, resolutionMeta);
1753
+ if (stateFrame !== null) return stateFrame;
1754
+ }
1755
+ throw err;
1733
1756
  }
1734
- throw err;
1735
1757
  }
1736
1758
  if (decision.staleFallback && hit) {
1737
1759
  if (prefs.snapshotDebug) log.debug("snapshot: SWR — returning stale frame; refresh continues in background", {
@@ -1741,11 +1763,11 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
1741
1763
  waitMs: decision.waitMs
1742
1764
  }
1743
1765
  });
1744
- return hit.data;
1766
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, hit, resolutionMeta) : hit.data;
1745
1767
  }
1746
- if (meta?.online === false) {
1747
- const courtesy = await this.courtesyImage(deviceId, "offline", deviceName);
1748
- if (courtesy !== null) return courtesy;
1768
+ if (state.reason === "offline") {
1769
+ const stateFrame = await this.offlineImage(deviceId, deviceName, void 0, resolutionMeta);
1770
+ if (stateFrame !== null) return stateFrame;
1749
1771
  }
1750
1772
  return null;
1751
1773
  }
@@ -2104,7 +2126,12 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
2104
2126
  meta: { error: require_dist.errMsg(err) }
2105
2127
  });
2106
2128
  }
2107
- if (!(meta?.isBattery === true || batteryStatus !== null || waking)) return { isBattery: false };
2129
+ const isBattery = meta?.isBattery === true || batteryStatus !== null || waking;
2130
+ const unreachableVerdict = meta?.online === false ? {
2131
+ isBattery,
2132
+ reason: "offline"
2133
+ } : null;
2134
+ if (!isBattery) return unreachableVerdict ?? { isBattery: false };
2108
2135
  if (waking) return {
2109
2136
  isBattery: true,
2110
2137
  reason: "waking"
@@ -2113,10 +2140,11 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
2113
2140
  status: batteryStatus,
2114
2141
  nowMs: Date.now()
2115
2142
  });
2116
- return presence === "awake" ? { isBattery: true } : {
2143
+ if (presence !== "awake") return {
2117
2144
  isBattery: true,
2118
2145
  reason: presence
2119
2146
  };
2147
+ return unreachableVerdict ?? { isBattery: true };
2120
2148
  }
2121
2149
  isDeviceWaking(deviceId) {
2122
2150
  const startedAt = this.wakingDevices.get(deviceId);
@@ -2299,6 +2327,32 @@ var SnapshotAddon = class SnapshotAddon extends require_dist.BaseAddon {
2299
2327
  };
2300
2328
  }
2301
2329
  /**
2330
+ * The answer for a camera the hub cannot reach: its last good frame, with
2331
+ * `Offline` painted over it, and `offline` stamped on the response identity.
2332
+ *
2333
+ * Called only AFTER the ladder has run (offline is not in
2334
+ * {@link CAPTURE_BLOCKING_REASONS}), so this dresses a frame that could not be
2335
+ * refreshed — never one that just landed.
2336
+ *
2337
+ * The `stateReason` is set FIRST and unconditionally, because it is what a
2338
+ * surface labels the tile from and what puts `offline` in the ETag: a client
2339
+ * holding the live frame has to see a new identity the moment the camera
2340
+ * drops, or it paints the unlabelled photograph until the camera comes back.
2341
+ * A failed render therefore degrades to the raw frame rather than to nothing —
2342
+ * the metadata still says offline, so the tile is still honest.
2343
+ */
2344
+ async offlineImage(deviceId, deviceName, hit, resolutionMeta) {
2345
+ if (resolutionMeta) resolutionMeta.stateReason = "offline";
2346
+ this.ctx.logger.debug("snapshot: serving the offline treatment", {
2347
+ tags: { deviceId },
2348
+ meta: {
2349
+ hasCache: hit !== void 0,
2350
+ ageMs: hit ? Date.now() - hit.ts : null
2351
+ }
2352
+ });
2353
+ return await this.stateImage(deviceId, "offline", deviceName, hit) ?? hit?.data ?? null;
2354
+ }
2355
+ /**
2302
2356
  * Render a state-labelled answer. A cached real frame is the background, not
2303
2357
  * the answer by itself; if it cannot be decoded, fall back to the generated
2304
2358
  * courtesy background rather than leaking an unlabelled stale frame.
@@ -1,4 +1,4 @@
1
- import { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { Ct as DeviceFeature, Gt as EventCategory, M as deriveBatteryPresence, Rt as nodePin, T as batteryCapability, Tt as DeviceType, i as BatteryStatusSchema, mt as streamQualityLabel, ut as snapshotCapability, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-Duz_uJSQ.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
@@ -933,6 +933,24 @@ function pickWarmSnapshotBroker(ranked, devicePrefix) {
933
933
  //#endregion
934
934
  //#region src/builtins/snapshot/snapshot.addon.ts
935
935
  /**
936
+ * States that make a dial pointless — the ladder is skipped entirely.
937
+ *
938
+ * `offline` is deliberately absent: a camera that is never probed can never be
939
+ * observed to come back, and this layer's own capture is one of the two ways a
940
+ * wrong `online:false` gets discovered (the other is the reachability poller
941
+ * that set it).
942
+ */
943
+ var CAPTURE_BLOCKING_REASONS = [
944
+ "disabled",
945
+ "sleeping",
946
+ "unreachable",
947
+ "waking"
948
+ ];
949
+ /** True when this state must answer WITHOUT touching the camera. */
950
+ function blocksCapture(reason) {
951
+ return CAPTURE_BLOCKING_REASONS.includes(reason);
952
+ }
953
+ /**
936
954
  * How long `getSnapshotLinks` waits for the capture it triggered before minting
937
955
  * the link over whatever frame it has.
938
956
  *
@@ -1675,7 +1693,7 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
1675
1693
  resolutionMeta.isBattery = isBatteryDevice;
1676
1694
  delete resolutionMeta.stateReason;
1677
1695
  }
1678
- if (state.reason !== void 0 && (!force || state.reason === "disabled" || state.reason === "unreachable" || state.reason === "waking")) {
1696
+ if (state.reason !== void 0 && blocksCapture(state.reason) && (!force || state.reason !== "sleeping")) {
1679
1697
  if (resolutionMeta) resolutionMeta.stateReason = state.reason;
1680
1698
  log.debug("snapshot: camera state overrides raw cache", {
1681
1699
  tags: { deviceId },
@@ -1703,7 +1721,8 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
1703
1721
  isBattery: isBatteryDevice
1704
1722
  }
1705
1723
  });
1706
- return hit ? hit.data : null;
1724
+ if (!hit) return null;
1725
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, hit, resolutionMeta) : hit.data;
1707
1726
  }
1708
1727
  const flightKey = `${deviceId}:${effectiveStreamId ?? "auto"}`;
1709
1728
  const flight = this.captureFlight.run(flightKey, () => this.captureFresh({
@@ -1716,16 +1735,19 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
1716
1735
  flight.catch(() => void 0);
1717
1736
  const waitMs = !force && decision.staleFallback && hit !== void 0 ? Math.min(decision.waitMs, staleWaitCapMs) : decision.waitMs;
1718
1737
  const raced = await raceForResult(flight, Math.min(Math.max(waitMs, minimumCaptureWaitMs), maximumCaptureWaitMs));
1719
- if (raced.settled) try {
1720
- const resolved = await this.resolveOutcome(raced.value, deviceId, hit, log);
1721
- if (resolved !== null) return resolved;
1722
- return meta?.online === false ? await this.courtesyImage(deviceId, "offline", deviceName) : null;
1723
- } catch (err) {
1724
- if (meta?.online === false) {
1725
- const courtesy = await this.courtesyImage(deviceId, "offline", deviceName);
1726
- if (courtesy !== null) return courtesy;
1738
+ if (raced.settled) {
1739
+ const captured = raced.value.ok && raced.value.image !== null;
1740
+ try {
1741
+ const resolved = await this.resolveOutcome(raced.value, deviceId, hit, log);
1742
+ if (resolved !== null) return captured || state.reason !== "offline" ? resolved : await this.offlineImage(deviceId, deviceName, hit, resolutionMeta);
1743
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, void 0, resolutionMeta) : null;
1744
+ } catch (err) {
1745
+ if (state.reason === "offline") {
1746
+ const stateFrame = await this.offlineImage(deviceId, deviceName, hit, resolutionMeta);
1747
+ if (stateFrame !== null) return stateFrame;
1748
+ }
1749
+ throw err;
1727
1750
  }
1728
- throw err;
1729
1751
  }
1730
1752
  if (decision.staleFallback && hit) {
1731
1753
  if (prefs.snapshotDebug) log.debug("snapshot: SWR — returning stale frame; refresh continues in background", {
@@ -1735,11 +1757,11 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
1735
1757
  waitMs: decision.waitMs
1736
1758
  }
1737
1759
  });
1738
- return hit.data;
1760
+ return state.reason === "offline" ? await this.offlineImage(deviceId, deviceName, hit, resolutionMeta) : hit.data;
1739
1761
  }
1740
- if (meta?.online === false) {
1741
- const courtesy = await this.courtesyImage(deviceId, "offline", deviceName);
1742
- if (courtesy !== null) return courtesy;
1762
+ if (state.reason === "offline") {
1763
+ const stateFrame = await this.offlineImage(deviceId, deviceName, void 0, resolutionMeta);
1764
+ if (stateFrame !== null) return stateFrame;
1743
1765
  }
1744
1766
  return null;
1745
1767
  }
@@ -2098,7 +2120,12 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
2098
2120
  meta: { error: errMsg(err) }
2099
2121
  });
2100
2122
  }
2101
- if (!(meta?.isBattery === true || batteryStatus !== null || waking)) return { isBattery: false };
2123
+ const isBattery = meta?.isBattery === true || batteryStatus !== null || waking;
2124
+ const unreachableVerdict = meta?.online === false ? {
2125
+ isBattery,
2126
+ reason: "offline"
2127
+ } : null;
2128
+ if (!isBattery) return unreachableVerdict ?? { isBattery: false };
2102
2129
  if (waking) return {
2103
2130
  isBattery: true,
2104
2131
  reason: "waking"
@@ -2107,10 +2134,11 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
2107
2134
  status: batteryStatus,
2108
2135
  nowMs: Date.now()
2109
2136
  });
2110
- return presence === "awake" ? { isBattery: true } : {
2137
+ if (presence !== "awake") return {
2111
2138
  isBattery: true,
2112
2139
  reason: presence
2113
2140
  };
2141
+ return unreachableVerdict ?? { isBattery: true };
2114
2142
  }
2115
2143
  isDeviceWaking(deviceId) {
2116
2144
  const startedAt = this.wakingDevices.get(deviceId);
@@ -2293,6 +2321,32 @@ var SnapshotAddon = class SnapshotAddon extends BaseAddon {
2293
2321
  };
2294
2322
  }
2295
2323
  /**
2324
+ * The answer for a camera the hub cannot reach: its last good frame, with
2325
+ * `Offline` painted over it, and `offline` stamped on the response identity.
2326
+ *
2327
+ * Called only AFTER the ladder has run (offline is not in
2328
+ * {@link CAPTURE_BLOCKING_REASONS}), so this dresses a frame that could not be
2329
+ * refreshed — never one that just landed.
2330
+ *
2331
+ * The `stateReason` is set FIRST and unconditionally, because it is what a
2332
+ * surface labels the tile from and what puts `offline` in the ETag: a client
2333
+ * holding the live frame has to see a new identity the moment the camera
2334
+ * drops, or it paints the unlabelled photograph until the camera comes back.
2335
+ * A failed render therefore degrades to the raw frame rather than to nothing —
2336
+ * the metadata still says offline, so the tile is still honest.
2337
+ */
2338
+ async offlineImage(deviceId, deviceName, hit, resolutionMeta) {
2339
+ if (resolutionMeta) resolutionMeta.stateReason = "offline";
2340
+ this.ctx.logger.debug("snapshot: serving the offline treatment", {
2341
+ tags: { deviceId },
2342
+ meta: {
2343
+ hasCache: hit !== void 0,
2344
+ ageMs: hit ? Date.now() - hit.ts : null
2345
+ }
2346
+ });
2347
+ return await this.stateImage(deviceId, "offline", deviceName, hit) ?? hit?.data ?? null;
2348
+ }
2349
+ /**
2296
2350
  * Render a state-labelled answer. A cached real frame is the background, not
2297
2351
  * the answer by itself; if it cannot be decoded, fall back to the generated
2298
2352
  * courtesy background rather than leaking an unlabelled stale frame.
@@ -464,6 +464,22 @@ export declare class SnapshotAddon extends BaseAddon<SnapshotAddonConfig> {
464
464
  private courtesyFrame;
465
465
  /** A courtesy frame shaped as the cap's response, or null when unrenderable. */
466
466
  private courtesyImage;
467
+ /**
468
+ * The answer for a camera the hub cannot reach: its last good frame, with
469
+ * `Offline` painted over it, and `offline` stamped on the response identity.
470
+ *
471
+ * Called only AFTER the ladder has run (offline is not in
472
+ * {@link CAPTURE_BLOCKING_REASONS}), so this dresses a frame that could not be
473
+ * refreshed — never one that just landed.
474
+ *
475
+ * The `stateReason` is set FIRST and unconditionally, because it is what a
476
+ * surface labels the tile from and what puts `offline` in the ETag: a client
477
+ * holding the live frame has to see a new identity the moment the camera
478
+ * drops, or it paints the unlabelled photograph until the camera comes back.
479
+ * A failed render therefore degrades to the raw frame rather than to nothing —
480
+ * the metadata still says offline, so the tile is still honest.
481
+ */
482
+ private offlineImage;
467
483
  /**
468
484
  * Render a state-labelled answer. A cached real frame is the background, not
469
485
  * the answer by itself; if it cannot be decoded, fall back to the generated
@@ -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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { V as filesystemBrowseCapability, pt as storageProviderCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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,8 +3,8 @@ 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-CQkr5Kw0.js");
7
- const require_retired_settings_keys = require("../../retired-settings-keys-DCESas5O.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.js");
7
+ const require_retired_settings_keys = require("../../retired-settings-keys-CYDGGkyM.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
10
10
  let node_module = require("node:module");
@@ -1,5 +1,5 @@
1
- import { A as dataStoreProviderCapability, Bt as parseJsonUnknown, _t as vectorStoreCapability, f as RUNTIME_DEFAULTS, gt as vectorDimFromBase64, j as decodeVectorBase64, kt as asJsonObject, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
2
- import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-DGgOxOir.mjs";
1
+ import { A as dataStoreProviderCapability, Bt as parseJsonUnknown, _t as vectorStoreCapability, f as RUNTIME_DEFAULTS, gt as vectorDimFromBase64, j as decodeVectorBase64, kt as asJsonObject, vt as errMsg, w as bareAddonId, yt as BaseAddon } from "../../dist-Duz_uJSQ.mjs";
2
+ import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-BtVT2f6O.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { statSync } 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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,4 +1,4 @@
1
- import { dt as storageCapability, ft as storageMigrationCapability, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as settingsStoreCapability, yt as BaseAddon, zt as parseJsonObject } from "../../dist-CW4Cims4.mjs";
1
+ import { dt as storageCapability, ft as storageMigrationCapability, g as StorageMigrationJobSchema, h as StorageLocationTypeSchema, lt as settingsStoreCapability, yt as BaseAddon, zt as parseJsonObject } from "../../dist-Duz_uJSQ.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";
@@ -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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { It as hydrateSchema, vt as errMsg, yt as BaseAddon } from "../../dist-Duz_uJSQ.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-CQkr5Kw0.js");
6
+ const require_dist = require("../../dist-B2CtwVW2.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 { X as logDestinationCapability, yt as BaseAddon } from "../../dist-CW4Cims4.mjs";
1
+ import { X as logDestinationCapability, yt as BaseAddon } from "../../dist-Duz_uJSQ.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";
@@ -3669,7 +3669,7 @@ var RecordingBandSchema = zod.z.object({
3669
3669
  postBufferSec: zod.z.number().min(0).optional()
3670
3670
  });
3671
3671
  ({
3672
- preBufferSec: 10,
3672
+ preBufferSec: 15,
3673
3673
  postBufferSec: 30
3674
3674
  }).postBufferSec * 1e3;
3675
3675
  /**
@@ -14363,7 +14363,7 @@ var TrackEnvelopeSchema = zod.z.object({
14363
14363
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
14364
14364
  * keeps every scalar the list surfaces actually render (ids, class(es),
14365
14365
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
14366
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
14366
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
14367
14367
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
14368
14368
  * `getTrack`. Mirrors the event-store `projection` convention
14369
14369
  * (`getObjectEvents` et al.).
@@ -14658,6 +14658,35 @@ var TrackSchema = zod.z.object({
14658
14658
  */
14659
14659
  hasFace: zod.z.boolean().optional(),
14660
14660
  /**
14661
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
14662
+ * face an operator could ASSIGN to an identity.
14663
+ *
14664
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
14665
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
14666
+ * branch, before every gate, and means no more than "a face detector produced
14667
+ * a face detail". This one is stamped at the single moment the gallery row
14668
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
14669
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
14670
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
14671
+ * the crop-store drop. Everything between the detector and that insert can
14672
+ * legitimately refuse the face, so a flag written any earlier promises the
14673
+ * operator something to assign and delivers nothing.
14674
+ *
14675
+ * **Independent of recognition.** A face collected but never auto-matched is
14676
+ * still assignable — it is in fact the face an operator most wants to reach —
14677
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
14678
+ * `subLabel`; this says only that the raw material exists.
14679
+ *
14680
+ * **Set once, never cleared.** A track that produced a gallery row produced
14681
+ * one; deleting the row later is the gallery's business, not this flag's.
14682
+ *
14683
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
14684
+ * before the column omits it, and so does every server that predates the
14685
+ * field. A consumer must test `=== true` and render nothing otherwise —
14686
+ * never infer "no assignable face".
14687
+ */
14688
+ hasEmbeddedFace: zod.z.boolean().optional(),
14689
+ /**
14661
14690
  * This subject CONTAINS a folded rider — a person the rider-pairing step
14662
14691
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
14663
14692
  * so the passage is tracked once and as a VEHICLE.
@@ -16615,6 +16644,26 @@ var DetailResultSchema = zod.z.object({
16615
16644
  * the consuming gate treats as accept — never as reject.
16616
16645
  */
16617
16646
  embeddingMagnitude: zod.z.number().optional(),
16647
+ /**
16648
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
16649
+ * `label`, and for the same reason: the producing node is the only side that
16650
+ * knows which model actually ran, and re-deriving it downstream is exactly
16651
+ * the inference this model exists to forbid.
16652
+ *
16653
+ * Additive and optional, so a runner that predates it degrades to
16654
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
16655
+ * its previous assumption instead of refusing.
16656
+ *
16657
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
16658
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
16659
+ * with nothing on the wire it took the id from the GALLERY, so the gate
16660
+ * compared the gallery against itself and could never fire. That turned the
16661
+ * one guard protecting the face feature space into a tautology, and it is
16662
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
16663
+ * gallery as the catalog comment predicts — it would have scored the new
16664
+ * model's vectors against the old model's samples in one cosine space.
16665
+ */
16666
+ embeddingModelId: zod.z.string().optional(),
16618
16667
  label: zod.z.string().optional(),
16619
16668
  /**
16620
16669
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -18629,6 +18678,7 @@ var snapshotCapability = {
18629
18678
  isBattery: zod.z.boolean(),
18630
18679
  reason: zod.z.enum([
18631
18680
  "disabled",
18681
+ "offline",
18632
18682
  "sleeping",
18633
18683
  "unreachable",
18634
18684
  "waking"
@@ -18718,9 +18768,17 @@ targets: zod.z.array(zod.z.object({
18718
18768
  sleeping: zod.z.boolean(),
18719
18769
  /** Current device state rendered over the cached frame. State images
18720
18770
  * remain authoritative even when their photographic background is
18721
- * old; null means the link must carry a current camera frame. */
18771
+ * old; null means the link must carry a current camera frame.
18772
+ *
18773
+ * **This is the ONLY source a surface may derive an inactive tile
18774
+ * from.** A client that reads a device's `online`/`disabled` flags and
18775
+ * draws its own verdict will disagree with the pixels it is painting
18776
+ * — the frame comes from here, and so must the sentence over it
18777
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
18778
+ * state. */
18722
18779
  stateReason: zod.z.enum([
18723
18780
  "disabled",
18781
+ "offline",
18724
18782
  "sleeping",
18725
18783
  "unreachable",
18726
18784
  "waking"
@@ -37998,6 +38056,39 @@ TimelapseRuleInputSchema.extend({
37998
38056
  createdAt: zod.z.number(),
37999
38057
  updatedAt: zod.z.number()
38000
38058
  });
38059
+ Object.freeze(Object.fromEntries([{
38060
+ stepId: "face-embedding",
38061
+ label: "Face recognition model",
38062
+ defaultModelId: "arcface-r100",
38063
+ indexName: "the enrolled face gallery",
38064
+ options: [
38065
+ {
38066
+ id: "arcface-r100",
38067
+ label: "ArcFace (ResNet34)"
38068
+ },
38069
+ {
38070
+ id: "auraface-r100",
38071
+ label: "AuraFace R100"
38072
+ },
38073
+ {
38074
+ id: "inception-resnet-v1",
38075
+ label: "Inception ResNet V1"
38076
+ }
38077
+ ]
38078
+ }, {
38079
+ stepId: "clip-embedding",
38080
+ label: "Semantic search model",
38081
+ defaultModelId: "mobileclip-s1",
38082
+ indexName: "the object semantic-search index",
38083
+ options: [{
38084
+ id: "mobileclip-s1",
38085
+ label: "MobileCLIP S1"
38086
+ }, {
38087
+ id: "mobileclip-s2",
38088
+ label: "MobileCLIP S2"
38089
+ }]
38090
+ }].map((s) => [s.stepId, s.defaultModelId])));
38091
+ zod.z.string().min(1);
38001
38092
  zod.z.object({
38002
38093
  /**
38003
38094
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38018,10 +38109,21 @@ zod.z.object({
38018
38109
  */
38019
38110
  square: zod.z.boolean()
38020
38111
  });
38021
- ({
38112
+ /**
38113
+ * The convention in force when nobody has configured one — byte-for-byte the
38114
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38115
+ */
38116
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38022
38117
  paddingRatio: .15,
38023
38118
  square: false
38024
- }).paddingRatio;
38119
+ };
38120
+ Object.freeze({
38121
+ x: 0,
38122
+ y: 0,
38123
+ w: 1,
38124
+ h: 1
38125
+ });
38126
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38025
38127
  /**
38026
38128
  * WHICH delivered frames the decode worker retains a native copy of.
38027
38129
  *
@@ -3669,7 +3669,7 @@ var RecordingBandSchema = z.object({
3669
3669
  postBufferSec: z.number().min(0).optional()
3670
3670
  });
3671
3671
  ({
3672
- preBufferSec: 10,
3672
+ preBufferSec: 15,
3673
3673
  postBufferSec: 30
3674
3674
  }).postBufferSec * 1e3;
3675
3675
  /**
@@ -14363,7 +14363,7 @@ var TrackEnvelopeSchema = z.object({
14363
14363
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
14364
14364
  * keeps every scalar the list surfaces actually render (ids, class(es),
14365
14365
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
14366
- * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
14366
+ * zonesVisited, bestEventId, envelope, hasFace, hasEmbeddedFace, hasRider) and returns `positions` /
14367
14367
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
14368
14368
  * `getTrack`. Mirrors the event-store `projection` convention
14369
14369
  * (`getObjectEvents` et al.).
@@ -14658,6 +14658,35 @@ var TrackSchema = z.object({
14658
14658
  */
14659
14659
  hasFace: z.boolean().optional(),
14660
14660
  /**
14661
+ * This track has a face row IN THE GALLERY: a crop **and** an embedding — a
14662
+ * face an operator could ASSIGN to an identity.
14663
+ *
14664
+ * The STRICT twin of {@link hasFace}, and the pair only earns its keep
14665
+ * because the two disagree. `hasFace` is stamped at the TOP of the face
14666
+ * branch, before every gate, and means no more than "a face detector produced
14667
+ * a face detail". This one is stamped at the single moment the gallery row
14668
+ * LANDS — after `FaceRecognizer.onTrackEnd` successfully persists it, i.e.
14669
+ * past the embedding-magnitude verdict, the `minFacePx` detection gate, the
14670
+ * candidate gate, the imageless-track drop (no crop was ever captured) and
14671
+ * the crop-store drop. Everything between the detector and that insert can
14672
+ * legitimately refuse the face, so a flag written any earlier promises the
14673
+ * operator something to assign and delivers nothing.
14674
+ *
14675
+ * **Independent of recognition.** A face collected but never auto-matched is
14676
+ * still assignable — it is in fact the face an operator most wants to reach —
14677
+ * so this is NOT gated on `recognizedIdentityId`. Recognition lands in
14678
+ * `subLabel`; this says only that the raw material exists.
14679
+ *
14680
+ * **Set once, never cleared.** A track that produced a gallery row produced
14681
+ * one; deleting the row later is the gallery's business, not this flag's.
14682
+ *
14683
+ * **Absent ≠ false**, the same rule as {@link hasFace}: every row written
14684
+ * before the column omits it, and so does every server that predates the
14685
+ * field. A consumer must test `=== true` and render nothing otherwise —
14686
+ * never infer "no assignable face".
14687
+ */
14688
+ hasEmbeddedFace: z.boolean().optional(),
14689
+ /**
14661
14690
  * This subject CONTAINS a folded rider — a person the rider-pairing step
14662
14691
  * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
14663
14692
  * so the passage is tracked once and as a VEHICLE.
@@ -16615,6 +16644,26 @@ var DetailResultSchema = z.object({
16615
16644
  * the consuming gate treats as accept — never as reject.
16616
16645
  */
16617
16646
  embeddingMagnitude: z.number().optional(),
16647
+ /**
16648
+ * Model that produced `embedding` — the SAME contract `labelModelId` has for
16649
+ * `label`, and for the same reason: the producing node is the only side that
16650
+ * knows which model actually ran, and re-deriving it downstream is exactly
16651
+ * the inference this model exists to forbid.
16652
+ *
16653
+ * Additive and optional, so a runner that predates it degrades to
16654
+ * "unmeasurable" rather than to a wrong answer — the consumer falls back to
16655
+ * its previous assumption instead of refusing.
16656
+ *
16657
+ * Its absence was not cosmetic. `FaceRecognizer` needs the probe's model id
16658
+ * to use `face-matcher`'s same-model gate (`sample.modelId !== probe.modelId`);
16659
+ * with nothing on the wire it took the id from the GALLERY, so the gate
16660
+ * compared the gallery against itself and could never fire. That turned the
16661
+ * one guard protecting the face feature space into a tautology, and it is
16662
+ * why swapping `face-embedding`'s model would NOT have stranded the enrolled
16663
+ * gallery as the catalog comment predicts — it would have scored the new
16664
+ * model's vectors against the old model's samples in one cosine space.
16665
+ */
16666
+ embeddingModelId: z.string().optional(),
16618
16667
  label: z.string().optional(),
16619
16668
  /**
16620
16669
  * The tier `label` occupies, copied VERBATIM from the producing step's
@@ -18629,6 +18678,7 @@ var snapshotCapability = {
18629
18678
  isBattery: z.boolean(),
18630
18679
  reason: z.enum([
18631
18680
  "disabled",
18681
+ "offline",
18632
18682
  "sleeping",
18633
18683
  "unreachable",
18634
18684
  "waking"
@@ -18718,9 +18768,17 @@ targets: z.array(z.object({
18718
18768
  sleeping: z.boolean(),
18719
18769
  /** Current device state rendered over the cached frame. State images
18720
18770
  * remain authoritative even when their photographic background is
18721
- * old; null means the link must carry a current camera frame. */
18771
+ * old; null means the link must carry a current camera frame.
18772
+ *
18773
+ * **This is the ONLY source a surface may derive an inactive tile
18774
+ * from.** A client that reads a device's `online`/`disabled` flags and
18775
+ * draws its own verdict will disagree with the pixels it is painting
18776
+ * — the frame comes from here, and so must the sentence over it
18777
+ * (D190). Pair with `ageMs` for the age of the photograph behind the
18778
+ * state. */
18722
18779
  stateReason: z.enum([
18723
18780
  "disabled",
18781
+ "offline",
18724
18782
  "sleeping",
18725
18783
  "unreachable",
18726
18784
  "waking"
@@ -37998,6 +38056,39 @@ TimelapseRuleInputSchema.extend({
37998
38056
  createdAt: z.number(),
37999
38057
  updatedAt: z.number()
38000
38058
  });
38059
+ Object.freeze(Object.fromEntries([{
38060
+ stepId: "face-embedding",
38061
+ label: "Face recognition model",
38062
+ defaultModelId: "arcface-r100",
38063
+ indexName: "the enrolled face gallery",
38064
+ options: [
38065
+ {
38066
+ id: "arcface-r100",
38067
+ label: "ArcFace (ResNet34)"
38068
+ },
38069
+ {
38070
+ id: "auraface-r100",
38071
+ label: "AuraFace R100"
38072
+ },
38073
+ {
38074
+ id: "inception-resnet-v1",
38075
+ label: "Inception ResNet V1"
38076
+ }
38077
+ ]
38078
+ }, {
38079
+ stepId: "clip-embedding",
38080
+ label: "Semantic search model",
38081
+ defaultModelId: "mobileclip-s1",
38082
+ indexName: "the object semantic-search index",
38083
+ options: [{
38084
+ id: "mobileclip-s1",
38085
+ label: "MobileCLIP S1"
38086
+ }, {
38087
+ id: "mobileclip-s2",
38088
+ label: "MobileCLIP S2"
38089
+ }]
38090
+ }].map((s) => [s.stepId, s.defaultModelId])));
38091
+ z.string().min(1);
38001
38092
  z.object({
38002
38093
  /**
38003
38094
  * Fraction of the box's own size added on EACH side before cutting.
@@ -38018,10 +38109,21 @@ z.object({
38018
38109
  */
38019
38110
  square: z.boolean()
38020
38111
  });
38021
- ({
38112
+ /**
38113
+ * The convention in force when nobody has configured one — byte-for-byte the
38114
+ * behaviour of the pre-unification LIVE path (`DETAIL_CROP_PADDING_RATIO`).
38115
+ */
38116
+ var DEFAULT_DETAIL_CROP_CONVENTION = {
38022
38117
  paddingRatio: .15,
38023
38118
  square: false
38024
- }).paddingRatio;
38119
+ };
38120
+ Object.freeze({
38121
+ x: 0,
38122
+ y: 0,
38123
+ w: 1,
38124
+ h: 1
38125
+ });
38126
+ DEFAULT_DETAIL_CROP_CONVENTION.paddingRatio;
38025
38127
  /**
38026
38128
  * WHICH delivered frames the decode worker retains a native copy of.
38027
38129
  *
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-CQkr5Kw0.js");
3
+ const require_dist = require("./dist-B2CtwVW2.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_formatter = require("./formatter-DqAKDlvN.js");
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 { At as asNumber, B as extractNestedAddonId, Bt as parseJsonUnknown$1, Dt as ReadinessTimeoutError, Et as ReadinessRegistry, Ft as expandCapMethods, Gt as EventCategory$1, H as isArrayOutputSchema, Ht as resolveCapMount, J as lifecycleJobSchema, K as isVoidInput, Mt as createEvent, Nt as emitDownForOwnedCaps, Q as looseSchema, St as DEVICE_STATUS_METHOD, U as isCollectionArrayMethod, Ut as scopeKey, Vt as readinessKey, W as isObjectInput, Z as logLevelAtMost, bt as DATAPLANE_SECRET_HEADER$1, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, it as procedureAuthKey, jt as asString$1, kt as asJsonObject$1, ot as scopesAllowAddon, q as kebabToCamel, st as scopesAllowDeviceCap, t as ALL_CAPABILITY_DEFINITIONS, tt as objectInputDeclaresAddonId, vt as errMsg$1, xt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, y as addonSettingsCapability, zt as parseJsonObject } from "./dist-CW4Cims4.mjs";
2
+ import { At as asNumber, B as extractNestedAddonId, Bt as parseJsonUnknown$1, Dt as ReadinessTimeoutError, Et as ReadinessRegistry, Ft as expandCapMethods, Gt as EventCategory$1, H as isArrayOutputSchema, Ht as resolveCapMount, J as lifecycleJobSchema, K as isVoidInput, Mt as createEvent, Nt as emitDownForOwnedCaps, Q as looseSchema, St as DEVICE_STATUS_METHOD, U as isCollectionArrayMethod, Ut as scopeKey, Vt as readinessKey, W as isObjectInput, Z as logLevelAtMost, bt as DATAPLANE_SECRET_HEADER$1, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, it as procedureAuthKey, jt as asString$1, kt as asJsonObject$1, ot as scopesAllowAddon, q as kebabToCamel, st as scopesAllowDeviceCap, t as ALL_CAPABILITY_DEFINITIONS, tt as objectInputDeclaresAddonId, vt as errMsg$1, xt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, y as addonSettingsCapability, zt as parseJsonObject } from "./dist-Duz_uJSQ.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -1,4 +1,4 @@
1
- import { kt as asJsonObject } from "./dist-CW4Cims4.mjs";
1
+ import { kt as asJsonObject } from "./dist-Duz_uJSQ.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-CQkr5Kw0.js");
1
+ const require_dist = require("./dist-B2CtwVW2.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.111",
3
+ "version": "1.2.113",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",