@camstack/addon-provider-dreame 0.2.24 → 0.2.25

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.
package/dist/addon.js CHANGED
@@ -69503,6 +69503,12 @@ var CameraStatusSchema = object({
69503
69503
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
69504
69504
  fetchedAt: number()
69505
69505
  });
69506
+ var InferenceDeviceExclusionReasonSchema = _enum([
69507
+ "disabled",
69508
+ "unavailable",
69509
+ "cannot-host-camera-root",
69510
+ "accelerator-preferred"
69511
+ ]);
69506
69512
  var NodeInferenceDeviceSchema = object({
69507
69513
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
69508
69514
  key: string(),
@@ -69533,7 +69539,17 @@ var NodeInferenceDeviceSchema = object({
69533
69539
  * available per format; this is the stored selection that becomes the
69534
69540
  * default for EVERY camera landing on this accelerator.
69535
69541
  */
69536
- steps: record(string(), DeviceStepConfigSchema).optional()
69542
+ steps: record(string(), DeviceStepConfigSchema).optional(),
69543
+ /**
69544
+ * `null` when the device IS a camera-root candidate on this node; otherwise
69545
+ * the reason the dispatcher drops it. Computed by the SAME
69546
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
69547
+ * never disagree with the election — deriving it in the UI from
69548
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
69549
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
69550
+ * "an accelerator is serving" predicate).
69551
+ */
69552
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
69537
69553
  });
69538
69554
  var NodeInferenceDevicesSchema = object({
69539
69555
  nodeId: string(),
@@ -74409,7 +74425,12 @@ var ListResultSchema = object({
74409
74425
  probedAt: number()
74410
74426
  });
74411
74427
  var PreferredSchema = LocalInterfaceSchema.nullable();
74412
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74428
+ /**
74429
+ * Candidate base URL for the SDK to race on connect. Order matters —
74430
+ * the SDK should attempt these top-to-bottom with a short per-candidate
74431
+ * timeout (e.g. 1500ms) and cache the winner for the session.
74432
+ */
74433
+ var ConnectionEndpointSchema = object({
74413
74434
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
74414
74435
  label: string(),
74415
74436
  /** Fully-formed base URL with scheme + host + port. */
@@ -74452,7 +74473,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74452
74473
  * ordering between polls.
74453
74474
  */
74454
74475
  priority: number()
74455
- })).readonly() });
74476
+ });
74477
+ /**
74478
+ * Where the advertised local port came from. Ordered most → least
74479
+ * authoritative, and the whole point of returning it: a client must be able to
74480
+ * tell a FACT about the hub's socket from an echo of its own guess.
74481
+ */
74482
+ var LocalPortSourceEnum = _enum([
74483
+ "server-config",
74484
+ "server-env",
74485
+ "caller-hint",
74486
+ "default"
74487
+ ]);
74488
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
74489
+ var AdvertisedLocalPortSchema = object({
74490
+ port: number().int().min(1).max(65535),
74491
+ source: LocalPortSourceEnum
74492
+ });
74493
+ var GetConnectionEndpointsResultSchema = object({
74494
+ endpoints: array(ConnectionEndpointSchema).readonly(),
74495
+ /**
74496
+ * The port the hub built the LAN/loopback URLs with, and where that number
74497
+ * came from.
74498
+ *
74499
+ * Returned rather than merely applied, because "the URL is right" and "the
74500
+ * client can KNOW the URL is right" are different properties. A client that
74501
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
74502
+ * a hub that echoed the port the client sent, so it cannot decide whether to
74503
+ * race the candidate or discard it. With `source` it can: anything but
74504
+ * `caller-hint` is the hub's own socket.
74505
+ *
74506
+ * Absent on hubs predating this field — a client that finds it missing is
74507
+ * talking to an echoing hub and must degrade exactly as it does for
74508
+ * `caller-hint`.
74509
+ */
74510
+ localPort: AdvertisedLocalPortSchema
74511
+ });
74456
74512
  /**
74457
74513
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
74458
74514
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -74473,8 +74529,13 @@ var AllowedAddressesSchema = object({
74473
74529
  */
74474
74530
  addresses: array(string()).readonly() });
74475
74531
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
74476
- /** Local hub HTTP port to use in base URLs. */
74477
- port: number().int().min(1).max(65535),
74532
+ /**
74533
+ * LEGACY HINT — do not send from new code. Kept optional so clients
74534
+ * written against the echoing contract keep working; the hub uses it
74535
+ * only when it cannot read its own port, and says so via
74536
+ * `localPort.source === 'caller-hint'`.
74537
+ */
74538
+ port: number().int().min(1).max(65535).optional(),
74478
74539
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
74479
74540
  * candidate. Default `true`. */
