@camstack/addon-ai 0.4.106 → 0.4.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.
package/dist/addon.js CHANGED
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
12
12
  let node_fs_promises = require("node:fs/promises");
13
13
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
14
14
  let node_child_process = require("node:child_process");
15
- //#region ../types/dist/event-category-ZyX6jcse.mjs
15
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
16
16
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
17
17
  EventCategory["SystemBoot"] = "system.boot";
18
18
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -629,6 +629,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
629
629
  * pull-reconcile from the provider's `getStatus` on reconnect. */
630
630
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
631
631
  EventCategory["BackupCompleted"] = "backup.completed";
632
+ /**
633
+ * A whole backup RUN finished — every destination attempted, win or lose.
634
+ *
635
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
636
+ * a progress UI and the wrong one for a notification: an operator with three
637
+ * destinations would be told three times. And a run where two of three
638
+ * destinations succeeded is not a clean success — a single "backup
639
+ * completed" that hid the failed one would be a lie, so the count of each is
640
+ * carried here and the message says both.
641
+ *
642
+ * Emitted by the backup orchestrator only after the destination loop, so a
643
+ * run that dies during the BUILD phase produces no completion at all.
644
+ */
645
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
632
646
  EventCategory["BackupRestored"] = "backup.restored";
633
647
  EventCategory["NotificationDispatched"] = "notification.dispatched";
634
648
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5506,7 +5520,7 @@ function number(params) {
5506
5520
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
5507
5521
  }
5508
5522
  //#endregion
