@camstack/addon-admin-ui 1.0.5 → 1.0.7
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/assets/{AddLocationWizard-B5dkIoQ2.js → AddLocationWizard-BPXjVkoq.js} +1 -1
- package/dist/assets/{AddonCollectionPage-DVB69ClF.js → AddonCollectionPage-BHk_82L1.js} +1 -1
- package/dist/assets/{Addons-Bfvs6-g0.js → Addons-Bu6k7qrw.js} +1 -1
- package/dist/assets/{AdminTabs-BWNsXXy4.js → AdminTabs-C5BWg3Pz.js} +1 -1
- package/dist/assets/{BrokerForm-DYIjeusD.js → BrokerForm-CwBhT_Zu.js} +1 -1
- package/dist/assets/{BrokerStep-DjzuHh1z.js → BrokerStep-kInoZsZ8.js} +1 -1
- package/dist/assets/{Capabilities-hicnOVum.js → Capabilities-DazohgP2.js} +1 -1
- package/dist/assets/{CapabilityBadges-CSyidKVA.js → CapabilityBadges-CqlDFU27.js} +1 -1
- package/dist/assets/Cluster-vA3G3Xt-.js +1 -0
- package/dist/assets/{Dashboard-BkLuDhPq.js → Dashboard-CIarzGjr.js} +1 -1
- package/dist/assets/{Data-Beh_0Rmk.js → Data-CBUx81MG.js} +1 -1
- package/dist/assets/{DetectionIntelligence-BfxtDLUn.js → DetectionIntelligence-DmE8QQvK.js} +1 -1
- package/dist/assets/DeviceDetail-DqTWl3Kz.js +2 -0
- package/dist/assets/{Devices-DzX3RWXL.js → Devices-KDtIE02J.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-WJHXt2K5.js → EmbedPlayerPage-BcG6bilu.js} +1 -1
- package/dist/assets/{FormBuilder-C_FGp6fK.js → FormBuilder-DBTf1H_B.js} +1 -1
- package/dist/assets/Identity-CYHFXu1M.js +1 -0
- package/dist/assets/IntegrationDetail-DqViKcp6.js +1 -0
- package/dist/assets/{Integrations-DMJL2wGt.js → Integrations-BXICd-JI.js} +1 -1
- package/dist/assets/{Integrations-DdxCeVlW.js → Integrations-Cyg_bOkD.js} +1 -1
- package/dist/assets/{Logs-Czo2ju6R.js → Logs-kzrdYdPu.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DSz0ZQ3J.js → MotionZonesSettings-C1INb9Ec.js} +1 -1
- package/dist/assets/{MyAccess-CiRVe6o4.js → MyAccess-DvxBmUhb.js} +1 -1
- package/dist/assets/{Network-2_yW2eMz.js → Network-BEet8LbP.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-CWOXJvnI.js → NodeAddonsSettingsPanel-BU3fsQhW.js} +1 -1
- package/dist/assets/Pipeline-C460Q1dM.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-CrWASNzq.js → PrivacyMaskSettings-Isrt2Rzc.js} +1 -1
- package/dist/assets/{ProviderIcon-DU7EkOsQ.js → ProviderIcon-BS00rCO4.js} +1 -1
- package/dist/assets/{Settings-Ba4e7VPd.js → Settings-BPtVhsDv.js} +1 -1
- package/dist/assets/{Showroom-fzNXeqzs.js → Showroom-qtUMm-lj.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-OIn_kS_J.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BCWO2hJt.js} +1 -1
- package/dist/assets/{bell-PpkN_TgJ.js → bell-CRa7XWAs.js} +1 -1
- package/dist/assets/circle-check-big-Ca1L631f.js +1 -0
- package/dist/assets/{copy-D3XNVDYo.js → copy-Bi-BgxBp.js} +1 -1
- package/dist/assets/{dist-DyYmhGqc.js → dist-B82tlPWR.js} +1 -1
- package/dist/assets/dist-B8KtyWbO.js +1 -0
- package/dist/assets/{download-BHYjG90K.js → download-Bq_ArgRU.js} +1 -1
- package/dist/assets/esm-C6_--ziT.js +7 -0
- package/dist/assets/{hostInit-BykkFKC1.js → hostInit-B8ISRO-X.js} +1 -1
- package/dist/assets/{index-DpTstpp_.js → index-D5OTguVm.js} +3 -3
- package/dist/assets/index-D5fms8eH.css +2 -0
- package/dist/assets/{key-round-Dn1oOWgV.js → key-round-DdK6mTCz.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-04dcd8db.js → mf-entry-bootstrap-0-ebe1e057.js} +2 -2
- package/dist/assets/{pencil-Kbj4_JBR.js → pencil-WwVUhRC9.js} +1 -1
- package/dist/assets/{player-overlays-zGqQhGgE.js → player-overlays-ZG1nYuYj.js} +1 -1
- package/dist/assets/plus-D2fCWFPc.js +1 -0
- package/dist/assets/{radio-CTfNJnG5.js → radio-B8E0UhzS.js} +1 -1
- package/dist/assets/{refresh-cw-BnmOdHXx.js → refresh-cw-DewUBhjl.js} +1 -1
- package/dist/assets/remoteEntry-vWrz4ebK.js +1 -0
- package/dist/assets/{rotate-ccw-UF_FErzF.js → rotate-ccw-CZ8RwUso.js} +1 -1
- package/dist/assets/rotate-cw-DiyghCam.js +1 -0
- package/dist/assets/search-DZ8Fw9-F.js +1 -0
- package/dist/assets/{server-DK5PS_QF.js → server-DnaOYw5t.js} +1 -1
- package/dist/assets/{sparkles-B5Duaxbv.js → sparkles-D9CcRRON.js} +1 -1
- package/dist/assets/square-CO0xPDBD.js +1 -0
- package/dist/assets/{square-check-big-qiutr_Ci.js → square-check-big-9Ki4zQ6C.js} +1 -1
- package/dist/assets/src-BB1LG2-C.js +34 -0
- package/dist/assets/src-Cno9Ci3x.js +1 -0
- package/dist/assets/{upload-Btk1HMIN.js → upload-DHwenRyJ.js} +1 -1
- package/dist/assets/{useDevice-uoMH2oPD.js → useDevice-BuSIXBXp.js} +1 -1
- package/dist/assets/{useEventInvalidation-DDUSWISR.js → useEventInvalidation-wNGhDdi_.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-s1j_uW8u.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-OHA5nJNY.js} +2 -2
- package/dist/assets/{wifi-DH-9OMrB.js → wifi-BJgMgcFe.js} +1 -1
- package/dist/assets/{zap-Cpoh2hjh.js → zap-BAH9oFRn.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +1299 -1074
- package/package.json +1 -1
- package/dist/assets/Cluster-AyC6G6sS.js +0 -7
- package/dist/assets/DeviceDetail-DGlm0ka0.js +0 -2
- package/dist/assets/Identity-oMA7lRlr.js +0 -1
- package/dist/assets/IntegrationDetail-DUzh5vXL.js +0 -1
- package/dist/assets/Pipeline-MNGNVhOO.js +0 -1
- package/dist/assets/circle-check-big-BzSkZiMj.js +0 -1
- package/dist/assets/dist-CyLsBIs8.js +0 -1
- package/dist/assets/index-COZOEwaJ.css +0 -2
- package/dist/assets/plus-CPqVcqUV.js +0 -1
- package/dist/assets/remoteEntry-BKwb226y.js +0 -1
- package/dist/assets/rotate-cw-B4szmAxG.js +0 -1
- package/dist/assets/search-C07n9Z2S.js +0 -1
- package/dist/assets/square-Bex0hnGW.js +0 -1
- package/dist/assets/src-DqOo0bwK.js +0 -1
- package/dist/assets/src-Dxc7AUYA.js +0 -34
package/dist/server/addon.js
CHANGED
|
@@ -4629,63 +4629,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4629
4629
|
return inst;
|
|
4630
4630
|
}
|
|
4631
4631
|
//#endregion
|
|
4632
|
-
//#region ../types/dist/
|
|
4633
|
-
/**
|
|
4634
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4635
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4636
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4637
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4638
|
-
*
|
|
4639
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4640
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4641
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4642
|
-
*/
|
|
4643
|
-
/** What kind of target a probe addressed. */
|
|
4644
|
-
var wiringProbeKindSchema = _enum([
|
|
4645
|
-
"singleton",
|
|
4646
|
-
"device",
|
|
4647
|
-
"widget"
|
|
4648
|
-
]);
|
|
4649
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4650
|
-
var wiringProbeResultSchema = object({
|
|
4651
|
-
capName: string(),
|
|
4652
|
-
kind: wiringProbeKindSchema,
|
|
4653
|
-
deviceId: number().optional(),
|
|
4654
|
-
reachable: boolean(),
|
|
4655
|
-
latencyMs: number(),
|
|
4656
|
-
error: string().optional()
|
|
4657
|
-
});
|
|
4658
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4659
|
-
var wiringAddonHealthSchema = object({
|
|
4660
|
-
addonId: string(),
|
|
4661
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4662
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4663
|
-
});
|
|
4664
|
-
/** Per-node roll-up. */
|
|
4665
|
-
var wiringNodeHealthSchema = object({
|
|
4666
|
-
nodeId: string(),
|
|
4667
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4668
|
-
});
|
|
4669
|
-
object({
|
|
4670
|
-
/** True only when every probed target is reachable. */
|
|
4671
|
-
ok: boolean(),
|
|
4672
|
-
/** True when at least one target is unreachable. */
|
|
4673
|
-
degraded: boolean(),
|
|
4674
|
-
checkedAt: string(),
|
|
4675
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4676
|
-
summary: object({
|
|
4677
|
-
total: number(),
|
|
4678
|
-
reachable: number(),
|
|
4679
|
-
unreachable: number()
|
|
4680
|
-
})
|
|
4681
|
-
});
|
|
4682
|
-
var MODEL_FORMATS = [
|
|
4683
|
-
"onnx",
|
|
4684
|
-
"coreml",
|
|
4685
|
-
"openvino",
|
|
4686
|
-
"tflite",
|
|
4687
|
-
"pt"
|
|
4688
|
-
];
|
|
4632
|
+
//#region ../types/dist/sleep-D7JeS58T.mjs
|
|
4689
4633
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4690
4634
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4691
4635
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -4983,6 +4927,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
4983
4927
|
*/
|
|
4984
4928
|
EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
|
|
4985
4929
|
/**
|
|
4930
|
+
* Per-node detection-engine runtime-provisioning transition. Emitted by
|
|
4931
|
+
* the detection-pipeline provider on every state change of its lazy
|
|
4932
|
+
* engine-provisioning machine (idle → installing → verifying → ready,
|
|
4933
|
+
* or → failed with a `nextRetryAt`). Payload is the
|
|
4934
|
+
* `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
|
|
4935
|
+
* node. The Pipeline page subscribes to drive a live "installing
|
|
4936
|
+
* OpenVINO… / ready" indicator per node without polling
|
|
4937
|
+
* `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
|
|
4938
|
+
* also reads the cap snapshot on mount / reconnect. Phase 2.
|
|
4939
|
+
*/
|
|
4940
|
+
EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
|
|
4941
|
+
/**
|
|
4986
4942
|
* Cluster topology snapshot. Carries the same payload returned by
|
|
4987
4943
|
* `nodes.topology` (every reachable node + addons + processes).
|
|
4988
4944
|
* Emitted by the hub on any agent / addon lifecycle change
|
|
@@ -5996,7 +5952,7 @@ var ProfileSlotSchema = object({
|
|
|
5996
5952
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
5997
5953
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
5998
5954
|
*/
|
|
5999
|
-
var StreamSourceEntrySchema = object({
|
|
5955
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6000
5956
|
id: string(),
|
|
6001
5957
|
label: string(),
|
|
6002
5958
|
protocol: _enum([
|
|
@@ -6218,894 +6174,1089 @@ var ProfileRtspEntrySchema = object({
|
|
|
6218
6174
|
codec: string().optional(),
|
|
6219
6175
|
resolution: CamStreamResolutionSchema.optional()
|
|
6220
6176
|
});
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
]
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
*
|
|
6243
|
-
*
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
*
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
*
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
"
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
]
|
|
6256
|
-
/**
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
*
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
*
|
|
6266
|
-
*
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
*
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
*
|
|
6278
|
-
*
|
|
6279
|
-
*
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
*/
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
/**
|
|
6305
|
-
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6306
|
-
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6307
|
-
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6308
|
-
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6309
|
-
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6310
|
-
* shared by every camera writing to that volume.
|
|
6311
|
-
*/
|
|
6312
|
-
var RecordingRetentionSchema = object({
|
|
6313
|
-
maxAgeDays: number().min(0).optional(),
|
|
6314
|
-
maxSizeGb: number().min(0).optional()
|
|
6315
|
-
});
|
|
6316
|
-
/**
|
|
6317
|
-
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6318
|
-
*
|
|
6319
|
-
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6320
|
-
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6321
|
-
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6322
|
-
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6323
|
-
*/
|
|
6324
|
-
var RecordingConfigSchema = object({
|
|
6325
|
-
enabled: boolean(),
|
|
6326
|
-
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6327
|
-
* `migrateRulesToMode`, then persisted. */
|
|
6328
|
-
mode: RecordingStorageModeSchema.optional(),
|
|
6329
|
-
profiles: array(CamProfileSchema).optional(),
|
|
6330
|
-
segmentSeconds: number().int().positive().optional(),
|
|
6331
|
-
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
6332
|
-
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
6333
|
-
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
6334
|
-
schedules: array(RecordingScheduleSchema).optional(),
|
|
6335
|
-
/** Legacy single-band predecessor of `schedules`. Read-compat only — it is
|
|
6336
|
-
* normalized into `schedules` on read and never written going forward. (Not
|
|
6337
|
-
* tagged `@deprecated`: the normalization paths must read it cast-free.) */
|
|
6338
|
-
schedule: RecordingScheduleSchema.optional(),
|
|
6339
|
-
/** `events`-mode only — which detectors trigger a recording. */
|
|
6340
|
-
triggers: RecordingTriggersSchema.optional(),
|
|
6341
|
-
/** `events`-mode only — seconds retained before / after a trigger. */
|
|
6342
|
-
preBufferSec: number().min(0).optional(),
|
|
6343
|
-
postBufferSec: number().min(0).optional(),
|
|
6344
|
-
/** DEPRECATED authoring input; retained for migration/transition. */
|
|
6345
|
-
rules: array(RecordingRuleSchema).optional(),
|
|
6346
|
-
/**
|
|
6347
|
-
* AUTHORITATIVE mode-per-band recording model (recorder). When present it
|
|
6348
|
-
* is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
|
|
6349
|
-
* `triggers`/`rules` fields above are kept for READ-COMPAT only and are
|
|
6350
|
-
* derived into bands once via `migrateConfigToBands`.
|
|
6351
|
-
*/
|
|
6352
|
-
bands: array(RecordingBandSchema).optional(),
|
|
6353
|
-
retention: RecordingRetentionSchema.optional()
|
|
6354
|
-
});
|
|
6355
|
-
/**
|
|
6356
|
-
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
6357
|
-
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
6358
|
-
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
6359
|
-
* without forming a circular import. The `storage` cap re-exports it
|
|
6360
|
-
* verbatim for back-compat.
|
|
6361
|
-
*
|
|
6362
|
-
* This Zod schema is the **authoritative source** for `StorageLocationType`.
|
|
6363
|
-
* The TS alias in `./storage.ts` re-exports `z.infer<typeof
|
|
6364
|
-
* StorageLocationTypeSchema>` so the wire surface (cap) and the legacy
|
|
6365
|
-
* `IStorageProvider` interface stay in lockstep.
|
|
6366
|
-
*
|
|
6367
|
-
* The type is now an **open string** (not a closed enum) — addons declare
|
|
6368
|
-
* their own location kinds via `StorageLocationDeclaration.id`. The regex
|
|
6369
|
-
* enforces a safe id format: lowercase-start, alphanumeric + hyphens.
|
|
6370
|
-
*/
|
|
6371
|
-
var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
6372
|
-
/**
|
|
6373
|
-
* Persisted record for a storage location instance. Operators can register
|
|
6374
|
-
* multiple instances for multi-cardinality types (e.g. two `backups`
|
|
6375
|
-
* locations with different `providerId`s). Cardinality is now declared per
|
|
6376
|
-
* location via `StorageLocationDeclaration.cardinality` — the static
|
|
6377
|
-
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
6378
|
-
*
|
|
6379
|
-
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
6380
|
-
* The default location for a type uses `id === <type>:default` by
|
|
6381
|
-
* convention (the bare type ref like `'backups'` resolves to it).
|
|
6382
|
-
*
|
|
6383
|
-
* `isSystem: true` marks a location as orchestrator-seeded and
|
|
6384
|
-
* undeletable. The bootstrap-installed defaults (one per type) carry
|
|
6385
|
-
* this flag; operator-added locations don't. Editing the config of
|
|
6386
|
-
* a system location is allowed (path migration, provider swap) but
|
|
6387
|
-
* deleting it is rejected at the cap level.
|
|
6388
|
-
*/
|
|
6389
|
-
var StorageLocationSchema = object({
|
|
6390
|
-
id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
|
|
6391
|
-
type: string(),
|
|
6392
|
-
displayName: string().min(1),
|
|
6393
|
-
providerId: string().min(1),
|
|
6394
|
-
config: record(string(), unknown()),
|
|
6395
|
-
/**
|
|
6396
|
-
* Cluster node this location physically lives on. REQUIRED for node-local
|
|
6397
|
-
* providers (filesystem — the path exists on one node's disk), null/absent
|
|
6398
|
-
* for node-agnostic providers (S3/SFTP/WebDAV, reachable from any node).
|
|
6399
|
-
* `'hub'` is the hub node. Validated against the provider's `nodeLocal`
|
|
6400
|
-
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
6401
|
-
*/
|
|
6402
|
-
nodeId: string().optional(),
|
|
6403
|
-
isDefault: boolean().default(false),
|
|
6404
|
-
isSystem: boolean().default(false),
|
|
6405
|
-
createdAt: number(),
|
|
6406
|
-
updatedAt: number()
|
|
6407
|
-
});
|
|
6408
|
-
/**
|
|
6409
|
-
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
6410
|
-
* Either:
|
|
6411
|
-
* - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
|
|
6412
|
-
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
6413
|
-
*
|
|
6414
|
-
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
6415
|
-
*/
|
|
6416
|
-
var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]);
|
|
6417
|
-
/**
|
|
6418
|
-
* `StorageLocationDeclaration` — a single storage-location entry declared by
|
|
6419
|
-
* an addon in its `package.json` under `camstack.storageLocations`.
|
|
6420
|
-
*
|
|
6421
|
-
* Design intent:
|
|
6422
|
-
* - **Addon declares its needs** — each addon describes the logical storage
|
|
6423
|
-
* slots it requires (e.g. `recordings`, `recordingsLow`) without caring
|
|
6424
|
-
* about the physical path.
|
|
6425
|
-
* - **Kernel aggregates** — at boot the kernel collects declarations from all
|
|
6426
|
-
* installed addons, deduplicates by `id`, and exposes the union via the
|
|
6427
|
-
* storage-locations settings surface.
|
|
6428
|
-
* - **Orchestrator seeds** — for every declared `id` the orchestrator ensures
|
|
6429
|
-
* at least one instance named `<id>:default` is present, using
|
|
6430
|
-
* `defaultsTo` to inherit the resolved root from another location when the
|
|
6431
|
-
* declaration is a derivative slot (e.g. `recordingsLow` defaults to
|
|
6432
|
-
* `recordings`).
|
|
6433
|
-
* - **ids are global** — `id` values are shared across the entire deployment;
|
|
6434
|
-
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
6435
|
-
* at kernel aggregation time, not here).
|
|
6436
|
-
*/
|
|
6437
|
-
var StorageLocationDeclarationSchema = object({
|
|
6438
|
-
/**
|
|
6439
|
-
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
6440
|
-
* Must start with a lowercase letter and may contain letters, digits, and
|
|
6441
|
-
* hyphens.
|
|
6442
|
-
*/
|
|
6443
|
-
id: string().regex(/^[a-z][a-zA-Z0-9-]*$/, { message: "id must start with a lowercase letter and contain only letters, digits, or hyphens" }),
|
|
6444
|
-
/** Human-readable name shown in the admin UI. */
|
|
6445
|
-
displayName: string().min(1, { message: "displayName must not be empty" }),
|
|
6446
|
-
/** Optional longer explanation of what data this location stores. */
|
|
6447
|
-
description: string().optional(),
|
|
6448
|
-
/**
|
|
6449
|
-
* `single` — exactly one instance of this location is allowed system-wide
|
|
6450
|
-
* (e.g. `logs`, `models`). The operator can edit it but not add more.
|
|
6451
|
-
* `multi` — the operator may register several instances (e.g. a second
|
|
6452
|
-
* `recordings` on a NAS for disk tiering); one is the default at any time.
|
|
6453
|
-
*/
|
|
6454
|
-
cardinality: _enum(["single", "multi"]),
|
|
6455
|
-
/**
|
|
6456
|
-
* When set, the default instance for this location inherits its resolved
|
|
6457
|
-
* root from the named location's default instance. Useful for derivative
|
|
6458
|
-
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
6459
|
-
* configure the primary location.
|
|
6460
|
-
*/
|
|
6461
|
-
defaultsTo: string().optional()
|
|
6462
|
-
});
|
|
6463
|
-
var DecoderStatsSchema = object({
|
|
6464
|
-
inputFps: number(),
|
|
6465
|
-
outputFps: number(),
|
|
6466
|
-
avgDecodeTimeMs: number(),
|
|
6467
|
-
droppedFrames: number()
|
|
6468
|
-
});
|
|
6469
|
-
var DecoderSessionConfigSchema = object({
|
|
6470
|
-
codec: string(),
|
|
6471
|
-
maxFps: number().default(0),
|
|
6472
|
-
outputFormat: _enum([
|
|
6473
|
-
"jpeg",
|
|
6474
|
-
"rgb",
|
|
6475
|
-
"bgr",
|
|
6476
|
-
"yuv420",
|
|
6477
|
-
"gray"
|
|
6478
|
-
]).default("jpeg"),
|
|
6479
|
-
scale: number().default(1),
|
|
6480
|
-
width: number().optional(),
|
|
6481
|
-
height: number().optional(),
|
|
6177
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6178
|
+
DeviceType["Camera"] = "camera";
|
|
6179
|
+
DeviceType["Hub"] = "hub";
|
|
6180
|
+
DeviceType["Light"] = "light";
|
|
6181
|
+
DeviceType["Siren"] = "siren";
|
|
6182
|
+
DeviceType["Switch"] = "switch";
|
|
6183
|
+
DeviceType["Sensor"] = "sensor";
|
|
6184
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6185
|
+
DeviceType["Button"] = "button";
|
|
6186
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6187
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6188
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6189
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6190
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6191
|
+
/** Firmware/software update entity — current vs available version,
|
|
6192
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6193
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6194
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6195
|
+
DeviceType["Update"] = "update";
|
|
6196
|
+
DeviceType["Generic"] = "generic";
|
|
6197
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6198
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6199
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6200
|
+
DeviceType["Notifier"] = "notifier";
|
|
6201
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6202
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6203
|
+
DeviceType["Script"] = "script";
|
|
6204
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6205
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6206
|
+
DeviceType["Automation"] = "automation";
|
|
6207
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6208
|
+
DeviceType["Lock"] = "lock";
|
|
6209
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6210
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6211
|
+
DeviceType["Cover"] = "cover";
|
|
6212
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6213
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6214
|
+
* modelled on the same open/closed lifecycle. */
|
|
6215
|
+
DeviceType["Valve"] = "valve";
|
|
6216
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6217
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6218
|
+
* modelled on the same target / mode lifecycle. */
|
|
6219
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6220
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6221
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6222
|
+
* climate-family actuator. */
|
|
6223
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6224
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6225
|
+
DeviceType["Fan"] = "fan";
|
|
6226
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6227
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6228
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6229
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6230
|
+
* `alarm-panel` cap. */
|
|
6231
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6232
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6233
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6234
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6235
|
+
* TextControl / DateTimeControl. */
|
|
6236
|
+
DeviceType["Control"] = "control";
|
|
6237
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6238
|
+
* `presence` cap. */
|
|
6239
|
+
DeviceType["Presence"] = "presence";
|
|
6240
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6241
|
+
* `weather` cap. */
|
|
6242
|
+
DeviceType["Weather"] = "weather";
|
|
6243
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6244
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6245
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6246
|
+
* `lawn-mower-control` cap. */
|
|
6247
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6248
|
+
/** Physical HA device group — parent container for entity-children
|
|
6249
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6250
|
+
* standalone device; exists only to anchor child entities. */
|
|
6251
|
+
DeviceType["Container"] = "container";
|
|
6252
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6253
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6254
|
+
DeviceType["Image"] = "image";
|
|
6255
|
+
return DeviceType;
|
|
6256
|
+
}({});
|
|
6257
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6258
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6259
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6482
6260
|
/**
|
|
6483
|
-
*
|
|
6484
|
-
*
|
|
6485
|
-
*
|
|
6486
|
-
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
6487
|
-
* sendPacket errors on a single hung camera).
|
|
6261
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6262
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6263
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6488
6264
|
*/
|
|
6489
|
-
|
|
6265
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6266
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6267
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6268
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6269
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6490
6270
|
/**
|
|
6491
|
-
*
|
|
6492
|
-
* `
|
|
6493
|
-
*
|
|
6494
|
-
*
|
|
6271
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6272
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6273
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6274
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6275
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6276
|
+
* driver sets this feature when probe confirms the firmware
|
|
6277
|
+
* surface, and registers the cap in the same code path.
|
|
6495
6278
|
*/
|
|
6496
|
-
|
|
6279
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6497
6280
|
/**
|
|
6498
|
-
*
|
|
6281
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6282
|
+
* motion detection automatically activates this device. Mirrors
|
|
6283
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6284
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6499
6285
|
*
|
|
6500
|
-
*
|
|
6501
|
-
*
|
|
6502
|
-
*
|
|
6503
|
-
* into an OS shared-memory ring and drained as zero-pixel
|
|
6504
|
-
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
6505
|
-
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
6506
|
-
* `pullHandles` returns nothing for a `'callback'` session.
|
|
6507
|
-
*/
|
|
6508
|
-
frameSink: _enum(["callback", "shm"]).default("callback")
|
|
6509
|
-
});
|
|
6510
|
-
var EncodeProfileSchema = object({
|
|
6511
|
-
video: object({
|
|
6512
|
-
codec: _enum([
|
|
6513
|
-
"h264",
|
|
6514
|
-
"h265",
|
|
6515
|
-
"copy"
|
|
6516
|
-
]),
|
|
6517
|
-
profile: _enum([
|
|
6518
|
-
"baseline",
|
|
6519
|
-
"main",
|
|
6520
|
-
"high"
|
|
6521
|
-
]).optional(),
|
|
6522
|
-
width: number().int().positive().optional(),
|
|
6523
|
-
height: number().int().positive().optional(),
|
|
6524
|
-
fps: number().positive().optional(),
|
|
6525
|
-
bitrateKbps: number().int().positive().optional(),
|
|
6526
|
-
gopFrames: number().int().positive().optional(),
|
|
6527
|
-
bf: number().int().min(0).optional(),
|
|
6528
|
-
preset: _enum([
|
|
6529
|
-
"ultrafast",
|
|
6530
|
-
"superfast",
|
|
6531
|
-
"veryfast",
|
|
6532
|
-
"faster",
|
|
6533
|
-
"fast",
|
|
6534
|
-
"medium"
|
|
6535
|
-
]).optional(),
|
|
6536
|
-
tune: _enum([
|
|
6537
|
-
"zerolatency",
|
|
6538
|
-
"film",
|
|
6539
|
-
"animation"
|
|
6540
|
-
]).optional()
|
|
6541
|
-
}),
|
|
6542
|
-
audio: union([literal("passthrough"), object({
|
|
6543
|
-
codec: _enum([
|
|
6544
|
-
"opus",
|
|
6545
|
-
"aac",
|
|
6546
|
-
"pcmu",
|
|
6547
|
-
"pcma",
|
|
6548
|
-
"copy"
|
|
6549
|
-
]),
|
|
6550
|
-
bitrateKbps: number().int().positive().optional(),
|
|
6551
|
-
sampleRateHz: number().int().positive().optional(),
|
|
6552
|
-
channels: union([literal(1), literal(2)]).optional()
|
|
6553
|
-
})]),
|
|
6554
|
-
/**
|
|
6555
|
-
* ffmpeg input-side args, inserted between the fixed global flags
|
|
6556
|
-
* (`-hide_banner -loglevel error`) and `-i pipe:0`. Free-text array
|
|
6557
|
-
* — the widget surfaces a textarea + suggestion chips for the most-
|
|
6558
|
-
* used demuxer/format options.
|
|
6559
|
-
*/
|
|
6560
|
-
inputArgs: array(string()).optional(),
|
|
6561
|
-
/**
|
|
6562
|
-
* ffmpeg output-side args, inserted between the encode block and
|
|
6563
|
-
* the final `-f <muxer> pipe:1`. Use for muxer options, bitstream
|
|
6564
|
-
* filters, codec-specific overrides. Free-text array.
|
|
6286
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6287
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6288
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6565
6289
|
*/
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
"Heavy engine (low frequency)": "engine",
|
|
6729
|
-
"Lawn mower": "engine",
|
|
6730
|
-
Chainsaw: "engine",
|
|
6731
|
-
Hammer: "tools",
|
|
6732
|
-
Jackhammer: "tools",
|
|
6733
|
-
Sawing: "tools",
|
|
6734
|
-
"Power tool": "tools",
|
|
6735
|
-
Drill: "tools",
|
|
6736
|
-
Sanding: "tools",
|
|
6737
|
-
Silence: "silence"
|
|
6738
|
-
},
|
|
6739
|
-
preserveOriginal: false
|
|
6740
|
-
};
|
|
6741
|
-
var APPLE_SA_TO_MACRO = {
|
|
6742
|
-
mapping: {
|
|
6743
|
-
speech: "speech",
|
|
6744
|
-
child_speech: "speech",
|
|
6745
|
-
conversation: "speech",
|
|
6746
|
-
whispering: "speech",
|
|
6747
|
-
singing: "speech",
|
|
6748
|
-
humming: "speech",
|
|
6749
|
-
shout: "scream",
|
|
6750
|
-
yell: "scream",
|
|
6751
|
-
screaming: "scream",
|
|
6752
|
-
crying: "crying",
|
|
6753
|
-
baby_crying: "crying",
|
|
6754
|
-
sobbing: "crying",
|
|
6755
|
-
laughter: "laughter",
|
|
6756
|
-
baby_laughter: "laughter",
|
|
6757
|
-
giggling: "laughter",
|
|
6758
|
-
music: "music",
|
|
6759
|
-
guitar: "music",
|
|
6760
|
-
piano: "music",
|
|
6761
|
-
drums: "music",
|
|
6762
|
-
dog_bark: "dog",
|
|
6763
|
-
dog_bow_wow: "dog",
|
|
6764
|
-
dog_growling: "dog",
|
|
6765
|
-
dog_howl: "dog",
|
|
6766
|
-
cat_meow: "cat",
|
|
6767
|
-
cat_purr: "cat",
|
|
6768
|
-
cat_hiss: "cat",
|
|
6769
|
-
bird: "bird",
|
|
6770
|
-
bird_chirp: "bird",
|
|
6771
|
-
bird_squawk: "bird",
|
|
6772
|
-
animal: "animal",
|
|
6773
|
-
horse: "animal",
|
|
6774
|
-
cow_moo: "animal",
|
|
6775
|
-
insect: "animal",
|
|
6776
|
-
alarm: "alarm",
|
|
6777
|
-
smoke_alarm: "alarm",
|
|
6778
|
-
fire_alarm: "alarm",
|
|
6779
|
-
car_alarm: "alarm",
|
|
6780
|
-
siren: "siren",
|
|
6781
|
-
police_siren: "siren",
|
|
6782
|
-
ambulance_siren: "siren",
|
|
6783
|
-
doorbell: "doorbell",
|
|
6784
|
-
door_knock: "doorbell",
|
|
6785
|
-
knocking: "doorbell",
|
|
6786
|
-
glass_breaking: "glass_breaking",
|
|
6787
|
-
glass_shatter: "glass_breaking",
|
|
6788
|
-
gunshot: "gunshot",
|
|
6789
|
-
explosion: "gunshot",
|
|
6790
|
-
fireworks: "gunshot",
|
|
6791
|
-
car: "vehicle",
|
|
6792
|
-
truck: "vehicle",
|
|
6793
|
-
motorcycle: "vehicle",
|
|
6794
|
-
car_horn: "vehicle",
|
|
6795
|
-
vehicle_horn: "vehicle",
|
|
6796
|
-
traffic: "vehicle",
|
|
6797
|
-
fire: "fire",
|
|
6798
|
-
fire_crackle: "fire",
|
|
6799
|
-
water: "water",
|
|
6800
|
-
rain: "water",
|
|
6801
|
-
ocean: "water",
|
|
6802
|
-
splash: "water",
|
|
6803
|
-
wind: "wind",
|
|
6804
|
-
thunder: "wind",
|
|
6805
|
-
thunderstorm: "wind",
|
|
6806
|
-
door: "door",
|
|
6807
|
-
door_slam: "door",
|
|
6808
|
-
sliding_door: "door",
|
|
6809
|
-
footsteps: "footsteps",
|
|
6810
|
-
walking: "footsteps",
|
|
6811
|
-
running: "footsteps",
|
|
6812
|
-
crowd: "crowd",
|
|
6813
|
-
chatter: "crowd",
|
|
6814
|
-
cheering: "crowd",
|
|
6815
|
-
applause: "crowd",
|
|
6816
|
-
telephone_ring: "telephone",
|
|
6817
|
-
ringtone: "telephone",
|
|
6818
|
-
engine: "engine",
|
|
6819
|
-
engine_starting: "engine",
|
|
6820
|
-
lawn_mower: "engine",
|
|
6821
|
-
chainsaw: "engine",
|
|
6822
|
-
hammer: "tools",
|
|
6823
|
-
jackhammer: "tools",
|
|
6824
|
-
drill: "tools",
|
|
6825
|
-
power_tool: "tools",
|
|
6826
|
-
silence: "silence"
|
|
6827
|
-
},
|
|
6828
|
-
preserveOriginal: false
|
|
6829
|
-
};
|
|
6830
|
-
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6831
|
-
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6832
|
-
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6833
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6834
|
-
DeviceType["Camera"] = "camera";
|
|
6835
|
-
DeviceType["Hub"] = "hub";
|
|
6836
|
-
DeviceType["Light"] = "light";
|
|
6837
|
-
DeviceType["Siren"] = "siren";
|
|
6838
|
-
DeviceType["Switch"] = "switch";
|
|
6839
|
-
DeviceType["Sensor"] = "sensor";
|
|
6840
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6841
|
-
DeviceType["Button"] = "button";
|
|
6842
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6843
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6844
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6845
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6846
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6847
|
-
/** Firmware/software update entity — current vs available version,
|
|
6848
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6849
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6850
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6851
|
-
DeviceType["Update"] = "update";
|
|
6852
|
-
DeviceType["Generic"] = "generic";
|
|
6853
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6854
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6855
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6856
|
-
DeviceType["Notifier"] = "notifier";
|
|
6857
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6858
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6859
|
-
DeviceType["Script"] = "script";
|
|
6860
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6861
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6862
|
-
DeviceType["Automation"] = "automation";
|
|
6863
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6864
|
-
DeviceType["Lock"] = "lock";
|
|
6865
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6866
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6867
|
-
DeviceType["Cover"] = "cover";
|
|
6868
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6869
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6870
|
-
* modelled on the same open/closed lifecycle. */
|
|
6871
|
-
DeviceType["Valve"] = "valve";
|
|
6872
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6873
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6874
|
-
* modelled on the same target / mode lifecycle. */
|
|
6875
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6876
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6877
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6878
|
-
* climate-family actuator. */
|
|
6879
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6880
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6881
|
-
DeviceType["Fan"] = "fan";
|
|
6882
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6883
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6884
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6885
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6886
|
-
* `alarm-panel` cap. */
|
|
6887
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6888
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6889
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6890
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6891
|
-
* TextControl / DateTimeControl. */
|
|
6892
|
-
DeviceType["Control"] = "control";
|
|
6893
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6894
|
-
* `presence` cap. */
|
|
6895
|
-
DeviceType["Presence"] = "presence";
|
|
6896
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6897
|
-
* `weather` cap. */
|
|
6898
|
-
DeviceType["Weather"] = "weather";
|
|
6899
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6900
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6901
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6902
|
-
* `lawn-mower-control` cap. */
|
|
6903
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6904
|
-
/** Physical HA device group — parent container for entity-children
|
|
6905
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6906
|
-
* standalone device; exists only to anchor child entities. */
|
|
6907
|
-
DeviceType["Container"] = "container";
|
|
6908
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6909
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6910
|
-
DeviceType["Image"] = "image";
|
|
6911
|
-
return DeviceType;
|
|
6290
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6291
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6292
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6293
|
+
/** Light supports HSV color via `color` cap. */
|
|
6294
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6295
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6296
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6297
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6298
|
+
* targetHigh). Gates the range slider UI. */
|
|
6299
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6300
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6301
|
+
* readings. Gates the humidity controls. */
|
|
6302
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6303
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6304
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6305
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6306
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6307
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6308
|
+
* position slider UI. */
|
|
6309
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6310
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6311
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6312
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6313
|
+
* position slider / drag surface UI. */
|
|
6314
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6315
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6316
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6317
|
+
/** Fan exposes a preset mode selector. */
|
|
6318
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6319
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6320
|
+
* ceiling fans. */
|
|
6321
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6322
|
+
/** Fan exposes an oscillation toggle. */
|
|
6323
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6324
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6325
|
+
* field on the UI lock-controls panel. */
|
|
6326
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6327
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6328
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6329
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6330
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6331
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6332
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6333
|
+
/** Media player exposes a volume-level setter. */
|
|
6334
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6335
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6336
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6337
|
+
/** Media player exposes a shuffle toggle. */
|
|
6338
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6339
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6340
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6341
|
+
/** Media player exposes a source / input selector. */
|
|
6342
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6343
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6344
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6345
|
+
/** Media player exposes next-track. */
|
|
6346
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6347
|
+
/** Media player exposes previous-track. */
|
|
6348
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6349
|
+
/** Media player exposes stop distinct from pause. */
|
|
6350
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6351
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6352
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6353
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6354
|
+
* addition to a textual location. */
|
|
6355
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6356
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6357
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6358
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6359
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6360
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6361
|
+
* fields. */
|
|
6362
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6363
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6364
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6365
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6366
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6367
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6368
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6369
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6370
|
+
* automation's actions while bypassing its condition block. */
|
|
6371
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6372
|
+
return DeviceFeature;
|
|
6373
|
+
}({});
|
|
6374
|
+
/**
|
|
6375
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6376
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6377
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6378
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6379
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6380
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6381
|
+
*
|
|
6382
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6383
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6384
|
+
*/
|
|
6385
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6386
|
+
DeviceRole["Siren"] = "siren";
|
|
6387
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6388
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6389
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6390
|
+
DeviceRole["Chime"] = "chime";
|
|
6391
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6392
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6393
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6394
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6395
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6396
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6397
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6398
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6399
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6400
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6401
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6402
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6403
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6404
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6405
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6406
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6407
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6408
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6409
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6410
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6411
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6412
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6413
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6414
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6415
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6416
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6417
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6418
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6419
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6420
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6421
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6422
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6423
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6424
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6425
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6426
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6427
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6428
|
+
* `attributes.options`). */
|
|
6429
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6430
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6431
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6432
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6433
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6434
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6435
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6436
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6437
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6438
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6439
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6440
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6441
|
+
* rich features (image, priority, channel routing). */
|
|
6442
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6443
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6444
|
+
* `notify.discord_*`, etc.). */
|
|
6445
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6446
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6447
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6448
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6449
|
+
* pattern. */
|
|
6450
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6451
|
+
return DeviceRole;
|
|
6912
6452
|
}({});
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6453
|
+
/**
|
|
6454
|
+
* Generic types for capability definitions.
|
|
6455
|
+
*
|
|
6456
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6457
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6458
|
+
*
|
|
6459
|
+
* Pattern:
|
|
6460
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6461
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6462
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6463
|
+
* 4. Addon implements IProvider
|
|
6464
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6465
|
+
*/
|
|
6466
|
+
/**
|
|
6467
|
+
* Output schema shared by the contribution + live methods.
|
|
6468
|
+
*
|
|
6469
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6470
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6471
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6472
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6473
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6474
|
+
*
|
|
6475
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6476
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6477
|
+
* rebuilding every time a new field kind is introduced.
|
|
6478
|
+
*/
|
|
6479
|
+
var ContributionSectionSchema = object({
|
|
6480
|
+
id: string(),
|
|
6481
|
+
title: string(),
|
|
6482
|
+
description: string().optional(),
|
|
6483
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6484
|
+
defaultCollapsed: boolean().optional(),
|
|
6485
|
+
columns: union([
|
|
6486
|
+
literal(1),
|
|
6487
|
+
literal(2),
|
|
6488
|
+
literal(3),
|
|
6489
|
+
literal(4)
|
|
6490
|
+
]).optional(),
|
|
6491
|
+
tab: string().optional(),
|
|
6492
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6493
|
+
order: number().optional(),
|
|
6494
|
+
fields: array(any())
|
|
6495
|
+
});
|
|
6496
|
+
object({
|
|
6497
|
+
tabs: array(object({
|
|
6498
|
+
id: string(),
|
|
6499
|
+
label: string(),
|
|
6500
|
+
icon: string(),
|
|
6501
|
+
order: number().optional()
|
|
6502
|
+
})).optional(),
|
|
6503
|
+
sections: array(ContributionSectionSchema)
|
|
6504
|
+
}).nullable();
|
|
6505
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6506
|
+
deviceId: number(),
|
|
6507
|
+
patch: record(string(), unknown())
|
|
6508
|
+
}), object({ success: literal(true) });
|
|
6509
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6510
|
+
/** Shorthand to define a method schema */
|
|
6511
|
+
function method(input, output, options) {
|
|
6512
|
+
return {
|
|
6513
|
+
input,
|
|
6514
|
+
output,
|
|
6515
|
+
kind: options?.kind ?? "query",
|
|
6516
|
+
auth: options?.auth ?? "protected",
|
|
6517
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6518
|
+
timeoutMs: options?.timeoutMs
|
|
6519
|
+
};
|
|
6520
|
+
}
|
|
6521
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6522
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6523
|
+
var adminUiCapability = {
|
|
6524
|
+
name: "admin-ui",
|
|
6525
|
+
scope: "system",
|
|
6526
|
+
mode: "singleton",
|
|
6527
|
+
internal: true,
|
|
6528
|
+
methods: {
|
|
6529
|
+
getStaticDir: method(_void(), StaticDirOutputSchema),
|
|
6530
|
+
getVersion: method(_void(), VersionOutputSchema)
|
|
6531
|
+
}
|
|
6532
|
+
};
|
|
6533
|
+
/**
|
|
6534
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6535
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6536
|
+
*
|
|
6537
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6538
|
+
* provider for this cap (per device) backed by its local
|
|
6539
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6540
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6541
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6542
|
+
* so there's no parallel bridge path anymore.
|
|
6543
|
+
*
|
|
6544
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6545
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6546
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6547
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6548
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6549
|
+
*/
|
|
6550
|
+
var StreamSourceEntrySchema = object({
|
|
6551
|
+
id: string(),
|
|
6552
|
+
label: string(),
|
|
6553
|
+
protocol: _enum([
|
|
6554
|
+
"rtsp",
|
|
6555
|
+
"rtmp",
|
|
6556
|
+
"annexb",
|
|
6557
|
+
"http-mjpeg",
|
|
6558
|
+
"webrtc",
|
|
6559
|
+
"custom"
|
|
6560
|
+
]),
|
|
6561
|
+
url: string().optional(),
|
|
6562
|
+
resolution: object({
|
|
6563
|
+
width: number(),
|
|
6564
|
+
height: number()
|
|
6565
|
+
}).optional(),
|
|
6566
|
+
fps: number().optional(),
|
|
6567
|
+
bitrate: number().optional(),
|
|
6568
|
+
codec: string().optional(),
|
|
6569
|
+
profileHint: CamProfileSchema.optional(),
|
|
6570
|
+
sdp: string().optional()
|
|
6571
|
+
});
|
|
6572
|
+
var ConfigEntrySchema$1 = object({
|
|
6573
|
+
key: string(),
|
|
6574
|
+
value: unknown()
|
|
6575
|
+
});
|
|
6576
|
+
var RawStateResultSchema = object({
|
|
6577
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6578
|
+
source: string(),
|
|
6579
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6580
|
+
data: record(string(), unknown())
|
|
6581
|
+
});
|
|
6582
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6583
|
+
deviceId: number(),
|
|
6584
|
+
values: record(string(), unknown())
|
|
6585
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6586
|
+
deviceId: number(),
|
|
6587
|
+
action: string().min(1),
|
|
6588
|
+
input: unknown()
|
|
6589
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6590
|
+
//#endregion
|
|
6591
|
+
//#region ../types/dist/index.mjs
|
|
6592
|
+
/**
|
|
6593
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6594
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6595
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6596
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6597
|
+
*
|
|
6598
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6599
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6600
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6601
|
+
*/
|
|
6602
|
+
/** What kind of target a probe addressed. */
|
|
6603
|
+
var wiringProbeKindSchema = _enum([
|
|
6604
|
+
"singleton",
|
|
6605
|
+
"device",
|
|
6606
|
+
"widget"
|
|
6607
|
+
]);
|
|
6608
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6609
|
+
var wiringProbeResultSchema = object({
|
|
6610
|
+
capName: string(),
|
|
6611
|
+
kind: wiringProbeKindSchema,
|
|
6612
|
+
deviceId: number().optional(),
|
|
6613
|
+
reachable: boolean(),
|
|
6614
|
+
latencyMs: number(),
|
|
6615
|
+
error: string().optional()
|
|
6616
|
+
});
|
|
6617
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6618
|
+
var wiringAddonHealthSchema = object({
|
|
6619
|
+
addonId: string(),
|
|
6620
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6621
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6622
|
+
});
|
|
6623
|
+
/** Per-node roll-up. */
|
|
6624
|
+
var wiringNodeHealthSchema = object({
|
|
6625
|
+
nodeId: string(),
|
|
6626
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6627
|
+
});
|
|
6628
|
+
object({
|
|
6629
|
+
/** True only when every probed target is reachable. */
|
|
6630
|
+
ok: boolean(),
|
|
6631
|
+
/** True when at least one target is unreachable. */
|
|
6632
|
+
degraded: boolean(),
|
|
6633
|
+
checkedAt: string(),
|
|
6634
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6635
|
+
summary: object({
|
|
6636
|
+
total: number(),
|
|
6637
|
+
reachable: number(),
|
|
6638
|
+
unreachable: number()
|
|
6639
|
+
})
|
|
6640
|
+
});
|
|
6641
|
+
var MODEL_FORMATS = [
|
|
6642
|
+
"onnx",
|
|
6643
|
+
"coreml",
|
|
6644
|
+
"openvino",
|
|
6645
|
+
"tflite",
|
|
6646
|
+
"pt"
|
|
6647
|
+
];
|
|
6648
|
+
/**
|
|
6649
|
+
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6650
|
+
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
6651
|
+
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
6652
|
+
*/
|
|
6653
|
+
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
6654
|
+
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
6655
|
+
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6656
|
+
kind: literal("timeOfDay"),
|
|
6657
|
+
start: string().regex(HHMM),
|
|
6658
|
+
end: string().regex(HHMM),
|
|
6659
|
+
/** Restrict to these weekdays; omit = every day. */
|
|
6660
|
+
days: array(RecordingWeekdaySchema).optional()
|
|
6661
|
+
})]);
|
|
6662
|
+
var RecordingModeSchema = _enum([
|
|
6663
|
+
"continuous",
|
|
6664
|
+
"onMotion",
|
|
6665
|
+
"onAudioThreshold"
|
|
6666
|
+
]);
|
|
6667
|
+
/**
|
|
6668
|
+
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6669
|
+
* reads directly (never inferred from `rules`):
|
|
6670
|
+
* - `off` — not recording.
|
|
6671
|
+
* - `events` — record only around triggers (motion / audio threshold),
|
|
6672
|
+
* with pre/post-buffer.
|
|
6673
|
+
* - `continuous` — record 24/7 within the schedule.
|
|
6674
|
+
*
|
|
6675
|
+
* `mode` compiles one-way to the internal `rules[]` consumed by the policy
|
|
6676
|
+
* engine (see `compileRules`); `rules[]` is never authored directly anymore.
|
|
6677
|
+
*/
|
|
6678
|
+
var RecordingStorageModeSchema = _enum([
|
|
6679
|
+
"off",
|
|
6680
|
+
"events",
|
|
6681
|
+
"continuous"
|
|
6682
|
+
]);
|
|
6683
|
+
/** Which detectors trigger an `events`-mode recording. */
|
|
6684
|
+
var RecordingTriggersSchema = object({
|
|
6685
|
+
motion: boolean().optional(),
|
|
6686
|
+
audioThresholdDbfs: number().optional()
|
|
6687
|
+
});
|
|
6688
|
+
/**
|
|
6689
|
+
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
6690
|
+
*
|
|
6691
|
+
* Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
|
|
6692
|
+
* only ever `continuous` or `events`; "off" is expressed by the absence of a
|
|
6693
|
+
* covering band, not by a band value.
|
|
6694
|
+
*/
|
|
6695
|
+
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6696
|
+
/**
|
|
6697
|
+
* Triggers for an `events`-mode band. Identical shape to
|
|
6698
|
+
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6699
|
+
* two never drift.
|
|
6700
|
+
*/
|
|
6701
|
+
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6702
|
+
/**
|
|
6703
|
+
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6704
|
+
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6705
|
+
*
|
|
6706
|
+
* `days` lists the weekdays the band covers (empty = every day, matching the
|
|
6707
|
+
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
6708
|
+
* span wraps past midnight (handled by the band engine).
|
|
6709
|
+
*/
|
|
6710
|
+
var RecordingBandSchema = object({
|
|
6711
|
+
days: array(RecordingWeekdaySchema),
|
|
6712
|
+
start: string().regex(HHMM),
|
|
6713
|
+
end: string().regex(HHMM),
|
|
6714
|
+
mode: RecordingBandModeSchema,
|
|
6715
|
+
triggers: RecordingBandTriggersSchema.optional(),
|
|
6716
|
+
preBufferSec: number().min(0).optional(),
|
|
6717
|
+
postBufferSec: number().min(0).optional()
|
|
6718
|
+
});
|
|
6719
|
+
var RecordingRuleSchema = object({
|
|
6720
|
+
schedule: RecordingScheduleSchema,
|
|
6721
|
+
mode: RecordingModeSchema,
|
|
6722
|
+
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6723
|
+
preBufferSec: number().min(0).default(0),
|
|
6724
|
+
/** Keep recording until this many seconds after the last trigger. */
|
|
6725
|
+
postBufferSec: number().min(0).default(0),
|
|
6726
|
+
/** Each new trigger restarts the post-buffer window. */
|
|
6727
|
+
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6728
|
+
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6729
|
+
thresholdDbfs: number().optional()
|
|
6730
|
+
});
|
|
6731
|
+
/**
|
|
6732
|
+
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6733
|
+
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6734
|
+
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6735
|
+
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6736
|
+
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6737
|
+
* shared by every camera writing to that volume.
|
|
6738
|
+
*/
|
|
6739
|
+
var RecordingRetentionSchema = object({
|
|
6740
|
+
maxAgeDays: number().min(0).optional(),
|
|
6741
|
+
maxSizeGb: number().min(0).optional()
|
|
6742
|
+
});
|
|
6743
|
+
/**
|
|
6744
|
+
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6745
|
+
*
|
|
6746
|
+
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6747
|
+
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6748
|
+
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6749
|
+
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6750
|
+
*/
|
|
6751
|
+
var RecordingConfigSchema = object({
|
|
6752
|
+
enabled: boolean(),
|
|
6753
|
+
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6754
|
+
* `migrateRulesToMode`, then persisted. */
|
|
6755
|
+
mode: RecordingStorageModeSchema.optional(),
|
|
6756
|
+
profiles: array(CamProfileSchema).optional(),
|
|
6757
|
+
segmentSeconds: number().int().positive().optional(),
|
|
6758
|
+
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
6759
|
+
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
6760
|
+
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
6761
|
+
schedules: array(RecordingScheduleSchema).optional(),
|
|
6762
|
+
/** Legacy single-band predecessor of `schedules`. Read-compat only — it is
|
|
6763
|
+
* normalized into `schedules` on read and never written going forward. (Not
|
|
6764
|
+
* tagged `@deprecated`: the normalization paths must read it cast-free.) */
|
|
6765
|
+
schedule: RecordingScheduleSchema.optional(),
|
|
6766
|
+
/** `events`-mode only — which detectors trigger a recording. */
|
|
6767
|
+
triggers: RecordingTriggersSchema.optional(),
|
|
6768
|
+
/** `events`-mode only — seconds retained before / after a trigger. */
|
|
6769
|
+
preBufferSec: number().min(0).optional(),
|
|
6770
|
+
postBufferSec: number().min(0).optional(),
|
|
6771
|
+
/** DEPRECATED authoring input; retained for migration/transition. */
|
|
6772
|
+
rules: array(RecordingRuleSchema).optional(),
|
|
6773
|
+
/**
|
|
6774
|
+
* AUTHORITATIVE mode-per-band recording model (recorder). When present it
|
|
6775
|
+
* is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
|
|
6776
|
+
* `triggers`/`rules` fields above are kept for READ-COMPAT only and are
|
|
6777
|
+
* derived into bands once via `migrateConfigToBands`.
|
|
6778
|
+
*/
|
|
6779
|
+
bands: array(RecordingBandSchema).optional(),
|
|
6780
|
+
retention: RecordingRetentionSchema.optional()
|
|
6781
|
+
});
|
|
6782
|
+
/**
|
|
6783
|
+
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
6784
|
+
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
6785
|
+
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
6786
|
+
* without forming a circular import. The `storage` cap re-exports it
|
|
6787
|
+
* verbatim for back-compat.
|
|
6788
|
+
*
|
|
6789
|
+
* This Zod schema is the **authoritative source** for `StorageLocationType`.
|
|
6790
|
+
* The TS alias in `./storage.ts` re-exports `z.infer<typeof
|
|
6791
|
+
* StorageLocationTypeSchema>` so the wire surface (cap) and the legacy
|
|
6792
|
+
* `IStorageProvider` interface stay in lockstep.
|
|
6793
|
+
*
|
|
6794
|
+
* The type is now an **open string** (not a closed enum) — addons declare
|
|
6795
|
+
* their own location kinds via `StorageLocationDeclaration.id`. The regex
|
|
6796
|
+
* enforces a safe id format: lowercase-start, alphanumeric + hyphens.
|
|
6797
|
+
*/
|
|
6798
|
+
var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
6799
|
+
/**
|
|
6800
|
+
* Persisted record for a storage location instance. Operators can register
|
|
6801
|
+
* multiple instances for multi-cardinality types (e.g. two `backups`
|
|
6802
|
+
* locations with different `providerId`s). Cardinality is now declared per
|
|
6803
|
+
* location via `StorageLocationDeclaration.cardinality` — the static
|
|
6804
|
+
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
6805
|
+
*
|
|
6806
|
+
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
6807
|
+
* The default location for a type uses `id === <type>:default` by
|
|
6808
|
+
* convention (the bare type ref like `'backups'` resolves to it).
|
|
6809
|
+
*
|
|
6810
|
+
* `isSystem: true` marks a location as orchestrator-seeded and
|
|
6811
|
+
* undeletable. The bootstrap-installed defaults (one per type) carry
|
|
6812
|
+
* this flag; operator-added locations don't. Editing the config of
|
|
6813
|
+
* a system location is allowed (path migration, provider swap) but
|
|
6814
|
+
* deleting it is rejected at the cap level.
|
|
6815
|
+
*/
|
|
6816
|
+
var StorageLocationSchema = object({
|
|
6817
|
+
id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
|
|
6818
|
+
type: string(),
|
|
6819
|
+
displayName: string().min(1),
|
|
6820
|
+
providerId: string().min(1),
|
|
6821
|
+
config: record(string(), unknown()),
|
|
6822
|
+
/**
|
|
6823
|
+
* Cluster node this location physically lives on. REQUIRED for node-local
|
|
6824
|
+
* providers (filesystem — the path exists on one node's disk), null/absent
|
|
6825
|
+
* for node-agnostic providers (S3/SFTP/WebDAV, reachable from any node).
|
|
6826
|
+
* `'hub'` is the hub node. Validated against the provider's `nodeLocal`
|
|
6827
|
+
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
6828
|
+
*/
|
|
6829
|
+
nodeId: string().optional(),
|
|
6830
|
+
isDefault: boolean().default(false),
|
|
6831
|
+
isSystem: boolean().default(false),
|
|
6832
|
+
createdAt: number(),
|
|
6833
|
+
updatedAt: number()
|
|
6834
|
+
});
|
|
6835
|
+
/**
|
|
6836
|
+
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
6837
|
+
* Either:
|
|
6838
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
|
|
6839
|
+
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
6840
|
+
*
|
|
6841
|
+
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
6842
|
+
*/
|
|
6843
|
+
var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]);
|
|
6844
|
+
/**
|
|
6845
|
+
* `StorageLocationDeclaration` — a single storage-location entry declared by
|
|
6846
|
+
* an addon in its `package.json` under `camstack.storageLocations`.
|
|
6847
|
+
*
|
|
6848
|
+
* Design intent:
|
|
6849
|
+
* - **Addon declares its needs** — each addon describes the logical storage
|
|
6850
|
+
* slots it requires (e.g. `recordings`, `recordingsLow`) without caring
|
|
6851
|
+
* about the physical path.
|
|
6852
|
+
* - **Kernel aggregates** — at boot the kernel collects declarations from all
|
|
6853
|
+
* installed addons, deduplicates by `id`, and exposes the union via the
|
|
6854
|
+
* storage-locations settings surface.
|
|
6855
|
+
* - **Orchestrator seeds** — for every declared `id` the orchestrator ensures
|
|
6856
|
+
* at least one instance named `<id>:default` is present, using
|
|
6857
|
+
* `defaultsTo` to inherit the resolved root from another location when the
|
|
6858
|
+
* declaration is a derivative slot (e.g. `recordingsLow` defaults to
|
|
6859
|
+
* `recordings`).
|
|
6860
|
+
* - **ids are global** — `id` values are shared across the entire deployment;
|
|
6861
|
+
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
6862
|
+
* at kernel aggregation time, not here).
|
|
6863
|
+
*/
|
|
6864
|
+
var StorageLocationDeclarationSchema = object({
|
|
6865
|
+
/**
|
|
6866
|
+
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
6867
|
+
* Must start with a lowercase letter and may contain letters, digits, and
|
|
6868
|
+
* hyphens.
|
|
6869
|
+
*/
|
|
6870
|
+
id: string().regex(/^[a-z][a-zA-Z0-9-]*$/, { message: "id must start with a lowercase letter and contain only letters, digits, or hyphens" }),
|
|
6871
|
+
/** Human-readable name shown in the admin UI. */
|
|
6872
|
+
displayName: string().min(1, { message: "displayName must not be empty" }),
|
|
6873
|
+
/** Optional longer explanation of what data this location stores. */
|
|
6874
|
+
description: string().optional(),
|
|
6875
|
+
/**
|
|
6876
|
+
* `single` — exactly one instance of this location is allowed system-wide
|
|
6877
|
+
* (e.g. `logs`, `models`). The operator can edit it but not add more.
|
|
6878
|
+
* `multi` — the operator may register several instances (e.g. a second
|
|
6879
|
+
* `recordings` on a NAS for disk tiering); one is the default at any time.
|
|
6880
|
+
*/
|
|
6881
|
+
cardinality: _enum(["single", "multi"]),
|
|
6882
|
+
/**
|
|
6883
|
+
* When set, the default instance for this location inherits its resolved
|
|
6884
|
+
* root from the named location's default instance. Useful for derivative
|
|
6885
|
+
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
6886
|
+
* configure the primary location.
|
|
6887
|
+
*/
|
|
6888
|
+
defaultsTo: string().optional()
|
|
6889
|
+
});
|
|
6890
|
+
var DecoderStatsSchema = object({
|
|
6891
|
+
inputFps: number(),
|
|
6892
|
+
outputFps: number(),
|
|
6893
|
+
avgDecodeTimeMs: number(),
|
|
6894
|
+
droppedFrames: number()
|
|
6895
|
+
});
|
|
6896
|
+
var DecoderSessionConfigSchema = object({
|
|
6897
|
+
codec: string(),
|
|
6898
|
+
maxFps: number().default(0),
|
|
6899
|
+
outputFormat: _enum([
|
|
6900
|
+
"jpeg",
|
|
6901
|
+
"rgb",
|
|
6902
|
+
"bgr",
|
|
6903
|
+
"yuv420",
|
|
6904
|
+
"gray"
|
|
6905
|
+
]).default("jpeg"),
|
|
6906
|
+
scale: number().default(1),
|
|
6907
|
+
width: number().optional(),
|
|
6908
|
+
height: number().optional(),
|
|
6916
6909
|
/**
|
|
6917
|
-
*
|
|
6918
|
-
*
|
|
6919
|
-
*
|
|
6910
|
+
* Identifier of the camera this decoder session serves. Optional
|
|
6911
|
+
* because the cap is generic (any caller could request decode), but
|
|
6912
|
+
* stream-broker passes it so decoder logs include `deviceId` for
|
|
6913
|
+
* per-camera filtering when diagnosing failures (e.g. node-av
|
|
6914
|
+
* sendPacket errors on a single hung camera).
|
|
6920
6915
|
*/
|
|
6921
|
-
|
|
6922
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6923
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6924
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6925
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6916
|
+
deviceId: number().int().nonnegative().optional(),
|
|
6926
6917
|
/**
|
|
6927
|
-
*
|
|
6928
|
-
*
|
|
6929
|
-
*
|
|
6930
|
-
*
|
|
6931
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6932
|
-
* driver sets this feature when probe confirms the firmware
|
|
6933
|
-
* surface, and registers the cap in the same code path.
|
|
6918
|
+
* Free-form tag for log scoping. Stream-broker uses
|
|
6919
|
+
* `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
|
|
6920
|
+
* on every line so `grep tag=broker:5/high` filters one camera
|
|
6921
|
+
* profile cleanly.
|
|
6934
6922
|
*/
|
|
6935
|
-
|
|
6923
|
+
tag: string().optional(),
|
|
6936
6924
|
/**
|
|
6937
|
-
*
|
|
6938
|
-
* motion detection automatically activates this device. Mirrors
|
|
6939
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6940
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6925
|
+
* Where the session delivers decoded frames (Phase 5 / D9):
|
|
6941
6926
|
*
|
|
6942
|
-
*
|
|
6943
|
-
*
|
|
6944
|
-
*
|
|
6927
|
+
* - `'callback'` (default) — the legacy pixel path: decoded frames are
|
|
6928
|
+
* buffered as `DecodedFrame`s and drained via `pullFrames`.
|
|
6929
|
+
* - `'shm'` — the shared-memory frame plane: decoded frames are written
|
|
6930
|
+
* into an OS shared-memory ring and drained as zero-pixel
|
|
6931
|
+
* `FrameHandle`s via `pullHandles`. A session is one mode or the
|
|
6932
|
+
* other — `pullFrames` returns nothing for an `'shm'` session and
|
|
6933
|
+
* `pullHandles` returns nothing for a `'callback'` session.
|
|
6945
6934
|
*/
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
/**
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
6935
|
+
frameSink: _enum(["callback", "shm"]).default("callback")
|
|
6936
|
+
});
|
|
6937
|
+
var EncodeProfileSchema = object({
|
|
6938
|
+
video: object({
|
|
6939
|
+
codec: _enum([
|
|
6940
|
+
"h264",
|
|
6941
|
+
"h265",
|
|
6942
|
+
"copy"
|
|
6943
|
+
]),
|
|
6944
|
+
profile: _enum([
|
|
6945
|
+
"baseline",
|
|
6946
|
+
"main",
|
|
6947
|
+
"high"
|
|
6948
|
+
]).optional(),
|
|
6949
|
+
width: number().int().positive().optional(),
|
|
6950
|
+
height: number().int().positive().optional(),
|
|
6951
|
+
fps: number().positive().optional(),
|
|
6952
|
+
bitrateKbps: number().int().positive().optional(),
|
|
6953
|
+
gopFrames: number().int().positive().optional(),
|
|
6954
|
+
bf: number().int().min(0).optional(),
|
|
6955
|
+
preset: _enum([
|
|
6956
|
+
"ultrafast",
|
|
6957
|
+
"superfast",
|
|
6958
|
+
"veryfast",
|
|
6959
|
+
"faster",
|
|
6960
|
+
"fast",
|
|
6961
|
+
"medium"
|
|
6962
|
+
]).optional(),
|
|
6963
|
+
tune: _enum([
|
|
6964
|
+
"zerolatency",
|
|
6965
|
+
"film",
|
|
6966
|
+
"animation"
|
|
6967
|
+
]).optional()
|
|
6968
|
+
}),
|
|
6969
|
+
audio: union([literal("passthrough"), object({
|
|
6970
|
+
codec: _enum([
|
|
6971
|
+
"opus",
|
|
6972
|
+
"aac",
|
|
6973
|
+
"pcmu",
|
|
6974
|
+
"pcma",
|
|
6975
|
+
"copy"
|
|
6976
|
+
]),
|
|
6977
|
+
bitrateKbps: number().int().positive().optional(),
|
|
6978
|
+
sampleRateHz: number().int().positive().optional(),
|
|
6979
|
+
channels: union([literal(1), literal(2)]).optional()
|
|
6980
|
+
})]),
|
|
6981
|
+
/**
|
|
6982
|
+
* ffmpeg input-side args, inserted between the fixed global flags
|
|
6983
|
+
* (`-hide_banner -loglevel error`) and `-i pipe:0`. Free-text array
|
|
6984
|
+
* — the widget surfaces a textarea + suggestion chips for the most-
|
|
6985
|
+
* used demuxer/format options.
|
|
6986
|
+
*/
|
|
6987
|
+
inputArgs: array(string()).optional(),
|
|
6988
|
+
/**
|
|
6989
|
+
* ffmpeg output-side args, inserted between the encode block and
|
|
6990
|
+
* the final `-f <muxer> pipe:1`. Use for muxer options, bitstream
|
|
6991
|
+
* filters, codec-specific overrides. Free-text array.
|
|
6992
|
+
*/
|
|
6993
|
+
outputArgs: array(string()).optional()
|
|
6994
|
+
});
|
|
6995
|
+
var YAMNET_TO_MACRO = {
|
|
6996
|
+
mapping: {
|
|
6997
|
+
Speech: "speech",
|
|
6998
|
+
"Child speech, kid speaking": "speech",
|
|
6999
|
+
Conversation: "speech",
|
|
7000
|
+
"Narration, monologue": "speech",
|
|
7001
|
+
Babbling: "speech",
|
|
7002
|
+
Whispering: "speech",
|
|
7003
|
+
"Speech synthesizer": "speech",
|
|
7004
|
+
Humming: "speech",
|
|
7005
|
+
Rapping: "speech",
|
|
7006
|
+
Singing: "speech",
|
|
7007
|
+
Choir: "speech",
|
|
7008
|
+
"Child singing": "speech",
|
|
7009
|
+
Shout: "scream",
|
|
7010
|
+
Bellow: "scream",
|
|
7011
|
+
Yell: "scream",
|
|
7012
|
+
Screaming: "scream",
|
|
7013
|
+
"Children shouting": "scream",
|
|
7014
|
+
Whoop: "scream",
|
|
7015
|
+
"Crying, sobbing": "crying",
|
|
7016
|
+
"Baby cry, infant cry": "crying",
|
|
7017
|
+
Whimper: "crying",
|
|
7018
|
+
"Wail, moan": "crying",
|
|
7019
|
+
Groan: "crying",
|
|
7020
|
+
Laughter: "laughter",
|
|
7021
|
+
"Baby laughter": "laughter",
|
|
7022
|
+
Giggle: "laughter",
|
|
7023
|
+
Snicker: "laughter",
|
|
7024
|
+
"Belly laugh": "laughter",
|
|
7025
|
+
"Chuckle, chortle": "laughter",
|
|
7026
|
+
Music: "music",
|
|
7027
|
+
"Musical instrument": "music",
|
|
7028
|
+
Guitar: "music",
|
|
7029
|
+
Piano: "music",
|
|
7030
|
+
Drum: "music",
|
|
7031
|
+
"Drum kit": "music",
|
|
7032
|
+
"Violin, fiddle": "music",
|
|
7033
|
+
Flute: "music",
|
|
7034
|
+
Saxophone: "music",
|
|
7035
|
+
Trumpet: "music",
|
|
7036
|
+
Synthesizer: "music",
|
|
7037
|
+
"Pop music": "music",
|
|
7038
|
+
"Rock music": "music",
|
|
7039
|
+
"Hip hop music": "music",
|
|
7040
|
+
"Classical music": "music",
|
|
7041
|
+
Jazz: "music",
|
|
7042
|
+
"Electronic music": "music",
|
|
7043
|
+
"Background music": "music",
|
|
7044
|
+
Dog: "dog",
|
|
7045
|
+
Bark: "dog",
|
|
7046
|
+
Yip: "dog",
|
|
7047
|
+
Howl: "dog",
|
|
7048
|
+
"Bow-wow": "dog",
|
|
7049
|
+
Growling: "dog",
|
|
7050
|
+
"Whimper (dog)": "dog",
|
|
7051
|
+
Cat: "cat",
|
|
7052
|
+
Purr: "cat",
|
|
7053
|
+
Meow: "cat",
|
|
7054
|
+
Hiss: "cat",
|
|
7055
|
+
Caterwaul: "cat",
|
|
7056
|
+
Bird: "bird",
|
|
7057
|
+
"Bird vocalization, bird call, bird song": "bird",
|
|
7058
|
+
"Chirp, tweet": "bird",
|
|
7059
|
+
Squawk: "bird",
|
|
7060
|
+
Crow: "bird",
|
|
7061
|
+
Owl: "bird",
|
|
7062
|
+
"Pigeon, dove": "bird",
|
|
7063
|
+
Animal: "animal",
|
|
7064
|
+
"Domestic animals, pets": "animal",
|
|
7065
|
+
"Livestock, farm animals, working animals": "animal",
|
|
7066
|
+
Horse: "animal",
|
|
7067
|
+
"Cattle, bovinae": "animal",
|
|
7068
|
+
Pig: "animal",
|
|
7069
|
+
Sheep: "animal",
|
|
7070
|
+
Goat: "animal",
|
|
7071
|
+
Frog: "animal",
|
|
7072
|
+
Insect: "animal",
|
|
7073
|
+
Cricket: "animal",
|
|
7074
|
+
Alarm: "alarm",
|
|
7075
|
+
"Alarm clock": "alarm",
|
|
7076
|
+
"Smoke detector, smoke alarm": "alarm",
|
|
7077
|
+
"Fire alarm": "alarm",
|
|
7078
|
+
Buzzer: "alarm",
|
|
7079
|
+
"Civil defense siren": "alarm",
|
|
7080
|
+
"Car alarm": "alarm",
|
|
7081
|
+
Siren: "siren",
|
|
7082
|
+
"Police car (siren)": "siren",
|
|
7083
|
+
"Ambulance (siren)": "siren",
|
|
7084
|
+
"Fire engine, fire truck (siren)": "siren",
|
|
7085
|
+
"Emergency vehicle": "siren",
|
|
7086
|
+
Foghorn: "siren",
|
|
7087
|
+
Doorbell: "doorbell",
|
|
7088
|
+
"Ding-dong": "doorbell",
|
|
7089
|
+
Knock: "doorbell",
|
|
7090
|
+
Tap: "doorbell",
|
|
7091
|
+
Glass: "glass_breaking",
|
|
7092
|
+
Shatter: "glass_breaking",
|
|
7093
|
+
"Chink, clink": "glass_breaking",
|
|
7094
|
+
"Gunshot, gunfire": "gunshot",
|
|
7095
|
+
"Machine gun": "gunshot",
|
|
7096
|
+
Explosion: "gunshot",
|
|
7097
|
+
Fireworks: "gunshot",
|
|
7098
|
+
Firecracker: "gunshot",
|
|
7099
|
+
"Artillery fire": "gunshot",
|
|
7100
|
+
"Cap gun": "gunshot",
|
|
7101
|
+
Boom: "gunshot",
|
|
7102
|
+
Vehicle: "vehicle",
|
|
7103
|
+
Car: "vehicle",
|
|
7104
|
+
Truck: "vehicle",
|
|
7105
|
+
Bus: "vehicle",
|
|
7106
|
+
Motorcycle: "vehicle",
|
|
7107
|
+
"Car passing by": "vehicle",
|
|
7108
|
+
"Vehicle horn, car horn, honking": "vehicle",
|
|
7109
|
+
"Traffic noise, roadway noise": "vehicle",
|
|
7110
|
+
Train: "vehicle",
|
|
7111
|
+
Aircraft: "vehicle",
|
|
7112
|
+
Helicopter: "vehicle",
|
|
7113
|
+
Bicycle: "vehicle",
|
|
7114
|
+
Skateboard: "vehicle",
|
|
7115
|
+
Fire: "fire",
|
|
7116
|
+
Crackle: "fire",
|
|
7117
|
+
Water: "water",
|
|
7118
|
+
Rain: "water",
|
|
7119
|
+
Raindrop: "water",
|
|
7120
|
+
"Rain on surface": "water",
|
|
7121
|
+
Stream: "water",
|
|
7122
|
+
Waterfall: "water",
|
|
7123
|
+
Ocean: "water",
|
|
7124
|
+
"Waves, surf": "water",
|
|
7125
|
+
"Splash, splatter": "water",
|
|
7126
|
+
Wind: "wind",
|
|
7127
|
+
Thunderstorm: "wind",
|
|
7128
|
+
Thunder: "wind",
|
|
7129
|
+
"Wind noise (microphone)": "wind",
|
|
7130
|
+
"Rustling leaves": "wind",
|
|
7131
|
+
Door: "door",
|
|
7132
|
+
"Sliding door": "door",
|
|
7133
|
+
Slam: "door",
|
|
7134
|
+
"Cupboard open or close": "door",
|
|
7135
|
+
"Walk, footsteps": "footsteps",
|
|
7136
|
+
Run: "footsteps",
|
|
7137
|
+
Shuffle: "footsteps",
|
|
7138
|
+
Crowd: "crowd",
|
|
7139
|
+
Chatter: "crowd",
|
|
7140
|
+
Cheering: "crowd",
|
|
7141
|
+
Applause: "crowd",
|
|
7142
|
+
"Children playing": "crowd",
|
|
7143
|
+
"Hubbub, speech noise, speech babble": "crowd",
|
|
7144
|
+
Telephone: "telephone",
|
|
7145
|
+
"Telephone bell ringing": "telephone",
|
|
7146
|
+
Ringtone: "telephone",
|
|
7147
|
+
"Telephone dialing, DTMF": "telephone",
|
|
7148
|
+
"Busy signal": "telephone",
|
|
7149
|
+
Engine: "engine",
|
|
7150
|
+
"Engine starting": "engine",
|
|
7151
|
+
Idling: "engine",
|
|
7152
|
+
"Accelerating, revving, vroom": "engine",
|
|
7153
|
+
"Light engine (high frequency)": "engine",
|
|
7154
|
+
"Medium engine (mid frequency)": "engine",
|
|
7155
|
+
"Heavy engine (low frequency)": "engine",
|
|
7156
|
+
"Lawn mower": "engine",
|
|
7157
|
+
Chainsaw: "engine",
|
|
7158
|
+
Hammer: "tools",
|
|
7159
|
+
Jackhammer: "tools",
|
|
7160
|
+
Sawing: "tools",
|
|
7161
|
+
"Power tool": "tools",
|
|
7162
|
+
Drill: "tools",
|
|
7163
|
+
Sanding: "tools",
|
|
7164
|
+
Silence: "silence"
|
|
7165
|
+
},
|
|
7166
|
+
preserveOriginal: false
|
|
7167
|
+
};
|
|
7168
|
+
var APPLE_SA_TO_MACRO = {
|
|
7169
|
+
mapping: {
|
|
7170
|
+
speech: "speech",
|
|
7171
|
+
child_speech: "speech",
|
|
7172
|
+
conversation: "speech",
|
|
7173
|
+
whispering: "speech",
|
|
7174
|
+
singing: "speech",
|
|
7175
|
+
humming: "speech",
|
|
7176
|
+
shout: "scream",
|
|
7177
|
+
yell: "scream",
|
|
7178
|
+
screaming: "scream",
|
|
7179
|
+
crying: "crying",
|
|
7180
|
+
baby_crying: "crying",
|
|
7181
|
+
sobbing: "crying",
|
|
7182
|
+
laughter: "laughter",
|
|
7183
|
+
baby_laughter: "laughter",
|
|
7184
|
+
giggling: "laughter",
|
|
7185
|
+
music: "music",
|
|
7186
|
+
guitar: "music",
|
|
7187
|
+
piano: "music",
|
|
7188
|
+
drums: "music",
|
|
7189
|
+
dog_bark: "dog",
|
|
7190
|
+
dog_bow_wow: "dog",
|
|
7191
|
+
dog_growling: "dog",
|
|
7192
|
+
dog_howl: "dog",
|
|
7193
|
+
cat_meow: "cat",
|
|
7194
|
+
cat_purr: "cat",
|
|
7195
|
+
cat_hiss: "cat",
|
|
7196
|
+
bird: "bird",
|
|
7197
|
+
bird_chirp: "bird",
|
|
7198
|
+
bird_squawk: "bird",
|
|
7199
|
+
animal: "animal",
|
|
7200
|
+
horse: "animal",
|
|
7201
|
+
cow_moo: "animal",
|
|
7202
|
+
insect: "animal",
|
|
7203
|
+
alarm: "alarm",
|
|
7204
|
+
smoke_alarm: "alarm",
|
|
7205
|
+
fire_alarm: "alarm",
|
|
7206
|
+
car_alarm: "alarm",
|
|
7207
|
+
siren: "siren",
|
|
7208
|
+
police_siren: "siren",
|
|
7209
|
+
ambulance_siren: "siren",
|
|
7210
|
+
doorbell: "doorbell",
|
|
7211
|
+
door_knock: "doorbell",
|
|
7212
|
+
knocking: "doorbell",
|
|
7213
|
+
glass_breaking: "glass_breaking",
|
|
7214
|
+
glass_shatter: "glass_breaking",
|
|
7215
|
+
gunshot: "gunshot",
|
|
7216
|
+
explosion: "gunshot",
|
|
7217
|
+
fireworks: "gunshot",
|
|
7218
|
+
car: "vehicle",
|
|
7219
|
+
truck: "vehicle",
|
|
7220
|
+
motorcycle: "vehicle",
|
|
7221
|
+
car_horn: "vehicle",
|
|
7222
|
+
vehicle_horn: "vehicle",
|
|
7223
|
+
traffic: "vehicle",
|
|
7224
|
+
fire: "fire",
|
|
7225
|
+
fire_crackle: "fire",
|
|
7226
|
+
water: "water",
|
|
7227
|
+
rain: "water",
|
|
7228
|
+
ocean: "water",
|
|
7229
|
+
splash: "water",
|
|
7230
|
+
wind: "wind",
|
|
7231
|
+
thunder: "wind",
|
|
7232
|
+
thunderstorm: "wind",
|
|
7233
|
+
door: "door",
|
|
7234
|
+
door_slam: "door",
|
|
7235
|
+
sliding_door: "door",
|
|
7236
|
+
footsteps: "footsteps",
|
|
7237
|
+
walking: "footsteps",
|
|
7238
|
+
running: "footsteps",
|
|
7239
|
+
crowd: "crowd",
|
|
7240
|
+
chatter: "crowd",
|
|
7241
|
+
cheering: "crowd",
|
|
7242
|
+
applause: "crowd",
|
|
7243
|
+
telephone_ring: "telephone",
|
|
7244
|
+
ringtone: "telephone",
|
|
7245
|
+
engine: "engine",
|
|
7246
|
+
engine_starting: "engine",
|
|
7247
|
+
lawn_mower: "engine",
|
|
7248
|
+
chainsaw: "engine",
|
|
7249
|
+
hammer: "tools",
|
|
7250
|
+
jackhammer: "tools",
|
|
7251
|
+
drill: "tools",
|
|
7252
|
+
power_tool: "tools",
|
|
7253
|
+
silence: "silence"
|
|
7254
|
+
},
|
|
7255
|
+
preserveOriginal: false
|
|
7256
|
+
};
|
|
7257
|
+
var _macroLookup = /* @__PURE__ */ new Map();
|
|
7258
|
+
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7259
|
+
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7109
7260
|
/**
|
|
7110
7261
|
* Accessory device helpers — shared across drivers.
|
|
7111
7262
|
*
|
|
@@ -7265,74 +7416,6 @@ object({
|
|
|
7265
7416
|
});
|
|
7266
7417
|
DeviceType.Sensor;
|
|
7267
7418
|
/**
|
|
7268
|
-
* Generic types for capability definitions.
|
|
7269
|
-
*
|
|
7270
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7271
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7272
|
-
*
|
|
7273
|
-
* Pattern:
|
|
7274
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7275
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7276
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7277
|
-
* 4. Addon implements IProvider
|
|
7278
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7279
|
-
*/
|
|
7280
|
-
/**
|
|
7281
|
-
* Output schema shared by the contribution + live methods.
|
|
7282
|
-
*
|
|
7283
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7284
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7285
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7286
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7287
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7288
|
-
*
|
|
7289
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7290
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7291
|
-
* rebuilding every time a new field kind is introduced.
|
|
7292
|
-
*/
|
|
7293
|
-
var ContributionSectionSchema = object({
|
|
7294
|
-
id: string(),
|
|
7295
|
-
title: string(),
|
|
7296
|
-
description: string().optional(),
|
|
7297
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7298
|
-
defaultCollapsed: boolean().optional(),
|
|
7299
|
-
columns: union([
|
|
7300
|
-
literal(1),
|
|
7301
|
-
literal(2),
|
|
7302
|
-
literal(3),
|
|
7303
|
-
literal(4)
|
|
7304
|
-
]).optional(),
|
|
7305
|
-
tab: string().optional(),
|
|
7306
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7307
|
-
order: number().optional(),
|
|
7308
|
-
fields: array(any())
|
|
7309
|
-
});
|
|
7310
|
-
object({
|
|
7311
|
-
tabs: array(object({
|
|
7312
|
-
id: string(),
|
|
7313
|
-
label: string(),
|
|
7314
|
-
icon: string(),
|
|
7315
|
-
order: number().optional()
|
|
7316
|
-
})).optional(),
|
|
7317
|
-
sections: array(ContributionSectionSchema)
|
|
7318
|
-
}).nullable();
|
|
7319
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7320
|
-
deviceId: number(),
|
|
7321
|
-
patch: record(string(), unknown())
|
|
7322
|
-
}), object({ success: literal(true) });
|
|
7323
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7324
|
-
/** Shorthand to define a method schema */
|
|
7325
|
-
function method(input, output, options) {
|
|
7326
|
-
return {
|
|
7327
|
-
input,
|
|
7328
|
-
output,
|
|
7329
|
-
kind: options?.kind ?? "query",
|
|
7330
|
-
auth: options?.auth ?? "protected",
|
|
7331
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7332
|
-
timeoutMs: options?.timeoutMs
|
|
7333
|
-
};
|
|
7334
|
-
}
|
|
7335
|
-
/**
|
|
7336
7419
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7337
7420
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7338
7421
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -9147,6 +9230,24 @@ var DetectorOutputSchema = object({
|
|
|
9147
9230
|
inferenceMs: number(),
|
|
9148
9231
|
modelId: string()
|
|
9149
9232
|
});
|
|
9233
|
+
var EngineProvisioningSchema = object({
|
|
9234
|
+
runtimeId: _enum([
|
|
9235
|
+
"onnx",
|
|
9236
|
+
"openvino",
|
|
9237
|
+
"coreml"
|
|
9238
|
+
]).nullable(),
|
|
9239
|
+
device: string().nullable(),
|
|
9240
|
+
state: _enum([
|
|
9241
|
+
"idle",
|
|
9242
|
+
"installing",
|
|
9243
|
+
"verifying",
|
|
9244
|
+
"ready",
|
|
9245
|
+
"failed"
|
|
9246
|
+
]),
|
|
9247
|
+
progress: number().optional(),
|
|
9248
|
+
error: string().optional(),
|
|
9249
|
+
nextRetryAt: number().optional()
|
|
9250
|
+
});
|
|
9150
9251
|
var PipelineStepInputSchema = lazy(() => object({
|
|
9151
9252
|
addonId: string(),
|
|
9152
9253
|
modelId: string(),
|
|
@@ -9215,7 +9316,7 @@ var PipelineRunResultBridge = custom();
|
|
|
9215
9316
|
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
|
|
9216
9317
|
kind: "mutation",
|
|
9217
9318
|
auth: "admin"
|
|
9218
|
-
}), method(_void(), record(string(), object({
|
|
9319
|
+
}), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
9219
9320
|
modelId: string(),
|
|
9220
9321
|
settings: record(string(), unknown()).readonly()
|
|
9221
9322
|
}))), method(object({ steps: record(string(), object({
|
|
@@ -11316,18 +11417,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
11316
11417
|
limit: number().optional(),
|
|
11317
11418
|
tags: record(string(), string()).optional()
|
|
11318
11419
|
}), array(LogEntrySchema).readonly());
|
|
11319
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
11320
|
-
var VersionOutputSchema = object({ version: string() });
|
|
11321
|
-
var adminUiCapability = {
|
|
11322
|
-
name: "admin-ui",
|
|
11323
|
-
scope: "system",
|
|
11324
|
-
mode: "singleton",
|
|
11325
|
-
internal: true,
|
|
11326
|
-
methods: {
|
|
11327
|
-
getStaticDir: method(_void(), StaticDirOutputSchema),
|
|
11328
|
-
getVersion: method(_void(), VersionOutputSchema)
|
|
11329
|
-
}
|
|
11330
|
-
};
|
|
11331
11420
|
/**
|
|
11332
11421
|
* Zod schemas for persisted record types.
|
|
11333
11422
|
*
|
|
@@ -12811,7 +12900,10 @@ var AgentAddonConfigSchema = object({
|
|
|
12811
12900
|
modelId: string(),
|
|
12812
12901
|
settings: record(string(), unknown()).readonly()
|
|
12813
12902
|
});
|
|
12814
|
-
var AgentPipelineSettingsSchema = object({
|
|
12903
|
+
var AgentPipelineSettingsSchema = object({
|
|
12904
|
+
addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
|
|
12905
|
+
maxCameras: number().int().nonnegative().nullable().default(null)
|
|
12906
|
+
});
|
|
12815
12907
|
var CameraPipelineForAgentSchema = object({
|
|
12816
12908
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
12817
12909
|
audio: object({
|
|
@@ -12913,6 +13005,133 @@ var GlobalMetricsSchema = object({
|
|
|
12913
13005
|
* capability providers.
|
|
12914
13006
|
*/
|
|
12915
13007
|
var CapabilityBindingsSchema = record(string(), string());
|
|
13008
|
+
/** Source block — always present; derives from the stream catalog. */
|
|
13009
|
+
var CameraSourceStatusSchema = object({ streams: array(object({
|
|
13010
|
+
camStreamId: string(),
|
|
13011
|
+
codec: string(),
|
|
13012
|
+
width: number(),
|
|
13013
|
+
height: number(),
|
|
13014
|
+
fps: number(),
|
|
13015
|
+
kind: string()
|
|
13016
|
+
})).readonly() });
|
|
13017
|
+
/** Assignment block — always present (orchestrator-local, no remote call). */
|
|
13018
|
+
var CameraAssignmentStatusSchema = object({
|
|
13019
|
+
detectionNodeId: string().nullable(),
|
|
13020
|
+
decoderNodeId: string().nullable(),
|
|
13021
|
+
audioNodeId: string().nullable(),
|
|
13022
|
+
pinned: object({
|
|
13023
|
+
detection: boolean(),
|
|
13024
|
+
decoder: boolean(),
|
|
13025
|
+
audio: boolean()
|
|
13026
|
+
}),
|
|
13027
|
+
reasons: object({
|
|
13028
|
+
detection: string().optional(),
|
|
13029
|
+
decoder: string().optional(),
|
|
13030
|
+
audio: string().optional()
|
|
13031
|
+
})
|
|
13032
|
+
});
|
|
13033
|
+
/** Broker block — null when the broker stage is unreachable or inactive. */
|
|
13034
|
+
var CameraBrokerStatusSchema = object({
|
|
13035
|
+
profiles: array(object({
|
|
13036
|
+
profile: string(),
|
|
13037
|
+
status: string(),
|
|
13038
|
+
codec: string(),
|
|
13039
|
+
width: number(),
|
|
13040
|
+
height: number(),
|
|
13041
|
+
subscribers: number(),
|
|
13042
|
+
inFps: number(),
|
|
13043
|
+
outFps: number()
|
|
13044
|
+
})).readonly(),
|
|
13045
|
+
webrtcSessions: number(),
|
|
13046
|
+
rtspRestream: boolean()
|
|
13047
|
+
});
|
|
13048
|
+
/** Shared-memory ring statistics within the decoder block. */
|
|
13049
|
+
var CameraDecoderShmSchema = object({
|
|
13050
|
+
framesWritten: number(),
|
|
13051
|
+
getFrameHits: number(),
|
|
13052
|
+
getFrameMisses: number(),
|
|
13053
|
+
budgetMb: number()
|
|
13054
|
+
});
|
|
13055
|
+
/** Decoder block — null when the decoder stage is unreachable or inactive. */
|
|
13056
|
+
var CameraDecoderStatusSchema = object({
|
|
13057
|
+
nodeId: string(),
|
|
13058
|
+
formats: array(string()).readonly(),
|
|
13059
|
+
sessionCount: number(),
|
|
13060
|
+
shm: CameraDecoderShmSchema
|
|
13061
|
+
});
|
|
13062
|
+
/** Motion block — null when motion detection is not active for this device. */
|
|
13063
|
+
var CameraMotionStatusSchema = object({
|
|
13064
|
+
enabled: boolean(),
|
|
13065
|
+
fps: number()
|
|
13066
|
+
});
|
|
13067
|
+
/** Detection provisioning sub-block. */
|
|
13068
|
+
var CameraDetectionProvisioningSchema = object({
|
|
13069
|
+
state: _enum([
|
|
13070
|
+
"idle",
|
|
13071
|
+
"installing",
|
|
13072
|
+
"verifying",
|
|
13073
|
+
"ready",
|
|
13074
|
+
"failed"
|
|
13075
|
+
]),
|
|
13076
|
+
error: string().optional()
|
|
13077
|
+
});
|
|
13078
|
+
/** Detection phase — derived from the runner's engine phase. */
|
|
13079
|
+
var CameraDetectionPhaseSchema = _enum([
|
|
13080
|
+
"idle",
|
|
13081
|
+
"watching",
|
|
13082
|
+
"active"
|
|
13083
|
+
]);
|
|
13084
|
+
/** Detection block — null when no detection node is assigned or reachable. */
|
|
13085
|
+
var CameraDetectionStatusSchema = object({
|
|
13086
|
+
nodeId: string(),
|
|
13087
|
+
engine: object({
|
|
13088
|
+
backend: string(),
|
|
13089
|
+
device: string()
|
|
13090
|
+
}),
|
|
13091
|
+
phase: CameraDetectionPhaseSchema,
|
|
13092
|
+
configuredFps: number(),
|
|
13093
|
+
actualFps: number(),
|
|
13094
|
+
queueDepth: number(),
|
|
13095
|
+
avgInferenceMs: number(),
|
|
13096
|
+
provisioning: CameraDetectionProvisioningSchema
|
|
13097
|
+
});
|
|
13098
|
+
/** Audio block — null when no audio node is assigned or reachable. */
|
|
13099
|
+
var CameraAudioStatusSchema = object({
|
|
13100
|
+
nodeId: string(),
|
|
13101
|
+
enabled: boolean()
|
|
13102
|
+
});
|
|
13103
|
+
/** Recording block — null when no recording cap is active for this device. */
|
|
13104
|
+
var CameraRecordingStatusSchema = object({
|
|
13105
|
+
mode: _enum([
|
|
13106
|
+
"off",
|
|
13107
|
+
"continuous",
|
|
13108
|
+
"events"
|
|
13109
|
+
]),
|
|
13110
|
+
active: boolean(),
|
|
13111
|
+
storageBytes: number()
|
|
13112
|
+
});
|
|
13113
|
+
/**
|
|
13114
|
+
* Aggregated per-camera pipeline status — server-composed, single call.
|
|
13115
|
+
*
|
|
13116
|
+
* The `assignment` and `source` blocks are always present.
|
|
13117
|
+
* Every other block is `null` when the stage is inactive or unreachable
|
|
13118
|
+
* during the bounded parallel fan-out in the orchestrator implementation.
|
|
13119
|
+
*
|
|
13120
|
+
* See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
|
|
13121
|
+
*/
|
|
13122
|
+
var CameraStatusSchema = object({
|
|
13123
|
+
deviceId: number(),
|
|
13124
|
+
assignment: CameraAssignmentStatusSchema,
|
|
13125
|
+
source: CameraSourceStatusSchema,
|
|
13126
|
+
broker: CameraBrokerStatusSchema.nullable(),
|
|
13127
|
+
decoder: CameraDecoderStatusSchema.nullable(),
|
|
13128
|
+
motion: CameraMotionStatusSchema.nullable(),
|
|
13129
|
+
detection: CameraDetectionStatusSchema.nullable(),
|
|
13130
|
+
audio: CameraAudioStatusSchema.nullable(),
|
|
13131
|
+
recording: CameraRecordingStatusSchema.nullable(),
|
|
13132
|
+
/** Unix timestamp (ms) when this snapshot was composed server-side. */
|
|
13133
|
+
fetchedAt: number()
|
|
13134
|
+
});
|
|
12916
13135
|
method(object({
|
|
12917
13136
|
deviceId: number(),
|
|
12918
13137
|
agentNodeId: string()
|
|
@@ -12980,6 +13199,12 @@ method(object({
|
|
|
12980
13199
|
}), {
|
|
12981
13200
|
kind: "mutation",
|
|
12982
13201
|
auth: "admin"
|
|
13202
|
+
}), method(object({
|
|
13203
|
+
agentNodeId: string(),
|
|
13204
|
+
maxCameras: number().int().nonnegative().nullable()
|
|
13205
|
+
}), object({ success: literal(true) }), {
|
|
13206
|
+
kind: "mutation",
|
|
13207
|
+
auth: "admin"
|
|
12983
13208
|
}), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
|
|
12984
13209
|
deviceId: number(),
|
|
12985
13210
|
addonId: string(),
|
|
@@ -13005,7 +13230,7 @@ method(object({
|
|
|
13005
13230
|
}), method(object({
|
|
13006
13231
|
deviceId: number(),
|
|
13007
13232
|
agentNodeId: string().optional()
|
|
13008
|
-
}), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
13233
|
+
}), CameraPipelineConfigSchema), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
|
|
13009
13234
|
name: string(),
|
|
13010
13235
|
description: string().optional(),
|
|
13011
13236
|
config: CameraPipelineConfigSchema
|
|
@@ -13492,7 +13717,7 @@ method(object({
|
|
|
13492
13717
|
}), _void(), {
|
|
13493
13718
|
kind: "mutation",
|
|
13494
13719
|
auth: "admin"
|
|
13495
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
13720
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
13496
13721
|
deviceId: number(),
|
|
13497
13722
|
values: record(string(), unknown())
|
|
13498
13723
|
}), object({ success: literal(true) }), {
|
|
@@ -14174,7 +14399,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
14174
14399
|
var PidResourceStatsSchema = object({
|
|
14175
14400
|
pid: number(),
|
|
14176
14401
|
cpu: number(),
|
|
14177
|
-
memory: number()
|
|
14402
|
+
memory: number(),
|
|
14403
|
+
/**
|
|
14404
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
14405
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
14406
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
14407
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
14408
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
14409
|
+
*/
|
|
14410
|
+
privateBytes: number().optional(),
|
|
14411
|
+
/**
|
|
14412
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
14413
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
14414
|
+
*/
|
|
14415
|
+
sharedBytes: number().optional()
|
|
14178
14416
|
});
|
|
14179
14417
|
var AddonInstanceSchema = object({
|
|
14180
14418
|
addonId: string(),
|
|
@@ -14223,6 +14461,17 @@ var KillProcessResultSchema = object({
|
|
|
14223
14461
|
reason: string().optional(),
|
|
14224
14462
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
14225
14463
|
});
|
|
14464
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
14465
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
14466
|
+
addonId: string() });
|
|
14467
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
14468
|
+
success: boolean(),
|
|
14469
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14470
|
+
path: string().optional(),
|
|
14471
|
+
/** Process pid that was signalled. */
|
|
14472
|
+
pid: number().optional(),
|
|
14473
|
+
reason: string().optional()
|
|
14474
|
+
});
|
|
14226
14475
|
var SystemMetricsSchema = object({
|
|
14227
14476
|
cpuPercent: number(),
|
|
14228
14477
|
memoryPercent: number(),
|
|
@@ -14236,6 +14485,9 @@ var SystemMetricsSchema = object({
|
|
|
14236
14485
|
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(KillProcessInputSchema, KillProcessResultSchema, {
|
|
14237
14486
|
kind: "mutation",
|
|
14238
14487
|
auth: "admin"
|
|
14488
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
14489
|
+
kind: "mutation",
|
|
14490
|
+
auth: "admin"
|
|
14239
14491
|
});
|
|
14240
14492
|
var PtzPresetSchema = object({
|
|
14241
14493
|
id: string(),
|
|
@@ -14602,63 +14854,6 @@ method(object({
|
|
|
14602
14854
|
auth: "admin"
|
|
14603
14855
|
});
|
|
14604
14856
|
/**
|
|
14605
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
14606
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
14607
|
-
*
|
|
14608
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
14609
|
-
* provider for this cap (per device) backed by its local
|
|
14610
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
14611
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
14612
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
14613
|
-
* so there's no parallel bridge path anymore.
|
|
14614
|
-
*
|
|
14615
|
-
* The surface is intentionally small — every method corresponds to a
|
|
14616
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
14617
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
14618
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
14619
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
14620
|
-
*/
|
|
14621
|
-
var StreamSourceEntrySchema$1 = object({
|
|
14622
|
-
id: string(),
|
|
14623
|
-
label: string(),
|
|
14624
|
-
protocol: _enum([
|
|
14625
|
-
"rtsp",
|
|
14626
|
-
"rtmp",
|
|
14627
|
-
"annexb",
|
|
14628
|
-
"http-mjpeg",
|
|
14629
|
-
"webrtc",
|
|
14630
|
-
"custom"
|
|
14631
|
-
]),
|
|
14632
|
-
url: string().optional(),
|
|
14633
|
-
resolution: object({
|
|
14634
|
-
width: number(),
|
|
14635
|
-
height: number()
|
|
14636
|
-
}).optional(),
|
|
14637
|
-
fps: number().optional(),
|
|
14638
|
-
bitrate: number().optional(),
|
|
14639
|
-
codec: string().optional(),
|
|
14640
|
-
profileHint: CamProfileSchema.optional(),
|
|
14641
|
-
sdp: string().optional()
|
|
14642
|
-
});
|
|
14643
|
-
var ConfigEntrySchema$1 = object({
|
|
14644
|
-
key: string(),
|
|
14645
|
-
value: unknown()
|
|
14646
|
-
});
|
|
14647
|
-
var RawStateResultSchema = object({
|
|
14648
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
14649
|
-
source: string(),
|
|
14650
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
14651
|
-
data: record(string(), unknown())
|
|
14652
|
-
});
|
|
14653
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
14654
|
-
deviceId: number(),
|
|
14655
|
-
values: record(string(), unknown())
|
|
14656
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
14657
|
-
deviceId: number(),
|
|
14658
|
-
action: string().min(1),
|
|
14659
|
-
input: unknown()
|
|
14660
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
14661
|
-
/**
|
|
14662
14857
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
14663
14858
|
* + auth surface in a vendor-neutral shape.
|
|
14664
14859
|
*
|
|
@@ -18341,6 +18536,12 @@ Object.freeze({
|
|
|
18341
18536
|
addonId: null,
|
|
18342
18537
|
access: "view"
|
|
18343
18538
|
},
|
|
18539
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
18540
|
+
capName: "metrics-provider",
|
|
18541
|
+
capScope: "system",
|
|
18542
|
+
addonId: null,
|
|
18543
|
+
access: "create"
|
|
18544
|
+
},
|
|
18344
18545
|
"metricsProvider.getAddonStats": {
|
|
18345
18546
|
capName: "metrics-provider",
|
|
18346
18547
|
capScope: "system",
|
|
@@ -18797,6 +18998,12 @@ Object.freeze({
|
|
|
18797
18998
|
addonId: null,
|
|
18798
18999
|
access: "view"
|
|
18799
19000
|
},
|
|
19001
|
+
"pipelineExecutor.getEngineProvisioning": {
|
|
19002
|
+
capName: "pipeline-executor",
|
|
19003
|
+
capScope: "system",
|
|
19004
|
+
addonId: null,
|
|
19005
|
+
access: "view"
|
|
19006
|
+
},
|
|
18800
19007
|
"pipelineExecutor.getGlobalPipelineConfig": {
|
|
18801
19008
|
capName: "pipeline-executor",
|
|
18802
19009
|
capScope: "system",
|
|
@@ -19001,6 +19208,18 @@ Object.freeze({
|
|
|
19001
19208
|
addonId: null,
|
|
19002
19209
|
access: "view"
|
|
19003
19210
|
},
|
|
19211
|
+
"pipelineOrchestrator.getCameraStatus": {
|
|
19212
|
+
capName: "pipeline-orchestrator",
|
|
19213
|
+
capScope: "system",
|
|
19214
|
+
addonId: null,
|
|
19215
|
+
access: "view"
|
|
19216
|
+
},
|
|
19217
|
+
"pipelineOrchestrator.getCameraStatuses": {
|
|
19218
|
+
capName: "pipeline-orchestrator",
|
|
19219
|
+
capScope: "system",
|
|
19220
|
+
addonId: null,
|
|
19221
|
+
access: "view"
|
|
19222
|
+
},
|
|
19004
19223
|
"pipelineOrchestrator.getCameraStepOverrides": {
|
|
19005
19224
|
capName: "pipeline-orchestrator",
|
|
19006
19225
|
capScope: "system",
|
|
@@ -19085,6 +19304,12 @@ Object.freeze({
|
|
|
19085
19304
|
addonId: null,
|
|
19086
19305
|
access: "create"
|
|
19087
19306
|
},
|
|
19307
|
+
"pipelineOrchestrator.setAgentMaxCameras": {
|
|
19308
|
+
capName: "pipeline-orchestrator",
|
|
19309
|
+
capScope: "system",
|
|
19310
|
+
addonId: null,
|
|
19311
|
+
access: "create"
|
|
19312
|
+
},
|
|
19088
19313
|
"pipelineOrchestrator.setCameraPipelineForAgent": {
|
|
19089
19314
|
capName: "pipeline-orchestrator",
|
|
19090
19315
|
capScope: "system",
|
|
@@ -20603,7 +20828,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
20603
20828
|
capability: adminUiCapability,
|
|
20604
20829
|
provider: {
|
|
20605
20830
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
20606
|
-
getVersion: async () => ({ version: "
|
|
20831
|
+
getVersion: async () => ({ version: "1.0.7" })
|
|
20607
20832
|
}
|
|
20608
20833
|
}];
|
|
20609
20834
|
}
|