@camstack/server 1.2.809 → 1.2.811

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 (118) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/api/trpc/cap-router-runtime.js +3 -0
  3. package/dist/api/trpc/generated-cap-mounts.js +3 -1
  4. package/dist/api/trpc/generated-cap-routers.js +1869 -1789
  5. package/dist/core/addon/hub-addon-api.js +8 -1
  6. package/dist/core/moleculer/moleculer.service.js +3 -0
  7. package/package.json +10 -8
  8. package/system/dist/addon-runner.js +4 -1
  9. package/system/dist/addon-runner.mjs +5 -2
  10. package/system/dist/{agent-https-DS4b0ucn.mjs → agent-https-CyEBY3RB.mjs} +1 -1
  11. package/system/dist/{agent-https-CuChFRA2.js → agent-https-a3mE4PW4.js} +1 -1
  12. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  14. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  16. package/system/dist/builtins/alerts/alerts.addon.js +3 -101
  17. package/system/dist/builtins/alerts/alerts.addon.mjs +40 -134
  18. package/system/dist/builtins/autotrack/index.js +1 -1
  19. package/system/dist/builtins/autotrack/index.mjs +1 -1
  20. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  22. package/system/dist/builtins/backup-orchestrator/destination-policy.d.ts +1 -1
  23. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  24. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  25. package/system/dist/builtins/camera-grid/index.js +1 -1
  26. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  27. package/system/dist/builtins/composer/composer.addon.js +6 -5
  28. package/system/dist/builtins/composer/composer.addon.mjs +6 -5
  29. package/system/dist/builtins/console-logging/index.js +1 -1
  30. package/system/dist/builtins/console-logging/index.mjs +1 -1
  31. package/system/dist/builtins/core-blocks/core-blocks.addon.d.ts +2 -0
  32. package/system/dist/builtins/core-blocks/core-blocks.addon.js +358 -32
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +361 -35
  34. package/system/dist/builtins/core-blocks/hero-layout-service.d.ts +42 -0
  35. package/system/dist/builtins/core-blocks/remote-call-redirect.d.ts +1 -1
  36. package/system/dist/builtins/core-blocks/remote-service.d.ts +38 -0
  37. package/system/dist/builtins/device-history/device-history.addon.d.ts +5 -0
  38. package/system/dist/builtins/device-history/device-history.addon.js +357 -18
  39. package/system/dist/builtins/device-history/device-history.addon.mjs +357 -18
  40. package/system/dist/builtins/device-history/retention/retention.d.ts +14 -1
  41. package/system/dist/builtins/device-history/transitions/device-transitions-record-kinds.d.ts +14 -0
  42. package/system/dist/builtins/device-history/transitions/transitions-service.d.ts +80 -0
  43. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
  44. package/system/dist/builtins/device-manager/device-manager.addon.js +712 -18
  45. package/system/dist/builtins/device-manager/device-manager.addon.mjs +780 -95
  46. package/system/dist/builtins/device-manager/device-state-mirror.d.ts +7 -0
  47. package/system/dist/builtins/device-manager/transitions/command-args.d.ts +4 -0
  48. package/system/dist/builtins/device-manager/transitions/transition-correlator.d.ts +68 -0
  49. package/system/dist/builtins/device-manager/transitions/transitions-sender.d.ts +37 -0
  50. package/system/dist/builtins/device-manager/transitions/transitions-wiring.d.ts +25 -0
  51. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  52. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  53. package/system/dist/builtins/keychain/index.js +4 -4
  54. package/system/dist/builtins/keychain/index.mjs +4 -4
  55. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  56. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  57. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  58. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  59. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  60. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  61. package/system/dist/builtins/loki-logging/index.js +8 -2
  62. package/system/dist/builtins/loki-logging/index.mjs +8 -2
  63. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  64. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  65. package/system/dist/builtins/platform-probe/index.js +1 -1
  66. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  67. package/system/dist/builtins/record-entries/index.js +1 -1
  68. package/system/dist/builtins/record-entries/index.mjs +1 -1
  69. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  70. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  71. package/system/dist/builtins/snapshot/index.js +1 -1
  72. package/system/dist/builtins/snapshot/index.mjs +1 -1
  73. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  74. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  75. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  76. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  77. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  78. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  79. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +0 -6
  80. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  81. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  82. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  83. package/system/dist/builtins/system-config/system-config.addon.mjs +7 -7
  84. package/system/dist/builtins/winston-logging/index.js +1 -1
  85. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  86. package/system/dist/{capture-engine-Byc5Fkp0.js → capture-engine-BO9mSlY-.js} +1 -1
  87. package/system/dist/{capture-engine-CnVIcnyN.mjs → capture-engine-ByF-6AFH.mjs} +1 -1
  88. package/system/dist/{composition-sources-BhM6G9QT.mjs → composition-sources-AziMFo7T.mjs} +1 -1
  89. package/system/dist/{composition-sources-BxK6ttP9.js → composition-sources-BMJUPUh2.js} +1 -1
  90. package/system/dist/{constants-Bf1PEHRU.mjs → constants-CTikgsC_.mjs} +1 -1
  91. package/system/dist/{constants--xo6Q-KA.js → constants-CjRlgRlu.js} +1 -1
  92. package/system/dist/{device-ca-Do0-HV_h.mjs → device-ca-CNRlFqFC.mjs} +1 -1
  93. package/system/dist/{device-ca-Uq5KGFSq.js → device-ca-Dxl6kVcJ.js} +1 -1
  94. package/system/dist/{dist-CogtCQxu.mjs → dist-BPq13Y8j.mjs} +17544 -15612
  95. package/system/dist/{dist-2SHQaxaS.js → dist-CkJnelZr.js} +17615 -15617
  96. package/system/dist/file-host-worker.js +1 -1
  97. package/system/dist/file-host-worker.mjs +1 -1
  98. package/system/dist/{hub-mdns-ciao-aFHCKrif.mjs → hub-mdns-ciao-CrjItezp.mjs} +2 -2
  99. package/system/dist/{hub-mdns-ciao-DqPrLiYH.js → hub-mdns-ciao-Cx6yJBl9.js} +2 -2
  100. package/system/dist/index.js +67 -75
  101. package/system/dist/index.mjs +53 -68
  102. package/system/dist/kernel/cap-router-builder.d.ts +9 -0
  103. package/system/dist/kernel/command-observation.d.ts +76 -0
  104. package/system/dist/kernel/index.d.ts +2 -0
  105. package/system/dist/kernel/transport/child-cap-protocol.d.ts +10 -1
  106. package/system/dist/kernel/transport/local-child-registry.d.ts +15 -0
  107. package/system/dist/{legacy-integration-rows-door-Bz8rivxI.js → legacy-integration-rows-door-CKM-LxvL.js} +1 -1
  108. package/system/dist/{legacy-integration-rows-door-CiuxDLoc.mjs → legacy-integration-rows-door-Dxcqwc-w.mjs} +1 -1
  109. package/system/dist/log-redactor-BhIEMaG9.js +149 -0
  110. package/system/dist/log-redactor-XLDrPzOi.mjs +120 -0
  111. package/system/dist/logging/log-redactor.d.ts +2 -0
  112. package/system/dist/{restore-archive-PlBC2NwT.mjs → restore-archive-BFA-hEhX.mjs} +5 -5
  113. package/system/dist/{restore-archive-D-3wmHDq.js → restore-archive-BQWOdGAB.js} +1 -1
  114. package/system/dist/{retention-BNONb5X_.js → retention-BcOSL6b9.js} +33 -2
  115. package/system/dist/{retention-B9l9TnGE.mjs → retention-CUOVI1p7.mjs} +33 -2
  116. package/system/dist/{wal-maintenance-BTR55y--.js → wal-maintenance-CiCgL4Hp.js} +0 -0
  117. package/system/dist/{wal-maintenance-jrhYTCn2.mjs → wal-maintenance-zJ4-ORo6.mjs} +0 -0
  118. package/system/package.json +7 -1