5509
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5523
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5510
5524
  /**
5511
5525
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5512
5526
  * window to float samples (D455).
@@ -11693,6 +11707,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11693
11707
  auth: "admin"
11694
11708
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11695
11709
  DeviceType.Camera;
11710
+ /**
11711
+ * The signals a device can emit to WAKE its own stream.
11712
+ *
11713
+ * A camera whose stream is built on demand sleeps until something asks for it,
11714
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11715
+ * puller holds a session open for ever, and treating that as demand would keep
11716
+ * a battery camera awake for ever, which is the whole thing the battery is for
11717
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11718
+ * itself, with no stream running.
11719
+ *
11720
+ * ## The vocabulary is the PROVIDER'S, not ours
11721
+ *
11722
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11723
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11724
+ * Reolink offers motion and camera-native detection; another provider may offer
11725
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11726
+ * yet. A fixed enum here would mean every new signal is a framework release.
11727
+ *
11728
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11729
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11730
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11731
+ * binding — but both answer "what drives the detection pipeline", which is a
11732
+ * different question from "what may wake a sleeping stream". A camera can do
11733
+ * the first and not be trusted with the second, and the operator picks per
11734
+ * camera. Two questions, two authorities.
11735
+ *
11736
+ * ## Availability is not permission
11737
+ *
11738
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11739
+ * wakes the stream is the operator's per-camera choice, held by the broker
11740
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11741
+ * provider declaring a signal is not a provider enabling it.
11742
+ */
11743
+ /** One signal a device can emit. */
11744
+ var StreamSignalSchema = object({
11745
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11746
+ code: string().min(1),
11747
+ /** What an operator reads in the picker. The provider's own wording. */
11748
+ label: string().min(1),
11749
+ /**
11750
+ * Whether the provider recommends this signal ON when a camera is first set
11751
+ * up. A provider knows which of its signals are cheap and reliable; an
11752
+ * operator should not have to discover that by trial. Reolink recommends
11753
+ * both of its own.
11754
+ */
11755
+ recommended: boolean()
11756
+ });
11757
+ object({
11758
+ signals: array(StreamSignalSchema),
11759
+ lastFetchedAt: number$1()
11760
+ });
11761
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11696
11762
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11697
11763
  var StreamFormatSchema = _enum([
11698
11764
  "webrtc",
@@ -12089,6 +12155,22 @@ var EgressTranscodeSchema = object({
12089
12155
  camStreamId: string().nullable()
12090
12156
  });
12091
12157
  method(object({
12158
+ deviceId: number$1().int().nonnegative(),
12159
+ /** The provider's signal code. */
12160
+ code: string().min(1),
12161
+ /** Ms epoch. Absent ⇒ now. */
12162
+ at: number$1().optional()
12163
+ }), object({
12164
+ /** Whether the broker acted on it, and if not, why. */
12165
+ accepted: boolean(),
12166
+ reason: _enum([
12167
+ "woke",
12168
+ "hold-extended",
12169
+ "not-enabled",
12170
+ "no-consumer",
12171
+ "unknown-code"
12172
+ ])
12173
+ }), { kind: "mutation" }), method(object({
12092
12174
  deviceId: number$1().int().nonnegative(),
12093
12175
  camStreamId: string().min(1),
12094
12176
  kind: CamStreamKindSchema,
@@ -12343,6 +12425,16 @@ var PickStreamRequirementsSchema = object({
12343
12425
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12344
12426
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12345
12427
  minHeight: number$1().int().positive().optional(),
12428
+ /**
12429
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12430
+ *
12431
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12432
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12433
+ * Without this the ceiling had to be re-implemented by every caller — and
12434
+ * one caller implementing it privately is how a second scoring authority
12435
+ * gets born.
12436
+ */
12437
+ maxHeight: number$1().int().positive().optional(),
12346
12438
  /** Minimum horizontal resolution. */
12347
12439
  minWidth: number$1().int().positive().optional(),
12348
12440
  /**
@@ -12359,7 +12451,22 @@ var PickStreamRequirementsSchema = object({
12359
12451
  * transcoded" guard: if the device is already serving the consumer's
12360
12452
  * codec end-to-end, there's nothing to optimise.
12361
12453
  */
12362
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12454
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12455
+ /**
12456
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12457
+ * understanding that it will be transcoded.
12458
+ *
12459
+ * Default `false` — today's behaviour, and the right one for a bypass
12460
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12461
+ * ask the larger question: "what is the best stream for me, transcoding if
12462
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12463
+ * does not, so a passthrough is never lost to a transcode; the answer says
12464
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12465
+ *
12466
+ * This is what lets one picker serve both the bypass and the full source
12467
+ * choice, instead of a consumer scoring privately when the bypass misses.
12468
+ */
12469
+ allowTranscode: boolean().optional()
12363
12470
  }).readonly();
12364
12471
  var PickStreamPreferencesSchema = object({
12365
12472
  /**
@@ -12373,12 +12480,32 @@ var PickStreamPreferencesSchema = object({
12373
12480
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12374
12481
  * memory-constrained consumers / Apple Home guest sessions).
12375
12482
  */
12376
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12483
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12484
+ /**
12485
+ * The height the consumer actually wants to DELIVER.
12486
+ *
12487
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12488
+ * above the target wins, and only if nothing reaches it does the tallest
12489
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12490
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12491
+ * express that: it says "as big as possible", which is a different wish.
12492
+ *
12493
+ * Ignored when absent, so every existing caller keeps its ordering.
12494
+ */
12495
+ targetHeight: number$1().int().positive().optional()
12377
12496
  }).readonly();
12378
12497
  var PickedCamStreamSchema = object({
12379
12498
  camStreamId: string(),
12380
12499
  codec: string().optional(),
12381
12500
  resolution: CamStreamResolutionSchema.optional(),
12501
+ /**
12502
+ * Whether serving this stream requires a decode + re-encode.
12503
+ *
12504
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12505
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12506
+ * not ask cannot be handed a cost it never agreed to pay.
12507
+ */
12508
+ transcodes: boolean(),
12382
12509
  /** One-line explanation of why this stream won — for logs / debug UI. */
12383
12510
  reason: string()
12384
12511
  });
@@ -16661,6 +16788,8 @@ var NcSystemEventKindSchema = _enum([
16661
16788
  "device-enabled",
16662
16789
  "device-battery-low",
16663
16790
  "device-battery-normal",
16791
+ "device-consumable-low",
16792
+ "device-consumable-normal",
16664
16793
  "stream-online",
16665
16794
  "stream-offline",
16666
16795
  "node-online",
@@ -16679,6 +16808,7 @@ var NcSystemEventKindSchema = _enum([
16679
16808
  "addon-updated",
16680
16809
  "server-updated",
16681
16810
  "export-completed",
16811
+ "backup-completed",
16682
16812
  "camera-online",
16683
16813
  "camera-offline",
16684
16814
  "camera-disabled",
@@ -23920,10 +24050,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
23920
24050
  }), boolean()), method(object({
23921
24051
  deviceId: number$1().int().nonnegative(),
23922
24052
  sessionId: string()
23923
- }), object({ pendingRenegotiation: object({
23924
- target: WebrtcStreamTargetSchema,
23925
- epoch: number$1()
23926
- }).nullable() }));
24053
+ }), object({
24054
+ pendingRenegotiation: object({
24055
+ target: WebrtcStreamTargetSchema,
24056
+ epoch: number$1()
24057
+ }).nullable(),
24058
+ /**
24059
+ * Whether the session still EXISTS.
24060
+ *
24061
+ * A consumer that holds a resource for the life of a session needs to
24062
+ * be able to ask, because a session does not always end the way it
24063
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24064
+ * sent `SessionDisconnected`, so the Alexa exporter's
24065
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24066
+ * H.264 transcode kept running for NOBODY for more than twenty
24067
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24068
+ * minutes earlier — the broker knew; the holder had no way to ask.
24069
+ *
24070
+ * `false` for a session id the provider has never heard of, which is
24071
+ * the same answer as "it ended": either way nothing is holding it up.
24072
+ */
24073
+ alive: boolean()
24074
+ }));
23927
24075
  object({
23928
24076
  /** All accessory children of the parent. */
23929
24077
  childDeviceIds: array(number$1()).readonly(),
@@ -36427,6 +36575,12 @@ Object.freeze({
36427
36575
  addonId: null,
36428
36576
  access: "create"
36429
36577
  },
36578
+ "streamBroker.reportStreamSignal": {
36579
+ capName: "stream-broker",
36580
+ capScope: "system",
36581
+ addonId: null,
36582
+ access: "create"
36583
+ },
36430
36584
  "streamBroker.restartProfile": {
36431
36585
  capName: "stream-broker",
36432
36586
  capScope: "system",
@@ -36511,6 +36665,12 @@ Object.freeze({
36511
36665
  addonId: null,
36512
36666
  access: "create"
36513
36667
  },
36668
+ "streamSignals.listSignals": {
36669
+ capName: "stream-signals",
36670
+ capScope: "device",
36671
+ addonId: null,
36672
+ access: "view"
36673
+ },
36514
36674
  "switch.setState": {
36515
36675
  capName: "switch",
36516
36676
  capScope: "device",
@@ -38883,6 +39043,11 @@ Object.freeze({
38883
39043
  form: "single",
38884
39044
  optional: false
38885
39045
  }],
39046
+ "streamBroker.reportStreamSignal": [{
39047
+ name: "deviceId",
39048
+ form: "single",
39049
+ optional: false
39050
+ }],
38886
39051
  "streamBroker.restartProfile": [{
38887
39052
  name: "deviceId",
38888
39053
  form: "single",
package/dist/addon.mjs CHANGED
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  }) : target, mod));
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-ZyX6jcse.mjs
42
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -656,6 +656,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
656
656
  * pull-reconcile from the provider's `getStatus` on reconnect. */
657
657
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
658
658
  EventCategory["BackupCompleted"] = "backup.completed";
659
+ /**
660
+ * A whole backup RUN finished — every destination attempted, win or lose.
661
+ *
662
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
663
+ * a progress UI and the wrong one for a notification: an operator with three
664
+ * destinations would be told three times. And a run where two of three
665
+ * destinations succeeded is not a clean success — a single "backup
666
+ * completed" that hid the failed one would be a lie, so the count of each is
667
+ * carried here and the message says both.
668
+ *
669
+ * Emitted by the backup orchestrator only after the destination loop, so a
670
+ * run that dies during the BUILD phase produces no completion at all.
671
+ */
672
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
659
673
  EventCategory["BackupRestored"] = "backup.restored";
660
674
  EventCategory["NotificationDispatched"] = "notification.dispatched";
661
675
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5533,7 +5547,7 @@ function number(params) {
5533
5547
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
5534
5548
  }
5535
5549
  //#endregion
5536
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5550
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5537
5551
  /**
5538
5552
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5539
5553
  * window to float samples (D455).
@@ -11720,6 +11734,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11720
11734
  auth: "admin"
11721
11735
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11722
11736
  DeviceType.Camera;
11737
+ /**
11738
+ * The signals a device can emit to WAKE its own stream.
11739
+ *
11740
+ * A camera whose stream is built on demand sleeps until something asks for it,
11741
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
11742
+ * puller holds a session open for ever, and treating that as demand would keep
11743
+ * a battery camera awake for ever, which is the whole thing the battery is for
11744
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
11745
+ * itself, with no stream running.
11746
+ *
11747
+ * ## The vocabulary is the PROVIDER'S, not ours
11748
+ *
11749
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
11750
+ * names each signal with a `code` it chooses and a `label` an operator reads.
11751
+ * Reolink offers motion and camera-native detection; another provider may offer
11752
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11753
+ * yet. A fixed enum here would mean every new signal is a framework release.
11754
+ *
11755
+ * It is deliberately NOT derived from the caps a device already binds. Whether
11756
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
11757
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11758
+ * binding — but both answer "what drives the detection pipeline", which is a
11759
+ * different question from "what may wake a sleeping stream". A camera can do
11760
+ * the first and not be trusted with the second, and the operator picks per
11761
+ * camera. Two questions, two authorities.
11762
+ *
11763
+ * ## Availability is not permission
11764
+ *
11765
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
11766
+ * wakes the stream is the operator's per-camera choice, held by the broker
11767
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
11768
+ * provider declaring a signal is not a provider enabling it.
11769
+ */
11770
+ /** One signal a device can emit. */
11771
+ var StreamSignalSchema = object({
11772
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11773
+ code: string().min(1),
11774
+ /** What an operator reads in the picker. The provider's own wording. */
11775
+ label: string().min(1),
11776
+ /**
11777
+ * Whether the provider recommends this signal ON when a camera is first set
11778
+ * up. A provider knows which of its signals are cheap and reliable; an
11779
+ * operator should not have to discover that by trial. Reolink recommends
11780
+ * both of its own.
11781
+ */
11782
+ recommended: boolean()
11783
+ });
11784
+ object({
11785
+ signals: array(StreamSignalSchema),
11786
+ lastFetchedAt: number$1()
11787
+ });
11788
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11723
11789
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11724
11790
  var StreamFormatSchema = _enum([
11725
11791
  "webrtc",
@@ -12116,6 +12182,22 @@ var EgressTranscodeSchema = object({
12116
12182
  camStreamId: string().nullable()
12117
12183
  });
12118
12184
  method(object({
12185
+ deviceId: number$1().int().nonnegative(),
12186
+ /** The provider's signal code. */
12187
+ code: string().min(1),
12188
+ /** Ms epoch. Absent ⇒ now. */
12189
+ at: number$1().optional()
12190
+ }), object({
12191
+ /** Whether the broker acted on it, and if not, why. */
12192
+ accepted: boolean(),
12193
+ reason: _enum([
12194
+ "woke",
12195
+ "hold-extended",
12196
+ "not-enabled",
12197
+ "no-consumer",
12198
+ "unknown-code"
12199
+ ])
12200
+ }), { kind: "mutation" }), method(object({
12119
12201
  deviceId: number$1().int().nonnegative(),
12120
12202
  camStreamId: string().min(1),
12121
12203
  kind: CamStreamKindSchema,
@@ -12370,6 +12452,16 @@ var PickStreamRequirementsSchema = object({
12370
12452
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12371
12453
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12372
12454
  minHeight: number$1().int().positive().optional(),
12455
+ /**
12456
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12457
+ *
12458
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12459
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12460
+ * Without this the ceiling had to be re-implemented by every caller — and
12461
+ * one caller implementing it privately is how a second scoring authority
12462
+ * gets born.
12463
+ */
12464
+ maxHeight: number$1().int().positive().optional(),
12373
12465
  /** Minimum horizontal resolution. */
12374
12466
  minWidth: number$1().int().positive().optional(),
12375
12467
  /**
@@ -12386,7 +12478,22 @@ var PickStreamRequirementsSchema = object({
12386
12478
  * transcoded" guard: if the device is already serving the consumer's
12387
12479
  * codec end-to-end, there's nothing to optimise.
12388
12480
  */
12389
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12481
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12482
+ /**
12483
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12484
+ * understanding that it will be transcoded.
12485
+ *
12486
+ * Default `false` — today's behaviour, and the right one for a bypass
12487
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12488
+ * ask the larger question: "what is the best stream for me, transcoding if
12489
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12490
+ * does not, so a passthrough is never lost to a transcode; the answer says
12491
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12492
+ *
12493
+ * This is what lets one picker serve both the bypass and the full source
12494
+ * choice, instead of a consumer scoring privately when the bypass misses.
12495
+ */
12496
+ allowTranscode: boolean().optional()
12390
12497
  }).readonly();
12391
12498
  var PickStreamPreferencesSchema = object({
12392
12499
  /**
@@ -12400,12 +12507,32 @@ var PickStreamPreferencesSchema = object({
12400
12507
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12401
12508
  * memory-constrained consumers / Apple Home guest sessions).
12402
12509
  */
12403
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12510
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12511
+ /**
12512
+ * The height the consumer actually wants to DELIVER.
12513
+ *
12514
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12515
+ * above the target wins, and only if nothing reaches it does the tallest
12516
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12517
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12518
+ * express that: it says "as big as possible", which is a different wish.
12519
+ *
12520
+ * Ignored when absent, so every existing caller keeps its ordering.
12521
+ */
12522
+ targetHeight: number$1().int().positive().optional()
12404
12523
  }).readonly();
12405
12524
  var PickedCamStreamSchema = object({
12406
12525
  camStreamId: string(),
12407
12526
  codec: string().optional(),
12408
12527
  resolution: CamStreamResolutionSchema.optional(),
12528
+ /**
12529
+ * Whether serving this stream requires a decode + re-encode.
12530
+ *
12531
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12532
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12533
+ * not ask cannot be handed a cost it never agreed to pay.
12534
+ */
12535
+ transcodes: boolean(),
12409
12536
  /** One-line explanation of why this stream won — for logs / debug UI. */
12410
12537
  reason: string()
12411
12538
  });
@@ -16688,6 +16815,8 @@ var NcSystemEventKindSchema = _enum([
16688
16815
  "device-enabled",
16689
16816
  "device-battery-low",
16690
16817
  "device-battery-normal",
16818
+ "device-consumable-low",
16819
+ "device-consumable-normal",
16691
16820
  "stream-online",
16692
16821
  "stream-offline",
16693
16822
  "node-online",
@@ -16706,6 +16835,7 @@ var NcSystemEventKindSchema = _enum([
16706
16835
  "addon-updated",
16707
16836
  "server-updated",
16708
16837
  "export-completed",
16838
+ "backup-completed",
16709
16839
  "camera-online",
16710
16840
  "camera-offline",
16711
16841
  "camera-disabled",
@@ -23947,10 +24077,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
23947
24077
  }), boolean()), method(object({
23948
24078
  deviceId: number$1().int().nonnegative(),
23949
24079
  sessionId: string()
23950
- }), object({ pendingRenegotiation: object({
23951
- target: WebrtcStreamTargetSchema,
23952
- epoch: number$1()
23953
- }).nullable() }));
24080
+ }), object({
24081
+ pendingRenegotiation: object({
24082
+ target: WebrtcStreamTargetSchema,
24083
+ epoch: number$1()
24084
+ }).nullable(),
24085
+ /**
24086
+ * Whether the session still EXISTS.
24087
+ *
24088
+ * A consumer that holds a resource for the life of a session needs to
24089
+ * be able to ask, because a session does not always end the way it
24090
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
24091
+ * sent `SessionDisconnected`, so the Alexa exporter's
24092
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
24093
+ * H.264 transcode kept running for NOBODY for more than twenty
24094
+ * minutes. The WebRTC session had logged `WebRTC session closed`
24095
+ * minutes earlier — the broker knew; the holder had no way to ask.
24096
+ *
24097
+ * `false` for a session id the provider has never heard of, which is
24098
+ * the same answer as "it ended": either way nothing is holding it up.
24099
+ */
24100
+ alive: boolean()
24101
+ }));
23954
24102
  object({
23955
24103
  /** All accessory children of the parent. */
23956
24104
  childDeviceIds: array(number$1()).readonly(),
@@ -36454,6 +36602,12 @@ Object.freeze({
36454
36602
  addonId: null,
36455
36603
  access: "create"
36456
36604
  },
36605
+ "streamBroker.reportStreamSignal": {
36606
+ capName: "stream-broker",
36607
+ capScope: "system",
36608
+ addonId: null,
36609
+ access: "create"
36610
+ },
36457
36611
  "streamBroker.restartProfile": {
36458
36612
  capName: "stream-broker",
36459
36613
  capScope: "system",
@@ -36538,6 +36692,12 @@ Object.freeze({
36538
36692
  addonId: null,
36539
36693
  access: "create"
36540
36694
  },
36695
+ "streamSignals.listSignals": {
36696
+ capName: "stream-signals",
36697
+ capScope: "device",
36698
+ addonId: null,
36699
+ access: "view"
36700
+ },
36541
36701
  "switch.setState": {
36542
36702
  capName: "switch",
36543
36703
  capScope: "device",
@@ -38910,6 +39070,11 @@ Object.freeze({
38910
39070
  form: "single",
38911
39071
  optional: false
38912
39072
  }],
39073
+ "streamBroker.reportStreamSignal": [{
39074
+ name: "deviceId",
39075
+ form: "single",
39076
+ optional: false
39077
+ }],
38913
39078
  "streamBroker.restartProfile": [{
38914
39079
  name: "deviceId",
38915
39080
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.106",
3
+ "version": "0.4.107",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",