@camstack/system 1.2.470 → 1.2.472

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 (93) hide show
  1. package/dist/addon-runner.js +248 -19
  2. package/dist/addon-runner.mjs +249 -20
  3. package/dist/addon-utils.mjs +1 -1
  4. package/dist/{agent-https-DmNQyAl7.mjs → agent-https-JhvY1axF.mjs} +1 -1
  5. package/dist/{agent-https-D_oo3PNv.js → agent-https-bnyFRK7Y.js} +1 -1
  6. package/dist/auth/user-manager.d.ts +2 -2
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  10. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  11. package/dist/builtins/alerts/alerts.addon.js +1 -1
  12. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  13. package/dist/builtins/autotrack/index.js +1 -1
  14. package/dist/builtins/autotrack/index.mjs +1 -1
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  16. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  17. package/dist/builtins/calendars/calendars.addon.js +1 -1
  18. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  19. package/dist/builtins/camera-grid/index.js +1 -1
  20. package/dist/builtins/camera-grid/index.mjs +1 -1
  21. package/dist/builtins/composer/composer.addon.js +2 -2
  22. package/dist/builtins/composer/composer.addon.mjs +2 -2
  23. package/dist/builtins/console-logging/index.js +1 -1
  24. package/dist/builtins/console-logging/index.mjs +1 -1
  25. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  26. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  27. package/dist/builtins/device-history/device-history.addon.js +1 -1
  28. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  29. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  30. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  31. package/dist/builtins/hub-forwarder/index.js +1 -1
  32. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  33. package/dist/builtins/keychain/index.js +3 -3
  34. package/dist/builtins/keychain/index.mjs +3 -3
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +9 -25
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +240 -39
  37. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +237 -38
  38. package/dist/builtins/liveness-monitor/liveness-reporter.d.ts +28 -0
  39. package/dist/builtins/liveness-monitor/storage-root-access.d.ts +53 -0
  40. package/dist/builtins/local-auth/local-auth.addon.js +2 -2
  41. package/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  42. package/dist/builtins/local-network/local-network.addon.js +2 -2
  43. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  44. package/dist/builtins/loki-logging/index.js +1 -1
  45. package/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  47. package/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  48. package/dist/builtins/platform-probe/coral-accelerators.d.ts +14 -4
  49. package/dist/builtins/platform-probe/index.js +9 -6
  50. package/dist/builtins/platform-probe/index.mjs +15 -12
  51. package/dist/builtins/record-entries/index.js +1 -1
  52. package/dist/builtins/record-entries/index.mjs +1 -1
  53. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/snapshot/index.js +1 -1
  56. package/dist/builtins/snapshot/index.mjs +1 -1
  57. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  59. package/dist/builtins/sqlite-storage/index.js +1 -1
  60. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  61. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  62. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  63. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  64. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  65. package/dist/builtins/system-config/system-config.addon.js +3 -3
  66. package/dist/builtins/system-config/system-config.addon.mjs +115 -115
  67. package/dist/builtins/winston-logging/index.js +1 -1
  68. package/dist/builtins/winston-logging/index.mjs +1 -1
  69. package/dist/{composition-sources-B0tqvf0t.mjs → composition-sources-BY6rFuAE.mjs} +1 -1
  70. package/dist/{composition-sources-CRJffEiB.js → composition-sources-D3h-tNoJ.js} +1 -1
  71. package/dist/{constants-WF1AqoKF.js → constants-CqbO6e9i.js} +1 -1
  72. package/dist/{constants--A505iuO.mjs → constants-zBiEodEM.mjs} +1 -1
  73. package/dist/{coral-accelerators-Cri32b7q.js → coral-accelerators-BSVsBVzt.js} +46 -11
  74. package/dist/{coral-accelerators-Dl-GnMHn.mjs → coral-accelerators-DBlgWB8k.mjs} +52 -17
  75. package/dist/{custom-action-registry-BGYDjTqY.mjs → custom-action-registry-DZSCLBuT.mjs} +37 -37
  76. package/dist/{device-ca-DYmToMp8.mjs → device-ca-BWTWWBcc.mjs} +1 -1
  77. package/dist/{device-ca-R4MZZtc0.js → device-ca-CfiIg3a9.js} +1 -1
  78. package/dist/{dist-X1r44BdF.mjs → dist-CdFkkmXW.mjs} +6845 -1651
  79. package/dist/{dist-DRL3rEfN.js → dist-DX5Fu3mV.js} +6845 -1651
  80. package/dist/file-host-worker.js +1 -1
  81. package/dist/file-host-worker.mjs +1 -1
  82. package/dist/{hub-mdns-ciao-DUoTS6jN.js → hub-mdns-ciao-C174UDzO.js} +2 -2
  83. package/dist/{hub-mdns-ciao-CZV5Hion.mjs → hub-mdns-ciao-CYp1Gipm.mjs} +2 -2
  84. package/dist/index.js +235 -17
  85. package/dist/index.mjs +453 -235
  86. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +24 -4
  87. package/dist/kernel/hwaccel/vaapi-init-probe.d.ts +29 -0
  88. package/dist/kernel/moleculer/runner-process-group.d.ts +4 -0
  89. package/dist/{restore-archive-Df6PsOHP.js → restore-archive-B2jIFfu_.js} +1 -1
  90. package/dist/{restore-archive-X0ciGMmO.mjs → restore-archive-BX0gaKtG.mjs} +94 -94
  91. package/dist/{wal-maintenance-DYvzJiuK.js → wal-maintenance-Dxqd5igw.js} +0 -0
  92. package/dist/{wal-maintenance-D6J_MmZ8.mjs → wal-maintenance-KHzJXlF2.mjs} +0 -0
  93. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { register } from "node:module";
