@camstack/addon-decoder-nodeav 1.2.23 → 1.2.24

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/index.js CHANGED
@@ -18769,6 +18769,12 @@ var CameraStatusSchema = object({
18769
18769
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18770
18770
  fetchedAt: number()
18771
18771
  });
18772
+ var InferenceDeviceExclusionReasonSchema = _enum([
18773
+ "disabled",
18774
+ "unavailable",
18775
+ "cannot-host-camera-root",
18776
+ "accelerator-preferred"
18777
+ ]);
18772
18778
  var NodeInferenceDeviceSchema = object({
18773
18779
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18774
18780
  key: string(),
@@ -18799,7 +18805,17 @@ var NodeInferenceDeviceSchema = object({
18799
18805
  * available per format; this is the stored selection that becomes the
18800
18806
  * default for EVERY camera landing on this accelerator.
18801
18807
  */
18802
- steps: record(string(), DeviceStepConfigSchema).optional()
18808
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18809
+ /**
18810
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18811
+ * the reason the dispatcher drops it. Computed by the SAME
18812
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18813
+ * never disagree with the election — deriving it in the UI from
18814
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18815
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18816
+ * "an accelerator is serving" predicate).
18817
+ */
18818
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18803
18819
  });
18804
18820
  var NodeInferenceDevicesSchema = object({
18805
18821
  nodeId: string(),
@@ -22557,7 +22573,12 @@ var ListResultSchema = object({
22557
22573
  probedAt: number()
22558
22574
  });
22559
22575
  var PreferredSchema = LocalInterfaceSchema.nullable();
22560
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22576
+ /**
22577
+ * Candidate base URL for the SDK to race on connect. Order matters —
22578
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22579
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22580
+ */
22581
+ var ConnectionEndpointSchema = object({
22561
22582
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22562
22583
  label: string(),
22563
22584
  /** Fully-formed base URL with scheme + host + port. */
@@ -22600,7 +22621,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22600
22621
  * ordering between polls.
22601
22622
  */
22602
22623
  priority: number()
22603
- })).readonly() });
22624
+ });
22625
+ /**
22626
+ * Where the advertised local port came from. Ordered most → least
22627
+ * authoritative, and the whole point of returning it: a client must be able to
22628
+ * tell a FACT about the hub's socket from an echo of its own guess.
22629
+ */
22630
+ var LocalPortSourceEnum = _enum([
22631
+ "server-config",
22632
+ "server-env",
22633
+ "caller-hint",
22634
+ "default"
22635
+ ]);
22636
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22637
+ var AdvertisedLocalPortSchema = object({
22638
+ port: number().int().min(1).max(65535),
22639
+ source: LocalPortSourceEnum
22640
+ });
22641
+ var GetConnectionEndpointsResultSchema = object({
22642
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22643
+ /**
22644
+ * The port the hub built the LAN/loopback URLs with, and where that number
22645
+ * came from.
22646
+ *
22647
+ * Returned rather than merely applied, because "the URL is right" and "the
22648
+ * client can KNOW the URL is right" are different properties. A client that
22649
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22650
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22651
+ * race the candidate or discard it. With `source` it can: anything but
22652
+ * `caller-hint` is the hub's own socket.
22653
+ *
22654
+ * Absent on hubs predating this field — a client that finds it missing is
22655
+ * talking to an echoing hub and must degrade exactly as it does for
22656
+ * `caller-hint`.
22657
+ */
22658
+ localPort: AdvertisedLocalPortSchema
22659
+ });
22604
22660
  /**
22605
22661
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22606
22662
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22621,8 +22677,13 @@ var AllowedAddressesSchema = object({
22621
22677
  */
22622
22678
  addresses: array(string()).readonly() });
22623
22679
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22624
- /** Local hub HTTP port to use in base URLs. */
22625
- port: number().int().min(1).max(65535),
22680
+ /**
22681
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22682
+ * written against the echoing contract keep working; the hub uses it
22683
+ * only when it cannot read its own port, and says so via
22684
+ * `localPort.source === 'caller-hint'`.
22685
+ */
22686
+ port: number().int().min(1).max(65535).optional(),
22626
22687
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22627
22688
  * candidate. Default `true`. */
