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