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