@camstack/addon-provider-reolink 1.2.0 → 1.2.2

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
@@ -12560,7 +12560,8 @@ var PipelineStepInputSchema = lazy(() => object({
12560
12560
  modelId: string().optional(),
12561
12561
  enabled: boolean().default(true),
12562
12562
  children: array(PipelineStepInputSchema).optional(),
12563
- settings: record(string(), unknown()).optional()
12563
+ settings: record(string(), unknown()).optional(),
12564
+ jumpDeviceKey: string().optional()
12564
12565
  }));
12565
12566
  var ModelSubstitutionSchema = object({
12566
12567
  addonId: string(),
@@ -12899,10 +12900,40 @@ var NativeCropBboxSchema = object({
12899
12900
  });
12900
12901
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12901
12902
  var NativeCropResultSchema = object({
12902
- /** Packed rgb (24-bit) pixels of the crop. */
12903
- bytes: _instanceof(Uint8Array),
12903
+ /**
12904
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12905
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12906
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12907
+ * path below), where shipping raw RGB is both an invariant violation and, for
12908
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12909
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12910
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12911
+ */
12912
+ bytes: _instanceof(Uint8Array).optional(),
12913
+ /**
12914
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12915
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12916
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12917
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12918
+ * set `encodeJpeg: true`; `bytes` is then absent.
12919
+ */
12920
+ jpeg: string().optional(),
12904
12921
  width: number().int().positive(),
12905
- height: number().int().positive()
12922
+ height: number().int().positive(),
12923
+ /**
12924
+ * Which source served this crop, so a quality-sensitive consumer (the native
12925
+ * `keyFrame`) can reject a degraded fallback:
12926
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
12927
+ * quality path).
12928
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
12929
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
12930
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
12931
+ *
12932
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
12933
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
12934
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
12935
+ */
12936
+ tier: _enum(["native", "ram-fullframe"]).optional()
12906
12937
  });
12907
12938
  /** Parent detection context passed to `runDetailSubtree` — the crop's
12908
12939
  * originating detection, in FRAME-space coordinates. Reuses
@@ -13032,6 +13063,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
13032
13063
  hubHostnameOverride: string().optional()
13033
13064
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
13034
13065
  /**
13066
+ * One ENABLED inference device on the runner's node, as the step-tree
13067
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
13068
+ * roster on the attach payload whenever the camera is elected onto a specific
13069
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
13070
+ * runner auto-jumps an enrichment step to when the elected device's format
13071
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
13072
+ * per-device knobs so the auto choice is weighted-least-loaded.
13073
+ */
13074
+ var RunnerInferenceDeviceSchema = object({
13075
+ deviceKey: string(),
13076
+ weight: number().positive().default(1),
13077
+ maxSessions: number().int().positive().nullable().default(null)
13078
+ });
13079
+ /**
13035
13080
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
13036
13081
  * specific runner instance via `attachCamera`. Carries everything the
13037
13082
  * runner needs to subscribe to the local broker and execute inference.
@@ -13149,7 +13194,16 @@ var RunnerCameraConfigSchema = object({
13149
13194
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13150
13195
  * this only selects WHICH device pool of that node runs the session.
13151
13196
  */
13152
- deviceKey: string().optional()
13197
+ deviceKey: string().optional(),
13198
+ /**
13199
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13200
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13201
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13202
+ * step whose model has no build for the elected device's format onto another
13203
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13204
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13205
+ */
13206
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13153
13207
  });
13154
13208
  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;