2
2
  import * as fs$1 from "node:fs";
3
3
  import fs, { createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  import * as path from "node:path";
5
- import { dirname, isAbsolute, join } from "node:path";
5
+ import { basename, dirname, isAbsolute, join } from "node:path";
6
6
  import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry, ReadinessTimeoutError, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, createDeviceProxy, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, isProviderOptionalMethodName, maskUrlCredentials, normalizeAddonInitResult, readErrorI18n, readNodePin, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, withCapInputDefaults } from "@camstack/types/addon";
7
7
  import { execFile } from "node:child_process";
8
8
  import { promisify } from "node:util";
@@ -7423,7 +7423,7 @@ function toKebab(name) {
7423
7423
  return name.replace(/[A-Z]/g, (m, i) => (i > 0 ? "-" : "") + m.toLowerCase());
7424
7424
  }
7425
7425
  /**
7426
- * Parse an `op.path` (e.g. `"pipelineExecutor.getDefaultSteps"`) into
7426
+ * Parse an `op.path` (e.g. `"pipelineExecutor.getAvailableEngines"`) into
7427
7427
  * the capability name (kebab-case) and the method name.
7428
7428
  */
7429
7429
  function parsePath(path) {
@@ -7869,14 +7869,34 @@ function currentDelegateHost() {
7869
7869
  override: process.env[EDGETPU_LIB_ENV]
7870
7870
  };
7871
7871
  }
