@camstack/addon-provider-homematic 1.2.120 → 1.2.122
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 +921 -473
- package/dist/addon.mjs +921 -474
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/addon.mjs
CHANGED
|
@@ -5380,7 +5380,7 @@ var ZodIssueCode = {
|
|
|
5380
5380
|
var ZodFirstPartyTypeKind;
|
|
5381
5381
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5382
5382
|
//#endregion
|
|
5383
|
-
//#region ../types/dist/sleep-
|
|
5383
|
+
//#region ../types/dist/sleep-gU6hqv4_.mjs
|
|
5384
5384
|
/**
|
|
5385
5385
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5386
5386
|
* window to float samples (D455).
|
|
@@ -7423,7 +7423,59 @@ function errMsg(err) {
|
|
|
7423
7423
|
return String(err);
|
|
7424
7424
|
}
|
|
7425
7425
|
//#endregion
|
|
7426
|
-
//#region ../types/dist/composition-
|
|
7426
|
+
//#region ../types/dist/composition-Dq42XWp0.mjs
|
|
7427
|
+
/**
|
|
7428
|
+
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7429
|
+
*
|
|
7430
|
+
* ## Why a download, on every node, including the container
|
|
7431
|
+
*
|
|
7432
|
+
* The version of ffmpeg used to be CODE: baked into the image, changeable only
|
|
7433
|
+
* by rebuilding and rolling it. Now it is DATA — this file states the release,
|
|
7434
|
+
* and a node that boots with a different one downloads it. Changing ffmpeg is a
|
|
7435
|
+
* framework bump, not an image rebuild.
|
|
7436
|
+
*
|
|
7437
|
+
* It also settles the licence question by removing it. FFmpeg's licence is
|
|
7438
|
+
* chosen at compile time: the core is LGPL 2.1+, `--enable-gpl` makes it GPL
|
|
7439
|
+
* (for x264/x265), `--enable-version3` makes that v3, and `--enable-nonfree`
|
|
7440
|
+
* makes the result undistributable. These are GPL v3 builds, and we do not
|
|
7441
|
+
* distribute them: the user's own node fetches the archive from the project
|
|
7442
|
+
* that publishes it, so we convey no GPL work and inherit none of the
|
|
7443
|
+
* obligations that come with conveying one. That is the whole reason the image
|
|
7444
|
+
* no longer installs ffmpeg at all — not a technical preference.
|
|
7445
|
+
*
|
|
7446
|
+
* ## Why jellyfin-ffmpeg
|
|
7447
|
+
*
|
|
7448
|
+
* One vendor covering linux-amd64, linux-arm64, darwin-arm64 and darwin-x64
|
|
7449
|
+
* from one release, with the widest hardware surface of anything maintained:
|
|
7450
|
+
* VAAPI, QSV, NVENC/NVDEC, AMF, Vulkan, OpenCL and DRM on amd64, plus Rockchip
|
|
7451
|
+
* MPP on arm64. It reaches the vendor libraries through dlopen trampolines,
|
|
7452
|
+
* so the binary is not linked against a driver stack it may not find.
|
|
7453
|
+
*
|
|
7454
|
+
* **What it still needs from the host, measured 2026-09-19.** On the Unraid
|
|
7455
|
+
* HOST, which has no libva, `-vaapi_device` aborts the process outright —
|
|
7456
|
+
* `implib-gen: libva-drm.so.2: failed to load library ... Assertion '0 &&
|
|
7457
|
+
* "Assertion in generated code"' failed`. Inside our container, which installs
|
|
7458
|
+
* libva plus the iHD driver, the same command encodes: verified end to end with
|
|
7459
|
+
* `testsrc → format=nv12,hwupload → h264_vaapi`. So the image drops ffmpeg and
|
|
7460
|
+
* KEEPS the Intel media stack; the drivers are the part a binary cannot bring.
|
|
7461
|
+
*
|
|
7462
|
+
* ## Why each artifact carries a checksum and a claim
|
|
7463
|
+
*
|
|
7464
|
+
* The download is now the only source, so `sha256` is verified before anything
|
|
7465
|
+
* is extracted — jellyfin publishes no checksums on its release assets, so
|
|
7466
|
+
* these are ours, taken at the version bump. And `expectedHwaccels` is what the
|
|
7467
|
+
* build is supposed to be able to do: a binary that probes short of its own
|
|
7468
|
+
* claim is a source that changed under us, which is precisely what went
|
|
7469
|
+
* unnoticed for months when a static build turned out to carry no VAAPI at all
|
|
7470
|
+
* (D536).
|
|
7471
|
+
*/
|
|
7472
|
+
/** The pinned jellyfin-ffmpeg release. Changing this is the version change. */
|
|
7473
|
+
var FFMPEG_RELEASE = "8.1.2-5";
|
|
7474
|
+
var BASE = `https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_RELEASE}`;
|
|
7475
|
+
function portable(target) {
|
|
7476
|
+
return `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_${target}-gpl.tar.xz`;
|
|
7477
|
+
}
|
|
7478
|
+
portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
|
|
7427
7479
|
/**
|
|
7428
7480
|
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
7429
7481
|
* valutatore puro del suo FRONTE.
|
|
@@ -8229,7 +8281,6 @@ var CompositionSchema = object({
|
|
|
8229
8281
|
});
|
|
8230
8282
|
new Set([
|
|
8231
8283
|
"track",
|
|
8232
|
-
"summary",
|
|
8233
8284
|
"face",
|
|
8234
8285
|
"identity",
|
|
8235
8286
|
"plate",
|
|
@@ -8898,6 +8949,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
|
|
|
8898
8949
|
/** Max rows returned, newest-first. */
|
|
8899
8950
|
limit: number().int().min(1).max(1e3).optional()
|
|
8900
8951
|
});
|
|
8952
|
+
var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
|
|
8953
|
+
var TrackSideSchema = _enum(["before", "after"]);
|
|
8954
|
+
var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
|
|
8955
|
+
var TrackRelationSchema = object({
|
|
8956
|
+
id: string(),
|
|
8957
|
+
deviceId: number().int(),
|
|
8958
|
+
leftTrackId: string(),
|
|
8959
|
+
rightTrackId: string(),
|
|
8960
|
+
leftSide: TrackSideSchema.nullable(),
|
|
8961
|
+
rightSide: TrackSideSchema.nullable(),
|
|
8962
|
+
relation: TrackRelationKindSchema,
|
|
8963
|
+
presence: literal("continuous").nullable(),
|
|
8964
|
+
leftStartedAt: number().int().nullable(),
|
|
8965
|
+
rightStartedAt: number().int().nullable(),
|
|
8966
|
+
createdAt: number().int(),
|
|
8967
|
+
updatedAt: number().int(),
|
|
8968
|
+
author: string().nullable()
|
|
8969
|
+
});
|
|
8970
|
+
var TrackPuritySchema = object({
|
|
8971
|
+
id: string(),
|
|
8972
|
+
deviceId: number().int(),
|
|
8973
|
+
sourceTrackId: string(),
|
|
8974
|
+
purity: TrackPurityValueSchema,
|
|
8975
|
+
switchAtMs: number().int().nullable(),
|
|
8976
|
+
startedAt: number().int().nullable(),
|
|
8977
|
+
createdAt: number().int(),
|
|
8978
|
+
updatedAt: number().int(),
|
|
8979
|
+
author: string().nullable()
|
|
8980
|
+
});
|
|
8981
|
+
var SetTrackRelationInputSchema = object({
|
|
8982
|
+
deviceId: number().int(),
|
|
8983
|
+
trackId: string().min(1),
|
|
8984
|
+
otherTrackId: string().min(1),
|
|
8985
|
+
relation: TrackRelationKindSchema,
|
|
8986
|
+
presence: literal("continuous").optional(),
|
|
8987
|
+
trackSide: TrackSideSchema.optional(),
|
|
8988
|
+
otherSide: TrackSideSchema.optional()
|
|
8989
|
+
});
|
|
8990
|
+
var ClearTrackRelationInputSchema = object({
|
|
8991
|
+
deviceId: number().int(),
|
|
8992
|
+
trackId: string().min(1),
|
|
8993
|
+
otherTrackId: string().min(1)
|
|
8994
|
+
});
|
|
8995
|
+
var ClearTrackRelationResultSchema = object({ cleared: boolean() });
|
|
8996
|
+
var SetTrackPurityInputSchema = object({
|
|
8997
|
+
deviceId: number().int(),
|
|
8998
|
+
trackId: string().min(1),
|
|
8999
|
+
purity: _enum([
|
|
9000
|
+
"pure",
|
|
9001
|
+
"mixed",
|
|
9002
|
+
"not-a-subject"
|
|
9003
|
+
]),
|
|
9004
|
+
switchAtMs: number().int().optional()
|
|
9005
|
+
});
|
|
9006
|
+
/** `null` when `pure` cleared the row. */
|
|
9007
|
+
var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
|
|
9008
|
+
var ListTrackRelationsInputSchema = object({
|
|
9009
|
+
deviceId: number().int(),
|
|
9010
|
+
trackId: string().optional(),
|
|
9011
|
+
since: number().int().optional(),
|
|
9012
|
+
until: number().int().optional(),
|
|
9013
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
9014
|
+
});
|
|
9015
|
+
var ListTrackRelationsResultSchema = object({
|
|
9016
|
+
relations: array(TrackRelationSchema).readonly(),
|
|
9017
|
+
purities: array(TrackPuritySchema).readonly(),
|
|
9018
|
+
truncated: boolean()
|
|
9019
|
+
});
|
|
9020
|
+
_enum([
|
|
9021
|
+
"unknown-track",
|
|
9022
|
+
"cross-device",
|
|
9023
|
+
"self-relation",
|
|
9024
|
+
"contradiction",
|
|
9025
|
+
"switch-outside-track",
|
|
9026
|
+
"switch-needs-mixed"
|
|
9027
|
+
]);
|
|
8901
9028
|
/**
|
|
8902
9029
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8903
9030
|
* recordings and events management surfaces.
|
|
@@ -11451,6 +11578,68 @@ method(object({
|
|
|
11451
11578
|
password: string()
|
|
11452
11579
|
}), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
|
|
11453
11580
|
/**
|
|
11581
|
+
* How long one snapshot may take end to end: the pinned copy of the whole
|
|
11582
|
+
* database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
|
|
11583
|
+
* disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
|
|
11584
|
+
* generous because a timeout fails the whole backup run.
|
|
11585
|
+
*/
|
|
11586
|
+
var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
|
|
11587
|
+
/**
|
|
11588
|
+
* The databases an owner snapshots — declared by the OWNER, so a caller never
|
|
11589
|
+
* guesses which file is live from what sits beside it (a cleanly closed
|
|
11590
|
+
* database has no sidecars and is just as owned). Paths are absolute on the
|
|
11591
|
+
* owner's host.
|
|
11592
|
+
*/
|
|
11593
|
+
var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
|
|
11594
|
+
/** One b-tree table of the snapshot and the rows it holds. */
|
|
11595
|
+
var DatabaseSnapshotTableSchema = object({
|
|
11596
|
+
name: string(),
|
|
11597
|
+
rows: number().int().nonnegative()
|
|
11598
|
+
});
|
|
11599
|
+
/**
|
|
11600
|
+
* What the owner wrote. Every path is ABSOLUTE on the owner's host — the
|
|
11601
|
+
* caller pins the call to its own node, so it can read the file; a caller
|
|
11602
|
+
* that finds the path outside its own data root refuses it rather than
|
|
11603
|
+
* archiving something it cannot place.
|
|
11604
|
+
*/
|
|
11605
|
+
var DatabaseSnapshotResultSchema = object({
|
|
11606
|
+
/** The live database the snapshot copies. Never to be copied as a file. */
|
|
11607
|
+
livePath: string(),
|
|
11608
|
+
/** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
|
|
11609
|
+
snapshotPath: string(),
|
|
11610
|
+
sizeBytes: number().int().nonnegative(),
|
|
11611
|
+
pageCount: number().int().nonnegative(),
|
|
11612
|
+
pageSize: number().int().positive(),
|
|
11613
|
+
/**
|
|
11614
|
+
* Every b-tree table with its row count. Read inside the SAME read
|
|
11615
|
+
* transaction the copy was taken from, and found EQUAL on the copy — so
|
|
11616
|
+
* this is the content of the snapshot, not an estimate of the source.
|
|
11617
|
+
*/
|
|
11618
|
+
tables: array(DatabaseSnapshotTableSchema),
|
|
11619
|
+
/** Wall time of the pinned copy (row counts included). */
|
|
11620
|
+
copyMs: number().nonnegative(),
|
|
11621
|
+
/** Wall time of the checks on the copy (`integrity_check`, row counts). */
|
|
11622
|
+
verifyMs: number().nonnegative(),
|
|
11623
|
+
/** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
|
|
11624
|
+
takenAt: number()
|
|
11625
|
+
});
|
|
11626
|
+
/**
|
|
11627
|
+
* A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
|
|
11628
|
+
* the same facts, with both paths relative to the archive root (the node's
|
|
11629
|
+
* data dir), because an archive outlives the host that made it.
|
|
11630
|
+
*/
|
|
11631
|
+
var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
|
|
11632
|
+
/** Archive-relative path of the live database the archive does NOT carry. */
|
|
11633
|
+
livePath: string(),
|
|
11634
|
+
/** Archive-relative path of the verified copy it carries in its place. */
|
|
11635
|
+
snapshotPath: string()
|
|
11636
|
+
});
|
|
11637
|
+
method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
|
|
11638
|
+
kind: "mutation",
|
|
11639
|
+
auth: "admin",
|
|
11640
|
+
timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
|
|
11641
|
+
});
|
|
11642
|
+
/**
|
|
11454
11643
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
11455
11644
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
11456
11645
|
* (admin UI, restore flow) see one canonical key.
|
|
@@ -11561,7 +11750,12 @@ var ArchiveManifestSchema = object({
|
|
|
11561
11750
|
locations: array(string()),
|
|
11562
11751
|
entries: array(ArchiveEntrySchema),
|
|
11563
11752
|
totalBytes: number(),
|
|
11564
|
-
totalFiles: number()
|
|
11753
|
+
totalFiles: number(),
|
|
11754
|
+
/**
|
|
11755
|
+
* Live SQLite databases this archive carries as their OWNER's verified
|
|
11756
|
+
* snapshot instead of as files (D693). Absent on archives made before.
|
|
11757
|
+
*/
|
|
11758
|
+
sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
|
|
11565
11759
|
});
|
|
11566
11760
|
var LocationStatSchema = object({
|
|
11567
11761
|
name: string(),
|
|
@@ -13136,6 +13330,116 @@ var CompositionBlockStateSchema = object({
|
|
|
13136
13330
|
reason: string().optional(),
|
|
13137
13331
|
fields: array(CompositionFieldStateSchema)
|
|
13138
13332
|
});
|
|
13333
|
+
var ComposerBlockSchema = object({
|
|
13334
|
+
id: string().min(1),
|
|
13335
|
+
name: string().min(1).max(120),
|
|
13336
|
+
enabled: boolean(),
|
|
13337
|
+
updatedAt: number(),
|
|
13338
|
+
composition: CompositionSchema
|
|
13339
|
+
});
|
|
13340
|
+
/**
|
|
13341
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
13342
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13343
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13344
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13345
|
+
*/
|
|
13346
|
+
var ComposerUnreadableBlockSchema = object({
|
|
13347
|
+
id: string().min(1),
|
|
13348
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13349
|
+
name: string().nullable(),
|
|
13350
|
+
/** The parse error, in the operator's words. */
|
|
13351
|
+
error: string()
|
|
13352
|
+
});
|
|
13353
|
+
method(object({
|
|
13354
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13355
|
+
integrationId: string().nullable(),
|
|
13356
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13357
|
+
storeLoaded: boolean(),
|
|
13358
|
+
blocks: array(ComposerBlockSchema),
|
|
13359
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13360
|
+
restartBlockIds: array(string()),
|
|
13361
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13362
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13363
|
+
}), object({
|
|
13364
|
+
blocks: array(object({
|
|
13365
|
+
blockId: string(),
|
|
13366
|
+
status: CompositionRunStatusSchema,
|
|
13367
|
+
reason: string().optional()
|
|
13368
|
+
})),
|
|
13369
|
+
/**
|
|
13370
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13371
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13372
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13373
|
+
*/
|
|
13374
|
+
acted: boolean()
|
|
13375
|
+
}), {
|
|
13376
|
+
kind: "mutation",
|
|
13377
|
+
auth: "admin"
|
|
13378
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13379
|
+
var NUMBER = {
|
|
13380
|
+
kind: "fixed",
|
|
13381
|
+
result: ["number"]
|
|
13382
|
+
};
|
|
13383
|
+
var BOOLEAN = {
|
|
13384
|
+
kind: "fixed",
|
|
13385
|
+
result: ["boolean"]
|
|
13386
|
+
};
|
|
13387
|
+
Object.freeze({
|
|
13388
|
+
min: NUMBER,
|
|
13389
|
+
max: NUMBER,
|
|
13390
|
+
abs: NUMBER,
|
|
13391
|
+
floor: NUMBER,
|
|
13392
|
+
ceil: NUMBER,
|
|
13393
|
+
sqrt: NUMBER,
|
|
13394
|
+
round: NUMBER,
|
|
13395
|
+
pow: NUMBER,
|
|
13396
|
+
clamp: NUMBER,
|
|
13397
|
+
avg: NUMBER,
|
|
13398
|
+
sum: NUMBER,
|
|
13399
|
+
age: NUMBER,
|
|
13400
|
+
convert: NUMBER,
|
|
13401
|
+
coalesce: { kind: "coalesce" },
|
|
13402
|
+
any: BOOLEAN,
|
|
13403
|
+
all: BOOLEAN,
|
|
13404
|
+
within: BOOLEAN,
|
|
13405
|
+
latest: {
|
|
13406
|
+
kind: "fixed",
|
|
13407
|
+
result: ["number", "null"]
|
|
13408
|
+
},
|
|
13409
|
+
number: {
|
|
13410
|
+
kind: "fixed",
|
|
13411
|
+
result: ["number", "null"]
|
|
13412
|
+
},
|
|
13413
|
+
rose: {
|
|
13414
|
+
kind: "fixed",
|
|
13415
|
+
result: ["number", "null"]
|
|
13416
|
+
},
|
|
13417
|
+
count: NUMBER
|
|
13418
|
+
});
|
|
13419
|
+
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
13420
|
+
/**
|
|
13421
|
+
* What a composition may BUILD on a device type (G2, D676): the caps a new
|
|
13422
|
+
* device of that type, or an existing one that lacks them, can be given. The
|
|
13423
|
+
* blockers are the validator's own refusal codes, and a spec compares this
|
|
13424
|
+
* listing with `planComposition` for every capability — the editor can never
|
|
13425
|
+
* offer a feature the save would refuse for the same reason.
|
|
13426
|
+
*/
|
|
13427
|
+
var ComposableFieldSchema = object({
|
|
13428
|
+
path: string(),
|
|
13429
|
+
kind: CompositionFieldKindSchema,
|
|
13430
|
+
nullable: boolean(),
|
|
13431
|
+
required: boolean(),
|
|
13432
|
+
enumValues: array(string()).optional()
|
|
13433
|
+
});
|
|
13434
|
+
var ComposableCapabilitiesSchema = object({ caps: array(object({
|
|
13435
|
+
cap: string(),
|
|
13436
|
+
fields: array(ComposableFieldSchema),
|
|
13437
|
+
/** Present for an item-array cap (`consumables.items`). */
|
|
13438
|
+
itemArray: object({
|
|
13439
|
+
path: string(),
|
|
13440
|
+
keyField: string()
|
|
13441
|
+
}).optional()
|
|
13442
|
+
})) });
|
|
13139
13443
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
13140
13444
|
* agent is the reason placement is not fixed to the hub. */
|
|
13141
13445
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -13300,7 +13604,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13300
13604
|
}), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
|
|
13301
13605
|
addonId: string().min(1),
|
|
13302
13606
|
stableId: string().min(1)
|
|
13303
|
-
}), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
|
|
13607
|
+
}), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
|
|
13304
13608
|
composition: CompositionSchema,
|
|
13305
13609
|
blockId: string().optional()
|
|
13306
13610
|
}), CompositionValidationSchema, {
|
|
@@ -13308,52 +13612,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13308
13612
|
auth: "admin",
|
|
13309
13613
|
access: "view"
|
|
13310
13614
|
});
|
|
13311
|
-
var ComposerBlockSchema = object({
|
|
13312
|
-
id: string().min(1),
|
|
13313
|
-
name: string().min(1).max(120),
|
|
13314
|
-
enabled: boolean(),
|
|
13315
|
-
updatedAt: number(),
|
|
13316
|
-
composition: CompositionSchema
|
|
13317
|
-
});
|
|
13318
|
-
/**
|
|
13319
|
-
* A stored composition row that no longer PARSES — a schema a release
|
|
13320
|
-
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13321
|
-
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13322
|
-
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13323
|
-
*/
|
|
13324
|
-
var ComposerUnreadableBlockSchema = object({
|
|
13325
|
-
id: string().min(1),
|
|
13326
|
-
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13327
|
-
name: string().nullable(),
|
|
13328
|
-
/** The parse error, in the operator's words. */
|
|
13329
|
-
error: string()
|
|
13330
|
-
});
|
|
13331
|
-
method(object({
|
|
13332
|
-
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13333
|
-
integrationId: string().nullable(),
|
|
13334
|
-
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13335
|
-
storeLoaded: boolean(),
|
|
13336
|
-
blocks: array(ComposerBlockSchema),
|
|
13337
|
-
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13338
|
-
restartBlockIds: array(string()),
|
|
13339
|
-
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13340
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13341
|
-
}), object({
|
|
13342
|
-
blocks: array(object({
|
|
13343
|
-
blockId: string(),
|
|
13344
|
-
status: CompositionRunStatusSchema,
|
|
13345
|
-
reason: string().optional()
|
|
13346
|
-
})),
|
|
13347
|
-
/**
|
|
13348
|
-
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13349
|
-
* integration unknown, its own rows unread or read empty once). An empty
|
|
13350
|
-
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13351
|
-
*/
|
|
13352
|
-
acted: boolean()
|
|
13353
|
-
}), {
|
|
13354
|
-
kind: "mutation",
|
|
13355
|
-
auth: "admin"
|
|
13356
|
-
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13357
13615
|
/**
|
|
13358
13616
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13359
13617
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -15521,6 +15779,219 @@ method(object({
|
|
|
15521
15779
|
caps: array(string()).readonly().optional()
|
|
15522
15780
|
}), record(string(), record(string(), unknown().nullable())));
|
|
15523
15781
|
/**
|
|
15782
|
+
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
15783
|
+
* name (same pattern as `snapshot`):
|
|
15784
|
+
*
|
|
15785
|
+
* - **Native** providers: registered per-device by device-driver
|
|
15786
|
+
* addons via `ctx.registerNativeCap` — either on a
|
|
15787
|
+
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
15788
|
+
* or directly on the camera (Reolink registers at camera level).
|
|
15789
|
+
* Emits an `onPressed` event every time the firmware pushes a
|
|
15790
|
+
* ring; status tracks the last press and a pressCount since start
|
|
15791
|
+
* (diagnostic).
|
|
15792
|
+
*
|
|
15793
|
+
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
15794
|
+
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
15795
|
+
* device (contact / switch / event-emitter …) into a doorbell for
|
|
15796
|
+
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
15797
|
+
* it per camera in the device-bindings UI, then picks the source
|
|
15798
|
+
* device + trigger in the per-device settings.
|
|
15799
|
+
*
|
|
15800
|
+
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
15801
|
+
* — subscribers listening at the camera level receive ring events
|
|
15802
|
+
* with `via[]` populated. No code on the parent needed.
|
|
15803
|
+
*/
|
|
15804
|
+
var DoorbellStatusSchema = object({
|
|
15805
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
15806
|
+
lastPressedAt: number().nullable(),
|
|
15807
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
15808
|
+
pressCountSinceStart: number()
|
|
15809
|
+
});
|
|
15810
|
+
var DoorbellPressEventSchema = object({
|
|
15811
|
+
deviceId: number(),
|
|
15812
|
+
timestamp: number()
|
|
15813
|
+
});
|
|
15814
|
+
/**
|
|
15815
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
15816
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
15817
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
15818
|
+
*/
|
|
15819
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
15820
|
+
/**
|
|
15821
|
+
* The `doorbell-source` slot — which devices ring this camera's VIRTUAL
|
|
15822
|
+
* doorbell, owned by the `virtual-doorbell` wrapper over its
|
|
15823
|
+
* `doorbellSources` store (D648). A source rings when one of its
|
|
15824
|
+
* `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
|
|
15825
|
+
* different authority (`deviceManager.setWrapperActive`, D62) — the slot
|
|
15826
|
+
* reports it, it never writes it.
|
|
15827
|
+
*/
|
|
15828
|
+
var DOORBELL_SOURCE_SLOT = {
|
|
15829
|
+
id: "doorbell-source",
|
|
15830
|
+
label: "Doorbell trigger devices",
|
|
15831
|
+
description: "Any of these becoming active rings this camera's virtual doorbell: a binary sensor when it goes active, a switch when it turns on.",
|
|
15832
|
+
shape: "association",
|
|
15833
|
+
hostDeviceTypes: [DeviceType.Camera],
|
|
15834
|
+
sourceCaps: SOURCE_CAPS,
|
|
15835
|
+
cardinality: "many",
|
|
15836
|
+
value: DoorbellSourceSlotValueSchema
|
|
15837
|
+
};
|
|
15838
|
+
var doorbellCapability = {
|
|
15839
|
+
name: "doorbell",
|
|
15840
|
+
scope: "device",
|
|
15841
|
+
deviceNative: true,
|
|
15842
|
+
mode: "singleton",
|
|
15843
|
+
kind: "wrapper",
|
|
15844
|
+
defaultActive: false,
|
|
15845
|
+
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
15846
|
+
extensionSlots: [DOORBELL_SOURCE_SLOT],
|
|
15847
|
+
methods: {},
|
|
15848
|
+
events: {
|
|
15849
|
+
/**
|
|
15850
|
+
* Fires once per physical press. Reolink delivers via Baichuan
|
|
15851
|
+
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
15852
|
+
* release/duration — it's a pulse.
|
|
15853
|
+
*/
|
|
15854
|
+
onPressed: {
|
|
15855
|
+
data: DoorbellPressEventSchema,
|
|
15856
|
+
fromState: {
|
|
15857
|
+
field: "lastPressedAt",
|
|
15858
|
+
on: "advance"
|
|
15859
|
+
}
|
|
15860
|
+
} },
|
|
15861
|
+
status: {
|
|
15862
|
+
schema: DoorbellStatusSchema,
|
|
15863
|
+
kind: "push"
|
|
15864
|
+
},
|
|
15865
|
+
/**
|
|
15866
|
+
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
15867
|
+
* Mirrored by the kernel and readable via
|
|
15868
|
+
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
15869
|
+
* without subscribing.
|
|
15870
|
+
*/
|
|
15871
|
+
runtimeState: DoorbellStatusSchema,
|
|
15872
|
+
/**
|
|
15873
|
+
* Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
|
|
15874
|
+
*
|
|
15875
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
15876
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
15877
|
+
*/
|
|
15878
|
+
durability: "restored"
|
|
15879
|
+
};
|
|
15880
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
15881
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
15882
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
15883
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
15884
|
+
DeviceType.Camera;
|
|
15885
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
15886
|
+
state: literal("unreachable"),
|
|
15887
|
+
reason: string()
|
|
15888
|
+
})]);
|
|
15889
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
15890
|
+
var ExtensionSourceSchema = object({
|
|
15891
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
15892
|
+
source: string(),
|
|
15893
|
+
label: string(),
|
|
15894
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
15895
|
+
addonId: string().optional(),
|
|
15896
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
15897
|
+
});
|
|
15898
|
+
/**
|
|
15899
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
15900
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
15901
|
+
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
15902
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
15903
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
15904
|
+
*/
|
|
15905
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
15906
|
+
"ok",
|
|
15907
|
+
"missing",
|
|
15908
|
+
"foreign",
|
|
15909
|
+
"unavailable"
|
|
15910
|
+
]);
|
|
15911
|
+
var ExtensionSlotSourceSchema = object({
|
|
15912
|
+
deviceId: number().int(),
|
|
15913
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
15914
|
+
name: string().nullable(),
|
|
15915
|
+
health: ExtensionSourceHealthSchema,
|
|
15916
|
+
detail: string().optional()
|
|
15917
|
+
});
|
|
15918
|
+
/**
|
|
15919
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
15920
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
15921
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
15922
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
15923
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
15924
|
+
*/
|
|
15925
|
+
var ExtensionSlotActivationSchema = object({
|
|
15926
|
+
state: _enum([
|
|
15927
|
+
"active",
|
|
15928
|
+
"inactive",
|
|
15929
|
+
"unknown"
|
|
15930
|
+
]),
|
|
15931
|
+
authority: string(),
|
|
15932
|
+
detail: string().optional()
|
|
15933
|
+
});
|
|
15934
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
15935
|
+
state: literal("ok"),
|
|
15936
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
15937
|
+
slotRef: string(),
|
|
15938
|
+
slot: ExtensionSlotIdSchema,
|
|
15939
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
15940
|
+
authority: string(),
|
|
15941
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
15942
|
+
value: ExtensionSlotValueSchema,
|
|
15943
|
+
sources: array(ExtensionSlotSourceSchema),
|
|
15944
|
+
/**
|
|
15945
|
+
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
15946
|
+
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
15947
|
+
* the child a picked container stands for (D356 — a container is never a
|
|
15948
|
+
* pick, its children are). Read-only; the editor shows them and may offer
|
|
15949
|
+
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
15950
|
+
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
15951
|
+
* older than D655.
|
|
15952
|
+
*/
|
|
15953
|
+
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
15954
|
+
}), object({
|
|
15955
|
+
state: literal("unreachable"),
|
|
15956
|
+
addonId: string(),
|
|
15957
|
+
reason: string()
|
|
15958
|
+
})]);
|
|
15959
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
15960
|
+
deviceId: number().int(),
|
|
15961
|
+
name: string(),
|
|
15962
|
+
type: string(),
|
|
15963
|
+
location: string().nullable(),
|
|
15964
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
15965
|
+
parentName: string().nullable(),
|
|
15966
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
15967
|
+
suggested: boolean(),
|
|
15968
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
15969
|
+
reason: string().nullable()
|
|
15970
|
+
})) });
|
|
15971
|
+
/**
|
|
15972
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
15973
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
15974
|
+
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
15975
|
+
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
15976
|
+
*/
|
|
15977
|
+
var ExtensionSetResultSchema = object({
|
|
15978
|
+
applied: literal(true),
|
|
15979
|
+
reload: _enum([
|
|
15980
|
+
"none",
|
|
15981
|
+
"host",
|
|
15982
|
+
"parent"
|
|
15983
|
+
])
|
|
15984
|
+
});
|
|
15985
|
+
var ExtensionSlotRefInputSchema = object({
|
|
15986
|
+
deviceId: number().int(),
|
|
15987
|
+
slotRef: string().min(1)
|
|
15988
|
+
});
|
|
15989
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
15990
|
+
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
15991
|
+
kind: "mutation",
|
|
15992
|
+
auth: "admin"
|
|
15993
|
+
});
|
|
15994
|
+
/**
|
|
15524
15995
|
* Per-field ownership (D663). A composition may CLAIM fields of a native
|
|
15525
15996
|
* cap's runtime-state slice on an existing device: `replace` overlays the
|
|
15526
15997
|
* claimed fields on the native slice, `add` builds a slice the device does
|
|
@@ -18530,17 +19001,25 @@ var NcScheduleSchema = object({
|
|
|
18530
19001
|
*/
|
|
18531
19002
|
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
18532
19003
|
/**
|
|
19004
|
+
* How a summary window is SENT (D698): `rule` (absent) = ONE notification with
|
|
19005
|
+
* every section; `section` = one notification per section with something to
|
|
19006
|
+
* say (an unavailable section included), each titled by its section.
|
|
19007
|
+
*/
|
|
19008
|
+
var NcStateSummarySplitSchema = _enum(["rule", "section"]);
|
|
19009
|
+
/**
|
|
18533
19010
|
* `summary`: the rule sends NOTHING per event. When a window of `schedule`
|
|
18534
19011
|
* CLOSES, it sends one notification with the current state of its kinds
|
|
18535
19012
|
* (low batteries, consumables to replace, devices offline, updates
|
|
18536
|
-
* available, ...), after its own filters
|
|
19013
|
+
* available, ...), after its own filters — or, with `split: 'section'`
|
|
19014
|
+
* (D698), one notification per section. Nothing to report sends nothing.
|
|
18537
19015
|
* The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
|
|
18538
19016
|
* midnight crossing); the send time is each window's END. Refused on the
|
|
18539
19017
|
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
18540
19018
|
*/
|
|
18541
19019
|
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
|
|
18542
19020
|
mode: literal("summary"),
|
|
18543
|
-
schedule: NcScheduleSchema
|
|
19021
|
+
schedule: NcScheduleSchema,
|
|
19022
|
+
split: NcStateSummarySplitSchema.optional()
|
|
18544
19023
|
})]);
|
|
18545
19024
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
18546
19025
|
var NcPlateMatcherSchema = object({
|
|
@@ -18680,8 +19159,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
|
|
|
18680
19159
|
/** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
|
|
18681
19160
|
var NcZoneConditionSchema = object({
|
|
18682
19161
|
ids: array(string().min(1)).min(1),
|
|
18683
|
-
/**
|
|
18684
|
-
|
|
19162
|
+
/**
|
|
19163
|
+
* LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
|
|
19164
|
+
* is what both editors mean and all they write since D690: "all of" was
|
|
19165
|
+
* removed from the editors because on an immediate rule it asked one
|
|
19166
|
+
* detection to stand in every zone at once. Still ACCEPTED, and `all` still
|
|
19167
|
+
* evaluated, so a stored rule keeps parsing and meaning what it meant.
|
|
19168
|
+
*/
|
|
19169
|
+
match: _enum(["any", "all"]).optional()
|
|
18685
19170
|
});
|
|
18686
19171
|
/**
|
|
18687
19172
|
* The P1 condition set — a flat AND of groups; absent group = pass;
|
|
@@ -19185,10 +19670,12 @@ var NcMediaPolicySchema = object({
|
|
|
19185
19670
|
/**
|
|
19186
19671
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
19187
19672
|
* notification suppresses.
|
|
19188
|
-
* - `
|
|
19189
|
-
*
|
|
19190
|
-
*
|
|
19191
|
-
*
|
|
19673
|
+
* - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
|
|
19674
|
+
* independent window per detected class: cat→dog fires at once, cat→cat
|
|
19675
|
+
* still waits.
|
|
19676
|
+
* - `shared` — one window for the whole rule/scope: a cat silences the next
|
|
19677
|
+
* dog for `cooldownSec`. Only written when an operator picks it; it is no
|
|
19678
|
+
* longer what an unset rule means.
|
|
19192
19679
|
*
|
|
19193
19680
|
* AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
|
|
19194
19681
|
* must not be swallowed by a bark's window (the precedent this generalizes —
|
|
@@ -19203,8 +19690,11 @@ var NcThrottleSchema = object({
|
|
|
19203
19690
|
/**
|
|
19204
19691
|
* Class granularity of the cooldown key. Optional rather than defaulted:
|
|
19205
19692
|
* a Zod default does NOT run on the addon→addon cap path, so a persisted
|
|
19206
|
-
* rule authored before this field simply carries none
|
|
19207
|
-
*
|
|
19693
|
+
* rule authored before this field simply carries none. The engine used to
|
|
19694
|
+
* read absent as `shared` (D36); since 2026-10-01 it reads absent as
|
|
19695
|
+
* `per-class` — the operator's default — and only an explicit `shared`
|
|
19696
|
+
* still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
|
|
19697
|
+
* engine, and D36's dated note.
|
|
19208
19698
|
*/
|
|
19209
19699
|
granularity: NcThrottleGranularitySchema.optional()
|
|
19210
19700
|
});
|
|
@@ -19528,11 +20018,23 @@ var NcStateSummaryPreviewSectionSchema = object({
|
|
|
19528
20018
|
reason: string().optional()
|
|
19529
20019
|
});
|
|
19530
20020
|
/**
|
|
20021
|
+
* One notification a previewed summary would send (D698): the whole summary on
|
|
20022
|
+
* a `rule` split (no `section`), one section's on a `section` split.
|
|
20023
|
+
*/
|
|
20024
|
+
var NcStateSummaryPreviewRowSchema = object({
|
|
20025
|
+
section: string().optional(),
|
|
20026
|
+
/** The section's name on a per-section row; every reported section's, joined, on a combined one. */
|
|
20027
|
+
title: string(),
|
|
20028
|
+
text: string(),
|
|
20029
|
+
count: number().int().nonnegative()
|
|
20030
|
+
});
|
|
20031
|
+
/**
|
|
19531
20032
|
* The summary a rule would send now. `empty` = nothing to report and every
|
|
19532
20033
|
* section read: such a summary is NOT sent. `dropped` counts the open states
|
|
19533
20034
|
* the rule's own filters (or a camera mute) left out, by reason.
|
|
19534
20035
|
* `excludedGroups` names the kind groups selected that have no state to report
|
|
19535
|
-
* (backups & exports).
|
|
20036
|
+
* (backups & exports). `split` and `rows` (D698) say how it would be sent —
|
|
20037
|
+
* optional, so an older hub's answer still parses.
|
|
19536
20038
|
*/
|
|
19537
20039
|
var NcStateSummaryPreviewSchema = object({
|
|
19538
20040
|
empty: boolean(),
|
|
@@ -19540,7 +20042,9 @@ var NcStateSummaryPreviewSchema = object({
|
|
|
19540
20042
|
text: string(),
|
|
19541
20043
|
sections: array(NcStateSummaryPreviewSectionSchema),
|
|
19542
20044
|
dropped: record(string(), number().int().nonnegative()),
|
|
19543
|
-
excludedGroups: array(string())
|
|
20045
|
+
excludedGroups: array(string()),
|
|
20046
|
+
split: NcStateSummarySplitSchema.optional(),
|
|
20047
|
+
rows: array(NcStateSummaryPreviewRowSchema).optional()
|
|
19544
20048
|
});
|
|
19545
20049
|
var NcTestResultSchema = object({
|
|
19546
20050
|
recordId: string(),
|
|
@@ -20538,6 +21042,102 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
20538
21042
|
});
|
|
20539
21043
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
20540
21044
|
/**
|
|
21045
|
+
* What started a camera's onboard motion (D672). `camera` is the camera's own
|
|
21046
|
+
* firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
|
|
21047
|
+
* wire means the camera: only the camera-sensors bridge ever says `sensor`.
|
|
21048
|
+
*/
|
|
21049
|
+
var MotionTriggeredBySchema = discriminatedUnion("kind", [object({ kind: literal("camera") }), object({
|
|
21050
|
+
kind: literal("sensor"),
|
|
21051
|
+
deviceId: number().int().positive()
|
|
21052
|
+
})]);
|
|
21053
|
+
Object.freeze({ kind: "camera" });
|
|
21054
|
+
var CameraSensorRefSchema = object({
|
|
21055
|
+
addonId: string().min(1),
|
|
21056
|
+
stableId: string().min(1)
|
|
21057
|
+
});
|
|
21058
|
+
function cameraSensorRefKey(ref) {
|
|
21059
|
+
return `${ref.addonId}/${ref.stableId}`;
|
|
21060
|
+
}
|
|
21061
|
+
/** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
|
|
21062
|
+
var CameraSensorsModeSchema = _enum(["in-addition"]);
|
|
21063
|
+
var CameraSensorsConfigSchema = object({
|
|
21064
|
+
mode: CameraSensorsModeSchema,
|
|
21065
|
+
sensors: array(CameraSensorRefSchema).min(1).max(8)
|
|
21066
|
+
}).superRefine((value, ctx) => {
|
|
21067
|
+
const seen = /* @__PURE__ */ new Set();
|
|
21068
|
+
value.sensors.forEach((ref, index) => {
|
|
21069
|
+
const key = cameraSensorRefKey(ref);
|
|
21070
|
+
if (seen.has(key)) ctx.addIssue({
|
|
21071
|
+
code: "custom",
|
|
21072
|
+
path: ["sensors", index],
|
|
21073
|
+
message: `duplicate camera sensor ${key}`
|
|
21074
|
+
});
|
|
21075
|
+
seen.add(key);
|
|
21076
|
+
});
|
|
21077
|
+
});
|
|
21078
|
+
var RefFields = {
|
|
21079
|
+
addonId: string(),
|
|
21080
|
+
stableId: string()
|
|
21081
|
+
};
|
|
21082
|
+
var CameraSensorAttachmentSchema = discriminatedUnion("state", [
|
|
21083
|
+
object({
|
|
21084
|
+
...RefFields,
|
|
21085
|
+
state: literal("ready"),
|
|
21086
|
+
deviceId: number(),
|
|
21087
|
+
name: string(),
|
|
21088
|
+
caps: array(string()).readonly()
|
|
21089
|
+
}),
|
|
21090
|
+
object({
|
|
21091
|
+
...RefFields,
|
|
21092
|
+
state: literal("offline"),
|
|
21093
|
+
deviceId: number(),
|
|
21094
|
+
name: string(),
|
|
21095
|
+
reason: _enum(["offline", "disabled"])
|
|
21096
|
+
}),
|
|
21097
|
+
object({
|
|
21098
|
+
...RefFields,
|
|
21099
|
+
state: literal("missing"),
|
|
21100
|
+
reason: string()
|
|
21101
|
+
}),
|
|
21102
|
+
object({
|
|
21103
|
+
...RefFields,
|
|
21104
|
+
state: literal("unsupported"),
|
|
21105
|
+
deviceId: number(),
|
|
21106
|
+
name: string(),
|
|
21107
|
+
reason: string()
|
|
21108
|
+
}),
|
|
21109
|
+
object({
|
|
21110
|
+
...RefFields,
|
|
21111
|
+
state: literal("unreadable"),
|
|
21112
|
+
reason: string()
|
|
21113
|
+
})
|
|
21114
|
+
]);
|
|
21115
|
+
/**
|
|
21116
|
+
* Why a configured camera forwards NOTHING from its sensors, however ready they
|
|
21117
|
+
* are (D672): it does not list `onboard` in `motionSources` (attaching a sensor
|
|
21118
|
+
* does not add it), or it has no active detection config at all (the bridge
|
|
21119
|
+
* reads the active config). Absent = forwarded, or an older node that does not
|
|
21120
|
+
* say.
|
|
21121
|
+
*/
|
|
21122
|
+
var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
|
|
21123
|
+
var CameraSensorsStatusSchema = discriminatedUnion("state", [
|
|
21124
|
+
object({ state: literal("not-configured") }),
|
|
21125
|
+
object({
|
|
21126
|
+
state: literal("unreadable"),
|
|
21127
|
+
reason: string()
|
|
21128
|
+
}),
|
|
21129
|
+
object({
|
|
21130
|
+
state: literal("configured"),
|
|
21131
|
+
mode: CameraSensorsModeSchema,
|
|
21132
|
+
sensors: array(CameraSensorAttachmentSchema).readonly(),
|
|
21133
|
+
notForwarded: CameraSensorsNotForwardedSchema.optional()
|
|
21134
|
+
})
|
|
21135
|
+
]);
|
|
21136
|
+
Object.freeze({
|
|
21137
|
+
state: "unreadable",
|
|
21138
|
+
reason: "camera sensor mappings not loaded"
|
|
21139
|
+
});
|
|
21140
|
+
/**
|
|
20541
21141
|
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
20542
21142
|
*
|
|
20543
21143
|
* ## The two scopes
|
|
@@ -21286,6 +21886,12 @@ var MotionEventSchema = object({
|
|
|
21286
21886
|
/** Populated by B5 (recording playback URL for this event). */
|
|
21287
21887
|
mediaUrl: string().optional(),
|
|
21288
21888
|
/**
|
|
21889
|
+
* The FIRST trigger of an `onboard` episode, written once at open (D672).
|
|
21890
|
+
* Absent = not recorded (a row written before D672, or an analyzer /
|
|
21891
|
+
* device-activity episode) — never read as "the camera" (D393).
|
|
21892
|
+
*/
|
|
21893
|
+
triggeredBy: MotionTriggeredBySchema.optional(),
|
|
21894
|
+
/**
|
|
21289
21895
|
* One row per motion EPISODE, not one per push (D475). `null` while the
|
|
21290
21896
|
* episode is still open — a further rising edge extends it in place rather
|
|
21291
21897
|
* than inserting a new row. Set once, at close, to `lastOnAt - startedAt`
|
|
@@ -21444,6 +22050,21 @@ var ObjectEventSchema = object({
|
|
|
21444
22050
|
keyFrameMediaId: number().int().optional(),
|
|
21445
22051
|
/** Populated by B5 (recording playback URL for this event). */
|
|
21446
22052
|
mediaUrl: string().optional(),
|
|
22053
|
+
/**
|
|
22054
|
+
* When the change this row records HAPPENED, epoch ms, when that is earlier
|
|
22055
|
+
* than {@link timestamp} and the producer could date it (D684).
|
|
22056
|
+
*
|
|
22057
|
+
* Set on a package PICK-UP row only: its `timestamp` is when the departure
|
|
22058
|
+
* was CONCLUDED — five minutes of unseen observed time after the parcel went
|
|
22059
|
+
* — and a notification's footage has to be cut around the pick-up, not the
|
|
22060
|
+
* empty doormat after it (D682). Stored so every path that rebuilds a
|
|
22061
|
+
* notification subject from the row (the boot reconcile, a dry-run) anchors
|
|
22062
|
+
* on the same instant the live hook did.
|
|
22063
|
+
*
|
|
22064
|
+
* `timestamp` keeps its meaning. Absent on every other row and on every
|
|
22065
|
+
* pick-up written before D684 — UNKNOWN, never 0 and never `timestamp`.
|
|
22066
|
+
*/
|
|
22067
|
+
observedAt: number().optional(),
|
|
21447
22068
|
/** The parent track's key-event importance [0,1], propagated to every object
|
|
21448
22069
|
* event of the track (so an event row can be sorted by importance without a
|
|
21449
22070
|
* track join). Absent on legacy rows / before the track was scored. */
|
|
@@ -21779,131 +22400,6 @@ var RecentTracksQueryInput = object({
|
|
|
21779
22400
|
/** See {@link ExcludeSourcesDoc}. */
|
|
21780
22401
|
excludeSources: array(TrackSourceSchema).optional()
|
|
21781
22402
|
});
|
|
21782
|
-
/**
|
|
21783
|
-
* A Summary (D359): the per-camera session envelope that references tracks.
|
|
21784
|
-
* `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
|
|
21785
|
-
* 'summary'`, served by the event-media plane at `/m/<id>`), null until the
|
|
21786
|
-
* first frame with a member visible has been materialised (D482 — it was the
|
|
21787
|
-
* row's composite key, which embedded the owner and could name another table's
|
|
21788
|
-
* row once event ids became per-table rowids).
|
|
21789
|
-
*/
|
|
21790
|
-
var SummarySchema = object({
|
|
21791
|
-
id: string(),
|
|
21792
|
-
deviceId: number(),
|
|
21793
|
-
openedAt: number(),
|
|
21794
|
-
lastActiveAt: number(),
|
|
21795
|
-
sealedAt: number().nullable(),
|
|
21796
|
-
memberCount: number().int().nonnegative(),
|
|
21797
|
-
groupShotMediaId: number().int().nullable()
|
|
21798
|
-
});
|
|
21799
|
-
var SummariesQueryInput = object({
|
|
21800
|
-
deviceIds: array(number()).min(1),
|
|
21801
|
-
since: number().optional(),
|
|
21802
|
-
until: number().optional(),
|
|
21803
|
-
limit: number().int().min(1).max(200).default(50),
|
|
21804
|
-
/** The same member-wise filter {@link listRecentSummaries} takes — one
|
|
21805
|
-
* meaning of "dog" on every summary surface. */
|
|
21806
|
-
classes: array(string().min(1).max(60)).max(40).optional()
|
|
21807
|
-
});
|
|
21808
|
-
var SummaryDetailSchema = object({
|
|
21809
|
-
summary: SummarySchema,
|
|
21810
|
-
/** Members in absorption order, oldest join first. */
|
|
21811
|
-
members: array(object({
|
|
21812
|
-
trackId: string(),
|
|
21813
|
-
/**
|
|
21814
|
-
* The track's class at the time it JOINED, or `null` when it was unresolved
|
|
21815
|
-
* and the track no longer exists to fill it.
|
|
21816
|
-
*
|
|
21817
|
-
* The join, not the latest opinion: class voting can re-decide a track's
|
|
21818
|
-
* class afterwards, and a group's composition is the history of who came
|
|
21819
|
-
* together. A consumer counts these to badge a thumbnail — "two people and a
|
|
21820
|
-
* dog" — rather than being handed a second, denormalised tally that would
|
|
21821
|
-
* drift from the members it claims to describe.
|
|
21822
|
-
*/
|
|
21823
|
-
className: string().nullable(),
|
|
21824
|
-
/** `primary` is the one member that carries the group's identity. */
|
|
21825
|
-
role: _enum([
|
|
21826
|
-
"primary",
|
|
21827
|
-
"sibling",
|
|
21828
|
-
"child"
|
|
21829
|
-
]).nullable(),
|
|
21830
|
-
joinedAt: number(),
|
|
21831
|
-
/** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
|
|
21832
|
-
* at read time. Absent when nothing resolved, never an empty string. */
|
|
21833
|
-
label: string().optional(),
|
|
21834
|
-
/** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
|
|
21835
|
-
* recognised nobody, and absent for a member whose track has been pruned —
|
|
21836
|
-
* a thumbnail that names the wrong person is worse than one naming nobody. */
|
|
21837
|
-
subLabel: string().optional()
|
|
21838
|
-
})).readonly()
|
|
21839
|
-
});
|
|
21840
|
-
/**
|
|
21841
|
-
* What a LIST of groups carries: the envelope plus what it is MADE OF.
|
|
21842
|
-
*
|
|
21843
|
-
* Coarse on purpose — the operator's rule is "only the rough data on the list,
|
|
21844
|
-
* we extend when we notice we need more". Enough to draw the card ("two people
|
|
21845
|
-
* and a dog") and no more. The MEMBERS, their names and the per-member links
|
|
21846
|
-
* are on {@link getSummary}: shipping every member of every group so a client
|
|
21847
|
-
* can count them turns a page of two hundred groups into a thousand records to
|
|
21848
|
-
* draw two hundred badges.
|
|
21849
|
-
*/
|
|
21850
|
-
var SummaryListItemSchema = object({
|
|
21851
|
-
summary: SummarySchema,
|
|
21852
|
-
/** Class counts, most numerous first; `className: null` is a member whose
|
|
21853
|
-
* class never resolved, counted so the counts add up to `memberCount`. */
|
|
21854
|
-
classes: array(object({
|
|
21855
|
-
className: string().nullable(),
|
|
21856
|
-
count: number().int().positive()
|
|
21857
|
-
})).readonly()
|
|
21858
|
-
});
|
|
21859
|
-
var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
|
|
21860
|
-
/**
|
|
21861
|
-
* The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
|
|
21862
|
-
*
|
|
21863
|
-
* The reel on the cameras page and the Events gallery both ride a cursor, so a
|
|
21864
|
-
* summaries feed that could only answer "the last N for these cameras"
|
|
21865
|
-
* (`listSummaries`) would make groups available in the timeline and nowhere
|
|
21866
|
-
* else. Two feeds with different ordering contracts would be two ideas of what
|
|
21867
|
-
* "newest" means, on one screen.
|
|
21868
|
-
*/
|
|
21869
|
-
var RecentSummariesQueryInput = object({
|
|
21870
|
-
/** Devices to merge. An empty array yields an empty page. */
|
|
21871
|
-
deviceIds: array(number()),
|
|
21872
|
-
/** Window lower bound on `lastActiveAt` (inclusive). */
|
|
21873
|
-
since: number().optional(),
|
|
21874
|
-
/** Window upper bound on `lastActiveAt` (inclusive). */
|
|
21875
|
-
until: number().optional(),
|
|
21876
|
-
limit: number().int().min(1).max(500).default(100),
|
|
21877
|
-
/** Opaque continuation cursor from a previous page's `nextCursor`. */
|
|
21878
|
-
cursor: string().optional(),
|
|
21879
|
-
/**
|
|
21880
|
-
* Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
|
|
21881
|
-
* deliberately the same name: the events filter tree emits one list of ticked
|
|
21882
|
-
* taxonomy nodes, and a summaries feed that called it something else would
|
|
21883
|
-
* make the operator's one filter component produce two shapes.
|
|
21884
|
-
*
|
|
21885
|
-
* A question about the MEMBERS: a group matches when ANY of them does. "Show
|
|
21886
|
-
* me the arrivals with a dog" has to return the group of four people who had
|
|
21887
|
-
* one with them; a filter on the group's own fields could only ever answer
|
|
21888
|
-
* about its primary.
|
|
21889
|
-
*
|
|
21890
|
-
* Matched against all THREE tiers of a member — the class (`animal`), the
|
|
21891
|
-
* sub-class (`dog`) and the instance (a name, a plate) — because which tier a
|
|
21892
|
-
* ticked node lives on is the taxonomy's business, not the caller's. `dog` is
|
|
21893
|
-
* an event kind in the tree and a tier-1 label on an `animal` track; a filter
|
|
21894
|
-
* that read only the class would answer "animal" and never "dog".
|
|
21895
|
-
*
|
|
21896
|
-
* ABSENT or EMPTY means no filter — absent is not a selection of none.
|
|
21897
|
-
*/
|
|
21898
|
-
classes: array(string().min(1).max(60)).max(40).optional()
|
|
21899
|
-
});
|
|
21900
|
-
var RecentSummariesPageSchema = object({
|
|
21901
|
-
/** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
|
|
21902
|
-
* {@link listSummaries} — one list shape, so a card renders the same
|
|
21903
|
-
* whichever feed drew it. */
|
|
21904
|
-
summaries: array(SummaryListItemSchema).readonly(),
|
|
21905
|
-
nextCursor: string().nullable()
|
|
21906
|
-
});
|
|
21907
22403
|
var RecentTracksPageSchema = object({
|
|
21908
22404
|
/** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
|
|
21909
22405
|
tracks: array(TrackSchema).readonly(),
|
|
@@ -22415,7 +22911,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22415
22911
|
classes: array(string()).optional(),
|
|
22416
22912
|
/** See {@link ExcludeSourcesDoc}. */
|
|
22417
22913
|
excludeSources: array(TrackSourceSchema).optional()
|
|
22418
|
-
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(
|
|
22914
|
+
}), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
|
|
22419
22915
|
kind: "mutation",
|
|
22420
22916
|
auth: "admin"
|
|
22421
22917
|
}), 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({
|
|
@@ -22469,7 +22965,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22469
22965
|
trackIds: array(string()).min(1)
|
|
22470
22966
|
}), object({
|
|
22471
22967
|
deleted: number().int(),
|
|
22472
|
-
failed: array(string()).readonly()
|
|
22968
|
+
failed: array(string()).readonly(),
|
|
22969
|
+
sparedMediaIds: array(number().int()).readonly().optional()
|
|
22473
22970
|
}), {
|
|
22474
22971
|
kind: "mutation",
|
|
22475
22972
|
auth: "admin"
|
|
@@ -22478,7 +22975,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
22478
22975
|
deviceId: number(),
|
|
22479
22976
|
trackId: string(),
|
|
22480
22977
|
flags: TrackFlagsPatchSchema
|
|
22481
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
22978
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }), method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }), method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }), method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
22482
22979
|
kind: "query",
|
|
22483
22980
|
auth: "admin"
|
|
22484
22981
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -23635,6 +24132,23 @@ var MotionSourceEnum = _enum([
|
|
|
23635
24132
|
*/
|
|
23636
24133
|
var MotionSourcesSchema = array(MotionSourceEnum);
|
|
23637
24134
|
/**
|
|
24135
|
+
* The operator-facing name of each MOTION source (D672: `onboard` = the
|
|
24136
|
+
* camera's sensors — its own motion plus any sensor attached to it). The wire
|
|
24137
|
+
* value stays `onboard`; only the label changed. `detectionSources: 'onboard'`
|
|
24138
|
+
* ("Camera onboard AI") and the notification source filter keep their labels.
|
|
24139
|
+
*/
|
|
24140
|
+
var MOTION_SOURCE_LABELS = {
|
|
24141
|
+
analyzer: "Frame-diff Analyzer (motion addon)",
|
|
24142
|
+
onboard: "Camera sensors",
|
|
24143
|
+
"device-activity": "Device activity (the device says it is working)"
|
|
24144
|
+
};
|
|
24145
|
+
/** The order the motion-source picker offers them in (not the enum's order). */
|
|
24146
|
+
var MOTION_SOURCE_PICKER_ORDER = [
|
|
24147
|
+
"analyzer",
|
|
24148
|
+
"onboard",
|
|
24149
|
+
"device-activity"
|
|
24150
|
+
];
|
|
24151
|
+
/**
|
|
23638
24152
|
* Which root detector a camera runs — EXACTLY ONE.
|
|
23639
24153
|
*
|
|
23640
24154
|
* Deliberately the SAME vocabulary post-analysis already tags every detection
|
|
@@ -23981,7 +24495,14 @@ var RunnerCameraConfigSchema = object({
|
|
|
23981
24495
|
*/
|
|
23982
24496
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
23983
24497
|
});
|
|
23984
|
-
|
|
24498
|
+
MOTION_SOURCE_PICKER_ORDER.map((value) => value === "onboard" ? {
|
|
24499
|
+
value,
|
|
24500
|
+
label: MOTION_SOURCE_LABELS[value],
|
|
24501
|
+
description: "The camera's own motion, plus any sensor attached to it"
|
|
24502
|
+
} : {
|
|
24503
|
+
value,
|
|
24504
|
+
label: MOTION_SOURCE_LABELS[value]
|
|
24505
|
+
}), motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
23985
24506
|
/**
|
|
23986
24507
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
23987
24508
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -24555,6 +25076,11 @@ var CameraStatusSchema = object({
|
|
|
24555
25076
|
*/
|
|
24556
25077
|
switchedOff: array(CameraSwitchIdSchema).readonly(),
|
|
24557
25078
|
/**
|
|
25079
|
+
* The camera's attached sensors (D672). Optional only for a status composed
|
|
25080
|
+
* by an orchestrator older than D672; this orchestrator always sets it.
|
|
25081
|
+
*/
|
|
25082
|
+
cameraSensors: CameraSensorsStatusSchema.optional(),
|
|
25083
|
+
/**
|
|
24558
25084
|
* Stages of the bounded fan-out that were CUT SHORT — a timeout or a
|
|
24559
25085
|
* rejection — and whose block is therefore `null` because we could not
|
|
24560
25086
|
* READ it, not because there is nothing there.
|
|
@@ -24647,7 +25173,64 @@ var NodeInferenceDevicesSchema = object({
|
|
|
24647
25173
|
reachable: boolean(),
|
|
24648
25174
|
devices: array(NodeInferenceDeviceSchema).readonly()
|
|
24649
25175
|
});
|
|
24650
|
-
|
|
25176
|
+
/**
|
|
25177
|
+
* Pipeline Orchestrator capability — global load balancer + camera dispatcher.
|
|
25178
|
+
*
|
|
25179
|
+
* Lives on the hub. Tracks the camera-to-agent assignment map, listens to
|
|
25180
|
+
* device lifecycle events, queries each runner's capacity + hardware
|
|
25181
|
+
* profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
|
|
25182
|
+
* appropriate runner instances. Persists assignments via the multi-level
|
|
25183
|
+
* settings store so they survive hub restarts.
|
|
25184
|
+
*
|
|
25185
|
+
* Strictly the control plane: never sees a frame, never calls inference,
|
|
25186
|
+
* never drains queues. The runner does that work locally on each agent.
|
|
25187
|
+
*/
|
|
25188
|
+
/**
|
|
25189
|
+
* The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
|
|
25190
|
+
* camera's attached sensors (D672). `config: null` removes the attachment —
|
|
25191
|
+
* the camera reads `not-configured` again, never `unreadable`.
|
|
25192
|
+
*/
|
|
25193
|
+
var SetCameraSensorsInputSchema = object({
|
|
25194
|
+
deviceId: number().int().nonnegative(),
|
|
25195
|
+
/** `null` removes the attachment: the camera goes back to `not-configured`. */
|
|
25196
|
+
config: CameraSensorsConfigSchema.nullable()
|
|
25197
|
+
});
|
|
25198
|
+
/**
|
|
25199
|
+
* Why an early occupancy look (D691) was not scheduled.
|
|
25200
|
+
*
|
|
25201
|
+
* - `unknown-camera` — no session was ever dispatched for it, so there is no
|
|
25202
|
+
* node and no config to attach a burst with.
|
|
25203
|
+
* - `out-of-range` — the ask is negative or further out than the orchestrator
|
|
25204
|
+
* will hold a timer for; the parked-object cadence is the answer there.
|
|
25205
|
+
* - `no-burst-producer` — this build has no burst producer at all.
|
|
25206
|
+
* - `already-looked` — this camera's ONE early look since its last session has
|
|
25207
|
+
* been spent. A look's own burst can re-arm a flickering flip, and a look
|
|
25208
|
+
* per arm would chain a burst every ~30 s forever (review H2); the next
|
|
25209
|
+
* real session re-arms the budget.
|
|
25210
|
+
*/
|
|
25211
|
+
var OccupancyLookRefusalSchema = _enum([
|
|
25212
|
+
"unknown-camera",
|
|
25213
|
+
"out-of-range",
|
|
25214
|
+
"no-burst-producer",
|
|
25215
|
+
"already-looked"
|
|
25216
|
+
]);
|
|
25217
|
+
method(object({
|
|
25218
|
+
deviceId: number().int().nonnegative(),
|
|
25219
|
+
/** How long from NOW until the pending flip's sustain window ends. RELATIVE,
|
|
25220
|
+
* so the caller's clock and the orchestrator's never have to agree. */
|
|
25221
|
+
afterMs: number().finite(),
|
|
25222
|
+
/** Why, for the log. */
|
|
25223
|
+
reason: string()
|
|
25224
|
+
}), object({
|
|
25225
|
+
scheduled: boolean(),
|
|
25226
|
+
/** When `scheduled`: how long until the burst is dialled. */
|
|
25227
|
+
dueInMs: number().optional(),
|
|
25228
|
+
/** When not `scheduled`: why. */
|
|
25229
|
+
refusedBecause: OccupancyLookRefusalSchema.optional()
|
|
25230
|
+
}), {
|
|
25231
|
+
kind: "mutation",
|
|
25232
|
+
auth: "admin"
|
|
25233
|
+
}), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
24651
25234
|
kind: "mutation",
|
|
24652
25235
|
auth: "admin"
|
|
24653
25236
|
}), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
|
|
@@ -24801,7 +25384,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
|
24801
25384
|
}), CameraSwitchGroupSchema, {
|
|
24802
25385
|
kind: "mutation",
|
|
24803
25386
|
auth: "admin"
|
|
24804
|
-
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(
|
|
25387
|
+
}), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
|
|
25388
|
+
kind: "mutation",
|
|
25389
|
+
auth: "admin"
|
|
25390
|
+
}), method(_void(), DiskReconcileJobSchema, {
|
|
24805
25391
|
kind: "mutation",
|
|
24806
25392
|
auth: "admin"
|
|
24807
25393
|
}), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
@@ -27007,219 +27593,6 @@ DeviceType.Camera, method(object({
|
|
|
27007
27593
|
auth: "protected"
|
|
27008
27594
|
});
|
|
27009
27595
|
/**
|
|
27010
|
-
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
27011
|
-
* name (same pattern as `snapshot`):
|
|
27012
|
-
*
|
|
27013
|
-
* - **Native** providers: registered per-device by device-driver
|
|
27014
|
-
* addons via `ctx.registerNativeCap` — either on a
|
|
27015
|
-
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
27016
|
-
* or directly on the camera (Reolink registers at camera level).
|
|
27017
|
-
* Emits an `onPressed` event every time the firmware pushes a
|
|
27018
|
-
* ring; status tracks the last press and a pressCount since start
|
|
27019
|
-
* (diagnostic).
|
|
27020
|
-
*
|
|
27021
|
-
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
27022
|
-
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
27023
|
-
* device (contact / switch / event-emitter …) into a doorbell for
|
|
27024
|
-
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
27025
|
-
* it per camera in the device-bindings UI, then picks the source
|
|
27026
|
-
* device + trigger in the per-device settings.
|
|
27027
|
-
*
|
|
27028
|
-
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
27029
|
-
* — subscribers listening at the camera level receive ring events
|
|
27030
|
-
* with `via[]` populated. No code on the parent needed.
|
|
27031
|
-
*/
|
|
27032
|
-
var DoorbellStatusSchema = object({
|
|
27033
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
27034
|
-
lastPressedAt: number().nullable(),
|
|
27035
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
27036
|
-
pressCountSinceStart: number()
|
|
27037
|
-
});
|
|
27038
|
-
var DoorbellPressEventSchema = object({
|
|
27039
|
-
deviceId: number(),
|
|
27040
|
-
timestamp: number()
|
|
27041
|
-
});
|
|
27042
|
-
/**
|
|
27043
|
-
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
27044
|
-
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
27045
|
-
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
27046
|
-
*/
|
|
27047
|
-
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
27048
|
-
/**
|
|
27049
|
-
* The `doorbell-source` slot — which devices ring this camera's VIRTUAL
|
|
27050
|
-
* doorbell, owned by the `virtual-doorbell` wrapper over its
|
|
27051
|
-
* `doorbellSources` store (D648). A source rings when one of its
|
|
27052
|
-
* `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
|
|
27053
|
-
* different authority (`deviceManager.setWrapperActive`, D62) — the slot
|
|
27054
|
-
* reports it, it never writes it.
|
|
27055
|
-
*/
|
|
27056
|
-
var DOORBELL_SOURCE_SLOT = {
|
|
27057
|
-
id: "doorbell-source",
|
|
27058
|
-
label: "Doorbell trigger devices",
|
|
27059
|
-
description: "Any of these becoming active rings this camera's virtual doorbell: a binary sensor when it goes active, a switch when it turns on.",
|
|
27060
|
-
shape: "association",
|
|
27061
|
-
hostDeviceTypes: [DeviceType.Camera],
|
|
27062
|
-
sourceCaps: SOURCE_CAPS,
|
|
27063
|
-
cardinality: "many",
|
|
27064
|
-
value: DoorbellSourceSlotValueSchema
|
|
27065
|
-
};
|
|
27066
|
-
var doorbellCapability = {
|
|
27067
|
-
name: "doorbell",
|
|
27068
|
-
scope: "device",
|
|
27069
|
-
deviceNative: true,
|
|
27070
|
-
mode: "singleton",
|
|
27071
|
-
kind: "wrapper",
|
|
27072
|
-
defaultActive: false,
|
|
27073
|
-
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
27074
|
-
extensionSlots: [DOORBELL_SOURCE_SLOT],
|
|
27075
|
-
methods: {},
|
|
27076
|
-
events: {
|
|
27077
|
-
/**
|
|
27078
|
-
* Fires once per physical press. Reolink delivers via Baichuan
|
|
27079
|
-
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
27080
|
-
* release/duration — it's a pulse.
|
|
27081
|
-
*/
|
|
27082
|
-
onPressed: {
|
|
27083
|
-
data: DoorbellPressEventSchema,
|
|
27084
|
-
fromState: {
|
|
27085
|
-
field: "lastPressedAt",
|
|
27086
|
-
on: "advance"
|
|
27087
|
-
}
|
|
27088
|
-
} },
|
|
27089
|
-
status: {
|
|
27090
|
-
schema: DoorbellStatusSchema,
|
|
27091
|
-
kind: "push"
|
|
27092
|
-
},
|
|
27093
|
-
/**
|
|
27094
|
-
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
27095
|
-
* Mirrored by the kernel and readable via
|
|
27096
|
-
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
27097
|
-
* without subscribing.
|
|
27098
|
-
*/
|
|
27099
|
-
runtimeState: DoorbellStatusSchema,
|
|
27100
|
-
/**
|
|
27101
|
-
* Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
|
|
27102
|
-
*
|
|
27103
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
27104
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
27105
|
-
*/
|
|
27106
|
-
durability: "restored"
|
|
27107
|
-
};
|
|
27108
|
-
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
27109
|
-
DeviceType.Camera, DeviceType.Camera;
|
|
27110
|
-
/** A slot's editable value, discriminated on `slot`. */
|
|
27111
|
-
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
27112
|
-
DeviceType.Camera;
|
|
27113
|
-
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
27114
|
-
state: literal("unreachable"),
|
|
27115
|
-
reason: string()
|
|
27116
|
-
})]);
|
|
27117
|
-
/** One provider of slots — the D554 source-listing row. */
|
|
27118
|
-
var ExtensionSourceSchema = object({
|
|
27119
|
-
/** The routing prefix of every `slotRef` this provider serves. */
|
|
27120
|
-
source: string(),
|
|
27121
|
-
label: string(),
|
|
27122
|
-
/** Stamped by the dispatcher from the registry (D557). */
|
|
27123
|
-
addonId: string().optional(),
|
|
27124
|
-
availability: ExtensionSourceAvailabilitySchema
|
|
27125
|
-
});
|
|
27126
|
-
/**
|
|
27127
|
-
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
27128
|
-
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
27129
|
-
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
27130
|
-
* valid source now (a container, which is never a pick). A source in any of
|
|
27131
|
-
* these states is SHOWN, never silently dropped or re-pointed.
|
|
27132
|
-
*/
|
|
27133
|
-
var ExtensionSourceHealthSchema = _enum([
|
|
27134
|
-
"ok",
|
|
27135
|
-
"missing",
|
|
27136
|
-
"foreign",
|
|
27137
|
-
"unavailable"
|
|
27138
|
-
]);
|
|
27139
|
-
var ExtensionSlotSourceSchema = object({
|
|
27140
|
-
deviceId: number().int(),
|
|
27141
|
-
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
27142
|
-
name: string().nullable(),
|
|
27143
|
-
health: ExtensionSourceHealthSchema,
|
|
27144
|
-
detail: string().optional()
|
|
27145
|
-
});
|
|
27146
|
-
/**
|
|
27147
|
-
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
27148
|
-
* reported read-only, named, never written through this contract (D62). The
|
|
27149
|
-
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
27150
|
-
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
27151
|
-
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
27152
|
-
*/
|
|
27153
|
-
var ExtensionSlotActivationSchema = object({
|
|
27154
|
-
state: _enum([
|
|
27155
|
-
"active",
|
|
27156
|
-
"inactive",
|
|
27157
|
-
"unknown"
|
|
27158
|
-
]),
|
|
27159
|
-
authority: string(),
|
|
27160
|
-
detail: string().optional()
|
|
27161
|
-
});
|
|
27162
|
-
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
27163
|
-
state: literal("ok"),
|
|
27164
|
-
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
27165
|
-
slotRef: string(),
|
|
27166
|
-
slot: ExtensionSlotIdSchema,
|
|
27167
|
-
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
27168
|
-
authority: string(),
|
|
27169
|
-
activation: ExtensionSlotActivationSchema.nullable(),
|
|
27170
|
-
value: ExtensionSlotValueSchema,
|
|
27171
|
-
sources: array(ExtensionSlotSourceSchema),
|
|
27172
|
-
/**
|
|
27173
|
-
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
27174
|
-
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
27175
|
-
* the child a picked container stands for (D356 — a container is never a
|
|
27176
|
-
* pick, its children are). Read-only; the editor shows them and may offer
|
|
27177
|
-
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
27178
|
-
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
27179
|
-
* older than D655.
|
|
27180
|
-
*/
|
|
27181
|
-
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
27182
|
-
}), object({
|
|
27183
|
-
state: literal("unreachable"),
|
|
27184
|
-
addonId: string(),
|
|
27185
|
-
reason: string()
|
|
27186
|
-
})]);
|
|
27187
|
-
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
27188
|
-
deviceId: number().int(),
|
|
27189
|
-
name: string(),
|
|
27190
|
-
type: string(),
|
|
27191
|
-
location: string().nullable(),
|
|
27192
|
-
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
27193
|
-
parentName: string().nullable(),
|
|
27194
|
-
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
27195
|
-
suggested: boolean(),
|
|
27196
|
-
/** Why it is suggested ("same location"), null when it is not. */
|
|
27197
|
-
reason: string().nullable()
|
|
27198
|
-
})) });
|
|
27199
|
-
/**
|
|
27200
|
-
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
27201
|
-
* reloaded the host (or, for an accessory child, its parent) because the
|
|
27202
|
-
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
27203
|
-
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
27204
|
-
*/
|
|
27205
|
-
var ExtensionSetResultSchema = object({
|
|
27206
|
-
applied: literal(true),
|
|
27207
|
-
reload: _enum([
|
|
27208
|
-
"none",
|
|
27209
|
-
"host",
|
|
27210
|
-
"parent"
|
|
27211
|
-
])
|
|
27212
|
-
});
|
|
27213
|
-
var ExtensionSlotRefInputSchema = object({
|
|
27214
|
-
deviceId: number().int(),
|
|
27215
|
-
slotRef: string().min(1)
|
|
27216
|
-
});
|
|
27217
|
-
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
27218
|
-
method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
27219
|
-
kind: "mutation",
|
|
27220
|
-
auth: "admin"
|
|
27221
|
-
});
|
|
27222
|
-
/**
|
|
27223
27596
|
* Optional client-side hints sent at session creation to help the provider
|
|
27224
27597
|
* pick the best native source. All fields optional — a viewer that knows
|
|
27225
27598
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -31893,7 +32266,9 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
31893
32266
|
detected: boolean(),
|
|
31894
32267
|
timestamp: number(),
|
|
31895
32268
|
source: MotionSourceEnum,
|
|
31896
|
-
regions: array(MotionRegionSchema).readonly().optional()
|
|
32269
|
+
regions: array(MotionRegionSchema).readonly().optional(),
|
|
32270
|
+
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
32271
|
+
triggeredBy: MotionTriggeredBySchema.optional()
|
|
31897
32272
|
});
|
|
31898
32273
|
var motionCapability = {
|
|
31899
32274
|
name: "motion",
|
|
@@ -38383,47 +38758,6 @@ var zoneRulesCapability = {
|
|
|
38383
38758
|
*/
|
|
38384
38759
|
durability: "restored"
|
|
38385
38760
|
};
|
|
38386
|
-
var NUMBER = {
|
|
38387
|
-
kind: "fixed",
|
|
38388
|
-
result: ["number"]
|
|
38389
|
-
};
|
|
38390
|
-
var BOOLEAN = {
|
|
38391
|
-
kind: "fixed",
|
|
38392
|
-
result: ["boolean"]
|
|
38393
|
-
};
|
|
38394
|
-
Object.freeze({
|
|
38395
|
-
min: NUMBER,
|
|
38396
|
-
max: NUMBER,
|
|
38397
|
-
abs: NUMBER,
|
|
38398
|
-
floor: NUMBER,
|
|
38399
|
-
ceil: NUMBER,
|
|
38400
|
-
sqrt: NUMBER,
|
|
38401
|
-
round: NUMBER,
|
|
38402
|
-
pow: NUMBER,
|
|
38403
|
-
clamp: NUMBER,
|
|
38404
|
-
avg: NUMBER,
|
|
38405
|
-
sum: NUMBER,
|
|
38406
|
-
age: NUMBER,
|
|
38407
|
-
convert: NUMBER,
|
|
38408
|
-
coalesce: { kind: "coalesce" },
|
|
38409
|
-
any: BOOLEAN,
|
|
38410
|
-
all: BOOLEAN,
|
|
38411
|
-
within: BOOLEAN,
|
|
38412
|
-
latest: {
|
|
38413
|
-
kind: "fixed",
|
|
38414
|
-
result: ["number", "null"]
|
|
38415
|
-
},
|
|
38416
|
-
number: {
|
|
38417
|
-
kind: "fixed",
|
|
38418
|
-
result: ["number", "null"]
|
|
38419
|
-
},
|
|
38420
|
-
rose: {
|
|
38421
|
-
kind: "fixed",
|
|
38422
|
-
result: ["number", "null"]
|
|
38423
|
-
},
|
|
38424
|
-
count: NUMBER
|
|
38425
|
-
});
|
|
38426
|
-
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
38427
38761
|
/**
|
|
38428
38762
|
* Accessory device helpers — shared across drivers.
|
|
38429
38763
|
*
|
|
@@ -42369,6 +42703,12 @@ Object.freeze({
|
|
|
42369
42703
|
addonId: null,
|
|
42370
42704
|
access: "view"
|
|
42371
42705
|
},
|
|
42706
|
+
"coreBlocks.listComposableCaps": {
|
|
42707
|
+
capName: "core-blocks",
|
|
42708
|
+
capScope: "system",
|
|
42709
|
+
addonId: null,
|
|
42710
|
+
access: "view"
|
|
42711
|
+
},
|
|
42372
42712
|
"coreBlocks.listCompositions": {
|
|
42373
42713
|
capName: "core-blocks",
|
|
42374
42714
|
capScope: "system",
|
|
@@ -42447,6 +42787,18 @@ Object.freeze({
|
|
|
42447
42787
|
addonId: null,
|
|
42448
42788
|
access: "view"
|
|
42449
42789
|
},
|
|
42790
|
+
"databaseSnapshot.listDatabases": {
|
|
42791
|
+
capName: "database-snapshot",
|
|
42792
|
+
capScope: "system",
|
|
42793
|
+
addonId: null,
|
|
42794
|
+
access: "view"
|
|
42795
|
+
},
|
|
42796
|
+
"databaseSnapshot.writeSnapshot": {
|
|
42797
|
+
capName: "database-snapshot",
|
|
42798
|
+
capScope: "system",
|
|
42799
|
+
addonId: null,
|
|
42800
|
+
access: "create"
|
|
42801
|
+
},
|
|
42450
42802
|
"dataStoreProvider.aggregate": {
|
|
42451
42803
|
capName: "data-store-provider",
|
|
42452
42804
|
capScope: "system",
|
|
@@ -45183,6 +45535,12 @@ Object.freeze({
|
|
|
45183
45535
|
addonId: null,
|
|
45184
45536
|
access: "create"
|
|
45185
45537
|
},
|
|
45538
|
+
"pipelineAnalytics.clearTrackRelation": {
|
|
45539
|
+
capName: "pipeline-analytics",
|
|
45540
|
+
capScope: "device",
|
|
45541
|
+
addonId: null,
|
|
45542
|
+
access: "delete"
|
|
45543
|
+
},
|
|
45186
45544
|
"pipelineAnalytics.clearTracks": {
|
|
45187
45545
|
capName: "pipeline-analytics",
|
|
45188
45546
|
capScope: "device",
|
|
@@ -45339,12 +45697,6 @@ Object.freeze({
|
|
|
45339
45697
|
addonId: null,
|
|
45340
45698
|
access: "view"
|
|
45341
45699
|
},
|
|
45342
|
-
"pipelineAnalytics.getSummary": {
|
|
45343
|
-
capName: "pipeline-analytics",
|
|
45344
|
-
capScope: "device",
|
|
45345
|
-
addonId: null,
|
|
45346
|
-
access: "view"
|
|
45347
|
-
},
|
|
45348
45700
|
"pipelineAnalytics.getTrack": {
|
|
45349
45701
|
capName: "pipeline-analytics",
|
|
45350
45702
|
capScope: "device",
|
|
@@ -45405,12 +45757,6 @@ Object.freeze({
|
|
|
45405
45757
|
addonId: null,
|
|
45406
45758
|
access: "view"
|
|
45407
45759
|
},
|
|
45408
|
-
"pipelineAnalytics.listRecentSummaries": {
|
|
45409
|
-
capName: "pipeline-analytics",
|
|
45410
|
-
capScope: "device",
|
|
45411
|
-
addonId: null,
|
|
45412
|
-
access: "view"
|
|
45413
|
-
},
|
|
45414
45760
|
"pipelineAnalytics.listRecentTracks": {
|
|
45415
45761
|
capName: "pipeline-analytics",
|
|
45416
45762
|
capScope: "device",
|
|
@@ -45441,13 +45787,13 @@ Object.freeze({
|
|
|
45441
45787
|
addonId: null,
|
|
45442
45788
|
access: "view"
|
|
45443
45789
|
},
|
|
45444
|
-
"pipelineAnalytics.
|
|
45790
|
+
"pipelineAnalytics.listTrackMedia": {
|
|
45445
45791
|
capName: "pipeline-analytics",
|
|
45446
45792
|
capScope: "device",
|
|
45447
45793
|
addonId: null,
|
|
45448
45794
|
access: "view"
|
|
45449
45795
|
},
|
|
45450
|
-
"pipelineAnalytics.
|
|
45796
|
+
"pipelineAnalytics.listTrackRelations": {
|
|
45451
45797
|
capName: "pipeline-analytics",
|
|
45452
45798
|
capScope: "device",
|
|
45453
45799
|
addonId: null,
|
|
@@ -45567,6 +45913,18 @@ Object.freeze({
|
|
|
45567
45913
|
addonId: null,
|
|
45568
45914
|
access: "create"
|
|
45569
45915
|
},
|
|
45916
|
+
"pipelineAnalytics.setTrackPurity": {
|
|
45917
|
+
capName: "pipeline-analytics",
|
|
45918
|
+
capScope: "device",
|
|
45919
|
+
addonId: null,
|
|
45920
|
+
access: "create"
|
|
45921
|
+
},
|
|
45922
|
+
"pipelineAnalytics.setTrackRelation": {
|
|
45923
|
+
capName: "pipeline-analytics",
|
|
45924
|
+
capScope: "device",
|
|
45925
|
+
addonId: null,
|
|
45926
|
+
access: "create"
|
|
45927
|
+
},
|
|
45570
45928
|
"pipelineAnalytics.startStorageMigrationMove": {
|
|
45571
45929
|
capName: "pipeline-analytics",
|
|
45572
45930
|
capScope: "device",
|
|
@@ -46005,6 +46363,12 @@ Object.freeze({
|
|
|
46005
46363
|
addonId: null,
|
|
46006
46364
|
access: "delete"
|
|
46007
46365
|
},
|
|
46366
|
+
"pipelineOrchestrator.requestOccupancyLook": {
|
|
46367
|
+
capName: "pipeline-orchestrator",
|
|
46368
|
+
capScope: "system",
|
|
46369
|
+
addonId: null,
|
|
46370
|
+
access: "create"
|
|
46371
|
+
},
|
|
46008
46372
|
"pipelineOrchestrator.resetNodePipelineDefaults": {
|
|
46009
46373
|
capName: "pipeline-orchestrator",
|
|
46010
46374
|
capScope: "system",
|
|
@@ -46071,6 +46435,12 @@ Object.freeze({
|
|
|
46071
46435
|
addonId: null,
|
|
46072
46436
|
access: "create"
|
|
46073
46437
|
},
|
|
46438
|
+
"pipelineOrchestrator.setCameraSensors": {
|
|
46439
|
+
capName: "pipeline-orchestrator",
|
|
46440
|
+
capScope: "system",
|
|
46441
|
+
addonId: null,
|
|
46442
|
+
access: "create"
|
|
46443
|
+
},
|
|
46074
46444
|
"pipelineOrchestrator.setCameraStepOverride": {
|
|
46075
46445
|
capName: "pipeline-orchestrator",
|
|
46076
46446
|
capScope: "system",
|
|
@@ -49481,6 +49851,11 @@ Object.freeze({
|
|
|
49481
49851
|
form: "single",
|
|
49482
49852
|
optional: false
|
|
49483
49853
|
}],
|
|
49854
|
+
"pipelineAnalytics.clearTrackRelation": [{
|
|
49855
|
+
name: "deviceId",
|
|
49856
|
+
form: "single",
|
|
49857
|
+
optional: false
|
|
49858
|
+
}],
|
|
49484
49859
|
"pipelineAnalytics.clearTracks": [{
|
|
49485
49860
|
name: "deviceId",
|
|
49486
49861
|
form: "single",
|
|
@@ -49616,11 +49991,6 @@ Object.freeze({
|
|
|
49616
49991
|
form: "single",
|
|
49617
49992
|
optional: true
|
|
49618
49993
|
}],
|
|
49619
|
-
"pipelineAnalytics.listRecentSummaries": [{
|
|
49620
|
-
name: "deviceIds",
|
|
49621
|
-
form: "array",
|
|
49622
|
-
optional: false
|
|
49623
|
-
}],
|
|
49624
49994
|
"pipelineAnalytics.listRecentTracks": [{
|
|
49625
49995
|
name: "deviceIds",
|
|
49626
49996
|
form: "array",
|
|
@@ -49631,12 +50001,12 @@ Object.freeze({
|
|
|
49631
50001
|
form: "array",
|
|
49632
50002
|
optional: true
|
|
49633
50003
|
}],
|
|
49634
|
-
"pipelineAnalytics.
|
|
49635
|
-
name: "
|
|
49636
|
-
form: "
|
|
50004
|
+
"pipelineAnalytics.listTrackMedia": [{
|
|
50005
|
+
name: "deviceId",
|
|
50006
|
+
form: "single",
|
|
49637
50007
|
optional: false
|
|
49638
50008
|
}],
|
|
49639
|
-
"pipelineAnalytics.
|
|
50009
|
+
"pipelineAnalytics.listTrackRelations": [{
|
|
49640
50010
|
name: "deviceId",
|
|
49641
50011
|
form: "single",
|
|
49642
50012
|
optional: false
|
|
@@ -49711,6 +50081,16 @@ Object.freeze({
|
|
|
49711
50081
|
form: "single",
|
|
49712
50082
|
optional: false
|
|
49713
50083
|
}],
|
|
50084
|
+
"pipelineAnalytics.setTrackPurity": [{
|
|
50085
|
+
name: "deviceId",
|
|
50086
|
+
form: "single",
|
|
50087
|
+
optional: false
|
|
50088
|
+
}],
|
|
50089
|
+
"pipelineAnalytics.setTrackRelation": [{
|
|
50090
|
+
name: "deviceId",
|
|
50091
|
+
form: "single",
|
|
50092
|
+
optional: false
|
|
50093
|
+
}],
|
|
49714
50094
|
"pipelineAnalytics.wipeAllAnalytics": [{
|
|
49715
50095
|
name: "deviceId",
|
|
49716
50096
|
form: "single",
|
|
@@ -49781,6 +50161,11 @@ Object.freeze({
|
|
|
49781
50161
|
form: "single",
|
|
49782
50162
|
optional: false
|
|
49783
50163
|
}],
|
|
50164
|
+
"pipelineOrchestrator.requestOccupancyLook": [{
|
|
50165
|
+
name: "deviceId",
|
|
50166
|
+
form: "single",
|
|
50167
|
+
optional: false
|
|
50168
|
+
}],
|
|
49784
50169
|
"pipelineOrchestrator.resolvePipeline": [{
|
|
49785
50170
|
name: "deviceId",
|
|
49786
50171
|
form: "single",
|
|
@@ -49791,6 +50176,11 @@ Object.freeze({
|
|
|
49791
50176
|
form: "single",
|
|
49792
50177
|
optional: false
|
|
49793
50178
|
}],
|
|
50179
|
+
"pipelineOrchestrator.setCameraSensors": [{
|
|
50180
|
+
name: "deviceId",
|
|
50181
|
+
form: "single",
|
|
50182
|
+
optional: false
|
|
50183
|
+
}],
|
|
49794
50184
|
"pipelineOrchestrator.setCameraStepOverride": [{
|
|
49795
50185
|
name: "deviceId",
|
|
49796
50186
|
form: "single",
|
|
@@ -50937,6 +51327,18 @@ var STATE_SUMMARY_VARS = [
|
|
|
50937
51327
|
systemEventKinds: [...SUMMARISABLE],
|
|
50938
51328
|
systemEventDeliveries: ["summary"]
|
|
50939
51329
|
},
|
|
51330
|
+
{
|
|
51331
|
+
name: "summarySection",
|
|
51332
|
+
label: "Summary: this section",
|
|
51333
|
+
description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
|
|
51334
|
+
example: "Batterie scariche",
|
|
51335
|
+
group: "system",
|
|
51336
|
+
families: ["rule"],
|
|
51337
|
+
fields: [...RULE_TEXT],
|
|
51338
|
+
kinds: ["system"],
|
|
51339
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
51340
|
+
systemEventDeliveries: ["summary"]
|
|
51341
|
+
},
|
|
50940
51342
|
...STATE_SUMMARY_SECTION_VARS.map((v) => ({
|
|
50941
51343
|
name: v.name,
|
|
50942
51344
|
label: v.label,
|
|
@@ -51013,6 +51415,37 @@ var STATE_SUMMARY_VARS = [
|
|
|
51013
51415
|
[...RULE_TEXT],
|
|
51014
51416
|
...STATE_SUMMARY_VARS
|
|
51015
51417
|
];
|
|
51418
|
+
new Set([
|
|
51419
|
+
"disarmed",
|
|
51420
|
+
"armed_home",
|
|
51421
|
+
"armed_away",
|
|
51422
|
+
"armed_night",
|
|
51423
|
+
"armed_vacation",
|
|
51424
|
+
"armed_custom_bypass",
|
|
51425
|
+
"arming",
|
|
51426
|
+
"disarming",
|
|
51427
|
+
"pending",
|
|
51428
|
+
"triggered",
|
|
51429
|
+
"open",
|
|
51430
|
+
"opening",
|
|
51431
|
+
"closing",
|
|
51432
|
+
"closed",
|
|
51433
|
+
"stopped",
|
|
51434
|
+
"locked",
|
|
51435
|
+
"unlocked",
|
|
51436
|
+
"locking",
|
|
51437
|
+
"unlocking",
|
|
51438
|
+
"jammed",
|
|
51439
|
+
"on",
|
|
51440
|
+
"off",
|
|
51441
|
+
"home",
|
|
51442
|
+
"not_home",
|
|
51443
|
+
"matched",
|
|
51444
|
+
"diverged",
|
|
51445
|
+
"unknown",
|
|
51446
|
+
"latched",
|
|
51447
|
+
"live"
|
|
51448
|
+
]);
|
|
51016
51449
|
/**
|
|
51017
51450
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
51018
51451
|
*
|
|
@@ -75143,6 +75576,20 @@ var COLD_MOTION = {
|
|
|
75143
75576
|
lastDetectedAt: null,
|
|
75144
75577
|
autoClearAfterMs: null
|
|
75145
75578
|
};
|
|
75579
|
+
/**
|
|
75580
|
+
* The motion seed a constructor writes OVER the slice hydrated from the
|
|
75581
|
+
* persisted runtime state. The level is a placeholder (`false`) until the
|
|
75582
|
+
* CCU says otherwise, but a stored rise is a fact: `lastDetectedAt: null`
|
|
75583
|
+
* means "never detected" (`motion.cap.ts`), and a restart must not turn
|
|
75584
|
+
* "fired an hour ago" into that.
|
|
75585
|
+
*/
|
|
75586
|
+
function coldMotionKeepingRise(stored) {
|
|
75587
|
+
const rise = stored?.lastDetectedAt;
|
|
75588
|
+
return {
|
|
75589
|
+
...COLD_MOTION,
|
|
75590
|
+
lastDetectedAt: typeof rise === "number" && Number.isFinite(rise) && rise > 0 ? rise : null
|
|
75591
|
+
};
|
|
75592
|
+
}
|
|
75146
75593
|
var COLD_CLIMATE = {
|
|
75147
75594
|
mode: "auto",
|
|
75148
75595
|
availableModes: [...[
|
|
@@ -76692,7 +77139,7 @@ var HmSensorDevice = class extends HmChildDevice {
|
|
|
76692
77139
|
getStatus: async () => this.runtimeState.getCapState("motion") ?? COLD_MOTION,
|
|
76693
77140
|
isDetected: async () => (this.runtimeState.getCapState("motion") ?? COLD_MOTION).detected
|
|
76694
77141
|
});
|
|
76695
|
-
this.runtimeState.setCapState("motion",
|
|
77142
|
+
this.runtimeState.setCapState("motion", coldMotionKeepingRise(this.runtimeState.getCapState("motion")));
|
|
76696
77143
|
}
|
|
76697
77144
|
handleValueChanged(event, origin) {
|
|
76698
77145
|
const now = event.ts || Date.now();
|
|
@@ -77729,4 +78176,4 @@ var HomematicProviderAddon = class extends BaseDeviceProvider {
|
|
|
77729
78176
|
}
|
|
77730
78177
|
};
|
|
77731
78178
|
//#endregion
|
|
77732
|
-
export {
|
|
78179
|
+
export { object as A, deviceAdminLinkCapability as C, switchCapability as D, motionCapability as E, HomematicProviderAddon, EventCategory as M, DeviceType as O, coverCapability as S, lockControlCapability as T, homematicConfigSchema as _, decodeClimate as a, buildDeviceAdminUrl as b, toHmClimateMode as c, inferHmDeviceType as d, mapHmChannel as f, homematicAddonConfigSchema as g, buildConnectionFormSchema as h, registerTemperatureCap as i, string as j, createEvent as k, deriveHmEntitySpecs as l, homematicFacades as m, registerHumidityCap as n, decodeCover as o, mapHmDeviceChannels as p, registerPowerMeterCap as r, decodeLock as s, registerAmbientLightCap as t, coldMotionKeepingRise as u, toHomematicOptions as v, eventEmitterCapability as w, climateControlCapability as x, BaseDevice as y };
|