@camstack/addon-auth 1.2.27 → 1.2.29

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-XfKNtfCc.mjs
1
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -14,6 +14,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
18
+ * Emitted only when the material on disk actually changed, so an
19
+ * operator who trusted the old certificate by hand is told rather than
20
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
21
+ *
22
+ * Rule: docs/decisions/adr-0227-*.md
23
+ */
24
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
25
+ /**
17
26
  * A newer addon or server-root package version was found by the
18
27
  * authoritative registry check. Emitted once when any observed
19
28
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18799,6 +18808,12 @@ var CameraStatusSchema = object({
18799
18808
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18800
18809
  fetchedAt: number()
18801
18810
  });
18811
+ var InferenceDeviceExclusionReasonSchema = _enum([
18812
+ "disabled",
18813
+ "unavailable",
18814
+ "cannot-host-camera-root",
18815
+ "accelerator-preferred"
18816
+ ]);
18802
18817
  var NodeInferenceDeviceSchema = object({
18803
18818
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18804
18819
  key: string(),
@@ -18829,7 +18844,17 @@ var NodeInferenceDeviceSchema = object({
18829
18844
  * available per format; this is the stored selection that becomes the
18830
18845
  * default for EVERY camera landing on this accelerator.
18831
18846
  */
18832
- steps: record(string(), DeviceStepConfigSchema).optional()
18847
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18848
+ /**
18849
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18850
+ * the reason the dispatcher drops it. Computed by the SAME
18851
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18852
+ * never disagree with the election — deriving it in the UI from
18853
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18854
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18855
+ * "an accelerator is serving" predicate).
18856
+ */
18857
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18833
18858
  });
18834
18859
  var NodeInferenceDevicesSchema = object({
18835
18860
  nodeId: string(),
@@ -22604,7 +22629,12 @@ var ListResultSchema = object({
22604
22629
  probedAt: number()
22605
22630
  });
22606
22631
  var PreferredSchema = LocalInterfaceSchema.nullable();
22607
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22632
+ /**
22633
+ * Candidate base URL for the SDK to race on connect. Order matters —
22634
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22635
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22636
+ */
22637
+ var ConnectionEndpointSchema = object({
22608
22638
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22609
22639
  label: string(),
22610
22640
  /** Fully-formed base URL with scheme + host + port. */
@@ -22647,7 +22677,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22647
22677
  * ordering between polls.
22648
22678
  */
22649
22679
  priority: number()
22650
- })).readonly() });
22680
+ });
22681
+ /**
22682
+ * Where the advertised local port came from. Ordered most → least
22683
+ * authoritative, and the whole point of returning it: a client must be able to
22684
+ * tell a FACT about the hub's socket from an echo of its own guess.
22685
+ */
22686
+ var LocalPortSourceEnum = _enum([
22687
+ "server-config",
22688
+ "server-env",
22689
+ "caller-hint",
22690
+ "default"
22691
+ ]);
22692
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22693
+ var AdvertisedLocalPortSchema = object({
22694
+ port: number().int().min(1).max(65535),
22695
+ source: LocalPortSourceEnum
22696
+ });
22697
+ var GetConnectionEndpointsResultSchema = object({
22698
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22699
+ /**
22700
+ * The port the hub built the LAN/loopback URLs with, and where that number
22701
+ * came from.
22702
+ *
22703
+ * Returned rather than merely applied, because "the URL is right" and "the
22704
+ * client can KNOW the URL is right" are different properties. A client that
22705
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22706
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22707
+ * race the candidate or discard it. With `source` it can: anything but
22708
+ * `caller-hint` is the hub's own socket.
22709
+ *
22710
+ * Absent on hubs predating this field — a client that finds it missing is
22711
+ * talking to an echoing hub and must degrade exactly as it does for
22712
+ * `caller-hint`.
22713
+ */
22714
+ localPort: AdvertisedLocalPortSchema
22715
+ });
22651
22716
  /**
22652
22717
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22653
22718
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22668,8 +22733,13 @@ var AllowedAddressesSchema = object({
22668
22733
  */