22628
22689
  includeLoopback: boolean().optional(),
package/dist/index.mjs CHANGED
@@ -18765,6 +18765,12 @@ var CameraStatusSchema = object({
18765
18765
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18766
18766
  fetchedAt: number()
18767
18767
  });
18768
+ var InferenceDeviceExclusionReasonSchema = _enum([
18769
+ "disabled",
18770
+ "unavailable",
18771
+ "cannot-host-camera-root",
18772
+ "accelerator-preferred"
18773
+ ]);
18768
18774
  var NodeInferenceDeviceSchema = object({
18769
18775
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18770
18776
  key: string(),
@@ -18795,7 +18801,17 @@ var NodeInferenceDeviceSchema = object({
18795
18801
  * available per format; this is the stored selection that becomes the
18796
18802
  * default for EVERY camera landing on this accelerator.
18797
18803
  */
18798
- steps: record(string(), DeviceStepConfigSchema).optional()
18804
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18805
+ /**
18806
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18807
+ * the reason the dispatcher drops it. Computed by the SAME
18808
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18809
+ * never disagree with the election — deriving it in the UI from
18810
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18811
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18812
+ * "an accelerator is serving" predicate).
18813
+ */
18814
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18799
18815
  });
18800
18816
  var NodeInferenceDevicesSchema = object({
18801
18817
  nodeId: string(),
@@ -22553,7 +22569,12 @@ var ListResultSchema = object({
22553
22569
  probedAt: number()
22554
22570
  });
22555
22571
  var PreferredSchema = LocalInterfaceSchema.nullable();
22556
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22572
+ /**
22573
+ * Candidate base URL for the SDK to race on connect. Order matters —
22574
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22575
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22576
+ */
22577
+ var ConnectionEndpointSchema = object({
22557
22578
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22558
22579
  label: string(),
22559
22580
  /** Fully-formed base URL with scheme + host + port. */
@@ -22596,7 +22617,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22596
22617
  * ordering between polls.
22597
22618
  */
22598
22619
  priority: number()
22599
- })).readonly() });
22620
+ });
22621
+ /**
22622
+ * Where the advertised local port came from. Ordered most → least
22623
+ * authoritative, and the whole point of returning it: a client must be able to
22624
+ * tell a FACT about the hub's socket from an echo of its own guess.
22625
+ */
22626
+ var LocalPortSourceEnum = _enum([
22627
+ "server-config",
22628
+ "server-env",
22629
+ "caller-hint",
22630
+ "default"
22631
+ ]);
22632
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22633
+ var AdvertisedLocalPortSchema = object({
22634
+ port: number().int().min(1).max(65535),
22635
+ source: LocalPortSourceEnum
22636
+ });
22637
+ var GetConnectionEndpointsResultSchema = object({
22638
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22639
+ /**
22640
+ * The port the hub built the LAN/loopback URLs with, and where that number
22641
+ * came from.
22642
+ *
22643
+ * Returned rather than merely applied, because "the URL is right" and "the
22644
+ * client can KNOW the URL is right" are different properties. A client that
22645
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22646
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22647
+ * race the candidate or discard it. With `source` it can: anything but
22648
+ * `caller-hint` is the hub's own socket.
22649
+ *
22650
+ * Absent on hubs predating this field — a client that finds it missing is
22651
+ * talking to an echoing hub and must degrade exactly as it does for
22652
+ * `caller-hint`.
22653
+ */
22654
+ localPort: AdvertisedLocalPortSchema
22655
+ });
22600
22656
  /**
22601
22657
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22602
22658
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22617,8 +22673,13 @@ var AllowedAddressesSchema = object({
22617
22673
  */
22618
22674
  addresses: array(string()).readonly() });
22619
22675
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22620
- /** Local hub HTTP port to use in base URLs. */
22621
- port: number().int().min(1).max(65535),
22676
+ /**
22677
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22678
+ * written against the echoing contract keep working; the hub uses it
22679
+ * only when it cannot read its own port, and says so via
22680
+ * `localPort.source === 'caller-hint'`.
22681
+ */
22682
+ port: number().int().min(1).max(65535).optional(),
22622
22683
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22623
22684
  * candidate. Default `true`. */
22624
22685
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",