@camstack/addon-auth 1.2.27 → 1.2.28

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.
@@ -18799,6 +18799,12 @@ var CameraStatusSchema = object({
18799
18799
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18800
18800
  fetchedAt: number()
18801
18801
  });
18802
+ var InferenceDeviceExclusionReasonSchema = _enum([
18803
+ "disabled",
18804
+ "unavailable",
18805
+ "cannot-host-camera-root",
18806
+ "accelerator-preferred"
18807
+ ]);
18802
18808
  var NodeInferenceDeviceSchema = object({
18803
18809
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18804
18810
  key: string(),
@@ -18829,7 +18835,17 @@ var NodeInferenceDeviceSchema = object({
18829
18835
  * available per format; this is the stored selection that becomes the
18830
18836
  * default for EVERY camera landing on this accelerator.
18831
18837
  */
18832
- steps: record(string(), DeviceStepConfigSchema).optional()
18838
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18839
+ /**
18840
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18841
+ * the reason the dispatcher drops it. Computed by the SAME
18842
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18843
+ * never disagree with the election — deriving it in the UI from
18844
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18845
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18846
+ * "an accelerator is serving" predicate).
18847
+ */
18848
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18833
18849
  });
18834
18850
  var NodeInferenceDevicesSchema = object({
18835
18851
  nodeId: string(),
@@ -22604,7 +22620,12 @@ var ListResultSchema = object({
22604
22620
  probedAt: number()
22605
22621
  });
22606
22622
  var PreferredSchema = LocalInterfaceSchema.nullable();
22607
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22623
+ /**
22624
+ * Candidate base URL for the SDK to race on connect. Order matters —
22625
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22626
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22627
+ */
22628
+ var ConnectionEndpointSchema = object({
22608
22629
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22609
22630
  label: string(),
22610
22631
  /** Fully-formed base URL with scheme + host + port. */
@@ -22647,7 +22668,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22647
22668
  * ordering between polls.
22648
22669
  */
22649
22670
  priority: number()
22650
- })).readonly() });
22671
+ });
22672
+ /**
22673
+ * Where the advertised local port came from. Ordered most → least
22674
+ * authoritative, and the whole point of returning it: a client must be able to
22675
+ * tell a FACT about the hub's socket from an echo of its own guess.
22676
+ */
22677
+ var LocalPortSourceEnum = _enum([
22678
+ "server-config",
22679
+ "server-env",
22680
+ "caller-hint",
22681
+ "default"
22682
+ ]);
22683
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22684
+ var AdvertisedLocalPortSchema = object({
22685
+ port: number().int().min(1).max(65535),
22686
+ source: LocalPortSourceEnum
22687
+ });
22688
+ var GetConnectionEndpointsResultSchema = object({
22689
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22690
+ /**
22691
+ * The port the hub built the LAN/loopback URLs with, and where that number
22692
+ * came from.
22693
+ *
22694
+ * Returned rather than merely applied, because "the URL is right" and "the
22695
+ * client can KNOW the URL is right" are different properties. A client that
22696
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22697
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22698
+ * race the candidate or discard it. With `source` it can: anything but
22699
+ * `caller-hint` is the hub's own socket.
22700
+ *
22701
+ * Absent on hubs predating this field — a client that finds it missing is
22702
+ * talking to an echoing hub and must degrade exactly as it does for
22703
+ * `caller-hint`.
22704
+ */
22705
+ localPort: AdvertisedLocalPortSchema
22706
+ });
22651
22707
  /**
22652
22708
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22653
22709
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22668,8 +22724,13 @@ var AllowedAddressesSchema = object({
22668
22724
  */
22669
22725
  addresses: array(string()).readonly() });
22670
22726
  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),
22727
+ /**
22728
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22729
+ * written against the echoing contract keep working; the hub uses it
22730
+ * only when it cannot read its own port, and says so via
22731
+ * `localPort.source === 'caller-hint'`.
22732
+ */
22733
+ port: number().int().min(1).max(65535).optional(),
22673
22734
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22674
22735
  * candidate. Default `true`. */
22675
22736
  includeLoopback: boolean().optional(),
@@ -18799,6 +18799,12 @@ var CameraStatusSchema = object({
18799
18799
  /** Unix timestamp (ms) when this snapshot was composed server-side. */
18800
18800
  fetchedAt: number()
18801
18801
  });
