@camstack/addon-notifiers 1.2.28 → 1.2.30

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
@@ -29,7 +29,7 @@ let node_fs = require("node:fs");
29
29
  let node_path = require("node:path");
30
30
  node_path = __toESM(node_path);
31
31
  let node_url = require("node:url");
32
- //#region ../types/dist/event-category-XfKNtfCc.mjs
32
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
33
33
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
34
34
  EventCategory["SystemBoot"] = "system.boot";
35
35
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -45,6 +45,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
45
45
  */
46
46
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
47
47
  /**
48
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
49
+ * Emitted only when the material on disk actually changed, so an
50
+ * operator who trusted the old certificate by hand is told rather than
51
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
52
+ *
53
+ * Rule: docs/decisions/adr-0227-*.md
54
+ */
55
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
56
+ /**
48
57
  * A newer addon or server-root package version was found by the
49
58
  * authoritative registry check. Emitted once when any observed
50
59
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18827,6 +18836,12 @@ var CameraStatusSchema = object({
18827
18836
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18828
18837
  fetchedAt: number()
18829
18838
  });
18839
+ var InferenceDeviceExclusionReasonSchema = _enum([
18840
+ "disabled",
18841
+ "unavailable",
18842
+ "cannot-host-camera-root",
18843
+ "accelerator-preferred"
18844
+ ]);
18830
18845
  var NodeInferenceDeviceSchema = object({
18831
18846
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18832
18847
  key: string(),
@@ -18857,7 +18872,17 @@ var NodeInferenceDeviceSchema = object({
18857
18872
  * available per format; this is the stored selection that becomes the
18858
18873
  * default for EVERY camera landing on this accelerator.
18859
18874
  */
18860
- steps: record(string(), DeviceStepConfigSchema).optional()
18875
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18876
+ /**
18877
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18878
+ * the reason the dispatcher drops it. Computed by the SAME
18879
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18880
+ * never disagree with the election — deriving it in the UI from
18881
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18882
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18883
+ * "an accelerator is serving" predicate).
18884
+ */
18885
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18861
18886
  });
18862
18887
  var NodeInferenceDevicesSchema = object({
18863
18888
  nodeId: string(),
@@ -22615,7 +22640,12 @@ var ListResultSchema = object({
22615
22640
  probedAt: number()
22616
22641
  });
22617
22642
  var PreferredSchema = LocalInterfaceSchema.nullable();
22618
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22643
+ /**
22644
+ * Candidate base URL for the SDK to race on connect. Order matters —
22645
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22646
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22647
+ */
22648
+ var ConnectionEndpointSchema = object({
22619
22649
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22620
22650
  label: string(),
22621
22651
  /** Fully-formed base URL with scheme + host + port. */
@@ -22658,7 +22688,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22658
22688
  * ordering between polls.
22659
22689
  */
22660
22690
  priority: number()
22661
- })).readonly() });
22691
+ });
22692
+ /**
22693
+ * Where the advertised local port came from. Ordered most → least
22694
+ * authoritative, and the whole point of returning it: a client must be able to
22695
+ * tell a FACT about the hub's socket from an echo of its own guess.
22696
+ */
22697
+ var LocalPortSourceEnum = _enum([
22698
+ "server-config",
22699
+ "server-env",
22700
+ "caller-hint",
22701
+ "default"
22702
+ ]);
22703
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22704
+ var AdvertisedLocalPortSchema = object({
22705
+ port: number().int().min(1).max(65535),
22706
+ source: LocalPortSourceEnum
22707
+ });
22708
+ var GetConnectionEndpointsResultSchema = object({
22709
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22710
+ /**
22711
+ * The port the hub built the LAN/loopback URLs with, and where that number
22712
+ * came from.
22713
+ *
22714
+ * Returned rather than merely applied, because "the URL is right" and "the
22715
+ * client can KNOW the URL is right" are different properties. A client that
22716
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22717
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22718
+ * race the candidate or discard it. With `source` it can: anything but
22719
+ * `caller-hint` is the hub's own socket.
22720
+ *
22721
+ * Absent on hubs predating this field — a client that finds it missing is
22722
+ * talking to an echoing hub and must degrade exactly as it does for
22723
+ * `caller-hint`.
22724
+ */
22725
+ localPort: AdvertisedLocalPortSchema
22726
+ });
22662
22727
  /**
22663
22728
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22664
22729
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22679,8 +22744,13 @@ var AllowedAddressesSchema = object({
22679
22744
  */
22680
22745
  addresses: array(string()).readonly() });
22681
22746
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22682
- /** Local hub HTTP port to use in base URLs. */
22683
- port: number().int().min(1).max(65535),
22747
+ /**
22748
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22749
+ * written against the echoing contract keep working; the hub uses it
22750
+ * only when it cannot read its own port, and says so via
22751
+ * `localPort.source === 'caller-hint'`.
22752
+ */
22753
+ port: number().int().min(1).max(65535).optional(),
22684
22754
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22685
22755
  * candidate. Default `true`. */
