@camstack/addon-provider-homeassistant 1.2.125 → 1.2.127
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/{dist-BGU-lGVF.mjs → dist-BDT9dZuy.mjs} +248 -11
- package/dist/{dist-Cna51hy3.js → dist-yx8Zuhab.js} +248 -11
- package/dist/ha-export/ha-export.addon.js +1 -1
- package/dist/ha-export/ha-export.addon.mjs +1 -1
- package/package.json +2 -2
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-yx8Zuhab.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-BDT9dZuy.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -11831,6 +11831,21 @@ var streamSignalsCapability = {
|
|
|
11831
11831
|
mode: "singleton",
|
|
11832
11832
|
deviceTypes: Object.values(DeviceType),
|
|
11833
11833
|
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
/**
|
|
11835
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11836
|
+
*
|
|
11837
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11838
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11839
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11840
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11841
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11842
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11843
|
+
* because the fix could not reach it.
|
|
11844
|
+
*
|
|
11845
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11846
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11847
|
+
*/
|
|
11848
|
+
durability: "session",
|
|
11834
11849
|
methods: {
|
|
11835
11850
|
/**
|
|
11836
11851
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18546,6 +18561,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18546
18561
|
settings: NcAlarmSettingsSchema,
|
|
18547
18562
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18548
18563
|
});
|
|
18564
|
+
/**
|
|
18565
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18566
|
+
*
|
|
18567
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18568
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18569
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18570
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18571
|
+
* a different thing from never having been told, and only the envelope
|
|
18572
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18573
|
+
*/
|
|
18574
|
+
var NcClipRetentionAskSchema = object({
|
|
18575
|
+
/**
|
|
18576
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18577
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18578
|
+
* asking everywhere.
|
|
18579
|
+
*/
|
|
18580
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18581
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18582
|
+
* needs nothing produces no ask at all. */
|
|
18583
|
+
seconds: number().min(0).max(60),
|
|
18584
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18585
|
+
* assigned, which is what the cut defaults to. */
|
|
18586
|
+
profile: CamProfileSchema.optional(),
|
|
18587
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18588
|
+
ruleId: string(),
|
|
18589
|
+
ruleName: string(),
|
|
18590
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18591
|
+
reason: _enum(["window", "occupancy"])
|
|
18592
|
+
});
|
|
18593
|
+
/**
|
|
18594
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18595
|
+
*
|
|
18596
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18597
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18598
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18599
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18600
|
+
* footage this mechanism exists to keep.
|
|
18601
|
+
*/
|
|
18602
|
+
var NcClipRetentionPlanSchema = object({
|
|
18603
|
+
rulesLoaded: boolean(),
|
|
18604
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18605
|
+
});
|
|
18549
18606
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18550
18607
|
kind: "mutation",
|
|
18551
18608
|
auth: "admin",
|
|
@@ -18566,7 +18623,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18566
18623
|
}), object({ success: literal(true) }), {
|
|
18567
18624
|
kind: "mutation",
|
|
18568
18625
|
auth: "admin"
|
|
18569
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18626
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18570
18627
|
deviceId: number().int(),
|
|
18571
18628
|
muted: boolean()
|
|
18572
18629
|
}), object({ success: literal(true) }), {
|
|
@@ -19767,13 +19824,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19767
19824
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19768
19825
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19769
19826
|
*
|
|
19827
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19828
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19829
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19830
|
+
* detector.
|
|
19831
|
+
*
|
|
19832
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19833
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19834
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19835
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19836
|
+
* could not name.
|
|
19837
|
+
*
|
|
19770
19838
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19771
19839
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19772
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19773
|
-
* check silently readmits every source added after it was
|
|
19840
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19841
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19842
|
+
* written.
|
|
19774
19843
|
*/
|
|
19775
19844
|
var TrackSourceSchema = _enum([
|
|
19776
19845
|
"pipeline",
|
|
19846
|
+
"onboard",
|
|
19777
19847
|
"sensor",
|
|
19778
19848
|
"audio"
|
|
19779
19849
|
]);
|
|
@@ -21156,6 +21226,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21156
21226
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21157
21227
|
framesMatched: number().int()
|
|
21158
21228
|
})).readonly() });
|
|
21229
|
+
/**
|
|
21230
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21231
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21232
|
+
* is an alias of this, not a second list.
|
|
21233
|
+
*/
|
|
21234
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21235
|
+
"motion",
|
|
21236
|
+
"audio-dbfs",
|
|
21237
|
+
"battery",
|
|
21238
|
+
"occupancy"
|
|
21239
|
+
]);
|
|
21240
|
+
/**
|
|
21241
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21242
|
+
*
|
|
21243
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21244
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21245
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21246
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21247
|
+
*/
|
|
21248
|
+
var LtsBucketSchema = object({
|
|
21249
|
+
scope: string(),
|
|
21250
|
+
bucketStart: number().int(),
|
|
21251
|
+
samples: number().int().nonnegative(),
|
|
21252
|
+
sum: number(),
|
|
21253
|
+
min: number(),
|
|
21254
|
+
max: number()
|
|
21255
|
+
});
|
|
21159
21256
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21160
21257
|
deviceId: number(),
|
|
21161
21258
|
trackId: string()
|
|
@@ -21202,6 +21299,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21202
21299
|
kinds: array(string()).optional(),
|
|
21203
21300
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21204
21301
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21302
|
+
deviceId: number(),
|
|
21303
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21304
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21305
|
+
scope: string().optional(),
|
|
21306
|
+
from: number(),
|
|
21307
|
+
to: number(),
|
|
21308
|
+
limit: number().int().positive().optional()
|
|
21309
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21205
21310
|
deviceId: number(),
|
|
21206
21311
|
since: number(),
|
|
21207
21312
|
until: number(),
|
|
@@ -21820,13 +21925,39 @@ var MotionSourceEnum = _enum([
|
|
|
21820
21925
|
*/
|
|
21821
21926
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21822
21927
|
/**
|
|
21823
|
-
* Which root
|
|
21824
|
-
*
|
|
21825
|
-
*
|
|
21826
|
-
*
|
|
21827
|
-
*
|
|
21928
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21929
|
+
*
|
|
21930
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21931
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21932
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21933
|
+
* track, the overlay and the debug row.
|
|
21934
|
+
*
|
|
21935
|
+
* ## Why one, and why it is still an array
|
|
21936
|
+
*
|
|
21937
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21938
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21939
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21940
|
+
* detectors disagree about the same box by construction — which is the
|
|
21941
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21942
|
+
*
|
|
21943
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21944
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21945
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21946
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21947
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21948
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21949
|
+
* rely on.
|
|
21950
|
+
*
|
|
21951
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21952
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21953
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21954
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21955
|
+
* suite caught it.
|
|
21956
|
+
*
|
|
21957
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21958
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21828
21959
|
*/
|
|
21829
|
-
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21960
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21830
21961
|
/**
|
|
21831
21962
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21832
21963
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
@@ -22188,7 +22319,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22188
22319
|
queueDepth: number(),
|
|
22189
22320
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22190
22321
|
});
|
|
22322
|
+
/**
|
|
22323
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22324
|
+
*
|
|
22325
|
+
* One instance per node. Receives camera assignments from
|
|
22326
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22327
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22328
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22329
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22330
|
+
* the bus.
|
|
22331
|
+
*
|
|
22332
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22333
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22334
|
+
* makes assignment decisions itself.
|
|
22335
|
+
*/
|
|
22336
|
+
/**
|
|
22337
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22338
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22339
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22340
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22341
|
+
*/
|
|
22342
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22343
|
+
"not-attached",
|
|
22344
|
+
"battery-asleep",
|
|
22345
|
+
"not-watching",
|
|
22346
|
+
"already-bursting"
|
|
22347
|
+
]);
|
|
22191
22348
|
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({
|
|
22349
|
+
deviceId: number(),
|
|
22350
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22351
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22352
|
+
frames: number().int().positive().optional(),
|
|
22353
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22354
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22355
|
+
reason: string()
|
|
22356
|
+
}), object({
|
|
22357
|
+
started: boolean(),
|
|
22358
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22359
|
+
}), {
|
|
22360
|
+
auth: "admin",
|
|
22361
|
+
kind: "mutation"
|
|
22362
|
+
}), method(object({
|
|
22192
22363
|
handle: FrameHandleSchema,
|
|
22193
22364
|
bbox: NativeCropBboxSchema,
|
|
22194
22365
|
maxWidth: number().int().positive().optional(),
|
|
@@ -34020,7 +34191,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34020
34191
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34021
34192
|
totalObjects: number().int().nonnegative(),
|
|
34022
34193
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34023
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34194
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34195
|
+
/**
|
|
34196
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34197
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34198
|
+
*
|
|
34199
|
+
* The operator's question about a scene has two halves and they answer
|
|
34200
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34201
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34202
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34203
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34204
|
+
*
|
|
34205
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34206
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34207
|
+
*
|
|
34208
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34209
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34210
|
+
* parked objects here" about a camera whose lot is full.
|
|
34211
|
+
*/
|
|
34212
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34213
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34214
|
+
* same absence rule. */
|
|
34215
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34024
34216
|
});
|
|
34025
34217
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34026
34218
|
zoneId: string(),
|
|
@@ -34143,6 +34335,23 @@ var HistoryPointSchema = object({
|
|
|
34143
34335
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34144
34336
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34145
34337
|
* combinatorial coverage the operator UI requested.
|
|
34338
|
+
*
|
|
34339
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34340
|
+
*
|
|
34341
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34342
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34343
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34344
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34345
|
+
* horizon rather than to answer a question.
|
|
34346
|
+
*
|
|
34347
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34348
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34349
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34350
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34351
|
+
* function the writer uses, so the two cannot drift.
|
|
34352
|
+
*
|
|
34353
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34354
|
+
* it. Do not add a fourth caller.
|
|
34146
34355
|
*/
|
|
34147
34356
|
var zoneAnalyticsCapability = {
|
|
34148
34357
|
name: "zone-analytics",
|
|
@@ -38824,6 +39033,12 @@ Object.freeze({
|
|
|
38824
39033
|
addonId: null,
|
|
38825
39034
|
access: "view"
|
|
38826
39035
|
},
|
|
39036
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39037
|
+
capName: "notification-rules",
|
|
39038
|
+
capScope: "system",
|
|
39039
|
+
addonId: null,
|
|
39040
|
+
access: "view"
|
|
39041
|
+
},
|
|
38827
39042
|
"notificationRules.getConditionCatalog": {
|
|
38828
39043
|
capName: "notification-rules",
|
|
38829
39044
|
capScope: "system",
|
|
@@ -39334,6 +39549,12 @@ Object.freeze({
|
|
|
39334
39549
|
addonId: null,
|
|
39335
39550
|
access: "create"
|
|
39336
39551
|
},
|
|
39552
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39553
|
+
capName: "pipeline-analytics",
|
|
39554
|
+
capScope: "device",
|
|
39555
|
+
addonId: null,
|
|
39556
|
+
access: "view"
|
|
39557
|
+
},
|
|
39337
39558
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39338
39559
|
capName: "pipeline-analytics",
|
|
39339
39560
|
capScope: "device",
|
|
@@ -40006,6 +40227,12 @@ Object.freeze({
|
|
|
40006
40227
|
addonId: null,
|
|
40007
40228
|
access: "create"
|
|
40008
40229
|
},
|
|
40230
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40231
|
+
capName: "pipeline-runner",
|
|
40232
|
+
capScope: "system",
|
|
40233
|
+
addonId: null,
|
|
40234
|
+
access: "create"
|
|
40235
|
+
},
|
|
40009
40236
|
"pipelineRunner.runDetailSubtree": {
|
|
40010
40237
|
capName: "pipeline-runner",
|
|
40011
40238
|
capScope: "system",
|
|
@@ -43150,6 +43377,11 @@ Object.freeze({
|
|
|
43150
43377
|
form: "single",
|
|
43151
43378
|
optional: false
|
|
43152
43379
|
}],
|
|
43380
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43381
|
+
name: "deviceId",
|
|
43382
|
+
form: "single",
|
|
43383
|
+
optional: false
|
|
43384
|
+
}],
|
|
43153
43385
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43154
43386
|
name: "deviceId",
|
|
43155
43387
|
form: "single",
|
|
@@ -43340,6 +43572,11 @@ Object.freeze({
|
|
|
43340
43572
|
form: "single",
|
|
43341
43573
|
optional: false
|
|
43342
43574
|
}],
|
|
43575
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43576
|
+
name: "deviceId",
|
|
43577
|
+
form: "single",
|
|
43578
|
+
optional: false
|
|
43579
|
+
}],
|
|
43343
43580
|
"pipelineRunner.runDetailSubtree": [{
|
|
43344
43581
|
name: "deviceId",
|
|
43345
43582
|
form: "single",
|
|
@@ -5359,7 +5359,7 @@ var ZodIssueCode = {
|
|
|
5359
5359
|
var ZodFirstPartyTypeKind;
|
|
5360
5360
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5361
5361
|
//#endregion
|
|
5362
|
-
//#region ../types/dist/sleep-
|
|
5362
|
+
//#region ../types/dist/sleep-BDR76Ykr.mjs
|
|
5363
5363
|
/**
|
|
5364
5364
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5365
5365
|
* window to float samples (D455).
|
|
@@ -11831,6 +11831,21 @@ var streamSignalsCapability = {
|
|
|
11831
11831
|
mode: "singleton",
|
|
11832
11832
|
deviceTypes: Object.values(DeviceType),
|
|
11833
11833
|
runtimeState: StreamSignalsStatusSchema,
|
|
11834
|
+
/**
|
|
11835
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
11836
|
+
*
|
|
11837
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
11838
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
11839
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
11840
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
11841
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
11842
|
+
* class the camera really detected stayed missing for the life of the row
|
|
11843
|
+
* because the fix could not reach it.
|
|
11844
|
+
*
|
|
11845
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
11846
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
11847
|
+
*/
|
|
11848
|
+
durability: "session",
|
|
11834
11849
|
methods: {
|
|
11835
11850
|
/**
|
|
11836
11851
|
* What this device can emit. Empty is a valid and common answer — most
|
|
@@ -18546,6 +18561,48 @@ var NcAlarmConfigSchema = object({
|
|
|
18546
18561
|
settings: NcAlarmSettingsSchema,
|
|
18547
18562
|
coverage: array(NcAlarmModeCoverageSchema)
|
|
18548
18563
|
});
|
|
18564
|
+
/**
|
|
18565
|
+
* ONE rule's demand on ONE camera's clip ring.
|
|
18566
|
+
*
|
|
18567
|
+
* A rule, not a camera: the broker takes the MAX over the asks that reach a
|
|
18568
|
+
* camera, so the answer stays a faithful description of the rules and the
|
|
18569
|
+
* bounding (the byte budget, the broker's own ceiling) stays where the cost
|
|
18570
|
+
* lives. A camera that appears in no ask is being told **nothing** — which is
|
|
18571
|
+
* a different thing from never having been told, and only the envelope
|
|
18572
|
+
* (`rulesLoaded`) can tell those apart.
|
|
18573
|
+
*/
|
|
18574
|
+
var NcClipRetentionAskSchema = object({
|
|
18575
|
+
/**
|
|
18576
|
+
* The camera this ask is about. **Absent = every camera**, which is what a
|
|
18577
|
+
* rule with no `conditions.devices` means: it can fire anywhere, so it is
|
|
18578
|
+
* asking everywhere.
|
|
18579
|
+
*/
|
|
18580
|
+
deviceId: number().int().nonnegative().optional(),
|
|
18581
|
+
/** Seconds of history the rule needs held for it. Never zero — a rule that
|
|
18582
|
+
* needs nothing produces no ask at all. */
|
|
18583
|
+
seconds: number().min(0).max(60),
|
|
18584
|
+
/** The profile the rule cuts from, when it named one. Absent = the cheapest
|
|
18585
|
+
* assigned, which is what the cut defaults to. */
|
|
18586
|
+
profile: CamProfileSchema.optional(),
|
|
18587
|
+
/** Who is asking — so a retention the operator did not expect names a rule. */
|
|
18588
|
+
ruleId: string(),
|
|
18589
|
+
ruleName: string(),
|
|
18590
|
+
/** Why this many seconds: the rule's own window, or the occupancy ceiling. */
|
|
18591
|
+
reason: _enum(["window", "occupancy"])
|
|
18592
|
+
});
|
|
18593
|
+
/**
|
|
18594
|
+
* The whole answer, with the one bit that keeps absence from reading as zero.
|
|
18595
|
+
*
|
|
18596
|
+
* `rulesLoaded` is false until the rule ledger has completed a load at least
|
|
18597
|
+
* once. A centre that is up but has not read its rules yet answers with an
|
|
18598
|
+
* empty ask list that means nothing at all — applying it would drop every
|
|
18599
|
+
* camera's ring to zero for the first events after a restart, which is the
|
|
18600
|
+
* footage this mechanism exists to keep.
|
|
18601
|
+
*/
|
|
18602
|
+
var NcClipRetentionPlanSchema = object({
|
|
18603
|
+
rulesLoaded: boolean(),
|
|
18604
|
+
asks: array(NcClipRetentionAskSchema).readonly()
|
|
18605
|
+
});
|
|
18549
18606
|
method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), method(object({ ruleId: string() }), object({ rule: NcRuleSchema.nullable() }), { auth: "admin" }), method(object({ rule: NcRuleInputSchema }), object({ rule: NcRuleSchema }), {
|
|
18550
18607
|
kind: "mutation",
|
|
18551
18608
|
auth: "admin",
|
|
@@ -18566,7 +18623,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18566
18623
|
}), object({ success: literal(true) }), {
|
|
18567
18624
|
kind: "mutation",
|
|
18568
18625
|
auth: "admin"
|
|
18569
|
-
}), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18626
|
+
}), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
|
|
18570
18627
|
deviceId: number().int(),
|
|
18571
18628
|
muted: boolean()
|
|
18572
18629
|
}), object({ success: literal(true) }), {
|
|
@@ -19767,13 +19824,26 @@ var TrackAudioLabelSchema = object({
|
|
|
19767
19824
|
* - `audio` — an audio event on the camera itself that was anomalous for
|
|
19768
19825
|
* THAT camera, loud, and heard while nothing visual was happening (D62).
|
|
19769
19826
|
*
|
|
19827
|
+
* - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
|
|
19828
|
+
* that frame's pixel space. A real root detector and a SPATIAL one: its
|
|
19829
|
+
* boxes are the same kind of fact `pipeline`'s are, produced by a different
|
|
19830
|
+
* detector.
|
|
19831
|
+
*
|
|
19832
|
+
* `onboard` was missing here while `DetectionSourceSchema` already had it, so
|
|
19833
|
+
* a persisted onboard track failed `safeParse` on read and came back with NO
|
|
19834
|
+
* source at all — which `isSpatialTrack` then admitted by accident, through the
|
|
19835
|
+
* `undefined` arm rather than by anybody's decision, and which `excludeSources`
|
|
19836
|
+
* could not name.
|
|
19837
|
+
*
|
|
19770
19838
|
* The spatial subsystems (tracker association, occupancy count, re-id /
|
|
19771
19839
|
* embedding, resurrection) MUST skip every synthetic source. Test for that
|
|
19772
|
-
* with `isSpatialTrack`, which allow-lists
|
|
19773
|
-
* check silently readmits every source added after it was
|
|
19840
|
+
* with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
|
|
19841
|
+
* `!== 'sensor'` check silently readmits every source added after it was
|
|
19842
|
+
* written.
|
|
19774
19843
|
*/
|
|
19775
19844
|
var TrackSourceSchema = _enum([
|
|
19776
19845
|
"pipeline",
|
|
19846
|
+
"onboard",
|
|
19777
19847
|
"sensor",
|
|
19778
19848
|
"audio"
|
|
19779
19849
|
]);
|
|
@@ -21156,6 +21226,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
|
21156
21226
|
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21157
21227
|
framesMatched: number().int()
|
|
21158
21228
|
})).readonly() });
|
|
21229
|
+
/**
|
|
21230
|
+
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21231
|
+
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
21232
|
+
* is an alias of this, not a second list.
|
|
21233
|
+
*/
|
|
21234
|
+
var AnalyticsLtsSeriesSchema = _enum([
|
|
21235
|
+
"motion",
|
|
21236
|
+
"audio-dbfs",
|
|
21237
|
+
"battery",
|
|
21238
|
+
"occupancy"
|
|
21239
|
+
]);
|
|
21240
|
+
/**
|
|
21241
|
+
* One closed 5-minute bucket of a long-term series.
|
|
21242
|
+
*
|
|
21243
|
+
* `samples` is how many readings the bucket folded — it is the ACTIVITY for a
|
|
21244
|
+
* series like `motion`, and the confidence for one like `occupancy`. A bucket
|
|
21245
|
+
* that exists at all was measured; a bucket that is absent was not, which is a
|
|
21246
|
+
* different claim from zero and the reason this is a sparse series.
|
|
21247
|
+
*/
|
|
21248
|
+
var LtsBucketSchema = object({
|
|
21249
|
+
scope: string(),
|
|
21250
|
+
bucketStart: number().int(),
|
|
21251
|
+
samples: number().int().nonnegative(),
|
|
21252
|
+
sum: number(),
|
|
21253
|
+
min: number(),
|
|
21254
|
+
max: number()
|
|
21255
|
+
});
|
|
21159
21256
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
21160
21257
|
deviceId: number(),
|
|
21161
21258
|
trackId: string()
|
|
@@ -21202,6 +21299,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21202
21299
|
kinds: array(string()).optional(),
|
|
21203
21300
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
21204
21301
|
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
21302
|
+
deviceId: number(),
|
|
21303
|
+
series: AnalyticsLtsSeriesSchema,
|
|
21304
|
+
/** Omit for EVERY scope of this series in the range. */
|
|
21305
|
+
scope: string().optional(),
|
|
21306
|
+
from: number(),
|
|
21307
|
+
to: number(),
|
|
21308
|
+
limit: number().int().positive().optional()
|
|
21309
|
+
}), array(LtsBucketSchema).readonly()), method(object({
|
|
21205
21310
|
deviceId: number(),
|
|
21206
21311
|
since: number(),
|
|
21207
21312
|
until: number(),
|
|
@@ -21820,13 +21925,39 @@ var MotionSourceEnum = _enum([
|
|
|
21820
21925
|
*/
|
|
21821
21926
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
21822
21927
|
/**
|
|
21823
|
-
* Which root
|
|
21824
|
-
*
|
|
21825
|
-
*
|
|
21826
|
-
*
|
|
21827
|
-
*
|
|
21928
|
+
* Which root detector a camera runs — EXACTLY ONE.
|
|
21929
|
+
*
|
|
21930
|
+
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
21931
|
+
* with (`DetectionSource`) rather than a second spelling of the same two
|
|
21932
|
+
* ideas: the value an operator picks here is the value that comes back on the
|
|
21933
|
+
* track, the overlay and the debug row.
|
|
21934
|
+
*
|
|
21935
|
+
* ## Why one, and why it is still an array
|
|
21936
|
+
*
|
|
21937
|
+
* Two roots on one camera is a capability nobody asked for and the operator has
|
|
21938
|
+
* since ruled out. It was never free: both planes feed the SAME per-device
|
|
21939
|
+
* stationary registry, both can promote the same parked object, and the two
|
|
21940
|
+
* detectors disagree about the same box by construction — which is the
|
|
21941
|
+
* disagreement D505 had to arbitrate. Removing the case removes the arbitration.
|
|
21942
|
+
*
|
|
21943
|
+
* The ARRAY shape survives because the stored settings and the attach payload
|
|
21944
|
+
* already speak it on every camera of every fleet, and a cap input that
|
|
21945
|
+
* suddenly refuses a stored value makes the camera un-attachable — a fail-closed
|
|
21946
|
+
* in the one direction that costs an operator their cameras. So the wire stays
|
|
21947
|
+
* tolerant and the TYPE is exact: a longer list is truncated to its first
|
|
21948
|
+
* element rather than refused, and `max(1)` is what every consumer can then
|
|
21949
|
+
* rely on.
|
|
21950
|
+
*
|
|
21951
|
+
* AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
|
|
21952
|
+
* a camera an operator left with no root detector — and `planDetectionSources`
|
|
21953
|
+
* has always said so: inventing a root for them is how a default acts without
|
|
21954
|
+
* anybody choosing it. Tightening this to `length(1)` broke that, and the
|
|
21955
|
+
* suite caught it.
|
|
21956
|
+
*
|
|
21957
|
+
* Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
|
|
21958
|
+
* `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
|
|
21828
21959
|
*/
|
|
21829
|
-
var DetectionSourcesSchema = array(DetectionSourceSchema);
|
|
21960
|
+
var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
|
|
21830
21961
|
/**
|
|
21831
21962
|
* Input shape for `pipeline-runner.reportMotion` cap method. Exported
|
|
21832
21963
|
* so cap-side consumers (the orchestrator forward, the runner addon's
|
|
@@ -22188,7 +22319,47 @@ var RunnerLocalMetricsSchema = object({
|
|
|
22188
22319
|
queueDepth: number(),
|
|
22189
22320
|
frameLazy: FrameLazyMetricsSchema.optional()
|
|
22190
22321
|
});
|
|
22322
|
+
/**
|
|
22323
|
+
* Pipeline Runner capability — runtime detection workhorse.
|
|
22324
|
+
*
|
|
22325
|
+
* One instance per node. Receives camera assignments from
|
|
22326
|
+
* `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
|
|
22327
|
+
* decoded frames, drains motion + detection queues, calls the local
|
|
22328
|
+
* `motion-detection` and `pipeline-executor` capabilities, and emits typed
|
|
22329
|
+
* `pipeline.inference-result` and `detection.motion-analysis` events on
|
|
22330
|
+
* the bus.
|
|
22331
|
+
*
|
|
22332
|
+
* Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
|
|
22333
|
+
* runner has zero knowledge of other agents, no global state, and never
|
|
22334
|
+
* makes assignment decisions itself.
|
|
22335
|
+
*/
|
|
22336
|
+
/**
|
|
22337
|
+
* Why a runner declined to look at a camera out of band. Named rather than a
|
|
22338
|
+
* bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
|
|
22339
|
+
* already mid-session and one already bursting are four different facts, and a
|
|
22340
|
+
* caller told only "no" cannot tell a protection from a bug.
|
|
22341
|
+
*/
|
|
22342
|
+
var OccupancyBurstRefusalSchema = _enum([
|
|
22343
|
+
"not-attached",
|
|
22344
|
+
"battery-asleep",
|
|
22345
|
+
"not-watching",
|
|
22346
|
+
"already-bursting"
|
|
22347
|
+
]);
|
|
22191
22348
|
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({
|
|
22349
|
+
deviceId: number(),
|
|
22350
|
+
/** How many frames to collect. The caller sizes this against what its
|
|
22351
|
+
* own confirmation needs; the runner clamps it to the field's range. */
|
|
22352
|
+
frames: number().int().positive().optional(),
|
|
22353
|
+
/** Why, for the log. A burst nobody can attribute is a cost nobody can
|
|
22354
|
+
* defend — the periodic one at least has a timer to point at. */
|
|
22355
|
+
reason: string()
|
|
22356
|
+
}), object({
|
|
22357
|
+
started: boolean(),
|
|
22358
|
+
refusedBecause: OccupancyBurstRefusalSchema.optional()
|
|
22359
|
+
}), {
|
|
22360
|
+
auth: "admin",
|
|
22361
|
+
kind: "mutation"
|
|
22362
|
+
}), method(object({
|
|
22192
22363
|
handle: FrameHandleSchema,
|
|
22193
22364
|
bbox: NativeCropBboxSchema,
|
|
22194
22365
|
maxWidth: number().int().positive().optional(),
|
|
@@ -34020,7 +34191,28 @@ var PerScopeBreakdownSchema = object({
|
|
|
34020
34191
|
/** Total tracked objects in this scope (frame / zone / unzoned). */
|
|
34021
34192
|
totalObjects: number().int().nonnegative(),
|
|
34022
34193
|
/** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
|
|
34023
|
-
byClass: record(string(), number().int().nonnegative())
|
|
34194
|
+
byClass: record(string(), number().int().nonnegative()),
|
|
34195
|
+
/**
|
|
34196
|
+
* Of `totalObjects`, how many are STANDING — objects the census holds,
|
|
34197
|
+
* present but not going anywhere (a parked car, a bin, a statue).
|
|
34198
|
+
*
|
|
34199
|
+
* The operator's question about a scene has two halves and they answer
|
|
34200
|
+
* different things: "what is parked here" is stable for hours and must not
|
|
34201
|
+
* flap, while "who is walking through" is the thing an alert is about. One
|
|
34202
|
+
* number could only serve one of them, and `totalObjects` served the first
|
|
34203
|
+
* badly — a passer-by moved it and every occupancy rule saw a change.
|
|
34204
|
+
*
|
|
34205
|
+
* `standing + transient === totalObjects`, always. The total keeps its old
|
|
34206
|
+
* meaning exactly, so no rule written against it changes behaviour.
|
|
34207
|
+
*
|
|
34208
|
+
* ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
|
|
34209
|
+
* this field cannot say, and a reader that folds absence in as 0 reports "no
|
|
34210
|
+
* parked objects here" about a camera whose lot is full.
|
|
34211
|
+
*/
|
|
34212
|
+
standingObjects: number().int().nonnegative().optional(),
|
|
34213
|
+
/** Of `totalObjects`, how many are passing through. See `standingObjects` —
|
|
34214
|
+
* same absence rule. */
|
|
34215
|
+
transientObjects: number().int().nonnegative().optional()
|
|
34024
34216
|
});
|
|
34025
34217
|
var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
34026
34218
|
zoneId: string(),
|
|
@@ -34143,6 +34335,23 @@ var HistoryPointSchema = object({
|
|
|
34143
34335
|
* triple covers the three spatial scopes (per-zone, frame-wide,
|
|
34144
34336
|
* outside-any-zone). Crossing them with `className?` gives the full
|
|
34145
34337
|
* combinatorial coverage the operator UI requested.
|
|
34338
|
+
*
|
|
34339
|
+
* ## ⚠️ The three history methods are DEPRECATED
|
|
34340
|
+
*
|
|
34341
|
+
* They are served from a 60-MINUTE in-memory ring. It dies with the process,
|
|
34342
|
+
* so after a restart they report nothing about a night that did happen, and any
|
|
34343
|
+
* window past an hour is silently clamped — a caller cannot tell a clamp from
|
|
34344
|
+
* an empty scene. The presets in the occupancy chart existed to hide that
|
|
34345
|
+
* horizon rather than to answer a question.
|
|
34346
|
+
*
|
|
34347
|
+
* Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
|
|
34348
|
+
* instead. Those rows are already written for every camera, ~60 bytes per
|
|
34349
|
+
* (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
|
|
34350
|
+
* Spell the scope with `occupancyScope(zoneId?, className?)` — the same
|
|
34351
|
+
* function the writer uses, so the two cannot drift.
|
|
34352
|
+
*
|
|
34353
|
+
* The ring stays until these three go, and it is the only thing left reading
|
|
34354
|
+
* it. Do not add a fourth caller.
|
|
34146
34355
|
*/
|
|
34147
34356
|
var zoneAnalyticsCapability = {
|
|
34148
34357
|
name: "zone-analytics",
|
|
@@ -38824,6 +39033,12 @@ Object.freeze({
|
|
|
38824
39033
|
addonId: null,
|
|
38825
39034
|
access: "view"
|
|
38826
39035
|
},
|
|
39036
|
+
"notificationRules.getClipRetentionAsks": {
|
|
39037
|
+
capName: "notification-rules",
|
|
39038
|
+
capScope: "system",
|
|
39039
|
+
addonId: null,
|
|
39040
|
+
access: "view"
|
|
39041
|
+
},
|
|
38827
39042
|
"notificationRules.getConditionCatalog": {
|
|
38828
39043
|
capName: "notification-rules",
|
|
38829
39044
|
capScope: "system",
|
|
@@ -39334,6 +39549,12 @@ Object.freeze({
|
|
|
39334
39549
|
addonId: null,
|
|
39335
39550
|
access: "create"
|
|
39336
39551
|
},
|
|
39552
|
+
"pipelineAnalytics.readLongTermSeries": {
|
|
39553
|
+
capName: "pipeline-analytics",
|
|
39554
|
+
capScope: "device",
|
|
39555
|
+
addonId: null,
|
|
39556
|
+
access: "view"
|
|
39557
|
+
},
|
|
39337
39558
|
"pipelineAnalytics.rebuildObjectEmbeddings": {
|
|
39338
39559
|
capName: "pipeline-analytics",
|
|
39339
39560
|
capScope: "device",
|
|
@@ -40006,6 +40227,12 @@ Object.freeze({
|
|
|
40006
40227
|
addonId: null,
|
|
40007
40228
|
access: "create"
|
|
40008
40229
|
},
|
|
40230
|
+
"pipelineRunner.requestOccupancyBurst": {
|
|
40231
|
+
capName: "pipeline-runner",
|
|
40232
|
+
capScope: "system",
|
|
40233
|
+
addonId: null,
|
|
40234
|
+
access: "create"
|
|
40235
|
+
},
|
|
40009
40236
|
"pipelineRunner.runDetailSubtree": {
|
|
40010
40237
|
capName: "pipeline-runner",
|
|
40011
40238
|
capScope: "system",
|
|
@@ -43150,6 +43377,11 @@ Object.freeze({
|
|
|
43150
43377
|
form: "single",
|
|
43151
43378
|
optional: false
|
|
43152
43379
|
}],
|
|
43380
|
+
"pipelineAnalytics.readLongTermSeries": [{
|
|
43381
|
+
name: "deviceId",
|
|
43382
|
+
form: "single",
|
|
43383
|
+
optional: false
|
|
43384
|
+
}],
|
|
43153
43385
|
"pipelineAnalytics.rebuildObjectEmbeddings": [{
|
|
43154
43386
|
name: "deviceId",
|
|
43155
43387
|
form: "single",
|
|
@@ -43340,6 +43572,11 @@ Object.freeze({
|
|
|
43340
43572
|
form: "single",
|
|
43341
43573
|
optional: false
|
|
43342
43574
|
}],
|
|
43575
|
+
"pipelineRunner.requestOccupancyBurst": [{
|
|
43576
|
+
name: "deviceId",
|
|
43577
|
+
form: "single",
|
|
43578
|
+
optional: false
|
|
43579
|
+
}],
|
|
43343
43580
|
"pipelineRunner.runDetailSubtree": [{
|
|
43344
43581
|
name: "deviceId",
|
|
43345
43582
|
form: "single",
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-yx8Zuhab.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-BDT9dZuy.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-homeassistant",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.127",
|
|
4
4
|
"description": "Home Assistant device provider addon for CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"dev": "vite build --watch",
|
|
127
127
|
"typecheck": "tsc --noEmit",
|
|
128
128
|
"test": "vitest run",
|
|
129
|
-
"publish": "npm publish --access public"
|
|
129
|
+
"publish:npm": "npm publish --access public"
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"home-assistant-js-websocket": "^9.4.0"
|