@camstack/addon-auth 1.2.1 → 1.2.3

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.
@@ -11142,7 +11142,8 @@ var PipelineStepInputSchema = lazy(() => object({
11142
11142
  modelId: string().optional(),
11143
11143
  enabled: boolean().default(true),
11144
11144
  children: array(PipelineStepInputSchema).optional(),
11145
- settings: record(string(), unknown()).optional()
11145
+ settings: record(string(), unknown()).optional(),
11146
+ jumpDeviceKey: string().optional()
11146
11147
  }));
11147
11148
  var ModelSubstitutionSchema = object({
11148
11149
  addonId: string(),
@@ -11448,8 +11449,24 @@ var NativeCropBboxSchema = object({
11448
11449
  });
11449
11450
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
11450
11451
  var NativeCropResultSchema = object({
11451
- /** Packed rgb (24-bit) pixels of the crop. */
11452
- bytes: _instanceof(Uint8Array),
11452
+ /**
11453
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
11454
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
11455
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
11456
+ * path below), where shipping raw RGB is both an invariant violation and, for
11457
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
11458
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
11459
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
11460
+ */
11461
+ bytes: _instanceof(Uint8Array).optional(),
11462
+ /**
11463
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
11464
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
11465
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
11466
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
11467
+ * set `encodeJpeg: true`; `bytes` is then absent.
11468
+ */
11469
+ jpeg: string().optional(),
11453
11470
  width: number().int().positive(),
11454
11471
  height: number().int().positive(),
11455
11472
  /**
@@ -11595,6 +11612,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
11595
11612
  hubHostnameOverride: string().optional()
11596
11613
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
11597
11614
  /**
11615
+ * One ENABLED inference device on the runner's node, as the step-tree
11616
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
11617
+ * roster on the attach payload whenever the camera is elected onto a specific
11618
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
11619
+ * runner auto-jumps an enrichment step to when the elected device's format
11620
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
11621
+ * per-device knobs so the auto choice is weighted-least-loaded.
11622
+ */
11623
+ var RunnerInferenceDeviceSchema = object({
11624
+ deviceKey: string(),
11625
+ weight: number().positive().default(1),
11626
+ maxSessions: number().int().positive().nullable().default(null)
11627
+ });
11628
+ /**
11598
11629
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
11599
11630
  * specific runner instance via `attachCamera`. Carries everything the
11600
11631
  * runner needs to subscribe to the local broker and execute inference.
@@ -11712,7 +11743,16 @@ var RunnerCameraConfigSchema = object({
11712
11743
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
11713
11744
  * this only selects WHICH device pool of that node runs the session.
11714
11745
  */
11715
- deviceKey: string().optional()
11746
+ deviceKey: string().optional(),
11747
+ /**
11748
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
11749
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
11750
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
11751
+ * step whose model has no build for the elected device's format onto another
11752
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
11753
+ * ⇒ no jump possible; the step runs on `deviceKey`.
11754
+ */
11755
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
11716
11756
  });
11717
11757
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
11718
11758
  /**
@@ -11768,7 +11808,18 @@ var RunnerLocalMetricsSchema = object({
11768
11808
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11769
11809
  handle: FrameHandleSchema,
11770
11810
  bbox: NativeCropBboxSchema,
11771
- maxWidth: number().int().positive().optional()
11811
+ maxWidth: number().int().positive().optional(),
11812
+ /**
11813
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
11814
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
11815
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
11816
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
11817
+ * no raw pixels cross the process boundary. Same-node callers omit it
11818
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
11819
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
11820
+ * the caller falls back to encoding locally.
11821
+ */
11822
+ encodeJpeg: boolean().optional()
11772
11823
  }), NativeCropResultSchema.nullable()), method(object({
11773
11824
  deviceId: number(),
11774
11825
  frameHandle: FrameHandleSchema.optional(),
@@ -16612,7 +16663,8 @@ var MediaFileKindEnum = _enum([
16612
16663
  "faceCrop",
16613
16664
  "plateCrop",
16614
16665
  "keyFrame",
16615
- "keyFrameSmall"
16666
+ "keyFrameSmall",
16667
+ "thumbnailSmall"
16616
16668
  ]);
16617
16669
  var MediaFileSchema = object({
16618
16670
  key: string(),
@@ -16943,7 +16995,16 @@ var PipelineTemplateSchema = object({
16943
16995
  });
16944
16996
  var DeviceStepConfigSchema = object({
16945
16997
  modelId: string().optional(),
16946
- settings: record(string(), unknown()).optional()
16998
+ settings: record(string(), unknown()).optional(),
16999
+ /**
17000
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
17001
+ * When set, this step runs on the named enabled device of the SAME node
17002
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
17003
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
17004
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
17005
+ * auto-jumps only when the effective device's format cannot run the step.
17006
+ */
17007
+ jumpDeviceKey: string().optional()
16947
17008
  });
16948
17009
  var AgentPipelineSettingsSchema = object({
16949
17010
  maxCameras: number().int().nonnegative().nullable().default(null),
@@ -11142,7 +11142,8 @@ var PipelineStepInputSchema = lazy(() => object({
11142
11142
  modelId: string().optional(),
11143
11143
  enabled: boolean().default(true),
11144
11144
  children: array(PipelineStepInputSchema).optional(),
11145
- settings: record(string(), unknown()).optional()
11145
+ settings: record(string(), unknown()).optional(),
11146
+ jumpDeviceKey: string().optional()
11146
11147
  }));
11147
11148
  var ModelSubstitutionSchema = object({
11148
11149
  addonId: string(),
@@ -11448,8 +11449,24 @@ var NativeCropBboxSchema = object({
11448
11449
  });
11449
11450
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
11450
11451
  var NativeCropResultSchema = object({
11451
- /** Packed rgb (24-bit) pixels of the crop. */
11452
- bytes: _instanceof(Uint8Array),
11452
+ /**
11453
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
11454
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
11455
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
11456
+ * path below), where shipping raw RGB is both an invariant violation and, for
11457
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
11458
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
11459
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
11460
+ */
11461
+ bytes: _instanceof(Uint8Array).optional(),
11462
+ /**
11463
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
11464
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
11465
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
11466
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
11467
+ * set `encodeJpeg: true`; `bytes` is then absent.
11468
+ */
11469
+ jpeg: string().optional(),
11453
11470
  width: number().int().positive(),
11454
11471
  height: number().int().positive(),
11455
11472
  /**
@@ -11595,6 +11612,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
11595
11612
  hubHostnameOverride: string().optional()
11596
11613
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
11597
11614
  /**
11615
+ * One ENABLED inference device on the runner's node, as the step-tree
11616
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
11617
+ * roster on the attach payload whenever the camera is elected onto a specific
11618
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
11619
+ * runner auto-jumps an enrichment step to when the elected device's format
11620
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
11621
+ * per-device knobs so the auto choice is weighted-least-loaded.
11622
+ */
11623
+ var RunnerInferenceDeviceSchema = object({
11624
+ deviceKey: string(),
11625
+ weight: number().positive().default(1),
11626
+ maxSessions: number().int().positive().nullable().default(null)
11627
+ });
11628
+ /**
11598
11629
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
11599
11630
  * specific runner instance via `attachCamera`. Carries everything the
11600
11631
  * runner needs to subscribe to the local broker and execute inference.
@@ -11712,7 +11743,16 @@ var RunnerCameraConfigSchema = object({
11712
11743
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
11713
11744
  * this only selects WHICH device pool of that node runs the session.
11714
11745
  */
11715
- deviceKey: string().optional()
11746
+ deviceKey: string().optional(),
11747
+ /**
11748
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
11749
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
11750
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
11751
+ * step whose model has no build for the elected device's format onto another
11752
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
11753
+ * ⇒ no jump possible; the step runs on `deviceKey`.
11754
+ */
11755
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
11716
11756
  });
11717
11757
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
11718
11758
  /**
@@ -11768,7 +11808,18 @@ var RunnerLocalMetricsSchema = object({
11768
11808
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11769
11809
  handle: FrameHandleSchema,
11770
11810
  bbox: NativeCropBboxSchema,
11771
- maxWidth: number().int().positive().optional()
11811
+ maxWidth: number().int().positive().optional(),
11812
+ /**
11813
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
11814
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
11815
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
11816
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
11817
+ * no raw pixels cross the process boundary. Same-node callers omit it
11818
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
11819
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
11820
+ * the caller falls back to encoding locally.
11821
+ */
11822
+ encodeJpeg: boolean().optional()
11772
11823
  }), NativeCropResultSchema.nullable()), method(object({
11773
11824
  deviceId: number(),
11774
11825
  frameHandle: FrameHandleSchema.optional(),
@@ -16612,7 +16663,8 @@ var MediaFileKindEnum = _enum([
16612
16663
  "faceCrop",
16613
16664
  "plateCrop",
16614
16665
  "keyFrame",
16615
- "keyFrameSmall"
16666
+ "keyFrameSmall",
16667
+ "thumbnailSmall"
16616
16668
  ]);
16617
16669
  var MediaFileSchema = object({
16618
16670
  key: string(),
@@ -16943,7 +16995,16 @@ var PipelineTemplateSchema = object({
16943
16995
  });
16944
16996
  var DeviceStepConfigSchema = object({
16945
16997
  modelId: string().optional(),
16946
- settings: record(string(), unknown()).optional()
16998
+ settings: record(string(), unknown()).optional(),
16999
+ /**
17000
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
17001
+ * When set, this step runs on the named enabled device of the SAME node
17002
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
17003
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
17004
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
17005
+ * auto-jumps only when the effective device's format cannot run the step.
17006
+ */
17007
+ jumpDeviceKey: string().optional()
16947
17008
  });
16948
17009
  var AgentPipelineSettingsSchema = object({
16949
17010
  maxCameras: number().int().nonnegative().nullable().default(null),
@@ -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-CuQ5TtUl.js");
6
+ const require_dist = require("../dist-kmLBjehf.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-CXujhrB4.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-Cqf9VbiT.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-CuQ5TtUl.js");
6
+ const require_dist = require("../dist-kmLBjehf.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-CXujhrB4.mjs";
1
+ import { a as loginMethodCapability, c as BaseAddon, i as buildAddonRouteProvider, r as authProviderCapability, s as errMsg, t as addonRoutesCapability } from "../dist-Cqf9VbiT.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.1",
6
+ version: "1.2.3",
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.1",
21
+ version: "1.2.3",
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.1",
36
+ version: "1.2.3",
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-CuQ5TtUl.js");
6
+ const require_dist = require("../dist-kmLBjehf.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-CXujhrB4.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-Cqf9VbiT.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.1",
39
+ version: "1.2.3",
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.1",
48
+ version: "1.2.3",
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.1",
84
+ version: "1.2.3",
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-vae6YdYn.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Bc9HBsPT.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.1",
3
+ "version": "1.2.3",
4
4
  "description": "CamStack 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",