@camstack/addon-provider-homematic 1.2.195 → 1.2.197

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 (19) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/.bundle-modules.json +12 -11
  3. package/dist/_stub.js +514 -376
  4. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-BxmxWSOr.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_page-C4Fww_oV.mjs} +4 -4
  5. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D0unHZPY.mjs +26 -0
  6. package/dist/addon-provider-homematic.css +1 -1
  7. package/dist/addon.js +998 -525
  8. package/dist/addon.mjs +998 -525
  9. package/dist/{hostInit-DVAY-ltL.mjs → hostInit-DTPxs8RG.mjs} +3 -3
  10. package/dist/remoteEntry.js +1 -1
  11. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-B3yyDS0x.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_provider_homematic_page__remoteEntry_js-DSDGvcoJ.mjs} +1 -1
  12. package/dist/widgets/_stub.js +24 -7
  13. package/dist/widgets/{_virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-BPDLKZtI.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_provider_homematic_widgets-p7WFaZQH.mjs} +2 -2
  14. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C7ks8wIZ.mjs +26 -0
  15. package/dist/widgets/{hostInit-BlyQmRnG.mjs → hostInit-CtVv-2Cj.mjs} +2 -2
  16. package/dist/widgets/remoteEntry.js +1 -1
  17. package/package.json +6 -6
  18. package/dist/_virtual_mf___mfe_internal__addon_provider_homematic_page__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DMlVGmnP.mjs +0 -26
  19. package/dist/widgets/_virtual_mf___mfe_internal__addon_provider_homematic_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C6zY_Ytj.mjs +0 -26
package/dist/addon.mjs CHANGED
@@ -5763,7 +5763,7 @@ var ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5763
5763
  inst.keyType = def.keyType;
5764
5764
  inst.valueType = def.valueType;
5765
5765
  });
