@camstack/addon-tailscale 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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-BYrw97eJ.js");
27
+ const require_dist = require("../dist-BCzauxvG.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-B6t_56LI.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon, t as meshNetworkCapability } from "../dist-LPneMD1S.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4630
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6427,6 +6427,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6427
6427
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6428
6428
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6429
6429
  DeviceRole["PressureSensor"] = "pressure-sensor";
6430
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6431
+ DeviceRole["WindSensor"] = "wind-sensor";
6432
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6433
+ DeviceRole["RainSensor"] = "rain-sensor";
6434
+ /** UV index (weather-station `uv-sensor` cap). */
6435
+ DeviceRole["UvSensor"] = "uv-sensor";
6436
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6437
+ * Distinct from AmbientLightSensor (lux). */
6438
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6439
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6440
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6430
6441
  DeviceRole["PowerSensor"] = "power-sensor";
6431
6442
  DeviceRole["EnergySensor"] = "energy-sensor";
6432
6443
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8945,18 +8956,47 @@ object({
8945
8956
  lastUpdated: number().nullable()
8946
8957
  });
8947
8958
  DeviceType.Image;
8959
+ /**
8960
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8961
+ * with a mowing lifecycle plus a dock action.
8962
+ *
8963
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8964
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8965
+ * nullable — some mowers don't report a battery percentage.
8966
+ *
8967
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8968
+ * `dock` sends the mower back to its charging station.
8969
+ */
8970
+ var LawnMowerActivitySchema = _enum([
8971
+ "idle",
8972
+ "mowing",
8973
+ "paused",
8974
+ "docked",
8975
+ "error"
8976
+ ]);
8977
+ /** Severity of the current device/error code — info (status), warning, error. */
8978
+ var DeviceCodeSeveritySchema = _enum([
8979
+ "info",
8980
+ "warning",
8981
+ "error"
8982
+ ]);
8948
8983
  object({
8949
8984
  /** Lifecycle activity of the mower. */
8950
- activity: _enum([
8951
- "idle",
8952
- "mowing",
8953
- "paused",
8954
- "docked",
8955
- "error"
8956
- ]),
8985
+ activity: LawnMowerActivitySchema,
8957
8986
  /** 0..100 battery percentage. Null when the device has no battery
8958
8987
  * reading. */
8959
8988
  batteryLevel: number().min(0).max(100).nullable(),
8989
+ /** 0..100 mowing-completion percentage of the current task, or null when no
8990
+ * task is active / progress is unavailable. */
8991
+ progressPercent: number().min(0).max(100).nullable(),
8992
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
8993
+ * or null when unknown. */
8994
+ currentCode: number().nullable(),
8995
+ /** Human label for {@link currentCode}, or null when undecodable. */
8996
+ currentCodeLabel: string().nullable(),
8997
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
8998
+ * attention; `info` is normal status. */
8999
+ severity: DeviceCodeSeveritySchema,
8960
9000
  /** Ms epoch when the slice was last updated. */
8961
9001
  lastChangedAt: number()
8962
9002
  });
@@ -10531,6 +10571,7 @@ var VacuumStateSchema = _enum([
10531
10571
  "paused",
10532
10572
  "returning",
10533
10573
  "docked",
10574
+ "drying",
10534
10575
  "error"
10535
10576
  ]);
10536
10577
  /**
@@ -10569,6 +10610,12 @@ object({
10569
10610
  detergent: TankStatusSchema.nullable(),
10570
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10571
10612
  dustBin: TankStatusSchema.nullable(),
10613
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10614
+ progressPercent: number().min(0).max(100).nullable(),
10615
+ /** Current error code (0 / null = no error). */
10616
+ errorCode: number().nullable(),
10617
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10618
+ errorLabel: string().nullable(),
10572
10619
  /** Ms epoch when the slice was last updated. */
10573
10620
  lastChangedAt: number()
10574
10621
  });
@@ -12010,17 +12057,32 @@ var ReleaseInputSchema = object({
12010
12057
  * the parent cascades into every accessory. */
12011
12058
  camDeviceId: number().int().nonnegative()
12012
12059
  });
