@camstack/server 1.2.828 → 1.2.830

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 (126) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/dist/agent/agent-boot-mode.js +14 -1
  3. package/dist/agent/agent-http.js +12 -0
  4. package/dist/agent/agent-hub-rediscovery.js +205 -0
  5. package/dist/agent/agent-membership-watch.js +29 -1
  6. package/dist/agent/agent-pairing-store.js +47 -3
  7. package/dist/agent/hubs-found.js +1 -0
  8. package/dist/agent/main.js +64 -6
  9. package/dist/api/core/agent-pairing.router.js +9 -0
  10. package/dist/api/core/cluster-update.provider.js +98 -0
  11. package/dist/api/mesh-membership-routes.js +3 -2
  12. package/dist/api/trpc/generated-cap-mounts.js +2 -1
  13. package/dist/api/trpc/generated-cap-routers.js +2339 -2286
  14. package/dist/api/trpc/server-provided-caps.js +1 -0
  15. package/dist/api/trpc/trpc.router.js +5 -0
  16. package/dist/auth/auth-provider-gate.js +6 -2
  17. package/dist/core/addon/device-meta-mirror.js +1 -0
  18. package/dist/core/cluster-update/cluster-update-job-store.js +106 -0
  19. package/dist/core/cluster-update/cluster-update-plan.js +147 -0
  20. package/dist/core/cluster-update/cluster-update-seams.js +13 -0
  21. package/dist/core/cluster-update/cluster-update-steps.js +293 -0
  22. package/dist/core/cluster-update/cluster-update.service.js +319 -0
  23. package/dist/main.js +3 -0
  24. package/dist/manual-boot.js +19 -0
  25. package/package.json +12 -11
  26. package/system/dist/addon-runner.js +12 -0
  27. package/system/dist/addon-runner.mjs +12 -0
  28. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  29. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  30. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  31. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  32. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  33. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  34. package/system/dist/builtins/autotrack/index.js +1 -1
  35. package/system/dist/builtins/autotrack/index.mjs +1 -1
  36. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  37. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  38. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  39. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  40. package/system/dist/builtins/camera-grid/index.js +1 -1
  41. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  42. package/system/dist/builtins/composer/composer.addon.js +4 -4
  43. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  44. package/system/dist/builtins/console-logging/index.js +1 -1
  45. package/system/dist/builtins/console-logging/index.mjs +1 -1
  46. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  47. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  48. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  49. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  50. package/system/dist/builtins/device-manager/device-aggregation.d.ts +25 -1
  51. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +6 -0
  52. package/system/dist/builtins/device-manager/device-manager.addon.js +354 -7
  53. package/system/dist/builtins/device-manager/device-manager.addon.mjs +354 -7
  54. package/system/dist/builtins/device-manager/device-meta-actions.d.ts +6 -0
  55. package/system/dist/builtins/device-manager/device-meta-types.d.ts +4 -0
  56. package/system/dist/builtins/device-manager/device-row-store.d.ts +2 -1
  57. package/system/dist/builtins/device-manager/device-search.d.ts +42 -0
  58. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  59. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  60. package/system/dist/builtins/keychain/index.js +4 -4
  61. package/system/dist/builtins/keychain/index.mjs +4 -4
  62. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  63. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  64. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  65. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  66. package/system/dist/builtins/local-network/hub-mdns.d.ts +5 -1
  67. package/system/dist/builtins/local-network/local-network.addon.js +24 -13
  68. package/system/dist/builtins/local-network/local-network.addon.mjs +24 -13
  69. package/system/dist/builtins/loki-logging/index.js +1 -1
  70. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  71. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  72. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  73. package/system/dist/builtins/platform-probe/index.js +1 -1
  74. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  75. package/system/dist/builtins/record-entries/index.js +1 -1
  76. package/system/dist/builtins/record-entries/index.mjs +1 -1
  77. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  78. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  79. package/system/dist/builtins/snapshot/index.js +1 -1
  80. package/system/dist/builtins/snapshot/index.mjs +1 -1
  81. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  82. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  83. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  84. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  85. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  86. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  87. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  88. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  89. package/system/dist/builtins/system-config/system-config.addon.js +59 -20
  90. package/system/dist/builtins/system-config/system-config.addon.mjs +48 -10
  91. package/system/dist/builtins/winston-logging/index.js +1 -1
  92. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  93. package/system/dist/{capture-engine-1A7HAX3x.js → capture-engine-6_V-PR8O.js} +1 -1
  94. package/system/dist/{capture-engine-B0yQx6hA.mjs → capture-engine-cp3my4VK.mjs} +1 -1
  95. package/system/dist/{composition-sources-CyJ0d6Sc.mjs → composition-sources-C-iX_Uuu.mjs} +1 -1
  96. package/system/dist/{composition-sources-BzM19ASO.js → composition-sources-JwBPIhdO.js} +1 -1
  97. package/system/dist/{constants-DSO4ZEO3.js → constants-C4V2z-GT.js} +1 -1
  98. package/system/dist/{constants-B_FLEjP_.mjs → constants-D5oNuYLD.mjs} +1 -1
  99. package/system/dist/{device-ca-CveuNCHp.mjs → device-ca-CXPTrORC.mjs} +1 -1
  100. package/system/dist/{device-ca-DLTDsonl.js → device-ca-DAuMNieL.js} +1 -1
  101. package/system/dist/{dist-CIyyHwVx.mjs → dist-B8dBvJJK.mjs} +469 -27
  102. package/system/dist/{dist-DhbzVygm.js → dist-DVrLQr6W.js} +469 -27
  103. package/system/dist/file-host-worker.js +1 -1
  104. package/system/dist/file-host-worker.mjs +1 -1
  105. package/system/dist/{agent-https-BlLVD9hG.js → hub-identity-Cg1_bzoY.js} +120 -1
  106. package/system/dist/{agent-https-BSxTUzKT.mjs → hub-identity-D2sSTELW.mjs} +97 -2
  107. package/system/dist/{hub-mdns-ciao-C_ITDs0-.js → hub-mdns-ciao-DCHShuFh.js} +18 -18
  108. package/system/dist/{hub-mdns-ciao-CQdCUsrI.mjs → hub-mdns-ciao-Twxwj9Vh.mjs} +2 -2
  109. package/system/dist/index.js +61 -44
  110. package/system/dist/index.mjs +22 -10
  111. package/system/dist/kernel/hub-identity.d.ts +17 -0
  112. package/system/dist/kernel/index.d.ts +2 -0
  113. package/system/dist/kernel/moleculer/mesh-mtls/mesh-membership.d.ts +7 -0
  114. package/system/dist/kernel/moleculer/mesh-mtls/pairing/agent-pairing.d.ts +11 -1
  115. package/system/dist/kernel/moleculer/mesh-mtls/pairing/hub-pairing.d.ts +5 -0
  116. package/system/dist/kernel/moleculer/mesh-mtls/pairing/index.d.ts +1 -1
  117. package/system/dist/kernel/moleculer/mesh-mtls/pairing/pairing-protocol.d.ts +2 -0
  118. package/system/dist/{legacy-integration-rows-door-D_tfRhsx.js → legacy-integration-rows-door-i0gANn4l.js} +1 -1
  119. package/system/dist/{legacy-integration-rows-door-tX6Qktxd.mjs → legacy-integration-rows-door-lRhfbNBc.mjs} +1 -1
  120. package/system/dist/{rename-composition-block-DNhbAonr.js → rename-composition-block-BRy-9srI.js} +1 -1
  121. package/system/dist/{rename-composition-block-COaMxshT.mjs → rename-composition-block-C2IbabFp.mjs} +1 -1
  122. package/system/dist/{restore-archive-BMqp_hMT.mjs → restore-archive-CkyWtDIi.mjs} +1 -1
  123. package/system/dist/{restore-archive-Dbzuv5hK.js → restore-archive-_y4JaVgy.js} +1 -1
  124. package/system/dist/{wal-maintenance-CWODOTsa.js → wal-maintenance-BfkwceLa.js} +0 -0
  125. package/system/dist/{wal-maintenance-ITsLGvFA.mjs → wal-maintenance-Dn2cx4Km.mjs} +0 -0
  126. package/system/package.json +1 -1
