@camstack/addon-export-hap 1.2.35 → 1.2.36

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.
@@ -19440,6 +19440,12 @@ var CameraStatusSchema = object({
19440
19440
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19441
19441
  fetchedAt: number()
19442
19442
  });
19443
+ var InferenceDeviceExclusionReasonSchema = _enum([
19444
+ "disabled",
19445
+ "unavailable",
19446
+ "cannot-host-camera-root",
19447
+ "accelerator-preferred"
19448
+ ]);
19443
19449
  var NodeInferenceDeviceSchema = object({
19444
19450
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19445
19451
  key: string(),
@@ -19470,7 +19476,17 @@ var NodeInferenceDeviceSchema = object({
19470
19476
  * available per format; this is the stored selection that becomes the
19471
19477
  * default for EVERY camera landing on this accelerator.
19472
19478
  */
19473
- steps: record(string(), DeviceStepConfigSchema).optional()
19479
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19480
+ /**
19481
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19482
+ * the reason the dispatcher drops it. Computed by the SAME
19483
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19484
+ * never disagree with the election — deriving it in the UI from
19485
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19486
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19487
+ * "an accelerator is serving" predicate).
19488
+ */
19489
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19474
19490
  });
19475
19491
  var NodeInferenceDevicesSchema = object({
19476
19492
  nodeId: string(),
@@ -23264,7 +23280,12 @@ var ListResultSchema = object({
23264
23280
  probedAt: number()
23265
23281
  });
23266
23282
  var PreferredSchema = LocalInterfaceSchema.nullable();
23267
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23283
+ /**
23284
+ * Candidate base URL for the SDK to race on connect. Order matters —
23285
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23286
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23287
+ */
23288
+ var ConnectionEndpointSchema = object({
23268
23289
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23269
23290
  label: string(),
23270
23291
  /** Fully-formed base URL with scheme + host + port. */
@@ -23307,7 +23328,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23307
23328
  * ordering between polls.
23308
23329
  */
23309
23330
  priority: number()
23310
- })).readonly() });
23331
+ });
23332
+ /**
23333
+ * Where the advertised local port came from. Ordered most → least
23334
+ * authoritative, and the whole point of returning it: a client must be able to
23335
+ * tell a FACT about the hub's socket from an echo of its own guess.
23336
+ */
23337
+ var LocalPortSourceEnum = _enum([
23338
+ "server-config",
23339
+ "server-env",
23340
+ "caller-hint",
23341
+ "default"
23342
+ ]);
23343
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23344
+ var AdvertisedLocalPortSchema = object({
23345
+ port: number().int().min(1).max(65535),
23346
+ source: LocalPortSourceEnum
23347
+ });
23348
+ var GetConnectionEndpointsResultSchema = object({
23349
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23350
+ /**
23351
+ * The port the hub built the LAN/loopback URLs with, and where that number
23352
+ * came from.
23353
+ *
23354
+ * Returned rather than merely applied, because "the URL is right" and "the
23355
+ * client can KNOW the URL is right" are different properties. A client that
23356
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23357
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23358
+ * race the candidate or discard it. With `source` it can: anything but
23359
+ * `caller-hint` is the hub's own socket.
23360
+ *
23361
+ * Absent on hubs predating this field — a client that finds it missing is
23362
+ * talking to an echoing hub and must degrade exactly as it does for
23363
+ * `caller-hint`.
23364
+ */
23365
+ localPort: AdvertisedLocalPortSchema
23366
+ });
23311
23367
  /**
23312
23368
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23313
23369
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23328,8 +23384,13 @@ var AllowedAddressesSchema = object({
23328
23384
  */
23329
23385
  addresses: array(string()).readonly() });
23330
23386
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23331
- /** Local hub HTTP port to use in base URLs. */
23332
- port: number().int().min(1).max(65535),
23387
+ /**
23388
+ * LEGACY HINT — do not send from new code. Kept optional so clients
23389
+ * written against the echoing contract keep working; the hub uses it
23390
+ * only when it cannot read its own port, and says so via
23391
+ * `localPort.source === 'caller-hint'`.
23392
+ */
23393
+ port: number().int().min(1).max(65535).optional(),
23333
23394
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23334
23395
  * candidate. Default `true`. */
23335
23396
  includeLoopback: boolean().optional(),
@@ -19428,6 +19428,12 @@ var CameraStatusSchema = object({
19428
19428
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
19429
19429
  fetchedAt: number()
19430
19430
  });
