@camstack/addon-decoder-nodeav 1.2.23 → 1.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/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let node_crypto = require("node:crypto");
6
- //#region ../types/dist/event-category-XfKNtfCc.mjs
6
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -19,6 +19,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
19
19
  */
20
20
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
21
21
  /**
22
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
23
+ * Emitted only when the material on disk actually changed, so an
24
+ * operator who trusted the old certificate by hand is told rather than
25
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
26
+ *
27
+ * Rule: docs/decisions/adr-0227-*.md
28
+ */
29
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
30
+ /**
22
31
  * A newer addon or server-root package version was found by the
23
32
  * authoritative registry check. Emitted once when any observed
24
33
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18769,6 +18778,12 @@ var CameraStatusSchema = object({
18769
18778
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18770
18779
  fetchedAt: number()
18771
18780
  });
18781
+ var InferenceDeviceExclusionReasonSchema = _enum([
18782
+ "disabled",
18783
+ "unavailable",
18784
+ "cannot-host-camera-root",
18785
+ "accelerator-preferred"
18786
+ ]);
18772
18787
  var NodeInferenceDeviceSchema = object({
18773
18788
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18774
18789
  key: string(),
@@ -18799,7 +18814,17 @@ var NodeInferenceDeviceSchema = object({
18799
18814
  * available per format; this is the stored selection that becomes the
18800
18815
  * default for EVERY camera landing on this accelerator.
18801
18816
  */
18802
- steps: record(string(), DeviceStepConfigSchema).optional()
18817
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18818
+ /**
18819
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18820
+ * the reason the dispatcher drops it. Computed by the SAME
18821
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18822
+ * never disagree with the election — deriving it in the UI from
18823
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18824
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18825
+ * "an accelerator is serving" predicate).
18826
+ */
18827
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18803
18828
  });
18804
18829
  var NodeInferenceDevicesSchema = object({
18805
18830
  nodeId: string(),
@@ -22557,7 +22582,12 @@ var ListResultSchema = object({
22557
22582
  probedAt: number()
22558
22583
  });
22559
22584
  var PreferredSchema = LocalInterfaceSchema.nullable();
22560
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22585
+ /**
22586
+ * Candidate base URL for the SDK to race on connect. Order matters —
22587
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22588
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22589
+ */
22590
+ var ConnectionEndpointSchema = object({
22561
22591
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22562
22592
  label: string(),
22563
22593
  /** Fully-formed base URL with scheme + host + port. */
@@ -22600,7 +22630,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22600
22630
  * ordering between polls.
22601
22631
  */
22602
22632
  priority: number()
22603
- })).readonly() });
22633
+ });
22634
+ /**
22635
+ * Where the advertised local port came from. Ordered most → least
22636
+ * authoritative, and the whole point of returning it: a client must be able to
22637
+ * tell a FACT about the hub's socket from an echo of its own guess.
22638
+ */
22639
+ var LocalPortSourceEnum = _enum([
22640
+ "server-config",
22641
+ "server-env",
22642
+ "caller-hint",
22643
+ "default"
22644
+ ]);
22645
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22646
+ var AdvertisedLocalPortSchema = object({
22647
+ port: number().int().min(1).max(65535),
22648
+ source: LocalPortSourceEnum
22649
+ });
22650
+ var GetConnectionEndpointsResultSchema = object({
22651
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22652
+ /**
22653
+ * The port the hub built the LAN/loopback URLs with, and where that number
22654
+ * came from.
22655
+ *
22656
+ * Returned rather than merely applied, because "the URL is right" and "the
22657
+ * client can KNOW the URL is right" are different properties. A client that
22658
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22659
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22660
+ * race the candidate or discard it. With `source` it can: anything but
22661
+ * `caller-hint` is the hub's own socket.
22662
+ *
22663
+ * Absent on hubs predating this field — a client that finds it missing is
22664
+ * talking to an echoing hub and must degrade exactly as it does for
22665
+ * `caller-hint`.
22666
+ */
22667
+ localPort: AdvertisedLocalPortSchema
22668
+ });
22604
22669
  /**
22605
22670
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22606
22671
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22621,8 +22686,13 @@ var AllowedAddressesSchema = object({
22621
22686
  */
22622
22687
  addresses: array(string()).readonly() });
22623
22688
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22624
- /** Local hub HTTP port to use in base URLs. */
22625
- port: number().int().min(1).max(65535),
22689
+ /**
22690
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22691
+ * written against the echoing contract keep working; the hub uses it
22692
+ * only when it cannot read its own port, and says so via
22693
+ * `localPort.source === 'caller-hint'`.
22694
+ */
22695
+ port: number().int().min(1).max(65535).optional(),
22626
22696
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22627
22697
  * candidate. Default `true`. */
