@camstack/addon-provider-tuya 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 +68 -7
- package/dist/addon.mjs +68 -7
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -12325,7 +12325,8 @@ var PipelineStepInputSchema = lazy(() => object({
|
|
|
12325
12325
|
modelId: string().optional(),
|
|
12326
12326
|
enabled: boolean().default(true),
|
|
12327
12327
|
children: array(PipelineStepInputSchema).optional(),
|
|
12328
|
-
settings: record(string(), unknown()).optional()
|
|
12328
|
+
settings: record(string(), unknown()).optional(),
|
|
12329
|
+
jumpDeviceKey: string().optional()
|
|
12329
12330
|
}));
|
|
12330
12331
|
var ModelSubstitutionSchema = object({
|
|
12331
12332
|
addonId: string(),
|
|
@@ -12664,8 +12665,24 @@ var NativeCropBboxSchema = object({
|
|
|
12664
12665
|
});
|
|
12665
12666
|
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
12666
12667
|
var NativeCropResultSchema = object({
|
|
12667
|
-
/**
|
|
12668
|
-
|
|
12668
|
+
/**
|
|
12669
|
+
* Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
|
|
12670
|
+
* same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
|
|
12671
|
+
* OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
|
|
12672
|
+
* path below), where shipping raw RGB is both an invariant violation and, for
|
|
12673
|
+
* a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
|
|
12674
|
+
* `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
|
|
12675
|
+
* the cross-node native-media miss: `bytes` is replaced by `jpeg`.
|
|
12676
|
+
*/
|
|
12677
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
12678
|
+
/**
|
|
12679
|
+
* Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
|
|
12680
|
+
* (which holds the native surface) encodes it in-process, so a native 4K frame
|
|
12681
|
+
* ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
|
|
12682
|
+
* a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
|
|
12683
|
+
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
12684
|
+
*/
|
|
12685
|
+
jpeg: string().optional(),
|
|
12669
12686
|
width: number().int().positive(),
|
|
12670
12687
|
height: number().int().positive(),
|
|
12671
12688
|
/**
|
|
@@ -12811,6 +12828,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
12811
12828
|
hubHostnameOverride: string().optional()
|
|
12812
12829
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
12813
12830
|
/**
|
|
12831
|
+
* One ENABLED inference device on the runner's node, as the step-tree
|
|
12832
|
+
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
12833
|
+
* roster on the attach payload whenever the camera is elected onto a specific
|
|
12834
|
+
* `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
|
|
12835
|
+
* runner auto-jumps an enrichment step to when the elected device's format
|
|
12836
|
+
* cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
|
|
12837
|
+
* per-device knobs so the auto choice is weighted-least-loaded.
|
|
12838
|
+
*/
|
|
12839
|
+
var RunnerInferenceDeviceSchema = object({
|
|
12840
|
+
deviceKey: string(),
|
|
12841
|
+
weight: number().positive().default(1),
|
|
12842
|
+
maxSessions: number().int().positive().nullable().default(null)
|
|
12843
|
+
});
|
|
12844
|
+
/**
|
|
12814
12845
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
12815
12846
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
12816
12847
|
* runner needs to subscribe to the local broker and execute inference.
|
|
@@ -12928,7 +12959,16 @@ var RunnerCameraConfigSchema = object({
|
|
|
12928
12959
|
* omitted ⇒ the runner's default device. The engine itself stays node-local —
|
|
12929
12960
|
* this only selects WHICH device pool of that node runs the session.
|
|
12930
12961
|
*/
|
|
12931
|
-
deviceKey: string().optional()
|
|
12962
|
+
deviceKey: string().optional(),
|
|
12963
|
+
/**
|
|
12964
|
+
* Step-tree device-jump roster (phase 1): the node's ENABLED inference
|
|
12965
|
+
* devices, populated by the orchestrator ONLY when `deviceKey` is set and the
|
|
12966
|
+
* node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
|
|
12967
|
+
* step whose model has no build for the elected device's format onto another
|
|
12968
|
+
* enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
|
|
12969
|
+
* ⇒ no jump possible; the step runs on `deviceKey`.
|
|
12970
|
+
*/
|
|
12971
|
+
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
12932
12972
|
});
|
|
12933
12973
|
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;
|
|
12934
12974
|
/**
|
|
@@ -12984,7 +13024,18 @@ var RunnerLocalMetricsSchema = object({
|
|
|
12984
13024
|
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({
|
|
12985
13025
|
handle: FrameHandleSchema,
|
|
12986
13026
|
bbox: NativeCropBboxSchema,
|
|
12987
|
-
maxWidth: number().int().positive().optional()
|
|
13027
|
+
maxWidth: number().int().positive().optional(),
|
|
13028
|
+
/**
|
|
13029
|
+
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
13030
|
+
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
13031
|
+
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
13032
|
+
* agent) so the compressed payload fits Moleculer's `maxPacketSize` and
|
|
13033
|
+
* no raw pixels cross the process boundary. Same-node callers omit it
|
|
13034
|
+
* and keep the zero-copy raw `bytes` path. Additive + optional: a
|
|
13035
|
+
* pre-encode runner (version skew) ignores it and returns `bytes`, so
|
|
13036
|
+
* the caller falls back to encoding locally.
|
|
13037
|
+
*/
|
|
13038
|
+
encodeJpeg: boolean().optional()
|
|
12988
13039
|
}), NativeCropResultSchema.nullable()), method(object({
|
|
12989
13040
|
deviceId: number(),
|
|
12990
13041
|
frameHandle: FrameHandleSchema.optional(),
|
|
@@ -19472,7 +19523,8 @@ var MediaFileKindEnum = _enum([
|
|
|
19472
19523
|
"faceCrop",
|
|
19473
19524
|
"plateCrop",
|
|
19474
19525
|
"keyFrame",
|
|
19475
|
-
"keyFrameSmall"
|
|
19526
|
+
"keyFrameSmall",
|
|
19527
|
+
"thumbnailSmall"
|
|
19476
19528
|
]);
|
|
19477
19529
|
var MediaFileSchema = object({
|
|
19478
19530
|
key: string(),
|
|
@@ -19803,7 +19855,16 @@ var PipelineTemplateSchema = object({
|
|
|
19803
19855
|
});
|
|
19804
19856
|
var DeviceStepConfigSchema = object({
|
|
19805
19857
|
modelId: string().optional(),
|
|
19806
|
-
settings: record(string(), unknown()).optional()
|
|
19858
|
+
settings: record(string(), unknown()).optional(),
|
|
19859
|
+
/**
|
|
19860
|
+
* Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
|
|
19861
|
+
* When set, this step runs on the named enabled device of the SAME node
|
|
19862
|
+
* (`<backend>:<device>`) instead of the camera's elected device, bypassing
|
|
19863
|
+
* the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
|
|
19864
|
+
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
19865
|
+
* auto-jumps only when the effective device's format cannot run the step.
|
|
19866
|
+
*/
|
|
19867
|
+
jumpDeviceKey: string().optional()
|
|
19807
19868
|
});
|
|
19808
19869
|
var AgentPipelineSettingsSchema = object({
|
|
19809
19870
|
maxCameras: number().int().nonnegative().nullable().default(null),
|
package/dist/addon.mjs
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
|
-
/**
|
|
12667
|
-
|
|
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(),
|
|
@@ -19471,7 +19522,8 @@ var MediaFileKindEnum = _enum([
|
|
|
19471
19522
|
"faceCrop",
|
|
19472
19523
|
"plateCrop",
|
|
19473
19524
|
"keyFrame",
|
|
19474
|
-
"keyFrameSmall"
|
|
19525
|
+
"keyFrameSmall",
|
|
19526
|
+
"thumbnailSmall"
|
|
19475
19527
|
]);
|
|
19476
19528
|
var MediaFileSchema = object({
|
|
19477
19529
|
key: string(),
|
|
@@ -19802,7 +19854,16 @@ var PipelineTemplateSchema = object({
|
|
|
19802
19854
|
});
|
|
19803
19855
|
var DeviceStepConfigSchema = object({
|
|
19804
19856
|
modelId: string().optional(),
|
|
19805
|
-
settings: record(string(), unknown()).optional()
|
|
19857
|
+
settings: record(string(), unknown()).optional(),
|
|
19858
|
+
/**
|
|
19859
|
+
* Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
|
|
19860
|
+
* When set, this step runs on the named enabled device of the SAME node
|
|
19861
|
+
* (`<backend>:<device>`) instead of the camera's elected device, bypassing
|
|
19862
|
+
* the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
|
|
19863
|
+
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
19864
|
+
* auto-jumps only when the effective device's format cannot run the step.
|
|
19865
|
+
*/
|
|
19866
|
+
jumpDeviceKey: string().optional()
|
|
19806
19867
|
});
|
|
19807
19868
|
var AgentPipelineSettingsSchema = object({
|
|
19808
19869
|
maxCameras: number().int().nonnegative().nullable().default(null),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|