7872
- function countUsbCorals(devices, fsx) {
7873
- let count = 0;
7872
+ /** usbfs names a device `/dev/bus/usb/<busnum>/<devnum>`, each zero-padded to three digits. */
7873
+ function usbDeviceNode(device, fsx) {
7874
+ const bus = Number.parseInt(fsx.readUsbAttr(device, "busnum"), 10);
7875
+ const dev = Number.parseInt(fsx.readUsbAttr(device, "devnum"), 10);
7876
+ if (!Number.isInteger(bus) || !Number.isInteger(dev) || bus <= 0 || dev <= 0) return null;
7877
+ return `/dev/bus/usb/${String(bus).padStart(3, "0")}/${String(dev).padStart(3, "0")}`;
7878
+ }
7879
+ /**
7880
+ * USB units: sysfs is the HOST's view — a container whose `/dev/bus/usb`
7881
+ * mapping was removed still lists the stick under `/sys/bus/usb/devices`. A
7882
+ * listed Coral is usable only when its usbfs device node is in this process's
7883
+ * view AND opens read/write; otherwise it is present but not accessible.
7884
+ */
7885
+ function classifyUsb(devices, fsx) {
7886
+ let usable = 0;
7887
+ const inaccessibleNodes = [];
7874
7888
  for (const device of devices) {
7875
7889
  const vendor = fsx.readUsbAttr(device, "idVendor").toLowerCase();
7876
7890
  const product = fsx.readUsbAttr(device, "idProduct").toLowerCase();
7877
- if (CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) count++;
7891
+ if (!CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) continue;
7892
+ const node = usbDeviceNode(device, fsx);
7893
+ if (node !== null && fsx.exists(node) && fsx.canOpen(node)) usable++;
7894
+ else inaccessibleNodes.push(node ?? `/sys/bus/usb/devices/${device}`);
7878
7895
  }
7879
- return count;
7896
+ return {
7897
+ usable,
7898
+ inaccessibleNodes
7899
+ };
7880
7900
  }
7881
7901
  function countPciCorals(fsx) {
7882
7902
  let count = 0;
@@ -7919,7 +7939,9 @@ function classifyCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
7919
7939
  /**
7920
7940
  * Detect Coral Edge TPUs on USB and PCIe/M.2, with the evidence that decided.
7921
7941
  *
7922
- * - USB: every matching USB device counts (multiple Corals run concurrently).
7942
+ * - USB: every matching USB device counts (multiple Corals run concurrently),
7943
+ * usable only if its `/dev/bus/usb/<BBB>/<DDD>` node opens read/write — a
7944
+ * listed stick whose node is missing or refused is `device-not-accessible`.
7923
7945
  * - PCIe: the apex driver's units, each usable only if its device node opens;
7924
7946
  * a Coral PCI function the driver did not bind is `driver-missing`.
7925
7947
  * - Fallback: when the USB bus is NOT OBSERVABLE (`/sys/bus/usb/devices`
@@ -7936,18 +7958,28 @@ function classifyCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
7936
7958
  function detectCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
7937
7959
  const usbDevices = fsx.listUsbDevices();
7938
7960
  const usbBus = usbDevices !== null && usbDevices.length > 0 ? "observed" : "unobservable";
7939
- const usb = usbDevices === null ? 0 : countUsbCorals(usbDevices, fsx);
7961
+ const usb = usbDevices === null ? {
7962
+ usable: 0,
7963
+ inaccessibleNodes: []
7964
+ } : classifyUsb(usbDevices, fsx);
7965
+ const usbSeen = usb.usable + usb.inaccessibleNodes.length;
7966
+ const inaccessibleUsbNodes = usb.inaccessibleNodes;
7940
7967
  const pci = classifyPci(fsx);
7941
7968
  const units = [];
7942
- if (usb > 0) units.push({
7969
+ if (usb.usable > 0) units.push({
7943
7970
  bus: "usb",
7944
- count: usb
7971
+ count: usb.usable
7945
7972
  });
7946
7973
  if (pci.usable > 0) units.push({
7947
7974
  bus: "pci",
7948
7975
  count: pci.usable
7949
7976
  });
7950
7977
  const unavailable = [];
7978
+ if (usb.inaccessibleNodes.length > 0) unavailable.push({
7979
+ bus: "usb",
7980
+ count: usb.inaccessibleNodes.length,
7981
+ reason: "device-not-accessible"
7982
+ });
7951
7983
  if (pci.driverMissing > 0) unavailable.push({
7952
7984
  bus: "pci",
7953
7985
  count: pci.driverMissing,
@@ -7968,7 +8000,8 @@ function detectCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
7968
8000
  units
7969
8001
  },
7970
8002
  usbBus,
7971
- decidedBy: usb > 0 ? "usb-ids" : "pci"
8003
+ decidedBy: usbSeen > 0 ? "usb-ids" : "pci",
8004
+ inaccessibleUsbNodes
7972
8005
  };
7973
8006
  if (usbBus === "unobservable" && chooseEdgetpuDelegate({
7974
8007
  ...delegateHost,
@@ -7982,12 +8015,14 @@ function detectCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
7982
8015
  }]
7983
8016
  },
7984
8017
  usbBus,
7985
- decidedBy: "delegate-fallback"
8018
+ decidedBy: "delegate-fallback",
8019
+ inaccessibleUsbNodes
7986
8020
  };
7987
8021
  return {
7988
8022
  info: null,
7989
8023
  usbBus,
7990
- decidedBy: "none"
8024
+ decidedBy: "none",
8025
+ inaccessibleUsbNodes
7991
8026
  };
7992
8027
  }
7993
8028
  function safeListOrNull(dir) {
@@ -8035,6 +8070,148 @@ var nodeCoralFs = {
8035
8070
  }
8036
8071
  };
8037
8072
  //#endregion
8073
+ //#region src/kernel/hwaccel/vaapi-init-probe.ts
8074
+ /**
8075
+ * Can libva initialise the VA driver on this node's render node? (D926)
8076
+ *
8077
+ * Measured 2026-10-23 (intel-1.2.509, hub + little-unraid): Intel's iHD 25.2.4
8078
+ * exports only `__vaDriverInit_1_22`, the container's Ubuntu libva 2.20 looks
8079
+ * for `_1_20`, and `vaInitialize` failed — while the resolver kept offering
8080
+ * `qsv, vaapi`. Every session tried, failed and fell back to software: 722
8081
+ * `hwaccel 'vaapi' failed` lines a day and nothing that named the cause.
8082
+ *
8083
+ * One `vainfo --display drm --device <node>` per process answers it. A failure
8084
+ * reads the driver's exported `__vaDriverInit_1_N` so the verdict names the gap
8085
+ * (`driver iHD needs VA-API >= 1.22, libva has 1.20`). No `vainfo` on the host
8086
+ * (a bare install) is `unknown` — the resolver then behaves as it always did.
8087
+ */
8088
+ var VAINFO_TIMEOUT_MS = 1e4;
8089
+ var INIT_SYMBOL = /__vaDriverInit_(\d+)_(\d+)/g;
8090
+ var VA_API_VERSION = /VA-API version:? (\d+)\.(\d+)/;
8091
+ var DRIVER_OPEN = /Trying to open (\S+_drv_video\.so)/g;
8092
+ function newestInitVersion(symbols) {
8093
+ let best = null;
8094
+ for (const symbol of symbols) for (const m of symbol.matchAll(INIT_SYMBOL)) {
8095
+ const v = {
8096
+ major: Number(m[1]),
8097
+ minor: Number(m[2])
8098
+ };
8099
+ if (!best || v.major > best.major || v.major === best.major && v.minor > best.minor) best = v;
8100
+ }
8101
+ return best;
8102
+ }
8103
+ function lastMatch(text, re) {
8104
+ let last = null;
8105
+ for (const m of text.matchAll(re)) last = m[1] ?? null;
8106
+ return last;
8107
+ }
8108
+ function lastLine(text) {
8109
+ const lines = text.split("\n").map((l) => l.trim()).filter((l) => l.length > 0);
8110
+ return lines[lines.length - 1] ?? "no output";
8111
+ }
8112
+ function driverName(driverPath) {
8113
+ if (!driverPath) return "unknown";
8114
+ return basename(driverPath).replace(/_drv_video\.so$/, "");
8115
+ }
8116
+ /** Classify one vainfo run plus the driver's exported init symbols. Pure. */
8117
+ function classifyVainfo(run, driverSymbols) {
8118
+ const va = VA_API_VERSION.exec(run.output);
8119
+ const vaApiVersion = va ? `${va[1]}.${va[2]}` : null;
8120
+ const driverPath = lastMatch(run.output, DRIVER_OPEN);
8121
+ const needs = newestInitVersion(driverSymbols);
8122
+ const driverNeedsVaApi = needs ? `${needs.major}.${needs.minor}` : null;
8123
+ const base = {
8124
+ vaApiVersion,
8125
+ driverPath,
8126
+ driverNeedsVaApi
8127
+ };
8128
+ if (run.spawnError !== null) return {
8129
+ ...base,
8130
+ state: "unknown",
8131
+ summary: `vaapi: unknown (vainfo not run: ${run.spawnError})`
8132
+ };
8133
+ if (run.exitCode === 0) return {
8134
+ ...base,
8135
+ state: "ok",
8136
+ summary: `vaapi: ok (VA-API ${vaApiVersion ?? "?"}, driver ${driverName(driverPath)})`
8137
+ };
8138
+ const reason = needs !== null && va !== null && (needs.major > Number(va[1]) || needs.major === Number(va[1]) && needs.minor > Number(va[2])) ? `driver ${driverName(driverPath)} needs VA-API >= ${driverNeedsVaApi}, libva has ${vaApiVersion}` : lastLine(run.output);
8139
+ return {
8140
+ ...base,
8141
+ state: "init-failed",
8142
+ summary: `vaapi: init-failed (${reason})`
8143
+ };
8144
+ }
8145
+ /** Run `vainfo` against one render node; never throws. */
8146
+ function runVainfo(renderNode) {
8147
+ return new Promise((resolve) => {
8148
+ execFile("vainfo", [
8149
+ "--display",
8150
+ "drm",
8151
+ "--device",
8152
+ renderNode
8153
+ ], {
8154
+ timeout: VAINFO_TIMEOUT_MS,
8155
+ encoding: "utf8"
8156
+ }, (err, stdout, stderr) => {
8157
+ const output = `${stdout}\n${stderr}`;
8158
+ if (err === null) {
8159
+ resolve({
8160
+ exitCode: 0,
8161
+ output,
8162
+ spawnError: null
8163
+ });
8164
+ return;
8165
+ }
8166
+ const code = err.code;
8167
+ if (typeof code === "number") {
8168
+ resolve({
8169
+ exitCode: code,
8170
+ output,
8171
+ spawnError: null
8172
+ });
8173
+ return;
8174
+ }
8175
+ resolve({
8176
+ exitCode: null,
8177
+ output,
8178
+ spawnError: code ?? (err.killed ? "timeout" : err.message)
8179
+ });
8180
+ });
8181
+ });
8182
+ }
8183
+ /**
8184
+ * The `__vaDriverInit_N_M` names in a driver file, streamed (iHD is ~43 MB),
8185
+ * with an overlap so a name split across two chunks is still found.
8186
+ */
8187
+ function readDriverInitSymbols(driverPath) {
8188
+ return new Promise((resolve) => {
8189
+ const found = /* @__PURE__ */ new Set();
8190
+ let carry = "";
8191
+ const stream = createReadStream(driverPath, {
8192
+ encoding: "latin1",
8193
+ highWaterMark: 64 * 1024
8194
+ });
8195
+ stream.on("data", (chunk) => {
8196
+ const text = carry + String(chunk);
8197
+ for (const m of text.matchAll(INIT_SYMBOL)) if (m.index + m[0].length < text.length) found.add(m[0]);
8198
+ carry = text.slice(-32);
8199
+ });
8200
+ stream.on("error", () => resolve([]));
8201
+ stream.on("end", () => {
8202
+ for (const m of carry.matchAll(INIT_SYMBOL)) found.add(m[0]);
8203
+ resolve([...found].sort());
8204
+ });
8205
+ });
8206
+ }
8207
+ /** Probe one render node: vainfo, and on failure the driver's init symbols. */
8208
+ async function probeVaapiInit(renderNode) {
8209
+ const run = await runVainfo(renderNode);
8210
+ if (run.spawnError !== null || run.exitCode === 0) return classifyVainfo(run, []);
8211
+ const driverPath = lastMatch(run.output, DRIVER_OPEN);
8212
+ return classifyVainfo(run, driverPath ? await readDriverInitSymbols(driverPath) : []);
8213
+ }
8214
+ //#endregion
8038
8215
  //#region src/kernel/hwaccel/hwaccel-resolver.ts
8039
8216
  /**
8040
8217
  * Platform-probe for hardware video decode acceleration.
@@ -8104,7 +8281,23 @@ function probePlatform() {
8104
8281
  coral: classifyCoralAccelerator(nodeCoralFs)
8105
8282
  };
8106
8283
  }
8107
- function pickBackendsForPlatform(signals) {
8284
+ /** The backends that open their device through libva on Linux. */
8285
+ var LIBVA_BACKENDS = ["vaapi", "qsv"];
8286
+ /**
8287
+ * The preference list for these signals. A `vaapi` verdict of `init-failed`
8288
+ * (libva cannot initialise the driver — D926) removes every libva-backed
8289
+ * backend and names the cause in the rationale; `ok`, `unknown` or `null`
8290
+ * change nothing.
8291
+ */
8292
+ function pickBackendsForPlatform(signals, vaapi = null) {
8293
+ const res = pickBackendsFromSignals(signals);
8294
+ if (signals.platform !== "linux" || vaapi?.state !== "init-failed") return res;
8295
+ return {
8296
+ preferred: res.preferred.filter((b) => !LIBVA_BACKENDS.includes(b)),
8297
+ rationale: `${res.rationale} ${vaapi.summary} — vaapi/qsv withheld, decode runs in software.`
8298
+ };
8299
+ }
8300
+ function pickBackendsFromSignals(signals) {
8108
8301
  switch (signals.platform) {
8109
8302
  case "darwin": return {
8110
8303
  preferred: ["videotoolbox"],
@@ -8165,13 +8358,49 @@ function resolveHwAccel(prefer) {
8165
8358
  };
8166
8359
  return pickBackendsForPlatform(probePlatform());
8167
8360
  }
8361
+ var RENDER_NODE = "/dev/dri/renderD128";
8362
+ /** Process-wide: the VA init failure is logged once per process, not per resolver. */
8363
+ var PROCESS_VAAPI_REPORT = { reported: false };
8364
+ /** Process-wide: hub-main builds one resolver per in-process addon; vainfo runs once. */
8365
+ var PROCESS_VAAPI_PROBES = /* @__PURE__ */ new Map();
8366
+ function probeVaapiOncePerProcess(renderNode) {
8367
+ const known = PROCESS_VAAPI_PROBES.get(renderNode);
8368
+ if (known) return known;
8369
+ const probe = probeVaapiInit(renderNode);
8370
+ PROCESS_VAAPI_PROBES.set(renderNode, probe);
8371
+ return probe;
8372
+ }
8168
8373
  /**
8169
8374
  * Build the `IKernelHwAccel` provider used to populate `ctx.kernel.hwaccel`.
8170
- * Thin async wrapper around the sync `resolveHwAccel` function so the
8171
- * contract matches the per-node `$hwaccel.resolve` Moleculer action.
8172
- */
8173
- function createKernelHwAccel() {
8174
- return { resolve: async (prefer) => resolveHwAccel(prefer) };
8375
+ * An auto resolve on a Linux host with a render node asks libva ONCE per
8376
+ * provider whether it can initialise the driver (D926); an explicit override
8377
+ * is never second-guessed.
8378
+ */
8379
+ function createKernelHwAccel(options = {}) {
8380
+ const probeSignals = options.probeSignals ?? probePlatform;
8381
+ const probeVaapi = options.probeVaapi ?? probeVaapiOncePerProcess;
8382
+ const reportOnce = options.reportOnce ?? PROCESS_VAAPI_REPORT;
8383
+ let vaapi = null;
8384
+ const vaapiVerdict = async () => {
8385
+ if (vaapi === null) vaapi = probeVaapi(RENDER_NODE);
8386
+ const status = await vaapi;
8387
+ if (status.state === "init-failed" && !reportOnce.reported) {
8388
+ reportOnce.reported = true;
8389
+ options.logger?.error(`hwaccel: ${status.summary} — vaapi/qsv withheld, decode runs in software`, { meta: {
8390
+ renderNode: RENDER_NODE,
8391
+ vaApiVersion: status.vaApiVersion,
8392
+ driverPath: status.driverPath,
8393
+ driverNeedsVaApi: status.driverNeedsVaApi
8394
+ } });
8395
+ }
8396
+ return status;
8397
+ };
8398
+ return { resolve: async (prefer) => {
8399
+ if (prefer === "none" || prefer !== null && prefer !== void 0 && prefer.length > 0) return resolveHwAccel(prefer);
8400
+ const signals = probeSignals();
8401
+ if (signals.platform !== "linux" || !signals.hasRenderNode) return pickBackendsForPlatform(signals);
8402
+ return pickBackendsForPlatform(signals, await vaapiVerdict());
8403
+ } };
8175
8404
  }
8176
8405
  //#endregion
8177
8406
  //#region src/kernel/inference/inference-resolver.ts
@@ -10516,7 +10745,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
10516
10745
  value
10517
10746
  })
10518
10747
  };
10519
- const hwaccel = createKernelHwAccel();
10748
+ const hwaccel = createKernelHwAccel({ logger: scopedLogger });
10520
10749
  const inferenceEngine = createKernelInferenceEngine();
10521
10750
  return {
10522
10751
  localNodeId: nodeId,
@@ -1,3 +1,3 @@
1
- import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-BGYDjTqY.mjs";
1
+ import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-DZSCLBuT.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
3
3
  export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
@@ -1,4 +1,4 @@
1
- import { Ki as defineRecordKinds } from "./dist-X1r44BdF.mjs";
1
+ import { Ki as defineRecordKinds } from "./dist-CdFkkmXW.mjs";
2
2
  import { S as backdatedNotBefore, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-DK__ETIe.mjs";
3
3
  import { z } from "zod";
4
4
  import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-DRL3rEfN.js");
2
+ const require_dist = require("./dist-DX5Fu3mV.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import type { RecordKindHandle, SettingsStoreClient, TokenScope, UserRecord } from "@camstack/types";
1
+ import type { RecordKindHandle, SettingsStoreClient, UserRecord, UserScope } from "@camstack/types";
2
2
  import type { AuthManager } from "./auth-manager.js";
3
3
  import type { UserBody } from "../builtins/local-auth/record-kinds.js";
4
4
  export type { UserRecord };
@@ -8,7 +8,7 @@ interface CreateUserInput {
8
8
  isAdmin?: boolean;
9
9
  allowedProviders?: string[] | "*";
10
10
  allowedDevices?: Record<string, string[] | "*">;
11
- scopes?: TokenScope[];
11
+ scopes?: UserScope[];
12
12
  }
13
13
  type UpdatableUserFields = Partial<Pick<UserRecord, "isAdmin" | "allowedProviders" | "allowedDevices" | "scopes">>;
14
14
  /**
@@ -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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.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,8 +1,8 @@
1
- import { $r as errMsg, Da as EventCategory, _t as addonPagesCapability, ei as BaseAddon } from "../../dist-X1r44BdF.mjs";
1
+ import { $r as errMsg, Da as EventCategory, _t as addonPagesCapability, ei as BaseAddon } from "../../dist-CdFkkmXW.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";
5
- import * as fs from "node:fs";
5
+ import * as fs$1 from "node:fs";
6
6
  //#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
7
7
  /** Stable identity for an addon page, independent of which node reported it. */
8
8
  function pageKey(info) {
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
211
211
  const bundlePath = this.resolveBundlePath(addonId, bundle);
212
212
  if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
213
213
  try {
214
- const stat = fs.statSync(bundlePath);
214
+ const stat = fs$1.statSync(bundlePath);
215
215
  const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
216
216
  let v = this.bundleHashCache.get(cacheKey);
217
217
  if (v === void 0) {
218
- v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
218
+ v = createHash("sha1").update(fs$1.readFileSync(bundlePath)).digest("hex").slice(0, 12);
219
219
  this.bundleHashCache.set(cacheKey, v);
220
220
  }
221
221
  return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
@@ -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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.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,8 +1,8 @@
1
- import { $r as errMsg, Da as EventCategory, ei as BaseAddon, yt as addonWidgetsCapability } from "../../dist-X1r44BdF.mjs";
1
+ import { $r as errMsg, Da as EventCategory, ei as BaseAddon, yt as addonWidgetsCapability } from "../../dist-CdFkkmXW.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";
5
- import * as fs from "node:fs";
5
+ import * as fs$1 from "node:fs";
6
6
  //#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
7
7
  /**
8
8
  * Addon Widgets Aggregator — hub-local builtin that owns the singleton
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
204
204
  if (entryPath === null) return String(Math.floor(Date.now()));
205
205
  try {
206
206
  const dir = path$1.dirname(entryPath);
207
- const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
207
+ const files = fs$1.readdirSync(dir).filter((f) => fs$1.statSync(path$1.join(dir, f)).isFile()).sort();
208
208
  const cacheKey = `${dir}#${files.map((f) => {
209
- const s = fs.statSync(path$1.join(dir, f));
209
+ const s = fs$1.statSync(path$1.join(dir, f));
210
210
  return `${f}:${s.size}:${s.mtimeMs}`;
211
211
  }).join("|")}`;
212
212
  const cached = this.bundleHashCache.get(cacheKey);
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
214
214
  const hash = createHash("sha1");
215
215
  for (const f of files) {
216
216
  hash.update(f);
217
- hash.update(fs.readFileSync(path$1.join(dir, f)));
217
+ hash.update(fs$1.readFileSync(path$1.join(dir, f)));
218
218
  }
219
219
  const digest = hash.digest("hex").slice(0, 12);
220
220
  this.bundleHashCache.set(cacheKey, digest);
@@ -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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  //#region src/builtins/alerts/alert-episode-policy.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { $r as errMsg, Da as EventCategory, Ki as defineRecordKinds, St as alertsCapability, Ui as createEvent, bn as isAlertEpisodeSeverity, bt as alertEpisodeId, ei as BaseAddon, i as AlertSchema, xt as alertEpisodePayload, yn as isAlertEpisodeOpen } from "../../dist-X1r44BdF.mjs";
1
+ import { $r as errMsg, Da as EventCategory, Ki as defineRecordKinds, St as alertsCapability, Ui as createEvent, bn as isAlertEpisodeSeverity, bt as alertEpisodeId, ei as BaseAddon, i as AlertSchema, xt as alertEpisodePayload, yn as isAlertEpisodeOpen } from "../../dist-CdFkkmXW.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  //#region src/builtins/alerts/alert-episode-policy.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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.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 { $r as errMsg, Da as EventCategory, Et as bareAddonId, I as FIRST_LEVEL_MACRO_CLASSES, ea as isEvent, ei as BaseAddon, tr as ptzAutotrackCapability } from "../../dist-X1r44BdF.mjs";
1
+ import { $r as errMsg, Da as EventCategory, Et as bareAddonId, I as FIRST_LEVEL_MACRO_CLASSES, ea as isEvent, ei as BaseAddon, tr as ptzAutotrackCapability } from "../../dist-CdFkkmXW.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -3,9 +3,9 @@ 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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-Df6PsOHP.js");
8
+ const require_restore_archive = require("../../restore-archive-B2jIFfu_.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  let node_fs_promises = require("node:fs/promises");
11
11
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,10 +1,10 @@
1
- import { Da as EventCategory, Er as storageOccupancyCapability, Sa as toNodeId, Tt as backupCapability, Vn as mayWriteToLocation, ca as nodePin, ei as BaseAddon } from "../../dist-X1r44BdF.mjs";
1
+ import { Da as EventCategory, Er as storageOccupancyCapability, Sa as toNodeId, Tt as backupCapability, Vn as mayWriteToLocation, ca as nodePin, ei as BaseAddon } from "../../dist-CdFkkmXW.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-X0ciGMmO.mjs";
3
+ import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-BX0gaKtG.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fsp from "node:fs/promises";
6
6
  import * as path$1 from "node:path";
7
- import * as fs from "node:fs";
7
+ import * as fs$1 from "node:fs";
8
8
  //#region src/builtins/backup-orchestrator/backup-databases.ts
9
9
  /** Stable id of the seeded weekly schedule. */
10
10
  var WEEKLY_SCHEDULE_ID = "weekly-events-history";
@@ -1018,7 +1018,7 @@ async function downloadArchiveToCache(input) {
1018
1018
  location: input.locationId,
1019
1019
  relativePath: input.filename
1020
1020
  });
1021
- const writeStream = fs.createWriteStream(input.cachePath);
1021
+ const writeStream = fs$1.createWriteStream(input.cachePath);
1022
1022
  let offset = 0;
1023
1023
  try {
1024
1024
  while (offset < sizeBytes) {
@@ -2502,7 +2502,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
2502
2502
  });
2503
2503
  try {
2504
2504
  let offset = 0;
2505
- const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
2505
+ const stream = fs$1.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
2506
2506
  for await (const rawChunk of stream) {
2507
2507
  if (input.signal?.aborted) {
2508
2508
  stream.destroy();
@@ -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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/calendars/calendar-color.ts
@@ -1,4 +1,4 @@
1
- import { Ki as defineRecordKinds, Mt as calendarsCapability, ei as BaseAddon, g as CalendarPreferencesSchema } from "../../dist-X1r44BdF.mjs";
1
+ import { Ki as defineRecordKinds, Mt as calendarsCapability, ei as BaseAddon, g as CalendarPreferencesSchema } from "../../dist-CdFkkmXW.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/calendars/calendar-color.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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.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 { $r as errMsg, Da as EventCategory, Gn as motionCapability, Hn as memoizePinnedFfmpeg, N as DeclaredDevices, Nt as cameraGridLayoutCapability, Or as streamCatalogCapability, Qi as hydrateSchema, Qr as DeviceType, T as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ui as createEvent, X as MOTION_CLOSE_AFTER_MS, Xr as DeviceFeature, a as BaseDevice, ei as BaseAddon, qt as declarationOwnerNodeId, xr as snapshotCapability, zr as buildFfmpegArgs } from "../../dist-X1r44BdF.mjs";
1
+ import { $r as errMsg, Da as EventCategory, Gn as motionCapability, Hn as memoizePinnedFfmpeg, N as DeclaredDevices, Nt as cameraGridLayoutCapability, Or as streamCatalogCapability, Qi as hydrateSchema, Qr as DeviceType, T as DERIVED_CAMERA_SILENCED_CAP_NAMES, Ui as createEvent, X as MOTION_CLOSE_AFTER_MS, Xr as DeviceFeature, a as BaseDevice, ei as BaseAddon, qt as declarationOwnerNodeId, xr as snapshotCapability, zr as buildFfmpegArgs } from "../../dist-CdFkkmXW.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-DRL3rEfN.js");
7
- const require_composition_sources = require("../../composition-sources-CRJffEiB.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.js");
7
+ const require_composition_sources = require("../../composition-sources-D3h-tNoJ.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 { $r as errMsg, Br as cloneStatefulExpressionMemory, Da as EventCategory, Gr as compositionSliceKey, Hr as composedDeviceStableId, It as composerCapability, Jr as disarmRoseMemory, Kr as compositionSourceKey, Lt as compositionFieldKey, N as DeclaredDevices, Ot as buildCapabilityLookup, Qn as planComposition, Qr as DeviceType, Rr as COMPOSER_ADDON_ID, Ui as createEvent, Ur as compositionFeatureEnabled, Vr as composedDeviceRef, Wr as compositionItemFieldPath, Yr as toExpressionValue, a as BaseDevice, cn as evaluateCompositionField, d as COMPOSED_ITEM_FIXED_FIELDS, dn as expressionContainsBuiltinCall, ei as BaseAddon, qr as createStatefulExpressionMemory, r as ALL_CAPABILITY_DEFINITIONS } from "../../dist-X1r44BdF.mjs";
2
- import { n as normalizedNativeOwner } from "../../composition-sources-B0tqvf0t.mjs";
1
+ import { $r as errMsg, Br as cloneStatefulExpressionMemory, Da as EventCategory, Gr as compositionSliceKey, Hr as composedDeviceStableId, It as composerCapability, Jr as disarmRoseMemory, Kr as compositionSourceKey, Lt as compositionFieldKey, N as DeclaredDevices, Ot as buildCapabilityLookup, Qn as planComposition, Qr as DeviceType, Rr as COMPOSER_ADDON_ID, Ui as createEvent, Ur as compositionFeatureEnabled, Vr as composedDeviceRef, Wr as compositionItemFieldPath, Yr as toExpressionValue, a as BaseDevice, cn as evaluateCompositionField, d as COMPOSED_ITEM_FIXED_FIELDS, dn as expressionContainsBuiltinCall, ei as BaseAddon, qr as createStatefulExpressionMemory, r as ALL_CAPABILITY_DEFINITIONS } from "../../dist-CdFkkmXW.mjs";
2
+ import { n as normalizedNativeOwner } from "../../composition-sources-BY6rFuAE.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-DRL3rEfN.js");
6
+ const require_dist = require("../../dist-DX5Fu3mV.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 { Ln as logDestinationCapability, ei as BaseAddon } from "../../dist-X1r44BdF.mjs";
1
+ import { Ln as logDestinationCapability, ei as BaseAddon } from "../../dist-CdFkkmXW.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 = {