19431
+ var InferenceDeviceExclusionReasonSchema = _enum([
19432
+ "disabled",
19433
+ "unavailable",
19434
+ "cannot-host-camera-root",
19435
+ "accelerator-preferred"
19436
+ ]);
19431
19437
  var NodeInferenceDeviceSchema = object({
19432
19438
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
19433
19439
  key: string(),
@@ -19458,7 +19464,17 @@ var NodeInferenceDeviceSchema = object({
19458
19464
  * available per format; this is the stored selection that becomes the
19459
19465
  * default for EVERY camera landing on this accelerator.
19460
19466
  */
19461
- steps: record(string(), DeviceStepConfigSchema).optional()
19467
+ steps: record(string(), DeviceStepConfigSchema).optional(),
19468
+ /**
19469
+ * `null` when the device IS a camera-root candidate on this node; otherwise
19470
+ * the reason the dispatcher drops it. Computed by the SAME
19471
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
19472
+ * never disagree with the election — deriving it in the UI from
19473
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
19474
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
19475
+ * "an accelerator is serving" predicate).
19476
+ */
19477
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
19462
19478
  });
19463
19479
  var NodeInferenceDevicesSchema = object({
19464
19480
  nodeId: string(),
@@ -23252,7 +23268,12 @@ var ListResultSchema = object({
23252
23268
  probedAt: number()
23253
23269
  });
23254
23270
  var PreferredSchema = LocalInterfaceSchema.nullable();
23255
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23271
+ /**
23272
+ * Candidate base URL for the SDK to race on connect. Order matters —
23273
+ * the SDK should attempt these top-to-bottom with a short per-candidate
23274
+ * timeout (e.g. 1500ms) and cache the winner for the session.
23275
+ */
23276
+ var ConnectionEndpointSchema = object({
23256
23277
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
23257
23278
  label: string(),
23258
23279
  /** Fully-formed base URL with scheme + host + port. */
@@ -23295,7 +23316,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
23295
23316
  * ordering between polls.
23296
23317
  */
23297
23318
  priority: number()
23298
- })).readonly() });
23319
+ });
23320
+ /**
23321
+ * Where the advertised local port came from. Ordered most → least
23322
+ * authoritative, and the whole point of returning it: a client must be able to
23323
+ * tell a FACT about the hub's socket from an echo of its own guess.
23324
+ */
23325
+ var LocalPortSourceEnum = _enum([
23326
+ "server-config",
23327
+ "server-env",
23328
+ "caller-hint",
23329
+ "default"
23330
+ ]);
23331
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
23332
+ var AdvertisedLocalPortSchema = object({
23333
+ port: number().int().min(1).max(65535),
23334
+ source: LocalPortSourceEnum
23335
+ });
23336
+ var GetConnectionEndpointsResultSchema = object({
23337
+ endpoints: array(ConnectionEndpointSchema).readonly(),
23338
+ /**
23339
+ * The port the hub built the LAN/loopback URLs with, and where that number
23340
+ * came from.
23341
+ *
23342
+ * Returned rather than merely applied, because "the URL is right" and "the
23343
+ * client can KNOW the URL is right" are different properties. A client that
23344
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
23345
+ * a hub that echoed the port the client sent, so it cannot decide whether to
23346
+ * race the candidate or discard it. With `source` it can: anything but
23347
+ * `caller-hint` is the hub's own socket.
23348
+ *
23349
+ * Absent on hubs predating this field — a client that finds it missing is
23350
+ * talking to an echoing hub and must degrade exactly as it does for
23351
+ * `caller-hint`.
23352
+ */
23353
+ localPort: AdvertisedLocalPortSchema
23354
+ });
23299
23355
  /**
23300
23356
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
23301
23357
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -23316,8 +23372,13 @@ var AllowedAddressesSchema = object({
23316
23372
  */
23317
23373
  addresses: array(string()).readonly() });
23318
23374
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
23319
- /** Local hub HTTP port to use in base URLs. */
23320
- port: number().int().min(1).max(65535),
23375
+ /**
23376
+ * LEGACY HINT — do not send from new code. Kept optional so clients
23377
+ * written against the echoing contract keep working; the hub uses it
23378
+ * only when it cannot read its own port, and says so via
23379
+ * `localPort.source === 'caller-hint'`.
23380
+ */
23381
+ port: number().int().min(1).max(65535).optional(),
23321
23382
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
23322
23383
  * candidate. Default `true`. */
23323
23384
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",