@camstack/addon-provider-vesync 0.2.1 → 0.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 +66 -6
- package/dist/addon.mjs +66 -6
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -12321,7 +12321,8 @@ var PipelineStepInputSchema = lazy(() => object({
|
|
|
12321
12321
|
modelId: string().optional(),
|
|
12322
12322
|
enabled: boolean().default(true),
|
|
12323
12323
|
children: array(PipelineStepInputSchema).optional(),
|
|
12324
|
-
settings: record(string(), unknown()).optional()
|
|
12324
|
+
settings: record(string(), unknown()).optional(),
|
|
12325
|
+
jumpDeviceKey: string().optional()
|
|
12325
12326
|
}));
|
|
12326
12327
|
var ModelSubstitutionSchema = object({
|
|
12327
12328
|
addonId: string(),
|
|
@@ -12660,8 +12661,24 @@ var NativeCropBboxSchema = object({
|
|
|
12660
12661
|
});
|
|
12661
12662
|
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
12662
12663
|
var NativeCropResultSchema = object({
|
|
12663
|
-
/**
|
|
12664
|
-
|
|
12664
|
+
/**
|
|
12665
|
+
* Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
|
|
12666
|
+
* same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
|
|
12667
|
+
* OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
|
|
12668
|
+
* path below), where shipping raw RGB is both an invariant violation and, for
|
|
12669
|
+
* a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
|
|
12670
|
+
* `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
|
|
12671
|
+
* the cross-node native-media miss: `bytes` is replaced by `jpeg`.
|
|
12672
|
+
*/
|
|
12673
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
12674
|
+
/**
|
|
12675
|
+
* Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
|
|
12676
|
+
* (which holds the native surface) encodes it in-process, so a native 4K frame
|
|
12677
|
+
* ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
|
|
12678
|
+
* a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
|
|
12679
|
+
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
12680
|
+
*/
|
|
12681
|
+
jpeg: string().optional(),
|
|
12665
12682
|
width: number().int().positive(),
|
|
12666
12683
|
height: number().int().positive(),
|
|
12667
12684
|
/**
|
|
@@ -12807,6 +12824,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
12807
12824
|
hubHostnameOverride: string().optional()
|
|
12808
12825
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
12809
12826
|
/**
|
|
12827
|
+
* One ENABLED inference device on the runner's node, as the step-tree
|
|
12828
|
+
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
12829
|
+
* roster on the attach payload whenever the camera is elected onto a specific
|
|
12830
|
+
* `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
|
|
12831
|
+
* runner auto-jumps an enrichment step to when the elected device's format
|
|
12832
|
+
* cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
|
|
12833
|
+
* per-device knobs so the auto choice is weighted-least-loaded.
|
|
12834
|
+
*/
|
|
12835
|
+
var RunnerInferenceDeviceSchema = object({
|
|
12836
|
+
deviceKey: string(),
|
|
12837
|
+
weight: number().positive().default(1),
|
|
12838
|
+
maxSessions: number().int().positive().nullable().default(null)
|
|
12839
|
+
});
|
|
12840
|
+
/**
|
|
12810
12841
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
12811
12842
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
12812
12843
|
* runner needs to subscribe to the local broker and execute inference.
|
|
@@ -12924,7 +12955,16 @@ var RunnerCameraConfigSchema = object({
|
|
|
12924
12955
|
* omitted ⇒ the runner's default device. The engine itself stays node-local —
|
|
12925
12956
|
* this only selects WHICH device pool of that node runs the session.
|
|
12926
12957
|
*/
|
|
12927
|
-
deviceKey: string().optional()
|
|
12958
|
+
deviceKey: string().optional(),
|
|
12959
|
+
/**
|
|
12960
|
+
* Step-tree device-jump roster (phase 1): the node's ENABLED inference
|
|
12961
|
+
* devices, populated by the orchestrator ONLY when `deviceKey` is set and the
|
|
12962
|
+
* node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
|
|
12963
|
+
* step whose model has no build for the elected device's format onto another
|
|
12964
|
+
* enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
|
|
12965
|
+
* ⇒ no jump possible; the step runs on `deviceKey`.
|
|
12966
|
+
*/
|
|
12967
|
+
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
12928
12968
|
});
|
|
12929
12969
|
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;
|
|
12930
12970
|
/**
|
|
@@ -12980,7 +13020,18 @@ var RunnerLocalMetricsSchema = object({
|
|
|
12980
13020
|
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({
|
|
12981
13021
|
handle: FrameHandleSchema,
|
|
12982
13022
|
bbox: NativeCropBboxSchema,
|
|
12983
|
-
maxWidth: number().int().positive().optional()
|
|
13023
|
+
maxWidth: number().int().positive().optional(),
|
|
13024
|
+
/**
|
|
13025
|
+
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
13026
|
+
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
13027
|
+
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
13028
|
+
* agent) so the compressed payload fits Moleculer's `maxPacketSize` and
|
|
13029
|
+
* no raw pixels cross the process boundary. Same-node callers omit it
|
|
13030
|
+
* and keep the zero-copy raw `bytes` path. Additive + optional: a
|
|
13031
|
+
* pre-encode runner (version skew) ignores it and returns `bytes`, so
|
|
13032
|
+
* the caller falls back to encoding locally.
|
|
13033
|
+
*/
|
|
13034
|
+
encodeJpeg: boolean().optional()
|
|
12984
13035
|
}), NativeCropResultSchema.nullable()), method(object({
|
|
12985
13036
|
deviceId: number(),
|
|
12986
13037
|
frameHandle: FrameHandleSchema.optional(),
|
|
@@ -19782,7 +19833,16 @@ var PipelineTemplateSchema = object({
|
|
|
19782
19833
|
});
|
|
19783
19834
|
var DeviceStepConfigSchema = object({
|
|
19784
19835
|
modelId: string().optional(),
|
|
19785
|
-
settings: record(string(), unknown()).optional()
|
|
19836
|
+
settings: record(string(), unknown()).optional(),
|
|
19837
|
+
/**
|
|
19838
|
+
* Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
|
|
19839
|
+
* When set, this step runs on the named enabled device of the SAME node
|
|
19840
|
+
* (`<backend>:<device>`) instead of the camera's elected device, bypassing
|
|
19841
|
+
* the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
|
|
19842
|
+
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
19843
|
+
* auto-jumps only when the effective device's format cannot run the step.
|
|
19844
|
+
*/
|
|
19845
|
+
jumpDeviceKey: string().optional()
|
|
19786
19846
|
});
|
|
19787
19847
|
var AgentPipelineSettingsSchema = object({
|
|
19788
19848
|
maxCameras: number().int().nonnegative().nullable().default(null),
|
package/dist/addon.mjs
CHANGED
|
@@ -12320,7 +12320,8 @@ var PipelineStepInputSchema = lazy(() => object({
|
|
|
12320
12320
|
modelId: string().optional(),
|
|
12321
12321
|
enabled: boolean().default(true),
|
|
12322
12322
|
children: array(PipelineStepInputSchema).optional(),
|
|
12323
|
-
settings: record(string(), unknown()).optional()
|
|
12323
|
+
settings: record(string(), unknown()).optional(),
|
|
12324
|
+
jumpDeviceKey: string().optional()
|
|
12324
12325
|
}));
|
|
12325
12326
|
var ModelSubstitutionSchema = object({
|
|
12326
12327
|
addonId: string(),
|
|
@@ -12659,8 +12660,24 @@ var NativeCropBboxSchema = object({
|
|
|
12659
12660
|
});
|
|
12660
12661
|
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
12661
12662
|
var NativeCropResultSchema = object({
|
|
12662
|
-
/**
|
|
12663
|
-
|
|
12663
|
+
/**
|
|
12664
|
+
* Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
|
|
12665
|
+
* same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
|
|
12666
|
+
* OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
|
|
12667
|
+
* path below), where shipping raw RGB is both an invariant violation and, for
|
|
12668
|
+
* a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
|
|
12669
|
+
* `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
|
|
12670
|
+
* the cross-node native-media miss: `bytes` is replaced by `jpeg`.
|
|
12671
|
+
*/
|
|
12672
|
+
bytes: _instanceof(Uint8Array).optional(),
|
|
12673
|
+
/**
|
|
12674
|
+
* Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
|
|
12675
|
+
* (which holds the native surface) encodes it in-process, so a native 4K frame
|
|
12676
|
+
* ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
|
|
12677
|
+
* a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
|
|
12678
|
+
* set `encodeJpeg: true`; `bytes` is then absent.
|
|
12679
|
+
*/
|
|
12680
|
+
jpeg: string().optional(),
|
|
12664
12681
|
width: number().int().positive(),
|
|
12665
12682
|
height: number().int().positive(),
|
|
12666
12683
|
/**
|
|
@@ -12806,6 +12823,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
|
|
|
12806
12823
|
hubHostnameOverride: string().optional()
|
|
12807
12824
|
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
12808
12825
|
/**
|
|
12826
|
+
* One ENABLED inference device on the runner's node, as the step-tree
|
|
12827
|
+
* device-jump resolver sees it (phase 1). The orchestrator populates this
|
|
12828
|
+
* roster on the attach payload whenever the camera is elected onto a specific
|
|
12829
|
+
* `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
|
|
12830
|
+
* runner auto-jumps an enrichment step to when the elected device's format
|
|
12831
|
+
* cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
|
|
12832
|
+
* per-device knobs so the auto choice is weighted-least-loaded.
|
|
12833
|
+
*/
|
|
12834
|
+
var RunnerInferenceDeviceSchema = object({
|
|
12835
|
+
deviceKey: string(),
|
|
12836
|
+
weight: number().positive().default(1),
|
|
12837
|
+
maxSessions: number().int().positive().nullable().default(null)
|
|
12838
|
+
});
|
|
12839
|
+
/**
|
|
12809
12840
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
12810
12841
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
12811
12842
|
* runner needs to subscribe to the local broker and execute inference.
|
|
@@ -12923,7 +12954,16 @@ var RunnerCameraConfigSchema = object({
|
|
|
12923
12954
|
* omitted ⇒ the runner's default device. The engine itself stays node-local —
|
|
12924
12955
|
* this only selects WHICH device pool of that node runs the session.
|
|
12925
12956
|
*/
|
|
12926
|
-
deviceKey: string().optional()
|
|
12957
|
+
deviceKey: string().optional(),
|
|
12958
|
+
/**
|
|
12959
|
+
* Step-tree device-jump roster (phase 1): the node's ENABLED inference
|
|
12960
|
+
* devices, populated by the orchestrator ONLY when `deviceKey` is set and the
|
|
12961
|
+
* node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
|
|
12962
|
+
* step whose model has no build for the elected device's format onto another
|
|
12963
|
+
* enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
|
|
12964
|
+
* ⇒ no jump possible; the step runs on `deviceKey`.
|
|
12965
|
+
*/
|
|
12966
|
+
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
12927
12967
|
});
|
|
12928
12968
|
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;
|
|
12929
12969
|
/**
|
|
@@ -12979,7 +13019,18 @@ var RunnerLocalMetricsSchema = object({
|
|
|
12979
13019
|
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({
|
|
12980
13020
|
handle: FrameHandleSchema,
|
|
12981
13021
|
bbox: NativeCropBboxSchema,
|
|
12982
|
-
maxWidth: number().int().positive().optional()
|
|
13022
|
+
maxWidth: number().int().positive().optional(),
|
|
13023
|
+
/**
|
|
13024
|
+
* When `true`, the runner encodes the resolved crop to JPEG ON THE
|
|
13025
|
+
* OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
|
|
13026
|
+
* Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
|
|
13027
|
+
* agent) so the compressed payload fits Moleculer's `maxPacketSize` and
|
|
13028
|
+
* no raw pixels cross the process boundary. Same-node callers omit it
|
|
13029
|
+
* and keep the zero-copy raw `bytes` path. Additive + optional: a
|
|
13030
|
+
* pre-encode runner (version skew) ignores it and returns `bytes`, so
|
|
13031
|
+
* the caller falls back to encoding locally.
|
|
13032
|
+
*/
|
|
13033
|
+
encodeJpeg: boolean().optional()
|
|
12983
13034
|
}), NativeCropResultSchema.nullable()), method(object({
|
|
12984
13035
|
deviceId: number(),
|
|
12985
13036
|
frameHandle: FrameHandleSchema.optional(),
|
|
@@ -19781,7 +19832,16 @@ var PipelineTemplateSchema = object({
|
|
|
19781
19832
|
});
|
|
19782
19833
|
var DeviceStepConfigSchema = object({
|
|
19783
19834
|
modelId: string().optional(),
|
|
19784
|
-
settings: record(string(), unknown()).optional()
|
|
19835
|
+
settings: record(string(), unknown()).optional(),
|
|
19836
|
+
/**
|
|
19837
|
+
* Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
|
|
19838
|
+
* When set, this step runs on the named enabled device of the SAME node
|
|
19839
|
+
* (`<backend>:<device>`) instead of the camera's elected device, bypassing
|
|
19840
|
+
* the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
|
|
19841
|
+
* at a disabled/absent device on that node at save time. Absent ⇒ the runner
|
|
19842
|
+
* auto-jumps only when the effective device's format cannot run the step.
|
|
19843
|
+
*/
|
|
19844
|
+
jumpDeviceKey: string().optional()
|
|
19785
19845
|
});
|
|
19786
19846
|
var AgentPipelineSettingsSchema = object({
|
|
19787
19847
|
maxCameras: number().int().nonnegative().nullable().default(null),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-vesync",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "VeSync cloud-account device-provider addon for CamStack — Levoit / Cosori air purifiers as Fan devices (power, speed, preset, child-lock, display, air-quality + filter-life sensors)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|