@camstack/addon-provider-amcrest 0.2.102 → 0.2.104
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
|
|
@@ -11469,6 +11499,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11469
11499
|
auth: "admin"
|
|
11470
11500
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11471
11501
|
DeviceType.Camera;
|
|
11502
|
+
/**
|
|
11503
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11504
|
+
*
|
|
11505
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11506
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11507
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11508
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11509
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11510
|
+
* itself, with no stream running.
|
|
11511
|
+
*
|
|
11512
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11513
|
+
*
|
|
11514
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11515
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11516
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11517
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11518
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11519
|
+
*
|
|
11520
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11521
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11522
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11523
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11524
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11525
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11526
|
+
* camera. Two questions, two authorities.
|
|
11527
|
+
*
|
|
11528
|
+
* ## Availability is not permission
|
|
11529
|
+
*
|
|
11530
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11531
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11532
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11533
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11534
|
+
*/
|
|
11535
|
+
/** One signal a device can emit. */
|
|
11536
|
+
var StreamSignalSchema = object({
|
|
11537
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11538
|
+
code: string().min(1),
|
|
11539
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11540
|
+
label: string().min(1),
|
|
11541
|
+
/**
|
|
11542
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11543
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11544
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11545
|
+
* both of its own.
|
|
11546
|
+
*/
|
|
11547
|
+
recommended: boolean()
|
|
11548
|
+
});
|
|
11549
|
+
var StreamSignalsStatusSchema = object({
|
|
11550
|
+
signals: array(StreamSignalSchema),
|
|
11551
|
+
lastFetchedAt: number()
|
|
11552
|
+
});
|
|
11553
|
+
var streamSignalsCapability = {
|
|
11554
|
+
name: "stream-signals",
|
|
11555
|
+
scope: "device",
|
|
11556
|
+
deviceNative: true,
|
|
11557
|
+
mode: "singleton",
|
|
11558
|
+
deviceTypes: Object.values(DeviceType),
|
|
11559
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11560
|
+
methods: {
|
|
11561
|
+
/**
|
|
11562
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11563
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11564
|
+
* broker's picker show nothing rather than a false choice.
|
|
11565
|
+
*/
|
|
11566
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11567
|
+
};
|
|
11472
11568
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11473
11569
|
var StreamFormatSchema = _enum([
|
|
11474
11570
|
"webrtc",
|
|
@@ -11865,6 +11961,22 @@ var EgressTranscodeSchema = object({
|
|
|
11865
11961
|
camStreamId: string().nullable()
|
|
11866
11962
|
});
|
|
11867
11963
|
method(object({
|
|
11964
|
+
deviceId: number().int().nonnegative(),
|
|
11965
|
+
/** The provider's signal code. */
|
|
11966
|
+
code: string().min(1),
|
|
11967
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11968
|
+
at: number().optional()
|
|
11969
|
+
}), object({
|
|
11970
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11971
|
+
accepted: boolean(),
|
|
11972
|
+
reason: _enum([
|
|
11973
|
+
"woke",
|
|
11974
|
+
"hold-extended",
|
|
11975
|
+
"not-enabled",
|
|
11976
|
+
"no-consumer",
|
|
11977
|
+
"unknown-code"
|
|
11978
|
+
])
|
|
11979
|
+
}), { kind: "mutation" }), method(object({
|
|
11868
11980
|
deviceId: number().int().nonnegative(),
|
|
11869
11981
|
camStreamId: string().min(1),
|
|
11870
11982
|
kind: CamStreamKindSchema,
|
|
@@ -12119,6 +12231,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12119
12231
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12120
12232
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12121
12233
|
minHeight: number().int().positive().optional(),
|
|
12234
|
+
/**
|
|
12235
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12236
|
+
*
|
|
12237
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12238
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12239
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12240
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12241
|
+
* gets born.
|
|
12242
|
+
*/
|
|
12243
|
+
maxHeight: number().int().positive().optional(),
|
|
12122
12244
|
/** Minimum horizontal resolution. */
|
|
12123
12245
|
minWidth: number().int().positive().optional(),
|
|
12124
12246
|
/**
|
|
@@ -12135,7 +12257,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12135
12257
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12136
12258
|
* codec end-to-end, there's nothing to optimise.
|
|
12137
12259
|
*/
|
|
12138
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12260
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12261
|
+
/**
|
|
12262
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12263
|
+
* understanding that it will be transcoded.
|
|
12264
|
+
*
|
|
12265
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12266
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12267
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12268
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12269
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12270
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12271
|
+
*
|
|
12272
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12273
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12274
|
+
*/
|
|
12275
|
+
allowTranscode: boolean().optional()
|
|
12139
12276
|
}).readonly();
|
|
12140
12277
|
var PickStreamPreferencesSchema = object({
|
|
12141
12278
|
/**
|
|
@@ -12149,12 +12286,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12149
12286
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12150
12287
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12151
12288
|
*/
|
|
12152
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12289
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12290
|
+
/**
|
|
12291
|
+
* The height the consumer actually wants to DELIVER.
|
|
12292
|
+
*
|
|
12293
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12294
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12295
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12296
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12297
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12298
|
+
*
|
|
12299
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12300
|
+
*/
|
|
12301
|
+
targetHeight: number().int().positive().optional()
|
|
12153
12302
|
}).readonly();
|
|
12154
12303
|
var PickedCamStreamSchema = object({
|
|
12155
12304
|
camStreamId: string(),
|
|
12156
12305
|
codec: string().optional(),
|
|
12157
12306
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12307
|
+
/**
|
|
12308
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12309
|
+
*
|
|
12310
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12311
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12312
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12313
|
+
*/
|
|
12314
|
+
transcodes: boolean(),
|
|
12158
12315
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12159
12316
|
reason: string()
|
|
12160
12317
|
});
|
|
@@ -16671,6 +16828,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16671
16828
|
"device-enabled",
|
|
16672
16829
|
"device-battery-low",
|
|
16673
16830
|
"device-battery-normal",
|
|
16831
|
+
"device-consumable-low",
|
|
16832
|
+
"device-consumable-normal",
|
|
16674
16833
|
"stream-online",
|
|
16675
16834
|
"stream-offline",
|
|
16676
16835
|
"node-online",
|
|
@@ -16689,6 +16848,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16689
16848
|
"addon-updated",
|
|
16690
16849
|
"server-updated",
|
|
16691
16850
|
"export-completed",
|
|
16851
|
+
"backup-completed",
|
|
16692
16852
|
"camera-online",
|
|
16693
16853
|
"camera-offline",
|
|
16694
16854
|
"camera-disabled",
|
|
@@ -20125,13 +20285,109 @@ var SummariesQueryInput = object({
|
|
|
20125
20285
|
deviceIds: array(number()).min(1),
|
|
20126
20286
|
since: number().optional(),
|
|
20127
20287
|
until: number().optional(),
|
|
20128
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20288
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20289
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20290
|
+
* meaning of "dog" on every summary surface. */
|
|
20291
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20129
20292
|
});
|
|
20130
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20131
20293
|
var SummaryDetailSchema = object({
|
|
20132
20294
|
summary: SummarySchema,
|
|
20133
|
-
/**
|
|
20134
|
-
|
|
20295
|
+
/** Members in absorption order, oldest join first. */
|
|
20296
|
+
members: array(object({
|
|
20297
|
+
trackId: string(),
|
|
20298
|
+
/**
|
|
20299
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20300
|
+
* and the track no longer exists to fill it.
|
|
20301
|
+
*
|
|
20302
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20303
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20304
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20305
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20306
|
+
* drift from the members it claims to describe.
|
|
20307
|
+
*/
|
|
20308
|
+
className: string().nullable(),
|
|
20309
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20310
|
+
role: _enum([
|
|
20311
|
+
"primary",
|
|
20312
|
+
"sibling",
|
|
20313
|
+
"child"
|
|
20314
|
+
]).nullable(),
|
|
20315
|
+
joinedAt: number(),
|
|
20316
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20317
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20318
|
+
label: string().optional(),
|
|
20319
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20320
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20321
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20322
|
+
subLabel: string().optional()
|
|
20323
|
+
})).readonly()
|
|
20324
|
+
});
|
|
20325
|
+
/**
|
|
20326
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20327
|
+
*
|
|
20328
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20329
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20330
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20331
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20332
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20333
|
+
* draw two hundred badges.
|
|
20334
|
+
*/
|
|
20335
|
+
var SummaryListItemSchema = object({
|
|
20336
|
+
summary: SummarySchema,
|
|
20337
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20338
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20339
|
+
classes: array(object({
|
|
20340
|
+
className: string().nullable(),
|
|
20341
|
+
count: number().int().positive()
|
|
20342
|
+
})).readonly()
|
|
20343
|
+
});
|
|
20344
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20345
|
+
/**
|
|
20346
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20347
|
+
*
|
|
20348
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20349
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20350
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20351
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20352
|
+
* "newest" means, on one screen.
|
|
20353
|
+
*/
|
|
20354
|
+
var RecentSummariesQueryInput = object({
|
|
20355
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20356
|
+
deviceIds: array(number()),
|
|
20357
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20358
|
+
since: number().optional(),
|
|
20359
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20360
|
+
until: number().optional(),
|
|
20361
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20362
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20363
|
+
cursor: string().optional(),
|
|
20364
|
+
/**
|
|
20365
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20366
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20367
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20368
|
+
* make the operator's one filter component produce two shapes.
|
|
20369
|
+
*
|
|
20370
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20371
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20372
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20373
|
+
* about its primary.
|
|
20374
|
+
*
|
|
20375
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20376
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20377
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20378
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20379
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20380
|
+
*
|
|
20381
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20382
|
+
*/
|
|
20383
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20384
|
+
});
|
|
20385
|
+
var RecentSummariesPageSchema = object({
|
|
20386
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20387
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20388
|
+
* whichever feed drew it. */
|
|
20389
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20390
|
+
nextCursor: string().nullable()
|
|
20135
20391
|
});
|
|
20136
20392
|
var RecentTracksPageSchema = object({
|
|
20137
20393
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20545,7 +20801,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20545
20801
|
classes: array(string()).optional(),
|
|
20546
20802
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20547
20803
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20548
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20804
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20549
20805
|
kind: "mutation",
|
|
20550
20806
|
auth: "admin"
|
|
20551
20807
|
}), 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({
|
|
@@ -23978,10 +24234,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23978
24234
|
}), boolean()), method(object({
|
|
23979
24235
|
deviceId: number().int().nonnegative(),
|
|
23980
24236
|
sessionId: string()
|
|
23981
|
-
}), object({
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
24237
|
+
}), object({
|
|
24238
|
+
pendingRenegotiation: object({
|
|
24239
|
+
target: WebrtcStreamTargetSchema,
|
|
24240
|
+
epoch: number()
|
|
24241
|
+
}).nullable(),
|
|
24242
|
+
/**
|
|
24243
|
+
* Whether the session still EXISTS.
|
|
24244
|
+
*
|
|
24245
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24246
|
+
* be able to ask, because a session does not always end the way it
|
|
24247
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24248
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24249
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24250
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24251
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24252
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24253
|
+
*
|
|
24254
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24255
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24256
|
+
*/
|
|
24257
|
+
alive: boolean()
|
|
24258
|
+
}));
|
|
23985
24259
|
object({
|
|
23986
24260
|
/** All accessory children of the parent. */
|
|
23987
24261
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32733,7 +33007,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32733
33007
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32734
33008
|
* the Diagnostics page fight over the same value.
|
|
32735
33009
|
*/
|
|
32736
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33010
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33011
|
+
/**
|
|
33012
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33013
|
+
* retention actually deleted.
|
|
33014
|
+
*
|
|
33015
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33016
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33017
|
+
* this system is configured through this one document, and a retention audit
|
|
33018
|
+
* configured somewhere else is a second place to look when the question is
|
|
33019
|
+
* "what happened to my data".
|
|
33020
|
+
*
|
|
33021
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33022
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33023
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33024
|
+
*
|
|
33025
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33026
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33027
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33028
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33029
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33030
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33031
|
+
*/
|
|
33032
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32737
33033
|
});
|
|
32738
33034
|
/**
|
|
32739
33035
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32806,6 +33102,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32806
33102
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32807
33103
|
/** The channels ARMED right now, each with its deadline. */
|
|
32808
33104
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33105
|
+
/**
|
|
33106
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33107
|
+
*
|
|
33108
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33109
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33110
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33111
|
+
*/
|
|
33112
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32809
33113
|
persisted: boolean()
|
|
32810
33114
|
});
|
|
32811
33115
|
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(), {
|
|
@@ -34201,6 +34505,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34201
34505
|
smoke: smokeCapability,
|
|
34202
34506
|
streamCatalog: streamCatalogCapability,
|
|
34203
34507
|
streamParams: streamParamsCapability,
|
|
34508
|
+
streamSignals: streamSignalsCapability,
|
|
34204
34509
|
switch: switchCapability,
|
|
34205
34510
|
tamper: tamperCapability,
|
|
34206
34511
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39012,6 +39317,12 @@ Object.freeze({
|
|
|
39012
39317
|
addonId: null,
|
|
39013
39318
|
access: "view"
|
|
39014
39319
|
},
|
|
39320
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39321
|
+
capName: "pipeline-analytics",
|
|
39322
|
+
capScope: "device",
|
|
39323
|
+
addonId: null,
|
|
39324
|
+
access: "view"
|
|
39325
|
+
},
|
|
39015
39326
|
"pipelineAnalytics.listRecentTracks": {
|
|
39016
39327
|
capName: "pipeline-analytics",
|
|
39017
39328
|
capScope: "device",
|
|
@@ -40974,6 +41285,12 @@ Object.freeze({
|
|
|
40974
41285
|
addonId: null,
|
|
40975
41286
|
access: "create"
|
|
40976
41287
|
},
|
|
41288
|
+
"streamBroker.reportStreamSignal": {
|
|
41289
|
+
capName: "stream-broker",
|
|
41290
|
+
capScope: "system",
|
|
41291
|
+
addonId: null,
|
|
41292
|
+
access: "create"
|
|
41293
|
+
},
|
|
40977
41294
|
"streamBroker.restartProfile": {
|
|
40978
41295
|
capName: "stream-broker",
|
|
40979
41296
|
capScope: "system",
|
|
@@ -41058,6 +41375,12 @@ Object.freeze({
|
|
|
41058
41375
|
addonId: null,
|
|
41059
41376
|
access: "create"
|
|
41060
41377
|
},
|
|
41378
|
+
"streamSignals.listSignals": {
|
|
41379
|
+
capName: "stream-signals",
|
|
41380
|
+
capScope: "device",
|
|
41381
|
+
addonId: null,
|
|
41382
|
+
access: "view"
|
|
41383
|
+
},
|
|
41061
41384
|
"switch.setState": {
|
|
41062
41385
|
capName: "switch",
|
|
41063
41386
|
capScope: "device",
|
|
@@ -42839,6 +43162,11 @@ Object.freeze({
|
|
|
42839
43162
|
form: "single",
|
|
42840
43163
|
optional: true
|
|
42841
43164
|
}],
|
|
43165
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43166
|
+
name: "deviceIds",
|
|
43167
|
+
form: "array",
|
|
43168
|
+
optional: false
|
|
43169
|
+
}],
|
|
42842
43170
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42843
43171
|
name: "deviceIds",
|
|
42844
43172
|
form: "array",
|
|
@@ -43425,6 +43753,11 @@ Object.freeze({
|
|
|
43425
43753
|
form: "single",
|
|
43426
43754
|
optional: false
|
|
43427
43755
|
}],
|
|
43756
|
+
"streamBroker.reportStreamSignal": [{
|
|
43757
|
+
name: "deviceId",
|
|
43758
|
+
form: "single",
|
|
43759
|
+
optional: false
|
|
43760
|
+
}],
|
|
43428
43761
|
"streamBroker.restartProfile": [{
|
|
43429
43762
|
name: "deviceId",
|
|
43430
43763
|
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
|
|
@@ -11470,6 +11500,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11470
11500
|
auth: "admin"
|
|
11471
11501
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11472
11502
|
DeviceType.Camera;
|
|
11503
|
+
/**
|
|
11504
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11505
|
+
*
|
|
11506
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11507
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11508
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11509
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11510
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11511
|
+
* itself, with no stream running.
|
|
11512
|
+
*
|
|
11513
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11514
|
+
*
|
|
11515
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11516
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11517
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11518
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11519
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11520
|
+
*
|
|
11521
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11522
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11523
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11524
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11525
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11526
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11527
|
+
* camera. Two questions, two authorities.
|
|
11528
|
+
*
|
|
11529
|
+
* ## Availability is not permission
|
|
11530
|
+
*
|
|
11531
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11532
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11533
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11534
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11535
|
+
*/
|
|
11536
|
+
/** One signal a device can emit. */
|
|
11537
|
+
var StreamSignalSchema = object({
|
|
11538
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11539
|
+
code: string().min(1),
|
|
11540
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11541
|
+
label: string().min(1),
|
|
11542
|
+
/**
|
|
11543
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11544
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11545
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11546
|
+
* both of its own.
|
|
11547
|
+
*/
|
|
11548
|
+
recommended: boolean()
|
|
11549
|
+
});
|
|
11550
|
+
var StreamSignalsStatusSchema = object({
|
|
11551
|
+
signals: array(StreamSignalSchema),
|
|
11552
|
+
lastFetchedAt: number()
|
|
11553
|
+
});
|
|
11554
|
+
var streamSignalsCapability = {
|
|
11555
|
+
name: "stream-signals",
|
|
11556
|
+
scope: "device",
|
|
11557
|
+
deviceNative: true,
|
|
11558
|
+
mode: "singleton",
|
|
11559
|
+
deviceTypes: Object.values(DeviceType),
|
|
11560
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11561
|
+
methods: {
|
|
11562
|
+
/**
|
|
11563
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11564
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11565
|
+
* broker's picker show nothing rather than a false choice.
|
|
11566
|
+
*/
|
|
11567
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11568
|
+
};
|
|
11473
11569
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11474
11570
|
var StreamFormatSchema = _enum([
|
|
11475
11571
|
"webrtc",
|
|
@@ -11866,6 +11962,22 @@ var EgressTranscodeSchema = object({
|
|
|
11866
11962
|
camStreamId: string().nullable()
|
|
11867
11963
|
});
|
|
11868
11964
|
method(object({
|
|
11965
|
+
deviceId: number().int().nonnegative(),
|
|
11966
|
+
/** The provider's signal code. */
|
|
11967
|
+
code: string().min(1),
|
|
11968
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11969
|
+
at: number().optional()
|
|
11970
|
+
}), object({
|
|
11971
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11972
|
+
accepted: boolean(),
|
|
11973
|
+
reason: _enum([
|
|
11974
|
+
"woke",
|
|
11975
|
+
"hold-extended",
|
|
11976
|
+
"not-enabled",
|
|
11977
|
+
"no-consumer",
|
|
11978
|
+
"unknown-code"
|
|
11979
|
+
])
|
|
11980
|
+
}), { kind: "mutation" }), method(object({
|
|
11869
11981
|
deviceId: number().int().nonnegative(),
|
|
11870
11982
|
camStreamId: string().min(1),
|
|
11871
11983
|
kind: CamStreamKindSchema,
|
|
@@ -12120,6 +12232,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12120
12232
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12121
12233
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12122
12234
|
minHeight: number().int().positive().optional(),
|
|
12235
|
+
/**
|
|
12236
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12237
|
+
*
|
|
12238
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12239
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12240
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12241
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12242
|
+
* gets born.
|
|
12243
|
+
*/
|
|
12244
|
+
maxHeight: number().int().positive().optional(),
|
|
12123
12245
|
/** Minimum horizontal resolution. */
|
|
12124
12246
|
minWidth: number().int().positive().optional(),
|
|
12125
12247
|
/**
|
|
@@ -12136,7 +12258,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12136
12258
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12137
12259
|
* codec end-to-end, there's nothing to optimise.
|
|
12138
12260
|
*/
|
|
12139
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12261
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12262
|
+
/**
|
|
12263
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12264
|
+
* understanding that it will be transcoded.
|
|
12265
|
+
*
|
|
12266
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12267
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12268
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12269
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12270
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12271
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12272
|
+
*
|
|
12273
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12274
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12275
|
+
*/
|
|
12276
|
+
allowTranscode: boolean().optional()
|
|
12140
12277
|
}).readonly();
|
|
12141
12278
|
var PickStreamPreferencesSchema = object({
|
|
12142
12279
|
/**
|
|
@@ -12150,12 +12287,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12150
12287
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12151
12288
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12152
12289
|
*/
|
|
12153
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12290
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12291
|
+
/**
|
|
12292
|
+
* The height the consumer actually wants to DELIVER.
|
|
12293
|
+
*
|
|
12294
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12295
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12296
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12297
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12298
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12299
|
+
*
|
|
12300
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12301
|
+
*/
|
|
12302
|
+
targetHeight: number().int().positive().optional()
|
|
12154
12303
|
}).readonly();
|
|
12155
12304
|
var PickedCamStreamSchema = object({
|
|
12156
12305
|
camStreamId: string(),
|
|
12157
12306
|
codec: string().optional(),
|
|
12158
12307
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12308
|
+
/**
|
|
12309
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12310
|
+
*
|
|
12311
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12312
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12313
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12314
|
+
*/
|
|
12315
|
+
transcodes: boolean(),
|
|
12159
12316
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12160
12317
|
reason: string()
|
|
12161
12318
|
});
|
|
@@ -16672,6 +16829,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16672
16829
|
"device-enabled",
|
|
16673
16830
|
"device-battery-low",
|
|
16674
16831
|
"device-battery-normal",
|
|
16832
|
+
"device-consumable-low",
|
|
16833
|
+
"device-consumable-normal",
|
|
16675
16834
|
"stream-online",
|
|
16676
16835
|
"stream-offline",
|
|
16677
16836
|
"node-online",
|
|
@@ -16690,6 +16849,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16690
16849
|
"addon-updated",
|
|
16691
16850
|
"server-updated",
|
|
16692
16851
|
"export-completed",
|
|
16852
|
+
"backup-completed",
|
|
16693
16853
|
"camera-online",
|
|
16694
16854
|
"camera-offline",
|
|
16695
16855
|
"camera-disabled",
|
|
@@ -20126,13 +20286,109 @@ var SummariesQueryInput = object({
|
|
|
20126
20286
|
deviceIds: array(number()).min(1),
|
|
20127
20287
|
since: number().optional(),
|
|
20128
20288
|
until: number().optional(),
|
|
20129
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20289
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20290
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20291
|
+
* meaning of "dog" on every summary surface. */
|
|
20292
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20130
20293
|
});
|
|
20131
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20132
20294
|
var SummaryDetailSchema = object({
|
|
20133
20295
|
summary: SummarySchema,
|
|
20134
|
-
/**
|
|
20135
|
-
|
|
20296
|
+
/** Members in absorption order, oldest join first. */
|
|
20297
|
+
members: array(object({
|
|
20298
|
+
trackId: string(),
|
|
20299
|
+
/**
|
|
20300
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20301
|
+
* and the track no longer exists to fill it.
|
|
20302
|
+
*
|
|
20303
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20304
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20305
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20306
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20307
|
+
* drift from the members it claims to describe.
|
|
20308
|
+
*/
|
|
20309
|
+
className: string().nullable(),
|
|
20310
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20311
|
+
role: _enum([
|
|
20312
|
+
"primary",
|
|
20313
|
+
"sibling",
|
|
20314
|
+
"child"
|
|
20315
|
+
]).nullable(),
|
|
20316
|
+
joinedAt: number(),
|
|
20317
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20318
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20319
|
+
label: string().optional(),
|
|
20320
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20321
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20322
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20323
|
+
subLabel: string().optional()
|
|
20324
|
+
})).readonly()
|
|
20325
|
+
});
|
|
20326
|
+
/**
|
|
20327
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20328
|
+
*
|
|
20329
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20330
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20331
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20332
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20333
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20334
|
+
* draw two hundred badges.
|
|
20335
|
+
*/
|
|
20336
|
+
var SummaryListItemSchema = object({
|
|
20337
|
+
summary: SummarySchema,
|
|
20338
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20339
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20340
|
+
classes: array(object({
|
|
20341
|
+
className: string().nullable(),
|
|
20342
|
+
count: number().int().positive()
|
|
20343
|
+
})).readonly()
|
|
20344
|
+
});
|
|
20345
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20346
|
+
/**
|
|
20347
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20348
|
+
*
|
|
20349
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20350
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20351
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20352
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20353
|
+
* "newest" means, on one screen.
|
|
20354
|
+
*/
|
|
20355
|
+
var RecentSummariesQueryInput = object({
|
|
20356
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20357
|
+
deviceIds: array(number()),
|
|
20358
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20359
|
+
since: number().optional(),
|
|
20360
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20361
|
+
until: number().optional(),
|
|
20362
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20363
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20364
|
+
cursor: string().optional(),
|
|
20365
|
+
/**
|
|
20366
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20367
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20368
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20369
|
+
* make the operator's one filter component produce two shapes.
|
|
20370
|
+
*
|
|
20371
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20372
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20373
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20374
|
+
* about its primary.
|
|
20375
|
+
*
|
|
20376
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20377
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20378
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20379
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20380
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20381
|
+
*
|
|
20382
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20383
|
+
*/
|
|
20384
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20385
|
+
});
|
|
20386
|
+
var RecentSummariesPageSchema = object({
|
|
20387
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20388
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20389
|
+
* whichever feed drew it. */
|
|
20390
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20391
|
+
nextCursor: string().nullable()
|
|
20136
20392
|
});
|
|
20137
20393
|
var RecentTracksPageSchema = object({
|
|
20138
20394
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20546,7 +20802,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20546
20802
|
classes: array(string()).optional(),
|
|
20547
20803
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20548
20804
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20549
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20805
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20550
20806
|
kind: "mutation",
|
|
20551
20807
|
auth: "admin"
|
|
20552
20808
|
}), 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({
|
|
@@ -23979,10 +24235,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23979
24235
|
}), boolean()), method(object({
|
|
23980
24236
|
deviceId: number().int().nonnegative(),
|
|
23981
24237
|
sessionId: string()
|
|
23982
|
-
}), object({
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
|
|
24238
|
+
}), object({
|
|
24239
|
+
pendingRenegotiation: object({
|
|
24240
|
+
target: WebrtcStreamTargetSchema,
|
|
24241
|
+
epoch: number()
|
|
24242
|
+
}).nullable(),
|
|
24243
|
+
/**
|
|
24244
|
+
* Whether the session still EXISTS.
|
|
24245
|
+
*
|
|
24246
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24247
|
+
* be able to ask, because a session does not always end the way it
|
|
24248
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24249
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24250
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24251
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24252
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24253
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24254
|
+
*
|
|
24255
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24256
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24257
|
+
*/
|
|
24258
|
+
alive: boolean()
|
|
24259
|
+
}));
|
|
23986
24260
|
object({
|
|
23987
24261
|
/** All accessory children of the parent. */
|
|
23988
24262
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32734,7 +33008,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32734
33008
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32735
33009
|
* the Diagnostics page fight over the same value.
|
|
32736
33010
|
*/
|
|
32737
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33011
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33012
|
+
/**
|
|
33013
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33014
|
+
* retention actually deleted.
|
|
33015
|
+
*
|
|
33016
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33017
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33018
|
+
* this system is configured through this one document, and a retention audit
|
|
33019
|
+
* configured somewhere else is a second place to look when the question is
|
|
33020
|
+
* "what happened to my data".
|
|
33021
|
+
*
|
|
33022
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33023
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33024
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33025
|
+
*
|
|
33026
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33027
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33028
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33029
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33030
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33031
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33032
|
+
*/
|
|
33033
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32738
33034
|
});
|
|
32739
33035
|
/**
|
|
32740
33036
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32807,6 +33103,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32807
33103
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32808
33104
|
/** The channels ARMED right now, each with its deadline. */
|
|
32809
33105
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33106
|
+
/**
|
|
33107
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33108
|
+
*
|
|
33109
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33110
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33111
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33112
|
+
*/
|
|
33113
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32810
33114
|
persisted: boolean()
|
|
32811
33115
|
});
|
|
32812
33116
|
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(), {
|
|
@@ -34202,6 +34506,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34202
34506
|
smoke: smokeCapability,
|
|
34203
34507
|
streamCatalog: streamCatalogCapability,
|
|
34204
34508
|
streamParams: streamParamsCapability,
|
|
34509
|
+
streamSignals: streamSignalsCapability,
|
|
34205
34510
|
switch: switchCapability,
|
|
34206
34511
|
tamper: tamperCapability,
|
|
34207
34512
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39013,6 +39318,12 @@ Object.freeze({
|
|
|
39013
39318
|
addonId: null,
|
|
39014
39319
|
access: "view"
|
|
39015
39320
|
},
|
|
39321
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39322
|
+
capName: "pipeline-analytics",
|
|
39323
|
+
capScope: "device",
|
|
39324
|
+
addonId: null,
|
|
39325
|
+
access: "view"
|
|
39326
|
+
},
|
|
39016
39327
|
"pipelineAnalytics.listRecentTracks": {
|
|
39017
39328
|
capName: "pipeline-analytics",
|
|
39018
39329
|
capScope: "device",
|
|
@@ -40975,6 +41286,12 @@ Object.freeze({
|
|
|
40975
41286
|
addonId: null,
|
|
40976
41287
|
access: "create"
|
|
40977
41288
|
},
|
|
41289
|
+
"streamBroker.reportStreamSignal": {
|
|
41290
|
+
capName: "stream-broker",
|
|
41291
|
+
capScope: "system",
|
|
41292
|
+
addonId: null,
|
|
41293
|
+
access: "create"
|
|
41294
|
+
},
|
|
40978
41295
|
"streamBroker.restartProfile": {
|
|
40979
41296
|
capName: "stream-broker",
|
|
40980
41297
|
capScope: "system",
|
|
@@ -41059,6 +41376,12 @@ Object.freeze({
|
|
|
41059
41376
|
addonId: null,
|
|
41060
41377
|
access: "create"
|
|
41061
41378
|
},
|
|
41379
|
+
"streamSignals.listSignals": {
|
|
41380
|
+
capName: "stream-signals",
|
|
41381
|
+
capScope: "device",
|
|
41382
|
+
addonId: null,
|
|
41383
|
+
access: "view"
|
|
41384
|
+
},
|
|
41062
41385
|
"switch.setState": {
|
|
41063
41386
|
capName: "switch",
|
|
41064
41387
|
capScope: "device",
|
|
@@ -42840,6 +43163,11 @@ Object.freeze({
|
|
|
42840
43163
|
form: "single",
|
|
42841
43164
|
optional: true
|
|
42842
43165
|
}],
|
|
43166
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43167
|
+
name: "deviceIds",
|
|
43168
|
+
form: "array",
|
|
43169
|
+
optional: false
|
|
43170
|
+
}],
|
|
42843
43171
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42844
43172
|
name: "deviceIds",
|
|
42845
43173
|
form: "array",
|
|
@@ -43426,6 +43754,11 @@ Object.freeze({
|
|
|
43426
43754
|
form: "single",
|
|
43427
43755
|
optional: false
|
|
43428
43756
|
}],
|
|
43757
|
+
"streamBroker.reportStreamSignal": [{
|
|
43758
|
+
name: "deviceId",
|
|
43759
|
+
form: "single",
|
|
43760
|
+
optional: false
|
|
43761
|
+
}],
|
|
43429
43762
|
"streamBroker.restartProfile": [{
|
|
43430
43763
|
name: "deviceId",
|
|
43431
43764
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.104",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|