@camstack/addon-provider-homematic 1.2.101 → 1.2.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +349 -16
  2. package/dist/addon.mjs +349 -16
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8,7 +8,7 @@ let http = require("http");
8
8
  let crypto$1 = require("crypto");
9
9
  let fs_promises = require("fs/promises");
10
10
  let path = require("path");
11
- //#region ../types/dist/event-category-ZyX6jcse.mjs
11
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -625,6 +625,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
625
625
  * pull-reconcile from the provider's `getStatus` on reconnect. */
626
626
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
627
627
  EventCategory["BackupCompleted"] = "backup.completed";
628
+ /**
629
+ * A whole backup RUN finished — every destination attempted, win or lose.
630
+ *
631
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
632
+ * a progress UI and the wrong one for a notification: an operator with three
633
+ * destinations would be told three times. And a run where two of three
634
+ * destinations succeeded is not a clean success — a single "backup
635
+ * completed" that hid the failed one would be a lie, so the count of each is
636
+ * carried here and the message says both.
637
+ *
638
+ * Emitted by the backup orchestrator only after the destination loop, so a
639
+ * run that dies during the BUILD phase produces no completion at all.
640
+ */
641
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
628
642
  EventCategory["BackupRestored"] = "backup.restored";
629
643
  EventCategory["NotificationDispatched"] = "notification.dispatched";
630
644
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5355,7 +5369,7 @@ var ZodIssueCode = {
5355
5369
  var ZodFirstPartyTypeKind;
5356
5370
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5357
5371
  //#endregion
5358
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5372
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5359
5373
  /**
5360
5374
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5361
5375
  * window to float samples (D455).
@@ -7384,7 +7398,23 @@ var EncodeProfileSchema = object({
7384
7398
  "zerolatency",
7385
7399
  "film",
7386
7400
  "animation"
7387
- ]).optional()
7401
+ ]).optional(),
7402
+ /**
7403
+ * ONE slice per access unit.
7404
+ *
7405
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7406
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7407
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7408
+ * frame-end per frame: the first pictures render and the video then freezes
7409
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7410
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7411
+ *
7412
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7413
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7414
+ * consumers meaning the same thing spelled differently would stop sharing one
7415
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7416
+ */
7417
+ singleSlicePerFrame: boolean().optional()
7388
7418
  }),
