@camstack/addon-provider-wyze 0.2.1 → 0.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.
package/dist/addon.js CHANGED
@@ -12338,7 +12338,8 @@ var PipelineStepInputSchema = lazy(() => object({
12338
12338
  modelId: string().optional(),
12339
12339
  enabled: boolean().default(true),
12340
12340
  children: array(PipelineStepInputSchema).optional(),
12341
- settings: record(string(), unknown()).optional()
12341
+ settings: record(string(), unknown()).optional(),
12342
+ jumpDeviceKey: string().optional()
12342
12343
  }));
12343
12344
  var ModelSubstitutionSchema = object({
12344
12345
  addonId: string(),
@@ -12677,8 +12678,24 @@ var NativeCropBboxSchema = object({
12677
12678
  });
12678
12679
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12679
12680
  var NativeCropResultSchema = object({
12680
- /** Packed rgb (24-bit) pixels of the crop. */
12681
- bytes: _instanceof(Uint8Array),
12681
+ /**
12682
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12683
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12684
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12685
+ * path below), where shipping raw RGB is both an invariant violation and, for
12686
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12687
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12688
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12689
+ */
12690
+ bytes: _instanceof(Uint8Array).optional(),
12691
+ /**
12692
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12693
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12694
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12695
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12696
+ * set `encodeJpeg: true`; `bytes` is then absent.
12697
+ */
12698
+ jpeg: string().optional(),
12682
12699
  width: number().int().positive(),
12683
12700
  height: number().int().positive(),
12684
12701
  /**
@@ -12824,6 +12841,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12824
12841
  hubHostnameOverride: string().optional()
12825
12842
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12826
12843
  /**
12844
+ * One ENABLED inference device on the runner's node, as the step-tree
12845
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12846
+ * roster on the attach payload whenever the camera is elected onto a specific
12847
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12848
+ * runner auto-jumps an enrichment step to when the elected device's format
12849
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12850
+ * per-device knobs so the auto choice is weighted-least-loaded.
12851
+ */
12852
+ var RunnerInferenceDeviceSchema = object({
12853
+ deviceKey: string(),
12854
+ weight: number().positive().default(1),
12855
+ maxSessions: number().int().positive().nullable().default(null)
12856
+ });
12857
+ /**
12827
12858
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12828
12859
  * specific runner instance via `attachCamera`. Carries everything the
12829
12860
  * runner needs to subscribe to the local broker and execute inference.
@@ -12941,7 +12972,16 @@ var RunnerCameraConfigSchema = object({
12941
12972
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12942
12973
  * this only selects WHICH device pool of that node runs the session.
12943
12974
  */
12944
- deviceKey: string().optional()
12975
+ deviceKey: string().optional(),
12976
+ /**
12977
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12978
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12979
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12980
+ * step whose model has no build for the elected device's format onto another
12981
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12982
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12983
+ */
12984
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12945
12985
  });
12946
12986
  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;
12947
12987
  /**
@@ -12997,7 +13037,18 @@ var RunnerLocalMetricsSchema = object({
12997
13037
  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({
12998
13038
  handle: FrameHandleSchema,
12999
13039
  bbox: NativeCropBboxSchema,
13000
- maxWidth: number().int().positive().optional()
13040
+ maxWidth: number().int().positive().optional(),
13041
+ /**
13042
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13043
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13044
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13045
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13046
+ * no raw pixels cross the process boundary. Same-node callers omit it
13047
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13048
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13049
+ * the caller falls back to encoding locally.
13050
+ */
13051
+ encodeJpeg: boolean().optional()
13001
13052
  }), NativeCropResultSchema.nullable()), method(object({
13002
13053
  deviceId: number(),
13003
13054
  frameHandle: FrameHandleSchema.optional(),
@@ -19485,7 +19536,8 @@ var MediaFileKindEnum = _enum([
19485
19536
  "faceCrop",
19486
19537
  "plateCrop",
19487
19538
  "keyFrame",
19488
- "keyFrameSmall"
19539
+ "keyFrameSmall",
19540
+ "thumbnailSmall"
19489
19541
  ]);
19490
19542
  var MediaFileSchema = object({
19491
19543
  key: string(),
@@ -19816,7 +19868,16 @@ var PipelineTemplateSchema = object({
19816
19868
  });
19817
19869
  var DeviceStepConfigSchema = object({
19818
19870
  modelId: string().optional(),
19819
- settings: record(string(), unknown()).optional()
19871
+ settings: record(string(), unknown()).optional(),
19872
+ /**
19873
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19874
+ * When set, this step runs on the named enabled device of the SAME node
19875
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19876
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19877
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19878
+ * auto-jumps only when the effective device's format cannot run the step.
19879
+ */
19880
+ jumpDeviceKey: string().optional()
19820
19881
  });
19821
19882
  var AgentPipelineSettingsSchema = object({
19822
19883
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12317,7 +12317,8 @@ var PipelineStepInputSchema = lazy(() => object({
12317
12317
  modelId: string().optional(),
12318
12318
  enabled: boolean().default(true),
12319
12319
  children: array(PipelineStepInputSchema).optional(),
12320
- settings: record(string(), unknown()).optional()
12320
+ settings: record(string(), unknown()).optional(),
12321
+ jumpDeviceKey: string().optional()
12321
12322
  }));
12322
12323
  var ModelSubstitutionSchema = object({
12323
12324
  addonId: string(),
@@ -12656,8 +12657,24 @@ var NativeCropBboxSchema = object({
12656
12657
  });
12657
12658
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12658
12659
  var NativeCropResultSchema = object({
12659
- /** Packed rgb (24-bit) pixels of the crop. */
12660
- bytes: _instanceof(Uint8Array),
12660
+ /**
12661
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12662
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12663
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12664
+ * path below), where shipping raw RGB is both an invariant violation and, for
12665
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12666
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12667
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12668
+ */
12669
+ bytes: _instanceof(Uint8Array).optional(),
12670
+ /**
12671
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12672
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12673
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12674
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12675
+ * set `encodeJpeg: true`; `bytes` is then absent.
12676
+ */
12677
+ jpeg: string().optional(),
12661
12678
  width: number().int().positive(),
12662
12679
  height: number().int().positive(),
12663
12680
  /**
@@ -12803,6 +12820,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12803
12820
  hubHostnameOverride: string().optional()
12804
12821
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12805
12822
  /**
12823
+ * One ENABLED inference device on the runner's node, as the step-tree
12824
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12825
+ * roster on the attach payload whenever the camera is elected onto a specific
12826
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12827
+ * runner auto-jumps an enrichment step to when the elected device's format
12828
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12829
+ * per-device knobs so the auto choice is weighted-least-loaded.
12830
+ */
12831
+ var RunnerInferenceDeviceSchema = object({
12832
+ deviceKey: string(),
12833
+ weight: number().positive().default(1),
12834
+ maxSessions: number().int().positive().nullable().default(null)
12835
+ });
12836
+ /**
12806
12837
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12807
12838
  * specific runner instance via `attachCamera`. Carries everything the
12808
12839
  * runner needs to subscribe to the local broker and execute inference.
@@ -12920,7 +12951,16 @@ var RunnerCameraConfigSchema = object({
12920
12951
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12921
12952
  * this only selects WHICH device pool of that node runs the session.
12922
12953
  */
12923
- deviceKey: string().optional()
12954
+ deviceKey: string().optional(),
12955
+ /**
12956
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12957
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12958
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12959
+ * step whose model has no build for the elected device's format onto another
12960
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12961
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12962
+ */
12963
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12924
12964
  });
12925
12965
  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;
12926
12966
  /**
@@ -12976,7 +13016,18 @@ var RunnerLocalMetricsSchema = object({
12976
13016
  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({
12977
13017
  handle: FrameHandleSchema,
12978
13018
  bbox: NativeCropBboxSchema,
12979
- maxWidth: number().int().positive().optional()
13019
+ maxWidth: number().int().positive().optional(),
13020
+ /**
13021
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13022
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13023
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13024
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13025
+ * no raw pixels cross the process boundary. Same-node callers omit it
13026
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13027
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13028
+ * the caller falls back to encoding locally.
13029
+ */
13030
+ encodeJpeg: boolean().optional()
12980
13031
  }), NativeCropResultSchema.nullable()), method(object({
12981
13032
  deviceId: number(),
12982
13033
  frameHandle: FrameHandleSchema.optional(),
@@ -19464,7 +19515,8 @@ var MediaFileKindEnum = _enum([
19464
19515
  "faceCrop",
19465
19516
  "plateCrop",
19466
19517
  "keyFrame",
19467
- "keyFrameSmall"
19518
+ "keyFrameSmall",
19519
+ "thumbnailSmall"
19468
19520
  ]);
19469
19521
  var MediaFileSchema = object({
19470
19522
  key: string(),
@@ -19795,7 +19847,16 @@ var PipelineTemplateSchema = object({
19795
19847
  });
19796
19848
  var DeviceStepConfigSchema = object({
19797
19849
  modelId: string().optional(),
19798
- settings: record(string(), unknown()).optional()
19850
+ settings: record(string(), unknown()).optional(),
19851
+ /**
19852
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19853
+ * When set, this step runs on the named enabled device of the SAME node
19854
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19855
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19856
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19857
+ * auto-jumps only when the effective device's format cannot run the step.
19858
+ */
19859
+ jumpDeviceKey: string().optional()
19799
19860
  });
19800
19861
  var AgentPipelineSettingsSchema = object({
19801
19862
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",