@camstack/addon-provider-gree 0.2.99 → 0.2.101
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
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
let dgram = require("dgram");
|
|
3
3
|
let crypto$1 = require("crypto");
|
|
4
4
|
let events = require("events");
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -619,6 +619,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
619
619
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
620
620
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
621
621
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
622
|
+
/**
|
|
623
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
624
|
+
*
|
|
625
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
626
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
627
|
+
* destinations would be told three times. And a run where two of three
|
|
628
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
629
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
630
|
+
* carried here and the message says both.
|
|
631
|
+
*
|
|
632
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
633
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
634
|
+
*/
|
|
635
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
622
636
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
623
637
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
624
638
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5349,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5349
5363
|
var ZodFirstPartyTypeKind;
|
|
5350
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5351
5365
|
//#endregion
|
|
5352
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5353
5367
|
/**
|
|
5354
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5355
5369
|
* window to float samples (D455).
|
|
@@ -7378,7 +7392,23 @@ var EncodeProfileSchema = object({
|
|
|
7378
7392
|
"zerolatency",
|
|
7379
7393
|
"film",
|
|
7380
7394
|
"animation"
|
|
7381
|
-
]).optional()
|
|
7395
|
+
]).optional(),
|
|
7396
|
+
/**
|
|
7397
|
+
* ONE slice per access unit.
|
|
7398
|
+
*
|
|
7399
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7400
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7401
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7402
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7403
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7404
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7405
|
+
*
|
|
7406
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7407
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7408
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7409
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7410
|
+
*/
|
|
7411
|
+
singleSlicePerFrame: boolean().optional()
|
|
7382
7412
|
}),
|
|
7383
7413
|
audio: union([literal("passthrough"), object({
|
|
7384
7414
|
codec: _enum([
|
|
@@ -7428,7 +7458,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7428
7458
|
audio: "passthrough"
|
|
7429
7459
|
};
|
|
7430
7460
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7431
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7461
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7432
7462
|
/**
|
|
7433
7463
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7434
7464
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11477,6 +11507,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11477
11507
|
auth: "admin"
|
|
11478
11508
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11479
11509
|
DeviceType.Camera;
|
|
11510
|
+
/**
|
|
11511
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11512
|
+
*
|
|
11513
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11514
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11515
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11516
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11517
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11518
|
+
* itself, with no stream running.
|
|
11519
|
+
*
|
|
11520
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11521
|
+
*
|
|
11522
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11523
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11524
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11525
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11526
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11527
|
+
*
|
|
11528
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11529
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11530
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11531
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11532
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11533
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11534
|
+
* camera. Two questions, two authorities.
|
|
11535
|
+
*
|
|
11536
|
+
* ## Availability is not permission
|
|
11537
|
+
*
|
|
11538
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11539
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11540
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11541
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11542
|
+
*/
|
|
11543
|
+
/** One signal a device can emit. */
|
|
11544
|
+
var StreamSignalSchema = object({
|
|
11545
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11546
|
+
code: string().min(1),
|
|
11547
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11548
|
+
label: string().min(1),
|
|
11549
|
+
/**
|
|
11550
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11551
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11552
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11553
|
+
* both of its own.
|
|
11554
|
+
*/
|
|
11555
|
+
recommended: boolean()
|
|
11556
|
+
});
|
|
11557
|
+
var StreamSignalsStatusSchema = object({
|
|
11558
|
+
signals: array(StreamSignalSchema),
|
|
11559
|
+
lastFetchedAt: number()
|
|
11560
|
+
});
|
|
11561
|
+
var streamSignalsCapability = {
|
|
11562
|
+
name: "stream-signals",
|
|
11563
|
+
scope: "device",
|
|
11564
|
+
deviceNative: true,
|
|
11565
|
+
mode: "singleton",
|
|
11566
|
+
deviceTypes: Object.values(DeviceType),
|
|
11567
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11568
|
+
methods: {
|
|
11569
|
+
/**
|
|
11570
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11571
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11572
|
+
* broker's picker show nothing rather than a false choice.
|
|
11573
|
+
*/
|
|
11574
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11575
|
+
};
|
|
11480
11576
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11481
11577
|
var StreamFormatSchema = _enum([
|
|
11482
11578
|
"webrtc",
|
|
@@ -11873,6 +11969,22 @@ var EgressTranscodeSchema = object({
|
|
|
11873
11969
|
camStreamId: string().nullable()
|
|
11874
11970
|
});
|
|
11875
11971
|
method(object({
|
|
11972
|
+
deviceId: number().int().nonnegative(),
|
|
11973
|
+
/** The provider's signal code. */
|
|
11974
|
+
code: string().min(1),
|
|
11975
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11976
|
+
at: number().optional()
|
|
11977
|
+
}), object({
|
|
11978
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11979
|
+
accepted: boolean(),
|
|
11980
|
+
reason: _enum([
|
|
11981
|
+
"woke",
|
|
11982
|
+
"hold-extended",
|
|
11983
|
+
"not-enabled",
|
|
11984
|
+
"no-consumer",
|
|
11985
|
+
"unknown-code"
|
|
11986
|
+
])
|
|
11987
|
+
}), { kind: "mutation" }), method(object({
|
|
11876
11988
|
deviceId: number().int().nonnegative(),
|
|
11877
11989
|
camStreamId: string().min(1),
|
|
11878
11990
|
kind: CamStreamKindSchema,
|
|
@@ -12127,6 +12239,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12127
12239
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12128
12240
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12129
12241
|
minHeight: number().int().positive().optional(),
|
|
12242
|
+
/**
|
|
12243
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12244
|
+
*
|
|
12245
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12246
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12247
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12248
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12249
|
+
* gets born.
|
|
12250
|
+
*/
|
|
12251
|
+
maxHeight: number().int().positive().optional(),
|
|
12130
12252
|
/** Minimum horizontal resolution. */
|
|
12131
12253
|
minWidth: number().int().positive().optional(),
|
|
12132
12254
|
/**
|
|
@@ -12143,7 +12265,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12143
12265
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12144
12266
|
* codec end-to-end, there's nothing to optimise.
|
|
12145
12267
|
*/
|
|
12146
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12268
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12269
|
+
/**
|
|
12270
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12271
|
+
* understanding that it will be transcoded.
|
|
12272
|
+
*
|
|
12273
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12274
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12275
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12276
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12277
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12278
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12279
|
+
*
|
|
12280
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12281
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12282
|
+
*/
|
|
12283
|
+
allowTranscode: boolean().optional()
|
|
12147
12284
|
}).readonly();
|
|
12148
12285
|
var PickStreamPreferencesSchema = object({
|
|
12149
12286
|
/**
|
|
@@ -12157,12 +12294,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12157
12294
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12158
12295
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12159
12296
|
*/
|
|
12160
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12297
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12298
|
+
/**
|
|
12299
|
+
* The height the consumer actually wants to DELIVER.
|
|
12300
|
+
*
|
|
12301
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12302
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12303
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12304
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12305
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12306
|
+
*
|
|
12307
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12308
|
+
*/
|
|
12309
|
+
targetHeight: number().int().positive().optional()
|
|
12161
12310
|
}).readonly();
|
|
12162
12311
|
var PickedCamStreamSchema = object({
|
|
12163
12312
|
camStreamId: string(),
|
|
12164
12313
|
codec: string().optional(),
|
|
12165
12314
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12315
|
+
/**
|
|
12316
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12317
|
+
*
|
|
12318
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12319
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12320
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12321
|
+
*/
|
|
12322
|
+
transcodes: boolean(),
|
|
12166
12323
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12167
12324
|
reason: string()
|
|
12168
12325
|
});
|
|
@@ -16679,6 +16836,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16679
16836
|
"device-enabled",
|
|
16680
16837
|
"device-battery-low",
|
|
16681
16838
|
"device-battery-normal",
|
|
16839
|
+
"device-consumable-low",
|
|
16840
|
+
"device-consumable-normal",
|
|
16682
16841
|
"stream-online",
|
|
16683
16842
|
"stream-offline",
|
|
16684
16843
|
"node-online",
|
|
@@ -16697,6 +16856,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16697
16856
|
"addon-updated",
|
|
16698
16857
|
"server-updated",
|
|
16699
16858
|
"export-completed",
|
|
16859
|
+
"backup-completed",
|
|
16700
16860
|
"camera-online",
|
|
16701
16861
|
"camera-offline",
|
|
16702
16862
|
"camera-disabled",
|
|
@@ -20133,13 +20293,109 @@ var SummariesQueryInput = object({
|
|
|
20133
20293
|
deviceIds: array(number()).min(1),
|
|
20134
20294
|
since: number().optional(),
|
|
20135
20295
|
until: number().optional(),
|
|
20136
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20296
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20297
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20298
|
+
* meaning of "dog" on every summary surface. */
|
|
20299
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20137
20300
|
});
|
|
20138
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20139
20301
|
var SummaryDetailSchema = object({
|
|
20140
20302
|
summary: SummarySchema,
|
|
20141
|
-
/**
|
|
20142
|
-
|
|
20303
|
+
/** Members in absorption order, oldest join first. */
|
|
20304
|
+
members: array(object({
|
|
20305
|
+
trackId: string(),
|
|
20306
|
+
/**
|
|
20307
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20308
|
+
* and the track no longer exists to fill it.
|
|
20309
|
+
*
|
|
20310
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20311
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20312
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20313
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20314
|
+
* drift from the members it claims to describe.
|
|
20315
|
+
*/
|
|
20316
|
+
className: string().nullable(),
|
|
20317
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20318
|
+
role: _enum([
|
|
20319
|
+
"primary",
|
|
20320
|
+
"sibling",
|
|
20321
|
+
"child"
|
|
20322
|
+
]).nullable(),
|
|
20323
|
+
joinedAt: number(),
|
|
20324
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20325
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20326
|
+
label: string().optional(),
|
|
20327
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20328
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20329
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20330
|
+
subLabel: string().optional()
|
|
20331
|
+
})).readonly()
|
|
20332
|
+
});
|
|
20333
|
+
/**
|
|
20334
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20335
|
+
*
|
|
20336
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20337
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20338
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20339
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20340
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20341
|
+
* draw two hundred badges.
|
|
20342
|
+
*/
|
|
20343
|
+
var SummaryListItemSchema = object({
|
|
20344
|
+
summary: SummarySchema,
|
|
20345
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20346
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20347
|
+
classes: array(object({
|
|
20348
|
+
className: string().nullable(),
|
|
20349
|
+
count: number().int().positive()
|
|
20350
|
+
})).readonly()
|
|
20351
|
+
});
|
|
20352
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20353
|
+
/**
|
|
20354
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20355
|
+
*
|
|
20356
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20357
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20358
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20359
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20360
|
+
* "newest" means, on one screen.
|
|
20361
|
+
*/
|
|
20362
|
+
var RecentSummariesQueryInput = object({
|
|
20363
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20364
|
+
deviceIds: array(number()),
|
|
20365
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20366
|
+
since: number().optional(),
|
|
20367
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20368
|
+
until: number().optional(),
|
|
20369
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20370
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20371
|
+
cursor: string().optional(),
|
|
20372
|
+
/**
|
|
20373
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20374
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20375
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20376
|
+
* make the operator's one filter component produce two shapes.
|
|
20377
|
+
*
|
|
20378
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20379
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20380
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20381
|
+
* about its primary.
|
|
20382
|
+
*
|
|
20383
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20384
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20385
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20386
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20387
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20388
|
+
*
|
|
20389
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20390
|
+
*/
|
|
20391
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20392
|
+
});
|
|
20393
|
+
var RecentSummariesPageSchema = object({
|
|
20394
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20395
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20396
|
+
* whichever feed drew it. */
|
|
20397
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20398
|
+
nextCursor: string().nullable()
|
|
20143
20399
|
});
|
|
20144
20400
|
var RecentTracksPageSchema = object({
|
|
20145
20401
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20553,7 +20809,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20553
20809
|
classes: array(string()).optional(),
|
|
20554
20810
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20555
20811
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20556
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20812
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20557
20813
|
kind: "mutation",
|
|
20558
20814
|
auth: "admin"
|
|
20559
20815
|
}), 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({
|
|
@@ -23882,10 +24138,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23882
24138
|
}), boolean()), method(object({
|
|
23883
24139
|
deviceId: number().int().nonnegative(),
|
|
23884
24140
|
sessionId: string()
|
|
23885
|
-
}), object({
|
|
23886
|
-
|
|
23887
|
-
|
|
23888
|
-
|
|
24141
|
+
}), object({
|
|
24142
|
+
pendingRenegotiation: object({
|
|
24143
|
+
target: WebrtcStreamTargetSchema,
|
|
24144
|
+
epoch: number()
|
|
24145
|
+
}).nullable(),
|
|
24146
|
+
/**
|
|
24147
|
+
* Whether the session still EXISTS.
|
|
24148
|
+
*
|
|
24149
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24150
|
+
* be able to ask, because a session does not always end the way it
|
|
24151
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24152
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24153
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24154
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24155
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24156
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24157
|
+
*
|
|
24158
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24159
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24160
|
+
*/
|
|
24161
|
+
alive: boolean()
|
|
24162
|
+
}));
|
|
23889
24163
|
object({
|
|
23890
24164
|
/** All accessory children of the parent. */
|
|
23891
24165
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32306,7 +32580,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32306
32580
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32307
32581
|
* the Diagnostics page fight over the same value.
|
|
32308
32582
|
*/
|
|
32309
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
32583
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
32584
|
+
/**
|
|
32585
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
32586
|
+
* retention actually deleted.
|
|
32587
|
+
*
|
|
32588
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
32589
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
32590
|
+
* this system is configured through this one document, and a retention audit
|
|
32591
|
+
* configured somewhere else is a second place to look when the question is
|
|
32592
|
+
* "what happened to my data".
|
|
32593
|
+
*
|
|
32594
|
+
* That placement has a cost worth stating: this document ships in the
|
|
32595
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
32596
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
32597
|
+
*
|
|
32598
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
32599
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
32600
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
32601
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
32602
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
32603
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
32604
|
+
*/
|
|
32605
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32310
32606
|
});
|
|
32311
32607
|
/**
|
|
32312
32608
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32379,6 +32675,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32379
32675
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32380
32676
|
/** The channels ARMED right now, each with its deadline. */
|
|
32381
32677
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
32678
|
+
/**
|
|
32679
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
32680
|
+
*
|
|
32681
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
32682
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
32683
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
32684
|
+
*/
|
|
32685
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32382
32686
|
persisted: boolean()
|
|
32383
32687
|
});
|
|
32384
32688
|
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(), {
|
|
@@ -33774,6 +34078,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33774
34078
|
smoke: smokeCapability,
|
|
33775
34079
|
streamCatalog: streamCatalogCapability,
|
|
33776
34080
|
streamParams: streamParamsCapability,
|
|
34081
|
+
streamSignals: streamSignalsCapability,
|
|
33777
34082
|
switch: switchCapability,
|
|
33778
34083
|
tamper: tamperCapability,
|
|
33779
34084
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -38379,6 +38684,12 @@ Object.freeze({
|
|
|
38379
38684
|
addonId: null,
|
|
38380
38685
|
access: "view"
|
|
38381
38686
|
},
|
|
38687
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
38688
|
+
capName: "pipeline-analytics",
|
|
38689
|
+
capScope: "device",
|
|
38690
|
+
addonId: null,
|
|
38691
|
+
access: "view"
|
|
38692
|
+
},
|
|
38382
38693
|
"pipelineAnalytics.listRecentTracks": {
|
|
38383
38694
|
capName: "pipeline-analytics",
|
|
38384
38695
|
capScope: "device",
|
|
@@ -40341,6 +40652,12 @@ Object.freeze({
|
|
|
40341
40652
|
addonId: null,
|
|
40342
40653
|
access: "create"
|
|
40343
40654
|
},
|
|
40655
|
+
"streamBroker.reportStreamSignal": {
|
|
40656
|
+
capName: "stream-broker",
|
|
40657
|
+
capScope: "system",
|
|
40658
|
+
addonId: null,
|
|
40659
|
+
access: "create"
|
|
40660
|
+
},
|
|
40344
40661
|
"streamBroker.restartProfile": {
|
|
40345
40662
|
capName: "stream-broker",
|
|
40346
40663
|
capScope: "system",
|
|
@@ -40425,6 +40742,12 @@ Object.freeze({
|
|
|
40425
40742
|
addonId: null,
|
|
40426
40743
|
access: "create"
|
|
40427
40744
|
},
|
|
40745
|
+
"streamSignals.listSignals": {
|
|
40746
|
+
capName: "stream-signals",
|
|
40747
|
+
capScope: "device",
|
|
40748
|
+
addonId: null,
|
|
40749
|
+
access: "view"
|
|
40750
|
+
},
|
|
40428
40751
|
"switch.setState": {
|
|
40429
40752
|
capName: "switch",
|
|
40430
40753
|
capScope: "device",
|
|
@@ -42206,6 +42529,11 @@ Object.freeze({
|
|
|
42206
42529
|
form: "single",
|
|
42207
42530
|
optional: true
|
|
42208
42531
|
}],
|
|
42532
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
42533
|
+
name: "deviceIds",
|
|
42534
|
+
form: "array",
|
|
42535
|
+
optional: false
|
|
42536
|
+
}],
|
|
42209
42537
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42210
42538
|
name: "deviceIds",
|
|
42211
42539
|
form: "array",
|
|
@@ -42792,6 +43120,11 @@ Object.freeze({
|
|
|
42792
43120
|
form: "single",
|
|
42793
43121
|
optional: false
|
|
42794
43122
|
}],
|
|
43123
|
+
"streamBroker.reportStreamSignal": [{
|
|
43124
|
+
name: "deviceId",
|
|
43125
|
+
form: "single",
|
|
43126
|
+
optional: false
|
|
43127
|
+
}],
|
|
42795
43128
|
"streamBroker.restartProfile": [{
|
|
42796
43129
|
name: "deviceId",
|
|
42797
43130
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSocket } from "dgram";
|
|
2
2
|
import { createCipheriv, createDecipheriv } from "crypto";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
|
-
//#region ../types/dist/event-category-
|
|
4
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
5
5
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
6
6
|
EventCategory["SystemBoot"] = "system.boot";
|
|
7
7
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -618,6 +618,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
618
618
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
619
619
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
620
620
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
621
|
+
/**
|
|
622
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
623
|
+
*
|
|
624
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
625
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
626
|
+
* destinations would be told three times. And a run where two of three
|
|
627
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
628
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
629
|
+
* carried here and the message says both.
|
|
630
|
+
*
|
|
631
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
632
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
633
|
+
*/
|
|
634
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
621
635
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
622
636
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
623
637
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5348,7 +5362,7 @@ var ZodIssueCode = {
|
|
|
5348
5362
|
var ZodFirstPartyTypeKind;
|
|
5349
5363
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5350
5364
|
//#endregion
|
|
5351
|
-
//#region ../types/dist/sleep-
|
|
5365
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5352
5366
|
/**
|
|
5353
5367
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5354
5368
|
* window to float samples (D455).
|
|
@@ -7377,7 +7391,23 @@ var EncodeProfileSchema = object({
|
|
|
7377
7391
|
"zerolatency",
|
|
7378
7392
|
"film",
|
|
7379
7393
|
"animation"
|
|
7380
|
-
]).optional()
|
|
7394
|
+
]).optional(),
|
|
7395
|
+
/**
|
|
7396
|
+
* ONE slice per access unit.
|
|
7397
|
+
*
|
|
7398
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7399
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7400
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7401
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7402
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7403
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7404
|
+
*
|
|
7405
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7406
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7407
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7408
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7409
|
+
*/
|
|
7410
|
+
singleSlicePerFrame: boolean().optional()
|
|
7381
7411
|
}),
|
|
7382
7412
|
audio: union([literal("passthrough"), object({
|
|
7383
7413
|
codec: _enum([
|
|
@@ -7427,7 +7457,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7427
7457
|
audio: "passthrough"
|
|
7428
7458
|
};
|
|
7429
7459
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7430
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7460
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7431
7461
|
/**
|
|
7432
7462
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7433
7463
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11476,6 +11506,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11476
11506
|
auth: "admin"
|
|
11477
11507
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11478
11508
|
DeviceType.Camera;
|
|
11509
|
+
/**
|
|
11510
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11511
|
+
*
|
|
11512
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11513
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11514
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11515
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11516
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11517
|
+
* itself, with no stream running.
|
|
11518
|
+
*
|
|
11519
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11520
|
+
*
|
|
11521
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11522
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11523
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11524
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11525
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11526
|
+
*
|
|
11527
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11528
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11529
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11530
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11531
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11532
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11533
|
+
* camera. Two questions, two authorities.
|
|
11534
|
+
*
|
|
11535
|
+
* ## Availability is not permission
|
|
11536
|
+
*
|
|
11537
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11538
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11539
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11540
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11541
|
+
*/
|
|
11542
|
+
/** One signal a device can emit. */
|
|
11543
|
+
var StreamSignalSchema = object({
|
|
11544
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11545
|
+
code: string().min(1),
|
|
11546
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11547
|
+
label: string().min(1),
|
|
11548
|
+
/**
|
|
11549
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11550
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11551
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11552
|
+
* both of its own.
|
|
11553
|
+
*/
|
|
11554
|
+
recommended: boolean()
|
|
11555
|
+
});
|
|
11556
|
+
var StreamSignalsStatusSchema = object({
|
|
11557
|
+
signals: array(StreamSignalSchema),
|
|
11558
|
+
lastFetchedAt: number()
|
|
11559
|
+
});
|
|
11560
|
+
var streamSignalsCapability = {
|
|
11561
|
+
name: "stream-signals",
|
|
11562
|
+
scope: "device",
|
|
11563
|
+
deviceNative: true,
|
|
11564
|
+
mode: "singleton",
|
|
11565
|
+
deviceTypes: Object.values(DeviceType),
|
|
11566
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
11567
|
+
methods: {
|
|
11568
|
+
/**
|
|
11569
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
11570
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
11571
|
+
* broker's picker show nothing rather than a false choice.
|
|
11572
|
+
*/
|
|
11573
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
11574
|
+
};
|
|
11479
11575
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11480
11576
|
var StreamFormatSchema = _enum([
|
|
11481
11577
|
"webrtc",
|
|
@@ -11872,6 +11968,22 @@ var EgressTranscodeSchema = object({
|
|
|
11872
11968
|
camStreamId: string().nullable()
|
|
11873
11969
|
});
|
|
11874
11970
|
method(object({
|
|
11971
|
+
deviceId: number().int().nonnegative(),
|
|
11972
|
+
/** The provider's signal code. */
|
|
11973
|
+
code: string().min(1),
|
|
11974
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
11975
|
+
at: number().optional()
|
|
11976
|
+
}), object({
|
|
11977
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
11978
|
+
accepted: boolean(),
|
|
11979
|
+
reason: _enum([
|
|
11980
|
+
"woke",
|
|
11981
|
+
"hold-extended",
|
|
11982
|
+
"not-enabled",
|
|
11983
|
+
"no-consumer",
|
|
11984
|
+
"unknown-code"
|
|
11985
|
+
])
|
|
11986
|
+
}), { kind: "mutation" }), method(object({
|
|
11875
11987
|
deviceId: number().int().nonnegative(),
|
|
11876
11988
|
camStreamId: string().min(1),
|
|
11877
11989
|
kind: CamStreamKindSchema,
|
|
@@ -12126,6 +12238,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12126
12238
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12127
12239
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12128
12240
|
minHeight: number().int().positive().optional(),
|
|
12241
|
+
/**
|
|
12242
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12243
|
+
*
|
|
12244
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12245
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12246
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12247
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12248
|
+
* gets born.
|
|
12249
|
+
*/
|
|
12250
|
+
maxHeight: number().int().positive().optional(),
|
|
12129
12251
|
/** Minimum horizontal resolution. */
|
|
12130
12252
|
minWidth: number().int().positive().optional(),
|
|
12131
12253
|
/**
|
|
@@ -12142,7 +12264,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12142
12264
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12143
12265
|
* codec end-to-end, there's nothing to optimise.
|
|
12144
12266
|
*/
|
|
12145
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12267
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12268
|
+
/**
|
|
12269
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12270
|
+
* understanding that it will be transcoded.
|
|
12271
|
+
*
|
|
12272
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12273
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12274
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12275
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12276
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12277
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12278
|
+
*
|
|
12279
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12280
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12281
|
+
*/
|
|
12282
|
+
allowTranscode: boolean().optional()
|
|
12146
12283
|
}).readonly();
|
|
12147
12284
|
var PickStreamPreferencesSchema = object({
|
|
12148
12285
|
/**
|
|
@@ -12156,12 +12293,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12156
12293
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12157
12294
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12158
12295
|
*/
|
|
12159
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12296
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12297
|
+
/**
|
|
12298
|
+
* The height the consumer actually wants to DELIVER.
|
|
12299
|
+
*
|
|
12300
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12301
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12302
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12303
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12304
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12305
|
+
*
|
|
12306
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12307
|
+
*/
|
|
12308
|
+
targetHeight: number().int().positive().optional()
|
|
12160
12309
|
}).readonly();
|
|
12161
12310
|
var PickedCamStreamSchema = object({
|
|
12162
12311
|
camStreamId: string(),
|
|
12163
12312
|
codec: string().optional(),
|
|
12164
12313
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12314
|
+
/**
|
|
12315
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12316
|
+
*
|
|
12317
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12318
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12319
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12320
|
+
*/
|
|
12321
|
+
transcodes: boolean(),
|
|
12165
12322
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12166
12323
|
reason: string()
|
|
12167
12324
|
});
|
|
@@ -16678,6 +16835,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16678
16835
|
"device-enabled",
|
|
16679
16836
|
"device-battery-low",
|
|
16680
16837
|
"device-battery-normal",
|
|
16838
|
+
"device-consumable-low",
|
|
16839
|
+
"device-consumable-normal",
|
|
16681
16840
|
"stream-online",
|
|
16682
16841
|
"stream-offline",
|
|
16683
16842
|
"node-online",
|
|
@@ -16696,6 +16855,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16696
16855
|
"addon-updated",
|
|
16697
16856
|
"server-updated",
|
|
16698
16857
|
"export-completed",
|
|
16858
|
+
"backup-completed",
|
|
16699
16859
|
"camera-online",
|
|
16700
16860
|
"camera-offline",
|
|
16701
16861
|
"camera-disabled",
|
|
@@ -20132,13 +20292,109 @@ var SummariesQueryInput = object({
|
|
|
20132
20292
|
deviceIds: array(number()).min(1),
|
|
20133
20293
|
since: number().optional(),
|
|
20134
20294
|
until: number().optional(),
|
|
20135
|
-
limit: number().int().min(1).max(200).default(50)
|
|
20295
|
+
limit: number().int().min(1).max(200).default(50),
|
|
20296
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20297
|
+
* meaning of "dog" on every summary surface. */
|
|
20298
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20136
20299
|
});
|
|
20137
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20138
20300
|
var SummaryDetailSchema = object({
|
|
20139
20301
|
summary: SummarySchema,
|
|
20140
|
-
/**
|
|
20141
|
-
|
|
20302
|
+
/** Members in absorption order, oldest join first. */
|
|
20303
|
+
members: array(object({
|
|
20304
|
+
trackId: string(),
|
|
20305
|
+
/**
|
|
20306
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20307
|
+
* and the track no longer exists to fill it.
|
|
20308
|
+
*
|
|
20309
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20310
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20311
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20312
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20313
|
+
* drift from the members it claims to describe.
|
|
20314
|
+
*/
|
|
20315
|
+
className: string().nullable(),
|
|
20316
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20317
|
+
role: _enum([
|
|
20318
|
+
"primary",
|
|
20319
|
+
"sibling",
|
|
20320
|
+
"child"
|
|
20321
|
+
]).nullable(),
|
|
20322
|
+
joinedAt: number(),
|
|
20323
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20324
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20325
|
+
label: string().optional(),
|
|
20326
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20327
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20328
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20329
|
+
subLabel: string().optional()
|
|
20330
|
+
})).readonly()
|
|
20331
|
+
});
|
|
20332
|
+
/**
|
|
20333
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20334
|
+
*
|
|
20335
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20336
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20337
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20338
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20339
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20340
|
+
* draw two hundred badges.
|
|
20341
|
+
*/
|
|
20342
|
+
var SummaryListItemSchema = object({
|
|
20343
|
+
summary: SummarySchema,
|
|
20344
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20345
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20346
|
+
classes: array(object({
|
|
20347
|
+
className: string().nullable(),
|
|
20348
|
+
count: number().int().positive()
|
|
20349
|
+
})).readonly()
|
|
20350
|
+
});
|
|
20351
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20352
|
+
/**
|
|
20353
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20354
|
+
*
|
|
20355
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20356
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20357
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20358
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20359
|
+
* "newest" means, on one screen.
|
|
20360
|
+
*/
|
|
20361
|
+
var RecentSummariesQueryInput = object({
|
|
20362
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20363
|
+
deviceIds: array(number()),
|
|
20364
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20365
|
+
since: number().optional(),
|
|
20366
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20367
|
+
until: number().optional(),
|
|
20368
|
+
limit: number().int().min(1).max(500).default(100),
|
|
20369
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20370
|
+
cursor: string().optional(),
|
|
20371
|
+
/**
|
|
20372
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20373
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20374
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20375
|
+
* make the operator's one filter component produce two shapes.
|
|
20376
|
+
*
|
|
20377
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20378
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20379
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20380
|
+
* about its primary.
|
|
20381
|
+
*
|
|
20382
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20383
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20384
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20385
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20386
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20387
|
+
*
|
|
20388
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20389
|
+
*/
|
|
20390
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20391
|
+
});
|
|
20392
|
+
var RecentSummariesPageSchema = object({
|
|
20393
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20394
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20395
|
+
* whichever feed drew it. */
|
|
20396
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20397
|
+
nextCursor: string().nullable()
|
|
20142
20398
|
});
|
|
20143
20399
|
var RecentTracksPageSchema = object({
|
|
20144
20400
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20552,7 +20808,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20552
20808
|
classes: array(string()).optional(),
|
|
20553
20809
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20554
20810
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20555
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20811
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
20556
20812
|
kind: "mutation",
|
|
20557
20813
|
auth: "admin"
|
|
20558
20814
|
}), 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({
|
|
@@ -23881,10 +24137,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
23881
24137
|
}), boolean()), method(object({
|
|
23882
24138
|
deviceId: number().int().nonnegative(),
|
|
23883
24139
|
sessionId: string()
|
|
23884
|
-
}), object({
|
|
23885
|
-
|
|
23886
|
-
|
|
23887
|
-
|
|
24140
|
+
}), object({
|
|
24141
|
+
pendingRenegotiation: object({
|
|
24142
|
+
target: WebrtcStreamTargetSchema,
|
|
24143
|
+
epoch: number()
|
|
24144
|
+
}).nullable(),
|
|
24145
|
+
/**
|
|
24146
|
+
* Whether the session still EXISTS.
|
|
24147
|
+
*
|
|
24148
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24149
|
+
* be able to ask, because a session does not always end the way it
|
|
24150
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24151
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24152
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24153
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24154
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24155
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24156
|
+
*
|
|
24157
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24158
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24159
|
+
*/
|
|
24160
|
+
alive: boolean()
|
|
24161
|
+
}));
|
|
23888
24162
|
object({
|
|
23889
24163
|
/** All accessory children of the parent. */
|
|
23890
24164
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -32305,7 +32579,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
32305
32579
|
* disarmed the channels it did not mention would make the Levels page and
|
|
32306
32580
|
* the Diagnostics page fight over the same value.
|
|
32307
32581
|
*/
|
|
32308
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
32582
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
32583
|
+
/**
|
|
32584
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
32585
|
+
* retention actually deleted.
|
|
32586
|
+
*
|
|
32587
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
32588
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
32589
|
+
* this system is configured through this one document, and a retention audit
|
|
32590
|
+
* configured somewhere else is a second place to look when the question is
|
|
32591
|
+
* "what happened to my data".
|
|
32592
|
+
*
|
|
32593
|
+
* That placement has a cost worth stating: this document ships in the
|
|
32594
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
32595
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
32596
|
+
*
|
|
32597
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
32598
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
32599
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
32600
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
32601
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
32602
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
32603
|
+
*/
|
|
32604
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
32309
32605
|
});
|
|
32310
32606
|
/**
|
|
32311
32607
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -32378,6 +32674,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
32378
32674
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
32379
32675
|
/** The channels ARMED right now, each with its deadline. */
|
|
32380
32676
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
32677
|
+
/**
|
|
32678
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
32679
|
+
*
|
|
32680
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
32681
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
32682
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
32683
|
+
*/
|
|
32684
|
+
opsLogRetentionDays: number().int().min(0),
|
|
32381
32685
|
persisted: boolean()
|
|
32382
32686
|
});
|
|
32383
32687
|
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(), {
|
|
@@ -33773,6 +34077,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33773
34077
|
smoke: smokeCapability,
|
|
33774
34078
|
streamCatalog: streamCatalogCapability,
|
|
33775
34079
|
streamParams: streamParamsCapability,
|
|
34080
|
+
streamSignals: streamSignalsCapability,
|
|
33776
34081
|
switch: switchCapability,
|
|
33777
34082
|
tamper: tamperCapability,
|
|
33778
34083
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -38378,6 +38683,12 @@ Object.freeze({
|
|
|
38378
38683
|
addonId: null,
|
|
38379
38684
|
access: "view"
|
|
38380
38685
|
},
|
|
38686
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
38687
|
+
capName: "pipeline-analytics",
|
|
38688
|
+
capScope: "device",
|
|
38689
|
+
addonId: null,
|
|
38690
|
+
access: "view"
|
|
38691
|
+
},
|
|
38381
38692
|
"pipelineAnalytics.listRecentTracks": {
|
|
38382
38693
|
capName: "pipeline-analytics",
|
|
38383
38694
|
capScope: "device",
|
|
@@ -40340,6 +40651,12 @@ Object.freeze({
|
|
|
40340
40651
|
addonId: null,
|
|
40341
40652
|
access: "create"
|
|
40342
40653
|
},
|
|
40654
|
+
"streamBroker.reportStreamSignal": {
|
|
40655
|
+
capName: "stream-broker",
|
|
40656
|
+
capScope: "system",
|
|
40657
|
+
addonId: null,
|
|
40658
|
+
access: "create"
|
|
40659
|
+
},
|
|
40343
40660
|
"streamBroker.restartProfile": {
|
|
40344
40661
|
capName: "stream-broker",
|
|
40345
40662
|
capScope: "system",
|
|
@@ -40424,6 +40741,12 @@ Object.freeze({
|
|
|
40424
40741
|
addonId: null,
|
|
40425
40742
|
access: "create"
|
|
40426
40743
|
},
|
|
40744
|
+
"streamSignals.listSignals": {
|
|
40745
|
+
capName: "stream-signals",
|
|
40746
|
+
capScope: "device",
|
|
40747
|
+
addonId: null,
|
|
40748
|
+
access: "view"
|
|
40749
|
+
},
|
|
40427
40750
|
"switch.setState": {
|
|
40428
40751
|
capName: "switch",
|
|
40429
40752
|
capScope: "device",
|
|
@@ -42205,6 +42528,11 @@ Object.freeze({
|
|
|
42205
42528
|
form: "single",
|
|
42206
42529
|
optional: true
|
|
42207
42530
|
}],
|
|
42531
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
42532
|
+
name: "deviceIds",
|
|
42533
|
+
form: "array",
|
|
42534
|
+
optional: false
|
|
42535
|
+
}],
|
|
42208
42536
|
"pipelineAnalytics.listRecentTracks": [{
|
|
42209
42537
|
name: "deviceIds",
|
|
42210
42538
|
form: "array",
|
|
@@ -42791,6 +43119,11 @@ Object.freeze({
|
|
|
42791
43119
|
form: "single",
|
|
42792
43120
|
optional: false
|
|
42793
43121
|
}],
|
|
43122
|
+
"streamBroker.reportStreamSignal": [{
|
|
43123
|
+
name: "deviceId",
|
|
43124
|
+
form: "single",
|
|
43125
|
+
optional: false
|
|
43126
|
+
}],
|
|
42794
43127
|
"streamBroker.restartProfile": [{
|
|
42795
43128
|
name: "deviceId",
|
|
42796
43129
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.101",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|