@@ -1225,7 +1225,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1225
1225
  */
1226
1226
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1227
1227
  //#endregion
1228
- //#region ../types/dist/sleep-Dz1P6--1.mjs
1228
+ //#region ../types/dist/sleep-Cw1uUXvl.mjs
1229
1229
  /**
1230
1230
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1231
1231
  * window to float samples (D455).
@@ -11035,6 +11035,7 @@ var SYSTEM_CAP_VOCABULARY = {
11035
11035
  backup: system("system backups — run and restored from the Backups page"),
11036
11036
  broker: system("message-broker connections — configured, not actuated"),
11037
11037
  "calendar-source": system(INTERNAL),
11038
+ "cluster-update": system(CLUSTER),
11038
11039
  calendars: system("calendars feed schedules and conditions, not device actions"),
11039
11040
  composer: system("device composition — an authoring tool, not an action"),
11040
11041
  "core-blocks": system(INTERNAL),
@@ -11622,6 +11623,7 @@ var CAP_NAMES = Object.freeze([
11622
11623
  "camera-streams",
11623
11624
  "carbon-monoxide",
11624
11625
  "climate-control",
11626
+ "cluster-update",
11625
11627
  "color",
11626
11628
  "composer",
11627
11629
  "connectivity",
@@ -51284,6 +51286,160 @@ var climateControlCapability = {
51284
51286
  } }
51285
51287
  };
51286
51288
  /**
51289
+ * cluster-update — the ONE flow that brings the whole cluster to a release
51290
+ * (planning#493). Hub-provided (`server-provided`), hub-only: the hub runs
51291
+ * the sequence itself, so the admin UI, the MCP and the CLI all start the same
51292
+ * job and read the same report instead of each driving their own loop.
51293
+ *
51294
+ * 1. backup (`backup.trigger`) — skipped only when the caller says so
51295
+ * 2. the hub's server closure (`applyServerUpdate`); the hub restarts and the
51296
+ * job RESUMES on the new boot, verified against the hub's running version
51297
+ * 3. every online agent behind the target, one at a time, verified: runs the
51298
+ * target, settled, online, and its capabilities registered (D848) — an
51299
+ * agent that comes back capless is a FAILED step, never a done one
51300
+ * 4. every stale addon on the hub (`addons.updatePackage`); agents follow by
51301
+ * reconciliation, which is verified, never pushed
51302
+ *
51303
+ * The job stops on the first failed step with a typed reason (D877). Its state
51304
+ * is durable on the hub and read by RPC (`getClusterUpdateJob`) — events are
51305
+ * telemetry and never carry it (D8, D11).
51306
+ */
51307
+ /** The steps, in the order they run. */
51308
+ var ClusterUpdateStepKindSchema = z.enum([
51309
+ "backup",
51310
+ "hub-server",
51311
+ "agent-server",
51312
+ "addons"
51313
+ ]);
51314
+ /**
51315
+ * - `pending` — not reached yet.
51316
+ * - `running` — in progress (for `hub-server`: possibly across the restart).
51317
+ * - `ok` — done AND verified.
51318
+ * - `failed` — did not land; `reason` + `detail` say why. Stops the job.
51319
+ * - `skipped` — not run: nothing to do, opted out, the node is offline, or a
51320
+ * step before it failed. `detail` says which.
51321
+ */
51322
+ var ClusterUpdateStepStatusSchema = z.enum([
51323
+ "pending",
51324
+ "running",
51325
+ "ok",
51326
+ "failed",
51327
+ "skipped"
51328
+ ]);
51329
+ /**
51330
+ * Why a step (and with it the job) failed. Stable, greppable; `detail` carries
51331
+ * the prose.
51332
+ */
51333
+ var ClusterUpdateFailureReasonSchema = z.enum([
51334
+ "backup-unavailable",
51335
+ "backup-failed",
51336
+ "server-refused",
51337
+ "server-not-on-target",
51338
+ "node-capless",
51339
+ "status-unreadable",
51340
+ "addon-update-failed",
51341
+ "addons-not-converged",
51342
+ "interrupted"
51343
+ ]);
51344
+ var ClusterUpdateStepSchema = z.object({
51345
+ kind: ClusterUpdateStepKindSchema,
51346
+ /** The node the step acts on; absent for `backup` and `addons`. */
51347
+ nodeId: z.string().optional(),
51348
+ status: ClusterUpdateStepStatusSchema,
51349
+ /** One line for the operator: what happened, or why not. */
51350
+ detail: z.string(),
51351
+ reason: ClusterUpdateFailureReasonSchema.optional(),
51352
+ /** `hub-server` / `agent-server`: the version the node ran before. */
51353
+ fromVersion: z.string().nullable().optional(),
51354
+ /** `addons`: the packages this step updates, `name from -> to`. */
51355
+ packages: z.array(z.string()).readonly().optional(),
51356
+ startedAt: z.number().optional(),
51357
+ finishedAt: z.number().optional()
51358
+ });
51359
+ var ClusterUpdateJobStateSchema = z.enum([
51360
+ "running",
51361
+ "succeeded",
51362
+ "failed"
51363
+ ]);
51364
+ var ClusterUpdateJobSchema = z.object({
51365
+ id: z.string(),
51366
+ state: ClusterUpdateJobStateSchema,
51367
+ /** The server version every node is brought to. */
51368
+ targetVersion: z.string(),
51369
+ /** Who started it (the user name, or `system`). */
51370
+ requestedBy: z.string(),
51371
+ startedAt: z.number(),
51372
+ finishedAt: z.number().optional(),
51373
+ /** Every step, in run order; later steps stay `pending` while it runs. */
51374
+ steps: z.array(ClusterUpdateStepSchema).readonly(),
51375
+ /** On `failed`: the step that stopped it (`nodeId` or the step kind). */
51376
+ stoppedAt: z.string().optional(),
51377
+ reason: ClusterUpdateFailureReasonSchema.optional(),
51378
+ /** Agents offline when the plan was read: never touched. */
51379
+ skippedOffline: z.array(z.string()).readonly()
51380
+ });
51381
+ var ClusterUpdateOptionsSchema = z.object({
51382
+ /** Explicit server target; omitted = the hub's latest registry check. */
51383
+ version: z.string().optional(),
51384
+ /** Update the addons too (default true). */
51385
+ addons: z.boolean().optional(),
51386
+ /**
51387
+ * Back up before touching anything (default true). `false` is an explicit
51388
+ * operator opt-out; a missing backup provider is otherwise a failure.
51389
+ */
51390
+ backup: z.boolean().optional()
51391
+ });
51392
+ /** Why a plan cannot start. */
51393
+ var ClusterUpdateBlockerSchema = z.enum([
51394
+ "no-target",
51395
+ "node-busy",
51396
+ "job-running",
51397
+ "nothing-to-do",
51398
+ "status-unreadable"
51399
+ ]);
51400
+ var ClusterUpdatePlanSchema = z.object({
51401
+ /** `null` when no target could be resolved (`blocker: 'no-target'`). */
51402
+ targetVersion: z.string().nullable(),
51403
+ /** The steps the job WOULD run, all `pending` (or `skipped` with a reason). */
51404
+ steps: z.array(ClusterUpdateStepSchema).readonly(),
51405
+ skippedOffline: z.array(z.string()).readonly(),
51406
+ /** `null` = the plan can start. */
51407
+ blocker: ClusterUpdateBlockerSchema.nullable(),
51408
+ /** Prose for `blocker`. */
51409
+ blockerDetail: z.string().nullable()
51410
+ });
51411
+ var StartClusterUpdateResultSchema = z.object({
51412
+ accepted: z.boolean(),
51413
+ /** The job to follow with `getClusterUpdateJob`; `null` when refused. */
51414
+ jobId: z.string().nullable(),
51415
+ blocker: ClusterUpdateBlockerSchema.nullable(),
51416
+ message: z.string()
51417
+ });
51418
+ var clusterUpdateCapability = {
51419
+ name: "cluster-update",
51420
+ scope: "system",
51421
+ mode: "singleton",
51422
+ methods: {
51423
+ /** What `startClusterUpdate` would do now, and whether it can start. Reads only. */
51424
+ previewClusterUpdate: method(ClusterUpdateOptionsSchema, ClusterUpdatePlanSchema, { auth: "admin" }),
51425
+ /**
51426
+ * Start the job and return at once with its id; the job runs on the hub
51427
+ * (minutes to hours, across the hub's own restart). Refused, with a
51428
+ * `blocker`, when the plan cannot start — one job at a time.
51429
+ */
51430
+ startClusterUpdate: method(ClusterUpdateOptionsSchema, StartClusterUpdateResultSchema, {
51431
+ kind: "mutation",
51432
+ auth: "admin"
51433
+ }),
51434
+ /**
51435
+ * A job's state. Without `jobId`: the latest job, or `null` when none ever
51436
+ * ran. Survives the hub restart the job itself causes.
51437
+ */
51438
+ getClusterUpdateJob: method(z.object({ jobId: z.string().optional() }), ClusterUpdateJobSchema.nullable(), { auth: "admin" })
51439
+ },
51440
+ mount: { kind: "server-provided" }
51441
+ };
51442
+ /**
51287
51443
  * Color-light cap. Coexists with `switch` (on/off) and `brightness`
51288
51444
  * (level) on the same device — `switch` toggles the bulb, `brightness`
51289
51445
  * sets the dim level, this cap sets the chromaticity.
@@ -58569,6 +58725,90 @@ var SiteZoneSchema = z.object({
58569
58725
  function siteZoneKey(label) {
58570
58726
  return label.trim().toLowerCase();
58571
58727
  }
58728
+ var DeviceSearchRequiresSchema = z.object({
58729
+ /** Capability names the field wants a value of. */
58730
+ caps: z.array(z.string()).readonly(),
58731
+ /** `any` (default): a device with one of them is compatible. `all`: it must hold every one. */
58732
+ mode: z.enum(["any", "all"]).optional()
58733
+ });
58734
+ var DeviceSearchFiltersSchema = z.object({
58735
+ locations: z.array(z.string()).readonly().optional(),
58736
+ integrationIds: z.array(z.string()).readonly().optional(),
58737
+ types: z.array(z.string()).readonly().optional()
58738
+ });
58739
+ var DeviceSearchInputSchema = z.object({
58740
+ /** Matches name, location, type, integration (id and label) and id. Case-insensitive. */
58741
+ text: z.string().optional(),
58742
+ requires: DeviceSearchRequiresSchema.optional(),
58743
+ filters: DeviceSearchFiltersSchema.optional(),
58744
+ /** List the devices that do not provide the required cap too (greyed, not pickable). */
58745
+ includeIncompatible: z.boolean().optional(),
58746
+ /** The device the field belongs to: its location drives `suggested`. */
58747
+ contextDeviceId: z.number().optional(),
58748
+ /**
58749
+ * Resolve exactly these devices, regardless of every filter, so a picked
58750
+ * value can be rendered. When given, `items` is these devices in the order
58751
+ * asked (no paging, `nextCursor` null) and the ones that do not exist are
58752
+ * listed in `missingIds`.
58753
+ */
58754
+ ids: z.array(z.number()).readonly().optional(),
58755
+ cursor: z.string().nullable().optional(),
58756
+ limit: z.number().int().min(1).max(200).optional()
58757
+ });
58758
+ var DeviceValueOptionSchema = z.object({
58759
+ cap: z.string(),
58760
+ /** Status-schema field path inside the cap (same paths as `getWireableFields`). */
58761
+ path: z.string(),
58762
+ label: z.string(),
58763
+ /** The current value as text; `null` when it is unknown or the read FAILED — never `0`. */
58764
+ reading: z.string().nullable(),
58765
+ unit: z.string().nullable().optional(),
58766
+ /** The field's measured quantity, when the cap declares one, so a client can format the reading. */
58767
+ quantity: ReadingQuantitySchema.optional()
58768
+ });
58769
+ var DeviceSearchItemSchema = z.object({
58770
+ id: z.number(),
58771
+ name: z.string(),
58772
+ type: z.enum(DeviceType),
58773
+ location: z.string().nullable(),
58774
+ integrationId: z.string().nullable(),
58775
+ integrationLabel: z.string().nullable(),
58776
+ online: z.boolean().nullable(),
58777
+ disabled: z.boolean(),
58778
+ compatible: z.boolean(),
58779
+ /** Only the required caps' fields; empty when nothing was required or the device is incompatible. */
58780
+ values: z.array(DeviceValueOptionSchema).readonly()
58781
+ });
58782
+ var DeviceSearchFacetValueSchema = z.object({
58783
+ value: z.string(),
58784
+ count: z.number()
58785
+ });
58786
+ var DeviceSearchFacetIntegrationSchema = z.object({
58787
+ id: z.string(),
58788
+ label: z.string(),
58789
+ count: z.number()
58790
+ });
58791
+ var DeviceSearchFacetsSchema = z.object({
58792
+ locations: z.array(DeviceSearchFacetValueSchema).readonly(),
58793
+ integrations: z.array(DeviceSearchFacetIntegrationSchema).readonly(),
58794
+ types: z.array(DeviceSearchFacetValueSchema).readonly()
58795
+ });
58796
+ var DeviceSearchResultSchema = z.object({
58797
+ items: z.array(DeviceSearchItemSchema).readonly(),
58798
+ nextCursor: z.string().nullable(),
58799
+ /** Devices listed by this query across all pages (filters + text applied; incompatible counted only when `includeIncompatible`). */
58800
+ total: z.number(),
58801
+ /** Compatible devices after filters + text. */
58802
+ compatibleTotal: z.number(),
58803
+ /** Every device the caller's fleet holds, before anything is applied. */
58804
+ fleetTotal: z.number(),
58805
+ /** Incompatible devices after filters + text — the K of "show the K that don't". */
58806
+ hiddenIncompatible: z.number(),
58807
+ facets: DeviceSearchFacetsSchema,
58808
+ /** Same location as `contextDeviceId`; first page only. */
58809
+ suggested: z.array(DeviceSearchItemSchema).readonly(),
58810
+ missingIds: z.array(z.number()).readonly()
58811
+ });
58572
58812
  var ProviderStatusSchema = z.object({
58573
58813
  connected: z.boolean(),
58574
58814
  deviceCount: z.number(),
@@ -59054,6 +59294,9 @@ var DeviceInfoSchema = z.object({
59054
59294
  * named accordion sections (with optional intra-section order). See
59055
59295
  * `DeviceMeta.childLayout`. Absent ⇒ no layout declared. */
59056
59296
  childLayout: z.array(ChildLayoutEntrySchema).readonly().optional(),
59297
+ /** The children a container stands for, most preferred first, by accessory
59298
+ * `childKey`. Provider-declared. See `DeviceMeta.primaryChildPreference`. */
59299
+ primaryChildPreference: z.array(z.string()).readonly().optional(),
59057
59300
  /** Operator-authored per-device display override. See `DeviceMeta.display`. */
59058
59301
  display: DeviceDisplayOverrideSchema.optional()
59059
59302
  });
@@ -59217,6 +59460,9 @@ var DeviceMetaSchema = z.object({
59217
59460
  * accordion sections (with optional intra-section order). See
59218
59461
  * `DeviceMeta.childLayout`. Absent ⇒ no layout declared. */
59219
59462
  childLayout: z.array(ChildLayoutEntrySchema).readonly().optional(),
59463
+ /** The children a container stands for, most preferred first, by accessory
59464
+ * `childKey`. Provider-declared. See `DeviceMeta.primaryChildPreference`. */
59465
+ primaryChildPreference: z.array(z.string()).readonly().optional(),
59220
59466
  /** Semantic role string (`DeviceRole`) — propagated from the spawn pre-seed.
59221
59467
  * Optional: only present for accessory children that carry a known role. */
59222
59468
  role: z.string().nullable().optional(),
@@ -59544,6 +59790,17 @@ var deviceManagerCapability = {
59544
59790
  kind: "mutation",
59545
59791
  auth: "admin"
59546
59792
  }),
59793
+ /** Set (or replace) a container's provider-declared primary-child
59794
+ * preference: accessory `childKey`s, most preferred first. Mirrors
59795
+ * `setChildLayout`; the operator's `primaryChildEntityId` still wins.
59796
+ * Persisted, projected, and preserved across re-register/restore. Idempotent. */
59797
+ setPrimaryChildPreference: method(z.object({
59798
+ deviceId: z.number(),
59799
+ primaryChildPreference: z.array(z.string()).readonly()
59800
+ }), z.void(), {
59801
+ kind: "mutation",
59802
+ auth: "admin"
59803
+ }),
59547
59804
  /** Set (or clear) the per-device display override on the meta row. Mirrors
59548
59805
  * `setChildLayout` persistence; `null` clears the override entirely. The
59549
59806
  * override unit(s) are normalized (`normalizeUnit`) at write so the render
@@ -59873,6 +60130,15 @@ var deviceManagerCapability = {
59873
60130
  */
59874
60131
  deviceIds: z.array(z.number()).optional()
59875
60132
  }), z.array(DeviceInfoSchema), { role: "viewer" }),