22686
22756
  includeLoopback: boolean().optional(),
package/dist/addon.mjs CHANGED
@@ -2,7 +2,7 @@ import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
2
2
  import { readFileSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- //#region ../types/dist/event-category-XfKNtfCc.mjs
5
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -18,6 +18,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
18
18
  */
19
19
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
20
20
  /**
21
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
22
+ * Emitted only when the material on disk actually changed, so an
23
+ * operator who trusted the old certificate by hand is told rather than
24
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
25
+ *
26
+ * Rule: docs/decisions/adr-0227-*.md
27
+ */
28
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
29
+ /**
21
30
  * A newer addon or server-root package version was found by the
22
31
  * authoritative registry check. Emitted once when any observed
23
32
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18800,6 +18809,12 @@ var CameraStatusSchema = object({
18800
18809
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18801
18810
  fetchedAt: number()
18802
18811
  });
18812
+ var InferenceDeviceExclusionReasonSchema = _enum([
18813
+ "disabled",
18814
+ "unavailable",
18815
+ "cannot-host-camera-root",
18816
+ "accelerator-preferred"
18817
+ ]);
18803
18818
  var NodeInferenceDeviceSchema = object({
18804
18819
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18805
18820
  key: string(),
@@ -18830,7 +18845,17 @@ var NodeInferenceDeviceSchema = object({
18830
18845
  * available per format; this is the stored selection that becomes the
18831
18846
  * default for EVERY camera landing on this accelerator.
18832
18847
  */
18833
- steps: record(string(), DeviceStepConfigSchema).optional()
18848
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18849
+ /**
18850
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18851
+ * the reason the dispatcher drops it. Computed by the SAME
18852
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18853
+ * never disagree with the election — deriving it in the UI from
18854
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18855
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18856
+ * "an accelerator is serving" predicate).
18857
+ */
18858
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18834
18859
  });
18835
18860
  var NodeInferenceDevicesSchema = object({
18836
18861
  nodeId: string(),
@@ -22588,7 +22613,12 @@ var ListResultSchema = object({
22588
22613
  probedAt: number()
22589
22614
  });
22590
22615
  var PreferredSchema = LocalInterfaceSchema.nullable();
22591
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22616
+ /**
22617
+ * Candidate base URL for the SDK to race on connect. Order matters —
22618
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22619
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22620
+ */
22621
+ var ConnectionEndpointSchema = object({
22592
22622
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22593
22623
  label: string(),
22594
22624
  /** Fully-formed base URL with scheme + host + port. */
@@ -22631,7 +22661,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22631
22661
  * ordering between polls.
22632
22662
  */
22633
22663
  priority: number()
22634
- })).readonly() });
22664
+ });
22665
+ /**
22666
+ * Where the advertised local port came from. Ordered most → least
22667
+ * authoritative, and the whole point of returning it: a client must be able to
22668
+ * tell a FACT about the hub's socket from an echo of its own guess.
22669
+ */
22670
+ var LocalPortSourceEnum = _enum([
22671
+ "server-config",
22672
+ "server-env",
22673
+ "caller-hint",
22674
+ "default"
22675
+ ]);
22676
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22677
+ var AdvertisedLocalPortSchema = object({
22678
+ port: number().int().min(1).max(65535),
22679
+ source: LocalPortSourceEnum
22680
+ });
22681
+ var GetConnectionEndpointsResultSchema = object({
22682
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22683
+ /**
22684
+ * The port the hub built the LAN/loopback URLs with, and where that number
22685
+ * came from.
22686
+ *
22687
+ * Returned rather than merely applied, because "the URL is right" and "the
22688
+ * client can KNOW the URL is right" are different properties. A client that
22689
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22690
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22691
+ * race the candidate or discard it. With `source` it can: anything but
22692
+ * `caller-hint` is the hub's own socket.
22693
+ *
22694
+ * Absent on hubs predating this field — a client that finds it missing is
22695
+ * talking to an echoing hub and must degrade exactly as it does for
22696
+ * `caller-hint`.
22697
+ */
22698
+ localPort: AdvertisedLocalPortSchema
22699
+ });
22635
22700
  /**
22636
22701
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22637
22702
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22652,8 +22717,13 @@ var AllowedAddressesSchema = object({
22652
22717
  */
22653
22718
  addresses: array(string()).readonly() });
22654
22719
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22655
- /** Local hub HTTP port to use in base URLs. */
22656
- port: number().int().min(1).max(65535),
22720
+ /**
22721
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22722
+ * written against the echoing contract keep working; the hub uses it
22723
+ * only when it cannot read its own port, and says so via
22724
+ * `localPort.source === 'caller-hint'`.
22725
+ */
22726
+ port: number().int().min(1).max(65535).optional(),
22657
22727
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22658
22728
  * candidate. Default `true`. */
22659
22729
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",