@camstack/addon-mqtt-broker 1.2.24 → 1.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.
@@ -18736,6 +18736,12 @@ var CameraStatusSchema = object({
18736
18736
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18737
18737
  fetchedAt: number()
18738
18738
  });
18739
+ var InferenceDeviceExclusionReasonSchema = _enum([
18740
+ "disabled",
18741
+ "unavailable",
18742
+ "cannot-host-camera-root",
18743
+ "accelerator-preferred"
18744
+ ]);
18739
18745
  var NodeInferenceDeviceSchema = object({
18740
18746
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18741
18747
  key: string(),
@@ -18766,7 +18772,17 @@ var NodeInferenceDeviceSchema = object({
18766
18772
  * available per format; this is the stored selection that becomes the
18767
18773
  * default for EVERY camera landing on this accelerator.
18768
18774
  */
18769
- steps: record(string(), DeviceStepConfigSchema).optional()
18775
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18776
+ /**
18777
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18778
+ * the reason the dispatcher drops it. Computed by the SAME
18779
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18780
+ * never disagree with the election — deriving it in the UI from
18781
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18782
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18783
+ * "an accelerator is serving" predicate).
18784
+ */
18785
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18770
18786
  });
18771
18787
  var NodeInferenceDevicesSchema = object({
18772
18788
  nodeId: string(),
@@ -22524,7 +22540,12 @@ var ListResultSchema = object({
22524
22540
  probedAt: number()
22525
22541
  });
22526
22542
  var PreferredSchema = LocalInterfaceSchema.nullable();
22527
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22543
+ /**
22544
+ * Candidate base URL for the SDK to race on connect. Order matters —
22545
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22546
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22547
+ */
22548
+ var ConnectionEndpointSchema = object({
22528
22549
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22529
22550
  label: string(),
22530
22551
  /** Fully-formed base URL with scheme + host + port. */
@@ -22567,7 +22588,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22567
22588
  * ordering between polls.
22568
22589
  */
22569
22590
  priority: number()
22570
- })).readonly() });
22591
+ });
22592
+ /**
22593
+ * Where the advertised local port came from. Ordered most → least
22594
+ * authoritative, and the whole point of returning it: a client must be able to
22595
+ * tell a FACT about the hub's socket from an echo of its own guess.
22596
+ */
22597
+ var LocalPortSourceEnum = _enum([
22598
+ "server-config",
22599
+ "server-env",
22600
+ "caller-hint",
22601
+ "default"
22602
+ ]);
22603
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22604
+ var AdvertisedLocalPortSchema = object({
22605
+ port: number().int().min(1).max(65535),
22606
+ source: LocalPortSourceEnum
22607
+ });
22608
+ var GetConnectionEndpointsResultSchema = object({
22609
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22610
+ /**
22611
+ * The port the hub built the LAN/loopback URLs with, and where that number
22612
+ * came from.
22613
+ *
22614
+ * Returned rather than merely applied, because "the URL is right" and "the
22615
+ * client can KNOW the URL is right" are different properties. A client that
22616
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22617
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22618
+ * race the candidate or discard it. With `source` it can: anything but
22619
+ * `caller-hint` is the hub's own socket.
22620
+ *
22621
+ * Absent on hubs predating this field — a client that finds it missing is
22622
+ * talking to an echoing hub and must degrade exactly as it does for
22623
+ * `caller-hint`.
22624
+ */
22625
+ localPort: AdvertisedLocalPortSchema
22626
+ });
22571
22627
  /**
22572
22628
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22573
22629
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22588,8 +22644,13 @@ var AllowedAddressesSchema = object({
22588
22644
  */
22589
22645
  addresses: array(string()).readonly() });
22590
22646
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22591
- /** Local hub HTTP port to use in base URLs. */
22592
- port: number().int().min(1).max(65535),
22647
+ /**
22648
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22649
+ * written against the echoing contract keep working; the hub uses it
22650
+ * only when it cannot read its own port, and says so via
22651
+ * `localPort.source === 'caller-hint'`.
22652
+ */
22653
+ port: number().int().min(1).max(65535).optional(),
22593
22654
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22594
22655
  * candidate. Default `true`. */
