@camstack/addon-provider-dreame 0.2.24 → 0.2.26

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
@@ -50504,7 +50504,7 @@ objectType({
50504
50504
  })
50505
50505
  });
50506
50506
  //#endregion
50507
- //#region ../types/dist/event-category-XfKNtfCc.mjs
50507
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
50508
50508
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
50509
50509
  EventCategory["SystemBoot"] = "system.boot";
50510
50510
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -50520,6 +50520,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
50520
50520
  */
50521
50521
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
50522
50522
  /**
50523
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
50524
+ * Emitted only when the material on disk actually changed, so an
50525
+ * operator who trusted the old certificate by hand is told rather than
50526
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
50527
+ *
50528
+ * Rule: docs/decisions/adr-0227-*.md
50529
+ */
50530
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
50531
+ /**
50523
50532
  * A newer addon or server-root package version was found by the
50524
50533
  * authoritative registry check. Emitted once when any observed
50525
50534
  * `latestVersion` changes (or a package/node first appears behind);
@@ -69503,6 +69512,12 @@ var CameraStatusSchema = object({
69503
69512
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
69504
69513
  fetchedAt: number()
69505
69514
  });
69515
+ var InferenceDeviceExclusionReasonSchema = _enum([
69516
+ "disabled",
69517
+ "unavailable",
69518
+ "cannot-host-camera-root",
69519
+ "accelerator-preferred"
69520
+ ]);
69506
69521
  var NodeInferenceDeviceSchema = object({
69507
69522
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
69508
69523
  key: string(),
@@ -69533,7 +69548,17 @@ var NodeInferenceDeviceSchema = object({
69533
69548
  * available per format; this is the stored selection that becomes the
69534
69549
  * default for EVERY camera landing on this accelerator.
69535
69550
  */
69536
- steps: record(string(), DeviceStepConfigSchema).optional()
69551
+ steps: record(string(), DeviceStepConfigSchema).optional(),
69552
+ /**
69553
+ * `null` when the device IS a camera-root candidate on this node; otherwise
69554
+ * the reason the dispatcher drops it. Computed by the SAME
69555
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
69556
+ * never disagree with the election — deriving it in the UI from
69557
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
69558
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
69559
+ * "an accelerator is serving" predicate).
69560
+ */
69561
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
69537
69562
  });
69538
69563
  var NodeInferenceDevicesSchema = object({
69539
69564
  nodeId: string(),
@@ -74409,7 +74434,12 @@ var ListResultSchema = object({
74409
74434
  probedAt: number()
74410
74435
  });
74411
74436
  var PreferredSchema = LocalInterfaceSchema.nullable();
74412
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74437
+ /**
74438
+ * Candidate base URL for the SDK to race on connect. Order matters —
74439
+ * the SDK should attempt these top-to-bottom with a short per-candidate
74440
+ * timeout (e.g. 1500ms) and cache the winner for the session.
74441
+ */
74442
+ var ConnectionEndpointSchema = object({
74413
74443
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
74414
74444
  label: string(),
74415
74445
  /** Fully-formed base URL with scheme + host + port. */
@@ -74452,7 +74482,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74452
74482
  * ordering between polls.
74453
74483
  */
74454
74484
  priority: number()
74455
- })).readonly() });
74485
+ });
74486
+ /**
74487
+ * Where the advertised local port came from. Ordered most → least
74488
+ * authoritative, and the whole point of returning it: a client must be able to
74489
+ * tell a FACT about the hub's socket from an echo of its own guess.
74490
+ */
74491
+ var LocalPortSourceEnum = _enum([
74492
+ "server-config",
74493
+ "server-env",
74494
+ "caller-hint",
74495
+ "default"
74496
+ ]);
74497
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
74498
+ var AdvertisedLocalPortSchema = object({
74499
+ port: number().int().min(1).max(65535),
74500
+ source: LocalPortSourceEnum
74501
+ });
74502
+ var GetConnectionEndpointsResultSchema = object({
74503
+ endpoints: array(ConnectionEndpointSchema).readonly(),
74504
+ /**
74505
+ * The port the hub built the LAN/loopback URLs with, and where that number
74506
+ * came from.
74507
+ *
74508
+ * Returned rather than merely applied, because "the URL is right" and "the
74509
+ * client can KNOW the URL is right" are different properties. A client that
74510
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
74511
+ * a hub that echoed the port the client sent, so it cannot decide whether to
74512
+ * race the candidate or discard it. With `source` it can: anything but
74513
+ * `caller-hint` is the hub's own socket.
74514
+ *
74515
+ * Absent on hubs predating this field — a client that finds it missing is
74516
+ * talking to an echoing hub and must degrade exactly as it does for
74517
+ * `caller-hint`.
74518
+ */
74519
+ localPort: AdvertisedLocalPortSchema
74520
+ });
74456
74521
  /**
74457
74522
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
74458
74523
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -74473,8 +74538,13 @@ var AllowedAddressesSchema = object({
74473
74538
  */
74474
74539
  addresses: array(string()).readonly() });
74475
74540
  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),
74541
+ /**
74542
+ * LEGACY HINT — do not send from new code. Kept optional so clients
74543
+ * written against the echoing contract keep working; the hub uses it
74544
+ * only when it cannot read its own port, and says so via
74545
+ * `localPort.source === 'caller-hint'`.
74546
+ */
74547
+ port: number().int().min(1).max(65535).optional(),
74478
74548
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
74479
74549
  * candidate. Default `true`. */
