@camstack/addon-notifiers 1.2.106 → 1.2.108

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.
Files changed (3) hide show
  1. package/dist/addon.js +338 -32
  2. package/dist/addon.mjs +338 -32
  3. package/package.json +2 -2
package/dist/addon.js CHANGED
@@ -5390,7 +5390,7 @@ var ZodIssueCode = {
5390
5390
  var ZodFirstPartyTypeKind;
5391
5391
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5392
5392
  //#endregion
5393
- //#region ../types/dist/sleep-DEuj7E3j.mjs
5393
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5394
5394
  /**
5395
5395
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5396
5396
  * window to float samples (D455).
@@ -7271,6 +7271,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7271
7271
  DeviceRole["GenericNotifier"] = "generic-notifier";
7272
7272
  return DeviceRole;
7273
7273
  }({});
7274
+ /**
7275
+ * Identity — preserves literal types for downstream inference.
7276
+ *
7277
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7278
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7279
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7280
+ * Shape validity is enforced separately by the `customAction(...)` helper
7281
+ * whose return type is already a `CustomActionSpec<...>`.
7282
+ */
7283
+ function defineCustomActions(spec) {
7284
+ return spec;
7285
+ }
7286
+ function customAction(input, output, options) {
7287
+ return {
7288
+ input,
7289
+ output,
7290
+ kind: options?.kind ?? "query",
7291
+ auth: options?.auth ?? "protected",
7292
+ scope: options?.scope ?? { kind: "system" },
7293
+ ...options?.caller ? { caller: "required" } : {}
7294
+ };
7295
+ }
7274
7296
  var StaticDirOutputSchema = object({ staticDir: string() });
7275
7297
  var VersionOutputSchema = object({ version: string() });
7276
7298
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -12570,28 +12592,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12570
12592
  content: string()
12571
12593
  })) }), { auth: "admin" });
12572
12594
  /**
12573
- * Identity — preserves literal types for downstream inference.
12574
- *
12575
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12576
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12577
- * the broader unions declared on `CustomActionSpec`'s default generics.
12578
- * Shape validity is enforced separately by the `customAction(...)` helper
12579
- * whose return type is already a `CustomActionSpec<...>`.
12580
- */
12581
- function defineCustomActions(spec) {
12582
- return spec;
12583
- }
12584
- function customAction(input, output, options) {
12585
- return {
12586
- input,
12587
- output,
12588
- kind: options?.kind ?? "query",
12589
- auth: options?.auth ?? "protected",
12590
- scope: options?.scope ?? { kind: "system" },
12591
- ...options?.caller ? { caller: "required" } : {}
12592
- };
12593
- }
12594
- /**
12595
12595
  * `custom-model-registry` — collection cap exposing operator-registered
12596
12596
  * custom detection models. Each provider (today: `addon-model-studio`)
12597
12597
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -18020,6 +18020,48 @@ var NcAlarmConfigSchema = object({
18020
18020
  settings: NcAlarmSettingsSchema,
18021
18021
  coverage: array(NcAlarmModeCoverageSchema)
18022
18022
  });
18023
+ /**
18024
+ * ONE rule's demand on ONE camera's clip ring.
18025
+ *
18026
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18027
+ * camera, so the answer stays a faithful description of the rules and the
18028
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18029
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18030
+ * a different thing from never having been told, and only the envelope
18031
+ * (`rulesLoaded`) can tell those apart.
18032
+ */
18033
+ var NcClipRetentionAskSchema = object({
18034
+ /**
18035
+ * The camera this ask is about. **Absent = every camera**, which is what a
18036
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18037
+ * asking everywhere.
18038
+ */
18039
+ deviceId: number().int().nonnegative().optional(),
18040
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18041
+ * needs nothing produces no ask at all. */
18042
+ seconds: number().min(0).max(60),
18043
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18044
+ * assigned, which is what the cut defaults to. */
18045
+ profile: CamProfileSchema.optional(),
18046
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18047
+ ruleId: string(),
18048
+ ruleName: string(),
18049
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18050
+ reason: _enum(["window", "occupancy"])
18051
+ });
18052
+ /**
18053
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18054
+ *
18055
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18056
+ * once. A centre that is up but has not read its rules yet answers with an
18057
+ * empty ask list that means nothing at all — applying it would drop every
18058
+ * camera's ring to zero for the first events after a restart, which is the
18059
+ * footage this mechanism exists to keep.
18060
+ */
18061
+ var NcClipRetentionPlanSchema = object({
18062
+ rulesLoaded: boolean(),
18063
+ asks: array(NcClipRetentionAskSchema).readonly()
18064
+ });
18023
18065
  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 }), {
18024
18066
  kind: "mutation",
18025
18067
  auth: "admin",
@@ -18040,7 +18082,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18040
18082
  }), object({ success: literal(true) }), {
18041
18083
  kind: "mutation",
18042
18084
  auth: "admin"
18043
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18085
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18044
18086
  deviceId: number().int(),
18045
18087
  muted: boolean()
18046
18088
  }), object({ success: literal(true) }), {
@@ -19185,13 +19227,26 @@ var TrackAudioLabelSchema = object({
19185
19227
  * - `audio` — an audio event on the camera itself that was anomalous for
19186
19228
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19187
19229
  *
19230
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19231
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19232
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19233
+ * detector.
19234
+ *
19235
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19236
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19237
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19238
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19239
+ * could not name.
19240
+ *
19188
19241
  * The spatial subsystems (tracker association, occupancy count, re-id /
19189
19242
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19190
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19191
- * check silently readmits every source added after it was written.
19243
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19244
+ * `!== 'sensor'` check silently readmits every source added after it was
19245
+ * written.
19192
19246
  */
19193
19247
  var TrackSourceSchema = _enum([
19194
19248
  "pipeline",
19249
+ "onboard",
19195
19250
  "sensor",
19196
19251
  "audio"
19197
19252
  ]);
@@ -20574,6 +20629,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20574
20629
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20575
20630
  framesMatched: number().int()
20576
20631
  })).readonly() });
