@camstack/addon-provider-rtsp 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.
package/dist/addon.js CHANGED
@@ -19037,6 +19037,12 @@ var CameraStatusSchema = object({
19037
19037
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19038
19038
  fetchedAt: number()
19039
19039
  });
19040
+ var InferenceDeviceExclusionReasonSchema = _enum([
19041
+ "disabled",
19042
+ "unavailable",
19043
+ "cannot-host-camera-root",
19044
+ "accelerator-preferred"
19045
+ ]);
19040
19046
  var NodeInferenceDeviceSchema = object({
19041
19047
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19042
19048
  key: string(),
@@ -19067,7 +19073,17 @@ var NodeInferenceDeviceSchema = object({
19067
19073
  * available per format; this is the stored selection that becomes the
19068
19074
  * default for EVERY camera landing on this accelerator.
19069
19075
  */
19070
- steps: record(string(), DeviceStepConfigSchema).optional()
19076
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19077
+ /**
19078
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19079
+ * the reason the dispatcher drops it. Computed by the SAME
19080
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19081
+ * never disagree with the election — deriving it in the UI from
19082
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19083
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19084
+ * "an accelerator is serving" predicate).
19085
+ */
19086
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19071
19087
  });
19072
19088
  var NodeInferenceDevicesSchema = object({
19073
19089
  nodeId: string(),
@@ -24030,7 +24046,12 @@ var ListResultSchema = object({
24030
24046
  probedAt: number()
24031
24047
  });
24032
24048
  var PreferredSchema = LocalInterfaceSchema.nullable();
24033
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24049
+ /**
24050
+ * Candidate base URL for the SDK to race on connect. Order matters —
24051
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24052
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24053
+ */
24054
+ var ConnectionEndpointSchema = object({
24034
24055
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24035
24056
  label: string(),
24036
24057
  /** Fully-formed base URL with scheme + host + port. */
@@ -24073,7 +24094,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24073
24094
  * ordering between polls.
24074
24095
  */
24075
24096
  priority: number()
24076
- })).readonly() });
24097
+ });
24098
+ /**
24099
+ * Where the advertised local port came from. Ordered most → least
24100
+ * authoritative, and the whole point of returning it: a client must be able to
24101
+ * tell a FACT about the hub's socket from an echo of its own guess.
24102
+ */
24103
+ var LocalPortSourceEnum = _enum([
24104
+ "server-config",
24105
+ "server-env",
24106
+ "caller-hint",
24107
+ "default"
24108
+ ]);
24109
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24110
+ var AdvertisedLocalPortSchema = object({
24111
+ port: number().int().min(1).max(65535),
24112
+ source: LocalPortSourceEnum
24113
+ });
24114
+ var GetConnectionEndpointsResultSchema = object({
24115
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24116
+ /**
24117
+ * The port the hub built the LAN/loopback URLs with, and where that number
24118
+ * came from.
24119
+ *
24120
+ * Returned rather than merely applied, because "the URL is right" and "the
24121
+ * client can KNOW the URL is right" are different properties. A client that
24122
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24123
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24124
+ * race the candidate or discard it. With `source` it can: anything but
24125
+ * `caller-hint` is the hub's own socket.
24126
+ *
24127
+ * Absent on hubs predating this field — a client that finds it missing is
24128
+ * talking to an echoing hub and must degrade exactly as it does for
24129
+ * `caller-hint`.
24130
+ */
24131
+ localPort: AdvertisedLocalPortSchema
24132
+ });
24077
24133
  /**
24078
24134
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24079
24135
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24094,8 +24150,13 @@ var AllowedAddressesSchema = object({
24094
24150
  */
24095
24151
  addresses: array(string()).readonly() });
24096
24152
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24097
- /** Local hub HTTP port to use in base URLs. */
24098
- port: number().int().min(1).max(65535),
24153
+ /**
24154
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24155
+ * written against the echoing contract keep working; the hub uses it
24156
+ * only when it cannot read its own port, and says so via
24157
+ * `localPort.source === 'caller-hint'`.
24158
+ */
24159
+ port: number().int().min(1).max(65535).optional(),
24099
24160
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24100
24161
  * candidate. Default `true`. */
