@camstack/addon-provider-wyze 0.2.28 → 0.2.29

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