@camstack/server 1.2.730 → 1.2.732

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 (105) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/api/core/cap-providers.js +1 -0
  3. package/dist/api/core/logging-settings.js +88 -1
  4. package/dist/api/core/server-management.provider.js +10 -3
  5. package/dist/api/trpc/generated-cap-mounts.js +2 -1
  6. package/dist/api/trpc/generated-cap-routers.js +1850 -1777
  7. package/dist/boot/boot-config.js +2 -46
  8. package/dist/core/addon/addon-registry.service.js +61 -59
  9. package/dist/launch-args.js +72 -34
  10. package/dist/main.js +2 -1
  11. package/package.json +14 -19
  12. package/system/dist/addon-runner.js +82911 -12
  13. package/system/dist/addon-runner.mjs +82910 -11
  14. package/system/dist/{agent-https-DZq8uf8L.mjs → agent-https-CDtAIEne.mjs} +1 -1
  15. package/system/dist/{agent-https-C8Gz2jjS.js → agent-https-DKMO-__h.js} +1 -1
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  17. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  19. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  20. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  21. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  22. package/system/dist/builtins/autotrack/index.js +1 -1
  23. package/system/dist/builtins/autotrack/index.mjs +1 -1
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  25. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  26. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  27. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  28. package/system/dist/builtins/camera-grid/index.js +1 -1
  29. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  30. package/system/dist/builtins/composer/composer.addon.js +3 -3
  31. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  32. package/system/dist/builtins/console-logging/index.js +1 -1
  33. package/system/dist/builtins/console-logging/index.mjs +1 -1
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  36. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  37. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  38. package/system/dist/builtins/device-manager/device-manager.addon.js +220 -16
  39. package/system/dist/builtins/device-manager/device-manager.addon.mjs +220 -16
  40. package/system/dist/builtins/device-manager/discovery-proposal-service.d.ts +38 -0
  41. package/system/dist/builtins/device-manager/discovery-proposal-store.d.ts +28 -0
  42. package/system/dist/builtins/device-manager/record-kinds.d.ts +2 -1
  43. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  44. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  45. package/system/dist/builtins/keychain/index.js +3 -3
  46. package/system/dist/builtins/keychain/index.mjs +3 -3
  47. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  48. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  49. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  50. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  51. package/system/dist/builtins/local-network/local-network.addon.d.ts +10 -0
  52. package/system/dist/builtins/local-network/local-network.addon.js +250 -181
  53. package/system/dist/builtins/local-network/local-network.addon.mjs +244 -175
  54. package/system/dist/builtins/local-network/passive/discovery-watcher.d.ts +60 -0
  55. package/system/dist/builtins/local-network/passive/passive-io-node.d.ts +2 -0
  56. package/system/dist/builtins/local-network/passive/passive-packets.d.ts +10 -0
  57. package/system/dist/builtins/loki-logging/index.js +1 -1
  58. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  59. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  60. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  61. package/system/dist/builtins/platform-probe/index.js +1 -1
  62. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  63. package/system/dist/builtins/record-entries/index.js +1 -1
  64. package/system/dist/builtins/record-entries/index.mjs +1 -1
  65. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  66. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  67. package/system/dist/builtins/snapshot/index.js +1 -1
  68. package/system/dist/builtins/snapshot/index.mjs +1 -1
  69. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  70. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  71. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  72. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  73. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  74. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  75. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  76. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  77. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  78. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  79. package/system/dist/builtins/winston-logging/index.js +1 -1
  80. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  81. package/system/dist/{composition-sources-4M_NnTnV.mjs → composition-sources-Ca7JEbmu.mjs} +1 -1
  82. package/system/dist/{composition-sources-hokiaS3J.js → composition-sources-UQohOHgd.js} +1 -1
  83. package/system/dist/{constants-B0L3suFC.js → constants-CLA4ogvA.js} +1 -1
  84. package/system/dist/{constants-DTVU00LZ.mjs → constants-iG57sUNp.mjs} +1 -1
  85. package/system/dist/{device-ca-C_y2GrU5.mjs → device-ca--iHw76cR.mjs} +1 -1
  86. package/system/dist/{device-ca-DaTT1Y9v.js → device-ca-BUcHAAew.js} +1 -1
  87. package/system/dist/{dist-9lvgpcnm.mjs → dist-C_cZ9rGK.mjs} +404 -18
  88. package/system/dist/{dist-B3S0ruBa.js → dist-qO48FNMZ.js} +427 -17
  89. package/system/dist/dns-wire-CHXO1qSl.js +199 -0
  90. package/system/dist/dns-wire-DcL6a0L-.mjs +170 -0
  91. package/system/dist/file-host-worker.js +1 -1
  92. package/system/dist/file-host-worker.mjs +1 -1
  93. package/system/dist/{hub-mdns-ciao-xgLfZIVx.mjs → hub-mdns-ciao-9wPOmsXd.mjs} +2 -2
  94. package/system/dist/{hub-mdns-ciao-Dkw38L-g.js → hub-mdns-ciao-DDmMPZCN.js} +2 -2
  95. package/system/dist/index.d.ts +1 -1
  96. package/system/dist/index.js +36 -9
  97. package/system/dist/index.mjs +36 -10
  98. package/system/dist/kernel/heap-watch.d.ts +7 -2
  99. package/system/dist/{restore-archive-cxnuWxQM.mjs → restore-archive-BHVjOlza.mjs} +1 -1
  100. package/system/dist/{restore-archive-orP6eHBd.js → restore-archive-Cravj5LG.js} +1 -1
  101. package/system/dist/{retention-CB2cyW9k.js → retention-B_eloRtb.js} +1 -1
  102. package/system/dist/{retention-Me4u6zMp.mjs → retention-C_9dxCQn.mjs} +1 -1
  103. package/system/dist/{wal-maintenance-_PXj626-.js → wal-maintenance-CfKeIQAG.js} +0 -0
  104. package/system/dist/{wal-maintenance-De7Ifvph.mjs → wal-maintenance-Dw7rplkv.mjs} +0 -0
  105. package/system/package.json +4 -1
