@camstack/addon-osd-manager 0.1.98 → 0.1.100

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 (19) hide show
  1. package/dist/{MotionZonesSettings-DpjulO5F.mjs → MotionZonesSettings-BmqapaTP.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DaxBEzfV.mjs → PrivacyMaskSettings-C_ENwx9Q.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-DoZLlL7g.mjs → SceneMonitorEditor-G-kQWq6o.mjs} +3 -3
  4. package/dist/_stub.js +11 -11
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BAwkeBnB.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CDVsNfKC.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Dc2jiuWZ.mjs +26 -0
  7. package/dist/addon-osd-manager.css +1 -1
  8. package/dist/{hostInit-wtg1CgtS.mjs → hostInit-Bttvb5u6.mjs} +3 -3
  9. package/dist/index.js +585 -18
  10. package/dist/index.mjs +585 -18
  11. package/dist/{player-overlays-CKl-z5dT.mjs → player-overlays-BXcJYuYX.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-Db-2LAhn.mjs → responsive-DmRkhonW.mjs} +1 -1
  14. package/dist/{square-D4bK2uSS.mjs → square-LLImpVvg.mjs} +1 -1
  15. package/dist/{trash-2-CkBUBr8-.mjs → trash-2-DnVYkte0.mjs} +1 -1
  16. package/dist/{use-device-snapshot-VChilLVp.mjs → use-device-snapshot-B3WRvUHI.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Cx68KkGj.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DJ2oo3wz.mjs} +1 -1
  18. package/package.json +2 -2
  19. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-0OJdCNRg.mjs +0 -26
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- //#region ../types/dist/event-category-ZyX6jcse.mjs
5
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -619,6 +619,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
619
619
  * pull-reconcile from the provider's `getStatus` on reconnect. */
620
620
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
621
621
  EventCategory["BackupCompleted"] = "backup.completed";
622
+ /**
623
+ * A whole backup RUN finished — every destination attempted, win or lose.
624
+ *
625
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
626
+ * a progress UI and the wrong one for a notification: an operator with three
627
+ * destinations would be told three times. And a run where two of three
628
+ * destinations succeeded is not a clean success — a single "backup
629
+ * completed" that hid the failed one would be a lie, so the count of each is
630
+ * carried here and the message says both.
631
+ *
632
+ * Emitted by the backup orchestrator only after the destination loop, so a
633
+ * run that dies during the BUILD phase produces no completion at all.
634
+ */
635
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
622
636
  EventCategory["BackupRestored"] = "backup.restored";
623
637
  EventCategory["NotificationDispatched"] = "notification.dispatched";
