@camstack/addon-provider-unifi 0.2.100 → 0.2.102
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -616,6 +616,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
616
616
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
617
617
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
618
618
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
619
|
+
/**
|
|
620
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
621
|
+
*
|
|
622
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
623
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
624
|
+
* destinations would be told three times. And a run where two of three
|
|
625
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
626
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
627
|
+
* carried here and the message says both.
|
|
628
|
+
*
|
|
629
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
630
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
631
|
+
*/
|
|
632
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
619
633
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
620
634
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
621
635
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5346,7 +5360,7 @@ var ZodIssueCode = {
|
|
|
5346
5360
|
var ZodFirstPartyTypeKind;
|
|
5347
5361
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5348
5362
|
//#endregion
|
|
5349
|
-
//#region ../types/dist/sleep-
|
|
5363
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5350
5364
|
/**
|
|
5351
5365
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5352
5366
|
* window to float samples (D455).
|
|
@@ -7375,7 +7389,23 @@ var EncodeProfileSchema = object({
|
|
|
7375
7389
|
"zerolatency",
|
|
7376
7390
|
"film",
|
|
7377
7391
|
"animation"
|
|
7378
|
-
]).optional()
|
|
7392
|
+
]).optional(),
|
|
7393
|
+
/**
|
|
7394
|
+
* ONE slice per access unit.
|
|
7395
|
+
*
|
|
7396
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7397
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7398
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7399
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7400
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7401
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7402
|
+
*
|
|
7403
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7404
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7405
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7406
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7407
|
+
*/
|
|
7408
|
+
singleSlicePerFrame: boolean().optional()
|
|
7379
7409
|
}),
|
|
7380
7410
|
audio: union([literal("passthrough"), object({
|
|
7381
7411
|
codec: _enum([
|
|
@@ -7425,7 +7455,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7425
7455
|
audio: "passthrough"
|
|
7426
7456
|
};
|
|
7427
7457
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7428
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7458
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7429
7459
|
/**
|
|
7430
7460
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7431
7461
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11474,6 +11504,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11474
11504
|
auth: "admin"
|
|
11475
11505
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11476
11506
|
DeviceType.Camera;
|
|
11507
|
+
/**
|
|
11508
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11509
|
+
*
|
|
11510
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11511
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11512
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11513
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11514
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11515
|
+
* itself, with no stream running.
|
|
11516
|
+
*
|
|
11517
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11518
|
+
*
|
|
11519
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11520
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11521
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11522
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11523
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11524
|
+
*
|
|
11525
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11526
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11527
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11528
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11529
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11530
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11531
|
+
* camera. Two questions, two authorities.
|
|
11532
|
+
*
|
|
11533
|
+
* ## Availability is not permission
|
|
11534
|
+
*
|
|
11535
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11536
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11537
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11538
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11539
|
+
*/
|
|
11540
|
+
/** One signal a device can emit. */
|
|
11541
|
+
var StreamSignalSchema = object({
|
|
11542
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11543
|
+
code: string().min(1),
|
|
11544
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11545
|
+
label: string().min(1),
|
|
11546
|
+
/**
|
|
11547
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11548
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11549
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11550
|
+
* both of its own.
|
|
11551
|
+
*/
|
|
11552
|
+
recommended: boolean()
|
|
11553
|
+
});
|
|
11554
|
+
var StreamSignalsStatusSchema = object({
|
|
11555
|
+
signals: array(StreamSignalSchema),
|
|
11556
|
+
lastFetchedAt: number()
|
|
11557
|
+
});
|
|
11558
|
+
var streamSignalsCapability = {
|
|
11559
|
+
name: "stream-signals",
|
|
11560
|
+
scope: "device",
|
|
11561
|
+
deviceNative: true,
|
|
11562
|
+
mode: "singleton",
|
|
11563
|
+
deviceTypes: Object.values(DeviceType),
|
|
11564
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11565
|
+
methods: {
|
|
11566
|
+
/**
|
|
11567
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11568
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11569
|
+
* broker's picker show nothing rather than a false choice.
|
|
11570
|
+
*/
|
|
11571
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11572
|
+
};
|
|
11477
11573
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11478
11574
|
var StreamFormatSchema = _enum([
|
|
11479
11575
|
"webrtc",
|
|
@@ -11870,6 +11966,22 @@ var EgressTranscodeSchema = object({
|
|
|
11870
11966
|
camStreamId: string().nullable()
|
|
11871
11967
|
});
|
|
11872
11968
|
method(object({
|
|
11969
|
+
deviceId: number().int().nonnegative(),
|
|
11970
|
+
/** The provider's signal code. */
|
|
11971
|
+
code: string().min(1),
|
|
11972
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11973
|
+
at: number().optional()
|
|
11974
|
+
}), object({
|
|
11975
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11976
|
+
accepted: boolean(),
|
|
11977
|
+
reason: _enum([
|
|
11978
|
+
"woke",
|
|
11979
|
+
"hold-extended",
|
|
11980
|
+
"not-enabled",
|
|
11981
|
+
"no-consumer",
|
|
11982
|
+
"unknown-code"
|
|
11983
|
+
])
|
|
11984
|
+
}), { kind: "mutation" }), method(object({
|
|
11873
11985
|
deviceId: number().int().nonnegative(),
|
|
11874
11986
|
camStreamId: string().min(1),
|
|
11875
11987
|
kind: CamStreamKindSchema,
|
|
@@ -12124,6 +12236,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12124
12236
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12125
12237
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12126
12238
|
minHeight: number().int().positive().optional(),
|
|
12239
|
+
/**
|
|
12240
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12241
|
+
*
|
|
12242
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12243
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12244
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12245
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12246
|
+
* gets born.
|
|
12247
|
+
*/
|
|
12248
|
+
maxHeight: number().int().positive().optional(),
|
|
12127
12249
|
/** Minimum horizontal resolution. */
|
|
12128
12250
|
minWidth: number().int().positive().optional(),
|
|
12129
12251
|
/**
|
|
@@ -12140,7 +12262,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12140
12262
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12141
12263
|
* codec end-to-end, there's nothing to optimise.
|
|
12142
12264
|
*/
|
|
12143
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12265
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12266
|
+
/**
|
|
12267
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12268
|
+
* understanding that it will be transcoded.
|
|
12269
|
+
*
|
|
12270
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12271
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12272
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12273
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12274
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12275
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12276
|
+
*
|
|
12277
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12278
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12279
|
+
*/
|
|
12280
|
+
allowTranscode: boolean().optional()
|
|
12144
12281
|
}).readonly();
|
|
12145
12282
|
var PickStreamPreferencesSchema = object({
|
|
12146
12283
|
/**
|
|
@@ -12154,12 +12291,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12154
12291
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12155
12292
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12156
12293
|
*/
|
|
12157
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12294
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12295
|
+
/**
|
|
12296
|
+
* The height the consumer actually wants to DELIVER.
|
|
12297
|
+
*
|
|
12298
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12299
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12300
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12301
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12302
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12303
|
+
*
|
|
12304
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12305
|
+
*/
|
|
12306
|
+
targetHeight: number().int().positive().optional()
|
|
12158
12307
|
}).readonly();
|
|
12159
12308
|
var PickedCamStreamSchema = object({
|
|
12160
12309
|
camStreamId: string(),
|
|
12161
12310
|
codec: string().optional(),
|
|
12162
12311
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12312
|
+
/**
|
|
12313
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12314
|
+
*
|
|
12315
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12316
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12317
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12318
|
+
*/
|
|
12319
|
+
transcodes: boolean(),
|
|
12163
12320
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12164
12321
|
reason: string()
|
|
12165
12322
|
});
|
|
@@ -16676,6 +16833,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16676
16833
|
"device-enabled",
|
|
16677
16834
|
"device-battery-low",
|
|
16678
16835
|
"device-battery-normal",
|
|
16836
|
+
"device-consumable-low",
|
|
16837
|
+
"device-consumable-normal",
|
|
16679
16838
|
"stream-online",
|
|
16680
16839
|
"stream-offline",
|
|
16681
16840
|
"node-online",
|
|
@@ -16694,6 +16853,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16694
16853
|
"addon-updated",
|
|
16695
16854
|
"server-updated",
|
|
16696
16855
|
"export-completed",
|
|
16856
|
+
"backup-completed",
|
|
16697
16857
|
"camera-online",
|
|
16698
16858
|
"camera-offline",
|
|
16699
16859
|
"camera-disabled",
|
|
@@ -20130,13 +20290,109 @@ var SummariesQueryInput = object({
|
|
|
20130
20290
|
deviceIds: array(number()).min(1),
|
|
20131
20291
|
since: number().optional(),
|
|
20132
20292
|
until: number().optional(),
|
|
20133
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20293
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20294
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20295
|
+
* meaning of "dog" on every summary surface. */
|
|
20296
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20134
20297
|
});
|
|
20135
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20136
20298
|
var SummaryDetailSchema = object({
|
|
20137
20299
|
summary: SummarySchema,
|
|
20138
|
-
/**
|
|
20139
|
-
|
|
20300
|
+
/** Members in absorption order, oldest join first. */
|
|
20301
|
+
members: array(object({
|
|
20302
|
+
trackId: string(),
|
|
20303
|
+
/**
|
|
20304
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20305
|
+
* and the track no longer exists to fill it.
|
|
20306
|
+
*
|
|
20307
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20308
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20309
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20310
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20311
|
+
* drift from the members it claims to describe.
|
|
20312
|
+
*/
|
|
20313
|
+
className: string().nullable(),
|
|
20314
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20315
|
+
role: _enum([
|
|
20316
|
+
"primary",
|
|
20317
|
+
"sibling",
|
|
20318
|
+
"child"
|
|
20319
|
+
]).nullable(),
|
|
20320
|
+
joinedAt: number(),
|
|
20321
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20322
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20323
|
+
label: string().optional(),
|
|
20324
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20325
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20326
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20327
|
+
subLabel: string().optional()
|
|
20328
|
+
})).readonly()
|
|
20329
|
+
});
|
|
20330
|
+
/**
|
|
20331
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20332
|
+
*
|
|
20333
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20334
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20335
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20336
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20337
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20338
|
+
* draw two hundred badges.
|
|
20339
|
+
*/
|
|
20340
|
+
var SummaryListItemSchema = object({
|
|
20341
|
+
summary: SummarySchema,
|
|
20342
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20343
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20344
|
+
classes: array(object({
|
|
20345
|
+
className: string().nullable(),
|
|
20346
|
+
count: number().int().positive()
|
|
20347
|
+
})).readonly()
|
|
20348
|
+
});
|
|
20349
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20350
|
+
/**
|
|
20351
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20352
|
+
*
|
|
20353
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20354
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20355
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20356
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20357
|
+
* "newest" means, on one screen.
|
|
20358
|
+
*/
|
|
20359
|
+
var RecentSummariesQueryInput = object({
|
|
20360
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20361
|
+
deviceIds: array(number()),
|
|
20362
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20363
|
+
since: number().optional(),
|
|
20364
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20365
|
+
until: number().optional(),
|
|
20366
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20367
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20368
|
+
cursor: string().optional(),
|
|
20369
|
+
/**
|
|
20370
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20371
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20372
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20373
|
+
* make the operator's one filter component produce two shapes.
|
|
20374
|
+
*
|
|
20375
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20376
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20377
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20378
|
+
* about its primary.
|
|
20379
|
+
*
|
|
20380
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20381
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20382
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20383
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20384
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20385
|
+
*
|
|
20386
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20387
|
+
*/
|
|
20388
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20389
|
+
});
|
|
20390
|
+
var RecentSummariesPageSchema = object({
|
|
20391
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20392
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20393
|
+
* whichever feed drew it. */
|
|
20394
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20395
|
+
nextCursor: string().nullable()
|
|
20140
20396
|
});
|
|
20141
20397
|
var RecentTracksPageSchema = object({
|
|
20142
20398
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20550,7 +20806,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20550
20806
|
classes: array(string()).optional(),
|
|
20551
20807
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20552
20808
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20553
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20809
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20554
20810
|
kind: "mutation",
|
|
20555
20811
|
auth: "admin"
|
|
20556
20812
|
}), 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({
|
|
@@ -23879,10 +24135,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23879
24135
|
}), boolean()), method(object({
|
|
23880
24136
|
deviceId: number().int().nonnegative(),
|
|
23881
24137
|
sessionId: string()
|
|
23882
|
-
}), object({
|
|
23883
|
-
|
|
23884
|
-
|
|
23885
|
-
|
|
24138
|
+
}), object({
|
|
24139
|
+
pendingRenegotiation: object({
|
|
24140
|
+
target: WebrtcStreamTargetSchema,
|
|
24141
|
+
epoch: number()
|
|
24142
|
+
}).nullable(),
|
|
24143
|
+
/**
|
|
24144
|
+
* Whether the session still EXISTS.
|
|
24145
|
+
*
|
|
24146
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24147
|
+
* be able to ask, because a session does not always end the way it
|
|
24148
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24149
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24150
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24151
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24152
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24153
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24154
|
+
*
|
|
24155
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24156
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24157
|
+
*/
|
|
24158
|
+
alive: boolean()
|
|
24159
|
+
}));
|
|
23886
24160
|
object({
|
|
23887
24161
|
/** All accessory children of the parent. */
|
|
23888
24162
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32320,7 +32594,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32320
32594
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32321
32595
|
* the Diagnostics page fight over the same value.
|
|
32322
32596
|
*/
|
|
32323
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
32597
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
32598
|
+
/**
|
|
32599
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
32600
|
+
* retention actually deleted.
|
|
32601
|
+
*
|
|
32602
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
32603
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
32604
|
+
* this system is configured through this one document, and a retention audit
|
|
32605
|
+
* configured somewhere else is a second place to look when the question is
|
|
32606
|
+
* "what happened to my data".
|
|
32607
|
+
*
|
|
32608
|
+
* That placement has a cost worth stating: this document ships in the
|
|
32609
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
32610
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
32611
|
+
*
|
|
32612
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
32613
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
32614
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
32615
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
32616
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
32617
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
32618
|
+
*/
|
|
32619
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32324
32620
|
});
|
|
32325
32621
|
/**
|
|
32326
32622
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32393,6 +32689,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32393
32689
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32394
32690
|
/** The channels ARMED right now, each with its deadline. */
|
|
32395
32691
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
32692
|
+
/**
|
|
32693
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
32694
|
+
*
|
|
32695
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
32696
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
32697
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
32698
|
+
*/
|
|
32699
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32396
32700
|
persisted: boolean()
|
|
32397
32701
|
});
|
|
32398
32702
|
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(), {
|
|
@@ -33788,6 +34092,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33788
34092
|
smoke: smokeCapability,
|
|
33789
34093
|
streamCatalog: streamCatalogCapability,
|
|
33790
34094
|
streamParams: streamParamsCapability,
|
|
34095
|
+
streamSignals: streamSignalsCapability,
|
|
33791
34096
|
switch: switchCapability,
|
|
33792
34097
|
tamper: tamperCapability,
|
|
33793
34098
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -38393,6 +38698,12 @@ Object.freeze({
|
|
|
38393
38698
|
addonId: null,
|
|
38394
38699
|
access: "view"
|
|
38395
38700
|
},
|
|
38701
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
38702
|
+
capName: "pipeline-analytics",
|
|
38703
|
+
capScope: "device",
|
|
38704
|
+
addonId: null,
|
|
38705
|
+
access: "view"
|
|
38706
|
+
},
|
|
38396
38707
|
"pipelineAnalytics.listRecentTracks": {
|
|
38397
38708
|
capName: "pipeline-analytics",
|
|
38398
38709
|
capScope: "device",
|
|
@@ -40355,6 +40666,12 @@ Object.freeze({
|
|
|
40355
40666
|
addonId: null,
|
|
40356
40667
|
access: "create"
|
|
40357
40668
|
},
|
|
40669
|
+
"streamBroker.reportStreamSignal": {
|
|
40670
|
+
capName: "stream-broker",
|
|
40671
|
+
capScope: "system",
|
|
40672
|
+
addonId: null,
|
|
40673
|
+
access: "create"
|
|
40674
|
+
},
|
|
40358
40675
|
"streamBroker.restartProfile": {
|
|
40359
40676
|
capName: "stream-broker",
|
|
40360
40677
|
capScope: "system",
|
|
@@ -40439,6 +40756,12 @@ Object.freeze({
|
|
|
40439
40756
|
addonId: null,
|
|
40440
40757
|
access: "create"
|
|
40441
40758
|
},
|
|
40759
|
+
"streamSignals.listSignals": {
|
|
40760
|
+
capName: "stream-signals",
|
|
40761
|
+
capScope: "device",
|
|
40762
|
+
addonId: null,
|
|
40763
|
+
access: "view"
|
|
40764
|
+
},
|
|
40442
40765
|
"switch.setState": {
|
|
40443
40766
|
capName: "switch",
|
|
40444
40767
|
capScope: "device",
|
|
@@ -42220,6 +42543,11 @@ Object.freeze({
|
|
|
42220
42543
|
form: "single",
|
|
42221
42544
|
optional: true
|
|
42222
42545
|
}],
|
|
42546
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
42547
|
+
name: "deviceIds",
|
|
42548
|
+
form: "array",
|
|
42549
|
+
optional: false
|
|
42550
|
+
}],
|
|
42223
42551
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42224
42552
|
name: "deviceIds",
|
|
42225
42553
|
form: "array",
|
|
@@ -42806,6 +43134,11 @@ Object.freeze({
|
|
|
42806
43134
|
form: "single",
|
|
42807
43135
|
optional: false
|
|
42808
43136
|
}],
|
|
43137
|
+
"streamBroker.reportStreamSignal": [{
|
|
43138
|
+
name: "deviceId",
|
|
43139
|
+
form: "single",
|
|
43140
|
+
optional: false
|
|
43141
|
+
}],
|
|
42809
43142
|
"streamBroker.restartProfile": [{
|
|
42810
43143
|
name: "deviceId",
|
|
42811
43144
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../types/dist/event-category-
|
|
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-
|
|
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).
|
|
@@ -7374,7 +7388,23 @@ var EncodeProfileSchema = object({
|
|
|
7374
7388
|
"zerolatency",
|
|
7375
7389
|
"film",
|
|
7376
7390
|
"animation"
|
|
7377
|
-
]).optional()
|
|
7391
|
+
]).optional(),
|
|
7392
|
+
/**
|
|
7393
|
+
* ONE slice per access unit.
|
|
7394
|
+
*
|
|
7395
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7396
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7397
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7398
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7399
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7400
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7401
|
+
*
|
|
7402
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7403
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7404
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7405
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7406
|
+
*/
|
|
7407
|
+
singleSlicePerFrame: boolean().optional()
|
|
7378
7408
|
}),
|
|
7379
7409
|
audio: union([literal("passthrough"), object({
|
|
7380
7410
|
codec: _enum([
|
|
@@ -7424,7 +7454,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7424
7454
|
audio: "passthrough"
|
|
7425
7455
|
};
|
|
7426
7456
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7427
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7457
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7428
7458
|
/**
|
|
7429
7459
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7430
7460
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11473,6 +11503,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11473
11503
|
auth: "admin"
|
|
11474
11504
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11475
11505
|
DeviceType.Camera;
|
|
11506
|
+
/**
|
|
11507
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11508
|
+
*
|
|
11509
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11510
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11511
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11512
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11513
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11514
|
+
* itself, with no stream running.
|
|
11515
|
+
*
|
|
11516
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11517
|
+
*
|
|
11518
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11519
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11520
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11521
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11522
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11523
|
+
*
|
|
11524
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11525
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11526
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11527
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11528
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11529
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11530
|
+
* camera. Two questions, two authorities.
|
|
11531
|
+
*
|
|
11532
|
+
* ## Availability is not permission
|
|
11533
|
+
*
|
|
11534
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11535
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11536
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11537
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11538
|
+
*/
|
|
11539
|
+
/** One signal a device can emit. */
|
|
11540
|
+
var StreamSignalSchema = object({
|
|
11541
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11542
|
+
code: string().min(1),
|
|
11543
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11544
|
+
label: string().min(1),
|
|
11545
|
+
/**
|
|
11546
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11547
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11548
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11549
|
+
* both of its own.
|
|
11550
|
+
*/
|
|
11551
|
+
recommended: boolean()
|
|
11552
|
+
});
|
|
11553
|
+
var StreamSignalsStatusSchema = object({
|
|
11554
|
+
signals: array(StreamSignalSchema),
|
|
11555
|
+
lastFetchedAt: number()
|
|
11556
|
+
});
|
|
11557
|
+
var streamSignalsCapability = {
|
|
11558
|
+
name: "stream-signals",
|
|
11559
|
+
scope: "device",
|
|
11560
|
+
deviceNative: true,
|
|
11561
|
+
mode: "singleton",
|
|
11562
|
+
deviceTypes: Object.values(DeviceType),
|
|
11563
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11564
|
+
methods: {
|
|
11565
|
+
/**
|
|
11566
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11567
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11568
|
+
* broker's picker show nothing rather than a false choice.
|
|
11569
|
+
*/
|
|
11570
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11571
|
+
};
|
|
11476
11572
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11477
11573
|
var StreamFormatSchema = _enum([
|
|
11478
11574
|
"webrtc",
|
|
@@ -11869,6 +11965,22 @@ var EgressTranscodeSchema = object({
|
|
|
11869
11965
|
camStreamId: string().nullable()
|
|
11870
11966
|
});
|
|
11871
11967
|
method(object({
|
|
11968
|
+
deviceId: number().int().nonnegative(),
|
|
11969
|
+
/** The provider's signal code. */
|
|
11970
|
+
code: string().min(1),
|
|
11971
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11972
|
+
at: number().optional()
|
|
11973
|
+
}), object({
|
|
11974
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11975
|
+
accepted: boolean(),
|
|
11976
|
+
reason: _enum([
|
|
11977
|
+
"woke",
|
|
11978
|
+
"hold-extended",
|
|
11979
|
+
"not-enabled",
|
|
11980
|
+
"no-consumer",
|
|
11981
|
+
"unknown-code"
|
|
11982
|
+
])
|
|
11983
|
+
}), { kind: "mutation" }), method(object({
|
|
11872
11984
|
deviceId: number().int().nonnegative(),
|
|
11873
11985
|
camStreamId: string().min(1),
|
|
11874
11986
|
kind: CamStreamKindSchema,
|
|
@@ -12123,6 +12235,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12123
12235
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12124
12236
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12125
12237
|
minHeight: number().int().positive().optional(),
|
|
12238
|
+
/**
|
|
12239
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12240
|
+
*
|
|
12241
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12242
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12243
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12244
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12245
|
+
* gets born.
|
|
12246
|
+
*/
|
|
12247
|
+
maxHeight: number().int().positive().optional(),
|
|
12126
12248
|
/** Minimum horizontal resolution. */
|
|
12127
12249
|
minWidth: number().int().positive().optional(),
|
|
12128
12250
|
/**
|
|
@@ -12139,7 +12261,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12139
12261
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12140
12262
|
* codec end-to-end, there's nothing to optimise.
|
|
12141
12263
|
*/
|
|
12142
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12264
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12265
|
+
/**
|
|
12266
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12267
|
+
* understanding that it will be transcoded.
|
|
12268
|
+
*
|
|
12269
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12270
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12271
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12272
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12273
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12274
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12275
|
+
*
|
|
12276
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12277
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12278
|
+
*/
|
|
12279
|
+
allowTranscode: boolean().optional()
|
|
12143
12280
|
}).readonly();
|
|
12144
12281
|
var PickStreamPreferencesSchema = object({
|
|
12145
12282
|
/**
|
|
@@ -12153,12 +12290,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12153
12290
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12154
12291
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12155
12292
|
*/
|
|
12156
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12293
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12294
|
+
/**
|
|
12295
|
+
* The height the consumer actually wants to DELIVER.
|
|
12296
|
+
*
|
|
12297
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12298
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12299
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12300
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12301
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12302
|
+
*
|
|
12303
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12304
|
+
*/
|
|
12305
|
+
targetHeight: number().int().positive().optional()
|
|
12157
12306
|
}).readonly();
|
|
12158
12307
|
var PickedCamStreamSchema = object({
|
|
12159
12308
|
camStreamId: string(),
|
|
12160
12309
|
codec: string().optional(),
|
|
12161
12310
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12311
|
+
/**
|
|
12312
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12313
|
+
*
|
|
12314
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12315
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12316
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12317
|
+
*/
|
|
12318
|
+
transcodes: boolean(),
|
|
12162
12319
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12163
12320
|
reason: string()
|
|
12164
12321
|
});
|
|
@@ -16675,6 +16832,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16675
16832
|
"device-enabled",
|
|
16676
16833
|
"device-battery-low",
|
|
16677
16834
|
"device-battery-normal",
|
|
16835
|
+
"device-consumable-low",
|
|
16836
|
+
"device-consumable-normal",
|
|
16678
16837
|
"stream-online",
|
|
16679
16838
|
"stream-offline",
|
|
16680
16839
|
"node-online",
|
|
@@ -16693,6 +16852,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16693
16852
|
"addon-updated",
|
|
16694
16853
|
"server-updated",
|
|
16695
16854
|
"export-completed",
|
|
16855
|
+
"backup-completed",
|
|
16696
16856
|
"camera-online",
|
|
16697
16857
|
"camera-offline",
|
|
16698
16858
|
"camera-disabled",
|
|
@@ -20129,13 +20289,109 @@ var SummariesQueryInput = object({
|
|
|
20129
20289
|
deviceIds: array(number()).min(1),
|
|
20130
20290
|
since: number().optional(),
|
|
20131
20291
|
until: number().optional(),
|
|
20132
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20292
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20293
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20294
|
+
* meaning of "dog" on every summary surface. */
|
|
20295
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20133
20296
|
});
|
|
20134
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20135
20297
|
var SummaryDetailSchema = object({
|
|
20136
20298
|
summary: SummarySchema,
|
|
20137
|
-
/**
|
|
20138
|
-
|
|
20299
|
+
/** Members in absorption order, oldest join first. */
|
|
20300
|
+
members: array(object({
|
|
20301
|
+
trackId: string(),
|
|
20302
|
+
/**
|
|
20303
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20304
|
+
* and the track no longer exists to fill it.
|
|
20305
|
+
*
|
|
20306
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20307
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20308
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20309
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20310
|
+
* drift from the members it claims to describe.
|
|
20311
|
+
*/
|
|
20312
|
+
className: string().nullable(),
|
|
20313
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20314
|
+
role: _enum([
|
|
20315
|
+
"primary",
|
|
20316
|
+
"sibling",
|
|
20317
|
+
"child"
|
|
20318
|
+
]).nullable(),
|
|
20319
|
+
joinedAt: number(),
|
|
20320
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20321
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20322
|
+
label: string().optional(),
|
|
20323
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20324
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20325
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20326
|
+
subLabel: string().optional()
|
|
20327
|
+
})).readonly()
|
|
20328
|
+
});
|
|
20329
|
+
/**
|
|
20330
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20331
|
+
*
|
|
20332
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20333
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20334
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20335
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20336
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20337
|
+
* draw two hundred badges.
|
|
20338
|
+
*/
|
|
20339
|
+
var SummaryListItemSchema = object({
|
|
20340
|
+
summary: SummarySchema,
|
|
20341
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20342
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20343
|
+
classes: array(object({
|
|
20344
|
+
className: string().nullable(),
|
|
20345
|
+
count: number().int().positive()
|
|
20346
|
+
})).readonly()
|
|
20347
|
+
});
|
|
20348
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20349
|
+
/**
|
|
20350
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20351
|
+
*
|
|
20352
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20353
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20354
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20355
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20356
|
+
* "newest" means, on one screen.
|
|
20357
|
+
*/
|
|
20358
|
+
var RecentSummariesQueryInput = object({
|
|
20359
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20360
|
+
deviceIds: array(number()),
|
|
20361
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20362
|
+
since: number().optional(),
|
|
20363
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20364
|
+
until: number().optional(),
|
|
20365
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20366
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20367
|
+
cursor: string().optional(),
|
|
20368
|
+
/**
|
|
20369
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20370
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20371
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20372
|
+
* make the operator's one filter component produce two shapes.
|
|
20373
|
+
*
|
|
20374
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20375
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20376
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20377
|
+
* about its primary.
|
|
20378
|
+
*
|
|
20379
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20380
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20381
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20382
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20383
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20384
|
+
*
|
|
20385
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20386
|
+
*/
|
|
20387
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20388
|
+
});
|
|
20389
|
+
var RecentSummariesPageSchema = object({
|
|
20390
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20391
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20392
|
+
* whichever feed drew it. */
|
|
20393
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20394
|
+
nextCursor: string().nullable()
|
|
20139
20395
|
});
|
|
20140
20396
|
var RecentTracksPageSchema = object({
|
|
20141
20397
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20549,7 +20805,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20549
20805
|
classes: array(string()).optional(),
|
|
20550
20806
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20551
20807
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20552
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20808
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20553
20809
|
kind: "mutation",
|
|
20554
20810
|
auth: "admin"
|
|
20555
20811
|
}), 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({
|
|
@@ -23878,10 +24134,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23878
24134
|
}), boolean()), method(object({
|
|
23879
24135
|
deviceId: number().int().nonnegative(),
|
|
23880
24136
|
sessionId: string()
|
|
23881
|
-
}), object({
|
|
23882
|
-
|
|
23883
|
-
|
|
23884
|
-
|
|
24137
|
+
}), object({
|
|
24138
|
+
pendingRenegotiation: object({
|
|
24139
|
+
target: WebrtcStreamTargetSchema,
|
|
24140
|
+
epoch: number()
|
|
24141
|
+
}).nullable(),
|
|
24142
|
+
/**
|
|
24143
|
+
* Whether the session still EXISTS.
|
|
24144
|
+
*
|
|
24145
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24146
|
+
* be able to ask, because a session does not always end the way it
|
|
24147
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24148
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24149
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24150
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24151
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24152
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24153
|
+
*
|
|
24154
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24155
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24156
|
+
*/
|
|
24157
|
+
alive: boolean()
|
|
24158
|
+
}));
|
|
23885
24159
|
object({
|
|
23886
24160
|
/** All accessory children of the parent. */
|
|
23887
24161
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32319,7 +32593,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32319
32593
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32320
32594
|
* the Diagnostics page fight over the same value.
|
|
32321
32595
|
*/
|
|
32322
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
32596
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
32597
|
+
/**
|
|
32598
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
32599
|
+
* retention actually deleted.
|
|
32600
|
+
*
|
|
32601
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
32602
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
32603
|
+
* this system is configured through this one document, and a retention audit
|
|
32604
|
+
* configured somewhere else is a second place to look when the question is
|
|
32605
|
+
* "what happened to my data".
|
|
32606
|
+
*
|
|
32607
|
+
* That placement has a cost worth stating: this document ships in the
|
|
32608
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
32609
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
32610
|
+
*
|
|
32611
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
32612
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
32613
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
32614
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
32615
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
32616
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
32617
|
+
*/
|
|
32618
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32323
32619
|
});
|
|
32324
32620
|
/**
|
|
32325
32621
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32392,6 +32688,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32392
32688
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32393
32689
|
/** The channels ARMED right now, each with its deadline. */
|
|
32394
32690
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
32691
|
+
/**
|
|
32692
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
32693
|
+
*
|
|
32694
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
32695
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
32696
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
32697
|
+
*/
|
|
32698
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32395
32699
|
persisted: boolean()
|
|
32396
32700
|
});
|
|
32397
32701
|
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(), {
|
|
@@ -33787,6 +34091,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33787
34091
|
smoke: smokeCapability,
|
|
33788
34092
|
streamCatalog: streamCatalogCapability,
|
|
33789
34093
|
streamParams: streamParamsCapability,
|
|
34094
|
+
streamSignals: streamSignalsCapability,
|
|
33790
34095
|
switch: switchCapability,
|
|
33791
34096
|
tamper: tamperCapability,
|
|
33792
34097
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -38392,6 +38697,12 @@ Object.freeze({
|
|
|
38392
38697
|
addonId: null,
|
|
38393
38698
|
access: "view"
|
|
38394
38699
|
},
|
|
38700
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
38701
|
+
capName: "pipeline-analytics",
|
|
38702
|
+
capScope: "device",
|
|
38703
|
+
addonId: null,
|
|
38704
|
+
access: "view"
|
|
38705
|
+
},
|
|
38395
38706
|
"pipelineAnalytics.listRecentTracks": {
|
|
38396
38707
|
capName: "pipeline-analytics",
|
|
38397
38708
|
capScope: "device",
|
|
@@ -40354,6 +40665,12 @@ Object.freeze({
|
|
|
40354
40665
|
addonId: null,
|
|
40355
40666
|
access: "create"
|
|
40356
40667
|
},
|
|
40668
|
+
"streamBroker.reportStreamSignal": {
|
|
40669
|
+
capName: "stream-broker",
|
|
40670
|
+
capScope: "system",
|
|
40671
|
+
addonId: null,
|
|
40672
|
+
access: "create"
|
|
40673
|
+
},
|
|
40357
40674
|
"streamBroker.restartProfile": {
|
|
40358
40675
|
capName: "stream-broker",
|
|
40359
40676
|
capScope: "system",
|
|
@@ -40438,6 +40755,12 @@ Object.freeze({
|
|
|
40438
40755
|
addonId: null,
|
|
40439
40756
|
access: "create"
|
|
40440
40757
|
},
|
|
40758
|
+
"streamSignals.listSignals": {
|
|
40759
|
+
capName: "stream-signals",
|
|
40760
|
+
capScope: "device",
|
|
40761
|
+
addonId: null,
|
|
40762
|
+
access: "view"
|
|
40763
|
+
},
|
|
40441
40764
|
"switch.setState": {
|
|
40442
40765
|
capName: "switch",
|
|
40443
40766
|
capScope: "device",
|
|
@@ -42219,6 +42542,11 @@ Object.freeze({
|
|
|
42219
42542
|
form: "single",
|
|
42220
42543
|
optional: true
|
|
42221
42544
|
}],
|
|
42545
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
42546
|
+
name: "deviceIds",
|
|
42547
|
+
form: "array",
|
|
42548
|
+
optional: false
|
|
42549
|
+
}],
|
|
42222
42550
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42223
42551
|
name: "deviceIds",
|
|
42224
42552
|
form: "array",
|
|
@@ -42805,6 +43133,11 @@ Object.freeze({
|
|
|
42805
43133
|
form: "single",
|
|
42806
43134
|
optional: false
|
|
42807
43135
|
}],
|
|
43136
|
+
"streamBroker.reportStreamSignal": [{
|
|
43137
|
+
name: "deviceId",
|
|
43138
|
+
form: "single",
|
|
43139
|
+
optional: false
|
|
43140
|
+
}],
|
|
42808
43141
|
"streamBroker.restartProfile": [{
|
|
42809
43142
|
name: "deviceId",
|
|
42810
43143
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-unifi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.102",
|
|
4
4
|
"description": "UniFi Network controller device-provider addon for CamStack — local-controller infra switches/APs (as containers) + network-client presence. NO cameras/Protect.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|