@@ -1162,7 +1162,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1162
1162
  return DeviceRole;
1163
1163
  }({});
1164
1164
  //#endregion
1165
- //#region ../types/dist/sleep-_4vKNWxb.mjs
1165
+ //#region ../types/dist/sleep-B-vp7x15.mjs
1166
1166
  /**
1167
1167
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1168
1168
  * window to float samples (D455).
@@ -5902,6 +5902,7 @@ var CAP_NAMES = Object.freeze([
5902
5902
  "device-status",
5903
5903
  "dishwasher",
5904
5904
  "display-palette",
5905
+ "do-not-disturb",
5905
5906
  "doorbell",
5906
5907
  "embedding-encoder",
5907
5908
  "enum-sensor",
@@ -6661,6 +6662,10 @@ Object.freeze({
6661
6662
  "valueType": "string"
6662
6663
  }
6663
6664
  ],
6665
+ "do-not-disturb": [{
6666
+ "path": "enabled",
6667
+ "valueType": "boolean"
6668
+ }],
6664
6669
  "doorbell": [{
6665
6670
  "path": "lastPressedAt",
6666
6671
  "valueType": "number"
@@ -14155,6 +14160,81 @@ var StorageLocationDeclarationSchema = zod.z.object({
14155
14160
  "backup"
14156
14161
  ]).optional()
14157
14162
  });
14163
+ /** Every debug channel's name starts with this; the ring denies it by default. */
14164
+ var DEBUG_CHANNEL_PREFIX = "debug.";
14165
+ function isDebugChannelName(name) {
14166
+ return name.startsWith(DEBUG_CHANNEL_PREFIX);
14167
+ }
14168
+ /**
14169
+ * Who is watching what, in THIS process. In-memory, moved off the log path.
14170
+ *
14171
+ * `active` is a plain boolean FIELD, read first: with no watch anywhere, a
14172
+ * `ctx.debug` call is one load and one branch.
14173
+ */
14174
+ var DebugInterest = class {
14175
+ active = false;
14176
+ windows = /* @__PURE__ */ new Map();
14177
+ /**
14178
+ * Replace the interest with the FULL set of windows. Non-debug windows are
14179
+ * ignored and an absent one is dropped, so a lost disarm cannot leave a
14180
+ * channel running.
14181
+ */
14182
+ apply(windows, nowMs) {
14183
+ this.windows.clear();
14184
+ for (const window of windows) {
14185
+ if (!isDebugChannelName(window.channel) || window.armedUntilMs <= nowMs) continue;
14186
+ const ids = window.deviceIds;
14187
+ this.windows.set(window.channel, {
14188
+ untilMs: window.armedUntilMs,
14189
+ devices: ids === null || ids.length === 0 ? null : new Set(ids)
14190
+ });
14191
+ }
14192
+ this.active = this.windows.size > 0;
14193
+ }
14194
+ /** Drop what has lapsed. Called on a timer, never from a log path. */
14195
+ tick(nowMs) {
14196
+ const closed = [];
14197
+ for (const [name, window] of this.windows) if (window.untilMs <= nowMs) {
14198
+ this.windows.delete(name);
14199
+ closed.push(name);
14200
+ }
14201
+ this.active = this.windows.size > 0;
14202
+ return closed;
14203
+ }
14204
+ /** `channel` is the full name, `debug.<channel>`. */
14205
+ wants(channel, deviceId) {
14206
+ if (!this.active) return false;
14207
+ const window = this.windows.get(channel);
14208
+ if (window === void 0) return false;
14209
+ return window.devices === null || window.devices.has(deviceId);
14210
+ }
14211
+ };
14212
+ var interestInstance = null;
14213
+ function getDebugInterest() {
14214
+ interestInstance ??= new DebugInterest();
14215
+ return interestInstance;
14216
+ }
14217
+ /**
14218
+ * Build `ctx.debug`. The thunk runs ONLY when somebody watches this
14219
+ * (channel, device) pair, and the line carries `tags: { deviceId }` plus the
14220
+ * `debug.<channel>` name as `logChannel`.
14221
+ */
14222
+ function createDebugEmitter(logger, interest = getDebugInterest()) {
14223
+ return (channel, deviceId, thunk) => {
14224
+ if (!interest.active) return;
14225
+ const name = `${DEBUG_CHANNEL_PREFIX}${channel}`;
14226
+ if (!interest.wants(name, deviceId)) return;
14227
+ const line = thunk();
14228
+ const tags = {
14229
+ deviceId,
14230
+ logChannel: name
14231
+ };
14232
+ logger.info(line.message, line.meta === void 0 ? { tags } : {
14233
+ tags,
14234
+ meta: line.meta
14235
+ });
14236
+ };
14237
+ }
14158
14238
  /**
14159
14239
  * Per-component log CHANNELS — the gate a hot path consults, and the registry
14160
14240
  * an addon declares its channels in.
@@ -14245,8 +14325,18 @@ var LogChannelDescriptorSchema = zod.z.object({
14245
14325
  * the operator narrows to one camera, sees nothing, and concludes the code
14246
14326
  * path was never taken.
14247
14327
  */
