@camstack/addon-osd-manager 0.1.150 → 0.1.152
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/{MotionZonesSettings-BsoHRAwv.mjs → MotionZonesSettings-D5c6b4QP.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-CzteSZYz.mjs → PrivacyMaskSettings-DMve7K-c.mjs} +4 -4
- package/dist/{SceneMonitorEditor-lNMMCYld.mjs → SceneMonitorEditor-e1z_C79o.mjs} +3 -3
- package/dist/_stub.js +143 -143
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-c-xC4wkm.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-C8rKpVdZ.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DQC5oc2I.mjs +26 -0
- package/dist/{hostInit-Dt8cFobm.mjs → hostInit-B8_o5hJj.mjs} +3 -3
- package/dist/index.js +580 -332
- package/dist/index.mjs +580 -332
- package/dist/{player-overlays-DXCWBCD_.mjs → player-overlays-BchlNvHO.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-CyswsC7o.mjs → responsive-DRZ6VoYV.mjs} +1 -1
- package/dist/{scene-monitor-copy-BVg1hi48.mjs → scene-monitor-copy-CmtMsrJb.mjs} +1 -1
- package/dist/{square-B7BGSM9i.mjs → square-BYLYL5VB.mjs} +1 -1
- package/dist/{trash-2-CuhyORxB.mjs → trash-2-BdEqSrHt.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CbJBbGRZ.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-p2S4DkBF.mjs} +1 -1
- package/package.json +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B5zRUNv0.mjs +0 -26
package/dist/index.mjs
CHANGED
|
@@ -11897,6 +11897,103 @@ var authProviderCapability = {
|
|
|
11897
11897
|
mount: { kind: "skip" }
|
|
11898
11898
|
};
|
|
11899
11899
|
/**
|
|
11900
|
+
* How long one snapshot may take end to end: the pinned copy of the whole
|
|
11901
|
+
* database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
|
|
11902
|
+
* disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
|
|
11903
|
+
* generous because a timeout fails the whole backup run.
|
|
11904
|
+
*/
|
|
11905
|
+
var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
|
|
11906
|
+
/**
|
|
11907
|
+
* The databases an owner snapshots — declared by the OWNER, so a caller never
|
|
11908
|
+
* guesses which file is live from what sits beside it (a cleanly closed
|
|
11909
|
+
* database has no sidecars and is just as owned). Paths are absolute on the
|
|
11910
|
+
* owner's host.
|
|
11911
|
+
*/
|
|
11912
|
+
var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
|
|
11913
|
+
/** One b-tree table of the snapshot and the rows it holds. */
|
|
11914
|
+
var DatabaseSnapshotTableSchema = object({
|
|
11915
|
+
name: string(),
|
|
11916
|
+
rows: number().int().nonnegative()
|
|
11917
|
+
});
|
|
11918
|
+
/**
|
|
11919
|
+
* What the owner wrote. Every path is ABSOLUTE on the owner's host — the
|
|
11920
|
+
* caller pins the call to its own node, so it can read the file; a caller
|
|
11921
|
+
* that finds the path outside its own data root refuses it rather than
|
|
11922
|
+
* archiving something it cannot place.
|
|
11923
|
+
*/
|
|
11924
|
+
var DatabaseSnapshotResultSchema = object({
|
|
11925
|
+
/** The live database the snapshot copies. Never to be copied as a file. */
|
|
11926
|
+
livePath: string(),
|
|
11927
|
+
/** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
|
|
11928
|
+
snapshotPath: string(),
|
|
11929
|
+
sizeBytes: number().int().nonnegative(),
|
|
11930
|
+
pageCount: number().int().nonnegative(),
|
|
11931
|
+
pageSize: number().int().positive(),
|
|
11932
|
+
/**
|
|
11933
|
+
* Every b-tree table with its row count. Read inside the SAME read
|
|
11934
|
+
* transaction the copy was taken from, and found EQUAL on the copy — so
|
|
11935
|
+
* this is the content of the snapshot, not an estimate of the source.
|
|
11936
|
+
*/
|
|
11937
|
+
tables: array(DatabaseSnapshotTableSchema),
|
|
11938
|
+
/** Wall time of the pinned copy (row counts included). */
|
|
11939
|
+
copyMs: number().nonnegative(),
|
|
11940
|
+
/** Wall time of the checks on the copy (`integrity_check`, row counts). */
|
|
11941
|
+
verifyMs: number().nonnegative(),
|
|
11942
|
+
/** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
|
|
11943
|
+
takenAt: number()
|
|
11944
|
+
});
|
|
11945
|
+
/**
|
|
11946
|
+
* A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
|
|
11947
|
+
* the same facts, with both paths relative to the archive root (the node's
|
|
11948
|
+
* data dir), because an archive outlives the host that made it.
|
|
11949
|
+
*/
|
|
11950
|
+
var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
|
|
11951
|
+
/** Archive-relative path of the live database the archive does NOT carry. */
|
|
11952
|
+
livePath: string(),
|
|
11953
|
+
/** Archive-relative path of the verified copy it carries in its place. */
|
|
11954
|
+
snapshotPath: string()
|
|
11955
|
+
});
|
|
11956
|
+
/**
|
|
11957
|
+
* database-snapshot — the OWNER of a live SQLite database writes a consistent,
|
|
11958
|
+
* verified copy of it (D693).
|
|
11959
|
+
*
|
|
11960
|
+
* A live database cannot be copied as files: three files written by a live
|
|
11961
|
+
* process cannot be read at one instant from outside it, and a tar of the
|
|
11962
|
+
* `.db` / `-wal` / `-shm` trio was measured torn in 6/6 archives (D679). Nor may
|
|
11963
|
+
* another process open it (D679 rule 2). So the process that owns the
|
|
11964
|
+
* connection writes the copy — through its own connection, on a thread,
|
|
11965
|
+
* pinned to one read transaction — and checks it before handing it out.
|
|
11966
|
+
*
|
|
11967
|
+
* Hub-only and internal: `sqlite-settings` is the registrant, and its consumer
|
|
11968
|
+
* is `backup-orchestrator`, which calls it pinned to its own node so the path
|
|
11969
|
+
* it gets back is on its own host. `auth: 'admin'` explicitly — `internal`
|
|
11970
|
+
* does not gate the mount (see `data-store-provider`).
|
|
11971
|
+
*/
|
|
11972
|
+
var databaseSnapshotCapability = {
|
|
11973
|
+
name: "database-snapshot",
|
|
11974
|
+
scope: "system",
|
|
11975
|
+
mode: "singleton",
|
|
11976
|
+
internal: true,
|
|
11977
|
+
methods: {
|
|
11978
|
+
/**
|
|
11979
|
+
* Which databases this owner snapshots. Answered from memory — no file is
|
|
11980
|
+
* touched — so a backup can ask it before deciding anything.
|
|
11981
|
+
*/
|
|
11982
|
+
listDatabases: method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }),
|
|
11983
|
+
/**
|
|
11984
|
+
* Write `<db>.backup-snapshot` and return what it holds. Throws — and
|
|
11985
|
+
* leaves no file under the final name — when the copy fails
|
|
11986
|
+
* `integrity_check` or its row counts differ from the pinned source's.
|
|
11987
|
+
* A second call while one is running joins it.
|
|
11988
|
+
*/
|
|
11989
|
+
writeSnapshot: method(object({}), DatabaseSnapshotResultSchema, {
|
|
11990
|
+
kind: "mutation",
|
|
11991
|
+
auth: "admin",
|
|
11992
|
+
timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
|
|
11993
|
+
})
|
|
11994
|
+
}
|
|
11995
|
+
};
|
|
11996
|
+
/**
|
|
11900
11997
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
11901
11998
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
11902
11999
|
* (admin UI, restore flow) see one canonical key.
|
|
@@ -12007,7 +12104,12 @@ var ArchiveManifestSchema = object({
|
|
|
12007
12104
|
locations: array(string()),
|
|
12008
12105
|
entries: array(ArchiveEntrySchema),
|
|
12009
12106
|
totalBytes: number(),
|
|
12010
|
-
totalFiles: number()
|
|
12107
|
+
totalFiles: number(),
|
|
12108
|
+
/**
|
|
12109
|
+
* Live SQLite databases this archive carries as their OWNER's verified
|
|
12110
|
+
* snapshot instead of as files (D693). Absent on archives made before.
|
|
12111
|
+
*/
|
|
12112
|
+
sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
|
|
12011
12113
|
});
|
|
12012
12114
|
var LocationStatSchema = object({
|
|
12013
12115
|
name: string(),
|
|
@@ -13975,6 +14077,65 @@ var CompositionBlockStateSchema = object({
|
|
|
13975
14077
|
reason: string().optional(),
|
|
13976
14078
|
fields: array(CompositionFieldStateSchema)
|
|
13977
14079
|
});
|
|
14080
|
+
var ComposerBlockSchema = object({
|
|
14081
|
+
id: string().min(1),
|
|
14082
|
+
name: string().min(1).max(120),
|
|
14083
|
+
enabled: boolean(),
|
|
14084
|
+
updatedAt: number(),
|
|
14085
|
+
composition: CompositionSchema
|
|
14086
|
+
});
|
|
14087
|
+
/**
|
|
14088
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
14089
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
14090
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
14091
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
14092
|
+
*/
|
|
14093
|
+
var ComposerUnreadableBlockSchema = object({
|
|
14094
|
+
id: string().min(1),
|
|
14095
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
14096
|
+
name: string().nullable(),
|
|
14097
|
+
/** The parse error, in the operator's words. */
|
|
14098
|
+
error: string()
|
|
14099
|
+
});
|
|
14100
|
+
var composerCapability = {
|
|
14101
|
+
name: "composer",
|
|
14102
|
+
scope: "system",
|
|
14103
|
+
mode: "singleton",
|
|
14104
|
+
internal: true,
|
|
14105
|
+
methods: {
|
|
14106
|
+
/**
|
|
14107
|
+
* Not `apply`: tRPC reserves `apply`, `call` and `then` as router keys, and
|
|
14108
|
+
* `router({})` throws on one — every cap router is built at boot.
|
|
14109
|
+
*/
|
|
14110
|
+
applyBlocks: method(object({
|
|
14111
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
14112
|
+
integrationId: string().nullable(),
|
|
14113
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
14114
|
+
storeLoaded: boolean(),
|
|
14115
|
+
blocks: array(ComposerBlockSchema),
|
|
14116
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
14117
|
+
restartBlockIds: array(string()),
|
|
14118
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
14119
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
14120
|
+
}), object({
|
|
14121
|
+
blocks: array(object({
|
|
14122
|
+
blockId: string(),
|
|
14123
|
+
status: CompositionRunStatusSchema,
|
|
14124
|
+
reason: string().optional()
|
|
14125
|
+
})),
|
|
14126
|
+
/**
|
|
14127
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
14128
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
14129
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
14130
|
+
*/
|
|
14131
|
+
acted: boolean()
|
|
14132
|
+
}), {
|
|
14133
|
+
kind: "mutation",
|
|
14134
|
+
auth: "admin"
|
|
14135
|
+
}),
|
|
14136
|
+
getStates: method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" })
|
|
14137
|
+
}
|
|
14138
|
+
};
|
|
13978
14139
|
var NUMBER = {
|
|
13979
14140
|
kind: "fixed",
|
|
13980
14141
|
result: ["number"]
|
|
@@ -14290,65 +14451,6 @@ var coreBlocksCapability = {
|
|
|
14290
14451
|
})
|
|
14291
14452
|
}
|
|
14292
14453
|
};
|
|
14293
|
-
var ComposerBlockSchema = object({
|
|
14294
|
-
id: string().min(1),
|
|
14295
|
-
name: string().min(1).max(120),
|
|
14296
|
-
enabled: boolean(),
|
|
14297
|
-
updatedAt: number(),
|
|
14298
|
-
composition: CompositionSchema
|
|
14299
|
-
});
|
|
14300
|
-
/**
|
|
14301
|
-
* A stored composition row that no longer PARSES — a schema a release
|
|
14302
|
-
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
14303
|
-
* its device as a placeholder and reports the block `failed` naming the parse
|
|
14304
|
-
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
14305
|
-
*/
|
|
14306
|
-
var ComposerUnreadableBlockSchema = object({
|
|
14307
|
-
id: string().min(1),
|
|
14308
|
-
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
14309
|
-
name: string().nullable(),
|
|
14310
|
-
/** The parse error, in the operator's words. */
|
|
14311
|
-
error: string()
|
|
14312
|
-
});
|
|
14313
|
-
var composerCapability = {
|
|
14314
|
-
name: "composer",
|
|
14315
|
-
scope: "system",
|
|
14316
|
-
mode: "singleton",
|
|
14317
|
-
internal: true,
|
|
14318
|
-
methods: {
|
|
14319
|
-
/**
|
|
14320
|
-
* Not `apply`: tRPC reserves `apply`, `call` and `then` as router keys, and
|
|
14321
|
-
* `router({})` throws on one — every cap router is built at boot.
|
|
14322
|
-
*/
|
|
14323
|
-
applyBlocks: method(object({
|
|
14324
|
-
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
14325
|
-
integrationId: string().nullable(),
|
|
14326
|
-
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
14327
|
-
storeLoaded: boolean(),
|
|
14328
|
-
blocks: array(ComposerBlockSchema),
|
|
14329
|
-
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
14330
|
-
restartBlockIds: array(string()),
|
|
14331
|
-
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
14332
|
-
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
14333
|
-
}), object({
|
|
14334
|
-
blocks: array(object({
|
|
14335
|
-
blockId: string(),
|
|
14336
|
-
status: CompositionRunStatusSchema,
|
|
14337
|
-
reason: string().optional()
|
|
14338
|
-
})),
|
|
14339
|
-
/**
|
|
14340
|
-
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
14341
|
-
* integration unknown, its own rows unread or read empty once). An empty
|
|
14342
|
-
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
14343
|
-
*/
|
|
14344
|
-
acted: boolean()
|
|
14345
|
-
}), {
|
|
14346
|
-
kind: "mutation",
|
|
14347
|
-
auth: "admin"
|
|
14348
|
-
}),
|
|
14349
|
-
getStates: method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" })
|
|
14350
|
-
}
|
|
14351
|
-
};
|
|
14352
14454
|
/**
|
|
14353
14455
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
14354
14456
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -17384,6 +17486,251 @@ var deviceManagerCapability = {
|
|
|
17384
17486
|
}
|
|
17385
17487
|
};
|
|
17386
17488
|
/**
|
|
17489
|
+
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
17490
|
+
* name (same pattern as `snapshot`):
|
|
17491
|
+
*
|
|
17492
|
+
* - **Native** providers: registered per-device by device-driver
|
|
17493
|
+
* addons via `ctx.registerNativeCap` — either on a
|
|
17494
|
+
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
17495
|
+
* or directly on the camera (Reolink registers at camera level).
|
|
17496
|
+
* Emits an `onPressed` event every time the firmware pushes a
|
|
17497
|
+
* ring; status tracks the last press and a pressCount since start
|
|
17498
|
+
* (diagnostic).
|
|
17499
|
+
*
|
|
17500
|
+
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
17501
|
+
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
17502
|
+
* device (contact / switch / event-emitter …) into a doorbell for
|
|
17503
|
+
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
17504
|
+
* it per camera in the device-bindings UI, then picks the source
|
|
17505
|
+
* device + trigger in the per-device settings.
|
|
17506
|
+
*
|
|
17507
|
+
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
17508
|
+
* — subscribers listening at the camera level receive ring events
|
|
17509
|
+
* with `via[]` populated. No code on the parent needed.
|
|
17510
|
+
*/
|
|
17511
|
+
var DoorbellStatusSchema = object({
|
|
17512
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
17513
|
+
lastPressedAt: number().nullable(),
|
|
17514
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
17515
|
+
pressCountSinceStart: number()
|
|
17516
|
+
});
|
|
17517
|
+
var DoorbellPressEventSchema = object({
|
|
17518
|
+
deviceId: number(),
|
|
17519
|
+
timestamp: number()
|
|
17520
|
+
});
|
|
17521
|
+
/**
|
|
17522
|
+
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
17523
|
+
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
17524
|
+
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
17525
|
+
*/
|
|
17526
|
+
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
17527
|
+
/**
|
|
17528
|
+
* The `doorbell-source` slot — which devices ring this camera's VIRTUAL
|
|
17529
|
+
* doorbell, owned by the `virtual-doorbell` wrapper over its
|
|
17530
|
+
* `doorbellSources` store (D648). A source rings when one of its
|
|
17531
|
+
* `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
|
|
17532
|
+
* different authority (`deviceManager.setWrapperActive`, D62) — the slot
|
|
17533
|
+
* reports it, it never writes it.
|
|
17534
|
+
*/
|
|
17535
|
+
var DOORBELL_SOURCE_SLOT = {
|
|
17536
|
+
id: "doorbell-source",
|
|
17537
|
+
label: "Doorbell trigger devices",
|
|
17538
|
+
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.",
|
|
17539
|
+
shape: "association",
|
|
17540
|
+
hostDeviceTypes: [DeviceType.Camera],
|
|
17541
|
+
sourceCaps: SOURCE_CAPS,
|
|
17542
|
+
cardinality: "many",
|
|
17543
|
+
value: DoorbellSourceSlotValueSchema
|
|
17544
|
+
};
|
|
17545
|
+
var doorbellCapability = {
|
|
17546
|
+
name: "doorbell",
|
|
17547
|
+
scope: "device",
|
|
17548
|
+
deviceNative: true,
|
|
17549
|
+
mode: "singleton",
|
|
17550
|
+
kind: "wrapper",
|
|
17551
|
+
defaultActive: false,
|
|
17552
|
+
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
17553
|
+
extensionSlots: [DOORBELL_SOURCE_SLOT],
|
|
17554
|
+
methods: {},
|
|
17555
|
+
events: {
|
|
17556
|
+
/**
|
|
17557
|
+
* Fires once per physical press. Reolink delivers via Baichuan
|
|
17558
|
+
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
17559
|
+
* release/duration — it's a pulse.
|
|
17560
|
+
*/
|
|
17561
|
+
onPressed: {
|
|
17562
|
+
data: DoorbellPressEventSchema,
|
|
17563
|
+
fromState: {
|
|
17564
|
+
field: "lastPressedAt",
|
|
17565
|
+
on: "advance"
|
|
17566
|
+
}
|
|
17567
|
+
} },
|
|
17568
|
+
status: {
|
|
17569
|
+
schema: DoorbellStatusSchema,
|
|
17570
|
+
kind: "push"
|
|
17571
|
+
},
|
|
17572
|
+
/**
|
|
17573
|
+
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
17574
|
+
* Mirrored by the kernel and readable via
|
|
17575
|
+
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
17576
|
+
* without subscribing.
|
|
17577
|
+
*/
|
|
17578
|
+
runtimeState: DoorbellStatusSchema,
|
|
17579
|
+
/**
|
|
17580
|
+
* 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.
|
|
17581
|
+
*
|
|
17582
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
17583
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
17584
|
+
*/
|
|
17585
|
+
durability: "restored"
|
|
17586
|
+
};
|
|
17587
|
+
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
17588
|
+
DeviceType.Camera, DeviceType.Camera;
|
|
17589
|
+
/** A slot's editable value, discriminated on `slot`. */
|
|
17590
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
17591
|
+
/** Every device type at least one slot is offered on — `device-extension`'s `deviceTypes`. */
|
|
17592
|
+
var EXTENSION_HOST_DEVICE_TYPES = [DeviceType.Camera];
|
|
17593
|
+
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
17594
|
+
state: literal("unreachable"),
|
|
17595
|
+
reason: string()
|
|
17596
|
+
})]);
|
|
17597
|
+
/** One provider of slots — the D554 source-listing row. */
|
|
17598
|
+
var ExtensionSourceSchema = object({
|
|
17599
|
+
/** The routing prefix of every `slotRef` this provider serves. */
|
|
17600
|
+
source: string(),
|
|
17601
|
+
label: string(),
|
|
17602
|
+
/** Stamped by the dispatcher from the registry (D557). */
|
|
17603
|
+
addonId: string().optional(),
|
|
17604
|
+
availability: ExtensionSourceAvailabilitySchema
|
|
17605
|
+
});
|
|
17606
|
+
/**
|
|
17607
|
+
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
17608
|
+
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
17609
|
+
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
17610
|
+
* valid source now (a container, which is never a pick). A source in any of
|
|
17611
|
+
* these states is SHOWN, never silently dropped or re-pointed.
|
|
17612
|
+
*/
|
|
17613
|
+
var ExtensionSourceHealthSchema = _enum([
|
|
17614
|
+
"ok",
|
|
17615
|
+
"missing",
|
|
17616
|
+
"foreign",
|
|
17617
|
+
"unavailable"
|
|
17618
|
+
]);
|
|
17619
|
+
var ExtensionSlotSourceSchema = object({
|
|
17620
|
+
deviceId: number().int(),
|
|
17621
|
+
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
17622
|
+
name: string().nullable(),
|
|
17623
|
+
health: ExtensionSourceHealthSchema,
|
|
17624
|
+
detail: string().optional()
|
|
17625
|
+
});
|
|
17626
|
+
/**
|
|
17627
|
+
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
17628
|
+
* reported read-only, named, never written through this contract (D62). The
|
|
17629
|
+
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
17630
|
+
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
17631
|
+
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
17632
|
+
*/
|
|
17633
|
+
var ExtensionSlotActivationSchema = object({
|
|
17634
|
+
state: _enum([
|
|
17635
|
+
"active",
|
|
17636
|
+
"inactive",
|
|
17637
|
+
"unknown"
|
|
17638
|
+
]),
|
|
17639
|
+
authority: string(),
|
|
17640
|
+
detail: string().optional()
|
|
17641
|
+
});
|
|
17642
|
+
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
17643
|
+
state: literal("ok"),
|
|
17644
|
+
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
17645
|
+
slotRef: string(),
|
|
17646
|
+
slot: ExtensionSlotIdSchema,
|
|
17647
|
+
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
17648
|
+
authority: string(),
|
|
17649
|
+
activation: ExtensionSlotActivationSchema.nullable(),
|
|
17650
|
+
value: ExtensionSlotValueSchema,
|
|
17651
|
+
sources: array(ExtensionSlotSourceSchema),
|
|
17652
|
+
/**
|
|
17653
|
+
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
17654
|
+
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
17655
|
+
* the child a picked container stands for (D356 — a container is never a
|
|
17656
|
+
* pick, its children are). Read-only; the editor shows them and may offer
|
|
17657
|
+
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
17658
|
+
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
17659
|
+
* older than D655.
|
|
17660
|
+
*/
|
|
17661
|
+
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
17662
|
+
}), object({
|
|
17663
|
+
state: literal("unreachable"),
|
|
17664
|
+
addonId: string(),
|
|
17665
|
+
reason: string()
|
|
17666
|
+
})]);
|
|
17667
|
+
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
17668
|
+
deviceId: number().int(),
|
|
17669
|
+
name: string(),
|
|
17670
|
+
type: string(),
|
|
17671
|
+
location: string().nullable(),
|
|
17672
|
+
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
17673
|
+
parentName: string().nullable(),
|
|
17674
|
+
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
17675
|
+
suggested: boolean(),
|
|
17676
|
+
/** Why it is suggested ("same location"), null when it is not. */
|
|
17677
|
+
reason: string().nullable()
|
|
17678
|
+
})) });
|
|
17679
|
+
/**
|
|
17680
|
+
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
17681
|
+
* reloaded the host (or, for an accessory child, its parent) because the
|
|
17682
|
+
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
17683
|
+
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
17684
|
+
*/
|
|
17685
|
+
var ExtensionSetResultSchema = object({
|
|
17686
|
+
applied: literal(true),
|
|
17687
|
+
reload: _enum([
|
|
17688
|
+
"none",
|
|
17689
|
+
"host",
|
|
17690
|
+
"parent"
|
|
17691
|
+
])
|
|
17692
|
+
});
|
|
17693
|
+
var ExtensionSlotRefInputSchema = object({
|
|
17694
|
+
deviceId: number().int(),
|
|
17695
|
+
slotRef: string().min(1)
|
|
17696
|
+
});
|
|
17697
|
+
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
17698
|
+
var deviceExtensionCapability = {
|
|
17699
|
+
name: "device-extension",
|
|
17700
|
+
scope: "device",
|
|
17701
|
+
mode: "collection",
|
|
17702
|
+
kind: "wrapper",
|
|
17703
|
+
defaultActive: true,
|
|
17704
|
+
deviceTypes: EXTENSION_HOST_DEVICE_TYPES,
|
|
17705
|
+
deviceConfig: { ui: {
|
|
17706
|
+
kind: "widget",
|
|
17707
|
+
widgetId: "host/extensions-panel",
|
|
17708
|
+
tab: "general",
|
|
17709
|
+
label: "Extensions",
|
|
17710
|
+
order: 72
|
|
17711
|
+
} },
|
|
17712
|
+
methods: {
|
|
17713
|
+
/** One row per slot owner — the D554 source listing `slotRef` routes by. */
|
|
17714
|
+
listSources: method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)),
|
|
17715
|
+
/**
|
|
17716
|
+
* Every slot this device is offered, read by each owner from its own
|
|
17717
|
+
* store. A provider that throws is ONE `unreachable` row (D554.4).
|
|
17718
|
+
*/
|
|
17719
|
+
listSlots: method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)),
|
|
17720
|
+
/** The devices the slot's editor may offer, suggestions pre-marked (D356). */
|
|
17721
|
+
listCandidates: method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema),
|
|
17722
|
+
/**
|
|
17723
|
+
* Write one slot through its owner's EXISTING write path. The owner
|
|
17724
|
+
* validates (a container is never a linked device, a camera is never its
|
|
17725
|
+
* own source) and refuses by name before persisting.
|
|
17726
|
+
*/
|
|
17727
|
+
setSlot: method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
17728
|
+
kind: "mutation",
|
|
17729
|
+
auth: "admin"
|
|
17730
|
+
})
|
|
17731
|
+
}
|
|
17732
|
+
};
|
|
17733
|
+
/**
|
|
17387
17734
|
* Per-field ownership (D663). A composition may CLAIM fields of a native
|
|
17388
17735
|
* cap's runtime-state slice on an existing device: `replace` overlays the
|
|
17389
17736
|
* claimed fields on the native slice, `add` builds a slice the device does
|
|
@@ -20871,17 +21218,25 @@ var NcScheduleSchema = object({
|
|
|
20871
21218
|
*/
|
|
20872
21219
|
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
20873
21220
|
/**
|
|
21221
|
+
* How a summary window is SENT (D698): `rule` (absent) = ONE notification with
|
|
21222
|
+
* every section; `section` = one notification per section with something to
|
|
21223
|
+
* say (an unavailable section included), each titled by its section.
|
|
21224
|
+
*/
|
|
21225
|
+
var NcStateSummarySplitSchema = _enum(["rule", "section"]);
|
|
21226
|
+
/**
|
|
20874
21227
|
* `summary`: the rule sends NOTHING per event. When a window of `schedule`
|
|
20875
21228
|
* CLOSES, it sends one notification with the current state of its kinds
|
|
20876
21229
|
* (low batteries, consumables to replace, devices offline, updates
|
|
20877
|
-
* available, ...), after its own filters
|
|
21230
|
+
* available, ...), after its own filters — or, with `split: 'section'`
|
|
21231
|
+
* (D698), one notification per section. Nothing to report sends nothing.
|
|
20878
21232
|
* The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
|
|
20879
21233
|
* midnight crossing); the send time is each window's END. Refused on the
|
|
20880
21234
|
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
20881
21235
|
*/
|
|
20882
21236
|
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
|
|
20883
21237
|
mode: literal("summary"),
|
|
20884
|
-
schedule: NcScheduleSchema
|
|
21238
|
+
schedule: NcScheduleSchema,
|
|
21239
|
+
split: NcStateSummarySplitSchema.optional()
|
|
20885
21240
|
})]);
|
|
20886
21241
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
20887
21242
|
var NcPlateMatcherSchema = object({
|
|
@@ -21021,8 +21376,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
|
|
|
21021
21376
|
/** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
|
|
21022
21377
|
var NcZoneConditionSchema = object({
|
|
21023
21378
|
ids: array(string().min(1)).min(1),
|
|
21024
|
-
/**
|
|
21025
|
-
|
|
21379
|
+
/**
|
|
21380
|
+
* LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
|
|
21381
|
+
* is what both editors mean and all they write since D690: "all of" was
|
|
21382
|
+
* removed from the editors because on an immediate rule it asked one
|
|
21383
|
+
* detection to stand in every zone at once. Still ACCEPTED, and `all` still
|
|
21384
|
+
* evaluated, so a stored rule keeps parsing and meaning what it meant.
|
|
21385
|
+
*/
|
|
21386
|
+
match: _enum(["any", "all"]).optional()
|
|
21026
21387
|
});
|
|
21027
21388
|
/**
|
|
21028
21389
|
* The P1 condition set — a flat AND of groups; absent group = pass;
|
|
@@ -21526,10 +21887,12 @@ var NcMediaPolicySchema = object({
|
|
|
21526
21887
|
/**
|
|
21527
21888
|
* Cooldown GRANULARITY over the subject's class — how much a fired
|
|
21528
21889
|
* notification suppresses.
|
|
21529
|
-
* - `
|
|
21530
|
-
*
|
|
21531
|
-
*
|
|
21532
|
-
*
|
|
21890
|
+
* - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
|
|
21891
|
+
* independent window per detected class: cat→dog fires at once, cat→cat
|
|
21892
|
+
* still waits.
|
|
21893
|
+
* - `shared` — one window for the whole rule/scope: a cat silences the next
|
|
21894
|
+
* dog for `cooldownSec`. Only written when an operator picks it; it is no
|
|
21895
|
+
* longer what an unset rule means.
|
|
21533
21896
|
*
|
|
21534
21897
|
* AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
|
|
21535
21898
|
* must not be swallowed by a bark's window (the precedent this generalizes —
|
|
@@ -21544,8 +21907,11 @@ var NcThrottleSchema = object({
|
|
|
21544
21907
|
/**
|
|
21545
21908
|
* Class granularity of the cooldown key. Optional rather than defaulted:
|
|
21546
21909
|
* a Zod default does NOT run on the addon→addon cap path, so a persisted
|
|
21547
|
-
* rule authored before this field simply carries none
|
|
21548
|
-
*
|
|
21910
|
+
* rule authored before this field simply carries none. The engine used to
|
|
21911
|
+
* read absent as `shared` (D36); since 2026-10-01 it reads absent as
|
|
21912
|
+
* `per-class` — the operator's default — and only an explicit `shared`
|
|
21913
|
+
* still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
|
|
21914
|
+
* engine, and D36's dated note.
|
|
21549
21915
|
*/
|
|
21550
21916
|
granularity: NcThrottleGranularitySchema.optional()
|
|
21551
21917
|
});
|
|
@@ -21869,11 +22235,23 @@ var NcStateSummaryPreviewSectionSchema = object({
|
|
|
21869
22235
|
reason: string().optional()
|
|
21870
22236
|
});
|
|
21871
22237
|
/**
|
|
22238
|
+
* One notification a previewed summary would send (D698): the whole summary on
|
|
22239
|
+
* a `rule` split (no `section`), one section's on a `section` split.
|
|
22240
|
+
*/
|
|
22241
|
+
var NcStateSummaryPreviewRowSchema = object({
|
|
22242
|
+
section: string().optional(),
|
|
22243
|
+
/** The section's name on a per-section row; every reported section's, joined, on a combined one. */
|
|
22244
|
+
title: string(),
|
|
22245
|
+
text: string(),
|
|
22246
|
+
count: number().int().nonnegative()
|
|
22247
|
+
});
|
|
22248
|
+
/**
|
|
21872
22249
|
* The summary a rule would send now. `empty` = nothing to report and every
|
|
21873
22250
|
* section read: such a summary is NOT sent. `dropped` counts the open states
|
|
21874
22251
|
* the rule's own filters (or a camera mute) left out, by reason.
|
|
21875
22252
|
* `excludedGroups` names the kind groups selected that have no state to report
|
|
21876
|
-
* (backups & exports).
|
|
22253
|
+
* (backups & exports). `split` and `rows` (D698) say how it would be sent —
|
|
22254
|
+
* optional, so an older hub's answer still parses.
|
|
21877
22255
|
*/
|
|
21878
22256
|
var NcStateSummaryPreviewSchema = object({
|
|
21879
22257
|
empty: boolean(),
|
|
@@ -21881,7 +22259,9 @@ var NcStateSummaryPreviewSchema = object({
|
|
|
21881
22259
|
text: string(),
|
|
21882
22260
|
sections: array(NcStateSummaryPreviewSectionSchema),
|
|
21883
22261
|
dropped: record(string(), number().int().nonnegative()),
|
|
21884
|
-
excludedGroups: array(string())
|
|
22262
|
+
excludedGroups: array(string()),
|
|
22263
|
+
split: NcStateSummarySplitSchema.optional(),
|
|
22264
|
+
rows: array(NcStateSummaryPreviewRowSchema).optional()
|
|
21885
22265
|
});
|
|
21886
22266
|
var NcTestResultSchema = object({
|
|
21887
22267
|
recordId: string(),
|
|
@@ -22317,7 +22697,7 @@ var NC_CONDITION_CATALOG = [
|
|
|
22317
22697
|
"package-event"
|
|
22318
22698
|
],
|
|
22319
22699
|
phase: "P1",
|
|
22320
|
-
description: "
|
|
22700
|
+
description: "The zones the subject must be in (included) or never in (excluded)."
|
|
22321
22701
|
},
|
|
22322
22702
|
{
|
|
22323
22703
|
id: "zonesExclude",
|
|
@@ -22340,29 +22720,24 @@ var NC_CONDITION_CATALOG = [
|
|
|
22340
22720
|
options: [
|
|
22341
22721
|
{
|
|
22342
22722
|
value: "",
|
|
22343
|
-
label: "
|
|
22344
|
-
hint: "Entries
|
|
22345
|
-
},
|
|
22346
|
-
{
|
|
22347
|
-
value: "enter",
|
|
22348
|
-
label: "Entered a zone",
|
|
22349
|
-
hint: "The same matches as \"not set\", stated explicitly: entries and non-crossing detections pass, exits do not."
|
|
22723
|
+
label: "Entering",
|
|
22724
|
+
hint: "Entries and ordinary movement; never an exit."
|
|
22350
22725
|
},
|
|
22351
22726
|
{
|
|
22352
22727
|
value: "exit",
|
|
22353
|
-
label: "
|
|
22354
|
-
hint: "
|
|
22728
|
+
label: "Leaving",
|
|
22729
|
+
hint: "Only an exit from a zone."
|
|
22355
22730
|
},
|
|
22356
22731
|
{
|
|
22357
22732
|
value: "any",
|
|
22358
|
-
label: "
|
|
22359
|
-
hint: "
|
|
22733
|
+
label: "Entering or leaving",
|
|
22734
|
+
hint: "Entries, exits and ordinary movement."
|
|
22360
22735
|
}
|
|
22361
22736
|
],
|
|
22362
22737
|
operator: "in",
|
|
22363
22738
|
appliesTo: ["immediate"],
|
|
22364
22739
|
phase: "P1",
|
|
22365
|
-
description: "
|
|
22740
|
+
description: "Which way the subject crosses the zone."
|
|
22366
22741
|
},
|
|
22367
22742
|
{
|
|
22368
22743
|
id: "labelEquals",
|
|
@@ -22499,7 +22874,7 @@ var NC_CONDITION_CATALOG = [
|
|
|
22499
22874
|
"package-event"
|
|
22500
22875
|
],
|
|
22501
22876
|
phase: "P3",
|
|
22502
|
-
description: "Only fire while a scene is matched
|
|
22877
|
+
description: "Only fire while a scene is matched or diverged."
|
|
22503
22878
|
},
|
|
22504
22879
|
{
|
|
22505
22880
|
id: "sensorKinds",
|
|
@@ -25690,13 +26065,19 @@ var pipelineAnalyticsCapability = {
|
|
|
25690
26065
|
*
|
|
25691
26066
|
* Operator-driven from the DI Events page (batch delete). Routes through
|
|
25692
26067
|
* the same widened track-deletion cascade (design §5.2).
|
|
26068
|
+
*
|
|
26069
|
+
* `sparedMediaIds` (D683 Task 14): media rows the cascade LEFT because a
|
|
26070
|
+
* live stationary entry vouches for them (its key frame, owned by a track
|
|
26071
|
+
* that moved and was kept). Released when the entry retires. Optional:
|
|
26072
|
+
* absent from a provider that predates it.
|
|
25693
26073
|
*/
|
|
25694
26074
|
deleteTracks: method(object({
|
|
25695
26075
|
deviceId: number(),
|
|
25696
26076
|
trackIds: array(string()).min(1)
|
|
25697
26077
|
}), object({
|
|
25698
26078
|
deleted: number().int(),
|
|
25699
|
-
failed: array(string()).readonly()
|
|
26079
|
+
failed: array(string()).readonly(),
|
|
26080
|
+
sparedMediaIds: array(number().int()).readonly().optional()
|
|
25700
26081
|
}), {
|
|
25701
26082
|
kind: "mutation",
|
|
25702
26083
|
auth: "admin"
|
|
@@ -28794,6 +29175,25 @@ var SetCameraSensorsInputSchema = object({
|
|
|
28794
29175
|
/** `null` removes the attachment: the camera goes back to `not-configured`. */
|
|
28795
29176
|
config: CameraSensorsConfigSchema.nullable()
|
|
28796
29177
|
});
|
|
29178
|
+
/**
|
|
29179
|
+
* Why an early occupancy look (D691) was not scheduled.
|
|
29180
|
+
*
|
|
29181
|
+
* - `unknown-camera` — no session was ever dispatched for it, so there is no
|
|
29182
|
+
* node and no config to attach a burst with.
|
|
29183
|
+
* - `out-of-range` — the ask is negative or further out than the orchestrator
|
|
29184
|
+
* will hold a timer for; the parked-object cadence is the answer there.
|
|
29185
|
+
* - `no-burst-producer` — this build has no burst producer at all.
|
|
29186
|
+
* - `already-looked` — this camera's ONE early look since its last session has
|
|
29187
|
+
* been spent. A look's own burst can re-arm a flickering flip, and a look
|
|
29188
|
+
* per arm would chain a burst every ~30 s forever (review H2); the next
|
|
29189
|
+
* real session re-arms the budget.
|
|
29190
|
+
*/
|
|
29191
|
+
var OccupancyLookRefusalSchema = _enum([
|
|
29192
|
+
"unknown-camera",
|
|
29193
|
+
"out-of-range",
|
|
29194
|
+
"no-burst-producer",
|
|
29195
|
+
"already-looked"
|
|
29196
|
+
]);
|
|
28797
29197
|
var pipelineOrchestratorCapability = {
|
|
28798
29198
|
name: "pipeline-orchestrator",
|
|
28799
29199
|
scope: "system",
|
|
@@ -28801,6 +29201,32 @@ var pipelineOrchestratorCapability = {
|
|
|
28801
29201
|
nodeIdMode: "data",
|
|
28802
29202
|
exposesDeviceSettings: true,
|
|
28803
29203
|
methods: {
|
|
29204
|
+
/**
|
|
29205
|
+
* D691 — an occupancy flip is pending on this camera and can commit
|
|
29206
|
+
* `afterMs` from now: dial ONE occupancy burst at the end of its sustain
|
|
29207
|
+
* window instead of leaving the commit to the 300 s parked-object cadence.
|
|
29208
|
+
* Called by the notification centre, the only component that knows a flip
|
|
29209
|
+
* is pending; the dial is the recheck's own (attach on the last session
|
|
29210
|
+
* node, `requestOccupancyBurst`, detach). One pending look per camera; a
|
|
29211
|
+
* session open at the due time is the look, and no burst is dialled.
|
|
29212
|
+
*/
|
|
29213
|
+
requestOccupancyLook: method(object({
|
|
29214
|
+
deviceId: number().int().nonnegative(),
|
|
29215
|
+
/** How long from NOW until the pending flip's sustain window ends. RELATIVE,
|
|
29216
|
+
* so the caller's clock and the orchestrator's never have to agree. */
|
|
29217
|
+
afterMs: number().finite(),
|
|
29218
|
+
/** Why, for the log. */
|
|
29219
|
+
reason: string()
|
|
29220
|
+
}), object({
|
|
29221
|
+
scheduled: boolean(),
|
|
29222
|
+
/** When `scheduled`: how long until the burst is dialled. */
|
|
29223
|
+
dueInMs: number().optional(),
|
|
29224
|
+
/** When not `scheduled`: why. */
|
|
29225
|
+
refusedBecause: OccupancyLookRefusalSchema.optional()
|
|
29226
|
+
}), {
|
|
29227
|
+
kind: "mutation",
|
|
29228
|
+
auth: "admin"
|
|
29229
|
+
}),
|
|
28804
29230
|
/** Internal storage-migration participant lease. While held, dispatch
|
|
28805
29231
|
* requests are accepted as pending but no new runner attachment starts. */
|
|
28806
29232
|
pauseForStorageMigration: method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
|
|
@@ -32173,251 +32599,6 @@ var videoclipsCapability = {
|
|
|
32173
32599
|
}
|
|
32174
32600
|
};
|
|
32175
32601
|
/**
|
|
32176
|
-
* Doorbell button cap. Two kinds of providers coexist behind this cap
|
|
32177
|
-
* name (same pattern as `snapshot`):
|
|
32178
|
-
*
|
|
32179
|
-
* - **Native** providers: registered per-device by device-driver
|
|
32180
|
-
* addons via `ctx.registerNativeCap` — either on a
|
|
32181
|
-
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
32182
|
-
* or directly on the camera (Reolink registers at camera level).
|
|
32183
|
-
* Emits an `onPressed` event every time the firmware pushes a
|
|
32184
|
-
* ring; status tracks the last press and a pressCount since start
|
|
32185
|
-
* (diagnostic).
|
|
32186
|
-
*
|
|
32187
|
-
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
32188
|
-
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
32189
|
-
* device (contact / switch / event-emitter …) into a doorbell for
|
|
32190
|
-
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
32191
|
-
* it per camera in the device-bindings UI, then picks the source
|
|
32192
|
-
* device + trigger in the per-device settings.
|
|
32193
|
-
*
|
|
32194
|
-
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
32195
|
-
* — subscribers listening at the camera level receive ring events
|
|
32196
|
-
* with `via[]` populated. No code on the parent needed.
|
|
32197
|
-
*/
|
|
32198
|
-
var DoorbellStatusSchema = object({
|
|
32199
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
32200
|
-
lastPressedAt: number().nullable(),
|
|
32201
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
32202
|
-
pressCountSinceStart: number()
|
|
32203
|
-
});
|
|
32204
|
-
var DoorbellPressEventSchema = object({
|
|
32205
|
-
deviceId: number(),
|
|
32206
|
-
timestamp: number()
|
|
32207
|
-
});
|
|
32208
|
-
/**
|
|
32209
|
-
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
32210
|
-
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
32211
|
-
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
32212
|
-
*/
|
|
32213
|
-
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
32214
|
-
/**
|
|
32215
|
-
* The `doorbell-source` slot — which devices ring this camera's VIRTUAL
|
|
32216
|
-
* doorbell, owned by the `virtual-doorbell` wrapper over its
|
|
32217
|
-
* `doorbellSources` store (D648). A source rings when one of its
|
|
32218
|
-
* `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
|
|
32219
|
-
* different authority (`deviceManager.setWrapperActive`, D62) — the slot
|
|
32220
|
-
* reports it, it never writes it.
|
|
32221
|
-
*/
|
|
32222
|
-
var DOORBELL_SOURCE_SLOT = {
|
|
32223
|
-
id: "doorbell-source",
|
|
32224
|
-
label: "Doorbell trigger devices",
|
|
32225
|
-
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.",
|
|
32226
|
-
shape: "association",
|
|
32227
|
-
hostDeviceTypes: [DeviceType.Camera],
|
|
32228
|
-
sourceCaps: SOURCE_CAPS,
|
|
32229
|
-
cardinality: "many",
|
|
32230
|
-
value: DoorbellSourceSlotValueSchema
|
|
32231
|
-
};
|
|
32232
|
-
var doorbellCapability = {
|
|
32233
|
-
name: "doorbell",
|
|
32234
|
-
scope: "device",
|
|
32235
|
-
deviceNative: true,
|
|
32236
|
-
mode: "singleton",
|
|
32237
|
-
kind: "wrapper",
|
|
32238
|
-
defaultActive: false,
|
|
32239
|
-
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
32240
|
-
extensionSlots: [DOORBELL_SOURCE_SLOT],
|
|
32241
|
-
methods: {},
|
|
32242
|
-
events: {
|
|
32243
|
-
/**
|
|
32244
|
-
* Fires once per physical press. Reolink delivers via Baichuan
|
|
32245
|
-
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
32246
|
-
* release/duration — it's a pulse.
|
|
32247
|
-
*/
|
|
32248
|
-
onPressed: {
|
|
32249
|
-
data: DoorbellPressEventSchema,
|
|
32250
|
-
fromState: {
|
|
32251
|
-
field: "lastPressedAt",
|
|
32252
|
-
on: "advance"
|
|
32253
|
-
}
|
|
32254
|
-
} },
|
|
32255
|
-
status: {
|
|
32256
|
-
schema: DoorbellStatusSchema,
|
|
32257
|
-
kind: "push"
|
|
32258
|
-
},
|
|
32259
|
-
/**
|
|
32260
|
-
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
32261
|
-
* Mirrored by the kernel and readable via
|
|
32262
|
-
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
32263
|
-
* without subscribing.
|
|
32264
|
-
*/
|
|
32265
|
-
runtimeState: DoorbellStatusSchema,
|
|
32266
|
-
/**
|
|
32267
|
-
* 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.
|
|
32268
|
-
*
|
|
32269
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
32270
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
32271
|
-
*/
|
|
32272
|
-
durability: "restored"
|
|
32273
|
-
};
|
|
32274
|
-
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
32275
|
-
DeviceType.Camera, DeviceType.Camera;
|
|
32276
|
-
/** A slot's editable value, discriminated on `slot`. */
|
|
32277
|
-
var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
32278
|
-
/** Every device type at least one slot is offered on — `device-extension`'s `deviceTypes`. */
|
|
32279
|
-
var EXTENSION_HOST_DEVICE_TYPES = [DeviceType.Camera];
|
|
32280
|
-
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
32281
|
-
state: literal("unreachable"),
|
|
32282
|
-
reason: string()
|
|
32283
|
-
})]);
|
|
32284
|
-
/** One provider of slots — the D554 source-listing row. */
|
|
32285
|
-
var ExtensionSourceSchema = object({
|
|
32286
|
-
/** The routing prefix of every `slotRef` this provider serves. */
|
|
32287
|
-
source: string(),
|
|
32288
|
-
label: string(),
|
|
32289
|
-
/** Stamped by the dispatcher from the registry (D557). */
|
|
32290
|
-
addonId: string().optional(),
|
|
32291
|
-
availability: ExtensionSourceAvailabilitySchema
|
|
32292
|
-
});
|
|
32293
|
-
/**
|
|
32294
|
-
* How one picked source stands. `missing` — no such device (deleted, or an id
|
|
32295
|
-
* that never existed); `foreign` — a device the slot's owner cannot read from
|
|
32296
|
-
* (a source owned by another addon); `unavailable` — it exists but is not a
|
|
32297
|
-
* valid source now (a container, which is never a pick). A source in any of
|
|
32298
|
-
* these states is SHOWN, never silently dropped or re-pointed.
|
|
32299
|
-
*/
|
|
32300
|
-
var ExtensionSourceHealthSchema = _enum([
|
|
32301
|
-
"ok",
|
|
32302
|
-
"missing",
|
|
32303
|
-
"foreign",
|
|
32304
|
-
"unavailable"
|
|
32305
|
-
]);
|
|
32306
|
-
var ExtensionSlotSourceSchema = object({
|
|
32307
|
-
deviceId: number().int(),
|
|
32308
|
-
/** The device's name, or null when it could not be resolved (`missing`). */
|
|
32309
|
-
name: string().nullable(),
|
|
32310
|
-
health: ExtensionSourceHealthSchema,
|
|
32311
|
-
detail: string().optional()
|
|
32312
|
-
});
|
|
32313
|
-
/**
|
|
32314
|
-
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
32315
|
-
* reported read-only, named, never written through this contract (D62). The
|
|
32316
|
-
* virtual doorbell's sources ring only while the wrapper is bound to the
|
|
32317
|
-
* camera, and that binding belongs to `deviceManager.setWrapperActive`.
|
|
32318
|
-
* `unknown` means the gate could not be read; it is not "inactive" (D315).
|
|
32319
|
-
*/
|
|
32320
|
-
var ExtensionSlotActivationSchema = object({
|
|
32321
|
-
state: _enum([
|
|
32322
|
-
"active",
|
|
32323
|
-
"inactive",
|
|
32324
|
-
"unknown"
|
|
32325
|
-
]),
|
|
32326
|
-
authority: string(),
|
|
32327
|
-
detail: string().optional()
|
|
32328
|
-
});
|
|
32329
|
-
var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
32330
|
-
state: literal("ok"),
|
|
32331
|
-
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
32332
|
-
slotRef: string(),
|
|
32333
|
-
slot: ExtensionSlotIdSchema,
|
|
32334
|
-
/** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
|
|
32335
|
-
authority: string(),
|
|
32336
|
-
activation: ExtensionSlotActivationSchema.nullable(),
|
|
32337
|
-
value: ExtensionSlotValueSchema,
|
|
32338
|
-
sources: array(ExtensionSlotSourceSchema),
|
|
32339
|
-
/**
|
|
32340
|
-
* Devices the owner links to the host ON ITS OWN, by structure, and that
|
|
32341
|
-
* are therefore not in `value` (D655): a camera's device-tree children, and
|
|
32342
|
-
* the child a picked container stands for (D356 — a container is never a
|
|
32343
|
-
* pick, its children are). Read-only; the editor shows them and may offer
|
|
32344
|
-
* per-device options on them (the linked-devices tracked-event opt-in).
|
|
32345
|
-
* Absent when the owner links nothing beyond the picks, and from an owner
|
|
32346
|
-
* older than D655.
|
|
32347
|
-
*/
|
|
32348
|
-
impliedSources: array(ExtensionSlotSourceSchema).optional()
|
|
32349
|
-
}), object({
|
|
32350
|
-
state: literal("unreachable"),
|
|
32351
|
-
addonId: string(),
|
|
32352
|
-
reason: string()
|
|
32353
|
-
})]);
|
|
32354
|
-
var ExtensionCandidatesSchema = object({ candidates: array(object({
|
|
32355
|
-
deviceId: number().int(),
|
|
32356
|
-
name: string(),
|
|
32357
|
-
type: string(),
|
|
32358
|
-
location: string().nullable(),
|
|
32359
|
-
/** The container a child belongs to — "Spotlight 2" alone does not say which. */
|
|
32360
|
-
parentName: string().nullable(),
|
|
32361
|
-
/** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
|
|
32362
|
-
suggested: boolean(),
|
|
32363
|
-
/** Why it is suggested ("same location"), null when it is not. */
|
|
32364
|
-
reason: string().nullable()
|
|
32365
|
-
})) });
|
|
32366
|
-
/**
|
|
32367
|
-
* What a write did. `none` — applied in place. `host` / `parent` — the owner
|
|
32368
|
-
* reloaded the host (or, for an accessory child, its parent) because the
|
|
32369
|
-
* write changed what the host REGISTERS. A slot never adds a capability to its
|
|
32370
|
-
* host — that is a composition (D663) — so today's owners answer `none`.
|
|
32371
|
-
*/
|
|
32372
|
-
var ExtensionSetResultSchema = object({
|
|
32373
|
-
applied: literal(true),
|
|
32374
|
-
reload: _enum([
|
|
32375
|
-
"none",
|
|
32376
|
-
"host",
|
|
32377
|
-
"parent"
|
|
32378
|
-
])
|
|
32379
|
-
});
|
|
32380
|
-
var ExtensionSlotRefInputSchema = object({
|
|
32381
|
-
deviceId: number().int(),
|
|
32382
|
-
slotRef: string().min(1)
|
|
32383
|
-
});
|
|
32384
|
-
var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
|
|
32385
|
-
var deviceExtensionCapability = {
|
|
32386
|
-
name: "device-extension",
|
|
32387
|
-
scope: "device",
|
|
32388
|
-
mode: "collection",
|
|
32389
|
-
kind: "wrapper",
|
|
32390
|
-
defaultActive: true,
|
|
32391
|
-
deviceTypes: EXTENSION_HOST_DEVICE_TYPES,
|
|
32392
|
-
deviceConfig: { ui: {
|
|
32393
|
-
kind: "widget",
|
|
32394
|
-
widgetId: "host/extensions-panel",
|
|
32395
|
-
tab: "general",
|
|
32396
|
-
label: "Extensions",
|
|
32397
|
-
order: 72
|
|
32398
|
-
} },
|
|
32399
|
-
methods: {
|
|
32400
|
-
/** One row per slot owner — the D554 source listing `slotRef` routes by. */
|
|
32401
|
-
listSources: method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)),
|
|
32402
|
-
/**
|
|
32403
|
-
* Every slot this device is offered, read by each owner from its own
|
|
32404
|
-
* store. A provider that throws is ONE `unreachable` row (D554.4).
|
|
32405
|
-
*/
|
|
32406
|
-
listSlots: method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)),
|
|
32407
|
-
/** The devices the slot's editor may offer, suggestions pre-marked (D356). */
|
|
32408
|
-
listCandidates: method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema),
|
|
32409
|
-
/**
|
|
32410
|
-
* Write one slot through its owner's EXISTING write path. The owner
|
|
32411
|
-
* validates (a container is never a linked device, a camera is never its
|
|
32412
|
-
* own source) and refuses by name before persisting.
|
|
32413
|
-
*/
|
|
32414
|
-
setSlot: method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
|
|
32415
|
-
kind: "mutation",
|
|
32416
|
-
auth: "admin"
|
|
32417
|
-
})
|
|
32418
|
-
}
|
|
32419
|
-
};
|
|
32420
|
-
/**
|
|
32421
32602
|
* Optional client-side hints sent at session creation to help the provider
|
|
32422
32603
|
* pick the best native source. All fields optional — a viewer that knows
|
|
32423
32604
|
* nothing still gets a sane default. (Relocated from the retired `webrtc`
|
|
@@ -46483,6 +46664,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
46483
46664
|
coverCapability,
|
|
46484
46665
|
customModelRegistryCapability,
|
|
46485
46666
|
dataStoreProviderCapability,
|
|
46667
|
+
databaseSnapshotCapability,
|
|
46486
46668
|
dayNightCapability,
|
|
46487
46669
|
decoderCapability,
|
|
46488
46670
|
detectionPipelineCapability,
|
|
@@ -47745,6 +47927,18 @@ Object.freeze({
|
|
|
47745
47927
|
addonId: null,
|
|
47746
47928
|
access: "view"
|
|
47747
47929
|
},
|
|
47930
|
+
"databaseSnapshot.listDatabases": {
|
|
47931
|
+
capName: "database-snapshot",
|
|
47932
|
+
capScope: "system",
|
|
47933
|
+
addonId: null,
|
|
47934
|
+
access: "view"
|
|
47935
|
+
},
|
|
47936
|
+
"databaseSnapshot.writeSnapshot": {
|
|
47937
|
+
capName: "database-snapshot",
|
|
47938
|
+
capScope: "system",
|
|
47939
|
+
addonId: null,
|
|
47940
|
+
access: "create"
|
|
47941
|
+
},
|
|
47748
47942
|
"dataStoreProvider.aggregate": {
|
|
47749
47943
|
capName: "data-store-provider",
|
|
47750
47944
|
capScope: "system",
|
|
@@ -51309,6 +51503,12 @@ Object.freeze({
|
|
|
51309
51503
|
addonId: null,
|
|
51310
51504
|
access: "delete"
|
|
51311
51505
|
},
|
|
51506
|
+
"pipelineOrchestrator.requestOccupancyLook": {
|
|
51507
|
+
capName: "pipeline-orchestrator",
|
|
51508
|
+
capScope: "system",
|
|
51509
|
+
addonId: null,
|
|
51510
|
+
access: "create"
|
|
51511
|
+
},
|
|
51312
51512
|
"pipelineOrchestrator.resetNodePipelineDefaults": {
|
|
51313
51513
|
capName: "pipeline-orchestrator",
|
|
51314
51514
|
capScope: "system",
|
|
@@ -55101,6 +55301,11 @@ Object.freeze({
|
|
|
55101
55301
|
form: "single",
|
|
55102
55302
|
optional: false
|
|
55103
55303
|
}],
|
|
55304
|
+
"pipelineOrchestrator.requestOccupancyLook": [{
|
|
55305
|
+
name: "deviceId",
|
|
55306
|
+
form: "single",
|
|
55307
|
+
optional: false
|
|
55308
|
+
}],
|
|
55104
55309
|
"pipelineOrchestrator.resolvePipeline": [{
|
|
55105
55310
|
name: "deviceId",
|
|
55106
55311
|
form: "single",
|
|
@@ -56342,6 +56547,18 @@ var STATE_SUMMARY_VARS = [
|
|
|
56342
56547
|
systemEventKinds: [...SUMMARISABLE],
|
|
56343
56548
|
systemEventDeliveries: ["summary"]
|
|
56344
56549
|
},
|
|
56550
|
+
{
|
|
56551
|
+
name: "summarySection",
|
|
56552
|
+
label: "Summary: this section",
|
|
56553
|
+
description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
|
|
56554
|
+
example: "Batterie scariche",
|
|
56555
|
+
group: "system",
|
|
56556
|
+
families: ["rule"],
|
|
56557
|
+
fields: [...RULE_TEXT],
|
|
56558
|
+
kinds: ["system"],
|
|
56559
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
56560
|
+
systemEventDeliveries: ["summary"]
|
|
56561
|
+
},
|
|
56345
56562
|
...STATE_SUMMARY_SECTION_VARS.map((v) => ({
|
|
56346
56563
|
name: v.name,
|
|
56347
56564
|
label: v.label,
|
|
@@ -56418,6 +56635,37 @@ var STATE_SUMMARY_VARS = [
|
|
|
56418
56635
|
[...RULE_TEXT],
|
|
56419
56636
|
...STATE_SUMMARY_VARS
|
|
56420
56637
|
];
|
|
56638
|
+
new Set([
|
|
56639
|
+
"disarmed",
|
|
56640
|
+
"armed_home",
|
|
56641
|
+
"armed_away",
|
|
56642
|
+
"armed_night",
|
|
56643
|
+
"armed_vacation",
|
|
56644
|
+
"armed_custom_bypass",
|
|
56645
|
+
"arming",
|
|
56646
|
+
"disarming",
|
|
56647
|
+
"pending",
|
|
56648
|
+
"triggered",
|
|
56649
|
+
"open",
|
|
56650
|
+
"opening",
|
|
56651
|
+
"closing",
|
|
56652
|
+
"closed",
|
|
56653
|
+
"stopped",
|
|
56654
|
+
"locked",
|
|
56655
|
+
"unlocked",
|
|
56656
|
+
"locking",
|
|
56657
|
+
"unlocking",
|
|
56658
|
+
"jammed",
|
|
56659
|
+
"on",
|
|
56660
|
+
"off",
|
|
56661
|
+
"home",
|
|
56662
|
+
"not_home",
|
|
56663
|
+
"matched",
|
|
56664
|
+
"diverged",
|
|
56665
|
+
"unknown",
|
|
56666
|
+
"latched",
|
|
56667
|
+
"live"
|
|
56668
|
+
]);
|
|
56421
56669
|
/**
|
|
56422
56670
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
56423
56671
|
*
|