@camstack/addon-osd-manager 0.1.152 → 0.1.153
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-D5c6b4QP.mjs → MotionZonesSettings-Bi_uB8oT.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DMve7K-c.mjs → PrivacyMaskSettings-DuzJnDoQ.mjs} +4 -4
- package/dist/{SceneMonitorEditor-e1z_C79o.mjs → SceneMonitorEditor-CnpHHB8l.mjs} +3 -3
- package/dist/_stub.js +2352 -2351
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-C8rKpVdZ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BD9qu2T3.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DhxFiL0z.mjs +26 -0
- package/dist/{hostInit-B8_o5hJj.mjs → hostInit-Bo6e-m_F.mjs} +2 -2
- package/dist/index.js +209 -181
- package/dist/index.mjs +209 -181
- package/dist/{player-overlays-BchlNvHO.mjs → player-overlays-CPVNj3Th.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DRZ6VoYV.mjs → responsive-CmW26rtV.mjs} +1 -1
- package/dist/{scene-monitor-copy-CmtMsrJb.mjs → scene-monitor-copy-BP0Z6F7z.mjs} +1 -1
- package/dist/{square-BYLYL5VB.mjs → square-CaTP7VKX.mjs} +1 -1
- package/dist/{trash-2-BdEqSrHt.mjs → trash-2-IrsDpmSJ.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-p2S4DkBF.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DLXGJNFv.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DQC5oc2I.mjs +0 -26
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-BGmz_oxW.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -535,6 +535,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
535
535
|
*/
|
|
536
536
|
EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
|
|
537
537
|
EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
|
|
538
|
+
/**
|
|
539
|
+
* A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
|
|
540
|
+
* data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
|
|
541
|
+
* consumer is the orchestrator's camera-sensors bridge, which re-emits the
|
|
542
|
+
* camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
|
|
543
|
+
* for a camera with no attached sensor). Providers must not emit
|
|
544
|
+
* `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
|
|
545
|
+
* keeps it so (camera-grid is a named, deferred exception).
|
|
546
|
+
*/
|
|
538
547
|
EventCategory["ProviderMotion"] = "provider.motion";
|
|
539
548
|
EventCategory["ProviderDetection"] = "provider.detection";
|
|
540
549
|
EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
|
|
@@ -5373,7 +5382,7 @@ var ZodIssueCode = {
|
|
|
5373
5382
|
var ZodFirstPartyTypeKind;
|
|
5374
5383
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5375
5384
|
//#endregion
|
|
5376
|
-
//#region ../types/dist/sleep-
|
|
5385
|
+
//#region ../types/dist/sleep-CDCONfkt.mjs
|
|
5377
5386
|
/**
|
|
5378
5387
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5379
5388
|
* window to float samples (D455).
|
|
@@ -7514,7 +7523,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
7514
7523
|
return DeviceRole;
|
|
7515
7524
|
}({});
|
|
7516
7525
|
//#endregion
|
|
7517
|
-
//#region ../types/dist/composition-
|
|
7526
|
+
//#region ../types/dist/composition-43aqsZQj.mjs
|
|
7518
7527
|
/**
|
|
7519
7528
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
7520
7529
|
*
|
|
@@ -7571,13 +7580,12 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
|
|
|
7571
7580
|
* LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
|
|
7572
7581
|
* valutatore puro del suo FRONTE.
|
|
7573
7582
|
*
|
|
7574
|
-
*
|
|
7575
|
-
*
|
|
7576
|
-
*
|
|
7577
|
-
*
|
|
7578
|
-
*
|
|
7579
|
-
* fa suonare il campanello ma non registra" — è esattamente D62.
|
|
7580
|
-
* SPOSTA qui e il doorbell la ri-esporta.
|
|
7583
|
+
* UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
|
|
7584
|
+
* trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
|
|
7585
|
+
* sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
|
|
7586
|
+
* le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
|
|
7587
|
+
* Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
|
|
7588
|
+
* sensore fa suonare il campanello ma non registra" — è esattamente D62.
|
|
7581
7589
|
*
|
|
7582
7590
|
* ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
|
|
7583
7591
|
* due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
|
|
@@ -7603,8 +7611,6 @@ var SOURCE_CAP_ACTIVE_FIELD = {
|
|
|
7603
7611
|
vibration: "detected",
|
|
7604
7612
|
tamper: "tampered"
|
|
7605
7613
|
};
|
|
7606
|
-
/** Cap names whose presence in a device's bindings qualify it as a source. */
|
|
7607
|
-
var SOURCE_CAPS = Object.keys(SOURCE_CAP_ACTIVE_FIELD);
|
|
7608
7614
|
/**
|
|
7609
7615
|
* Error types for the safe expression engine. Two distinct classes so callers
|
|
7610
7616
|
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
@@ -9314,7 +9320,7 @@ var RecordingTriggersSchema = object({
|
|
|
9314
9320
|
*
|
|
9315
9321
|
* Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
|
|
9316
9322
|
* `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
|
|
9317
|
-
* la stessa
|
|
9323
|
+
* la stessa del campanello composto (D671). Ed è il FRONTE, non
|
|
9318
9324
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
9319
9325
|
* registrare.
|
|
9320
9326
|
*/
|
|
@@ -17198,8 +17204,8 @@ var deviceManagerCapability = {
|
|
|
17198
17204
|
* (`value` / `missing` / `failed`, see {@link WrapperActivationReadSchema}).
|
|
17199
17205
|
*
|
|
17200
17206
|
* The narrow read of the durable authority behind `getBindings`: a
|
|
17201
|
-
* consumer that must know what the operator PERSISTED (
|
|
17202
|
-
*
|
|
17207
|
+
* consumer that must know what the operator PERSISTED (before it drops
|
|
17208
|
+
* work on the strength of an unbind) asks this instead of pulling device-manager's
|
|
17203
17209
|
* whole addon store through `addonSettingsRaw.getGlobal` — which answered
|
|
17204
17210
|
* `{}` on every isolated-engine hub and so never worked (D675). It reads
|
|
17205
17211
|
* ONE row (the activation map, ~1.6 KB), never the ~625 KB store.
|
|
@@ -17489,109 +17495,10 @@ var deviceManagerCapability = {
|
|
|
17489
17495
|
}), record(string(), record(string(), unknown().nullable())))
|
|
17490
17496
|
}
|
|
17491
17497
|
};
|
|
17492
|
-
|
|
17493
|
-
|
|
17494
|
-
* name (same pattern as `snapshot`):
|
|
17495
|
-
*
|
|
17496
|
-
* - **Native** providers: registered per-device by device-driver
|
|
17497
|
-
* addons via `ctx.registerNativeCap` — either on a
|
|
17498
|
-
* `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
|
|
17499
|
-
* or directly on the camera (Reolink registers at camera level).
|
|
17500
|
-
* Emits an `onPressed` event every time the firmware pushes a
|
|
17501
|
-
* ring; status tracks the last press and a pressCount since start
|
|
17502
|
-
* (diagnostic).
|
|
17503
|
-
*
|
|
17504
|
-
* - **Wrapper** provider: the `virtual-doorbell` system builtin
|
|
17505
|
-
* (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
|
|
17506
|
-
* device (contact / switch / event-emitter …) into a doorbell for
|
|
17507
|
-
* a camera. `defaultActive: false` — the operator explicitly binds
|
|
17508
|
-
* it per camera in the device-bindings UI, then picks the source
|
|
17509
|
-
* device + trigger in the per-device settings.
|
|
17510
|
-
*
|
|
17511
|
-
* The DeviceEventPropagator re-emits `onPressed` on the camera parent
|
|
17512
|
-
* — subscribers listening at the camera level receive ring events
|
|
17513
|
-
* with `via[]` populated. No code on the parent needed.
|
|
17514
|
-
*/
|
|
17515
|
-
var DoorbellStatusSchema = object({
|
|
17516
|
-
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
17517
|
-
lastPressedAt: number().nullable(),
|
|
17518
|
-
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
17519
|
-
pressCountSinceStart: number()
|
|
17520
|
-
});
|
|
17521
|
-
var DoorbellPressEventSchema = object({
|
|
17522
|
-
deviceId: number(),
|
|
17523
|
-
timestamp: number()
|
|
17524
|
-
});
|
|
17525
|
-
/**
|
|
17526
|
-
* The `doorbell-source` extension slot's editable value (D648): the camera's
|
|
17527
|
-
* virtual-doorbell trigger devices, exactly what the wrapper's
|
|
17528
|
-
* `doorbellSources` persists (as `{ deviceId }` records).
|
|
17529
|
-
*/
|
|
17530
|
-
var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
|
|
17531
|
-
/**
|
|
17532
|
-
* The `doorbell-source` slot — which devices ring this camera's VIRTUAL
|
|
17533
|
-
* doorbell, owned by the `virtual-doorbell` wrapper over its
|
|
17534
|
-
* `doorbellSources` store (D648). A source rings when one of its
|
|
17535
|
-
* `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
|
|
17536
|
-
* different authority (`deviceManager.setWrapperActive`, D62) — the slot
|
|
17537
|
-
* reports it, it never writes it.
|
|
17538
|
-
*/
|
|
17539
|
-
var DOORBELL_SOURCE_SLOT = {
|
|
17540
|
-
id: "doorbell-source",
|
|
17541
|
-
label: "Doorbell trigger devices",
|
|
17542
|
-
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.",
|
|
17543
|
-
shape: "association",
|
|
17544
|
-
hostDeviceTypes: [DeviceType.Camera],
|
|
17545
|
-
sourceCaps: SOURCE_CAPS,
|
|
17546
|
-
cardinality: "many",
|
|
17547
|
-
value: DoorbellSourceSlotValueSchema
|
|
17548
|
-
};
|
|
17549
|
-
var doorbellCapability = {
|
|
17550
|
-
name: "doorbell",
|
|
17551
|
-
scope: "device",
|
|
17552
|
-
deviceNative: true,
|
|
17553
|
-
mode: "singleton",
|
|
17554
|
-
kind: "wrapper",
|
|
17555
|
-
defaultActive: false,
|
|
17556
|
-
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
17557
|
-
extensionSlots: [DOORBELL_SOURCE_SLOT],
|
|
17558
|
-
methods: {},
|
|
17559
|
-
events: {
|
|
17560
|
-
/**
|
|
17561
|
-
* Fires once per physical press. Reolink delivers via Baichuan
|
|
17562
|
-
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
17563
|
-
* release/duration — it's a pulse.
|
|
17564
|
-
*/
|
|
17565
|
-
onPressed: {
|
|
17566
|
-
data: DoorbellPressEventSchema,
|
|
17567
|
-
fromState: {
|
|
17568
|
-
field: "lastPressedAt",
|
|
17569
|
-
on: "advance"
|
|
17570
|
-
}
|
|
17571
|
-
} },
|
|
17572
|
-
status: {
|
|
17573
|
-
schema: DoorbellStatusSchema,
|
|
17574
|
-
kind: "push"
|
|
17575
|
-
},
|
|
17576
|
-
/**
|
|
17577
|
-
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
17578
|
-
* Mirrored by the kernel and readable via
|
|
17579
|
-
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
17580
|
-
* without subscribing.
|
|
17581
|
-
*/
|
|
17582
|
-
runtimeState: DoorbellStatusSchema,
|
|
17583
|
-
/**
|
|
17584
|
-
* 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.
|
|
17585
|
-
*
|
|
17586
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
17587
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
17588
|
-
*/
|
|
17589
|
-
durability: "restored"
|
|
17590
|
-
};
|
|
17591
|
-
var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
|
|
17592
|
-
DeviceType.Camera, DeviceType.Camera;
|
|
17498
|
+
var ExtensionSlotIdSchema = _enum(["linked-devices"]);
|
|
17499
|
+
DeviceType.Camera;
|
|
17593
17500
|
/** A slot's editable value, discriminated on `slot`. */
|
|
17594
|
-
var ExtensionSlotValueSchema = discriminatedUnion("slot", [
|
|
17501
|
+
var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
|
|
17595
17502
|
/** Every device type at least one slot is offered on — `device-extension`'s `deviceTypes`. */
|
|
17596
17503
|
var EXTENSION_HOST_DEVICE_TYPES = [DeviceType.Camera];
|
|
17597
17504
|
var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
|
|
@@ -17629,10 +17536,11 @@ var ExtensionSlotSourceSchema = object({
|
|
|
17629
17536
|
});
|
|
17630
17537
|
/**
|
|
17631
17538
|
* A DIFFERENT authority that gates whether the slot's sources do anything —
|
|
17632
|
-
* reported read-only, named, never written through this contract (D62).
|
|
17633
|
-
*
|
|
17634
|
-
*
|
|
17635
|
-
* `unknown` means the gate could
|
|
17539
|
+
* reported read-only, named, never written through this contract (D62) — e.g.
|
|
17540
|
+
* a slot whose sources act only while a wrapper is bound to the host, a
|
|
17541
|
+
* binding that belongs to `deviceManager.setWrapperActive`. No slot reports
|
|
17542
|
+
* one today (`linked-devices` answers `null`). `unknown` means the gate could
|
|
17543
|
+
* not be read; it is not "inactive" (D315).
|
|
17636
17544
|
*/
|
|
17637
17545
|
var ExtensionSlotActivationSchema = object({
|
|
17638
17546
|
state: _enum([
|
|
@@ -17648,7 +17556,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
|
|
|
17648
17556
|
/** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
|
|
17649
17557
|
slotRef: string(),
|
|
17650
17558
|
slot: ExtensionSlotIdSchema,
|
|
17651
|
-
/** Names the store written (D62), e.g. `
|
|
17559
|
+
/** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
|
|
17652
17560
|
authority: string(),
|
|
17653
17561
|
activation: ExtensionSlotActivationSchema.nullable(),
|
|
17654
17562
|
value: ExtensionSlotValueSchema,
|
|
@@ -17833,8 +17741,8 @@ var deviceStateCapability = {
|
|
|
17833
17741
|
* Canonical cross-layer WRITE for one cap-keyed slice. Used by
|
|
17834
17742
|
* everyone who needs to publish runtime state for a device:
|
|
17835
17743
|
* device providers (via `BaseDevice.runtimeState.setCapState`
|
|
17836
|
-
* which delegates here), system-scope addons (e.g. the
|
|
17837
|
-
*
|
|
17744
|
+
* which delegates here), system-scope addons (e.g. the orchestrator
|
|
17745
|
+
* writing a camera's effective `motion` slice, D696), and
|
|
17838
17746
|
* direct cap-router callers in tests.
|
|
17839
17747
|
*
|
|
17840
17748
|
* Behavior on the hub:
|
|
@@ -23994,12 +23902,26 @@ var CameraSensorRefSchema = object({
|
|
|
23994
23902
|
function cameraSensorRefKey(ref) {
|
|
23995
23903
|
return `${ref.addonId}/${ref.stableId}`;
|
|
23996
23904
|
}
|
|
23997
|
-
/**
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
23905
|
+
/**
|
|
23906
|
+
* A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
|
|
23907
|
+
* `replace`: its motion is the camera's, and while one is READY the camera's
|
|
23908
|
+
* own motion no longer counts on its own. `confirm`: while one is READY the
|
|
23909
|
+
* camera's own motion counts only while a confirm sensor is active — with or
|
|
23910
|
+
* without a replace sensor (spec C2, the controller's ruling on Q1).
|
|
23911
|
+
*/
|
|
23912
|
+
var CameraSensorModeSchema = _enum([
|
|
23913
|
+
"in-addition",
|
|
23914
|
+
"confirm",
|
|
23915
|
+
"replace"
|
|
23916
|
+
]);
|
|
23917
|
+
/** A stored sensor with no mode — every CS-1 row — is in addition. */
|
|
23918
|
+
var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
|
|
23919
|
+
/**
|
|
23920
|
+
* A camera's attached sensors. A CS-1 row carried an envelope
|
|
23921
|
+
* `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
|
|
23922
|
+
* what the write stores (D672 rule 3), so it is never written again.
|
|
23923
|
+
*/
|
|
23924
|
+
var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
|
|
24003
23925
|
const seen = /* @__PURE__ */ new Set();
|
|
24004
23926
|
value.sensors.forEach((ref, index) => {
|
|
24005
23927
|
const key = cameraSensorRefKey(ref);
|
|
@@ -24011,39 +23933,41 @@ var CameraSensorsConfigSchema = object({
|
|
|
24011
23933
|
seen.add(key);
|
|
24012
23934
|
});
|
|
24013
23935
|
});
|
|
24014
|
-
|
|
23936
|
+
/** Every attachment names its mode; an older orchestrator that does not is in addition. */
|
|
23937
|
+
var AttachmentFields = {
|
|
24015
23938
|
addonId: string(),
|
|
24016
|
-
stableId: string()
|
|
23939
|
+
stableId: string(),
|
|
23940
|
+
mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
|
|
24017
23941
|
};
|
|
24018
23942
|
var CameraSensorAttachmentSchema = discriminatedUnion("state", [
|
|
24019
23943
|
object({
|
|
24020
|
-
...
|
|
23944
|
+
...AttachmentFields,
|
|
24021
23945
|
state: literal("ready"),
|
|
24022
23946
|
deviceId: number(),
|
|
24023
23947
|
name: string(),
|
|
24024
23948
|
caps: array(string()).readonly()
|
|
24025
23949
|
}),
|
|
24026
23950
|
object({
|
|
24027
|
-
...
|
|
23951
|
+
...AttachmentFields,
|
|
24028
23952
|
state: literal("offline"),
|
|
24029
23953
|
deviceId: number(),
|
|
24030
23954
|
name: string(),
|
|
24031
23955
|
reason: _enum(["offline", "disabled"])
|
|
24032
23956
|
}),
|
|
24033
23957
|
object({
|
|
24034
|
-
...
|
|
23958
|
+
...AttachmentFields,
|
|
24035
23959
|
state: literal("missing"),
|
|
24036
23960
|
reason: string()
|
|
24037
23961
|
}),
|
|
24038
23962
|
object({
|
|
24039
|
-
...
|
|
23963
|
+
...AttachmentFields,
|
|
24040
23964
|
state: literal("unsupported"),
|
|
24041
23965
|
deviceId: number(),
|
|
24042
23966
|
name: string(),
|
|
24043
23967
|
reason: string()
|
|
24044
23968
|
}),
|
|
24045
23969
|
object({
|
|
24046
|
-
...
|
|
23970
|
+
...AttachmentFields,
|
|
24047
23971
|
state: literal("unreadable"),
|
|
24048
23972
|
reason: string()
|
|
24049
23973
|
})
|
|
@@ -24056,17 +23980,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
|
|
|
24056
23980
|
* say.
|
|
24057
23981
|
*/
|
|
24058
23982
|
var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
|
|
23983
|
+
/** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
|
|
23984
|
+
var CameraOwnMotionSchema = _enum([
|
|
23985
|
+
"always",
|
|
23986
|
+
"when-confirmed",
|
|
23987
|
+
"never"
|
|
23988
|
+
]);
|
|
23989
|
+
/** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
|
|
23990
|
+
var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
|
|
23991
|
+
/**
|
|
23992
|
+
* The camera's OWN onboard motion (D696): the raw input the bridge combines,
|
|
23993
|
+
* never the effective value. The camera's `motion` slice is the effective one,
|
|
23994
|
+
* so a view of the camera's own row reads this.
|
|
23995
|
+
* - `atMs`: when the bridge received the camera's last own edge.
|
|
23996
|
+
* - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
|
|
23997
|
+
* AND it is younger than the window the bridge counts the camera's own motion
|
|
23998
|
+
* for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
|
|
23999
|
+
* sends a clear (heartbeats only) therefore reads `false` once no push came
|
|
24000
|
+
* within the window; a status read is a snapshot, so a live view re-asks.
|
|
24001
|
+
* Absent = this orchestrator has not received the camera's own motion since it
|
|
24002
|
+
* started (unknown, never "quiet"), or an orchestrator older than D696.
|
|
24003
|
+
*/
|
|
24004
|
+
var CameraRawLevelSchema = object({
|
|
24005
|
+
detected: boolean(),
|
|
24006
|
+
atMs: number()
|
|
24007
|
+
});
|
|
24059
24008
|
var CameraSensorsStatusSchema = discriminatedUnion("state", [
|
|
24060
|
-
object({
|
|
24009
|
+
object({
|
|
24010
|
+
state: literal("not-configured"),
|
|
24011
|
+
cameraLevel: CameraRawLevelSchema.optional()
|
|
24012
|
+
}),
|
|
24061
24013
|
object({
|
|
24062
24014
|
state: literal("unreadable"),
|
|
24063
|
-
reason: string()
|
|
24015
|
+
reason: string(),
|
|
24016
|
+
cameraLevel: CameraRawLevelSchema.optional()
|
|
24064
24017
|
}),
|
|
24065
24018
|
object({
|
|
24066
24019
|
state: literal("configured"),
|
|
24067
|
-
|
|
24020
|
+
cameraLevel: CameraRawLevelSchema.optional(),
|
|
24068
24021
|
sensors: array(CameraSensorAttachmentSchema).readonly(),
|
|
24069
|
-
|
|
24022
|
+
/** Absent = an orchestrator older than CS-2: it does not say (D315). */
|
|
24023
|
+
cameraMotion: CameraOwnMotionSchema.optional(),
|
|
24024
|
+
notForwarded: CameraSensorsNotForwardedSchema.optional(),
|
|
24025
|
+
notEnforced: CameraSensorsNotEnforcedSchema.optional()
|
|
24070
24026
|
})
|
|
24071
24027
|
]);
|
|
24072
24028
|
Object.freeze({
|
|
@@ -28153,8 +28109,10 @@ var RunnerCameraConfigSchema = object({
|
|
|
28153
28109
|
* - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
|
|
28154
28110
|
* analyzer providers) running on decoded frames in this runner.
|
|
28155
28111
|
* - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
|
|
28156
|
-
* analytics). The provider emits ProviderMotion
|
|
28157
|
-
*
|
|
28112
|
+
* analytics). The provider emits its raw push as `ProviderMotion`
|
|
28113
|
+
* (D673); the orchestrator's camera-sensors bridge re-emits the camera's
|
|
28114
|
+
* effective motion as `MotionOnMotionChanged`, which is what reaches
|
|
28115
|
+
* `reportMotion`.
|
|
28158
28116
|
*/
|
|
28159
28117
|
motionSources: MotionSourcesSchema.default(["analyzer"]),
|
|
28160
28118
|
/**
|
|
@@ -28331,7 +28289,15 @@ var RunnerLocalLoadSchema = object({
|
|
|
28331
28289
|
hasGpu: boolean(),
|
|
28332
28290
|
inferenceBackend: string().optional(),
|
|
28333
28291
|
cpuCores: number().optional()
|
|
28334
|
-
})
|
|
28292
|
+
}),
|
|
28293
|
+
/**
|
|
28294
|
+
* Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
|
|
28295
|
+
* runner never writes it. ABSENT = a runner older than D696, which still
|
|
28296
|
+
* writes the slice from its phase machine; the orchestrator does not write
|
|
28297
|
+
* while any runner node is absent-or-unanswered, so one slice never has two
|
|
28298
|
+
* writers.
|
|
28299
|
+
*/
|
|
28300
|
+
motionSliceWriter: literal("orchestrator").optional()
|
|
28335
28301
|
});
|
|
28336
28302
|
/**
|
|
28337
28303
|
* Aggregate runtime metrics for the runner's whole local pool. Mirrors the
|
|
@@ -35488,6 +35454,70 @@ onStatusChanged: { data: object({
|
|
|
35488
35454
|
* whether persisting is worth a SQLite commit. */
|
|
35489
35455
|
volatileStateFields: ["lastChangedAt"]
|
|
35490
35456
|
};
|
|
35457
|
+
var DoorbellStatusSchema = object({
|
|
35458
|
+
/** Ms epoch of the last press. null = never observed since this provider started. */
|
|
35459
|
+
lastPressedAt: number().nullable(),
|
|
35460
|
+
/** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
|
|
35461
|
+
pressCountSinceStart: number()
|
|
35462
|
+
});
|
|
35463
|
+
var DoorbellPressEventSchema = object({
|
|
35464
|
+
deviceId: number(),
|
|
35465
|
+
timestamp: number()
|
|
35466
|
+
});
|
|
35467
|
+
/**
|
|
35468
|
+
* Doorbell button cap. Two kinds of provider serve it, and to every consumer
|
|
35469
|
+
* they are the same cap:
|
|
35470
|
+
*
|
|
35471
|
+
* - **Native** providers, registered per device by a driver addon through
|
|
35472
|
+
* `ctx.registerNativeCap` — a `DeviceType.Button` accessory with
|
|
35473
|
+
* `role: DeviceRole.Doorbell`, or the camera itself (Reolink registers at
|
|
35474
|
+
* camera level). They emit `onPressed` on every firmware ring.
|
|
35475
|
+
* - **A composed doorbell** (D670, D671): a camera's customization gives it
|
|
35476
|
+
* the cap, its `lastPressedAt` rising from the sources the operator
|
|
35477
|
+
* assigned in Customize → Doorbell, and the composer emits `onPressed`
|
|
35478
|
+
* from that field's advance (`fromState`).
|
|
35479
|
+
*
|
|
35480
|
+
* The DeviceEventPropagator re-emits `onPressed` on the camera parent.
|
|
35481
|
+
*/
|
|
35482
|
+
var doorbellCapability = {
|
|
35483
|
+
name: "doorbell",
|
|
35484
|
+
scope: "device",
|
|
35485
|
+
deviceNative: true,
|
|
35486
|
+
mode: "singleton",
|
|
35487
|
+
deviceTypes: [DeviceType.Button, DeviceType.Camera],
|
|
35488
|
+
methods: {},
|
|
35489
|
+
events: {
|
|
35490
|
+
/**
|
|
35491
|
+
* Fires once per physical press. Reolink delivers via Baichuan
|
|
35492
|
+
* push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
|
|
35493
|
+
* release/duration — it's a pulse.
|
|
35494
|
+
*/
|
|
35495
|
+
onPressed: {
|
|
35496
|
+
data: DoorbellPressEventSchema,
|
|
35497
|
+
fromState: {
|
|
35498
|
+
field: "lastPressedAt",
|
|
35499
|
+
on: "advance"
|
|
35500
|
+
}
|
|
35501
|
+
} },
|
|
35502
|
+
status: {
|
|
35503
|
+
schema: DoorbellStatusSchema,
|
|
35504
|
+
kind: "push"
|
|
35505
|
+
},
|
|
35506
|
+
/**
|
|
35507
|
+
* Runtime-state slice — last press timestamp + lifetime press count.
|
|
35508
|
+
* Mirrored by the kernel and readable via
|
|
35509
|
+
* `device.state.doorbell.value`. UIs can show "last ring 5m ago"
|
|
35510
|
+
* without subscribing.
|
|
35511
|
+
*/
|
|
35512
|
+
runtimeState: DoorbellStatusSchema,
|
|
35513
|
+
/**
|
|
35514
|
+
* 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.
|
|
35515
|
+
*
|
|
35516
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
35517
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
35518
|
+
*/
|
|
35519
|
+
durability: "restored"
|
|
35520
|
+
};
|
|
35491
35521
|
/**
|
|
35492
35522
|
* Enum-state sensor — a string value picked from a finite option set.
|
|
35493
35523
|
* Drives HA `sensor` entries with `state_class: enum` (HVAC action
|
|
@@ -37867,9 +37897,9 @@ var MotionStatusSchema = object({
|
|
|
37867
37897
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
37868
37898
|
lastDetectedAt: number().nullable(),
|
|
37869
37899
|
/**
|
|
37870
|
-
* `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device
|
|
37871
|
-
* `null` while false and on every `Sensor`
|
|
37872
|
-
* constant's doc for the one-authority rule.
|
|
37900
|
+
* `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
|
|
37901
|
+
* orchestrator writes it, D696), `null` while false and on every `Sensor`
|
|
37902
|
+
* device (D475) — see that constant's doc for the one-authority rule.
|
|
37873
37903
|
*
|
|
37874
37904
|
* ## Reading this field still arms nothing
|
|
37875
37905
|
*
|
|
@@ -37887,34 +37917,31 @@ var MotionStatusSchema = object({
|
|
|
37887
37917
|
* `addon-export-alexa/src/motion-clear-hold.ts` and
|
|
37888
37918
|
* `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
|
|
37889
37919
|
*
|
|
37890
|
-
* ## Who writes it
|
|
37891
|
-
*
|
|
37892
|
-
* - **Cameras** — the
|
|
37893
|
-
*
|
|
37894
|
-
* `
|
|
37895
|
-
* `
|
|
37896
|
-
*
|
|
37897
|
-
*
|
|
37898
|
-
* a
|
|
37899
|
-
*
|
|
37900
|
-
*
|
|
37901
|
-
*
|
|
37902
|
-
*
|
|
37903
|
-
*
|
|
37904
|
-
*
|
|
37905
|
-
*
|
|
37906
|
-
*
|
|
37907
|
-
*
|
|
37908
|
-
* `
|
|
37909
|
-
*
|
|
37910
|
-
*
|
|
37911
|
-
*
|
|
37912
|
-
*
|
|
37913
|
-
*
|
|
37914
|
-
*
|
|
37915
|
-
* This predates D475 and is not fixed there: the fix touches every
|
|
37916
|
-
* camera provider. Recorded in D475's Consequences. Do not restore the
|
|
37917
|
-
* "sole writer" wording without also removing the other writers.
|
|
37920
|
+
* ## Who writes it (D696)
|
|
37921
|
+
*
|
|
37922
|
+
* - **Cameras** — the orchestrator, and nothing else. It writes the camera's
|
|
37923
|
+
* EFFECTIVE motion (`addon-pipeline-orchestrator`
|
|
37924
|
+
* `camera-sensors/motion-slice.ts`), alongside the effective
|
|
37925
|
+
* `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
|
|
37926
|
+
* for a split camera, an unsplit emitter's direct event, the analyzer and
|
|
37927
|
+
* device activity, as the camera's `motionSources` counts them. A source
|
|
37928
|
+
* that never sends a clear falls one window after its last `true`.
|
|
37929
|
+
* `lastDetectedAt` moves only on an effective rise. No camera provider
|
|
37930
|
+
* writes this slice (not even a boot seed), and neither does the runner's
|
|
37931
|
+
* phase machine: its phase is "a session is attached" for every on-motion
|
|
37932
|
+
* session, not motion, and it now has its own `DetectionPhaseTransition`.
|
|
37933
|
+
* A provider's `isDetected` answers from the hub's slice.
|
|
37934
|
+
* - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
|
|
37935
|
+
* imports) — the provider pushes both edges itself, from the upstream
|
|
37936
|
+
* system's own state change. That is the sensor's own fact.
|
|
37937
|
+
*
|
|
37938
|
+
* `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
|
|
37939
|
+
* `motion` slice; each sensor writer is a named exemption.
|
|
37940
|
+
*
|
|
37941
|
+
* This replaces the D475 §4 rule ("the phase machine is the sole writer").
|
|
37942
|
+
* That rule was never true: Hikvision and Amcrest wrote the slice raw beside
|
|
37943
|
+
* it, every provider seeded it at boot, and every session left it
|
|
37944
|
+
* `detected: true` after its detach.
|
|
37918
37945
|
*/
|
|
37919
37946
|
autoClearAfterMs: number().nullable()
|
|
37920
37947
|
});
|
|
@@ -37986,11 +38013,12 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
|
|
|
37986
38013
|
*/
|
|
37987
38014
|
runtimeState: MotionStatusSchema,
|
|
37988
38015
|
/**
|
|
37989
|
-
* Runtime-state durability: **session** —
|
|
38016
|
+
* Runtime-state durability: **session** — the writer of this slice
|
|
37990
38017
|
* writes only on an EDGE, so a restored `detected: true` would stay
|
|
37991
38018
|
* frozen until the next one instead of being corrected. The next edge
|
|
37992
|
-
* re-publishes the real state
|
|
37993
|
-
*
|
|
38019
|
+
* re-publishes the real state, and the orchestrator re-publishes every
|
|
38020
|
+
* camera when it starts writing (D696; on who writes it, see
|
|
38021
|
+
* `autoClearAfterMs` above).
|
|
37994
38022
|
*
|
|
37995
38023
|
* See `RuntimeStateDurability`. Enforced by
|
|
37996
38024
|
* `scripts/check-runtime-state-durability.ts`.
|
|
@@ -40661,8 +40689,7 @@ var ptzAutotrackCapability = {
|
|
|
40661
40689
|
deviceNative: true,
|
|
40662
40690
|
mode: "singleton",
|
|
40663
40691
|
/**
|
|
40664
|
-
* Two kinds of provider behind one name, the same shape `snapshot`
|
|
40665
|
-
* `doorbell` use:
|
|
40692
|
+
* Two kinds of provider behind one name, the same shape `snapshot` uses:
|
|
40666
40693
|
*
|
|
40667
40694
|
* - **Native**: the camera's own firmware autotrack, registered per device by
|
|
40668
40695
|
* the driver when the probe says it exists (Reolink: yes; Hikvision:
|
|
@@ -40670,7 +40697,7 @@ var ptzAutotrackCapability = {
|
|
|
40670
40697
|
* - **Wrapper**: the emulated implementation (`@camstack/system`'s `autotrack` builtin),
|
|
40671
40698
|
* which follows a subject with `ptz.move` pulses driven by the detection
|
|
40672
40699
|
* pipeline. `defaultActive: false` — the operator binds it per camera in
|
|
40673
|
-
* the bindings UI
|
|
40700
|
+
* the bindings UI.
|
|
40674
40701
|
*
|
|
40675
40702
|
* The binding chooses WHICH implementation answers; `setEnabled` stays the
|
|
40676
40703
|
* one switch for the function either way. A camera never has both driving its
|
|
@@ -56901,6 +56928,7 @@ TimelapseRuleInputSchema.extend({
|
|
|
56901
56928
|
createdAt: number(),
|
|
56902
56929
|
updatedAt: number()
|
|
56903
56930
|
});
|
|
56931
|
+
MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
|
|
56904
56932
|
object({
|
|
56905
56933
|
/**
|
|
56906
56934
|
* Fraction of the box's own size added on EACH side before cutting.
|