@camstack/addon-provider-homeassistant 1.2.116 → 1.2.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-Daqsf2Q7.js");
2
+ const require_dist = require("./dist-CojINel_.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-DRv84o8E.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-9vbU-7ZX.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-ZyX6jcse.mjs
1
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -615,6 +615,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
615
615
  * pull-reconcile from the provider's `getStatus` on reconnect. */
616
616
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
617
617
  EventCategory["BackupCompleted"] = "backup.completed";
618
+ /**
619
+ * A whole backup RUN finished — every destination attempted, win or lose.
620
+ *
621
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
622
+ * a progress UI and the wrong one for a notification: an operator with three
623
+ * destinations would be told three times. And a run where two of three
624
+ * destinations succeeded is not a clean success — a single "backup
625
+ * completed" that hid the failed one would be a lie, so the count of each is
626
+ * carried here and the message says both.
627
+ *
628
+ * Emitted by the backup orchestrator only after the destination loop, so a
629
+ * run that dies during the BUILD phase produces no completion at all.
630
+ */
631
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
618
632
  EventCategory["BackupRestored"] = "backup.restored";
619
633
  EventCategory["NotificationDispatched"] = "notification.dispatched";
620
634
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5345,7 +5359,7 @@ var ZodIssueCode = {
5345
5359
  var ZodFirstPartyTypeKind;
5346
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5347
5361
  //#endregion
5348
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5362
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5349
5363
  /**
5350
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5351
5365
  * window to float samples (D455).
@@ -7550,7 +7564,23 @@ var EncodeProfileSchema = object({
7550
7564
  "zerolatency",
7551
7565
  "film",
7552
7566
  "animation"
7553
- ]).optional()
7567
+ ]).optional(),
7568
+ /**
7569
+ * ONE slice per access unit.
7570
+ *
7571
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7572
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7573
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7574
+ * frame-end per frame: the first pictures render and the video then freezes
7575
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7576
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7577
+ *
7578
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7579
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7580
+ * consumers meaning the same thing spelled differently would stop sharing one
7581
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7582
+ */
7583
+ singleSlicePerFrame: boolean().optional()
7554
7584
  }),