@@ -1,8 +1,8 @@
1
- import { Hs as defineRecordKinds, Ic as EventCategory$1, Ko as BaseAddon, Kr as isAlertEpisodeOpen, Ls as createEvent$1, Pc as errMsg$1, bn as alertsCapability, f as AlertSchema, qr as isAlertEpisodeSeverity, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload } from "../../dist-CogtCQxu.mjs";
1
+ import { Gc as errMsg, Jr as isAlertEpisodeOpen, Ks as createEvent, Xo as BaseAddon, Yr as isAlertEpisodeSeverity, Zs as defineRecordKinds, _n as alertEpisodeId, f as AlertSchema, qc as EventCategory, vn as alertEpisodePayload, w as CORE_BLOCK_ADDON_PREFIX, yn as alertsCapability } from "../../dist-BPq13Y8j.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
+ import { a as redactLogText } from "../../log-redactor-XLDrPzOi.mjs";
3
4
  import * as fs$1 from "node:fs";
4
5
  import * as path$1 from "node:path";
5
- import { maskUrlCredentials, scrubKnownSecrets } from "@camstack/types/addon";
6
6
  //#region src/builtins/alerts/alert-episode-policy.ts
7
7
  /**
8
8
  * When does an alert open a new EPISODE, and which edge of it is announced?
@@ -112,100 +112,6 @@ function selectOverflow(alerts, maxAlerts) {
112
112
  return [...byAge.filter((a) => a.read), ...byAge.filter((a) => !a.read)].slice(0, excess).map((a) => a.id);
113
113
  }
114
114
  //#endregion
115
- //#region src/logging/log-redactor.ts
116
- var REDACTED = "***";
117
- /** Credential-named keys. Substring, case-insensitive; only STRING values are replaced. */
118
- var SECRET_KEY_SUBSTRINGS = [
119
- "password",
120
- "passwd",
121
- "secret",
122
- "token",
123
- "apikey",
124
- "api_key",
125
- "authkey",
126
- "auth_key",
127
- "privatekey",
128
- "private_key",
129
- "passphrase",
130
- "credential",
131
- "cookie"
132
- ];
133
- /** True when a meta key names a credential. */
134
- function isCredentialKeyName(key) {
135
- const lower = key.toLowerCase();
136
- return SECRET_KEY_SUBSTRINGS.some((needle) => lower.includes(needle));
137
- }
138
- var URL_IN_TEXT = /\b[a-z][a-z0-9+.-]*:\/\/[^\s"'<>`]+/gi;
139
- /** A root-relative path WITH a query, as request logs print it. */
140
- var RELATIVE_URL_IN_TEXT = /(^|[\s"'(=])(\/[^\s"'<>`?]*\?[^\s"'<>`]+)/g;
141
- var CREDENTIAL_FLAG = /(--(?:token|auth-?key|password|passwd|pass|secret|api-?key|access-?token|refresh-?token)(?:=|\s+))(\S+)/gi;
142
- /** Redact one free-form string. */
143
- function redactLogText(text) {
144
- let out = scrubKnownSecrets(text);
145
- if (out.includes("://")) out = out.replace(URL_IN_TEXT, (url) => maskUrlCredentials(url));
146
- if (out.includes("/") && out.includes("?") && out.includes("=")) out = out.replace(RELATIVE_URL_IN_TEXT, (_m, lead, path) => `${lead}${maskUrlCredentials(path)}`);
147
- if (out.includes("--")) out = out.replace(CREDENTIAL_FLAG, (_m, flag, value) => value.startsWith("‹secret:") ? `${flag}${value}` : `${flag}${REDACTED}`);
148
- return out;
149
- }
150
- /** Bounds on the meta walk — a log line is not a place to traverse a graph. */
151
- var MAX_DEPTH = 8;
152
- var MAX_NODES = 2e3;
153
- /**
154
- * Redact a value, returning the SAME reference when nothing in it changed —
155
- * most lines carry clean meta, and copying every one would put an allocation
156
- * per log line on hub-main's event loop.
157
- */
158
- function redactValue(value, depth, budget, seen) {
159
- if (budget.nodes++ > MAX_NODES) return value;
160
- if (typeof value === "string") return redactLogText(value);
161
- if (value === null || typeof value !== "object") return value;
162
- if (depth >= MAX_DEPTH || seen.has(value)) return value;
163
- if (value instanceof Error) {
164
- const message = redactLogText(value.message);
165
- return message === value.message ? value : message;
166
- }
167
- if (value instanceof Date || ArrayBuffer.isView(value) || value instanceof ArrayBuffer) return value;
168
- seen.add(value);
169
- if (Array.isArray(value)) {
170
- let copy = null;
171
- for (let i = 0; i < value.length; i++) {
172
- const item = value[i];
173
- const next = redactValue(item, depth + 1, budget, seen);
174
- if (next !== item) {
175
- copy ??= [...value];
176
- copy[i] = next;
177
- }
178
- }
179
- return copy ?? value;
180
- }
181
- let copy = null;
182
- for (const [key, child] of Object.entries(value)) {
183
- const next = typeof child === "string" && child.length > 0 && isCredentialKeyName(key) ? REDACTED : redactValue(child, depth + 1, budget, seen);
184
- if (next !== child) {
185
- copy ??= { ...value };
186
- copy[key] = next;
187
- }
188
- }
189
- return copy ?? value;
190
- }
191
- /** Redact a `meta` record; the same object back when it was already clean. */
192
- function redactLogMeta(meta) {
193
- const out = redactValue(meta, 0, { nodes: 0 }, /* @__PURE__ */ new WeakSet());
194
- if (out === meta) return meta;
195
- return out !== null && typeof out === "object" && !Array.isArray(out) ? Object.fromEntries(Object.entries(out)) : meta;
196
- }
197
- /** Redact a whole entry: message and meta. Tags are identifiers, left alone. */
198
- function redactLogEntry(entry) {
199
- const message = redactLogText(entry.message);
200
- const meta = entry.meta !== void 0 ? redactLogMeta(entry.meta) : void 0;
201
- if (message === entry.message && meta === entry.meta) return entry;
202
- return {
203
- ...entry,
204
- message,
205
- ...meta !== void 0 ? { meta } : {}
206
- };
207
- }
208
- //#endregion
209
115
  //#region src/kernel/moleculer/runner-failure-info.ts
210
116
  /**
211
117
  * What the hub knows about a runner that gave up, read at the moment it
@@ -620,7 +526,7 @@ function planMigrationAlerts(ledger, open, now) {
620
526
  faultedIds.add(id);
621
527
  raise.push({
622
528
  id,
623
- category: EventCategory$1.MigrationFailed,
529
+ category: EventCategory.MigrationFailed,
624
530
  severity,
625
531
  title: entry.status === "skipped-newer" ? "Database is newer than this version" : "Migration failed",
626
532
  message: messageOf(entry),
@@ -1066,63 +972,63 @@ var AlertCenterAddon = class extends BaseAddon {
1066
972
  await this.handleRunnerEvent(category, event);
1067
973
  return;
1068
974
  }
1069
- if (category === EventCategory$1.ProcessStateChanged) {
975
+ if (category === EventCategory.ProcessStateChanged) {
1070
976
  await this.handleRunnerStateChanged(event);
1071
977
  return;
1072
978
  }
1073
- if (category === EventCategory$1.SystemRunnerCheck) {
979
+ if (category === EventCategory.SystemRunnerCheck) {
1074
980
  await this.handleRunnerCheck(event);
1075
981
  return;
1076
982
  }
1077
- if (category === EventCategory$1.AddonLoadFailed) {
983
+ if (category === EventCategory.AddonLoadFailed) {
1078
984
  await this.handleAddonLoadFailed(event);
1079
985
  return;
1080
986
  }
1081
- if (category === EventCategory$1.AddonLoadRecovered) {
987
+ if (category === EventCategory.AddonLoadRecovered) {
1082
988
  await this.handleAddonLoadRecovered(event);
1083
989
  return;
1084
990
  }
1085
- if (category === EventCategory$1.AddonUnsupportedVersion) {
991
+ if (category === EventCategory.AddonUnsupportedVersion) {
1086
992
  await this.handleAddonUnsupportedVersion(event);
1087
993
  return;
1088
994
  }
1089
- if (category === EventCategory$1.AddonUnsupportedResolved) {
995
+ if (category === EventCategory.AddonUnsupportedResolved) {
1090
996
  await this.handleAddonUnsupportedResolved(event);
1091
997
  return;
1092
998
  }
1093
- if (category === EventCategory$1.SystemLivenessFailed) {
999
+ if (category === EventCategory.SystemLivenessFailed) {
1094
1000
  await this.handleLivenessFailed(event);
1095
1001
  return;
1096
1002
  }
1097
- if (category === EventCategory$1.SystemLivenessRecovered) {
1003
+ if (category === EventCategory.SystemLivenessRecovered) {
1098
1004
  await this.handleLivenessRecovered(event);
1099
1005
  return;
1100
1006
  }
1101
- if (category === EventCategory$1.StreamOffline) {
1007
+ if (category === EventCategory.StreamOffline) {
1102
1008
  await this.handleStreamOffline(event);
1103
1009
  return;
1104
1010
  }
1105
- if (category === EventCategory$1.StreamOnline) {
1011
+ if (category === EventCategory.StreamOnline) {
1106
1012
  await this.handleStreamOnline(event);
1107
1013
  return;
1108
1014
  }
1109
- if (category === EventCategory$1.MigrationFailed || category === EventCategory$1.MigrationApplied) {
1015
+ if (category === EventCategory.MigrationFailed || category === EventCategory.MigrationApplied) {
1110
1016
  await this.reconcileMigrationAlerts();
1111
1017
  return;
1112
1018
  }
1113
- if (category === EventCategory$1.NotificationRuleBroken) {
1019
+ if (category === EventCategory.NotificationRuleBroken) {
1114
1020
  await this.handleRuleBroken(event);
1115
1021
  return;
1116
1022
  }
1117
- if (category === EventCategory$1.NotificationRuleRepaired) {
1023
+ if (category === EventCategory.NotificationRuleRepaired) {
1118
1024
  await this.handleRuleRepaired(event);
1119
1025
  return;
1120
1026
  }
1121
- if (category === EventCategory$1.AgentOnline) {
1027
+ if (category === EventCategory.AgentOnline) {
1122
1028
  await this.reconcileClusterAlerts();
1123
1029
  return;
1124
1030
  }
1125
- if (category === EventCategory$1.SystemRestartCompleted) {
1031
+ if (category === EventCategory.SystemRestartCompleted) {
1126
1032
  this.noteRestartCompleted(event);
1127
1033
  await this.reconcileClusterAlerts();
1128
1034
  }
@@ -1156,7 +1062,7 @@ var AlertCenterAddon = class extends BaseAddon {
1156
1062
  } catch (err) {
1157
1063
  this.ctx.logger?.warn("Failed to handle event", { meta: {
1158
1064
  category,
1159
- error: errMsg$1(err)
1065
+ error: errMsg(err)
1160
1066
  } });
1161
1067
  }
1162
1068
  }
@@ -1384,7 +1290,7 @@ var AlertCenterAddon = class extends BaseAddon {
1384
1290
  } else {
1385
1291
  const alert = {
1386
1292
  id: stableId,
1387
- category: EventCategory$1.ModelDownloadProgress,
1293
+ category: EventCategory.ModelDownloadProgress,
1388
1294
  severity: "info",
1389
1295
  title: "Model download",
1390
1296
  message: `Downloading model "${modelId}" — ${String(Math.round(progress))}%`,
@@ -1466,7 +1372,7 @@ var AlertCenterAddon = class extends BaseAddon {
1466
1372
  const message = errorObj?.message ? `${addonId ? `${addonId} — ` : ""}${errorObj.message}` : `Addon ${addonId ?? packageName} failed to load`;
1467
1373
  const alert = {
1468
1374
  id: stableId,
1469
- category: EventCategory$1.AddonLoadFailed,
1375
+ category: EventCategory.AddonLoadFailed,
1470
1376
  severity: "error",
1471
1377
  title: `Addon failed: ${addonId ?? packageName}`,
1472
1378
  message,
@@ -1502,7 +1408,7 @@ var AlertCenterAddon = class extends BaseAddon {
1502
1408
  } catch (err) {
1503
1409
  this.ctx.logger?.debug("AddonLoadRecovered: dismiss failed (likely already dismissed)", { meta: {
1504
1410
  stableId,
1505
- error: errMsg$1(err)
1411
+ error: errMsg(err)
1506
1412
  } });
1507
1413
  }
1508
1414
  }
@@ -1524,7 +1430,7 @@ var AlertCenterAddon = class extends BaseAddon {
1524
1430
  const required = minimum === null ? unmet.join("; ") : `requires >= ${minimum}`;
1525
1431
  const alert = {
1526
1432
  id: `${ADDON_UNSUPPORTED_ALERT_PREFIX}${nodeId}:${packageName}`,
1527
- category: EventCategory$1.AddonUnsupportedVersion,
1433
+ category: EventCategory.AddonUnsupportedVersion,
1528
1434
  severity: "warning",
1529
1435
  title: `Addon version unsupported: ${addonId}`,
1530
1436
  message: `${addonId} on ${nodeId} runs ${installed}, but server ${server} ${required}. It keeps running; update the package.`,
@@ -1558,7 +1464,7 @@ var AlertCenterAddon = class extends BaseAddon {
1558
1464
  } catch (err) {
1559
1465
  this.ctx.logger?.debug("AddonUnsupportedResolved: dismiss failed (likely already dismissed)", { meta: {
1560
1466
  stableId,
1561
- error: errMsg$1(err)
1467
+ error: errMsg(err)
1562
1468
  } });
1563
1469
  }
1564
1470
  }
@@ -1579,7 +1485,7 @@ var AlertCenterAddon = class extends BaseAddon {
1579
1485
  const actionLabel = typeof data["actionLabel"] === "string" ? data["actionLabel"] : "Open";
1580
1486
  const alert = {
1581
1487
  id: findingId,
1582
- category: EventCategory$1.SystemLivenessFailed,
1488
+ category: EventCategory.SystemLivenessFailed,
1583
1489
  severity,
1584
1490
  title: String(data["title"] ?? "Node liveness"),
1585
1491
  message: String(data["message"] ?? ""),
@@ -1611,7 +1517,7 @@ var AlertCenterAddon = class extends BaseAddon {
1611
1517
  } catch (err) {
1612
1518
  this.ctx.logger?.debug("LivenessRecovered: dismiss failed (likely already dismissed)", { meta: {
1613
1519
  findingId,
1614
- error: errMsg$1(err)
1520
+ error: errMsg(err)
1615
1521
  } });
1616
1522
  }
1617
1523
  }
@@ -1632,7 +1538,7 @@ var AlertCenterAddon = class extends BaseAddon {
1632
1538
  const label = name ?? `Camera ${String(deviceId)}`;
1633
1539
  const alert = {
1634
1540
  id: `stream-offline:${String(deviceId)}`,
1635
- category: EventCategory$1.StreamOffline,
1541
+ category: EventCategory.StreamOffline,
1636
1542
  severity: "warning",
1637
1543
  title: "Stream offline",
1638
1544
  message: `${label} — ${camStreamIds.length > 0 ? camStreamIds.join(", ") : "its stream"} stopped sending video (${reason}).`,
@@ -1668,7 +1574,7 @@ var AlertCenterAddon = class extends BaseAddon {
1668
1574
  const what = reason === "unparseable" ? "cannot be loaded and sends nothing — open it and save it again" : reason === "device-deleted" ? `still names a deleted device (${offendingIds.join(", ")}) and was switched off` : reason === "target-deleted" ? `still sends to a deleted destination (${offendingIds.join(", ")}) and was switched off` : "cannot work";
1669
1575
  const alert = {
1670
1576
  id: `nc-rule-broken:${ruleId}`,
1671
- category: EventCategory$1.NotificationRuleBroken,
1577
+ category: EventCategory.NotificationRuleBroken,
1672
1578
  severity: "warning",
1673
1579
  title: "Notification rule broken",
1674
1580
  message: `Rule "${ruleName}" ${what}.`,
@@ -1721,14 +1627,14 @@ var AlertCenterAddon = class extends BaseAddon {
1721
1627
  if (ids.length === 0) return;
1722
1628
  this.ctx.logger?.info("cluster alerts resolved from the node list", { meta: { count: ids.length } });
1723
1629
  } catch (err) {
1724
- this.ctx.logger?.warn("cluster alerts: reconcile failed", { meta: { error: errMsg$1(err) } });
1630
+ this.ctx.logger?.warn("cluster alerts: reconcile failed", { meta: { error: errMsg(err) } });
1725
1631
  }
1726
1632
  }
1727
1633
  async readClusterNodes() {
1728
1634
  try {
1729
1635
  return (await this.ctx.api.nodes.directory.query()).nodes;
1730
1636
  } catch (err) {
1731
- this.ctx.logger?.warn("cluster alerts: reconcile skipped, the node list could not be read", { meta: { error: errMsg$1(err) } });
1637
+ this.ctx.logger?.warn("cluster alerts: reconcile skipped, the node list could not be read", { meta: { error: errMsg(err) } });
1732
1638
  return null;
1733
1639
  }
1734
1640
  }
@@ -1744,7 +1650,7 @@ var AlertCenterAddon = class extends BaseAddon {
1744
1650
  for (const alert of plan.raise) await this.emitAlert(alert);
1745
1651
  for (const alertId of plan.dismiss) await this.dismiss(alertId);
1746
1652
  } catch (err) {
1747
- this.ctx.logger.warn("migration alerts: reconcile skipped, the ledger could not be read", { meta: { error: errMsg$1(err) } });
1653
+ this.ctx.logger.warn("migration alerts: reconcile skipped, the ledger could not be read", { meta: { error: errMsg(err) } });
1748
1654
  }
1749
1655
  }
1750
1656
  /** The rule works again — drop its broken-rule card. */
@@ -1757,7 +1663,7 @@ var AlertCenterAddon = class extends BaseAddon {
1757
1663
  } catch (err) {
1758
1664
  this.ctx.logger?.debug("NotificationRuleRepaired: dismiss failed (likely already dismissed)", { meta: {
1759
1665
  stableId,
1760
- error: errMsg$1(err)
1666
+ error: errMsg(err)
1761
1667
  } });
1762
1668
  }
1763
1669
  }
@@ -1772,7 +1678,7 @@ var AlertCenterAddon = class extends BaseAddon {
1772
1678
  } catch (err) {
1773
1679
  this.ctx.logger?.debug("StreamOnline: dismiss failed (likely already dismissed)", { meta: {
1774
1680
  stableId,
1775
- error: errMsg$1(err)
1681
+ error: errMsg(err)
1776
1682
  } });
1777
1683
  }
1778
1684
  }
@@ -1786,7 +1692,7 @@ var AlertCenterAddon = class extends BaseAddon {
1786
1692
  const pattern = deviceId === void 0 ? /^stream-offline:\d+:.+/ : new RegExp(`^stream-offline:${String(deviceId)}:.+`);
1787
1693
  for (const alert of await this.listAlerts({ limit: 1e3 })) if (alert.status === "active" && pattern.test(alert.id)) await this.dismiss(alert.id);
1788
1694
  } catch (err) {
1789
- this.ctx.logger?.debug("legacy stream cards: sweep failed", { meta: { error: errMsg$1(err) } });
1695
+ this.ctx.logger?.debug("legacy stream cards: sweep failed", { meta: { error: errMsg(err) } });
1790
1696
  }
1791
1697
  }
1792
1698
  /**
@@ -1812,7 +1718,7 @@ var AlertCenterAddon = class extends BaseAddon {
1812
1718
  } catch (err) {
1813
1719
  this.ctx.logger?.debug("resolveRunnerName failed, showing the runner id", { meta: {
1814
1720
  runnerId,
1815
- error: errMsg$1(err)
1721
+ error: errMsg(err)
1816
1722
  } });
1817
1723
  return;
1818
1724
  } finally {
@@ -1826,7 +1732,7 @@ var AlertCenterAddon = class extends BaseAddon {
1826
1732
  } catch (err) {
1827
1733
  this.ctx.logger?.debug("resolveDeviceName failed", {
1828
1734
  tags: { deviceId },
1829
- meta: { error: errMsg$1(err) }
1735
+ meta: { error: errMsg(err) }
1830
1736
  });
1831
1737
  }
1832
1738
  }
@@ -1963,10 +1869,10 @@ var AlertCenterAddon = class extends BaseAddon {
1963
1869
  announceEpisode(previous, alert) {
1964
1870
  const edge = episodeEdge(previous, episodeViewOf(alert));
1965
1871
  if (edge === null) return;
1966
- this.ctx.eventBus?.emit(createEvent$1(EventCategory$1.AlertEpisode, EVENT_SOURCE, alertEpisodePayload(alert, edge, Date.now())));
1872
+ this.ctx.eventBus?.emit(createEvent(EventCategory.AlertEpisode, EVENT_SOURCE, alertEpisodePayload(alert, edge, Date.now())));
1967
1873
  }
1968
1874
  emitAlertCreatedEvent(alert) {
1969
- this.ctx.eventBus?.emit(createEvent$1("alert.created", EVENT_SOURCE, {
1875
+ this.ctx.eventBus?.emit(createEvent("alert.created", EVENT_SOURCE, {
1970
1876
  id: alert.id,
1971
1877
  category: alert.category,
1972
1878
  severity: alert.severity,
@@ -1977,7 +1883,7 @@ var AlertCenterAddon = class extends BaseAddon {
1977
1883
  emitAlertUpdatedEvent(alertId, patch) {
1978
1884
  const patchRecord = {};
1979
1885
  for (const [key, value] of Object.entries(patch)) patchRecord[key] = value;
1980
- this.ctx.eventBus?.emit(createEvent$1("alert.updated", EVENT_SOURCE, {
1886
+ this.ctx.eventBus?.emit(createEvent("alert.updated", EVENT_SOURCE, {
1981
1887
  alertId,
1982
1888
  patch: patchRecord
1983
1889
  }));
@@ -1998,4 +1904,4 @@ var AlertCenterAddon = class extends BaseAddon {
1998
1904
  }
1999
1905
  };
2000
1906
  //#endregion
2001
- export { AlertCenterAddon, AlertCenterAddon as default, redactLogEntry as a, isCredentialKeyName as i, lastCauseAfterChunk as n, redactLogMeta as o, readRunnerDisplayName as r, redactLogText as s, CRASH_BREAKER_ERROR_PREFIX as t };
1907
+ export { AlertCenterAddon, AlertCenterAddon as default, lastCauseAfterChunk as n, readRunnerDisplayName as r, CRASH_BREAKER_ERROR_PREFIX as t };
@@ -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-2SHQaxaS.js");
6
+ const require_dist = require("../../dist-CkJnelZr.js");
7
7
  let zod = require("zod");
8
8
  //#region src/builtins/autotrack/autotrack-config.ts
9
9
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
@@ -1,4 +1,4 @@
1
- import { $s as isEvent, Ic as EventCategory, Ko as BaseAddon, Pc as errMsg, Tn as bareAddonId, ea as ptzAutotrackCapability, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-CogtCQxu.mjs";
1
+ import { Gc as errMsg, Xo as BaseAddon, lc as isEvent, na as ptzAutotrackCapability, qc as EventCategory, rt as FIRST_LEVEL_MACRO_CLASSES, wn as bareAddonId } from "../../dist-BPq13Y8j.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/builtins/autotrack/autotrack-config.ts
4
4
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
@@ -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-2SHQaxaS.js");
6
+ const require_dist = require("../../dist-CkJnelZr.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-D-3wmHDq.js");
8
+ const require_restore_archive = require("../../restore-archive-BQWOdGAB.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  let node_fs = require("node:fs");
11
11
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,6 +1,6 @@
1
- import { Ec as toNodeId, Ic as EventCategory, Ko as BaseAddon, dc as nodePin, wn as backupCapability, yi as mayWriteToLocation, za as storageOccupancyCapability } from "../../dist-CogtCQxu.mjs";
1
+ import { Cn as backupCapability, Ic as toNodeId, Wa as storageOccupancyCapability, Xo as BaseAddon, qc as EventCategory, xc as nodePin, xi as mayWriteToLocation } from "../../dist-BPq13Y8j.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-PlBC2NwT.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-BFA-hEhX.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fs$1 from "node:fs";
6
6
  import * as path$1 from "node:path";
@@ -17,7 +17,7 @@ import type { RecordKindHandle } from "@camstack/types";
17
17
  import { type BackupDestinationPolicyBody } from "./record-kinds.js";
18
18
  /**
19
19
  * Per-`backups`-location policy. `locationId` is the foreign-key into
20
- * the storage orchestrator's `storage_locations` table.
20
+ * the storage orchestrator's location record (its `locations` kind).
21
21
  *
22
22
  * `enabled` gates whether scheduled / unspecified-target backups fan out
23
23
  * to this destination; operators can disable a destination temporarily
@@ -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-2SHQaxaS.js");
6
+ const require_dist = require("../../dist-CkJnelZr.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 { E as CalendarPreferencesSchema, Hs as defineRecordKinds, Ko as BaseAddon, Nn as calendarsCapability } from "../../dist-CogtCQxu.mjs";
1
+ import { E as CalendarPreferencesSchema, Nn as calendarsCapability, Xo as BaseAddon, Zs as defineRecordKinds } from "../../dist-BPq13Y8j.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-2SHQaxaS.js");
6
+ const require_dist = require("../../dist-CkJnelZr.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");
@@ -1,4 +1,4 @@
1
- import { Ic as EventCategory, J as DeclaredDevices, Ko as BaseAddon, Ls as createEvent, Na as snapshotCapability, Nc as DeviceType, Oi as motionCapability, Pc as errMsg, Pn as cameraGridLayoutCapability, Si as memoizePinnedFfmpeg, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Ur as integrationInstancesCapability, Va as streamCatalogCapability, Vs as defineEntryKind, Xs as hydrateSchema, ec as isInstanceEnabled, h as BaseDevice, hs as RecordIntegrationInstances, jc as DeviceFeature, sr as declarationOwnerNodeId, xo as buildFfmpegArgs, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-CogtCQxu.mjs";
1
+ import { Ai as motionCapability, Gc as errMsg, Gr as integrationInstancesCapability, Hc as DeviceFeature, J as DeclaredDevices, Ka as streamCatalogCapability, Ks as createEvent, Pn as cameraGridLayoutCapability, Ra as snapshotCapability, To as buildFfmpegArgs, Tt as MOTION_CLOSE_AFTER_MS, Wc as DeviceType, Xo as BaseAddon, Xs as defineEntryKind, ac as hydrateSchema, bs as RecordIntegrationInstances, h as BaseDevice, or as declarationOwnerNodeId, qc as EventCategory, uc as isInstanceEnabled, wi as memoizePinnedFfmpeg, wn as bareAddonId, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-BPq13Y8j.mjs";
2
2
  import { z } from "zod";
3
3
  import { createHash } from "node:crypto";
4
4
  import { FfmpegProcess } from "@camstack/types/node";
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-2SHQaxaS.js");
7
- const require_composition_sources = require("../../composition-sources-BxK6ttP9.js");
8
- const require_capture_engine = require("../../capture-engine-Byc5Fkp0.js");
9
- const require_retention = require("../../retention-BNONb5X_.js");
6
+ const require_dist = require("../../dist-CkJnelZr.js");
7
+ const require_composition_sources = require("../../composition-sources-BMJUPUh2.js");
8
+ const require_capture_engine = require("../../capture-engine-BO9mSlY-.js");
9
+ const require_retention = require("../../retention-BcOSL6b9.js");
10
10
  let zod = require("zod");
11
11
  //#region src/builtins/composer/actuator-invoke.ts
12
12
  /**
@@ -6193,7 +6193,8 @@ var ComposerAddon = class extends require_dist.BaseAddon {
6193
6193
  },
6194
6194
  extensionFeatures: async (deviceId) => {
6195
6195
  try {
6196
- return require_dist.mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
6196
+ const list = await api.remote.listCommands.query({ deviceId });
6197
+ return require_dist.mediaPlayerFeaturesOfRoles(list.commands.map((c) => c.role), list.sources.length);
6197
6198
  } catch (err) {
6198
6199
  this.ctx.logger.warn("composer: the remote of a media player could not be read", {
6199
6200
  tags: { deviceId },
@@ -1,7 +1,7 @@
1
- import { Ao as disarmRoseMemory, Bi as parseColorInput, Bo as openStatistic, Ci as methodRefusal, Co as composedDeviceRef, Da as sharedActuatorFeatures, Dn as brightnessCapability, Do as compositionSliceKey, Eo as compositionItemFieldPath, Fc as featuresOfBoundCaps, Fo as integrateReading, Gi as planComposition, Hi as petFountainCapability, Ho as planStatisticTier, Hr as groupTemplate, Ic as EventCategory, Io as isForwardInputRef, J as DeclaredDevices, Kn as composerCapability, Ko as BaseAddon, Lo as isHistoryHelper, Ls as createEvent, Mo as evaluateStatistic, Mr as fanOutTargets, Nc as DeviceType, Oa as sharedActuatorMethods, Oi as motionCapability, Oo as compositionSourceKey, Pc as errMsg, Po as historyRetentionFromSettings, Pr as featureForwards, Pt as PetFountainStatusSchema, Qi as processTimeZoneOr, Ro as nextLocalMidnight, So as cloneStatefulExpressionMemory, To as compositionFeatureEnabled, Tr as evaluateCompositionField, Ui as petFountainWaterItem, Un as colorCapability, Uo as statisticCadenceMs, Vn as climateControlCapability, Vo as planResetTier, Vr as groupCommandsCapability, Wa as switchCapability, Wo as toExpressionValue, Yn as consumablesCapability, _o as HISTORY_SLOW_MS, at as FanDirectionSchema, bi as mediaPlayerCapability, bo as MINUTE_MS, cr as declaredSeriesKind, fo as COMPOSER_ADDON_ID, go as HISTORY_FAST_MS, h as BaseDevice, ha as resolveMutate, ho as DEFAULT_HISTORY_RETENTION, i as ACTUATOR_TEMPLATE_IDS, ii as kebabToCamel, jo as evaluateDerivative, jr as fanControlCapability, k as ConsumableItemSchema, ka as sharedColorModes, kn as buildCapabilityLookup, ko as createStatefulExpressionMemory, kr as expressionContainsBuiltinCall, lo as withDefaultRunning, lt as GroupCommandResultSchema, mt as HvacModeSchema, nc as isReadingQuantity, pi as lockControlCapability, qn as compositionFieldKey, r as ACTUATOR_METHODS, ro as valveCapability, s as ALL_CAPABILITY_DEFINITIONS, tr as coverCapability, vo as HOUR_MS, wo as composedDeviceStableId, x as COMPOSED_ITEM_FIXED_FIELDS, xi as mediaPlayerFeaturesOfRoles, ya as runFanOut, zo as openReset } from "../../dist-CogtCQxu.mjs";
2
- import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-BhM6G9QT.mjs";
3
- import { i as capSeriesKey } from "../../capture-engine-CnVIcnyN.mjs";
4
- import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
1
+ import { Ai as motionCapability, Ao as compositionItemFieldPath, Bo as isForwardInputRef, Ci as mediaPlayerFeaturesOfRoles, Do as composedDeviceRef, En as brightnessCapability, Eo as cloneStatefulExpressionMemory, Fo as evaluateDerivative, Gc as errMsg, Gi as petFountainWaterItem, Go as planResetTier, Hi as parseColorInput, Ho as nextLocalMidnight, Hr as groupCommandsCapability, Io as evaluateStatistic, J as DeclaredDevices, Jo as toExpressionValue, Kc as featuresOfBoundCaps, Kn as composerCapability, Ko as planStatisticTier, Ks as createEvent, Ma as sharedActuatorFeatures, Mo as compositionSourceKey, Mr as fanOutTargets, Na as sharedActuatorMethods, No as createStatefulExpressionMemory, On as buildCapabilityLookup, Oo as composedDeviceStableId, Pa as sharedColorModes, Po as disarmRoseMemory, Pr as featureForwards, Pt as PetFountainStatusSchema, Ro as historyRetentionFromSettings, Si as mediaPlayerCapability, So as HOUR_MS, Ti as methodRefusal, Tr as evaluateCompositionField, Un as colorCapability, Uo as openReset, Ur as groupTemplate, Vn as climateControlCapability, Vo as isHistoryHelper, Wc as DeviceType, Wi as petFountainCapability, Wo as openStatistic, Xo as BaseAddon, Ya as switchCapability, Yn as consumablesCapability, at as FanDirectionSchema, bo as HISTORY_FAST_MS, co as valveCapability, ea as processTimeZoneOr, fc as isReadingQuantity, go as COMPOSER_ADDON_ID, h as BaseDevice, hi as lockControlCapability, i as ACTUATOR_TEMPLATE_IDS, jo as compositionSliceKey, jr as fanControlCapability, k as ConsumableItemSchema, ko as compositionFeatureEnabled, kr as expressionContainsBuiltinCall, lt as GroupCommandResultSchema, mt as HvacModeSchema, oi as kebabToCamel, po as withDefaultRunning, qc as EventCategory, qi as planComposition, qn as compositionFieldKey, qo as statisticCadenceMs, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, tr as coverCapability, wa as runFanOut, wo as MINUTE_MS, x as COMPOSED_ITEM_FIXED_FIELDS, xo as HISTORY_SLOW_MS, ya as resolveMutate, yo as DEFAULT_HISTORY_RETENTION, zo as integrateReading } from "../../dist-BPq13Y8j.mjs";
2
+ import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-AziMFo7T.mjs";
3
+ import { i as capSeriesKey } from "../../capture-engine-ByF-6AFH.mjs";
4
+ import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-CUOVI1p7.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/builtins/composer/actuator-invoke.ts
7
7
  /**
@@ -6188,7 +6188,8 @@ var ComposerAddon = class extends BaseAddon {
6188
6188
  },
6189
6189
  extensionFeatures: async (deviceId) => {
6190
6190
  try {
6191
- return mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
6191
+ const list = await api.remote.listCommands.query({ deviceId });
6192
+ return mediaPlayerFeaturesOfRoles(list.commands.map((c) => c.role), list.sources.length);
6192
6193
  } catch (err) {
6193
6194
  this.ctx.logger.warn("composer: the remote of a media player could not be read", {
6194
6195
  tags: { deviceId },
@@ -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-2SHQaxaS.js");
6
+ const require_dist = require("../../dist-CkJnelZr.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { Ko as BaseAddon, hi as logDestinationCapability } from "../../dist-CogtCQxu.mjs";
1
+ import { Xo as BaseAddon, _i as logDestinationCapability } from "../../dist-BPq13Y8j.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {
@@ -31,6 +31,8 @@ export declare class CoreBlocksAddon extends BaseAddon {
31
31
  /** The shared integration, or null when this node does not own it. */
32
32
  private blocksIntegrationId;
33
33
  protected onInitialize(): Promise<ProviderRegistration[]>;
34
+ /** Read-only: the fixed layouts and the model built from the device's bindings and slices. */
35
+ private buildHeroLayout;
34
36
  private buildPowerSource;
35
37
  private powerSourceDevices;
36
38
  private buildRemote;