@camstack/addon-static-turn 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.
@@ -18623,6 +18623,12 @@ var CameraStatusSchema = object({
18623
18623
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18624
18624
  fetchedAt: number()
18625
18625
  });
18626
+ var InferenceDeviceExclusionReasonSchema = _enum([
18627
+ "disabled",
18628
+ "unavailable",
18629
+ "cannot-host-camera-root",
18630
+ "accelerator-preferred"
18631
+ ]);
18626
18632
  var NodeInferenceDeviceSchema = object({
18627
18633
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18628
18634
  key: string(),
@@ -18653,7 +18659,17 @@ var NodeInferenceDeviceSchema = object({
18653
18659
  * available per format; this is the stored selection that becomes the
18654
18660
  * default for EVERY camera landing on this accelerator.
18655
18661
  */
18656
- steps: record(string(), DeviceStepConfigSchema).optional()
18662
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18663
+ /**
18664
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18665
+ * the reason the dispatcher drops it. Computed by the SAME
18666
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18667
+ * never disagree with the election — deriving it in the UI from
18668
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18669
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18670
+ * "an accelerator is serving" predicate).
18671
+ */
18672
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18657
18673
  });
18658
18674
  var NodeInferenceDevicesSchema = object({
18659
18675
  nodeId: string(),
@@ -22434,7 +22450,12 @@ var ListResultSchema = object({
22434
22450
  probedAt: number()
22435
22451
  });
22436
22452
  var PreferredSchema = LocalInterfaceSchema.nullable();
22437
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22453
+ /**
22454
+ * Candidate base URL for the SDK to race on connect. Order matters —
22455
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22456
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22457
+ */
22458
+ var ConnectionEndpointSchema = object({
22438
22459
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22439
22460
  label: string(),
22440
22461
  /** Fully-formed base URL with scheme + host + port. */
@@ -22477,7 +22498,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22477
22498
  * ordering between polls.
22478
22499
  */
22479
22500
  priority: number()
22480
- })).readonly() });
22501
+ });
22502
+ /**
22503
+ * Where the advertised local port came from. Ordered most → least
22504
+ * authoritative, and the whole point of returning it: a client must be able to
22505
+ * tell a FACT about the hub's socket from an echo of its own guess.
22506
+ */
22507
+ var LocalPortSourceEnum = _enum([
22508
+ "server-config",
22509
+ "server-env",
22510
+ "caller-hint",
22511
+ "default"
22512
+ ]);
22513
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22514
+ var AdvertisedLocalPortSchema = object({
22515
+ port: number().int().min(1).max(65535),
22516
+ source: LocalPortSourceEnum
22517
+ });
22518
+ var GetConnectionEndpointsResultSchema = object({
22519
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22520
+ /**
22521
+ * The port the hub built the LAN/loopback URLs with, and where that number
22522
+ * came from.
22523
+ *
22524
+ * Returned rather than merely applied, because "the URL is right" and "the
22525
+ * client can KNOW the URL is right" are different properties. A client that
22526
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22527
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22528
+ * race the candidate or discard it. With `source` it can: anything but
22529
+ * `caller-hint` is the hub's own socket.
22530
+ *
22531
+ * Absent on hubs predating this field — a client that finds it missing is
22532
+ * talking to an echoing hub and must degrade exactly as it does for
22533
+ * `caller-hint`.
22534
+ */
22535
+ localPort: AdvertisedLocalPortSchema
22536
+ });
22481
22537
  /**
22482
22538
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22483
22539
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22498,8 +22554,13 @@ var AllowedAddressesSchema = object({
22498
22554
  */
22499
22555
  addresses: array(string()).readonly() });
22500
22556
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22501
- /** Local hub HTTP port to use in base URLs. */
22502
- port: number().int().min(1).max(65535),
22557
+ /**
22558
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22559
+ * written against the echoing contract keep working; the hub uses it
22560
+ * only when it cannot read its own port, and says so via
22561
+ * `localPort.source === 'caller-hint'`.
22562
+ */
22563
+ port: number().int().min(1).max(65535).optional(),
22503
22564
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22504
22565
  * candidate. Default `true`. */
22505
22566
  includeLoopback: boolean().optional(),
