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