14248
- perDevice: zod.z.boolean()
14249
- });
14328
+ perDevice: zod.z.boolean(),
14329
+ /**
14330
+ * What the channel is FOR, so the UI can list the channels an addon offers.
14331
+ *
14332
+ * - `diagnostic` (the default): a per-component diagnostic armed from the
14333
+ * Levels page, emitted at its declared level.
14334
+ * - `debug`: a `debug.<channel>` dump watched live for a short window
14335
+ * (`ctx.debug`). Always per-device, and its lines are denied by the log
14336
+ * ring unless somebody is watching that device.
14337
+ */
14338
+ kind: zod.z.enum(["diagnostic", "debug"]).default("diagnostic")
14339
+ }).refine((d) => d.kind !== "debug" || d.name.startsWith("debug.") && d.perDevice, { message: "a debug channel is named debug.<channel> and is per-device" });
14250
14340
  /**
14251
14341
  * An armed window over one channel, as the document hands it to a mirror.
14252
14342
  *
@@ -18465,6 +18555,33 @@ var APPLIANCE_CAP_VOCABULARY = {
18465
18555
  }
18466
18556
  ]
18467
18557
  },
18558
+ "do-not-disturb": {
18559
+ scope: "device",
18560
+ noun: t("Do not disturb", "Non disturbare"),
18561
+ actions: [{
18562
+ id: "dnd.on",
18563
+ method: "setEnabled",
18564
+ label: t("Do not disturb on", "Attiva Non disturbare"),
18565
+ phrase: t("Turn on Do not disturb on {device}", "Attiva Non disturbare su {device}"),
18566
+ icon: "bell-off",
18567
+ args: { enabled: true }
18568
+ }, {
18569
+ id: "dnd.off",
18570
+ method: "setEnabled",
18571
+ label: t("Do not disturb off", "Disattiva Non disturbare"),
18572
+ phrase: t("Turn off Do not disturb on {device}", "Disattiva Non disturbare su {device}"),
18573
+ icon: "bell",
18574
+ args: { enabled: false }
18575
+ }],
18576
+ state: [{
18577
+ kind: "boolean",
18578
+ field: "enabled",
18579
+ label: t("Do not disturb", "Non disturbare"),
18580
+ whenTrue: t("When Do not disturb turns on on {device}", "Quando {device} attiva Non disturbare"),
18581
+ whenFalse: t("When Do not disturb turns off on {device}", "Quando {device} disattiva Non disturbare"),
18582
+ icon: "bell-off"
18583
+ }]
18584
+ },
18468
18585
  update: {
18469
18586
  scope: "device",
18470
18587
  noun: t("Firmware update", "Aggiornamento firmware"),
@@ -41259,14 +41376,16 @@ var DeviceIsLeafSchema = zod.z.object({
41259
41376
  });
41260
41377
  /**
41261
41378
  * True when the camera currently has a PARKED object matching `subjects` in at
41262
- * least one of `zones`. Reads the zone-analytics snapshot through the same
41379
+ * least one of `zones` (`minCount` of them, default one). Reads the zone-analytics snapshot through the same
41263
41380
  * mirror as every other state leaf, so a dropped event never decides it (D49).
41264
41381
  */
41265
41382
  var StationaryPresentLeafSchema = zod.z.object({
41266
41383
  kind: zod.z.literal("stationary-present"),
41267
41384
  deviceId: zod.z.number().int().nonnegative(),
41268
41385
  subjects: zod.z.array(StationarySubjectSchema).min(1).optional(),
41269
- zones: zod.z.array(zod.z.string().min(1)).min(1).optional()
41386
+ zones: zod.z.array(zod.z.string().min(1)).min(1).optional(),
41387
+ /** How many matching parked objects must be there; absent means one. */
41388
+ minCount: zod.z.number().int().positive().optional()
41270
41389
  });
41271
41390
  /**
41272
41391
  * The escape hatch: the bounded expression engine over named device bindings.
@@ -41818,6 +41937,28 @@ function convertLegacyRecipe(legacy) {
41818
41937
  * it. The output type is always the new one.
41819
41938
  */
41820
41939
  var AutomationRecipeSchema = zod.z.union([CurrentAutomationRecipeSchema, LegacyAutomationRecipeSchema.transform(convertLegacyRecipe)]);