@@ -18622,6 +18622,12 @@ var CameraStatusSchema = object({
18622
18622
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18623
18623
  fetchedAt: number()
18624
18624
  });
18625
+ var InferenceDeviceExclusionReasonSchema = _enum([
18626
+ "disabled",
18627
+ "unavailable",
18628
+ "cannot-host-camera-root",
18629
+ "accelerator-preferred"
18630
+ ]);
18625
18631
  var NodeInferenceDeviceSchema = object({
18626
18632
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18627
18633
  key: string(),
@@ -18652,7 +18658,17 @@ var NodeInferenceDeviceSchema = object({
18652
18658
  * available per format; this is the stored selection that becomes the
18653
18659
  * default for EVERY camera landing on this accelerator.
18654
18660
  */
18655
- steps: record(string(), DeviceStepConfigSchema).optional()
18661
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18662
+ /**
18663
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18664
+ * the reason the dispatcher drops it. Computed by the SAME
18665
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18666
+ * never disagree with the election — deriving it in the UI from
18667
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18668
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18669
+ * "an accelerator is serving" predicate).
18670
+ */
18671
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18656
18672
  });
18657
18673
  var NodeInferenceDevicesSchema = object({
18658
18674
  nodeId: string(),
@@ -22433,7 +22449,12 @@ var ListResultSchema = object({
22433
22449
  probedAt: number()
22434
22450
  });
22435
22451
  var PreferredSchema = LocalInterfaceSchema.nullable();
22436
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22452
+ /**
22453
+ * Candidate base URL for the SDK to race on connect. Order matters —
22454
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22455
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22456
+ */
22457
+ var ConnectionEndpointSchema = object({
22437
22458
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22438
22459
  label: string(),
22439
22460
  /** Fully-formed base URL with scheme + host + port. */
@@ -22476,7 +22497,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22476
22497
  * ordering between polls.
22477
22498
  */
22478
22499
  priority: number()
22479
- })).readonly() });
22500
+ });
22501
+ /**
22502
+ * Where the advertised local port came from. Ordered most → least
22503
+ * authoritative, and the whole point of returning it: a client must be able to
22504
+ * tell a FACT about the hub's socket from an echo of its own guess.
22505
+ */
22506
+ var LocalPortSourceEnum = _enum([
22507
+ "server-config",
22508
+ "server-env",
22509
+ "caller-hint",
22510
+ "default"
22511
+ ]);
22512
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22513
+ var AdvertisedLocalPortSchema = object({
22514
+ port: number().int().min(1).max(65535),
22515
+ source: LocalPortSourceEnum
22516
+ });
22517
+ var GetConnectionEndpointsResultSchema = object({
22518
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22519
+ /**
22520
+ * The port the hub built the LAN/loopback URLs with, and where that number
22521
+ * came from.
22522
+ *
22523
+ * Returned rather than merely applied, because "the URL is right" and "the
22524
+ * client can KNOW the URL is right" are different properties. A client that
22525
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22526
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22527
+ * race the candidate or discard it. With `source` it can: anything but
22528
+ * `caller-hint` is the hub's own socket.
22529
+ *
22530
+ * Absent on hubs predating this field — a client that finds it missing is
22531
+ * talking to an echoing hub and must degrade exactly as it does for
22532
+ * `caller-hint`.
22533
+ */
22534
+ localPort: AdvertisedLocalPortSchema
22535
+ });
22480
22536
  /**
22481
22537
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22482
22538
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22497,8 +22553,13 @@ var AllowedAddressesSchema = object({
22497
22553
  */
22498
22554
  addresses: array(string()).readonly() });
22499
22555
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22500
- /** Local hub HTTP port to use in base URLs. */
22501
- port: number().int().min(1).max(65535),
22556
+ /**
22557
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22558
+ * written against the echoing contract keep working; the hub uses it
22559
+ * only when it cannot read its own port, and says so via
22560
+ * `localPort.source === 'caller-hint'`.
22561
+ */
22562
+ port: number().int().min(1).max(65535).optional(),
22502
22563
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22503
22564
  * candidate. Default `true`. */
22504
22565
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-static-turn",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "Static / self-hosted (coturn) TURN provider for CamStack",
5
5
  "keywords": [
6
6
  "camstack",