@camstack/addon-import-alexa 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
@@ -19224,6 +19224,12 @@ var CameraStatusSchema = object({
19224
19224
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19225
19225
  fetchedAt: number()
19226
19226
  });
19227
+ var InferenceDeviceExclusionReasonSchema = _enum([
19228
+ "disabled",
19229
+ "unavailable",
19230
+ "cannot-host-camera-root",
19231
+ "accelerator-preferred"
19232
+ ]);
19227
19233
  var NodeInferenceDeviceSchema = object({
19228
19234
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19229
19235
  key: string(),
@@ -19254,7 +19260,17 @@ var NodeInferenceDeviceSchema = object({
19254
19260
  * available per format; this is the stored selection that becomes the
19255
19261
  * default for EVERY camera landing on this accelerator.
19256
19262
  */
19257
- steps: record(string(), DeviceStepConfigSchema).optional()
19263
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19264
+ /**
19265
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19266
+ * the reason the dispatcher drops it. Computed by the SAME
19267
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19268
+ * never disagree with the election — deriving it in the UI from
19269
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19270
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19271
+ * "an accelerator is serving" predicate).
19272
+ */
19273
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19258
19274
  });
19259
19275
  var NodeInferenceDevicesSchema = object({
19260
19276
  nodeId: string(),
@@ -24122,7 +24138,12 @@ var ListResultSchema = object({
24122
24138
  probedAt: number()
24123
24139
  });
24124
24140
  var PreferredSchema = LocalInterfaceSchema.nullable();
24125
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24141
+ /**
24142
+ * Candidate base URL for the SDK to race on connect. Order matters —
24143
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24144
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24145
+ */
24146
+ var ConnectionEndpointSchema = object({
24126
24147
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24127
24148
  label: string(),
24128
24149
  /** Fully-formed base URL with scheme + host + port. */
@@ -24165,7 +24186,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24165
24186
  * ordering between polls.
24166
24187
  */
24167
24188
  priority: number()
24168
- })).readonly() });
24189
+ });
24190
+ /**
24191
+ * Where the advertised local port came from. Ordered most → least
24192
+ * authoritative, and the whole point of returning it: a client must be able to
24193
+ * tell a FACT about the hub's socket from an echo of its own guess.
24194
+ */
24195
+ var LocalPortSourceEnum = _enum([
24196
+ "server-config",
24197
+ "server-env",
24198
+ "caller-hint",
24199
+ "default"
24200
+ ]);
24201
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24202
+ var AdvertisedLocalPortSchema = object({
24203
+ port: number().int().min(1).max(65535),
24204
+ source: LocalPortSourceEnum
24205
+ });
24206
+ var GetConnectionEndpointsResultSchema = object({
24207
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24208
+ /**
24209
+ * The port the hub built the LAN/loopback URLs with, and where that number
24210
+ * came from.
24211
+ *
24212
+ * Returned rather than merely applied, because "the URL is right" and "the
24213
+ * client can KNOW the URL is right" are different properties. A client that
24214
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24215
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24216
+ * race the candidate or discard it. With `source` it can: anything but
24217
+ * `caller-hint` is the hub's own socket.
24218
+ *
24219
+ * Absent on hubs predating this field — a client that finds it missing is
24220
+ * talking to an echoing hub and must degrade exactly as it does for
24221
+ * `caller-hint`.
24222
+ */
24223
+ localPort: AdvertisedLocalPortSchema
24224
+ });
24169
24225
  /**
24170
24226
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24171
24227
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24186,8 +24242,13 @@ var AllowedAddressesSchema = object({
24186
24242
  */
24187
24243
  addresses: array(string()).readonly() });
24188
24244
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24189
- /** Local hub HTTP port to use in base URLs. */
24190
- port: number().int().min(1).max(65535),
24245
+ /**
24246
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24247
+ * written against the echoing contract keep working; the hub uses it
24248
+ * only when it cannot read its own port, and says so via
24249
+ * `localPort.source === 'caller-hint'`.
24250
+ */
24251
+ port: number().int().min(1).max(65535).optional(),
24191
24252
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24192
24253
  * candidate. Default `true`. */
24193
24254
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -19224,6 +19224,12 @@ var CameraStatusSchema = object({
19224
19224
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19225
19225
  fetchedAt: number()
19226
19226
  });
