@camstack/addon-provider-unraid 0.2.24 → 0.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
@@ -18981,6 +18981,12 @@ var CameraStatusSchema = object({
18981
18981
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18982
18982
  fetchedAt: number()
18983
18983
  });
18984
+ var InferenceDeviceExclusionReasonSchema = _enum([
18985
+ "disabled",
18986
+ "unavailable",
18987
+ "cannot-host-camera-root",
18988
+ "accelerator-preferred"
18989
+ ]);
18984
18990
  var NodeInferenceDeviceSchema = object({
18985
18991
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18986
18992
  key: string(),
@@ -19011,7 +19017,17 @@ var NodeInferenceDeviceSchema = object({
19011
19017
  * available per format; this is the stored selection that becomes the
19012
19018
  * default for EVERY camera landing on this accelerator.
19013
19019
  */
19014
- steps: record(string(), DeviceStepConfigSchema).optional()
19020
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19021
+ /**
19022
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19023
+ * the reason the dispatcher drops it. Computed by the SAME
19024
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19025
+ * never disagree with the election — deriving it in the UI from
19026
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19027
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19028
+ * "an accelerator is serving" predicate).
19029
+ */
19030
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19015
19031
  });
19016
19032
  var NodeInferenceDevicesSchema = object({
19017
19033
  nodeId: string(),
@@ -23879,7 +23895,12 @@ var ListResultSchema = object({
23879
23895
  probedAt: number()
23880
23896
  });
23881
23897
  var PreferredSchema = LocalInterfaceSchema.nullable();
23882
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23898
+ /**
23899
+ * Candidate base URL for the SDK to race on connect. Order matters —
23900
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23901
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23902
+ */
23903
+ var ConnectionEndpointSchema = object({
23883
23904
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23884
23905
  label: string(),
23885
23906
  /** Fully-formed base URL with scheme + host + port. */
@@ -23922,7 +23943,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23922
23943
  * ordering between polls.
23923
23944
  */
23924
23945
  priority: number()
23925
- })).readonly() });
23946
+ });
23947
+ /**
23948
+ * Where the advertised local port came from. Ordered most → least
23949
+ * authoritative, and the whole point of returning it: a client must be able to
23950
+ * tell a FACT about the hub's socket from an echo of its own guess.
23951
+ */
23952
+ var LocalPortSourceEnum = _enum([
23953
+ "server-config",
23954
+ "server-env",
23955
+ "caller-hint",
23956
+ "default"
23957
+ ]);
23958
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23959
+ var AdvertisedLocalPortSchema = object({
23960
+ port: number().int().min(1).max(65535),
23961
+ source: LocalPortSourceEnum
23962
+ });
23963
+ var GetConnectionEndpointsResultSchema = object({
23964
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23965
+ /**
23966
+ * The port the hub built the LAN/loopback URLs with, and where that number
23967
+ * came from.
23968
+ *
23969
+ * Returned rather than merely applied, because "the URL is right" and "the
23970
+ * client can KNOW the URL is right" are different properties. A client that
23971
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23972
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23973
+ * race the candidate or discard it. With `source` it can: anything but
23974
+ * `caller-hint` is the hub's own socket.
23975
+ *
23976
+ * Absent on hubs predating this field — a client that finds it missing is
23977
+ * talking to an echoing hub and must degrade exactly as it does for
23978
+ * `caller-hint`.
23979
+ */
23980
+ localPort: AdvertisedLocalPortSchema
23981
+ });
23926
23982
  /**
23927
23983
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23928
23984
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23943,8 +23999,13 @@ var AllowedAddressesSchema = object({
23943
23999
  */
23944
24000
  addresses: array(string()).readonly() });
23945
24001
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23946
- /** Local hub HTTP port to use in base URLs. */
23947
- port: number().int().min(1).max(65535),
24002
+ /**
24003
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24004
+ * written against the echoing contract keep working; the hub uses it
24005
+ * only when it cannot read its own port, and says so via
24006
+ * `localPort.source === 'caller-hint'`.
24007
+ */
24008
+ port: number().int().min(1).max(65535).optional(),
23948
24009
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23949
24010
  * candidate. Default `true`. */
23950
24011
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -18980,6 +18980,12 @@ var CameraStatusSchema = object({
18980
18980
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18981
18981
  fetchedAt: number()
18982
18982
  });