74480
74550
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -50504,7 +50504,7 @@ objectType({
50504
50504
  })
50505
50505
  });
50506
50506
  //#endregion
50507
- //#region ../types/dist/event-category-XfKNtfCc.mjs
50507
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
50508
50508
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
50509
50509
  EventCategory["SystemBoot"] = "system.boot";
50510
50510
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -50520,6 +50520,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
50520
50520
  */
50521
50521
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
50522
50522
  /**
50523
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
50524
+ * Emitted only when the material on disk actually changed, so an
50525
+ * operator who trusted the old certificate by hand is told rather than
50526
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
50527
+ *
50528
+ * Rule: docs/decisions/adr-0227-*.md
50529
+ */
50530
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
50531
+ /**
50523
50532
  * A newer addon or server-root package version was found by the
50524
50533
  * authoritative registry check. Emitted once when any observed
50525
50534
  * `latestVersion` changes (or a package/node first appears behind);
@@ -69503,6 +69512,12 @@ var CameraStatusSchema = object({
69503
69512
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
69504
69513
  fetchedAt: number()
69505
69514
  });
69515
+ var InferenceDeviceExclusionReasonSchema = _enum([
69516
+ "disabled",
69517
+ "unavailable",
69518
+ "cannot-host-camera-root",
69519
+ "accelerator-preferred"
69520
+ ]);
69506
69521
  var NodeInferenceDeviceSchema = object({
69507
69522
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
69508
69523
  key: string(),
@@ -69533,7 +69548,17 @@ var NodeInferenceDeviceSchema = object({
69533
69548
  * available per format; this is the stored selection that becomes the
69534
69549
  * default for EVERY camera landing on this accelerator.
69535
69550
  */
69536
- steps: record(string(), DeviceStepConfigSchema).optional()
69551
+ steps: record(string(), DeviceStepConfigSchema).optional(),
69552
+ /**
69553
+ * `null` when the device IS a camera-root candidate on this node; otherwise
69554
+ * the reason the dispatcher drops it. Computed by the SAME
69555
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
69556
+ * never disagree with the election — deriving it in the UI from
69557
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
69558
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
69559
+ * "an accelerator is serving" predicate).
69560
+ */
69561
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
69537
69562
  });
69538
69563
  var NodeInferenceDevicesSchema = object({
69539
69564
  nodeId: string(),
@@ -74409,7 +74434,12 @@ var ListResultSchema = object({
74409
74434
  probedAt: number()
74410
74435
  });
74411
74436
  var PreferredSchema = LocalInterfaceSchema.nullable();
74412
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74437
+ /**
74438
+ * Candidate base URL for the SDK to race on connect. Order matters —
74439
+ * the SDK should attempt these top-to-bottom with a short per-candidate
74440
+ * timeout (e.g. 1500ms) and cache the winner for the session.
74441
+ */
74442
+ var ConnectionEndpointSchema = object({
74413
74443
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
74414
74444
  label: string(),
74415
74445
  /** Fully-formed base URL with scheme + host + port. */
@@ -74452,7 +74482,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
74452
74482
  * ordering between polls.
74453
74483
  */
74454
74484
  priority: number()
74455
- })).readonly() });
74485
+ });
74486
+ /**
74487
+ * Where the advertised local port came from. Ordered most → least
74488
+ * authoritative, and the whole point of returning it: a client must be able to
74489
+ * tell a FACT about the hub's socket from an echo of its own guess.
74490
+ */
74491
+ var LocalPortSourceEnum = _enum([
74492
+ "server-config",
74493
+ "server-env",
74494
+ "caller-hint",
74495
+ "default"
74496
+ ]);
74497
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
74498
+ var AdvertisedLocalPortSchema = object({
74499
+ port: number().int().min(1).max(65535),
74500
+ source: LocalPortSourceEnum
74501
+ });
74502
+ var GetConnectionEndpointsResultSchema = object({
74503
+ endpoints: array(ConnectionEndpointSchema).readonly(),
74504
+ /**
74505
+ * The port the hub built the LAN/loopback URLs with, and where that number
74506
+ * came from.
74507
+ *
74508
+ * Returned rather than merely applied, because "the URL is right" and "the
74509
+ * client can KNOW the URL is right" are different properties. A client that
74510
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
74511
+ * a hub that echoed the port the client sent, so it cannot decide whether to
74512
+ * race the candidate or discard it. With `source` it can: anything but
74513
+ * `caller-hint` is the hub's own socket.
74514
+ *
74515
+ * Absent on hubs predating this field — a client that finds it missing is
74516
+ * talking to an echoing hub and must degrade exactly as it does for
74517
+ * `caller-hint`.
74518
+ */
74519
+ localPort: AdvertisedLocalPortSchema
74520
+ });
74456
74521
  /**
74457
74522
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
74458
74523
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -74473,8 +74538,13 @@ var AllowedAddressesSchema = object({
74473
74538
  */
74474
74539
  addresses: array(string()).readonly() });
74475
74540
  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),
74541
+ /**
74542
+ * LEGACY HINT — do not send from new code. Kept optional so clients
74543
+ * written against the echoing contract keep working; the hub uses it
74544
+ * only when it cannot read its own port, and says so via
74545
+ * `localPort.source === 'caller-hint'`.
74546
+ */
74547
+ port: number().int().min(1).max(65535).optional(),
74478
74548
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
74479
74549
  * candidate. Default `true`. */
74480
74550
  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.26",
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",