13155
13209
  /**
@@ -13205,7 +13259,18 @@ var RunnerLocalMetricsSchema = object({
13205
13259
  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({
13206
13260
  handle: FrameHandleSchema,
13207
13261
  bbox: NativeCropBboxSchema,
13208
- maxWidth: number().int().positive().optional()
13262
+ maxWidth: number().int().positive().optional(),
13263
+ /**
13264
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13265
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13266
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13267
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13268
+ * no raw pixels cross the process boundary. Same-node callers omit it
13269
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13270
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13271
+ * the caller falls back to encoding locally.
13272
+ */
13273
+ encodeJpeg: boolean().optional()
13209
13274
  }), NativeCropResultSchema.nullable()), method(object({
13210
13275
  deviceId: number(),
13211
13276
  frameHandle: FrameHandleSchema.optional(),
@@ -17918,7 +17983,8 @@ var LinkedDeviceSchema = object({
17918
17983
  deviceId: number(),
17919
17984
  name: string(),
17920
17985
  location: string().nullable(),
17921
- features: array(string())
17986
+ features: array(string()),
17987
+ producesTrackedEvents: boolean().optional()
17922
17988
  });
17923
17989
  var SavedDeviceRowSchema = object({
17924
17990
  /** Numeric id reserved at allocateDeviceId time. */
@@ -19548,6 +19614,7 @@ var TrackSchema = object({
19548
19614
  deviceId: number(),
19549
19615
  className: string(),
19550
19616
  label: string().optional(),
19617
+ producingDeviceName: string().optional(),
19551
19618
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
19552
19619
  source: TrackSourceSchema.optional(),
19553
19620
  firstSeen: number(),
@@ -19685,7 +19752,8 @@ var MediaFileKindEnum = _enum([
19685
19752
  "fullFrameBoxed",
19686
19753
  "faceCrop",
19687
19754
  "plateCrop",
19688
- "keyFrame"
19755
+ "keyFrame",
19756
+ "keyFrameSmall"
19689
19757
  ]);
19690
19758
  var MediaFileSchema = object({
19691
19759
  key: string(),
@@ -20016,7 +20084,16 @@ var PipelineTemplateSchema = object({
20016
20084
  });
20017
20085
  var DeviceStepConfigSchema = object({
20018
20086
  modelId: string().optional(),
20019
- settings: record(string(), unknown()).optional()
20087
+ settings: record(string(), unknown()).optional(),
20088
+ /**
20089
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
20090
+ * When set, this step runs on the named enabled device of the SAME node
20091
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
20092
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
20093
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
20094
+ * auto-jumps only when the effective device's format cannot run the step.
20095
+ */
20096
+ jumpDeviceKey: string().optional()
20020
20097
  });
20021
20098
  var AgentPipelineSettingsSchema = object({
20022
20099
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12555,7 +12555,8 @@ var PipelineStepInputSchema = lazy(() => object({
12555
12555
  modelId: string().optional(),
12556
12556
  enabled: boolean().default(true),
12557
12557
  children: array(PipelineStepInputSchema).optional(),
12558
- settings: record(string(), unknown()).optional()
12558
+ settings: record(string(), unknown()).optional(),
12559
+ jumpDeviceKey: string().optional()
12559
12560
  }));
12560
12561
  var ModelSubstitutionSchema = object({
12561
12562
  addonId: string(),
@@ -12894,10 +12895,40 @@ var NativeCropBboxSchema = object({
12894
12895
  });
12895
12896
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12896
12897
  var NativeCropResultSchema = object({
12897
- /** Packed rgb (24-bit) pixels of the crop. */
12898
- bytes: _instanceof(Uint8Array),
12898
+ /**
12899
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12900
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12901
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12902
+ * path below), where shipping raw RGB is both an invariant violation and, for
12903
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12904
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12905
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12906
+ */
12907
+ bytes: _instanceof(Uint8Array).optional(),
12908
+ /**
12909
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12910
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12911
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12912
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12913
+ * set `encodeJpeg: true`; `bytes` is then absent.
12914
+ */
12915
+ jpeg: string().optional(),
12899
12916
  width: number().int().positive(),
12900
- height: number().int().positive()
12917
+ height: number().int().positive(),
12918
+ /**
12919
+ * Which source served this crop, so a quality-sensitive consumer (the native
12920
+ * `keyFrame`) can reject a degraded fallback:
12921
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
12922
+ * quality path).
12923
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
12924
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
12925
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
12926
+ *
12927
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
12928
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
12929
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
12930
+ */
12931
+ tier: _enum(["native", "ram-fullframe"]).optional()
12901
12932
  });
12902
12933
  /** Parent detection context passed to `runDetailSubtree` — the crop's
12903
12934
  * originating detection, in FRAME-space coordinates. Reuses
@@ -13027,6 +13058,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
13027
13058
  hubHostnameOverride: string().optional()
13028
13059
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
13029
13060
  /**
13061
+ * One ENABLED inference device on the runner's node, as the step-tree
13062
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
13063
+ * roster on the attach payload whenever the camera is elected onto a specific
13064
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
13065
+ * runner auto-jumps an enrichment step to when the elected device's format
13066
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
13067
+ * per-device knobs so the auto choice is weighted-least-loaded.
13068
+ */
13069
+ var RunnerInferenceDeviceSchema = object({
13070
+ deviceKey: string(),
13071
+ weight: number().positive().default(1),
13072
+ maxSessions: number().int().positive().nullable().default(null)
13073
+ });
13074
+ /**
13030
13075
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
13031
13076
  * specific runner instance via `attachCamera`. Carries everything the
13032
13077
  * runner needs to subscribe to the local broker and execute inference.
@@ -13144,7 +13189,16 @@ var RunnerCameraConfigSchema = object({
13144
13189
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13145
13190
  * this only selects WHICH device pool of that node runs the session.
13146
13191
  */
13147
- deviceKey: string().optional()
13192
+ deviceKey: string().optional(),
13193
+ /**
13194
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13195
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13196
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13197
+ * step whose model has no build for the elected device's format onto another
13198
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13199
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13200
+ */
13201
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13148
13202
  });
13149
13203
  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;
13150
13204
  /**
@@ -13200,7 +13254,18 @@ var RunnerLocalMetricsSchema = object({
13200
13254
  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({
13201
13255
  handle: FrameHandleSchema,
13202
13256
  bbox: NativeCropBboxSchema,
13203
- maxWidth: number().int().positive().optional()
13257
+ maxWidth: number().int().positive().optional(),
13258
+ /**
13259
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13260
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13261
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13262
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13263
+ * no raw pixels cross the process boundary. Same-node callers omit it
13264
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13265
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13266
+ * the caller falls back to encoding locally.
13267
+ */
13268
+ encodeJpeg: boolean().optional()
13204
13269
  }), NativeCropResultSchema.nullable()), method(object({
13205
13270
  deviceId: number(),
13206
13271
  frameHandle: FrameHandleSchema.optional(),
@@ -17913,7 +17978,8 @@ var LinkedDeviceSchema = object({
17913
17978
  deviceId: number(),
17914
17979
  name: string(),
17915
17980
  location: string().nullable(),
17916
- features: array(string())
17981
+ features: array(string()),
17982
+ producesTrackedEvents: boolean().optional()
17917
17983
  });
17918
17984
  var SavedDeviceRowSchema = object({
17919
17985
  /** Numeric id reserved at allocateDeviceId time. */
@@ -19543,6 +19609,7 @@ var TrackSchema = object({
19543
19609
  deviceId: number(),
19544
19610
  className: string(),
19545
19611
  label: string().optional(),
19612
+ producingDeviceName: string().optional(),
19546
19613
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
19547
19614
  source: TrackSourceSchema.optional(),
19548
19615
  firstSeen: number(),
@@ -19680,7 +19747,8 @@ var MediaFileKindEnum = _enum([
19680
19747
  "fullFrameBoxed",
19681
19748
  "faceCrop",
19682
19749
  "plateCrop",
19683
- "keyFrame"
19750
+ "keyFrame",
19751
+ "keyFrameSmall"
19684
19752
  ]);
19685
19753
  var MediaFileSchema = object({
19686
19754
  key: string(),
@@ -20011,7 +20079,16 @@ var PipelineTemplateSchema = object({
20011
20079
  });
20012
20080
  var DeviceStepConfigSchema = object({
20013
20081
  modelId: string().optional(),
20014
- settings: record(string(), unknown()).optional()
20082
+ settings: record(string(), unknown()).optional(),
20083
+ /**
20084
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
20085
+ * When set, this step runs on the named enabled device of the SAME node
20086
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
20087
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
20088
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
20089
+ * auto-jumps only when the effective device's format cannot run the step.
20090
+ */
20091
+ jumpDeviceKey: string().optional()
20015
20092
  });
20016
20093
  var AgentPipelineSettingsSchema = object({
20017
20094
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-reolink",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",