@camstack/addon-export-alexa 1.2.30 → 1.2.32

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.
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  //#endregion
27
27
  let node_crypto = require("node:crypto");
28
28
  node_crypto = __toESM(node_crypto);
29
- //#region ../types/dist/event-category-XfKNtfCc.mjs
29
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
30
30
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
31
31
  EventCategory["SystemBoot"] = "system.boot";
32
32
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -42,6 +42,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
42
42
  */
43
43
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
44
44
  /**
45
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
46
+ * Emitted only when the material on disk actually changed, so an
47
+ * operator who trusted the old certificate by hand is told rather than
48
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
49
+ *
50
+ * Rule: docs/decisions/adr-0227-*.md
51
+ */
52
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
53
+ /**
45
54
  * A newer addon or server-root package version was found by the
46
55
  * authoritative registry check. Emitted once when any observed
47
56
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18940,6 +18949,12 @@ var CameraStatusSchema = object({
18940
18949
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18941
18950
  fetchedAt: number()
18942
18951
  });
18952
+ var InferenceDeviceExclusionReasonSchema = _enum([
18953
+ "disabled",
18954
+ "unavailable",
18955
+ "cannot-host-camera-root",
18956
+ "accelerator-preferred"
18957
+ ]);
18943
18958
  var NodeInferenceDeviceSchema = object({
18944
18959
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18945
18960
  key: string(),
@@ -18970,7 +18985,17 @@ var NodeInferenceDeviceSchema = object({
18970
18985
  * available per format; this is the stored selection that becomes the
18971
18986
  * default for EVERY camera landing on this accelerator.
18972
18987
  */
18973
- steps: record(string(), DeviceStepConfigSchema).optional()
18988
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18989
+ /**
18990
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18991
+ * the reason the dispatcher drops it. Computed by the SAME
18992
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18993
+ * never disagree with the election — deriving it in the UI from
18994
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18995
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18996
+ * "an accelerator is serving" predicate).
18997
+ */
18998
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18974
18999
  });
18975
19000
  var NodeInferenceDevicesSchema = object({
18976
19001
  nodeId: string(),
@@ -22728,7 +22753,12 @@ var ListResultSchema = object({
22728
22753
  probedAt: number()
22729
22754
  });
22730
22755
  var PreferredSchema = LocalInterfaceSchema.nullable();
22731
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22756
+ /**
22757
+ * Candidate base URL for the SDK to race on connect. Order matters —
22758
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22759
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22760
+ */
22761
+ var ConnectionEndpointSchema = object({
22732
22762
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22733
22763
  label: string(),
22734
22764
  /** Fully-formed base URL with scheme + host + port. */
@@ -22771,7 +22801,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22771
22801
  * ordering between polls.
22772
22802
  */
22773
22803
  priority: number()
22774
- })).readonly() });
22804
+ });
22805
+ /**
22806
+ * Where the advertised local port came from. Ordered most → least
22807
+ * authoritative, and the whole point of returning it: a client must be able to
22808
+ * tell a FACT about the hub's socket from an echo of its own guess.
22809
+ */
22810
+ var LocalPortSourceEnum = _enum([
22811
+ "server-config",
22812
+ "server-env",
22813
+ "caller-hint",
22814
+ "default"
22815
+ ]);
22816
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22817
+ var AdvertisedLocalPortSchema = object({
22818
+ port: number().int().min(1).max(65535),
22819
+ source: LocalPortSourceEnum
22820
+ });
22821
+ var GetConnectionEndpointsResultSchema = object({
22822
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22823
+ /**
22824
+ * The port the hub built the LAN/loopback URLs with, and where that number
22825
+ * came from.
22826
+ *
22827
+ * Returned rather than merely applied, because "the URL is right" and "the
22828
+ * client can KNOW the URL is right" are different properties. A client that
22829
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22830
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22831
+ * race the candidate or discard it. With `source` it can: anything but
22832
+ * `caller-hint` is the hub's own socket.
22833
+ *
22834
+ * Absent on hubs predating this field — a client that finds it missing is
22835
+ * talking to an echoing hub and must degrade exactly as it does for
22836
+ * `caller-hint`.
22837
+ */
22838
+ localPort: AdvertisedLocalPortSchema
22839
+ });
22775
22840
  /**
22776
22841
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22777
22842
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22792,8 +22857,13 @@ var AllowedAddressesSchema = object({
22792
22857
  */
22793
22858
  addresses: array(string()).readonly() });