12013
- var ResyncInputSchema = object({
12014
- /** Parent CamStack device id of an adopted device. The provider resolves its
12015
- * source (integration/broker + native id) and re-aligns the device's
12016
- * structural spec (type/role/capabilities/units) with the live mapping,
12017
- * rebuilding any child whose class changed while preserving operator edits. */
12018
- camDeviceId: number().int().nonnegative() });
12060
+ var ResyncInputSchema = object({
12061
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12062
+ * source (integration/broker + native id) and re-aligns the device's
12063
+ * structural spec (type/role/capabilities/units) with the live mapping,
12064
+ * rebuilding any child whose class changed while preserving operator edits. */
12065
+ camDeviceId: number().int().nonnegative(),
12066
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12067
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12068
+ * children are rebuilt fresh from source — correct names, coords, and units —
12069
+ * instead of being preserved by the incremental reconcile. Use to recover from
12070
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12071
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12072
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12073
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12074
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12075
+ * re-sync that preserves children. */
12076
+ resetToSource: boolean().optional()
12077
+ });
12019
12078
  var ResyncResultSchema = object({
12020
12079
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12021
12080
  changed: boolean(),
12022
12081
  /** Number of child devices rebuilt into a new class by this re-sync. */
12023
- rebuiltChildren: number().int().nonnegative()
12082
+ rebuiltChildren: number().int().nonnegative(),
12083
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12084
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12085
+ removedChildren: number().int().nonnegative().optional()
12024
12086
  });
