@camstack/addon-provider-wyze 0.2.104 → 0.2.106

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
@@ -31,7 +31,7 @@ let net = require("net");
31
31
  net = __toESM(net, 1);
32
32
  let node_child_process = require("node:child_process");
33
33
  let node_tls = require("node:tls");
34
- //#region ../types/dist/event-category-ZyX6jcse.mjs
34
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
35
35
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
36
36
  EventCategory["SystemBoot"] = "system.boot";
37
37
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -648,6 +648,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
648
648
  * pull-reconcile from the provider's `getStatus` on reconnect. */
649
649
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
650
650
  EventCategory["BackupCompleted"] = "backup.completed";
651
+ /**
652
+ * A whole backup RUN finished — every destination attempted, win or lose.
653
+ *
654
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
655
+ * a progress UI and the wrong one for a notification: an operator with three
656
+ * destinations would be told three times. And a run where two of three
657
+ * destinations succeeded is not a clean success — a single "backup
658
+ * completed" that hid the failed one would be a lie, so the count of each is
659
+ * carried here and the message says both.
660
+ *
661
+ * Emitted by the backup orchestrator only after the destination loop, so a
662
+ * run that dies during the BUILD phase produces no completion at all.
663
+ */
664
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
651
665
  EventCategory["BackupRestored"] = "backup.restored";
652
666
  EventCategory["NotificationDispatched"] = "notification.dispatched";
653
667
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5378,7 +5392,7 @@ var ZodIssueCode = {
5378
5392
  var ZodFirstPartyTypeKind;
5379
5393
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5380
5394
  //#endregion
5381
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5395
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5382
5396
  /**
5383
5397
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5384
5398
  * window to float samples (D455).
@@ -7407,7 +7421,23 @@ var EncodeProfileSchema = object({
7407
7421
  "zerolatency",
7408
7422
  "film",
7409
7423
  "animation"
7410
- ]).optional()
7424
+ ]).optional(),
7425
+ /**
7426
+ * ONE slice per access unit.
7427
+ *
7428
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7429
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7430
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7431
+ * frame-end per frame: the first pictures render and the video then freezes
7432
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7433
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7434
+ *
7435
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7436
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7437
+ * consumers meaning the same thing spelled differently would stop sharing one
7438
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7439
+ */
7440
+ singleSlicePerFrame: boolean().optional()
7411
7441
  }),
