@camstack/addon-tailscale 1.1.7 → 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-iliRhdYf.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-83v3d6oo.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";
@@ -8956,18 +8956,47 @@ object({
8956
8956
  lastUpdated: number().nullable()
8957
8957
  });
8958
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
+ ]);
8959
8983
  object({
8960
8984
  /** Lifecycle activity of the mower. */
8961
- activity: _enum([
8962
- "idle",
8963
- "mowing",
8964
- "paused",
8965
- "docked",
8966
- "error"
8967
- ]),
8985
+ activity: LawnMowerActivitySchema,
8968
8986
  /** 0..100 battery percentage. Null when the device has no battery
8969
8987
  * reading. */
8970
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,
8971
9000
  /** Ms epoch when the slice was last updated. */
8972
9001
  lastChangedAt: number()
8973
9002
  });
@@ -10542,6 +10571,7 @@ var VacuumStateSchema = _enum([
10542
10571
  "paused",
10543
10572
  "returning",
10544
10573
  "docked",
10574
+ "drying",
10545
10575
  "error"
10546
10576
  ]);
10547
10577
  /**
@@ -10580,6 +10610,12 @@ object({
10580
10610
  detergent: TankStatusSchema.nullable(),
10581
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10582
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(),
10583
10619
  /** Ms epoch when the slice was last updated. */
10584
10620
  lastChangedAt: number()
10585
10621
  });
@@ -12021,17 +12057,32 @@ var ReleaseInputSchema = object({
12021
12057
  * the parent cascades into every accessory. */
12022
12058
  camDeviceId: number().int().nonnegative()
12023
12059
  });
12024
- var ResyncInputSchema = object({
12025
- /** Parent CamStack device id of an adopted device. The provider resolves its
12026
- * source (integration/broker + native id) and re-aligns the device's
12027
- * structural spec (type/role/capabilities/units) with the live mapping,
12028
- * rebuilding any child whose class changed while preserving operator edits. */
12029
- 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
+ });
12030
12078
  var ResyncResultSchema = object({
12031
12079
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12032
12080
  changed: boolean(),
12033
12081
  /** Number of child devices rebuilt into a new class by this re-sync. */
12034
- 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()
12035
12086
  });
12036
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, {
12037
12088
  kind: "mutation",
@@ -13730,6 +13781,11 @@ var DeviceMetaSchema = object({
13730
13781
  addonId: string(),
13731
13782
  type: string(),
13732
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(),
13733
13789
  location: string().nullable(),
13734
13790
  disabled: boolean(),
13735
13791
  parentDeviceId: number().nullable(),
@@ -14040,6 +14096,9 @@ method(object({
14040
14096
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14041
14097
  kind: "mutation",
14042
14098
  auth: "admin"
14099
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14100
+ kind: "mutation",
14101
+ auth: "admin"
14043
14102
  }), method(object({
14044
14103
  deviceId: number(),
14045
14104
  key: string(),
@@ -17880,6 +17939,12 @@ Object.freeze({
17880
17939
  addonId: null,
17881
17940
  access: "create"
17882
17941
  },
17942
+ "deviceManager.adoptionResync": {
17943
+ capName: "device-manager",
17944
+ capScope: "system",
17945
+ addonId: null,
17946
+ access: "create"
17947
+ },
17883
17948
  "deviceManager.allocateDeviceId": {
17884
17949
  capName: "device-manager",
17885
17950
  capScope: "system",
@@ -8956,18 +8956,47 @@ object({
8956
8956
  lastUpdated: number().nullable()
8957
8957
  });
8958
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
+ ]);
8959
8983
  object({
8960
8984
  /** Lifecycle activity of the mower. */
8961
- activity: _enum([
8962
- "idle",
8963
- "mowing",
8964
- "paused",
8965
- "docked",
8966
- "error"
8967
- ]),
8985
+ activity: LawnMowerActivitySchema,
8968
8986
  /** 0..100 battery percentage. Null when the device has no battery
8969
8987
  * reading. */
8970
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,
8971
9000
  /** Ms epoch when the slice was last updated. */
8972
9001
  lastChangedAt: number()
8973
9002
  });
@@ -10542,6 +10571,7 @@ var VacuumStateSchema = _enum([
10542
10571
  "paused",
10543
10572
  "returning",
10544
10573
  "docked",
10574
+ "drying",
10545
10575
  "error"
10546
10576
  ]);
10547
10577
  /**
@@ -10580,6 +10610,12 @@ object({
10580
10610
  detergent: TankStatusSchema.nullable(),
10581
10611
  /** Dust bin. Null when the hardware has no dust bin. */
10582
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(),
10583
10619
  /** Ms epoch when the slice was last updated. */
10584
10620
  lastChangedAt: number()
10585
10621
  });
@@ -12021,17 +12057,32 @@ var ReleaseInputSchema = object({
12021
12057
  * the parent cascades into every accessory. */
12022
12058
  camDeviceId: number().int().nonnegative()
12023
12059
  });
12024
- var ResyncInputSchema = object({
12025
- /** Parent CamStack device id of an adopted device. The provider resolves its
12026
- * source (integration/broker + native id) and re-aligns the device's
12027
- * structural spec (type/role/capabilities/units) with the live mapping,
12028
- * rebuilding any child whose class changed while preserving operator edits. */
12029
- 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
+ });
12030
12078
  var ResyncResultSchema = object({
12031
12079
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12032
12080
  changed: boolean(),
12033
12081
  /** Number of child devices rebuilt into a new class by this re-sync. */
12034
- 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()
12035
12086
  });
12036
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, {
12037
12088
  kind: "mutation",
@@ -13730,6 +13781,11 @@ var DeviceMetaSchema = object({
13730
13781
  addonId: string(),
13731
13782
  type: string(),
13732
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(),
13733
13789
  location: string().nullable(),
13734
13790
  disabled: boolean(),
13735
13791
  parentDeviceId: number().nullable(),
@@ -14040,6 +14096,9 @@ method(object({
14040
14096
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14041
14097
  kind: "mutation",
14042
14098
  auth: "admin"
14099
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14100
+ kind: "mutation",
14101
+ auth: "admin"
14043
14102
  }), method(object({
14044
14103
  deviceId: number(),
14045
14104
  key: string(),
@@ -17880,6 +17939,12 @@ Object.freeze({
17880
17939
  addonId: null,
17881
17940
  access: "create"
17882
17941
  },
17942
+ "deviceManager.adoptionResync": {
17943
+ capName: "device-manager",
17944
+ capScope: "system",
17945
+ addonId: null,
17946
+ access: "create"
17947
+ },
17883
17948
  "deviceManager.allocateDeviceId": {
17884
17949
  capName: "device-manager",
17885
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-iliRhdYf.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-83v3d6oo.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.7",
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",