12025
12087
  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, {
12026
12088
  kind: "mutation",
@@ -13719,6 +13781,11 @@ var DeviceMetaSchema = object({
13719
13781
  addonId: string(),
13720
13782
  type: string(),
13721
13783
  name: string(),
13784
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13785
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13786
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13787
+ * `DeviceMeta.userNamed`. */
13788
+ userNamed: boolean().optional(),
13722
13789
  location: string().nullable(),
13723
13790
  disabled: boolean(),
13724
13791
  parentDeviceId: number().nullable(),
@@ -14029,6 +14096,9 @@ method(object({
14029
14096
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14030
14097
  kind: "mutation",
14031
14098
  auth: "admin"
14099
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14100
+ kind: "mutation",
14101
+ auth: "admin"
14032
14102
  }), method(object({
14033
14103
  deviceId: number(),
14034
14104
  key: string(),
@@ -17869,6 +17939,12 @@ Object.freeze({
17869
17939
  addonId: null,
17870
17940
  access: "create"
17871
17941
  },
17942
+ "deviceManager.adoptionResync": {
17943
+ capName: "device-manager",
17944
+ capScope: "system",
17945
+ addonId: null,
17946
+ access: "create"
17947
+ },
17872
17948
  "deviceManager.allocateDeviceId": {
17873
17949
  capName: "device-manager",
17874
17950
  capScope: "system",
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4630
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6427,6 +6427,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6427
6427
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6428
6428
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6429
6429
  DeviceRole["PressureSensor"] = "pressure-sensor";
6430
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6431
+ DeviceRole["WindSensor"] = "wind-sensor";
6432
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6433
+ DeviceRole["RainSensor"] = "rain-sensor";
6434
+ /** UV index (weather-station `uv-sensor` cap). */
6435
+ DeviceRole["UvSensor"] = "uv-sensor";
6436
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6437
+ * Distinct from AmbientLightSensor (lux). */
6438
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6439
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6440
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6430
6441
  DeviceRole["PowerSensor"] = "power-sensor";
6431
6442
  DeviceRole["EnergySensor"] = "energy-sensor";
6432
6443
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8945,18 +8956,47 @@ object({
8945
8956
  lastUpdated: number().nullable()
8946
8957
  });
8947
8958
  DeviceType.Image;
8959
+ /**
8960
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8961
+ * with a mowing lifecycle plus a dock action.
8962
+ *
8963
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8964
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8965
+ * nullable — some mowers don't report a battery percentage.
8966
+ *
8967
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8968
+ * `dock` sends the mower back to its charging station.
8969
+ */
8970
+ var LawnMowerActivitySchema = _enum([
8971
+ "idle",
8972
+ "mowing",
8973
+ "paused",
8974
+ "docked",
8975
+ "error"
8976
+ ]);
8977
+ /** Severity of the current device/error code — info (status), warning, error. */
8978
+ var DeviceCodeSeveritySchema = _enum([
8979
+ "info",
8980
+ "warning",
8981
+ "error"
8982
+ ]);
8948
8983
  object({
8949
8984
  /** Lifecycle activity of the mower. */
8950
- activity: _enum([
8951
- "idle",
8952
- "mowing",
8953
- "paused",
8954
- "docked",
8955
- "error"
8956
- ]),
8985
+ activity: LawnMowerActivitySchema,
8957
8986
  /** 0..100 battery percentage. Null when the device has no battery
8958
8987
  * reading. */
8959
8988
  batteryLevel: number().min(0).max(100).nullable(),
8989
+ /** 0..100 mowing-completion percentage of the current task, or null when no
8990
+ * task is active / progress is unavailable. */
8991
+ progressPercent: number().min(0).max(100).nullable(),
8992
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
8993
+ * or null when unknown. */
8994
+ currentCode: number().nullable(),
8995
+ /** Human label for {@link currentCode}, or null when undecodable. */
8996
+ currentCodeLabel: string().nullable(),
8997
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
8998
+ * attention; `info` is normal status. */
8999
+ severity: DeviceCodeSeveritySchema,
8960
9000
  /** Ms epoch when the slice was last updated. */
8961
9001
  lastChangedAt: number()
8962
9002
  });
@@ -10531,6 +10571,7 @@ var VacuumStateSchema = _enum([
10531
10571
  "paused",
10532
10572
  "returning",
10533
10573
  "docked",
10574
+ "drying",
10534
10575
  "error"
10535
10576
  ]);
10536
10577
  /**
@@ -10569,6 +10610,12 @@ object({
10569
10610
  detergent: TankStatusSchema.nullable(),
10570
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10571
10612
  dustBin: TankStatusSchema.nullable(),
10613
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10614
+ progressPercent: number().min(0).max(100).nullable(),
10615
+ /** Current error code (0 / null = no error). */
10616
+ errorCode: number().nullable(),
10617
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10618
+ errorLabel: string().nullable(),
10572
10619
  /** Ms epoch when the slice was last updated. */
10573
10620
  lastChangedAt: number()
10574
10621
  });
@@ -12010,17 +12057,32 @@ var ReleaseInputSchema = object({
12010
12057
  * the parent cascades into every accessory. */
12011
12058
  camDeviceId: number().int().nonnegative()
12012
12059
  });
12013
- var ResyncInputSchema = object({
12014
- /** Parent CamStack device id of an adopted device. The provider resolves its
12015
- * source (integration/broker + native id) and re-aligns the device's
12016
- * structural spec (type/role/capabilities/units) with the live mapping,
12017
- * rebuilding any child whose class changed while preserving operator edits. */
12018
- camDeviceId: number().int().nonnegative() });
12060
+ var ResyncInputSchema = object({
12061
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12062
+ * source (integration/broker + native id) and re-aligns the device's
12063
+ * structural spec (type/role/capabilities/units) with the live mapping,
12064
+ * rebuilding any child whose class changed while preserving operator edits. */
12065
+ camDeviceId: number().int().nonnegative(),
12066
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12067
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12068
+ * children are rebuilt fresh from source — correct names, coords, and units —
12069
+ * instead of being preserved by the incremental reconcile. Use to recover from
12070
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12071
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12072
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12073
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12074
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12075
+ * re-sync that preserves children. */
12076
+ resetToSource: boolean().optional()
12077
+ });
12019
12078
  var ResyncResultSchema = object({
12020
12079
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12021
12080
  changed: boolean(),
12022
12081
  /** Number of child devices rebuilt into a new class by this re-sync. */
12023
- rebuiltChildren: number().int().nonnegative()
12082
+ rebuiltChildren: number().int().nonnegative(),
12083
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12084
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12085
+ removedChildren: number().int().nonnegative().optional()
12024
12086
  });
12025
12087
  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, {
12026
12088
  kind: "mutation",
@@ -13719,6 +13781,11 @@ var DeviceMetaSchema = object({
13719
13781
  addonId: string(),
13720
13782
  type: string(),
13721
13783
  name: string(),
13784
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13785
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13786
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13787
+ * `DeviceMeta.userNamed`. */
13788
+ userNamed: boolean().optional(),
13722
13789
  location: string().nullable(),
13723
13790
  disabled: boolean(),
13724
13791
  parentDeviceId: number().nullable(),
@@ -14029,6 +14096,9 @@ method(object({
14029
14096
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14030
14097
  kind: "mutation",
14031
14098
  auth: "admin"
14099
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14100
+ kind: "mutation",
14101
+ auth: "admin"
14032
14102
  }), method(object({
14033
14103
  deviceId: number(),
14034
14104
  key: string(),
@@ -17869,6 +17939,12 @@ Object.freeze({
17869
17939
  addonId: null,
17870
17940
  access: "create"
17871
17941
  },
17942
+ "deviceManager.adoptionResync": {
17943
+ capName: "device-manager",
17944
+ capScope: "system",
17945
+ addonId: null,
17946
+ access: "create"
17947
+ },
17872
17948
  "deviceManager.allocateDeviceId": {
17873
17949
  capName: "device-manager",
17874
17950
  capScope: "system",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BYrw97eJ.js");
5
+ const require_dist = require("../dist-BCzauxvG.js");
6
6
  let node_child_process = require("node:child_process");
7
7
  let node_util = require("node:util");
8
8
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-B6t_56LI.mjs";
1
+ import { i as EventCategory, n as networkAccessCapability, r as BaseAddon } from "../dist-LPneMD1S.mjs";
2
2
  import { execFile } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import { randomUUID } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",