74480
74541
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -69503,6 +69503,12 @@ var CameraStatusSchema = object({
69503
69503
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
69504
69504
  fetchedAt: number()
69505
69505
  });
69506
+ var InferenceDeviceExclusionReasonSchema = _enum([
69507
+ "disabled",
69508
+ "unavailable",
69509
+ "cannot-host-camera-root",
69510
+ "accelerator-preferred"
69511
+ ]);
69506
69512
  var NodeInferenceDeviceSchema = object({
69507
69513
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
69508
69514
  key: string(),
@@ -69533,7 +69539,17 @@ var NodeInferenceDeviceSchema = object({
69533
69539
  * available per format; this is the stored selection that becomes the
69534
69540
  * default for EVERY camera landing on this accelerator.
69535
69541
  */
69536
- steps: record(string(), DeviceStepConfigSchema).optional()
69542
+ steps: record(string(), DeviceStepConfigSchema).optional(),
69543
+ /**
69544
+ * `null` when the device IS a camera-root candidate on this node; otherwise
69545
+ * the reason the dispatcher drops it. Computed by the SAME
69546
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
69547
+ * never disagree with the election — deriving it in the UI from
69548
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
69549
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
69550
+ * "an accelerator is serving" predicate).
69551
+ */
69552
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
69537
69553
  });
69538
69554
  var NodeInferenceDevicesSchema = object({
69539
69555
  nodeId: string(),
@@ -74409,7 +74425,12 @@ var ListResultSchema = object({
74409
74425
  probedAt: number()
74410
74426
  });
74411
74427
  var PreferredSchema = LocalInterfaceSchema.nullable();
74412
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74428
+ /**
74429
+ * Candidate base URL for the SDK to race on connect. Order matters —
74430
+ * the SDK should attempt these top-to-bottom with a short per-candidate
74431
+ * timeout (e.g. 1500ms) and cache the winner for the session.
74432
+ */
74433
+ var ConnectionEndpointSchema = object({
74413
74434
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
74414
74435
  label: string(),
74415
74436
  /** Fully-formed base URL with scheme + host + port. */
@@ -74452,7 +74473,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74452
74473
  * ordering between polls.
74453
74474
  */
74454
74475
  priority: number()
74455
- })).readonly() });
74476
+ });
74477
+ /**
74478
+ * Where the advertised local port came from. Ordered most → least
74479
+ * authoritative, and the whole point of returning it: a client must be able to
74480
+ * tell a FACT about the hub's socket from an echo of its own guess.
74481
+ */
74482
+ var LocalPortSourceEnum = _enum([
74483
+ "server-config",
74484
+ "server-env",
74485
+ "caller-hint",
74486
+ "default"
74487
+ ]);
74488
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
74489
+ var AdvertisedLocalPortSchema = object({
74490
+ port: number().int().min(1).max(65535),
74491
+ source: LocalPortSourceEnum
74492
+ });
74493
+ var GetConnectionEndpointsResultSchema = object({
74494
+ endpoints: array(ConnectionEndpointSchema).readonly(),
74495
+ /**
74496
+ * The port the hub built the LAN/loopback URLs with, and where that number
74497
+ * came from.
74498
+ *
74499
+ * Returned rather than merely applied, because "the URL is right" and "the
74500
+ * client can KNOW the URL is right" are different properties. A client that
74501
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
74502
+ * a hub that echoed the port the client sent, so it cannot decide whether to
74503
+ * race the candidate or discard it. With `source` it can: anything but
74504
+ * `caller-hint` is the hub's own socket.
74505
+ *
74506
+ * Absent on hubs predating this field — a client that finds it missing is
74507
+ * talking to an echoing hub and must degrade exactly as it does for
74508
+ * `caller-hint`.
74509
+ */
74510
+ localPort: AdvertisedLocalPortSchema
74511
+ });
74456
74512
  /**
74457
74513
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
74458
74514
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -74473,8 +74529,13 @@ var AllowedAddressesSchema = object({
74473
74529
  */
74474
74530
  addresses: array(string()).readonly() });
74475
74531
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
74476
- /** Local hub HTTP port to use in base URLs. */
74477
- port: number().int().min(1).max(65535),
74532
+ /**
74533
+ * LEGACY HINT — do not send from new code. Kept optional so clients
74534
+ * written against the echoing contract keep working; the hub uses it
74535
+ * only when it cannot read its own port, and says so via
74536
+ * `localPort.source === 'caller-hint'`.
74537
+ */
74538
+ port: number().int().min(1).max(65535).optional(),
74478
74539
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
74479
74540
  * candidate. Default `true`. */
74480
74541
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreame",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "description": "Dreame robot-vacuum / lawn-mower device-provider addon for CamStack — wraps the @apocaliss92/nodedreame Dreamehome cloud client",
5
5
  "keywords": [
6
6
  "camstack",