19227
+ var InferenceDeviceExclusionReasonSchema = _enum([
19228
+ "disabled",
19229
+ "unavailable",
19230
+ "cannot-host-camera-root",
19231
+ "accelerator-preferred"
19232
+ ]);
19227
19233
  var NodeInferenceDeviceSchema = object({
19228
19234
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19229
19235
  key: string(),
@@ -19254,7 +19260,17 @@ var NodeInferenceDeviceSchema = object({
19254
19260
  * available per format; this is the stored selection that becomes the
19255
19261
  * default for EVERY camera landing on this accelerator.
19256
19262
  */
19257
- steps: record(string(), DeviceStepConfigSchema).optional()
19263
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19264
+ /**
19265
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19266
+ * the reason the dispatcher drops it. Computed by the SAME
19267
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19268
+ * never disagree with the election — deriving it in the UI from
19269
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19270
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19271
+ * "an accelerator is serving" predicate).
19272
+ */
19273
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19258
19274
  });
19259
19275
  var NodeInferenceDevicesSchema = object({
19260
19276
  nodeId: string(),
@@ -24122,7 +24138,12 @@ var ListResultSchema = object({
24122
24138
  probedAt: number()
24123
24139
  });
24124
24140
  var PreferredSchema = LocalInterfaceSchema.nullable();
24125
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24141
+ /**
24142
+ * Candidate base URL for the SDK to race on connect. Order matters —
24143
+ * the SDK should attempt these top-to-bottom with a short per-candidate
24144
+ * timeout (e.g. 1500ms) and cache the winner for the session.
24145
+ */
24146
+ var ConnectionEndpointSchema = object({
24126
24147
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
24127
24148
  label: string(),
24128
24149
  /** Fully-formed base URL with scheme + host + port. */
@@ -24165,7 +24186,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
24165
24186
  * ordering between polls.
24166
24187
  */
24167
24188
  priority: number()
24168
- })).readonly() });
24189
+ });
24190
+ /**
24191
+ * Where the advertised local port came from. Ordered most → least
24192
+ * authoritative, and the whole point of returning it: a client must be able to
24193
+ * tell a FACT about the hub's socket from an echo of its own guess.
24194
+ */
24195
+ var LocalPortSourceEnum = _enum([
24196
+ "server-config",
24197
+ "server-env",
24198
+ "caller-hint",
24199
+ "default"
24200
+ ]);
24201
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
24202
+ var AdvertisedLocalPortSchema = object({
24203
+ port: number().int().min(1).max(65535),
24204
+ source: LocalPortSourceEnum
24205
+ });
24206
+ var GetConnectionEndpointsResultSchema = object({
24207
+ endpoints: array(ConnectionEndpointSchema).readonly(),
24208
+ /**
24209
+ * The port the hub built the LAN/loopback URLs with, and where that number
24210
+ * came from.
24211
+ *
24212
+ * Returned rather than merely applied, because "the URL is right" and "the
24213
+ * client can KNOW the URL is right" are different properties. A client that
24214
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
24215
+ * a hub that echoed the port the client sent, so it cannot decide whether to
24216
+ * race the candidate or discard it. With `source` it can: anything but
24217
+ * `caller-hint` is the hub's own socket.
24218
+ *
24219
+ * Absent on hubs predating this field — a client that finds it missing is
24220
+ * talking to an echoing hub and must degrade exactly as it does for
24221
+ * `caller-hint`.
24222
+ */
24223
+ localPort: AdvertisedLocalPortSchema
24224
+ });
24169
24225
  /**
24170
24226
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
24171
24227
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -24186,8 +24242,13 @@ var AllowedAddressesSchema = object({
24186
24242
  */
24187
24243
  addresses: array(string()).readonly() });
24188
24244
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
24189
- /** Local hub HTTP port to use in base URLs. */
24190
- port: number().int().min(1).max(65535),
24245
+ /**
24246
+ * LEGACY HINT — do not send from new code. Kept optional so clients
24247
+ * written against the echoing contract keep working; the hub uses it
24248
+ * only when it cannot read its own port, and says so via
24249
+ * `localPort.source === 'caller-hint'`.
24250
+ */
24251
+ port: number().int().min(1).max(65535).optional(),
24191
24252
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
24192
24253
  * candidate. Default `true`. */
24193
24254
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.23",
3
+ "version": "0.2.24",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",