@camstack/addon-provider-homematic 1.2.25 → 1.2.26

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
@@ -19056,6 +19056,12 @@ var CameraStatusSchema = object({
19056
19056
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19057
19057
  fetchedAt: number()
19058
19058
  });
19059
+ var InferenceDeviceExclusionReasonSchema = _enum([
19060
+ "disabled",
19061
+ "unavailable",
19062
+ "cannot-host-camera-root",
19063
+ "accelerator-preferred"
19064
+ ]);
19059
19065
  var NodeInferenceDeviceSchema = object({
19060
19066
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19061
19067
  key: string(),
@@ -19086,7 +19092,17 @@ var NodeInferenceDeviceSchema = object({
19086
19092
  * available per format; this is the stored selection that becomes the
19087
19093
  * default for EVERY camera landing on this accelerator.
19088
19094
  */
19089
- steps: record(string(), DeviceStepConfigSchema).optional()
19095
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19096
+ /**
19097
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19098
+ * the reason the dispatcher drops it. Computed by the SAME
19099
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19100
+ * never disagree with the election — deriving it in the UI from
19101
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19102
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19103
+ * "an accelerator is serving" predicate).
19104
+ */
19105
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19090
19106
  });
19091
19107
  var NodeInferenceDevicesSchema = object({
19092
19108
  nodeId: string(),
@@ -23937,7 +23953,12 @@ var ListResultSchema = object({
23937
23953
  probedAt: number()
23938
23954
  });
23939
23955
  var PreferredSchema = LocalInterfaceSchema.nullable();
23940
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23956
+ /**
23957
+ * Candidate base URL for the SDK to race on connect. Order matters —
23958
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23959
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23960
+ */
23961
+ var ConnectionEndpointSchema = object({
23941
23962
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23942
23963
  label: string(),
23943
23964
  /** Fully-formed base URL with scheme + host + port. */
@@ -23980,7 +24001,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23980
24001
  * ordering between polls.
23981
24002
  */
23982
24003
  priority: number()
23983
- })).readonly() });
24004
+ });
24005
+ /**
24006
+ * Where the advertised local port came from. Ordered most → least
24007
+ * authoritative, and the whole point of returning it: a client must be able to
24008
+ * tell a FACT about the hub's socket from an echo of its own guess.
24009
+ */
24010
+ var LocalPortSourceEnum = _enum([
24011
+ "server-config",
24012
+ "server-env",
24013
+ "caller-hint",
24014
+ "default"
24015
+ ]);
24016
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24017
+ var AdvertisedLocalPortSchema = object({
24018
+ port: number().int().min(1).max(65535),
24019
+ source: LocalPortSourceEnum
24020
+ });
24021
+ var GetConnectionEndpointsResultSchema = object({
24022
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24023
+ /**
24024
+ * The port the hub built the LAN/loopback URLs with, and where that number
24025
+ * came from.
24026
+ *
24027
+ * Returned rather than merely applied, because "the URL is right" and "the
24028
+ * client can KNOW the URL is right" are different properties. A client that
24029
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24030
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24031
+ * race the candidate or discard it. With `source` it can: anything but
24032
+ * `caller-hint` is the hub's own socket.
24033
+ *
24034
+ * Absent on hubs predating this field — a client that finds it missing is
24035
+ * talking to an echoing hub and must degrade exactly as it does for
24036
+ * `caller-hint`.
24037
+ */
24038
+ localPort: AdvertisedLocalPortSchema
24039
+ });
23984
24040
  /**
23985
24041
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23986
24042
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24001,8 +24057,13 @@ var AllowedAddressesSchema = object({
24001
24057
  */
24002
24058
  addresses: array(string()).readonly() });
24003
24059
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24004
- /** Local hub HTTP port to use in base URLs. */
24005
- port: number().int().min(1).max(65535),
24060
+ /**
24061
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24062
+ * written against the echoing contract keep working; the hub uses it
24063
+ * only when it cannot read its own port, and says so via
24064
+ * `localPort.source === 'caller-hint'`.
24065
+ */
24066
+ port: number().int().min(1).max(65535).optional(),
24006
24067
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24007
24068
  * candidate. Default `true`. */
