@camstack/addon-provider-hikvision 1.2.108 → 1.2.110
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 +349 -16
- package/dist/addon.mjs +349 -16
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -6,7 +6,7 @@ let node_crypto = require("node:crypto");
|
|
|
6
6
|
let node_http = require("node:http");
|
|
7
7
|
let node_https = require("node:https");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
|
-
//#region ../types/dist/event-category-
|
|
9
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
10
10
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
11
11
|
EventCategory["SystemBoot"] = "system.boot";
|
|
12
12
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -623,6 +623,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
623
623
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
624
624
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
625
625
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
626
|
+
/**
|
|
627
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
628
|
+
*
|
|
629
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
630
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
631
|
+
* destinations would be told three times. And a run where two of three
|
|
632
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
633
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
634
|
+
* carried here and the message says both.
|
|
635
|
+
*
|
|
636
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
637
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
638
|
+
*/
|
|
639
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
626
640
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
627
641
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
628
642
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5353,7 +5367,7 @@ var ZodIssueCode = {
|
|
|
5353
5367
|
var ZodFirstPartyTypeKind;
|
|
5354
5368
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5355
5369
|
//#endregion
|
|
5356
|
-
//#region ../types/dist/sleep-
|
|
5370
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5357
5371
|
/**
|
|
5358
5372
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5359
5373
|
* window to float samples (D455).
|
|
@@ -7370,7 +7384,23 @@ var EncodeProfileSchema = object({
|
|
|
7370
7384
|
"zerolatency",
|
|
7371
7385
|
"film",
|
|
7372
7386
|
"animation"
|
|
7373
|
-
]).optional()
|
|
7387
|
+
]).optional(),
|
|
7388
|
+
/**
|
|
7389
|
+
* ONE slice per access unit.
|
|
7390
|
+
*
|
|
7391
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7392
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7393
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7394
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7395
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7396
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7397
|
+
*
|
|
7398
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7399
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7400
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7401
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7402
|
+
*/
|
|
7403
|
+
singleSlicePerFrame: boolean().optional()
|
|
7374
7404
|
}),
|
|
7375
7405
|
audio: union([literal("passthrough"), object({
|
|
7376
7406
|
codec: _enum([
|
|
@@ -7420,7 +7450,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7420
7450
|
audio: "passthrough"
|
|
7421
7451
|
};
|
|
7422
7452
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7423
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7453
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7424
7454
|
/**
|
|
7425
7455
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7426
7456
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11750,6 +11780,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11750
11780
|
auth: "admin"
|
|
11751
11781
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11752
11782
|
DeviceType.Camera;
|
|
11783
|
+
/**
|
|
11784
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11785
|
+
*
|
|
11786
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11787
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11788
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11789
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11790
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11791
|
+
* itself, with no stream running.
|
|
11792
|
+
*
|
|
11793
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11794
|
+
*
|
|
11795
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11796
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11797
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11798
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11799
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11800
|
+
*
|
|
11801
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11802
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11803
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11804
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11805
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11806
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11807
|
+
* camera. Two questions, two authorities.
|
|
11808
|
+
*
|
|
11809
|
+
* ## Availability is not permission
|
|
11810
|
+
*
|
|
11811
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11812
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11813
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11814
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11815
|
+
*/
|
|
11816
|
+
/** One signal a device can emit. */
|
|
11817
|
+
var StreamSignalSchema = object({
|
|
11818
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11819
|
+
code: string().min(1),
|
|
11820
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11821
|
+
label: string().min(1),
|
|
11822
|
+
/**
|
|
11823
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11824
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11825
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11826
|
+
* both of its own.
|
|
11827
|
+
*/
|
|
11828
|
+
recommended: boolean()
|
|
11829
|
+
});
|
|
11830
|
+
var StreamSignalsStatusSchema = object({
|
|
11831
|
+
signals: array(StreamSignalSchema),
|
|
11832
|
+
lastFetchedAt: number()
|
|
11833
|
+
});
|
|
11834
|
+
var streamSignalsCapability = {
|
|
11835
|
+
name: "stream-signals",
|
|
11836
|
+
scope: "device",
|
|
11837
|
+
deviceNative: true,
|
|
11838
|
+
mode: "singleton",
|
|
11839
|
+
deviceTypes: Object.values(DeviceType),
|
|
11840
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11841
|
+
methods: {
|
|
11842
|
+
/**
|
|
11843
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11844
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11845
|
+
* broker's picker show nothing rather than a false choice.
|
|
11846
|
+
*/
|
|
11847
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11848
|
+
};
|
|
11753
11849
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11754
11850
|
var StreamFormatSchema = _enum([
|
|
11755
11851
|
"webrtc",
|
|
@@ -12146,6 +12242,22 @@ var EgressTranscodeSchema = object({
|
|
|
12146
12242
|
camStreamId: string().nullable()
|
|
12147
12243
|
});
|
|
12148
12244
|
method(object({
|
|
12245
|
+
deviceId: number().int().nonnegative(),
|
|
12246
|
+
/** The provider's signal code. */
|
|
12247
|
+
code: string().min(1),
|
|
12248
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12249
|
+
at: number().optional()
|
|
12250
|
+
}), object({
|
|
12251
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12252
|
+
accepted: boolean(),
|
|
12253
|
+
reason: _enum([
|
|
12254
|
+
"woke",
|
|
12255
|
+
"hold-extended",
|
|
12256
|
+
"not-enabled",
|
|
12257
|
+
"no-consumer",
|
|
12258
|
+
"unknown-code"
|
|
12259
|
+
])
|
|
12260
|
+
}), { kind: "mutation" }), method(object({
|
|
12149
12261
|
deviceId: number().int().nonnegative(),
|
|
12150
12262
|
camStreamId: string().min(1),
|
|
12151
12263
|
kind: CamStreamKindSchema,
|
|
@@ -12400,6 +12512,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12400
12512
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12401
12513
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12402
12514
|
minHeight: number().int().positive().optional(),
|
|
12515
|
+
/**
|
|
12516
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12517
|
+
*
|
|
12518
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12519
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12520
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12521
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12522
|
+
* gets born.
|
|
12523
|
+
*/
|
|
12524
|
+
maxHeight: number().int().positive().optional(),
|
|
12403
12525
|
/** Minimum horizontal resolution. */
|
|
12404
12526
|
minWidth: number().int().positive().optional(),
|
|
12405
12527
|
/**
|
|
@@ -12416,7 +12538,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12416
12538
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12417
12539
|
* codec end-to-end, there's nothing to optimise.
|
|
12418
12540
|
*/
|
|
12419
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12541
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12542
|
+
/**
|
|
12543
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12544
|
+
* understanding that it will be transcoded.
|
|
12545
|
+
*
|
|
12546
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12547
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12548
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12549
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12550
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12551
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12552
|
+
*
|
|
12553
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12554
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12555
|
+
*/
|
|
12556
|
+
allowTranscode: boolean().optional()
|
|
12420
12557
|
}).readonly();
|
|
12421
12558
|
var PickStreamPreferencesSchema = object({
|
|
12422
12559
|
/**
|
|
@@ -12430,12 +12567,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12430
12567
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12431
12568
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12432
12569
|
*/
|
|
12433
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12570
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12571
|
+
/**
|
|
12572
|
+
* The height the consumer actually wants to DELIVER.
|
|
12573
|
+
*
|
|
12574
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12575
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12576
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12577
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12578
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12579
|
+
*
|
|
12580
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12581
|
+
*/
|
|
12582
|
+
targetHeight: number().int().positive().optional()
|
|
12434
12583
|
}).readonly();
|
|
12435
12584
|
var PickedCamStreamSchema = object({
|
|
12436
12585
|
camStreamId: string(),
|
|
12437
12586
|
codec: string().optional(),
|
|
12438
12587
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12588
|
+
/**
|
|
12589
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12590
|
+
*
|
|
12591
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12592
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12593
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12594
|
+
*/
|
|
12595
|
+
transcodes: boolean(),
|
|
12439
12596
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12440
12597
|
reason: string()
|
|
12441
12598
|
});
|
|
@@ -16983,6 +17140,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16983
17140
|
"device-enabled",
|
|
16984
17141
|
"device-battery-low",
|
|
16985
17142
|
"device-battery-normal",
|
|
17143
|
+
"device-consumable-low",
|
|
17144
|
+
"device-consumable-normal",
|
|
16986
17145
|
"stream-online",
|
|
16987
17146
|
"stream-offline",
|
|
16988
17147
|
"node-online",
|
|
@@ -17001,6 +17160,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17001
17160
|
"addon-updated",
|
|
17002
17161
|
"server-updated",
|
|
17003
17162
|
"export-completed",
|
|
17163
|
+
"backup-completed",
|
|
17004
17164
|
"camera-online",
|
|
17005
17165
|
"camera-offline",
|
|
17006
17166
|
"camera-disabled",
|
|
@@ -20437,13 +20597,109 @@ var SummariesQueryInput = object({
|
|
|
20437
20597
|
deviceIds: array(number()).min(1),
|
|
20438
20598
|
since: number().optional(),
|
|
20439
20599
|
until: number().optional(),
|
|
20440
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20600
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20601
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20602
|
+
* meaning of "dog" on every summary surface. */
|
|
20603
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20441
20604
|
});
|
|
20442
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20443
20605
|
var SummaryDetailSchema = object({
|
|
20444
20606
|
summary: SummarySchema,
|
|
20445
|
-
/**
|
|
20446
|
-
|
|
20607
|
+
/** Members in absorption order, oldest join first. */
|
|
20608
|
+
members: array(object({
|
|
20609
|
+
trackId: string(),
|
|
20610
|
+
/**
|
|
20611
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20612
|
+
* and the track no longer exists to fill it.
|
|
20613
|
+
*
|
|
20614
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20615
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20616
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20617
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20618
|
+
* drift from the members it claims to describe.
|
|
20619
|
+
*/
|
|
20620
|
+
className: string().nullable(),
|
|
20621
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20622
|
+
role: _enum([
|
|
20623
|
+
"primary",
|
|
20624
|
+
"sibling",
|
|
20625
|
+
"child"
|
|
20626
|
+
]).nullable(),
|
|
20627
|
+
joinedAt: number(),
|
|
20628
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20629
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20630
|
+
label: string().optional(),
|
|
20631
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20632
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20633
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20634
|
+
subLabel: string().optional()
|
|
20635
|
+
})).readonly()
|
|
20636
|
+
});
|
|
20637
|
+
/**
|
|
20638
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20639
|
+
*
|
|
20640
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20641
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20642
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20643
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20644
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20645
|
+
* draw two hundred badges.
|
|
20646
|
+
*/
|
|
20647
|
+
var SummaryListItemSchema = object({
|
|
20648
|
+
summary: SummarySchema,
|
|
20649
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20650
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20651
|
+
classes: array(object({
|
|
20652
|
+
className: string().nullable(),
|
|
20653
|
+
count: number().int().positive()
|
|
20654
|
+
})).readonly()
|
|
20655
|
+
});
|
|
20656
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20657
|
+
/**
|
|
20658
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20659
|
+
*
|
|
20660
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20661
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20662
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20663
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20664
|
+
* "newest" means, on one screen.
|
|
20665
|
+
*/
|
|
20666
|
+
var RecentSummariesQueryInput = object({
|
|
20667
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20668
|
+
deviceIds: array(number()),
|
|
20669
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20670
|
+
since: number().optional(),
|
|
20671
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20672
|
+
until: number().optional(),
|
|
20673
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20674
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20675
|
+
cursor: string().optional(),
|
|
20676
|
+
/**
|
|
20677
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20678
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20679
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20680
|
+
* make the operator's one filter component produce two shapes.
|
|
20681
|
+
*
|
|
20682
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20683
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20684
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20685
|
+
* about its primary.
|
|
20686
|
+
*
|
|
20687
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20688
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20689
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20690
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20691
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20692
|
+
*
|
|
20693
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20694
|
+
*/
|
|
20695
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20696
|
+
});
|
|
20697
|
+
var RecentSummariesPageSchema = object({
|
|
20698
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20699
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20700
|
+
* whichever feed drew it. */
|
|
20701
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20702
|
+
nextCursor: string().nullable()
|
|
20447
20703
|
});
|
|
20448
20704
|
var RecentTracksPageSchema = object({
|
|
20449
20705
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20857,7 +21113,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20857
21113
|
classes: array(string()).optional(),
|
|
20858
21114
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20859
21115
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20860
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21116
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20861
21117
|
kind: "mutation",
|
|
20862
21118
|
auth: "admin"
|
|
20863
21119
|
}), 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({
|
|
@@ -24290,10 +24546,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24290
24546
|
}), boolean()), method(object({
|
|
24291
24547
|
deviceId: number().int().nonnegative(),
|
|
24292
24548
|
sessionId: string()
|
|
24293
|
-
}), object({
|
|
24294
|
-
|
|
24295
|
-
|
|
24296
|
-
|
|
24549
|
+
}), object({
|
|
24550
|
+
pendingRenegotiation: object({
|
|
24551
|
+
target: WebrtcStreamTargetSchema,
|
|
24552
|
+
epoch: number()
|
|
24553
|
+
}).nullable(),
|
|
24554
|
+
/**
|
|
24555
|
+
* Whether the session still EXISTS.
|
|
24556
|
+
*
|
|
24557
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24558
|
+
* be able to ask, because a session does not always end the way it
|
|
24559
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24560
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24561
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24562
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24563
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24564
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24565
|
+
*
|
|
24566
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24567
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24568
|
+
*/
|
|
24569
|
+
alive: boolean()
|
|
24570
|
+
}));
|
|
24297
24571
|
object({
|
|
24298
24572
|
/** All accessory children of the parent. */
|
|
24299
24573
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -33070,7 +33344,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33070
33344
|
* disarmed the channels it did not mention would make the Levels page and
|
|
33071
33345
|
* the Diagnostics page fight over the same value.
|
|
33072
33346
|
*/
|
|
33073
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33347
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33348
|
+
/**
|
|
33349
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33350
|
+
* retention actually deleted.
|
|
33351
|
+
*
|
|
33352
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33353
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33354
|
+
* this system is configured through this one document, and a retention audit
|
|
33355
|
+
* configured somewhere else is a second place to look when the question is
|
|
33356
|
+
* "what happened to my data".
|
|
33357
|
+
*
|
|
33358
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33359
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33360
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33361
|
+
*
|
|
33362
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33363
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33364
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33365
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33366
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33367
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33368
|
+
*/
|
|
33369
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
33074
33370
|
});
|
|
33075
33371
|
/**
|
|
33076
33372
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -33143,6 +33439,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
33143
33439
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
33144
33440
|
/** The channels ARMED right now, each with its deadline. */
|
|
33145
33441
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33442
|
+
/**
|
|
33443
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33444
|
+
*
|
|
33445
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33446
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33447
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33448
|
+
*/
|
|
33449
|
+
opsLogRetentionDays: number().int().min(0),
|
|
33146
33450
|
persisted: boolean()
|
|
33147
33451
|
});
|
|
33148
33452
|
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(), {
|
|
@@ -34553,6 +34857,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34553
34857
|
smoke: smokeCapability,
|
|
34554
34858
|
streamCatalog: streamCatalogCapability,
|
|
34555
34859
|
streamParams: streamParamsCapability,
|
|
34860
|
+
streamSignals: streamSignalsCapability,
|
|
34556
34861
|
switch: switchCapability,
|
|
34557
34862
|
tamper: tamperCapability,
|
|
34558
34863
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39376,6 +39681,12 @@ Object.freeze({
|
|
|
39376
39681
|
addonId: null,
|
|
39377
39682
|
access: "view"
|
|
39378
39683
|
},
|
|
39684
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39685
|
+
capName: "pipeline-analytics",
|
|
39686
|
+
capScope: "device",
|
|
39687
|
+
addonId: null,
|
|
39688
|
+
access: "view"
|
|
39689
|
+
},
|
|
39379
39690
|
"pipelineAnalytics.listRecentTracks": {
|
|
39380
39691
|
capName: "pipeline-analytics",
|
|
39381
39692
|
capScope: "device",
|
|
@@ -41338,6 +41649,12 @@ Object.freeze({
|
|
|
41338
41649
|
addonId: null,
|
|
41339
41650
|
access: "create"
|
|
41340
41651
|
},
|
|
41652
|
+
"streamBroker.reportStreamSignal": {
|
|
41653
|
+
capName: "stream-broker",
|
|
41654
|
+
capScope: "system",
|
|
41655
|
+
addonId: null,
|
|
41656
|
+
access: "create"
|
|
41657
|
+
},
|
|
41341
41658
|
"streamBroker.restartProfile": {
|
|
41342
41659
|
capName: "stream-broker",
|
|
41343
41660
|
capScope: "system",
|
|
@@ -41422,6 +41739,12 @@ Object.freeze({
|
|
|
41422
41739
|
addonId: null,
|
|
41423
41740
|
access: "create"
|
|
41424
41741
|
},
|
|
41742
|
+
"streamSignals.listSignals": {
|
|
41743
|
+
capName: "stream-signals",
|
|
41744
|
+
capScope: "device",
|
|
41745
|
+
addonId: null,
|
|
41746
|
+
access: "view"
|
|
41747
|
+
},
|
|
41425
41748
|
"switch.setState": {
|
|
41426
41749
|
capName: "switch",
|
|
41427
41750
|
capScope: "device",
|
|
@@ -43203,6 +43526,11 @@ Object.freeze({
|
|
|
43203
43526
|
form: "single",
|
|
43204
43527
|
optional: true
|
|
43205
43528
|
}],
|
|
43529
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43530
|
+
name: "deviceIds",
|
|
43531
|
+
form: "array",
|
|
43532
|
+
optional: false
|
|
43533
|
+
}],
|
|
43206
43534
|
"pipelineAnalytics.listRecentTracks": [{
|
|
43207
43535
|
name: "deviceIds",
|
|
43208
43536
|
form: "array",
|
|
@@ -43789,6 +44117,11 @@ Object.freeze({
|
|
|
43789
44117
|
form: "single",
|
|
43790
44118
|
optional: false
|
|
43791
44119
|
}],
|
|
44120
|
+
"streamBroker.reportStreamSignal": [{
|
|
44121
|
+
name: "deviceId",
|
|
44122
|
+
form: "single",
|
|
44123
|
+
optional: false
|
|
44124
|
+
}],
|
|
43792
44125
|
"streamBroker.restartProfile": [{
|
|
43793
44126
|
name: "deviceId",
|
|
43794
44127
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { networkInterfaces } from "node:os";
|
|
|
7
7
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
8
8
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
9
|
//#endregion
|
|
10
|
-
//#region ../types/dist/event-category-
|
|
10
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
11
11
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
12
12
|
EventCategory["SystemBoot"] = "system.boot";
|
|
13
13
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -624,6 +624,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
624
624
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
625
625
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
626
626
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
627
|
+
/**
|
|
628
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
629
|
+
*
|
|
630
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
631
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
632
|
+
* destinations would be told three times. And a run where two of three
|
|
633
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
634
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
635
|
+
* carried here and the message says both.
|
|
636
|
+
*
|
|
637
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
638
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
639
|
+
*/
|
|
640
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
627
641
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
628
642
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
629
643
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5354,7 +5368,7 @@ var ZodIssueCode = {
|
|
|
5354
5368
|
var ZodFirstPartyTypeKind;
|
|
5355
5369
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5356
5370
|
//#endregion
|
|
5357
|
-
//#region ../types/dist/sleep-
|
|
5371
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5358
5372
|
/**
|
|
5359
5373
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5360
5374
|
* window to float samples (D455).
|
|
@@ -7371,7 +7385,23 @@ var EncodeProfileSchema = object({
|
|
|
7371
7385
|
"zerolatency",
|
|
7372
7386
|
"film",
|
|
7373
7387
|
"animation"
|
|
7374
|
-
]).optional()
|
|
7388
|
+
]).optional(),
|
|
7389
|
+
/**
|
|
7390
|
+
* ONE slice per access unit.
|
|
7391
|
+
*
|
|
7392
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7393
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7394
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7395
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7396
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7397
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7398
|
+
*
|
|
7399
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7400
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7401
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7402
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7403
|
+
*/
|
|
7404
|
+
singleSlicePerFrame: boolean().optional()
|
|
7375
7405
|
}),
|
|
7376
7406
|
audio: union([literal("passthrough"), object({
|
|
7377
7407
|
codec: _enum([
|
|
@@ -7421,7 +7451,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7421
7451
|
audio: "passthrough"
|
|
7422
7452
|
};
|
|
7423
7453
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7424
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7454
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7425
7455
|
/**
|
|
7426
7456
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7427
7457
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11751,6 +11781,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11751
11781
|
auth: "admin"
|
|
11752
11782
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11753
11783
|
DeviceType.Camera;
|
|
11784
|
+
/**
|
|
11785
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11786
|
+
*
|
|
11787
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11788
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11789
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11790
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11791
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11792
|
+
* itself, with no stream running.
|
|
11793
|
+
*
|
|
11794
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11795
|
+
*
|
|
11796
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11797
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11798
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11799
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11800
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11801
|
+
*
|
|
11802
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11803
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11804
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11805
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11806
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11807
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11808
|
+
* camera. Two questions, two authorities.
|
|
11809
|
+
*
|
|
11810
|
+
* ## Availability is not permission
|
|
11811
|
+
*
|
|
11812
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11813
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11814
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11815
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11816
|
+
*/
|
|
11817
|
+
/** One signal a device can emit. */
|
|
11818
|
+
var StreamSignalSchema = object({
|
|
11819
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11820
|
+
code: string().min(1),
|
|
11821
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11822
|
+
label: string().min(1),
|
|
11823
|
+
/**
|
|
11824
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11825
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11826
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11827
|
+
* both of its own.
|
|
11828
|
+
*/
|
|
11829
|
+
recommended: boolean()
|
|
11830
|
+
});
|
|
11831
|
+
var StreamSignalsStatusSchema = object({
|
|
11832
|
+
signals: array(StreamSignalSchema),
|
|
11833
|
+
lastFetchedAt: number()
|
|
11834
|
+
});
|
|
11835
|
+
var streamSignalsCapability = {
|
|
11836
|
+
name: "stream-signals",
|
|
11837
|
+
scope: "device",
|
|
11838
|
+
deviceNative: true,
|
|
11839
|
+
mode: "singleton",
|
|
11840
|
+
deviceTypes: Object.values(DeviceType),
|
|
11841
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11842
|
+
methods: {
|
|
11843
|
+
/**
|
|
11844
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11845
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11846
|
+
* broker's picker show nothing rather than a false choice.
|
|
11847
|
+
*/
|
|
11848
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11849
|
+
};
|
|
11754
11850
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11755
11851
|
var StreamFormatSchema = _enum([
|
|
11756
11852
|
"webrtc",
|
|
@@ -12147,6 +12243,22 @@ var EgressTranscodeSchema = object({
|
|
|
12147
12243
|
camStreamId: string().nullable()
|
|
12148
12244
|
});
|
|
12149
12245
|
method(object({
|
|
12246
|
+
deviceId: number().int().nonnegative(),
|
|
12247
|
+
/** The provider's signal code. */
|
|
12248
|
+
code: string().min(1),
|
|
12249
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12250
|
+
at: number().optional()
|
|
12251
|
+
}), object({
|
|
12252
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12253
|
+
accepted: boolean(),
|
|
12254
|
+
reason: _enum([
|
|
12255
|
+
"woke",
|
|
12256
|
+
"hold-extended",
|
|
12257
|
+
"not-enabled",
|
|
12258
|
+
"no-consumer",
|
|
12259
|
+
"unknown-code"
|
|
12260
|
+
])
|
|
12261
|
+
}), { kind: "mutation" }), method(object({
|
|
12150
12262
|
deviceId: number().int().nonnegative(),
|
|
12151
12263
|
camStreamId: string().min(1),
|
|
12152
12264
|
kind: CamStreamKindSchema,
|
|
@@ -12401,6 +12513,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12401
12513
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12402
12514
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12403
12515
|
minHeight: number().int().positive().optional(),
|
|
12516
|
+
/**
|
|
12517
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12518
|
+
*
|
|
12519
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12520
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12521
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12522
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12523
|
+
* gets born.
|
|
12524
|
+
*/
|
|
12525
|
+
maxHeight: number().int().positive().optional(),
|
|
12404
12526
|
/** Minimum horizontal resolution. */
|
|
12405
12527
|
minWidth: number().int().positive().optional(),
|
|
12406
12528
|
/**
|
|
@@ -12417,7 +12539,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12417
12539
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12418
12540
|
* codec end-to-end, there's nothing to optimise.
|
|
12419
12541
|
*/
|
|
12420
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12542
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12543
|
+
/**
|
|
12544
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12545
|
+
* understanding that it will be transcoded.
|
|
12546
|
+
*
|
|
12547
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12548
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12549
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12550
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12551
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12552
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12553
|
+
*
|
|
12554
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12555
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12556
|
+
*/
|
|
12557
|
+
allowTranscode: boolean().optional()
|
|
12421
12558
|
}).readonly();
|
|
12422
12559
|
var PickStreamPreferencesSchema = object({
|
|
12423
12560
|
/**
|
|
@@ -12431,12 +12568,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12431
12568
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12432
12569
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12433
12570
|
*/
|
|
12434
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12571
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12572
|
+
/**
|
|
12573
|
+
* The height the consumer actually wants to DELIVER.
|
|
12574
|
+
*
|
|
12575
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12576
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12577
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12578
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12579
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12580
|
+
*
|
|
12581
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12582
|
+
*/
|
|
12583
|
+
targetHeight: number().int().positive().optional()
|
|
12435
12584
|
}).readonly();
|
|
12436
12585
|
var PickedCamStreamSchema = object({
|
|
12437
12586
|
camStreamId: string(),
|
|
12438
12587
|
codec: string().optional(),
|
|
12439
12588
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12589
|
+
/**
|
|
12590
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12591
|
+
*
|
|
12592
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12593
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12594
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12595
|
+
*/
|
|
12596
|
+
transcodes: boolean(),
|
|
12440
12597
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12441
12598
|
reason: string()
|
|
12442
12599
|
});
|
|
@@ -16984,6 +17141,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16984
17141
|
"device-enabled",
|
|
16985
17142
|
"device-battery-low",
|
|
16986
17143
|
"device-battery-normal",
|
|
17144
|
+
"device-consumable-low",
|
|
17145
|
+
"device-consumable-normal",
|
|
16987
17146
|
"stream-online",
|
|
16988
17147
|
"stream-offline",
|
|
16989
17148
|
"node-online",
|
|
@@ -17002,6 +17161,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17002
17161
|
"addon-updated",
|
|
17003
17162
|
"server-updated",
|
|
17004
17163
|
"export-completed",
|
|
17164
|
+
"backup-completed",
|
|
17005
17165
|
"camera-online",
|
|
17006
17166
|
"camera-offline",
|
|
17007
17167
|
"camera-disabled",
|
|
@@ -20438,13 +20598,109 @@ var SummariesQueryInput = object({
|
|
|
20438
20598
|
deviceIds: array(number()).min(1),
|
|
20439
20599
|
since: number().optional(),
|
|
20440
20600
|
until: number().optional(),
|
|
20441
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20601
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20602
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20603
|
+
* meaning of "dog" on every summary surface. */
|
|
20604
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20442
20605
|
});
|
|
20443
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20444
20606
|
var SummaryDetailSchema = object({
|
|
20445
20607
|
summary: SummarySchema,
|
|
20446
|
-
/**
|
|
20447
|
-
|
|
20608
|
+
/** Members in absorption order, oldest join first. */
|
|
20609
|
+
members: array(object({
|
|
20610
|
+
trackId: string(),
|
|
20611
|
+
/**
|
|
20612
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20613
|
+
* and the track no longer exists to fill it.
|
|
20614
|
+
*
|
|
20615
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20616
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20617
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20618
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20619
|
+
* drift from the members it claims to describe.
|
|
20620
|
+
*/
|
|
20621
|
+
className: string().nullable(),
|
|
20622
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20623
|
+
role: _enum([
|
|
20624
|
+
"primary",
|
|
20625
|
+
"sibling",
|
|
20626
|
+
"child"
|
|
20627
|
+
]).nullable(),
|
|
20628
|
+
joinedAt: number(),
|
|
20629
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20630
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20631
|
+
label: string().optional(),
|
|
20632
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20633
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20634
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20635
|
+
subLabel: string().optional()
|
|
20636
|
+
})).readonly()
|
|
20637
|
+
});
|
|
20638
|
+
/**
|
|
20639
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20640
|
+
*
|
|
20641
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20642
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20643
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20644
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20645
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20646
|
+
* draw two hundred badges.
|
|
20647
|
+
*/
|
|
20648
|
+
var SummaryListItemSchema = object({
|
|
20649
|
+
summary: SummarySchema,
|
|
20650
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20651
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20652
|
+
classes: array(object({
|
|
20653
|
+
className: string().nullable(),
|
|
20654
|
+
count: number().int().positive()
|
|
20655
|
+
})).readonly()
|
|
20656
|
+
});
|
|
20657
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20658
|
+
/**
|
|
20659
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20660
|
+
*
|
|
20661
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20662
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20663
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20664
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20665
|
+
* "newest" means, on one screen.
|
|
20666
|
+
*/
|
|
20667
|
+
var RecentSummariesQueryInput = object({
|
|
20668
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20669
|
+
deviceIds: array(number()),
|
|
20670
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20671
|
+
since: number().optional(),
|
|
20672
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20673
|
+
until: number().optional(),
|
|
20674
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20675
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20676
|
+
cursor: string().optional(),
|
|
20677
|
+
/**
|
|
20678
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20679
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20680
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20681
|
+
* make the operator's one filter component produce two shapes.
|
|
20682
|
+
*
|
|
20683
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20684
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20685
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20686
|
+
* about its primary.
|
|
20687
|
+
*
|
|
20688
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20689
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20690
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20691
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20692
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20693
|
+
*
|
|
20694
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20695
|
+
*/
|
|
20696
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20697
|
+
});
|
|
20698
|
+
var RecentSummariesPageSchema = object({
|
|
20699
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20700
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20701
|
+
* whichever feed drew it. */
|
|
20702
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20703
|
+
nextCursor: string().nullable()
|
|
20448
20704
|
});
|
|
20449
20705
|
var RecentTracksPageSchema = object({
|
|
20450
20706
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20858,7 +21114,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20858
21114
|
classes: array(string()).optional(),
|
|
20859
21115
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20860
21116
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20861
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21117
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20862
21118
|
kind: "mutation",
|
|
20863
21119
|
auth: "admin"
|
|
20864
21120
|
}), 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({
|
|
@@ -24291,10 +24547,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24291
24547
|
}), boolean()), method(object({
|
|
24292
24548
|
deviceId: number().int().nonnegative(),
|
|
24293
24549
|
sessionId: string()
|
|
24294
|
-
}), object({
|
|
24295
|
-
|
|
24296
|
-
|
|
24297
|
-
|
|
24550
|
+
}), object({
|
|
24551
|
+
pendingRenegotiation: object({
|
|
24552
|
+
target: WebrtcStreamTargetSchema,
|
|
24553
|
+
epoch: number()
|
|
24554
|
+
}).nullable(),
|
|
24555
|
+
/**
|
|
24556
|
+
* Whether the session still EXISTS.
|
|
24557
|
+
*
|
|
24558
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24559
|
+
* be able to ask, because a session does not always end the way it
|
|
24560
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24561
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24562
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24563
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24564
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24565
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24566
|
+
*
|
|
24567
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24568
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24569
|
+
*/
|
|
24570
|
+
alive: boolean()
|
|
24571
|
+
}));
|
|
24298
24572
|
object({
|
|
24299
24573
|
/** All accessory children of the parent. */
|
|
24300
24574
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -33071,7 +33345,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33071
33345
|
* disarmed the channels it did not mention would make the Levels page and
|
|
33072
33346
|
* the Diagnostics page fight over the same value.
|
|
33073
33347
|
*/
|
|
33074
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33348
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33349
|
+
/**
|
|
33350
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33351
|
+
* retention actually deleted.
|
|
33352
|
+
*
|
|
33353
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33354
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33355
|
+
* this system is configured through this one document, and a retention audit
|
|
33356
|
+
* configured somewhere else is a second place to look when the question is
|
|
33357
|
+
* "what happened to my data".
|
|
33358
|
+
*
|
|
33359
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33360
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33361
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33362
|
+
*
|
|
33363
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33364
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33365
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33366
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33367
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33368
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33369
|
+
*/
|
|
33370
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
33075
33371
|
});
|
|
33076
33372
|
/**
|
|
33077
33373
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -33144,6 +33440,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
33144
33440
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
33145
33441
|
/** The channels ARMED right now, each with its deadline. */
|
|
33146
33442
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33443
|
+
/**
|
|
33444
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33445
|
+
*
|
|
33446
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33447
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33448
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33449
|
+
*/
|
|
33450
|
+
opsLogRetentionDays: number().int().min(0),
|
|
33147
33451
|
persisted: boolean()
|
|
33148
33452
|
});
|
|
33149
33453
|
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(), {
|
|
@@ -34554,6 +34858,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34554
34858
|
smoke: smokeCapability,
|
|
34555
34859
|
streamCatalog: streamCatalogCapability,
|
|
34556
34860
|
streamParams: streamParamsCapability,
|
|
34861
|
+
streamSignals: streamSignalsCapability,
|
|
34557
34862
|
switch: switchCapability,
|
|
34558
34863
|
tamper: tamperCapability,
|
|
34559
34864
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39377,6 +39682,12 @@ Object.freeze({
|
|
|
39377
39682
|
addonId: null,
|
|
39378
39683
|
access: "view"
|
|
39379
39684
|
},
|
|
39685
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39686
|
+
capName: "pipeline-analytics",
|
|
39687
|
+
capScope: "device",
|
|
39688
|
+
addonId: null,
|
|
39689
|
+
access: "view"
|
|
39690
|
+
},
|
|
39380
39691
|
"pipelineAnalytics.listRecentTracks": {
|
|
39381
39692
|
capName: "pipeline-analytics",
|
|
39382
39693
|
capScope: "device",
|
|
@@ -41339,6 +41650,12 @@ Object.freeze({
|
|
|
41339
41650
|
addonId: null,
|
|
41340
41651
|
access: "create"
|
|
41341
41652
|
},
|
|
41653
|
+
"streamBroker.reportStreamSignal": {
|
|
41654
|
+
capName: "stream-broker",
|
|
41655
|
+
capScope: "system",
|
|
41656
|
+
addonId: null,
|
|
41657
|
+
access: "create"
|
|
41658
|
+
},
|
|
41342
41659
|
"streamBroker.restartProfile": {
|
|
41343
41660
|
capName: "stream-broker",
|
|
41344
41661
|
capScope: "system",
|
|
@@ -41423,6 +41740,12 @@ Object.freeze({
|
|
|
41423
41740
|
addonId: null,
|
|
41424
41741
|
access: "create"
|
|
41425
41742
|
},
|
|
41743
|
+
"streamSignals.listSignals": {
|
|
41744
|
+
capName: "stream-signals",
|
|
41745
|
+
capScope: "device",
|
|
41746
|
+
addonId: null,
|
|
41747
|
+
access: "view"
|
|
41748
|
+
},
|
|
41426
41749
|
"switch.setState": {
|
|
41427
41750
|
capName: "switch",
|
|
41428
41751
|
capScope: "device",
|
|
@@ -43204,6 +43527,11 @@ Object.freeze({
|
|
|
43204
43527
|
form: "single",
|
|
43205
43528
|
optional: true
|
|
43206
43529
|
}],
|
|
43530
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43531
|
+
name: "deviceIds",
|
|
43532
|
+
form: "array",
|
|
43533
|
+
optional: false
|
|
43534
|
+
}],
|
|
43207
43535
|
"pipelineAnalytics.listRecentTracks": [{
|
|
43208
43536
|
name: "deviceIds",
|
|
43209
43537
|
form: "array",
|
|
@@ -43790,6 +44118,11 @@ Object.freeze({
|
|
|
43790
44118
|
form: "single",
|
|
43791
44119
|
optional: false
|
|
43792
44120
|
}],
|
|
44121
|
+
"streamBroker.reportStreamSignal": [{
|
|
44122
|
+
name: "deviceId",
|
|
44123
|
+
form: "single",
|
|
44124
|
+
optional: false
|
|
44125
|
+
}],
|
|
43793
44126
|
"streamBroker.restartProfile": [{
|
|
43794
44127
|
name: "deviceId",
|
|
43795
44128
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-hikvision",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.110",
|
|
4
4
|
"description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|