@camstack/addon-import-alexa 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
@@ -12477,7 +12477,8 @@ var PipelineStepInputSchema = lazy(() => object({
12477
12477
  modelId: string().optional(),
12478
12478
  enabled: boolean().default(true),
12479
12479
  children: array(PipelineStepInputSchema).optional(),
12480
- settings: record(string(), unknown()).optional()
12480
+ settings: record(string(), unknown()).optional(),
12481
+ jumpDeviceKey: string().optional()
12481
12482
  }));
12482
12483
  var ModelSubstitutionSchema = object({
12483
12484
  addonId: string(),
@@ -12816,8 +12817,24 @@ var NativeCropBboxSchema = object({
12816
12817
  });
12817
12818
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12818
12819
  var NativeCropResultSchema = object({
12819
- /** Packed rgb (24-bit) pixels of the crop. */
12820
- bytes: _instanceof(Uint8Array),
12820
+ /**
12821
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12822
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12823
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12824
+ * path below), where shipping raw RGB is both an invariant violation and, for
12825
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12826
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12827
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12828
+ */
12829
+ bytes: _instanceof(Uint8Array).optional(),
12830
+ /**
12831
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12832
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12833
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12834
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12835
+ * set `encodeJpeg: true`; `bytes` is then absent.
12836
+ */
12837
+ jpeg: string().optional(),
12821
12838
  width: number().int().positive(),
12822
12839
  height: number().int().positive(),
12823
12840
  /**
@@ -12963,6 +12980,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12963
12980
  hubHostnameOverride: string().optional()
12964
12981
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12965
12982
  /**
12983
+ * One ENABLED inference device on the runner's node, as the step-tree
12984
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12985
+ * roster on the attach payload whenever the camera is elected onto a specific
12986
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12987
+ * runner auto-jumps an enrichment step to when the elected device's format
12988
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12989
+ * per-device knobs so the auto choice is weighted-least-loaded.
12990
+ */
12991
+ var RunnerInferenceDeviceSchema = object({
12992
+ deviceKey: string(),
12993
+ weight: number().positive().default(1),
12994
+ maxSessions: number().int().positive().nullable().default(null)
12995
+ });
12996
+ /**
12966
12997
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12967
12998
  * specific runner instance via `attachCamera`. Carries everything the
12968
12999
  * runner needs to subscribe to the local broker and execute inference.
@@ -13080,7 +13111,16 @@ var RunnerCameraConfigSchema = object({
13080
13111
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13081
13112
  * this only selects WHICH device pool of that node runs the session.
13082
13113
  */
13083
- deviceKey: string().optional()
13114
+ deviceKey: string().optional(),
13115
+ /**
13116
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13117
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13118
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13119
+ * step whose model has no build for the elected device's format onto another
13120
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13121
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13122
+ */
13123
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13084
13124
  });
13085
13125
  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;
13086
13126
  /**
@@ -13136,7 +13176,18 @@ var RunnerLocalMetricsSchema = object({
13136
13176
  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({
13137
13177
  handle: FrameHandleSchema,
13138
13178
  bbox: NativeCropBboxSchema,
13139
- maxWidth: number().int().positive().optional()
13179
+ maxWidth: number().int().positive().optional(),
13180
+ /**
13181
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13182
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13183
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13184
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13185
+ * no raw pixels cross the process boundary. Same-node callers omit it
13186
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13187
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13188
+ * the caller falls back to encoding locally.
13189
+ */
13190
+ encodeJpeg: boolean().optional()
13140
13191
  }), NativeCropResultSchema.nullable()), method(object({
13141
13192
  deviceId: number(),
13142
13193
  frameHandle: FrameHandleSchema.optional(),
@@ -19692,7 +19743,8 @@ var MediaFileKindEnum = _enum([
19692
19743
  "faceCrop",
19693
19744
  "plateCrop",
19694
19745
  "keyFrame",
19695
- "keyFrameSmall"
19746
+ "keyFrameSmall",
19747
+ "thumbnailSmall"
19696
19748
  ]);
19697
19749
  var MediaFileSchema = object({
19698
19750
  key: string(),
@@ -20023,7 +20075,16 @@ var PipelineTemplateSchema = object({
20023
20075
  });
20024
20076
  var DeviceStepConfigSchema = object({
20025
20077
  modelId: string().optional(),
20026
- settings: record(string(), unknown()).optional()
20078
+ settings: record(string(), unknown()).optional(),
20079
+ /**
20080
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
20081
+ * When set, this step runs on the named enabled device of the SAME node
20082
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
20083
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
20084
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
20085
+ * auto-jumps only when the effective device's format cannot run the step.
20086
+ */
20087
+ jumpDeviceKey: string().optional()
20027
20088
  });
20028
20089
  var AgentPipelineSettingsSchema = object({
20029
20090
  maxCameras: number().int().nonnegative().nullable().default(null),
package/dist/addon.mjs CHANGED
@@ -12477,7 +12477,8 @@ var PipelineStepInputSchema = lazy(() => object({
12477
12477
  modelId: string().optional(),
12478
12478
  enabled: boolean().default(true),
12479
12479
  children: array(PipelineStepInputSchema).optional(),
12480
- settings: record(string(), unknown()).optional()
12480
+ settings: record(string(), unknown()).optional(),
12481
+ jumpDeviceKey: string().optional()
12481
12482
  }));
12482
12483
  var ModelSubstitutionSchema = object({
12483
12484
  addonId: string(),
@@ -12816,8 +12817,24 @@ var NativeCropBboxSchema = object({
12816
12817
  });
12817
12818
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
12818
12819
  var NativeCropResultSchema = object({
12819
- /** Packed rgb (24-bit) pixels of the crop. */
12820
- bytes: _instanceof(Uint8Array),
12820
+ /**
12821
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
12822
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
12823
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
12824
+ * path below), where shipping raw RGB is both an invariant violation and, for
12825
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
12826
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
12827
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
12828
+ */
12829
+ bytes: _instanceof(Uint8Array).optional(),
12830
+ /**
12831
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
12832
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
12833
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
12834
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
12835
+ * set `encodeJpeg: true`; `bytes` is then absent.
12836
+ */
12837
+ jpeg: string().optional(),
12821
12838
  width: number().int().positive(),
12822
12839
  height: number().int().positive(),
12823
12840
  /**
@@ -12963,6 +12980,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
12963
12980
  hubHostnameOverride: string().optional()
12964
12981
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
12965
12982
  /**
12983
+ * One ENABLED inference device on the runner's node, as the step-tree
12984
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
12985
+ * roster on the attach payload whenever the camera is elected onto a specific
12986
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
12987
+ * runner auto-jumps an enrichment step to when the elected device's format
12988
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
12989
+ * per-device knobs so the auto choice is weighted-least-loaded.
12990
+ */
12991
+ var RunnerInferenceDeviceSchema = object({
12992
+ deviceKey: string(),
12993
+ weight: number().positive().default(1),
12994
+ maxSessions: number().int().positive().nullable().default(null)
12995
+ });
12996
+ /**
12966
12997
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
12967
12998
  * specific runner instance via `attachCamera`. Carries everything the
12968
12999
  * runner needs to subscribe to the local broker and execute inference.
@@ -13080,7 +13111,16 @@ var RunnerCameraConfigSchema = object({
13080
13111
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
13081
13112
  * this only selects WHICH device pool of that node runs the session.
13082
13113
  */
13083
- deviceKey: string().optional()
13114
+ deviceKey: string().optional(),
13115
+ /**
13116
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
13117
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
13118
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
13119
+ * step whose model has no build for the elected device's format onto another
13120
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
13121
+ * ⇒ no jump possible; the step runs on `deviceKey`.
13122
+ */
13123
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
13084
13124
  });
13085
13125
  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;
13086
13126
  /**
@@ -13136,7 +13176,18 @@ var RunnerLocalMetricsSchema = object({
13136
13176
  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({
13137
13177
  handle: FrameHandleSchema,
13138
13178
  bbox: NativeCropBboxSchema,
13139
- maxWidth: number().int().positive().optional()
13179
+ maxWidth: number().int().positive().optional(),
13180
+ /**
13181
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
13182
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
13183
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
13184
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
13185
+ * no raw pixels cross the process boundary. Same-node callers omit it
13186
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
13187
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
13188
+ * the caller falls back to encoding locally.
13189
+ */
13190
+ encodeJpeg: boolean().optional()
13140
13191
  }), NativeCropResultSchema.nullable()), method(object({
13141
13192
  deviceId: number(),
13142
13193
  frameHandle: FrameHandleSchema.optional(),
@@ -19692,7 +19743,8 @@ var MediaFileKindEnum = _enum([
19692
19743
  "faceCrop",
19693
19744
  "plateCrop",
19694
19745
  "keyFrame",
19695
- "keyFrameSmall"
19746
+ "keyFrameSmall",
19747
+ "thumbnailSmall"
19696
19748
  ]);
19697
19749
  var MediaFileSchema = object({
19698
19750
  key: string(),
@@ -20023,7 +20075,16 @@ var PipelineTemplateSchema = object({
20023
20075
  });
20024
20076
  var DeviceStepConfigSchema = object({
20025
20077
  modelId: string().optional(),
20026
- settings: record(string(), unknown()).optional()
20078
+ settings: record(string(), unknown()).optional(),
20079
+ /**
20080
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
20081
+ * When set, this step runs on the named enabled device of the SAME node
20082
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
20083
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
20084
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
20085
+ * auto-jumps only when the effective device's format cannot run the step.
20086
+ */
20087
+ jumpDeviceKey: string().optional()
20027
20088
  });
20028
20089
  var AgentPipelineSettingsSchema = object({
20029
20090
  maxCameras: number().int().nonnegative().nullable().default(null),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",