camstack 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.
@@ -18006,12 +18006,28 @@ var LawnMowerActivitySchema = external_exports.enum([
18006
18006
  "docked",
18007
18007
  "error"
18008
18008
  ]);
18009
+ var DeviceCodeSeveritySchema = external_exports.enum([
18010
+ "info",
18011
+ "warning",
18012
+ "error"
18013
+ ]);
18009
18014
  var LawnMowerControlStatusSchema = external_exports.object({
18010
18015
  /** Lifecycle activity of the mower. */
18011
18016
  activity: LawnMowerActivitySchema,
18012
18017
  /** 0..100 battery percentage. Null when the device has no battery
18013
18018
  * reading. */
18014
18019
  batteryLevel: external_exports.number().min(0).max(100).nullable(),
18020
+ /** 0..100 mowing-completion percentage of the current task, or null when no
18021
+ * task is active / progress is unavailable. */
18022
+ progressPercent: external_exports.number().min(0).max(100).nullable(),
18023
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
18024
+ * or null when unknown. */
18025
+ currentCode: external_exports.number().nullable(),
18026
+ /** Human label for {@link currentCode}, or null when undecodable. */
18027
+ currentCodeLabel: external_exports.string().nullable(),
18028
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
18029
+ * attention; `info` is normal status. */
18030
+ severity: DeviceCodeSeveritySchema,
18015
18031
  /** Ms epoch when the slice was last updated. */
18016
18032
  lastChangedAt: external_exports.number()
18017
18033
  });
@@ -20075,6 +20091,7 @@ var VacuumStateSchema = external_exports.enum([
20075
20091
  "paused",
20076
20092
  "returning",
20077
20093
  "docked",
20094
+ "drying",
20078
20095
  "error"
20079
20096
  ]);
20080
20097
  var TankStatusSchema = external_exports.object({
@@ -20106,6 +20123,12 @@ var VacuumControlStatusSchema = external_exports.object({
20106
20123
  detergent: TankStatusSchema.nullable(),
20107
20124
  /** Dust bin. Null when the hardware has no dust bin. */
20108
20125
  dustBin: TankStatusSchema.nullable(),
20126
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
20127
+ progressPercent: external_exports.number().min(0).max(100).nullable(),
20128
+ /** Current error code (0 / null = no error). */
20129
+ errorCode: external_exports.number().nullable(),
20130
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
20131
+ errorLabel: external_exports.string().nullable(),
20109
20132
  /** Ms epoch when the slice was last updated. */
20110
20133
  lastChangedAt: external_exports.number()
20111
20134
  });
@@ -21673,13 +21696,27 @@ var ResyncInputSchema = external_exports.object({
21673
21696
  * source (integration/broker + native id) and re-aligns the device's
21674
21697
  * structural spec (type/role/capabilities/units) with the live mapping,
21675
21698
  * rebuilding any child whose class changed while preserving operator edits. */
21676
- camDeviceId: external_exports.number().int().nonnegative()
21699
+ camDeviceId: external_exports.number().int().nonnegative(),
21700
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
21701
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
21702
+ * children are rebuilt fresh from source — correct names, coords, and units —
21703
+ * instead of being preserved by the incremental reconcile. Use to recover from
21704
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
21705
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
21706
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
21707
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
21708
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
21709
+ * re-sync that preserves children. */
21710
+ resetToSource: external_exports.boolean().optional()
21677
21711
  });
21678
21712
  var ResyncResultSchema = external_exports.object({
21679
21713
  /** True when the persisted spec actually changed (children may have been rebuilt). */
21680
21714
  changed: external_exports.boolean(),
21681
21715
  /** Number of child devices rebuilt into a new class by this re-sync. */
21682
- rebuiltChildren: external_exports.number().int().nonnegative()
21716
+ rebuiltChildren: external_exports.number().int().nonnegative(),
21717
+ /** Number of accessory children torn down by a `resetToSource` purge before the
21718
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
21719
+ removedChildren: external_exports.number().int().nonnegative().optional()
21683
21720
  });
21684
21721
  var deviceAdoptionCapability = {
21685
21722
  name: "device-adoption",
@@ -23545,6 +23582,11 @@ var DeviceMetaSchema = external_exports.object({
23545
23582
  addonId: external_exports.string(),
23546
23583
  type: external_exports.string(),
23547
23584
  name: external_exports.string(),
23585
+ /** True once an operator explicitly renamed the device via `setName`. Drives
23586
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
23587
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
23588
+ * `DeviceMeta.userNamed`. */
23589
+ userNamed: external_exports.boolean().optional(),
23548
23590
  location: external_exports.string().nullable(),
23549
23591
  disabled: external_exports.boolean(),
23550
23592
  parentDeviceId: external_exports.number().nullable(),
@@ -24082,6 +24124,16 @@ var deviceManagerCapability = {
24082
24124
  auth: "admin"
24083
24125
  }),
24084
24126
  /**
24127
+ * Re-sync a device with its source via the device-adoption provider of the
24128
+ * device's OWNING addon (resolved from `camDeviceId`). Unlike the singleton
24129
+ * `device-adoption.resync`, this routes to the correct integration so a
24130
+ * Dreame / Matter / … device never hits another integration's provider.
24131
+ */
24132
+ adoptionResync: method(ResyncInputSchema, ResyncResultSchema, {
24133
+ kind: "mutation",
24134
+ auth: "admin"
24135
+ }),
24136
+ /**
24085
24137
  * Test a field value on an existing device (e.g. probe an RTSP URL).
24086
24138
  * Routes through the device-provider for the owning addon.
24087
24139
  */
@@ -28554,6 +28606,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
28554
28606
  addonId: null,
28555
28607
  access: "create"
28556
28608
  },
28609
+ "deviceManager.adoptionResync": {
28610
+ capName: "device-manager",
28611
+ capScope: "system",
28612
+ addonId: null,
28613
+ access: "create"
28614
+ },
28557
28615
  "deviceManager.allocateDeviceId": {
28558
28616
  capName: "device-manager",
28559
28617
  capScope: "system",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-XCCIOEY3.js";
4
+ } from "./chunk-OG7AMM2R.js";
5
5
  import "./chunk-K3NQKI34.js";
6
6
 
7
7
  // src/cli.ts
@@ -608,7 +608,7 @@ function isUnknown(_value) {
608
608
  return true;
609
609
  }
610
610
  async function resolveServerInteractive(presetNamespace) {
611
- const { discoverNodes, resolveHubFromDiscovered } = await import("./discover-XYERI4MC.js");
611
+ const { discoverNodes, resolveHubFromDiscovered } = await import("./discover-2NRD23Y2.js");
612
612
  if (presetNamespace) {
613
613
  const spinner4 = clack.spinner();
614
614
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -3,7 +3,7 @@ import {
3
3
  discoverNodes,
4
4
  resolveHubFromDiscovered,
5
5
  runDiscover
6
- } from "./chunk-XCCIOEY3.js";
6
+ } from "./chunk-OG7AMM2R.js";
7
7
  import "./chunk-K3NQKI34.js";
8
8
  export {
9
9
  discoverNodes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",