@camstack/addon-provider-ecowitt 0.2.23 → 0.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/addon.js CHANGED
@@ -18984,6 +18984,12 @@ var CameraStatusSchema = object({
18984
18984
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18985
18985
  fetchedAt: number()
18986
18986
  });
18987
+ var InferenceDeviceExclusionReasonSchema = _enum([
18988
+ "disabled",
18989
+ "unavailable",
18990
+ "cannot-host-camera-root",
18991
+ "accelerator-preferred"
18992
+ ]);
18987
18993
  var NodeInferenceDeviceSchema = object({
18988
18994
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18989
18995
  key: string(),
@@ -19014,7 +19020,17 @@ var NodeInferenceDeviceSchema = object({
19014
19020
  * available per format; this is the stored selection that becomes the
19015
19021
  * default for EVERY camera landing on this accelerator.
19016
19022
  */
19017
- steps: record(string(), DeviceStepConfigSchema).optional()
19023
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19024
+ /**
19025
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19026
+ * the reason the dispatcher drops it. Computed by the SAME
19027
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19028
+ * never disagree with the election — deriving it in the UI from
19029
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19030
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19031
+ * "an accelerator is serving" predicate).
19032
+ */
19033
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19018
19034
  });
19019
19035
  var NodeInferenceDevicesSchema = object({
19020
19036
  nodeId: string(),
@@ -23865,7 +23881,12 @@ var ListResultSchema = object({
23865
23881
  probedAt: number()
23866
23882
  });
23867
23883
  var PreferredSchema = LocalInterfaceSchema.nullable();
23868
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23884
+ /**
23885
+ * Candidate base URL for the SDK to race on connect. Order matters —
23886
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23887
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23888
+ */
23889
+ var ConnectionEndpointSchema = object({
23869
23890
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23870
23891
  label: string(),
23871
23892
  /** Fully-formed base URL with scheme + host + port. */
@@ -23908,7 +23929,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23908
23929
  * ordering between polls.
23909
23930
  */
23910
23931
  priority: number()
23911
- })).readonly() });
23932
+ });
23933
+ /**
23934
+ * Where the advertised local port came from. Ordered most → least
23935
+ * authoritative, and the whole point of returning it: a client must be able to
23936
+ * tell a FACT about the hub's socket from an echo of its own guess.
23937
+ */
23938
+ var LocalPortSourceEnum = _enum([
23939
+ "server-config",
23940
+ "server-env",
23941
+ "caller-hint",
23942
+ "default"
23943
+ ]);
23944
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23945
+ var AdvertisedLocalPortSchema = object({
23946
+ port: number().int().min(1).max(65535),
23947
+ source: LocalPortSourceEnum
23948
+ });
23949
+ var GetConnectionEndpointsResultSchema = object({
23950
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23951
+ /**
23952
+ * The port the hub built the LAN/loopback URLs with, and where that number
23953
+ * came from.
23954
+ *
23955
+ * Returned rather than merely applied, because "the URL is right" and "the
23956
+ * client can KNOW the URL is right" are different properties. A client that
23957
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23958
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23959
+ * race the candidate or discard it. With `source` it can: anything but
23960
+ * `caller-hint` is the hub's own socket.
23961
+ *
23962
+ * Absent on hubs predating this field — a client that finds it missing is
23963
+ * talking to an echoing hub and must degrade exactly as it does for
23964
+ * `caller-hint`.
23965
+ */
23966
+ localPort: AdvertisedLocalPortSchema
23967
+ });
23912
23968
  /**
23913
23969
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23914
23970
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23929,8 +23985,13 @@ var AllowedAddressesSchema = object({
23929
23985
  */
23930
23986
  addresses: array(string()).readonly() });
23931
23987
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23932
- /** Local hub HTTP port to use in base URLs. */
23933
- port: number().int().min(1).max(65535),
23988
+ /**
23989
+ * LEGACY HINT — do not send from new code. Kept optional so clients
23990
+ * written against the echoing contract keep working; the hub uses it
23991
+ * only when it cannot read its own port, and says so via
23992
+ * `localPort.source === 'caller-hint'`.
23993
+ */
23994
+ port: number().int().min(1).max(65535).optional(),
23934
23995
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23935
23996
  * candidate. Default `true`. */