22669
22734
  addresses: array(string()).readonly() });
22670
22735
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22671
- /** Local hub HTTP port to use in base URLs. */
22672
- port: number().int().min(1).max(65535),
22736
+ /**
22737
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22738
+ * written against the echoing contract keep working; the hub uses it
22739
+ * only when it cannot read its own port, and says so via
22740
+ * `localPort.source === 'caller-hint'`.
22741
+ */
22742
+ port: number().int().min(1).max(65535).optional(),
22673
22743
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22674
22744
  * candidate. Default `true`. */
22675
22745
  includeLoopback: boolean().optional(),
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-XfKNtfCc.mjs
1
+ //#region ../types/dist/event-category-CIa_iT6b.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -14,6 +14,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * The hub reissued its own TLS certificate at boot (`ensureTlsCert`).
18
+ * Emitted only when the material on disk actually changed, so an
19
+ * operator who trusted the old certificate by hand is told rather than
20
+ * discovering it as a browser error. Payload `TlsCertChangedPayload`.
21
+ *
22
+ * Rule: docs/decisions/adr-0227-*.md
23
+ */
24
+ EventCategory["SystemTlsCertChanged"] = "system.tls-cert-changed";
25
+ /**
17
26
  * A newer addon or server-root package version was found by the
18
27
  * authoritative registry check. Emitted once when any observed
19
28
  * `latestVersion` changes (or a package/node first appears behind);
@@ -18799,6 +18808,12 @@ var CameraStatusSchema = object({
18799
18808
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18800
18809
  fetchedAt: number()
18801
18810
  });
18811
+ var InferenceDeviceExclusionReasonSchema = _enum([
18812
+ "disabled",
18813
+ "unavailable",
18814
+ "cannot-host-camera-root",
18815
+ "accelerator-preferred"
18816
+ ]);
18802
18817
  var NodeInferenceDeviceSchema = object({
18803
18818
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18804
18819
  key: string(),
@@ -18829,7 +18844,17 @@ var NodeInferenceDeviceSchema = object({
18829
18844
  * available per format; this is the stored selection that becomes the
18830
18845
  * default for EVERY camera landing on this accelerator.
18831
18846
  */
18832
- steps: record(string(), DeviceStepConfigSchema).optional()
18847
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18848
+ /**
18849
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18850
+ * the reason the dispatcher drops it. Computed by the SAME
18851
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18852
+ * never disagree with the election — deriving it in the UI from
18853
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18854
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18855
+ * "an accelerator is serving" predicate).
18856
+ */
18857
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18833
18858
  });
18834
18859
  var NodeInferenceDevicesSchema = object({
18835
18860
  nodeId: string(),
@@ -22604,7 +22629,12 @@ var ListResultSchema = object({
22604
22629
  probedAt: number()
22605
22630
  });
22606
22631
  var PreferredSchema = LocalInterfaceSchema.nullable();
22607
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22632
+ /**
22633
+ * Candidate base URL for the SDK to race on connect. Order matters —
22634
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22635
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22636
+ */
22637
+ var ConnectionEndpointSchema = object({
22608
22638
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22609
22639
  label: string(),
22610
22640
  /** Fully-formed base URL with scheme + host + port. */
@@ -22647,7 +22677,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22647
22677
  * ordering between polls.
22648
22678
  */
22649
22679
  priority: number()
22650
- })).readonly() });
22680
+ });
22681
+ /**
22682
+ * Where the advertised local port came from. Ordered most → least
22683
+ * authoritative, and the whole point of returning it: a client must be able to
22684
+ * tell a FACT about the hub's socket from an echo of its own guess.
22685
+ */
22686
+ var LocalPortSourceEnum = _enum([
22687
+ "server-config",
22688
+ "server-env",
22689
+ "caller-hint",
22690
+ "default"
22691
+ ]);
22692
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22693
+ var AdvertisedLocalPortSchema = object({
22694
+ port: number().int().min(1).max(65535),
22695
+ source: LocalPortSourceEnum
22696
+ });
22697
+ var GetConnectionEndpointsResultSchema = object({
22698
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22699
+ /**
22700
+ * The port the hub built the LAN/loopback URLs with, and where that number
22701
+ * came from.
22702
+ *
22703
+ * Returned rather than merely applied, because "the URL is right" and "the
22704
+ * client can KNOW the URL is right" are different properties. A client that
22705
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22706
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22707
+ * race the candidate or discard it. With `source` it can: anything but
22708
+ * `caller-hint` is the hub's own socket.
22709
+ *
22710
+ * Absent on hubs predating this field — a client that finds it missing is
22711
+ * talking to an echoing hub and must degrade exactly as it does for
22712
+ * `caller-hint`.
22713
+ */
22714
+ localPort: AdvertisedLocalPortSchema
22715
+ });
22651
22716
  /**
22652
22717
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22653
22718
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22668,8 +22733,13 @@ var AllowedAddressesSchema = object({
22668
22733
  */
