@camstack/addon-advanced-notifier 1.0.4 → 1.0.6

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