@camstack/addon-ai 0.4.105 → 0.4.107
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 +334 -16
- package/dist/addon.mjs +334 -16
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
|
|
|
12
12
|
let node_fs_promises = require("node:fs/promises");
|
|
13
13
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
14
14
|
let node_child_process = require("node:child_process");
|
|
15
|
-
//#region ../types/dist/event-category-
|
|
15
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
16
16
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
17
17
|
EventCategory["SystemBoot"] = "system.boot";
|
|
18
18
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -629,6 +629,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
629
629
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
630
630
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
631
631
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
632
|
+
/**
|
|
633
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
634
|
+
*
|
|
635
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
636
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
637
|
+
* destinations would be told three times. And a run where two of three
|
|
638
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
639
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
640
|
+
* carried here and the message says both.
|
|
641
|
+
*
|
|
642
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
643
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
644
|
+
*/
|
|
645
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
632
646
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
633
647
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
634
648
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5506,7 +5520,7 @@ function number(params) {
|
|
|
5506
5520
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
5507
5521
|
}
|
|
5508
5522
|
//#endregion
|
|
5509
|
-
//#region ../types/dist/sleep-
|
|
5523
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5510
5524
|
/**
|
|
5511
5525
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5512
5526
|
* window to float samples (D455).
|
|
@@ -7578,7 +7592,23 @@ var EncodeProfileSchema = object({
|
|
|
7578
7592
|
"zerolatency",
|
|
7579
7593
|
"film",
|
|
7580
7594
|
"animation"
|
|
7581
|
-
]).optional()
|
|
7595
|
+
]).optional(),
|
|
7596
|
+
/**
|
|
7597
|
+
* ONE slice per access unit.
|
|
7598
|
+
*
|
|
7599
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7600
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7601
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7602
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7603
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7604
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7605
|
+
*
|
|
7606
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7607
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7608
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7609
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7610
|
+
*/
|
|
7611
|
+
singleSlicePerFrame: boolean().optional()
|
|
7582
7612
|
}),
|
|
7583
7613
|
audio: union([literal("passthrough"), object({
|
|
7584
7614
|
codec: _enum([
|
|
@@ -7628,7 +7658,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7628
7658
|
audio: "passthrough"
|
|
7629
7659
|
};
|
|
7630
7660
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7631
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7661
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7632
7662
|
/**
|
|
7633
7663
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7634
7664
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11677,6 +11707,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11677
11707
|
auth: "admin"
|
|
11678
11708
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11679
11709
|
DeviceType.Camera;
|
|
11710
|
+
/**
|
|
11711
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11712
|
+
*
|
|
11713
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11714
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11715
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11716
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11717
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11718
|
+
* itself, with no stream running.
|
|
11719
|
+
*
|
|
11720
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11721
|
+
*
|
|
11722
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11723
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11724
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11725
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11726
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11727
|
+
*
|
|
11728
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11729
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11730
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11731
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11732
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11733
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11734
|
+
* camera. Two questions, two authorities.
|
|
11735
|
+
*
|
|
11736
|
+
* ## Availability is not permission
|
|
11737
|
+
*
|
|
11738
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11739
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11740
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11741
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11742
|
+
*/
|
|
11743
|
+
/** One signal a device can emit. */
|
|
11744
|
+
var StreamSignalSchema = object({
|
|
11745
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11746
|
+
code: string().min(1),
|
|
11747
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11748
|
+
label: string().min(1),
|
|
11749
|
+
/**
|
|
11750
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11751
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11752
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11753
|
+
* both of its own.
|
|
11754
|
+
*/
|
|
11755
|
+
recommended: boolean()
|
|
11756
|
+
});
|
|
11757
|
+
object({
|
|
11758
|
+
signals: array(StreamSignalSchema),
|
|
11759
|
+
lastFetchedAt: number$1()
|
|
11760
|
+
});
|
|
11761
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11680
11762
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11681
11763
|
var StreamFormatSchema = _enum([
|
|
11682
11764
|
"webrtc",
|
|
@@ -12073,6 +12155,22 @@ var EgressTranscodeSchema = object({
|
|
|
12073
12155
|
camStreamId: string().nullable()
|
|
12074
12156
|
});
|
|
12075
12157
|
method(object({
|
|
12158
|
+
deviceId: number$1().int().nonnegative(),
|
|
12159
|
+
/** The provider's signal code. */
|
|
12160
|
+
code: string().min(1),
|
|
12161
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12162
|
+
at: number$1().optional()
|
|
12163
|
+
}), object({
|
|
12164
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12165
|
+
accepted: boolean(),
|
|
12166
|
+
reason: _enum([
|
|
12167
|
+
"woke",
|
|
12168
|
+
"hold-extended",
|
|
12169
|
+
"not-enabled",
|
|
12170
|
+
"no-consumer",
|
|
12171
|
+
"unknown-code"
|
|
12172
|
+
])
|
|
12173
|
+
}), { kind: "mutation" }), method(object({
|
|
12076
12174
|
deviceId: number$1().int().nonnegative(),
|
|
12077
12175
|
camStreamId: string().min(1),
|
|
12078
12176
|
kind: CamStreamKindSchema,
|
|
@@ -12327,6 +12425,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12327
12425
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12328
12426
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12329
12427
|
minHeight: number$1().int().positive().optional(),
|
|
12428
|
+
/**
|
|
12429
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12430
|
+
*
|
|
12431
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12432
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12433
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12434
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12435
|
+
* gets born.
|
|
12436
|
+
*/
|
|
12437
|
+
maxHeight: number$1().int().positive().optional(),
|
|
12330
12438
|
/** Minimum horizontal resolution. */
|
|
12331
12439
|
minWidth: number$1().int().positive().optional(),
|
|
12332
12440
|
/**
|
|
@@ -12343,7 +12451,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12343
12451
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12344
12452
|
* codec end-to-end, there's nothing to optimise.
|
|
12345
12453
|
*/
|
|
12346
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12454
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12455
|
+
/**
|
|
12456
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12457
|
+
* understanding that it will be transcoded.
|
|
12458
|
+
*
|
|
12459
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12460
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12461
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12462
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12463
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12464
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12465
|
+
*
|
|
12466
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12467
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12468
|
+
*/
|
|
12469
|
+
allowTranscode: boolean().optional()
|
|
12347
12470
|
}).readonly();
|
|
12348
12471
|
var PickStreamPreferencesSchema = object({
|
|
12349
12472
|
/**
|
|
@@ -12357,12 +12480,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12357
12480
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12358
12481
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12359
12482
|
*/
|
|
12360
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12483
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12484
|
+
/**
|
|
12485
|
+
* The height the consumer actually wants to DELIVER.
|
|
12486
|
+
*
|
|
12487
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12488
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12489
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12490
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12491
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12492
|
+
*
|
|
12493
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12494
|
+
*/
|
|
12495
|
+
targetHeight: number$1().int().positive().optional()
|
|
12361
12496
|
}).readonly();
|
|
12362
12497
|
var PickedCamStreamSchema = object({
|
|
12363
12498
|
camStreamId: string(),
|
|
12364
12499
|
codec: string().optional(),
|
|
12365
12500
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12501
|
+
/**
|
|
12502
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12503
|
+
*
|
|
12504
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12505
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12506
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12507
|
+
*/
|
|
12508
|
+
transcodes: boolean(),
|
|
12366
12509
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12367
12510
|
reason: string()
|
|
12368
12511
|
});
|
|
@@ -16645,6 +16788,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16645
16788
|
"device-enabled",
|
|
16646
16789
|
"device-battery-low",
|
|
16647
16790
|
"device-battery-normal",
|
|
16791
|
+
"device-consumable-low",
|
|
16792
|
+
"device-consumable-normal",
|
|
16648
16793
|
"stream-online",
|
|
16649
16794
|
"stream-offline",
|
|
16650
16795
|
"node-online",
|
|
@@ -16663,6 +16808,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16663
16808
|
"addon-updated",
|
|
16664
16809
|
"server-updated",
|
|
16665
16810
|
"export-completed",
|
|
16811
|
+
"backup-completed",
|
|
16666
16812
|
"camera-online",
|
|
16667
16813
|
"camera-offline",
|
|
16668
16814
|
"camera-disabled",
|
|
@@ -20059,13 +20205,109 @@ var SummariesQueryInput = object({
|
|
|
20059
20205
|
deviceIds: array(number$1()).min(1),
|
|
20060
20206
|
since: number$1().optional(),
|
|
20061
20207
|
until: number$1().optional(),
|
|
20062
|
-
limit: number$1().int().min(1).max(200).default(50)
|
|
20208
|
+
limit: number$1().int().min(1).max(200).default(50),
|
|
20209
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20210
|
+
* meaning of "dog" on every summary surface. */
|
|
20211
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20063
20212
|
});
|
|
20064
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20065
20213
|
var SummaryDetailSchema = object({
|
|
20066
20214
|
summary: SummarySchema,
|
|
20067
|
-
/**
|
|
20068
|
-
|
|
20215
|
+
/** Members in absorption order, oldest join first. */
|
|
20216
|
+
members: array(object({
|
|
20217
|
+
trackId: string(),
|
|
20218
|
+
/**
|
|
20219
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20220
|
+
* and the track no longer exists to fill it.
|
|
20221
|
+
*
|
|
20222
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20223
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20224
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20225
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20226
|
+
* drift from the members it claims to describe.
|
|
20227
|
+
*/
|
|
20228
|
+
className: string().nullable(),
|
|
20229
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20230
|
+
role: _enum([
|
|
20231
|
+
"primary",
|
|
20232
|
+
"sibling",
|
|
20233
|
+
"child"
|
|
20234
|
+
]).nullable(),
|
|
20235
|
+
joinedAt: number$1(),
|
|
20236
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20237
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20238
|
+
label: string().optional(),
|
|
20239
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20240
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20241
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20242
|
+
subLabel: string().optional()
|
|
20243
|
+
})).readonly()
|
|
20244
|
+
});
|
|
20245
|
+
/**
|
|
20246
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20247
|
+
*
|
|
20248
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20249
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20250
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20251
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20252
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20253
|
+
* draw two hundred badges.
|
|
20254
|
+
*/
|
|
20255
|
+
var SummaryListItemSchema = object({
|
|
20256
|
+
summary: SummarySchema,
|
|
20257
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20258
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20259
|
+
classes: array(object({
|
|
20260
|
+
className: string().nullable(),
|
|
20261
|
+
count: number$1().int().positive()
|
|
20262
|
+
})).readonly()
|
|
20263
|
+
});
|
|
20264
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20265
|
+
/**
|
|
20266
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20267
|
+
*
|
|
20268
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20269
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20270
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20271
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20272
|
+
* "newest" means, on one screen.
|
|
20273
|
+
*/
|
|
20274
|
+
var RecentSummariesQueryInput = object({
|
|
20275
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20276
|
+
deviceIds: array(number$1()),
|
|
20277
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20278
|
+
since: number$1().optional(),
|
|
20279
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20280
|
+
until: number$1().optional(),
|
|
20281
|
+
limit: number$1().int().min(1).max(500).default(100),
|
|
20282
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20283
|
+
cursor: string().optional(),
|
|
20284
|
+
/**
|
|
20285
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20286
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20287
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20288
|
+
* make the operator's one filter component produce two shapes.
|
|
20289
|
+
*
|
|
20290
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20291
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20292
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20293
|
+
* about its primary.
|
|
20294
|
+
*
|
|
20295
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20296
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20297
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20298
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20299
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20300
|
+
*
|
|
20301
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20302
|
+
*/
|
|
20303
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20304
|
+
});
|
|
20305
|
+
var RecentSummariesPageSchema = object({
|
|
20306
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20307
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20308
|
+
* whichever feed drew it. */
|
|
20309
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20310
|
+
nextCursor: string().nullable()
|
|
20069
20311
|
});
|
|
20070
20312
|
var RecentTracksPageSchema = object({
|
|
20071
20313
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20479,7 +20721,7 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
20479
20721
|
classes: array(string()).optional(),
|
|
20480
20722
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20481
20723
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20482
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number$1() }), _void(), {
|
|
20724
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number$1() }), _void(), {
|
|
20483
20725
|
kind: "mutation",
|
|
20484
20726
|
auth: "admin"
|
|
20485
20727
|
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number$1() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number$1()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
|
|
@@ -23808,10 +24050,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
23808
24050
|
}), boolean()), method(object({
|
|
23809
24051
|
deviceId: number$1().int().nonnegative(),
|
|
23810
24052
|
sessionId: string()
|
|
23811
|
-
}), object({
|
|
23812
|
-
|
|
23813
|
-
|
|
23814
|
-
|
|
24053
|
+
}), object({
|
|
24054
|
+
pendingRenegotiation: object({
|
|
24055
|
+
target: WebrtcStreamTargetSchema,
|
|
24056
|
+
epoch: number$1()
|
|
24057
|
+
}).nullable(),
|
|
24058
|
+
/**
|
|
24059
|
+
* Whether the session still EXISTS.
|
|
24060
|
+
*
|
|
24061
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24062
|
+
* be able to ask, because a session does not always end the way it
|
|
24063
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24064
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24065
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24066
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24067
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24068
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24069
|
+
*
|
|
24070
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24071
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24072
|
+
*/
|
|
24073
|
+
alive: boolean()
|
|
24074
|
+
}));
|
|
23815
24075
|
object({
|
|
23816
24076
|
/** All accessory children of the parent. */
|
|
23817
24077
|
childDeviceIds: array(number$1()).readonly(),
|
|
@@ -30085,7 +30345,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
30085
30345
|
* disarmed the channels it did not mention would make the Levels page and
|
|
30086
30346
|
* the Diagnostics page fight over the same value.
|
|
30087
30347
|
*/
|
|
30088
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
30348
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
30349
|
+
/**
|
|
30350
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
30351
|
+
* retention actually deleted.
|
|
30352
|
+
*
|
|
30353
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
30354
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
30355
|
+
* this system is configured through this one document, and a retention audit
|
|
30356
|
+
* configured somewhere else is a second place to look when the question is
|
|
30357
|
+
* "what happened to my data".
|
|
30358
|
+
*
|
|
30359
|
+
* That placement has a cost worth stating: this document ships in the
|
|
30360
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
30361
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
30362
|
+
*
|
|
30363
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
30364
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
30365
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
30366
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
30367
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
30368
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
30369
|
+
*/
|
|
30370
|
+
opsLogRetentionDays: number$1().int().min(0).max(3650).optional()
|
|
30089
30371
|
});
|
|
30090
30372
|
/**
|
|
30091
30373
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -30158,6 +30440,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
30158
30440
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
30159
30441
|
/** The channels ARMED right now, each with its deadline. */
|
|
30160
30442
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
30443
|
+
/**
|
|
30444
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
30445
|
+
*
|
|
30446
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
30447
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
30448
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
30449
|
+
*/
|
|
30450
|
+
opsLogRetentionDays: number$1().int().min(0),
|
|
30161
30451
|
persisted: boolean()
|
|
30162
30452
|
});
|
|
30163
30453
|
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(), {
|
|
@@ -34317,6 +34607,12 @@ Object.freeze({
|
|
|
34317
34607
|
addonId: null,
|
|
34318
34608
|
access: "view"
|
|
34319
34609
|
},
|
|
34610
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
34611
|
+
capName: "pipeline-analytics",
|
|
34612
|
+
capScope: "device",
|
|
34613
|
+
addonId: null,
|
|
34614
|
+
access: "view"
|
|
34615
|
+
},
|
|
34320
34616
|
"pipelineAnalytics.listRecentTracks": {
|
|
34321
34617
|
capName: "pipeline-analytics",
|
|
34322
34618
|
capScope: "device",
|
|
@@ -36279,6 +36575,12 @@ Object.freeze({
|
|
|
36279
36575
|
addonId: null,
|
|
36280
36576
|
access: "create"
|
|
36281
36577
|
},
|
|
36578
|
+
"streamBroker.reportStreamSignal": {
|
|
36579
|
+
capName: "stream-broker",
|
|
36580
|
+
capScope: "system",
|
|
36581
|
+
addonId: null,
|
|
36582
|
+
access: "create"
|
|
36583
|
+
},
|
|
36282
36584
|
"streamBroker.restartProfile": {
|
|
36283
36585
|
capName: "stream-broker",
|
|
36284
36586
|
capScope: "system",
|
|
@@ -36363,6 +36665,12 @@ Object.freeze({
|
|
|
36363
36665
|
addonId: null,
|
|
36364
36666
|
access: "create"
|
|
36365
36667
|
},
|
|
36668
|
+
"streamSignals.listSignals": {
|
|
36669
|
+
capName: "stream-signals",
|
|
36670
|
+
capScope: "device",
|
|
36671
|
+
addonId: null,
|
|
36672
|
+
access: "view"
|
|
36673
|
+
},
|
|
36366
36674
|
"switch.setState": {
|
|
36367
36675
|
capName: "switch",
|
|
36368
36676
|
capScope: "device",
|
|
@@ -38144,6 +38452,11 @@ Object.freeze({
|
|
|
38144
38452
|
form: "single",
|
|
38145
38453
|
optional: true
|
|
38146
38454
|
}],
|
|
38455
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
38456
|
+
name: "deviceIds",
|
|
38457
|
+
form: "array",
|
|
38458
|
+
optional: false
|
|
38459
|
+
}],
|
|
38147
38460
|
"pipelineAnalytics.listRecentTracks": [{
|
|
38148
38461
|
name: "deviceIds",
|
|
38149
38462
|
form: "array",
|
|
@@ -38730,6 +39043,11 @@ Object.freeze({
|
|
|
38730
39043
|
form: "single",
|
|
38731
39044
|
optional: false
|
|
38732
39045
|
}],
|
|
39046
|
+
"streamBroker.reportStreamSignal": [{
|
|
39047
|
+
name: "deviceId",
|
|
39048
|
+
form: "single",
|
|
39049
|
+
optional: false
|
|
39050
|
+
}],
|
|
38733
39051
|
"streamBroker.restartProfile": [{
|
|
38734
39052
|
name: "deviceId",
|
|
38735
39053
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
}) : target, mod));
|
|
40
40
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
41
41
|
//#endregion
|
|
42
|
-
//#region ../types/dist/event-category-
|
|
42
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
43
43
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
44
44
|
EventCategory["SystemBoot"] = "system.boot";
|
|
45
45
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -656,6 +656,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
656
656
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
657
657
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
658
658
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
659
|
+
/**
|
|
660
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
661
|
+
*
|
|
662
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
663
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
664
|
+
* destinations would be told three times. And a run where two of three
|
|
665
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
666
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
667
|
+
* carried here and the message says both.
|
|
668
|
+
*
|
|
669
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
670
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
671
|
+
*/
|
|
672
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
659
673
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
660
674
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
661
675
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -5533,7 +5547,7 @@ function number(params) {
|
|
|
5533
5547
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
5534
5548
|
}
|
|
5535
5549
|
//#endregion
|
|
5536
|
-
//#region ../types/dist/sleep-
|
|
5550
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
5537
5551
|
/**
|
|
5538
5552
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5539
5553
|
* window to float samples (D455).
|
|
@@ -7605,7 +7619,23 @@ var EncodeProfileSchema = object({
|
|
|
7605
7619
|
"zerolatency",
|
|
7606
7620
|
"film",
|
|
7607
7621
|
"animation"
|
|
7608
|
-
]).optional()
|
|
7622
|
+
]).optional(),
|
|
7623
|
+
/**
|
|
7624
|
+
* ONE slice per access unit.
|
|
7625
|
+
*
|
|
7626
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
7627
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
7628
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
7629
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
7630
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
7631
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
7632
|
+
*
|
|
7633
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
7634
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
7635
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
7636
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
7637
|
+
*/
|
|
7638
|
+
singleSlicePerFrame: boolean().optional()
|
|
7609
7639
|
}),
|
|
7610
7640
|
audio: union([literal("passthrough"), object({
|
|
7611
7641
|
codec: _enum([
|
|
@@ -7655,7 +7685,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
7655
7685
|
audio: "passthrough"
|
|
7656
7686
|
};
|
|
7657
7687
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7658
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
7688
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
7659
7689
|
/**
|
|
7660
7690
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
7661
7691
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -11704,6 +11734,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
11704
11734
|
auth: "admin"
|
|
11705
11735
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
11706
11736
|
DeviceType.Camera;
|
|
11737
|
+
/**
|
|
11738
|
+
* The signals a device can emit to WAKE its own stream.
|
|
11739
|
+
*
|
|
11740
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
11741
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
11742
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
11743
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
11744
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
11745
|
+
* itself, with no stream running.
|
|
11746
|
+
*
|
|
11747
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
11748
|
+
*
|
|
11749
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
11750
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
11751
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
11752
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
11753
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
11754
|
+
*
|
|
11755
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
11756
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
11757
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
11758
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
11759
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
11760
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
11761
|
+
* camera. Two questions, two authorities.
|
|
11762
|
+
*
|
|
11763
|
+
* ## Availability is not permission
|
|
11764
|
+
*
|
|
11765
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
11766
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
11767
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
11768
|
+
* provider declaring a signal is not a provider enabling it.
|
|
11769
|
+
*/
|
|
11770
|
+
/** One signal a device can emit. */
|
|
11771
|
+
var StreamSignalSchema = object({
|
|
11772
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
11773
|
+
code: string().min(1),
|
|
11774
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
11775
|
+
label: string().min(1),
|
|
11776
|
+
/**
|
|
11777
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
11778
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
11779
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
11780
|
+
* both of its own.
|
|
11781
|
+
*/
|
|
11782
|
+
recommended: boolean()
|
|
11783
|
+
});
|
|
11784
|
+
object({
|
|
11785
|
+
signals: array(StreamSignalSchema),
|
|
11786
|
+
lastFetchedAt: number$1()
|
|
11787
|
+
});
|
|
11788
|
+
Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
|
|
11707
11789
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
11708
11790
|
var StreamFormatSchema = _enum([
|
|
11709
11791
|
"webrtc",
|
|
@@ -12100,6 +12182,22 @@ var EgressTranscodeSchema = object({
|
|
|
12100
12182
|
camStreamId: string().nullable()
|
|
12101
12183
|
});
|
|
12102
12184
|
method(object({
|
|
12185
|
+
deviceId: number$1().int().nonnegative(),
|
|
12186
|
+
/** The provider's signal code. */
|
|
12187
|
+
code: string().min(1),
|
|
12188
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12189
|
+
at: number$1().optional()
|
|
12190
|
+
}), object({
|
|
12191
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12192
|
+
accepted: boolean(),
|
|
12193
|
+
reason: _enum([
|
|
12194
|
+
"woke",
|
|
12195
|
+
"hold-extended",
|
|
12196
|
+
"not-enabled",
|
|
12197
|
+
"no-consumer",
|
|
12198
|
+
"unknown-code"
|
|
12199
|
+
])
|
|
12200
|
+
}), { kind: "mutation" }), method(object({
|
|
12103
12201
|
deviceId: number$1().int().nonnegative(),
|
|
12104
12202
|
camStreamId: string().min(1),
|
|
12105
12203
|
kind: CamStreamKindSchema,
|
|
@@ -12354,6 +12452,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12354
12452
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12355
12453
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12356
12454
|
minHeight: number$1().int().positive().optional(),
|
|
12455
|
+
/**
|
|
12456
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
12457
|
+
*
|
|
12458
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
12459
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
12460
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
12461
|
+
* one caller implementing it privately is how a second scoring authority
|
|
12462
|
+
* gets born.
|
|
12463
|
+
*/
|
|
12464
|
+
maxHeight: number$1().int().positive().optional(),
|
|
12357
12465
|
/** Minimum horizontal resolution. */
|
|
12358
12466
|
minWidth: number$1().int().positive().optional(),
|
|
12359
12467
|
/**
|
|
@@ -12370,7 +12478,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12370
12478
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12371
12479
|
* codec end-to-end, there's nothing to optimise.
|
|
12372
12480
|
*/
|
|
12373
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
12481
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
12482
|
+
/**
|
|
12483
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
12484
|
+
* understanding that it will be transcoded.
|
|
12485
|
+
*
|
|
12486
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
12487
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
12488
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
12489
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
12490
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
12491
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
12492
|
+
*
|
|
12493
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
12494
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
12495
|
+
*/
|
|
12496
|
+
allowTranscode: boolean().optional()
|
|
12374
12497
|
}).readonly();
|
|
12375
12498
|
var PickStreamPreferencesSchema = object({
|
|
12376
12499
|
/**
|
|
@@ -12384,12 +12507,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12384
12507
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12385
12508
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12386
12509
|
*/
|
|
12387
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
12510
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
12511
|
+
/**
|
|
12512
|
+
* The height the consumer actually wants to DELIVER.
|
|
12513
|
+
*
|
|
12514
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
12515
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
12516
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
12517
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
12518
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
12519
|
+
*
|
|
12520
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
12521
|
+
*/
|
|
12522
|
+
targetHeight: number$1().int().positive().optional()
|
|
12388
12523
|
}).readonly();
|
|
12389
12524
|
var PickedCamStreamSchema = object({
|
|
12390
12525
|
camStreamId: string(),
|
|
12391
12526
|
codec: string().optional(),
|
|
12392
12527
|
resolution: CamStreamResolutionSchema.optional(),
|
|
12528
|
+
/**
|
|
12529
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
12530
|
+
*
|
|
12531
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
12532
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
12533
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
12534
|
+
*/
|
|
12535
|
+
transcodes: boolean(),
|
|
12393
12536
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12394
12537
|
reason: string()
|
|
12395
12538
|
});
|
|
@@ -16672,6 +16815,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16672
16815
|
"device-enabled",
|
|
16673
16816
|
"device-battery-low",
|
|
16674
16817
|
"device-battery-normal",
|
|
16818
|
+
"device-consumable-low",
|
|
16819
|
+
"device-consumable-normal",
|
|
16675
16820
|
"stream-online",
|
|
16676
16821
|
"stream-offline",
|
|
16677
16822
|
"node-online",
|
|
@@ -16690,6 +16835,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16690
16835
|
"addon-updated",
|
|
16691
16836
|
"server-updated",
|
|
16692
16837
|
"export-completed",
|
|
16838
|
+
"backup-completed",
|
|
16693
16839
|
"camera-online",
|
|
16694
16840
|
"camera-offline",
|
|
16695
16841
|
"camera-disabled",
|
|
@@ -20086,13 +20232,109 @@ var SummariesQueryInput = object({
|
|
|
20086
20232
|
deviceIds: array(number$1()).min(1),
|
|
20087
20233
|
since: number$1().optional(),
|
|
20088
20234
|
until: number$1().optional(),
|
|
20089
|
-
limit: number$1().int().min(1).max(200).default(50)
|
|
20235
|
+
limit: number$1().int().min(1).max(200).default(50),
|
|
20236
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
20237
|
+
* meaning of "dog" on every summary surface. */
|
|
20238
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20090
20239
|
});
|
|
20091
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20092
20240
|
var SummaryDetailSchema = object({
|
|
20093
20241
|
summary: SummarySchema,
|
|
20094
|
-
/**
|
|
20095
|
-
|
|
20242
|
+
/** Members in absorption order, oldest join first. */
|
|
20243
|
+
members: array(object({
|
|
20244
|
+
trackId: string(),
|
|
20245
|
+
/**
|
|
20246
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
20247
|
+
* and the track no longer exists to fill it.
|
|
20248
|
+
*
|
|
20249
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
20250
|
+
* class afterwards, and a group's composition is the history of who came
|
|
20251
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
20252
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
20253
|
+
* drift from the members it claims to describe.
|
|
20254
|
+
*/
|
|
20255
|
+
className: string().nullable(),
|
|
20256
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
20257
|
+
role: _enum([
|
|
20258
|
+
"primary",
|
|
20259
|
+
"sibling",
|
|
20260
|
+
"child"
|
|
20261
|
+
]).nullable(),
|
|
20262
|
+
joinedAt: number$1(),
|
|
20263
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
20264
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
20265
|
+
label: string().optional(),
|
|
20266
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
20267
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
20268
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
20269
|
+
subLabel: string().optional()
|
|
20270
|
+
})).readonly()
|
|
20271
|
+
});
|
|
20272
|
+
/**
|
|
20273
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
20274
|
+
*
|
|
20275
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
20276
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
20277
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
20278
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
20279
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
20280
|
+
* draw two hundred badges.
|
|
20281
|
+
*/
|
|
20282
|
+
var SummaryListItemSchema = object({
|
|
20283
|
+
summary: SummarySchema,
|
|
20284
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
20285
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
20286
|
+
classes: array(object({
|
|
20287
|
+
className: string().nullable(),
|
|
20288
|
+
count: number$1().int().positive()
|
|
20289
|
+
})).readonly()
|
|
20290
|
+
});
|
|
20291
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
20292
|
+
/**
|
|
20293
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
20294
|
+
*
|
|
20295
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
20296
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
20297
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
20298
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
20299
|
+
* "newest" means, on one screen.
|
|
20300
|
+
*/
|
|
20301
|
+
var RecentSummariesQueryInput = object({
|
|
20302
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
20303
|
+
deviceIds: array(number$1()),
|
|
20304
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
20305
|
+
since: number$1().optional(),
|
|
20306
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
20307
|
+
until: number$1().optional(),
|
|
20308
|
+
limit: number$1().int().min(1).max(500).default(100),
|
|
20309
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
20310
|
+
cursor: string().optional(),
|
|
20311
|
+
/**
|
|
20312
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
20313
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
20314
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
20315
|
+
* make the operator's one filter component produce two shapes.
|
|
20316
|
+
*
|
|
20317
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
20318
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
20319
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
20320
|
+
* about its primary.
|
|
20321
|
+
*
|
|
20322
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
20323
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
20324
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
20325
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
20326
|
+
* that read only the class would answer "animal" and never "dog".
|
|
20327
|
+
*
|
|
20328
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
20329
|
+
*/
|
|
20330
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20331
|
+
});
|
|
20332
|
+
var RecentSummariesPageSchema = object({
|
|
20333
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
20334
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
20335
|
+
* whichever feed drew it. */
|
|
20336
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
20337
|
+
nextCursor: string().nullable()
|
|
20096
20338
|
});
|
|
20097
20339
|
var RecentTracksPageSchema = object({
|
|
20098
20340
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -20506,7 +20748,7 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
|
|
|
20506
20748
|
classes: array(string()).optional(),
|
|
20507
20749
|
/** See {@link ExcludeSourcesDoc}. */
|
|
20508
20750
|
excludeSources: array(TrackSourceSchema).optional()
|
|
20509
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number$1() }), _void(), {
|
|
20751
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number$1() }), _void(), {
|
|
20510
20752
|
kind: "mutation",
|
|
20511
20753
|
auth: "admin"
|
|
20512
20754
|
}), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number$1() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number$1()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
|
|
@@ -23835,10 +24077,28 @@ DeviceType.Camera, method(object({ deviceId: number$1().int().nonnegative() }),
|
|
|
23835
24077
|
}), boolean()), method(object({
|
|
23836
24078
|
deviceId: number$1().int().nonnegative(),
|
|
23837
24079
|
sessionId: string()
|
|
23838
|
-
}), object({
|
|
23839
|
-
|
|
23840
|
-
|
|
23841
|
-
|
|
24080
|
+
}), object({
|
|
24081
|
+
pendingRenegotiation: object({
|
|
24082
|
+
target: WebrtcStreamTargetSchema,
|
|
24083
|
+
epoch: number$1()
|
|
24084
|
+
}).nullable(),
|
|
24085
|
+
/**
|
|
24086
|
+
* Whether the session still EXISTS.
|
|
24087
|
+
*
|
|
24088
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24089
|
+
* be able to ask, because a session does not always end the way it
|
|
24090
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24091
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24092
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24093
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24094
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24095
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24096
|
+
*
|
|
24097
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24098
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24099
|
+
*/
|
|
24100
|
+
alive: boolean()
|
|
24101
|
+
}));
|
|
23842
24102
|
object({
|
|
23843
24103
|
/** All accessory children of the parent. */
|
|
23844
24104
|
childDeviceIds: array(number$1()).readonly(),
|
|
@@ -30112,7 +30372,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
30112
30372
|
* disarmed the channels it did not mention would make the Levels page and
|
|
30113
30373
|
* the Diagnostics page fight over the same value.
|
|
30114
30374
|
*/
|
|
30115
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
30375
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
30376
|
+
/**
|
|
30377
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
30378
|
+
* retention actually deleted.
|
|
30379
|
+
*
|
|
30380
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
30381
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
30382
|
+
* this system is configured through this one document, and a retention audit
|
|
30383
|
+
* configured somewhere else is a second place to look when the question is
|
|
30384
|
+
* "what happened to my data".
|
|
30385
|
+
*
|
|
30386
|
+
* That placement has a cost worth stating: this document ships in the
|
|
30387
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
30388
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
30389
|
+
*
|
|
30390
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
30391
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
30392
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
30393
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
30394
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
30395
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
30396
|
+
*/
|
|
30397
|
+
opsLogRetentionDays: number$1().int().min(0).max(3650).optional()
|
|
30116
30398
|
});
|
|
30117
30399
|
/**
|
|
30118
30400
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -30185,6 +30467,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
30185
30467
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
30186
30468
|
/** The channels ARMED right now, each with its deadline. */
|
|
30187
30469
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
30470
|
+
/**
|
|
30471
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
30472
|
+
*
|
|
30473
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
30474
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
30475
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
30476
|
+
*/
|
|
30477
|
+
opsLogRetentionDays: number$1().int().min(0),
|
|
30188
30478
|
persisted: boolean()
|
|
30189
30479
|
});
|
|
30190
30480
|
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(), {
|
|
@@ -34344,6 +34634,12 @@ Object.freeze({
|
|
|
34344
34634
|
addonId: null,
|
|
34345
34635
|
access: "view"
|
|
34346
34636
|
},
|
|
34637
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
34638
|
+
capName: "pipeline-analytics",
|
|
34639
|
+
capScope: "device",
|
|
34640
|
+
addonId: null,
|
|
34641
|
+
access: "view"
|
|
34642
|
+
},
|
|
34347
34643
|
"pipelineAnalytics.listRecentTracks": {
|
|
34348
34644
|
capName: "pipeline-analytics",
|
|
34349
34645
|
capScope: "device",
|
|
@@ -36306,6 +36602,12 @@ Object.freeze({
|
|
|
36306
36602
|
addonId: null,
|
|
36307
36603
|
access: "create"
|
|
36308
36604
|
},
|
|
36605
|
+
"streamBroker.reportStreamSignal": {
|
|
36606
|
+
capName: "stream-broker",
|
|
36607
|
+
capScope: "system",
|
|
36608
|
+
addonId: null,
|
|
36609
|
+
access: "create"
|
|
36610
|
+
},
|
|
36309
36611
|
"streamBroker.restartProfile": {
|
|
36310
36612
|
capName: "stream-broker",
|
|
36311
36613
|
capScope: "system",
|
|
@@ -36390,6 +36692,12 @@ Object.freeze({
|
|
|
36390
36692
|
addonId: null,
|
|
36391
36693
|
access: "create"
|
|
36392
36694
|
},
|
|
36695
|
+
"streamSignals.listSignals": {
|
|
36696
|
+
capName: "stream-signals",
|
|
36697
|
+
capScope: "device",
|
|
36698
|
+
addonId: null,
|
|
36699
|
+
access: "view"
|
|
36700
|
+
},
|
|
36393
36701
|
"switch.setState": {
|
|
36394
36702
|
capName: "switch",
|
|
36395
36703
|
capScope: "device",
|
|
@@ -38171,6 +38479,11 @@ Object.freeze({
|
|
|
38171
38479
|
form: "single",
|
|
38172
38480
|
optional: true
|
|
38173
38481
|
}],
|
|
38482
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
38483
|
+
name: "deviceIds",
|
|
38484
|
+
form: "array",
|
|
38485
|
+
optional: false
|
|
38486
|
+
}],
|
|
38174
38487
|
"pipelineAnalytics.listRecentTracks": [{
|
|
38175
38488
|
name: "deviceIds",
|
|
38176
38489
|
form: "array",
|
|
@@ -38757,6 +39070,11 @@ Object.freeze({
|
|
|
38757
39070
|
form: "single",
|
|
38758
39071
|
optional: false
|
|
38759
39072
|
}],
|
|
39073
|
+
"streamBroker.reportStreamSignal": [{
|
|
39074
|
+
name: "deviceId",
|
|
39075
|
+
form: "single",
|
|
39076
|
+
optional: false
|
|
39077
|
+
}],
|
|
38760
39078
|
"streamBroker.restartProfile": [{
|
|
38761
39079
|
name: "deviceId",
|
|
38762
39080
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-ai",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.107",
|
|
4
4
|
"description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|