@camstack/addon-provider-gree 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
@@ -12324,7 +12324,8 @@ var PipelineStepInputSchema = lazy(() => object({
12324
12324
  modelId: string().optional(),
12325
12325
  enabled: boolean().default(true),
12326
12326
  children: array(PipelineStepInputSchema).optional(),
12327
- settings: record(string(), unknown()).optional()
12327
+ settings: record(string(), unknown()).optional(),
12328
+ jumpDeviceKey: string().optional()
12328
12329
  }));
12329
12330
  var ModelSubstitutionSchema = object({
12330
12331
  addonId: string(),
@@ -12663,8 +12664,24 @@ var NativeCropBboxSchema = object({
12663
12664
  });
12664
12665
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12665
12666
  var NativeCropResultSchema = object({
12666
- /** Packed rgb (24-bit) pixels of the crop. */
12667
- bytes: _instanceof(Uint8Array),
12667
+ /**
12668
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12669
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12670
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12671
+ * path below), where shipping raw RGB is both an invariant violation and, for
12672
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12673
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12674
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12675
+ */
12676
+ bytes: _instanceof(Uint8Array).optional(),
12677
+ /**
12678
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12679
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12680
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12681
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12682
+ * set `encodeJpeg: true`; `bytes` is then absent.
12683
+ */
12684
+ jpeg: string().optional(),
12668
12685
  width: number().int().positive(),
12669
12686
  height: number().int().positive(),
12670
12687
  /**
@@ -12810,6 +12827,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12810
12827
  hubHostnameOverride: string().optional()
12811
12828
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12812
12829
  /**
12830
+ * One ENABLED inference device on the runner's node, as the step-tree
12831
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12832
+ * roster on the attach payload whenever the camera is elected onto a specific
12833
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12834
+ * runner auto-jumps an enrichment step to when the elected device's format
12835
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12836
+ * per-device knobs so the auto choice is weighted-least-loaded.
12837
+ */
12838
+ var RunnerInferenceDeviceSchema = object({
12839
+ deviceKey: string(),
12840
+ weight: number().positive().default(1),
12841
+ maxSessions: number().int().positive().nullable().default(null)
12842
+ });
12843
+ /**
12813
12844
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12814
12845
  * specific runner instance via `attachCamera`. Carries everything the
12815
12846
  * runner needs to subscribe to the local broker and execute inference.
@@ -12927,7 +12958,16 @@ var RunnerCameraConfigSchema = object({
12927
12958
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12928
12959
  * this only selects WHICH device pool of that node runs the session.
12929
12960
  */
12930
- deviceKey: string().optional()
12961
+ deviceKey: string().optional(),
12962
+ /**
12963
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12964
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12965
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12966
+ * step whose model has no build for the elected device's format onto another
12967
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12968
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12969
+ */
12970
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12931
12971
  });
12932
12972
  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;
12933
12973
  /**
@@ -12983,7 +13023,18 @@ var RunnerLocalMetricsSchema = object({
12983
13023
  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({
12984
13024
  handle: FrameHandleSchema,
12985
13025
  bbox: NativeCropBboxSchema,
12986
- maxWidth: number().int().positive().optional()
13026
+ maxWidth: number().int().positive().optional(),
13027
+ /**
13028
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13029
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13030
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13031
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13032
+ * no raw pixels cross the process boundary. Same-node callers omit it
13033
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13034
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13035
+ * the caller falls back to encoding locally.
13036
+ */
13037
+ encodeJpeg: boolean().optional()
12987
13038
  }), NativeCropResultSchema.nullable()), method(object({
12988
13039
  deviceId: number(),
12989
13040
  frameHandle: FrameHandleSchema.optional(),
@@ -19454,7 +19505,8 @@ var MediaFileKindEnum = _enum([
19454
19505
  "faceCrop",
19455
19506
  "plateCrop",
19456
19507
  "keyFrame",
19457
- "keyFrameSmall"
19508
+ "keyFrameSmall",
19509
+ "thumbnailSmall"
19458
19510
  ]);
19459
19511
  var MediaFileSchema = object({
19460
19512
  key: string(),
@@ -19785,7 +19837,16 @@ var PipelineTemplateSchema = object({
19785
19837
  });
19786
19838
  var DeviceStepConfigSchema = object({
19787
19839
  modelId: string().optional(),
19788
- settings: record(string(), unknown()).optional()
19840
+ settings: record(string(), unknown()).optional(),
19841
+ /**
19842
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19843
+ * When set, this step runs on the named enabled device of the SAME node
19844
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19845
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19846
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19847
+ * auto-jumps only when the effective device's format cannot run the step.
19848
+ */
19849
+ jumpDeviceKey: string().optional()
19789
19850
  });
19790
19851
  var AgentPipelineSettingsSchema = object({
19791
19852
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12323,7 +12323,8 @@ var PipelineStepInputSchema = lazy(() => object({
12323
12323
  modelId: string().optional(),
12324
12324
  enabled: boolean().default(true),
12325
12325
  children: array(PipelineStepInputSchema).optional(),
12326
- settings: record(string(), unknown()).optional()
12326
+ settings: record(string(), unknown()).optional(),
12327
+ jumpDeviceKey: string().optional()
12327
12328
  }));
12328
12329
  var ModelSubstitutionSchema = object({
12329
12330
  addonId: string(),
@@ -12662,8 +12663,24 @@ var NativeCropBboxSchema = object({
12662
12663
  });
12663
12664
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12664
12665
  var NativeCropResultSchema = object({
12665
- /** Packed rgb (24-bit) pixels of the crop. */
12666
- bytes: _instanceof(Uint8Array),
12666
+ /**
12667
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12668
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12669
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12670
+ * path below), where shipping raw RGB is both an invariant violation and, for
12671
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12672
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12673
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12674
+ */
12675
+ bytes: _instanceof(Uint8Array).optional(),
12676
+ /**
12677
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12678
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12679
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12680
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12681
+ * set `encodeJpeg: true`; `bytes` is then absent.
12682
+ */
12683
+ jpeg: string().optional(),
12667
12684
  width: number().int().positive(),
12668
12685
  height: number().int().positive(),
12669
12686
  /**
@@ -12809,6 +12826,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12809
12826
  hubHostnameOverride: string().optional()
12810
12827
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12811
12828
  /**
12829
+ * One ENABLED inference device on the runner's node, as the step-tree
12830
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12831
+ * roster on the attach payload whenever the camera is elected onto a specific
12832
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12833
+ * runner auto-jumps an enrichment step to when the elected device's format
12834
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12835
+ * per-device knobs so the auto choice is weighted-least-loaded.
12836
+ */
12837
+ var RunnerInferenceDeviceSchema = object({
12838
+ deviceKey: string(),
12839
+ weight: number().positive().default(1),
12840
+ maxSessions: number().int().positive().nullable().default(null)
12841
+ });
12842
+ /**
12812
12843
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12813
12844
  * specific runner instance via `attachCamera`. Carries everything the
12814
12845
  * runner needs to subscribe to the local broker and execute inference.
@@ -12926,7 +12957,16 @@ var RunnerCameraConfigSchema = object({
12926
12957
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
12927
12958
  * this only selects WHICH device pool of that node runs the session.
12928
12959
  */
12929
- deviceKey: string().optional()
12960
+ deviceKey: string().optional(),
12961
+ /**
12962
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
12963
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
12964
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
12965
+ * step whose model has no build for the elected device's format onto another
12966
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
12967
+ * ⇒ no jump possible; the step runs on `deviceKey`.
12968
+ */
12969
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
12930
12970
  });
12931
12971
  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;
12932
12972
  /**
@@ -12982,7 +13022,18 @@ var RunnerLocalMetricsSchema = object({
12982
13022
  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({
12983
13023
  handle: FrameHandleSchema,
12984
13024
  bbox: NativeCropBboxSchema,
12985
- maxWidth: number().int().positive().optional()
13025
+ maxWidth: number().int().positive().optional(),
13026
+ /**
13027
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13028
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13029
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13030
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13031
+ * no raw pixels cross the process boundary. Same-node callers omit it
13032
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13033
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13034
+ * the caller falls back to encoding locally.
13035
+ */
13036
+ encodeJpeg: boolean().optional()
12986
13037
  }), NativeCropResultSchema.nullable()), method(object({
12987
13038
  deviceId: number(),
12988
13039
  frameHandle: FrameHandleSchema.optional(),
@@ -19453,7 +19504,8 @@ var MediaFileKindEnum = _enum([
19453
19504
  "faceCrop",
19454
19505
  "plateCrop",
19455
19506
  "keyFrame",
19456
- "keyFrameSmall"
19507
+ "keyFrameSmall",
19508
+ "thumbnailSmall"
19457
19509
  ]);
19458
19510
  var MediaFileSchema = object({
19459
19511
  key: string(),
@@ -19784,7 +19836,16 @@ var PipelineTemplateSchema = object({
19784
19836
  });
19785
19837
  var DeviceStepConfigSchema = object({
19786
19838
  modelId: string().optional(),
19787
- settings: record(string(), unknown()).optional()
19839
+ settings: record(string(), unknown()).optional(),
19840
+ /**
19841
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
19842
+ * When set, this step runs on the named enabled device of the SAME node
19843
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
19844
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
19845
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
19846
+ * auto-jumps only when the effective device's format cannot run the step.
19847
+ */
19848
+ jumpDeviceKey: string().optional()
19788
19849
  });
19789
19850
  var AgentPipelineSettingsSchema = object({
19790
19851
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",