18983
+ var InferenceDeviceExclusionReasonSchema = _enum([
18984
+ "disabled",
18985
+ "unavailable",
18986
+ "cannot-host-camera-root",
18987
+ "accelerator-preferred"
18988
+ ]);
18983
18989
  var NodeInferenceDeviceSchema = object({
18984
18990
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18985
18991
  key: string(),
@@ -19010,7 +19016,17 @@ var NodeInferenceDeviceSchema = object({
19010
19016
  * available per format; this is the stored selection that becomes the
19011
19017
  * default for EVERY camera landing on this accelerator.
19012
19018
  */
19013
- steps: record(string(), DeviceStepConfigSchema).optional()
19019
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19020
+ /**
19021
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19022
+ * the reason the dispatcher drops it. Computed by the SAME
19023
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19024
+ * never disagree with the election — deriving it in the UI from
19025
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19026
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19027
+ * "an accelerator is serving" predicate).
19028
+ */
19029
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19014
19030
  });
19015
19031
  var NodeInferenceDevicesSchema = object({
19016
19032
  nodeId: string(),
@@ -23878,7 +23894,12 @@ var ListResultSchema = object({
23878
23894
  probedAt: number()
23879
23895
  });
23880
23896
  var PreferredSchema = LocalInterfaceSchema.nullable();
23881
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23897
+ /**
23898
+ * Candidate base URL for the SDK to race on connect. Order matters —
23899
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23900
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23901
+ */
23902
+ var ConnectionEndpointSchema = object({
23882
23903
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23883
23904
  label: string(),
23884
23905
  /** Fully-formed base URL with scheme + host + port. */
@@ -23921,7 +23942,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23921
23942
  * ordering between polls.
23922
23943
  */
23923
23944
  priority: number()
23924
- })).readonly() });
23945
+ });
23946
+ /**
23947
+ * Where the advertised local port came from. Ordered most → least
23948
+ * authoritative, and the whole point of returning it: a client must be able to
23949
+ * tell a FACT about the hub's socket from an echo of its own guess.
23950
+ */
23951
+ var LocalPortSourceEnum = _enum([
23952
+ "server-config",
23953
+ "server-env",
23954
+ "caller-hint",
23955
+ "default"
23956
+ ]);
23957
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23958
+ var AdvertisedLocalPortSchema = object({
23959
+ port: number().int().min(1).max(65535),
23960
+ source: LocalPortSourceEnum
23961
+ });
23962
+ var GetConnectionEndpointsResultSchema = object({
23963
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23964
+ /**
23965
+ * The port the hub built the LAN/loopback URLs with, and where that number
23966
+ * came from.
23967
+ *
23968
+ * Returned rather than merely applied, because "the URL is right" and "the
23969
+ * client can KNOW the URL is right" are different properties. A client that
23970
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23971
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23972
+ * race the candidate or discard it. With `source` it can: anything but
23973
+ * `caller-hint` is the hub's own socket.
23974
+ *
23975
+ * Absent on hubs predating this field — a client that finds it missing is
23976
+ * talking to an echoing hub and must degrade exactly as it does for
23977
+ * `caller-hint`.
23978
+ */
23979
+ localPort: AdvertisedLocalPortSchema
23980
+ });
23925
23981
  /**
23926
23982
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23927
23983
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23942,8 +23998,13 @@ var AllowedAddressesSchema = object({
23942
23998
  */
23943
23999
  addresses: array(string()).readonly() });
23944
24000
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23945
- /** Local hub HTTP port to use in base URLs. */
23946
- port: number().int().min(1).max(65535),
24001
+ /**
24002
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24003
+ * written against the echoing contract keep working; the hub uses it
24004
+ * only when it cannot read its own port, and says so via
24005
+ * `localPort.source === 'caller-hint'`.
24006
+ */
24007
+ port: number().int().min(1).max(65535).optional(),
23947
24008
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23948
24009
  * candidate. Default `true`. */
23949
24010
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-unraid",
3
- "version": "0.2.24",
3
+ "version": "0.2.25",
4
4
  "description": "Unraid device-provider addon for CamStack — one Container per Unraid instance fanning out array, disk, docker and notification entities",
5
5
  "keywords": [
6
6
  "camstack",