624
638
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5349,7 +5363,7 @@ var ZodIssueCode = {
5349
5363
  var ZodFirstPartyTypeKind;
5350
5364
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5351
5365
  //#endregion
5352
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5366
+ //#region ../types/dist/sleep-BDR76Ykr.mjs
5353
5367
  /**
5354
5368
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5355
5369
  * window to float samples (D455).
@@ -12011,6 +12025,87 @@ var cameraPipelineConfigCapability = {
12011
12025
  exposesDeviceSettings: true,
12012
12026
  methods: {}
12013
12027
  };
12028
+ /**
12029
+ * The signals a device can emit to WAKE its own stream.
12030
+ *
12031
+ * A camera whose stream is built on demand sleeps until something asks for it,
12032
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
12033
+ * puller holds a session open for ever, and treating that as demand would keep
12034
+ * a battery camera awake for ever, which is the whole thing the battery is for
12035
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
12036
+ * itself, with no stream running.
12037
+ *
12038
+ * ## The vocabulary is the PROVIDER'S, not ours
12039
+ *
12040
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
12041
+ * names each signal with a `code` it chooses and a `label` an operator reads.
12042
+ * Reolink offers motion and camera-native detection; another provider may offer
12043
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12044
+ * yet. A fixed enum here would mean every new signal is a framework release.
12045
+ *
12046
+ * It is deliberately NOT derived from the caps a device already binds. Whether
12047
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
12048
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12049
+ * binding — but both answer "what drives the detection pipeline", which is a
12050
+ * different question from "what may wake a sleeping stream". A camera can do
12051
+ * the first and not be trusted with the second, and the operator picks per
12052
+ * camera. Two questions, two authorities.
12053
+ *
12054
+ * ## Availability is not permission
12055
+ *
12056
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
12057
+ * wakes the stream is the operator's per-camera choice, held by the broker
12058
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
12059
+ * provider declaring a signal is not a provider enabling it.
12060
+ */
12061
+ /** One signal a device can emit. */
12062
+ var StreamSignalSchema = object({
12063
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12064
+ code: string().min(1),
12065
+ /** What an operator reads in the picker. The provider's own wording. */
12066
+ label: string().min(1),
12067
+ /**
12068
+ * Whether the provider recommends this signal ON when a camera is first set
12069
+ * up. A provider knows which of its signals are cheap and reliable; an
12070
+ * operator should not have to discover that by trial. Reolink recommends
12071
+ * both of its own.
12072
+ */
12073
+ recommended: boolean()
12074
+ });
12075
+ var StreamSignalsStatusSchema = object({
12076
+ signals: array(StreamSignalSchema),
12077
+ lastFetchedAt: number()
12078
+ });
12079
+ var streamSignalsCapability = {
12080
+ name: "stream-signals",
12081
+ scope: "device",
12082
+ deviceNative: true,
12083
+ mode: "singleton",
12084
+ deviceTypes: Object.values(DeviceType),
12085
+ runtimeState: StreamSignalsStatusSchema,
12086
+ /**
12087
+ * Runtime-state durability: **session** — mirrored in RAM, never written.
12088
+ *
12089
+ * The slice holds what the DEVICE says it can emit. That is a probed fact,
12090
+ * not an operator choice: the provider re-declares it on every registration,
12091
+ * so losing it loses nothing and persisting it would freeze an answer the
12092
+ * camera is entitled to change. Measured the same day on the sibling case —
12093
+ * `native-object-detection.supportedClasses` was persisted, and a firmware
12094
+ * class the camera really detected stayed missing for the life of the row
12095
+ * because the fix could not reach it.
12096
+ *
12097
+ * See `RuntimeStateDurability`. Enforced by
12098
+ * `scripts/check-runtime-state-durability.ts`.
12099
+ */
12100
+ durability: "session",
12101
+ methods: {
12102
+ /**
12103
+ * What this device can emit. Empty is a valid and common answer — most
12104
+ * cameras have nothing to offer here, and an empty list is what makes the
12105
+ * broker's picker show nothing rather than a false choice.
12106
+ */
12107
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
12108
+ };
12014
12109
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12015
12110
  var StreamFormatSchema = _enum([
12016
12111
  "webrtc",
@@ -12412,6 +12507,46 @@ var streamBrokerCapability = {
12412
12507
  mode: "singleton",
12413
12508
  exposesDeviceSettings: true,
12414
12509
  methods: {
12510
+ /**
12511
+ * A device reporting that one of ITS OWN signals just fired.
12512
+ *
12513
+ * The provider calls this; nothing polls. The broker then decides whether
12514
+ * to wake the source, and the decision has two terms that must BOTH hold:
12515
+ *
12516
+ * - the signal is ENABLED for this camera (the operator's per-camera
12517
+ * choice — a camera may declare a signal the operator does not want
12518
+ * waking anything), and
12519
+ * - a consumer is actually attached and waiting on the prestream. Waking
12520
+ * a camera nobody is watching is the one thing a battery camera must
12521
+ * never do, and a signal arriving with no consumer is exactly that.
12522
+ *
12523
+ * Reported, never inferred: a signal that fires while the stream is
12524
+ * already up refreshes the hold instead of starting a second one, which is
12525
+ * what makes continuous motion keep a camera awake without stacking
12526
+ * timers.
12527
+ *
12528
+ * `code` is the provider's own, from `streamSignals.listSignals`. An
12529
+ * unknown code is REFUSED rather than treated as a wildcard wake — a
12530
+ * provider and an operator disagreeing about a name must not become a
12531
+ * camera that wakes for everything.
12532
+ */
12533
+ reportStreamSignal: method(object({
12534
+ deviceId: number().int().nonnegative(),
12535
+ /** The provider's signal code. */
12536
+ code: string().min(1),
12537
+ /** Ms epoch. Absent ⇒ now. */
12538
+ at: number().optional()
12539
+ }), object({
12540
+ /** Whether the broker acted on it, and if not, why. */
12541
+ accepted: boolean(),
12542
+ reason: _enum([
12543
+ "woke",
12544
+ "hold-extended",
12545
+ "not-enabled",
12546
+ "no-consumer",
12547
+ "unknown-code"
12548
+ ])
12549
+ }), { kind: "mutation" }),
12415
12550
  publishCameraStream: method(object({
12416
12551
  deviceId: number().int().nonnegative(),
12417
12552
  camStreamId: string().min(1),
@@ -12889,6 +13024,16 @@ var PickStreamRequirementsSchema = object({
12889
13024
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12890
13025
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12891
13026
  minHeight: number().int().positive().optional(),
13027
+ /**
13028
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
13029
+ *
13030
+ * A consumer can have a ceiling as real as its floor: Alexa documents
13031
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
13032
+ * Without this the ceiling had to be re-implemented by every caller — and
13033
+ * one caller implementing it privately is how a second scoring authority
13034
+ * gets born.
13035
+ */
13036
+ maxHeight: number().int().positive().optional(),
12892
13037
  /** Minimum horizontal resolution. */
12893
13038
  minWidth: number().int().positive().optional(),
12894
13039
  /**
@@ -12905,7 +13050,22 @@ var PickStreamRequirementsSchema = object({
12905
13050
  * transcoded" guard: if the device is already serving the consumer's
12906
13051
  * codec end-to-end, there's nothing to optimise.
12907
13052
  */
12908
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
13053
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
13054
+ /**
13055
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
13056
+ * understanding that it will be transcoded.
13057
+ *
13058
+ * Default `false` — today's behaviour, and the right one for a bypass
13059
+ * question ("is there a stream I can forward untouched?"). Set `true` to
13060
+ * ask the larger question: "what is the best stream for me, transcoding if
13061
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
13062
+ * does not, so a passthrough is never lost to a transcode; the answer says
13063
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
13064
+ *
13065
+ * This is what lets one picker serve both the bypass and the full source
13066
+ * choice, instead of a consumer scoring privately when the bypass misses.
13067
+ */
13068
+ allowTranscode: boolean().optional()
12909
13069
  }).readonly();
12910
13070
  var PickStreamPreferencesSchema = object({
12911
13071
  /**
@@ -12919,12 +13079,32 @@ var PickStreamPreferencesSchema = object({
12919
13079
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12920
13080
  * memory-constrained consumers / Apple Home guest sessions).
12921
13081
  */
12922
- resolutionPreference: _enum(["highest", "lowest"]).optional()
13082
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
13083
+ /**
13084
+ * The height the consumer actually wants to DELIVER.
13085
+ *
13086
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
13087
+ * above the target wins, and only if nothing reaches it does the tallest
13088
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
13089
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
13090
+ * express that: it says "as big as possible", which is a different wish.
13091
+ *
13092
+ * Ignored when absent, so every existing caller keeps its ordering.
13093
+ */
13094
+ targetHeight: number().int().positive().optional()
12923
13095
  }).readonly();
12924
13096
  var PickedCamStreamSchema = object({
12925
13097
  camStreamId: string(),
12926
13098
  codec: string().optional(),
12927
13099
  resolution: CamStreamResolutionSchema.optional(),
13100
+ /**
13101
+ * Whether serving this stream requires a decode + re-encode.
13102
+ *
13103
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
13104
+ * when the caller asked for it with `allowTranscode`, so a caller that did
13105
+ * not ask cannot be handed a cost it never agreed to pay.
13106
+ */
13107
+ transcodes: boolean(),
12928
13108
  /** One-line explanation of why this stream won — for logs / debug UI. */
12929
13109
  reason: string()
12930
13110
  });
@@ -18700,6 +18880,8 @@ var NcSystemEventKindSchema = _enum([
18700
18880
  "device-enabled",
18701
18881
  "device-battery-low",
18702
18882
  "device-battery-normal",
18883
+ "device-consumable-low",
18884
+ "device-consumable-normal",
18703
18885
  "stream-online",
18704
18886
  "stream-offline",
18705
18887
  "node-online",
@@ -18718,6 +18900,7 @@ var NcSystemEventKindSchema = _enum([
18718
18900
  "addon-updated",
18719
18901
  "server-updated",
18720
18902
  "export-completed",
18903
+ "backup-completed",
18721
18904
  "camera-online",
18722
18905
  "camera-offline",
18723
18906
  "camera-disabled",
@@ -19832,10 +20015,22 @@ var NC_CONDITION_CATALOG = [
19832
20015
  value: "server-updated",
19833
20016
  label: "Server updated"
19834
20017
  },
20018
+ {
20019
+ value: "device-consumable-low",
20020
+ label: "Consumable low"
20021
+ },
20022
+ {
20023
+ value: "device-consumable-normal",
20024
+ label: "Consumable replaced"
20025
+ },
19835
20026
  {
19836
20027
  value: "export-completed",
19837
20028
  label: "Export completed"
19838
20029
  },
20030
+ {
20031
+ value: "backup-completed",
20032
+ label: "Backup completed"
20033
+ },
19839
20034
  {
19840
20035
  value: "alarm-arming",
19841
20036
  label: "Alarm arming (exit delay)"
@@ -20487,6 +20682,48 @@ var NcAlarmConfigSchema = object({
20487
20682
  settings: NcAlarmSettingsSchema,
20488
20683
  coverage: array(NcAlarmModeCoverageSchema)
20489
20684
  });
20685
+ /**
20686
+ * ONE rule's demand on ONE camera's clip ring.
20687
+ *
20688
+ * A rule, not a camera: the broker takes the MAX over the asks that reach a
20689
+ * camera, so the answer stays a faithful description of the rules and the
20690
+ * bounding (the byte budget, the broker's own ceiling) stays where the cost
20691
+ * lives. A camera that appears in no ask is being told **nothing** — which is
20692
+ * a different thing from never having been told, and only the envelope
20693
+ * (`rulesLoaded`) can tell those apart.
20694
+ */
20695
+ var NcClipRetentionAskSchema = object({
20696
+ /**
20697
+ * The camera this ask is about. **Absent = every camera**, which is what a
20698
+ * rule with no `conditions.devices` means: it can fire anywhere, so it is
20699
+ * asking everywhere.
20700
+ */
20701
+ deviceId: number().int().nonnegative().optional(),
20702
+ /** Seconds of history the rule needs held for it. Never zero — a rule that
20703
+ * needs nothing produces no ask at all. */
20704
+ seconds: number().min(0).max(60),
20705
+ /** The profile the rule cuts from, when it named one. Absent = the cheapest
20706
+ * assigned, which is what the cut defaults to. */
20707
+ profile: CamProfileSchema.optional(),
20708
+ /** Who is asking — so a retention the operator did not expect names a rule. */
20709
+ ruleId: string(),
20710
+ ruleName: string(),
20711
+ /** Why this many seconds: the rule's own window, or the occupancy ceiling. */
20712
+ reason: _enum(["window", "occupancy"])
20713
+ });
20714
+ /**
20715
+ * The whole answer, with the one bit that keeps absence from reading as zero.
20716
+ *
20717
+ * `rulesLoaded` is false until the rule ledger has completed a load at least
20718
+ * once. A centre that is up but has not read its rules yet answers with an
20719
+ * empty ask list that means nothing at all — applying it would drop every
20720
+ * camera's ring to zero for the first events after a restart, which is the
20721
+ * footage this mechanism exists to keep.
20722
+ */
20723
+ var NcClipRetentionPlanSchema = object({
20724
+ rulesLoaded: boolean(),
20725
+ asks: array(NcClipRetentionAskSchema).readonly()
20726
+ });
20490
20727
  var notificationRulesCapability = {
20491
20728
  name: "notification-rules",
20492
20729
  scope: "system",
@@ -20519,6 +20756,23 @@ var notificationRulesCapability = {
20519
20756
  auth: "admin"
20520
20757
  }),
20521
20758
  /**
20759
+ * WHAT THE RULES ACTUALLY ASK the stream broker to retain, per camera.
20760
+ *
20761
+ * The notification centre owns the rules, so it is the only thing that can
20762
+ * say how much history a camera's notifications will ever reach back for.
20763
+ * Before this the broker guessed — a flat minute on every camera — and
20764
+ * learned the PROFILE reactively, after the first clip had already been cut
20765
+ * from the wrong one. This is the same ask stated once, in front.
20766
+ *
20767
+ * A QUERY, pulled by each node's broker, not a push: brokers are per node
20768
+ * (a camera's ring lives wherever its stream is ingested) while this cap is
20769
+ * a singleton, so a push would have to enumerate the cluster. The pull also
20770
+ * makes the failure mode right — a broker that cannot reach the centre
20771
+ * keeps the plan it has, and a plan that has never arrived is UNKNOWN
20772
+ * rather than empty (D49: a read that fails changes nothing).
20773
+ */
20774
+ getClipRetentionAsks: method(object({}), NcClipRetentionPlanSchema, { auth: "admin" }),
20775
+ /**
20522
20776
  * PERMANENT per-camera mute — the notifications half of the per-camera
20523
20777
  * function switch group ([D61](../../../../docs/decisions/adr-0067.md)).
20524
20778
  *
@@ -23397,6 +23651,33 @@ var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
23397
23651
  * solid is this track", cheaper than re-deriving it from a trajectory. */
23398
23652
  framesMatched: number().int()
23399
23653
  })).readonly() });
23654
+ /**
23655
+ * The long-term series a camera produces. A closed union so a typo cannot
23656
+ * invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
23657
+ * is an alias of this, not a second list.
23658
+ */
23659
+ var AnalyticsLtsSeriesSchema = _enum([
23660
+ "motion",
23661
+ "audio-dbfs",
23662
+ "battery",
23663
+ "occupancy"
23664
+ ]);
23665
+ /**
23666
+ * One closed 5-minute bucket of a long-term series.
23667
+ *
23668
+ * `samples` is how many readings the bucket folded — it is the ACTIVITY for a
23669
+ * series like `motion`, and the confidence for one like `occupancy`. A bucket
23670
+ * that exists at all was measured; a bucket that is absent was not, which is a
23671
+ * different claim from zero and the reason this is a sparse series.
23672
+ */
23673
+ var LtsBucketSchema = object({
23674
+ scope: string(),
23675
+ bucketStart: number().int(),
23676
+ samples: number().int().nonnegative(),
23677
+ sum: number(),
23678
+ min: number(),
23679
+ max: number()
23680
+ });
23400
23681
  var pipelineAnalyticsCapability = {
23401
23682
  name: "pipeline-analytics",
23402
23683
  scope: "device",
@@ -23540,6 +23821,30 @@ var pipelineAnalyticsCapability = {
23540
23821
  getKeyEventsBatch: method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()),
23541
23822
  /** Server-side bucketed event counts for the 24-hour timeline.
23542
23823
  * Returns one entry per non-empty bucket; empty buckets are omitted. */
23824
+ /**
23825
+ * Read one camera's long-term series — 5-minute buckets, kept for a year.
23826
+ *
23827
+ * This is the history surface for every chart that used to be served from a
23828
+ * RAM ring: the ring dies with the process, cannot answer about last night,
23829
+ * and had a 60-minute horizon, while these rows are ~60 bytes and already
23830
+ * written. `scope` is the series' own dimension — for `occupancy`, spell it
23831
+ * with {@link occupancyScope} rather than by hand, and omit it to get every
23832
+ * scope back at once (the caller then groups with
23833
+ * {@link parseOccupancyScope}).
23834
+ *
23835
+ * Bounds are inclusive on the BUCKET START, so a range that ends mid-bucket
23836
+ * still returns the bucket it lands in — the alternative is a chart whose
23837
+ * last column silently disappears for five minutes out of every five.
23838
+ */
23839
+ readLongTermSeries: method(object({
23840
+ deviceId: number(),
23841
+ series: AnalyticsLtsSeriesSchema,
23842
+ /** Omit for EVERY scope of this series in the range. */
23843
+ scope: string().optional(),
23844
+ from: number(),
23845
+ to: number(),
23846
+ limit: number().int().positive().optional()
23847
+ }), array(LtsBucketSchema).readonly()),
23543
23848
  getEventDensity: method(object({
23544
23849
  deviceId: number(),
23545
23850
  since: number(),
@@ -24681,6 +24986,14 @@ var MotionSourceEnum = _enum([
24681
24986
  */
24682
24987
  var MotionSourcesSchema = array(MotionSourceEnum);
24683
24988
  /**
24989
+ * Which root detectors a camera runs. Deliberately the SAME vocabulary
24990
+ * post-analysis already tags every detection with (`DetectionSource`) rather
24991
+ * than a second spelling of the same two ideas — the value an operator picks
24992
+ * here is the value that comes back on the track, the overlay and the debug
24993
+ * row.
24994
+ */
24995
+ var DetectionSourcesSchema = array(DetectionSourceSchema);
24996
+ /**
24684
24997
  * Input shape for `pipeline-runner.reportMotion` cap method. Exported
24685
24998
  * so cap-side consumers (the orchestrator forward, the runner addon's
24686
24999
  * cap implementation, tests) can reuse the type instead of redeclaring
@@ -24831,6 +25144,35 @@ var RunnerCameraConfigSchema = object({
24831
25144
  * events; the orchestrator forwards to `reportMotion`.
24832
25145
  */
24833
25146
  motionSources: MotionSourcesSchema.default(["analyzer"]),
25147
+ /**
25148
+ * WHICH root detector runs for this camera. The detection counterpart of
25149
+ * {@link motionSources}, same shape and same discipline: a per-camera list
25150
+ * of sources the system understands, vendor-agnostic, owned here.
25151
+ *
25152
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
25153
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
25154
+ * here. Its boxes reach post-analysis on the same
25155
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
25156
+ * track gets the same tracker, the same overlay and the same detail
25157
+ * subtree (face / plate / embedding).
25158
+ *
25159
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
25160
+ * run, and that is where a camera with a usable onboard detector buys back
25161
+ * its share of the accelerator. It saves the root inference, not the decode
25162
+ * — the detail subtree still needs pixels to cut crops from.
25163
+ *
25164
+ * A camera whose onboard detections carry no geometry cannot serve as a root
25165
+ * step at all (there is nothing to track), and the cap that knows this says
25166
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
25167
+ * every battery camera: the boxes ride a sub-stream a battery camera never
25168
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
25169
+ * worth exactly what it already is — a wake signal with a class.
25170
+ *
25171
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
25172
+ * vendor never turns a detector on for the operator, and neither does a
25173
+ * default.
25174
+ */
25175
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
24834
25176
  pipelineEnabled: boolean().default(true),
24835
25177
  /** Ordered tree of video steps. Absent → runner skips video detection. */
24836
25178
  steps: array(PipelineStepInputSchema).readonly().optional(),
@@ -25026,6 +25368,18 @@ var RunnerLocalMetricsSchema = object({
25026
25368
  * runner has zero knowledge of other agents, no global state, and never
25027
25369
  * makes assignment decisions itself.
25028
25370
  */
25371
+ /**
25372
+ * Why a runner declined to look at a camera out of band. Named rather than a
25373
+ * bare `false`: a camera asleep on battery (D173), one attached elsewhere, one
25374
+ * already mid-session and one already bursting are four different facts, and a
25375
+ * caller told only "no" cannot tell a protection from a bug.
25376
+ */
25377
+ var OccupancyBurstRefusalSchema = _enum([
25378
+ "not-attached",
25379
+ "battery-asleep",
25380
+ "not-watching",
25381
+ "already-bursting"
25382
+ ]);
25029
25383
  var pipelineRunnerCapability = {
25030
25384
  name: "pipeline-runner",
25031
25385
  scope: "system",
@@ -25062,6 +25416,50 @@ var pipelineRunnerCapability = {
25062
25416
  /** List the deviceIds currently attached to this runner. */
25063
25417
  getLocalCameras: method(_void(), array(number()).readonly()),
25064
25418
  /**
25419
+ * Look at a camera NOW, out of band, because something just happened that
25420
+ * only a fresh look can settle.
25421
+ *
25422
+ * The periodic recheck (`occupancyRecheckSec`, 300 s) exists to watch a
25423
+ * still scene. It is the wrong instrument for a QUESTION that has just been
25424
+ * asked: on device 617 a parked car's departure was observed, a departure
25425
+ * strike was armed — and then the motion session ended, the strike decayed
25426
+ * after its 30 s TTL, and the next periodic look arrived up to five minutes
25427
+ * later with nothing left to confirm. Every one of those departures was
25428
+ * settled by the entry ageing out 6 to 10 minutes of observed time later,
25429
+ * and the notification's clip showed an empty space with nothing leaving
25430
+ * it.
25431
+ *
25432
+ * Two numbers make the ask specific, and a caller that ignores them wastes
25433
+ * the burst: a confirmation must land at least
25434
+ * `DEPARTURE_CONFIRM_MIN_GAP_MS` (3 s) after the read that armed the
25435
+ * strike — before that it is the same optical event and is refused — and
25436
+ * `DEPARTURE_ABSENCE_MIN_READS` (5) consecutive unassociated frames are
25437
+ * needed, while `occupancyRecheckFrames` defaults to FOUR. A burst of four
25438
+ * can never confirm an absence; that is why two periodic looks were always
25439
+ * required.
25440
+ *
25441
+ * The runner answers whether it actually started one. A refusal is NAMED,
25442
+ * never a silent `false`: a camera that is asleep on battery (D173 — this
25443
+ * must not become a self-initiated wake), detached, mid-session or already
25444
+ * bursting are four different facts, and a caller told only "no" cannot
25445
+ * tell a protection from a bug.
25446
+ */
25447
+ requestOccupancyBurst: method(object({
25448
+ deviceId: number(),
25449
+ /** How many frames to collect. The caller sizes this against what its
25450
+ * own confirmation needs; the runner clamps it to the field's range. */
25451
+ frames: number().int().positive().optional(),
25452
+ /** Why, for the log. A burst nobody can attribute is a cost nobody can
25453
+ * defend — the periodic one at least has a timer to point at. */
25454
+ reason: string()
25455
+ }), object({
25456
+ started: boolean(),
25457
+ refusedBecause: OccupancyBurstRefusalSchema.optional()
25458
+ }), {
25459
+ auth: "admin",
25460
+ kind: "mutation"
25461
+ }),
25462
+ /**
25065
25463
  * Best-effort NATIVE-resolution crop of a retention-ring frame. Given the
25066
25464
  * `FrameHandle` that rode an inference-result event and a normalized `bbox`,
25067
25465
  * the runner asks the decode worker still holding that frame's NATIVE
@@ -28486,10 +28884,28 @@ var webrtcSessionCapability = {
28486
28884
  getSessionState: method(object({
28487
28885
  deviceId: number().int().nonnegative(),
28488
28886
  sessionId: string()
28489
- }), object({ pendingRenegotiation: object({
28490
- target: WebrtcStreamTargetSchema,
28491
- epoch: number()
28492
- }).nullable() }))
28887
+ }), object({
28888
+ pendingRenegotiation: object({
28889
+ target: WebrtcStreamTargetSchema,
28890
+ epoch: number()
28891
+ }).nullable(),
28892
+ /**
28893
+ * Whether the session still EXISTS.
28894
+ *
28895
+ * A consumer that holds a resource for the life of a session needs to
28896
+ * be able to ask, because a session does not always end the way it
28897
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
28898
+ * sent `SessionDisconnected`, so the Alexa exporter's
28899
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
28900
+ * H.264 transcode kept running for NOBODY for more than twenty
28901
+ * minutes. The WebRTC session had logged `WebRTC session closed`
28902
+ * minutes earlier — the broker knew; the holder had no way to ask.
28903
+ *
28904
+ * `false` for a session id the provider has never heard of, which is
28905
+ * the same answer as "it ended": either way nothing is holding it up.
28906
+ */
28907
+ alive: boolean()
28908
+ }))
28493
28909
  },
28494
28910
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
28495
28911
  mount: { kind: "server-provided" }
@@ -33462,11 +33878,46 @@ var NativeObjectDetectionStatusSchema = object({
33462
33878
  supportedClasses: array(NativeObjectClassEnum).readonly(),
33463
33879
  /**
33464
33880
  * Whether forwarding of onboard AI detections is enabled for this device.
33465
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
33466
- * churn the tracker, so forwarding stays off until the operator enables it.
33881
+ *
33882
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
33883
+ * camera runs — that is the operator's choice, and it is made where every
33884
+ * other detection choice is made. `geometry` on
33885
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
33886
+ * choice would buy this particular camera.
33467
33887
  */
33468
33888
  enabled: boolean()
33469
33889
  });
33890
+ /**
33891
+ * WHEN a camera's onboard detections carry geometry.
33892
+ *
33893
+ * - `boxed` — always. The provider holds a standing channel for the boxes, so
33894
+ * a detection is a trackable subject whenever the camera sees one.
33895
+ * - `while-streaming` — only while some stream of this camera is already open.
33896
+ * The boxes ride the video's own side-channel rather than a feed of their
33897
+ * own, so they cost nothing and they exist only when something is pulling.
33898
+ * On Reolink this is every BATTERY camera: a persistent second feed is real
33899
+ * radio drain, but a camera that is awake is awake precisely because
33900
+ * something is in front of it, and its stream is already being pulled.
33901
+ * - `flag-only` — never. The firmware ships the class and nothing else; the
33902
+ * pipeline needs geometry to make a subject, so such a push reaches the
33903
+ * tracker as motion and no further.
33904
+ *
33905
+ * Reported and not inferred, because the operator's question in front of the
33906
+ * picker is "what do I get", and these are three different answers (D14: the
33907
+ * derived form is only as honest as `getOptions`).
33908
+ */
33909
+ var NativeObjectGeometryEnum = _enum([
33910
+ "boxed",
33911
+ "while-streaming",
33912
+ "flag-only"
33913
+ ]);
33914
+ var NativeObjectDetectionOptionsSchema = object({
33915
+ /** Classes this firmware can detect — the same list the status reports. */
33916
+ supportedClasses: array(NativeObjectClassEnum).readonly(),
33917
+ /** What a detection from this camera carries. */
33918
+ geometry: NativeObjectGeometryEnum
33919
+ });
33920
+ var NativeObjectDetectionSettingsPatchSchema = object({ enabled: boolean().optional() });
33470
33921
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
33471
33922
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
33472
33923
  lastFetchedAt: number() });
@@ -33476,13 +33927,23 @@ var nativeObjectDetectionCapability = {
33476
33927
  deviceNative: true,
33477
33928
  mode: "singleton",
33478
33929
  deviceTypes: [DeviceType.Camera],
33479
- methods: { setEnabled: method(object({
33480
- deviceId: number(),
33481
- enabled: boolean()
33482
- }), _void(), {
33483
- kind: "mutation",
33484
- auth: "admin"
33485
- }) },
33930
+ methods: {
33931
+ getOptions: method(object({ deviceId: number() }), NativeObjectDetectionOptionsSchema),
33932
+ setSettings: method(object({
33933
+ deviceId: number(),
33934
+ settings: NativeObjectDetectionSettingsPatchSchema
33935
+ }), _void(), {
33936
+ kind: "mutation",
33937
+ auth: "admin"
33938
+ }),
33939
+ setEnabled: method(object({
33940
+ deviceId: number(),
33941
+ enabled: boolean()
33942
+ }), _void(), {
33943
+ kind: "mutation",
33944
+ auth: "admin"
33945
+ })
33946
+ },
33486
33947
  events: { onDetected: { data: object({
33487
33948
  deviceId: number(),
33488
33949
  detection: NativeDetectionSchema
@@ -38944,7 +39405,28 @@ var PerScopeBreakdownSchema = object({
38944
39405
  /** Total tracked objects in this scope (frame / zone / unzoned). */
38945
39406
  totalObjects: number().int().nonnegative(),
38946
39407
  /** Per-class count. Keys are macro class names (e.g. `person`, `car`). */
38947
- byClass: record(string(), number().int().nonnegative())
39408
+ byClass: record(string(), number().int().nonnegative()),
39409
+ /**
39410
+ * Of `totalObjects`, how many are STANDING — objects the census holds,
39411
+ * present but not going anywhere (a parked car, a bin, a statue).
39412
+ *
39413
+ * The operator's question about a scene has two halves and they answer
39414
+ * different things: "what is parked here" is stable for hours and must not
39415
+ * flap, while "who is walking through" is the thing an alert is about. One
39416
+ * number could only serve one of them, and `totalObjects` served the first
39417
+ * badly — a passer-by moved it and every occupancy rule saw a change.
39418
+ *
39419
+ * `standing + transient === totalObjects`, always. The total keeps its old
39420
+ * meaning exactly, so no rule written against it changes behaviour.
39421
+ *
39422
+ * ABSENT means UNKNOWN, never zero (D393): a snapshot from a node older than
39423
+ * this field cannot say, and a reader that folds absence in as 0 reports "no
39424
+ * parked objects here" about a camera whose lot is full.
39425
+ */
39426
+ standingObjects: number().int().nonnegative().optional(),
39427
+ /** Of `totalObjects`, how many are passing through. See `standingObjects` —
39428
+ * same absence rule. */
39429
+ transientObjects: number().int().nonnegative().optional()
38948
39430
  });
38949
39431
  var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
38950
39432
  zoneId: string(),
@@ -39067,6 +39549,23 @@ var HistoryPointSchema = object({
39067
39549
  * triple covers the three spatial scopes (per-zone, frame-wide,
39068
39550
  * outside-any-zone). Crossing them with `className?` gives the full
39069
39551
  * combinatorial coverage the operator UI requested.
39552
+ *
39553
+ * ## ⚠️ The three history methods are DEPRECATED
39554
+ *
39555
+ * They are served from a 60-MINUTE in-memory ring. It dies with the process,
39556
+ * so after a restart they report nothing about a night that did happen, and any
39557
+ * window past an hour is silently clamped — a caller cannot tell a clamp from
39558
+ * an empty scene. The presets in the occupancy chart existed to hide that
39559
+ * horizon rather than to answer a question.
39560
+ *
39561
+ * Use `pipelineAnalytics.readLongTermSeries({ series: 'occupancy', scope })`
39562
+ * instead. Those rows are already written for every camera, ~60 bytes per
39563
+ * (camera, scope, 5-minute bucket), kept for a year, and survive a restart.
39564
+ * Spell the scope with `occupancyScope(zoneId?, className?)` — the same
39565
+ * function the writer uses, so the two cannot drift.
39566
+ *
39567
+ * The ring stays until these three go, and it is the only thing left reading
39568
+ * it. Do not add a fourth caller.
39070
39569
  */
39071
39570
  var zoneAnalyticsCapability = {
39072
39571
  name: "zone-analytics",
@@ -39452,6 +39951,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
39452
39951
  streamBrokerCapability,
39453
39952
  streamCatalogCapability,
39454
39953
  streamParamsCapability,
39954
+ streamSignalsCapability,
39455
39955
  switchCapability,
39456
39956
  systemCapability,
39457
39957
  tamperCapability,
@@ -42230,12 +42730,24 @@ Object.freeze({
42230
42730
  addonId: null,
42231
42731
  access: "create"
42232
42732
  },
42733
+ "nativeObjectDetection.getOptions": {
42734
+ capName: "native-object-detection",
42735
+ capScope: "device",
42736
+ addonId: null,
42737
+ access: "view"
42738
+ },
42233
42739
  "nativeObjectDetection.setEnabled": {
42234
42740
  capName: "native-object-detection",
42235
42741
  capScope: "device",
42236
42742
  addonId: null,
42237
42743
  access: "create"
42238
42744
  },
42745
+ "nativeObjectDetection.setSettings": {
42746
+ capName: "native-object-detection",
42747
+ capScope: "device",
42748
+ addonId: null,
42749
+ access: "create"
42750
+ },
42239
42751
  "navigation.getFeatures": {
42240
42752
  capName: "navigation",
42241
42753
  capScope: "device",
@@ -42500,6 +43012,12 @@ Object.freeze({
42500
43012
  addonId: null,
42501
43013
  access: "view"
42502
43014
  },
43015
+ "notificationRules.getClipRetentionAsks": {
43016
+ capName: "notification-rules",
43017
+ capScope: "system",
43018
+ addonId: null,
43019
+ access: "view"
43020
+ },
42503
43021
  "notificationRules.getConditionCatalog": {
42504
43022
  capName: "notification-rules",
42505
43023
  capScope: "system",
@@ -43010,6 +43528,12 @@ Object.freeze({
43010
43528
  addonId: null,
43011
43529
  access: "create"
43012
43530
  },
43531
+ "pipelineAnalytics.readLongTermSeries": {
43532
+ capName: "pipeline-analytics",
43533
+ capScope: "device",
43534
+ addonId: null,
43535
+ access: "view"
43536
+ },
43013
43537
  "pipelineAnalytics.rebuildObjectEmbeddings": {
43014
43538
  capName: "pipeline-analytics",
43015
43539
  capScope: "device",
@@ -43682,6 +44206,12 @@ Object.freeze({
43682
44206
  addonId: null,
43683
44207
  access: "create"
43684
44208
  },
44209
+ "pipelineRunner.requestOccupancyBurst": {
44210
+ capName: "pipeline-runner",
44211
+ capScope: "system",
44212
+ addonId: null,
44213
+ access: "create"
44214
+ },
43685
44215
  "pipelineRunner.runDetailSubtree": {
43686
44216
  capName: "pipeline-runner",
43687
44217
  capScope: "system",
@@ -44894,6 +45424,12 @@ Object.freeze({
44894
45424
  addonId: null,
44895
45425
  access: "create"
44896
45426
  },
45427
+ "streamBroker.reportStreamSignal": {
45428
+ capName: "stream-broker",
45429
+ capScope: "system",
45430
+ addonId: null,
45431
+ access: "create"
45432
+ },
44897
45433
  "streamBroker.restartProfile": {
44898
45434
  capName: "stream-broker",
44899
45435
  capScope: "system",
@@ -44978,6 +45514,12 @@ Object.freeze({
44978
45514
  addonId: null,
44979
45515
  access: "create"
44980
45516
  },
45517
+ "streamSignals.listSignals": {
45518
+ capName: "stream-signals",
45519
+ capScope: "device",
45520
+ addonId: null,
45521
+ access: "view"
45522
+ },
44981
45523
  "switch.setState": {
44982
45524
  capName: "switch",
44983
45525
  capScope: "device",
@@ -46450,11 +46992,21 @@ Object.freeze({
46450
46992
  form: "single",
46451
46993
  optional: false
46452
46994
  }],
46995
+ "nativeObjectDetection.getOptions": [{
46996
+ name: "deviceId",
46997
+ form: "single",
46998
+ optional: false
46999
+ }],
46453
47000
  "nativeObjectDetection.setEnabled": [{
46454
47001
  name: "deviceId",
46455
47002
  form: "single",
46456
47003
  optional: false
46457
47004
  }],
47005
+ "nativeObjectDetection.setSettings": [{
47006
+ name: "deviceId",
47007
+ form: "single",
47008
+ optional: false
47009
+ }],
46458
47010
  "navigation.getFeatures": [{
46459
47011
  name: "deviceId",
46460
47012
  form: "single",
@@ -46804,6 +47356,11 @@ Object.freeze({
46804
47356
  form: "single",
46805
47357
  optional: false
46806
47358
  }],
47359
+ "pipelineAnalytics.readLongTermSeries": [{
47360
+ name: "deviceId",
47361
+ form: "single",
47362
+ optional: false
47363
+ }],
46807
47364
  "pipelineAnalytics.rebuildObjectEmbeddings": [{
46808
47365
  name: "deviceId",
46809
47366
  form: "single",
@@ -46994,6 +47551,11 @@ Object.freeze({
46994
47551
  form: "single",
46995
47552
  optional: false
46996
47553
  }],
47554
+ "pipelineRunner.requestOccupancyBurst": [{
47555
+ name: "deviceId",
47556
+ form: "single",
47557
+ optional: false
47558
+ }],
46997
47559
  "pipelineRunner.runDetailSubtree": [{
46998
47560
  name: "deviceId",
46999
47561
  form: "single",
@@ -47350,6 +47912,11 @@ Object.freeze({
47350
47912
  form: "single",
47351
47913
  optional: false
47352
47914
  }],
47915
+ "streamBroker.reportStreamSignal": [{
47916
+ name: "deviceId",
47917
+ form: "single",
47918
+ optional: false
47919
+ }],
47353
47920
  "streamBroker.restartProfile": [{
47354
47921
  name: "deviceId",
47355
47922
  form: "single",