20632
+ /**
20633
+ * The long-term series a camera produces. A closed union so a typo cannot
20634
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20635
+ * is an alias of this, not a second list.
20636
+ */
20637
+ var AnalyticsLtsSeriesSchema = _enum([
20638
+ "motion",
20639
+ "audio-dbfs",
20640
+ "battery",
20641
+ "occupancy"
20642
+ ]);
20643
+ /**
20644
+ * One closed 5-minute bucket of a long-term series.
20645
+ *
20646
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20647
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20648
+ * that exists at all was measured; a bucket that is absent was not, which is a
20649
+ * different claim from zero and the reason this is a sparse series.
20650
+ */
20651
+ var LtsBucketSchema = object({
20652
+ scope: string(),
20653
+ bucketStart: number().int(),
20654
+ samples: number().int().nonnegative(),
20655
+ sum: number(),
20656
+ min: number(),
20657
+ max: number()
20658
+ });
20577
20659
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20578
20660
  deviceId: number(),
20579
20661
  trackId: string()
@@ -20620,6 +20702,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20620
20702
  kinds: array(string()).optional(),
20621
20703
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20622
20704
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20705
+ deviceId: number(),
20706
+ series: AnalyticsLtsSeriesSchema,
20707
+ /** Omit for EVERY scope of this series in the range. */
20708
+ scope: string().optional(),
20709
+ from: number(),
20710
+ to: number(),
20711
+ limit: number().int().positive().optional()
20712
+ }), array(LtsBucketSchema).readonly()), method(object({
20623
20713
  deviceId: number(),
20624
20714
  since: number(),
20625
20715
  until: number(),
@@ -21238,6 +21328,40 @@ var MotionSourceEnum = _enum([
21238
21328
  */
21239
21329
  var MotionSourcesSchema = array(MotionSourceEnum);
21240
21330
  /**
21331
+ * Which root detector a camera runs — EXACTLY ONE.
21332
+ *
21333
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21334
+ * with (`DetectionSource`) rather than a second spelling of the same two
21335
+ * ideas: the value an operator picks here is the value that comes back on the
21336
+ * track, the overlay and the debug row.
21337
+ *
21338
+ * ## Why one, and why it is still an array
21339
+ *
21340
+ * Two roots on one camera is a capability nobody asked for and the operator has
21341
+ * since ruled out. It was never free: both planes feed the SAME per-device
21342
+ * stationary registry, both can promote the same parked object, and the two
21343
+ * detectors disagree about the same box by construction — which is the
21344
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21345
+ *
21346
+ * The ARRAY shape survives because the stored settings and the attach payload
21347
+ * already speak it on every camera of every fleet, and a cap input that
21348
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21349
+ * in the one direction that costs an operator their cameras. So the wire stays
21350
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21351
+ * element rather than refused, and `max(1)` is what every consumer can then
21352
+ * rely on.
21353
+ *
21354
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21355
+ * a camera an operator left with no root detector — and `planDetectionSources`
21356
+ * has always said so: inventing a root for them is how a default acts without
21357
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21358
+ * suite caught it.
21359
+ *
21360
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21361
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21362
+ */
21363
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21364
+ /**
21241
21365
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21242
21366
  * so cap-side consumers (the orchestrator forward, the runner addon's
21243
21367
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21388,6 +21512,35 @@ var RunnerCameraConfigSchema = object({
21388
21512
  * events; the orchestrator forwards to `reportMotion`.
21389
21513
  */
21390
21514
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21515
+ /**
21516
+ * WHICH root detector runs for this camera. The detection counterpart of
21517
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21518
+ * of sources the system understands, vendor-agnostic, owned here.
21519
+ *
21520
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21521
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21522
+ * here. Its boxes reach post-analysis on the same
21523
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21524
+ * track gets the same tracker, the same overlay and the same detail
21525
+ * subtree (face / plate / embedding).
21526
+ *
21527
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21528
+ * run, and that is where a camera with a usable onboard detector buys back
21529
+ * its share of the accelerator. It saves the root inference, not the decode
21530
+ * — the detail subtree still needs pixels to cut crops from.
21531
+ *
21532
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21533
+ * step at all (there is nothing to track), and the cap that knows this says
21534
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21535
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21536
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21537
+ * worth exactly what it already is — a wake signal with a class.
21538
+ *
21539
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21540
+ * vendor never turns a detector on for the operator, and neither does a
21541
+ * default.
21542
+ */
21543
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21391
21544
  pipelineEnabled: boolean().default(true),
21392
21545
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21393
21546
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21569,7 +21722,47 @@ var RunnerLocalMetricsSchema = object({
21569
21722
  queueDepth: number(),
21570
21723
  frameLazy: FrameLazyMetricsSchema.optional()
21571
21724
  });
21725
+ /**
21726
+ * Pipeline Runner capability — runtime detection workhorse.
21727
+ *
21728
+ * One instance per node. Receives camera assignments from
21729
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21730
+ * decoded frames, drains motion + detection queues, calls the local
21731
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21732
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21733
+ * the bus.
21734
+ *
21735
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21736
+ * runner has zero knowledge of other agents, no global state, and never
21737
+ * makes assignment decisions itself.
21738
+ */
21739
+ /**
21740
+ * Why a runner declined to look at a camera out of band. Named rather than a
21741
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21742
+ * already mid-session and one already bursting are four different facts, and a
21743
+ * caller told only "no" cannot tell a protection from a bug.
21744
+ */
21745
+ var OccupancyBurstRefusalSchema = _enum([
21746
+ "not-attached",
21747
+ "battery-asleep",
21748
+ "not-watching",
21749
+ "already-bursting"
21750
+ ]);
21572
21751
  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({
21752
+ deviceId: number(),
21753
+ /** How many frames to collect. The caller sizes this against what its
21754
+ * own confirmation needs; the runner clamps it to the field's range. */
21755
+ frames: number().int().positive().optional(),
21756
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21757
+ * defend — the periodic one at least has a timer to point at. */
21758
+ reason: string()
21759
+ }), object({
21760
+ started: boolean(),
21761
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21762
+ }), {
21763
+ auth: "admin",
21764
+ kind: "mutation"
21765
+ }), method(object({
21573
21766
  handle: FrameHandleSchema,
21574
21767
  bbox: NativeCropBboxSchema,
21575
21768
  maxWidth: number().int().positive().optional(),
@@ -27038,7 +27231,7 @@ var NativeDetectionSchema = object({
27038
27231
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
27039
27232
  confidence: number().min(0).max(1).optional()
27040
27233
  });
27041
- object({
27234
+ var NativeObjectDetectionStatusSchema = object({
27042
27235
  /**
27043
27236
  * Last observed instance per class. Missing entries mean the class
27044
27237
  * is supported but nothing has been seen since the provider started.
@@ -27055,14 +27248,56 @@ object({
27055
27248
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27056
27249
  /**
27057
27250
  * Whether forwarding of onboard AI detections is enabled for this device.
27058
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27059
- * churn the tracker, so forwarding stays off until the operator enables it.
27251
+ *
27252
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27253
+ * camera runs — that is the operator's choice, and it is made where every
27254
+ * other detection choice is made. `geometry` on
27255
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27256
+ * choice would buy this particular camera.
27060
27257
  */
27061
27258
  enabled: boolean()
27062
- }).extend({
27259
+ });
27260
+ /**
27261
+ * WHEN a camera's onboard detections carry geometry.
27262
+ *
27263
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27264
+ * a detection is a trackable subject whenever the camera sees one.
27265
+ * - `while-streaming` — only while some stream of this camera is already open.
27266
+ * The boxes ride the video's own side-channel rather than a feed of their
27267
+ * own, so they cost nothing and they exist only when something is pulling.
27268
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27269
+ * radio drain, but a camera that is awake is awake precisely because
27270
+ * something is in front of it, and its stream is already being pulled.
27271
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27272
+ * pipeline needs geometry to make a subject, so such a push reaches the
27273
+ * tracker as motion and no further.
27274
+ *
27275
+ * Reported and not inferred, because the operator's question in front of the
27276
+ * picker is "what do I get", and these are three different answers (D14: the
27277
+ * derived form is only as honest as `getOptions`).
27278
+ */
27279
+ var NativeObjectGeometryEnum = _enum([
27280
+ "boxed",
27281
+ "while-streaming",
27282
+ "flag-only"
27283
+ ]);
27284
+ var NativeObjectDetectionOptionsSchema = object({
27285
+ /** Classes this firmware can detect — the same list the status reports. */
27286
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27287
+ /** What a detection from this camera carries. */
27288
+ geometry: NativeObjectGeometryEnum
27289
+ });
27290
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27291
+ NativeObjectDetectionStatusSchema.extend({
27063
27292
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27064
27293
  lastFetchedAt: number() });
27065
- DeviceType.Camera, method(object({
27294
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27295
+ deviceId: number(),
27296
+ settings: NativeObjectDetectionSettingsPatchSchema
27297
+ }), _void(), {
27298
+ kind: "mutation",
27299
+ auth: "admin"
27300
+ }), method(object({
27066
27301
  deviceId: number(),
27067
27302
  enabled: boolean()
27068
27303
  }), _void(), {
@@ -30861,7 +31096,28 @@ var PerScopeBreakdownSchema = object({
30861
31096
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30862
31097
  totalObjects: number().int().nonnegative(),
30863
31098
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30864
- byClass: record(string(), number().int().nonnegative())
31099
+ byClass: record(string(), number().int().nonnegative()),
31100
+ /**
31101
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31102
+ * present but not going anywhere (a parked car, a bin, a statue).
31103
+ *
31104
+ * The operator's question about a scene has two halves and they answer
31105
+ * different things: "what is parked here" is stable for hours and must not
31106
+ * flap, while "who is walking through" is the thing an alert is about. One
31107
+ * number could only serve one of them, and `totalObjects` served the first
31108
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31109
+ *
31110
+ * `standing + transient === totalObjects`, always. The total keeps its old
31111
+ * meaning exactly, so no rule written against it changes behaviour.
31112
+ *
31113
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31114
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31115
+ * parked objects here" about a camera whose lot is full.
31116
+ */
31117
+ standingObjects: number().int().nonnegative().optional(),
31118
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31119
+ * same absence rule. */
31120
+ transientObjects: number().int().nonnegative().optional()
30865
31121
  });
30866
31122
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30867
31123
  zoneId: string(),
@@ -33800,12 +34056,24 @@ Object.freeze({
33800
34056
  addonId: null,
33801
34057
  access: "create"
33802
34058
  },
34059
+ "nativeObjectDetection.getOptions": {
34060
+ capName: "native-object-detection",
34061
+ capScope: "device",
34062
+ addonId: null,
34063
+ access: "view"
34064
+ },
33803
34065
  "nativeObjectDetection.setEnabled": {
33804
34066
  capName: "native-object-detection",
33805
34067
  capScope: "device",
33806
34068
  addonId: null,
33807
34069
  access: "create"
33808
34070
  },
34071
+ "nativeObjectDetection.setSettings": {
34072
+ capName: "native-object-detection",
34073
+ capScope: "device",
34074
+ addonId: null,
34075
+ access: "create"
34076
+ },
33809
34077
  "navigation.getFeatures": {
33810
34078
  capName: "navigation",
33811
34079
  capScope: "device",
@@ -34070,6 +34338,12 @@ Object.freeze({
34070
34338
  addonId: null,
34071
34339
  access: "view"
34072
34340
  },
34341
+ "notificationRules.getClipRetentionAsks": {
34342
+ capName: "notification-rules",
34343
+ capScope: "system",
34344
+ addonId: null,
34345
+ access: "view"
34346
+ },
34073
34347
  "notificationRules.getConditionCatalog": {
34074
34348
  capName: "notification-rules",
34075
34349
  capScope: "system",
@@ -34580,6 +34854,12 @@ Object.freeze({
34580
34854
  addonId: null,
34581
34855
  access: "create"
34582
34856
  },
34857
+ "pipelineAnalytics.readLongTermSeries": {
34858
+ capName: "pipeline-analytics",
34859
+ capScope: "device",
34860
+ addonId: null,
34861
+ access: "view"
34862
+ },
34583
34863
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34584
34864
  capName: "pipeline-analytics",
34585
34865
  capScope: "device",
@@ -35252,6 +35532,12 @@ Object.freeze({
35252
35532
  addonId: null,
35253
35533
  access: "create"
35254
35534
  },
35535
+ "pipelineRunner.requestOccupancyBurst": {
35536
+ capName: "pipeline-runner",
35537
+ capScope: "system",
35538
+ addonId: null,
35539
+ access: "create"
35540
+ },
35255
35541
  "pipelineRunner.runDetailSubtree": {
35256
35542
  capName: "pipeline-runner",
35257
35543
  capScope: "system",
@@ -38032,11 +38318,21 @@ Object.freeze({
38032
38318
  form: "single",
38033
38319
  optional: false
38034
38320
  }],
38321
+ "nativeObjectDetection.getOptions": [{
38322
+ name: "deviceId",
38323
+ form: "single",
38324
+ optional: false
38325
+ }],
38035
38326
  "nativeObjectDetection.setEnabled": [{
38036
38327
  name: "deviceId",
38037
38328
  form: "single",
38038
38329
  optional: false
38039
38330
  }],
38331
+ "nativeObjectDetection.setSettings": [{
38332
+ name: "deviceId",
38333
+ form: "single",
38334
+ optional: false
38335
+ }],
38040
38336
  "navigation.getFeatures": [{
38041
38337
  name: "deviceId",
38042
38338
  form: "single",
@@ -38386,6 +38682,11 @@ Object.freeze({
38386
38682
  form: "single",
38387
38683
  optional: false
38388
38684
  }],
38685
+ "pipelineAnalytics.readLongTermSeries": [{
38686
+ name: "deviceId",
38687
+ form: "single",
38688
+ optional: false
38689
+ }],
38389
38690
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38390
38691
  name: "deviceId",
38391
38692
  form: "single",
@@ -38576,6 +38877,11 @@ Object.freeze({
38576
38877
  form: "single",
38577
38878
  optional: false
38578
38879
  }],
38880
+ "pipelineRunner.requestOccupancyBurst": [{
38881
+ name: "deviceId",
38882
+ form: "single",
38883
+ optional: false
38884
+ }],
38579
38885
  "pipelineRunner.runDetailSubtree": [{
38580
38886
  name: "deviceId",
38581
38887
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
5363
5363
  var ZodFirstPartyTypeKind;
5364
5364
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5365
5365
  //#endregion
5366
- //#region ../types/dist/sleep-DEuj7E3j.mjs
5366
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5367
5367
  /**
5368
5368
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5369
5369
  * window to float samples (D455).
@@ -7244,6 +7244,28 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7244
7244
  DeviceRole["GenericNotifier"] = "generic-notifier";
7245
7245
  return DeviceRole;
7246
7246
  }({});
7247
+ /**
7248
+ * Identity — preserves literal types for downstream inference.
7249
+ *
7250
+ * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
7251
+ * TypeScript does not widen each entry's literal `kind`/`auth` fields to
7252
+ * the broader unions declared on `CustomActionSpec`'s default generics.
7253
+ * Shape validity is enforced separately by the `customAction(...)` helper
7254
+ * whose return type is already a `CustomActionSpec<...>`.
7255
+ */
7256
+ function defineCustomActions(spec) {
7257
+ return spec;
7258
+ }
7259
+ function customAction(input, output, options) {
7260
+ return {
7261
+ input,
7262
+ output,
7263
+ kind: options?.kind ?? "query",
7264
+ auth: options?.auth ?? "protected",
7265
+ scope: options?.scope ?? { kind: "system" },
7266
+ ...options?.caller ? { caller: "required" } : {}
7267
+ };
7268
+ }
7247
7269
  var StaticDirOutputSchema = object({ staticDir: string() });
7248
7270
  var VersionOutputSchema = object({ version: string() });
7249
7271
  method(_void(), StaticDirOutputSchema, { auth: "admin" }), method(_void(), VersionOutputSchema, { auth: "admin" });
@@ -12543,28 +12565,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12543
12565
  content: string()
12544
12566
  })) }), { auth: "admin" });
12545
12567
  /**
12546
- * Identity — preserves literal types for downstream inference.
12547
- *
12548
- * The constraint is `Record<string, unknown>` (not `CustomActionsSpec`) so
12549
- * TypeScript does not widen each entry's literal `kind`/`auth` fields to
12550
- * the broader unions declared on `CustomActionSpec`'s default generics.
12551
- * Shape validity is enforced separately by the `customAction(...)` helper
12552
- * whose return type is already a `CustomActionSpec<...>`.
12553
- */
12554
- function defineCustomActions(spec) {
12555
- return spec;
12556
- }
12557
- function customAction(input, output, options) {
12558
- return {
12559
- input,
12560
- output,
12561
- kind: options?.kind ?? "query",
12562
- auth: options?.auth ?? "protected",
12563
- scope: options?.scope ?? { kind: "system" },
12564
- ...options?.caller ? { caller: "required" } : {}
12565
- };
12566
- }
12567
- /**
12568
12568
  * `custom-model-registry` — collection cap exposing operator-registered
12569
12569
  * custom detection models. Each provider (today: `addon-model-studio`)
12570
12570
  * contributes a list of `CustomModelDescriptor`s; the hub auto-concatenates
@@ -17993,6 +17993,48 @@ var NcAlarmConfigSchema = object({
17993
17993
  settings: NcAlarmSettingsSchema,
17994
17994
  coverage: array(NcAlarmModeCoverageSchema)
17995
17995
  });
17996
+ /**
17997
+ * ONE rule's demand on ONE camera's clip ring.
17998
+ *
17999
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
18000
+ * camera, so the answer stays a faithful description of the rules and the
18001
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
18002
+ * lives. A camera that appears in no ask is being told **nothing** — which is
18003
+ * a different thing from never having been told, and only the envelope
18004
+ * (`rulesLoaded`) can tell those apart.
18005
+ */
18006
+ var NcClipRetentionAskSchema = object({
18007
+ /**
18008
+ * The camera this ask is about. **Absent = every camera**, which is what a
18009
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
18010
+ * asking everywhere.
18011
+ */
18012
+ deviceId: number().int().nonnegative().optional(),
18013
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
18014
+ * needs nothing produces no ask at all. */
18015
+ seconds: number().min(0).max(60),
18016
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
18017
+ * assigned, which is what the cut defaults to. */
18018
+ profile: CamProfileSchema.optional(),
18019
+ /** Who is asking — so a retention the operator did not expect names a rule. */
18020
+ ruleId: string(),
18021
+ ruleName: string(),
18022
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
18023
+ reason: _enum(["window", "occupancy"])
18024
+ });
18025
+ /**
18026
+ * The whole answer, with the one bit that keeps absence from reading as zero.
18027
+ *
18028
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
18029
+ * once. A centre that is up but has not read its rules yet answers with an
18030
+ * empty ask list that means nothing at all — applying it would drop every
18031
+ * camera's ring to zero for the first events after a restart, which is the
18032
+ * footage this mechanism exists to keep.
18033
+ */
18034
+ var NcClipRetentionPlanSchema = object({
18035
+ rulesLoaded: boolean(),
18036
+ asks: array(NcClipRetentionAskSchema).readonly()
18037
+ });
17996
18038
  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 }), {
17997
18039
  kind: "mutation",
17998
18040
  auth: "admin",
@@ -18013,7 +18055,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18013
18055
  }), object({ success: literal(true) }), {
18014
18056
  kind: "mutation",
18015
18057
  auth: "admin"
18016
- }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18058
+ }), method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }), method(object({}), object({ mutedDeviceIds: array(number().int()).readonly() }), { auth: "admin" }), method(object({
18017
18059
  deviceId: number().int(),
18018
18060
  muted: boolean()
18019
18061
  }), object({ success: literal(true) }), {
@@ -19158,13 +19200,26 @@ var TrackAudioLabelSchema = object({
19158
19200
  * - `audio` — an audio event on the camera itself that was anomalous for
19159
19201
  * THAT camera, loud, and heard while nothing visual was happening (D62).
19160
19202
  *
19203
+ * - `onboard` — the CAMERA's own firmware, paired with a decoded frame in
19204
+ * that frame's pixel space. A real root detector and a SPATIAL one: its
19205
+ * boxes are the same kind of fact `pipeline`'s are, produced by a different
19206
+ * detector.
19207
+ *
19208
+ * `onboard` was missing here while `DetectionSourceSchema` already had it, so
19209
+ * a persisted onboard track failed `safeParse` on read and came back with NO
19210
+ * source at all — which `isSpatialTrack` then admitted by accident, through the
19211
+ * `undefined` arm rather than by anybody's decision, and which `excludeSources`
19212
+ * could not name.
19213
+ *
19161
19214
  * The spatial subsystems (tracker association, occupancy count, re-id /
19162
19215
  * embedding, resurrection) MUST skip every synthetic source. Test for that
19163
- * with `isSpatialTrack`, which allow-lists `pipeline` — a `!== 'sensor'`
19164
- * check silently readmits every source added after it was written.
19216
+ * with `isSpatialTrack`, which allow-lists the spatial sources explicitly — a
19217
+ * `!== 'sensor'` check silently readmits every source added after it was
19218
+ * written.
19165
19219
  */
19166
19220
  var TrackSourceSchema = _enum([
19167
19221
  "pipeline",
19222
+ "onboard",
19168
19223
  "sensor",
19169
19224
  "audio"
19170
19225
  ]);
@@ -20547,6 +20602,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
20547
20602
  * solid is this track", cheaper than re-deriving it from a trajectory. */
20548
20603
  framesMatched: number().int()
20549
20604
  })).readonly() });
20605
+ /**
20606
+ * The long-term series a camera produces. A closed union so a typo cannot
20607
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
20608
+ * is an alias of this, not a second list.
20609
+ */
20610
+ var AnalyticsLtsSeriesSchema = _enum([
20611
+ "motion",
20612
+ "audio-dbfs",
20613
+ "battery",
20614
+ "occupancy"
20615
+ ]);
20616
+ /**
20617
+ * One closed 5-minute bucket of a long-term series.
20618
+ *
20619
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
20620
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
20621
+ * that exists at all was measured; a bucket that is absent was not, which is a
20622
+ * different claim from zero and the reason this is a sparse series.
20623
+ */
20624
+ var LtsBucketSchema = object({
20625
+ scope: string(),
20626
+ bucketStart: number().int(),
20627
+ samples: number().int().nonnegative(),
20628
+ sum: number(),
20629
+ min: number(),
20630
+ max: number()
20631
+ });
20550
20632
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
20551
20633
  deviceId: number(),
20552
20634
  trackId: string()
@@ -20593,6 +20675,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20593
20675
  kinds: array(string()).optional(),
20594
20676
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
20595
20677
  }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
20678
+ deviceId: number(),
20679
+ series: AnalyticsLtsSeriesSchema,
20680
+ /** Omit for EVERY scope of this series in the range. */
20681
+ scope: string().optional(),
20682
+ from: number(),
20683
+ to: number(),
20684
+ limit: number().int().positive().optional()
20685
+ }), array(LtsBucketSchema).readonly()), method(object({
20596
20686
  deviceId: number(),
20597
20687
  since: number(),
20598
20688
  until: number(),
@@ -21211,6 +21301,40 @@ var MotionSourceEnum = _enum([
21211
21301
  */
21212
21302
  var MotionSourcesSchema = array(MotionSourceEnum);
21213
21303
  /**
21304
+ * Which root detector a camera runs — EXACTLY ONE.
21305
+ *
21306
+ * Deliberately the SAME vocabulary post-analysis already tags every detection
21307
+ * with (`DetectionSource`) rather than a second spelling of the same two
21308
+ * ideas: the value an operator picks here is the value that comes back on the
21309
+ * track, the overlay and the debug row.
21310
+ *
21311
+ * ## Why one, and why it is still an array
21312
+ *
21313
+ * Two roots on one camera is a capability nobody asked for and the operator has
21314
+ * since ruled out. It was never free: both planes feed the SAME per-device
21315
+ * stationary registry, both can promote the same parked object, and the two
21316
+ * detectors disagree about the same box by construction — which is the
21317
+ * disagreement D505 had to arbitrate. Removing the case removes the arbitration.
21318
+ *
21319
+ * The ARRAY shape survives because the stored settings and the attach payload
21320
+ * already speak it on every camera of every fleet, and a cap input that
21321
+ * suddenly refuses a stored value makes the camera un-attachable — a fail-closed
21322
+ * in the one direction that costs an operator their cameras. So the wire stays
21323
+ * tolerant and the TYPE is exact: a longer list is truncated to its first
21324
+ * element rather than refused, and `max(1)` is what every consumer can then
21325
+ * rely on.
21326
+ *
21327
+ * AT MOST one, not exactly one. The EMPTY list is a legal, deliberate pick —
21328
+ * a camera an operator left with no root detector — and `planDetectionSources`
21329
+ * has always said so: inventing a root for them is how a default acts without
21330
+ * anybody choosing it. Tightening this to `length(1)` broke that, and the
21331
+ * suite caught it.
21332
+ *
21333
+ * Measured before tightening (2026-09-15, this fleet, 6 h of attaches): 3327
21334
+ * `["pipeline"]` and 2 `["onboard"]`. Not one camera had two.
21335
+ */
21336
+ var DetectionSourcesSchema = preprocess((value) => Array.isArray(value) && value.length > 1 ? value.slice(0, 1) : value, array(DetectionSourceSchema).max(1));
21337
+ /**
21214
21338
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
21215
21339
  * so cap-side consumers (the orchestrator forward, the runner addon's
21216
21340
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -21361,6 +21485,35 @@ var RunnerCameraConfigSchema = object({
21361
21485
  * events; the orchestrator forwards to `reportMotion`.
21362
21486
  */
21363
21487
  motionSources: MotionSourcesSchema.default(["analyzer"]),
21488
+ /**
21489
+ * WHICH root detector runs for this camera. The detection counterpart of
21490
+ * {@link motionSources}, same shape and same discipline: a per-camera list
21491
+ * of sources the system understands, vendor-agnostic, owned here.
21492
+ *
21493
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
21494
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
21495
+ * here. Its boxes reach post-analysis on the same
21496
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
21497
+ * track gets the same tracker, the same overlay and the same detail
21498
+ * subtree (face / plate / embedding).
21499
+ *
21500
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
21501
+ * run, and that is where a camera with a usable onboard detector buys back
21502
+ * its share of the accelerator. It saves the root inference, not the decode
21503
+ * — the detail subtree still needs pixels to cut crops from.
21504
+ *
21505
+ * A camera whose onboard detections carry no geometry cannot serve as a root
21506
+ * step at all (there is nothing to track), and the cap that knows this says
21507
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
21508
+ * every battery camera: the boxes ride a sub-stream a battery camera never
21509
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
21510
+ * worth exactly what it already is — a wake signal with a class.
21511
+ *
21512
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
21513
+ * vendor never turns a detector on for the operator, and neither does a
21514
+ * default.
21515
+ */
21516
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
21364
21517
  pipelineEnabled: boolean().default(true),
21365
21518
  /** Ordered tree of video steps. Absent → runner skips video detection. */
21366
21519
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -21542,7 +21695,47 @@ var RunnerLocalMetricsSchema = object({
21542
21695
  queueDepth: number(),
21543
21696
  frameLazy: FrameLazyMetricsSchema.optional()
21544
21697
  });
21698
+ /**
21699
+ * Pipeline Runner capability — runtime detection workhorse.
21700
+ *
21701
+ * One instance per node. Receives camera assignments from
21702
+ * `addon-pipeline-orchestrator`, subscribes to the local stream-broker for
21703
+ * decoded frames, drains motion + detection queues, calls the local
21704
+ * `motion-detection` and `pipeline-executor` capabilities, and emits typed
21705
+ * `pipeline.inference-result` and `detection.motion-analysis` events on
21706
+ * the bus.
21707
+ *
21708
+ * Distinct from `pipeline-orchestrator` (the hub-side load balancer) — the
21709
+ * runner has zero knowledge of other agents, no global state, and never
21710
+ * makes assignment decisions itself.
21711
+ */
21712
+ /**
21713
+ * Why a runner declined to look at a camera out of band. Named rather than a
21714
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
21715
+ * already mid-session and one already bursting are four different facts, and a
21716
+ * caller told only "no" cannot tell a protection from a bug.
21717
+ */
21718
+ var OccupancyBurstRefusalSchema = _enum([
21719
+ "not-attached",
21720
+ "battery-asleep",
21721
+ "not-watching",
21722
+ "already-bursting"
21723
+ ]);
21545
21724
  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({
21725
+ deviceId: number(),
21726
+ /** How many frames to collect. The caller sizes this against what its
21727
+ * own confirmation needs; the runner clamps it to the field's range. */
21728
+ frames: number().int().positive().optional(),
21729
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
21730
+ * defend — the periodic one at least has a timer to point at. */
21731
+ reason: string()
21732
+ }), object({
21733
+ started: boolean(),
21734
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
21735
+ }), {
21736
+ auth: "admin",
21737
+ kind: "mutation"
21738
+ }), method(object({
21546
21739
  handle: FrameHandleSchema,
21547
21740
  bbox: NativeCropBboxSchema,
21548
21741
  maxWidth: number().int().positive().optional(),
@@ -27011,7 +27204,7 @@ var NativeDetectionSchema = object({
27011
27204
  /** Firmware-provided confidence [0..1]. Reolink pushes don't carry it → undefined. */
27012
27205
  confidence: number().min(0).max(1).optional()
27013
27206
  });
27014
- object({
27207
+ var NativeObjectDetectionStatusSchema = object({
27015
27208
  /**
27016
27209
  * Last observed instance per class. Missing entries mean the class
27017
27210
  * is supported but nothing has been seen since the provider started.
@@ -27028,14 +27221,56 @@ object({
27028
27221
  supportedClasses: array(NativeObjectClassEnum).readonly(),
27029
27222
  /**
27030
27223
  * Whether forwarding of onboard AI detections is enabled for this device.
27031
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
27032
- * churn the tracker, so forwarding stays off until the operator enables it.
27224
+ *
27225
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
27226
+ * camera runs — that is the operator's choice, and it is made where every
27227
+ * other detection choice is made. `geometry` on
27228
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
27229
+ * choice would buy this particular camera.
27033
27230
  */
27034
27231
  enabled: boolean()
27035
- }).extend({
27232
+ });
27233
+ /**
27234
+ * WHEN a camera's onboard detections carry geometry.
27235
+ *
27236
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
27237
+ * a detection is a trackable subject whenever the camera sees one.
27238
+ * - `while-streaming` — only while some stream of this camera is already open.
27239
+ * The boxes ride the video's own side-channel rather than a feed of their
27240
+ * own, so they cost nothing and they exist only when something is pulling.
27241
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
27242
+ * radio drain, but a camera that is awake is awake precisely because
27243
+ * something is in front of it, and its stream is already being pulled.
27244
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
27245
+ * pipeline needs geometry to make a subject, so such a push reaches the
27246
+ * tracker as motion and no further.
27247
+ *
27248
+ * Reported and not inferred, because the operator's question in front of the
27249
+ * picker is "what do I get", and these are three different answers (D14: the
27250
+ * derived form is only as honest as `getOptions`).
27251
+ */
27252
+ var NativeObjectGeometryEnum = _enum([
27253
+ "boxed",
27254
+ "while-streaming",
27255
+ "flag-only"
27256
+ ]);
27257
+ var NativeObjectDetectionOptionsSchema = object({
27258
+ /** Classes this firmware can detect — the same list the status reports. */
27259
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
27260
+ /** What a detection from this camera carries. */
27261
+ geometry: NativeObjectGeometryEnum
27262
+ });
27263
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
27264
+ NativeObjectDetectionStatusSchema.extend({
27036
27265
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
27037
27266
  lastFetchedAt: number() });
27038
- DeviceType.Camera, method(object({
27267
+ DeviceType.Camera, method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema), method(object({
27268
+ deviceId: number(),
27269
+ settings: NativeObjectDetectionSettingsPatchSchema
27270
+ }), _void(), {
27271
+ kind: "mutation",
27272
+ auth: "admin"
27273
+ }), method(object({
27039
27274
  deviceId: number(),
27040
27275
  enabled: boolean()
27041
27276
  }), _void(), {
@@ -30834,7 +31069,28 @@ var PerScopeBreakdownSchema = object({
30834
31069
  /** Total tracked objects in this scope (frame / zone / unzoned). */
30835
31070
  totalObjects: number().int().nonnegative(),
30836
31071
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
30837
- byClass: record(string(), number().int().nonnegative())
31072
+ byClass: record(string(), number().int().nonnegative()),
31073
+ /**
31074
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
31075
+ * present but not going anywhere (a parked car, a bin, a statue).
31076
+ *
31077
+ * The operator's question about a scene has two halves and they answer
31078
+ * different things: "what is parked here" is stable for hours and must not
31079
+ * flap, while "who is walking through" is the thing an alert is about. One
31080
+ * number could only serve one of them, and `totalObjects` served the first
31081
+ * badly — a passer-by moved it and every occupancy rule saw a change.
31082
+ *
31083
+ * `standing + transient === totalObjects`, always. The total keeps its old
31084
+ * meaning exactly, so no rule written against it changes behaviour.
31085
+ *
31086
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
31087
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
31088
+ * parked objects here" about a camera whose lot is full.
31089
+ */
31090
+ standingObjects: number().int().nonnegative().optional(),
31091
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
31092
+ * same absence rule. */
31093
+ transientObjects: number().int().nonnegative().optional()
30838
31094
  });
30839
31095
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
30840
31096
  zoneId: string(),
@@ -33773,12 +34029,24 @@ Object.freeze({
33773
34029
  addonId: null,
33774
34030
  access: "create"
33775
34031
  },
34032
+ "nativeObjectDetection.getOptions": {
34033
+ capName: "native-object-detection",
34034
+ capScope: "device",
34035
+ addonId: null,
34036
+ access: "view"
34037
+ },
33776
34038
  "nativeObjectDetection.setEnabled": {
33777
34039
  capName: "native-object-detection",
33778
34040
  capScope: "device",
33779
34041
  addonId: null,
33780
34042
  access: "create"
33781
34043
  },
34044
+ "nativeObjectDetection.setSettings": {
34045
+ capName: "native-object-detection",
34046
+ capScope: "device",
34047
+ addonId: null,
34048
+ access: "create"
34049
+ },
33782
34050
  "navigation.getFeatures": {
33783
34051
  capName: "navigation",
33784
34052
  capScope: "device",
@@ -34043,6 +34311,12 @@ Object.freeze({
34043
34311
  addonId: null,
34044
34312
  access: "view"
34045
34313
  },
34314
+ "notificationRules.getClipRetentionAsks": {
34315
+ capName: "notification-rules",
34316
+ capScope: "system",
34317
+ addonId: null,
34318
+ access: "view"
34319
+ },
34046
34320
  "notificationRules.getConditionCatalog": {
34047
34321
  capName: "notification-rules",
34048
34322
  capScope: "system",
@@ -34553,6 +34827,12 @@ Object.freeze({
34553
34827
  addonId: null,
34554
34828
  access: "create"
34555
34829
  },
34830
+ "pipelineAnalytics.readLongTermSeries": {
34831
+ capName: "pipeline-analytics",
34832
+ capScope: "device",
34833
+ addonId: null,
34834
+ access: "view"
34835
+ },
34556
34836
  "pipelineAnalytics.rebuildObjectEmbeddings": {
34557
34837
  capName: "pipeline-analytics",
34558
34838
  capScope: "device",
@@ -35225,6 +35505,12 @@ Object.freeze({
35225
35505
  addonId: null,
35226
35506
  access: "create"
35227
35507
  },
35508
+ "pipelineRunner.requestOccupancyBurst": {
35509
+ capName: "pipeline-runner",
35510
+ capScope: "system",
35511
+ addonId: null,
35512
+ access: "create"
35513
+ },
35228
35514
  "pipelineRunner.runDetailSubtree": {
35229
35515
  capName: "pipeline-runner",
35230
35516
  capScope: "system",
@@ -38005,11 +38291,21 @@ Object.freeze({
38005
38291
  form: "single",
38006
38292
  optional: false
38007
38293
  }],
38294
+ "nativeObjectDetection.getOptions": [{
38295
+ name: "deviceId",
38296
+ form: "single",
38297
+ optional: false
38298
+ }],
38008
38299
  "nativeObjectDetection.setEnabled": [{
38009
38300
  name: "deviceId",
38010
38301
  form: "single",
38011
38302
  optional: false
38012
38303
  }],
38304
+ "nativeObjectDetection.setSettings": [{
38305
+ name: "deviceId",
38306
+ form: "single",
38307
+ optional: false
38308
+ }],
38013
38309
  "navigation.getFeatures": [{
38014
38310
  name: "deviceId",
38015
38311
  form: "single",
@@ -38359,6 +38655,11 @@ Object.freeze({
38359
38655
  form: "single",
38360
38656
  optional: false
38361
38657
  }],
38658
+ "pipelineAnalytics.readLongTermSeries": [{
38659
+ name: "deviceId",
38660
+ form: "single",
38661
+ optional: false
38662
+ }],
38362
38663
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
38363
38664
  name: "deviceId",
38364
38665
  form: "single",
@@ -38549,6 +38850,11 @@ Object.freeze({
38549
38850
  form: "single",
38550
38851
  optional: false
38551
38852
  }],
38853
+ "pipelineRunner.requestOccupancyBurst": [{
38854
+ name: "deviceId",
38855
+ form: "single",
38856
+ optional: false
38857
+ }],
38552
38858
  "pipelineRunner.runDetailSubtree": [{
38553
38859
  name: "deviceId",
38554
38860
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.106",
3
+ "version": "1.2.108",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",
@@ -58,7 +58,7 @@
58
58
  "dev": "vite build --watch",
59
59
  "typecheck": "tsc --noEmit",
60
60
  "test": "vitest run",
61
- "publish": "npm publish --access public"
61
+ "publish:npm": "npm publish --access public"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@camstack/types": "*"