60133
+ /**
60134
+ * The device → value picker's one query: filter by text, capability and
60135
+ * location / integration / type, with faceted counts, cursor pagination,
60136
+ * the live reading of each matching value, suggestions by the context
60137
+ * device's location, and `ids` resolution for already-picked values.
60138
+ * See `device-search.ts`. Not in `DEVICE_ENUMERATION_METHODS`: a
60139
+ * device-scoped token is refused rather than shown the whole fleet.
60140
+ */
60141
+ search: method(DeviceSearchInputSchema, DeviceSearchResultSchema, { role: "viewer" }),
59876
60142
  /** Get a single device by numeric deviceId. */
59877
60143
  getDevice: method(z.object({ deviceId: z.number() }), DeviceInfoSchema.nullable()),
59878
60144
  /** List children of a parent device (by parent numeric id). */
@@ -64510,13 +64776,11 @@ var HeroConfirmSchema = z.enum([
64510
64776
  "press"
64511
64777
  ]);
64512
64778
  var HeroActionSchema = z.object({
64513
- /** Unique within the model; the `gated` list and the specs name it. */
64514
64779
  id: z.string(),
64515
64780
  label: HeroTextSchema,
64516
64781
  icon: IconKeySchema,
64517
64782
  call: HeroCallSchema,
64518
64783
  emphasis: z.enum(["primary", "normal"]),
64519
- /** Ask before running it. */
64520
64784
  confirm: HeroConfirmSchema.nullable()
64521
64785
  });
