@camstack/addon-mqtt-broker 1.1.6 → 1.1.8

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.
@@ -4673,7 +4673,7 @@ function _instanceof(cls, params = {}) {
4673
4673
  return inst;
4674
4674
  }
4675
4675
  //#endregion
4676
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4676
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4677
4677
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4678
4678
  EventCategory["SystemBoot"] = "system.boot";
4679
4679
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6473,6 +6473,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6473
6473
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6474
6474
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6475
6475
  DeviceRole["PressureSensor"] = "pressure-sensor";
6476
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6477
+ DeviceRole["WindSensor"] = "wind-sensor";
6478
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6479
+ DeviceRole["RainSensor"] = "rain-sensor";
6480
+ /** UV index (weather-station `uv-sensor` cap). */
6481
+ DeviceRole["UvSensor"] = "uv-sensor";
6482
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6483
+ * Distinct from AmbientLightSensor (lux). */
6484
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6485
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6486
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6476
6487
  DeviceRole["PowerSensor"] = "power-sensor";
6477
6488
  DeviceRole["EnergySensor"] = "energy-sensor";
6478
6489
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8991,18 +9002,47 @@ object({
8991
9002
  lastUpdated: number().nullable()
8992
9003
  });
8993
9004
  DeviceType.Image;
9005
+ /**
9006
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9007
+ * with a mowing lifecycle plus a dock action.
9008
+ *
9009
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9010
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9011
+ * nullable — some mowers don't report a battery percentage.
9012
+ *
9013
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9014
+ * `dock` sends the mower back to its charging station.
9015
+ */
9016
+ var LawnMowerActivitySchema = _enum([
9017
+ "idle",
9018
+ "mowing",
9019
+ "paused",
9020
+ "docked",
9021
+ "error"
9022
+ ]);
9023
+ /** Severity of the current device/error code — info (status), warning, error. */
9024
+ var DeviceCodeSeveritySchema = _enum([
9025
+ "info",
9026
+ "warning",
9027
+ "error"
9028
+ ]);
8994
9029
  object({
8995
9030
  /** Lifecycle activity of the mower. */
8996
- activity: _enum([
8997
- "idle",
8998
- "mowing",
8999
- "paused",
9000
- "docked",
9001
- "error"
9002
- ]),
9031
+ activity: LawnMowerActivitySchema,
9003
9032
  /** 0..100 battery percentage. Null when the device has no battery
9004
9033
  * reading. */
9005
9034
  batteryLevel: number().min(0).max(100).nullable(),
9035
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9036
+ * task is active / progress is unavailable. */
9037
+ progressPercent: number().min(0).max(100).nullable(),
9038
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9039
+ * or null when unknown. */
9040
+ currentCode: number().nullable(),
9041
+ /** Human label for {@link currentCode}, or null when undecodable. */
9042
+ currentCodeLabel: string().nullable(),
9043
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9044
+ * attention; `info` is normal status. */
9045
+ severity: DeviceCodeSeveritySchema,
9006
9046
  /** Ms epoch when the slice was last updated. */
9007
9047
  lastChangedAt: number()
9008
9048
  });
@@ -10577,6 +10617,7 @@ var VacuumStateSchema = _enum([
10577
10617
  "paused",
10578
10618
  "returning",
10579
10619
  "docked",
10620
+ "drying",
10580
10621
  "error"
10581
10622
  ]);
10582
10623
  /**
@@ -10615,6 +10656,12 @@ object({
10615
10656
  detergent: TankStatusSchema.nullable(),
10616
10657
  /** Dust bin. Null when the hardware has no dust bin. */
10617
10658
  dustBin: TankStatusSchema.nullable(),
10659
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10660
+ progressPercent: number().min(0).max(100).nullable(),
10661
+ /** Current error code (0 / null = no error). */
10662
+ errorCode: number().nullable(),
10663
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10664
+ errorLabel: string().nullable(),
10618
10665
  /** Ms epoch when the slice was last updated. */
10619
10666
  lastChangedAt: number()
10620
10667
  });
@@ -12056,17 +12103,32 @@ var ReleaseInputSchema = object({
12056
12103
  * the parent cascades into every accessory. */
12057
12104
  camDeviceId: number().int().nonnegative()
12058
12105
  });
