@camstack/addon-provider-rtsp 1.2.1 → 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
@@ -12431,7 +12431,8 @@ var PipelineStepInputSchema = lazy(() => object({
12431
12431
  modelId: string().optional(),
12432
12432
  enabled: boolean().default(true),
12433
12433
  children: array(PipelineStepInputSchema).optional(),
12434
- settings: record(string(), unknown()).optional()
12434
+ settings: record(string(), unknown()).optional(),
12435
+ jumpDeviceKey: string().optional()
12435
12436
  }));
12436
12437
  var ModelSubstitutionSchema = object({
12437
12438
  addonId: string(),
@@ -12770,8 +12771,24 @@ var NativeCropBboxSchema = object({
12770
12771
  });
12771
12772
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12772
12773
  var NativeCropResultSchema = object({
12773
- /** Packed rgb (24-bit) pixels of the crop. */
12774
- bytes: _instanceof(Uint8Array),
12774
+ /**
12775
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12776
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12777
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12778
+ * path below), where shipping raw RGB is both an invariant violation and, for
12779
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12780
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12781
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12782
+ */
12783
+ bytes: _instanceof(Uint8Array).optional(),
12784
+ /**
12785
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12786
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12787
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12788
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12789
+ * set `encodeJpeg: true`; `bytes` is then absent.
12790
+ */
12791
+ jpeg: string().optional(),
12775
12792
  width: number().int().positive(),
12776
12793
  height: number().int().positive(),
12777
12794
  /**
@@ -12917,6 +12934,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12917
12934
  hubHostnameOverride: string().optional()
12918
12935
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12919
12936
  /**
12937
+ * One ENABLED inference device on the runner's node, as the step-tree
12938
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12939
+ * roster on the attach payload whenever the camera is elected onto a specific
12940
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12941
+ * runner auto-jumps an enrichment step to when the elected device's format
12942
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12943
+ * per-device knobs so the auto choice is weighted-least-loaded.
12944
+ */
12945
+ var RunnerInferenceDeviceSchema = object({
12946
+ deviceKey: string(),
12947
+ weight: number().positive().default(1),
12948
+ maxSessions: number().int().positive().nullable().default(null)
12949
+ });
12950
+ /**
12920
12951
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12921
12952
  * specific runner instance via `attachCamera`. Carries everything the
12922
12953
  * runner needs to subscribe to the local broker and execute inference.
@@ -13034,7 +13065,16 @@ var RunnerCameraConfigSchema = object({
13034
13065
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13035
13066
  * this only selects WHICH device pool of that node runs the session.
13036
13067
  */
13037
- deviceKey: string().optional()
13068
+ deviceKey: string().optional(),
13069
+ /**
13070
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13071
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13072
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13073
+ * step whose model has no build for the elected device's format onto another
13074
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13075
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13076
+ */
13077
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13038
13078
  });
13039
13079
  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;
13040
13080
  /**
@@ -13090,7 +13130,18 @@ var RunnerLocalMetricsSchema = object({
13090
13130
  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({
13091
13131
  handle: FrameHandleSchema,
13092
13132
  bbox: NativeCropBboxSchema,
13093
- maxWidth: number().int().positive().optional()
13133
+ maxWidth: number().int().positive().optional(),
13134
+ /**
13135
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13136
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13137
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13138
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13139
+ * no raw pixels cross the process boundary. Same-node callers omit it
13140
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13141
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13142
+ * the caller falls back to encoding locally.
13143
+ */
13144
+ encodeJpeg: boolean().optional()
13094
13145
  }), NativeCropResultSchema.nullable()), method(object({
13095
13146
  deviceId: number(),
13096
13147
  frameHandle: FrameHandleSchema.optional(),
@@ -19892,7 +19943,16 @@ var PipelineTemplateSchema = object({
19892
19943
  });
19893
19944
  var DeviceStepConfigSchema = object({
19894
19945
  modelId: string().optional(),
19895
- settings: record(string(), unknown()).optional()
19946
+ settings: record(string(), unknown()).optional(),
19947
+ /**
19948
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19949
+ * When set, this step runs on the named enabled device of the SAME node
19950
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19951
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19952
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19953
+ * auto-jumps only when the effective device's format cannot run the step.
19954
+ */
19955
+ jumpDeviceKey: string().optional()
19896
19956
  });
19897
19957
  var AgentPipelineSettingsSchema = object({
19898
19958
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12407,7 +12407,8 @@ var PipelineStepInputSchema = lazy(() => object({
12407
12407
  modelId: string().optional(),
12408
12408
  enabled: boolean().default(true),
12409
12409
  children: array(PipelineStepInputSchema).optional(),
12410
- settings: record(string(), unknown()).optional()
12410
+ settings: record(string(), unknown()).optional(),
12411
+ jumpDeviceKey: string().optional()
12411
12412
  }));
12412
12413
  var ModelSubstitutionSchema = object({
12413
12414
  addonId: string(),
@@ -12746,8 +12747,24 @@ var NativeCropBboxSchema = object({
12746
12747
  });
12747
12748
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12748
12749
  var NativeCropResultSchema = object({
12749
- /** Packed rgb (24-bit) pixels of the crop. */
12750
- bytes: _instanceof(Uint8Array),
12750
+ /**
12751
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12752
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12753
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12754
+ * path below), where shipping raw RGB is both an invariant violation and, for
12755
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12756
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12757
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12758
+ */
12759
+ bytes: _instanceof(Uint8Array).optional(),
12760
+ /**
12761
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12762
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12763
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12764
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12765
+ * set `encodeJpeg: true`; `bytes` is then absent.
12766
+ */
12767
+ jpeg: string().optional(),
12751
12768
  width: number().int().positive(),
12752
12769
  height: number().int().positive(),
12753
12770
  /**
@@ -12893,6 +12910,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12893
12910
  hubHostnameOverride: string().optional()
12894
12911
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12895
12912
  /**
12913
+ * One ENABLED inference device on the runner's node, as the step-tree
12914
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12915
+ * roster on the attach payload whenever the camera is elected onto a specific
12916
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12917
+ * runner auto-jumps an enrichment step to when the elected device's format
12918
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12919
+ * per-device knobs so the auto choice is weighted-least-loaded.
12920
+ */
12921
+ var RunnerInferenceDeviceSchema = object({
12922
+ deviceKey: string(),
12923
+ weight: number().positive().default(1),
12924
+ maxSessions: number().int().positive().nullable().default(null)
12925
+ });
12926
+ /**
12896
12927
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12897
12928
  * specific runner instance via `attachCamera`. Carries everything the
12898
12929
  * runner needs to subscribe to the local broker and execute inference.
@@ -13010,7 +13041,16 @@ var RunnerCameraConfigSchema = object({
13010
13041
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13011
13042
  * this only selects WHICH device pool of that node runs the session.
13012
13043
  */
13013
- deviceKey: string().optional()
13044
+ deviceKey: string().optional(),
13045
+ /**
13046
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13047
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13048
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13049
+ * step whose model has no build for the elected device's format onto another
13050
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13051
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13052
+ */
13053
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13014
13054
  });
13015
13055
  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;
13016
13056
  /**
@@ -13066,7 +13106,18 @@ var RunnerLocalMetricsSchema = object({
13066
13106
  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({
13067
13107
  handle: FrameHandleSchema,
13068
13108
  bbox: NativeCropBboxSchema,
13069
- maxWidth: number().int().positive().optional()
13109
+ maxWidth: number().int().positive().optional(),
13110
+ /**
13111
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13112
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13113
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13114
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13115
+ * no raw pixels cross the process boundary. Same-node callers omit it
13116
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13117
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13118
+ * the caller falls back to encoding locally.
13119
+ */
13120
+ encodeJpeg: boolean().optional()
13070
13121
  }), NativeCropResultSchema.nullable()), method(object({
13071
13122
  deviceId: number(),
13072
13123
  frameHandle: FrameHandleSchema.optional(),
@@ -19868,7 +19919,16 @@ var PipelineTemplateSchema = object({
19868
19919
  });
19869
19920
  var DeviceStepConfigSchema = object({
19870
19921
  modelId: string().optional(),
19871
- settings: record(string(), unknown()).optional()
19922
+ settings: record(string(), unknown()).optional(),
19923
+ /**
19924
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19925
+ * When set, this step runs on the named enabled device of the SAME node
19926
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19927
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19928
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19929
+ * auto-jumps only when the effective device's format cannot run the step.
19930
+ */
19931
+ jumpDeviceKey: string().optional()
19872
19932
  });
19873
19933
  var AgentPipelineSettingsSchema = object({
19874
19934
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",