41940
+ var DETECTION_DESCRIPTIONS = {
41941
+ deviceId: "the camera that saw it",
41942
+ className: "what it saw",
41943
+ trackId: "the track",
41944
+ score: "how sure the detector was",
41945
+ label: "the label it matched (a name, a plate), empty when none"
41946
+ };
41947
+ var STATIONARY_DESCRIPTIONS = {
41948
+ deviceId: "the camera that saw it",
41949
+ className: "what it saw",
41950
+ zones: "the zones it is in",
41951
+ phase: "appeared or departed",
41952
+ entryId: "the stopped object"
41953
+ };
41954
+ function describe$1(descriptions) {
41955
+ return Object.entries(descriptions).map(([name, description]) => ({
41956
+ name,
41957
+ description
41958
+ }));
41959
+ }
41960
+ describe$1(DETECTION_DESCRIPTIONS);
41961
+ describe$1(STATIONARY_DESCRIPTIONS);
41821
41962
  /**
41822
41963
  * Evaluating an automation's condition tree against the ConditionMirror.
41823
41964
  *
@@ -42042,17 +42183,25 @@ function judgeStationaryPresent(cond, reader) {
42042
42183
  why: `no parked objects on device ${cond.deviceId}`
42043
42184
  };
42044
42185
  const zones = reader.read(cond.deviceId, ZONE_ANALYTICS_CAP, "zones");
42186
+ const matching = [];
42045
42187
  for (const obj of parked) {
42046
42188
  if (cond.subjects !== void 0 && !anySubjectMatches(cond.subjects, { className: obj.className }).matches) continue;
42047
42189
  if (cond.zones !== void 0) {
42048
42190
  const inZones = zonesOfParked(zones, obj.id);
42049
42191
  if (!cond.zones.some((z) => inZones.includes(z))) continue;
42050
42192
  }
42051
- return {
42052
- pass: true,
42053
- why: `parked ${obj.className} (${obj.id}) on device ${cond.deviceId}`
42054
- };
42193
+ matching.push(obj);
42055
42194
  }
42195
+ const needed = cond.minCount ?? 1;
42196
+ const first = matching[0];
42197
+ if (first !== void 0 && matching.length >= needed) return {
42198
+ pass: true,
42199
+ why: needed === 1 ? `parked ${first.className} (${first.id}) on device ${cond.deviceId}` : `${matching.length} parked matching on device ${cond.deviceId} (need ${needed})`
42200
+ };
42201
+ if (matching.length > 0) return {
42202
+ pass: false,
42203
+ why: `only ${matching.length} of ${needed} needed parked objects match on device ${cond.deviceId}`
42204
+ };
42056
42205
  return {
42057
42206
  pass: false,
42058
42207
  why: `${parked.length} parked on device ${cond.deviceId}, none matching the class/zone filter`
@@ -52167,7 +52316,7 @@ async function runFanOut(calls, invoke) {
52167
52316
  }
52168
52317
  /**
52169
52318
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
52170
- * 42 caps with series (80 series), 36 caps answered `'none'`.
52319
+ * 43 caps with series (81 series), 36 caps answered `'none'`.
52171
52320
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
52172
52321
  */
