@camstack/addon-post-analysis 1.2.233 → 1.2.235

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-ZyX6jcse.mjs
1
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -615,6 +615,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
615
615
  * pull-reconcile from the provider's `getStatus` on reconnect. */
616
616
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
617
617
  EventCategory["BackupCompleted"] = "backup.completed";
618
+ /**
619
+ * A whole backup RUN finished — every destination attempted, win or lose.
620
+ *
621
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
622
+ * a progress UI and the wrong one for a notification: an operator with three
623
+ * destinations would be told three times. And a run where two of three
624
+ * destinations succeeded is not a clean success — a single "backup
625
+ * completed" that hid the failed one would be a lie, so the count of each is
626
+ * carried here and the message says both.
627
+ *
628
+ * Emitted by the backup orchestrator only after the destination loop, so a
629
+ * run that dies during the BUILD phase produces no completion at all.
630
+ */
631
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
618
632
  EventCategory["BackupRestored"] = "backup.restored";
619
633
  EventCategory["NotificationDispatched"] = "notification.dispatched";
620
634
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5345,7 +5359,7 @@ var ZodIssueCode = {
5345
5359
  var ZodFirstPartyTypeKind;
5346
5360
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5347
5361
  //#endregion
5348
- //#region ../types/dist/sleep-DBKu2-U5.mjs
5362
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5349
5363
  /**
5350
5364
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5351
5365
  * window to float samples (D455).
@@ -7356,7 +7370,7 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
7356
7370
  * can answer "may a rule actuate this?" without importing the schema barrel
7357
7371
  * (~144MB RSS per runner, D28).
7358
7372
  *
7359
- * Coverage: 83 device-scoped capabilities.
7373
+ * Coverage: 84 device-scoped capabilities.
7360
7374
  */
7361
7375
  var DEVICE_SCOPED_CAPS = new Set([
7362
7376
  "accessories",
@@ -7428,6 +7442,7 @@ var DEVICE_SCOPED_CAPS = new Set([
7428
7442
  "snapshot",
7429
7443
  "stream-catalog",
7430
7444
  "stream-params",
7445
+ "stream-signals",
7431
7446
  "switch",
7432
7447
  "tamper",
7433
7448
  "temperature-sensor",
@@ -7579,7 +7594,23 @@ var EncodeProfileSchema = object({
7579
7594
  "zerolatency",
7580
7595
  "film",
7581
7596
  "animation"
7582
- ]).optional()
7597
+ ]).optional(),
7598
+ /**
7599
+ * ONE slice per access unit.
7600
+ *
7601
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7602
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7603
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7604
+ * frame-end per frame: the first pictures render and the video then freezes
7605
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7606
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7607
+ *
7608
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7609
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7610
+ * consumers meaning the same thing spelled differently would stop sharing one
7611
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7612
+ */
7613
+ singleSlicePerFrame: boolean().optional()
7583
7614
  }),
7584
7615
  audio: union([literal("passthrough"), object({
7585
7616
  codec: _enum([
@@ -7629,7 +7660,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7629
7660
  audio: "passthrough"
7630
7661
  };
7631
7662
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7632
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7663
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7633
7664
  /**
7634
7665
  * Deep wiring healthcheck — snapshot of active reachability probes across
7635
7666
  * every declared capability + widget of every installed plugin, on every
@@ -12057,6 +12088,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
12057
12088
  auth: "admin"
12058
12089
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
12059
12090
  DeviceType.Camera;
12091
+ /**
12092
+ * The signals a device can emit to WAKE its own stream.
12093
+ *
12094
+ * A camera whose stream is built on demand sleeps until something asks for it,
12095
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
12096
+ * puller holds a session open for ever, and treating that as demand would keep
12097
+ * a battery camera awake for ever, which is the whole thing the battery is for
12098
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
12099
+ * itself, with no stream running.
12100
+ *
12101
+ * ## The vocabulary is the PROVIDER'S, not ours
12102
+ *
12103
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
12104
+ * names each signal with a `code` it chooses and a `label` an operator reads.
12105
+ * Reolink offers motion and camera-native detection; another provider may offer
12106
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12107
+ * yet. A fixed enum here would mean every new signal is a framework release.
12108
+ *
12109
+ * It is deliberately NOT derived from the caps a device already binds. Whether
12110
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
12111
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12112
+ * binding — but both answer "what drives the detection pipeline", which is a
12113
+ * different question from "what may wake a sleeping stream". A camera can do
12114
+ * the first and not be trusted with the second, and the operator picks per
12115
+ * camera. Two questions, two authorities.
12116
+ *
12117
+ * ## Availability is not permission
12118
+ *
12119
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
12120
+ * wakes the stream is the operator's per-camera choice, held by the broker
12121
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
12122
+ * provider declaring a signal is not a provider enabling it.
12123
+ */
12124
+ /** One signal a device can emit. */
12125
+ var StreamSignalSchema = object({
12126
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12127
+ code: string().min(1),
12128
+ /** What an operator reads in the picker. The provider's own wording. */
12129
+ label: string().min(1),
12130
+ /**
12131
+ * Whether the provider recommends this signal ON when a camera is first set
12132
+ * up. A provider knows which of its signals are cheap and reliable; an
12133
+ * operator should not have to discover that by trial. Reolink recommends
12134
+ * both of its own.
12135
+ */
12136
+ recommended: boolean()
12137
+ });
12138
+ var StreamSignalsStatusSchema = object({
12139
+ signals: array(StreamSignalSchema),
12140
+ lastFetchedAt: number()
12141
+ });
12142
+ var streamSignalsCapability = {
12143
+ name: "stream-signals",
12144
+ scope: "device",
12145
+ deviceNative: true,
12146
+ mode: "singleton",
12147
+ deviceTypes: Object.values(DeviceType),
12148
+ runtimeState: StreamSignalsStatusSchema,
12149
+ methods: {
12150
+ /**
12151
+ * What this device can emit. Empty is a valid and common answer — most
12152
+ * cameras have nothing to offer here, and an empty list is what makes the
12153
+ * broker's picker show nothing rather than a false choice.
12154
+ */
12155
+ listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
12156
+ };
12060
12157
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12061
12158
  var StreamFormatSchema = _enum([
12062
12159
  "webrtc",
@@ -12453,6 +12550,22 @@ var EgressTranscodeSchema = object({
12453
12550
  camStreamId: string().nullable()
12454
12551
  });
12455
12552
  method(object({
12553
+ deviceId: number().int().nonnegative(),
12554
+ /** The provider's signal code. */
12555
+ code: string().min(1),
12556
+ /** Ms epoch. Absent ⇒ now. */
12557
+ at: number().optional()
12558
+ }), object({
12559
+ /** Whether the broker acted on it, and if not, why. */
12560
+ accepted: boolean(),
12561
+ reason: _enum([
12562
+ "woke",
12563
+ "hold-extended",
12564
+ "not-enabled",
12565
+ "no-consumer",
12566
+ "unknown-code"
12567
+ ])
12568
+ }), { kind: "mutation" }), method(object({
12456
12569
  deviceId: number().int().nonnegative(),
12457
12570
  camStreamId: string().min(1),
12458
12571
  kind: CamStreamKindSchema,
@@ -12707,6 +12820,16 @@ var PickStreamRequirementsSchema = object({
12707
12820
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
12708
12821
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
12709
12822
  minHeight: number().int().positive().optional(),
12823
+ /**
12824
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
12825
+ *
12826
+ * A consumer can have a ceiling as real as its floor: Alexa documents
12827
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
12828
+ * Without this the ceiling had to be re-implemented by every caller — and
12829
+ * one caller implementing it privately is how a second scoring authority
12830
+ * gets born.
12831
+ */
12832
+ maxHeight: number().int().positive().optional(),
12710
12833
  /** Minimum horizontal resolution. */
12711
12834
  minWidth: number().int().positive().optional(),
12712
12835
  /**
@@ -12723,7 +12846,22 @@ var PickStreamRequirementsSchema = object({
12723
12846
  * transcoded" guard: if the device is already serving the consumer's
12724
12847
  * codec end-to-end, there's nothing to optimise.
12725
12848
  */
12726
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
12849
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
12850
+ /**
12851
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
12852
+ * understanding that it will be transcoded.
12853
+ *
12854
+ * Default `false` — today's behaviour, and the right one for a bypass
12855
+ * question ("is there a stream I can forward untouched?"). Set `true` to
12856
+ * ask the larger question: "what is the best stream for me, transcoding if
12857
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
12858
+ * does not, so a passthrough is never lost to a transcode; the answer says
12859
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
12860
+ *
12861
+ * This is what lets one picker serve both the bypass and the full source
12862
+ * choice, instead of a consumer scoring privately when the bypass misses.
12863
+ */
12864
+ allowTranscode: boolean().optional()
12727
12865
  }).readonly();
12728
12866
  var PickStreamPreferencesSchema = object({
12729
12867
  /**
@@ -12737,12 +12875,32 @@ var PickStreamPreferencesSchema = object({
12737
12875
  * picks the tallest stream; `'lowest'` picks the shortest (used by
12738
12876
  * memory-constrained consumers / Apple Home guest sessions).
12739
12877
  */
12740
- resolutionPreference: _enum(["highest", "lowest"]).optional()
12878
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
12879
+ /**
12880
+ * The height the consumer actually wants to DELIVER.
12881
+ *
12882
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
12883
+ * above the target wins, and only if nothing reaches it does the tallest
12884
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
12885
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
12886
+ * express that: it says "as big as possible", which is a different wish.
12887
+ *
12888
+ * Ignored when absent, so every existing caller keeps its ordering.
12889
+ */
12890
+ targetHeight: number().int().positive().optional()
12741
12891
  }).readonly();
12742
12892
  var PickedCamStreamSchema = object({
12743
12893
  camStreamId: string(),
12744
12894
  codec: string().optional(),
12745
12895
  resolution: CamStreamResolutionSchema.optional(),
12896
+ /**
12897
+ * Whether serving this stream requires a decode + re-encode.
12898
+ *
12899
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
12900
+ * when the caller asked for it with `allowTranscode`, so a caller that did
12901
+ * not ask cannot be handed a cost it never agreed to pay.
12902
+ */
12903
+ transcodes: boolean(),
12746
12904
  /** One-line explanation of why this stream won — for logs / debug UI. */
12747
12905
  reason: string()
12748
12906
  });
@@ -17271,6 +17429,8 @@ var NcSystemEventKindSchema = _enum([
17271
17429
  "device-enabled",
17272
17430
  "device-battery-low",
17273
17431
  "device-battery-normal",
17432
+ "device-consumable-low",
17433
+ "device-consumable-normal",
17274
17434
  "stream-online",
17275
17435
  "stream-offline",
17276
17436
  "node-online",
@@ -17289,6 +17449,7 @@ var NcSystemEventKindSchema = _enum([
17289
17449
  "addon-updated",
17290
17450
  "server-updated",
17291
17451
  "export-completed",
17452
+ "backup-completed",
17292
17453
  "camera-online",
17293
17454
  "camera-offline",
17294
17455
  "camera-disabled",
@@ -18439,10 +18600,22 @@ var NC_CONDITION_CATALOG = [
18439
18600
  value: "server-updated",
18440
18601
  label: "Server updated"
18441
18602
  },
18603
+ {
18604
+ value: "device-consumable-low",
18605
+ label: "Consumable low"
18606
+ },
18607
+ {
18608
+ value: "device-consumable-normal",
18609
+ label: "Consumable replaced"
18610
+ },
18442
18611
  {
18443
18612
  value: "export-completed",
18444
18613
  label: "Export completed"
18445
18614
  },
18615
+ {
18616
+ value: "backup-completed",
18617
+ label: "Backup completed"
18618
+ },
18446
18619
  {
18447
18620
  value: "alarm-arming",
18448
18621
  label: "Alarm arming (exit delay)"
@@ -25854,10 +26027,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
25854
26027
  }), boolean()), method(object({
25855
26028
  deviceId: number().int().nonnegative(),
25856
26029
  sessionId: string()
25857
- }), object({ pendingRenegotiation: object({
25858
- target: WebrtcStreamTargetSchema,
25859
- epoch: number()
25860
- }).nullable() }));
26030
+ }), object({
26031
+ pendingRenegotiation: object({
26032
+ target: WebrtcStreamTargetSchema,
26033
+ epoch: number()
26034
+ }).nullable(),
26035
+ /**
26036
+ * Whether the session still EXISTS.
26037
+ *
26038
+ * A consumer that holds a resource for the life of a session needs to
26039
+ * be able to ask, because a session does not always end the way it
26040
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
26041
+ * sent `SessionDisconnected`, so the Alexa exporter's
26042
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
26043
+ * H.264 transcode kept running for NOBODY for more than twenty
26044
+ * minutes. The WebRTC session had logged `WebRTC session closed`
26045
+ * minutes earlier — the broker knew; the holder had no way to ask.
26046
+ *
26047
+ * `false` for a session id the provider has never heard of, which is
26048
+ * the same answer as "it ended": either way nothing is holding it up.
26049
+ */
26050
+ alive: boolean()
26051
+ }));
25861
26052
  object({
25862
26053
  /** All accessory children of the parent. */
25863
26054
  childDeviceIds: array(number()).readonly(),
@@ -36093,6 +36284,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
36093
36284
  smoke: smokeCapability,
36094
36285
  streamCatalog: streamCatalogCapability,
36095
36286
  streamParams: streamParamsCapability,
36287
+ streamSignals: streamSignalsCapability,
36096
36288
  switch: switchCapability,
36097
36289
  tamper: tamperCapability,
36098
36290
  temperatureSensor: temperatureSensorCapability,
@@ -42248,6 +42440,12 @@ Object.freeze({
42248
42440
  addonId: null,
42249
42441
  access: "create"
42250
42442
  },
42443
+ "streamBroker.reportStreamSignal": {
42444
+ capName: "stream-broker",
42445
+ capScope: "system",
42446
+ addonId: null,
42447
+ access: "create"
42448
+ },
42251
42449
  "streamBroker.restartProfile": {
42252
42450
  capName: "stream-broker",
42253
42451
  capScope: "system",
@@ -42332,6 +42530,12 @@ Object.freeze({
42332
42530
  addonId: null,
42333
42531
  access: "create"
42334
42532
  },
42533
+ "streamSignals.listSignals": {
42534
+ capName: "stream-signals",
42535
+ capScope: "device",
42536
+ addonId: null,
42537
+ access: "view"
42538
+ },
42335
42539
  "switch.setState": {
42336
42540
  capName: "switch",
42337
42541
  capScope: "device",
@@ -44704,6 +44908,11 @@ Object.freeze({
44704
44908
  form: "single",
44705
44909
  optional: false
44706
44910
  }],
44911
+ "streamBroker.reportStreamSignal": [{
44912
+ name: "deviceId",
44913
+ form: "single",
44914
+ optional: false
44915
+ }],
44707
44916
  "streamBroker.restartProfile": [{
44708
44917
  name: "deviceId",
44709
44918
  form: "single",