24008
24069
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -19057,6 +19057,12 @@ var CameraStatusSchema = object({
19057
19057
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19058
19058
  fetchedAt: number()
19059
19059
  });
19060
+ var InferenceDeviceExclusionReasonSchema = _enum([
19061
+ "disabled",
19062
+ "unavailable",
19063
+ "cannot-host-camera-root",
19064
+ "accelerator-preferred"
19065
+ ]);
19060
19066
  var NodeInferenceDeviceSchema = object({
19061
19067
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19062
19068
  key: string(),
@@ -19087,7 +19093,17 @@ var NodeInferenceDeviceSchema = object({
19087
19093
  * available per format; this is the stored selection that becomes the
19088
19094
  * default for EVERY camera landing on this accelerator.
19089
19095
  */
19090
- steps: record(string(), DeviceStepConfigSchema).optional()
19096
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19097
+ /**
19098
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19099
+ * the reason the dispatcher drops it. Computed by the SAME
19100
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19101
+ * never disagree with the election — deriving it in the UI from
19102
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19103
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19104
+ * "an accelerator is serving" predicate).
19105
+ */
19106
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19091
19107
  });
19092
19108
  var NodeInferenceDevicesSchema = object({
19093
19109
  nodeId: string(),
@@ -23938,7 +23954,12 @@ var ListResultSchema = object({
23938
23954
  probedAt: number()
23939
23955
  });
23940
23956
  var PreferredSchema = LocalInterfaceSchema.nullable();
23941
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23957
+ /**
23958
+ * Candidate base URL for the SDK to race on connect. Order matters —
23959
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23960
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23961
+ */
23962
+ var ConnectionEndpointSchema = object({
23942
23963
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23943
23964
  label: string(),
23944
23965
  /** Fully-formed base URL with scheme + host + port. */
@@ -23981,7 +24002,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23981
24002
  * ordering between polls.
23982
24003
  */
23983
24004
  priority: number()
23984
- })).readonly() });
24005
+ });
24006
+ /**
24007
+ * Where the advertised local port came from. Ordered most → least
24008
+ * authoritative, and the whole point of returning it: a client must be able to
24009
+ * tell a FACT about the hub's socket from an echo of its own guess.
24010
+ */
24011
+ var LocalPortSourceEnum = _enum([
24012
+ "server-config",
24013
+ "server-env",
24014
+ "caller-hint",
24015
+ "default"
24016
+ ]);
24017
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24018
+ var AdvertisedLocalPortSchema = object({
24019
+ port: number().int().min(1).max(65535),
24020
+ source: LocalPortSourceEnum
24021
+ });
24022
+ var GetConnectionEndpointsResultSchema = object({
24023
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24024
+ /**
24025
+ * The port the hub built the LAN/loopback URLs with, and where that number
24026
+ * came from.
24027
+ *
24028
+ * Returned rather than merely applied, because "the URL is right" and "the
24029
+ * client can KNOW the URL is right" are different properties. A client that
24030
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24031
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24032
+ * race the candidate or discard it. With `source` it can: anything but
24033
+ * `caller-hint` is the hub's own socket.
24034
+ *
24035
+ * Absent on hubs predating this field — a client that finds it missing is
24036
+ * talking to an echoing hub and must degrade exactly as it does for
24037
+ * `caller-hint`.
24038
+ */
24039
+ localPort: AdvertisedLocalPortSchema
24040
+ });
23985
24041
  /**
23986
24042
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23987
24043
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24002,8 +24058,13 @@ var AllowedAddressesSchema = object({
24002
24058
  */
24003
24059
  addresses: array(string()).readonly() });
24004
24060
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24005
- /** Local hub HTTP port to use in base URLs. */
24006
- port: number().int().min(1).max(65535),
24061
+ /**
24062
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24063
+ * written against the echoing contract keep working; the hub uses it
24064
+ * only when it cannot read its own port, and says so via
24065
+ * `localPort.source === 'caller-hint'`.
24066
+ */
24067
+ port: number().int().min(1).max(65535).optional(),
24007
24068
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24008
24069
  * candidate. Default `true`. */
24009
24070
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",