52173
52322
  var HISTORY_CATALOG = {
@@ -52310,6 +52459,7 @@ var HISTORY_CATALOG = {
52310
52459
  "doorOpen": { kind: "boolean" },
52311
52460
  "powerOn": { kind: "boolean" }
52312
52461
  },
52462
+ "do-not-disturb": { "enabled": { kind: "boolean" } },
52313
52463
  "enum-sensor": { "value": {
52314
52464
  kind: "enum",
52315
52465
  skipWhenSet: "timestamp"
@@ -56088,6 +56238,45 @@ var deviceProviderCapability = {
56088
56238
  }
56089
56239
  };
56090
56240
  /**
56241
+ * What the passive listener of `local-network` saw on the wire, before any
56242
+ * provider classified it. Device-manager turns an observation into the hits
56243
+ * of the providers whose declared discovery modes it matches.
56244
+ */
56245
+ var DiscoveryObservationSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
56246
+ kind: zod.z.literal("mdns"),
56247
+ /** Normalised DNS-SD service type, e.g. `_esphomelib._tcp`. */
56248
+ serviceType: zod.z.string(),
56249
+ instance: zod.z.string(),
56250
+ host: zod.z.string(),
56251
+ /** The A record address when the announcement carried one. */
56252
+ address: zod.z.string().nullable(),
56253
+ port: zod.z.number().int(),
56254
+ txt: zod.z.record(zod.z.string(), zod.z.string())
56255
+ }), zod.z.object({
56256
+ kind: zod.z.literal("ssdp"),
56257
+ /** Sender address of the datagram. */
56258
+ host: zod.z.string(),
56259
+ port: zod.z.number().int(),
56260
+ /** `NT` of a NOTIFY, `ST` of a search response. */
56261
+ target: zod.z.string(),
56262
+ headers: zod.z.record(zod.z.string(), zod.z.string())
56263
+ })]);
56264
+ var DiscoveryProposalBodySchema = zod.z.object({
56265
+ addonId: zod.z.string(),
56266
+ candidate: DiscoveryCandidateSchema,
56267
+ firstSeenAt: zod.z.number(),
56268
+ lastSeenAt: zod.z.number(),
56269
+ dismissed: zod.z.boolean()
56270
+ });
56271
+ var DiscoveryProposalSchema = zod.z.object({
56272
+ id: zod.z.string(),
56273
+ addonId: zod.z.string(),
56274
+ candidate: DiscoveryCandidateSchema,
56275
+ firstSeenAt: zod.z.number(),
56276
+ lastSeenAt: zod.z.number(),
56277
+ dismissed: zod.z.boolean()
56278
+ });
56279
+ /**
56091
56280
  * Device Manager capability — hub-side singleton that unifies device persistence,
56092
56281
  * live registry access, and all management operations into a single tRPC surface.
56093
56282
  *
@@ -57411,6 +57600,27 @@ var deviceManagerCapability = {
57411
57600
  kind: "mutation",
57412
57601
  auth: "admin"
57413
57602
  }),
57603
+ /** Proposals still worth showing: not dismissed, not adopted, not an integration we own. */
57604
+ listDiscoveryProposals: method(zod.z.object({}), zod.z.object({ proposals: zod.z.array(DiscoveryProposalSchema).readonly() }), { auth: "admin" }),
57605
+ /** Hide a proposal for good; seeing the device again does not bring it back. */
57606
+ dismissDiscoveryProposal: method(zod.z.object({ id: zod.z.string() }), zod.z.object({ dismissed: zod.z.boolean() }), {
57607
+ kind: "mutation",
57608
+ auth: "admin"
57609
+ }),
57610
+ /** Raw passive sightings from `local-network`; classified by the matching providers. */
57611
+ reportDiscoveryObservations: method(zod.z.object({ observations: zod.z.array(DiscoveryObservationSchema).max(512) }), zod.z.object({ proposed: zod.z.number().int() }), {
57612
+ kind: "mutation",
57613
+ auth: "admin"
57614
+ }),
57615
+ /** Run the providers' discovery once and record what it found as proposals. */
57616
+ runDiscoverySweep: method(zod.z.object({}), zod.z.object({
57617
+ providers: zod.z.number().int(),
57618
+ proposed: zod.z.number().int()
57619
+ }), {
57620
+ kind: "mutation",
57621
+ auth: "admin",
57622
+ timeoutMs: 12e4
57623
+ }),
57414
57624
  /** The device type a provider creates via manual add (Camera/Container/Hub),
57415
57625
  * so the Add-Device dialog uses the right type instead of assuming Camera. */
57416
57626
  providerCreationType: method(zod.z.object({ addonId: zod.z.string() }), zod.z.object({ deviceType: zod.z.enum(DeviceType).nullable() }), { auth: "admin" }),
@@ -59188,6 +59398,49 @@ var displayPaletteCapability = {
59188
59398
  })
59189
59399
  }
59190
59400
  };
59401
+ /**
59402
+ * do-not-disturb - whether a speaker or display holds back its own sounds
59403
+ * (announcements, notifications, alarms) until the operator lets it speak again.
59404
+ *
59405
+ * It is NOT part of `media-player`: a player is about what it plays and how
59406
+ * loud, while Do Not Disturb is a household switch the vendor keeps per device.
59407
+ * `enabled` is null when the vendor has not said (never a guess of `false`).
59408
+ */
59409
+ var DoNotDisturbStatusSchema = zod.z.object({
59410
+ /** True while Do Not Disturb is on; null when unknown. */
59411
+ enabled: zod.z.boolean().nullable().meta({ label: "Do not disturb" }),
59412
+ /** Ms epoch of the last read or write that set `enabled`. */
59413
+ lastChangedAt: zod.z.number()
59414
+ });
59415
+ var doNotDisturbCapability = {
59416
+ name: "do-not-disturb",
59417
+ scope: "device",
59418
+ deviceNative: true,
59419
+ mode: "singleton",
59420
+ deviceTypes: [DeviceType.MediaPlayer],
59421
+ methods: { setEnabled: method(zod.z.object({
59422
+ deviceId: zod.z.number().int(),
59423
+ enabled: zod.z.boolean()
59424
+ }), zod.z.void(), {
59425
+ kind: "mutation",
59426
+ auth: "protected"
59427
+ }) },
59428
+ status: {
59429
+ schema: DoNotDisturbStatusSchema,
59430
+ kind: "push"
59431
+ },
59432
+ runtimeState: DoNotDisturbStatusSchema,
59433
+ /**
59434
+ * Runtime-state durability: **session** - the vendor owns the switch and the
59435
+ * device re-reads it on the next poll, so a restored value would only be stale.
59436
+ *
59437
+ * See `RuntimeStateDurability`. Enforced by
59438
+ * `scripts/check-runtime-state-durability.ts`.
59439
+ */
59440
+ durability: "session",
59441
+ /** History (D850): when Do Not Disturb was switched on and off. */
59442
+ history: { fields: { enabled: { kind: "boolean" } } }
59443
+ };
59191
59444
  /** Pulse override: a rising edge advances `lastPressedAt` and the press count. */