18802
+ var InferenceDeviceExclusionReasonSchema = _enum([
18803
+ "disabled",
18804
+ "unavailable",
18805
+ "cannot-host-camera-root",
18806
+ "accelerator-preferred"
18807
+ ]);
18802
18808
  var NodeInferenceDeviceSchema = object({
18803
18809
  /** Stable per-node device key, e.g. `openvino:npu`, `edgetpu:usb`, `cpu`. */
18804
18810
  key: string(),
@@ -18829,7 +18835,17 @@ var NodeInferenceDeviceSchema = object({
18829
18835
  * available per format; this is the stored selection that becomes the
18830
18836
  * default for EVERY camera landing on this accelerator.
18831
18837
  */
18832
- steps: record(string(), DeviceStepConfigSchema).optional()
18838
+ steps: record(string(), DeviceStepConfigSchema).optional(),
18839
+ /**
18840
+ * `null` when the device IS a camera-root candidate on this node; otherwise
18841
+ * the reason the dispatcher drops it. Computed by the SAME
18842
+ * `resolveInferenceDeviceEligibility` the dispatcher runs, so this view can
18843
+ * never disagree with the election — deriving it in the UI from
18844
+ * `enabled`/`available` would silently miss `cannot-host-camera-root` (needs
18845
+ * the node's model catalog) and `accelerator-preferred` (needs the node-wide
18846
+ * "an accelerator is serving" predicate).
18847
+ */
18848
+ exclusion: InferenceDeviceExclusionReasonSchema.nullable()
18833
18849
  });
18834
18850
  var NodeInferenceDevicesSchema = object({
18835
18851
  nodeId: string(),
@@ -22604,7 +22620,12 @@ var ListResultSchema = object({
22604
22620
  probedAt: number()
22605
22621
  });
22606
22622
  var PreferredSchema = LocalInterfaceSchema.nullable();
22607
- var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22623
+ /**
22624
+ * Candidate base URL for the SDK to race on connect. Order matters —
22625
+ * the SDK should attempt these top-to-bottom with a short per-candidate
22626
+ * timeout (e.g. 1500ms) and cache the winner for the session.
22627
+ */
22628
+ var ConnectionEndpointSchema = object({
22608
22629
  /** Operator-facing label (e.g. "LAN — en0", "Public tunnel"). */
22609
22630
  label: string(),
22610
22631
  /** Fully-formed base URL with scheme + host + port. */
@@ -22647,7 +22668,42 @@ var GetConnectionEndpointsResultSchema = object({ endpoints: array(object({
22647
22668
  * ordering between polls.
22648
22669
  */
22649
22670
  priority: number()
22650
- })).readonly() });
22671
+ });
22672
+ /**
22673
+ * Where the advertised local port came from. Ordered most → least
22674
+ * authoritative, and the whole point of returning it: a client must be able to
22675
+ * tell a FACT about the hub's socket from an echo of its own guess.
22676
+ */
22677
+ var LocalPortSourceEnum = _enum([
22678
+ "server-config",
22679
+ "server-env",
22680
+ "caller-hint",
22681
+ "default"
22682
+ ]);
22683
+ /** The port every LAN/loopback `baseUrl` in the same result was built with. */
22684
+ var AdvertisedLocalPortSchema = object({
22685
+ port: number().int().min(1).max(65535),
22686
+ source: LocalPortSourceEnum
22687
+ });
22688
+ var GetConnectionEndpointsResultSchema = object({
22689
+ endpoints: array(ConnectionEndpointSchema).readonly(),
22690
+ /**
22691
+ * The port the hub built the LAN/loopback URLs with, and where that number
22692
+ * came from.
22693
+ *
22694
+ * Returned rather than merely applied, because "the URL is right" and "the
22695
+ * client can KNOW the URL is right" are different properties. A client that
22696
+ * only sees a corrected URL cannot distinguish a hub that fixed the port from
22697
+ * a hub that echoed the port the client sent, so it cannot decide whether to
22698
+ * race the candidate or discard it. With `source` it can: anything but
22699
+ * `caller-hint` is the hub's own socket.
22700
+ *
22701
+ * Absent on hubs predating this field — a client that finds it missing is
22702
+ * talking to an echoing hub and must degrade exactly as it does for
22703
+ * `caller-hint`.
22704
+ */
22705
+ localPort: AdvertisedLocalPortSchema
22706
+ });
22651
22707
  /**
22652
22708
  * The chosen outbound endpoint for notification artifacts. `baseUrl: null` =
22653
22709
  * AUTO (resolved from the candidate ranking at send time); `resolved` reports
@@ -22668,8 +22724,13 @@ var AllowedAddressesSchema = object({
22668
22724
  */
22669
22725
  addresses: array(string()).readonly() });
22670
22726
  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),
22727
+ /**
22728
+ * LEGACY HINT — do not send from new code. Kept optional so clients
22729
+ * written against the echoing contract keep working; the hub uses it
22730
+ * only when it cannot read its own port, and says so via
22731
+ * `localPort.source === 'caller-hint'`.
22732
+ */
22733
+ port: number().int().min(1).max(65535).optional(),
22673
22734
  /** Include `http(s)://127.0.0.1:<port>` as the lowest-priority
22674
22735
  * candidate. Default `true`. */
22675
22736
  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-Bs-LegcV.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-Bx_rSXbP.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-Bs-LegcV.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-Bx_rSXbP.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.27",
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.95",
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.65",
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-Bs-LegcV.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-Bx_rSXbP.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.95",
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.27",
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.65",
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-CL_2iH1o.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.28",
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",