64522
64786
  var HeroControlSchema = z.discriminatedUnion("kind", [
@@ -64565,8 +64829,23 @@ var HeroPillSchema = z.object({
64565
64829
  text: HeroTextSchema,
64566
64830
  tone: HeroToneSchema
64567
64831
  });
64832
+ /**
64833
+ * Rows whose action and slider controls belong ON the scene (the curtain's buttons, the
64834
+ * lock's key, the player's transport) and not in a row under it. The model says it, so
64835
+ * every client draws the same placement; a control of another kind stays in a row.
64836
+ */
64837
+ var HERO_SCENE_ROW_IDS = new Set([
64838
+ "cover",
64839
+ "valve",
64840
+ "lock",
64841
+ "vacuum",
64842
+ "playback",
64843
+ "brightness"
64844
+ ]);
64568
64845
  var HeroRowSchema = z.object({
64569
64846
  id: HeroRowIdSchema,
64847
+ /** `scene`: the row's action and slider controls are drawn on the scene. Absent: an ordinary row. */
64848
+ placement: z.enum(["row", "scene"]).optional(),
64570
64849
  /** The row's own name when the kind's label would not tell rows of one kind apart (a circuit's label). */
64571
64850
  label: HeroTextSchema.optional(),
64572
64851
  /** A group header drawn above the row when it differs from the previous row's ("System"). */
@@ -64597,9 +64876,18 @@ var HeroBadgeSchema = z.object({
64597
64876
  value: z.number().nullable(),
64598
64877
  label: HeroTextSchema
64599
64878
  });
64600
- var HeroRemoteSlotSchema = z.object({
64601
- /** Saved commands; `null` = not known yet (the button still shows). */
64602
- commands: z.number().int().nullable() });
64879
+ /** The id of the action a row recognises as "open the device's remote". */
64880
+ var REMOTE_OPEN_ACTION_ID = "remote.open";
64881
+ var HeroRemoteSlotSchema = z.object({
64882
+ /** Saved commands; `null` = not known yet (the button still shows). */
64883
+ commands: z.number().int().nullable(),
64884
+ /**
64885
+ * The control a list row draws as the "open the remote" icon. Recognised by its id
64886
+ * ({@link REMOTE_OPEN_ACTION_ID}); it changes no state, so a client opens the remote
64887
+ * instead of running `call`. Absent on a model from an older server.
64888
+ */
64889
+ open: HeroActionSchema.optional()
64890
+ });
64603
64891
  var HeroConsumableItemSchema = z.object({
64604
64892
  key: z.string(),
64605
64893
  label: z.string(),
@@ -64768,6 +65056,8 @@ var HeroModelSchema = z.object({
64768
65056
  * the FIRST row that has any (a later row's control is never promoted). When
64769
65057
  * the model lists that part in `gated`, the row has no inline control: the
64770
65058
  * projection never falls through to another control the caller could use.
65059
+ * - a climate or thermostat row's primary is its `climate.mode` control (no power
65060
+ * toggle: "off" is a mode); when the model gates it the rule above applies as before;
64771
65061
  * - a timed run, when the model carries the slot, sits beside that primary:
64772
65062
  * Run while idle, Stop while armed. Gating the slot hides the control.
64773
65063
  * - the status line is the head (what plays, else the state) plus at most
@@ -64775,6 +65065,13 @@ var HeroModelSchema = z.object({
64775
65065
  * time left on an armed timed run;
64776
65066
  * - the trailing fact is the first of power, battery, consumables.
64777
65067
  *
65068
+ * - `extras` are the further inline controls of the types that carry more than one
65069
+ * ({@link ROW_EXTRAS_BY_TYPE}): climate setpoint, a robot's return to base,
65070
+ * a player's volume and remote. Each is a control the model already has, named by id,
65071
+ * in that order and at most {@link ROW_EXTRAS_MAX}; one the model lacks, or lists in
65072
+ * `gated`, is absent, and the one `primary` already is never repeats. Empty = the
65073
+ * row of an older server: `primary` alone.
65074
+ *
64778
65075
  * `projectDeviceRow` is pure and computes nothing: it selects from a
64779
65076
  * {@link HeroModel}. A row that needed a value the hero lacks would mean the
64780
65077
  * model is missing it, so the fix goes in the model.
@@ -64806,6 +65103,12 @@ var HeroRowModelSchema = z.object({
64806
65103
  * while armed. `null` when there is no slot, or the caller may not act.
64807
65104
  */
64808
65105
  timedRun: HeroRowTimedRunSchema.nullable(),
65106
+ /**
65107
+ * The further inline controls after `primary`, in order (see the header). The remote
65108
+ * is an `action` with id `remote.open`: the client opens the remote, it does not run
65109
+ * the call. Absent or empty = `primary` alone.
65110
+ */
65111
+ extras: z.array(HeroControlSchema).max(2).optional(),
64809
65112
  trailing: HeroFactSchema.nullable()
64810
65113
  });
64811
65114
  /** The trailing fact, in order of preference. */
@@ -64821,7 +65124,20 @@ function trailingOf(facts) {
64821
65124
  }
64822
65125
  return null;
64823
65126
  }
65127
+ /**
65128
+ * A type whose primary is a named control, not its power: a climate row is the mode
65129
+ * (which carries "off") and the setpoint, with no power toggle.
65130
+ */
65131
+ var ROW_PRIMARY_BY_TYPE = {
65132
+ [DeviceType.Climate]: "climate.mode",
65133
+ [DeviceType.Thermostat]: "climate.mode"
65134
+ };
64824
65135
  function primaryOf(model) {
65136
+ const named = ROW_PRIMARY_BY_TYPE[model.type];
65137
+ if (named !== void 0) {
65138
+ const found = extraOf(model, named);
65139
+ if (found !== null) return found;
65140
+ }
64825
65141
  const power = model.ownPower;
64826
65142
  if (power !== null) {
64827
65143
  if (model.gated.includes("own-power")) return null;
@@ -64841,6 +65157,43 @@ function primaryOf(model) {
64841
65157
  }
64842
65158
  return null;
64843
65159
  }
65160
+ /**
65161
+ * The extras of a type, by control id, in the order they are drawn. The ids are the
65162
+ * model's own: a `remote.open` is read from the model's remote slot, every other
65163
+ * from the rows. A type not listed has no extras.
65164
+ */
65165
+ var ROW_EXTRAS_BY_TYPE = {
65166
+ [DeviceType.Climate]: ["climate.target"],
65167
+ [DeviceType.Thermostat]: ["climate.target"],
65168
+ [DeviceType.Vacuum]: ["vacuum.base"],
65169
+ [DeviceType.LawnMower]: ["mower.dock"],
65170
+ [DeviceType.MediaPlayer]: ["volume.level", REMOTE_OPEN_ACTION_ID]
65171
+ };
65172
+ var controlId = (c) => c.kind === "action" ? c.action.id : c.id;
65173
+ function extraOf(model, id) {
65174
+ if (id === "remote.open") {
65175
+ const open = model.remote?.open;
65176
+ if (open === void 0 || model.gated.includes("remote")) return null;
65177
+ return {
65178
+ kind: "action",
65179
+ action: open
65180
+ };
65181
+ }
65182
+ for (const row of model.rows) {
65183
+ if (model.gated.includes(row.id)) continue;
65184
+ const found = row.controls.find((c) => controlId(c) === id);
65185
+ if (found !== void 0) return found;
65186
+ }
65187
+ return null;
65188
+ }
65189
+ function extrasOf(model, primary) {
65190
+ const ids = ROW_EXTRAS_BY_TYPE[model.type] ?? [];
65191
+ const taken = primary === null ? null : controlId(primary);
65192
+ return ids.filter((id) => id !== taken).flatMap((id) => {
65193
+ const found = extraOf(model, id);
65194
+ return found === null ? [] : [found];
65195
+ }).slice(0, 2);
65196
+ }
64844
65197
  function statusLineOf(model, trailing) {
64845
65198
  const head = model.rows.find((r) => r.id === "now-playing")?.status ?? null ?? model.title;
64846
65199
  const rest = model.facts.filter((f) => f !== trailing).map((f) => f.text).slice(0, 3);
@@ -64869,6 +65222,7 @@ function timedRunOf(model) {
64869
65222
  }
64870
65223
  function projectDeviceRow(model) {
64871
65224
  const trailing = trailingOf(model.facts);
65225
+ const primary = primaryOf(model);
64872
65226
  return {
64873
65227
  deviceId: model.deviceId,
64874
65228
  name: model.name,
@@ -64878,8 +65232,9 @@ function projectDeviceRow(model) {
64878
65232
  look: model.look,
64879
65233
  scene: model.scene,
64880
65234
  statusLine: statusLineOf(model, trailing),
64881
- primary: primaryOf(model),
65235
+ primary,
64882
65236
  timedRun: timedRunOf(model),
65237
+ extras: extrasOf(model, primary),
64883
65238
  trailing
64884
65239
  };
64885
65240
  }
@@ -67681,7 +68036,9 @@ var HUB_MDNS_TXT_KEYS = {
67681
68036
  nodeId: "nodeId",
67682
68037
  version: "version",
67683
68038
  role: "role",
67684
- url: "url"
68039
+ url: "url",
68040
+ /** The hub's announced identity (`hub-<16 hex>`), see {@link isHubId}. */
68041
+ hubId: "hubId"
67685
68042
  };
67686
68043
  /**
67687
68044
  * How a hub finds agents to pair (D857): every agent publishes ONE mDNS service for its API
@@ -79104,13 +79461,23 @@ var NcRuleTargetSchema = z.object({
79104
79461
  */
79105
79462
  params: z.record(z.string(), z.unknown()).optional()
79106
79463
  });
79464
+ /** Which picture kind one target receives (#487). */
79465
+ var NcTargetAttachmentSchema = z.enum([
79466
+ "none",
79467
+ "image",
79468
+ "clip",
79469
+ "gif"
79470
+ ]);
79107
79471
  var NcTargetOverrideSchema = z.object({
79108
79472
  template: z.object({
79109
79473
  title: z.string().max(500).optional(),
79110
79474
  body: z.string().max(2e3).optional()
79111
79475
  }).optional(),
79112
79476
  schedule: NcScheduleSchema.optional(),
79113
- priority: z.number().int().min(1).max(5).optional()
79477
+ priority: z.number().int().min(1).max(5).optional(),
79478
+ attachment: NcTargetAttachmentSchema.optional(),
79479
+ /** `false` = no buttons for this target; `true` is the same as absent. */
79480
+ actions: z.boolean().optional()
79114
79481
  });
79115
79482
  /** Per-target settings keyed by target id (#487). */
79116
79483
  var NcTargetOverridesSchema = z.record(z.string(), NcTargetOverrideSchema);
@@ -84044,18 +84411,18 @@ var powerSourceCapability = {
84044
84411
  mode: "singleton",
84045
84412
  deviceTypes: POWER_SOURCE_DEVICE_TYPES,
84046
84413
  methods: {
84047
- getStatus: systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "admin" }),
84414
+ getStatus: systemMethod(deviceInput$1, PowerSourceInfoSchema, { auth: "protected" }),
84048
84415
  powerOn: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
84049
84416
  kind: "mutation",
84050
- auth: "admin"
84417
+ auth: "protected"
84051
84418
  }),
84052
84419
  powerOff: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
84053
84420
  kind: "mutation",
84054
- auth: "admin"
84421
+ auth: "protected"
84055
84422
  }),
84056
84423
  forceRestart: systemMethod(deviceInput$1, PowerSourceActionResultSchema, {
84057
84424
  kind: "mutation",
84058
- auth: "admin"
84425
+ auth: "protected"
84059
84426
  })
84060
84427
  },
84061
84428
  runtimeState: PowerSourceStateSchema,
@@ -94990,6 +95357,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
94990
95357
  cameraStreamsCapability,
94991
95358
  carbonMonoxideCapability,
94992
95359
  climateControlCapability,
95360
+ clusterUpdateCapability,
94993
95361
  colorCapability,
94994
95362
  composerCapability,
94995
95363
  connectivityCapability,
@@ -98186,9 +98554,11 @@ function deriveBatteryPresence(input) {
98186
98554
  * priority-in-sync.ts` fails the build when either drifts — the comment that
98187
98555
  * used to ask for this could not.
98188
98556
  *
98189
- * The rule has three halves and the ORDER matters: an operator's explicit pick
98190
- * wins outright; else a declaration on the device type
98191
- * ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
98557
+ * The rule has four steps and the ORDER matters: an operator's explicit pick
98558
+ * wins outright; else the container's own declaration, an ordered list of
98559
+ * child keys its provider stamped at create
98560
+ * ({@link ContainerPrimaryChildPreference}); else a declaration on the device
98561
+ * type ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
98192
98562
  * priority. The pick is keyed on the child's re-sync-stable `entityId`, not
98193
98563
  * its numeric id, so it survives a re-sync that reallocates ids.
98194
98564
  */
@@ -98201,6 +98571,25 @@ var CONTAINER_PRIMARY_CHILD_RULES = [{
98201
98571
  deviceType: DeviceType.HeatPump,
98202
98572
  primary: "self"
98203
98573
  }];
98574
+ /** The declaration of a container read from its meta, or undefined when it declared none. */
98575
+ function primaryChildPreferenceOf(container) {
98576
+ const keys = container.primaryChildPreference;
98577
+ if (container.stableId === void 0 || keys === void 0 || keys === null) return void 0;
98578
+ if (keys.length === 0) return void 0;
98579
+ return {
98580
+ parentStableId: container.stableId,
98581
+ childKeys: keys
98582
+ };
98583
+ }
98584
+ /** The first declared child that exists, or undefined when none does. */
98585
+ function applyPrimaryChildPreference(preference, children) {
98586
+ if (preference === void 0) return void 0;
98587
+ for (const key of preference.childKeys) {
98588
+ const expected = `${preference.parentStableId}-${key}`;
98589
+ const match = children.find((child) => child.stableId === expected);
98590
+ if (match !== void 0) return match;
98591
+ }
98592
+ }
98204
98593
  /**
98205
98594
  * The type declaration, before the heuristic. `fall-through` means the
98206
98595
  * heuristic still decides: the type declared nothing, or it named a child
@@ -98308,7 +98697,8 @@ function rank(type) {
98308
98697
  }
98309
98698
  /**
98310
98699
  * The child a container stands for: the operator's pick when it still exists,
98311
- * else the device type's declaration, else the highest-priority type. `null`
98700
+ * else the container's declared preference, else the device type's
98701
+ * declaration, else the highest-priority type. `null`
98312
98702
  * for a childless container, and for a type that stands for itself — a caller
98313
98703
  * must decide what "no child" means for it, rather than being handed a child
98314
98704
  * that is not the device.
@@ -98340,11 +98730,13 @@ function sameName(childName, containerName) {
98340
98730
  const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
98341
98731
  return flatten(childName) === flatten(containerName);
98342
98732
  }
98343
- function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
98733
+ function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType, preference) {
98344
98734
  if (overrideEntityId !== void 0 && overrideEntityId !== null) {
98345
98735
  const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
98346
98736
  if (picked !== void 0) return picked;
98347
98737
  }
98738
+ const preferred = applyPrimaryChildPreference(preference, children);
98739
+ if (preferred !== void 0) return preferred;
98348
98740
  const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
98349
98741
  if (declared.kind === "none") return null;
98350
98742
  if (declared.kind === "child") return declared.child;
@@ -98395,7 +98787,7 @@ function expandContainer(id, byId, byParent, visited, out) {
98395
98787
  type: c.type,
98396
98788
  ...c.role !== void 0 && c.role !== null ? { role: c.role } : {},
98397
98789
  ...c.name !== void 0 ? { name: c.name } : {}
98398
- })), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name, candidate.type);
98790
+ })), candidate.primaryChildEntityId, candidate.name, candidate.type, primaryChildPreferenceOf(candidate));
98399
98791
  if (primary !== null) expandContainer(primary.id, byId, byParent, nextVisited, out);
98400
98792
  }
98401
98793
  /**
@@ -101162,7 +101554,10 @@ var powerSourceContribution = contribution("power-source", PowerSourceStateSchem
101162
101554
  /** The remote cap has no status: the model's input carries how many commands it holds. */
101163
101555
  var remoteContribution = {
101164
101556
  cap: "remote",
101165
- contribute: (_slice, ctx) => ctx.remoteCommands === 0 ? {} : { remote: { commands: ctx.remoteCommands } }
101557
+ contribute: (_slice, ctx) => ctx.remoteCommands === 0 ? {} : { remote: {
101558
+ commands: ctx.remoteCommands,
101559
+ open: action(REMOTE_OPEN_ACTION_ID, t("Remote", "Telecomando"), "gamepad-2", "remote", "open")
101560
+ } }
101166
101561
  };
101167
101562
  var ATTENTION_STATUSES = [
101168
101563
  "low",
@@ -102588,7 +102983,10 @@ function buildHeroModel(input) {
102588
102983
  };
102589
102984
  const allRows = fragments.flatMap((f) => f.rows ?? []);
102590
102985
  const rows = resolveHeroLayout(device.type).rows.flatMap((id) => {
102591
- return allRows.filter((r) => r.id === id);
102986
+ return allRows.filter((r) => r.id === id).map((r) => HERO_SCENE_ROW_IDS.has(r.id) ? {
102987
+ ...r,
102988
+ placement: "scene"
102989
+ } : r);
102592
102990
  });
102593
102991
  const ownPower = resolveOwnPower(fragments.flatMap((f) => f.ownPower === void 0 ? [] : [f.ownPower]));
102594
102992
  const timedRun = fragments.find((f) => f.timedRun !== void 0)?.timedRun ?? null;
@@ -103870,6 +104268,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
103870
104268
  access: "create",
103871
104269
  role: "viewer"
103872
104270
  },
104271
+ "clusterUpdate.getClusterUpdateJob": {
104272
+ capName: "cluster-update",
104273
+ capScope: "system",
104274
+ addonId: null,
104275
+ access: "view",
104276
+ role: "admin"
104277
+ },
104278
+ "clusterUpdate.previewClusterUpdate": {
104279
+ capName: "cluster-update",
104280
+ capScope: "system",
104281
+ addonId: null,
104282
+ access: "view",
104283
+ role: "admin"
104284
+ },
104285
+ "clusterUpdate.startClusterUpdate": {
104286
+ capName: "cluster-update",
104287
+ capScope: "system",
104288
+ addonId: null,
104289
+ access: "create",
104290
+ role: "admin"
104291
+ },
103873
104292
  "color.getStatus": {
103874
104293
  capName: "color",
103875
104294
  capScope: "device",
@@ -105242,6 +105661,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
105242
105661
  access: "create",
105243
105662
  role: "admin"
105244
105663
  },
105664
+ "deviceManager.search": {
105665
+ capName: "device-manager",
105666
+ capScope: "system",
105667
+ addonId: null,
105668
+ access: "view",
105669
+ role: "viewer"
105670
+ },
105245
105671
  "deviceManager.setAlias": {
105246
105672
  capName: "device-manager",
105247
105673
  capScope: "system",
@@ -105333,6 +105759,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
105333
105759
  access: "create",
105334
105760
  role: "admin"
105335
105761
  },
105762
+ "deviceManager.setPrimaryChildPreference": {
105763
+ capName: "device-manager",
105764
+ capScope: "system",
105765
+ addonId: null,
105766
+ access: "create",
105767
+ role: "admin"
105768
+ },
105336
105769
  "deviceManager.setRole": {
105337
105770
  capName: "device-manager",
105338
105771
  capScope: "system",
@@ -109972,28 +110405,28 @@ var METHOD_ACCESS_MAP = Object.freeze({
109972
110405
  capScope: "device",
109973
110406
  addonId: null,
109974
110407
  access: "create",
109975
- role: "admin"
110408
+ role: "viewer"
109976
110409
  },
109977
110410
  "powerSource.getStatus": {
109978
110411
  capName: "power-source",
109979
110412
  capScope: "device",
109980
110413
  addonId: null,
109981
110414
  access: "view",
109982
- role: "admin"
110415
+ role: "viewer"
109983
110416
  },
109984
110417
  "powerSource.powerOff": {
109985
110418
  capName: "power-source",
109986
110419
  capScope: "device",
109987
110420
  addonId: null,
109988
110421
  access: "create",
109989
- role: "admin"
110422
+ role: "viewer"
109990
110423
  },
109991
110424
  "powerSource.powerOn": {
109992
110425
  capName: "power-source",
109993
110426
  capScope: "device",
109994
110427
  addonId: null,
109995
110428
  access: "create",
109996
- role: "admin"
110429
+ role: "viewer"
109997
110430
  },
109998
110431
  "presence.getStatus": {
109999
110432
  capName: "presence",
@@ -114104,6 +114537,11 @@ Object.freeze({
114104
114537
  form: "single",
114105
114538
  optional: false
114106
114539
  }],
114540
+ "deviceManager.setPrimaryChildPreference": [{
114541
+ name: "deviceId",
114542
+ form: "single",
114543
+ optional: false
114544
+ }],
114107
114545
  "deviceManager.setRole": [{
114108
114546
  name: "deviceId",
114109
114547
  form: "single",
@@ -117992,7 +118430,9 @@ var TimelapseRuleInputSchema = z.object({
117992
118430
  /** Classes the notification counts — see {@link ReportClassesField}. */
117993
118431
  reportClasses: ReportClassesField.optional(),
117994
118432
  /** Canonical notification priority ordinal (1..5); per-target overridable. */
117995
- priority: PriorityField.default(3)
118433
+ priority: PriorityField.default(3),
118434
+ /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
118435
+ targetOverrides: NcTargetOverridesSchema.optional()
117996
118436
  });
117997
118437
  z.object({
117998
118438
  name: NameField.optional(),
@@ -118008,7 +118448,9 @@ z.object({
118008
118448
  previewText: PreviewTextField.optional(),
118009
118449
  previewMode: PreviewModeField.optional(),
118010
118450
  reportClasses: ReportClassesField.optional(),
118011
- priority: PriorityField.optional()
118451
+ priority: PriorityField.optional(),
118452
+ /** Per-target settings keyed by target id (D1032) — absent = every target follows the rule. */
118453
+ targetOverrides: NcTargetOverridesSchema.optional()
118012
118454
  });
118013
118455
  TimelapseRuleInputSchema.extend({
118014
118456
  id: z.string(),