22628
22698
  includeLoopback: boolean().optional(),
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- //#region ../types/dist/event-category-XfKNtfCc.mjs
2
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -15,6 +15,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
15
15
  */
16
16
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
17
17
  /**
18
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
19
+ * Emitted only when the material on disk actually changed, so an
20
+ * operator who trusted the old certificate by hand is told rather than
21
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
22
+ *
23
+ * Rule: docs/decisions/adr-0227-*.md
24
+ */
25
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
26
+ /**
18
27
  * A newer addon or server-root package version was found by the
19
28
  * authoritative registry check. Emitted once when any observed
20
29
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18765,6 +18774,12 @@ var CameraStatusSchema = object({
18765
18774
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18766
18775
  fetchedAt: number()
18767
18776
  });
18777
+ var InferenceDeviceExclusionReasonSchema = _enum([
18778
+ "disabled",
18779
+ "unavailable",
18780
+ "cannot-host-camera-root",
18781
+ "accelerator-preferred"
18782
+ ]);
18768
18783
  var NodeInferenceDeviceSchema = object({
18769
18784
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18770
18785
  key: string(),
@@ -18795,7 +18810,17 @@ var NodeInferenceDeviceSchema = object({
18795
18810
  * available per format; this is the stored selection that becomes the
18796
18811
  * default for EVERY camera landing on this accelerator.
18797
18812
  */
18798
- steps: record(string(), DeviceStepConfigSchema).optional()
18813
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18814
+ /**
18815
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18816
+ * the reason the dispatcher drops it. Computed by the SAME
18817
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18818
+ * never disagree with the election — deriving it in the UI from
18819
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18820
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18821
+ * "an accelerator is serving" predicate).
18822
+ */
18823
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18799
18824
  });
18800
18825
  var NodeInferenceDevicesSchema = object({
18801
18826
  nodeId: string(),
@@ -22553,7 +22578,12 @@ var ListResultSchema = object({
22553
22578
  probedAt: number()
22554
22579
  });
22555
22580
  var PreferredSchema = LocalInterfaceSchema.nullable();
22556
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22581
+ /**
22582
+ * Candidate base URL for the SDK to race on connect. Order matters —
22583
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22584
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22585
+ */
22586
+ var ConnectionEndpointSchema = object({
22557
22587
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22558
22588
  label: string(),
22559
22589
  /** Fully-formed base URL with scheme + host + port. */
@@ -22596,7 +22626,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22596
22626
  * ordering between polls.
22597
22627
  */
22598
22628
  priority: number()
22599
- })).readonly() });
22629
+ });
22630
+ /**
22631
+ * Where the advertised local port came from. Ordered most → least
22632
+ * authoritative, and the whole point of returning it: a client must be able to
22633
+ * tell a FACT about the hub's socket from an echo of its own guess.
22634
+ */
22635
+ var LocalPortSourceEnum = _enum([
22636
+ "server-config",
22637
+ "server-env",
22638
+ "caller-hint",
22639
+ "default"
22640
+ ]);
22641
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22642
+ var AdvertisedLocalPortSchema = object({
22643
+ port: number().int().min(1).max(65535),
22644
+ source: LocalPortSourceEnum
22645
+ });
22646
+ var GetConnectionEndpointsResultSchema = object({
22647
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22648
+ /**
22649
+ * The port the hub built the LAN/loopback URLs with, and where that number
22650
+ * came from.
22651
+ *
22652
+ * Returned rather than merely applied, because "the URL is right" and "the
22653
+ * client can KNOW the URL is right" are different properties. A client that
22654
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22655
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22656
+ * race the candidate or discard it. With `source` it can: anything but
22657
+ * `caller-hint` is the hub's own socket.
22658
+ *
22659
+ * Absent on hubs predating this field — a client that finds it missing is
22660
+ * talking to an echoing hub and must degrade exactly as it does for
22661
+ * `caller-hint`.
22662
+ */
22663
+ localPort: AdvertisedLocalPortSchema
22664
+ });
22600
22665
  /**
22601
22666
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22602
22667
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22617,8 +22682,13 @@ var AllowedAddressesSchema = object({
22617
22682
  */
22618
22683
  addresses: array(string()).readonly() });
22619
22684
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22620
- /** Local hub HTTP port to use in base URLs. */
22621
- port: number().int().min(1).max(65535),
22685
+ /**
22686
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22687
+ * written against the echoing contract keep working; the hub uses it
22688
+ * only when it cannot read its own port, and says so via
22689
+ * `localPort.source === 'caller-hint'`.
22690
+ */
22691
+ port: number().int().min(1).max(65535).optional(),
22622
22692
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22623
22693
  * candidate. Default `true`. */
22624
22694
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",