22595
22656
  includeLoopback: boolean().optional(),
@@ -18731,6 +18731,12 @@ var CameraStatusSchema = object({
18731
18731
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18732
18732
  fetchedAt: number()
18733
18733
  });
18734
+ var InferenceDeviceExclusionReasonSchema = _enum([
18735
+ "disabled",
18736
+ "unavailable",
18737
+ "cannot-host-camera-root",
18738
+ "accelerator-preferred"
18739
+ ]);
18734
18740
  var NodeInferenceDeviceSchema = object({
18735
18741
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18736
18742
  key: string(),
@@ -18761,7 +18767,17 @@ var NodeInferenceDeviceSchema = object({
18761
18767
  * available per format; this is the stored selection that becomes the
18762
18768
  * default for EVERY camera landing on this accelerator.
18763
18769
  */
18764
- steps: record(string(), DeviceStepConfigSchema).optional()
18770
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18771
+ /**
18772
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18773
+ * the reason the dispatcher drops it. Computed by the SAME
18774
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18775
+ * never disagree with the election — deriving it in the UI from
18776
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18777
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18778
+ * "an accelerator is serving" predicate).
18779
+ */
18780
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18765
18781
  });
18766
18782
  var NodeInferenceDevicesSchema = object({
18767
18783
  nodeId: string(),
@@ -22519,7 +22535,12 @@ var ListResultSchema = object({
22519
22535
  probedAt: number()
22520
22536
  });
22521
22537
  var PreferredSchema = LocalInterfaceSchema.nullable();
22522
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22538
+ /**
22539
+ * Candidate base URL for the SDK to race on connect. Order matters —
22540
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22541
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22542
+ */
22543
+ var ConnectionEndpointSchema = object({
22523
22544
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22524
22545
  label: string(),
22525
22546
  /** Fully-formed base URL with scheme + host + port. */
@@ -22562,7 +22583,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22562
22583
  * ordering between polls.
22563
22584
  */
22564
22585
  priority: number()
22565
- })).readonly() });
22586
+ });
22587
+ /**
22588
+ * Where the advertised local port came from. Ordered most → least
22589
+ * authoritative, and the whole point of returning it: a client must be able to
22590
+ * tell a FACT about the hub's socket from an echo of its own guess.
22591
+ */
22592
+ var LocalPortSourceEnum = _enum([
22593
+ "server-config",
22594
+ "server-env",
22595
+ "caller-hint",
22596
+ "default"
22597
+ ]);
22598
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22599
+ var AdvertisedLocalPortSchema = object({
22600
+ port: number().int().min(1).max(65535),
22601
+ source: LocalPortSourceEnum
22602
+ });
22603
+ var GetConnectionEndpointsResultSchema = object({
22604
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22605
+ /**
22606
+ * The port the hub built the LAN/loopback URLs with, and where that number
22607
+ * came from.
22608
+ *
22609
+ * Returned rather than merely applied, because "the URL is right" and "the
22610
+ * client can KNOW the URL is right" are different properties. A client that
22611
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22612
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22613
+ * race the candidate or discard it. With `source` it can: anything but
22614
+ * `caller-hint` is the hub's own socket.
22615
+ *
22616
+ * Absent on hubs predating this field — a client that finds it missing is
22617
+ * talking to an echoing hub and must degrade exactly as it does for
22618
+ * `caller-hint`.
22619
+ */
22620
+ localPort: AdvertisedLocalPortSchema
22621
+ });
22566
22622
  /**
22567
22623
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22568
22624
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22583,8 +22639,13 @@ var AllowedAddressesSchema = object({
22583
22639
  */
22584
22640
  addresses: array(string()).readonly() });
22585
22641
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22586
- /** Local hub HTTP port to use in base URLs. */
22587
- port: number().int().min(1).max(65535),
22642
+ /**
22643
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22644
+ * written against the echoing contract keep working; the hub uses it
22645
+ * only when it cannot read its own port, and says so via
22646
+ * `localPort.source === 'caller-hint'`.
22647
+ */
22648
+ port: number().int().min(1).max(65535).optional(),
22588
22649
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22589
22650
  * candidate. Default `true`. */
22590
22651
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",