59192
59445
  var doorbellCustomize = {
59193
59446
  version: 1,
@@ -62093,6 +62346,14 @@ var LlmGenerateBaseInputSchema = zod.z.object({
62093
62346
  topP: zod.z.number().min(0).max(1).optional(),
62094
62347
  /** Per-call override of the profile default (top-k sampling). */
62095
62348
  topK: zod.z.number().int().positive().optional(),
62349
+ /** Per-call override of `profile.reasoningEffort`. Sent only to a kind whose
62350
+ * descriptor offers the field; a kind that does not never sends it. */
62351
+ reasoningEffort: zod.z.enum([
62352
+ "off",
62353
+ "low",
62354
+ "medium",
62355
+ "high"
62356
+ ]).optional(),
62096
62357
  /** Per-call override of `profile.timeoutMs` — the total generation bound. */
62097
62358
  timeoutMs: zod.z.number().int().positive().optional(),
62098
62359
  /** Per-call override; beats both the consumer table and the profile. */
@@ -62426,7 +62687,10 @@ var LlmProfileKindSchema = zod.z.string().regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "a
62426
62687
  var LlmModelFeaturesSchema = zod.z.object({
62427
62688
  vision: zod.z.boolean(),
62428
62689
  tools: zod.z.boolean(),
62429
- streaming: zod.z.boolean()
62690
+ streaming: zod.z.boolean(),
62691
+ /** Whether the model thinks before it answers. `null` = the endpoint does not
62692
+ * say; an editor then still offers the switch (unknown is not "no"). */
62693
+ reasoning: zod.z.boolean().nullable().optional()
62430
62694
  });
62431
62695
  /** One model a provider offers. `features` overrides the kind's defaults, per field. */
62432
62696
  var LlmModelInfoSchema = zod.z.object({
@@ -84682,9 +84946,17 @@ var ServerUpdateActionResultSchema = zod.z.object({
84682
84946
  */
84683
84947
  requiredAddonUpdates: zod.z.array(RequiredAddonUpdateSchema).optional()
84684
84948
  });
84685
- var LaunchOverridesSchema = zod.z.object({
84686
- /** The persisted heap ceiling in MB, or `null` when none is set. */
84687
- heapMb: zod.z.number().int().nullable() });
84949
+ var LaunchOverridesSchema = zod.z.object({
84950
+ /** The persisted heap ceiling in MB, or `null` when none is set. */
84951
+ heapMb: zod.z.number().int().nullable(),
84952
+ /** The persisted hub-main RSS budget in MB, or `null` when none is set. */
84953
+ rssBudgetMb: zod.z.number().int().nullable()
84954
+ });
84955
+ var SetLaunchOverridesInputSchema = zod.z.object({
84956
+ heapMb: zod.z.number().int().min(512).max(65536).nullable(),
84957
+ /** Omitted keeps the stored budget; `null` clears it. */
84958
+ rssBudgetMb: zod.z.number().int().min(512).max(65536).nullable().optional()
84959
+ });
84688
84960
  var SetLaunchOverridesResultSchema = LaunchOverridesSchema.extend({
84689
84961
  /** Always true: the override is read at launch, not by the running process. */
84690
84962
  restartRequired: zod.z.boolean() });
@@ -84747,11 +85019,12 @@ var serverManagementCapability = {
84747
85019
  */
84748
85020
  getLaunchOverrides: method(zod.z.void(), LaunchOverridesSchema, { auth: "admin" }),
84749
85021
  /**
84750
- * Set (`heapMb`) or clear (`null`) the node's heap-ceiling override. It is
85022
+ * Set or clear (`null`) the node's heap-ceiling (`heapMb`) and hub-main RSS
85023
+ * budget (`rssBudgetMb`) overrides; the budget wins over its env. It is
84751
85024
  * written on the node itself and applies at the NEXT launch — restart the
84752
85025
  * node (`restartServer`) for it to take effect.
84753
85026
  */
84754
- setLaunchOverrides: method(zod.z.object({ heapMb: zod.z.number().int().min(512).max(65536).nullable() }), SetLaunchOverridesResultSchema, {
85027
+ setLaunchOverrides: method(SetLaunchOverridesInputSchema, SetLaunchOverridesResultSchema, {
84755
85028
  kind: "mutation",
84756
85029
  auth: "admin"
84757
85030
  })
@@ -86900,6 +87173,40 @@ var LoggingSettingsStateSchema = zod.z.object({
86900
87173
  opsLogRetentionDays: zod.z.number().int().min(0),
86901
87174
  persisted: zod.z.boolean()
86902
87175
  });
87176
+ /**
87177
+ * Debug WATCH — a short, per-device window over `debug.<channel>` lines.
87178
+ *
87179
+ * `start` opens (or re-arms) a 10 minute window; `rearm` extends a LIVE one
87180
+ * and never revives a lapsed one; `stop` closes it; `list` only reads. No
87181
+ * chain of re-arms outlives 60 minutes from the first start. The hub holds the
87182
+ * watches in memory and pushes the interest to every node, so a watch lapses
87183
+ * by itself and survives nothing — a restart is a stop.
87184
+ */
87185
+ var DebugWatchInputSchema = zod.z.object({
87186
+ action: zod.z.enum([
87187
+ "list",
87188
+ "start",
87189
+ "rearm",
87190
+ "stop"
87191
+ ]),
87192
+ /** Full channel names, `debug.<channel>`, each declared with `kind: 'debug'`. */
87193
+ channels: zod.z.array(zod.z.string().min(1)).readonly().default([]),
87194
+ /** Numeric device ids. Required (non-empty) for `start`. */
87195
+ deviceIds: zod.z.array(zod.z.number().int()).readonly().default([])
87196
+ });
87197
+ var DebugWatchStateSchema = zod.z.object({
87198
+ channel: zod.z.string(),
87199
+ deviceIds: zod.z.array(zod.z.number().int()).readonly(),
87200
+ startedAtMs: zod.z.number(),
87201
+ untilMs: zod.z.number(),
87202
+ capAtMs: zod.z.number()
87203
+ });
87204
+ var DebugWatchResultSchema = zod.z.object({
87205
+ nowMs: zod.z.number(),
87206
+ watches: zod.z.array(DebugWatchStateSchema).readonly(),
87207
+ /** Channels a `rearm` found already lapsed: nothing was revived. */
87208
+ lapsed: zod.z.array(zod.z.string()).readonly()
87209
+ });
86903
87210
  var systemCapability = {
86904
87211
  name: "system",
86905
87212
  scope: "system",
@@ -87013,6 +87320,14 @@ var systemCapability = {
87013
87320
  setLoggingSettings: method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
87014
87321
  kind: "mutation",
87015
87322
  auth: "admin"
87323
+ }),
87324
+ /**
87325
+ * Start, re-arm, stop or list the live debug watches. See
87326
+ * {@link DebugWatchInputSchema}.
87327
+ */
87328
+ debugWatch: method(DebugWatchInputSchema, DebugWatchResultSchema, {
87329
+ kind: "mutation",
87330
+ auth: "admin"
87016
87331
  })
87017
87332
  },
87018
87333
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/server/system` `buildCapRouters`. */
@@ -90450,6 +90765,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
90450
90765
  deviceStatusCapability,
90451
90766
  dishwasherCapability,
90452
90767
  displayPaletteCapability,
90768
+ doNotDisturbCapability,
90453
90769
  doorbellCapability,
90454
90770
  embeddingEncoderCapability,
90455
90771
  enumSensorCapability,
@@ -92227,6 +92543,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
92227
92543
  deviceDiscovery: deviceDiscoveryCapability,
92228
92544
  deviceStatus: deviceStatusCapability,
92229
92545
  dishwasher: dishwasherCapability,
92546
+ doNotDisturb: doNotDisturbCapability,
92230
92547
  doorbell: doorbellCapability,
92231
92548
  enumSensor: enumSensorCapability,
92232
92549
  eventEmitter: eventEmitterCapability,
@@ -95570,6 +95887,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
95570
95887
  access: "view",
95571
95888
  role: "admin"
95572
95889
  },
95890
+ "deviceManager.dismissDiscoveryProposal": {
95891
+ capName: "device-manager",
95892
+ capScope: "system",
95893
+ addonId: null,
95894
+ access: "create",
95895
+ role: "admin"
95896
+ },
95573
95897
  "deviceManager.enable": {
95574
95898
  capName: "device-manager",
95575
95899
  capScope: "system",
@@ -95752,6 +96076,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
95752
96076
  access: "view",
95753
96077
  role: "viewer"
95754
96078
  },
96079
+ "deviceManager.listDiscoveryProposals": {
96080
+ capName: "device-manager",
96081
+ capScope: "system",
96082
+ addonId: null,
96083
+ access: "view",
96084
+ role: "admin"
96085
+ },
95755
96086
  "deviceManager.listLocationDescriptions": {
95756
96087
  capName: "device-manager",
95757
96088
  capScope: "system",
@@ -95906,6 +96237,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
95906
96237
  access: "create",
95907
96238
  role: "admin"
95908
96239
  },
96240
+ "deviceManager.reportDiscoveryObservations": {
96241
+ capName: "device-manager",
96242
+ capScope: "system",
96243
+ addonId: null,
96244
+ access: "create",
96245
+ role: "admin"
96246
+ },
95909
96247
  "deviceManager.runDeviceAction": {
95910
96248
  capName: "device-manager",
95911
96249
  capScope: "system",
@@ -95913,6 +96251,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
95913
96251
  access: "create",
95914
96252
  role: "admin"
95915
96253
  },
96254
+ "deviceManager.runDiscoverySweep": {
96255
+ capName: "device-manager",
96256
+ capScope: "system",
96257
+ addonId: null,
96258
+ access: "create",
96259
+ role: "admin"
96260
+ },
95916
96261
  "deviceManager.setChildLayout": {
95917
96262
  capName: "device-manager",
95918
96263
  capScope: "system",
@@ -96466,6 +96811,20 @@ var METHOD_ACCESS_MAP = Object.freeze({
96466
96811
  access: "create",
96467
96812
  role: "admin"
96468
96813
  },
96814
+ "doNotDisturb.getStatus": {
96815
+ capName: "do-not-disturb",
96816
+ capScope: "device",
96817
+ addonId: null,
96818
+ access: "view",
96819
+ role: "viewer"
96820
+ },
96821
+ "doNotDisturb.setEnabled": {
96822
+ capName: "do-not-disturb",
96823
+ capScope: "device",
96824
+ addonId: null,
96825
+ access: "create",
96826
+ role: "viewer"
96827
+ },
96469
96828
  "doorbell.getStatus": {
96470
96829
  capName: "doorbell",
96471
96830
  capScope: "device",
@@ -102486,6 +102845,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
102486
102845
  access: "create",
102487
102846
  role: "viewer"
102488
102847
  },
102848
+ "system.debugWatch": {
102849
+ capName: "system",
102850
+ capScope: "system",
102851
+ addonId: null,
102852
+ access: "create",
102853
+ role: "admin"
102854
+ },
102489
102855
  "system.detectSiteLocation": {
102490
102856
  capName: "system",
102491
102857
  capScope: "system",
@@ -103747,6 +104113,7 @@ var CAP_NAMES_WITH_STATUS = [
103747
104113
  "device-export",
103748
104114
  "device-status",
103749
104115
  "dishwasher",
104116
+ "do-not-disturb",
103750
104117
  "doorbell",
103751
104118
  "enum-sensor",
103752
104119
  "event-emitter",
@@ -104742,6 +105109,16 @@ Object.freeze({
104742
105109
  form: "single",
104743
105110
  optional: false
104744
105111
  }],
105112
+ "doNotDisturb.getStatus": [{
105113
+ name: "deviceId",
105114
+ form: "single",
105115
+ optional: false
105116
+ }],
105117
+ "doNotDisturb.setEnabled": [{
105118
+ name: "deviceId",
105119
+ form: "single",
105120
+ optional: false
105121
+ }],
104745
105122
  "doorbell.getStatus": [{
104746
105123
  name: "deviceId",
104747
105124
  form: "single",
@@ -106482,6 +106859,11 @@ Object.freeze({
106482
106859
  form: "single",
106483
106860
  optional: false
106484
106861
  }],
106862
+ "system.debugWatch": [{
106863
+ name: "deviceIds",
106864
+ form: "array",
106865
+ optional: true
106866
+ }],
106485
106867
  "tamper.getStatus": [{
106486
106868
  name: "deviceId",
106487
106869
  form: "single",
@@ -106760,7 +107142,7 @@ Object.freeze({
106760
107142
  });
106761
107143
  /**
106762
107144
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
106763
- * `runtimeState`. 79 caps: 39 `restored`, 40 `session`.
107145
+ * `runtimeState`. 80 caps: 39 `restored`, 41 `session`.
106764
107146
  *
106765
107147
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
106766
107148
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -106850,6 +107232,10 @@ var RUNTIME_STATE_POLICY = {
106850
107232
  durability: "session",
106851
107233
  volatileFields: []
106852
107234
  },
107235
+ "do-not-disturb": {
107236
+ durability: "session",
107237
+ volatileFields: []
107238
+ },
106853
107239
  "doorbell": {
106854
107240
  durability: "restored",
106855
107241
  volatileFields: []
@@ -109336,6 +109722,12 @@ Object.defineProperty(exports, "DeviceType", {
109336
109722
  return DeviceType;
109337
109723
  }
109338
109724
  });
109725
+ Object.defineProperty(exports, "DiscoveryProposalBodySchema", {
109726
+ enumerable: true,
109727
+ get: function() {
109728
+ return DiscoveryProposalBodySchema;
109729
+ }
109730
+ });
109339
109731
  Object.defineProperty(exports, "EMPTY_AUTOMATION_STATE", {
109340
109732
  enumerable: true,
109341
109733
  get: function() {
@@ -110224,6 +110616,12 @@ Object.defineProperty(exports, "coverCapability", {
110224
110616
  return coverCapability;
110225
110617
  }
110226
110618
  });
110619
+ Object.defineProperty(exports, "createDebugEmitter", {
110620
+ enumerable: true,
110621
+ get: function() {
110622
+ return createDebugEmitter;
110623
+ }
110624
+ });
110227
110625
  Object.defineProperty(exports, "createDeviceExtensionProvider", {
110228
110626
  enumerable: true,
110229
110627
  get: function() {
@@ -110524,6 +110922,12 @@ Object.defineProperty(exports, "gbToBytes", {
110524
110922
  return gbToBytes;
110525
110923
  }
110526
110924
  });
110925
+ Object.defineProperty(exports, "getDebugInterest", {
110926
+ enumerable: true,
110927
+ get: function() {
110928
+ return getDebugInterest;
110929
+ }
110930
+ });
110527
110931
  Object.defineProperty(exports, "groupCommandsCapability", {
110528
110932
  enumerable: true,
110529
110933
  get: function() {
@@ -110614,6 +111018,12 @@ Object.defineProperty(exports, "isCredentialTokenPayload", {
110614
111018
  return isCredentialTokenPayload;
110615
111019
  }
110616
111020
  });
111021
+ Object.defineProperty(exports, "isDebugChannelName", {
111022
+ enumerable: true,
111023
+ get: function() {
111024
+ return isDebugChannelName;
111025
+ }
111026
+ });
110617
111027
  Object.defineProperty(exports, "isDefaultAppConnectionEndpoint", {
110618
111028
  enumerable: true,
110619
111029
  get: function() {