12059
- var ResyncInputSchema = object({
12060
- /** Parent CamStack device id of an adopted device. The provider resolves its
12061
- * source (integration/broker + native id) and re-aligns the device's
12062
- * structural spec (type/role/capabilities/units) with the live mapping,
12063
- * rebuilding any child whose class changed while preserving operator edits. */
12064
- camDeviceId: number().int().nonnegative() });
12106
+ var ResyncInputSchema = object({
12107
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12108
+ * source (integration/broker + native id) and re-aligns the device's
12109
+ * structural spec (type/role/capabilities/units) with the live mapping,
12110
+ * rebuilding any child whose class changed while preserving operator edits. */
12111
+ camDeviceId: number().int().nonnegative(),
12112
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12113
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12114
+ * children are rebuilt fresh from source — correct names, coords, and units —
12115
+ * instead of being preserved by the incremental reconcile. Use to recover from
12116
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12117
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12118
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12119
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12120
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12121
+ * re-sync that preserves children. */
12122
+ resetToSource: boolean().optional()
12123
+ });
12065
12124
  var ResyncResultSchema = object({
12066
12125
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12067
12126
  changed: boolean(),
12068
12127
  /** Number of child devices rebuilt into a new class by this re-sync. */
12069
- rebuiltChildren: number().int().nonnegative()
12128
+ rebuiltChildren: number().int().nonnegative(),
12129
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12130
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12131
+ removedChildren: number().int().nonnegative().optional()
12070
12132
  });
12071
12133
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12072
12134
  kind: "mutation",