5766
- function record(keyType, valueType, params) {
5766
+ function record$1(keyType, valueType, params) {
5767
5767
  if (!valueType || !valueType._zod) return new ZodRecord({
5768
5768
  type: "record",
5769
5769
  keyType: string(),
@@ -6072,7 +6072,7 @@ var ZodIssueCode = {
6072
6072
  var ZodFirstPartyTypeKind;
6073
6073
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6074
6074
  //#endregion
6075
- //#region ../types/dist/sleep-Cykc2bzi.mjs
6075
+ //#region ../types/dist/sleep-BCWQQG52.mjs
6076
6076
  /**
6077
6077
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6078
6078
  * window to float samples (D455).
@@ -7600,7 +7600,7 @@ function registrySwitchPortsOver(deps) {
7600
7600
  const handle = deps.records.kind({
7601
7601
  name: deps.kind.name,
7602
7602
  declaration: deps.kind.declaration,
7603
- schema: record(string(), unknown())
7603
+ schema: record$1(string(), unknown())
7604
7604
  });
7605
7605
  return {
7606
7606
  listIntegrations: async (addonId) => (await deps.api.list()).filter((i) => i.addonId === addonId).map((i) => ({
@@ -9751,7 +9751,7 @@ function normalizeAddonInitResult(result) {
9751
9751
  }
9752
9752
  object({
9753
9753
  code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
9754
- params: record(string(), union([string(), number$1()])).optional()
9754
+ params: record$1(string(), union([string(), number$1()])).optional()
9755
9755
  });
9756
9756
  object({
9757
9757
  field: string().min(1),
@@ -9802,7 +9802,7 @@ object({
9802
9802
  }).nullable();
9803
9803
  object({ deviceId: number$1() }), object({ deviceId: number$1() }), object({
9804
9804
  deviceId: number$1(),
9805
- patch: record(string(), unknown())
9805
+ patch: record$1(string(), unknown())
9806
9806
  }), object({ success: literal(true) });
9807
9807
  object({ deviceId: number$1() }), unknown().nullable();
9808
9808
  function method(input, output, options) {
@@ -9957,7 +9957,7 @@ var EntryDescriptorSchema = object({
9957
9957
  /** The record body field shown as the entry's name. */
9958
9958
  nameField: string().min(1),
9959
9959
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
9960
- fields: record(string(), unknown())
9960
+ fields: record$1(string(), unknown())
9961
9961
  }).strict();
9962
9962
  /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
9963
9963
  var RecordKindDeclarationSchema = object({
@@ -9977,7 +9977,7 @@ var RecordKindDeclarationSchema = object({
9977
9977
  /** Derived from the Zod schema; never written by hand. */
9978
9978
  secretPaths: array(string().min(1)).default([]),
9979
9979
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
9980
- secretArrayKeys: record(string(), string()).default({}),
9980
+ secretArrayKeys: record$1(string(), string()).default({}),
9981
9981
  /** Kinds that must agree through `transact` sit in one file under one family name. */
9982
9982
  transactFamily: string().min(1).optional(),
9983
9983
  entry: EntryDescriptorSchema.optional()
@@ -10191,7 +10191,7 @@ var TransitionValueSchema = union([
10191
10191
  number$1(),
10192
10192
  boolean(),
10193
10193
  _null(),
10194
- record(string(), unknown())
10194
+ record$1(string(), unknown())
10195
10195
  ]);
10196
10196
  /** Who asked. `device` is the fallback: nothing the hub observed asked for the change. */
10197
10197
  var TransitionActorSchema = discriminatedUnion("kind", [
@@ -10254,7 +10254,7 @@ var TransitionOutcomeSchema = _enum([
10254
10254
  var TransitionCommandSchema = object({
10255
10255
  commandId: string(),
10256
10256
  method: string(),
10257
- args: record(string(), unknown()),
10257
+ args: record$1(string(), unknown()),
10258
10258
  requestedAt: number$1(),
10259
10259
  /** Milliseconds from the command to the change it caused; `null` when no change was seen. */
10260
10260
  matchedAfterMs: number$1().nullable(),
@@ -10477,7 +10477,7 @@ var CameraStreamSchema = object({
10477
10477
  * route RTP packets to the right depacketizer without an in-band
10478
10478
  * DESCRIBE phase). Other kinds typically leave it undefined.
10479
10479
  */
10480
- metadata: record(string(), unknown()).optional()
10480
+ metadata: record$1(string(), unknown()).optional()
10481
10481
  });
10482
10482
  var ProfileSlotStatusSchema = _enum([
10483
10483
  "unassigned",
@@ -10529,7 +10529,7 @@ object({
10529
10529
  url: string(),
10530
10530
  videoCodec: string().optional(),
10531
10531
  audioCodec: string().optional(),
10532
- metadata: record(string(), unknown()).readonly().optional()
10532
+ metadata: record$1(string(), unknown()).readonly().optional()
10533
10533
  });
10534
10534
  /**
10535
10535
  * Wire schema for `FrameHandle` — a zero-pixel, serialisable reference to a
@@ -10718,41 +10718,57 @@ var CAP_VOCABULARY_BY_NAME = {
10718
10718
  en: "Switch",
10719
10719
  it: "Interruttore"
10720
10720
  },
10721
- actions: [{
10722
- id: "switch.on",
10723
- method: "setState",
10724
- label: {
10725
- en: "Turn on",
10726
- it: "Accendi"
10727
- },
10728
- phrase: {
10729
- en: "Turn on {device}",
10730
- it: "Accendi {device}"
10731
- },
10732
- icon: "power",
10733
- args: { on: true },
10734
- effect: {
10735
- field: "on",
10736
- value: true
10737
- }
10738
- }, {
10739
- id: "switch.off",
10740
- method: "setState",
10741
- label: {
10742
- en: "Turn off",
10743
- it: "Spegni"
10721
+ actions: [
10722
+ {
10723
+ id: "switch.on",
10724
+ method: "setState",
10725
+ label: {
10726
+ en: "Turn on",
10727
+ it: "Accendi"
10728
+ },
10729
+ phrase: {
10730
+ en: "Turn on {device}",
10731
+ it: "Accendi {device}"
10732
+ },
10733
+ icon: "power",
10734
+ args: { on: true },
10735
+ effect: {
10736
+ field: "on",
10737
+ value: true
10738
+ }
10744
10739
  },
10745
- phrase: {
10746
- en: "Turn off {device}",
10747
- it: "Spegni {device}"
10740
+ {
10741
+ id: "switch.off",
10742
+ method: "setState",
10743
+ label: {
10744
+ en: "Turn off",
10745
+ it: "Spegni"
10746
+ },
10747
+ phrase: {
10748
+ en: "Turn off {device}",
10749
+ it: "Spegni {device}"
10750
+ },
10751
+ icon: "power-off",
10752
+ args: { on: false },
10753
+ effect: {
10754
+ field: "on",
10755
+ value: false
10756
+ }
10748
10757
  },
10749
- icon: "power-off",
10750
- args: { on: false },
10751
- effect: {
10752
- field: "on",
10753
- value: false
10758
+ {
10759
+ id: "switch.toggle",
10760
+ method: "toggle",
10761
+ label: {
10762
+ en: "Toggle",
10763
+ it: "Commuta"
10764
+ },
10765
+ phrase: {
10766
+ en: "Toggle {device}",
10767
+ it: "Commuta {device}"
10768
+ },
10769
+ icon: "toggle-right"
10754
10770
  }
10755
- }],
10771
+ ],
10756
10772
  state: [{
10757
10773
  kind: "boolean",
10758
10774
  field: "on",
@@ -19321,11 +19337,11 @@ var RawStateResultSchema = object({
19321
19337
  /** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
19322
19338
  source: string(),
19323
19339
  /** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
19324
- data: record(string(), unknown())
19340
+ data: record$1(string(), unknown())
19325
19341
  });
19326
19342
  method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema$1)), method(object({
19327
19343
  deviceId: number$1(),
19328
- values: record(string(), unknown())
19344
+ values: record$1(string(), unknown())
19329
19345
  }), _void(), {
19330
19346
  kind: "mutation",
19331
19347
  auth: "admin"
@@ -19356,7 +19372,7 @@ var PipelineStepInputSchema = lazy(() => object({
19356
19372
  modelId: string().optional(),
19357
19373
  enabled: boolean().default(true),
19358
19374
  children: array(PipelineStepInputSchema).optional(),
19359
- settings: record(string(), unknown()).optional(),
19375
+ settings: record$1(string(), unknown()).optional(),
19360
19376
  jumpDeviceKey: string().optional()
19361
19377
  }));
19362
19378
  /** Typed bridge to the recursive `FrameResult` graph; validation is structural. */
@@ -22648,7 +22664,7 @@ var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSource
22648
22664
  var CompositionExpressionSourceSchema = object({
22649
22665
  kind: literal("expression"),
22650
22666
  expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
22651
- bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
22667
+ bindings: record$1(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
22652
22668
  }).superRefine((src, ctx) => {
22653
22669
  const err = validateExpressionSource(src);
22654
22670
  if (err !== null) ctx.addIssue({
@@ -22724,7 +22740,7 @@ var forwardArgUnion = union([
22724
22740
  number$1(),
22725
22741
  boolean(),
22726
22742
  strictObject({ ["$input"]: string().min(1) }),
22727
- record(string().min(1), lazy(() => forwardArgUnion))
22743
+ record$1(string().min(1), lazy(() => forwardArgUnion))
22728
22744
  ]);
22729
22745
  var CompositionForwardArgSchema = forwardArgUnion;
22730
22746
  /**
@@ -22738,7 +22754,7 @@ var CompositionForwardCommandSchema = object({
22738
22754
  source: CompositionSourceRefSchema,
22739
22755
  cap: string().min(1),
22740
22756
  method: string().min(1),
22741
- args: record(string().min(1), CompositionForwardArgSchema).optional()
22757
+ args: record$1(string().min(1), CompositionForwardArgSchema).optional()
22742
22758
  });
22743
22759
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [
22744
22760
  CompositionForwardCommandSchema,
@@ -22757,7 +22773,7 @@ var COMPOSITION_ITEM_KEY_RE = /^[a-z0-9][a-z0-9-]{0,47}$/;
22757
22773
  */
22758
22774
  var CompositionItemEntrySchema = object({
22759
22775
  label: string().min(1).max(80),
22760
- fields: record(string().min(1), CompositionFieldSourceSchema),
22776
+ fields: record$1(string().min(1), CompositionFieldSourceSchema),
22761
22777
  /**
22762
22778
  * What the cap's `reset` does for THIS item (consumables). Present = the item
22763
22779
  * is resettable and a `reset` call naming its key forwards here. The item key
@@ -22769,14 +22785,14 @@ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
22769
22785
  kind: literal("fields"),
22770
22786
  cap: string().min(1),
22771
22787
  enabled: boolean().optional(),
22772
- fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
22788
+ fields: record$1(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
22773
22789
  /**
22774
22790
  * Items of the cap's item array, keyed by item key (D663). Naming `items`
22775
22791
  * owns the WHOLE array field: the composed value holds exactly these items.
22776
22792
  */
22777
- items: record(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
22793
+ items: record$1(string().regex(COMPOSITION_ITEM_KEY_RE), CompositionItemEntrySchema).refine((items) => Object.keys(items).length <= 16, { message: `at most 16 items` }).optional(),
22778
22794
  /** Method name → what serves it. Only a BUILT capability takes commands (D967). */
22779
- commands: record(string().min(1), CompositionCommandTargetSchema).optional()
22795
+ commands: record$1(string().min(1), CompositionCommandTargetSchema).optional()
22780
22796
  }), object({
22781
22797
  kind: literal("passthrough"),
22782
22798
  cap: string().min(1),
@@ -23339,7 +23355,7 @@ object({
23339
23355
  /** The oldest `@camstack/server` this package runs on. */
23340
23356
  server: MinVersionSchema.optional(),
23341
23357
  /** The oldest installed version of each named addon package. */
23342
- addons: record(string(), MinVersionSchema).optional(),
23358
+ addons: record$1(string(), MinVersionSchema).optional(),
23343
23359
  /** The oldest shell around the server, per shell kind. */
23344
23360
  wrapper: object({
23345
23361
  desktop: MinVersionSchema.optional(),
@@ -23582,13 +23598,13 @@ var NotificationSchema = object({
23582
23598
  tag: string().optional(),
23583
23599
  deviceId: number$1().optional(),
23584
23600
  eventId: string().optional(),
23585
- metadata: record(string(), unknown()).optional(),
23601
+ metadata: record$1(string(), unknown()).optional(),
23586
23602
  /**
23587
23603
  * Values for the parameters the target's kind DECLARES in
23588
23604
  * {@link TargetKindSchema} `deliveryParams`. Already validated against the
23589
23605
  * declaration by the sender; a notifier reads only the keys it declared.
23590
23606
  */
23591
- delivery: record(string(), DeliveryParamValueSchema).optional()
23607
+ delivery: record$1(string(), DeliveryParamValueSchema).optional()
23592
23608
  });
23593
23609
  /** One declared native severity/priority level for a kind. */
23594
23610
  var TargetKindLevelSchema = object({
@@ -23739,13 +23755,13 @@ var TargetSchema = object({
23739
23755
  kind: string(),
23740
23756
  addonId: string(),
23741
23757
  enabled: boolean(),
23742
- config: record(string(), unknown())
23758
+ config: record$1(string(), unknown())
23743
23759
  });
23744
23760
  /** A discovery-surfaced candidate (config is partial + non-secret). */
23745
23761
  var DiscoveredTargetSchema = object({
23746
23762
  kind: string(),
23747
23763
  suggestedName: string(),
23748
- config: record(string(), unknown())
23764
+ config: record$1(string(), unknown())
23749
23765
  });
23750
23766
  /** The degrade engine's report — what was resolved / dropped / degraded. */
23751
23767
  var RenderedAsSchema = object({
@@ -23776,7 +23792,7 @@ var ProbeTargetConfigResultSchema = object({
23776
23792
  });
23777
23793
  method(object({}), array(TargetKindSchema)), method(object({
23778
23794
  kind: string(),
23779
- config: record(string(), unknown()).optional(),
23795
+ config: record$1(string(), unknown()).optional(),
23780
23796
  /**
23781
23797
  * When editing / duplicating, the blank password field never round-trips
23782
23798
  * the stored token. Pass the source target id so the provider can restore
@@ -23785,7 +23801,7 @@ method(object({}), array(TargetKindSchema)), method(object({
23785
23801
  targetId: string().optional()
23786
23802
  }), array(DiscoveredTargetSchema), { auth: "admin" }), method(object({
23787
23803
  kind: string(),
23788
- config: record(string(), unknown()),
23804
+ config: record$1(string(), unknown()),
23789
23805
  /** See `discoverTargets.targetId` — restore stored secrets for a blank password. */
23790
23806
  targetId: string().optional()
23791
23807
  }), ProbeTargetConfigResultSchema, {
@@ -24268,14 +24284,14 @@ var CameraSwitchGroupSchema = object({
24268
24284
  * Query filter for settings-store collections.
24269
24285
  */
24270
24286
  var QueryFilterSchema = object({
24271
- where: record(string(), unknown()).optional(),
24272
- whereIn: record(string(), array(unknown())).optional(),
24273
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
24287
+ where: record$1(string(), unknown()).optional(),
24288
+ whereIn: record$1(string(), array(unknown())).optional(),
24289
+ whereBetween: record$1(string(), tuple([unknown(), unknown()])).optional(),
24274
24290
  /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
24275
- whereNot: record(string(), unknown()).optional(),
24291
+ whereNot: record$1(string(), unknown()).optional(),
24276
24292
  /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
24277
24293
  * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
24278
- whereNotIn: record(string(), array(unknown())).optional(),
24294
+ whereNotIn: record$1(string(), array(unknown())).optional(),
24279
24295
  orderBy: object({
24280
24296
  field: string(),
24281
24297
  direction: _enum(["asc", "desc"])
@@ -24293,11 +24309,11 @@ var QueryFilterSchema = object({
24293
24309
  * that compiles to no predicate, because that is the whole collection.
24294
24310
  */
24295
24311
  var MutationFilterSchema = object({
24296
- where: record(string(), unknown()).optional(),
24297
- whereIn: record(string(), array(unknown())).optional(),
24298
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
24299
- whereNot: record(string(), unknown()).optional(),
24300
- whereNotIn: record(string(), array(unknown())).optional()
24312
+ where: record$1(string(), unknown()).optional(),
24313
+ whereIn: record$1(string(), array(unknown())).optional(),
24314
+ whereBetween: record$1(string(), tuple([unknown(), unknown()])).optional(),
24315
+ whereNot: record$1(string(), unknown()).optional(),
24316
+ whereNotIn: record$1(string(), array(unknown())).optional()
24301
24317
  });
24302
24318
  /**
24303
24319
  * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
@@ -24326,12 +24342,12 @@ var AggregateFieldSchema = object({
24326
24342
  */
24327
24343
  var AggregateResultSchema = object({
24328
24344
  count: number$1().int(),
24329
- values: record(string(), number$1().nullable())
24345
+ values: record$1(string(), number$1().nullable())
24330
24346
  });
24331
24347
  /** A single stored record: `{ id, data }`. */
24332
24348
  var SettingsRecordSchema = object({
24333
24349
  id: string(),
24334
- data: record(string(), unknown())
24350
+ data: record$1(string(), unknown())
24335
24351
  });
24336
24352
  /**
24337
24353
  * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
@@ -24344,7 +24360,7 @@ var SettingsRecordSchema = object({
24344
24360
  */
24345
24361
  var BulkRecordSchema = object({
24346
24362
  id: string().optional(),
24347
- data: record(string(), unknown())
24363
+ data: record$1(string(), unknown())
24348
24364
  });
24349
24365
  /**
24350
24366
  * The database FILES one `sqlite-settings` engine process owns (D851).
@@ -24379,7 +24395,7 @@ var TransactOpSchema = discriminatedUnion("op", [
24379
24395
  op: literal("update"),
24380
24396
  collection: string(),
24381
24397
  id: string(),
24382
- data: record(string(), unknown())
24398
+ data: record$1(string(), unknown())
24383
24399
  }),
24384
24400
  object({
24385
24401
  op: literal("upsertMany"),
@@ -24503,7 +24519,7 @@ id: union([string(), number$1()]) }), {
24503
24519
  collection: string(),
24504
24520
  record: object({
24505
24521
  id: string().optional(),
24506
- data: record(string(), unknown())
24522
+ data: record$1(string(), unknown())
24507
24523
  })
24508
24524
  }), object({
24509
24525
  /**
@@ -24535,7 +24551,7 @@ id: union([string(), number$1()]) }), {
24535
24551
  namespace: string().optional(),
24536
24552
  collection: string(),
24537
24553
  id: string(),
24538
- data: record(string(), unknown())
24554
+ data: record$1(string(), unknown())
24539
24555
  }), _void(), {
24540
24556
  kind: "mutation",
24541
24557
  auth: "admin"
@@ -24557,7 +24573,7 @@ id: union([string(), number$1()]) }), {
24557
24573
  namespace: string().optional(),
24558
24574
  collection: string(),
24559
24575
  filter: MutationFilterSchema,
24560
- data: record(string(), unknown())
24576
+ data: record$1(string(), unknown())
24561
24577
  }), object({ updated: number$1().int() }), {
24562
24578
  kind: "mutation",
24563
24579
  auth: "admin"
@@ -24748,7 +24764,7 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
24748
24764
  object({
24749
24765
  op: literal("setKeys"),
24750
24766
  scope: string().min(1),
24751
- values: record(string(), unknown()),
24767
+ values: record$1(string(), unknown()),
24752
24768
  precondition: PreconditionSchema
24753
24769
  }),
24754
24770
  object({
@@ -24760,14 +24776,14 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
24760
24776
  object({
24761
24777
  op: literal("putRow"),
24762
24778
  table: string().min(1),
24763
- key: record(string(), unknown()),
24764
- row: record(string(), unknown()),
24779
+ key: record$1(string(), unknown()),
24780
+ row: record$1(string(), unknown()),
24765
24781
  precondition: PreconditionSchema
24766
24782
  }),
24767
24783
  object({
24768
24784
  op: literal("deleteRow"),
24769
24785
  table: string().min(1),
24770
- key: record(string(), unknown()),
24786
+ key: record$1(string(), unknown()),
24771
24787
  precondition: PreconditionSchema
24772
24788
  }),
24773
24789
  object({
@@ -24791,7 +24807,7 @@ var MigrationPlanSchema = object({ edits: array(discriminatedUnion("op", [
24791
24807
  */
24792
24808
  var MigrationProcedureResultSchema = object({
24793
24809
  outcome: _enum(["done", "already-done"]),
24794
- summary: record(string(), unknown())
24810
+ summary: record$1(string(), unknown())
24795
24811
  });
24796
24812
  /** What an owner hands the engine when one of its migrations ran. */
24797
24813
  var MigrationOwnerResultSchema = discriminatedUnion("kind", [
@@ -24832,8 +24848,8 @@ var MigrationLedgerEntrySchema = object({
24832
24848
  appliedAt: number$1().nullable(),
24833
24849
  codeVersion: string().nullable(),
24834
24850
  /** What the apply changed: rows per table, as the engine counted them. */
24835
- planSummary: record(string(), unknown()).nullable(),
24836
- progress: record(string(), unknown()).nullable(),
24851
+ planSummary: record$1(string(), unknown()).nullable(),
24852
+ progress: record$1(string(), unknown()).nullable(),
24837
24853
  error: string().nullable(),
24838
24854
  /** Why it is `blocked` or `held` (`dependency-failed`, `snapshot-refused`, …). */
24839
24855
  reason: string().nullable(),
@@ -25060,7 +25076,7 @@ var TrainingExportSchema = _enum([
25060
25076
  "openvino-int8",
25061
25077
  "coreml-fp16"
25062
25078
  ]);
25063
- var FloorsSchema = record(string(), number$1().min(0).max(1));
25079
+ var FloorsSchema = record$1(string(), number$1().min(0).max(1));
25064
25080
  object({
25065
25081
  schema: literal(TRAINING_JOB_SCHEMA),
25066
25082
  jobKey: string().uuid(),
@@ -25169,15 +25185,15 @@ var TrainingEvalClassSchema = object({
25169
25185
  precision: number$1().nullable(),
25170
25186
  recall: number$1().nullable(),
25171
25187
  ap50: number$1().nullable(),
25172
- recallByCamera: record(string(), number$1().nullable()).optional(),
25173
- recallByLight: record(string(), number$1().nullable()).optional(),
25174
- fpByCamera: record(string(), number$1()).optional(),
25188
+ recallByCamera: record$1(string(), number$1().nullable()).optional(),
25189
+ recallByLight: record$1(string(), number$1().nullable()).optional(),
25190
+ fpByCamera: record$1(string(), number$1()).optional(),
25175
25191
  smallFound: number$1().int().optional(),
25176
25192
  smallTotal: number$1().int().optional()
25177
25193
  }).passthrough();
25178
25194
  var TrainingEvalReportSchema = object({
25179
25195
  frames: number$1().int(),
25180
- classes: record(string(), TrainingEvalClassSchema)
25196
+ classes: record$1(string(), TrainingEvalClassSchema)
25181
25197
  }).passthrough();
25182
25198
  /**
25183
25199
  * A succeeded result carries every block; a failed one carries the error and
@@ -25197,7 +25213,7 @@ var TrainingResultSchema = object({
25197
25213
  version: string(),
25198
25214
  revision: string()
25199
25215
  }),
25200
- toolchain: record(string(), string().nullable()),
25216
+ toolchain: record$1(string(), string().nullable()),
25201
25217
  dataset: object({
25202
25218
  versionId: string(),
25203
25219
  annotationHash: string(),
@@ -25222,8 +25238,8 @@ var TrainingResultSchema = object({
25222
25238
  baseline: TrainingEvalReportSchema.nullable(),
25223
25239
  candidate: TrainingEvalReportSchema.nullable(),
25224
25240
  candidateInt8: TrainingEvalReportSchema.nullable(),
25225
- recallDeltaByCamera: record(string(), record(string(), number$1())).nullable(),
25226
- map50: record(string(), number$1().nullable())
25241
+ recallDeltaByCamera: record$1(string(), record$1(string(), number$1())).nullable(),
25242
+ map50: record$1(string(), number$1().nullable())
25227
25243
  }).optional(),
25228
25244
  floors: object({
25229
25245
  baseline: FloorsSchema,
@@ -25719,7 +25735,7 @@ var FIRST_LEVEL_MACRO_CLASSES = [
25719
25735
  * detection macro" test in `model-catalog-schema.test.ts`).
25720
25736
  */
25721
25737
  var DetectionCatalogClassMapSchema = object({
25722
- mapping: record(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
25738
+ mapping: record$1(string(), _enum(CLASS_MAP_MACRO_TARGETS)),
25723
25739
  preserveOriginal: boolean()
25724
25740
  });
25725
25741
  /**
@@ -26632,7 +26648,7 @@ var StorageLocationSchema = object({
26632
26648
  type: string(),
26633
26649
  displayName: string().min(1),
26634
26650
  providerId: string().min(1),
26635
- config: record(string(), unknown()),
26651
+ config: record$1(string(), unknown()),
26636
26652
  /**
26637
26653
  * Cluster node this location physically lives on. REQUIRED for node-local
26638
26654
  * providers (filesystem — the path exists on one node's disk), null/absent
@@ -27193,7 +27209,7 @@ var RootStepSupplySchema = discriminatedUnion("kind", [
27193
27209
  object({
27194
27210
  kind: literal("label"),
27195
27211
  stepId: _enum(LABEL_SUPPLY_STEP_IDS),
27196
- labelToEffect: record(string(), string()),
27212
+ labelToEffect: record$1(string(), string()),
27197
27213
  uncovered: array(string()).readonly()
27198
27214
  }),
27199
27215
  object({
@@ -27287,7 +27303,7 @@ var ModelCatalogEntrySchema = object({
27287
27303
  * model it was made for and does not survive a model change (D738). A custom
27288
27304
  * / imported model may declare it; without it, the global defaults apply.
27289
27305
  */
27290
- defaultClassFloors: record(string(), number$1().min(0).max(1)).optional(),
27306
+ defaultClassFloors: record$1(string(), number$1().min(0).max(1)).optional(),
27291
27307
  /**
27292
27308
  * The inference precision this model's OpenVINO IR needs on an Intel GPU.
27293
27309
  * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
@@ -27306,7 +27322,7 @@ var ModelCatalogEntrySchema = object({
27306
27322
  * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
27307
27323
  * `minConfidence` slider, bound to the ROOT model, overrides it.
27308
27324
  */
27309
- suppliedLabelFloors: record(string(), number$1().min(0).max(1)).optional(),
27325
+ suppliedLabelFloors: record$1(string(), number$1().min(0).max(1)).optional(),
27310
27326
  /**
27311
27327
  * When true, the executor produces a landmark-aligned crop (similarity warp
27312
27328
  * onto the canonical template) before this step runs, instead of a plain
@@ -27338,7 +27354,7 @@ var ModelCatalogEntrySchema = object({
27338
27354
  */
27339
27355
  metrics: object({
27340
27356
  map50: number$1().optional(),
27341
- p95LatencyMs: record(string(), number$1()).optional()
27357
+ p95LatencyMs: record$1(string(), number$1()).optional()
27342
27358
  }).optional(),
27343
27359
  /**
27344
27360
  * The model's licence record — see {@link ModelLicenseSchema}. Optional in
@@ -27499,7 +27515,7 @@ var MethodAccessSchema = _enum([
27499
27515
  * "give me everything" escape; there is no wildcard scope.
27500
27516
  */
27501
27517
  var AllowedProviderSchema = union([literal("*"), array(string())]);
27502
- var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
27518
+ var AllowedDevicesSchema = record$1(string(), union([literal("*"), array(string())]));
27503
27519
  var CapScopeSchema = _enum(["device", "system"]);
27504
27520
  /**
27505
27521
  * DeviceSelector (scope model v3 — 2026-08-12).
@@ -27691,7 +27707,7 @@ object({
27691
27707
  });
27692
27708
  var PreferenceNamespaceSchema = string().regex(/^[a-z][a-z0-9.-]{0,63}$/);
27693
27709
  /** A namespace's value: a JSON object, opaque to the hub. */
27694
- var PreferenceValueSchema = record(string(), unknown());
27710
+ var PreferenceValueSchema = record$1(string(), unknown());
27695
27711
  var PreferenceDeviceIdSchema = string().min(1).max(64);
27696
27712
  /** A stored row, as the owner reads it. */
27697
27713
  var PreferenceRowSchema = object({
@@ -27731,7 +27747,7 @@ object({
27731
27747
  deleted: boolean() });
27732
27748
  object({
27733
27749
  /** The revision the client holds per namespace; a namespace it does not list is new to it. */
27734
- revisionByNamespace: record(PreferenceNamespaceSchema, number$1().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
27750
+ revisionByNamespace: record$1(PreferenceNamespaceSchema, number$1().int().nonnegative()).refine((map) => Object.keys(map).length <= 32, { message: `at most 32 namespaces` }) });
27735
27751
  object({
27736
27752
  /** Every row whose revision differs from the client's, and every row it did not list. */
27737
27753
  rows: array(PreferenceRowSchema),
@@ -47941,7 +47957,7 @@ var TemplateEventValueSchema = object({
47941
47957
  /** An `action` input's value: a vocabulary action and its open args. */
47942
47958
  var TemplateActionValueSchema = object({
47943
47959
  actionId: string().min(1),
47944
- args: record(string(), unknown()).optional()
47960
+ args: record$1(string(), unknown()).optional()
47945
47961
  });
47946
47962
  /** The value of one non-group input. Which member is right is the input kind's to judge. */
47947
47963
  var TemplateScalarValueSchema = union([
@@ -47952,9 +47968,9 @@ var TemplateScalarValueSchema = union([
47952
47968
  TemplateEventValueSchema,
47953
47969
  TemplateActionValueSchema
47954
47970
  ]);
47955
- var TemplateInputValueSchema = union([TemplateScalarValueSchema, array(record(string(), TemplateScalarValueSchema))]);
47971
+ var TemplateInputValueSchema = union([TemplateScalarValueSchema, array(record$1(string(), TemplateScalarValueSchema))]);
47956
47972
  /** Input key → value. */
47957
- var TemplateInputValuesSchema = record(string(), TemplateInputValueSchema);
47973
+ var TemplateInputValuesSchema = record$1(string(), TemplateInputValueSchema);
47958
47974
  var TemplateInstanceProblemSchema = object({
47959
47975
  code: _enum([
47960
47976
  "missing-input",
@@ -48008,7 +48024,7 @@ var ExpressionBindingSourceSchema = union([
48008
48024
  ]);
48009
48025
  object({
48010
48026
  expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
48011
- bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema)
48027
+ bindings: record$1(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema)
48012
48028
  }).superRefine((src, ctx) => {
48013
48029
  const err = validateExpressionSource(src);
48014
48030
  if (err !== null) ctx.addIssue({
@@ -48065,7 +48081,7 @@ var SourceInfoSchema = object({
48065
48081
  /** Provider-specific extras that don't fit the structured slots.
48066
48082
  * Whitelist what goes here per provider — do NOT dump entire HA
48067
48083
  * attribute blobs (would explode the meta JSON column). */
48068
- raw: record(string(), unknown()).optional()
48084
+ raw: record$1(string(), unknown()).optional()
48069
48085
  });
48070
48086
  /**
48071
48087
  * Build the synthetic SourceInfo every existing provider falls back to
@@ -48753,7 +48769,7 @@ var TriggeredByLeafSchema = object({
48753
48769
  var ExpressionLeafSchema = object({
48754
48770
  kind: literal("expression"),
48755
48771
  expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
48756
- bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema),
48772
+ bindings: record$1(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema),
48757
48773
  /** The expression must stay true this long. An expression has no single value, so only `held`. */
48758
48774
  for: HoldSpecSchema.optional()
48759
48775
  }).superRefine((src, ctx) => {
@@ -49024,7 +49040,7 @@ var LegacyStationaryPresentSchema = object({
49024
49040
  var LegacyExpressionSchema = object({
49025
49041
  kind: literal("expression"),
49026
49042
  expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
49027
- bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema)
49043
+ bindings: record$1(string().regex(EXPRESSION_IDENTIFIER_RE), ExpressionBindingSourceSchema)
49028
49044
  }).superRefine((src, ctx) => {
49029
49045
  const err = validateExpressionSource(src);
49030
49046
  if (err !== null) ctx.addIssue({
@@ -49171,13 +49187,13 @@ var AutomationCommandStepBaseSchema = object({
49171
49187
  * may carry `{{vars.x}}` slots, or be exactly `{ $var: 'name' }`, which
49172
49188
  * SUBSTITUTE and do not evaluate (§3.2.3).
49173
49189
  */
49174
- args: record(string(), unknown()).optional(),
49190
+ args: record$1(string(), unknown()).optional(),
49175
49191
  /**
49176
49192
  * The unit the person picked per arg (display only). `args` always hold the
49177
49193
  * value in the unit the method's input DECLARES (`paramMeta`); on a write an
49178
49194
  * arg may be a {@link QuantityValue}, which the save boundary converts.
49179
49195
  */
49180
- argUnits: record(string(), string().min(1)).optional()
49196
+ argUnits: record$1(string(), string().min(1)).optional()
49181
49197
  });
49182
49198
  /** The vocabulary check every command step passes: the action exists. */
49183
49199
  function refineKnownAction(step, ctx) {
@@ -49255,7 +49271,7 @@ var RESERVED_RUN_VARS = [
49255
49271
  */
49256
49272
  var AutomationSetStepSchema = object({
49257
49273
  kind: literal("set"),
49258
- vars: record(string(), union([
49274
+ vars: record$1(string(), union([
49259
49275
  string().max(500),
49260
49276
  number$1(),
49261
49277
  boolean()
@@ -49268,7 +49284,7 @@ var AutomationRunActionStepSchema = object({
49268
49284
  /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
49269
49285
  actionId: string().min(1),
49270
49286
  /** Values for the action's declared variables; the others take their default. */
49271
- variables: record(string(), union([
49287
+ variables: record$1(string(), union([
49272
49288
  string(),
49273
49289
  number$1(),
49274
49290
  boolean()
@@ -49719,7 +49735,7 @@ var AutomationTriggerTraceSchema = object({
49719
49735
  /** Why an event was rejected ("class person not in [dog]") or what fired. */
49720
49736
  reason: string(),
49721
49737
  /** deviceId, className, trackId, score … — only what the trigger exposes. */
49722
- vars: record(string(), TraceValueSchema),
49738
+ vars: record$1(string(), TraceValueSchema),
49723
49739
  /** A hold (`for`) this occurrence went through: pending, cancelled, fired or re-seeded. */
49724
49740
  hold: HoldTraceSchema.optional()
49725
49741
  });
@@ -49791,7 +49807,7 @@ var StepTraceBaseSchema = object({
49791
49807
  * device was actually asked. Bounded like trigger `vars`; a secret parameter
49792
49808
  * is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
49793
49809
  */
49794
- args: record(string(), TraceValueSchema).optional(),
49810
+ args: record$1(string(), TraceValueSchema).optional(),
49795
49811
  /**
49796
49812
  * The device values a templated arg printed as `—`, one `ref: reason` each
49797
49813
  * (D1021): why a sentence says "—" where a number was expected. Bounded.
@@ -49942,7 +49958,7 @@ var EventFireSchema = object({
49942
49958
  deviceId: number$1(),
49943
49959
  eventType: string(),
49944
49960
  sourceId: string().optional(),
49945
- data: record(string(), unknown()).nullable(),
49961
+ data: record$1(string(), unknown()).nullable(),
49946
49962
  timestamp: number$1().meta(readingMeta("none")),
49947
49963
  seq: number$1().meta(readingMeta("count"))
49948
49964
  });
@@ -50343,7 +50359,7 @@ method(InstancePinSchema, DeviceExportStatusSchema), method(_void(), array(Expor
50343
50359
  kind: "mutation",
50344
50360
  auth: "admin"
50345
50361
  });
50346
- record(string(), string());
50362
+ record$1(string(), string());
50347
50363
  _enum([
50348
50364
  "automation",
50349
50365
  "action",
@@ -50403,7 +50419,7 @@ DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Sensor, Devic
50403
50419
  });
50404
50420
  method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
50405
50421
  actionId: string().min(1),
50406
- variables: record(string(), ActionVariableValueSchema).optional()
50422
+ variables: record$1(string(), ActionVariableValueSchema).optional()
50407
50423
  }), _void(), {
50408
50424
  kind: "mutation",
50409
50425
  auth: "admin"
@@ -50455,7 +50471,7 @@ method(object({}), array(ActionEntrySchema), { auth: "admin" }), method(object({
50455
50471
  caller: "required"
50456
50472
  }), method(object({
50457
50473
  actionId: string().min(1),
50458
- variables: record(string(), ActionVariableValueSchema).optional(),
50474
+ variables: record$1(string(), ActionVariableValueSchema).optional(),
50459
50475
  wait: boolean().optional(),
50460
50476
  origin: ActionRunOriginSchema.optional(),
50461
50477
  deviceId: number$1().int().nonnegative().optional()
@@ -50557,10 +50573,10 @@ var AddonHttpRouteSchema = object({
50557
50573
  var InvokeRequestSchema = object({
50558
50574
  method: string(),
50559
50575
  path: string(),
50560
- params: record(string(), string()),
50561
- query: record(string(), string()),
50576
+ params: record$1(string(), string()),
50577
+ query: record$1(string(), string()),
50562
50578
  body: unknown(),
50563
- headers: record(string(), string()),
50579
+ headers: record$1(string(), string()),
50564
50580
  /** The instance the hub resolved for a `perInstance` route. */
50565
50581
  instanceId: string().optional(),
50566
50582
  user: object({
@@ -50572,7 +50588,7 @@ var InvokeRequestSchema = object({
50572
50588
  });
50573
50589
  var InvokeReplyEnvelopeSchema = object({
50574
50590
  status: number$1().int(),
50575
- headers: record(string(), string()),
50591
+ headers: record$1(string(), string()),
50576
50592
  /** When set, the hub MUST `reply.redirect(redirectUrl)` instead of
50577
50593
  * sending `body`. Status defaults to 302 when this is set unless
50578
50594
  * the handler called `reply.code(...)` explicitly. */
@@ -50617,7 +50633,7 @@ var SettingsSchemaWithValuesSchema = object({
50617
50633
  sections: array(ConfigSectionWithValuesSchema)
50618
50634
  });
50619
50635
  /** Patch object — keys are field names, values are the new field values. */
50620
- var SettingsPatchSchema = record(string(), unknown());
50636
+ var SettingsPatchSchema = record$1(string(), unknown());
50621
50637
  /** The scope of a scoped-settings call (D986): where the capability declared the values. */
50622
50638
  var ScopedSettingsScopeSchema = _enum(SCOPED_SETTINGS_SCOPES);
50623
50639
  /** One scoped schema an addon serves: its capability, scope and section ids. */
@@ -50650,7 +50666,7 @@ method(object({
50650
50666
  cap: string(),
50651
50667
  scope: ScopedSettingsScopeSchema,
50652
50668
  nodeId: string().optional()
50653
- }), record(string(), unknown()).nullable()), method(object({
50669
+ }), record$1(string(), unknown()).nullable()), method(object({
50654
50670
  addonId: string(),
50655
50671
  nodeId: string().optional()
50656
50672
  }), object({ keys: array(string()) }).nullable(), { auth: "admin" }), method(object({
@@ -51777,7 +51793,7 @@ var AlertSeveritySchema = _enum([
51777
51793
  var AlertActionInvokeSchema = object({
51778
51794
  addonId: string().min(1),
51779
51795
  action: string().min(1),
51780
- input: record(string(), unknown()).optional()
51796
+ input: record$1(string(), unknown()).optional()
51781
51797
  });
51782
51798
  /** An action has `href` (a link) OR `invoke` (a button that runs a custom action). */
51783
51799
  var AlertActionSchema = object({
@@ -51816,7 +51832,7 @@ var AlertSchema = object({
51816
51832
  createdAt: number$1(),
51817
51833
  updatedAt: number$1(),
51818
51834
  source: AlertSourceSchema.optional(),
51819
- metadata: record(string(), unknown()).optional()
51835
+ metadata: record$1(string(), unknown()).optional()
51820
51836
  });
51821
51837
  method(AlertSchema, _void(), { kind: "mutation" }), method(object({
51822
51838
  alertId: string(),
@@ -52295,7 +52311,7 @@ var AuthResultSchema = object({
52295
52311
  method(object({
52296
52312
  username: string(),
52297
52313
  password: string()
52298
- }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable()), NOT_A_DEVICE.IDENTITY;
52314
+ }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record$1(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable()), NOT_A_DEVICE.IDENTITY;
52299
52315
  /**
52300
52316
  * Automation-control cap. Models HA `automation.*` entities on
52301
52317
  * `DeviceType.Automation`. An automation is a trigger+condition+
@@ -53529,13 +53545,13 @@ var RegistryStatusSchema = object({
53529
53545
  connectedCount: number$1().int().nonnegative()
53530
53546
  });
53531
53547
  var GetInputSchema = object({ id: string() });
53532
- var SettingsRecordSchema$1 = record(string(), unknown());
53548
+ var SettingsRecordSchema$1 = record$1(string(), unknown());
53533
53549
  var PublishInputSchema = object({
53534
53550
  brokerId: string(),
53535
53551
  /** Kind-specific routing target.
53536
53552
  * MQTT: `{ topic: string, qos?: 0|1|2, retain?: boolean }`.
53537
53553
  * HA: `{ domain: string, service: string, entityId?: string, area?: string }`. */
53538
- target: record(string(), unknown()),
53554
+ target: record$1(string(), unknown()),
53539
53555
  /** Kind-specific payload.
53540
53556
  * MQTT: raw string / number / object (provider serialises).
53541
53557
  * HA: service-call `data` object (transition, brightness, …). */
@@ -53546,7 +53562,7 @@ var SubscribeInputSchema = object({
53546
53562
  /** Kind-specific filter.
53547
53563
  * MQTT: `{ topic: string, qos?: 0|1|2 }` — topic can include wildcards.
53548
53564
  * HA: `{ entityIds: string[] }` or `{ domain: string }`. */
53549
- filter: record(string(), unknown())
53565
+ filter: record$1(string(), unknown())
53550
53566
  });
53551
53567
  var SubscribeResultSchema = object({
53552
53568
  /** Stable subscription id. Used to unsubscribe and to filter the
@@ -53673,7 +53689,7 @@ var CalendarPreferenceEntrySchema = object({
53673
53689
  /** Absent or cleared → fall back to the system {@link CalendarEntry.defaultColor}. */
53674
53690
  color: CalendarColorSchema.optional()
53675
53691
  });
53676
- var CalendarPreferencesSchema = object({ calendars: record(string(), CalendarPreferenceEntrySchema) });
53692
+ var CalendarPreferencesSchema = object({ calendars: record$1(string(), CalendarPreferenceEntrySchema) });
53677
53693
  var CalendarSetPreferenceInputSchema = object({
53678
53694
  calendarId: string().min(1),
53679
53695
  visible: boolean().optional(),
@@ -54072,7 +54088,7 @@ var BrokerConsumerAttributionSchema = object({
54072
54088
  /** Higher-level session identifier (Alexa Echo sessionId, HAP session, …). */
54073
54089
  sessionId: string().optional(),
54074
54090
  /** Free-form key/value extras (e.g. clientHints from a WebRTC offer). */
54075
- extra: record(string(), string()).optional()
54091
+ extra: record$1(string(), string()).optional()
54076
54092
  }).readonly();
54077
54093
  var BrokerEncodedClientSchema = object({
54078
54094
  /** Stable id assigned on attach; used by `killClient`. */
@@ -54335,7 +54351,7 @@ method(object({
54335
54351
  autoEligible: boolean().optional(),
54336
54352
  /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
54337
54353
  profileHint: CamProfileSchema.optional(),
54338
- metadata: record(string(), unknown()).optional(),
54354
+ metadata: record$1(string(), unknown()).optional(),
54339
54355
  /** Required when kind === 'derived' — the source camStreamId the
54340
54356
  * derived broker reads its encoded plane from.
54341
54357
  * The runtime guard (broker manager, Task 10) enforces presence for
@@ -55464,7 +55480,9 @@ var ClusterUpdateFailureReasonSchema = _enum([
55464
55480
  "status-unreadable",
55465
55481
  "addon-update-failed",
55466
55482
  "addons-not-converged",
55467
- "interrupted"
55483
+ "interrupted",
55484
+ "timeout-stall",
55485
+ "timeout-ceiling"
55468
55486
  ]);
55469
55487
  var ClusterUpdateStepSchema = object({
55470
55488
  kind: ClusterUpdateStepKindSchema,
@@ -58121,7 +58139,7 @@ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
58121
58139
  }),
58122
58140
  object({
58123
58141
  kind: literal("enum-map"),
58124
- mapping: record(string(), string().nullable())
58142
+ mapping: record$1(string(), string().nullable())
58125
58143
  }),
58126
58144
  object({ kind: literal("number") })
58127
58145
  ]);
@@ -58302,7 +58320,7 @@ var CoreBlockStatusSchema = _enum([
58302
58320
  "failed"
58303
58321
  ]);
58304
58322
  /** path → TypeScript source for a multi-file block. */
58305
- var CoreBlockFilesSchema = record(string().min(1).max(260), string().max(2e5));
58323
+ var CoreBlockFilesSchema = record$1(string().min(1).max(260), string().max(2e5));
58306
58324
  /**
58307
58325
  * A block's settings form — the same ConfigUISchema addons declare.
58308
58326
  * Loose on the wire (field variants are polymorphic); typed for callers.
@@ -58938,7 +58956,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
58938
58956
  collection: string(),
58939
58957
  record: object({
58940
58958
  id: string().optional(),
58941
- data: record(string(), unknown())
58959
+ data: record$1(string(), unknown())
58942
58960
  })
58943
58961
  }), object({
58944
58962
  /**
@@ -58986,7 +59004,7 @@ id: union([string(), number$1()]) }), {
58986
59004
  namespace: string().optional(),
58987
59005
  collection: string(),
58988
59006
  id: string(),
58989
- data: record(string(), unknown())
59007
+ data: record$1(string(), unknown())
58990
59008
  }), _void(), {
58991
59009
  kind: "mutation",
58992
59010
  auth: "admin"
@@ -59008,7 +59026,7 @@ id: union([string(), number$1()]) }), {
59008
59026
  namespace: string().optional(),
59009
59027
  collection: string(),
59010
59028
  filter: MutationFilterSchema,
59011
- data: record(string(), unknown())
59029
+ data: record$1(string(), unknown())
59012
59030
  }), object({ updated: number$1().int() }), {
59013
59031
  kind: "mutation",
59014
59032
  auth: "admin"
@@ -59509,7 +59527,7 @@ var AdoptInputSchema = object({
59509
59527
  * area) into CamStack — fuzzy-match an existing location or create it, then
59510
59528
  * assign. Omitted/false = no location work (back-compat). */
59511
59529
  importLocations: boolean().optional(),
59512
- perCandidate: record(string(), PerCandidateSchema).optional()
59530
+ perCandidate: record$1(string(), PerCandidateSchema).optional()
59513
59531
  });
59514
59532
  var AdoptResultSchema = object({ adopted: array(object({
59515
59533
  childNativeId: string(),
@@ -59646,7 +59664,7 @@ var DeviceTemplateValueSchema = union([
59646
59664
  */
59647
59665
  var DeviceTemplateThisDeviceSchema = object({
59648
59666
  deviceId: number$1().int(),
59649
- values: record(string().min(1).max(64), DeviceTemplateValueSchema).optional()
59667
+ values: record$1(string().min(1).max(64), DeviceTemplateValueSchema).optional()
59650
59668
  });
59651
59669
  var DeviceTemplateRefusalSchema = object({
59652
59670
  reason: _enum([
@@ -59734,9 +59752,15 @@ var SiteZoneSchema = object({
59734
59752
  locationKeys: array(string())
59735
59753
  });
59736
59754
  var DeviceSearchRequiresSchema = object({
59737
- /** Capability names the field wants a value of. */
59738
- caps: array(string()).readonly(),
59739
- /** `any` (default): a device with one of them is compatible. `all`: it must hold every one. */
59755
+ /** Capability names the field wants a value of. Absent when the field wants actions only. */
59756
+ caps: array(string()).readonly().optional(),
59757
+ /**
59758
+ * Vocabulary action ids (`cover.open`) the device must offer. Compatible means
59759
+ * the device's bindings resolve those actions; `values` stays empty when no
59760
+ * cap was required. `mode` applies the same way as for `caps`.
59761
+ */
59762
+ actions: array(string()).readonly().optional(),
59763
+ /** `any` (default): one of the named caps, and one of the named actions, is enough. `all`: every one. */
59740
59764
  mode: _enum(["any", "all"]).optional()
59741
59765
  });
59742
59766
  var DeviceSearchFiltersSchema = object({
@@ -59836,7 +59860,7 @@ object({
59836
59860
  externalId: string(),
59837
59861
  name: string(),
59838
59862
  type: string(),
59839
- metadata: record(string(), unknown()).optional()
59863
+ metadata: record$1(string(), unknown()).optional()
59840
59864
  });
59841
59865
  /**
59842
59866
  * HOW a provider can be found on the network. The provider only DECLARES the
@@ -59894,7 +59918,7 @@ var DiscoveryHitSchema = object({
59894
59918
  port: number$1().int(),
59895
59919
  http: object({
59896
59920
  status: number$1().int(),
59897
- headers: record(string(), string()),
59921
+ headers: record$1(string(), string()),
59898
59922
  /** At most 16 KiB. */
59899
59923
  bodyText: string()
59900
59924
  }).optional(),
@@ -59902,7 +59926,7 @@ var DiscoveryHitSchema = object({
59902
59926
  instance: string(),
59903
59927
  host: string(),
59904
59928
  port: number$1().int(),
59905
- txt: record(string(), string())
59929
+ txt: record$1(string(), string())
59906
59930
  }).optional(),
59907
59931
  udp: object({ payloadHex: string() }).optional(),
59908
59932
  wsd: object({
@@ -59920,7 +59944,7 @@ var DiscoveryCandidateSchema = object({
59920
59944
  stableId: string(),
59921
59945
  type: _enum(DeviceType),
59922
59946
  suggestedName: string(),
59923
- prefilledConfig: record(string(), unknown()),
59947
+ prefilledConfig: record$1(string(), unknown()),
59924
59948
  /**
59925
59949
  * Optional upstream-system identity (HA entity_id, vendor MAC, …).
59926
59950
  * Discovery pre-populates this for systems that know the upstream
@@ -59979,7 +60003,7 @@ var DeviceSummarySchema = object({
59979
60003
  parentDeviceId: number$1().nullable(),
59980
60004
  online: boolean(),
59981
60005
  features: array(string()),
59982
- config: record(string(), unknown()),
60006
+ config: record$1(string(), unknown()),
59983
60007
  /** Optional upstream-system identity (dispatch key + system tag).
59984
60008
  * See `SourceInfo`. Present when the device has a non-synthetic
59985
60009
  * source identifier (HA entities, vendor MAC, …); omitted when the
@@ -60055,7 +60079,7 @@ var deviceProviderCapability = {
60055
60079
  * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
60056
60080
  * (provider uses its local-network default).
60057
60081
  */
60058
- discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
60082
+ discoverDevices: method(object({ params: record$1(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
60059
60083
  kind: "mutation",
60060
60084
  auth: "admin"
60061
60085
  }),
@@ -60072,7 +60096,7 @@ var deviceProviderCapability = {
60072
60096
  */
60073
60097
  classifyDiscoveryHits: method(object({
60074
60098
  hits: array(DiscoveryHitSchema),
60075
- params: record(string(), unknown()).optional()
60099
+ params: record$1(string(), unknown()).optional()
60076
60100
  }), array(DiscoveryCandidateSchema), {
60077
60101
  kind: "mutation",
60078
60102
  auth: "admin"
@@ -60115,7 +60139,7 @@ integrationId: string().optional() }), object({ deviceType: _enum(DeviceType).nu
60115
60139
  }), CreationSchemaOutputSchema),
60116
60140
  createDevice: method(object({
60117
60141
  type: _enum(DeviceType),
60118
- config: record(string(), unknown()),
60142
+ config: record$1(string(), unknown()),
60119
60143
  /** The integration the operator adds the device to; a provider with several instances needs it. */
60120
60144
  integrationId: string().optional()
60121
60145
  }), DeviceSummarySchema, {
@@ -60138,7 +60162,7 @@ integrationId: string().optional() }), object({ deviceType: _enum(DeviceType).nu
60138
60162
  type: _enum(DeviceType),
60139
60163
  key: string(),
60140
60164
  value: unknown(),
60141
- formValues: record(string(), unknown()).optional()
60165
+ formValues: record$1(string(), unknown()).optional()
60142
60166
  }), FieldProbeResultSchema, {
60143
60167
  kind: "mutation",
60144
60168
  auth: "admin"
@@ -60160,7 +60184,7 @@ var DiscoveryObservationSchema = discriminatedUnion("kind", [object({
60160
60184
  /** The A record address when the announcement carried one. */
60161
60185
  address: string().nullable(),
60162
60186
  port: number$1().int(),
60163
- txt: record(string(), string())
60187
+ txt: record$1(string(), string())
60164
60188
  }), object({
60165
60189
  kind: literal("ssdp"),
60166
60190
  /** Sender address of the datagram. */
@@ -60168,7 +60192,7 @@ var DiscoveryObservationSchema = discriminatedUnion("kind", [object({
60168
60192
  port: number$1().int(),
60169
60193
  /** `NT` of a NOTIFY, `ST` of a search response. */
60170
60194
  target: string(),
60171
- headers: record(string(), string())
60195
+ headers: record$1(string(), string())
60172
60196
  })]);
60173
60197
  object({
60174
60198
  addonId: string(),
@@ -60229,7 +60253,7 @@ var DeviceDisplayOverrideSchema = object({
60229
60253
  unit: string().min(1).optional(),
60230
60254
  precision: number$1().int().min(0).max(10).optional(),
60231
60255
  hidden: boolean().optional(),
60232
- perCap: record(string(), DeviceCapDisplayOverrideSchema).optional()
60256
+ perCap: record$1(string(), DeviceCapDisplayOverrideSchema).optional()
60233
60257
  });
60234
60258
  /** Cap-wire shape of a per-role display default — mirrors `RoleDisplayDefault`
60235
60259
  * in `device-management.ts`. Keyed by `DeviceRole` string (role strings cross
@@ -60279,14 +60303,14 @@ var DeviceInfoSchema = object({
60279
60303
  /** true when the device has a getStreamSources() method (ICameraDevice) */
60280
60304
  isCamera: boolean(),
60281
60305
  /** Current config values — serializable snapshot */
60282
- config: record(string(), unknown()),
60306
+ config: record$1(string(), unknown()),
60283
60307
  /** Paths inside `config` the device's schema declares secret (D783) —
60284
60308
  * what the non-admin redaction withholds. Paths, never values. Absent
60285
60309
  * when the owning runner has not reported them. */
60286
60310
  secretConfigPaths: array(string()).optional(),
60287
60311
  /** Hardware + identity blob (manufacturer / model / firmware / sn /
60288
60312
  * uid / mac / …). Populated by drivers; editable via setMetadata. */
60289
- metadata: record(string(), unknown()).nullable().optional(),
60313
+ metadata: record$1(string(), unknown()).nullable().optional(),
60290
60314
  /** Optional upstream-system identity + rendering envelope. See
60291
60315
  * `SourceInfo` in `packages/types/src/device/source-info.ts`. */
60292
60316
  sourceInfo: SourceInfoSchema.optional(),
@@ -60433,7 +60457,7 @@ var DeviceMetaSchema = object({
60433
60457
  location: string().nullable(),
60434
60458
  disabled: boolean(),
60435
60459
  parentDeviceId: number$1().nullable(),
60436
- metadata: record(string(), unknown()).nullable().optional(),
60460
+ metadata: record$1(string(), unknown()).nullable().optional(),
60437
60461
  /** Optional upstream-system identity + rendering envelope. See
60438
60462
  * `SourceInfo`. Present when the device has been persisted with a
60439
60463
  * non-synthetic source identifier (HA entities, vendor MAC, …);
@@ -60497,7 +60521,7 @@ var DeviceRegisterPayloadSchema = object({
60497
60521
  * call (workers re-register on init), so probe-driven updates
60498
60522
  * (e.g. PTZ flag flipping after the abilities probe) propagate. */
60499
60523
  features: array(string()).optional(),
60500
- config: record(string(), unknown()),
60524
+ config: record$1(string(), unknown()),
60501
60525
  /** Config paths the device's own schema DECLARES secret
60502
60526
  * (`.meta({ secret: true })` — dotted, `[]` for array items, e.g.
60503
60527
  * `connection.password`). Re-published on every register; the non-admin
@@ -60518,7 +60542,7 @@ var DeviceTombstoneSchema = object({
60518
60542
  var OrphanDeviceDataSchema = object({
60519
60543
  deviceId: number$1().int().positive(),
60520
60544
  /** Rows/files per store (`<addonId>:<store>`). */
60521
- stores: record(string(), number$1().int().nonnegative())
60545
+ stores: record$1(string(), number$1().int().nonnegative())
60522
60546
  });
60523
60547
  var CleanupDeletedDevicesResultSchema = object({
60524
60548
  /**
@@ -60540,7 +60564,7 @@ var CleanupDeletedDevicesResultSchema = object({
60540
60564
  var DeviceRemovePayloadSchema = object({ deviceId: number$1() });
60541
60565
  var DevicePersistConfigPayloadSchema = object({
60542
60566
  deviceId: number$1(),
60543
- data: record(string(), unknown()),
60567
+ data: record$1(string(), unknown()),
60544
60568
  /** The paths the device's schema declares secret (D783), when the caller
60545
60569
  * knows them — those values are kept in the keychain, not the blob (D787).
60546
60570
  * Absent: the paths the device last reported at `registerDevice` apply. */
@@ -60582,7 +60606,7 @@ method(object({
60582
60606
  }), method(DeviceRegisterPayloadSchema, _void(), { kind: "mutation" }), method(DeviceRemovePayloadSchema, _void(), { kind: "mutation" }), method(DevicePersistConfigPayloadSchema, _void(), {
60583
60607
  kind: "mutation",
60584
60608
  auth: "admin"
60585
- }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), record(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
60609
+ }), method(object({ deviceId: number$1() }), record$1(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), record$1(string(), unknown()), { auth: "admin" }), method(object({ deviceId: number$1() }), DeviceMetaSchema.nullable()), method(object({
60586
60610
  deviceId: number$1(),
60587
60611
  name: string(),
60588
60612
  /**
@@ -60684,10 +60708,10 @@ method(object({
60684
60708
  }), _void(), {
60685
60709
  kind: "mutation",
60686
60710
  auth: "admin"
60687
- }), method(object({}), object({ defaults: record(string(), RoleDisplayDefaultSchema) }), {
60711
+ }), method(object({}), object({ defaults: record$1(string(), RoleDisplayDefaultSchema) }), {
60688
60712
  role: "viewer",
60689
60713
  kind: "query"
60690
- }), method(object({ defaults: record(string(), RoleDisplayDefaultSchema) }), _void(), {
60714
+ }), method(object({ defaults: record$1(string(), RoleDisplayDefaultSchema) }), _void(), {
60691
60715
  kind: "mutation",
60692
60716
  auth: "admin"
60693
60717
  }), method(object({
@@ -60736,7 +60760,7 @@ method(object({
60736
60760
  auth: "admin"
60737
60761
  }), method(object({
60738
60762
  deviceId: number$1(),
60739
- patch: record(string(), unknown())
60763
+ patch: record$1(string(), unknown())
60740
60764
  }), _void(), {
60741
60765
  kind: "mutation",
60742
60766
  auth: "admin"
@@ -60821,12 +60845,12 @@ method(object({
60821
60845
  * it answers today and the caller filters as it already does.
60822
60846
  */
60823
60847
  deviceIds: array(number$1()).optional()
60824
- }), array(DeviceInfoSchema), { role: "viewer" }), method(DeviceSearchInputSchema, DeviceSearchResultSchema, { role: "viewer" }), method(object({ deviceId: number$1() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number$1() }), array(DeviceInfoSchema), { role: "viewer" }), method(object({ parentDeviceIds: array(number$1()).max(256) }), record(string(), array(DeviceInfoSchema))), method(object({ deviceId: number$1() }), object({
60848
+ }), array(DeviceInfoSchema), { role: "viewer" }), method(DeviceSearchInputSchema, DeviceSearchResultSchema, { role: "viewer" }), method(object({ deviceId: number$1() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number$1() }), array(DeviceInfoSchema), { role: "viewer" }), method(object({ parentDeviceIds: array(number$1()).max(256) }), record$1(string(), array(DeviceInfoSchema))), method(object({ deviceId: number$1() }), object({
60825
60849
  mode: LinkedDevicesModeSchema,
60826
60850
  devices: array(LinkedDeviceSchema)
60827
60851
  }), { role: "viewer" }), method(object({ deviceIds: array(number$1()) }), array(LinkedDevicesForDeviceSchema), { role: "viewer" }), method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema)), method(object({ deviceId: number$1() }), ConfigUISchemaOutput), method(object({
60828
60852
  deviceId: number$1(),
60829
- values: record(string(), unknown())
60853
+ values: record$1(string(), unknown())
60830
60854
  }), object({ success: literal(true) }), {
60831
60855
  kind: "mutation",
60832
60856
  auth: "admin"
@@ -60845,9 +60869,9 @@ method(object({
60845
60869
  }), method(object({ integrationId: string() }), object({ removed: number$1() }), {
60846
60870
  kind: "mutation",
60847
60871
  auth: "admin"
60848
- }), method(object({ deviceId: number$1() }), record(string(), string().nullable())), method(object({
60872
+ }), method(object({ deviceId: number$1() }), record$1(string(), string().nullable())), method(object({
60849
60873
  deviceId: number$1(),
60850
- profileMap: record(string(), string().nullable())
60874
+ profileMap: record$1(string(), string().nullable())
60851
60875
  }), object({ success: literal(true) }), {
60852
60876
  kind: "mutation",
60853
60877
  auth: "admin"
@@ -60924,7 +60948,7 @@ method(object({
60924
60948
  }), unknown().nullable()), method(object({
60925
60949
  addonId: string(),
60926
60950
  type: _enum(DeviceType),
60927
- config: record(string(), unknown()),
60951
+ config: record$1(string(), unknown()),
60928
60952
  /** Owning integration id, stamped onto the new device's meta by the
60929
60953
  * device-manager forwarder so `removeByIntegration` can cascade it.
60930
60954
  * Optional for back-compat (omitted = no stamp = pre-existing behavior). */
@@ -60937,7 +60961,7 @@ method(object({
60937
60961
  type: _enum(DeviceType),
60938
60962
  key: string(),
60939
60963
  value: unknown(),
60940
- formValues: record(string(), unknown()).optional()
60964
+ formValues: record$1(string(), unknown()).optional()
60941
60965
  }), FieldProbeResultSchema, {
60942
60966
  kind: "mutation",
60943
60967
  auth: "admin"
@@ -60986,7 +61010,7 @@ method(object({
60986
61010
  }
60987
61011
  ), method(object({
60988
61012
  addonId: string(),
60989
- params: record(string(), unknown()).optional(),
61013
+ params: record$1(string(), unknown()).optional(),
60990
61014
  subnets: array(string()).optional()
60991
61015
  }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
60992
61016
  kind: "mutation",
@@ -61018,10 +61042,10 @@ method(object({
61018
61042
  }), method(object({
61019
61043
  deviceId: number$1(),
61020
61044
  caps: array(string()).readonly().optional()
61021
- }), record(string(), unknown().nullable())), method(object({
61045
+ }), record$1(string(), unknown().nullable())), method(object({
61022
61046
  deviceIds: array(number$1()).readonly(),
61023
61047
  caps: array(string()).readonly().optional()
61024
- }), record(string(), record(string(), unknown().nullable())), { role: "viewer" });
61048
+ }), record$1(string(), record$1(string(), unknown().nullable())), { role: "viewer" });
61025
61049
  var ExtensionSlotIdSchema = _enum(["linked-devices"]);
61026
61050
  DeviceType.Camera;
61027
61051
  /** A slot's editable value, discriminated on `slot`. */
@@ -61242,7 +61266,7 @@ var QueryPointSchema = object({
61242
61266
  /** `enum`: the state in force at the end of the point (the name of `last`); `null` otherwise. */
61243
61267
  state: string().nullable(),
61244
61268
  /** `enum` rollup: milliseconds spent in each state inside the bucket; `null` for raw points and other kinds. */
61245
- states: record(string(), number$1()).nullable()
61269
+ states: record$1(string(), number$1()).nullable()
61246
61270
  });
61247
61271
  var QuerySeriesSchema = object({
61248
61272
  scope: string(),
@@ -61363,11 +61387,11 @@ var DeviceHistoryStatusSchema = object({
61363
61387
  lastReconcileAt: number$1().nullable(),
61364
61388
  lastFlushAt: number$1().nullable(),
61365
61389
  flushFailures: number$1().int(),
61366
- skipped: record(string(), number$1().int())
61390
+ skipped: record$1(string(), number$1().int())
61367
61391
  }),
61368
61392
  ingest: object({
61369
61393
  accepted: number$1().int(),
61370
- refused: record(string(), number$1().int())
61394
+ refused: record$1(string(), number$1().int())
61371
61395
  }),
61372
61396
  rollup: object({
61373
61397
  last5mAt: number$1().nullable(),
@@ -61380,7 +61404,7 @@ var DeviceHistoryStatusSchema = object({
61380
61404
  }),
61381
61405
  retention: object({
61382
61406
  lastRunAt: number$1().nullable(),
61383
- deleted: record(string(), number$1().int()),
61407
+ deleted: record$1(string(), number$1().int()),
61384
61408
  purgedSeries: number$1().int()
61385
61409
  }),
61386
61410
  directory: object({
@@ -61497,7 +61521,7 @@ var DeviceRemovedInputSchema = object({
61497
61521
  providerAddonId: string()
61498
61522
  });
61499
61523
  /** Rows/files/refs deleted, per store this implementer owns. */
61500
- var DeviceRemovedResultSchema = object({ counts: record(string(), number$1().int().nonnegative()) });
61524
+ var DeviceRemovedResultSchema = object({ counts: record$1(string(), number$1().int().nonnegative()) });
61501
61525
  /** One (store, device) pair an implementer holds data for. */
61502
61526
  var DeviceDataEntrySchema = object({
61503
61527
  store: string(),
@@ -61650,20 +61674,20 @@ var ClaimsListingSchema = discriminatedUnion("state", [object({
61650
61674
  state: literal("not-loaded"),
61651
61675
  reason: string()
61652
61676
  })]);
61653
- method(object({ deviceId: number$1() }), record(string(), record(string(), unknown()))), method(object({
61677
+ method(object({ deviceId: number$1() }), record$1(string(), record$1(string(), unknown()))), method(object({
61654
61678
  deviceId: number$1(),
61655
61679
  capName: string()
61656
- }), record(string(), unknown()).nullable()), method(object({}), record(string(), record(string(), record(string(), unknown())))), method(object({
61680
+ }), record$1(string(), unknown()).nullable()), method(object({}), record$1(string(), record$1(string(), record$1(string(), unknown())))), method(object({
61657
61681
  deviceId: number$1(),
61658
61682
  capName: string(),
61659
- slice: record(string(), unknown())
61683
+ slice: record$1(string(), unknown())
61660
61684
  }), _void(), { kind: "mutation" }), method(object({
61661
61685
  deviceId: number$1(),
61662
61686
  capName: string(),
61663
61687
  owner: string().min(1),
61664
61688
  mode: FieldClaimModeSchema,
61665
61689
  fields: array(string().min(1)).min(1),
61666
- values: record(string(), unknown())
61690
+ values: record$1(string(), unknown())
61667
61691
  }), ClaimOutcomeSchema, {
61668
61692
  kind: "mutation",
61669
61693
  auth: "admin"
@@ -61671,7 +61695,7 @@ method(object({ deviceId: number$1() }), record(string(), record(string(), unkno
61671
61695
  deviceId: number$1(),
61672
61696
  capName: string(),
61673
61697
  owner: string().min(1),
61674
- values: record(string(), unknown())
61698
+ values: record$1(string(), unknown())
61675
61699
  }), ClaimOutcomeSchema, {
61676
61700
  kind: "mutation",
61677
61701
  auth: "admin"
@@ -61685,10 +61709,10 @@ method(object({ deviceId: number$1() }), record(string(), record(string(), unkno
61685
61709
  }), method(object({ ownerPrefix: string().optional() }), ClaimsListingSchema, { auth: "admin" }), method(object({
61686
61710
  deviceId: number$1(),
61687
61711
  capName: string()
61688
- }), record(string(), unknown()).nullable(), { auth: "admin" }), event(object({
61712
+ }), record$1(string(), unknown()).nullable(), { auth: "admin" }), event(object({
61689
61713
  deviceId: number$1(),
61690
61714
  capName: string(),
61691
- slice: record(string(), unknown())
61715
+ slice: record$1(string(), unknown())
61692
61716
  }));
61693
61717
  /**
61694
61718
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
@@ -61791,7 +61815,7 @@ var TransitionsStatusSchema = object({
61791
61815
  rows: number$1().int().nullable(),
61792
61816
  lastWriteAt: number$1().nullable(),
61793
61817
  /** Refused rows since start, by reason. */
61794
- refused: record(string(), number$1())
61818
+ refused: record$1(string(), number$1())
61795
61819
  });
61796
61820
  Object.values(DeviceType).filter((type) => type !== DeviceType.Hub && type !== DeviceType.Container), method(object({
61797
61821
  deviceId: number$1().int(),
@@ -62012,7 +62036,7 @@ var dishwasherCapability = {
62012
62036
  start: method(object({
62013
62037
  deviceId: DeviceIdSchema$2,
62014
62038
  program: string().min(1).optional(),
62015
- options: record(string(), DishwasherValueSchema).optional()
62039
+ options: record$1(string(), DishwasherValueSchema).optional()
62016
62040
  }), _void(), {
62017
62041
  kind: "mutation",
62018
62042
  auth: "protected",
@@ -62632,7 +62656,7 @@ var paletteReadySchema = object({
62632
62656
  presetId: _enum(PALETTE_PRESET_IDS),
62633
62657
  customized: boolean(),
62634
62658
  source: _enum(["stored", "unconfigured"]),
62635
- swatches: record(string(), paletteSwatchSchema),
62659
+ swatches: record$1(string(), paletteSwatchSchema),
62636
62660
  fallbacks: array(paletteHexSchema).length(8)
62637
62661
  });
62638
62662
  var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, object({
@@ -62641,11 +62665,11 @@ var paletteResultSchema = discriminatedUnion("status", [paletteReadySchema, obje
62641
62665
  })]);
62642
62666
  var setPaletteInputSchema = union([object({ presetId: string() }), object({
62643
62667
  presetId: string(),
62644
- overrides: record(string(), paletteSwatchSchema)
62668
+ overrides: record$1(string(), paletteSwatchSchema)
62645
62669
  })]);
62646
62670
  object({
62647
62671
  presetId: string(),
62648
- overrides: record(string(), paletteSwatchSchema)
62672
+ overrides: record$1(string(), paletteSwatchSchema)
62649
62673
  });
62650
62674
  function solid(hex) {
62651
62675
  return {
@@ -62729,7 +62753,7 @@ function paintHex(swatches, fallbacks, kind) {
62729
62753
  var presetSummarySchema = object({
62730
62754
  id: string(),
62731
62755
  name: string(),
62732
- swatches: record(string(), paletteSwatchSchema),
62756
+ swatches: record$1(string(), paletteSwatchSchema),
62733
62757
  fallbacks: array(string())
62734
62758
  });
62735
62759
  method(_void(), paletteResultSchema, {
@@ -64307,7 +64331,7 @@ var FeatureProbeStatusSchema = object({
64307
64331
  * `hasPirSensor`, `hasAutotrack`, `hasBattery`. Hikvision keys:
64308
64332
  * `hasSupplementalLight`, `lightHasWhiteLight`, `hasAlarmIo`, `hasPtz`.
64309
64333
  */
64310
- flags: record(string(), unknown()),
64334
+ flags: record$1(string(), unknown()),
64311
64335
  /**
64312
64336
  * Coarse driver-classification — lets cross-process consumers tell apart
64313
64337
  * cameras / battery-cams / NVRs without re-running the probe. `null`
@@ -65778,9 +65802,9 @@ var HeroArgValueSchema = lazy(() => union([
65778
65802
  string(),
65779
65803
  number$1(),
65780
65804
  boolean(),
65781
- record(string(), HeroArgValueSchema)
65805
+ record$1(string(), HeroArgValueSchema)
65782
65806
  ]));
65783
- var HeroArgsSchema = record(string(), HeroArgValueSchema);
65807
+ var HeroArgsSchema = record$1(string(), HeroArgValueSchema);
65784
65808
  /** A cap method called on the hero's device. */
65785
65809
  var HeroCallSchema = object({
65786
65810
  cap: string(),
@@ -65836,7 +65860,7 @@ var HeroControlSchema = discriminatedUnion("kind", [
65836
65860
  current: string().nullable(),
65837
65861
  options: array(string()),
65838
65862
  /** A readable label per option value; an option without one is drawn as its raw value. */
65839
- optionLabels: record(string(), HeroTextSchema).optional(),
65863
+ optionLabels: record$1(string(), HeroTextSchema).optional(),
65840
65864
  call: HeroCallSchema,
65841
65865
  valueArg: string()
65842
65866
  }),
@@ -66679,7 +66703,7 @@ var IntegrationWithStateSchema = object({
66679
66703
  * must not draw it as on or off (D315).
66680
66704
  */
66681
66705
  switchUnknown: literal(true).optional(),
66682
- info: record(string(), unknown()).readonly(),
66706
+ info: record$1(string(), unknown()).readonly(),
66683
66707
  /** The discovery candidate this integration was set up from (D984). */
66684
66708
  originStableId: string().optional(),
66685
66709
  createdAt: number$1(),
@@ -66698,7 +66722,7 @@ var IntegrationLiteSchema = object({
66698
66722
  * must not draw it as on or off (D315).
66699
66723
  */
66700
66724
  switchUnknown: literal(true).optional(),
66701
- info: record(string(), unknown()).readonly(),
66725
+ info: record$1(string(), unknown()).readonly(),
66702
66726
  /** The discovery candidate this integration was set up from (D984). */
66703
66727
  originStableId: string().optional(),
66704
66728
  createdAt: number$1(),
@@ -66807,7 +66831,7 @@ var UpdateIntegrationInputSchema = object({
66807
66831
  * switch is `integration-instances.setInstanceEnabled`.
66808
66832
  */
66809
66833
  enabled: boolean().optional(),
66810
- info: record(string(), unknown()).optional()
66834
+ info: record$1(string(), unknown()).optional()
66811
66835
  });
66812
66836
  var DeleteIntegrationResultSchema = object({
66813
66837
  success: boolean(),
@@ -67005,7 +67029,7 @@ var IntegrationInstanceSchema = object({
67005
67029
  /** The kind of this instance: exactly one of `describe().kinds[].id` (D1013 rule 2). */
67006
67030
  kind: string().min(1),
67007
67031
  /** Values for the instance form; a secret is a `SecretFieldView`, never text. */
67008
- formValues: record(string(), unknown()),
67032
+ formValues: record$1(string(), unknown()),
67009
67033
  status: IntegrationInstanceStatusSchema.optional(),
67010
67034
  /** Epoch ms of the last probe of the remote that produced `status`; absent when never checked. */
67011
67035
  lastCheckedAt: number$1().optional()
@@ -67014,7 +67038,7 @@ var IntegrationInstancePatchSchema = object({
67014
67038
  id: IntegrationInstanceIdSchema,
67015
67039
  name: string().min(1).optional(),
67016
67040
  /** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
67017
- values: record(string(), unknown())
67041
+ values: record$1(string(), unknown())
67018
67042
  });
67019
67043
  var integrationInstancesCapability = {
67020
67044
  name: "integration-instances",
@@ -67059,7 +67083,7 @@ var integrationInstancesCapability = {
67059
67083
  name: string().min(1),
67060
67084
  kind: string().min(1).optional(),
67061
67085
  /** Form values written with the record (a link picked in the create dialog). */
67062
- values: record(string(), unknown()).optional(),
67086
+ values: record$1(string(), unknown()).optional(),
67063
67087
  /**
67064
67088
  * The discovery candidate (`stableId`) the instance is set up from. Kept on the integration
67065
67089
  * registry row of an instance that brings devices, so discovery stops offering a candidate
@@ -67073,7 +67097,7 @@ var integrationInstancesCapability = {
67073
67097
  * caller the transport stamped as the addon itself (`callerAddonId`): an admin session
67074
67098
  * cannot send it, and the wizard never does. `values` are the settings it is seeded with.
67075
67099
  */
67076
- seed: object({ info: record(string(), unknown()) }).optional()
67100
+ seed: object({ info: record$1(string(), unknown()) }).optional()
67077
67101
  }), object({ id: string() }), {
67078
67102
  kind: "mutation",
67079
67103
  auth: "protected",
@@ -67109,7 +67133,7 @@ var integrationInstancesCapability = {
67109
67133
  }),
67110
67134
  testInstance: optionalMethod(object({
67111
67135
  id: IntegrationInstanceIdSchema.nullable(),
67112
- values: record(string(), unknown()),
67136
+ values: record$1(string(), unknown()),
67113
67137
  /** The kind to test when `id` is null and the provider has several. */
67114
67138
  kind: string().min(1).optional()
67115
67139
  }), TestConnectionResultSchema, {
@@ -67528,7 +67552,7 @@ var KeychainResolveEntrySchema = discriminatedUnion("kind", [
67528
67552
  }),
67529
67553
  object({ kind: literal("forbidden") })
67530
67554
  ]);
67531
- var KeychainResolveResultSchema = record(string(), KeychainResolveEntrySchema);
67555
+ var KeychainResolveResultSchema = record$1(string(), KeychainResolveEntrySchema);
67532
67556
  /** Metadata of one stored value — never the value. */
67533
67557
  var KeychainSecretMetaSchema = object({
67534
67558
  ref: string(),
@@ -68001,7 +68025,7 @@ var LlmGenerateBaseInputSchema = object({
68001
68025
  /** v1: single-turn. `messages[]` is a v2 additive field. */
68002
68026
  prompt: string(),
68003
68027
  /** Structured output — adapter-mapped (response_format / forced tool / responseSchema). */
68004
- jsonSchema: record(string(), unknown()).optional(),
68028
+ jsonSchema: record$1(string(), unknown()).optional(),
68005
68029
  /** Per-call override of the profile default. */
68006
68030
  maxTokens: number$1().int().positive().optional(),
68007
68031
  temperature: number$1().optional(),
@@ -68326,7 +68350,7 @@ var LlmModelInfoSchema = object({
68326
68350
  * `connectionSchema` declares `type: 'password'` is a secret: it is held in the
68327
68351
  * keychain, never in the row, and reads back as the redaction marker.
68328
68352
  */
68329
- var LlmProviderConfigSchema = record(string(), unknown());
68353
+ var LlmProviderConfigSchema = record$1(string(), unknown());
68330
68354
  object({
68331
68355
  id: string(),
68332
68356
  name: string(),
@@ -68998,7 +69022,7 @@ var ScanStatsSchema = object({
68998
69022
  hostsProbed: number$1().int(),
68999
69023
  hits: number$1().int(),
69000
69024
  timeouts: number$1().int(),
69001
- byMode: record(string(), object({
69025
+ byMode: record$1(string(), object({
69002
69026
  probed: number$1().int(),
69003
69027
  hits: number$1().int(),
69004
69028
  timeouts: number$1().int()
@@ -69340,8 +69364,8 @@ var LogEntrySchema = object({
69340
69364
  level: LogLevelSchema,
69341
69365
  scope: array(string()),
69342
69366
  message: string(),
69343
- meta: record(string(), unknown()).optional(),
69344
- tags: record(string(), string()).optional()
69367
+ meta: record$1(string(), unknown()).optional(),
69368
+ tags: record$1(string(), string()).optional()
69345
69369
  });
69346
69370
  /**
69347
69371
  * A history READ against one destination (D898).
@@ -69381,7 +69405,7 @@ var LogReadQuerySchema = object({
69381
69405
  */
69382
69406
  fromNodeId: string().min(1).max(200).optional(),
69383
69407
  /** Any other tag, exact match (AND). */
69384
- tags: record(string(), union([string(), number$1()])).optional(),
69408
+ tags: record$1(string(), union([string(), number$1()])).optional(),
69385
69409
  /** Severity FLOOR: this level and above. */
69386
69410
  level: LogLevelSchema.optional(),
69387
69411
  /** Case-insensitive substring over message, scope, tag values and meta values. */
@@ -69408,8 +69432,8 @@ var LogReadResultSchema = object({
69408
69432
  level: LogLevelSchema,
69409
69433
  scope: string().optional(),
69410
69434
  message: string(),
69411
- tags: record(string(), union([string(), number$1()])).optional(),
69412
- meta: record(string(), unknown()).optional()
69435
+ tags: record$1(string(), union([string(), number$1()])).optional(),
69436
+ meta: record$1(string(), unknown()).optional()
69413
69437
  })),
69414
69438
  /** Pass as `before` for the next older page; null when nothing older exists. */
69415
69439
  nextBefore: string().nullable(),
@@ -70113,7 +70137,7 @@ method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSna
70113
70137
  */
70114
70138
  var RecordIdSchema = string().min(1).max(256);
70115
70139
  /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
70116
- var RecordBodySchema = record(string(), unknown());
70140
+ var RecordBodySchema = record$1(string(), unknown());
70117
70141
  var RecordInputSchema = object({
70118
70142
  id: RecordIdSchema,
70119
70143
  /** The device this row belongs to (D865 removal, per-device reads). */
@@ -70134,7 +70158,7 @@ var RecordViewSchema = object({
70134
70158
  data: RecordBodySchema
70135
70159
  });
70136
70160
  /** Declared index fields only. Anything else does not compile, by design. */
70137
- var RecordWhereSchema = record(RecordFieldPathSchema, union([
70161
+ var RecordWhereSchema = record$1(RecordFieldPathSchema, union([
70138
70162
  string(),
70139
70163
  number$1(),
70140
70164
  boolean(),
@@ -70209,8 +70233,8 @@ var RecordTransactOpSchema = discriminatedUnion("op", [
70209
70233
  id: RecordIdSchema
70210
70234
  })
70211
70235
  ]);
70212
- var RecordSecretRefsSchema = record(string(), record(string(), string()));
70213
- method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
70236
+ var RecordSecretRefsSchema = record$1(string(), record$1(string(), string()));
70237
+ method(object({ kinds: record$1(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record$1(string(), DeclareKindResultSchema) }), {
70214
70238
  kind: "mutation",
70215
70239
  auth: "admin"
70216
70240
  }), method(object({
@@ -70329,7 +70353,7 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
70329
70353
  deviceId: number$1().int(),
70330
70354
  kinds: array(RecordKindNameSchema).optional()
70331
70355
  }), object({
70332
- deleted: record(string(), number$1().int()),
70356
+ deleted: record$1(string(), number$1().int()),
70333
70357
  secretRefs: SecretRefsList
70334
70358
  }), {
70335
70359
  kind: "mutation",
@@ -70353,7 +70377,7 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
70353
70377
  * `scripts/migration-api-contract.json`, and every `behaviours` id below must have an
70354
70378
  * `it('<id>'` in `migration-api.contract.spec.ts`.
70355
70379
  */
70356
- var Rows = record(string(), unknown());
70380
+ var Rows = record$1(string(), unknown());
70357
70381
  var IntegrationId = object({ integrationId: string().min(1) });
70358
70382
  var RecordId = object({ id: string().min(1) });
70359
70383
  var RecordRowSchema = object({
@@ -70452,7 +70476,7 @@ object({
70452
70476
  deviceId: number$1().int().optional(),
70453
70477
  atBefore: number$1().optional(),
70454
70478
  where: RecordWhereSchema.optional()
70455
- }), object({ count: number$1().int().nonnegative() }), object({}), object({ store: Rows }), object({ patch: Rows }), object({}), object({ keys: array(string().min(1)) }), object({ removed: array(string()) }), object({}), object({ deviceIds: array(number$1().int()) }), object({ deviceIds: array(number$1().int()) }), object({ blobs: record(string(), Rows) }), object({ refs: array(string()) }), object({ values: record(string(), string().nullable()) }), object({
70479
+ }), object({ count: number$1().int().nonnegative() }), object({}), object({ store: Rows }), object({ patch: Rows }), object({}), object({ keys: array(string().min(1)) }), object({ removed: array(string()) }), object({}), object({ deviceIds: array(number$1().int()) }), object({ deviceIds: array(number$1().int()) }), object({ blobs: record$1(string(), Rows) }), object({ refs: array(string()) }), object({ values: record$1(string(), string().nullable()) }), object({
70456
70480
  ref: string().min(1),
70457
70481
  value: string()
70458
70482
  }), object({}), object({ refs: array(string()) }), object({ deleted: number$1().int().nonnegative() }), object({}), object({ integrations: array(MigrationIntegrationSchema) }), object({ id: string().min(1) }), MigrationIntegrationSchema.nullable(), object({
@@ -70463,7 +70487,7 @@ object({
70463
70487
  integrationId: string().nullable(),
70464
70488
  /** Whether the device carries any stored config; its content is not offered. */
70465
70489
  hasConfig: boolean()
70466
- }).nullable(), object({ deviceIds: array(number$1().int()) }), object({ aliases: record(string(), string()) }), object({
70490
+ }).nullable(), object({ deviceIds: array(number$1().int()) }), object({ aliases: record$1(string(), string()) }), object({
70467
70491
  deviceId: number$1().int(),
70468
70492
  integrationId: string().min(1)
70469
70493
  }), object({}), object({}), object({ nodeId: string() }), object({}), object({});
@@ -70519,7 +70543,7 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
70519
70543
  }), {
70520
70544
  kind: "mutation",
70521
70545
  auth: "admin"
70522
- }), method(object({ integrationId: string().min(1) }), record(string(), unknown()), { auth: "admin" }), method(object({ integrationId: string().min(1) }), object({
70546
+ }), method(object({ integrationId: string().min(1) }), record$1(string(), unknown()), { auth: "admin" }), method(object({ integrationId: string().min(1) }), object({
70523
70547
  rows: number$1().int().nonnegative(),
70524
70548
  secrets: number$1().int().nonnegative()
70525
70549
  }), {
@@ -70527,7 +70551,7 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
70527
70551
  auth: "admin"
70528
70552
  }), method(object({
70529
70553
  integrationId: string().min(1),
70530
- patch: record(string(), unknown())
70554
+ patch: record$1(string(), unknown())
70531
70555
  }), object({ written: boolean() }), {
70532
70556
  kind: "mutation",
70533
70557
  auth: "admin"
@@ -70536,7 +70560,7 @@ method(object({}), object({ entries: array(MigrationLedgerEntrySchema) }), { aut
70536
70560
  keys: array(string().min(1))
70537
70561
  }), object({
70538
70562
  present: boolean(),
70539
- removed: record(string(), unknown())
70563
+ removed: record$1(string(), unknown())
70540
70564
  }), {
70541
70565
  kind: "mutation",
70542
70566
  auth: "admin"
@@ -71034,7 +71058,7 @@ var SensorEventSchema = object({
71034
71058
  /** Event kind id — matches an `EventKindDescriptor.kind`. */
71035
71059
  kind: string(),
71036
71060
  /** Snapshot of the sensor cap's runtime-state slice at the change. */
71037
- value: record(string(), unknown()).nullable(),
71061
+ value: record$1(string(), unknown()).nullable(),
71038
71062
  timestamp: number$1()
71039
71063
  });
71040
71064
  /**
@@ -71988,7 +72012,7 @@ var RetrainFrameReviewSchema = object({
71988
72012
  iou: number$1().optional()
71989
72013
  })).readonly(),
71990
72014
  summary: object({
71991
- counts: record(RetrainReviewStatusSchema, number$1().int()),
72015
+ counts: record$1(RetrainReviewStatusSchema, number$1().int()),
71992
72016
  total: number$1().int(),
71993
72017
  changed: number$1().int(),
71994
72018
  approximate: boolean()
@@ -72279,7 +72303,7 @@ var RetrainArchiveTargetSchema = object({
72279
72303
  kind: literal("http"),
72280
72304
  method: _enum(["PUT", "POST"]),
72281
72305
  url: string().url(),
72282
- headers: record(string(), string()).optional()
72306
+ headers: record$1(string(), string()).optional()
72283
72307
  });
72284
72308
  var RetrainArchiveResultSchema = object({
72285
72309
  batchId: string(),
@@ -73618,12 +73642,12 @@ var PipelineDefaultStepSchema = lazy(() => object({
73618
73642
  modelId: string(),
73619
73643
  children: array(PipelineDefaultStepSchema).readonly(),
73620
73644
  group: string().optional(),
73621
- settings: record(string(), unknown()).optional()
73645
+ settings: record$1(string(), unknown()).optional()
73622
73646
  }));
73623
73647
  var PipelineModelOptionSchema = object({
73624
73648
  id: string(),
73625
73649
  name: string(),
73626
- formats: record(string(), PipelineModelFormatStatusSchema),
73650
+ formats: record$1(string(), PipelineModelFormatStatusSchema),
73627
73651
  group: ModelVariantGroupSchema.optional(),
73628
73652
  legacy: boolean().optional(),
73629
73653
  provider: ModelProviderIdSchema.optional(),
@@ -73640,7 +73664,7 @@ var PipelineAddonSchemaSchema = object({
73640
73664
  childSlots: array(PipelineSlotSchema).readonly(),
73641
73665
  models: array(PipelineModelOptionSchema).readonly(),
73642
73666
  defaultModelId: string(),
73643
- defaultModelIdByFormat: record(string(), string()).optional(),
73667
+ defaultModelIdByFormat: record$1(string(), string()).optional(),
73644
73668
  enabledByDefault: boolean().optional(),
73645
73669
  defaultConfidence: number$1(),
73646
73670
  group: string().optional(),
@@ -73764,12 +73788,12 @@ var ConfigUISchemaBridge = custom();
73764
73788
  var ConfigUISchemaNullableBridge = custom();
73765
73789
  var InferenceCapabilitiesBridge = custom();
73766
73790
  var ModelAvailabilityListBridge = custom();
73767
- method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
73791
+ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record$1(string(), object({
73768
73792
  modelId: string(),
73769
- settings: record(string(), unknown()).readonly()
73770
- }))), method(object({ steps: record(string(), object({
73793
+ settings: record$1(string(), unknown()).readonly()
73794
+ }))), method(object({ steps: record$1(string(), object({
73771
73795
  modelId: string(),
73772
- settings: record(string(), unknown()).readonly()
73796
+ settings: record$1(string(), unknown()).readonly()
73773
73797
  })) }), object({ success: literal(true) }), {
73774
73798
  kind: "mutation",
73775
73799
  auth: "admin"
@@ -73922,7 +73946,7 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
73922
73946
  * their warmup `runPipeline` reported: the model that actually ran.
73923
73947
  */
73924
73948
  modelId: string().min(1)
73925
- }), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number$1().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
73949
+ }), record$1(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number$1().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
73926
73950
  engineKey: string(),
73927
73951
  engine: PipelineEngineChoiceSchema,
73928
73952
  modelsLoaded: array(string()).readonly(),
@@ -73960,7 +73984,7 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
73960
73984
  addonId: string(),
73961
73985
  modelId: string(),
73962
73986
  filename: string().optional(),
73963
- settings: record(string(), unknown()).optional()
73987
+ settings: record$1(string(), unknown()).optional()
73964
73988
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge), NOT_A_DEVICE.PIPELINE;
73965
73989
  object({
73966
73990
  activeCameras: number$1(),
@@ -74285,7 +74309,7 @@ var NodeBenchFingerprintSchema = object({
74285
74309
  ramGb: number$1().nullable(),
74286
74310
  os: string().nullable(),
74287
74311
  /** Per device: the pool the cells ran on (runtime + tuning). */
74288
- pools: record(string(), object({
74312
+ pools: record$1(string(), object({
74289
74313
  runtime: string(),
74290
74314
  numWorkers: number$1(),
74291
74315
  concurrency: number$1(),
@@ -74943,7 +74967,7 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
74943
74967
  */
74944
74968
  var RunnerJumpStepProvisioningSchema = object({
74945
74969
  modelId: string().optional(),
74946
- settings: record(string(), unknown()).optional()
74970
+ settings: record$1(string(), unknown()).optional()
74947
74971
  });
74948
74972
  /**
74949
74973
  * One ENABLED inference device on the runner's node, as the step-tree
@@ -74966,7 +74990,7 @@ var RunnerInferenceDeviceSchema = object({
74966
74990
  * Absent field ⇒ an orchestrator that predates D650: the jumped step keeps
74967
74991
  * the elected device's provisioning, as before.
74968
74992
  */
74969
- steps: record(string(), RunnerJumpStepProvisioningSchema).optional()
74993
+ steps: record$1(string(), RunnerJumpStepProvisioningSchema).optional()
74970
74994
  });
74971
74995
  /**
74972
74996
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
@@ -76829,7 +76853,7 @@ var ClientNetworkStatsSchema = object({
76829
76853
  });
76830
76854
  var DeviceNetworkStatsSchema = object({
76831
76855
  deviceId: number$1(),
76832
- streams: record(string(), StreamNetworkStatsSchema),
76856
+ streams: record$1(string(), StreamNetworkStatsSchema),
76833
76857
  client: ClientNetworkStatsSchema.optional()
76834
76858
  });
76835
76859
  method(object({ deviceId: number$1() }), DeviceNetworkStatsSchema.nullable()), method(_void(), array(DeviceNetworkStatsSchema).readonly()), method(object({
@@ -76933,7 +76957,7 @@ method(object({
76933
76957
  nodeId: string().min(1),
76934
76958
  /** Epoch ms the node was forgotten (the tombstone's `removedAt`). */
76935
76959
  removedAt: number$1()
76936
- }), object({ counts: record(string(), number$1().int().nonnegative()) }), {
76960
+ }), object({ counts: record$1(string(), number$1().int().nonnegative()) }), {
76937
76961
  kind: "mutation",
76938
76962
  auth: "admin"
76939
76963
  }), NOT_A_DEVICE.INTERNAL;
@@ -77125,7 +77149,7 @@ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method
77125
77149
  }), RenameNodeResultSchema, {
77126
77150
  kind: "mutation",
77127
77151
  auth: "admin"
77128
- }), method(_void(), record(string(), ClusterAddonStatusEntrySchema), { auth: "admin" }), method(object({ windowSeconds: number$1().int().positive().max(300).default(60) }), array(CapUsageEdgeSchema).readonly(), { auth: "admin" }), method(object({ nodeId: string() }), array(NodeAddonEntrySchema).readonly(), { auth: "admin" }), method(object({
77152
+ }), method(_void(), record$1(string(), ClusterAddonStatusEntrySchema), { auth: "admin" }), method(object({ windowSeconds: number$1().int().positive().max(300).default(60) }), array(CapUsageEdgeSchema).readonly(), { auth: "admin" }), method(object({ nodeId: string() }), array(NodeAddonEntrySchema).readonly(), { auth: "admin" }), method(object({
77129
77153
  nodeId: string(),
77130
77154
  level: string()
77131
77155
  }), SuccessSchema, {
@@ -77135,7 +77159,7 @@ method(_void(), array(TopologyNodeSchema).readonly(), { auth: "admin" }), method
77135
77159
  nodeId: string(),
77136
77160
  addonId: string(),
77137
77161
  queryName: string(),
77138
- params: record(string(), unknown()).optional()
77162
+ params: record$1(string(), unknown()).optional()
77139
77163
  }), unknown(), {
77140
77164
  kind: "mutation",
77141
77165
  auth: "admin"
@@ -78452,7 +78476,7 @@ var NcRuleTargetSchema = object({
78452
78476
  * Notification (`priority`, `level`, `sound`, `clickUrl`, `ttl`); the
78453
78477
  * degrade engine drops what the backend can't render.
78454
78478
  */
78455
- params: record(string(), unknown()).optional()
78479
+ params: record$1(string(), unknown()).optional()
78456
78480
  });
78457
78481
  /** Which picture kind one target receives (#487). */
78458
78482
  var NcTargetAttachmentSchema = _enum([
@@ -78473,7 +78497,7 @@ var NcTargetOverrideSchema = object({
78473
78497
  actions: boolean().optional()
78474
78498
  });
78475
78499
  /** Per-target settings keyed by target id (#487). */
78476
- var NcTargetOverridesSchema = record(string(), NcTargetOverrideSchema);
78500
+ var NcTargetOverridesSchema = record$1(string(), NcTargetOverrideSchema);
78477
78501
  /**
78478
78502
  * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
78479
78503
  *
@@ -78980,7 +79004,7 @@ var NcStateSummaryPreviewSchema = object({
78980
79004
  count: number$1().int().nonnegative(),
78981
79005
  text: string(),
78982
79006
  sections: array(NcStateSummaryPreviewSectionSchema),
78983
- dropped: record(string(), number$1().int().nonnegative()),
79007
+ dropped: record$1(string(), number$1().int().nonnegative()),
78984
79008
  excludedGroups: array(string()),
78985
79009
  split: NcStateSummarySplitSchema.optional(),
78986
79010
  rows: array(NcStateSummaryPreviewRowSchema).optional()
@@ -79236,7 +79260,7 @@ var NcHistorySubjectSchema = object({
79236
79260
  subject: string(),
79237
79261
  title: string(),
79238
79262
  body: string(),
79239
- data: record(string(), unknown())
79263
+ data: record$1(string(), unknown())
79240
79264
  }).optional()
79241
79265
  });
79242
79266
  /**
@@ -79276,6 +79300,13 @@ var NcHistoryEntrySchema = object({
79276
79300
  error: string().optional(),
79277
79301
  subject: NcHistorySubjectSchema,
79278
79302
  /**
79303
+ * The title and body actually sent, frozen at delivery. Absent on a row
79304
+ * still pending, a row suppressed before a notification was built, and a
79305
+ * row delivered before this field shipped.
79306
+ */
79307
+ title: string().optional(),
79308
+ body: string().optional(),
79309
+ /**
79279
79310
  * Ids of the artefacts (still, then gif, then clip) this row's successful
79280
79311
  * delivery indexed in the artefact library — a REFERENCE, never the bytes
79281
79312
  * (an artefact is often megabytes; this row is durable JSON rewritten on
@@ -80007,7 +80038,7 @@ var NotifierSendInputSchema = object({
80007
80038
  actions: array(NotifierActionSchema).optional(),
80008
80039
  /** Free-form platform-specific payload — passed through to the
80009
80040
  * upstream service untouched. */
80010
- data: record(string(), unknown()).optional()
80041
+ data: record$1(string(), unknown()).optional()
80011
80042
  });
80012
80043
  var NotifierSendResultSchema = object({
80013
80044
  /** Provider-assigned id for the delivery. Used for `cancel`. */
@@ -81288,9 +81319,9 @@ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
81288
81319
  var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
81289
81320
  var LoadBalancingSharesInputSchema = object({
81290
81321
  /** nodeId → share (> 0). A node left out keeps its weight. */
81291
- nodes: record(string(), number$1().positive()).default({}),
81322
+ nodes: record$1(string(), number$1().positive()).default({}),
81292
81323
  /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
81293
- devices: record(string(), record(string(), number$1().positive())).default({})
81324
+ devices: record$1(string(), record$1(string(), number$1().positive())).default({})
81294
81325
  });
81295
81326
  var PlacementStatsInputSchema = object({
81296
81327
  /** Window the observed shares are averaged over (default 1 h, max 24 h). */
@@ -81407,8 +81438,8 @@ var ShareSourceSchema = _enum([
81407
81438
  ]);
81408
81439
  var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
81409
81440
  object({
81410
- nodes: record(string(), number$1()),
81411
- devices: record(string(), record(string(), number$1()))
81441
+ nodes: record$1(string(), number$1()),
81442
+ devices: record$1(string(), record$1(string(), number$1()))
81412
81443
  });
81413
81444
  var EffectiveDeviceShareSchema = object({
81414
81445
  deviceKey: string(),
@@ -81441,8 +81472,8 @@ var EffectiveSharesSchema = object({
81441
81472
  trigger: string().nullable(),
81442
81473
  nodes: array(EffectiveNodeShareSchema).readonly(),
81443
81474
  /** The relative weights the election reads (before eligibility). */
81444
- nodeWeights: record(string(), number$1()),
81445
- deviceWeights: record(string(), record(string(), number$1()))
81475
+ nodeWeights: record$1(string(), number$1()),
81476
+ deviceWeights: record$1(string(), record$1(string(), number$1()))
81446
81477
  });
81447
81478
  var CameraPipelineConfigSchema = object({
81448
81479
  engine: PipelineEngineChoiceSchema.optional(),
@@ -81451,12 +81482,12 @@ var CameraPipelineConfigSchema = object({
81451
81482
  engine: PipelineEngineChoiceSchema.optional(),
81452
81483
  modelId: string().optional(),
81453
81484
  enabled: boolean(),
81454
- settings: record(string(), unknown()).readonly().optional()
81485
+ settings: record$1(string(), unknown()).readonly().optional()
81455
81486
  }).nullable().optional()
81456
81487
  });
81457
81488
  var DeviceStepConfigSchema = object({
81458
81489
  modelId: string().optional(),
81459
- settings: record(string(), unknown()).optional(),
81490
+ settings: record$1(string(), unknown()).optional(),
81460
81491
  /**
81461
81492
  * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
81462
81493
  * When set, this step runs on the named enabled device of the SAME node
@@ -81507,7 +81538,7 @@ var AgentPipelineSettingsSchema = object({
81507
81538
  * every accelerator of the node under the device's own settings. Never a
81508
81539
  * model or a model-bound threshold. Written by `setNodeStepSettings`.
81509
81540
  */
81510
- stepSettings: record(string(), record(string(), unknown()).readonly()).optional(),
81541
+ stepSettings: record$1(string(), record$1(string(), unknown()).readonly()).optional(),
81511
81542
  /**
81512
81543
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
81513
81544
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -81517,14 +81548,14 @@ var AgentPipelineSettingsSchema = object({
81517
81548
  * the default model/settings for every camera landing on that accelerator;
81518
81549
  * a stepId absent ⇒ the step uses that device's format default.
81519
81550
  */
81520
- inferenceDevices: record(string(), object({
81551
+ inferenceDevices: record$1(string(), object({
81521
81552
  enabled: boolean(),
81522
81553
  weight: number$1().positive().optional(),
81523
81554
  maxSessions: number$1().int().positive().optional(),
81524
- steps: record(string(), DeviceStepConfigSchema).optional()
81555
+ steps: record$1(string(), DeviceStepConfigSchema).optional()
81525
81556
  })).optional()
81526
81557
  });
81527
- var CameraStepSettingsSchema = record(string(), record(string(), unknown()).readonly());
81558
+ var CameraStepSettingsSchema = record$1(string(), record$1(string(), unknown()).readonly());
81528
81559
  /** The three root-detector choices a camera has (D507: at most one root). */
81529
81560
  var CameraDetectionSourceSchema = _enum([
81530
81561
  "pipeline",
@@ -81532,7 +81563,7 @@ var CameraDetectionSourceSchema = _enum([
81532
81563
  "none"
81533
81564
  ]);
81534
81565
  var CameraPipelineSettingsSchema = object({
81535
- stepToggles: record(string(), boolean()).optional(),
81566
+ stepToggles: record$1(string(), boolean()).optional(),
81536
81567
  stepSettings: CameraStepSettingsSchema.optional()
81537
81568
  });
81538
81569
  /**
@@ -81604,7 +81635,7 @@ var GlobalMetricsSchema = object({
81604
81635
  * `capability.binding-changed` event subscription) when resolving
81605
81636
  * capability providers.
81606
81637
  */
81607
- var CapabilityBindingsSchema = record(string(), string());
81638
+ var CapabilityBindingsSchema = record$1(string(), string());
81608
81639
  /**
81609
81640
  * The cluster's single camera-source owner (`clusterRoles.ingestNode`) plus
81610
81641
  * its LAN-reachable host, if one is registered. See `getIngestOwner`.
@@ -81875,7 +81906,7 @@ var NodeInferenceDeviceSchema = object({
81875
81906
  * available per format; this is the stored selection that becomes the
81876
81907
  * default for EVERY camera landing on this accelerator.
81877
81908
  */
81878
- steps: record(string(), DeviceStepConfigSchema).optional(),
81909
+ steps: record$1(string(), DeviceStepConfigSchema).optional(),
81879
81910
  /**
81880
81911
  * `null` when the device IS a camera-root candidate on this node; otherwise
81881
81912
  * the reason the dispatcher drops it. Computed by the SAME
@@ -82070,11 +82101,11 @@ method(object({
82070
82101
  auth: "admin"
82071
82102
  }), method(object({
82072
82103
  agentNodeId: string(),
82073
- inferenceDevices: record(string(), object({
82104
+ inferenceDevices: record$1(string(), object({
82074
82105
  enabled: boolean(),
82075
82106
  weight: number$1().positive().optional(),
82076
82107
  maxSessions: number$1().int().positive().optional(),
82077
- steps: record(string(), DeviceStepConfigSchema).optional()
82108
+ steps: record$1(string(), DeviceStepConfigSchema).optional()
82078
82109
  }))
82079
82110
  }), object({ success: literal(true) }), {
82080
82111
  kind: "mutation",
@@ -82082,7 +82113,7 @@ method(object({
82082
82113
  }), method(object({
82083
82114
  agentNodeId: string(),
82084
82115
  addonId: string(),
82085
- settings: record(string(), unknown()).nullable()
82116
+ settings: record$1(string(), unknown()).nullable()
82086
82117
  }), object({ success: literal(true) }), {
82087
82118
  kind: "mutation",
82088
82119
  auth: "admin"
@@ -82153,7 +82184,7 @@ method(object({
82153
82184
  }), method(object({
82154
82185
  deviceId: number$1(),
82155
82186
  addonId: string(),
82156
- settings: record(string(), unknown()).nullable()
82187
+ settings: record$1(string(), unknown()).nullable()
82157
82188
  }), object({ success: literal(true) }), {
82158
82189
  kind: "mutation",
82159
82190
  auth: "admin"
@@ -83777,7 +83808,7 @@ var EntryKindInfoSchema = object({
83777
83808
  title: string(),
83778
83809
  nameField: string(),
83779
83810
  /** JSON Schema of the body; `secret: true` marks a password field. */
83780
- fields: record(string(), unknown()),
83811
+ fields: record$1(string(), unknown()),
83781
83812
  secretPaths: array(string()),
83782
83813
  rows: number$1().int().nonnegative()
83783
83814
  });
@@ -84357,7 +84388,7 @@ var RecordingDevicePinSchema = object({
84357
84388
  var RecordingPlacementViewSchema = object({
84358
84389
  assignments: array(RecordingDevicePlacementSchema),
84359
84390
  pins: array(RecordingDevicePinSchema),
84360
- defaultLocations: record(string(), string())
84391
+ defaultLocations: record$1(string(), string())
84361
84392
  });
84362
84393
  var RecordingSetDevicePlacementInputSchema = object({
84363
84394
  deviceId: number$1().int(),
@@ -85998,9 +86029,9 @@ var RemoteBindingSchema = object({ action: object({
85998
86029
  deviceId: number$1().int().nonnegative(),
85999
86030
  cap: string().min(1),
86000
86031
  method: string().min(1),
86001
- args: record(string(), unknown()).optional(),
86032
+ args: record$1(string(), unknown()).optional(),
86002
86033
  /** The unit the person picked per arg (display only); `args` always hold the cap's own unit. */
86003
- argUnits: record(string(), string().min(1)).optional()
86034
+ argUnits: record$1(string(), string().min(1)).optional()
86004
86035
  }) });
86005
86036
  var RemoteCustomButtonSchema = object({
86006
86037
  /** The slug after `custom:` in the role. */
@@ -86079,7 +86110,7 @@ var RemoteConfigSchema = object({
86079
86110
  */
86080
86111
  defaultTransmitterId: number$1().int().nonnegative().nullable().default(null),
86081
86112
  /** Keyed by role. A role with no entry falls back to the native cap. */
86082
- bindings: record(string(), RemoteBindingSchema),
86113
+ bindings: record$1(string(), RemoteBindingSchema),
86083
86114
  customButtons: array(RemoteCustomButtonSchema).max(100),
86084
86115
  /**
86085
86116
  * The sources the operator DECLARED (planning#460). A custom button is a
@@ -87175,7 +87206,7 @@ var scriptRunnerCapability = {
87175
87206
  /** Optional variables map — passed through to the upstream
87176
87207
  * script. Provider rejects when the script doesn't declare
87177
87208
  * input fields (gated by `DeviceFeature.ScriptVariables`). */
87178
- variables: record(string(), unknown()).optional()
87209
+ variables: record$1(string(), unknown()).optional()
87179
87210
  }), _void(), {
87180
87211
  kind: "mutation",
87181
87212
  auth: "admin",
@@ -87586,7 +87617,8 @@ var ServerUpdateActionResultSchema = object({
87586
87617
  outcome: ServerUpdateOutcomeSchema.optional(),
87587
87618
  /**
87588
87619
  * Stable, greppable cause for `refused` / `failed` (the engine's
87589
- * `UpdateRefusalReason`, `staging-failed`, …). `null` on success.
87620
+ * `UpdateRefusalReason`, `staging-failed`, `timeout-stall`,
87621
+ * `timeout-ceiling`). `null` on success.
87590
87622
  */
87591
87623
  reason: string().nullable().optional(),
87592
87624
  /**
@@ -87708,6 +87740,14 @@ var smokeCapability = {
87708
87740
  }]
87709
87741
  }
87710
87742
  };
87743
+ var EmailImagePartSchema = object({
87744
+ ticket: PeerBytesTicketSchema,
87745
+ mime: string().min(1),
87746
+ name: string().min(1),
87747
+ contentId: string().min(1),
87748
+ placement: _enum(["inline", "attachment"]),
87749
+ deviceId: number$1().int().nonnegative().optional()
87750
+ });
87711
87751
  /**
87712
87752
  * `smtp-provider` — pluggable email delivery surface.
87713
87753
  *
@@ -87717,8 +87757,8 @@ var smokeCapability = {
87717
87757
  * ready provider OR target a specific addonId.
87718
87758
  *
87719
87759
  * The shape stays small on purpose — `sendEmail` is enough for the
87720
- * 90% case. Attachments / HTML templating / multi-part are room for
87721
- * future fields without breaking the existing call sites.
87760
+ * 90% case. An image is not a byte field on this method (D613): `images`
87761
+ * names `peerBytes` tickets the sender opens and folds into one MIME body.
87722
87762
  */
87723
87763
  var EmailAddressSchema = email();
87724
87764
  /**
@@ -87745,7 +87785,12 @@ var SendEmailInputSchema = object({
87745
87785
  * for clients that strip HTML — including most spam filters). */
87746
87786
  text: string(),
87747
87787
  /** Optional HTML body. Renders alongside `text` as multi-part. */
87748
- html: string().optional()
87788
+ html: string().optional(),
87789
+ /**
87790
+ * Images the caller already offered over `peerBytes`. Absent = a mail with
87791
+ * no image. The sender opens each ticket; one it cannot read is left out.
87792
+ */
87793
+ images: array(EmailImagePartSchema).max(3).optional()
87749
87794
  });
87750
87795
  var SendEmailResultSchema = object({
87751
87796
  messageId: string(),
@@ -88331,7 +88376,7 @@ var ReadChunkInputSchema = object({
88331
88376
  length: number$1()
88332
88377
  });
88333
88378
  var EndDownloadInputSchema = object({ downloadId: string() });
88334
- method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config: record(string(), unknown()) }), TestLocationResultSchema, { auth: "admin" }), method(object({
88379
+ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config: record$1(string(), unknown()) }), TestLocationResultSchema, { auth: "admin" }), method(object({
88335
88380
  location: StorageLocationSchema,
88336
88381
  relativePath: string()
88337
88382
  }), string(), { auth: "admin" }), method(object({
@@ -88408,7 +88453,7 @@ var CamStreamDescriptorSchema = object({
88408
88453
  /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
88409
88454
  profileHint: CamProfileSchema.optional(),
88410
88455
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
88411
- metadata: record(string(), unknown()).optional()
88456
+ metadata: record$1(string(), unknown()).optional()
88412
88457
  });
88413
88458
  /**
88414
88459
  * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
@@ -88775,34 +88820,46 @@ var switchCapability = {
88775
88820
  DeviceType.Light,
88776
88821
  DeviceType.Fan
88777
88822
  ],
88778
- methods: { setState: method(object({
88779
- deviceId: number$1(),
88780
- on: boolean()
88781
- }), _void(), {
88782
- kind: "mutation",
88783
- auth: "protected",
88784
- actions: [{
88785
- id: "switch.on",
88786
- label: t("Turn on", "Accendi"),
88787
- phrase: t("Turn on {device}", "Accendi {device}"),
88788
- icon: "power",
88789
- effect: {
88790
- field: "on",
88791
- value: true
88792
- },
88793
- args: { on: true }
88794
- }, {
88795
- id: "switch.off",
88796
- label: t("Turn off", "Spegni"),
88797
- phrase: t("Turn off {device}", "Spegni {device}"),
88798
- icon: "power-off",
88799
- effect: {
88800
- field: "on",
88801
- value: false
88802
- },
88803
- args: { on: false }
88804
- }]
88805
- }) },
88823
+ methods: {
88824
+ setState: method(object({
88825
+ deviceId: number$1(),
88826
+ on: boolean()
88827
+ }), _void(), {
88828
+ kind: "mutation",
88829
+ auth: "protected",
88830
+ actions: [{
88831
+ id: "switch.on",
88832
+ label: t("Turn on", "Accendi"),
88833
+ phrase: t("Turn on {device}", "Accendi {device}"),
88834
+ icon: "power",
88835
+ effect: {
88836
+ field: "on",
88837
+ value: true
88838
+ },
88839
+ args: { on: true }
88840
+ }, {
88841
+ id: "switch.off",
88842
+ label: t("Turn off", "Spegni"),
88843
+ phrase: t("Turn off {device}", "Spegni {device}"),
88844
+ icon: "power-off",
88845
+ effect: {
88846
+ field: "on",
88847
+ value: false
88848
+ },
88849
+ args: { on: false }
88850
+ }]
88851
+ }),
88852
+ toggle: optionalMethod(object({ deviceId: number$1() }), _void(), {
88853
+ kind: "mutation",
88854
+ auth: "protected",
88855
+ actions: [{
88856
+ id: "switch.toggle",
88857
+ label: t("Toggle", "Commuta"),
88858
+ phrase: t("Toggle {device}", "Commuta {device}"),
88859
+ icon: "toggle-right"
88860
+ }]
88861
+ })
88862
+ },
88806
88863
  events: { onStateChanged: {
88807
88864
  data: object({
88808
88865
  deviceId: number$1(),
@@ -89561,7 +89618,7 @@ var DebugWatchResultSchema = object({
89561
89618
  /** Channels a `rearm` found already lapsed: nothing was revived. */
89562
89619
  lapsed: array(string()).readonly()
89563
89620
  });
89564
- method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
89621
+ method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record$1(string(), unknown()), _null(), {
89565
89622
  kind: "mutation",
89566
89623
  auth: "admin"
89567
89624
  }), method(_void(), _void(), {
@@ -89856,7 +89913,7 @@ var AutomationTemplatePayloadSchema = object({
89856
89913
  version: literal(1),
89857
89914
  description: string().max(500).optional(),
89858
89915
  /** The automation body; a recipe once the inputs are written into it. */
89859
- body: record(string(), unknown()),
89916
+ body: record$1(string(), unknown()),
89860
89917
  inputs: array(TemplateInputSchema).max(30),
89861
89918
  bindings: array(TemplateBindingSchema).max(100)
89862
89919
  }).superRefine(bindingProblems);
@@ -89943,7 +90000,7 @@ method(object({ kind: TemplateKindSchema.optional() }), array(TemplateRecordSche
89943
90000
  });
89944
90001
  /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
89945
90002
  var ProfileSettingsSchemaBridge = unknown().nullable();
89946
- var ProfileSettingsBagSchema = record(string(), unknown());
90003
+ var ProfileSettingsBagSchema = record$1(string(), unknown());
89947
90004
  /**
89948
90005
  * A live terminal session hosted by the provider addon. Output and input do
89949
90006
  * NOT flow through the capability — they use the addon data plane
@@ -90215,7 +90272,7 @@ var TrainingProviderDescriptorSchema = object({
90215
90272
  * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
90216
90273
  * never plaintext. Same hydrate contract as settings forms (D789).
90217
90274
  */
90218
- formValues: record(string(), unknown()).optional()
90275
+ formValues: record$1(string(), unknown()).optional()
90219
90276
  });
90220
90277
  var ProviderJobStateSchema = _enum([
90221
90278
  "pending",
@@ -90372,7 +90429,7 @@ var TrainingBaseModelSchema = object({
90372
90429
  weights: string(),
90373
90430
  imgsz: number$1().int(),
90374
90431
  baselineOnnxUrl: string(),
90375
- baselineFloors: record(string(), number$1()),
90432
+ baselineFloors: record$1(string(), number$1()),
90376
90433
  /** The base the fleet runs most — the UI's default. */
90377
90434
  recommended: boolean()
90378
90435
  });
@@ -90403,7 +90460,7 @@ var TrainingSplitPlanSchema = object({
90403
90460
  /** Used when no camera is held out: the last N days of every camera. */
90404
90461
  holdoutLastDays: number$1().int().nonnegative(),
90405
90462
  /** Holdout subjects per class (camera holdout only; `null` = known only after the split). */
90406
- holdoutSupport: record(string(), number$1().int()).nullable(),
90463
+ holdoutSupport: record$1(string(), number$1().int()).nullable(),
90407
90464
  trainSubjects: number$1().int()
90408
90465
  });
90409
90466
  var TrainingRefusalReasonSchema = _enum([
@@ -90715,7 +90772,7 @@ var UserSummarySchema = object({
90715
90772
  username: string(),
90716
90773
  isAdmin: boolean().default(false),
90717
90774
  allowedProviders: union([array(string()), literal("*")]),
90718
- allowedDevices: record(string(), union([array(string()), literal("*")])),
90775
+ allowedDevices: record$1(string(), union([array(string()), literal("*")])),
90719
90776
  /** Capability rows, or ONE viewer row (D921) — see `UserScopeSchema`. */
90720
90777
  scopes: array(UserScopeSchema).default([]),
90721
90778
  /**
@@ -90733,14 +90790,14 @@ var CreateUserInputSchema = object({
90733
90790
  password: string().min(6),
90734
90791
  isAdmin: boolean().default(false),
90735
90792
  allowedProviders: union([array(string()), literal("*")]).optional(),
90736
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
90793
+ allowedDevices: record$1(string(), union([array(string()), literal("*")])).optional(),
90737
90794
  scopes: array(UserScopeSchema).optional()
90738
90795
  });
90739
90796
  var UpdateUserInputSchema = object({
90740
90797
  id: string(),
90741
90798
  isAdmin: boolean().optional(),
90742
90799
  allowedProviders: union([array(string()), literal("*")]).optional(),
90743
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
90800
+ allowedDevices: record$1(string(), union([array(string()), literal("*")])).optional(),
90744
90801
  scopes: array(UserScopeSchema).optional()
90745
90802
  });
90746
90803
  var OauthSessionSummarySchema = object({
@@ -90972,14 +91029,14 @@ var PasskeySummarySchema = object({
90972
91029
  method(object({
90973
91030
  userId: string(),
90974
91031
  username: string()
90975
- }), object({ optionsJSON: record(string(), unknown()) }), {
91032
+ }), object({ optionsJSON: record$1(string(), unknown()) }), {
90976
91033
  kind: "mutation",
90977
91034
  auth: "admin",
90978
91035
  access: "create"
90979
91036
  }), method(object({
90980
91037
  userId: string(),
90981
91038
  /** RegistrationResponseJSON from the browser. */
90982
- response: record(string(), unknown()),
91039
+ response: record$1(string(), unknown()),
90983
91040
  /** Operator-visible label (e.g. "MacBook Touch ID"). */
90984
91041
  label: string()
90985
91042
  }), object({
@@ -90989,7 +91046,7 @@ method(object({
90989
91046
  kind: "mutation",
90990
91047
  auth: "admin",
90991
91048
  access: "create"
90992
- }), method(object({ userId: string().optional() }), object({ optionsJSON: record(string(), unknown()) }), {
91049
+ }), method(object({ userId: string().optional() }), object({ optionsJSON: record$1(string(), unknown()) }), {
90993
91050
  kind: "mutation",
90994
91051
  access: "view",
90995
91052
  auth: "admin"
@@ -90997,18 +91054,18 @@ method(object({
90997
91054
  /** Required — the user the assertion belongs to (verified). */
90998
91055
  userId: string(),
90999
91056
  /** AuthenticationResponseJSON from the browser. */
91000
- response: record(string(), unknown())
91057
+ response: record$1(string(), unknown())
91001
91058
  }), object({ verified: boolean() }), {
91002
91059
  kind: "mutation",
91003
91060
  access: "view",
91004
91061
  auth: "admin"
91005
- }), method(object({}), object({ optionsJSON: record(string(), unknown()) }), {
91062
+ }), method(object({}), object({ optionsJSON: record$1(string(), unknown()) }), {
91006
91063
  kind: "mutation",
91007
91064
  access: "view",
91008
91065
  auth: "admin"
91009
91066
  }), method(object({
91010
91067
  /** AuthenticationResponseJSON from the browser. */
91011
- response: record(string(), unknown()) }), object({
91068
+ response: record$1(string(), unknown()) }), object({
91012
91069
  verified: boolean(),
91013
91070
  userId: string().nullable()
91014
91071
  }), {
@@ -91445,7 +91502,7 @@ var VectorMetricSchema = _enum([
91445
91502
  * Callers keep their rich records in their own store and put only the filterable
91446
91503
  * columns here (deviceId, timestamp, className, modelId, …).
91447
91504
  */
91448
- var VectorMetadataSchema = record(string(), union([
91505
+ var VectorMetadataSchema = record$1(string(), union([
91449
91506
  string(),
91450
91507
  number$1(),
91451
91508
  boolean()
@@ -91458,12 +91515,12 @@ var VectorMetadataSchema = record(string(), union([
91458
91515
  * caller will treat as matches.
91459
91516
  */
91460
91517
  var VectorFilterSchema = object({
91461
- equals: record(string(), union([
91518
+ equals: record$1(string(), union([
91462
91519
  string(),
91463
91520
  number$1(),
91464
91521
  boolean()
91465
91522
  ])).optional(),
91466
- between: record(string(), tuple([number$1(), number$1()])).optional()
91523
+ between: record$1(string(), tuple([number$1(), number$1()])).optional()
91467
91524
  });
91468
91525
  /** One vector plus its identity and filterable metadata. */
91469
91526
  var VectorItemSchema = object({
@@ -92492,7 +92549,7 @@ var PerScopeBreakdownSchema = object({
92492
92549
  /** Total tracked objects in this scope (frame / zone / unzoned). */
92493
92550
  totalObjects: number$1().int().nonnegative(),
92494
92551
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
92495
- byClass: record(string(), number$1().int().nonnegative()),
92552
+ byClass: record$1(string(), number$1().int().nonnegative()),
92496
92553
  /**
92497
92554
  * Of `totalObjects`, how many are STANDING — objects the census holds,
92498
92555
  * present but not going anywhere (a parked car, a bin, a statue).
@@ -106886,6 +106943,13 @@ Object.freeze({
106886
106943
  access: "create",
106887
106944
  role: "viewer"
106888
106945
  },
106946
+ "switch.toggle": {
106947
+ capName: "switch",
106948
+ capScope: "device",
106949
+ addonId: null,
106950
+ access: "create",
106951
+ role: "viewer"
106952
+ },
106889
106953
  "system.debugWatch": {
106890
106954
  capName: "system",
106891
106955
  capScope: "system",
@@ -110856,6 +110920,12 @@ Object.freeze({
110856
110920
  form: "single",
110857
110921
  optional: false
110858
110922
  }],
110923
+ "smtpProvider.sendEmail": [{
110924
+ name: "images",
110925
+ form: "object-array",
110926
+ optional: true,
110927
+ itemField: "deviceId"
110928
+ }],
110859
110929
  "snapshot.applyDeviceSettingsPatch": [{
110860
110930
  name: "deviceId",
110861
110931
  form: "single",
@@ -111022,6 +111092,11 @@ Object.freeze({
111022
111092
  form: "single",
111023
111093
  optional: false
111024
111094
  }],
111095
+ "switch.toggle": [{
111096
+ name: "deviceId",
111097
+ form: "single",
111098
+ optional: false
111099
+ }],
111025
111100
  "system.debugWatch": [{
111026
111101
  name: "deviceIds",
111027
111102
  form: "array",
@@ -111885,6 +111960,28 @@ var STATE_SUMMARY_VARS = [
111885
111960
  systemEventKinds: [...SUMMARISABLE],
111886
111961
  systemEventDeliveries: ["summary"]
111887
111962
  },
111963
+ {
111964
+ name: "offlineCount",
111965
+ label: "Summary: how many went offline",
111966
+ example: "2",
111967
+ group: "system",
111968
+ families: ["rule"],
111969
+ fields: [...RULE_TEXT],
111970
+ kinds: ["system"],
111971
+ systemEventKinds: [...SUMMARISABLE],
111972
+ systemEventDeliveries: ["summary"]
111973
+ },
111974
+ {
111975
+ name: "onlineCount",
111976
+ label: "Summary: how many came back",
111977
+ example: "5",
111978
+ group: "system",
111979
+ families: ["rule"],
111980
+ fields: [...RULE_TEXT],
111981
+ kinds: ["system"],
111982
+ systemEventKinds: [...SUMMARISABLE],
111983
+ systemEventDeliveries: ["summary"]
111984
+ },
111888
111985
  {
111889
111986
  name: "summaryCount",
111890
111987
  label: "Summary: items reported",
@@ -111926,6 +112023,7 @@ var STATE_SUMMARY_VARS = [
111926
112023
  ([...RULE_TEXT], [...COMBINED_ALARM]),
111927
112024
  ([...RULE_TEXT], [...COMBINED_ALARM]),
111928
112025
  [...RULE_TEXT],
112026
+ [...RULE_TEXT],
111929
112027
  ([...RULE_TEXT], [...COMBINED_ALARM]),
111930
112028
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
111931
112029
  [...RULE_TEXT],
@@ -112239,7 +112337,7 @@ new Set([
112239
112337
  "audio-silence"
112240
112338
  ]);
112241
112339
  AppPageLangSchema.options;
112242
- record(string().min(1), string());
112340
+ record$1(string().min(1), string());
112243
112341
  /**
112244
112342
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
112245
112343
  *
@@ -112469,7 +112567,7 @@ TimelapseRuleInputSchema.extend({
112469
112567
  * "never generated" would re-render and re-notify every camera of every rule
112470
112568
  * once, on the deploy that shipped the map.
112471
112569
  */
112472
- generatedByDevice: record(string(), number$1()).optional(),
112570
+ generatedByDevice: record$1(string(), number$1()).optional(),
112473
112571
  /** userId of the caller who created the rule (server-stamped). */
112474
112572
  createdBy: string(),
112475
112573
  createdAt: number$1(),
@@ -112925,7 +113023,7 @@ object({
112925
113023
  supportedController: string().optional(),
112926
113024
  commandsEncoding: string(),
112927
113025
  delay: number$1().nonnegative().optional(),
112928
- commands: record(string(), unknown())
113026
+ commands: record$1(string(), unknown())
112929
113027
  });
112930
113028
  //#endregion
112931
113029
  //#region src/homematic-reconciler.ts
@@ -113325,7 +113423,7 @@ function requireConfirmed(confirmed) {
113325
113423
  //#endregion
113326
113424
  //#region src/ccu/hm-channel-names.ts
113327
113425
  /** The device part of a `DEVICE:index` channel address. */
113328
- function deviceAddressOf$2(channelAddress) {
113426
+ function deviceAddressOf$3(channelAddress) {
113329
113427
  const idx = channelAddress.lastIndexOf(":");
113330
113428
  return idx === -1 ? channelAddress : channelAddress.slice(0, idx);
113331
113429
  }
@@ -113337,7 +113435,7 @@ function deviceAddressOf$2(channelAddress) {
113337
113435
  function channelNameLookup(devices) {
113338
113436
  const byAddress = new Map(devices.map((device) => [device.address, device]));
113339
113437
  return (channelAddress) => {
113340
- const device = byAddress.get(deviceAddressOf$2(channelAddress));
113438
+ const device = byAddress.get(deviceAddressOf$3(channelAddress));
113341
113439
  if (device === void 0) return {
113342
113440
  channelName: null,
113343
113441
  deviceName: null,
@@ -113364,7 +113462,39 @@ function directLinksOfKey(keyAddress, links, names) {
113364
113462
  };
113365
113463
  });
113366
113464
  }
113367
- async function keyChannelRow(deps, integrationId, facade, names, channel) {
113465
+ /** A HmIP device sends presses only while a CCU program uses the key (a central link is not enough). */
113466
+ function isHmipDevice(device) {
113467
+ return /^hmip/i.test(device.type);
113468
+ }
113469
+ /** The one CCU program that carries a device's key events. It is found by this name; nothing else is stored. */
113470
+ function keyEventProgramName(device) {
113471
+ return `CamStack: ${hmName(device.name) ?? device.address} events`;
113472
+ }
113473
+ function deviceAddressOf$2(channelAddress) {
113474
+ const colon = channelAddress.lastIndexOf(":");
113475
+ return colon === -1 ? channelAddress : channelAddress.slice(0, colon);
113476
+ }
113477
+ /**
113478
+ * The key channels the device's program listens to: an empty set when there is
113479
+ * no program, `null` when the read failed (the row then says `unknown`).
113480
+ */
113481
+ async function programChannelsOf(deps, integrationId, facade, device, deviceId) {
113482
+ try {
113483
+ const program = await facade.getKeyEventProgram(keyEventProgramName(device));
113484
+ return new Set(program?.channelAddresses ?? []);
113485
+ } catch (err) {
113486
+ deps.logger.warn("Homematic key event program could not be read", {
113487
+ ...deviceId !== void 0 ? { tags: { deviceId } } : {},
113488
+ meta: {
113489
+ integrationId,
113490
+ address: device.address,
113491
+ error: errorText(err)
113492
+ }
113493
+ });
113494
+ return null;
113495
+ }
113496
+ }
113497
+ async function keyChannelRow(deps, integrationId, facade, names, channel, programChannels) {
113368
113498
  const row = {
113369
113499
  address: channel.address,
113370
113500
  index: channelIndexFromAddress(channel.address) ?? String(channel.index),
@@ -113372,9 +113502,15 @@ async function keyChannelRow(deps, integrationId, facade, names, channel) {
113372
113502
  };
113373
113503
  try {
113374
113504
  const state = await facade.getChannelLinkState(channel.address);
113505
+ if (programChannels === null) return {
113506
+ ...row,
113507
+ central: "unknown",
113508
+ links: []
113509
+ };
113510
+ const covered = programChannels === void 0 || programChannels.has(channel.address);
113375
113511
  return {
113376
113512
  ...row,
113377
- central: state.central ? "on" : "off",
113513
+ central: state.central && covered ? "on" : "off",
113378
113514
  links: directLinksOfKey(channel.address, state.links, names)
113379
113515
  };
113380
113516
  } catch (err) {
@@ -113398,7 +113534,8 @@ async function keyChannelsForDevice(deps, integrationId, device, adopted) {
113398
113534
  const facade = deps.facade(integrationId);
113399
113535
  if (facade === null) return [];
113400
113536
  const names = channelNameLookup(facade.devices());
113401
- return Promise.all(keys.map((channel) => keyChannelRow(deps, integrationId, facade, names, channel)));
113537
+ const programChannels = isHmipDevice(device) ? await programChannelsOf(deps, integrationId, facade, device, (await deps.adoptedAddresses(integrationId)).get(device.address)) : void 0;
113538
+ return Promise.all(keys.map((channel) => keyChannelRow(deps, integrationId, facade, names, channel, programChannels)));
113402
113539
  }
113403
113540
  function withKeyChannels(row, keyChannels) {
113404
113541
  return {
@@ -113406,27 +113543,76 @@ function withKeyChannels(row, keyChannels) {
113406
113543
  keyChannels: [...keyChannels]
113407
113544
  };
113408
113545
  }
113409
- /** Enable or disable the central link of one key channel. Direct links stay. */
113546
+ /**
113547
+ * Enable or disable the events of one key channel. Direct links stay. A HmIP
113548
+ * key also needs a CCU program that uses it (one per device, found by name):
113549
+ * enabling puts the channel in it, disabling takes it out and deletes the
113550
+ * program when it was the last key.
113551
+ */
113410
113552
  function buildButtonEventHandlers(deps) {
113411
113553
  return { setButtonEvents: async (input) => {
113412
113554
  requireConfirmed(input.confirmed);
113413
113555
  const facade = requireFacade(deps, input.integrationId);
113556
+ const deviceAddress = deviceAddressOf$2(input.address);
113557
+ const device = facade.devices().find((candidate) => candidate.address === deviceAddress);
113558
+ const deviceId = (await deps.adoptedAddresses(input.integrationId)).get(deviceAddress);
113559
+ const tags = deviceId !== void 0 ? { tags: { deviceId } } : {};
113414
113560
  try {
113415
113561
  if (input.enabled) await facade.createCentralLink(input.address);
113416
113562
  else await facade.removeCentralLink(input.address);
113563
+ if (device !== void 0 && isHmipDevice(device)) await syncKeyEventProgram(deps, facade, device, input.address, input.enabled, tags);
113417
113564
  } catch (err) {
113418
- deps.logger.warn("Homematic central link change failed", { meta: {
113419
- integrationId: input.integrationId,
113420
- address: input.address,
113421
- enabled: input.enabled,
113422
- error: errorText(err)
113423
- } });
113565
+ deps.logger.warn("Homematic button events change failed", {
113566
+ ...tags,
113567
+ meta: {
113568
+ integrationId: input.integrationId,
113569
+ address: input.address,
113570
+ enabled: input.enabled,
113571
+ error: errorText(err)
113572
+ }
113573
+ });
113424
113574
  throw err;
113425
113575
  }
113576
+ deps.logger.info(`Homematic: button events ${input.enabled ? "enabled" : "disabled"}`, {
113577
+ ...tags,
113578
+ meta: {
113579
+ integrationId: input.integrationId,
113580
+ address: input.address
113581
+ }
113582
+ });
113426
113583
  deps.ccuChanged(input.integrationId);
113427
113584
  return { ok: true };
113428
113585
  } };
113429
113586
  }
113587
+ /** Put the channel in the device's key event program, or take it out (deleting an emptied program). */
113588
+ async function syncKeyEventProgram(deps, facade, device, channelAddress, enabled, tags) {
113589
+ const name = keyEventProgramName(device);
113590
+ const current = (await facade.getKeyEventProgram(name))?.channelAddresses ?? [];
113591
+ const wanted = enabled ? [...new Set([...current, channelAddress])] : current.filter((address) => address !== channelAddress);
113592
+ if (wanted.length === 0) {
113593
+ const { removed } = await facade.removeKeyEventProgram(name);
113594
+ deps.logger.info("Homematic: key event program removed", {
113595
+ ...tags,
113596
+ meta: {
113597
+ program: name,
113598
+ removed
113599
+ }
113600
+ });
113601
+ return;
113602
+ }
113603
+ const { programId, created } = await facade.ensureKeyEventProgram({
113604
+ name,
113605
+ channelAddresses: wanted
113606
+ });
113607
+ deps.logger.info(`Homematic: key event program ${created ? "created" : "updated"}`, {
113608
+ ...tags,
113609
+ meta: {
113610
+ program: name,
113611
+ programId,
113612
+ channels: wanted
113613
+ }
113614
+ });
113615
+ }
113430
113616
  //#endregion
113431
113617
  //#region src/ccu/ccu-device-rows.ts
113432
113618
  /** `RSSI_*` reports this when the device has no signal reading. */
@@ -113475,6 +113661,7 @@ function toCcuDeviceRow(device) {
113475
113661
  unreach: asBool$1(readParam(maintenance, ["UNREACH", "STICKY_UNREACH"])),
113476
113662
  configPending: asBool$1(readParam(maintenance, ["CONFIG_PENDING"])),
113477
113663
  sabotage: asBool$1(readParam(maintenance, ["SABOTAGE", "ERROR_SABOTAGE"])),
113664
+ deviceId: null,
113478
113665
  keyChannels: [],
113479
113666
  channels: device.channels.filter((channel) => channel.index !== 0).map((channel) => ({
113480
113667
  address: channel.address,
@@ -113493,7 +113680,10 @@ function buildCcuDevicesHandlers(deps) {
113493
113680
  const adopted = await deps.adoptedAddresses(input.integrationId);
113494
113681
  return { devices: await Promise.all(facade.devices().map(async (device) => {
113495
113682
  const links = await keyChannelsForDevice(deps, input.integrationId, device, adopted);
113496
- return withKeyChannels(toCcuDeviceRow(device), links);
113683
+ return {
113684
+ ...withKeyChannels(toCcuDeviceRow(device), links),
113685
+ deviceId: adopted.get(device.address) ?? null
113686
+ };
113497
113687
  })) };
113498
113688
  } };
113499
113689
  }
@@ -113696,6 +113886,11 @@ var CcuDevicesResultSchema = object({ devices: array(object({
113696
113886
  configPending: boolean().nullable(),
113697
113887
  sabotage: boolean().nullable(),
113698
113888
  /**
113889
+ * CamStack device id when this CCU device is adopted as a container.
113890
+ * `null` when it is not adopted — the page then has nowhere to link.
113891
+ */
113892
+ deviceId: number$1().int().nullable().default(null),
113893
+ /**
113699
113894
  * Key channels of an ADOPTED device, and whether the CCU sends their presses
113700
113895
  * (a central link). Empty for a device that is not adopted or has no keys.
113701
113896
  */
@@ -113823,7 +114018,7 @@ var DeviceConfigSchema = object({ channels: array(object({
113823
114018
  var DeviceRefSchema = IntegrationRefSchema.extend({ address: string().min(1) });
113824
114019
  var SetChannelConfigInputSchema = IntegrationRefSchema.extend({
113825
114020
  channel: string().min(1),
113826
- values: record(string(), ConfigValueSchema),
114021
+ values: record$1(string(), ConfigValueSchema),
113827
114022
  confirmed: ConfirmedSchema
113828
114023
  });
113829
114024
  var LinkPressActionSchema = _enum([
@@ -132294,9 +132489,9 @@ function parseParams(paramsChildren) {
132294
132489
  function parseFault(faultChildren) {
132295
132490
  const valueNodes = childrenOf(faultChildren, "value");
132296
132491
  const struct = valueNodes === void 0 ? {} : parseValue(valueNodes);
132297
- const record = typeof struct === "object" && struct !== null && !Array.isArray(struct) ? struct : {};
132298
- const rawCode = record["faultCode"];
132299
- const rawString = record["faultString"];
132492
+ const record2 = typeof struct === "object" && struct !== null && !Array.isArray(struct) ? struct : {};
132493
+ const rawCode = record2["faultCode"];
132494
+ const rawString = record2["faultString"];
132300
132495
  return {
132301
132496
  faultCode: typeof rawCode === "number" ? rawCode : Number(rawCode),
132302
132497
  faultString: typeof rawString === "string" ? rawString : ""
@@ -133583,21 +133778,207 @@ var CcuTopology = class {
133583
133778
  throw new ValidationError(answer["reason"] === "channel" ? `Unknown channel "${channelAddress2}".` : `Unknown room "${id}".`);
133584
133779
  }
133585
133780
  };
133781
+ var DATAPOINT_NAME = /^[0-9A-Za-z_-]+\.[0-9A-Za-z_-]+:\d+\.PRESS_(?:SHORT|LONG)$/;
133782
+ function checkedDatapoints(datapoints) {
133783
+ if (datapoints.length === 0) throw new ValidationError("A key event program needs at least one data point.");
133784
+ for (const name of datapoints) if (!DATAPOINT_NAME.test(name)) throw new ValidationError(`Invalid key data point "${name}".`);
133785
+ return datapoints;
133786
+ }
133787
+ var FIND_PROGRAM = `string sName = "##name##";
133788
+ object oPrograms = dom.GetObject(ID_PROGRAMS);
133789
+ object oProg;
133790
+ string sPid;
133791
+ foreach(sPid, oPrograms.EnumUsedIDs()) {
133792
+ object oCand = dom.GetObject(sPid);
133793
+ if (oCand) {
133794
+ if (oCand.Name() == sName) {
133795
+ oProg = oCand;
133796
+ }
133797
+ }
133798
+ }`;
133799
+ function buildEnsureKeyEventProgram(datapoints) {
133800
+ const dps = checkedDatapoints(datapoints);
133801
+ return `! nodehomematic:ensureKeyEventProgram
133802
+ ${FIND_PROGRAM}
133803
+ string sMissing = "";
133804
+ string sMissSep = "";
133805
+ ${dps.map((dp, i) => `object oDp${i} = dom.GetObject("${dp}");
133806
+ if (!oDp${i}) {
133807
+ sMissing = sMissing # sMissSep # "\\"${dp}\\"";
133808
+ sMissSep = ",";
133809
+ }`).join("\n")}
133810
+ if (sMissing != "") {
133811
+ Write("{\\"error\\":\\"datapoint\\",\\"missing\\":[" # sMissing # "]}");
133812
+ } else {
133813
+ boolean bCreated = false;
133814
+ if (!oProg) {
133815
+ oProg = dom.CreateObject(OT_PROGRAM);
133816
+ oProg.Name(sName);
133817
+ oPrograms.Add(oProg.ID());
133818
+ bCreated = true;
133819
+ }
133820
+ object oRule = oProg.Rule();
133821
+ oRule.RuleOperatorType(2);
133822
+ integer iCnt = oRule.RuleConditions().Count();
133823
+ while (iCnt > 0) {
133824
+ object oOld = oRule.RuleCondition(0);
133825
+ oRule.RuleDelCondition(oOld.ID());
133826
+ iCnt = iCnt - 1;
133827
+ }
133828
+ object oCnd = oRule.RuleAddCondition();
133829
+ oCnd.CndOperatorType(2);
133830
+ object oSc;
133831
+ ${dps.map((_dp, i) => `oSc = oCnd.CndAddSingle();
133832
+ oSc.OperatorType(1);
133833
+ oSc.ConditionType(1);
133834
+ oSc.ConditionType2(13);
133835
+ oSc.LeftValType(ivtObjectId);
133836
+ oSc.LeftVal(oDp${i}.ID());
133837
+ oSc.ConditionChannel(oDp${i}.Channel());`).join("\n")}
133838
+ oProg.Internal(false);
133839
+ oProg.Active(true);
133840
+ dom.RTUpdate(0);
133841
+ Write("{\\"programId\\":\\"");
133842
+ Write(oProg.ID());
133843
+ Write("\\",\\"created\\":");
133844
+ if (bCreated) {
133845
+ Write("true");
133846
+ } else {
133847
+ Write("false");
133848
+ }
133849
+ Write("}");
133850
+ }`;
133851
+ }
133852
+ var REMOVE_KEY_EVENT_PROGRAM = `! nodehomematic:removeKeyEventProgram
133853
+ ${FIND_PROGRAM}
133854
+ if (oProg) {
133855
+ dom.DeleteObject(oProg.ID());
133856
+ Write("{\\"removed\\":true}");
133857
+ } else {
133858
+ Write("{\\"removed\\":false}");
133859
+ }`;
133860
+ var GET_KEY_EVENT_PROGRAM = `! nodehomematic:getKeyEventProgram
133861
+ ${FIND_PROGRAM}
133862
+ if (!oProg) {
133863
+ Write("{\\"found\\":false}");
133864
+ } else {
133865
+ Write("{\\"found\\":true,\\"programId\\":\\"");
133866
+ Write(oProg.ID());
133867
+ Write("\\",\\"datapoints\\":[");
133868
+ object oCnd = oProg.Rule().RuleCondition(0);
133869
+ if (oCnd) {
133870
+ integer iN = oCnd.CndSingleCount();
133871
+ integer iI = 0;
133872
+ string sSep = "";
133873
+ while (iI < iN) {
133874
+ object oSc = oCnd.CndSingleCondition(iI);
133875
+ object oDp = dom.GetObject(oSc.LeftVal());
133876
+ if (oDp) {
133877
+ Write(sSep);
133878
+ Write("\\"");
133879
+ Write(oDp.Name());
133880
+ Write("\\"");
133881
+ sSep = ",";
133882
+ }
133883
+ iI = iI + 1;
133884
+ }
133885
+ }
133886
+ Write("]}");
133887
+ }`;
133888
+ var CHANNEL_ADDRESS2 = /^[0-9A-Za-z_-]+:\d+$/;
133889
+ var CONTROL_CHARS3 = /[\u0000-\u001F\u007F]/;
133890
+ var MAX_NAME2 = 128;
133891
+ var DEFAULT_PARAMETERS = ["PRESS_SHORT", "PRESS_LONG"];
133892
+ function isRecord2(value) {
133893
+ return value !== null && typeof value === "object" && !Array.isArray(value);
133894
+ }
133895
+ function record(raw, label) {
133896
+ if (!isRecord2(raw)) throw new ClientError(`${label}: unexpected answer from the CCU.`);
133897
+ return raw;
133898
+ }
133899
+ function validName2(raw) {
133900
+ const name = raw.trim();
133901
+ if (name === "" || name.length > MAX_NAME2 || CONTROL_CHARS3.test(name)) throw new ValidationError(`Program name must be 1..${MAX_NAME2} characters without control characters.`);
133902
+ return name;
133903
+ }
133904
+ function interfaceNameOf(interfaceId2) {
133905
+ const match = Object.values(Interface).find((name) => interfaceId2.endsWith(`-${name}`));
133906
+ if (match === void 0) throw new ValidationError(`Cannot derive the CCU interface from "${interfaceId2}".`);
133907
+ return match;
133908
+ }
133909
+ var CcuKeyPrograms = class {
133910
+ #rega;
133911
+ constructor(rega) {
133912
+ this.#rega = rega;
133913
+ }
133914
+ /**
133915
+ * Create or rewrite the program so its conditions are exactly
133916
+ * `channelAddresses` x `parameters`. `interfaceName` is the CCU interface the
133917
+ * channels live on (`HmIP-RF`).
133918
+ */
133919
+ async ensure(interfaceName, input) {
133920
+ const name = validName2(input.name);
133921
+ const parameters = input.parameters ?? DEFAULT_PARAMETERS;
133922
+ if (parameters.length === 0) throw new ValidationError("At least one key parameter is needed.");
133923
+ const datapoints = input.channelAddresses.flatMap((address) => {
133924
+ if (!CHANNEL_ADDRESS2.test(address)) throw new ValidationError(`Invalid channel address "${address}".`);
133925
+ return parameters.map((param) => `${interfaceName}.${address}.${param}`);
133926
+ });
133927
+ const label = "ReGa.runScript(ensureKeyEventProgram)";
133928
+ const answer = record(await this.#rega(label, buildEnsureKeyEventProgram(datapoints), { name }), label);
133929
+ if (answer["error"] === "datapoint") throw new ValidationError(`The CCU has no such key data point: ${Array.isArray(answer["missing"]) ? answer["missing"].join(", ") : "?"}.`);
133930
+ const programId = answer["programId"];
133931
+ const created = answer["created"];
133932
+ if (typeof programId !== "string" || programId === "" || typeof created !== "boolean") throw new ClientError(`${label}: the CCU did not return the program.`);
133933
+ return {
133934
+ programId,
133935
+ created
133936
+ };
133937
+ }
133938
+ /** Delete the program by name; `removed: false` when it does not exist. */
133939
+ async remove(rawName) {
133940
+ const name = validName2(rawName);
133941
+ const label = "ReGa.runScript(removeKeyEventProgram)";
133942
+ const answer = record(await this.#rega(label, REMOVE_KEY_EVENT_PROGRAM, { name }), label);
133943
+ if (typeof answer["removed"] !== "boolean") throw new ClientError(`${label}: unexpected answer from the CCU.`);
133944
+ return { removed: answer["removed"] };
133945
+ }
133946
+ /** The program and the channels it listens to, or `null` when absent. */
133947
+ async get(rawName) {
133948
+ const name = validName2(rawName);
133949
+ const label = "ReGa.runScript(getKeyEventProgram)";
133950
+ const answer = record(await this.#rega(label, GET_KEY_EVENT_PROGRAM, { name }), label);
133951
+ if (answer["found"] !== true) return null;
133952
+ const programId = answer["programId"];
133953
+ if (typeof programId !== "string" || programId === "") throw new ClientError(`${label}: the CCU did not return the program id.`);
133954
+ const datapoints = Array.isArray(answer["datapoints"]) ? answer["datapoints"] : [];
133955
+ const channels = /* @__PURE__ */ new Set();
133956
+ for (const dp of datapoints) {
133957
+ if (typeof dp !== "string") continue;
133958
+ const match = /\.([0-9A-Za-z_-]+:\d+)\.PRESS_(?:SHORT|LONG)$/.exec(dp);
133959
+ if (match?.[1] !== void 0) channels.add(match[1]);
133960
+ }
133961
+ return {
133962
+ programId,
133963
+ channelAddresses: [...channels]
133964
+ };
133965
+ }
133966
+ };
133586
133967
  var GROUP_CREATE_PATH = "/pages/jpages/group/create";
133587
133968
  var GROUP_SAVE_PATH = "/pages/jpages/group/save";
133588
133969
  var GROUP_DELETE_PATH = "/pages/jpages/group/delete";
133589
133970
  var DRAFT_GROUP_ID = /self\.groupId\s*=\s*(\d+)/;
133590
133971
  var KNOWN_GROUP_TYPES = ["hmip.heating.group", "HomeMatic.heating"];
133591
- var CHANNEL_ADDRESS2 = /^[0-9A-Za-z_-]+:\d+$/;
133972
+ var CHANNEL_ADDRESS3 = /^[0-9A-Za-z_-]+:\d+$/;
133592
133973
  var MAX_GROUP_NAME = 64;
133593
133974
  var DEFAULT_INSTALL_SECONDS = 60;
133594
133975
  var MAX_INSTALL_SECONDS = 3600;
133595
133976
  var SERVICE_MESSAGE_ID = /^\d+$/;
133596
- function isRecord2(value) {
133977
+ function isRecord3(value) {
133597
133978
  return value !== null && typeof value === "object" && !Array.isArray(value);
133598
133979
  }
133599
133980
  function asRecordArray(value) {
133600
- return Array.isArray(value) ? value.filter(isRecord2) : [];
133981
+ return Array.isArray(value) ? value.filter(isRecord3) : [];
133601
133982
  }
133602
133983
  function strOrNull(value) {
133603
133984
  if (typeof value === "string") return value === "" ? null : value;
@@ -133739,7 +134120,7 @@ var CcuManagement = class {
133739
134120
  async acknowledgeServiceMessage(id) {
133740
134121
  if (!SERVICE_MESSAGE_ID.test(id)) throw new ValidationError(`Invalid service message id "${id}".`);
133741
134122
  const raw = await this.rega("ReGa.runScript(acknowledgeServiceMessage)", ACKNOWLEDGE_SERVICE_MESSAGE, { id });
133742
- if (!isRecord2(raw) || raw["ok"] !== true) throw new ValidationError(`Unknown service message "${id}".`);
134123
+ if (!isRecord3(raw) || raw["ok"] !== true) throw new ValidationError(`Unknown service message "${id}".`);
133743
134124
  }
133744
134125
  /** Version, product, serial and hostname; each `null` when unanswered. */
133745
134126
  async ccuInfo() {
@@ -133749,8 +134130,8 @@ var CcuManagement = class {
133749
134130
  this.rega("ReGa.runScript(ccuPlatform)", GET_CCU_PLATFORM)
133750
134131
  ]);
133751
134132
  if (version.status === "rejected" && serial.status === "rejected" && platform.status === "rejected") throw version.reason instanceof CcuManagementError ? version.reason : new CcuManagementError(JsonRpcMethod.CCU_GET_VERSION, version.reason);
133752
- const release = platform.status === "fulfilled" && isRecord2(platform.value) ? parseKeyValueLines(decodeRegaName(releaseText(platform.value))) : /* @__PURE__ */ new Map();
133753
- const hostname = platform.status === "fulfilled" && isRecord2(platform.value) ? decodedOrNull(platform.value["host"]) : null;
134133
+ const release = platform.status === "fulfilled" && isRecord3(platform.value) ? parseKeyValueLines(decodeRegaName(releaseText(platform.value))) : /* @__PURE__ */ new Map();
134134
+ const hostname = platform.status === "fulfilled" && isRecord3(platform.value) ? decodedOrNull(platform.value["host"]) : null;
133754
134135
  const product = strOrNull(release.get("PRODUCT"));
133755
134136
  return {
133756
134137
  version: version.status === "fulfilled" ? strOrNull(version.value) : null,
@@ -133776,7 +134157,7 @@ var CcuManagement = class {
133776
134157
  } catch (err) {
133777
134158
  throw new CcuManagementError(JsonRpcMethod.CCU_GET_HEATING_GROUP_LIST, err);
133778
134159
  }
133779
- if (!isRecord2(parsed)) return [];
134160
+ if (!isRecord3(parsed)) return [];
133780
134161
  return Object.keys(parsed).sort().flatMap((key) => asRecordArray(parsed[key])).flatMap((entry) => {
133781
134162
  const group = toGroup(entry);
133782
134163
  return group === null ? [] : [group];
@@ -133898,6 +134279,10 @@ var CcuManagement = class {
133898
134279
  topology() {
133899
134280
  return new CcuTopology((label, script, params) => this.rega(label, script, params));
133900
134281
  }
134282
+ /** The key-event program service (HmIP key presses), on this service's session. */
134283
+ keyPrograms() {
134284
+ return new CcuKeyPrograms((label, script, params) => this.rega(label, script, params));
134285
+ }
133901
134286
  requireClient(interfaceName) {
133902
134287
  const iface = toInterface(interfaceName);
133903
134288
  const client = this.interfaceClient(iface);
@@ -133976,8 +134361,8 @@ var DEVICE_ADDRESS_SUFFIX = /\b(INT\d{7})\s*$/;
133976
134361
  function toGroup(entry) {
133977
134362
  const id = numOrNull(entry["id"]);
133978
134363
  if (id === null) return null;
133979
- const props = isRecord2(entry["groupProperties"]) ? entry["groupProperties"] : {};
133980
- const groupType = isRecord2(entry["groupType"]) ? entry["groupType"] : {};
134364
+ const props = isRecord3(entry["groupProperties"]) ? entry["groupProperties"] : {};
134365
+ const groupType = isRecord3(entry["groupType"]) ? entry["groupType"] : {};
133981
134366
  const deviceName = strOrNull(props["GROUP_DEVICE_NAME"]);
133982
134367
  const deviceMatch = deviceName === null ? null : DEVICE_ADDRESS_SUFFIX.exec(deviceName);
133983
134368
  const members = asRecordArray(entry["groupMembers"]).flatMap((m) => {
@@ -133985,7 +134370,7 @@ function toGroup(entry) {
133985
134370
  if (address === null) return [];
133986
134371
  return [{
133987
134372
  address,
133988
- type: (isRecord2(m["memberType"]) ? strOrNull(m["memberType"]["id"]) : null) ?? ""
134373
+ type: (isRecord3(m["memberType"]) ? strOrNull(m["memberType"]["id"]) : null) ?? ""
133989
134374
  }];
133990
134375
  });
133991
134376
  return {
@@ -134007,7 +134392,7 @@ function validateGroupName(raw) {
134007
134392
  return name;
134008
134393
  }
134009
134394
  function validateMembers(members) {
134010
- for (const address of members) if (!CHANNEL_ADDRESS2.test(address)) throw new ValidationError(`Invalid member channel address "${address}".`);
134395
+ for (const address of members) if (!CHANNEL_ADDRESS3.test(address)) throw new ValidationError(`Invalid member channel address "${address}".`);
134011
134396
  return [...new Set(members)];
134012
134397
  }
134013
134398
  function checkWebUiResponse(path, text) {
@@ -134017,8 +134402,8 @@ function checkWebUiResponse(path, text) {
134017
134402
  } catch {
134018
134403
  throw new CcuManagementError(path, new ClientError("response was not JSON"));
134019
134404
  }
134020
- if (!isRecord2(parsed) || parsed["isSuccessful"] !== true) {
134021
- const code = isRecord2(parsed) ? strOrNull(parsed["errorCode"]) : null;
134405
+ if (!isRecord3(parsed) || parsed["isSuccessful"] !== true) {
134406
+ const code = isRecord3(parsed) ? strOrNull(parsed["errorCode"]) : null;
134022
134407
  throw new CcuManagementError(path, new ClientError(code === "42" ? "session expired (errorCode 42)" : `refused (errorCode ${code ?? "none"})`));
134023
134408
  }
134024
134409
  const content = parsed["content"];
@@ -134401,8 +134786,8 @@ var DeviceRegistry = class {
134401
134786
  function stableStringify2(value) {
134402
134787
  if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
134403
134788
  if (Array.isArray(value)) return `[${value.map(stableStringify2).join(",")}]`;
134404
- const record = value;
134405
- return `{${Object.keys(record).sort().map((key) => `${JSON.stringify(key)}:${stableStringify2(record[key])}`).join(",")}}`;
134789
+ const record2 = value;
134790
+ return `{${Object.keys(record2).sort().map((key) => `${JSON.stringify(key)}:${stableStringify2(record2[key])}`).join(",")}}`;
134406
134791
  }
134407
134792
  var DescriptionCacheBase = class {
134408
134793
  constructor(backend, fileName) {
@@ -134523,8 +134908,8 @@ var DeviceDescriptionCache = class _DeviceDescriptionCache extends DescriptionCa
134523
134908
  }
134524
134909
  fromData(data) {
134525
134910
  const next = /* @__PURE__ */ new Map();
134526
- const record = data ?? {};
134527
- for (const [iface, addresses] of Object.entries(record)) {
134911
+ const record2 = data ?? {};
134912
+ for (const [iface, addresses] of Object.entries(record2)) {
134528
134913
  const forIface = /* @__PURE__ */ new Map();
134529
134914
  for (const [address, desc] of Object.entries(addresses)) forIface.set(address, desc);
134530
134915
  next.set(iface, forIface);
@@ -134603,8 +134988,8 @@ var ParamsetDescriptionCache = class _ParamsetDescriptionCache extends Descripti
134603
134988
  }
134604
134989
  fromData(data) {
134605
134990
  const next = /* @__PURE__ */ new Map();
134606
- const record = data ?? {};
134607
- for (const [iface, channels] of Object.entries(record)) {
134991
+ const record2 = data ?? {};
134992
+ for (const [iface, channels] of Object.entries(record2)) {
134608
134993
  const forIface = /* @__PURE__ */ new Map();
134609
134994
  for (const [channelAddress2, paramsets] of Object.entries(channels)) {
134610
134995
  const forChannel = /* @__PURE__ */ new Map();
@@ -134872,12 +135257,12 @@ async function safePost(jsonClient, method, opts) {
134872
135257
  }
134873
135258
  }
134874
135259
  function parseDeviceDetail(item, nameByAddress, channelIdToAddress) {
134875
- const record = asRecord(item);
134876
- if (record === void 0) return;
134877
- const address = asString(record.address);
134878
- const name = asString(record.name);
135260
+ const record2 = asRecord(item);
135261
+ if (record2 === void 0) return;
135262
+ const address = asString(record2.address);
135263
+ const name = asString(record2.name);
134879
135264
  if (address !== void 0 && name !== void 0) nameByAddress.set(address, name);
134880
- for (const channel of asArray(record.channels)) {
135265
+ for (const channel of asArray(record2.channels)) {
134881
135266
  const ch = asRecord(channel);
134882
135267
  if (ch === void 0) continue;
134883
135268
  const chAddress = asString(ch.address);
@@ -134898,11 +135283,11 @@ function addGroupName(into, address, name) {
134898
135283
  else if (!existing.includes(name)) existing.push(name);
134899
135284
  }
134900
135285
  function parseGroup(item, channelIdToAddress, into) {
134901
- const record = asRecord(item);
134902
- if (record === void 0) return;
134903
- const name = asString(record.name);
135286
+ const record2 = asRecord(item);
135287
+ if (record2 === void 0) return;
135288
+ const name = asString(record2.name);
134904
135289
  if (name === void 0) return;
134905
- const idMembers = asArray(record.channelIds);
135290
+ const idMembers = asArray(record2.channelIds);
134906
135291
  for (const member of idMembers) {
134907
135292
  const channelId = asString(member);
134908
135293
  if (channelId === void 0) continue;
@@ -134911,7 +135296,7 @@ function parseGroup(item, channelIdToAddress, into) {
134911
135296
  addGroupName(into, channelAddress2, name);
134912
135297
  addGroupName(into, deviceAddressOf(channelAddress2), name);
134913
135298
  }
134914
- const addressMembers = firstArray(record.channelAddresses, record.members);
135299
+ const addressMembers = firstArray(record2.channelAddresses, record2.members);
134915
135300
  for (const member of addressMembers) {
134916
135301
  const channelAddress2 = asString(member);
134917
135302
  if (channelAddress2 === void 0) continue;
@@ -134971,7 +135356,7 @@ function parseSysVarValue(type, raw) {
134971
135356
  }
134972
135357
  }
134973
135358
  var WRITABLE_MARKER = "HAHM";
134974
- function isRecord3(value) {
135359
+ function isRecord4(value) {
134975
135360
  return value !== null && typeof value === "object";
134976
135361
  }
134977
135362
  function asString2(value) {
@@ -134992,7 +135377,7 @@ function asOptionalNumber(value) {
134992
135377
  }
134993
135378
  function asRecordArray2(value) {
134994
135379
  if (!Array.isArray(value)) return [];
134995
- return value.filter(isRecord3);
135380
+ return value.filter(isRecord4);
134996
135381
  }
134997
135382
  var HubFetcher = class {
134998
135383
  client;
@@ -135085,8 +135470,8 @@ var HubFetcher = class {
135085
135470
  const sid = this.sid();
135086
135471
  const parsed = await runScript(this.client, sid, GET_ROOMS_FUNCTIONS);
135087
135472
  return {
135088
- rooms: toDecodedMap(isRecord3(parsed) ? parsed.rooms : void 0),
135089
- functions: toDecodedMap(isRecord3(parsed) ? parsed.functions : void 0)
135473
+ rooms: toDecodedMap(isRecord4(parsed) ? parsed.rooms : void 0),
135474
+ functions: toDecodedMap(isRecord4(parsed) ? parsed.functions : void 0)
135090
135475
  };
135091
135476
  }
135092
135477
  /** Build the `SYSVAR_DESCRIPTIONS` map: sysvar id → description text. */
@@ -135132,7 +135517,7 @@ function sidOpts(sid) {
135132
135517
  }
135133
135518
  function toDecodedMap(value) {
135134
135519
  const map = /* @__PURE__ */ new Map();
135135
- if (!isRecord3(value)) return map;
135520
+ if (!isRecord4(value)) return map;
135136
135521
  for (const [addr, names] of Object.entries(value)) if (Array.isArray(names)) map.set(addr, names.filter((n) => typeof n === "string").map((n) => decodeRegaName(n)));
135137
135522
  return map;
135138
135523
  }
@@ -137787,6 +138172,31 @@ var Homematic = class {
137787
138172
  if (!await this.#central.reportValueUsage(device.interfaceId, channelAddress2, REPORT_VALUE_USAGE_VALUE_ID, REPORT_VALUE_USAGE_REF_REMOVE)) throw new ClientError(`reportValueUsage refused for channel "${channelAddress2}".`);
137788
138173
  }
137789
138174
  /**
138175
+ * Make the CCU USE the given keys so a HmIP device sends their presses to the
138176
+ * access point: create the program `input.name`, or rewrite its conditions to
138177
+ * exactly `channelAddresses` x `parameters` (default short and long press).
138178
+ * Idempotent by name. The program has no destination; it exists only so the
138179
+ * CCU subscribes to the key data points (ReGa scripts and their eq-3/occu
138180
+ * sources: `central/rega/key-event-program.ts`). All channels must be on one
138181
+ * interface and the CCU must have their data points; a missing one is a
138182
+ * {@link ValidationError} naming it. Needs WebUI credentials.
138183
+ */
138184
+ async ensureKeyEventProgram(input) {
138185
+ if (input.channelAddresses.length === 0) throw new ValidationError("ensureKeyEventProgram needs at least one channel.");
138186
+ const interfaces = new Set(input.channelAddresses.map((address) => interfaceNameOf(this.#requireKnownChannel(address).interfaceId)));
138187
+ const [iface] = [...interfaces];
138188
+ if (interfaces.size !== 1 || iface === void 0) throw new ValidationError("The key channels of one program must share an interface.");
138189
+ return this.#requireManagement().keyPrograms().ensure(iface, input);
138190
+ }
138191
+ /** Delete the key event program `name`; `removed: false` when it does not exist. Needs WebUI credentials. */
138192
+ async removeKeyEventProgram(name) {
138193
+ return this.#requireManagement().keyPrograms().remove(name);
138194
+ }
138195
+ /** The key event program `name` and the channels it listens to, or `null`. Needs WebUI credentials. */
138196
+ async getKeyEventProgram(name) {
138197
+ return this.#requireManagement().keyPrograms().get(name);
138198
+ }
138199
+ /**
137790
138200
  * Create a direct link from `sender` to `receiver` (XML-RPC
137791
138201
  * `addLink(sender, receiver, name, description)` on the sender's interface,
137792
138202
  * as eq-3/occu `WebUI/www/api/methods/interface/addlink.tcl` forwards it).
@@ -139718,6 +140128,81 @@ function preferenceToStamp(stored, declared) {
139718
140128
  return declared;
139719
140129
  }
139720
140130
  //#endregion
140131
+ //#region src/devices/hm-key-link-states.ts
140132
+ /**
140133
+ * One snapshot of a device's key-channel central links, shared by the
140134
+ * container page and the Buttons child. Both publish through
140135
+ * {@link publishKeyLinkStates}; neither keeps a second copy.
140136
+ */
140137
+ var published = /* @__PURE__ */ new Map();
140138
+ function storeKey(integrationId, address) {
140139
+ return `${integrationId}\n${address}`;
140140
+ }
140141
+ /** The last CCU answer for this device, or nothing when it has not answered. */
140142
+ function storedKeyLinkStates(integrationId, address) {
140143
+ if (integrationId === void 0) return [];
140144
+ return published.get(storeKey(integrationId, address)) ?? [];
140145
+ }
140146
+ /** Drop every snapshot. Called when the facade registry shuts down. */
140147
+ function clearStoredKeyLinkStates() {
140148
+ published.clear();
140149
+ }
140150
+ /**
140151
+ * Read each key channel's central link from the CCU and publish that list.
140152
+ * `null` when the device has no key channel — the previous snapshot stays,
140153
+ * because an empty channel list is not evidence the buttons are gone.
140154
+ * A failed read is published as `central: null` and `failed: true`.
140155
+ */
140156
+ async function publishKeyLinkStates(integrationId, read) {
140157
+ const keys = hmKeyChannels(read.device);
140158
+ if (keys.length === 0) return null;
140159
+ const names = channelNameLookup(read.facade.devices());
140160
+ const states = [];
140161
+ let failed = false;
140162
+ for (const channel of keys) {
140163
+ const one = await readKey(read, names, channel);
140164
+ if (one.failed) failed = true;
140165
+ states.push(one.state);
140166
+ }
140167
+ published.set(storeKey(integrationId, read.deviceAddress), states);
140168
+ return { failed };
140169
+ }
140170
+ async function readKey(read, names, channel) {
140171
+ const base = {
140172
+ address: channel.address,
140173
+ name: hmName(channel.name),
140174
+ index: channelIndexFromAddress(channel.address) ?? String(channel.index)
140175
+ };
140176
+ try {
140177
+ const state = await read.facade.getChannelLinkState(channel.address);
140178
+ return {
140179
+ failed: false,
140180
+ state: {
140181
+ ...base,
140182
+ central: state.central,
140183
+ links: directLinksOfKey(channel.address, state.links, names)
140184
+ }
140185
+ };
140186
+ } catch (err) {
140187
+ read.logger.warn("Homematic key channel link state could not be read", {
140188
+ tags: { deviceId: read.deviceId },
140189
+ meta: {
140190
+ address: read.deviceAddress,
140191
+ channel: channel.address,
140192
+ error: err instanceof Error ? err.message : String(err)
140193
+ }
140194
+ });
140195
+ return {
140196
+ failed: true,
140197
+ state: {
140198
+ ...base,
140199
+ central: null,
140200
+ links: []
140201
+ }
140202
+ };
140203
+ }
140204
+ }
140205
+ //#endregion
139721
140206
  //#region src/homematic-facade-resolver.ts
139722
140207
  /**
139723
140208
  * Per-integration registry that device classes use to reach the live
@@ -139788,15 +140273,108 @@ var HmFacadeResolver = class {
139788
140273
  this.#facades.clear();
139789
140274
  this.#sessions.clear();
139790
140275
  this.#snapshotSubs.clear();
140276
+ clearStoredKeyLinkStates();
139791
140277
  }
139792
140278
  };
139793
140279
  /** The single in-process resolver shared between the integration and its devices. */
139794
140280
  var homematicFacades = new HmFacadeResolver();
139795
140281
  //#endregion
140282
+ //#region src/devices/hm-button-events-section.ts
140283
+ var ADDON_ID = "provider-homematic";
140284
+ var NS$1 = "provider-homematic:device.buttonEvents";
140285
+ function keyLabel(key) {
140286
+ return key.name ?? `Key ${key.index}`;
140287
+ }
140288
+ function linkText(link) {
140289
+ const target = link.receiverName ?? link.receiverDeviceName;
140290
+ return target === null ? link.receiver : `${target} (${link.receiver})`;
140291
+ }
140292
+ function statusOf(central) {
140293
+ if (central === null) return "unknown";
140294
+ return central ? "ok" : "warn";
140295
+ }
140296
+ function toggleButton(integrationId, key) {
140297
+ const enable = key.central !== true;
140298
+ const label = keyLabel(key);
140299
+ return {
140300
+ type: "addon-action-button",
140301
+ key: `buttonEvents_${key.address}`,
140302
+ label,
140303
+ addonId: ADDON_ID,
140304
+ action: "setButtonEvents",
140305
+ paramsStatic: {
140306
+ integrationId,
140307
+ address: key.address,
140308
+ enabled: enable,
140309
+ confirmed: true
140310
+ },
140311
+ buttonLabel: enable ? "Send presses to CamStack" : "Stop sending presses",
140312
+ variant: enable ? "primary" : "default",
140313
+ confirmMessage: enable ? `Create the central link of "${label}" on the CCU? Its direct links stay as they are.` : `Remove the central link of "${label}" on the CCU? CamStack stops receiving its presses; its direct links stay as they are.`
140314
+ };
140315
+ }
140316
+ /**
140317
+ * The device-page section of a Homematic button device: per key, whether the
140318
+ * CCU sends its presses to CamStack (the central link), the channels it
140319
+ * actuates directly, and a confirmed toggle that writes the central link.
140320
+ * Empty when the device has no key channel the CCU answered for.
140321
+ */
140322
+ function buttonEventsSection(integrationId, keys) {
140323
+ if (integrationId === void 0 || keys.length === 0) return [];
140324
+ const missing = keys.some((key) => key.central === false);
140325
+ const fields = [];
140326
+ if (missing) fields.push({
140327
+ type: "info",
140328
+ key: "buttonEventsHint",
140329
+ label: "Button events",
140330
+ labelKey: `${NS$1}.hint.label`,
140331
+ content: "The CCU does not send some of these presses — turn them on below",
140332
+ contentKey: `${NS$1}.hint.content`,
140333
+ variant: "warning"
140334
+ });
140335
+ fields.push({
140336
+ type: "object-array",
140337
+ key: "buttonEventsKeys",
140338
+ label: "Keys",
140339
+ labelKey: `${NS$1}.keys.label`,
140340
+ columns: [
140341
+ {
140342
+ key: "key",
140343
+ label: "Key",
140344
+ labelKey: `${NS$1}.keys.key`
140345
+ },
140346
+ {
140347
+ key: "central",
140348
+ label: "Sent to CamStack",
140349
+ labelKey: `${NS$1}.keys.central`,
140350
+ kind: "status"
140351
+ },
140352
+ {
140353
+ key: "links",
140354
+ label: "Direct links",
140355
+ labelKey: `${NS$1}.keys.links`
140356
+ }
140357
+ ],
140358
+ value: keys.map((key) => ({
140359
+ key: keyLabel(key),
140360
+ central: statusOf(key.central),
140361
+ links: key.links.length === 0 ? "—" : key.links.map(linkText).join(", ")
140362
+ }))
140363
+ });
140364
+ for (const key of keys) if (key.central !== null) fields.push(toggleButton(integrationId, key));
140365
+ return [{
140366
+ id: "button-events",
140367
+ title: "Button events",
140368
+ titleKey: `${NS$1}.title`,
140369
+ columns: 1,
140370
+ fields
140371
+ }];
140372
+ }
140373
+ //#endregion
139796
140374
  //#region src/devices/hm-device-panel-section.ts
139797
140375
  /** `<addonId>/<stableId>` of the device panel in this addon's widget bundle. */
139798
140376
  var HM_DEVICE_PANEL_WIDGET_ID = "provider-homematic/device-panel";
139799
- var NS$1 = "provider-homematic:device.panel";
140377
+ var NS = "provider-homematic:device.panel";
139800
140378
  /**
139801
140379
  * The device page section of one CCU device: the Homematic panel widget
139802
140380
  * (values, diagnostics, manual actuation, MASTER configuration). The widget
@@ -139807,7 +140385,7 @@ function devicePanelSection(integrationId, address) {
139807
140385
  return {
139808
140386
  id: "homematic-device",
139809
140387
  title: "Homematic",
139810
- titleKey: `${NS$1}.title`,
140388
+ titleKey: `${NS}.title`,
139811
140389
  tab: "general",
139812
140390
  order: 5,
139813
140391
  columns: 1,
@@ -140724,98 +141302,6 @@ var HmSensorDevice = class extends HmChildDevice {
140724
141302
  }
140725
141303
  };
140726
141304
  //#endregion
140727
- //#region src/devices/hm-button-events-section.ts
140728
- var ADDON_ID = "provider-homematic";
140729
- var NS = "provider-homematic:device.buttonEvents";
140730
- function keyLabel(key) {
140731
- return key.name ?? `Key ${key.index}`;
140732
- }
140733
- function linkText(link) {
140734
- const target = link.receiverName ?? link.receiverDeviceName;
140735
- return target === null ? link.receiver : `${target} (${link.receiver})`;
140736
- }
140737
- function statusOf(central) {
140738
- if (central === null) return "unknown";
140739
- return central ? "ok" : "warn";
140740
- }
140741
- function toggleButton(integrationId, key) {
140742
- const enable = key.central !== true;
140743
- const label = keyLabel(key);
140744
- return {
140745
- type: "addon-action-button",
140746
- key: `buttonEvents_${key.address}`,
140747
- label,
140748
- addonId: ADDON_ID,
140749
- action: "setButtonEvents",
140750
- paramsStatic: {
140751
- integrationId,
140752
- address: key.address,
140753
- enabled: enable,
140754
- confirmed: true
140755
- },
140756
- buttonLabel: enable ? "Send presses to CamStack" : "Stop sending presses",
140757
- variant: enable ? "primary" : "default",
140758
- confirmMessage: enable ? `Create the central link of "${label}" on the CCU? Its direct links stay as they are.` : `Remove the central link of "${label}" on the CCU? CamStack stops receiving its presses; its direct links stay as they are.`
140759
- };
140760
- }
140761
- /**
140762
- * The device-page section of a Homematic button device: per key, whether the
140763
- * CCU sends its presses to CamStack (the central link), the channels it
140764
- * actuates directly, and a confirmed toggle that writes the central link.
140765
- * Empty when the device has no key channel the CCU answered for.
140766
- */
140767
- function buttonEventsSection(integrationId, keys) {
140768
- if (integrationId === void 0 || keys.length === 0) return [];
140769
- const missing = keys.some((key) => key.central === false);
140770
- const fields = [];
140771
- if (missing) fields.push({
140772
- type: "info",
140773
- key: "buttonEventsHint",
140774
- label: "Button events",
140775
- labelKey: `${NS}.hint.label`,
140776
- content: "The CCU does not send some of these presses — turn them on below",
140777
- contentKey: `${NS}.hint.content`,
140778
- variant: "warning"
140779
- });
140780
- fields.push({
140781
- type: "object-array",
140782
- key: "buttonEventsKeys",
140783
- label: "Keys",
140784
- labelKey: `${NS}.keys.label`,
140785
- columns: [
140786
- {
140787
- key: "key",
140788
- label: "Key",
140789
- labelKey: `${NS}.keys.key`
140790
- },
140791
- {
140792
- key: "central",
140793
- label: "Sent to CamStack",
140794
- labelKey: `${NS}.keys.central`,
140795
- kind: "status"
140796
- },
140797
- {
140798
- key: "links",
140799
- label: "Direct links",
140800
- labelKey: `${NS}.keys.links`
140801
- }
140802
- ],
140803
- value: keys.map((key) => ({
140804
- key: keyLabel(key),
140805
- central: statusOf(key.central),
140806
- links: key.links.length === 0 ? "—" : key.links.map(linkText).join(", ")
140807
- }))
140808
- });
140809
- for (const key of keys) if (key.central !== null) fields.push(toggleButton(integrationId, key));
140810
- return [{
140811
- id: "button-events",
140812
- title: "Button events",
140813
- titleKey: `${NS}.title`,
140814
- columns: 1,
140815
- fields
140816
- }];
140817
- }
140818
- //#endregion
140819
141305
  //#region src/devices/hm-event-emitter-device.ts
140820
141306
  /** Shown on the Buttons child when none of its key channels has a central link. */
140821
141307
  var BUTTON_EVENTS_HINT = "The CCU does not send these presses — turn them on in this device's Button events section";
@@ -140844,8 +141330,6 @@ var HmEventEmitterDevice = class extends HmChildDevice {
140844
141330
  #pressSeen = /* @__PURE__ */ new Set();
140845
141331
  /** True once we know a key channel lacks a central link. */
140846
141332
  #centralLinkMissing = false;
140847
- /** Per key channel: central link and direct links, as the CCU last answered. */
140848
- #keyStates = [];
140849
141333
  #eventSeq = 0;
140850
141334
  #eventCount = 0;
140851
141335
  /** Unsubscribe for the integration's state-change fan-out. */
@@ -140863,7 +141347,7 @@ var HmEventEmitterDevice = class extends HmChildDevice {
140863
141347
  this.refreshCentralLinks();
140864
141348
  }
140865
141349
  getSettingsUISchema() {
140866
- return { sections: buttonEventsSection(this.integrationId, this.#keyStates) };
141350
+ return { sections: buttonEventsSection(this.integrationId, storedKeyLinkStates(this.integrationId, this.address)) };
140867
141351
  }
140868
141352
  /**
140869
141353
  * Rewrite the slice with the buttons once the CCU's channel list carries
@@ -140899,45 +141383,16 @@ var HmEventEmitterDevice = class extends HmChildDevice {
140899
141383
  async refreshCentralLinks() {
140900
141384
  const facade = this.integrationId === void 0 ? null : homematicFacades.get(this.integrationId);
140901
141385
  const device = this.resolveHmDevice();
140902
- if (facade === null || device === null) return;
140903
- const keys = hmKeyChannels(device);
140904
- if (keys.length === 0) return;
140905
- const names = channelNameLookup(facade.devices());
140906
- const states = [];
140907
- let failed = false;
140908
- for (const channel of keys) {
140909
- const base = {
140910
- address: channel.address,
140911
- name: hmName(channel.name),
140912
- index: channelIndexFromAddress(channel.address) ?? String(channel.index)
140913
- };
140914
- try {
140915
- const state = await facade.getChannelLinkState(channel.address);
140916
- states.push({
140917
- ...base,
140918
- central: state.central,
140919
- links: directLinksOfKey(channel.address, state.links, names)
140920
- });
140921
- } catch (err) {
140922
- failed = true;
140923
- states.push({
140924
- ...base,
140925
- central: null,
140926
- links: []
140927
- });
140928
- this.ctx.logger.warn("Homematic key channel link state could not be read", {
140929
- tags: { deviceId: this.ctx.id },
140930
- meta: {
140931
- address: this.address,
140932
- channel: channel.address,
140933
- error: err instanceof Error ? err.message : String(err)
140934
- }
140935
- });
140936
- }
140937
- }
140938
- this.#keyStates = states;
140939
- if (failed) return;
140940
- const missing = states.some((state) => state.central === false);
141386
+ if (facade === null || device === null || this.integrationId === void 0) return;
141387
+ const loaded = await publishKeyLinkStates(this.integrationId, {
141388
+ facade,
141389
+ device,
141390
+ deviceAddress: this.address,
141391
+ deviceId: this.ctx.id,
141392
+ logger: this.ctx.logger
141393
+ });
141394
+ if (loaded === null || loaded.failed) return;
141395
+ const missing = storedKeyLinkStates(this.integrationId, this.address).some((state) => state.central === false);
140941
141396
  if (missing === this.#centralLinkMissing) return;
140942
141397
  this.#centralLinkMissing = missing;
140943
141398
  const current = this.runtimeState.getCapState("event-emitter");
@@ -141435,6 +141890,7 @@ var HmContainerDevice = class HmContainerDevice extends BaseDevice {
141435
141890
  this.features = HmContainerDevice.deriveFeatures(hmDevice);
141436
141891
  this.online = this.deriveOnline(hmDevice);
141437
141892
  this.attachReachabilityListener();
141893
+ this.refreshButtonEvents();
141438
141894
  this.updateSourceInfo({
141439
141895
  id: this.address,
141440
141896
  system: "homematic"
@@ -141472,15 +141928,32 @@ var HmContainerDevice = class HmContainerDevice extends BaseDevice {
141472
141928
  if (this.online !== next) this.markOnline(next);
141473
141929
  });
141474
141930
  }
141475
- /** The device page's Homematic panel (values, diagnostics, actuation, MASTER configuration). */
141931
+ /** The device page: the CCU panel, then Button events when this device has keys. */
141476
141932
  getSettingsUISchema() {
141477
- return { sections: [devicePanelSection(this.integrationId, this.address)] };
141933
+ return { sections: [devicePanelSection(this.integrationId, this.address), ...buttonEventsSection(this.integrationId, storedKeyLinkStates(this.integrationId, this.address))] };
141934
+ }
141935
+ /**
141936
+ * Publish this device's key-channel central links into the snapshot the
141937
+ * Buttons child also writes. A device without key channels publishes nothing.
141938
+ */
141939
+ async refreshButtonEvents() {
141940
+ const facade = this.facade;
141941
+ const device = this.resolveHmDevice();
141942
+ if (facade === null || device === null) return;
141943
+ await publishKeyLinkStates(this.integrationId, {
141944
+ facade,
141945
+ device,
141946
+ deviceAddress: this.address,
141947
+ deviceId: this.id,
141948
+ logger: this.ctx.logger
141949
+ });
141478
141950
  }
141479
141951
  async onActivate() {
141480
141952
  await super.onActivate();
141481
141953
  await this.reconcileDerived();
141482
141954
  this.reconcileUnsub = homematicFacades.onSnapshot(this.integrationId, () => {
141483
141955
  this.reconcileDerived();
141956
+ this.refreshButtonEvents();
141484
141957
  });
141485
141958
  }
141486
141959
  async removeDevice() {
@@ -143235,7 +143708,7 @@ var HomematicProviderAddon = class extends BaseDeviceProvider {
143235
143708
  records: records.kind({
143236
143709
  name: homematicConnectionsEntryKind.name,
143237
143710
  declaration: homematicConnectionsEntryKind.declaration,
143238
- schema: record(string(), unknown())
143711
+ schema: record$1(string(), unknown())
143239
143712
  }),
143240
143713
  log: { warn: (message) => this.ctx.logger.warn(message) }
143241
143714
  })));
@@ -143321,21 +143794,21 @@ var HomematicProviderAddon = class extends BaseDeviceProvider {
143321
143794
  connectedFacade(integrationId) {
143322
143795
  return this.clients?.sessions().some((session) => session.id === integrationId && session.status === "connected") === true ? homematicFacades.get(integrationId) : null;
143323
143796
  }
143324
- /** CCU addresses adopted as containers from one integration. */
143797
+ /** CCU address → CamStack device id for containers adopted from one integration. */
143325
143798
  async adoptedCcuAddresses(integrationId) {
143326
143799
  const reg = this.ctx.kernel.deviceRegistry;
143327
143800
  const devices = this.ctx.kernel.devices;
143328
- const addresses = /* @__PURE__ */ new Set();
143329
- if (!reg || !devices) return addresses;
143801
+ const byAddress = /* @__PURE__ */ new Map();
143802
+ if (!reg || !devices) return byAddress;
143330
143803
  for (const device of reg.getAllForAddon(this.addonId)) {
143331
143804
  if (device.parentDeviceId !== null) continue;
143332
143805
  const config = await devices.loadConfig(device.id).catch(() => ({}));
143333
143806
  if (config["integrationId"] !== integrationId) continue;
143334
143807
  if (typeof config["hmEntityKey"] === "string") continue;
143335
143808
  const address = config["hmAddress"];
143336
- if (typeof address === "string" && address.length > 0) addresses.add(address);
143809
+ if (typeof address === "string" && address.length > 0) byAddress.set(address, device.id);
143337
143810
  }
143338
- return addresses;
143811
+ return byAddress;
143339
143812
  }
143340
143813
  /** What the CCU management actions reach: connected sessions only, never a half-started facade. */
143341
143814
  ccuActionDeps() {