7412
7442
  audio: union([literal("passthrough"), object({
7413
7443
  codec: _enum([
@@ -7457,7 +7487,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7457
7487
  audio: "passthrough"
7458
7488
  };
7459
7489
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7460
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7490
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7461
7491
  /**
7462
7492
  * Deep wiring healthcheck — snapshot of active reachability probes across
7463
7493
  * every declared capability + widget of every installed plugin, on every
@@ -11506,6 +11536,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11506
11536
  auth: "admin"
11507
11537
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11508
11538
  DeviceType.Camera;
11539
+ /**
11540
+ * The signals a device can emit to WAKE its own stream.
11541
+ *
11542
+ * A camera whose stream is built on demand sleeps until something asks for it,
11543
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11544
+ * puller holds a session open for ever, and treating that as demand would keep
11545
+ * a battery camera awake for ever, which is the whole thing the battery is for
11546
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11547
+ * itself, with no stream running.
11548
+ *
11549
+ * ## The vocabulary is the PROVIDER'S, not ours
11550
+ *
11551
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11552
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11553
+ * Reolink offers motion and camera-native detection; another provider may offer
11554
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11555
+ * yet. A fixed enum here would mean every new signal is a framework release.
11556
+ *
11557
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11558
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11559
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11560
+ * binding — but both answer "what drives the detection pipeline", which is a
11561
+ * different question from "what may wake a sleeping stream". A camera can do
11562
+ * the first and not be trusted with the second, and the operator picks per
11563
+ * camera. Two questions, two authorities.
11564
+ *
11565
+ * ## Availability is not permission
11566
+ *
11567
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11568
+ * wakes the stream is the operator's per-camera choice, held by the broker
11569
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11570
+ * provider declaring a signal is not a provider enabling it.
11571
+ */
11572
+ /** One signal a device can emit. */
11573
+ var StreamSignalSchema = object({
11574
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11575
+ code: string().min(1),
11576
+ /** What an operator reads in the picker. The provider's own wording. */
11577
+ label: string().min(1),
11578
+ /**
11579
+ * Whether the provider recommends this signal ON when a camera is first set
11580
+ * up. A provider knows which of its signals are cheap and reliable; an
11581
+ * operator should not have to discover that by trial. Reolink recommends
11582
+ * both of its own.
11583
+ */
11584
+ recommended: boolean()
11585
+ });
11586
+ var StreamSignalsStatusSchema = object({
11587
+ signals: array(StreamSignalSchema),
11588
+ lastFetchedAt: number()
11589
+ });
11590
+ var streamSignalsCapability = {
11591
+ name: "stream-signals",
11592
+ scope: "device",
11593
+ deviceNative: true,
11594
+ mode: "singleton",
11595
+ deviceTypes: Object.values(DeviceType),
11596
+ runtimeState: StreamSignalsStatusSchema,
11597
+ methods: {
11598
+ /**
11599
+ * What this device can emit. Empty is a valid and common answer — most
11600
+ * cameras have nothing to offer here, and an empty list is what makes the
11601
+ * broker's picker show nothing rather than a false choice.
11602
+ */
11603
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11604
+ };
11509
11605
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11510
11606
  var StreamFormatSchema = _enum([
11511
11607
  "webrtc",
@@ -11902,6 +11998,22 @@ var EgressTranscodeSchema = object({
11902
11998
  camStreamId: string().nullable()
11903
11999
  });
11904
12000
  method(object({
12001
+ deviceId: number().int().nonnegative(),
12002
+ /** The provider's signal code. */
12003
+ code: string().min(1),
12004
+ /** Ms epoch. Absent ⇒ now. */
12005
+ at: number().optional()
12006
+ }), object({
12007
+ /** Whether the broker acted on it, and if not, why. */
12008
+ accepted: boolean(),
12009
+ reason: _enum([
12010
+ "woke",
12011
+ "hold-extended",
12012
+ "not-enabled",
12013
+ "no-consumer",
12014
+ "unknown-code"
12015
+ ])
12016
+ }), { kind: "mutation" }), method(object({
11905
12017
  deviceId: number().int().nonnegative(),
11906
12018
  camStreamId: string().min(1),
11907
12019
  kind: CamStreamKindSchema,
@@ -12156,6 +12268,16 @@ var PickStreamRequirementsSchema = object({
12156
12268
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12157
12269
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12158
12270
  minHeight: number().int().positive().optional(),
12271
+ /**
12272
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12273
+ *
12274
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12275
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12276
+ * Without this the ceiling had to be re-implemented by every caller — and
12277
+ * one caller implementing it privately is how a second scoring authority
12278
+ * gets born.
12279
+ */
12280
+ maxHeight: number().int().positive().optional(),
12159
12281
  /** Minimum horizontal resolution. */
12160
12282
  minWidth: number().int().positive().optional(),
12161
12283
  /**
@@ -12172,7 +12294,22 @@ var PickStreamRequirementsSchema = object({
12172
12294
  * transcoded" guard: if the device is already serving the consumer's
12173
12295
  * codec end-to-end, there's nothing to optimise.
12174
12296
  */
12175
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12297
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12298
+ /**
12299
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12300
+ * understanding that it will be transcoded.
12301
+ *
12302
+ * Default `false` — today's behaviour, and the right one for a bypass
12303
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12304
+ * ask the larger question: "what is the best stream for me, transcoding if
12305
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12306
+ * does not, so a passthrough is never lost to a transcode; the answer says
12307
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12308
+ *
12309
+ * This is what lets one picker serve both the bypass and the full source
12310
+ * choice, instead of a consumer scoring privately when the bypass misses.
12311
+ */
12312
+ allowTranscode: boolean().optional()
12176
12313
  }).readonly();
12177
12314
  var PickStreamPreferencesSchema = object({
12178
12315
  /**
@@ -12186,12 +12323,32 @@ var PickStreamPreferencesSchema = object({
12186
12323
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12187
12324
  * memory-constrained consumers / Apple Home guest sessions).
12188
12325
  */
12189
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12326
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12327
+ /**
12328
+ * The height the consumer actually wants to DELIVER.
12329
+ *
12330
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12331
+ * above the target wins, and only if nothing reaches it does the tallest
12332
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12333
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12334
+ * express that: it says "as big as possible", which is a different wish.
12335
+ *
12336
+ * Ignored when absent, so every existing caller keeps its ordering.
12337
+ */
12338
+ targetHeight: number().int().positive().optional()
12190
12339
  }).readonly();
12191
12340
  var PickedCamStreamSchema = object({
12192
12341
  camStreamId: string(),
12193
12342
  codec: string().optional(),
12194
12343
  resolution: CamStreamResolutionSchema.optional(),
12344
+ /**
12345
+ * Whether serving this stream requires a decode + re-encode.
12346
+ *
12347
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12348
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12349
+ * not ask cannot be handed a cost it never agreed to pay.
12350
+ */
12351
+ transcodes: boolean(),
12195
12352
  /** One-line explanation of why this stream won — for logs / debug UI. */
12196
12353
  reason: string()
12197
12354
  });
@@ -16725,6 +16882,8 @@ var NcSystemEventKindSchema = _enum([
16725
16882
  "device-enabled",
16726
16883
  "device-battery-low",
16727
16884
  "device-battery-normal",
16885
+ "device-consumable-low",
16886
+ "device-consumable-normal",
16728
16887
  "stream-online",
16729
16888
  "stream-offline",
16730
16889
  "node-online",
@@ -16743,6 +16902,7 @@ var NcSystemEventKindSchema = _enum([
16743
16902
  "addon-updated",
16744
16903
  "server-updated",
16745
16904
  "export-completed",
16905
+ "backup-completed",
16746
16906
  "camera-online",
16747
16907
  "camera-offline",
16748
16908
  "camera-disabled",
@@ -20179,13 +20339,109 @@ var SummariesQueryInput = object({
20179
20339
  deviceIds: array(number()).min(1),
20180
20340
  since: number().optional(),
20181
20341
  until: number().optional(),
20182
- limit: number().int().min(1).max(200).default(50)
20342
+ limit: number().int().min(1).max(200).default(50),
20343
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20344
+ * meaning of "dog" on every summary surface. */
20345
+ classes: array(string().min(1).max(60)).max(40).optional()
20183
20346
  });
20184
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20185
20347
  var SummaryDetailSchema = object({
20186
20348
  summary: SummarySchema,
20187
- /** Member track ids, in absorption order. */
20188
- trackIds: array(string()).readonly()
20349
+ /** Members in absorption order, oldest join first. */
20350
+ members: array(object({
20351
+ trackId: string(),
20352
+ /**
20353
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20354
+ * and the track no longer exists to fill it.
20355
+ *
20356
+ * The join, not the latest opinion: class voting can re-decide a track's
20357
+ * class afterwards, and a group's composition is the history of who came
20358
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20359
+ * dog" — rather than being handed a second, denormalised tally that would
20360
+ * drift from the members it claims to describe.
20361
+ */
20362
+ className: string().nullable(),
20363
+ /** `primary` is the one member that carries the group's identity. */
20364
+ role: _enum([
20365
+ "primary",
20366
+ "sibling",
20367
+ "child"
20368
+ ]).nullable(),
20369
+ joinedAt: number(),
20370
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20371
+ * at read time. Absent when nothing resolved, never an empty string. */
20372
+ label: string().optional(),
20373
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20374
+ * recognised nobody, and absent for a member whose track has been pruned —
20375
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20376
+ subLabel: string().optional()
20377
+ })).readonly()
20378
+ });
20379
+ /**
20380
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20381
+ *
20382
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20383
+ * we extend when we notice we need more". Enough to draw the card ("two people
20384
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20385
+ * are on {@link getSummary}: shipping every member of every group so a client
20386
+ * can count them turns a page of two hundred groups into a thousand records to
20387
+ * draw two hundred badges.
20388
+ */
20389
+ var SummaryListItemSchema = object({
20390
+ summary: SummarySchema,
20391
+ /** Class counts, most numerous first; `className: null` is a member whose
20392
+ * class never resolved, counted so the counts add up to `memberCount`. */
20393
+ classes: array(object({
20394
+ className: string().nullable(),
20395
+ count: number().int().positive()
20396
+ })).readonly()
20397
+ });
20398
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20399
+ /**
20400
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20401
+ *
20402
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20403
+ * summaries feed that could only answer "the last N for these cameras"
20404
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20405
+ * else. Two feeds with different ordering contracts would be two ideas of what
20406
+ * "newest" means, on one screen.
20407
+ */
20408
+ var RecentSummariesQueryInput = object({
20409
+ /** Devices to merge. An empty array yields an empty page. */
20410
+ deviceIds: array(number()),
20411
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20412
+ since: number().optional(),
20413
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20414
+ until: number().optional(),
20415
+ limit: number().int().min(1).max(500).default(100),
20416
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20417
+ cursor: string().optional(),
20418
+ /**
20419
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20420
+ * deliberately the same name: the events filter tree emits one list of ticked
20421
+ * taxonomy nodes, and a summaries feed that called it something else would
20422
+ * make the operator's one filter component produce two shapes.
20423
+ *
20424
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20425
+ * me the arrivals with a dog" has to return the group of four people who had
20426
+ * one with them; a filter on the group's own fields could only ever answer
20427
+ * about its primary.
20428
+ *
20429
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20430
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20431
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20432
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20433
+ * that read only the class would answer "animal" and never "dog".
20434
+ *
20435
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20436
+ */
20437
+ classes: array(string().min(1).max(60)).max(40).optional()
20438
+ });
20439
+ var RecentSummariesPageSchema = object({
20440
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20441
+ * {@link listSummaries} — one list shape, so a card renders the same
20442
+ * whichever feed drew it. */
20443
+ summaries: array(SummaryListItemSchema).readonly(),
20444
+ nextCursor: string().nullable()
20189
20445
  });
20190
20446
  var RecentTracksPageSchema = object({
20191
20447
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20599,7 +20855,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20599
20855
  classes: array(string()).optional(),
20600
20856
  /** See {@link ExcludeSourcesDoc}. */
20601
20857
  excludeSources: array(TrackSourceSchema).optional()
20602
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20858
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20603
20859
  kind: "mutation",
20604
20860
  auth: "admin"
20605
20861
  }), 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({
@@ -24032,10 +24288,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24032
24288
  }), boolean()), method(object({
24033
24289
  deviceId: number().int().nonnegative(),
24034
24290
  sessionId: string()
24035
- }), object({ pendingRenegotiation: object({
24036
- target: WebrtcStreamTargetSchema,
24037
- epoch: number()
24038
- }).nullable() }));
24291
+ }), object({
24292
+ pendingRenegotiation: object({
24293
+ target: WebrtcStreamTargetSchema,
24294
+ epoch: number()
24295
+ }).nullable(),
24296
+ /**
24297
+ * Whether the session still EXISTS.
24298
+ *
24299
+ * A consumer that holds a resource for the life of a session needs to
24300
+ * be able to ask, because a session does not always end the way it
24301
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24302
+ * sent `SessionDisconnected`, so the Alexa exporter's
24303
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24304
+ * H.264 transcode kept running for NOBODY for more than twenty
24305
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24306
+ * minutes earlier — the broker knew; the holder had no way to ask.
24307
+ *
24308
+ * `false` for a session id the provider has never heard of, which is
24309
+ * the same answer as "it ended": either way nothing is holding it up.
24310
+ */
24311
+ alive: boolean()
24312
+ }));
24039
24313
  object({
24040
24314
  /** All accessory children of the parent. */
24041
24315
  childDeviceIds: array(number()).readonly(),
@@ -32464,7 +32738,29 @@ var LoggingSettingsPatchSchema = object({
32464
32738
  * disarmed the channels it did not mention would make the Levels page and
32465
32739
  * the Diagnostics page fight over the same value.
32466
32740
  */
32467
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32741
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32742
+ /**
32743
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32744
+ * retention actually deleted.
32745
+ *
32746
+ * It lives HERE, on the logging document, and not on the analytics addon's
32747
+ * settings form, on the operator's instruction: every other log-ish window in
32748
+ * this system is configured through this one document, and a retention audit
32749
+ * configured somewhere else is a second place to look when the question is
32750
+ * "what happened to my data".
32751
+ *
32752
+ * That placement has a cost worth stating: this document ships in the
32753
+ * framework closure, so this knob needs a published `@camstack/server` while
32754
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32755
+ *
32756
+ * `retention-model.ts` argued this one must NOT follow a device window,
32757
+ * because the audit trail is the history of the SWEEP and not of the camera.
32758
+ * That argument stands and is untouched — what changes is that 30 days stops
32759
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32760
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32761
+ * state in which the next 9.5 GiB leak cannot be explained.
32762
+ */
32763
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32468
32764
  });
32469
32765
  /**
32470
32766
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32537,6 +32833,14 @@ var LoggingSettingsStateSchema = object({
32537
32833
  channels: array(LogChannelDescriptorSchema).readonly(),
32538
32834
  /** The channels ARMED right now, each with its deadline. */
32539
32835
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32836
+ /**
32837
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32838
+ *
32839
+ * Reported rather than left to the caller's memory of what it wrote: this is
32840
+ * the value the analytics sweep will actually use, and an operator asking how
32841
+ * long their audit trail lives should not have to infer it from a default.
32842
+ */
32843
+ opsLogRetentionDays: number().int().min(0),
32540
32844
  persisted: boolean()
32541
32845
  });
32542
32846
  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(), {
@@ -33932,6 +34236,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33932
34236
  smoke: smokeCapability,
33933
34237
  streamCatalog: streamCatalogCapability,
33934
34238
  streamParams: streamParamsCapability,
34239
+ streamSignals: streamSignalsCapability,
33935
34240
  switch: switchCapability,
33936
34241
  tamper: tamperCapability,
33937
34242
  temperatureSensor: temperatureSensorCapability,
@@ -38537,6 +38842,12 @@ Object.freeze({
38537
38842
  addonId: null,
38538
38843
  access: "view"
38539
38844
  },
38845
+ "pipelineAnalytics.listRecentSummaries": {
38846
+ capName: "pipeline-analytics",
38847
+ capScope: "device",
38848
+ addonId: null,
38849
+ access: "view"
38850
+ },
38540
38851
  "pipelineAnalytics.listRecentTracks": {
38541
38852
  capName: "pipeline-analytics",
38542
38853
  capScope: "device",
@@ -40499,6 +40810,12 @@ Object.freeze({
40499
40810
  addonId: null,
40500
40811
  access: "create"
40501
40812
  },
40813
+ "streamBroker.reportStreamSignal": {
40814
+ capName: "stream-broker",
40815
+ capScope: "system",
40816
+ addonId: null,
40817
+ access: "create"
40818
+ },
40502
40819
  "streamBroker.restartProfile": {
40503
40820
  capName: "stream-broker",
40504
40821
  capScope: "system",
@@ -40583,6 +40900,12 @@ Object.freeze({
40583
40900
  addonId: null,
40584
40901
  access: "create"
40585
40902
  },
40903
+ "streamSignals.listSignals": {
40904
+ capName: "stream-signals",
40905
+ capScope: "device",
40906
+ addonId: null,
40907
+ access: "view"
40908
+ },
40586
40909
  "switch.setState": {
40587
40910
  capName: "switch",
40588
40911
  capScope: "device",
@@ -42364,6 +42687,11 @@ Object.freeze({
42364
42687
  form: "single",
42365
42688
  optional: true
42366
42689
  }],
42690
+ "pipelineAnalytics.listRecentSummaries": [{
42691
+ name: "deviceIds",
42692
+ form: "array",
42693
+ optional: false
42694
+ }],
42367
42695
  "pipelineAnalytics.listRecentTracks": [{
42368
42696
  name: "deviceIds",
42369
42697
  form: "array",
@@ -42950,6 +43278,11 @@ Object.freeze({
42950
43278
  form: "single",
42951
43279
  optional: false
42952
43280
  }],
43281
+ "streamBroker.reportStreamSignal": [{
43282
+ name: "deviceId",
43283
+ form: "single",
43284
+ optional: false
43285
+ }],
42953
43286
  "streamBroker.restartProfile": [{
42954
43287
  name: "deviceId",
42955
43288
  form: "single",
package/dist/addon.mjs CHANGED
@@ -10,7 +10,7 @@ import { getCACertificates, setDefaultCACertificates } from "node:tls";
10
10
  //#region \0rolldown/runtime.js
11
11
  var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
12
12
  //#endregion
13
- //#region ../types/dist/event-category-ZyX6jcse.mjs
13
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
14
14
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
15
15
  EventCategory["SystemBoot"] = "system.boot";
16
16
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -627,6 +627,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
627
627
  * pull-reconcile from the provider's `getStatus` on reconnect. */
628
628
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
629
629
  EventCategory["BackupCompleted"] = "backup.completed";
630
+ /**
631
+ * A whole backup RUN finished — every destination attempted, win or lose.
632
+ *
633
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
634
+ * a progress UI and the wrong one for a notification: an operator with three
635
+ * destinations would be told three times. And a run where two of three
636
+ * destinations succeeded is not a clean success — a single "backup
637
+ * completed" that hid the failed one would be a lie, so the count of each is
638
+ * carried here and the message says both.
639
+ *
640
+ * Emitted by the backup orchestrator only after the destination loop, so a
641
+ * run that dies during the BUILD phase produces no completion at all.
642
+ */
643
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
630
644
  EventCategory["BackupRestored"] = "backup.restored";
631
645
  EventCategory["NotificationDispatched"] = "notification.dispatched";
632
646
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5357,7 +5371,7 @@ var ZodIssueCode = {
5357
5371
  var ZodFirstPartyTypeKind;
5358
5372
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5359
5373
  //#endregion
5360
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5374
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5361
5375
  /**
5362
5376
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5363
5377
  * window to float samples (D455).
@@ -7386,7 +7400,23 @@ var EncodeProfileSchema = object({
7386
7400
  "zerolatency",
7387
7401
  "film",
7388
7402
  "animation"
7389
- ]).optional()
7403
+ ]).optional(),
7404
+ /**
7405
+ * ONE slice per access unit.
7406
+ *
7407
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7408
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7409
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7410
+ * frame-end per frame: the first pictures render and the video then freezes
7411
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7412
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7413
+ *
7414
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7415
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7416
+ * consumers meaning the same thing spelled differently would stop sharing one
7417
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7418
+ */
7419
+ singleSlicePerFrame: boolean().optional()
7390
7420
  }),
7391
7421
  audio: union([literal("passthrough"), object({
7392
7422
  codec: _enum([
@@ -7436,7 +7466,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7436
7466
  audio: "passthrough"
7437
7467
  };
7438
7468
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7439
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7469
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7440
7470
  /**
7441
7471
  * Deep wiring healthcheck — snapshot of active reachability probes across
7442
7472
  * every declared capability + widget of every installed plugin, on every
@@ -11485,6 +11515,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11485
11515
  auth: "admin"
11486
11516
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11487
11517
  DeviceType.Camera;
11518
+ /**
11519
+ * The signals a device can emit to WAKE its own stream.
11520
+ *
11521
+ * A camera whose stream is built on demand sleeps until something asks for it,
11522
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11523
+ * puller holds a session open for ever, and treating that as demand would keep
11524
+ * a battery camera awake for ever, which is the whole thing the battery is for
11525
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11526
+ * itself, with no stream running.
11527
+ *
11528
+ * ## The vocabulary is the PROVIDER'S, not ours
11529
+ *
11530
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11531
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11532
+ * Reolink offers motion and camera-native detection; another provider may offer
11533
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11534
+ * yet. A fixed enum here would mean every new signal is a framework release.
11535
+ *
11536
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11537
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11538
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11539
+ * binding — but both answer "what drives the detection pipeline", which is a
11540
+ * different question from "what may wake a sleeping stream". A camera can do
11541
+ * the first and not be trusted with the second, and the operator picks per
11542
+ * camera. Two questions, two authorities.
11543
+ *
11544
+ * ## Availability is not permission
11545
+ *
11546
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11547
+ * wakes the stream is the operator's per-camera choice, held by the broker
11548
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11549
+ * provider declaring a signal is not a provider enabling it.
11550
+ */
11551
+ /** One signal a device can emit. */
11552
+ var StreamSignalSchema = object({
11553
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11554
+ code: string().min(1),
11555
+ /** What an operator reads in the picker. The provider's own wording. */
11556
+ label: string().min(1),
11557
+ /**
11558
+ * Whether the provider recommends this signal ON when a camera is first set
11559
+ * up. A provider knows which of its signals are cheap and reliable; an
11560
+ * operator should not have to discover that by trial. Reolink recommends
11561
+ * both of its own.
11562
+ */
11563
+ recommended: boolean()
11564
+ });
11565
+ var StreamSignalsStatusSchema = object({
11566
+ signals: array(StreamSignalSchema),
11567
+ lastFetchedAt: number()
11568
+ });
11569
+ var streamSignalsCapability = {
11570
+ name: "stream-signals",
11571
+ scope: "device",
11572
+ deviceNative: true,
11573
+ mode: "singleton",
11574
+ deviceTypes: Object.values(DeviceType),
11575
+ runtimeState: StreamSignalsStatusSchema,
11576
+ methods: {
11577
+ /**
11578
+ * What this device can emit. Empty is a valid and common answer — most
11579
+ * cameras have nothing to offer here, and an empty list is what makes the
11580
+ * broker's picker show nothing rather than a false choice.
11581
+ */
11582
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11583
+ };
11488
11584
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11489
11585
  var StreamFormatSchema = _enum([
11490
11586
  "webrtc",
@@ -11881,6 +11977,22 @@ var EgressTranscodeSchema = object({
11881
11977
  camStreamId: string().nullable()
11882
11978
  });
11883
11979
  method(object({
11980
+ deviceId: number().int().nonnegative(),
11981
+ /** The provider's signal code. */
11982
+ code: string().min(1),
11983
+ /** Ms epoch. Absent ⇒ now. */
11984
+ at: number().optional()
11985
+ }), object({
11986
+ /** Whether the broker acted on it, and if not, why. */
11987
+ accepted: boolean(),
11988
+ reason: _enum([
11989
+ "woke",
11990
+ "hold-extended",
11991
+ "not-enabled",
11992
+ "no-consumer",
11993
+ "unknown-code"
11994
+ ])
11995
+ }), { kind: "mutation" }), method(object({
11884
11996
  deviceId: number().int().nonnegative(),
11885
11997
  camStreamId: string().min(1),
11886
11998
  kind: CamStreamKindSchema,
@@ -12135,6 +12247,16 @@ var PickStreamRequirementsSchema = object({
12135
12247
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12136
12248
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12137
12249
  minHeight: number().int().positive().optional(),
12250
+ /**
12251
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12252
+ *
12253
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12254
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12255
+ * Without this the ceiling had to be re-implemented by every caller — and
12256
+ * one caller implementing it privately is how a second scoring authority
12257
+ * gets born.
12258
+ */
12259
+ maxHeight: number().int().positive().optional(),
12138
12260
  /** Minimum horizontal resolution. */
12139
12261
  minWidth: number().int().positive().optional(),
12140
12262
  /**
@@ -12151,7 +12273,22 @@ var PickStreamRequirementsSchema = object({
12151
12273
  * transcoded" guard: if the device is already serving the consumer's
12152
12274
  * codec end-to-end, there's nothing to optimise.
12153
12275
  */
12154
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12276
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12277
+ /**
12278
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12279
+ * understanding that it will be transcoded.
12280
+ *
12281
+ * Default `false` — today's behaviour, and the right one for a bypass
12282
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12283
+ * ask the larger question: "what is the best stream for me, transcoding if
12284
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12285
+ * does not, so a passthrough is never lost to a transcode; the answer says
12286
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12287
+ *
12288
+ * This is what lets one picker serve both the bypass and the full source
12289
+ * choice, instead of a consumer scoring privately when the bypass misses.
12290
+ */
12291
+ allowTranscode: boolean().optional()
12155
12292
  }).readonly();
12156
12293
  var PickStreamPreferencesSchema = object({
12157
12294
  /**
@@ -12165,12 +12302,32 @@ var PickStreamPreferencesSchema = object({
12165
12302
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12166
12303
  * memory-constrained consumers / Apple Home guest sessions).
12167
12304
  */
12168
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12305
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12306
+ /**
12307
+ * The height the consumer actually wants to DELIVER.
12308
+ *
12309
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12310
+ * above the target wins, and only if nothing reaches it does the tallest
12311
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12312
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12313
+ * express that: it says "as big as possible", which is a different wish.
12314
+ *
12315
+ * Ignored when absent, so every existing caller keeps its ordering.
12316
+ */
12317
+ targetHeight: number().int().positive().optional()
12169
12318
  }).readonly();
12170
12319
  var PickedCamStreamSchema = object({
12171
12320
  camStreamId: string(),
12172
12321
  codec: string().optional(),
12173
12322
  resolution: CamStreamResolutionSchema.optional(),
12323
+ /**
12324
+ * Whether serving this stream requires a decode + re-encode.
12325
+ *
12326
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12327
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12328
+ * not ask cannot be handed a cost it never agreed to pay.
12329
+ */
12330
+ transcodes: boolean(),
12174
12331
  /** One-line explanation of why this stream won — for logs / debug UI. */
12175
12332
  reason: string()
12176
12333
  });
@@ -16704,6 +16861,8 @@ var NcSystemEventKindSchema = _enum([
16704
16861
  "device-enabled",
16705
16862
  "device-battery-low",
16706
16863
  "device-battery-normal",
16864
+ "device-consumable-low",
16865
+ "device-consumable-normal",
16707
16866
  "stream-online",
16708
16867
  "stream-offline",
16709
16868
  "node-online",
@@ -16722,6 +16881,7 @@ var NcSystemEventKindSchema = _enum([
16722
16881
  "addon-updated",
16723
16882
  "server-updated",
16724
16883
  "export-completed",
16884
+ "backup-completed",
16725
16885
  "camera-online",
16726
16886
  "camera-offline",
16727
16887
  "camera-disabled",
@@ -20158,13 +20318,109 @@ var SummariesQueryInput = object({
20158
20318
  deviceIds: array(number()).min(1),
20159
20319
  since: number().optional(),
20160
20320
  until: number().optional(),
20161
- limit: number().int().min(1).max(200).default(50)
20321
+ limit: number().int().min(1).max(200).default(50),
20322
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20323
+ * meaning of "dog" on every summary surface. */
20324
+ classes: array(string().min(1).max(60)).max(40).optional()
20162
20325
  });
20163
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20164
20326
  var SummaryDetailSchema = object({
20165
20327
  summary: SummarySchema,
20166
- /** Member track ids, in absorption order. */
20167
- trackIds: array(string()).readonly()
20328
+ /** Members in absorption order, oldest join first. */
20329
+ members: array(object({
20330
+ trackId: string(),
20331
+ /**
20332
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20333
+ * and the track no longer exists to fill it.
20334
+ *
20335
+ * The join, not the latest opinion: class voting can re-decide a track's
20336
+ * class afterwards, and a group's composition is the history of who came
20337
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20338
+ * dog" — rather than being handed a second, denormalised tally that would
20339
+ * drift from the members it claims to describe.
20340
+ */
20341
+ className: string().nullable(),
20342
+ /** `primary` is the one member that carries the group's identity. */
20343
+ role: _enum([
20344
+ "primary",
20345
+ "sibling",
20346
+ "child"
20347
+ ]).nullable(),
20348
+ joinedAt: number(),
20349
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20350
+ * at read time. Absent when nothing resolved, never an empty string. */
20351
+ label: string().optional(),
20352
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20353
+ * recognised nobody, and absent for a member whose track has been pruned —
20354
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20355
+ subLabel: string().optional()
20356
+ })).readonly()
20357
+ });
20358
+ /**
20359
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20360
+ *
20361
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20362
+ * we extend when we notice we need more". Enough to draw the card ("two people
20363
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20364
+ * are on {@link getSummary}: shipping every member of every group so a client
20365
+ * can count them turns a page of two hundred groups into a thousand records to
20366
+ * draw two hundred badges.
20367
+ */
20368
+ var SummaryListItemSchema = object({
20369
+ summary: SummarySchema,
20370
+ /** Class counts, most numerous first; `className: null` is a member whose
20371
+ * class never resolved, counted so the counts add up to `memberCount`. */
20372
+ classes: array(object({
20373
+ className: string().nullable(),
20374
+ count: number().int().positive()
20375
+ })).readonly()
20376
+ });
20377
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20378
+ /**
20379
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20380
+ *
20381
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20382
+ * summaries feed that could only answer "the last N for these cameras"
20383
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20384
+ * else. Two feeds with different ordering contracts would be two ideas of what
20385
+ * "newest" means, on one screen.
20386
+ */
20387
+ var RecentSummariesQueryInput = object({
20388
+ /** Devices to merge. An empty array yields an empty page. */
20389
+ deviceIds: array(number()),
20390
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20391
+ since: number().optional(),
20392
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20393
+ until: number().optional(),
20394
+ limit: number().int().min(1).max(500).default(100),
20395
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20396
+ cursor: string().optional(),
20397
+ /**
20398
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20399
+ * deliberately the same name: the events filter tree emits one list of ticked
20400
+ * taxonomy nodes, and a summaries feed that called it something else would
20401
+ * make the operator's one filter component produce two shapes.
20402
+ *
20403
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20404
+ * me the arrivals with a dog" has to return the group of four people who had
20405
+ * one with them; a filter on the group's own fields could only ever answer
20406
+ * about its primary.
20407
+ *
20408
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20409
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20410
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20411
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20412
+ * that read only the class would answer "animal" and never "dog".
20413
+ *
20414
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20415
+ */
20416
+ classes: array(string().min(1).max(60)).max(40).optional()
20417
+ });
20418
+ var RecentSummariesPageSchema = object({
20419
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20420
+ * {@link listSummaries} — one list shape, so a card renders the same
20421
+ * whichever feed drew it. */
20422
+ summaries: array(SummaryListItemSchema).readonly(),
20423
+ nextCursor: string().nullable()
20168
20424
  });
20169
20425
  var RecentTracksPageSchema = object({
20170
20426
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20578,7 +20834,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20578
20834
  classes: array(string()).optional(),
20579
20835
  /** See {@link ExcludeSourcesDoc}. */
20580
20836
  excludeSources: array(TrackSourceSchema).optional()
20581
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20837
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20582
20838
  kind: "mutation",
20583
20839
  auth: "admin"
20584
20840
  }), 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({
@@ -24011,10 +24267,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24011
24267
  }), boolean()), method(object({
24012
24268
  deviceId: number().int().nonnegative(),
24013
24269
  sessionId: string()
24014
- }), object({ pendingRenegotiation: object({
24015
- target: WebrtcStreamTargetSchema,
24016
- epoch: number()
24017
- }).nullable() }));
24270
+ }), object({
24271
+ pendingRenegotiation: object({
24272
+ target: WebrtcStreamTargetSchema,
24273
+ epoch: number()
24274
+ }).nullable(),
24275
+ /**
24276
+ * Whether the session still EXISTS.
24277
+ *
24278
+ * A consumer that holds a resource for the life of a session needs to
24279
+ * be able to ask, because a session does not always end the way it
24280
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24281
+ * sent `SessionDisconnected`, so the Alexa exporter's
24282
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24283
+ * H.264 transcode kept running for NOBODY for more than twenty
24284
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24285
+ * minutes earlier — the broker knew; the holder had no way to ask.
24286
+ *
24287
+ * `false` for a session id the provider has never heard of, which is
24288
+ * the same answer as "it ended": either way nothing is holding it up.
24289
+ */
24290
+ alive: boolean()
24291
+ }));
24018
24292
  object({
24019
24293
  /** All accessory children of the parent. */
24020
24294
  childDeviceIds: array(number()).readonly(),
@@ -32443,7 +32717,29 @@ var LoggingSettingsPatchSchema = object({
32443
32717
  * disarmed the channels it did not mention would make the Levels page and
32444
32718
  * the Diagnostics page fight over the same value.
32445
32719
  */
32446
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32720
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32721
+ /**
32722
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32723
+ * retention actually deleted.
32724
+ *
32725
+ * It lives HERE, on the logging document, and not on the analytics addon's
32726
+ * settings form, on the operator's instruction: every other log-ish window in
32727
+ * this system is configured through this one document, and a retention audit
32728
+ * configured somewhere else is a second place to look when the question is
32729
+ * "what happened to my data".
32730
+ *
32731
+ * That placement has a cost worth stating: this document ships in the
32732
+ * framework closure, so this knob needs a published `@camstack/server` while
32733
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32734
+ *
32735
+ * `retention-model.ts` argued this one must NOT follow a device window,
32736
+ * because the audit trail is the history of the SWEEP and not of the camera.
32737
+ * That argument stands and is untouched — what changes is that 30 days stops
32738
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32739
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32740
+ * state in which the next 9.5 GiB leak cannot be explained.
32741
+ */
32742
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32447
32743
  });
32448
32744
  /**
32449
32745
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32516,6 +32812,14 @@ var LoggingSettingsStateSchema = object({
32516
32812
  channels: array(LogChannelDescriptorSchema).readonly(),
32517
32813
  /** The channels ARMED right now, each with its deadline. */
32518
32814
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32815
+ /**
32816
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32817
+ *
32818
+ * Reported rather than left to the caller's memory of what it wrote: this is
32819
+ * the value the analytics sweep will actually use, and an operator asking how
32820
+ * long their audit trail lives should not have to infer it from a default.
32821
+ */
32822
+ opsLogRetentionDays: number().int().min(0),
32519
32823
  persisted: boolean()
32520
32824
  });
32521
32825
  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(), {
@@ -33911,6 +34215,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33911
34215
  smoke: smokeCapability,
33912
34216
  streamCatalog: streamCatalogCapability,
33913
34217
  streamParams: streamParamsCapability,
34218
+ streamSignals: streamSignalsCapability,
33914
34219
  switch: switchCapability,
33915
34220
  tamper: tamperCapability,
33916
34221
  temperatureSensor: temperatureSensorCapability,
@@ -38516,6 +38821,12 @@ Object.freeze({
38516
38821
  addonId: null,
38517
38822
  access: "view"
38518
38823
  },
38824
+ "pipelineAnalytics.listRecentSummaries": {
38825
+ capName: "pipeline-analytics",
38826
+ capScope: "device",
38827
+ addonId: null,
38828
+ access: "view"
38829
+ },
38519
38830
  "pipelineAnalytics.listRecentTracks": {
38520
38831
  capName: "pipeline-analytics",
38521
38832
  capScope: "device",
@@ -40478,6 +40789,12 @@ Object.freeze({
40478
40789
  addonId: null,
40479
40790
  access: "create"
40480
40791
  },
40792
+ "streamBroker.reportStreamSignal": {
40793
+ capName: "stream-broker",
40794
+ capScope: "system",
40795
+ addonId: null,
40796
+ access: "create"
40797
+ },
40481
40798
  "streamBroker.restartProfile": {
40482
40799
  capName: "stream-broker",
40483
40800
  capScope: "system",
@@ -40562,6 +40879,12 @@ Object.freeze({
40562
40879
  addonId: null,
40563
40880
  access: "create"
40564
40881
  },
40882
+ "streamSignals.listSignals": {
40883
+ capName: "stream-signals",
40884
+ capScope: "device",
40885
+ addonId: null,
40886
+ access: "view"
40887
+ },
40565
40888
  "switch.setState": {
40566
40889
  capName: "switch",
40567
40890
  capScope: "device",
@@ -42343,6 +42666,11 @@ Object.freeze({
42343
42666
  form: "single",
42344
42667
  optional: true
42345
42668
  }],
42669
+ "pipelineAnalytics.listRecentSummaries": [{
42670
+ name: "deviceIds",
42671
+ form: "array",
42672
+ optional: false
42673
+ }],
42346
42674
  "pipelineAnalytics.listRecentTracks": [{
42347
42675
  name: "deviceIds",
42348
42676
  form: "array",
@@ -42929,6 +43257,11 @@ Object.freeze({
42929
43257
  form: "single",
42930
43258
  optional: false
42931
43259
  }],
43260
+ "streamBroker.reportStreamSignal": [{
43261
+ name: "deviceId",
43262
+ form: "single",
43263
+ optional: false
43264
+ }],
42932
43265
  "streamBroker.restartProfile": [{
42933
43266
  name: "deviceId",
42934
43267
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.104",
3
+ "version": "0.2.106",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",