@camstack/addon-terminal 0.1.105 → 0.1.107

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 node_module = require("node:module");
31
31
  let sharp = require("sharp");
32
32
  sharp = __toESM(sharp);
33
33
  let node_http = require("node:http");
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).
@@ -7466,7 +7480,23 @@ var EncodeProfileSchema = object({
7466
7480
  "zerolatency",
7467
7481
  "film",
7468
7482
  "animation"
7469
- ]).optional()
7483
+ ]).optional(),
7484
+ /**
7485
+ * ONE slice per access unit.
7486
+ *
7487
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7488
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7489
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7490
+ * frame-end per frame: the first pictures render and the video then freezes
7491
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7492
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7493
+ *
7494
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7495
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7496
+ * consumers meaning the same thing spelled differently would stop sharing one
7497
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7498
+ */
7499
+ singleSlicePerFrame: boolean().optional()
7470
7500
  }),
7471
7501
  audio: union([literal("passthrough"), object({
7472
7502
  codec: _enum([
@@ -7516,7 +7546,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7516
7546
  audio: "passthrough"
7517
7547
  };
7518
7548
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7519
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7549
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7520
7550
  /**
7521
7551
  * Deep wiring healthcheck — snapshot of active reachability probes across
7522
7552
  * every declared capability + widget of every installed plugin, on every
@@ -11573,6 +11603,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11573
11603
  auth: "admin"
11574
11604
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11575
11605
  DeviceType.Camera;
11606
+ /**
11607
+ * The signals a device can emit to WAKE its own stream.
11608
+ *
11609
+ * A camera whose stream is built on demand sleeps until something asks for it,
11610
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11611
+ * puller holds a session open for ever, and treating that as demand would keep
11612
+ * a battery camera awake for ever, which is the whole thing the battery is for
11613
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11614
+ * itself, with no stream running.
11615
+ *
11616
+ * ## The vocabulary is the PROVIDER'S, not ours
11617
+ *
11618
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11619
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11620
+ * Reolink offers motion and camera-native detection; another provider may offer
11621
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11622
+ * yet. A fixed enum here would mean every new signal is a framework release.
11623
+ *
11624
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11625
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11626
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11627
+ * binding — but both answer "what drives the detection pipeline", which is a
11628
+ * different question from "what may wake a sleeping stream". A camera can do
11629
+ * the first and not be trusted with the second, and the operator picks per
11630
+ * camera. Two questions, two authorities.
11631
+ *
11632
+ * ## Availability is not permission
11633
+ *
11634
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11635
+ * wakes the stream is the operator's per-camera choice, held by the broker
11636
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11637
+ * provider declaring a signal is not a provider enabling it.
11638
+ */
11639
+ /** One signal a device can emit. */
11640
+ var StreamSignalSchema = object({
11641
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11642
+ code: string().min(1),
11643
+ /** What an operator reads in the picker. The provider's own wording. */
11644
+ label: string().min(1),
11645
+ /**
11646
+ * Whether the provider recommends this signal ON when a camera is first set
11647
+ * up. A provider knows which of its signals are cheap and reliable; an
11648
+ * operator should not have to discover that by trial. Reolink recommends
11649
+ * both of its own.
11650
+ */
11651
+ recommended: boolean()
11652
+ });
11653
+ var StreamSignalsStatusSchema = object({
11654
+ signals: array(StreamSignalSchema),
11655
+ lastFetchedAt: number()
11656
+ });
11657
+ var streamSignalsCapability = {
11658
+ name: "stream-signals",
11659
+ scope: "device",
11660
+ deviceNative: true,
11661
+ mode: "singleton",
11662
+ deviceTypes: Object.values(DeviceType),
11663
+ runtimeState: StreamSignalsStatusSchema,
11664
+ methods: {
11665
+ /**
11666
+ * What this device can emit. Empty is a valid and common answer — most
11667
+ * cameras have nothing to offer here, and an empty list is what makes the
11668
+ * broker's picker show nothing rather than a false choice.
11669
+ */
11670
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11671
+ };
11576
11672
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11577
11673
  var StreamFormatSchema = _enum([
11578
11674
  "webrtc",
@@ -11969,6 +12065,22 @@ var EgressTranscodeSchema = object({
11969
12065
  camStreamId: string().nullable()
11970
12066
  });
11971
12067
  method(object({
12068
+ deviceId: number().int().nonnegative(),
12069
+ /** The provider's signal code. */
12070
+ code: string().min(1),
12071
+ /** Ms epoch. Absent ⇒ now. */
12072
+ at: number().optional()
12073
+ }), object({
12074
+ /** Whether the broker acted on it, and if not, why. */
12075
+ accepted: boolean(),
12076
+ reason: _enum([
12077
+ "woke",
12078
+ "hold-extended",
12079
+ "not-enabled",
12080
+ "no-consumer",
12081
+ "unknown-code"
12082
+ ])
12083
+ }), { kind: "mutation" }), method(object({
11972
12084
  deviceId: number().int().nonnegative(),
11973
12085
  camStreamId: string().min(1),
11974
12086
  kind: CamStreamKindSchema,
@@ -12223,6 +12335,16 @@ var PickStreamRequirementsSchema = object({
12223
12335
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12224
12336
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12225
12337
  minHeight: number().int().positive().optional(),
12338
+ /**
12339
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12340
+ *
12341
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12342
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12343
+ * Without this the ceiling had to be re-implemented by every caller — and
12344
+ * one caller implementing it privately is how a second scoring authority
12345
+ * gets born.
12346
+ */
12347
+ maxHeight: number().int().positive().optional(),
12226
12348
  /** Minimum horizontal resolution. */
12227
12349
  minWidth: number().int().positive().optional(),
12228
12350
  /**
@@ -12239,7 +12361,22 @@ var PickStreamRequirementsSchema = object({
12239
12361
  * transcoded" guard: if the device is already serving the consumer's
12240
12362
  * codec end-to-end, there's nothing to optimise.
12241
12363
  */
12242
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12364
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12365
+ /**
12366
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12367
+ * understanding that it will be transcoded.
12368
+ *
12369
+ * Default `false` — today's behaviour, and the right one for a bypass
12370
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12371
+ * ask the larger question: "what is the best stream for me, transcoding if
12372
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12373
+ * does not, so a passthrough is never lost to a transcode; the answer says
12374
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12375
+ *
12376
+ * This is what lets one picker serve both the bypass and the full source
12377
+ * choice, instead of a consumer scoring privately when the bypass misses.
12378
+ */
12379
+ allowTranscode: boolean().optional()
12243
12380
  }).readonly();
12244
12381
  var PickStreamPreferencesSchema = object({
12245
12382
  /**
@@ -12253,12 +12390,32 @@ var PickStreamPreferencesSchema = object({
12253
12390
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12254
12391
  * memory-constrained consumers / Apple Home guest sessions).
12255
12392
  */
12256
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12393
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12394
+ /**
12395
+ * The height the consumer actually wants to DELIVER.
12396
+ *
12397
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12398
+ * above the target wins, and only if nothing reaches it does the tallest
12399
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12400
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12401
+ * express that: it says "as big as possible", which is a different wish.
12402
+ *
12403
+ * Ignored when absent, so every existing caller keeps its ordering.
12404
+ */
12405
+ targetHeight: number().int().positive().optional()
12257
12406
  }).readonly();
12258
12407
  var PickedCamStreamSchema = object({
12259
12408
  camStreamId: string(),
12260
12409
  codec: string().optional(),
12261
12410
  resolution: CamStreamResolutionSchema.optional(),
12411
+ /**
12412
+ * Whether serving this stream requires a decode + re-encode.
12413
+ *
12414
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12415
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12416
+ * not ask cannot be handed a cost it never agreed to pay.
12417
+ */
12418
+ transcodes: boolean(),
12262
12419
  /** One-line explanation of why this stream won — for logs / debug UI. */
12263
12420
  reason: string()
12264
12421
  });
@@ -16694,6 +16851,8 @@ var NcSystemEventKindSchema = _enum([
16694
16851
  "device-enabled",
16695
16852
  "device-battery-low",
16696
16853
  "device-battery-normal",
16854
+ "device-consumable-low",
16855
+ "device-consumable-normal",
16697
16856
  "stream-online",
16698
16857
  "stream-offline",
16699
16858
  "node-online",
@@ -16712,6 +16871,7 @@ var NcSystemEventKindSchema = _enum([
16712
16871
  "addon-updated",
16713
16872
  "server-updated",
16714
16873
  "export-completed",
16874
+ "backup-completed",
16715
16875
  "camera-online",
16716
16876
  "camera-offline",
16717
16877
  "camera-disabled",
@@ -20148,13 +20308,109 @@ var SummariesQueryInput = object({
20148
20308
  deviceIds: array(number()).min(1),
20149
20309
  since: number().optional(),
20150
20310
  until: number().optional(),
20151
- limit: number().int().min(1).max(200).default(50)
20311
+ limit: number().int().min(1).max(200).default(50),
20312
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20313
+ * meaning of "dog" on every summary surface. */
20314
+ classes: array(string().min(1).max(60)).max(40).optional()
20152
20315
  });
20153
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20154
20316
  var SummaryDetailSchema = object({
20155
20317
  summary: SummarySchema,
20156
- /** Member track ids, in absorption order. */
20157
- trackIds: array(string()).readonly()
20318
+ /** Members in absorption order, oldest join first. */
20319
+ members: array(object({
20320
+ trackId: string(),
20321
+ /**
20322
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20323
+ * and the track no longer exists to fill it.
20324
+ *
20325
+ * The join, not the latest opinion: class voting can re-decide a track's
20326
+ * class afterwards, and a group's composition is the history of who came
20327
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20328
+ * dog" — rather than being handed a second, denormalised tally that would
20329
+ * drift from the members it claims to describe.
20330
+ */
20331
+ className: string().nullable(),
20332
+ /** `primary` is the one member that carries the group's identity. */
20333
+ role: _enum([
20334
+ "primary",
20335
+ "sibling",
20336
+ "child"
20337
+ ]).nullable(),
20338
+ joinedAt: number(),
20339
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20340
+ * at read time. Absent when nothing resolved, never an empty string. */
20341
+ label: string().optional(),
20342
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20343
+ * recognised nobody, and absent for a member whose track has been pruned —
20344
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20345
+ subLabel: string().optional()
20346
+ })).readonly()
20347
+ });
20348
+ /**
20349
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20350
+ *
20351
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20352
+ * we extend when we notice we need more". Enough to draw the card ("two people
20353
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20354
+ * are on {@link getSummary}: shipping every member of every group so a client
20355
+ * can count them turns a page of two hundred groups into a thousand records to
20356
+ * draw two hundred badges.
20357
+ */
20358
+ var SummaryListItemSchema = object({
20359
+ summary: SummarySchema,
20360
+ /** Class counts, most numerous first; `className: null` is a member whose
20361
+ * class never resolved, counted so the counts add up to `memberCount`. */
20362
+ classes: array(object({
20363
+ className: string().nullable(),
20364
+ count: number().int().positive()
20365
+ })).readonly()
20366
+ });
20367
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20368
+ /**
20369
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20370
+ *
20371
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20372
+ * summaries feed that could only answer "the last N for these cameras"
20373
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20374
+ * else. Two feeds with different ordering contracts would be two ideas of what
20375
+ * "newest" means, on one screen.
20376
+ */
20377
+ var RecentSummariesQueryInput = object({
20378
+ /** Devices to merge. An empty array yields an empty page. */
20379
+ deviceIds: array(number()),
20380
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20381
+ since: number().optional(),
20382
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20383
+ until: number().optional(),
20384
+ limit: number().int().min(1).max(500).default(100),
20385
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20386
+ cursor: string().optional(),
20387
+ /**
20388
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20389
+ * deliberately the same name: the events filter tree emits one list of ticked
20390
+ * taxonomy nodes, and a summaries feed that called it something else would
20391
+ * make the operator's one filter component produce two shapes.
20392
+ *
20393
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20394
+ * me the arrivals with a dog" has to return the group of four people who had
20395
+ * one with them; a filter on the group's own fields could only ever answer
20396
+ * about its primary.
20397
+ *
20398
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20399
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20400
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20401
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20402
+ * that read only the class would answer "animal" and never "dog".
20403
+ *
20404
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20405
+ */
20406
+ classes: array(string().min(1).max(60)).max(40).optional()
20407
+ });
20408
+ var RecentSummariesPageSchema = object({
20409
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20410
+ * {@link listSummaries} — one list shape, so a card renders the same
20411
+ * whichever feed drew it. */
20412
+ summaries: array(SummaryListItemSchema).readonly(),
20413
+ nextCursor: string().nullable()
20158
20414
  });
20159
20415
  var RecentTracksPageSchema = object({
20160
20416
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20568,7 +20824,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20568
20824
  classes: array(string()).optional(),
20569
20825
  /** See {@link ExcludeSourcesDoc}. */
20570
20826
  excludeSources: array(TrackSourceSchema).optional()
20571
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20827
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20572
20828
  kind: "mutation",
20573
20829
  auth: "admin"
20574
20830
  }), 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({
@@ -24045,10 +24301,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24045
24301
  }), boolean()), method(object({
24046
24302
  deviceId: number().int().nonnegative(),
24047
24303
  sessionId: string()
24048
- }), object({ pendingRenegotiation: object({
24049
- target: WebrtcStreamTargetSchema,
24050
- epoch: number()
24051
- }).nullable() }));
24304
+ }), object({
24305
+ pendingRenegotiation: object({
24306
+ target: WebrtcStreamTargetSchema,
24307
+ epoch: number()
24308
+ }).nullable(),
24309
+ /**
24310
+ * Whether the session still EXISTS.
24311
+ *
24312
+ * A consumer that holds a resource for the life of a session needs to
24313
+ * be able to ask, because a session does not always end the way it
24314
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24315
+ * sent `SessionDisconnected`, so the Alexa exporter's
24316
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24317
+ * H.264 transcode kept running for NOBODY for more than twenty
24318
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24319
+ * minutes earlier — the broker knew; the holder had no way to ask.
24320
+ *
24321
+ * `false` for a session id the provider has never heard of, which is
24322
+ * the same answer as "it ended": either way nothing is holding it up.
24323
+ */
24324
+ alive: boolean()
24325
+ }));
24052
24326
  object({
24053
24327
  /** All accessory children of the parent. */
24054
24328
  childDeviceIds: array(number()).readonly(),
@@ -32469,7 +32743,29 @@ var LoggingSettingsPatchSchema = object({
32469
32743
  * disarmed the channels it did not mention would make the Levels page and
32470
32744
  * the Diagnostics page fight over the same value.
32471
32745
  */
32472
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32746
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32747
+ /**
32748
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32749
+ * retention actually deleted.
32750
+ *
32751
+ * It lives HERE, on the logging document, and not on the analytics addon's
32752
+ * settings form, on the operator's instruction: every other log-ish window in
32753
+ * this system is configured through this one document, and a retention audit
32754
+ * configured somewhere else is a second place to look when the question is
32755
+ * "what happened to my data".
32756
+ *
32757
+ * That placement has a cost worth stating: this document ships in the
32758
+ * framework closure, so this knob needs a published `@camstack/server` while
32759
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32760
+ *
32761
+ * `retention-model.ts` argued this one must NOT follow a device window,
32762
+ * because the audit trail is the history of the SWEEP and not of the camera.
32763
+ * That argument stands and is untouched — what changes is that 30 days stops
32764
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32765
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32766
+ * state in which the next 9.5 GiB leak cannot be explained.
32767
+ */
32768
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32473
32769
  });
32474
32770
  /**
32475
32771
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32542,6 +32838,14 @@ var LoggingSettingsStateSchema = object({
32542
32838
  channels: array(LogChannelDescriptorSchema).readonly(),
32543
32839
  /** The channels ARMED right now, each with its deadline. */
32544
32840
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32841
+ /**
32842
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32843
+ *
32844
+ * Reported rather than left to the caller's memory of what it wrote: this is
32845
+ * the value the analytics sweep will actually use, and an operator asking how
32846
+ * long their audit trail lives should not have to infer it from a default.
32847
+ */
32848
+ opsLogRetentionDays: number().int().min(0),
32545
32849
  persisted: boolean()
32546
32850
  });
32547
32851
  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(), {
@@ -33937,6 +34241,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33937
34241
  smoke: smokeCapability,
33938
34242
  streamCatalog: streamCatalogCapability,
33939
34243
  streamParams: streamParamsCapability,
34244
+ streamSignals: streamSignalsCapability,
33940
34245
  switch: switchCapability,
33941
34246
  tamper: tamperCapability,
33942
34247
  temperatureSensor: temperatureSensorCapability,
@@ -38124,6 +38429,12 @@ Object.freeze({
38124
38429
  addonId: null,
38125
38430
  access: "view"
38126
38431
  },
38432
+ "pipelineAnalytics.listRecentSummaries": {
38433
+ capName: "pipeline-analytics",
38434
+ capScope: "device",
38435
+ addonId: null,
38436
+ access: "view"
38437
+ },
38127
38438
  "pipelineAnalytics.listRecentTracks": {
38128
38439
  capName: "pipeline-analytics",
38129
38440
  capScope: "device",
@@ -40086,6 +40397,12 @@ Object.freeze({
40086
40397
  addonId: null,
40087
40398
  access: "create"
40088
40399
  },
40400
+ "streamBroker.reportStreamSignal": {
40401
+ capName: "stream-broker",
40402
+ capScope: "system",
40403
+ addonId: null,
40404
+ access: "create"
40405
+ },
40089
40406
  "streamBroker.restartProfile": {
40090
40407
  capName: "stream-broker",
40091
40408
  capScope: "system",
@@ -40170,6 +40487,12 @@ Object.freeze({
40170
40487
  addonId: null,
40171
40488
  access: "create"
40172
40489
  },
40490
+ "streamSignals.listSignals": {
40491
+ capName: "stream-signals",
40492
+ capScope: "device",
40493
+ addonId: null,
40494
+ access: "view"
40495
+ },
40173
40496
  "switch.setState": {
40174
40497
  capName: "switch",
40175
40498
  capScope: "device",
@@ -41951,6 +42274,11 @@ Object.freeze({
41951
42274
  form: "single",
41952
42275
  optional: true
41953
42276
  }],
42277
+ "pipelineAnalytics.listRecentSummaries": [{
42278
+ name: "deviceIds",
42279
+ form: "array",
42280
+ optional: false
42281
+ }],
41954
42282
  "pipelineAnalytics.listRecentTracks": [{
41955
42283
  name: "deviceIds",
41956
42284
  form: "array",
@@ -42537,6 +42865,11 @@ Object.freeze({
42537
42865
  form: "single",
42538
42866
  optional: false
42539
42867
  }],
42868
+ "streamBroker.reportStreamSignal": [{
42869
+ name: "deviceId",
42870
+ form: "single",
42871
+ optional: false
42872
+ }],
42540
42873
  "streamBroker.restartProfile": [{
42541
42874
  name: "deviceId",
42542
42875
  form: "single",
package/dist/addon.mjs CHANGED
@@ -8,7 +8,7 @@ import { createServer } from "node:http";
8
8
  //#region \0rolldown/runtime.js
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  //#endregion
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).
@@ -7443,7 +7457,23 @@ var EncodeProfileSchema = object({
7443
7457
  "zerolatency",
7444
7458
  "film",
7445
7459
  "animation"
7446
- ]).optional()
7460
+ ]).optional(),
7461
+ /**
7462
+ * ONE slice per access unit.
7463
+ *
7464
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7465
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7466
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7467
+ * frame-end per frame: the first pictures render and the video then freezes
7468
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7469
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7470
+ *
7471
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7472
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7473
+ * consumers meaning the same thing spelled differently would stop sharing one
7474
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7475
+ */
7476
+ singleSlicePerFrame: boolean().optional()
7447
7477
  }),
7448
7478
  audio: union([literal("passthrough"), object({
7449
7479
  codec: _enum([
@@ -7493,7 +7523,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7493
7523
  audio: "passthrough"
7494
7524
  };
7495
7525
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7496
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7526
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7497
7527
  /**
7498
7528
  * Deep wiring healthcheck — snapshot of active reachability probes across
7499
7529
  * every declared capability + widget of every installed plugin, on every
@@ -11550,6 +11580,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11550
11580
  auth: "admin"
11551
11581
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11552
11582
  DeviceType.Camera;
11583
+ /**
11584
+ * The signals a device can emit to WAKE its own stream.
11585
+ *
11586
+ * A camera whose stream is built on demand sleeps until something asks for it,
11587
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11588
+ * puller holds a session open for ever, and treating that as demand would keep
11589
+ * a battery camera awake for ever, which is the whole thing the battery is for
11590
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11591
+ * itself, with no stream running.
11592
+ *
11593
+ * ## The vocabulary is the PROVIDER'S, not ours
11594
+ *
11595
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11596
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11597
+ * Reolink offers motion and camera-native detection; another provider may offer
11598
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11599
+ * yet. A fixed enum here would mean every new signal is a framework release.
11600
+ *
11601
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11602
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11603
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11604
+ * binding — but both answer "what drives the detection pipeline", which is a
11605
+ * different question from "what may wake a sleeping stream". A camera can do
11606
+ * the first and not be trusted with the second, and the operator picks per
11607
+ * camera. Two questions, two authorities.
11608
+ *
11609
+ * ## Availability is not permission
11610
+ *
11611
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11612
+ * wakes the stream is the operator's per-camera choice, held by the broker
11613
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11614
+ * provider declaring a signal is not a provider enabling it.
11615
+ */
11616
+ /** One signal a device can emit. */
11617
+ var StreamSignalSchema = object({
11618
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11619
+ code: string().min(1),
11620
+ /** What an operator reads in the picker. The provider's own wording. */
11621
+ label: string().min(1),
11622
+ /**
11623
+ * Whether the provider recommends this signal ON when a camera is first set
11624
+ * up. A provider knows which of its signals are cheap and reliable; an
11625
+ * operator should not have to discover that by trial. Reolink recommends
11626
+ * both of its own.
11627
+ */
11628
+ recommended: boolean()
11629
+ });
11630
+ var StreamSignalsStatusSchema = object({
11631
+ signals: array(StreamSignalSchema),
11632
+ lastFetchedAt: number()
11633
+ });
11634
+ var streamSignalsCapability = {
11635
+ name: "stream-signals",
11636
+ scope: "device",
11637
+ deviceNative: true,
11638
+ mode: "singleton",
11639
+ deviceTypes: Object.values(DeviceType),
11640
+ runtimeState: StreamSignalsStatusSchema,
11641
+ methods: {
11642
+ /**
11643
+ * What this device can emit. Empty is a valid and common answer — most
11644
+ * cameras have nothing to offer here, and an empty list is what makes the
11645
+ * broker's picker show nothing rather than a false choice.
11646
+ */
11647
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
11648
+ };
11553
11649
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11554
11650
  var StreamFormatSchema = _enum([
11555
11651
  "webrtc",
@@ -11946,6 +12042,22 @@ var EgressTranscodeSchema = object({
11946
12042
  camStreamId: string().nullable()
11947
12043
  });
11948
12044
  method(object({
12045
+ deviceId: number().int().nonnegative(),
12046
+ /** The provider's signal code. */
12047
+ code: string().min(1),
12048
+ /** Ms epoch. Absent ⇒ now. */
12049
+ at: number().optional()
12050
+ }), object({
12051
+ /** Whether the broker acted on it, and if not, why. */
12052
+ accepted: boolean(),
12053
+ reason: _enum([
12054
+ "woke",
12055
+ "hold-extended",
12056
+ "not-enabled",
12057
+ "no-consumer",
12058
+ "unknown-code"
12059
+ ])
12060
+ }), { kind: "mutation" }), method(object({
11949
12061
  deviceId: number().int().nonnegative(),
11950
12062
  camStreamId: string().min(1),
11951
12063
  kind: CamStreamKindSchema,
@@ -12200,6 +12312,16 @@ var PickStreamRequirementsSchema = object({
12200
12312
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12201
12313
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12202
12314
  minHeight: number().int().positive().optional(),
12315
+ /**
12316
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12317
+ *
12318
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12319
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12320
+ * Without this the ceiling had to be re-implemented by every caller — and
12321
+ * one caller implementing it privately is how a second scoring authority
12322
+ * gets born.
12323
+ */
12324
+ maxHeight: number().int().positive().optional(),
12203
12325
  /** Minimum horizontal resolution. */
12204
12326
  minWidth: number().int().positive().optional(),
12205
12327
  /**
@@ -12216,7 +12338,22 @@ var PickStreamRequirementsSchema = object({
12216
12338
  * transcoded" guard: if the device is already serving the consumer's
12217
12339
  * codec end-to-end, there's nothing to optimise.
12218
12340
  */
12219
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12341
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12342
+ /**
12343
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12344
+ * understanding that it will be transcoded.
12345
+ *
12346
+ * Default `false` — today's behaviour, and the right one for a bypass
12347
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12348
+ * ask the larger question: "what is the best stream for me, transcoding if
12349
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12350
+ * does not, so a passthrough is never lost to a transcode; the answer says
12351
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12352
+ *
12353
+ * This is what lets one picker serve both the bypass and the full source
12354
+ * choice, instead of a consumer scoring privately when the bypass misses.
12355
+ */
12356
+ allowTranscode: boolean().optional()
12220
12357
  }).readonly();
12221
12358
  var PickStreamPreferencesSchema = object({
12222
12359
  /**
@@ -12230,12 +12367,32 @@ var PickStreamPreferencesSchema = object({
12230
12367
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12231
12368
  * memory-constrained consumers / Apple Home guest sessions).
12232
12369
  */
12233
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12370
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12371
+ /**
12372
+ * The height the consumer actually wants to DELIVER.
12373
+ *
12374
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12375
+ * above the target wins, and only if nothing reaches it does the tallest
12376
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12377
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12378
+ * express that: it says "as big as possible", which is a different wish.
12379
+ *
12380
+ * Ignored when absent, so every existing caller keeps its ordering.
12381
+ */
12382
+ targetHeight: number().int().positive().optional()
12234
12383
  }).readonly();
12235
12384
  var PickedCamStreamSchema = object({
12236
12385
  camStreamId: string(),
12237
12386
  codec: string().optional(),
12238
12387
  resolution: CamStreamResolutionSchema.optional(),
12388
+ /**
12389
+ * Whether serving this stream requires a decode + re-encode.
12390
+ *
12391
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12392
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12393
+ * not ask cannot be handed a cost it never agreed to pay.
12394
+ */
12395
+ transcodes: boolean(),
12239
12396
  /** One-line explanation of why this stream won — for logs / debug UI. */
12240
12397
  reason: string()
12241
12398
  });
@@ -16671,6 +16828,8 @@ var NcSystemEventKindSchema = _enum([
16671
16828
  "device-enabled",
16672
16829
  "device-battery-low",
16673
16830
  "device-battery-normal",
16831
+ "device-consumable-low",
16832
+ "device-consumable-normal",
16674
16833
  "stream-online",
16675
16834
  "stream-offline",
16676
16835
  "node-online",
@@ -16689,6 +16848,7 @@ var NcSystemEventKindSchema = _enum([
16689
16848
  "addon-updated",
16690
16849
  "server-updated",
16691
16850
  "export-completed",
16851
+ "backup-completed",
16692
16852
  "camera-online",
16693
16853
  "camera-offline",
16694
16854
  "camera-disabled",
@@ -20125,13 +20285,109 @@ var SummariesQueryInput = object({
20125
20285
  deviceIds: array(number()).min(1),
20126
20286
  since: number().optional(),
20127
20287
  until: number().optional(),
20128
- limit: number().int().min(1).max(200).default(50)
20288
+ limit: number().int().min(1).max(200).default(50),
20289
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
20290
+ * meaning of "dog" on every summary surface. */
20291
+ classes: array(string().min(1).max(60)).max(40).optional()
20129
20292
  });
20130
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
20131
20293
  var SummaryDetailSchema = object({
20132
20294
  summary: SummarySchema,
20133
- /** Member track ids, in absorption order. */
20134
- trackIds: array(string()).readonly()
20295
+ /** Members in absorption order, oldest join first. */
20296
+ members: array(object({
20297
+ trackId: string(),
20298
+ /**
20299
+ * The track's class at the time it JOINED, or `null` when it was unresolved
20300
+ * and the track no longer exists to fill it.
20301
+ *
20302
+ * The join, not the latest opinion: class voting can re-decide a track's
20303
+ * class afterwards, and a group's composition is the history of who came
20304
+ * together. A consumer counts these to badge a thumbnail — "two people and a
20305
+ * dog" — rather than being handed a second, denormalised tally that would
20306
+ * drift from the members it claims to describe.
20307
+ */
20308
+ className: string().nullable(),
20309
+ /** `primary` is the one member that carries the group's identity. */
20310
+ role: _enum([
20311
+ "primary",
20312
+ "sibling",
20313
+ "child"
20314
+ ]).nullable(),
20315
+ joinedAt: number(),
20316
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
20317
+ * at read time. Absent when nothing resolved, never an empty string. */
20318
+ label: string().optional(),
20319
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
20320
+ * recognised nobody, and absent for a member whose track has been pruned —
20321
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
20322
+ subLabel: string().optional()
20323
+ })).readonly()
20324
+ });
20325
+ /**
20326
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
20327
+ *
20328
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
20329
+ * we extend when we notice we need more". Enough to draw the card ("two people
20330
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
20331
+ * are on {@link getSummary}: shipping every member of every group so a client
20332
+ * can count them turns a page of two hundred groups into a thousand records to
20333
+ * draw two hundred badges.
20334
+ */
20335
+ var SummaryListItemSchema = object({
20336
+ summary: SummarySchema,
20337
+ /** Class counts, most numerous first; `className: null` is a member whose
20338
+ * class never resolved, counted so the counts add up to `memberCount`. */
20339
+ classes: array(object({
20340
+ className: string().nullable(),
20341
+ count: number().int().positive()
20342
+ })).readonly()
20343
+ });
20344
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
20345
+ /**
20346
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
20347
+ *
20348
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
20349
+ * summaries feed that could only answer "the last N for these cameras"
20350
+ * (`listSummaries`) would make groups available in the timeline and nowhere
20351
+ * else. Two feeds with different ordering contracts would be two ideas of what
20352
+ * "newest" means, on one screen.
20353
+ */
20354
+ var RecentSummariesQueryInput = object({
20355
+ /** Devices to merge. An empty array yields an empty page. */
20356
+ deviceIds: array(number()),
20357
+ /** Window lower bound on `lastActiveAt` (inclusive). */
20358
+ since: number().optional(),
20359
+ /** Window upper bound on `lastActiveAt` (inclusive). */
20360
+ until: number().optional(),
20361
+ limit: number().int().min(1).max(500).default(100),
20362
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
20363
+ cursor: string().optional(),
20364
+ /**
20365
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
20366
+ * deliberately the same name: the events filter tree emits one list of ticked
20367
+ * taxonomy nodes, and a summaries feed that called it something else would
20368
+ * make the operator's one filter component produce two shapes.
20369
+ *
20370
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
20371
+ * me the arrivals with a dog" has to return the group of four people who had
20372
+ * one with them; a filter on the group's own fields could only ever answer
20373
+ * about its primary.
20374
+ *
20375
+ * Matched against all THREE tiers of a member — the class (`animal`), the
20376
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
20377
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
20378
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
20379
+ * that read only the class would answer "animal" and never "dog".
20380
+ *
20381
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
20382
+ */
20383
+ classes: array(string().min(1).max(60)).max(40).optional()
20384
+ });
20385
+ var RecentSummariesPageSchema = object({
20386
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
20387
+ * {@link listSummaries} — one list shape, so a card renders the same
20388
+ * whichever feed drew it. */
20389
+ summaries: array(SummaryListItemSchema).readonly(),
20390
+ nextCursor: string().nullable()
20135
20391
  });
20136
20392
  var RecentTracksPageSchema = object({
20137
20393
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20545,7 +20801,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20545
20801
  classes: array(string()).optional(),
20546
20802
  /** See {@link ExcludeSourcesDoc}. */
20547
20803
  excludeSources: array(TrackSourceSchema).optional()
20548
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20804
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20549
20805
  kind: "mutation",
20550
20806
  auth: "admin"
20551
20807
  }), 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({
@@ -24022,10 +24278,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
24022
24278
  }), boolean()), method(object({
24023
24279
  deviceId: number().int().nonnegative(),
24024
24280
  sessionId: string()
24025
- }), object({ pendingRenegotiation: object({
24026
- target: WebrtcStreamTargetSchema,
24027
- epoch: number()
24028
- }).nullable() }));
24281
+ }), object({
24282
+ pendingRenegotiation: object({
24283
+ target: WebrtcStreamTargetSchema,
24284
+ epoch: number()
24285
+ }).nullable(),
24286
+ /**
24287
+ * Whether the session still EXISTS.
24288
+ *
24289
+ * A consumer that holds a resource for the life of a session needs to
24290
+ * be able to ask, because a session does not always end the way it
24291
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24292
+ * sent `SessionDisconnected`, so the Alexa exporter's
24293
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24294
+ * H.264 transcode kept running for NOBODY for more than twenty
24295
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24296
+ * minutes earlier — the broker knew; the holder had no way to ask.
24297
+ *
24298
+ * `false` for a session id the provider has never heard of, which is
24299
+ * the same answer as "it ended": either way nothing is holding it up.
24300
+ */
24301
+ alive: boolean()
24302
+ }));
24029
24303
  object({
24030
24304
  /** All accessory children of the parent. */
24031
24305
  childDeviceIds: array(number()).readonly(),
@@ -32446,7 +32720,29 @@ var LoggingSettingsPatchSchema = object({
32446
32720
  * disarmed the channels it did not mention would make the Levels page and
32447
32721
  * the Diagnostics page fight over the same value.
32448
32722
  */
32449
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
32723
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
32724
+ /**
32725
+ * How many days the analytics OPS LOG is kept — the audit trail of what
32726
+ * retention actually deleted.
32727
+ *
32728
+ * It lives HERE, on the logging document, and not on the analytics addon's
32729
+ * settings form, on the operator's instruction: every other log-ish window in
32730
+ * this system is configured through this one document, and a retention audit
32731
+ * configured somewhere else is a second place to look when the question is
32732
+ * "what happened to my data".
32733
+ *
32734
+ * That placement has a cost worth stating: this document ships in the
32735
+ * framework closure, so this knob needs a published `@camstack/server` while
32736
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
32737
+ *
32738
+ * `retention-model.ts` argued this one must NOT follow a device window,
32739
+ * because the audit trail is the history of the SWEEP and not of the camera.
32740
+ * That argument stands and is untouched — what changes is that 30 days stops
32741
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
32742
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
32743
+ * state in which the next 9.5 GiB leak cannot be explained.
32744
+ */
32745
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
32450
32746
  });
32451
32747
  /**
32452
32748
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -32519,6 +32815,14 @@ var LoggingSettingsStateSchema = object({
32519
32815
  channels: array(LogChannelDescriptorSchema).readonly(),
32520
32816
  /** The channels ARMED right now, each with its deadline. */
32521
32817
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
32818
+ /**
32819
+ * The ops-log window in days, as it is in force. `0` = kept forever.
32820
+ *
32821
+ * Reported rather than left to the caller's memory of what it wrote: this is
32822
+ * the value the analytics sweep will actually use, and an operator asking how
32823
+ * long their audit trail lives should not have to infer it from a default.
32824
+ */
32825
+ opsLogRetentionDays: number().int().min(0),
32522
32826
  persisted: boolean()
32523
32827
  });
32524
32828
  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(), {
@@ -33914,6 +34218,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33914
34218
  smoke: smokeCapability,
33915
34219
  streamCatalog: streamCatalogCapability,
33916
34220
  streamParams: streamParamsCapability,
34221
+ streamSignals: streamSignalsCapability,
33917
34222
  switch: switchCapability,
33918
34223
  tamper: tamperCapability,
33919
34224
  temperatureSensor: temperatureSensorCapability,
@@ -38101,6 +38406,12 @@ Object.freeze({
38101
38406
  addonId: null,
38102
38407
  access: "view"
38103
38408
  },
38409
+ "pipelineAnalytics.listRecentSummaries": {
38410
+ capName: "pipeline-analytics",
38411
+ capScope: "device",
38412
+ addonId: null,
38413
+ access: "view"
38414
+ },
38104
38415
  "pipelineAnalytics.listRecentTracks": {
38105
38416
  capName: "pipeline-analytics",
38106
38417
  capScope: "device",
@@ -40063,6 +40374,12 @@ Object.freeze({
40063
40374
  addonId: null,
40064
40375
  access: "create"
40065
40376
  },
40377
+ "streamBroker.reportStreamSignal": {
40378
+ capName: "stream-broker",
40379
+ capScope: "system",
40380
+ addonId: null,
40381
+ access: "create"
40382
+ },
40066
40383
  "streamBroker.restartProfile": {
40067
40384
  capName: "stream-broker",
40068
40385
  capScope: "system",
@@ -40147,6 +40464,12 @@ Object.freeze({
40147
40464
  addonId: null,
40148
40465
  access: "create"
40149
40466
  },
40467
+ "streamSignals.listSignals": {
40468
+ capName: "stream-signals",
40469
+ capScope: "device",
40470
+ addonId: null,
40471
+ access: "view"
40472
+ },
40150
40473
  "switch.setState": {
40151
40474
  capName: "switch",
40152
40475
  capScope: "device",
@@ -41928,6 +42251,11 @@ Object.freeze({
41928
42251
  form: "single",
41929
42252
  optional: true
41930
42253
  }],
42254
+ "pipelineAnalytics.listRecentSummaries": [{
42255
+ name: "deviceIds",
42256
+ form: "array",
42257
+ optional: false
42258
+ }],
41931
42259
  "pipelineAnalytics.listRecentTracks": [{
41932
42260
  name: "deviceIds",
41933
42261
  form: "array",
@@ -42514,6 +42842,11 @@ Object.freeze({
42514
42842
  form: "single",
42515
42843
  optional: false
42516
42844
  }],
42845
+ "streamBroker.reportStreamSignal": [{
42846
+ name: "deviceId",
42847
+ form: "single",
42848
+ optional: false
42849
+ }],
42517
42850
  "streamBroker.restartProfile": [{
42518
42851
  name: "deviceId",
42519
42852
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-terminal",
3
- "version": "0.1.105",
3
+ "version": "0.1.107",
4
4
  "description": "Interactive terminal sessions (pty + xterm) as a CamStack addon",
5
5
  "keywords": [
6
6
  "camstack",