@@ -13833,6 +13895,11 @@ var DeviceMetaSchema = object({
13833
13895
  addonId: string(),
13834
13896
  type: string(),
13835
13897
  name: string(),
13898
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13899
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13900
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13901
+ * `DeviceMeta.userNamed`. */
13902
+ userNamed: boolean().optional(),
13836
13903
  location: string().nullable(),
13837
13904
  disabled: boolean(),
13838
13905
  parentDeviceId: number().nullable(),
@@ -14143,6 +14210,9 @@ method(object({
14143
14210
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14144
14211
  kind: "mutation",
14145
14212
  auth: "admin"
14213
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14214
+ kind: "mutation",
14215
+ auth: "admin"
14146
14216
  }), method(object({
14147
14217
  deviceId: number(),
14148
14218
  key: string(),
@@ -17905,6 +17975,12 @@ Object.freeze({
17905
17975
  addonId: null,
17906
17976
  access: "create"
17907
17977
  },
17978
+ "deviceManager.adoptionResync": {
17979
+ capName: "device-manager",
17980
+ capScope: "system",
17981
+ addonId: null,
17982
+ access: "create"
17983
+ },
17908
17984
  "deviceManager.allocateDeviceId": {
17909
17985
  capName: "device-manager",
17910
17986
  capScope: "system",
@@ -4668,7 +4668,7 @@ function _instanceof(cls, params = {}) {
4668
4668
  return inst;
4669
4669
  }
4670
4670
  //#endregion
4671
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4671
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4672
4672
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4673
4673
  EventCategory["SystemBoot"] = "system.boot";
4674
4674
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6468,6 +6468,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6468
6468
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6469
6469
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6470
6470
  DeviceRole["PressureSensor"] = "pressure-sensor";
6471
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6472
+ DeviceRole["WindSensor"] = "wind-sensor";
6473
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6474
+ DeviceRole["RainSensor"] = "rain-sensor";
6475
+ /** UV index (weather-station `uv-sensor` cap). */
6476
+ DeviceRole["UvSensor"] = "uv-sensor";
6477
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6478
+ * Distinct from AmbientLightSensor (lux). */
6479
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6480
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6481
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6471
6482
  DeviceRole["PowerSensor"] = "power-sensor";
6472
6483
  DeviceRole["EnergySensor"] = "energy-sensor";
6473
6484
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8986,18 +8997,47 @@ object({
8986
8997
  lastUpdated: number().nullable()
8987
8998
  });
8988
8999
  DeviceType.Image;
9000
+ /**
9001
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9002
+ * with a mowing lifecycle plus a dock action.
9003
+ *
9004
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9005
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9006
+ * nullable — some mowers don't report a battery percentage.
9007
+ *
9008
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9009
+ * `dock` sends the mower back to its charging station.
9010
+ */
9011
+ var LawnMowerActivitySchema = _enum([
9012
+ "idle",
9013
+ "mowing",
9014
+ "paused",
9015
+ "docked",
9016
+ "error"
9017
+ ]);
9018
+ /** Severity of the current device/error code — info (status), warning, error. */
9019
+ var DeviceCodeSeveritySchema = _enum([
9020
+ "info",
9021
+ "warning",
9022
+ "error"
9023
+ ]);
8989
9024
  object({
8990
9025
  /** Lifecycle activity of the mower. */
8991
- activity: _enum([
8992
- "idle",
8993
- "mowing",
8994
- "paused",
8995
- "docked",
8996
- "error"
8997
- ]),
9026
+ activity: LawnMowerActivitySchema,
8998
9027
  /** 0..100 battery percentage. Null when the device has no battery
8999
9028
  * reading. */
9000
9029
  batteryLevel: number().min(0).max(100).nullable(),
9030
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9031
+ * task is active / progress is unavailable. */
9032
+ progressPercent: number().min(0).max(100).nullable(),
9033
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9034
+ * or null when unknown. */
9035
+ currentCode: number().nullable(),
9036
+ /** Human label for {@link currentCode}, or null when undecodable. */
9037
+ currentCodeLabel: string().nullable(),
9038
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9039
+ * attention; `info` is normal status. */
9040
+ severity: DeviceCodeSeveritySchema,
9001
9041
  /** Ms epoch when the slice was last updated. */
9002
9042
  lastChangedAt: number()
9003
9043
  });
@@ -10572,6 +10612,7 @@ var VacuumStateSchema = _enum([
10572
10612
  "paused",
10573
10613
  "returning",
10574
10614
  "docked",
10615
+ "drying",
10575
10616
  "error"
10576
10617
  ]);
10577
10618
  /**
@@ -10610,6 +10651,12 @@ object({
10610
10651
  detergent: TankStatusSchema.nullable(),
10611
10652
  /** Dust bin. Null when the hardware has no dust bin. */
10612
10653
  dustBin: TankStatusSchema.nullable(),
10654
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10655
+ progressPercent: number().min(0).max(100).nullable(),
10656
+ /** Current error code (0 / null = no error). */
10657
+ errorCode: number().nullable(),
10658
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10659
+ errorLabel: string().nullable(),
10613
10660
  /** Ms epoch when the slice was last updated. */
10614
10661
  lastChangedAt: number()
10615
10662
  });
@@ -12051,17 +12098,32 @@ var ReleaseInputSchema = object({
12051
12098
  * the parent cascades into every accessory. */
12052
12099
  camDeviceId: number().int().nonnegative()
12053
12100
  });
12054
- var ResyncInputSchema = object({
12055
- /** Parent CamStack device id of an adopted device. The provider resolves its
12056
- * source (integration/broker + native id) and re-aligns the device's
12057
- * structural spec (type/role/capabilities/units) with the live mapping,
12058
- * rebuilding any child whose class changed while preserving operator edits. */
12059
- camDeviceId: number().int().nonnegative() });
12101
+ var ResyncInputSchema = object({
12102
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12103
+ * source (integration/broker + native id) and re-aligns the device's
12104
+ * structural spec (type/role/capabilities/units) with the live mapping,
12105
+ * rebuilding any child whose class changed while preserving operator edits. */
12106
+ camDeviceId: number().int().nonnegative(),
12107
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12108
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12109
+ * children are rebuilt fresh from source — correct names, coords, and units —
12110
+ * instead of being preserved by the incremental reconcile. Use to recover from
12111
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12112
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12113
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12114
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12115
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12116
+ * re-sync that preserves children. */
12117
+ resetToSource: boolean().optional()
12118
+ });
12060
12119
  var ResyncResultSchema = object({
12061
12120
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12062
12121
  changed: boolean(),
12063
12122
  /** Number of child devices rebuilt into a new class by this re-sync. */
12064
- rebuiltChildren: number().int().nonnegative()
12123
+ rebuiltChildren: number().int().nonnegative(),
12124
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12125
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12126
+ removedChildren: number().int().nonnegative().optional()
12065
12127
  });
12066
12128
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12067
12129
  kind: "mutation",
@@ -13828,6 +13890,11 @@ var DeviceMetaSchema = object({
13828
13890
  addonId: string(),
13829
13891
  type: string(),
13830
13892
  name: string(),
13893
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13894
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13895
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13896
+ * `DeviceMeta.userNamed`. */
13897
+ userNamed: boolean().optional(),
13831
13898
  location: string().nullable(),
13832
13899
  disabled: boolean(),
13833
13900
  parentDeviceId: number().nullable(),
@@ -14138,6 +14205,9 @@ method(object({
14138
14205
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14139
14206
  kind: "mutation",
14140
14207
  auth: "admin"
14208
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14209
+ kind: "mutation",
14210
+ auth: "admin"
14141
14211
  }), method(object({
14142
14212
  deviceId: number(),
14143
14213
  key: string(),
@@ -17900,6 +17970,12 @@ Object.freeze({
17900
17970
  addonId: null,
17901
17971
  access: "create"
17902
17972
  },
17973
+ "deviceManager.adoptionResync": {
17974
+ capName: "device-manager",
17975
+ capScope: "system",
17976
+ addonId: null,
17977
+ access: "create"
17978
+ },
17903
17979
  "deviceManager.allocateDeviceId": {
17904
17980
  capName: "device-manager",
17905
17981
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",