@camstack/addon-matter-broker 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
@@ -19061,6 +19061,12 @@ var CameraStatusSchema = object({
19061
19061
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19062
19062
  fetchedAt: number()
19063
19063
  });
19064
+ var InferenceDeviceExclusionReasonSchema = _enum([
19065
+ "disabled",
19066
+ "unavailable",
19067
+ "cannot-host-camera-root",
19068
+ "accelerator-preferred"
19069
+ ]);
19064
19070
  var NodeInferenceDeviceSchema = object({
19065
19071
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19066
19072
  key: string$2(),
@@ -19091,7 +19097,17 @@ var NodeInferenceDeviceSchema = object({
19091
19097
  * available per format; this is the stored selection that becomes the
19092
19098
  * default for EVERY camera landing on this accelerator.
19093
19099
  */
19094
- steps: record(string$2(), DeviceStepConfigSchema).optional()
19100
+ steps: record(string$2(), DeviceStepConfigSchema).optional(),
19101
+ /**
19102
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19103
+ * the reason the dispatcher drops it. Computed by the SAME
19104
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19105
+ * never disagree with the election — deriving it in the UI from
19106
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19107
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19108
+ * "an accelerator is serving" predicate).
19109
+ */
19110
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19095
19111
  });
19096
19112
  var NodeInferenceDevicesSchema = object({
19097
19113
  nodeId: string$2(),
@@ -23959,7 +23975,12 @@ var ListResultSchema = object({
23959
23975
  probedAt: number()
23960
23976
  });
23961
23977
  var PreferredSchema = LocalInterfaceSchema.nullable();
23962
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23978
+ /**
23979
+ * Candidate base URL for the SDK to race on connect. Order matters —
23980
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23981
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23982
+ */
23983
+ var ConnectionEndpointSchema = object({
23963
23984
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23964
23985
  label: string$2(),
23965
23986
  /** Fully-formed base URL with scheme + host + port. */
@@ -24002,7 +24023,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24002
24023
  * ordering between polls.
24003
24024
  */
24004
24025
  priority: number()
24005
- })).readonly() });
24026
+ });
24027
+ /**
24028
+ * Where the advertised local port came from. Ordered most → least
24029
+ * authoritative, and the whole point of returning it: a client must be able to
24030
+ * tell a FACT about the hub's socket from an echo of its own guess.
24031
+ */
24032
+ var LocalPortSourceEnum = _enum([
24033
+ "server-config",
24034
+ "server-env",
24035
+ "caller-hint",
24036
+ "default"
24037
+ ]);
24038
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24039
+ var AdvertisedLocalPortSchema = object({
24040
+ port: number().int().min(1).max(65535),
24041
+ source: LocalPortSourceEnum
24042
+ });
24043
+ var GetConnectionEndpointsResultSchema = object({
24044
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24045
+ /**
24046
+ * The port the hub built the LAN/loopback URLs with, and where that number
24047
+ * came from.
24048
+ *
24049
+ * Returned rather than merely applied, because "the URL is right" and "the
24050
+ * client can KNOW the URL is right" are different properties. A client that
24051
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24052
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24053
+ * race the candidate or discard it. With `source` it can: anything but
24054
+ * `caller-hint` is the hub's own socket.
24055
+ *
24056
+ * Absent on hubs predating this field — a client that finds it missing is
24057
+ * talking to an echoing hub and must degrade exactly as it does for
24058
+ * `caller-hint`.
24059
+ */
24060
+ localPort: AdvertisedLocalPortSchema
24061
+ });
24006
24062
  /**
24007
24063
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24008
24064
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24023,8 +24079,13 @@ var AllowedAddressesSchema = object({
24023
24079
  */
24024
24080
  addresses: array(string$2()).readonly() });
24025
24081
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24026
- /** Local hub HTTP port to use in base URLs. */
24027
- port: number().int().min(1).max(65535),
24082
+ /**
24083
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24084
+ * written against the echoing contract keep working; the hub uses it
24085
+ * only when it cannot read its own port, and says so via
24086
+ * `localPort.source === 'caller-hint'`.
24087
+ */
24088
+ port: number().int().min(1).max(65535).optional(),
24028
24089
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24029
24090
  * candidate. Default `true`. */
