@camstack/addon-mqtt-broker 1.1.3 → 1.1.5
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/mqtt-broker.addon.js +44 -11
- package/dist/mqtt-broker.addon.mjs +44 -11
- package/package.json +1 -1
|
@@ -4673,7 +4673,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4673
4673
|
return inst;
|
|
4674
4674
|
}
|
|
4675
4675
|
//#endregion
|
|
4676
|
-
//#region ../types/dist/sleep-
|
|
4676
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4677
4677
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4678
4678
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4679
4679
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5788,15 +5788,24 @@ var BaseAddon = class {
|
|
|
5788
5788
|
} catch {}
|
|
5789
5789
|
}
|
|
5790
5790
|
/**
|
|
5791
|
-
* Resolve the shared models directory
|
|
5792
|
-
*
|
|
5793
|
-
*
|
|
5791
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5792
|
+
*
|
|
5793
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5794
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5795
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5796
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5797
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5798
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5799
|
+
*
|
|
5800
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5801
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5794
5802
|
*/
|
|
5795
5803
|
async resolveModelsDir() {
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5804
|
+
const { join } = await import("node:path");
|
|
5805
|
+
const { promises: fsp } = await import("node:fs");
|
|
5806
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5807
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5808
|
+
return dir;
|
|
5800
5809
|
}
|
|
5801
5810
|
/**
|
|
5802
5811
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -12760,7 +12769,8 @@ method(object({
|
|
|
12760
12769
|
sessionId: string().optional()
|
|
12761
12770
|
}), ConvertResultSchema, {
|
|
12762
12771
|
kind: "mutation",
|
|
12763
|
-
auth: "admin"
|
|
12772
|
+
auth: "admin",
|
|
12773
|
+
timeoutMs: 6e5
|
|
12764
12774
|
});
|
|
12765
12775
|
var AddonHttpRouteSchema = object({
|
|
12766
12776
|
method: _enum([
|
|
@@ -14296,7 +14306,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
14296
14306
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
14297
14307
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
14298
14308
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
14299
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
14309
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
14310
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
14311
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
14312
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
14313
|
+
clipDescription: object({
|
|
14314
|
+
text: string().min(1),
|
|
14315
|
+
minSimilarity: number().min(0).max(1)
|
|
14316
|
+
}).optional()
|
|
14300
14317
|
});
|
|
14301
14318
|
var NotificationRuleTemplateSchema = object({
|
|
14302
14319
|
title: string(),
|
|
@@ -14538,6 +14555,16 @@ var TrackedDetectionSchema = object({
|
|
|
14538
14555
|
zones: array(string()).readonly(),
|
|
14539
14556
|
state: TrackStateSchema
|
|
14540
14557
|
});
|
|
14558
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
|
|
14559
|
+
var SearchObjectEventsInput = object({
|
|
14560
|
+
text: string(),
|
|
14561
|
+
deviceId: number().optional(),
|
|
14562
|
+
since: number().optional(),
|
|
14563
|
+
until: number().optional(),
|
|
14564
|
+
classFilter: string().optional(),
|
|
14565
|
+
limit: number().default(50),
|
|
14566
|
+
minScore: number().min(0).max(1).default(.2)
|
|
14567
|
+
});
|
|
14541
14568
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
14542
14569
|
deviceId: number(),
|
|
14543
14570
|
trackId: string()
|
|
@@ -14572,7 +14599,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
14572
14599
|
}), method(object({
|
|
14573
14600
|
eventId: string(),
|
|
14574
14601
|
kind: MediaFileKindEnum.optional()
|
|
14575
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
14602
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
14576
14603
|
deviceId: number(),
|
|
14577
14604
|
timestamp: number(),
|
|
14578
14605
|
frameWidth: number(),
|
|
@@ -19222,6 +19249,12 @@ Object.freeze({
|
|
|
19222
19249
|
addonId: null,
|
|
19223
19250
|
access: "create"
|
|
19224
19251
|
},
|
|
19252
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
19253
|
+
capName: "pipeline-analytics",
|
|
19254
|
+
capScope: "device",
|
|
19255
|
+
addonId: null,
|
|
19256
|
+
access: "view"
|
|
19257
|
+
},
|
|
19225
19258
|
"pipelineExecutor.cacheFrameInPool": {
|
|
19226
19259
|
capName: "pipeline-executor",
|
|
19227
19260
|
capScope: "system",
|
|
@@ -4668,7 +4668,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4668
4668
|
return inst;
|
|
4669
4669
|
}
|
|
4670
4670
|
//#endregion
|
|
4671
|
-
//#region ../types/dist/sleep-
|
|
4671
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4672
4672
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4673
4673
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4674
4674
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5783,15 +5783,24 @@ var BaseAddon = class {
|
|
|
5783
5783
|
} catch {}
|
|
5784
5784
|
}
|
|
5785
5785
|
/**
|
|
5786
|
-
* Resolve the shared models directory
|
|
5787
|
-
*
|
|
5788
|
-
*
|
|
5786
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5787
|
+
*
|
|
5788
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5789
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5790
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5791
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5792
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5793
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5794
|
+
*
|
|
5795
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5796
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5789
5797
|
*/
|
|
5790
5798
|
async resolveModelsDir() {
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5799
|
+
const { join } = await import("node:path");
|
|
5800
|
+
const { promises: fsp } = await import("node:fs");
|
|
5801
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5802
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5803
|
+
return dir;
|
|
5795
5804
|
}
|
|
5796
5805
|
/**
|
|
5797
5806
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -12755,7 +12764,8 @@ method(object({
|
|
|
12755
12764
|
sessionId: string().optional()
|
|
12756
12765
|
}), ConvertResultSchema, {
|
|
12757
12766
|
kind: "mutation",
|
|
12758
|
-
auth: "admin"
|
|
12767
|
+
auth: "admin",
|
|
12768
|
+
timeoutMs: 6e5
|
|
12759
12769
|
});
|
|
12760
12770
|
var AddonHttpRouteSchema = object({
|
|
12761
12771
|
method: _enum([
|
|
@@ -14291,7 +14301,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
14291
14301
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
14292
14302
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
14293
14303
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
14294
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
14304
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
14305
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
14306
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
14307
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
14308
|
+
clipDescription: object({
|
|
14309
|
+
text: string().min(1),
|
|
14310
|
+
minSimilarity: number().min(0).max(1)
|
|
14311
|
+
}).optional()
|
|
14295
14312
|
});
|
|
14296
14313
|
var NotificationRuleTemplateSchema = object({
|
|
14297
14314
|
title: string(),
|
|
@@ -14533,6 +14550,16 @@ var TrackedDetectionSchema = object({
|
|
|
14533
14550
|
zones: array(string()).readonly(),
|
|
14534
14551
|
state: TrackStateSchema
|
|
14535
14552
|
});
|
|
14553
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
|
|
14554
|
+
var SearchObjectEventsInput = object({
|
|
14555
|
+
text: string(),
|
|
14556
|
+
deviceId: number().optional(),
|
|
14557
|
+
since: number().optional(),
|
|
14558
|
+
until: number().optional(),
|
|
14559
|
+
classFilter: string().optional(),
|
|
14560
|
+
limit: number().default(50),
|
|
14561
|
+
minScore: number().min(0).max(1).default(.2)
|
|
14562
|
+
});
|
|
14536
14563
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
14537
14564
|
deviceId: number(),
|
|
14538
14565
|
trackId: string()
|
|
@@ -14567,7 +14594,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
14567
14594
|
}), method(object({
|
|
14568
14595
|
eventId: string(),
|
|
14569
14596
|
kind: MediaFileKindEnum.optional()
|
|
14570
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
14597
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
14571
14598
|
deviceId: number(),
|
|
14572
14599
|
timestamp: number(),
|
|
14573
14600
|
frameWidth: number(),
|
|
@@ -19217,6 +19244,12 @@ Object.freeze({
|
|
|
19217
19244
|
addonId: null,
|
|
19218
19245
|
access: "create"
|
|
19219
19246
|
},
|
|
19247
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
19248
|
+
capName: "pipeline-analytics",
|
|
19249
|
+
capScope: "device",
|
|
19250
|
+
addonId: null,
|
|
19251
|
+
access: "view"
|
|
19252
|
+
},
|
|
19220
19253
|
"pipelineExecutor.cacheFrameInPool": {
|
|
19221
19254
|
capName: "pipeline-executor",
|
|
19222
19255
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|