@camstack/addon-agent-ui 1.2.106 → 1.2.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 (2) hide show
  1. package/dist/addon.js +174 -9
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
- //#region ../types/dist/event-category-ZyX6jcse.mjs
3
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -617,6 +617,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
617
617
  * pull-reconcile from the provider's `getStatus` on reconnect. */
618
618
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
619
619
  EventCategory["BackupCompleted"] = "backup.completed";
620
+ /**
621
+ * A whole backup RUN finished — every destination attempted, win or lose.
622
+ *
623
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
624
+ * a progress UI and the wrong one for a notification: an operator with three
625
+ * destinations would be told three times. And a run where two of three
626
+ * destinations succeeded is not a clean success — a single "backup
627
+ * completed" that hid the failed one would be a lie, so the count of each is
628
+ * carried here and the message says both.
629
+ *
630
+ * Emitted by the backup orchestrator only after the destination loop, so a
631
+ * run that dies during the BUILD phase produces no completion at all.
632
+ */
633
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
620
634
  EventCategory["BackupRestored"] = "backup.restored";
621
635
  EventCategory["NotificationDispatched"] = "notification.dispatched";
622
636
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5347,7 +5361,7 @@ var ZodIssueCode = {
5347
5361
  var ZodFirstPartyTypeKind;
5348
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5349
5363
  //#endregion
5350
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5364
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5351
5365
  /**
5352
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5353
5367
  * window to float samples (D455).
@@ -11493,6 +11507,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11493
11507
  auth: "admin"
11494
11508
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11495
11509
  DeviceType.Camera;
11510
+ /**
11511
+ * The signals a device can emit to WAKE its own stream.
11512
+ *
11513
+ * A camera whose stream is built on demand sleeps until something asks for it,
11514
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11515
+ * puller holds a session open for ever, and treating that as demand would keep
11516
+ * a battery camera awake for ever, which is the whole thing the battery is for
11517
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11518
+ * itself, with no stream running.
11519
+ *
11520
+ * ## The vocabulary is the PROVIDER'S, not ours
11521
+ *
11522
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11523
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11524
+ * Reolink offers motion and camera-native detection; another provider may offer
11525
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11526
+ * yet. A fixed enum here would mean every new signal is a framework release.
11527
+ *
11528
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11529
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11530
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11531
+ * binding — but both answer "what drives the detection pipeline", which is a
11532
+ * different question from "what may wake a sleeping stream". A camera can do
11533
+ * the first and not be trusted with the second, and the operator picks per
11534
+ * camera. Two questions, two authorities.
11535
+ *
11536
+ * ## Availability is not permission
11537
+ *
11538
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11539
+ * wakes the stream is the operator's per-camera choice, held by the broker
11540
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11541
+ * provider declaring a signal is not a provider enabling it.
11542
+ */
11543
+ /** One signal a device can emit. */
11544
+ var StreamSignalSchema = object({
11545
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11546
+ code: string().min(1),
11547
+ /** What an operator reads in the picker. The provider's own wording. */
11548
+ label: string().min(1),
11549
+ /**
11550
+ * Whether the provider recommends this signal ON when a camera is first set
11551
+ * up. A provider knows which of its signals are cheap and reliable; an
11552
+ * operator should not have to discover that by trial. Reolink recommends
11553
+ * both of its own.
11554
+ */
11555
+ recommended: boolean()
11556
+ });
11557
+ object({
11558
+ signals: array(StreamSignalSchema),
11559
+ lastFetchedAt: number()
11560
+ });
11561
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11496
11562
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11497
11563
  var StreamFormatSchema = _enum([
11498
11564
  "webrtc",
@@ -11889,6 +11955,22 @@ var EgressTranscodeSchema = object({
11889
11955
  camStreamId: string().nullable()
11890
11956
  });
11891
11957
  method(object({
11958
+ deviceId: number().int().nonnegative(),
11959
+ /** The provider's signal code. */
11960
+ code: string().min(1),
11961
+ /** Ms epoch. Absent ⇒ now. */
11962
+ at: number().optional()
11963
+ }), object({
11964
+ /** Whether the broker acted on it, and if not, why. */
11965
+ accepted: boolean(),
11966
+ reason: _enum([
11967
+ "woke",
11968
+ "hold-extended",
11969
+ "not-enabled",
11970
+ "no-consumer",
11971
+ "unknown-code"
11972
+ ])
11973
+ }), { kind: "mutation" }), method(object({
11892
11974
  deviceId: number().int().nonnegative(),
11893
11975
  camStreamId: string().min(1),
11894
11976
  kind: CamStreamKindSchema,
@@ -12143,6 +12225,16 @@ var PickStreamRequirementsSchema = object({
12143
12225
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12144
12226
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12145
12227
  minHeight: number().int().positive().optional(),
12228
+ /**
12229
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12230
+ *
12231
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12232
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12233
+ * Without this the ceiling had to be re-implemented by every caller — and
12234
+ * one caller implementing it privately is how a second scoring authority
12235
+ * gets born.
12236
+ */
12237
+ maxHeight: number().int().positive().optional(),
12146
12238
  /** Minimum horizontal resolution. */
12147
12239
  minWidth: number().int().positive().optional(),
12148
12240
  /**
@@ -12159,7 +12251,22 @@ var PickStreamRequirementsSchema = object({
12159
12251
  * transcoded" guard: if the device is already serving the consumer's
12160
12252
  * codec end-to-end, there's nothing to optimise.
12161
12253
  */
12162
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12254
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12255
+ /**
12256
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12257
+ * understanding that it will be transcoded.
12258
+ *
12259
+ * Default `false` — today's behaviour, and the right one for a bypass
12260
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12261
+ * ask the larger question: "what is the best stream for me, transcoding if
12262
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12263
+ * does not, so a passthrough is never lost to a transcode; the answer says
12264
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12265
+ *
12266
+ * This is what lets one picker serve both the bypass and the full source
12267
+ * choice, instead of a consumer scoring privately when the bypass misses.
12268
+ */
12269
+ allowTranscode: boolean().optional()
12163
12270
  }).readonly();
12164
12271
  var PickStreamPreferencesSchema = object({
12165
12272
  /**
@@ -12173,12 +12280,32 @@ var PickStreamPreferencesSchema = object({
12173
12280
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12174
12281
  * memory-constrained consumers / Apple Home guest sessions).
12175
12282
  */
12176
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12283
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12284
+ /**
12285
+ * The height the consumer actually wants to DELIVER.
12286
+ *
12287
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12288
+ * above the target wins, and only if nothing reaches it does the tallest
12289
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12290
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12291
+ * express that: it says "as big as possible", which is a different wish.
12292
+ *
12293
+ * Ignored when absent, so every existing caller keeps its ordering.
12294
+ */
12295
+ targetHeight: number().int().positive().optional()
12177
12296
  }).readonly();
12178
12297
  var PickedCamStreamSchema = object({
12179
12298
  camStreamId: string(),
12180
12299
  codec: string().optional(),
12181
12300
  resolution: CamStreamResolutionSchema.optional(),
12301
+ /**
12302
+ * Whether serving this stream requires a decode + re-encode.
12303
+ *
12304
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12305
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12306
+ * not ask cannot be handed a cost it never agreed to pay.
12307
+ */
12308
+ transcodes: boolean(),
12182
12309
  /** One-line explanation of why this stream won — for logs / debug UI. */
12183
12310
  reason: string()
12184
12311
  });
@@ -16367,6 +16494,8 @@ var NcSystemEventKindSchema = _enum([
16367
16494
  "device-enabled",
16368
16495
  "device-battery-low",
16369
16496
  "device-battery-normal",
16497
+ "device-consumable-low",
16498
+ "device-consumable-normal",
16370
16499
  "stream-online",
16371
16500
  "stream-offline",
16372
16501
  "node-online",
@@ -16385,6 +16514,7 @@ var NcSystemEventKindSchema = _enum([
16385
16514
  "addon-updated",
16386
16515
  "server-updated",
16387
16516
  "export-completed",
16517
+ "backup-completed",
16388
16518
  "camera-online",
16389
16519
  "camera-offline",
16390
16520
  "camera-disabled",
@@ -23626,10 +23756,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
23626
23756
  }), boolean()), method(object({
23627
23757
  deviceId: number().int().nonnegative(),
23628
23758
  sessionId: string()
23629
- }), object({ pendingRenegotiation: object({
23630
- target: WebrtcStreamTargetSchema,
23631
- epoch: number()
23632
- }).nullable() }));
23759
+ }), object({
23760
+ pendingRenegotiation: object({
23761
+ target: WebrtcStreamTargetSchema,
23762
+ epoch: number()
23763
+ }).nullable(),
23764
+ /**
23765
+ * Whether the session still EXISTS.
23766
+ *
23767
+ * A consumer that holds a resource for the life of a session needs to
23768
+ * be able to ask, because a session does not always end the way it
23769
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
23770
+ * sent `SessionDisconnected`, so the Alexa exporter's
23771
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
23772
+ * H.264 transcode kept running for NOBODY for more than twenty
23773
+ * minutes. The WebRTC session had logged `WebRTC session closed`
23774
+ * minutes earlier — the broker knew; the holder had no way to ask.
23775
+ *
23776
+ * `false` for a session id the provider has never heard of, which is
23777
+ * the same answer as "it ended": either way nothing is holding it up.
23778
+ */
23779
+ alive: boolean()
23780
+ }));
23633
23781
  object({
23634
23782
  /** All accessory children of the parent. */
23635
23783
  childDeviceIds: array(number()).readonly(),
@@ -36133,6 +36281,12 @@ Object.freeze({
36133
36281
  addonId: null,
36134
36282
  access: "create"
36135
36283
  },
36284
+ "streamBroker.reportStreamSignal": {
36285
+ capName: "stream-broker",
36286
+ capScope: "system",
36287
+ addonId: null,
36288
+ access: "create"
36289
+ },
36136
36290
  "streamBroker.restartProfile": {
36137
36291
  capName: "stream-broker",
36138
36292
  capScope: "system",
@@ -36217,6 +36371,12 @@ Object.freeze({
36217
36371
  addonId: null,
36218
36372
  access: "create"
36219
36373
  },
36374
+ "streamSignals.listSignals": {
36375
+ capName: "stream-signals",
36376
+ capScope: "device",
36377
+ addonId: null,
36378
+ access: "view"
36379
+ },
36220
36380
  "switch.setState": {
36221
36381
  capName: "switch",
36222
36382
  capScope: "device",
@@ -38589,6 +38749,11 @@ Object.freeze({
38589
38749
  form: "single",
38590
38750
  optional: false
38591
38751
  }],
38752
+ "streamBroker.reportStreamSignal": [{
38753
+ name: "deviceId",
38754
+ form: "single",
38755
+ optional: false
38756
+ }],
38592
38757
  "streamBroker.restartProfile": [{
38593
38758
  name: "deviceId",
38594
38759
  form: "single",
@@ -39368,7 +39533,7 @@ var AgentUIAddon = class extends BaseAddon {
39368
39533
  capability: adminUiCapability,
39369
39534
  provider: {
39370
39535
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
39371
- getVersion: async () => ({ version: "1.2.106" })
39536
+ getVersion: async () => ({ version: "1.2.107" })
39372
39537
  }
39373
39538
  }];
39374
39539
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.106",
3
+ "version": "1.2.107",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",