@camstack/addon-provider-tuya 0.2.100 → 0.2.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +349 -16
- package/dist/addon.mjs +349 -16
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -819,7 +819,7 @@ async function discoverDevices(options = {}, binder = createDgramBinder()) {
|
|
|
819
819
|
return [...byId.values()];
|
|
820
820
|
}
|
|
821
821
|
//#endregion
|
|
822
|
-
//#region ../types/dist/event-category-
|
|
822
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
823
823
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
824
824
|
EventCategory["SystemBoot"] = "system.boot";
|
|
825
825
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1436,6 +1436,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1436
1436
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
1437
1437
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
1438
1438
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
1439
|
+
/**
|
|
1440
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
1441
|
+
*
|
|
1442
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
1443
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
1444
|
+
* destinations would be told three times. And a run where two of three
|
|
1445
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
1446
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
1447
|
+
* carried here and the message says both.
|
|
1448
|
+
*
|
|
1449
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
1450
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
1451
|
+
*/
|
|
1452
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
1439
1453
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
1440
1454
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
1441
1455
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -6166,7 +6180,7 @@ var ZodIssueCode = {
|
|
|
6166
6180
|
var ZodFirstPartyTypeKind;
|
|
6167
6181
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6168
6182
|
//#endregion
|
|
6169
|
-
//#region ../types/dist/sleep-
|
|
6183
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
6170
6184
|
/**
|
|
6171
6185
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6172
6186
|
* window to float samples (D455).
|
|
@@ -8195,7 +8209,23 @@ var EncodeProfileSchema = object({
|
|
|
8195
8209
|
"zerolatency",
|
|
8196
8210
|
"film",
|
|
8197
8211
|
"animation"
|
|
8198
|
-
]).optional()
|
|
8212
|
+
]).optional(),
|
|
8213
|
+
/**
|
|
8214
|
+
* ONE slice per access unit.
|
|
8215
|
+
*
|
|
8216
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
8217
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
8218
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
8219
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
8220
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
8221
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
8222
|
+
*
|
|
8223
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
8224
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
8225
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
8226
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
8227
|
+
*/
|
|
8228
|
+
singleSlicePerFrame: boolean().optional()
|
|
8199
8229
|
}),
|
|
8200
8230
|
audio: union([literal("passthrough"), object({
|
|
8201
8231
|
codec: _enum([
|
|
@@ -8245,7 +8275,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
8245
8275
|
audio: "passthrough"
|
|
8246
8276
|
};
|
|
8247
8277
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
8248
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
8278
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
8249
8279
|
/**
|
|
8250
8280
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
8251
8281
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -12294,6 +12324,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
12294
12324
|
auth: "admin"
|
|
12295
12325
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
12296
12326
|
DeviceType.Camera;
|
|
12327
|
+
/**
|
|
12328
|
+
* The signals a device can emit to WAKE its own stream.
|
|
12329
|
+
*
|
|
12330
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12331
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12332
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
12333
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12334
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12335
|
+
* itself, with no stream running.
|
|
12336
|
+
*
|
|
12337
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12338
|
+
*
|
|
12339
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12340
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12341
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12342
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12343
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12344
|
+
*
|
|
12345
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12346
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12347
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12348
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12349
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
12350
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
12351
|
+
* camera. Two questions, two authorities.
|
|
12352
|
+
*
|
|
12353
|
+
* ## Availability is not permission
|
|
12354
|
+
*
|
|
12355
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12356
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12357
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12358
|
+
* provider declaring a signal is not a provider enabling it.
|
|
12359
|
+
*/
|
|
12360
|
+
/** One signal a device can emit. */
|
|
12361
|
+
var StreamSignalSchema = object({
|
|
12362
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12363
|
+
code: string().min(1),
|
|
12364
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
12365
|
+
label: string().min(1),
|
|
12366
|
+
/**
|
|
12367
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
12368
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12369
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
12370
|
+
* both of its own.
|
|
12371
|
+
*/
|
|
12372
|
+
recommended: boolean()
|
|
12373
|
+
});
|
|
12374
|
+
var StreamSignalsStatusSchema = object({
|
|
12375
|
+
signals: array(StreamSignalSchema),
|
|
12376
|
+
lastFetchedAt: number()
|
|
12377
|
+
});
|
|
12378
|
+
var streamSignalsCapability = {
|
|
12379
|
+
name: "stream-signals",
|
|
12380
|
+
scope: "device",
|
|
12381
|
+
deviceNative: true,
|
|
12382
|
+
mode: "singleton",
|
|
12383
|
+
deviceTypes: Object.values(DeviceType),
|
|
12384
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
12385
|
+
methods: {
|
|
12386
|
+
/**
|
|
12387
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
12388
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
12389
|
+
* broker's picker show nothing rather than a false choice.
|
|
12390
|
+
*/
|
|
12391
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
12392
|
+
};
|
|
12297
12393
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12298
12394
|
var StreamFormatSchema = _enum([
|
|
12299
12395
|
"webrtc",
|
|
@@ -12690,6 +12786,22 @@ var EgressTranscodeSchema = object({
|
|
|
12690
12786
|
camStreamId: string().nullable()
|
|
12691
12787
|
});
|
|
12692
12788
|
method(object({
|
|
12789
|
+
deviceId: number().int().nonnegative(),
|
|
12790
|
+
/** The provider's signal code. */
|
|
12791
|
+
code: string().min(1),
|
|
12792
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12793
|
+
at: number().optional()
|
|
12794
|
+
}), object({
|
|
12795
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12796
|
+
accepted: boolean(),
|
|
12797
|
+
reason: _enum([
|
|
12798
|
+
"woke",
|
|
12799
|
+
"hold-extended",
|
|
12800
|
+
"not-enabled",
|
|
12801
|
+
"no-consumer",
|
|
12802
|
+
"unknown-code"
|
|
12803
|
+
])
|
|
12804
|
+
}), { kind: "mutation" }), method(object({
|
|
12693
12805
|
deviceId: number().int().nonnegative(),
|
|
12694
12806
|
camStreamId: string().min(1),
|
|
12695
12807
|
kind: CamStreamKindSchema,
|
|
@@ -12944,6 +13056,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12944
13056
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12945
13057
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12946
13058
|
minHeight: number().int().positive().optional(),
|
|
13059
|
+
/**
|
|
13060
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
13061
|
+
*
|
|
13062
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
13063
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
13064
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
13065
|
+
* one caller implementing it privately is how a second scoring authority
|
|
13066
|
+
* gets born.
|
|
13067
|
+
*/
|
|
13068
|
+
maxHeight: number().int().positive().optional(),
|
|
12947
13069
|
/** Minimum horizontal resolution. */
|
|
12948
13070
|
minWidth: number().int().positive().optional(),
|
|
12949
13071
|
/**
|
|
@@ -12960,7 +13082,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12960
13082
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12961
13083
|
* codec end-to-end, there's nothing to optimise.
|
|
12962
13084
|
*/
|
|
12963
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
13085
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
13086
|
+
/**
|
|
13087
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
13088
|
+
* understanding that it will be transcoded.
|
|
13089
|
+
*
|
|
13090
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
13091
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
13092
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
13093
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
13094
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
13095
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
13096
|
+
*
|
|
13097
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
13098
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
13099
|
+
*/
|
|
13100
|
+
allowTranscode: boolean().optional()
|
|
12964
13101
|
}).readonly();
|
|
12965
13102
|
var PickStreamPreferencesSchema = object({
|
|
12966
13103
|
/**
|
|
@@ -12974,12 +13111,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12974
13111
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12975
13112
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12976
13113
|
*/
|
|
12977
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
13114
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
13115
|
+
/**
|
|
13116
|
+
* The height the consumer actually wants to DELIVER.
|
|
13117
|
+
*
|
|
13118
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
13119
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
13120
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
13121
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
13122
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
13123
|
+
*
|
|
13124
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
13125
|
+
*/
|
|
13126
|
+
targetHeight: number().int().positive().optional()
|
|
12978
13127
|
}).readonly();
|
|
12979
13128
|
var PickedCamStreamSchema = object({
|
|
12980
13129
|
camStreamId: string(),
|
|
12981
13130
|
codec: string().optional(),
|
|
12982
13131
|
resolution: CamStreamResolutionSchema.optional(),
|
|
13132
|
+
/**
|
|
13133
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
13134
|
+
*
|
|
13135
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
13136
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
13137
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
13138
|
+
*/
|
|
13139
|
+
transcodes: boolean(),
|
|
12983
13140
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12984
13141
|
reason: string()
|
|
12985
13142
|
});
|
|
@@ -17513,6 +17670,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17513
17670
|
"device-enabled",
|
|
17514
17671
|
"device-battery-low",
|
|
17515
17672
|
"device-battery-normal",
|
|
17673
|
+
"device-consumable-low",
|
|
17674
|
+
"device-consumable-normal",
|
|
17516
17675
|
"stream-online",
|
|
17517
17676
|
"stream-offline",
|
|
17518
17677
|
"node-online",
|
|
@@ -17531,6 +17690,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17531
17690
|
"addon-updated",
|
|
17532
17691
|
"server-updated",
|
|
17533
17692
|
"export-completed",
|
|
17693
|
+
"backup-completed",
|
|
17534
17694
|
"camera-online",
|
|
17535
17695
|
"camera-offline",
|
|
17536
17696
|
"camera-disabled",
|
|
@@ -20967,13 +21127,109 @@ var SummariesQueryInput = object({
|
|
|
20967
21127
|
deviceIds: array(number()).min(1),
|
|
20968
21128
|
since: number().optional(),
|
|
20969
21129
|
until: number().optional(),
|
|
20970
|
-
limit: number().int().min(1).max(200).default(50)
|
|
21130
|
+
limit: number().int().min(1).max(200).default(50),
|
|
21131
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
21132
|
+
* meaning of "dog" on every summary surface. */
|
|
21133
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20971
21134
|
});
|
|
20972
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20973
21135
|
var SummaryDetailSchema = object({
|
|
20974
21136
|
summary: SummarySchema,
|
|
20975
|
-
/**
|
|
20976
|
-
|
|
21137
|
+
/** Members in absorption order, oldest join first. */
|
|
21138
|
+
members: array(object({
|
|
21139
|
+
trackId: string(),
|
|
21140
|
+
/**
|
|
21141
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
21142
|
+
* and the track no longer exists to fill it.
|
|
21143
|
+
*
|
|
21144
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
21145
|
+
* class afterwards, and a group's composition is the history of who came
|
|
21146
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
21147
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
21148
|
+
* drift from the members it claims to describe.
|
|
21149
|
+
*/
|
|
21150
|
+
className: string().nullable(),
|
|
21151
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
21152
|
+
role: _enum([
|
|
21153
|
+
"primary",
|
|
21154
|
+
"sibling",
|
|
21155
|
+
"child"
|
|
21156
|
+
]).nullable(),
|
|
21157
|
+
joinedAt: number(),
|
|
21158
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
21159
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
21160
|
+
label: string().optional(),
|
|
21161
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
21162
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
21163
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
21164
|
+
subLabel: string().optional()
|
|
21165
|
+
})).readonly()
|
|
21166
|
+
});
|
|
21167
|
+
/**
|
|
21168
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
21169
|
+
*
|
|
21170
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
21171
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
21172
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
21173
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
21174
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
21175
|
+
* draw two hundred badges.
|
|
21176
|
+
*/
|
|
21177
|
+
var SummaryListItemSchema = object({
|
|
21178
|
+
summary: SummarySchema,
|
|
21179
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
21180
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
21181
|
+
classes: array(object({
|
|
21182
|
+
className: string().nullable(),
|
|
21183
|
+
count: number().int().positive()
|
|
21184
|
+
})).readonly()
|
|
21185
|
+
});
|
|
21186
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
21187
|
+
/**
|
|
21188
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
21189
|
+
*
|
|
21190
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
21191
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
21192
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
21193
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
21194
|
+
* "newest" means, on one screen.
|
|
21195
|
+
*/
|
|
21196
|
+
var RecentSummariesQueryInput = object({
|
|
21197
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
21198
|
+
deviceIds: array(number()),
|
|
21199
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
21200
|
+
since: number().optional(),
|
|
21201
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
21202
|
+
until: number().optional(),
|
|
21203
|
+
limit: number().int().min(1).max(500).default(100),
|
|
21204
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
21205
|
+
cursor: string().optional(),
|
|
21206
|
+
/**
|
|
21207
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
21208
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
21209
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
21210
|
+
* make the operator's one filter component produce two shapes.
|
|
21211
|
+
*
|
|
21212
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
21213
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
21214
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
21215
|
+
* about its primary.
|
|
21216
|
+
*
|
|
21217
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
21218
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
21219
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
21220
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
21221
|
+
* that read only the class would answer "animal" and never "dog".
|
|
21222
|
+
*
|
|
21223
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
21224
|
+
*/
|
|
21225
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
21226
|
+
});
|
|
21227
|
+
var RecentSummariesPageSchema = object({
|
|
21228
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
21229
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
21230
|
+
* whichever feed drew it. */
|
|
21231
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
21232
|
+
nextCursor: string().nullable()
|
|
20977
21233
|
});
|
|
20978
21234
|
var RecentTracksPageSchema = object({
|
|
20979
21235
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -21387,7 +21643,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21387
21643
|
classes: array(string()).optional(),
|
|
21388
21644
|
/** See {@link ExcludeSourcesDoc}. */
|
|
21389
21645
|
excludeSources: array(TrackSourceSchema).optional()
|
|
21390
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21646
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21391
21647
|
kind: "mutation",
|
|
21392
21648
|
auth: "admin"
|
|
21393
21649
|
}), 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({
|
|
@@ -24716,10 +24972,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24716
24972
|
}), boolean()), method(object({
|
|
24717
24973
|
deviceId: number().int().nonnegative(),
|
|
24718
24974
|
sessionId: string()
|
|
24719
|
-
}), object({
|
|
24720
|
-
|
|
24721
|
-
|
|
24722
|
-
|
|
24975
|
+
}), object({
|
|
24976
|
+
pendingRenegotiation: object({
|
|
24977
|
+
target: WebrtcStreamTargetSchema,
|
|
24978
|
+
epoch: number()
|
|
24979
|
+
}).nullable(),
|
|
24980
|
+
/**
|
|
24981
|
+
* Whether the session still EXISTS.
|
|
24982
|
+
*
|
|
24983
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24984
|
+
* be able to ask, because a session does not always end the way it
|
|
24985
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24986
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24987
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24988
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24989
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24990
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24991
|
+
*
|
|
24992
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24993
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24994
|
+
*/
|
|
24995
|
+
alive: boolean()
|
|
24996
|
+
}));
|
|
24723
24997
|
object({
|
|
24724
24998
|
/** All accessory children of the parent. */
|
|
24725
24999
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -33148,7 +33422,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33148
33422
|
* disarmed the channels it did not mention would make the Levels page and
|
|
33149
33423
|
* the Diagnostics page fight over the same value.
|
|
33150
33424
|
*/
|
|
33151
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33425
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33426
|
+
/**
|
|
33427
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33428
|
+
* retention actually deleted.
|
|
33429
|
+
*
|
|
33430
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33431
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33432
|
+
* this system is configured through this one document, and a retention audit
|
|
33433
|
+
* configured somewhere else is a second place to look when the question is
|
|
33434
|
+
* "what happened to my data".
|
|
33435
|
+
*
|
|
33436
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33437
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33438
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33439
|
+
*
|
|
33440
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33441
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33442
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33443
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33444
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33445
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33446
|
+
*/
|
|
33447
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
33152
33448
|
});
|
|
33153
33449
|
/**
|
|
33154
33450
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -33221,6 +33517,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
33221
33517
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
33222
33518
|
/** The channels ARMED right now, each with its deadline. */
|
|
33223
33519
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33520
|
+
/**
|
|
33521
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33522
|
+
*
|
|
33523
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33524
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33525
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33526
|
+
*/
|
|
33527
|
+
opsLogRetentionDays: number().int().min(0),
|
|
33224
33528
|
persisted: boolean()
|
|
33225
33529
|
});
|
|
33226
33530
|
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(), {
|
|
@@ -34616,6 +34920,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34616
34920
|
smoke: smokeCapability,
|
|
34617
34921
|
streamCatalog: streamCatalogCapability,
|
|
34618
34922
|
streamParams: streamParamsCapability,
|
|
34923
|
+
streamSignals: streamSignalsCapability,
|
|
34619
34924
|
switch: switchCapability,
|
|
34620
34925
|
tamper: tamperCapability,
|
|
34621
34926
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39221,6 +39526,12 @@ Object.freeze({
|
|
|
39221
39526
|
addonId: null,
|
|
39222
39527
|
access: "view"
|
|
39223
39528
|
},
|
|
39529
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39530
|
+
capName: "pipeline-analytics",
|
|
39531
|
+
capScope: "device",
|
|
39532
|
+
addonId: null,
|
|
39533
|
+
access: "view"
|
|
39534
|
+
},
|
|
39224
39535
|
"pipelineAnalytics.listRecentTracks": {
|
|
39225
39536
|
capName: "pipeline-analytics",
|
|
39226
39537
|
capScope: "device",
|
|
@@ -41183,6 +41494,12 @@ Object.freeze({
|
|
|
41183
41494
|
addonId: null,
|
|
41184
41495
|
access: "create"
|
|
41185
41496
|
},
|
|
41497
|
+
"streamBroker.reportStreamSignal": {
|
|
41498
|
+
capName: "stream-broker",
|
|
41499
|
+
capScope: "system",
|
|
41500
|
+
addonId: null,
|
|
41501
|
+
access: "create"
|
|
41502
|
+
},
|
|
41186
41503
|
"streamBroker.restartProfile": {
|
|
41187
41504
|
capName: "stream-broker",
|
|
41188
41505
|
capScope: "system",
|
|
@@ -41267,6 +41584,12 @@ Object.freeze({
|
|
|
41267
41584
|
addonId: null,
|
|
41268
41585
|
access: "create"
|
|
41269
41586
|
},
|
|
41587
|
+
"streamSignals.listSignals": {
|
|
41588
|
+
capName: "stream-signals",
|
|
41589
|
+
capScope: "device",
|
|
41590
|
+
addonId: null,
|
|
41591
|
+
access: "view"
|
|
41592
|
+
},
|
|
41270
41593
|
"switch.setState": {
|
|
41271
41594
|
capName: "switch",
|
|
41272
41595
|
capScope: "device",
|
|
@@ -43048,6 +43371,11 @@ Object.freeze({
|
|
|
43048
43371
|
form: "single",
|
|
43049
43372
|
optional: true
|
|
43050
43373
|
}],
|
|
43374
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43375
|
+
name: "deviceIds",
|
|
43376
|
+
form: "array",
|
|
43377
|
+
optional: false
|
|
43378
|
+
}],
|
|
43051
43379
|
"pipelineAnalytics.listRecentTracks": [{
|
|
43052
43380
|
name: "deviceIds",
|
|
43053
43381
|
form: "array",
|
|
@@ -43634,6 +43962,11 @@ Object.freeze({
|
|
|
43634
43962
|
form: "single",
|
|
43635
43963
|
optional: false
|
|
43636
43964
|
}],
|
|
43965
|
+
"streamBroker.reportStreamSignal": [{
|
|
43966
|
+
name: "deviceId",
|
|
43967
|
+
form: "single",
|
|
43968
|
+
optional: false
|
|
43969
|
+
}],
|
|
43637
43970
|
"streamBroker.restartProfile": [{
|
|
43638
43971
|
name: "deviceId",
|
|
43639
43972
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -818,7 +818,7 @@ async function discoverDevices(options = {}, binder = createDgramBinder()) {
|
|
|
818
818
|
return [...byId.values()];
|
|
819
819
|
}
|
|
820
820
|
//#endregion
|
|
821
|
-
//#region ../types/dist/event-category-
|
|
821
|
+
//#region ../types/dist/event-category-BVDXG4tB.mjs
|
|
822
822
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
823
823
|
EventCategory["SystemBoot"] = "system.boot";
|
|
824
824
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -1435,6 +1435,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
1435
1435
|
* pull-reconcile from the provider's `getStatus` on reconnect. */
|
|
1436
1436
|
EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
|
|
1437
1437
|
EventCategory["BackupCompleted"] = "backup.completed";
|
|
1438
|
+
/**
|
|
1439
|
+
* A whole backup RUN finished — every destination attempted, win or lose.
|
|
1440
|
+
*
|
|
1441
|
+
* `backup.completed` fires once per DESTINATION, which is the right grain for
|
|
1442
|
+
* a progress UI and the wrong one for a notification: an operator with three
|
|
1443
|
+
* destinations would be told three times. And a run where two of three
|
|
1444
|
+
* destinations succeeded is not a clean success — a single "backup
|
|
1445
|
+
* completed" that hid the failed one would be a lie, so the count of each is
|
|
1446
|
+
* carried here and the message says both.
|
|
1447
|
+
*
|
|
1448
|
+
* Emitted by the backup orchestrator only after the destination loop, so a
|
|
1449
|
+
* run that dies during the BUILD phase produces no completion at all.
|
|
1450
|
+
*/
|
|
1451
|
+
EventCategory["BackupRunCompleted"] = "backup.run-completed";
|
|
1438
1452
|
EventCategory["BackupRestored"] = "backup.restored";
|
|
1439
1453
|
EventCategory["NotificationDispatched"] = "notification.dispatched";
|
|
1440
1454
|
EventCategory["NotificationFailed"] = "notification.failed";
|
|
@@ -6165,7 +6179,7 @@ var ZodIssueCode = {
|
|
|
6165
6179
|
var ZodFirstPartyTypeKind;
|
|
6166
6180
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
6167
6181
|
//#endregion
|
|
6168
|
-
//#region ../types/dist/sleep-
|
|
6182
|
+
//#region ../types/dist/sleep-DEuj7E3j.mjs
|
|
6169
6183
|
/**
|
|
6170
6184
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
6171
6185
|
* window to float samples (D455).
|
|
@@ -8194,7 +8208,23 @@ var EncodeProfileSchema = object({
|
|
|
8194
8208
|
"zerolatency",
|
|
8195
8209
|
"film",
|
|
8196
8210
|
"animation"
|
|
8197
|
-
]).optional()
|
|
8211
|
+
]).optional(),
|
|
8212
|
+
/**
|
|
8213
|
+
* ONE slice per access unit.
|
|
8214
|
+
*
|
|
8215
|
+
* `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
|
|
8216
|
+
* the encoder as five NAL slices that share one RTP timestamp and carry one
|
|
8217
|
+
* marker bit. A libwebrtc depacketiser sees five frame-starts and one
|
|
8218
|
+
* frame-end per frame: the first pictures render and the video then freezes
|
|
8219
|
+
* for good while the audio, on its own plane, plays on. Measured on this hub
|
|
8220
|
+
* 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
|
|
8221
|
+
*
|
|
8222
|
+
* A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
|
|
8223
|
+
* `outputArgs` on purpose: an opaque array is part of the sharing key, so two
|
|
8224
|
+
* consumers meaning the same thing spelled differently would stop sharing one
|
|
8225
|
+
* child. Absent means "whatever the encoder does" — today's behaviour.
|
|
8226
|
+
*/
|
|
8227
|
+
singleSlicePerFrame: boolean().optional()
|
|
8198
8228
|
}),
|
|
8199
8229
|
audio: union([literal("passthrough"), object({
|
|
8200
8230
|
codec: _enum([
|
|
@@ -8244,7 +8274,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
|
|
|
8244
8274
|
audio: "passthrough"
|
|
8245
8275
|
};
|
|
8246
8276
|
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
8247
|
-
({ ...BASE_LIVE_EGRESS_PROFILE });
|
|
8277
|
+
({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
|
|
8248
8278
|
/**
|
|
8249
8279
|
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
8250
8280
|
* every declared capability + widget of every installed plugin, on every
|
|
@@ -12293,6 +12323,72 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
|
|
|
12293
12323
|
auth: "admin"
|
|
12294
12324
|
}), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
|
|
12295
12325
|
DeviceType.Camera;
|
|
12326
|
+
/**
|
|
12327
|
+
* The signals a device can emit to WAKE its own stream.
|
|
12328
|
+
*
|
|
12329
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12330
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12331
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
12332
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12333
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12334
|
+
* itself, with no stream running.
|
|
12335
|
+
*
|
|
12336
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12337
|
+
*
|
|
12338
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12339
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12340
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12341
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12342
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12343
|
+
*
|
|
12344
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12345
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12346
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12347
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12348
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
12349
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
12350
|
+
* camera. Two questions, two authorities.
|
|
12351
|
+
*
|
|
12352
|
+
* ## Availability is not permission
|
|
12353
|
+
*
|
|
12354
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12355
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12356
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12357
|
+
* provider declaring a signal is not a provider enabling it.
|
|
12358
|
+
*/
|
|
12359
|
+
/** One signal a device can emit. */
|
|
12360
|
+
var StreamSignalSchema = object({
|
|
12361
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12362
|
+
code: string().min(1),
|
|
12363
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
12364
|
+
label: string().min(1),
|
|
12365
|
+
/**
|
|
12366
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
12367
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12368
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
12369
|
+
* both of its own.
|
|
12370
|
+
*/
|
|
12371
|
+
recommended: boolean()
|
|
12372
|
+
});
|
|
12373
|
+
var StreamSignalsStatusSchema = object({
|
|
12374
|
+
signals: array(StreamSignalSchema),
|
|
12375
|
+
lastFetchedAt: number()
|
|
12376
|
+
});
|
|
12377
|
+
var streamSignalsCapability = {
|
|
12378
|
+
name: "stream-signals",
|
|
12379
|
+
scope: "device",
|
|
12380
|
+
deviceNative: true,
|
|
12381
|
+
mode: "singleton",
|
|
12382
|
+
deviceTypes: Object.values(DeviceType),
|
|
12383
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
12384
|
+
methods: {
|
|
12385
|
+
/**
|
|
12386
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
12387
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
12388
|
+
* broker's picker show nothing rather than a false choice.
|
|
12389
|
+
*/
|
|
12390
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
12391
|
+
};
|
|
12296
12392
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12297
12393
|
var StreamFormatSchema = _enum([
|
|
12298
12394
|
"webrtc",
|
|
@@ -12689,6 +12785,22 @@ var EgressTranscodeSchema = object({
|
|
|
12689
12785
|
camStreamId: string().nullable()
|
|
12690
12786
|
});
|
|
12691
12787
|
method(object({
|
|
12788
|
+
deviceId: number().int().nonnegative(),
|
|
12789
|
+
/** The provider's signal code. */
|
|
12790
|
+
code: string().min(1),
|
|
12791
|
+
/** Ms epoch. Absent ⇒ now. */
|
|
12792
|
+
at: number().optional()
|
|
12793
|
+
}), object({
|
|
12794
|
+
/** Whether the broker acted on it, and if not, why. */
|
|
12795
|
+
accepted: boolean(),
|
|
12796
|
+
reason: _enum([
|
|
12797
|
+
"woke",
|
|
12798
|
+
"hold-extended",
|
|
12799
|
+
"not-enabled",
|
|
12800
|
+
"no-consumer",
|
|
12801
|
+
"unknown-code"
|
|
12802
|
+
])
|
|
12803
|
+
}), { kind: "mutation" }), method(object({
|
|
12692
12804
|
deviceId: number().int().nonnegative(),
|
|
12693
12805
|
camStreamId: string().min(1),
|
|
12694
12806
|
kind: CamStreamKindSchema,
|
|
@@ -12943,6 +13055,16 @@ var PickStreamRequirementsSchema = object({
|
|
|
12943
13055
|
acceptCodecs: array(StreamCodecSchema).readonly().optional(),
|
|
12944
13056
|
/** Minimum vertical resolution. Streams shorter than this are dropped. */
|
|
12945
13057
|
minHeight: number().int().positive().optional(),
|
|
13058
|
+
/**
|
|
13059
|
+
* Maximum vertical resolution. Streams TALLER than this are dropped.
|
|
13060
|
+
*
|
|
13061
|
+
* A consumer can have a ceiling as real as its floor: Alexa documents
|
|
13062
|
+
* 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
|
|
13063
|
+
* Without this the ceiling had to be re-implemented by every caller — and
|
|
13064
|
+
* one caller implementing it privately is how a second scoring authority
|
|
13065
|
+
* gets born.
|
|
13066
|
+
*/
|
|
13067
|
+
maxHeight: number().int().positive().optional(),
|
|
12946
13068
|
/** Minimum horizontal resolution. */
|
|
12947
13069
|
minWidth: number().int().positive().optional(),
|
|
12948
13070
|
/**
|
|
@@ -12959,7 +13081,22 @@ var PickStreamRequirementsSchema = object({
|
|
|
12959
13081
|
* transcoded" guard: if the device is already serving the consumer's
|
|
12960
13082
|
* codec end-to-end, there's nothing to optimise.
|
|
12961
13083
|
*/
|
|
12962
|
-
requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
|
|
13084
|
+
requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
|
|
13085
|
+
/**
|
|
13086
|
+
* Whether a stream the consumer CANNOT decode may still be picked, on the
|
|
13087
|
+
* understanding that it will be transcoded.
|
|
13088
|
+
*
|
|
13089
|
+
* Default `false` — today's behaviour, and the right one for a bypass
|
|
13090
|
+
* question ("is there a stream I can forward untouched?"). Set `true` to
|
|
13091
|
+
* ask the larger question: "what is the best stream for me, transcoding if
|
|
13092
|
+
* I must?" A stream that satisfies `acceptCodecs` always outranks one that
|
|
13093
|
+
* does not, so a passthrough is never lost to a transcode; the answer says
|
|
13094
|
+
* which it is in {@link PickedCamStreamSchema.transcodes}.
|
|
13095
|
+
*
|
|
13096
|
+
* This is what lets one picker serve both the bypass and the full source
|
|
13097
|
+
* choice, instead of a consumer scoring privately when the bypass misses.
|
|
13098
|
+
*/
|
|
13099
|
+
allowTranscode: boolean().optional()
|
|
12963
13100
|
}).readonly();
|
|
12964
13101
|
var PickStreamPreferencesSchema = object({
|
|
12965
13102
|
/**
|
|
@@ -12973,12 +13110,32 @@ var PickStreamPreferencesSchema = object({
|
|
|
12973
13110
|
* picks the tallest stream; `'lowest'` picks the shortest (used by
|
|
12974
13111
|
* memory-constrained consumers / Apple Home guest sessions).
|
|
12975
13112
|
*/
|
|
12976
|
-
resolutionPreference: _enum(["highest", "lowest"]).optional()
|
|
13113
|
+
resolutionPreference: _enum(["highest", "lowest"]).optional(),
|
|
13114
|
+
/**
|
|
13115
|
+
* The height the consumer actually wants to DELIVER.
|
|
13116
|
+
*
|
|
13117
|
+
* Not a constraint — an ordering. With it set, the SMALLEST stream at or
|
|
13118
|
+
* above the target wins, and only if nothing reaches it does the tallest
|
|
13119
|
+
* take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
|
|
13120
|
+
* a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
|
|
13121
|
+
* express that: it says "as big as possible", which is a different wish.
|
|
13122
|
+
*
|
|
13123
|
+
* Ignored when absent, so every existing caller keeps its ordering.
|
|
13124
|
+
*/
|
|
13125
|
+
targetHeight: number().int().positive().optional()
|
|
12977
13126
|
}).readonly();
|
|
12978
13127
|
var PickedCamStreamSchema = object({
|
|
12979
13128
|
camStreamId: string(),
|
|
12980
13129
|
codec: string().optional(),
|
|
12981
13130
|
resolution: CamStreamResolutionSchema.optional(),
|
|
13131
|
+
/**
|
|
13132
|
+
* Whether serving this stream requires a decode + re-encode.
|
|
13133
|
+
*
|
|
13134
|
+
* `false` is a stream the consumer can take as it stands. Only ever `true`
|
|
13135
|
+
* when the caller asked for it with `allowTranscode`, so a caller that did
|
|
13136
|
+
* not ask cannot be handed a cost it never agreed to pay.
|
|
13137
|
+
*/
|
|
13138
|
+
transcodes: boolean(),
|
|
12982
13139
|
/** One-line explanation of why this stream won — for logs / debug UI. */
|
|
12983
13140
|
reason: string()
|
|
12984
13141
|
});
|
|
@@ -17512,6 +17669,8 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17512
17669
|
"device-enabled",
|
|
17513
17670
|
"device-battery-low",
|
|
17514
17671
|
"device-battery-normal",
|
|
17672
|
+
"device-consumable-low",
|
|
17673
|
+
"device-consumable-normal",
|
|
17515
17674
|
"stream-online",
|
|
17516
17675
|
"stream-offline",
|
|
17517
17676
|
"node-online",
|
|
@@ -17530,6 +17689,7 @@ var NcSystemEventKindSchema = _enum([
|
|
|
17530
17689
|
"addon-updated",
|
|
17531
17690
|
"server-updated",
|
|
17532
17691
|
"export-completed",
|
|
17692
|
+
"backup-completed",
|
|
17533
17693
|
"camera-online",
|
|
17534
17694
|
"camera-offline",
|
|
17535
17695
|
"camera-disabled",
|
|
@@ -20966,13 +21126,109 @@ var SummariesQueryInput = object({
|
|
|
20966
21126
|
deviceIds: array(number()).min(1),
|
|
20967
21127
|
since: number().optional(),
|
|
20968
21128
|
until: number().optional(),
|
|
20969
|
-
limit: number().int().min(1).max(200).default(50)
|
|
21129
|
+
limit: number().int().min(1).max(200).default(50),
|
|
21130
|
+
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
21131
|
+
* meaning of "dog" on every summary surface. */
|
|
21132
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
20970
21133
|
});
|
|
20971
|
-
var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
|
|
20972
21134
|
var SummaryDetailSchema = object({
|
|
20973
21135
|
summary: SummarySchema,
|
|
20974
|
-
/**
|
|
20975
|
-
|
|
21136
|
+
/** Members in absorption order, oldest join first. */
|
|
21137
|
+
members: array(object({
|
|
21138
|
+
trackId: string(),
|
|
21139
|
+
/**
|
|
21140
|
+
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
21141
|
+
* and the track no longer exists to fill it.
|
|
21142
|
+
*
|
|
21143
|
+
* The join, not the latest opinion: class voting can re-decide a track's
|
|
21144
|
+
* class afterwards, and a group's composition is the history of who came
|
|
21145
|
+
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
21146
|
+
* dog" — rather than being handed a second, denormalised tally that would
|
|
21147
|
+
* drift from the members it claims to describe.
|
|
21148
|
+
*/
|
|
21149
|
+
className: string().nullable(),
|
|
21150
|
+
/** `primary` is the one member that carries the group's identity. */
|
|
21151
|
+
role: _enum([
|
|
21152
|
+
"primary",
|
|
21153
|
+
"sibling",
|
|
21154
|
+
"child"
|
|
21155
|
+
]).nullable(),
|
|
21156
|
+
joinedAt: number(),
|
|
21157
|
+
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
21158
|
+
* at read time. Absent when nothing resolved, never an empty string. */
|
|
21159
|
+
label: string().optional(),
|
|
21160
|
+
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
21161
|
+
* recognised nobody, and absent for a member whose track has been pruned —
|
|
21162
|
+
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
21163
|
+
subLabel: string().optional()
|
|
21164
|
+
})).readonly()
|
|
21165
|
+
});
|
|
21166
|
+
/**
|
|
21167
|
+
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
21168
|
+
*
|
|
21169
|
+
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
21170
|
+
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
21171
|
+
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
21172
|
+
* are on {@link getSummary}: shipping every member of every group so a client
|
|
21173
|
+
* can count them turns a page of two hundred groups into a thousand records to
|
|
21174
|
+
* draw two hundred badges.
|
|
21175
|
+
*/
|
|
21176
|
+
var SummaryListItemSchema = object({
|
|
21177
|
+
summary: SummarySchema,
|
|
21178
|
+
/** Class counts, most numerous first; `className: null` is a member whose
|
|
21179
|
+
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
21180
|
+
classes: array(object({
|
|
21181
|
+
className: string().nullable(),
|
|
21182
|
+
count: number().int().positive()
|
|
21183
|
+
})).readonly()
|
|
21184
|
+
});
|
|
21185
|
+
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
21186
|
+
/**
|
|
21187
|
+
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
21188
|
+
*
|
|
21189
|
+
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
21190
|
+
* summaries feed that could only answer "the last N for these cameras"
|
|
21191
|
+
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
21192
|
+
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
21193
|
+
* "newest" means, on one screen.
|
|
21194
|
+
*/
|
|
21195
|
+
var RecentSummariesQueryInput = object({
|
|
21196
|
+
/** Devices to merge. An empty array yields an empty page. */
|
|
21197
|
+
deviceIds: array(number()),
|
|
21198
|
+
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
21199
|
+
since: number().optional(),
|
|
21200
|
+
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
21201
|
+
until: number().optional(),
|
|
21202
|
+
limit: number().int().min(1).max(500).default(100),
|
|
21203
|
+
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
21204
|
+
cursor: string().optional(),
|
|
21205
|
+
/**
|
|
21206
|
+
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
21207
|
+
* deliberately the same name: the events filter tree emits one list of ticked
|
|
21208
|
+
* taxonomy nodes, and a summaries feed that called it something else would
|
|
21209
|
+
* make the operator's one filter component produce two shapes.
|
|
21210
|
+
*
|
|
21211
|
+
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
21212
|
+
* me the arrivals with a dog" has to return the group of four people who had
|
|
21213
|
+
* one with them; a filter on the group's own fields could only ever answer
|
|
21214
|
+
* about its primary.
|
|
21215
|
+
*
|
|
21216
|
+
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
21217
|
+
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
21218
|
+
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
21219
|
+
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
21220
|
+
* that read only the class would answer "animal" and never "dog".
|
|
21221
|
+
*
|
|
21222
|
+
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
21223
|
+
*/
|
|
21224
|
+
classes: array(string().min(1).max(60)).max(40).optional()
|
|
21225
|
+
});
|
|
21226
|
+
var RecentSummariesPageSchema = object({
|
|
21227
|
+
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
21228
|
+
* {@link listSummaries} — one list shape, so a card renders the same
|
|
21229
|
+
* whichever feed drew it. */
|
|
21230
|
+
summaries: array(SummaryListItemSchema).readonly(),
|
|
21231
|
+
nextCursor: string().nullable()
|
|
20976
21232
|
});
|
|
20977
21233
|
var RecentTracksPageSchema = object({
|
|
20978
21234
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
@@ -21386,7 +21642,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21386
21642
|
classes: array(string()).optional(),
|
|
21387
21643
|
/** See {@link ExcludeSourcesDoc}. */
|
|
21388
21644
|
excludeSources: array(TrackSourceSchema).optional()
|
|
21389
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21645
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
|
|
21390
21646
|
kind: "mutation",
|
|
21391
21647
|
auth: "admin"
|
|
21392
21648
|
}), 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({
|
|
@@ -24715,10 +24971,28 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
24715
24971
|
}), boolean()), method(object({
|
|
24716
24972
|
deviceId: number().int().nonnegative(),
|
|
24717
24973
|
sessionId: string()
|
|
24718
|
-
}), object({
|
|
24719
|
-
|
|
24720
|
-
|
|
24721
|
-
|
|
24974
|
+
}), object({
|
|
24975
|
+
pendingRenegotiation: object({
|
|
24976
|
+
target: WebrtcStreamTargetSchema,
|
|
24977
|
+
epoch: number()
|
|
24978
|
+
}).nullable(),
|
|
24979
|
+
/**
|
|
24980
|
+
* Whether the session still EXISTS.
|
|
24981
|
+
*
|
|
24982
|
+
* A consumer that holds a resource for the life of a session needs to
|
|
24983
|
+
* be able to ask, because a session does not always end the way it
|
|
24984
|
+
* began. Measured on this hub 2026-09-13: an Echo that got stuck never
|
|
24985
|
+
* sent `SessionDisconnected`, so the Alexa exporter's
|
|
24986
|
+
* `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
|
|
24987
|
+
* H.264 transcode kept running for NOBODY for more than twenty
|
|
24988
|
+
* minutes. The WebRTC session had logged `WebRTC session closed`
|
|
24989
|
+
* minutes earlier — the broker knew; the holder had no way to ask.
|
|
24990
|
+
*
|
|
24991
|
+
* `false` for a session id the provider has never heard of, which is
|
|
24992
|
+
* the same answer as "it ended": either way nothing is holding it up.
|
|
24993
|
+
*/
|
|
24994
|
+
alive: boolean()
|
|
24995
|
+
}));
|
|
24722
24996
|
object({
|
|
24723
24997
|
/** All accessory children of the parent. */
|
|
24724
24998
|
childDeviceIds: array(number()).readonly(),
|
|
@@ -33147,7 +33421,29 @@ var LoggingSettingsPatchSchema = object({
|
|
|
33147
33421
|
* disarmed the channels it did not mention would make the Levels page and
|
|
33148
33422
|
* the Diagnostics page fight over the same value.
|
|
33149
33423
|
*/
|
|
33150
|
-
channels: array(LogChannelWindowPatchSchema).readonly().optional()
|
|
33424
|
+
channels: array(LogChannelWindowPatchSchema).readonly().optional(),
|
|
33425
|
+
/**
|
|
33426
|
+
* How many days the analytics OPS LOG is kept — the audit trail of what
|
|
33427
|
+
* retention actually deleted.
|
|
33428
|
+
*
|
|
33429
|
+
* It lives HERE, on the logging document, and not on the analytics addon's
|
|
33430
|
+
* settings form, on the operator's instruction: every other log-ish window in
|
|
33431
|
+
* this system is configured through this one document, and a retention audit
|
|
33432
|
+
* configured somewhere else is a second place to look when the question is
|
|
33433
|
+
* "what happened to my data".
|
|
33434
|
+
*
|
|
33435
|
+
* That placement has a cost worth stating: this document ships in the
|
|
33436
|
+
* framework closure, so this knob needs a published `@camstack/server` while
|
|
33437
|
+
* the four windows beside it (D485) reach a node on `camstack deploy`.
|
|
33438
|
+
*
|
|
33439
|
+
* `retention-model.ts` argued this one must NOT follow a device window,
|
|
33440
|
+
* because the audit trail is the history of the SWEEP and not of the camera.
|
|
33441
|
+
* That argument stands and is untouched — what changes is that 30 days stops
|
|
33442
|
+
* being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
|
|
33443
|
+
* rather than 0-as-delete: an audit log truncated to nothing is precisely the
|
|
33444
|
+
* state in which the next 9.5 GiB leak cannot be explained.
|
|
33445
|
+
*/
|
|
33446
|
+
opsLogRetentionDays: number().int().min(0).max(3650).optional()
|
|
33151
33447
|
});
|
|
33152
33448
|
/**
|
|
33153
33449
|
* Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
|
|
@@ -33220,6 +33516,14 @@ var LoggingSettingsStateSchema = object({
|
|
|
33220
33516
|
channels: array(LogChannelDescriptorSchema).readonly(),
|
|
33221
33517
|
/** The channels ARMED right now, each with its deadline. */
|
|
33222
33518
|
activeChannels: array(LogChannelWindowStateSchema).readonly(),
|
|
33519
|
+
/**
|
|
33520
|
+
* The ops-log window in days, as it is in force. `0` = kept forever.
|
|
33521
|
+
*
|
|
33522
|
+
* Reported rather than left to the caller's memory of what it wrote: this is
|
|
33523
|
+
* the value the analytics sweep will actually use, and an operator asking how
|
|
33524
|
+
* long their audit trail lives should not have to infer it from a default.
|
|
33525
|
+
*/
|
|
33526
|
+
opsLogRetentionDays: number().int().min(0),
|
|
33223
33527
|
persisted: boolean()
|
|
33224
33528
|
});
|
|
33225
33529
|
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(), {
|
|
@@ -34615,6 +34919,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
34615
34919
|
smoke: smokeCapability,
|
|
34616
34920
|
streamCatalog: streamCatalogCapability,
|
|
34617
34921
|
streamParams: streamParamsCapability,
|
|
34922
|
+
streamSignals: streamSignalsCapability,
|
|
34618
34923
|
switch: switchCapability,
|
|
34619
34924
|
tamper: tamperCapability,
|
|
34620
34925
|
temperatureSensor: temperatureSensorCapability,
|
|
@@ -39220,6 +39525,12 @@ Object.freeze({
|
|
|
39220
39525
|
addonId: null,
|
|
39221
39526
|
access: "view"
|
|
39222
39527
|
},
|
|
39528
|
+
"pipelineAnalytics.listRecentSummaries": {
|
|
39529
|
+
capName: "pipeline-analytics",
|
|
39530
|
+
capScope: "device",
|
|
39531
|
+
addonId: null,
|
|
39532
|
+
access: "view"
|
|
39533
|
+
},
|
|
39223
39534
|
"pipelineAnalytics.listRecentTracks": {
|
|
39224
39535
|
capName: "pipeline-analytics",
|
|
39225
39536
|
capScope: "device",
|
|
@@ -41182,6 +41493,12 @@ Object.freeze({
|
|
|
41182
41493
|
addonId: null,
|
|
41183
41494
|
access: "create"
|
|
41184
41495
|
},
|
|
41496
|
+
"streamBroker.reportStreamSignal": {
|
|
41497
|
+
capName: "stream-broker",
|
|
41498
|
+
capScope: "system",
|
|
41499
|
+
addonId: null,
|
|
41500
|
+
access: "create"
|
|
41501
|
+
},
|
|
41185
41502
|
"streamBroker.restartProfile": {
|
|
41186
41503
|
capName: "stream-broker",
|
|
41187
41504
|
capScope: "system",
|
|
@@ -41266,6 +41583,12 @@ Object.freeze({
|
|
|
41266
41583
|
addonId: null,
|
|
41267
41584
|
access: "create"
|
|
41268
41585
|
},
|
|
41586
|
+
"streamSignals.listSignals": {
|
|
41587
|
+
capName: "stream-signals",
|
|
41588
|
+
capScope: "device",
|
|
41589
|
+
addonId: null,
|
|
41590
|
+
access: "view"
|
|
41591
|
+
},
|
|
41269
41592
|
"switch.setState": {
|
|
41270
41593
|
capName: "switch",
|
|
41271
41594
|
capScope: "device",
|
|
@@ -43047,6 +43370,11 @@ Object.freeze({
|
|
|
43047
43370
|
form: "single",
|
|
43048
43371
|
optional: true
|
|
43049
43372
|
}],
|
|
43373
|
+
"pipelineAnalytics.listRecentSummaries": [{
|
|
43374
|
+
name: "deviceIds",
|
|
43375
|
+
form: "array",
|
|
43376
|
+
optional: false
|
|
43377
|
+
}],
|
|
43050
43378
|
"pipelineAnalytics.listRecentTracks": [{
|
|
43051
43379
|
name: "deviceIds",
|
|
43052
43380
|
form: "array",
|
|
@@ -43633,6 +43961,11 @@ Object.freeze({
|
|
|
43633
43961
|
form: "single",
|
|
43634
43962
|
optional: false
|
|
43635
43963
|
}],
|
|
43964
|
+
"streamBroker.reportStreamSignal": [{
|
|
43965
|
+
name: "deviceId",
|
|
43966
|
+
form: "single",
|
|
43967
|
+
optional: false
|
|
43968
|
+
}],
|
|
43636
43969
|
"streamBroker.restartProfile": [{
|
|
43637
43970
|
name: "deviceId",
|
|
43638
43971
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.102",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|