22669
22734
  addresses: array(string()).readonly() });
22670
22735
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
22671
- /** Local hub HTTP port to use in base URLs. */
22672
- port: number().int().min(1).max(65535),
22736
+ /**
22737
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22738
+ * written against the echoing contract keep working; the hub uses it
22739
+ * only when it cannot read its own port, and says so via
22740
+ * `localPort.source === 'caller-hint'`.
22741
+ */
22742
+ port: number().int().min(1).max(65535).optional(),
22673
22743
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22674
22744
  * candidate. Default `true`. */
22675
22745
  includeLoopback: boolean().optional(),
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-D3OyX5g7.js");
6
+ const require_dist = require("../dist-BtD60Z3y.js");
7
7
  //#region src/magic-link/auth-magic-link.addon.ts
8
8
  /**
9
9
  * Magic-link authentication addon.
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-C50pLI-l.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-f9F0zyoX.mjs";
2
2
  //#region src/magic-link/auth-magic-link.addon.ts
3
3
  /**
4
4
  * Magic-link authentication addon.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-D3OyX5g7.js");
6
+ const require_dist = require("../dist-BtD60Z3y.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  node_crypto = require_chunk.__toESM(node_crypto);
9
9
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-C50pLI-l.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-f9F0zyoX.mjs";
2
2
  import * as crypto$1 from "node:crypto";
3
3
  //#region node_modules/jose/dist/webapi/lib/buffer_utils.js
4
4
  var encoder = new TextEncoder();
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.26",
6
+ version: "1.2.28",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_auth_webauthn_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.94",
21
+ version: "1.2.96",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_auth_webauthn_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.64",
36
+ version: "1.2.66",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_auth_webauthn_widgets",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-Cek0wNdY.js");
6
- const require_dist = require("../dist-D3OyX5g7.js");
6
+ const require_dist = require("../dist-BtD60Z3y.js");
7
7
  let stream = require("stream");
8
8
  stream = require_chunk.__toESM(stream, 1);
9
9
  let http = require("http");
@@ -1,4 +1,4 @@
1
- import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-C50pLI-l.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, d as number, f as object, l as array, n as addonWidgetsSourceCapability, o as userPasskeysCapability, p as string, u as boolean } from "../dist-f9F0zyoX.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import Stream from "stream";
4
4
  import http from "http";
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.94",
39
+ version: "1.2.96",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.26",
48
+ version: "1.2.28",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.64",
84
+ version: "1.2.66",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-DdcGPUS2.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-DJWZPxOU.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-auth",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
4
4
  "description": "Authentication bundle — magic-link, OIDC, and WebAuthn/passkey. Multi-entry npm package shipping 3 addons under a single bundle; each addon keeps its own id, capabilities, and runner.",
5
5
  "keywords": [
6
6
  "camstack",