7389
7419
  audio: union([literal("passthrough"), object({
7390
7420
  codec: _enum([
@@ -7434,7 +7464,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7434
7464
  audio: "passthrough"
7435
7465
  };
7436
7466
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7437
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7467
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7438
7468
  /**
7439
7469
  * Deep wiring healthcheck — snapshot of active reachability probes across
7440
7470
  * every declared capability + widget of every installed plugin, on every
@@ -11532,6 +11562,72 @@ var brokerCapability = {
11532
11562
  }
11533
11563
  };
11534
11564
  DeviceType.Camera;
11565
+ /**
11566
+ * The signals a device can emit to WAKE its own stream.
11567
+ *
11568
+ * A camera whose stream is built on demand sleeps until something asks for it,
11569
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11570
+ * puller holds a session open for ever, and treating that as demand would keep
11571
+ * a battery camera awake for ever, which is the whole thing the battery is for
11572
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11573
+ * itself, with no stream running.
11574
+ *
11575
+ * ## The vocabulary is the PROVIDER'S, not ours
11576
+ *
11577
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11578
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11579
+ * Reolink offers motion and camera-native detection; another provider may offer
11580
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11581
+ * yet. A fixed enum here would mean every new signal is a framework release.
11582
+ *
11583
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11584
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11585
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11586
+ * binding — but both answer "what drives the detection pipeline", which is a
11587
+ * different question from "what may wake a sleeping stream". A camera can do
11588
+ * the first and not be trusted with the second, and the operator picks per
11589
+ * camera. Two questions, two authorities.
11590
+ *
11591
+ * ## Availability is not permission
11592
+ *
11593
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11594
+ * wakes the stream is the operator's per-camera choice, held by the broker
11595
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11596
+ * provider declaring a signal is not a provider enabling it.
11597
+ */
11598
+ /** One signal a device can emit. */
11599
+ var StreamSignalSchema = object({
11600
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11601
+ code: string().min(1),
11602
+ /** What an operator reads in the picker. The provider's own wording. */
11603
+ label: string().min(1),
11604
+ /**
11605
+ * Whether the provider recommends this signal ON when a camera is first set
11606
+ * up. A provider knows which of its signals are cheap and reliable; an
11607
+ * operator should not have to discover that by trial. Reolink recommends
11608
+ * both of its own.
11609
+ */
11610
+ recommended: boolean()
11611
+ });
11612
+ var StreamSignalsStatusSchema = object({
11613
+ signals: array(StreamSignalSchema),
11614
+ lastFetchedAt: number()
11615
+ });
11616
+ var streamSignalsCapability = {
11617
+ name: "stream-signals",
11618
+ scope: "device",
11619
+ deviceNative: true,
11620
+ mode: "singleton",
11621
+ deviceTypes: Object.values(DeviceType),
11622
+ runtimeState: StreamSignalsStatusSchema,
11623
+ methods: {
11624
+ /**
11625
+ * What this device can emit. Empty is a valid and common answer — most
11626
+ * cameras have nothing to offer here, and an empty list is what makes the
11627
+ * broker's picker show nothing rather than a false choice.
11628
+ */
11629
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11630
+ };
11535
11631
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11536
11632
  var StreamFormatSchema = _enum([
11537
11633
  "webrtc",
@@ -11928,6 +12024,22 @@ var EgressTranscodeSchema = object({
11928
12024
  camStreamId: string().nullable()
11929
12025
  });
11930
12026
  method(object({
12027
+ deviceId: number().int().nonnegative(),
12028
+ /** The provider's signal code. */
12029
+ code: string().min(1),
12030
+ /** Ms epoch. Absent ⇒ now. */
12031
+ at: number().optional()
12032
+ }), object({
12033
+ /** Whether the broker acted on it, and if not, why. */
12034
+ accepted: boolean(),
12035
+ reason: _enum([
12036
+ "woke",
12037
+ "hold-extended",
12038
+ "not-enabled",
12039
+ "no-consumer",
12040
+ "unknown-code"
12041
+ ])
12042
+ }), { kind: "mutation" }), method(object({
11931
12043
  deviceId: number().int().nonnegative(),
11932
12044
  camStreamId: string().min(1),
11933
12045
  kind: CamStreamKindSchema,
@@ -12182,6 +12294,16 @@ var PickStreamRequirementsSchema = object({
12182
12294
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12183
12295
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12184
12296
  minHeight: number().int().positive().optional(),
12297
+ /**
12298
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12299
+ *
12300
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12301
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12302
+ * Without this the ceiling had to be re-implemented by every caller — and
12303
+ * one caller implementing it privately is how a second scoring authority
12304
+ * gets born.
12305
+ */
12306
+ maxHeight: number().int().positive().optional(),
12185
12307
  /** Minimum horizontal resolution. */
12186
12308
  minWidth: number().int().positive().optional(),
12187
12309
  /**
@@ -12198,7 +12320,22 @@ var PickStreamRequirementsSchema = object({
12198
12320
  * transcoded" guard: if the device is already serving the consumer's
12199
12321
  * codec end-to-end, there's nothing to optimise.
12200
12322
  */
12201
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12323
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12324
+ /**
12325
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12326
+ * understanding that it will be transcoded.
12327
+ *
12328
+ * Default `false` — today's behaviour, and the right one for a bypass
12329
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12330
+ * ask the larger question: "what is the best stream for me, transcoding if
12331
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12332
+ * does not, so a passthrough is never lost to a transcode; the answer says
12333
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12334
+ *
12335
+ * This is what lets one picker serve both the bypass and the full source
12336
+ * choice, instead of a consumer scoring privately when the bypass misses.
12337
+ */
12338
+ allowTranscode: boolean().optional()
12202
12339
  }).readonly();
12203
12340
  var PickStreamPreferencesSchema = object({
12204
12341
  /**
@@ -12212,12 +12349,32 @@ var PickStreamPreferencesSchema = object({
12212
12349
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12213
12350
  * memory-constrained consumers / Apple Home guest sessions).
12214
12351
  */
12215
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12352
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12353
+ /**
12354
+ * The height the consumer actually wants to DELIVER.
12355
+ *
12356
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12357
+ * above the target wins, and only if nothing reaches it does the tallest
12358
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12359
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12360
+ * express that: it says "as big as possible", which is a different wish.
12361
+ *
12362
+ * Ignored when absent, so every existing caller keeps its ordering.
12363
+ */
12364
+ targetHeight: number().int().positive().optional()
12216
12365
  }).readonly();
12217
12366
  var PickedCamStreamSchema = object({
12218
12367
  camStreamId: string(),
12219
12368
  codec: string().optional(),
12220
12369
  resolution: CamStreamResolutionSchema.optional(),
12370
+ /**
12371
+ * Whether serving this stream requires a decode + re-encode.
12372
+ *
12373
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12374
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12375
+ * not ask cannot be handed a cost it never agreed to pay.
12376
+ */
12377
+ transcodes: boolean(),
12221
12378
  /** One-line explanation of why this stream won — for logs / debug UI. */
12222
12379
  reason: string()
12223
12380
  });
@@ -16751,6 +16908,8 @@ var NcSystemEventKindSchema = _enum([
16751
16908
  "device-enabled",
16752
16909
  "device-battery-low",
16753
16910
  "device-battery-normal",
16911
+ "device-consumable-low",
16912
+ "device-consumable-normal",
16754
16913
  "stream-online",
16755
16914
  "stream-offline",
16756
16915
  "node-online",
@@ -16769,6 +16928,7 @@ var NcSystemEventKindSchema = _enum([
16769
16928
  "addon-updated",
16770
16929
  "server-updated",
16771
16930
  "export-completed",
16931
+ "backup-completed",
16772
16932
  "camera-online",
16773
16933
  "camera-offline",
16774
16934
  "camera-disabled",
@@ -20205,13 +20365,109 @@ var SummariesQueryInput = object({
20205
20365
  deviceIds: array(number()).min(1),
20206
20366
  since: number().optional(),
20207
20367
  until: number().optional(),
20208
- limit: number().int().min(1).max(200).default(50)
20368
+ limit: number().int().min(1).max(200).default(50),
20369
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20370
+ * meaning of "dog" on every summary surface. */
20371
+ classes: array(string().min(1).max(60)).max(40).optional()
20209
20372
  });
20210
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20211
20373
  var SummaryDetailSchema = object({
20212
20374
  summary: SummarySchema,
20213
- /** Member track ids, in absorption order. */
20214
- trackIds: array(string()).readonly()
20375
+ /** Members in absorption order, oldest join first. */
20376
+ members: array(object({
20377
+ trackId: string(),
20378
+ /**
20379
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20380
+ * and the track no longer exists to fill it.
20381
+ *
20382
+ * The join, not the latest opinion: class voting can re-decide a track's
20383
+ * class afterwards, and a group's composition is the history of who came
20384
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20385
+ * dog" — rather than being handed a second, denormalised tally that would
20386
+ * drift from the members it claims to describe.
20387
+ */
20388
+ className: string().nullable(),
20389
+ /** `primary` is the one member that carries the group's identity. */
20390
+ role: _enum([
20391
+ "primary",
20392
+ "sibling",
20393
+ "child"
20394
+ ]).nullable(),
20395
+ joinedAt: number(),
20396
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20397
+ * at read time. Absent when nothing resolved, never an empty string. */
20398
+ label: string().optional(),
20399
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20400
+ * recognised nobody, and absent for a member whose track has been pruned —
20401
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20402
+ subLabel: string().optional()
20403
+ })).readonly()
20404
+ });
20405
+ /**
20406
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20407
+ *
20408
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20409
+ * we extend when we notice we need more". Enough to draw the card ("two people
20410
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20411
+ * are on {@link getSummary}: shipping every member of every group so a client
20412
+ * can count them turns a page of two hundred groups into a thousand records to
20413
+ * draw two hundred badges.
20414
+ */
20415
+ var SummaryListItemSchema = object({
20416
+ summary: SummarySchema,
20417
+ /** Class counts, most numerous first; `className: null` is a member whose
20418
+ * class never resolved, counted so the counts add up to `memberCount`. */
20419
+ classes: array(object({
20420
+ className: string().nullable(),
20421
+ count: number().int().positive()
20422
+ })).readonly()
20423
+ });
20424
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20425
+ /**
20426
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20427
+ *
20428
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20429
+ * summaries feed that could only answer "the last N for these cameras"
20430
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20431
+ * else. Two feeds with different ordering contracts would be two ideas of what
20432
+ * "newest" means, on one screen.
20433
+ */
20434
+ var RecentSummariesQueryInput = object({
20435
+ /** Devices to merge. An empty array yields an empty page. */
20436
+ deviceIds: array(number()),
20437
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20438
+ since: number().optional(),
20439
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20440
+ until: number().optional(),
20441
+ limit: number().int().min(1).max(500).default(100),
20442
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20443
+ cursor: string().optional(),
20444
+ /**
20445
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20446
+ * deliberately the same name: the events filter tree emits one list of ticked
20447
+ * taxonomy nodes, and a summaries feed that called it something else would
20448
+ * make the operator's one filter component produce two shapes.
20449
+ *
20450
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20451
+ * me the arrivals with a dog" has to return the group of four people who had
20452
+ * one with them; a filter on the group's own fields could only ever answer
20453
+ * about its primary.
20454
+ *
20455
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20456
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20457
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20458
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20459
+ * that read only the class would answer "animal" and never "dog".
20460
+ *
20461
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20462
+ */
20463
+ classes: array(string().min(1).max(60)).max(40).optional()
20464
+ });
20465
+ var RecentSummariesPageSchema = object({
20466
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20467
+ * {@link listSummaries} — one list shape, so a card renders the same
20468
+ * whichever feed drew it. */
20469
+ summaries: array(SummaryListItemSchema).readonly(),
20470
+ nextCursor: string().nullable()
20215
20471
  });
20216
20472
  var RecentTracksPageSchema = object({
20217
20473
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20625,7 +20881,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20625
20881
  classes: array(string()).optional(),
20626
20882
  /** See {@link ExcludeSourcesDoc}. */
20627
20883
  excludeSources: array(TrackSourceSchema).optional()
20628
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20884
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20629
20885
  kind: "mutation",
20630
20886
  auth: "admin"
20631
20887
  }), 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({
@@ -23954,10 +24210,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23954
24210
  }), boolean()), method(object({
23955
24211
  deviceId: number().int().nonnegative(),
23956
24212
  sessionId: string()
23957
- }), object({ pendingRenegotiation: object({
23958
- target: WebrtcStreamTargetSchema,
23959
- epoch: number()
23960
- }).nullable() }));
24213
+ }), object({
24214
+ pendingRenegotiation: object({
24215
+ target: WebrtcStreamTargetSchema,
24216
+ epoch: number()
24217
+ }).nullable(),
24218
+ /**
24219
+ * Whether the session still EXISTS.
24220
+ *
24221
+ * A consumer that holds a resource for the life of a session needs to
24222
+ * be able to ask, because a session does not always end the way it
24223
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24224
+ * sent `SessionDisconnected`, so the Alexa exporter's
24225
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24226
+ * H.264 transcode kept running for NOBODY for more than twenty
24227
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24228
+ * minutes earlier — the broker knew; the holder had no way to ask.
24229
+ *
24230
+ * `false` for a session id the provider has never heard of, which is
24231
+ * the same answer as "it ended": either way nothing is holding it up.
24232
+ */
24233
+ alive: boolean()
24234
+ }));
23961
24235
  object({
23962
24236
  /** All accessory children of the parent. */
23963
24237
  childDeviceIds: array(number()).readonly(),
@@ -32378,7 +32652,29 @@ var LoggingSettingsPatchSchema = object({
32378
32652
  * disarmed the channels it did not mention would make the Levels page and
32379
32653
  * the Diagnostics page fight over the same value.
32380
32654
  */
32381
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32655
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32656
+ /**
32657
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32658
+ * retention actually deleted.
32659
+ *
32660
+ * It lives HERE, on the logging document, and not on the analytics addon's
32661
+ * settings form, on the operator's instruction: every other log-ish window in
32662
+ * this system is configured through this one document, and a retention audit
32663
+ * configured somewhere else is a second place to look when the question is
32664
+ * "what happened to my data".
32665
+ *
32666
+ * That placement has a cost worth stating: this document ships in the
32667
+ * framework closure, so this knob needs a published `@camstack/server` while
32668
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32669
+ *
32670
+ * `retention-model.ts` argued this one must NOT follow a device window,
32671
+ * because the audit trail is the history of the SWEEP and not of the camera.
32672
+ * That argument stands and is untouched — what changes is that 30 days stops
32673
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32674
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32675
+ * state in which the next 9.5 GiB leak cannot be explained.
32676
+ */
32677
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32382
32678
  });
32383
32679
  /**
32384
32680
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32451,6 +32747,14 @@ var LoggingSettingsStateSchema = object({
32451
32747
  channels: array(LogChannelDescriptorSchema).readonly(),
32452
32748
  /** The channels ARMED right now, each with its deadline. */
32453
32749
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32750
+ /**
32751
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32752
+ *
32753
+ * Reported rather than left to the caller's memory of what it wrote: this is
32754
+ * the value the analytics sweep will actually use, and an operator asking how
32755
+ * long their audit trail lives should not have to infer it from a default.
32756
+ */
32757
+ opsLogRetentionDays: number().int().min(0),
32454
32758
  persisted: boolean()
32455
32759
  });
32456
32760
  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(), {
@@ -33846,6 +34150,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33846
34150
  smoke: smokeCapability,
33847
34151
  streamCatalog: streamCatalogCapability,
33848
34152
  streamParams: streamParamsCapability,
34153
+ streamSignals: streamSignalsCapability,
33849
34154
  switch: switchCapability,
33850
34155
  tamper: tamperCapability,
33851
34156
  temperatureSensor: temperatureSensorCapability,
@@ -38451,6 +38756,12 @@ Object.freeze({
38451
38756
  addonId: null,
38452
38757
  access: "view"
38453
38758
  },
38759
+ "pipelineAnalytics.listRecentSummaries": {
38760
+ capName: "pipeline-analytics",
38761
+ capScope: "device",
38762
+ addonId: null,
38763
+ access: "view"
38764
+ },
38454
38765
  "pipelineAnalytics.listRecentTracks": {
38455
38766
  capName: "pipeline-analytics",
38456
38767
  capScope: "device",
@@ -40413,6 +40724,12 @@ Object.freeze({
40413
40724
  addonId: null,
40414
40725
  access: "create"
40415
40726
  },
40727
+ "streamBroker.reportStreamSignal": {
40728
+ capName: "stream-broker",
40729
+ capScope: "system",
40730
+ addonId: null,
40731
+ access: "create"
40732
+ },
40416
40733
  "streamBroker.restartProfile": {
40417
40734
  capName: "stream-broker",
40418
40735
  capScope: "system",
@@ -40497,6 +40814,12 @@ Object.freeze({
40497
40814
  addonId: null,
40498
40815
  access: "create"
40499
40816
  },
40817
+ "streamSignals.listSignals": {
40818
+ capName: "stream-signals",
40819
+ capScope: "device",
40820
+ addonId: null,
40821
+ access: "view"
40822
+ },
40500
40823
  "switch.setState": {
40501
40824
  capName: "switch",
40502
40825
  capScope: "device",
@@ -42278,6 +42601,11 @@ Object.freeze({
42278
42601
  form: "single",
42279
42602
  optional: true
42280
42603
  }],
42604
+ "pipelineAnalytics.listRecentSummaries": [{
42605
+ name: "deviceIds",
42606
+ form: "array",
42607
+ optional: false
42608
+ }],
42281
42609
  "pipelineAnalytics.listRecentTracks": [{
42282
42610
  name: "deviceIds",
42283
42611
  form: "array",
@@ -42864,6 +43192,11 @@ Object.freeze({
42864
43192
  form: "single",
42865
43193
  optional: false
42866
43194
  }],
43195
+ "streamBroker.reportStreamSignal": [{
43196
+ name: "deviceId",
43197
+ form: "single",
43198
+ optional: false
43199
+ }],
42867
43200
  "streamBroker.restartProfile": [{
42868
43201
  name: "deviceId",
42869
43202
  form: "single",
package/dist/addon.mjs CHANGED
@@ -9,7 +9,7 @@ import { join } from "path";
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
11
  //#endregion
12
- //#region ../types/dist/event-category-ZyX6jcse.mjs
12
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
13
13
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  EventCategory["SystemBoot"] = "system.boot";
15
15
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -626,6 +626,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
626
626
  * pull-reconcile from the provider's `getStatus` on reconnect. */
627
627
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
628
628
  EventCategory["BackupCompleted"] = "backup.completed";
629
+ /**
630
+ * A whole backup RUN finished — every destination attempted, win or lose.
631
+ *
632
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
633
+ * a progress UI and the wrong one for a notification: an operator with three
634
+ * destinations would be told three times. And a run where two of three
635
+ * destinations succeeded is not a clean success — a single "backup
636
+ * completed" that hid the failed one would be a lie, so the count of each is
637
+ * carried here and the message says both.
638
+ *
639
+ * Emitted by the backup orchestrator only after the destination loop, so a
640
+ * run that dies during the BUILD phase produces no completion at all.
641
+ */
642
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
629
643
  EventCategory["BackupRestored"] = "backup.restored";
630
644
  EventCategory["NotificationDispatched"] = "notification.dispatched";
631
645
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5356,7 +5370,7 @@ var ZodIssueCode = {
5356
5370
  var ZodFirstPartyTypeKind;
5357
5371
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5358
5372
  //#endregion
5359
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5373
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5360
5374
  /**
5361
5375
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5362
5376
  * window to float samples (D455).
@@ -7385,7 +7399,23 @@ var EncodeProfileSchema = object({
7385
7399
  "zerolatency",
7386
7400
  "film",
7387
7401
  "animation"
7388
- ]).optional()
7402
+ ]).optional(),
7403
+ /**
7404
+ * ONE slice per access unit.
7405
+ *
7406
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7407
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7408
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7409
+ * frame-end per frame: the first pictures render and the video then freezes
7410
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7411
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7412
+ *
7413
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7414
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7415
+ * consumers meaning the same thing spelled differently would stop sharing one
7416
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7417
+ */
7418
+ singleSlicePerFrame: boolean().optional()
7389
7419
  }),
7390
7420
  audio: union([literal("passthrough"), object({
7391
7421
  codec: _enum([
@@ -7435,7 +7465,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7435
7465
  audio: "passthrough"
7436
7466
  };
7437
7467
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7438
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7468
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7439
7469
  /**
7440
7470
  * Deep wiring healthcheck — snapshot of active reachability probes across
7441
7471
  * every declared capability + widget of every installed plugin, on every
@@ -11533,6 +11563,72 @@ var brokerCapability = {
11533
11563
  }
11534
11564
  };
11535
11565
  DeviceType.Camera;
11566
+ /**
11567
+ * The signals a device can emit to WAKE its own stream.
11568
+ *
11569
+ * A camera whose stream is built on demand sleeps until something asks for it,
11570
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11571
+ * puller holds a session open for ever, and treating that as demand would keep
11572
+ * a battery camera awake for ever, which is the whole thing the battery is for
11573
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11574
+ * itself, with no stream running.
11575
+ *
11576
+ * ## The vocabulary is the PROVIDER'S, not ours
11577
+ *
11578
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11579
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11580
+ * Reolink offers motion and camera-native detection; another provider may offer
11581
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11582
+ * yet. A fixed enum here would mean every new signal is a framework release.
11583
+ *
11584
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11585
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11586
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11587
+ * binding — but both answer "what drives the detection pipeline", which is a
11588
+ * different question from "what may wake a sleeping stream". A camera can do
11589
+ * the first and not be trusted with the second, and the operator picks per
11590
+ * camera. Two questions, two authorities.
11591
+ *
11592
+ * ## Availability is not permission
11593
+ *
11594
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11595
+ * wakes the stream is the operator's per-camera choice, held by the broker
11596
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11597
+ * provider declaring a signal is not a provider enabling it.
11598
+ */
11599
+ /** One signal a device can emit. */
11600
+ var StreamSignalSchema = object({
11601
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11602
+ code: string().min(1),
11603
+ /** What an operator reads in the picker. The provider's own wording. */
11604
+ label: string().min(1),
11605
+ /**
11606
+ * Whether the provider recommends this signal ON when a camera is first set
11607
+ * up. A provider knows which of its signals are cheap and reliable; an
11608
+ * operator should not have to discover that by trial. Reolink recommends
11609
+ * both of its own.
11610
+ */
11611
+ recommended: boolean()
11612
+ });
11613
+ var StreamSignalsStatusSchema = object({
11614
+ signals: array(StreamSignalSchema),
11615
+ lastFetchedAt: number()
11616
+ });
11617
+ var streamSignalsCapability = {
11618
+ name: "stream-signals",
11619
+ scope: "device",
11620
+ deviceNative: true,
11621
+ mode: "singleton",
11622
+ deviceTypes: Object.values(DeviceType),
11623
+ runtimeState: StreamSignalsStatusSchema,
11624
+ methods: {
11625
+ /**
11626
+ * What this device can emit. Empty is a valid and common answer — most
11627
+ * cameras have nothing to offer here, and an empty list is what makes the
11628
+ * broker's picker show nothing rather than a false choice.
11629
+ */
11630
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11631
+ };
11536
11632
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11537
11633
  var StreamFormatSchema = _enum([
11538
11634
  "webrtc",
@@ -11929,6 +12025,22 @@ var EgressTranscodeSchema = object({
11929
12025
  camStreamId: string().nullable()
11930
12026
  });
11931
12027
  method(object({
12028
+ deviceId: number().int().nonnegative(),
12029
+ /** The provider's signal code. */
12030
+ code: string().min(1),
12031
+ /** Ms epoch. Absent ⇒ now. */
12032
+ at: number().optional()
12033
+ }), object({
12034
+ /** Whether the broker acted on it, and if not, why. */
12035
+ accepted: boolean(),
12036
+ reason: _enum([
12037
+ "woke",
12038
+ "hold-extended",
12039
+ "not-enabled",
12040
+ "no-consumer",
12041
+ "unknown-code"
12042
+ ])
12043
+ }), { kind: "mutation" }), method(object({
11932
12044
  deviceId: number().int().nonnegative(),
11933
12045
  camStreamId: string().min(1),
11934
12046
  kind: CamStreamKindSchema,
@@ -12183,6 +12295,16 @@ var PickStreamRequirementsSchema = object({
12183
12295
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12184
12296
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12185
12297
  minHeight: number().int().positive().optional(),
12298
+ /**
12299
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12300
+ *
12301
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12302
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12303
+ * Without this the ceiling had to be re-implemented by every caller — and
12304
+ * one caller implementing it privately is how a second scoring authority
12305
+ * gets born.
12306
+ */
12307
+ maxHeight: number().int().positive().optional(),
12186
12308
  /** Minimum horizontal resolution. */
12187
12309
  minWidth: number().int().positive().optional(),
12188
12310
  /**
@@ -12199,7 +12321,22 @@ var PickStreamRequirementsSchema = object({
12199
12321
  * transcoded" guard: if the device is already serving the consumer's
12200
12322
  * codec end-to-end, there's nothing to optimise.
12201
12323
  */
12202
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12324
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12325
+ /**
12326
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12327
+ * understanding that it will be transcoded.
12328
+ *
12329
+ * Default `false` — today's behaviour, and the right one for a bypass
12330
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12331
+ * ask the larger question: "what is the best stream for me, transcoding if
12332
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12333
+ * does not, so a passthrough is never lost to a transcode; the answer says
12334
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12335
+ *
12336
+ * This is what lets one picker serve both the bypass and the full source
12337
+ * choice, instead of a consumer scoring privately when the bypass misses.
12338
+ */
12339
+ allowTranscode: boolean().optional()
12203
12340
  }).readonly();
12204
12341
  var PickStreamPreferencesSchema = object({
12205
12342
  /**
@@ -12213,12 +12350,32 @@ var PickStreamPreferencesSchema = object({
12213
12350
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12214
12351
  * memory-constrained consumers / Apple Home guest sessions).
12215
12352
  */
12216
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12353
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12354
+ /**
12355
+ * The height the consumer actually wants to DELIVER.
12356
+ *
12357
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12358
+ * above the target wins, and only if nothing reaches it does the tallest
12359
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12360
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12361
+ * express that: it says "as big as possible", which is a different wish.
12362
+ *
12363
+ * Ignored when absent, so every existing caller keeps its ordering.
12364
+ */
12365
+ targetHeight: number().int().positive().optional()
12217
12366
  }).readonly();
12218
12367
  var PickedCamStreamSchema = object({
12219
12368
  camStreamId: string(),
12220
12369
  codec: string().optional(),
12221
12370
  resolution: CamStreamResolutionSchema.optional(),
12371
+ /**
12372
+ * Whether serving this stream requires a decode + re-encode.
12373
+ *
12374
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12375
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12376
+ * not ask cannot be handed a cost it never agreed to pay.
12377
+ */
12378
+ transcodes: boolean(),
12222
12379
  /** One-line explanation of why this stream won — for logs / debug UI. */
12223
12380
  reason: string()
12224
12381
  });
@@ -16752,6 +16909,8 @@ var NcSystemEventKindSchema = _enum([
16752
16909
  "device-enabled",
16753
16910
  "device-battery-low",
16754
16911
  "device-battery-normal",
16912
+ "device-consumable-low",
16913
+ "device-consumable-normal",
16755
16914
  "stream-online",
16756
16915
  "stream-offline",
16757
16916
  "node-online",
@@ -16770,6 +16929,7 @@ var NcSystemEventKindSchema = _enum([
16770
16929
  "addon-updated",
16771
16930
  "server-updated",
16772
16931
  "export-completed",
16932
+ "backup-completed",
16773
16933
  "camera-online",
16774
16934
  "camera-offline",
16775
16935
  "camera-disabled",
@@ -20206,13 +20366,109 @@ var SummariesQueryInput = object({
20206
20366
  deviceIds: array(number()).min(1),
20207
20367
  since: number().optional(),
20208
20368
  until: number().optional(),
20209
- limit: number().int().min(1).max(200).default(50)
20369
+ limit: number().int().min(1).max(200).default(50),
20370
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20371
+ * meaning of "dog" on every summary surface. */
20372
+ classes: array(string().min(1).max(60)).max(40).optional()
20210
20373
  });
20211
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20212
20374
  var SummaryDetailSchema = object({
20213
20375
  summary: SummarySchema,
20214
- /** Member track ids, in absorption order. */
20215
- trackIds: array(string()).readonly()
20376
+ /** Members in absorption order, oldest join first. */
20377
+ members: array(object({
20378
+ trackId: string(),
20379
+ /**
20380
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20381
+ * and the track no longer exists to fill it.
20382
+ *
20383
+ * The join, not the latest opinion: class voting can re-decide a track's
20384
+ * class afterwards, and a group's composition is the history of who came
20385
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20386
+ * dog" — rather than being handed a second, denormalised tally that would
20387
+ * drift from the members it claims to describe.
20388
+ */
20389
+ className: string().nullable(),
20390
+ /** `primary` is the one member that carries the group's identity. */
20391
+ role: _enum([
20392
+ "primary",
20393
+ "sibling",
20394
+ "child"
20395
+ ]).nullable(),
20396
+ joinedAt: number(),
20397
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20398
+ * at read time. Absent when nothing resolved, never an empty string. */
20399
+ label: string().optional(),
20400
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20401
+ * recognised nobody, and absent for a member whose track has been pruned —
20402
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20403
+ subLabel: string().optional()
20404
+ })).readonly()
20405
+ });
20406
+ /**
20407
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20408
+ *
20409
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20410
+ * we extend when we notice we need more". Enough to draw the card ("two people
20411
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20412
+ * are on {@link getSummary}: shipping every member of every group so a client
20413
+ * can count them turns a page of two hundred groups into a thousand records to
20414
+ * draw two hundred badges.
20415
+ */
20416
+ var SummaryListItemSchema = object({
20417
+ summary: SummarySchema,
20418
+ /** Class counts, most numerous first; `className: null` is a member whose
20419
+ * class never resolved, counted so the counts add up to `memberCount`. */
20420
+ classes: array(object({
20421
+ className: string().nullable(),
20422
+ count: number().int().positive()
20423
+ })).readonly()
20424
+ });
20425
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20426
+ /**
20427
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20428
+ *
20429
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20430
+ * summaries feed that could only answer "the last N for these cameras"
20431
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20432
+ * else. Two feeds with different ordering contracts would be two ideas of what
20433
+ * "newest" means, on one screen.
20434
+ */
20435
+ var RecentSummariesQueryInput = object({
20436
+ /** Devices to merge. An empty array yields an empty page. */
20437
+ deviceIds: array(number()),
20438
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20439
+ since: number().optional(),
20440
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20441
+ until: number().optional(),
20442
+ limit: number().int().min(1).max(500).default(100),
20443
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20444
+ cursor: string().optional(),
20445
+ /**
20446
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20447
+ * deliberately the same name: the events filter tree emits one list of ticked
20448
+ * taxonomy nodes, and a summaries feed that called it something else would
20449
+ * make the operator's one filter component produce two shapes.
20450
+ *
20451
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20452
+ * me the arrivals with a dog" has to return the group of four people who had
20453
+ * one with them; a filter on the group's own fields could only ever answer
20454
+ * about its primary.
20455
+ *
20456
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20457
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20458
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20459
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20460
+ * that read only the class would answer "animal" and never "dog".
20461
+ *
20462
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20463
+ */
20464
+ classes: array(string().min(1).max(60)).max(40).optional()
20465
+ });
20466
+ var RecentSummariesPageSchema = object({
20467
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20468
+ * {@link listSummaries} — one list shape, so a card renders the same
20469
+ * whichever feed drew it. */
20470
+ summaries: array(SummaryListItemSchema).readonly(),
20471
+ nextCursor: string().nullable()
20216
20472
  });
20217
20473
  var RecentTracksPageSchema = object({
20218
20474
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20626,7 +20882,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20626
20882
  classes: array(string()).optional(),
20627
20883
  /** See {@link ExcludeSourcesDoc}. */
20628
20884
  excludeSources: array(TrackSourceSchema).optional()
20629
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20885
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20630
20886
  kind: "mutation",
20631
20887
  auth: "admin"
20632
20888
  }), 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({
@@ -23955,10 +24211,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23955
24211
  }), boolean()), method(object({
23956
24212
  deviceId: number().int().nonnegative(),
23957
24213
  sessionId: string()
23958
- }), object({ pendingRenegotiation: object({
23959
- target: WebrtcStreamTargetSchema,
23960
- epoch: number()
23961
- }).nullable() }));
24214
+ }), object({
24215
+ pendingRenegotiation: object({
24216
+ target: WebrtcStreamTargetSchema,
24217
+ epoch: number()
24218
+ }).nullable(),
24219
+ /**
24220
+ * Whether the session still EXISTS.
24221
+ *
24222
+ * A consumer that holds a resource for the life of a session needs to
24223
+ * be able to ask, because a session does not always end the way it
24224
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24225
+ * sent `SessionDisconnected`, so the Alexa exporter's
24226
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24227
+ * H.264 transcode kept running for NOBODY for more than twenty
24228
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24229
+ * minutes earlier — the broker knew; the holder had no way to ask.
24230
+ *
24231
+ * `false` for a session id the provider has never heard of, which is
24232
+ * the same answer as "it ended": either way nothing is holding it up.
24233
+ */
24234
+ alive: boolean()
24235
+ }));
23962
24236
  object({
23963
24237
  /** All accessory children of the parent. */
23964
24238
  childDeviceIds: array(number()).readonly(),
@@ -32379,7 +32653,29 @@ var LoggingSettingsPatchSchema = object({
32379
32653
  * disarmed the channels it did not mention would make the Levels page and
32380
32654
  * the Diagnostics page fight over the same value.
32381
32655
  */
32382
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32656
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32657
+ /**
32658
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32659
+ * retention actually deleted.
32660
+ *
32661
+ * It lives HERE, on the logging document, and not on the analytics addon's
32662
+ * settings form, on the operator's instruction: every other log-ish window in
32663
+ * this system is configured through this one document, and a retention audit
32664
+ * configured somewhere else is a second place to look when the question is
32665
+ * "what happened to my data".
32666
+ *
32667
+ * That placement has a cost worth stating: this document ships in the
32668
+ * framework closure, so this knob needs a published `@camstack/server` while
32669
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32670
+ *
32671
+ * `retention-model.ts` argued this one must NOT follow a device window,
32672
+ * because the audit trail is the history of the SWEEP and not of the camera.
32673
+ * That argument stands and is untouched — what changes is that 30 days stops
32674
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32675
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32676
+ * state in which the next 9.5 GiB leak cannot be explained.
32677
+ */
32678
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32383
32679
  });
32384
32680
  /**
32385
32681
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32452,6 +32748,14 @@ var LoggingSettingsStateSchema = object({
32452
32748
  channels: array(LogChannelDescriptorSchema).readonly(),
32453
32749
  /** The channels ARMED right now, each with its deadline. */
32454
32750
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32751
+ /**
32752
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32753
+ *
32754
+ * Reported rather than left to the caller's memory of what it wrote: this is
32755
+ * the value the analytics sweep will actually use, and an operator asking how
32756
+ * long their audit trail lives should not have to infer it from a default.
32757
+ */
32758
+ opsLogRetentionDays: number().int().min(0),
32455
32759
  persisted: boolean()
32456
32760
  });
32457
32761
  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(), {
@@ -33847,6 +34151,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33847
34151
  smoke: smokeCapability,
33848
34152
  streamCatalog: streamCatalogCapability,
33849
34153
  streamParams: streamParamsCapability,
34154
+ streamSignals: streamSignalsCapability,
33850
34155
  switch: switchCapability,
33851
34156
  tamper: tamperCapability,
33852
34157
  temperatureSensor: temperatureSensorCapability,
@@ -38452,6 +38757,12 @@ Object.freeze({
38452
38757
  addonId: null,
38453
38758
  access: "view"
38454
38759
  },
38760
+ "pipelineAnalytics.listRecentSummaries": {
38761
+ capName: "pipeline-analytics",
38762
+ capScope: "device",
38763
+ addonId: null,
38764
+ access: "view"
38765
+ },
38455
38766
  "pipelineAnalytics.listRecentTracks": {
38456
38767
  capName: "pipeline-analytics",
38457
38768
  capScope: "device",
@@ -40414,6 +40725,12 @@ Object.freeze({
40414
40725
  addonId: null,
40415
40726
  access: "create"
40416
40727
  },
40728
+ "streamBroker.reportStreamSignal": {
40729
+ capName: "stream-broker",
40730
+ capScope: "system",
40731
+ addonId: null,
40732
+ access: "create"
40733
+ },
40417
40734
  "streamBroker.restartProfile": {
40418
40735
  capName: "stream-broker",
40419
40736
  capScope: "system",
@@ -40498,6 +40815,12 @@ Object.freeze({
40498
40815
  addonId: null,
40499
40816
  access: "create"
40500
40817
  },
40818
+ "streamSignals.listSignals": {
40819
+ capName: "stream-signals",
40820
+ capScope: "device",
40821
+ addonId: null,
40822
+ access: "view"
40823
+ },
40501
40824
  "switch.setState": {
40502
40825
  capName: "switch",
40503
40826
  capScope: "device",
@@ -42279,6 +42602,11 @@ Object.freeze({
42279
42602
  form: "single",
42280
42603
  optional: true
42281
42604
  }],
42605
+ "pipelineAnalytics.listRecentSummaries": [{
42606
+ name: "deviceIds",
42607
+ form: "array",
42608
+ optional: false
42609
+ }],
42282
42610
  "pipelineAnalytics.listRecentTracks": [{
42283
42611
  name: "deviceIds",
42284
42612
  form: "array",
@@ -42865,6 +43193,11 @@ Object.freeze({
42865
43193
  form: "single",
42866
43194
  optional: false
42867
43195
  }],
43196
+ "streamBroker.reportStreamSignal": [{
43197
+ name: "deviceId",
43198
+ form: "single",
43199
+ optional: false
43200
+ }],
42868
43201
  "streamBroker.restartProfile": [{
42869
43202
  name: "deviceId",
42870
43203
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.2.101",
3
+ "version": "1.2.103",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",