22794
22859
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22795
- /** Local hub HTTP port to use in base URLs. */
22796
- port: number().int().min(1).max(65535),
22860
+ /**
22861
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22862
+ * written against the echoing contract keep working; the hub uses it
22863
+ * only when it cannot read its own port, and says so via
22864
+ * `localPort.source === 'caller-hint'`.
22865
+ */
22866
+ port: number().int().min(1).max(65535).optional(),
22797
22867
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22798
22868
  * candidate. Default `true`. */
22799
22869
  includeLoopback: boolean().optional(),
@@ -1,5 +1,5 @@
1
1
  import * as crypto$1 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);
@@ -18913,6 +18922,12 @@ var CameraStatusSchema = object({
18913
18922
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18914
18923
  fetchedAt: number()
18915
18924
  });
18925
+ var InferenceDeviceExclusionReasonSchema = _enum([
18926
+ "disabled",
18927
+ "unavailable",
18928
+ "cannot-host-camera-root",
18929
+ "accelerator-preferred"
18930
+ ]);
18916
18931
  var NodeInferenceDeviceSchema = object({
18917
18932
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18918
18933
  key: string(),
@@ -18943,7 +18958,17 @@ var NodeInferenceDeviceSchema = object({
18943
18958
  * available per format; this is the stored selection that becomes the
18944
18959
  * default for EVERY camera landing on this accelerator.
18945
18960
  */
18946
- steps: record(string(), DeviceStepConfigSchema).optional()
18961
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18962
+ /**
18963
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18964
+ * the reason the dispatcher drops it. Computed by the SAME
18965
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18966
+ * never disagree with the election — deriving it in the UI from
18967
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18968
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18969
+ * "an accelerator is serving" predicate).
18970
+ */
18971
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18947
18972
  });
18948
18973
  var NodeInferenceDevicesSchema = object({
18949
18974
  nodeId: string(),
@@ -22701,7 +22726,12 @@ var ListResultSchema = object({
22701
22726
  probedAt: number()
22702
22727
  });
22703
22728
  var PreferredSchema = LocalInterfaceSchema.nullable();
22704
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22729
+ /**
22730
+ * Candidate base URL for the SDK to race on connect. Order matters —
22731
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22732
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22733
+ */
22734
+ var ConnectionEndpointSchema = object({
22705
22735
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22706
22736
  label: string(),
22707
22737
  /** Fully-formed base URL with scheme + host + port. */
@@ -22744,7 +22774,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22744
22774
  * ordering between polls.
22745
22775
  */
22746
22776
  priority: number()
22747
- })).readonly() });
22777
+ });
22778
+ /**
22779
+ * Where the advertised local port came from. Ordered most → least
22780
+ * authoritative, and the whole point of returning it: a client must be able to
22781
+ * tell a FACT about the hub's socket from an echo of its own guess.
22782
+ */
22783
+ var LocalPortSourceEnum = _enum([
22784
+ "server-config",
22785
+ "server-env",
22786
+ "caller-hint",
22787
+ "default"
22788
+ ]);
22789
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22790
+ var AdvertisedLocalPortSchema = object({
22791
+ port: number().int().min(1).max(65535),
22792
+ source: LocalPortSourceEnum
22793
+ });
22794
+ var GetConnectionEndpointsResultSchema = object({
22795
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22796
+ /**
22797
+ * The port the hub built the LAN/loopback URLs with, and where that number
22798
+ * came from.
22799
+ *
22800
+ * Returned rather than merely applied, because "the URL is right" and "the
22801
+ * client can KNOW the URL is right" are different properties. A client that
22802
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22803
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22804
+ * race the candidate or discard it. With `source` it can: anything but
22805
+ * `caller-hint` is the hub's own socket.
22806
+ *
22807
+ * Absent on hubs predating this field — a client that finds it missing is
22808
+ * talking to an echoing hub and must degrade exactly as it does for
22809
+ * `caller-hint`.
22810
+ */
22811
+ localPort: AdvertisedLocalPortSchema
22812
+ });
22748
22813
  /**
22749
22814
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22750
22815
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22765,8 +22830,13 @@ var AllowedAddressesSchema = object({
22765
22830
  */
22766
22831
  addresses: array(string()).readonly() });
22767
22832
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22768
- /** Local hub HTTP port to use in base URLs. */
22769
- port: number().int().min(1).max(65535),
22833
+ /**
22834
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22835
+ * written against the echoing contract keep working; the hub uses it
22836
+ * only when it cannot read its own port, and says so via
22837
+ * `localPort.source === 'caller-hint'`.
22838
+ */
22839
+ port: number().int().min(1).max(65535).optional(),
22770
22840
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22771
22841
  * candidate. Default `true`. */
22772
22842
  includeLoopback: boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.30",
3
+ "version": "1.2.32",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",