7555
7585
  audio: union([literal("passthrough"), object({
7556
7586
  codec: _enum([
@@ -7600,7 +7630,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7600
7630
  audio: "passthrough"
7601
7631
  };
7602
7632
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7603
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7633
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7604
7634
  /**
7605
7635
  * Deep wiring healthcheck — snapshot of active reachability probes across
7606
7636
  * every declared capability + widget of every installed plugin, on every
@@ -11743,6 +11773,72 @@ var brokerCapability = {
11743
11773
  }
11744
11774
  };
11745
11775
  DeviceType.Camera;
11776
+ /**
11777
+ * The signals a device can emit to WAKE its own stream.
11778
+ *
11779
+ * A camera whose stream is built on demand sleeps until something asks for it,
11780
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11781
+ * puller holds a session open for ever, and treating that as demand would keep
11782
+ * a battery camera awake for ever, which is the whole thing the battery is for
11783
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11784
+ * itself, with no stream running.
11785
+ *
11786
+ * ## The vocabulary is the PROVIDER'S, not ours
11787
+ *
11788
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11789
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11790
+ * Reolink offers motion and camera-native detection; another provider may offer
11791
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11792
+ * yet. A fixed enum here would mean every new signal is a framework release.
11793
+ *
11794
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11795
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11796
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11797
+ * binding — but both answer "what drives the detection pipeline", which is a
11798
+ * different question from "what may wake a sleeping stream". A camera can do
11799
+ * the first and not be trusted with the second, and the operator picks per
11800
+ * camera. Two questions, two authorities.
11801
+ *
11802
+ * ## Availability is not permission
11803
+ *
11804
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11805
+ * wakes the stream is the operator's per-camera choice, held by the broker
11806
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11807
+ * provider declaring a signal is not a provider enabling it.
11808
+ */
11809
+ /** One signal a device can emit. */
11810
+ var StreamSignalSchema = object({
11811
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11812
+ code: string().min(1),
11813
+ /** What an operator reads in the picker. The provider's own wording. */
11814
+ label: string().min(1),
11815
+ /**
11816
+ * Whether the provider recommends this signal ON when a camera is first set
11817
+ * up. A provider knows which of its signals are cheap and reliable; an
11818
+ * operator should not have to discover that by trial. Reolink recommends
11819
+ * both of its own.
11820
+ */
11821
+ recommended: boolean()
11822
+ });
11823
+ var StreamSignalsStatusSchema = object({
11824
+ signals: array(StreamSignalSchema),
11825
+ lastFetchedAt: number()
11826
+ });
11827
+ var streamSignalsCapability = {
11828
+ name: "stream-signals",
11829
+ scope: "device",
11830
+ deviceNative: true,
11831
+ mode: "singleton",
11832
+ deviceTypes: Object.values(DeviceType),
11833
+ runtimeState: StreamSignalsStatusSchema,
11834
+ methods: {
11835
+ /**
11836
+ * What this device can emit. Empty is a valid and common answer — most
11837
+ * cameras have nothing to offer here, and an empty list is what makes the
11838
+ * broker's picker show nothing rather than a false choice.
11839
+ */
11840
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11841
+ };
11746
11842
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11747
11843
  var StreamFormatSchema = _enum([
11748
11844
  "webrtc",
@@ -12139,6 +12235,22 @@ var EgressTranscodeSchema = object({
12139
12235
  camStreamId: string().nullable()
12140
12236
  });
12141
12237
  method(object({
12238
+ deviceId: number().int().nonnegative(),
12239
+ /** The provider's signal code. */
12240
+ code: string().min(1),
12241
+ /** Ms epoch. Absent ⇒ now. */
12242
+ at: number().optional()
12243
+ }), object({
12244
+ /** Whether the broker acted on it, and if not, why. */
12245
+ accepted: boolean(),
12246
+ reason: _enum([
12247
+ "woke",
12248
+ "hold-extended",
12249
+ "not-enabled",
12250
+ "no-consumer",
12251
+ "unknown-code"
12252
+ ])
12253
+ }), { kind: "mutation" }), method(object({
12142
12254
  deviceId: number().int().nonnegative(),
12143
12255
  camStreamId: string().min(1),
12144
12256
  kind: CamStreamKindSchema,
@@ -12393,6 +12505,16 @@ var PickStreamRequirementsSchema = object({
12393
12505
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12394
12506
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12395
12507
  minHeight: number().int().positive().optional(),
12508
+ /**
12509
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12510
+ *
12511
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12512
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12513
+ * Without this the ceiling had to be re-implemented by every caller — and
12514
+ * one caller implementing it privately is how a second scoring authority
12515
+ * gets born.
12516
+ */
12517
+ maxHeight: number().int().positive().optional(),
12396
12518
  /** Minimum horizontal resolution. */
12397
12519
  minWidth: number().int().positive().optional(),
12398
12520
  /**
@@ -12409,7 +12531,22 @@ var PickStreamRequirementsSchema = object({
12409
12531
  * transcoded" guard: if the device is already serving the consumer's
12410
12532
  * codec end-to-end, there's nothing to optimise.
12411
12533
  */
12412
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12534
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12535
+ /**
12536
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12537
+ * understanding that it will be transcoded.
12538
+ *
12539
+ * Default `false` — today's behaviour, and the right one for a bypass
12540
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12541
+ * ask the larger question: "what is the best stream for me, transcoding if
12542
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12543
+ * does not, so a passthrough is never lost to a transcode; the answer says
12544
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12545
+ *
12546
+ * This is what lets one picker serve both the bypass and the full source
12547
+ * choice, instead of a consumer scoring privately when the bypass misses.
12548
+ */
12549
+ allowTranscode: boolean().optional()
12413
12550
  }).readonly();
12414
12551
  var PickStreamPreferencesSchema = object({
12415
12552
  /**
@@ -12423,12 +12560,32 @@ var PickStreamPreferencesSchema = object({
12423
12560
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12424
12561
  * memory-constrained consumers / Apple Home guest sessions).
12425
12562
  */
12426
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12563
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12564
+ /**
12565
+ * The height the consumer actually wants to DELIVER.
12566
+ *
12567
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12568
+ * above the target wins, and only if nothing reaches it does the tallest
12569
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12570
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12571
+ * express that: it says "as big as possible", which is a different wish.
12572
+ *
12573
+ * Ignored when absent, so every existing caller keeps its ordering.
12574
+ */
12575
+ targetHeight: number().int().positive().optional()
12427
12576
  }).readonly();
12428
12577
  var PickedCamStreamSchema = object({
12429
12578
  camStreamId: string(),
12430
12579
  codec: string().optional(),
12431
12580
  resolution: CamStreamResolutionSchema.optional(),
12581
+ /**
12582
+ * Whether serving this stream requires a decode + re-encode.
12583
+ *
12584
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12585
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12586
+ * not ask cannot be handed a cost it never agreed to pay.
12587
+ */
12588
+ transcodes: boolean(),
12432
12589
  /** One-line explanation of why this stream won — for logs / debug UI. */
12433
12590
  reason: string()
12434
12591
  });
@@ -17046,6 +17203,8 @@ var NcSystemEventKindSchema = _enum([
17046
17203
  "device-enabled",
17047
17204
  "device-battery-low",
17048
17205
  "device-battery-normal",
17206
+ "device-consumable-low",
17207
+ "device-consumable-normal",
17049
17208
  "stream-online",
17050
17209
  "stream-offline",
17051
17210
  "node-online",
@@ -17064,6 +17223,7 @@ var NcSystemEventKindSchema = _enum([
17064
17223
  "addon-updated",
17065
17224
  "server-updated",
17066
17225
  "export-completed",
17226
+ "backup-completed",
17067
17227
  "camera-online",
17068
17228
  "camera-offline",
17069
17229
  "camera-disabled",
@@ -20516,13 +20676,109 @@ var SummariesQueryInput = object({
20516
20676
  deviceIds: array(number()).min(1),
20517
20677
  since: number().optional(),
20518
20678
  until: number().optional(),
20519
- limit: number().int().min(1).max(200).default(50)
20679
+ limit: number().int().min(1).max(200).default(50),
20680
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20681
+ * meaning of "dog" on every summary surface. */
20682
+ classes: array(string().min(1).max(60)).max(40).optional()
20520
20683
  });
20521
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20522
20684
  var SummaryDetailSchema = object({
20523
20685
  summary: SummarySchema,
20524
- /** Member track ids, in absorption order. */
20525
- trackIds: array(string()).readonly()
20686
+ /** Members in absorption order, oldest join first. */
20687
+ members: array(object({
20688
+ trackId: string(),
20689
+ /**
20690
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20691
+ * and the track no longer exists to fill it.
20692
+ *
20693
+ * The join, not the latest opinion: class voting can re-decide a track's
20694
+ * class afterwards, and a group's composition is the history of who came
20695
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20696
+ * dog" — rather than being handed a second, denormalised tally that would
20697
+ * drift from the members it claims to describe.
20698
+ */
20699
+ className: string().nullable(),
20700
+ /** `primary` is the one member that carries the group's identity. */
20701
+ role: _enum([
20702
+ "primary",
20703
+ "sibling",
20704
+ "child"
20705
+ ]).nullable(),
20706
+ joinedAt: number(),
20707
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20708
+ * at read time. Absent when nothing resolved, never an empty string. */
20709
+ label: string().optional(),
20710
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20711
+ * recognised nobody, and absent for a member whose track has been pruned —
20712
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20713
+ subLabel: string().optional()
20714
+ })).readonly()
20715
+ });
20716
+ /**
20717
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20718
+ *
20719
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20720
+ * we extend when we notice we need more". Enough to draw the card ("two people
20721
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20722
+ * are on {@link getSummary}: shipping every member of every group so a client
20723
+ * can count them turns a page of two hundred groups into a thousand records to
20724
+ * draw two hundred badges.
20725
+ */
20726
+ var SummaryListItemSchema = object({
20727
+ summary: SummarySchema,
20728
+ /** Class counts, most numerous first; `className: null` is a member whose
20729
+ * class never resolved, counted so the counts add up to `memberCount`. */
20730
+ classes: array(object({
20731
+ className: string().nullable(),
20732
+ count: number().int().positive()
20733
+ })).readonly()
20734
+ });
20735
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20736
+ /**
20737
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20738
+ *
20739
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20740
+ * summaries feed that could only answer "the last N for these cameras"
20741
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20742
+ * else. Two feeds with different ordering contracts would be two ideas of what
20743
+ * "newest" means, on one screen.
20744
+ */
20745
+ var RecentSummariesQueryInput = object({
20746
+ /** Devices to merge. An empty array yields an empty page. */
20747
+ deviceIds: array(number()),
20748
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20749
+ since: number().optional(),
20750
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20751
+ until: number().optional(),
20752
+ limit: number().int().min(1).max(500).default(100),
20753
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20754
+ cursor: string().optional(),
20755
+ /**
20756
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20757
+ * deliberately the same name: the events filter tree emits one list of ticked
20758
+ * taxonomy nodes, and a summaries feed that called it something else would
20759
+ * make the operator's one filter component produce two shapes.
20760
+ *
20761
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20762
+ * me the arrivals with a dog" has to return the group of four people who had
20763
+ * one with them; a filter on the group's own fields could only ever answer
20764
+ * about its primary.
20765
+ *
20766
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20767
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20768
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20769
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20770
+ * that read only the class would answer "animal" and never "dog".
20771
+ *
20772
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20773
+ */
20774
+ classes: array(string().min(1).max(60)).max(40).optional()
20775
+ });
20776
+ var RecentSummariesPageSchema = object({
20777
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20778
+ * {@link listSummaries} — one list shape, so a card renders the same
20779
+ * whichever feed drew it. */
20780
+ summaries: array(SummaryListItemSchema).readonly(),
20781
+ nextCursor: string().nullable()
20526
20782
  });
20527
20783
  var RecentTracksPageSchema = object({
20528
20784
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20936,7 +21192,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20936
21192
  classes: array(string()).optional(),
20937
21193
  /** See {@link ExcludeSourcesDoc}. */
20938
21194
  excludeSources: array(TrackSourceSchema).optional()
20939
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
21195
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20940
21196
  kind: "mutation",
20941
21197
  auth: "admin"
20942
21198
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -24265,10 +24521,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24265
24521
  }), boolean()), method(object({
24266
24522
  deviceId: number().int().nonnegative(),
24267
24523
  sessionId: string()
24268
- }), object({ pendingRenegotiation: object({
24269
- target: WebrtcStreamTargetSchema,
24270
- epoch: number()
24271
- }).nullable() }));
24524
+ }), object({
24525
+ pendingRenegotiation: object({
24526
+ target: WebrtcStreamTargetSchema,
24527
+ epoch: number()
24528
+ }).nullable(),
24529
+ /**
24530
+ * Whether the session still EXISTS.
24531
+ *
24532
+ * A consumer that holds a resource for the life of a session needs to
24533
+ * be able to ask, because a session does not always end the way it
24534
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24535
+ * sent `SessionDisconnected`, so the Alexa exporter's
24536
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24537
+ * H.264 transcode kept running for NOBODY for more than twenty
24538
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24539
+ * minutes earlier — the broker knew; the holder had no way to ask.
24540
+ *
24541
+ * `false` for a session id the provider has never heard of, which is
24542
+ * the same answer as "it ended": either way nothing is holding it up.
24543
+ */
24544
+ alive: boolean()
24545
+ }));
24272
24546
  /**
24273
24547
  * List of accessory children linked to a parent device. The cap surfaces
24274
24548
  * the grouping and the per-child UI-visibility flag — the single source
@@ -32778,7 +33052,29 @@ var LoggingSettingsPatchSchema = object({
32778
33052
  * disarmed the channels it did not mention would make the Levels page and
32779
33053
  * the Diagnostics page fight over the same value.
32780
33054
  */
32781
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
33055
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
33056
+ /**
33057
+ * How many days the analytics OPS LOG is kept — the audit trail of what
33058
+ * retention actually deleted.
33059
+ *
33060
+ * It lives HERE, on the logging document, and not on the analytics addon's
33061
+ * settings form, on the operator's instruction: every other log-ish window in
33062
+ * this system is configured through this one document, and a retention audit
33063
+ * configured somewhere else is a second place to look when the question is
33064
+ * "what happened to my data".
33065
+ *
33066
+ * That placement has a cost worth stating: this document ships in the
33067
+ * framework closure, so this knob needs a published `@camstack/server` while
33068
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
33069
+ *
33070
+ * `retention-model.ts` argued this one must NOT follow a device window,
33071
+ * because the audit trail is the history of the SWEEP and not of the camera.
33072
+ * That argument stands and is untouched — what changes is that 30 days stops
33073
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
33074
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
33075
+ * state in which the next 9.5 GiB leak cannot be explained.
33076
+ */
33077
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32782
33078
  });
32783
33079
  /**
32784
33080
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32851,6 +33147,14 @@ var LoggingSettingsStateSchema = object({
32851
33147
  channels: array(LogChannelDescriptorSchema).readonly(),
32852
33148
  /** The channels ARMED right now, each with its deadline. */
32853
33149
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
33150
+ /**
33151
+ * The ops-log window in days, as it is in force. `0` = kept forever.
33152
+ *
33153
+ * Reported rather than left to the caller's memory of what it wrote: this is
33154
+ * the value the analytics sweep will actually use, and an operator asking how
33155
+ * long their audit trail lives should not have to infer it from a default.
33156
+ */
33157
+ opsLogRetentionDays: number().int().min(0),
32854
33158
  persisted: boolean()
32855
33159
  });
32856
33160
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
@@ -34246,6 +34550,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
34246
34550
  smoke: smokeCapability,
34247
34551
  streamCatalog: streamCatalogCapability,
34248
34552
  streamParams: streamParamsCapability,
34553
+ streamSignals: streamSignalsCapability,
34249
34554
  switch: switchCapability,
34250
34555
  tamper: tamperCapability,
34251
34556
  temperatureSensor: temperatureSensorCapability,
@@ -38851,6 +39156,12 @@ Object.freeze({
38851
39156
  addonId: null,
38852
39157
  access: "view"
38853
39158
  },
39159
+ "pipelineAnalytics.listRecentSummaries": {
39160
+ capName: "pipeline-analytics",
39161
+ capScope: "device",
39162
+ addonId: null,
39163
+ access: "view"
39164
+ },
38854
39165
  "pipelineAnalytics.listRecentTracks": {
38855
39166
  capName: "pipeline-analytics",
38856
39167
  capScope: "device",
@@ -40813,6 +41124,12 @@ Object.freeze({
40813
41124
  addonId: null,
40814
41125
  access: "create"
40815
41126
  },
41127
+ "streamBroker.reportStreamSignal": {
41128
+ capName: "stream-broker",
41129
+ capScope: "system",
41130
+ addonId: null,
41131
+ access: "create"
41132
+ },
40816
41133
  "streamBroker.restartProfile": {
40817
41134
  capName: "stream-broker",
40818
41135
  capScope: "system",
@@ -40897,6 +41214,12 @@ Object.freeze({
40897
41214
  addonId: null,
40898
41215
  access: "create"
40899
41216
  },
41217
+ "streamSignals.listSignals": {
41218
+ capName: "stream-signals",
41219
+ capScope: "device",
41220
+ addonId: null,
41221
+ access: "view"
41222
+ },
40900
41223
  "switch.setState": {
40901
41224
  capName: "switch",
40902
41225
  capScope: "device",
@@ -42678,6 +43001,11 @@ Object.freeze({
42678
43001
  form: "single",
42679
43002
  optional: true
42680
43003
  }],
43004
+ "pipelineAnalytics.listRecentSummaries": [{
43005
+ name: "deviceIds",
43006
+ form: "array",
43007
+ optional: false
43008
+ }],
42681
43009
  "pipelineAnalytics.listRecentTracks": [{
42682
43010
  name: "deviceIds",
42683
43011
  form: "array",
@@ -43264,6 +43592,11 @@ Object.freeze({
43264
43592
  form: "single",
43265
43593
  optional: false
43266
43594
  }],
43595
+ "streamBroker.reportStreamSignal": [{
43596
+ name: "deviceId",
43597
+ form: "single",
43598
+ optional: false
43599
+ }],
43267
43600
  "streamBroker.restartProfile": [{
43268
43601
  name: "deviceId",
43269
43602
  form: "single",
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-ZyX6jcse.mjs
1
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -615,6 +615,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
615
615
  * pull-reconcile from the provider's `getStatus` on reconnect. */
616
616
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
617
617
  EventCategory["BackupCompleted"] = "backup.completed";
618
+ /**
619
+ * A whole backup RUN finished — every destination attempted, win or lose.
620
+ *
621
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
622
+ * a progress UI and the wrong one for a notification: an operator with three
623
+ * destinations would be told three times. And a run where two of three
624
+ * destinations succeeded is not a clean success — a single "backup
625
+ * completed" that hid the failed one would be a lie, so the count of each is
626
+ * carried here and the message says both.
627
+ *
628
+ * Emitted by the backup orchestrator only after the destination loop, so a
629
+ * run that dies during the BUILD phase produces no completion at all.
630
+ */
631
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
618
632
  EventCategory["BackupRestored"] = "backup.restored";
619
633
  EventCategory["NotificationDispatched"] = "notification.dispatched";
620
634
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5345,7 +5359,7 @@ var ZodIssueCode = {
5345
5359
  var ZodFirstPartyTypeKind;
5346
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5347
5361
  //#endregion
5348
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5362
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5349
5363
  /**
5350
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5351
5365
  * window to float samples (D455).
@@ -7550,7 +7564,23 @@ var EncodeProfileSchema = object({
7550
7564
  "zerolatency",
7551
7565
  "film",
7552
7566
  "animation"
7553
- ]).optional()
7567
+ ]).optional(),
7568
+ /**
7569
+ * ONE slice per access unit.
7570
+ *
7571
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7572
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7573
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7574
+ * frame-end per frame: the first pictures render and the video then freezes
7575
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7576
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7577
+ *
7578
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7579
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7580
+ * consumers meaning the same thing spelled differently would stop sharing one
7581
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7582
+ */
7583
+ singleSlicePerFrame: boolean().optional()
7554
7584
  }),
7555
7585
  audio: union([literal("passthrough"), object({
7556
7586
  codec: _enum([
@@ -7600,7 +7630,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7600
7630
  audio: "passthrough"
7601
7631
  };
7602
7632
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7603
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7633
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7604
7634
  /**
7605
7635
  * Deep wiring healthcheck — snapshot of active reachability probes across
7606
7636
  * every declared capability + widget of every installed plugin, on every
@@ -11743,6 +11773,72 @@ var brokerCapability = {
11743
11773
  }
11744
11774
  };
11745
11775
  DeviceType.Camera;
11776
+ /**
11777
+ * The signals a device can emit to WAKE its own stream.
11778
+ *
11779
+ * A camera whose stream is built on demand sleeps until something asks for it,
11780
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11781
+ * puller holds a session open for ever, and treating that as demand would keep
11782
+ * a battery camera awake for ever, which is the whole thing the battery is for
11783
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11784
+ * itself, with no stream running.
11785
+ *
11786
+ * ## The vocabulary is the PROVIDER'S, not ours
11787
+ *
11788
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11789
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11790
+ * Reolink offers motion and camera-native detection; another provider may offer
11791
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11792
+ * yet. A fixed enum here would mean every new signal is a framework release.
11793
+ *
11794
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11795
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11796
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11797
+ * binding — but both answer "what drives the detection pipeline", which is a
11798
+ * different question from "what may wake a sleeping stream". A camera can do
11799
+ * the first and not be trusted with the second, and the operator picks per
11800
+ * camera. Two questions, two authorities.
11801
+ *
11802
+ * ## Availability is not permission
11803
+ *
11804
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11805
+ * wakes the stream is the operator's per-camera choice, held by the broker
11806
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11807
+ * provider declaring a signal is not a provider enabling it.
11808
+ */
11809
+ /** One signal a device can emit. */
11810
+ var StreamSignalSchema = object({
11811
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11812
+ code: string().min(1),
11813
+ /** What an operator reads in the picker. The provider's own wording. */
11814
+ label: string().min(1),
11815
+ /**
11816
+ * Whether the provider recommends this signal ON when a camera is first set
11817
+ * up. A provider knows which of its signals are cheap and reliable; an
11818
+ * operator should not have to discover that by trial. Reolink recommends
11819
+ * both of its own.
11820
+ */
11821
+ recommended: boolean()
11822
+ });
11823
+ var StreamSignalsStatusSchema = object({
11824
+ signals: array(StreamSignalSchema),
11825
+ lastFetchedAt: number()
11826
+ });
11827
+ var streamSignalsCapability = {
11828
+ name: "stream-signals",
11829
+ scope: "device",
11830
+ deviceNative: true,
11831
+ mode: "singleton",
11832
+ deviceTypes: Object.values(DeviceType),
11833
+ runtimeState: StreamSignalsStatusSchema,
11834
+ methods: {
11835
+ /**
11836
+ * What this device can emit. Empty is a valid and common answer — most
11837
+ * cameras have nothing to offer here, and an empty list is what makes the
11838
+ * broker's picker show nothing rather than a false choice.
11839
+ */
11840
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11841
+ };
11746
11842
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11747
11843
  var StreamFormatSchema = _enum([
11748
11844
  "webrtc",
@@ -12139,6 +12235,22 @@ var EgressTranscodeSchema = object({
12139
12235
  camStreamId: string().nullable()
12140
12236
  });
12141
12237
  method(object({
12238
+ deviceId: number().int().nonnegative(),
12239
+ /** The provider's signal code. */
12240
+ code: string().min(1),
12241
+ /** Ms epoch. Absent ⇒ now. */
12242
+ at: number().optional()
12243
+ }), object({
12244
+ /** Whether the broker acted on it, and if not, why. */
12245
+ accepted: boolean(),
12246
+ reason: _enum([
12247
+ "woke",
12248
+ "hold-extended",
12249
+ "not-enabled",
12250
+ "no-consumer",
12251
+ "unknown-code"
12252
+ ])
12253
+ }), { kind: "mutation" }), method(object({
12142
12254
  deviceId: number().int().nonnegative(),
12143
12255
  camStreamId: string().min(1),
12144
12256
  kind: CamStreamKindSchema,
@@ -12393,6 +12505,16 @@ var PickStreamRequirementsSchema = object({
12393
12505
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12394
12506
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12395
12507
  minHeight: number().int().positive().optional(),
12508
+ /**
12509
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12510
+ *
12511
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12512
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12513
+ * Without this the ceiling had to be re-implemented by every caller — and
12514
+ * one caller implementing it privately is how a second scoring authority
12515
+ * gets born.
12516
+ */
12517
+ maxHeight: number().int().positive().optional(),
12396
12518
  /** Minimum horizontal resolution. */
12397
12519
  minWidth: number().int().positive().optional(),
12398
12520
  /**
@@ -12409,7 +12531,22 @@ var PickStreamRequirementsSchema = object({
12409
12531
  * transcoded" guard: if the device is already serving the consumer's
12410
12532
  * codec end-to-end, there's nothing to optimise.
12411
12533
  */
12412
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12534
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12535
+ /**
12536
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12537
+ * understanding that it will be transcoded.
12538
+ *
12539
+ * Default `false` — today's behaviour, and the right one for a bypass
12540
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12541
+ * ask the larger question: "what is the best stream for me, transcoding if
12542
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12543
+ * does not, so a passthrough is never lost to a transcode; the answer says
12544
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12545
+ *
12546
+ * This is what lets one picker serve both the bypass and the full source
12547
+ * choice, instead of a consumer scoring privately when the bypass misses.
12548
+ */
12549
+ allowTranscode: boolean().optional()
12413
12550
  }).readonly();
12414
12551
  var PickStreamPreferencesSchema = object({
12415
12552
  /**
@@ -12423,12 +12560,32 @@ var PickStreamPreferencesSchema = object({
12423
12560
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12424
12561
  * memory-constrained consumers / Apple Home guest sessions).
12425
12562
  */
12426
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12563
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12564
+ /**
12565
+ * The height the consumer actually wants to DELIVER.
12566
+ *
12567
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12568
+ * above the target wins, and only if nothing reaches it does the tallest
12569
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12570
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12571
+ * express that: it says "as big as possible", which is a different wish.
12572
+ *
12573
+ * Ignored when absent, so every existing caller keeps its ordering.
12574
+ */
12575
+ targetHeight: number().int().positive().optional()
12427
12576
  }).readonly();
12428
12577
  var PickedCamStreamSchema = object({
12429
12578
  camStreamId: string(),
12430
12579
  codec: string().optional(),
12431
12580
  resolution: CamStreamResolutionSchema.optional(),
12581
+ /**
12582
+ * Whether serving this stream requires a decode + re-encode.
12583
+ *
12584
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12585
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12586
+ * not ask cannot be handed a cost it never agreed to pay.
12587
+ */
12588
+ transcodes: boolean(),
12432
12589
  /** One-line explanation of why this stream won — for logs / debug UI. */
12433
12590
  reason: string()
12434
12591
  });
@@ -17046,6 +17203,8 @@ var NcSystemEventKindSchema = _enum([
17046
17203
  "device-enabled",
17047
17204
  "device-battery-low",
17048
17205
  "device-battery-normal",
17206
+ "device-consumable-low",
17207
+ "device-consumable-normal",
17049
17208
  "stream-online",
17050
17209
  "stream-offline",
17051
17210
  "node-online",
@@ -17064,6 +17223,7 @@ var NcSystemEventKindSchema = _enum([
17064
17223
  "addon-updated",
17065
17224
  "server-updated",
17066
17225
  "export-completed",
17226
+ "backup-completed",
17067
17227
  "camera-online",
17068
17228
  "camera-offline",
17069
17229
  "camera-disabled",
@@ -20516,13 +20676,109 @@ var SummariesQueryInput = object({
20516
20676
  deviceIds: array(number()).min(1),
20517
20677
  since: number().optional(),
20518
20678
  until: number().optional(),
20519
- limit: number().int().min(1).max(200).default(50)
20679
+ limit: number().int().min(1).max(200).default(50),
20680
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20681
+ * meaning of "dog" on every summary surface. */
20682
+ classes: array(string().min(1).max(60)).max(40).optional()
20520
20683
  });
20521
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20522
20684
  var SummaryDetailSchema = object({
20523
20685
  summary: SummarySchema,
20524
- /** Member track ids, in absorption order. */
20525
- trackIds: array(string()).readonly()
20686
+ /** Members in absorption order, oldest join first. */
20687
+ members: array(object({
20688
+ trackId: string(),
20689
+ /**
20690
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20691
+ * and the track no longer exists to fill it.
20692
+ *
20693
+ * The join, not the latest opinion: class voting can re-decide a track's
20694
+ * class afterwards, and a group's composition is the history of who came
20695
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20696
+ * dog" — rather than being handed a second, denormalised tally that would
20697
+ * drift from the members it claims to describe.
20698
+ */
20699
+ className: string().nullable(),
20700
+ /** `primary` is the one member that carries the group's identity. */
20701
+ role: _enum([
20702
+ "primary",
20703
+ "sibling",
20704
+ "child"
20705
+ ]).nullable(),
20706
+ joinedAt: number(),
20707
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20708
+ * at read time. Absent when nothing resolved, never an empty string. */
20709
+ label: string().optional(),
20710
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20711
+ * recognised nobody, and absent for a member whose track has been pruned —
20712
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20713
+ subLabel: string().optional()
20714
+ })).readonly()
20715
+ });
20716
+ /**
20717
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20718
+ *
20719
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20720
+ * we extend when we notice we need more". Enough to draw the card ("two people
20721
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20722
+ * are on {@link getSummary}: shipping every member of every group so a client
20723
+ * can count them turns a page of two hundred groups into a thousand records to
20724
+ * draw two hundred badges.
20725
+ */
20726
+ var SummaryListItemSchema = object({
20727
+ summary: SummarySchema,
20728
+ /** Class counts, most numerous first; `className: null` is a member whose
20729
+ * class never resolved, counted so the counts add up to `memberCount`. */
20730
+ classes: array(object({
20731
+ className: string().nullable(),
20732
+ count: number().int().positive()
20733
+ })).readonly()
20734
+ });
20735
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20736
+ /**
20737
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20738
+ *
20739
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20740
+ * summaries feed that could only answer "the last N for these cameras"
20741
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20742
+ * else. Two feeds with different ordering contracts would be two ideas of what
20743
+ * "newest" means, on one screen.
20744
+ */
20745
+ var RecentSummariesQueryInput = object({
20746
+ /** Devices to merge. An empty array yields an empty page. */
20747
+ deviceIds: array(number()),
20748
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20749
+ since: number().optional(),
20750
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20751
+ until: number().optional(),
20752
+ limit: number().int().min(1).max(500).default(100),
20753
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20754
+ cursor: string().optional(),
20755
+ /**
20756
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20757
+ * deliberately the same name: the events filter tree emits one list of ticked
20758
+ * taxonomy nodes, and a summaries feed that called it something else would
20759
+ * make the operator's one filter component produce two shapes.
20760
+ *
20761
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20762
+ * me the arrivals with a dog" has to return the group of four people who had
20763
+ * one with them; a filter on the group's own fields could only ever answer
20764
+ * about its primary.
20765
+ *
20766
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20767
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20768
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20769
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20770
+ * that read only the class would answer "animal" and never "dog".
20771
+ *
20772
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20773
+ */
20774
+ classes: array(string().min(1).max(60)).max(40).optional()
20775
+ });
20776
+ var RecentSummariesPageSchema = object({
20777
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20778
+ * {@link listSummaries} — one list shape, so a card renders the same
20779
+ * whichever feed drew it. */
20780
+ summaries: array(SummaryListItemSchema).readonly(),
20781
+ nextCursor: string().nullable()
20526
20782
  });
20527
20783
  var RecentTracksPageSchema = object({
20528
20784
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20936,7 +21192,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20936
21192
  classes: array(string()).optional(),
20937
21193
  /** See {@link ExcludeSourcesDoc}. */
20938
21194
  excludeSources: array(TrackSourceSchema).optional()
20939
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
21195
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20940
21196
  kind: "mutation",
20941
21197
  auth: "admin"
20942
21198
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -24265,10 +24521,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24265
24521
  }), boolean()), method(object({
24266
24522
  deviceId: number().int().nonnegative(),
24267
24523
  sessionId: string()
24268
- }), object({ pendingRenegotiation: object({
24269
- target: WebrtcStreamTargetSchema,
24270
- epoch: number()
24271
- }).nullable() }));
24524
+ }), object({
24525
+ pendingRenegotiation: object({
24526
+ target: WebrtcStreamTargetSchema,
24527
+ epoch: number()
24528
+ }).nullable(),
24529
+ /**
24530
+ * Whether the session still EXISTS.
24531
+ *
24532
+ * A consumer that holds a resource for the life of a session needs to
24533
+ * be able to ask, because a session does not always end the way it
24534
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24535
+ * sent `SessionDisconnected`, so the Alexa exporter's
24536
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24537
+ * H.264 transcode kept running for NOBODY for more than twenty
24538
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24539
+ * minutes earlier — the broker knew; the holder had no way to ask.
24540
+ *
24541
+ * `false` for a session id the provider has never heard of, which is
24542
+ * the same answer as "it ended": either way nothing is holding it up.
24543
+ */
24544
+ alive: boolean()
24545
+ }));
24272
24546
  /**
24273
24547
  * List of accessory children linked to a parent device. The cap surfaces
24274
24548
  * the grouping and the per-child UI-visibility flag — the single source
@@ -32778,7 +33052,29 @@ var LoggingSettingsPatchSchema = object({
32778
33052
  * disarmed the channels it did not mention would make the Levels page and
32779
33053
  * the Diagnostics page fight over the same value.
32780
33054
  */
32781
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
33055
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
33056
+ /**
33057
+ * How many days the analytics OPS LOG is kept — the audit trail of what
33058
+ * retention actually deleted.
33059
+ *
33060
+ * It lives HERE, on the logging document, and not on the analytics addon's
33061
+ * settings form, on the operator's instruction: every other log-ish window in
33062
+ * this system is configured through this one document, and a retention audit
33063
+ * configured somewhere else is a second place to look when the question is
33064
+ * "what happened to my data".
33065
+ *
33066
+ * That placement has a cost worth stating: this document ships in the
33067
+ * framework closure, so this knob needs a published `@camstack/server` while
33068
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
33069
+ *
33070
+ * `retention-model.ts` argued this one must NOT follow a device window,
33071
+ * because the audit trail is the history of the SWEEP and not of the camera.
33072
+ * That argument stands and is untouched — what changes is that 30 days stops
33073
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
33074
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
33075
+ * state in which the next 9.5 GiB leak cannot be explained.
33076
+ */
33077
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32782
33078
  });
32783
33079
  /**
32784
33080
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32851,6 +33147,14 @@ var LoggingSettingsStateSchema = object({
32851
33147
  channels: array(LogChannelDescriptorSchema).readonly(),
32852
33148
  /** The channels ARMED right now, each with its deadline. */
32853
33149
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
33150
+ /**
33151
+ * The ops-log window in days, as it is in force. `0` = kept forever.
33152
+ *
33153
+ * Reported rather than left to the caller's memory of what it wrote: this is
33154
+ * the value the analytics sweep will actually use, and an operator asking how
33155
+ * long their audit trail lives should not have to infer it from a default.
33156
+ */
33157
+ opsLogRetentionDays: number().int().min(0),
32854
33158
  persisted: boolean()
32855
33159
  });
32856
33160
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
@@ -34246,6 +34550,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
34246
34550
  smoke: smokeCapability,
34247
34551
  streamCatalog: streamCatalogCapability,
34248
34552
  streamParams: streamParamsCapability,
34553
+ streamSignals: streamSignalsCapability,
34249
34554
  switch: switchCapability,
34250
34555
  tamper: tamperCapability,
34251
34556
  temperatureSensor: temperatureSensorCapability,
@@ -38851,6 +39156,12 @@ Object.freeze({
38851
39156
  addonId: null,
38852
39157
  access: "view"
38853
39158
  },
39159
+ "pipelineAnalytics.listRecentSummaries": {
39160
+ capName: "pipeline-analytics",
39161
+ capScope: "device",
39162
+ addonId: null,
39163
+ access: "view"
39164
+ },
38854
39165
  "pipelineAnalytics.listRecentTracks": {
38855
39166
  capName: "pipeline-analytics",
38856
39167
  capScope: "device",
@@ -40813,6 +41124,12 @@ Object.freeze({
40813
41124
  addonId: null,
40814
41125
  access: "create"
40815
41126
  },
41127
+ "streamBroker.reportStreamSignal": {
41128
+ capName: "stream-broker",
41129
+ capScope: "system",
41130
+ addonId: null,
41131
+ access: "create"
41132
+ },
40816
41133
  "streamBroker.restartProfile": {
40817
41134
  capName: "stream-broker",
40818
41135
  capScope: "system",
@@ -40897,6 +41214,12 @@ Object.freeze({
40897
41214
  addonId: null,
40898
41215
  access: "create"
40899
41216
  },
41217
+ "streamSignals.listSignals": {
41218
+ capName: "stream-signals",
41219
+ capScope: "device",
41220
+ addonId: null,
41221
+ access: "view"
41222
+ },
40900
41223
  "switch.setState": {
40901
41224
  capName: "switch",
40902
41225
  capScope: "device",
@@ -42678,6 +43001,11 @@ Object.freeze({
42678
43001
  form: "single",
42679
43002
  optional: true
42680
43003
  }],
43004
+ "pipelineAnalytics.listRecentSummaries": [{
43005
+ name: "deviceIds",
43006
+ form: "array",
43007
+ optional: false
43008
+ }],
42681
43009
  "pipelineAnalytics.listRecentTracks": [{
42682
43010
  name: "deviceIds",
42683
43011
  form: "array",
@@ -43264,6 +43592,11 @@ Object.freeze({
43264
43592
  form: "single",
43265
43593
  optional: false
43266
43594
  }],
43595
+ "streamBroker.reportStreamSignal": [{
43596
+ name: "deviceId",
43597
+ form: "single",
43598
+ optional: false
43599
+ }],
43267
43600
  "streamBroker.restartProfile": [{
43268
43601
  name: "deviceId",
43269
43602
  form: "single",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-Daqsf2Q7.js");
6
+ const require_dist = require("../dist-CojINel_.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-DRv84o8E.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-9vbU-7ZX.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.116",
3
+ "version": "1.2.118",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",