23936
23997
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -18983,6 +18983,12 @@ var CameraStatusSchema = object({
18983
18983
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18984
18984
  fetchedAt: number()
18985
18985
  });
18986
+ var InferenceDeviceExclusionReasonSchema = _enum([
18987
+ "disabled",
18988
+ "unavailable",
18989
+ "cannot-host-camera-root",
18990
+ "accelerator-preferred"
18991
+ ]);
18986
18992
  var NodeInferenceDeviceSchema = object({
18987
18993
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18988
18994
  key: string(),
@@ -19013,7 +19019,17 @@ var NodeInferenceDeviceSchema = object({
19013
19019
  * available per format; this is the stored selection that becomes the
19014
19020
  * default for EVERY camera landing on this accelerator.
19015
19021
  */
19016
- steps: record(string(), DeviceStepConfigSchema).optional()
19022
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19023
+ /**
19024
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19025
+ * the reason the dispatcher drops it. Computed by the SAME
19026
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19027
+ * never disagree with the election — deriving it in the UI from
19028
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19029
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19030
+ * "an accelerator is serving" predicate).
19031
+ */
19032
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19017
19033
  });
19018
19034
  var NodeInferenceDevicesSchema = object({
19019
19035
  nodeId: string(),
@@ -23864,7 +23880,12 @@ var ListResultSchema = object({
23864
23880
  probedAt: number()
23865
23881
  });
23866
23882
  var PreferredSchema = LocalInterfaceSchema.nullable();
23867
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23883
+ /**
23884
+ * Candidate base URL for the SDK to race on connect. Order matters —
23885
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23886
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23887
+ */
23888
+ var ConnectionEndpointSchema = object({
23868
23889
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23869
23890
  label: string(),
23870
23891
  /** Fully-formed base URL with scheme + host + port. */
@@ -23907,7 +23928,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23907
23928
  * ordering between polls.
23908
23929
  */
23909
23930
  priority: number()
23910
- })).readonly() });
23931
+ });
23932
+ /**
23933
+ * Where the advertised local port came from. Ordered most → least
23934
+ * authoritative, and the whole point of returning it: a client must be able to
23935
+ * tell a FACT about the hub's socket from an echo of its own guess.
23936
+ */
23937
+ var LocalPortSourceEnum = _enum([
23938
+ "server-config",
23939
+ "server-env",
23940
+ "caller-hint",
23941
+ "default"
23942
+ ]);
23943
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23944
+ var AdvertisedLocalPortSchema = object({
23945
+ port: number().int().min(1).max(65535),
23946
+ source: LocalPortSourceEnum
23947
+ });
23948
+ var GetConnectionEndpointsResultSchema = object({
23949
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23950
+ /**
23951
+ * The port the hub built the LAN/loopback URLs with, and where that number
23952
+ * came from.
23953
+ *
23954
+ * Returned rather than merely applied, because "the URL is right" and "the
23955
+ * client can KNOW the URL is right" are different properties. A client that
23956
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23957
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23958
+ * race the candidate or discard it. With `source` it can: anything but
23959
+ * `caller-hint` is the hub's own socket.
23960
+ *
23961
+ * Absent on hubs predating this field — a client that finds it missing is
23962
+ * talking to an echoing hub and must degrade exactly as it does for
23963
+ * `caller-hint`.
23964
+ */
23965
+ localPort: AdvertisedLocalPortSchema
23966
+ });
23911
23967
  /**
23912
23968
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23913
23969
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23928,8 +23984,13 @@ var AllowedAddressesSchema = object({
23928
23984
  */
23929
23985
  addresses: array(string()).readonly() });
23930
23986
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23931
- /** Local hub HTTP port to use in base URLs. */
23932
- port: number().int().min(1).max(65535),
23987
+ /**
23988
+ * LEGACY HINT — do not send from new code. Kept optional so clients
23989
+ * written against the echoing contract keep working; the hub uses it
23990
+ * only when it cannot read its own port, and says so via
23991
+ * `localPort.source === 'caller-hint'`.
23992
+ */
23993
+ port: number().int().min(1).max(65535).optional(),
23933
23994
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23934
23995
  * candidate. Default `true`. */
23935
23996
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-ecowitt",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Ecowitt weather-station device-provider addon for CamStack — wraps the @apocaliss92/nodewitt local-poll / push client",
5
5
  "keywords": [
6
6
  "camstack",