24101
24162
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -19013,6 +19013,12 @@ var CameraStatusSchema = object({
19013
19013
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19014
19014
  fetchedAt: number()
19015
19015
  });
19016
+ var InferenceDeviceExclusionReasonSchema = _enum([
19017
+ "disabled",
19018
+ "unavailable",
19019
+ "cannot-host-camera-root",
19020
+ "accelerator-preferred"
19021
+ ]);
19016
19022
  var NodeInferenceDeviceSchema = object({
19017
19023
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19018
19024
  key: string(),
@@ -19043,7 +19049,17 @@ var NodeInferenceDeviceSchema = object({
19043
19049
  * available per format; this is the stored selection that becomes the
19044
19050
  * default for EVERY camera landing on this accelerator.
19045
19051
  */
19046
- steps: record(string(), DeviceStepConfigSchema).optional()
19052
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19053
+ /**
19054
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19055
+ * the reason the dispatcher drops it. Computed by the SAME
19056
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19057
+ * never disagree with the election — deriving it in the UI from
19058
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19059
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19060
+ * "an accelerator is serving" predicate).
19061
+ */
19062
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19047
19063
  });
19048
19064
  var NodeInferenceDevicesSchema = object({
19049
19065
  nodeId: string(),
@@ -24006,7 +24022,12 @@ var ListResultSchema = object({
24006
24022
  probedAt: number()
24007
24023
  });
24008
24024
  var PreferredSchema = LocalInterfaceSchema.nullable();
24009
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24025
+ /**
24026
+ * Candidate base URL for the SDK to race on connect. Order matters —
24027
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24028
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24029
+ */
24030
+ var ConnectionEndpointSchema = object({
24010
24031
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24011
24032
  label: string(),
24012
24033
  /** Fully-formed base URL with scheme + host + port. */
@@ -24049,7 +24070,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24049
24070
  * ordering between polls.
24050
24071
  */
24051
24072
  priority: number()
24052
- })).readonly() });
24073
+ });
24074
+ /**
24075
+ * Where the advertised local port came from. Ordered most → least
24076
+ * authoritative, and the whole point of returning it: a client must be able to
24077
+ * tell a FACT about the hub's socket from an echo of its own guess.
24078
+ */
24079
+ var LocalPortSourceEnum = _enum([
24080
+ "server-config",
24081
+ "server-env",
24082
+ "caller-hint",
24083
+ "default"
24084
+ ]);
24085
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24086
+ var AdvertisedLocalPortSchema = object({
24087
+ port: number().int().min(1).max(65535),
24088
+ source: LocalPortSourceEnum
24089
+ });
24090
+ var GetConnectionEndpointsResultSchema = object({
24091
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24092
+ /**
24093
+ * The port the hub built the LAN/loopback URLs with, and where that number
24094
+ * came from.
24095
+ *
24096
+ * Returned rather than merely applied, because "the URL is right" and "the
24097
+ * client can KNOW the URL is right" are different properties. A client that
24098
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24099
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24100
+ * race the candidate or discard it. With `source` it can: anything but
24101
+ * `caller-hint` is the hub's own socket.
24102
+ *
24103
+ * Absent on hubs predating this field — a client that finds it missing is
24104
+ * talking to an echoing hub and must degrade exactly as it does for
24105
+ * `caller-hint`.
24106
+ */
24107
+ localPort: AdvertisedLocalPortSchema
24108
+ });
24053
24109
  /**
24054
24110
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24055
24111
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24070,8 +24126,13 @@ var AllowedAddressesSchema = object({
24070
24126
  */
24071
24127
  addresses: array(string()).readonly() });
24072
24128
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24073
- /** Local hub HTTP port to use in base URLs. */
24074
- port: number().int().min(1).max(65535),
24129
+ /**
24130
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24131
+ * written against the echoing contract keep working; the hub uses it
24132
+ * only when it cannot read its own port, and says so via
24133
+ * `localPort.source === 'caller-hint'`.
24134
+ */
24135
+ port: number().int().min(1).max(65535).optional(),
24075
24136
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24076
24137
  * candidate. Default `true`. */
24077
24138
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.24",
3
+ "version": "1.2.25",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",