@camstack/addon-provider-homeassistant 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/addon.js +44 -11
- package/dist/addon.mjs +44 -11
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -4629,7 +4629,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4629
4629
|
return inst;
|
|
4630
4630
|
}
|
|
4631
4631
|
//#endregion
|
|
4632
|
-
//#region ../types/dist/sleep-
|
|
4632
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4633
4633
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4634
4634
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4635
4635
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5744,15 +5744,24 @@ var BaseAddon = class {
|
|
|
5744
5744
|
} catch {}
|
|
5745
5745
|
}
|
|
5746
5746
|
/**
|
|
5747
|
-
* Resolve the shared models directory
|
|
5748
|
-
*
|
|
5749
|
-
*
|
|
5747
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5748
|
+
*
|
|
5749
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5750
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5751
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5752
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5753
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5754
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5755
|
+
*
|
|
5756
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5757
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5750
5758
|
*/
|
|
5751
5759
|
async resolveModelsDir() {
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5760
|
+
const { join } = await import("node:path");
|
|
5761
|
+
const { promises: fsp } = await import("node:fs");
|
|
5762
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5763
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5764
|
+
return dir;
|
|
5756
5765
|
}
|
|
5757
5766
|
/**
|
|
5758
5767
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -15539,7 +15548,8 @@ method(object({
|
|
|
15539
15548
|
sessionId: string().optional()
|
|
15540
15549
|
}), ConvertResultSchema, {
|
|
15541
15550
|
kind: "mutation",
|
|
15542
|
-
auth: "admin"
|
|
15551
|
+
auth: "admin",
|
|
15552
|
+
timeoutMs: 6e5
|
|
15543
15553
|
});
|
|
15544
15554
|
var AddonHttpRouteSchema = object({
|
|
15545
15555
|
method: _enum([
|
|
@@ -17075,7 +17085,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
17075
17085
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
17076
17086
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
17077
17087
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
17078
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
17088
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
17089
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
17090
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
17091
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
17092
|
+
clipDescription: object({
|
|
17093
|
+
text: string().min(1),
|
|
17094
|
+
minSimilarity: number().min(0).max(1)
|
|
17095
|
+
}).optional()
|
|
17079
17096
|
});
|
|
17080
17097
|
var NotificationRuleTemplateSchema = object({
|
|
17081
17098
|
title: string(),
|
|
@@ -17317,6 +17334,16 @@ var TrackedDetectionSchema = object({
|
|
|
17317
17334
|
zones: array(string()).readonly(),
|
|
17318
17335
|
state: TrackStateSchema
|
|
17319
17336
|
});
|
|
17337
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
|
|
17338
|
+
var SearchObjectEventsInput = object({
|
|
17339
|
+
text: string(),
|
|
17340
|
+
deviceId: number().optional(),
|
|
17341
|
+
since: number().optional(),
|
|
17342
|
+
until: number().optional(),
|
|
17343
|
+
classFilter: string().optional(),
|
|
17344
|
+
limit: number().default(50),
|
|
17345
|
+
minScore: number().min(0).max(1).default(.2)
|
|
17346
|
+
});
|
|
17320
17347
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
17321
17348
|
deviceId: number(),
|
|
17322
17349
|
trackId: string()
|
|
@@ -17351,7 +17378,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17351
17378
|
}), method(object({
|
|
17352
17379
|
eventId: string(),
|
|
17353
17380
|
kind: MediaFileKindEnum.optional()
|
|
17354
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
17381
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
17355
17382
|
deviceId: number(),
|
|
17356
17383
|
timestamp: number(),
|
|
17357
17384
|
frameWidth: number(),
|
|
@@ -22090,6 +22117,12 @@ Object.freeze({
|
|
|
22090
22117
|
addonId: null,
|
|
22091
22118
|
access: "create"
|
|
22092
22119
|
},
|
|
22120
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
22121
|
+
capName: "pipeline-analytics",
|
|
22122
|
+
capScope: "device",
|
|
22123
|
+
addonId: null,
|
|
22124
|
+
access: "view"
|
|
22125
|
+
},
|
|
22093
22126
|
"pipelineExecutor.cacheFrameInPool": {
|
|
22094
22127
|
capName: "pipeline-executor",
|
|
22095
22128
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -4628,7 +4628,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4628
4628
|
return inst;
|
|
4629
4629
|
}
|
|
4630
4630
|
//#endregion
|
|
4631
|
-
//#region ../types/dist/sleep-
|
|
4631
|
+
//#region ../types/dist/sleep-NOH4yRwj.mjs
|
|
4632
4632
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4633
4633
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4634
4634
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5743,15 +5743,24 @@ var BaseAddon = class {
|
|
|
5743
5743
|
} catch {}
|
|
5744
5744
|
}
|
|
5745
5745
|
/**
|
|
5746
|
-
* Resolve the shared models directory
|
|
5747
|
-
*
|
|
5748
|
-
*
|
|
5746
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5747
|
+
*
|
|
5748
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5749
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5750
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5751
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5752
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5753
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5754
|
+
*
|
|
5755
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5756
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5749
5757
|
*/
|
|
5750
5758
|
async resolveModelsDir() {
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5759
|
+
const { join } = await import("node:path");
|
|
5760
|
+
const { promises: fsp } = await import("node:fs");
|
|
5761
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5762
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5763
|
+
return dir;
|
|
5755
5764
|
}
|
|
5756
5765
|
/**
|
|
5757
5766
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -15538,7 +15547,8 @@ method(object({
|
|
|
15538
15547
|
sessionId: string().optional()
|
|
15539
15548
|
}), ConvertResultSchema, {
|
|
15540
15549
|
kind: "mutation",
|
|
15541
|
-
auth: "admin"
|
|
15550
|
+
auth: "admin",
|
|
15551
|
+
timeoutMs: 6e5
|
|
15542
15552
|
});
|
|
15543
15553
|
var AddonHttpRouteSchema = object({
|
|
15544
15554
|
method: _enum([
|
|
@@ -17074,7 +17084,14 @@ var NotificationRuleConditionsSchema = object({
|
|
|
17074
17084
|
/** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
|
|
17075
17085
|
* carrying a matching `data.eventType` string pass this condition. Rules without this field are
|
|
17076
17086
|
* unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
|
|
17077
|
-
eventTypeTokens: array(string()).readonly().optional()
|
|
17087
|
+
eventTypeTokens: array(string()).readonly().optional(),
|
|
17088
|
+
/** Match detections whose CLIP image embedding is semantically similar to this free-text
|
|
17089
|
+
* description. Requires the embedding-encoder cap to have pre-warmed the text vector.
|
|
17090
|
+
* `minSimilarity` is the cosine similarity threshold in [0, 1]. */
|
|
17091
|
+
clipDescription: object({
|
|
17092
|
+
text: string().min(1),
|
|
17093
|
+
minSimilarity: number().min(0).max(1)
|
|
17094
|
+
}).optional()
|
|
17078
17095
|
});
|
|
17079
17096
|
var NotificationRuleTemplateSchema = object({
|
|
17080
17097
|
title: string(),
|
|
@@ -17316,6 +17333,16 @@ var TrackedDetectionSchema = object({
|
|
|
17316
17333
|
zones: array(string()).readonly(),
|
|
17317
17334
|
state: TrackStateSchema
|
|
17318
17335
|
});
|
|
17336
|
+
var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
|
|
17337
|
+
var SearchObjectEventsInput = object({
|
|
17338
|
+
text: string(),
|
|
17339
|
+
deviceId: number().optional(),
|
|
17340
|
+
since: number().optional(),
|
|
17341
|
+
until: number().optional(),
|
|
17342
|
+
classFilter: string().optional(),
|
|
17343
|
+
limit: number().default(50),
|
|
17344
|
+
minScore: number().min(0).max(1).default(.2)
|
|
17345
|
+
});
|
|
17319
17346
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
17320
17347
|
deviceId: number(),
|
|
17321
17348
|
trackId: string()
|
|
@@ -17350,7 +17377,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
17350
17377
|
}), method(object({
|
|
17351
17378
|
eventId: string(),
|
|
17352
17379
|
kind: MediaFileKindEnum.optional()
|
|
17353
|
-
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
|
|
17380
|
+
}), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
|
|
17354
17381
|
deviceId: number(),
|
|
17355
17382
|
timestamp: number(),
|
|
17356
17383
|
frameWidth: number(),
|
|
@@ -22089,6 +22116,12 @@ Object.freeze({
|
|
|
22089
22116
|
addonId: null,
|
|
22090
22117
|
access: "create"
|
|
22091
22118
|
},
|
|
22119
|
+
"pipelineAnalytics.searchObjectEvents": {
|
|
22120
|
+
capName: "pipeline-analytics",
|
|
22121
|
+
capScope: "device",
|
|
22122
|
+
addonId: null,
|
|
22123
|
+
access: "view"
|
|
22124
|
+
},
|
|
22092
22125
|
"pipelineExecutor.cacheFrameInPool": {
|
|
22093
22126
|
capName: "pipeline-executor",
|
|
22094
22127
|
capScope: "system",
|