24030
24091
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -19059,6 +19059,12 @@ var CameraStatusSchema = object({
19059
19059
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19060
19060
  fetchedAt: number()
19061
19061
  });
19062
+ var InferenceDeviceExclusionReasonSchema = _enum([
19063
+ "disabled",
19064
+ "unavailable",
19065
+ "cannot-host-camera-root",
19066
+ "accelerator-preferred"
19067
+ ]);
19062
19068
  var NodeInferenceDeviceSchema = object({
19063
19069
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19064
19070
  key: string$2(),
@@ -19089,7 +19095,17 @@ var NodeInferenceDeviceSchema = object({
19089
19095
  * available per format; this is the stored selection that becomes the
19090
19096
  * default for EVERY camera landing on this accelerator.
19091
19097
  */
19092
- steps: record(string$2(), DeviceStepConfigSchema).optional()
19098
+ steps: record(string$2(), DeviceStepConfigSchema).optional(),
19099
+ /**
19100
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19101
+ * the reason the dispatcher drops it. Computed by the SAME
19102
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19103
+ * never disagree with the election — deriving it in the UI from
19104
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19105
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19106
+ * "an accelerator is serving" predicate).
19107
+ */
19108
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19093
19109
  });
19094
19110
  var NodeInferenceDevicesSchema = object({
19095
19111
  nodeId: string$2(),
@@ -23957,7 +23973,12 @@ var ListResultSchema = object({
23957
23973
  probedAt: number()
23958
23974
  });
23959
23975
  var PreferredSchema = LocalInterfaceSchema.nullable();
23960
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23976
+ /**
23977
+ * Candidate base URL for the SDK to race on connect. Order matters —
23978
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23979
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23980
+ */
23981
+ var ConnectionEndpointSchema = object({
23961
23982
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23962
23983
  label: string$2(),
23963
23984
  /** Fully-formed base URL with scheme + host + port. */
@@ -24000,7 +24021,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24000
24021
  * ordering between polls.
24001
24022
  */
24002
24023
  priority: number()
24003
- })).readonly() });
24024
+ });
24025
+ /**
24026
+ * Where the advertised local port came from. Ordered most → least
24027
+ * authoritative, and the whole point of returning it: a client must be able to
24028
+ * tell a FACT about the hub's socket from an echo of its own guess.
24029
+ */
24030
+ var LocalPortSourceEnum = _enum([
24031
+ "server-config",
24032
+ "server-env",
24033
+ "caller-hint",
24034
+ "default"
24035
+ ]);
24036
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24037
+ var AdvertisedLocalPortSchema = object({
24038
+ port: number().int().min(1).max(65535),
24039
+ source: LocalPortSourceEnum
24040
+ });
24041
+ var GetConnectionEndpointsResultSchema = object({
24042
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24043
+ /**
24044
+ * The port the hub built the LAN/loopback URLs with, and where that number
24045
+ * came from.
24046
+ *
24047
+ * Returned rather than merely applied, because "the URL is right" and "the
24048
+ * client can KNOW the URL is right" are different properties. A client that
24049
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24050
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24051
+ * race the candidate or discard it. With `source` it can: anything but
24052
+ * `caller-hint` is the hub's own socket.
24053
+ *
24054
+ * Absent on hubs predating this field — a client that finds it missing is
24055
+ * talking to an echoing hub and must degrade exactly as it does for
24056
+ * `caller-hint`.
24057
+ */
24058
+ localPort: AdvertisedLocalPortSchema
24059
+ });
24004
24060
  /**
24005
24061
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24006
24062
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24021,8 +24077,13 @@ var AllowedAddressesSchema = object({
24021
24077
  */
24022
24078
  addresses: array(string$2()).readonly() });
24023
24079
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24024
- /** Local hub HTTP port to use in base URLs. */
24025
- port: number().int().min(1).max(65535),
24080
+ /**
24081
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24082
+ * written against the echoing contract keep working; the hub uses it
24083
+ * only when it cannot read its own port, and says so via
24084
+ * `localPort.source === 'caller-hint'`.
24085
+ */
24086
+ port: number().int().min(1).max(65535).optional(),
24026
24087
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24027
24088
  * candidate. Default `true`. */
24028
24089
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",