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