@camstack/addon-export-ha-mqtt 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.
@@ -4677,63 +4677,7 @@ function number(params) {
4677
4677
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
4678
4678
  }
4679
4679
  //#endregion
4680
- //#region ../types/dist/index.mjs
4681
- /**
4682
- * Deep wiring healthcheck — snapshot of active reachability probes across
4683
- * every declared capability + widget of every installed plugin, on every
4684
- * node. Produced by the backend `WiringHealthService` and surfaced via
4685
- * `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
4686
- *
4687
- * Unlike `/health` (process liveness), this reflects whether each cap/widget
4688
- * is actually *reachable* over the real cap-dispatch path. See spec
4689
- * `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
4690
- */
4691
- /** What kind of target a probe addressed. */
4692
- var wiringProbeKindSchema = _enum([
4693
- "singleton",
4694
- "device",
4695
- "widget"
4696
- ]);
4697
- /** Result of probing a single (cap|widget [, device]) target. */
4698
- var wiringProbeResultSchema = object({
4699
- capName: string(),
4700
- kind: wiringProbeKindSchema,
4701
- deviceId: number$1().optional(),
4702
- reachable: boolean(),
4703
- latencyMs: number$1(),
4704
- error: string().optional()
4705
- });
4706
- /** Per-addon roll-up of cap + widget probe results. */
4707
- var wiringAddonHealthSchema = object({
4708
- addonId: string(),
4709
- caps: array(wiringProbeResultSchema).readonly(),
4710
- widgets: array(wiringProbeResultSchema).readonly()
4711
- });
4712
- /** Per-node roll-up. */
4713
- var wiringNodeHealthSchema = object({
4714
- nodeId: string(),
4715
- addons: array(wiringAddonHealthSchema).readonly()
4716
- });
4717
- object({
4718
- /** True only when every probed target is reachable. */
4719
- ok: boolean(),
4720
- /** True when at least one target is unreachable. */
4721
- degraded: boolean(),
4722
- checkedAt: string(),
4723
- nodes: array(wiringNodeHealthSchema).readonly(),
4724
- summary: object({
4725
- total: number$1(),
4726
- reachable: number$1(),
4727
- unreachable: number$1()
4728
- })
4729
- });
4730
- var MODEL_FORMATS = [
4731
- "onnx",
4732
- "coreml",
4733
- "openvino",
4734
- "tflite",
4735
- "pt"
4736
- ];
4680
+ //#region ../types/dist/sleep-D7JeS58T.mjs
4737
4681
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4738
4682
  EventCategory["SystemBoot"] = "system.boot";
4739
4683
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5031,6 +4975,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5031
4975
  */
5032
4976
  EventCategory["PipelineEngineMetricsSnapshot"] = "pipeline.engine-metrics-snapshot";
5033
4977
  /**
4978
+ * Per-node detection-engine runtime-provisioning transition. Emitted by
4979
+ * the detection-pipeline provider on every state change of its lazy
4980
+ * engine-provisioning machine (idle → installing → verifying → ready,
4981
+ * or → failed with a `nextRetryAt`). Payload is the
4982
+ * `EngineProvisioningState` snapshot; `event.source.nodeId` carries the
4983
+ * node. The Pipeline page subscribes to drive a live "installing
4984
+ * OpenVINO… / ready" indicator per node without polling
4985
+ * `pipelineExecutor.getEngineProvisioning`. Telemetry-grade (D8): the UI
4986
+ * also reads the cap snapshot on mount / reconnect. Phase 2.
4987
+ */
4988
+ EventCategory["PipelineEngineProvisioning"] = "pipeline.engine-provisioning";
4989
+ /**
5034
4990
  * Cluster topology snapshot. Carries the same payload returned by
5035
4991
  * `nodes.topology` (every reachable node + addons + processes).
5036
4992
  * Emitted by the hub on any agent / addon lifecycle change
@@ -6044,7 +6000,7 @@ var ProfileSlotSchema = object({
6044
6000
  * Zod schema for StreamSourceEntry — the canonical stream descriptor
6045
6001
  * exposed by ICameraDevice.getStreamSources() and consumed by the broker.
6046
6002
  */
6047
- var StreamSourceEntrySchema = object({
6003
+ var StreamSourceEntrySchema$1 = object({
6048
6004
  id: string(),
6049
6005
  label: string(),
6050
6006
  protocol: _enum([
@@ -6266,894 +6222,1080 @@ var ProfileRtspEntrySchema = object({
6266
6222
  codec: string().optional(),
6267
6223
  resolution: CamStreamResolutionSchema.optional()
6268
6224
  });
6269
- /**
6270
- * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
6271
- * Named `RecordingWeekday` to avoid collision with the string-union
6272
- * `Weekday` exported from `interfaces/timezones.ts`.
6273
- */
6274
- var RecordingWeekdaySchema = number$1().int().min(0).max(6);
6275
- var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
6276
- var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
6277
- kind: literal("timeOfDay"),
6278
- start: string().regex(HHMM),
6279
- end: string().regex(HHMM),
6280
- /** Restrict to these weekdays; omit = every day. */
6281
- days: array(RecordingWeekdaySchema).optional()
6282
- })]);
6283
- var RecordingModeSchema = _enum([
6284
- "continuous",
6285
- "onMotion",
6286
- "onAudioThreshold"
6287
- ]);
6288
- /**
6289
- * First-class, authoritative per-camera storage mode the netta choice the UI
6290
- * reads directly (never inferred from `rules`):
6291
- * - `off` not recording.
6292
- * - `events` — record only around triggers (motion / audio threshold),
6293
- * with pre/post-buffer.
6294
- * - `continuous` record 24/7 within the schedule.
6295
- *
6296
- * `mode` compiles one-way to the internal `rules[]` consumed by the policy
6297
- * engine (see `compileRules`); `rules[]` is never authored directly anymore.
6298
- */
6299
- var RecordingStorageModeSchema = _enum([
6300
- "off",
6301
- "events",
6302
- "continuous"
6303
- ]);
6304
- /** Which detectors trigger an `events`-mode recording. */
6305
- var RecordingTriggersSchema = object({
6306
- motion: boolean().optional(),
6307
- audioThresholdDbfs: number$1().optional()
6308
- });
6309
- /**
6310
- * Mode of a single recording band the recorder per-band vocabulary.
6311
- *
6312
- * Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
6313
- * only ever `continuous` or `events`; "off" is expressed by the absence of a
6314
- * covering band, not by a band value.
6315
- */
6316
- var RecordingBandModeSchema = _enum(["continuous", "events"]);
6317
- /**
6318
- * Triggers for an `events`-mode band. Identical shape to
6319
- * `RecordingTriggersSchema`reuse that schema as the band trigger type so the
6320
- * two never drift.
6321
- */
6322
- var RecordingBandTriggersSchema = RecordingTriggersSchema;
6323
- /**
6324
- * A single mode-per-band window the canonical recorder band shape, the
6325
- * single source of truth re-used by `addon-pipeline/recorder`.
6326
- *
6327
- * `days` lists the weekdays the band covers (empty = every day, matching the
6328
- * band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
6329
- * span wraps past midnight (handled by the band engine).
6330
- */
6331
- var RecordingBandSchema = object({
6332
- days: array(RecordingWeekdaySchema),
6333
- start: string().regex(HHMM),
6334
- end: string().regex(HHMM),
6335
- mode: RecordingBandModeSchema,
6336
- triggers: RecordingBandTriggersSchema.optional(),
6337
- preBufferSec: number$1().min(0).optional(),
6338
- postBufferSec: number$1().min(0).optional()
6339
- });
6340
- var RecordingRuleSchema = object({
6341
- schedule: RecordingScheduleSchema,
6342
- mode: RecordingModeSchema,
6343
- /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
6344
- preBufferSec: number$1().min(0).default(0),
6345
- /** Keep recording until this many seconds after the last trigger. */
6346
- postBufferSec: number$1().min(0).default(0),
6347
- /** Each new trigger restarts the post-buffer window. */
6348
- resetTimeoutOnNewEvent: boolean().default(true),
6349
- /** onAudioThreshold only dBFS level that counts as a trigger. */
6350
- thresholdDbfs: number$1().optional()
6351
- });
6352
- /**
6353
- * Per-device retention overrides. Every field is optional; an unset or `0`
6354
- * value inherits the node-wide recorder default. Only footage-lifetime limits
6355
- * live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
6356
- * (when the volume is too full to keep recording) is NOT a per-camera concern —
6357
- * it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
6358
- * shared by every camera writing to that volume.
6359
- */
6360
- var RecordingRetentionSchema = object({
6361
- maxAgeDays: number$1().min(0).optional(),
6362
- maxSizeGb: number$1().min(0).optional()
6363
- });
6364
- /**
6365
- * The full per-camera recording intent — the wire shape of a RecordingTarget.
6366
- *
6367
- * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
6368
- * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
6369
- * only for transition + migration (`migrateRulesToMode`); the policy engine
6370
- * consumes the compiled output of `compileRules(config)`, never `rules` directly.
6371
- */
6372
- var RecordingConfigSchema = object({
6373
- enabled: boolean(),
6374
- /** Authoritative storage mode. Absent on legacy targets → derived once via
6375
- * `migrateRulesToMode`, then persisted. */
6376
- mode: RecordingStorageModeSchema.optional(),
6377
- profiles: array(CamProfileSchema).optional(),
6378
- segmentSeconds: number$1().int().positive().optional(),
6379
- /** Shared recording time-bands for `events` & `continuous` — record only when
6380
- * the wall-clock falls inside one of these windows. Omit or empty = always.
6381
- * `continuous` compiles to one rule per band; `events` to band × trigger. */
6382
- schedules: array(RecordingScheduleSchema).optional(),
6383
- /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
6384
- * normalized into `schedules` on read and never written going forward. (Not
6385
- * tagged `@deprecated`: the normalization paths must read it cast-free.) */
6386
- schedule: RecordingScheduleSchema.optional(),
6387
- /** `events`-mode only — which detectors trigger a recording. */
6388
- triggers: RecordingTriggersSchema.optional(),
6389
- /** `events`-mode only — seconds retained before / after a trigger. */
6390
- preBufferSec: number$1().min(0).optional(),
6391
- postBufferSec: number$1().min(0).optional(),
6392
- /** DEPRECATED authoring input; retained for migration/transition. */
6393
- rules: array(RecordingRuleSchema).optional(),
6394
- /**
6395
- * AUTHORITATIVE mode-per-band recording model (recorder). When present it
6396
- * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
6397
- * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
6398
- * derived into bands once via `migrateConfigToBands`.
6399
- */
6400
- bands: array(RecordingBandSchema).optional(),
6401
- retention: RecordingRetentionSchema.optional()
6402
- });
6403
- /**
6404
- * `StorageLocationType` — an addon-declared id that identifies the *kind* of
6405
- * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
6406
- * so the persisted record schema and the consumer-facing cap can both consume it
6407
- * without forming a circular import. The `storage` cap re-exports it
6408
- * verbatim for back-compat.
6409
- *
6410
- * This Zod schema is the **authoritative source** for `StorageLocationType`.
6411
- * The TS alias in `./storage.ts` re-exports `z.infer<typeof
6412
- * StorageLocationTypeSchema>` so the wire surface (cap) and the legacy
6413
- * `IStorageProvider` interface stay in lockstep.
6414
- *
6415
- * The type is now an **open string** (not a closed enum) — addons declare
6416
- * their own location kinds via `StorageLocationDeclaration.id`. The regex
6417
- * enforces a safe id format: lowercase-start, alphanumeric + hyphens.
6418
- */
6419
- var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
6420
- /**
6421
- * Persisted record for a storage location instance. Operators can register
6422
- * multiple instances for multi-cardinality types (e.g. two `backups`
6423
- * locations with different `providerId`s). Cardinality is now declared per
6424
- * location via `StorageLocationDeclaration.cardinality` — the static
6425
- * `STORAGE_LOCATION_CARDINALITY` map has been removed.
6426
- *
6427
- * `id` is a stable namespaced string of the form `<type>:<slug>`.
6428
- * The default location for a type uses `id === <type>:default` by
6429
- * convention (the bare type ref like `'backups'` resolves to it).
6430
- *
6431
- * `isSystem: true` marks a location as orchestrator-seeded and
6432
- * undeletable. The bootstrap-installed defaults (one per type) carry
6433
- * this flag; operator-added locations don't. Editing the config of
6434
- * a system location is allowed (path migration, provider swap) but
6435
- * deleting it is rejected at the cap level.
6436
- */
6437
- var StorageLocationSchema = object({
6438
- id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
6439
- type: string(),
6440
- displayName: string().min(1),
6441
- providerId: string().min(1),
6442
- config: record(string(), unknown()),
6443
- /**
6444
- * Cluster node this location physically lives on. REQUIRED for node-local
6445
- * providers (filesystem — the path exists on one node's disk), null/absent
6446
- * for node-agnostic providers (S3/SFTP/WebDAV, reachable from any node).
6447
- * `'hub'` is the hub node. Validated against the provider's `nodeLocal`
6448
- * flag at upsert time, not here (the schema is provider-agnostic).
6449
- */
6450
- nodeId: string().optional(),
6451
- isDefault: boolean().default(false),
6452
- isSystem: boolean().default(false),
6453
- createdAt: number$1(),
6454
- updatedAt: number$1()
6455
- });
6456
- /**
6457
- * Reference accepted by consumer-facing `api.storage.*` calls.
6458
- * Either:
6459
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
6460
- * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
6461
- *
6462
- * The orchestrator's `resolveRef(ref)` handles both cases.
6463
- */
6464
- var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]);
6465
- /**
6466
- * `StorageLocationDeclaration` — a single storage-location entry declared by
6467
- * an addon in its `package.json` under `camstack.storageLocations`.
6468
- *
6469
- * Design intent:
6470
- * - **Addon declares its needs** — each addon describes the logical storage
6471
- * slots it requires (e.g. `recordings`, `recordingsLow`) without caring
6472
- * about the physical path.
6473
- * - **Kernel aggregates** — at boot the kernel collects declarations from all
6474
- * installed addons, deduplicates by `id`, and exposes the union via the
6475
- * storage-locations settings surface.
6476
- * - **Orchestrator seeds** — for every declared `id` the orchestrator ensures
6477
- * at least one instance named `<id>:default` is present, using
6478
- * `defaultsTo` to inherit the resolved root from another location when the
6479
- * declaration is a derivative slot (e.g. `recordingsLow` defaults to
6480
- * `recordings`).
6481
- * - **ids are global** — `id` values are shared across the entire deployment;
6482
- * two addons declaring the same `id` must agree on `cardinality` (validated
6483
- * at kernel aggregation time, not here).
6484
- */
6485
- var StorageLocationDeclarationSchema = object({
6486
- /**
6487
- * Global location identifier, e.g. `recordings` or `recordingsLow`.
6488
- * Must start with a lowercase letter and may contain letters, digits, and
6489
- * hyphens.
6490
- */
6491
- id: string().regex(/^[a-z][a-zA-Z0-9-]*$/, { message: "id must start with a lowercase letter and contain only letters, digits, or hyphens" }),
6492
- /** Human-readable name shown in the admin UI. */
6493
- displayName: string().min(1, { message: "displayName must not be empty" }),
6494
- /** Optional longer explanation of what data this location stores. */
6495
- description: string().optional(),
6496
- /**
6497
- * `single` — exactly one instance of this location is allowed system-wide
6498
- * (e.g. `logs`, `models`). The operator can edit it but not add more.
6499
- * `multi` — the operator may register several instances (e.g. a second
6500
- * `recordings` on a NAS for disk tiering); one is the default at any time.
6501
- */
6502
- cardinality: _enum(["single", "multi"]),
6503
- /**
6504
- * When set, the default instance for this location inherits its resolved
6505
- * root from the named location's default instance. Useful for derivative
6506
- * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
6507
- * configure the primary location.
6508
- */
6509
- defaultsTo: string().optional()
6510
- });
6511
- var DecoderStatsSchema = object({
6512
- inputFps: number$1(),
6513
- outputFps: number$1(),
6514
- avgDecodeTimeMs: number$1(),
6515
- droppedFrames: number$1()
6516
- });
6517
- var DecoderSessionConfigSchema = object({
6518
- codec: string(),
6519
- maxFps: number$1().default(0),
6520
- outputFormat: _enum([
6521
- "jpeg",
6522
- "rgb",
6523
- "bgr",
6524
- "yuv420",
6525
- "gray"
6526
- ]).default("jpeg"),
6527
- scale: number$1().default(1),
6528
- width: number$1().optional(),
6529
- height: number$1().optional(),
6225
+ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6226
+ DeviceType["Camera"] = "camera";
6227
+ DeviceType["Hub"] = "hub";
6228
+ DeviceType["Light"] = "light";
6229
+ DeviceType["Siren"] = "siren";
6230
+ DeviceType["Switch"] = "switch";
6231
+ DeviceType["Sensor"] = "sensor";
6232
+ DeviceType["Thermostat"] = "thermostat";
6233
+ DeviceType["Button"] = "button";
6234
+ /** Generic stateless event emitter — carries a device's EXACT declared
6235
+ * event vocabulary verbatim (no normalization). Installed with the
6236
+ * `event-emitter` cap. Sources: HA `event.*` entities (structured) and
6237
+ * HA bus events (e.g. `zha_event`, generic). */
6238
+ DeviceType["EventEmitter"] = "event-emitter";
6239
+ /** Firmware/software update entity — current vs available version,
6240
+ * updatable flag, update state, and an install action. Installed with
6241
+ * the `update` cap. Sources: Homematic firmware-update channels (and
6242
+ * reusable by other providers, e.g. HA `update.*` entities). */
6243
+ DeviceType["Update"] = "update";
6244
+ DeviceType["Generic"] = "generic";
6245
+ /** Generic notification delivery target (HA `notify.<service>`, future
6246
+ * Telegram / Discord / ntfy / SMTP, …). One device per delivery
6247
+ * endpoint; the `notifier` cap defines the send surface. */
6248
+ DeviceType["Notifier"] = "notifier";
6249
+ /** Pre-recorded action sequence with optional parameters
6250
+ * (HA `script.*`). Runnable via `script-runner` cap. */
6251
+ DeviceType["Script"] = "script";
6252
+ /** Automation rule (HA `automation.*`) enable/disable + manual
6253
+ * trigger surface exposed via `automation-control` cap. */
6254
+ DeviceType["Automation"] = "automation";
6255
+ /** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
6256
+ DeviceType["Lock"] = "lock";
6257
+ /** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
6258
+ * `valve.*`). `cover` cap with sub-roles for variant. */
6259
+ DeviceType["Cover"] = "cover";
6260
+ /** Pipe / water / gas valve with open/close/stop and optional
6261
+ * position (HA `valve.*`). `valve` cap — a cover-sibling actuator
6262
+ * modelled on the same open/closed lifecycle. */
6263
+ DeviceType["Valve"] = "valve";
6264
+ /** Humidifier / dehumidifier with on/off + target humidity + mode
6265
+ * (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
6266
+ * modelled on the same target / mode lifecycle. */
6267
+ DeviceType["Humidifier"] = "humidifier";
6268
+ /** Water heater / boiler with target temperature + operation mode +
6269
+ * away mode (HA `water_heater.*`). `water-heater` cap a
6270
+ * climate-family actuator. */
6271
+ DeviceType["WaterHeater"] = "water-heater";
6272
+ /** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
6273
+ DeviceType["Fan"] = "fan";
6274
+ /** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
6275
+ * the camera surface those use `Camera`. `media-player` cap. */
6276
+ DeviceType["MediaPlayer"] = "media-player";
6277
+ /** Security panel / alarm system (HA `alarm_control_panel.*`).
6278
+ * `alarm-panel` cap. */
6279
+ DeviceType["AlarmPanel"] = "alarm-panel";
6280
+ /** Generic user-settable input (HA `number` / `input_number` / `select`
6281
+ * / `input_select` / `text` / `input_text` / `input_datetime`).
6282
+ * Sub-type via `DeviceRole`: NumericControl / SelectControl /
6283
+ * TextControl / DateTimeControl. */
6284
+ DeviceType["Control"] = "control";
6285
+ /** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
6286
+ * `presence` cap. */
6287
+ DeviceType["Presence"] = "presence";
6288
+ /** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
6289
+ * `weather` cap. */
6290
+ DeviceType["Weather"] = "weather";
6291
+ /** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
6292
+ DeviceType["Vacuum"] = "vacuum";
6293
+ /** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
6294
+ * `lawn-mower-control` cap. */
6295
+ DeviceType["LawnMower"] = "lawn-mower";
6296
+ /** Physical HA device group — parent container for entity-children
6297
+ * adopted from a single HA device entry. Not renderable as a
6298
+ * standalone device; exists only to anchor child entities. */
6299
+ DeviceType["Container"] = "container";
6300
+ /** Single still-image entity (HA `image.*`). Read-only display of an
6301
+ * `entity_picture` signed URL the browser loads directly. `image` cap. */
6302
+ DeviceType["Image"] = "image";
6303
+ return DeviceType;
6304
+ }({});
6305
+ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
6306
+ DeviceFeature["BatteryOperated"] = "battery-operated";
6307
+ DeviceFeature["Rebootable"] = "rebootable";
6530
6308
  /**
6531
- * Identifier of the camera this decoder session serves. Optional
6532
- * because the cap is generic (any caller could request decode), but
6533
- * stream-broker passes it so decoder logs include `deviceId` for
6534
- * per-camera filtering when diagnosing failures (e.g. node-av
6535
- * sendPacket errors on a single hung camera).
6309
+ * Device supports an on-demand re-sync of its derived spec with its
6310
+ * upstream source drives the generic Re-sync button. The owning
6311
+ * provider implements the action via the `device-adoption.resync` cap.
6536
6312
  */
6537
- deviceId: number$1().int().nonnegative().optional(),
6313
+ DeviceFeature["Resyncable"] = "resyncable";
6314
+ DeviceFeature["NativeSnapshot"] = "native-snapshot";
6315
+ DeviceFeature["DoorbellButton"] = "doorbell-button";
6316
+ DeviceFeature["TwoWayAudio"] = "two-way-audio";
6317
+ DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
6538
6318
  /**
6539
- * Free-form tag for log scoping. Stream-broker uses
6540
- * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
6541
- * on every line so `grep tag=broker:5/high` filters one camera
6542
- * profile cleanly.
6319
+ * Camera supports the on-firmware autotrack subsystem (subject-
6320
+ * following). Distinct from `PanTiltZoom` because not every PTZ
6321
+ * camera ships autotrack the admin UI uses this flag to gate
6322
+ * the autotrack toggle / settings card without re-deriving from
6323
+ * the cap registry. Mirrors `ptz-autotrack` cap registration:
6324
+ * driver sets this feature when probe confirms the firmware
6325
+ * surface, and registers the cap in the same code path.
6543
6326
  */
6544
- tag: string().optional(),
6327
+ DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
6545
6328
  /**
6546
- * Where the session delivers decoded frames (Phase 5 / D9):
6329
+ * Accessory exposes a "trigger on motion" toggle the parent camera's
6330
+ * motion detection automatically activates this device. Mirrors
6331
+ * `motion-trigger` cap registration: drivers set this feature in the
6332
+ * same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
6547
6333
  *
6548
- * - `'callback'` (default) the legacy pixel path: decoded frames are
6549
- * buffered as `DecodedFrame`s and drained via `pullFrames`.
6550
- * - `'shm'` the shared-memory frame plane: decoded frames are written
6551
- * into an OS shared-memory ring and drained as zero-pixel
6552
- * `FrameHandle`s via `pullHandles`. A session is one mode or the
6553
- * other — `pullFrames` returns nothing for an `'shm'` session and
6554
- * `pullHandles` returns nothing for a `'callback'` session.
6555
- */
6556
- frameSink: _enum(["callback", "shm"]).default("callback")
6557
- });
6558
- var EncodeProfileSchema = object({
6559
- video: object({
6560
- codec: _enum([
6561
- "h264",
6562
- "h265",
6563
- "copy"
6564
- ]),
6565
- profile: _enum([
6566
- "baseline",
6567
- "main",
6568
- "high"
6569
- ]).optional(),
6570
- width: number$1().int().positive().optional(),
6571
- height: number$1().int().positive().optional(),
6572
- fps: number$1().positive().optional(),
6573
- bitrateKbps: number$1().int().positive().optional(),
6574
- gopFrames: number$1().int().positive().optional(),
6575
- bf: number$1().int().min(0).optional(),
6576
- preset: _enum([
6577
- "ultrafast",
6578
- "superfast",
6579
- "veryfast",
6580
- "faster",
6581
- "fast",
6582
- "medium"
6583
- ]).optional(),
6584
- tune: _enum([
6585
- "zerolatency",
6586
- "film",
6587
- "animation"
6588
- ]).optional()
6589
- }),
6590
- audio: union([literal("passthrough"), object({
6591
- codec: _enum([
6592
- "opus",
6593
- "aac",
6594
- "pcmu",
6595
- "pcma",
6596
- "copy"
6597
- ]),
6598
- bitrateKbps: number$1().int().positive().optional(),
6599
- sampleRateHz: number$1().int().positive().optional(),
6600
- channels: union([literal(1), literal(2)]).optional()
6601
- })]),
6602
- /**
6603
- * ffmpeg input-side args, inserted between the fixed global flags
6604
- * (`-hide_banner -loglevel error`) and `-i pipe:0`. Free-text array
6605
- * — the widget surfaces a textarea + suggestion chips for the most-
6606
- * used demuxer/format options.
6607
- */
6608
- inputArgs: array(string()).optional(),
6609
- /**
6610
- * ffmpeg output-side args, inserted between the encode block and
6611
- * the final `-f <muxer> pipe:1`. Use for muxer options, bitstream
6612
- * filters, codec-specific overrides. Free-text array.
6334
+ * Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
6335
+ * fast scalar without binding fetch), notifier rules, and `listAll`
6336
+ * filters that want "all devices with on-motion behaviour".
6613
6337
  */
6614
- outputArgs: array(string()).optional()
6615
- });
6616
- var YAMNET_TO_MACRO = {
6617
- mapping: {
6618
- Speech: "speech",
6619
- "Child speech, kid speaking": "speech",
6620
- Conversation: "speech",
6621
- "Narration, monologue": "speech",
6622
- Babbling: "speech",
6623
- Whispering: "speech",
6624
- "Speech synthesizer": "speech",
6625
- Humming: "speech",
6626
- Rapping: "speech",
6627
- Singing: "speech",
6628
- Choir: "speech",
6629
- "Child singing": "speech",
6630
- Shout: "scream",
6631
- Bellow: "scream",
6632
- Yell: "scream",
6633
- Screaming: "scream",
6634
- "Children shouting": "scream",
6635
- Whoop: "scream",
6636
- "Crying, sobbing": "crying",
6637
- "Baby cry, infant cry": "crying",
6638
- Whimper: "crying",
6639
- "Wail, moan": "crying",
6640
- Groan: "crying",
6641
- Laughter: "laughter",
6642
- "Baby laughter": "laughter",
6643
- Giggle: "laughter",
6644
- Snicker: "laughter",
6645
- "Belly laugh": "laughter",
6646
- "Chuckle, chortle": "laughter",
6647
- Music: "music",
6648
- "Musical instrument": "music",
6649
- Guitar: "music",
6650
- Piano: "music",
6651
- Drum: "music",
6652
- "Drum kit": "music",
6653
- "Violin, fiddle": "music",
6654
- Flute: "music",
6655
- Saxophone: "music",
6656
- Trumpet: "music",
6657
- Synthesizer: "music",
6658
- "Pop music": "music",
6659
- "Rock music": "music",
6660
- "Hip hop music": "music",
6661
- "Classical music": "music",
6662
- Jazz: "music",
6663
- "Electronic music": "music",
6664
- "Background music": "music",
6665
- Dog: "dog",
6666
- Bark: "dog",
6667
- Yip: "dog",
6668
- Howl: "dog",
6669
- "Bow-wow": "dog",
6670
- Growling: "dog",
6671
- "Whimper (dog)": "dog",
6672
- Cat: "cat",
6673
- Purr: "cat",
6674
- Meow: "cat",
6675
- Hiss: "cat",
6676
- Caterwaul: "cat",
6677
- Bird: "bird",
6678
- "Bird vocalization, bird call, bird song": "bird",
6679
- "Chirp, tweet": "bird",
6680
- Squawk: "bird",
6681
- Crow: "bird",
6682
- Owl: "bird",
6683
- "Pigeon, dove": "bird",
6684
- Animal: "animal",
6685
- "Domestic animals, pets": "animal",
6686
- "Livestock, farm animals, working animals": "animal",
6687
- Horse: "animal",
6688
- "Cattle, bovinae": "animal",
6689
- Pig: "animal",
6690
- Sheep: "animal",
6691
- Goat: "animal",
6692
- Frog: "animal",
6693
- Insect: "animal",
6694
- Cricket: "animal",
6695
- Alarm: "alarm",
6696
- "Alarm clock": "alarm",
6697
- "Smoke detector, smoke alarm": "alarm",
6698
- "Fire alarm": "alarm",
6699
- Buzzer: "alarm",
6700
- "Civil defense siren": "alarm",
6701
- "Car alarm": "alarm",
6702
- Siren: "siren",
6703
- "Police car (siren)": "siren",
6704
- "Ambulance (siren)": "siren",
6705
- "Fire engine, fire truck (siren)": "siren",
6706
- "Emergency vehicle": "siren",
6707
- Foghorn: "siren",
6708
- Doorbell: "doorbell",
6709
- "Ding-dong": "doorbell",
6710
- Knock: "doorbell",
6711
- Tap: "doorbell",
6712
- Glass: "glass_breaking",
6713
- Shatter: "glass_breaking",
6714
- "Chink, clink": "glass_breaking",
6715
- "Gunshot, gunfire": "gunshot",
6716
- "Machine gun": "gunshot",
6717
- Explosion: "gunshot",
6718
- Fireworks: "gunshot",
6719
- Firecracker: "gunshot",
6720
- "Artillery fire": "gunshot",
6721
- "Cap gun": "gunshot",
6722
- Boom: "gunshot",
6723
- Vehicle: "vehicle",
6724
- Car: "vehicle",
6725
- Truck: "vehicle",
6726
- Bus: "vehicle",
6727
- Motorcycle: "vehicle",
6728
- "Car passing by": "vehicle",
6729
- "Vehicle horn, car horn, honking": "vehicle",
6730
- "Traffic noise, roadway noise": "vehicle",
6731
- Train: "vehicle",
6732
- Aircraft: "vehicle",
6733
- Helicopter: "vehicle",
6734
- Bicycle: "vehicle",
6735
- Skateboard: "vehicle",
6736
- Fire: "fire",
6737
- Crackle: "fire",
6738
- Water: "water",
6739
- Rain: "water",
6740
- Raindrop: "water",
6741
- "Rain on surface": "water",
6742
- Stream: "water",
6743
- Waterfall: "water",
6744
- Ocean: "water",
6745
- "Waves, surf": "water",
6746
- "Splash, splatter": "water",
6747
- Wind: "wind",
6748
- Thunderstorm: "wind",
6749
- Thunder: "wind",
6750
- "Wind noise (microphone)": "wind",
6751
- "Rustling leaves": "wind",
6752
- Door: "door",
6753
- "Sliding door": "door",
6754
- Slam: "door",
6755
- "Cupboard open or close": "door",
6756
- "Walk, footsteps": "footsteps",
6757
- Run: "footsteps",
6758
- Shuffle: "footsteps",
6759
- Crowd: "crowd",
6760
- Chatter: "crowd",
6761
- Cheering: "crowd",
6762
- Applause: "crowd",
6763
- "Children playing": "crowd",
6764
- "Hubbub, speech noise, speech babble": "crowd",
6765
- Telephone: "telephone",
6766
- "Telephone bell ringing": "telephone",
6767
- Ringtone: "telephone",
6768
- "Telephone dialing, DTMF": "telephone",
6769
- "Busy signal": "telephone",
6770
- Engine: "engine",
6771
- "Engine starting": "engine",
6772
- Idling: "engine",
6773
- "Accelerating, revving, vroom": "engine",
6774
- "Light engine (high frequency)": "engine",
6775
- "Medium engine (mid frequency)": "engine",
6776
- "Heavy engine (low frequency)": "engine",
6777
- "Lawn mower": "engine",
6778
- Chainsaw: "engine",
6779
- Hammer: "tools",
6780
- Jackhammer: "tools",
6781
- Sawing: "tools",
6782
- "Power tool": "tools",
6783
- Drill: "tools",
6784
- Sanding: "tools",
6785
- Silence: "silence"
6786
- },
6787
- preserveOriginal: false
6788
- };
6789
- var APPLE_SA_TO_MACRO = {
6790
- mapping: {
6791
- speech: "speech",
6792
- child_speech: "speech",
6793
- conversation: "speech",
6794
- whispering: "speech",
6795
- singing: "speech",
6796
- humming: "speech",
6797
- shout: "scream",
6798
- yell: "scream",
6799
- screaming: "scream",
6800
- crying: "crying",
6801
- baby_crying: "crying",
6802
- sobbing: "crying",
6803
- laughter: "laughter",
6804
- baby_laughter: "laughter",
6805
- giggling: "laughter",
6806
- music: "music",
6807
- guitar: "music",
6808
- piano: "music",
6809
- drums: "music",
6810
- dog_bark: "dog",
6811
- dog_bow_wow: "dog",
6812
- dog_growling: "dog",
6813
- dog_howl: "dog",
6814
- cat_meow: "cat",
6815
- cat_purr: "cat",
6816
- cat_hiss: "cat",
6817
- bird: "bird",
6818
- bird_chirp: "bird",
6819
- bird_squawk: "bird",
6820
- animal: "animal",
6821
- horse: "animal",
6822
- cow_moo: "animal",
6823
- insect: "animal",
6824
- alarm: "alarm",
6825
- smoke_alarm: "alarm",
6826
- fire_alarm: "alarm",
6827
- car_alarm: "alarm",
6828
- siren: "siren",
6829
- police_siren: "siren",
6830
- ambulance_siren: "siren",
6831
- doorbell: "doorbell",
6832
- door_knock: "doorbell",
6833
- knocking: "doorbell",
6834
- glass_breaking: "glass_breaking",
6835
- glass_shatter: "glass_breaking",
6836
- gunshot: "gunshot",
6837
- explosion: "gunshot",
6838
- fireworks: "gunshot",
6839
- car: "vehicle",
6840
- truck: "vehicle",
6841
- motorcycle: "vehicle",
6842
- car_horn: "vehicle",
6843
- vehicle_horn: "vehicle",
6844
- traffic: "vehicle",
6845
- fire: "fire",
6846
- fire_crackle: "fire",
6847
- water: "water",
6848
- rain: "water",
6849
- ocean: "water",
6850
- splash: "water",
6851
- wind: "wind",
6852
- thunder: "wind",
6853
- thunderstorm: "wind",
6854
- door: "door",
6855
- door_slam: "door",
6856
- sliding_door: "door",
6857
- footsteps: "footsteps",
6858
- walking: "footsteps",
6859
- running: "footsteps",
6860
- crowd: "crowd",
6861
- chatter: "crowd",
6862
- cheering: "crowd",
6863
- applause: "crowd",
6864
- telephone_ring: "telephone",
6865
- ringtone: "telephone",
6866
- engine: "engine",
6867
- engine_starting: "engine",
6868
- lawn_mower: "engine",
6869
- chainsaw: "engine",
6870
- hammer: "tools",
6871
- jackhammer: "tools",
6872
- drill: "tools",
6873
- power_tool: "tools",
6874
- silence: "silence"
6875
- },
6876
- preserveOriginal: false
6877
- };
6878
- var _macroLookup = /* @__PURE__ */ new Map();
6879
- for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
6880
- for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
6881
- var DeviceType = /* @__PURE__ */ function(DeviceType) {
6882
- DeviceType["Camera"] = "camera";
6883
- DeviceType["Hub"] = "hub";
6884
- DeviceType["Light"] = "light";
6885
- DeviceType["Siren"] = "siren";
6886
- DeviceType["Switch"] = "switch";
6887
- DeviceType["Sensor"] = "sensor";
6888
- DeviceType["Thermostat"] = "thermostat";
6889
- DeviceType["Button"] = "button";
6890
- /** Generic stateless event emitter — carries a device's EXACT declared
6891
- * event vocabulary verbatim (no normalization). Installed with the
6892
- * `event-emitter` cap. Sources: HA `event.*` entities (structured) and
6893
- * HA bus events (e.g. `zha_event`, generic). */
6894
- DeviceType["EventEmitter"] = "event-emitter";
6895
- /** Firmware/software update entity — current vs available version,
6896
- * updatable flag, update state, and an install action. Installed with
6897
- * the `update` cap. Sources: Homematic firmware-update channels (and
6898
- * reusable by other providers, e.g. HA `update.*` entities). */
6899
- DeviceType["Update"] = "update";
6900
- DeviceType["Generic"] = "generic";
6901
- /** Generic notification delivery target (HA `notify.<service>`, future
6902
- * Telegram / Discord / ntfy / SMTP, …). One device per delivery
6903
- * endpoint; the `notifier` cap defines the send surface. */
6904
- DeviceType["Notifier"] = "notifier";
6905
- /** Pre-recorded action sequence with optional parameters
6906
- * (HA `script.*`). Runnable via `script-runner` cap. */
6907
- DeviceType["Script"] = "script";
6908
- /** Automation rule (HA `automation.*`) — enable/disable + manual
6909
- * trigger surface exposed via `automation-control` cap. */
6910
- DeviceType["Automation"] = "automation";
6911
- /** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
6912
- DeviceType["Lock"] = "lock";
6913
- /** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
6914
- * `valve.*`). `cover` cap with sub-roles for variant. */
6915
- DeviceType["Cover"] = "cover";
6916
- /** Pipe / water / gas valve with open/close/stop and optional
6917
- * position (HA `valve.*`). `valve` cap — a cover-sibling actuator
6918
- * modelled on the same open/closed lifecycle. */
6919
- DeviceType["Valve"] = "valve";
6920
- /** Humidifier / dehumidifier with on/off + target humidity + mode
6921
- * (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
6922
- * modelled on the same target / mode lifecycle. */
6923
- DeviceType["Humidifier"] = "humidifier";
6924
- /** Water heater / boiler with target temperature + operation mode +
6925
- * away mode (HA `water_heater.*`). `water-heater` cap — a
6926
- * climate-family actuator. */
6927
- DeviceType["WaterHeater"] = "water-heater";
6928
- /** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
6929
- DeviceType["Fan"] = "fan";
6930
- /** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
6931
- * the camera surface — those use `Camera`. `media-player` cap. */
6932
- DeviceType["MediaPlayer"] = "media-player";
6933
- /** Security panel / alarm system (HA `alarm_control_panel.*`).
6934
- * `alarm-panel` cap. */
6935
- DeviceType["AlarmPanel"] = "alarm-panel";
6936
- /** Generic user-settable input (HA `number` / `input_number` / `select`
6937
- * / `input_select` / `text` / `input_text` / `input_datetime`).
6938
- * Sub-type via `DeviceRole`: NumericControl / SelectControl /
6939
- * TextControl / DateTimeControl. */
6940
- DeviceType["Control"] = "control";
6941
- /** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
6942
- * `presence` cap. */
6943
- DeviceType["Presence"] = "presence";
6944
- /** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
6945
- * `weather` cap. */
6946
- DeviceType["Weather"] = "weather";
6947
- /** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
6948
- DeviceType["Vacuum"] = "vacuum";
6949
- /** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
6950
- * `lawn-mower-control` cap. */
6951
- DeviceType["LawnMower"] = "lawn-mower";
6952
- /** Physical HA device group — parent container for entity-children
6953
- * adopted from a single HA device entry. Not renderable as a
6954
- * standalone device; exists only to anchor child entities. */
6955
- DeviceType["Container"] = "container";
6956
- /** Single still-image entity (HA `image.*`). Read-only display of an
6957
- * `entity_picture` signed URL the browser loads directly. `image` cap. */
6958
- DeviceType["Image"] = "image";
6959
- return DeviceType;
6338
+ DeviceFeature["MotionTrigger"] = "motion-trigger";
6339
+ /** Light supports rgb-triplet color via `color` cap. */
6340
+ DeviceFeature["LightColorRgb"] = "light-color-rgb";
6341
+ /** Light supports HSV color via `color` cap. */
6342
+ DeviceFeature["LightColorHsv"] = "light-color-hsv";
6343
+ /** Light supports color-temperature (mired) via `color` cap. */
6344
+ DeviceFeature["LightColorMired"] = "light-color-mired";
6345
+ /** Thermostat supports a `heat_cool` dual setpoint (targetLow +
6346
+ * targetHigh). Gates the range slider UI. */
6347
+ DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
6348
+ /** Thermostat exposes target humidity and/or current humidity
6349
+ * readings. Gates the humidity controls. */
6350
+ DeviceFeature["ClimateHumidity"] = "climate-humidity";
6351
+ /** Thermostat exposes a fan-mode selector. */
6352
+ DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
6353
+ /** Thermostat exposes preset modes (eco / away / sleep / vendor). */
6354
+ DeviceFeature["ClimatePreset"] = "climate-preset";
6355
+ /** Cover exposes intermediate position control (0..100). Gates the
6356
+ * position slider UI. */
6357
+ DeviceFeature["CoverPositionable"] = "cover-positionable";
6358
+ /** Cover exposes slat-tilt control. Gates the tilt slider UI. */
6359
+ DeviceFeature["CoverTilt"] = "cover-tilt";
6360
+ /** Valve exposes intermediate position control (0..100). Gates the
6361
+ * position slider / drag surface UI. */
6362
+ DeviceFeature["ValvePositionable"] = "valve-positionable";
6363
+ /** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
6364
+ DeviceFeature["FanSpeed"] = "fan-speed";
6365
+ /** Fan exposes a preset mode selector. */
6366
+ DeviceFeature["FanPreset"] = "fan-preset";
6367
+ /** Fan exposes blade direction (forward/reverse) — typical of
6368
+ * ceiling fans. */
6369
+ DeviceFeature["FanDirection"] = "fan-direction";
6370
+ /** Fan exposes an oscillation toggle. */
6371
+ DeviceFeature["FanOscillating"] = "fan-oscillating";
6372
+ /** Lock requires a PIN code on lock/unlock. Gates the code-entry
6373
+ * field on the UI lock-controls panel. */
6374
+ DeviceFeature["LockPinRequired"] = "lock-pin-required";
6375
+ /** Lock supports a latch-release ("open door") action distinct from
6376
+ * unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
6377
+ * `supported_features`. Gates the Open Door button in the UI. */
6378
+ DeviceFeature["LockOpen"] = "lock-open";
6379
+ /** Media player exposes a seek-to-position surface. */
6380
+ DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
6381
+ /** Media player exposes a volume-level setter. */
6382
+ DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
6383
+ /** Media player exposes a mute toggle distinct from volume=0. */
6384
+ DeviceFeature["MediaPlayerMute"] = "media-player-mute";
6385
+ /** Media player exposes a shuffle toggle. */
6386
+ DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
6387
+ /** Media player exposes a repeat mode (off / all / one). */
6388
+ DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
6389
+ /** Media player exposes a source / input selector. */
6390
+ DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
6391
+ /** Media player exposes a play-arbitrary-media surface (URL / id). */
6392
+ DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
6393
+ /** Media player exposes next-track. */
6394
+ DeviceFeature["MediaPlayerNext"] = "media-player-next";
6395
+ /** Media player exposes previous-track. */
6396
+ DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
6397
+ /** Media player exposes stop distinct from pause. */
6398
+ DeviceFeature["MediaPlayerStop"] = "media-player-stop";
6399
+ /** Alarm panel requires a PIN code on arm/disarm. */
6400
+ DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
6401
+ /** Presence device carries GPS coordinates (lat/lng/accuracy) in
6402
+ * addition to a textual location. */
6403
+ DeviceFeature["PresenceGps"] = "presence-gps";
6404
+ /** Notifier accepts an inline / URL image attachment. */
6405
+ DeviceFeature["NotifierImage"] = "notifier-image";
6406
+ /** Notifier accepts a priority hint (high/normal/low). */
6407
+ DeviceFeature["NotifierPriority"] = "notifier-priority";
6408
+ /** Notifier accepts a free-form `data` payload for platform-specific
6409
+ * fields. */
6410
+ DeviceFeature["NotifierData"] = "notifier-data";
6411
+ /** Notifier supports interactive action buttons / callbacks. */
6412
+ DeviceFeature["NotifierActions"] = "notifier-actions";
6413
+ /** Notifier supports per-call recipient targeting (multi-user). */
6414
+ DeviceFeature["NotifierRecipients"] = "notifier-recipients";
6415
+ /** Script runner accepts a variables map on each run invocation. */
6416
+ DeviceFeature["ScriptVariables"] = "script-variables";
6417
+ /** Automation `trigger` accepts a skipCondition flag — fires the
6418
+ * automation's actions while bypassing its condition block. */
6419
+ DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
6420
+ return DeviceFeature;
6421
+ }({});
6422
+ /**
6423
+ * Semantic role a device plays within its parent. Populated by driver
6424
+ * addons when creating accessory devices (Reolink siren/floodlight/
6425
+ * PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
6426
+ * admin UI to pick icons, labels, and widgets — a `Switch` with
6427
+ * `role: Floodlight` renders as a bulb with a brightness slider,
6428
+ * whereas a `Switch` with `role: Siren` renders as a klaxon.
6429
+ *
6430
+ * Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
6431
+ * sqlite as a nullable TEXT column — old rows keep working unchanged.
6432
+ */
6433
+ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6434
+ DeviceRole["Siren"] = "siren";
6435
+ DeviceRole["Floodlight"] = "floodlight";
6436
+ DeviceRole["Spotlight"] = "spotlight";
6437
+ DeviceRole["PirSensor"] = "pir-sensor";
6438
+ DeviceRole["Chime"] = "chime";
6439
+ DeviceRole["Autotrack"] = "autotrack";
6440
+ DeviceRole["Nightvision"] = "nightvision";
6441
+ DeviceRole["PrivacyMask"] = "privacy-mask";
6442
+ DeviceRole["Doorbell"] = "doorbell";
6443
+ /** Virtual HA toggle (input_boolean.*) — distinguishable from a
6444
+ * real Switch device for UI rendering / export adapters. */
6445
+ DeviceRole["BinaryHelper"] = "binary-helper";
6446
+ /** Generic motion / occupancy / moving event source. Distinct from
6447
+ * the camera accessory PirSensor role: that one is a camera child;
6448
+ * this is a standalone HA / 3rd-party motion sensor. */
6449
+ DeviceRole["MotionSensor"] = "motion-sensor";
6450
+ DeviceRole["ContactSensor"] = "contact-sensor";
6451
+ DeviceRole["LeakSensor"] = "leak-sensor";
6452
+ DeviceRole["SmokeSensor"] = "smoke-sensor";
6453
+ DeviceRole["COSensor"] = "co-sensor";
6454
+ DeviceRole["GasSensor"] = "gas-sensor";
6455
+ DeviceRole["TamperSensor"] = "tamper-sensor";
6456
+ DeviceRole["VibrationSensor"] = "vibration-sensor";
6457
+ DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
6458
+ DeviceRole["SoundSensor"] = "sound-sensor";
6459
+ /** Fallback for `binary_sensor` without a known `device_class`. */
6460
+ DeviceRole["BinarySensor"] = "binary-sensor";
6461
+ DeviceRole["TemperatureSensor"] = "temperature-sensor";
6462
+ DeviceRole["HumiditySensor"] = "humidity-sensor";
6463
+ DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6464
+ DeviceRole["PressureSensor"] = "pressure-sensor";
6465
+ DeviceRole["PowerSensor"] = "power-sensor";
6466
+ DeviceRole["EnergySensor"] = "energy-sensor";
6467
+ DeviceRole["VoltageSensor"] = "voltage-sensor";
6468
+ DeviceRole["CurrentSensor"] = "current-sensor";
6469
+ DeviceRole["AirQualitySensor"] = "air-quality-sensor";
6470
+ /** Battery level (numeric % via `sensor` OR low-bool via
6471
+ * `binary_sensor` — the cap distinguishes via the value type). */
6472
+ DeviceRole["BatterySensor"] = "battery-sensor";
6473
+ /** Fallback for `sensor` numeric without a known `device_class`. */
6474
+ DeviceRole["NumericSensor"] = "numeric-sensor";
6475
+ /** String / enum state (HA `sensor` with `state_class: enum` or
6476
+ * `attributes.options`). */
6477
+ DeviceRole["EnumSensor"] = "enum-sensor";
6478
+ /** Date / timestamp state (HA `sensor` with `device_class: timestamp`
6479
+ * or `date`). The slice carries the raw ISO string verbatim (hosted on
6480
+ * the `enum-sensor` cap); the UI renders it locale-formatted. */
6481
+ DeviceRole["DateTimeSensor"] = "datetime-sensor";
6482
+ /** Last-resort fallback when nothing else matches. */
6483
+ DeviceRole["GenericSensor"] = "generic-sensor";
6484
+ DeviceRole["NumericControl"] = "numeric-control";
6485
+ DeviceRole["SelectControl"] = "select-control";
6486
+ DeviceRole["TextControl"] = "text-control";
6487
+ DeviceRole["DateTimeControl"] = "datetime-control";
6488
+ /** Mobile push notifier (HA `notify.mobile_app_*`) — supports
6489
+ * rich features (image, priority, channel routing). */
6490
+ DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
6491
+ /** Chat / messaging service (HA `notify.telegram_*`,
6492
+ * `notify.discord_*`, etc.). */
6493
+ DeviceRole["MessagingNotifier"] = "messaging-notifier";
6494
+ /** Email-based delivery (HA `notify.smtp`, etc.). */
6495
+ DeviceRole["EmailNotifier"] = "email-notifier";
6496
+ /** Fallback when the notifier service name doesn't match a known
6497
+ * pattern. */
6498
+ DeviceRole["GenericNotifier"] = "generic-notifier";
6499
+ return DeviceRole;
6960
6500
  }({});
6961
- var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
6962
- DeviceFeature["BatteryOperated"] = "battery-operated";
6963
- DeviceFeature["Rebootable"] = "rebootable";
6501
+ /**
6502
+ * Generic types for capability definitions.
6503
+ *
6504
+ * A capability is defined with Zod schemas for methods, events, and settings.
6505
+ * TypeScript types are inferred via z.infer<> — zero duplication.
6506
+ *
6507
+ * Pattern:
6508
+ * 1. Define Zod schemas for data, methods, settings
6509
+ * 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
6510
+ * 3. Export type IProvider = InferProvider<typeof capabilityDef>
6511
+ * 4. Addon implements IProvider
6512
+ * 5. Registry auto-mounts tRPC router from definition.methods
6513
+ */
6514
+ /**
6515
+ * Output schema shared by the contribution + live methods.
6516
+ *
6517
+ * Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
6518
+ * tabs[]) without importing from `../interfaces/config-ui.js` — a
6519
+ * concrete-but-lenient Zod object keeps tRPC output inference happy
6520
+ * (using `z.unknown()` here collapses unrelated router branches to
6521
+ * `unknown` when the generator re-inlines the huge AppRouter type).
6522
+ *
6523
+ * `.passthrough()` on sections/fields accepts whatever FormBuilder
6524
+ * extensions the caller adds (showWhen, displayScale, …) without
6525
+ * rebuilding every time a new field kind is introduced.
6526
+ */
6527
+ var ContributionSectionSchema = object({
6528
+ id: string(),
6529
+ title: string(),
6530
+ description: string().optional(),
6531
+ style: _enum(["card", "accordion"]).optional(),
6532
+ defaultCollapsed: boolean().optional(),
6533
+ columns: union([
6534
+ literal(1),
6535
+ literal(2),
6536
+ literal(3),
6537
+ literal(4)
6538
+ ]).optional(),
6539
+ tab: string().optional(),
6540
+ location: _enum(["settings", "top-tab"]).optional(),
6541
+ order: number$1().optional(),
6542
+ fields: array(any())
6543
+ });
6544
+ object({
6545
+ tabs: array(object({
6546
+ id: string(),
6547
+ label: string(),
6548
+ icon: string(),
6549
+ order: number$1().optional()
6550
+ })).optional(),
6551
+ sections: array(ContributionSectionSchema)
6552
+ }).nullable();
6553
+ object({ deviceId: number$1() }), object({ deviceId: number$1() }), object({
6554
+ deviceId: number$1(),
6555
+ patch: record(string(), unknown())
6556
+ }), object({ success: literal(true) });
6557
+ object({ deviceId: number$1() }), unknown().nullable();
6558
+ /** Shorthand to define a method schema */
6559
+ function method(input, output, options) {
6560
+ return {
6561
+ input,
6562
+ output,
6563
+ kind: options?.kind ?? "query",
6564
+ auth: options?.auth ?? "protected",
6565
+ ...options?.access !== void 0 ? { access: options.access } : {},
6566
+ timeoutMs: options?.timeoutMs
6567
+ };
6568
+ }
6569
+ var StaticDirOutputSchema = object({ staticDir: string() });
6570
+ var VersionOutputSchema = object({ version: string() });
6571
+ method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
6572
+ /**
6573
+ * device-ops — device-scoped cap that unifies the per-IDevice operations
6574
+ * previously routed through the `.device-ops` Moleculer bridge service.
6575
+ *
6576
+ * Each worker that hosts live `IDevice` instances auto-registers a native
6577
+ * provider for this cap (per device) backed by its local
6578
+ * `DeviceRegistry`. Hub-side callers reach it transparently through
6579
+ * `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
6580
+ * `deviceId` + `nodeId` and dispatches through the standard cap-router,
6581
+ * so there's no parallel bridge path anymore.
6582
+ *
6583
+ * The surface is intentionally small — every method corresponds to a
6584
+ * single action on the live `IDevice` (or `ICameraDevice` for
6585
+ * `getStreamSources`). Richer orchestration (enable/disable with
6586
+ * integration plumbing, bulk updates) stays in the `device-manager` cap;
6587
+ * `device-ops` is the per-device primitive the device-manager routes to.
6588
+ */
6589
+ var StreamSourceEntrySchema = object({
6590
+ id: string(),
6591
+ label: string(),
6592
+ protocol: _enum([
6593
+ "rtsp",
6594
+ "rtmp",
6595
+ "annexb",
6596
+ "http-mjpeg",
6597
+ "webrtc",
6598
+ "custom"
6599
+ ]),
6600
+ url: string().optional(),
6601
+ resolution: object({
6602
+ width: number$1(),
6603
+ height: number$1()
6604
+ }).optional(),
6605
+ fps: number$1().optional(),
6606
+ bitrate: number$1().optional(),
6607
+ codec: string().optional(),
6608
+ profileHint: CamProfileSchema.optional(),
6609
+ sdp: string().optional()
6610
+ });
6611
+ var ConfigEntrySchema$1 = object({
6612
+ key: string(),
6613
+ value: unknown()
6614
+ });
6615
+ var RawStateResultSchema = object({
6616
+ /** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
6617
+ source: string(),
6618
+ /** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
6619
+ data: record(string(), unknown())
6620
+ });
6621
+ method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema$1)), method(object({
6622
+ deviceId: number$1(),
6623
+ values: record(string(), unknown())
6624
+ }), _void(), { kind: "mutation" }), method(object({
6625
+ deviceId: number$1(),
6626
+ action: string().min(1),
6627
+ input: unknown()
6628
+ }), unknown(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), unknown().nullable()), method(object({ deviceId: number$1() }), RawStateResultSchema.nullable(), { auth: "protected" });
6629
+ //#endregion
6630
+ //#region ../types/dist/index.mjs
6631
+ /**
6632
+ * Deep wiring healthcheck — snapshot of active reachability probes across
6633
+ * every declared capability + widget of every installed plugin, on every
6634
+ * node. Produced by the backend `WiringHealthService` and surfaced via
6635
+ * `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
6636
+ *
6637
+ * Unlike `/health` (process liveness), this reflects whether each cap/widget
6638
+ * is actually *reachable* over the real cap-dispatch path. See spec
6639
+ * `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
6640
+ */
6641
+ /** What kind of target a probe addressed. */
6642
+ var wiringProbeKindSchema = _enum([
6643
+ "singleton",
6644
+ "device",
6645
+ "widget"
6646
+ ]);
6647
+ /** Result of probing a single (cap|widget [, device]) target. */
6648
+ var wiringProbeResultSchema = object({
6649
+ capName: string(),
6650
+ kind: wiringProbeKindSchema,
6651
+ deviceId: number$1().optional(),
6652
+ reachable: boolean(),
6653
+ latencyMs: number$1(),
6654
+ error: string().optional()
6655
+ });
6656
+ /** Per-addon roll-up of cap + widget probe results. */
6657
+ var wiringAddonHealthSchema = object({
6658
+ addonId: string(),
6659
+ caps: array(wiringProbeResultSchema).readonly(),
6660
+ widgets: array(wiringProbeResultSchema).readonly()
6661
+ });
6662
+ /** Per-node roll-up. */
6663
+ var wiringNodeHealthSchema = object({
6664
+ nodeId: string(),
6665
+ addons: array(wiringAddonHealthSchema).readonly()
6666
+ });
6667
+ object({
6668
+ /** True only when every probed target is reachable. */
6669
+ ok: boolean(),
6670
+ /** True when at least one target is unreachable. */
6671
+ degraded: boolean(),
6672
+ checkedAt: string(),
6673
+ nodes: array(wiringNodeHealthSchema).readonly(),
6674
+ summary: object({
6675
+ total: number$1(),
6676
+ reachable: number$1(),
6677
+ unreachable: number$1()
6678
+ })
6679
+ });
6680
+ var MODEL_FORMATS = [
6681
+ "onnx",
6682
+ "coreml",
6683
+ "openvino",
6684
+ "tflite",
6685
+ "pt"
6686
+ ];
6687
+ /**
6688
+ * Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
6689
+ * Named `RecordingWeekday` to avoid collision with the string-union
6690
+ * `Weekday` exported from `interfaces/timezones.ts`.
6691
+ */
6692
+ var RecordingWeekdaySchema = number$1().int().min(0).max(6);
6693
+ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
6694
+ var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
6695
+ kind: literal("timeOfDay"),
6696
+ start: string().regex(HHMM),
6697
+ end: string().regex(HHMM),
6698
+ /** Restrict to these weekdays; omit = every day. */
6699
+ days: array(RecordingWeekdaySchema).optional()
6700
+ })]);
6701
+ var RecordingModeSchema = _enum([
6702
+ "continuous",
6703
+ "onMotion",
6704
+ "onAudioThreshold"
6705
+ ]);
6706
+ /**
6707
+ * First-class, authoritative per-camera storage mode — the netta choice the UI
6708
+ * reads directly (never inferred from `rules`):
6709
+ * - `off` — not recording.
6710
+ * - `events` — record only around triggers (motion / audio threshold),
6711
+ * with pre/post-buffer.
6712
+ * - `continuous` — record 24/7 within the schedule.
6713
+ *
6714
+ * `mode` compiles one-way to the internal `rules[]` consumed by the policy
6715
+ * engine (see `compileRules`); `rules[]` is never authored directly anymore.
6716
+ */
6717
+ var RecordingStorageModeSchema = _enum([
6718
+ "off",
6719
+ "events",
6720
+ "continuous"
6721
+ ]);
6722
+ /** Which detectors trigger an `events`-mode recording. */
6723
+ var RecordingTriggersSchema = object({
6724
+ motion: boolean().optional(),
6725
+ audioThresholdDbfs: number$1().optional()
6726
+ });
6727
+ /**
6728
+ * Mode of a single recording band — the recorder per-band vocabulary.
6729
+ *
6730
+ * Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
6731
+ * only ever `continuous` or `events`; "off" is expressed by the absence of a
6732
+ * covering band, not by a band value.
6733
+ */
6734
+ var RecordingBandModeSchema = _enum(["continuous", "events"]);
6735
+ /**
6736
+ * Triggers for an `events`-mode band. Identical shape to
6737
+ * `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
6738
+ * two never drift.
6739
+ */
6740
+ var RecordingBandTriggersSchema = RecordingTriggersSchema;
6741
+ /**
6742
+ * A single mode-per-band window — the canonical recorder band shape, the
6743
+ * single source of truth re-used by `addon-pipeline/recorder`.
6744
+ *
6745
+ * `days` lists the weekdays the band covers (empty = every day, matching the
6746
+ * band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
6747
+ * span wraps past midnight (handled by the band engine).
6748
+ */
6749
+ var RecordingBandSchema = object({
6750
+ days: array(RecordingWeekdaySchema),
6751
+ start: string().regex(HHMM),
6752
+ end: string().regex(HHMM),
6753
+ mode: RecordingBandModeSchema,
6754
+ triggers: RecordingBandTriggersSchema.optional(),
6755
+ preBufferSec: number$1().min(0).optional(),
6756
+ postBufferSec: number$1().min(0).optional()
6757
+ });
6758
+ var RecordingRuleSchema = object({
6759
+ schedule: RecordingScheduleSchema,
6760
+ mode: RecordingModeSchema,
6761
+ /** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
6762
+ preBufferSec: number$1().min(0).default(0),
6763
+ /** Keep recording until this many seconds after the last trigger. */
6764
+ postBufferSec: number$1().min(0).default(0),
6765
+ /** Each new trigger restarts the post-buffer window. */
6766
+ resetTimeoutOnNewEvent: boolean().default(true),
6767
+ /** onAudioThreshold only — dBFS level that counts as a trigger. */
6768
+ thresholdDbfs: number$1().optional()
6769
+ });
6770
+ /**
6771
+ * Per-device retention overrides. Every field is optional; an unset or `0`
6772
+ * value inherits the node-wide recorder default. Only footage-lifetime limits
6773
+ * live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
6774
+ * (when the volume is too full to keep recording) is NOT a per-camera concern —
6775
+ * it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
6776
+ * shared by every camera writing to that volume.
6777
+ */
6778
+ var RecordingRetentionSchema = object({
6779
+ maxAgeDays: number$1().min(0).optional(),
6780
+ maxSizeGb: number$1().min(0).optional()
6781
+ });
6782
+ /**
6783
+ * The full per-camera recording intent — the wire shape of a RecordingTarget.
6784
+ *
6785
+ * `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
6786
+ * are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
6787
+ * only for transition + migration (`migrateRulesToMode`); the policy engine
6788
+ * consumes the compiled output of `compileRules(config)`, never `rules` directly.
6789
+ */
6790
+ var RecordingConfigSchema = object({
6791
+ enabled: boolean(),
6792
+ /** Authoritative storage mode. Absent on legacy targets → derived once via
6793
+ * `migrateRulesToMode`, then persisted. */
6794
+ mode: RecordingStorageModeSchema.optional(),
6795
+ profiles: array(CamProfileSchema).optional(),
6796
+ segmentSeconds: number$1().int().positive().optional(),
6797
+ /** Shared recording time-bands for `events` & `continuous` — record only when
6798
+ * the wall-clock falls inside one of these windows. Omit or empty = always.
6799
+ * `continuous` compiles to one rule per band; `events` to band × trigger. */
6800
+ schedules: array(RecordingScheduleSchema).optional(),
6801
+ /** Legacy single-band predecessor of `schedules`. Read-compat only — it is
6802
+ * normalized into `schedules` on read and never written going forward. (Not
6803
+ * tagged `@deprecated`: the normalization paths must read it cast-free.) */
6804
+ schedule: RecordingScheduleSchema.optional(),
6805
+ /** `events`-mode only — which detectors trigger a recording. */
6806
+ triggers: RecordingTriggersSchema.optional(),
6807
+ /** `events`-mode only — seconds retained before / after a trigger. */
6808
+ preBufferSec: number$1().min(0).optional(),
6809
+ postBufferSec: number$1().min(0).optional(),
6810
+ /** DEPRECATED authoring input; retained for migration/transition. */
6811
+ rules: array(RecordingRuleSchema).optional(),
6812
+ /**
6813
+ * AUTHORITATIVE mode-per-band recording model (recorder). When present it
6814
+ * is the single source of truth; the legacy `mode`/`schedules`/`schedule`/
6815
+ * `triggers`/`rules` fields above are kept for READ-COMPAT only and are
6816
+ * derived into bands once via `migrateConfigToBands`.
6817
+ */
6818
+ bands: array(RecordingBandSchema).optional(),
6819
+ retention: RecordingRetentionSchema.optional()
6820
+ });
6821
+ /**
6822
+ * `StorageLocationType` — an addon-declared id that identifies the *kind* of
6823
+ * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
6824
+ * so the persisted record schema and the consumer-facing cap can both consume it
6825
+ * without forming a circular import. The `storage` cap re-exports it
6826
+ * verbatim for back-compat.
6827
+ *
6828
+ * This Zod schema is the **authoritative source** for `StorageLocationType`.
6829
+ * The TS alias in `./storage.ts` re-exports `z.infer<typeof
6830
+ * StorageLocationTypeSchema>` so the wire surface (cap) and the legacy
6831
+ * `IStorageProvider` interface stay in lockstep.
6832
+ *
6833
+ * The type is now an **open string** (not a closed enum) — addons declare
6834
+ * their own location kinds via `StorageLocationDeclaration.id`. The regex
6835
+ * enforces a safe id format: lowercase-start, alphanumeric + hyphens.
6836
+ */
6837
+ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
6838
+ /**
6839
+ * Persisted record for a storage location instance. Operators can register
6840
+ * multiple instances for multi-cardinality types (e.g. two `backups`
6841
+ * locations with different `providerId`s). Cardinality is now declared per
6842
+ * location via `StorageLocationDeclaration.cardinality` — the static
6843
+ * `STORAGE_LOCATION_CARDINALITY` map has been removed.
6844
+ *
6845
+ * `id` is a stable namespaced string of the form `<type>:<slug>`.
6846
+ * The default location for a type uses `id === <type>:default` by
6847
+ * convention (the bare type ref like `'backups'` resolves to it).
6848
+ *
6849
+ * `isSystem: true` marks a location as orchestrator-seeded and
6850
+ * undeletable. The bootstrap-installed defaults (one per type) carry
6851
+ * this flag; operator-added locations don't. Editing the config of
6852
+ * a system location is allowed (path migration, provider swap) but
6853
+ * deleting it is rejected at the cap level.
6854
+ */
6855
+ var StorageLocationSchema = object({
6856
+ id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
6857
+ type: string(),
6858
+ displayName: string().min(1),
6859
+ providerId: string().min(1),
6860
+ config: record(string(), unknown()),
6861
+ /**
6862
+ * Cluster node this location physically lives on. REQUIRED for node-local
6863
+ * providers (filesystem — the path exists on one node's disk), null/absent
6864
+ * for node-agnostic providers (S3/SFTP/WebDAV, reachable from any node).
6865
+ * `'hub'` is the hub node. Validated against the provider's `nodeLocal`
6866
+ * flag at upsert time, not here (the schema is provider-agnostic).
6867
+ */
6868
+ nodeId: string().optional(),
6869
+ isDefault: boolean().default(false),
6870
+ isSystem: boolean().default(false),
6871
+ createdAt: number$1(),
6872
+ updatedAt: number$1()
6873
+ });
6874
+ /**
6875
+ * Reference accepted by consumer-facing `api.storage.*` calls.
6876
+ * Either:
6877
+ * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
6878
+ * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
6879
+ *
6880
+ * The orchestrator's `resolveRef(ref)` handles both cases.
6881
+ */
6882
+ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/)]);
6883
+ /**
6884
+ * `StorageLocationDeclaration` — a single storage-location entry declared by
6885
+ * an addon in its `package.json` under `camstack.storageLocations`.
6886
+ *
6887
+ * Design intent:
6888
+ * - **Addon declares its needs** — each addon describes the logical storage
6889
+ * slots it requires (e.g. `recordings`, `recordingsLow`) without caring
6890
+ * about the physical path.
6891
+ * - **Kernel aggregates** — at boot the kernel collects declarations from all
6892
+ * installed addons, deduplicates by `id`, and exposes the union via the
6893
+ * storage-locations settings surface.
6894
+ * - **Orchestrator seeds** — for every declared `id` the orchestrator ensures
6895
+ * at least one instance named `<id>:default` is present, using
6896
+ * `defaultsTo` to inherit the resolved root from another location when the
6897
+ * declaration is a derivative slot (e.g. `recordingsLow` defaults to
6898
+ * `recordings`).
6899
+ * - **ids are global** — `id` values are shared across the entire deployment;
6900
+ * two addons declaring the same `id` must agree on `cardinality` (validated
6901
+ * at kernel aggregation time, not here).
6902
+ */
6903
+ var StorageLocationDeclarationSchema = object({
6904
+ /**
6905
+ * Global location identifier, e.g. `recordings` or `recordingsLow`.
6906
+ * Must start with a lowercase letter and may contain letters, digits, and
6907
+ * hyphens.
6908
+ */
6909
+ id: string().regex(/^[a-z][a-zA-Z0-9-]*$/, { message: "id must start with a lowercase letter and contain only letters, digits, or hyphens" }),
6910
+ /** Human-readable name shown in the admin UI. */
6911
+ displayName: string().min(1, { message: "displayName must not be empty" }),
6912
+ /** Optional longer explanation of what data this location stores. */
6913
+ description: string().optional(),
6914
+ /**
6915
+ * `single` — exactly one instance of this location is allowed system-wide
6916
+ * (e.g. `logs`, `models`). The operator can edit it but not add more.
6917
+ * `multi` — the operator may register several instances (e.g. a second
6918
+ * `recordings` on a NAS for disk tiering); one is the default at any time.
6919
+ */
6920
+ cardinality: _enum(["single", "multi"]),
6921
+ /**
6922
+ * When set, the default instance for this location inherits its resolved
6923
+ * root from the named location's default instance. Useful for derivative
6924
+ * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
6925
+ * configure the primary location.
6926
+ */
6927
+ defaultsTo: string().optional()
6928
+ });
6929
+ var DecoderStatsSchema = object({
6930
+ inputFps: number$1(),
6931
+ outputFps: number$1(),
6932
+ avgDecodeTimeMs: number$1(),
6933
+ droppedFrames: number$1()
6934
+ });
6935
+ var DecoderSessionConfigSchema = object({
6936
+ codec: string(),
6937
+ maxFps: number$1().default(0),
6938
+ outputFormat: _enum([
6939
+ "jpeg",
6940
+ "rgb",
6941
+ "bgr",
6942
+ "yuv420",
6943
+ "gray"
6944
+ ]).default("jpeg"),
6945
+ scale: number$1().default(1),
6946
+ width: number$1().optional(),
6947
+ height: number$1().optional(),
6964
6948
  /**
6965
- * Device supports an on-demand re-sync of its derived spec with its
6966
- * upstream source drives the generic Re-sync button. The owning
6967
- * provider implements the action via the `device-adoption.resync` cap.
6949
+ * Identifier of the camera this decoder session serves. Optional
6950
+ * because the cap is generic (any caller could request decode), but
6951
+ * stream-broker passes it so decoder logs include `deviceId` for
6952
+ * per-camera filtering when diagnosing failures (e.g. node-av
6953
+ * sendPacket errors on a single hung camera).
6968
6954
  */
6969
- DeviceFeature["Resyncable"] = "resyncable";
6970
- DeviceFeature["NativeSnapshot"] = "native-snapshot";
6971
- DeviceFeature["DoorbellButton"] = "doorbell-button";
6972
- DeviceFeature["TwoWayAudio"] = "two-way-audio";
6973
- DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
6955
+ deviceId: number$1().int().nonnegative().optional(),
6974
6956
  /**
6975
- * Camera supports the on-firmware autotrack subsystem (subject-
6976
- * following). Distinct from `PanTiltZoom` because not every PTZ
6977
- * camera ships autotrack the admin UI uses this flag to gate
6978
- * the autotrack toggle / settings card without re-deriving from
6979
- * the cap registry. Mirrors `ptz-autotrack` cap registration:
6980
- * driver sets this feature when probe confirms the firmware
6981
- * surface, and registers the cap in the same code path.
6957
+ * Free-form tag for log scoping. Stream-broker uses
6958
+ * `broker:<deviceId>/<profile>`. Decoder session logger surfaces it
6959
+ * on every line so `grep tag=broker:5/high` filters one camera
6960
+ * profile cleanly.
6982
6961
  */
6983
- DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
6962
+ tag: string().optional(),
6984
6963
  /**
6985
- * Accessory exposes a "trigger on motion" toggle the parent camera's
6986
- * motion detection automatically activates this device. Mirrors
6987
- * `motion-trigger` cap registration: drivers set this feature in the
6988
- * same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
6964
+ * Where the session delivers decoded frames (Phase 5 / D9):
6989
6965
  *
6990
- * Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
6991
- * fast scalar without binding fetch), notifier rules, and `listAll`
6992
- * filters that want "all devices with on-motion behaviour".
6966
+ * - `'callback'` (default) the legacy pixel path: decoded frames are
6967
+ * buffered as `DecodedFrame`s and drained via `pullFrames`.
6968
+ * - `'shm'` the shared-memory frame plane: decoded frames are written
6969
+ * into an OS shared-memory ring and drained as zero-pixel
6970
+ * `FrameHandle`s via `pullHandles`. A session is one mode or the
6971
+ * other — `pullFrames` returns nothing for an `'shm'` session and
6972
+ * `pullHandles` returns nothing for a `'callback'` session.
6993
6973
  */
6994
- DeviceFeature["MotionTrigger"] = "motion-trigger";
6995
- /** Light supports rgb-triplet color via `color` cap. */
6996
- DeviceFeature["LightColorRgb"] = "light-color-rgb";
6997
- /** Light supports HSV color via `color` cap. */
6998
- DeviceFeature["LightColorHsv"] = "light-color-hsv";
6999
- /** Light supports color-temperature (mired) via `color` cap. */
7000
- DeviceFeature["LightColorMired"] = "light-color-mired";
7001
- /** Thermostat supports a `heat_cool` dual setpoint (targetLow +
7002
- * targetHigh). Gates the range slider UI. */
7003
- DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
7004
- /** Thermostat exposes target humidity and/or current humidity
7005
- * readings. Gates the humidity controls. */
7006
- DeviceFeature["ClimateHumidity"] = "climate-humidity";
7007
- /** Thermostat exposes a fan-mode selector. */
7008
- DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
7009
- /** Thermostat exposes preset modes (eco / away / sleep / vendor). */
7010
- DeviceFeature["ClimatePreset"] = "climate-preset";
7011
- /** Cover exposes intermediate position control (0..100). Gates the
7012
- * position slider UI. */
7013
- DeviceFeature["CoverPositionable"] = "cover-positionable";
7014
- /** Cover exposes slat-tilt control. Gates the tilt slider UI. */
7015
- DeviceFeature["CoverTilt"] = "cover-tilt";
7016
- /** Valve exposes intermediate position control (0..100). Gates the
7017
- * position slider / drag surface UI. */
7018
- DeviceFeature["ValvePositionable"] = "valve-positionable";
7019
- /** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
7020
- DeviceFeature["FanSpeed"] = "fan-speed";
7021
- /** Fan exposes a preset mode selector. */
7022
- DeviceFeature["FanPreset"] = "fan-preset";
7023
- /** Fan exposes blade direction (forward/reverse) — typical of
7024
- * ceiling fans. */
7025
- DeviceFeature["FanDirection"] = "fan-direction";
7026
- /** Fan exposes an oscillation toggle. */
7027
- DeviceFeature["FanOscillating"] = "fan-oscillating";
7028
- /** Lock requires a PIN code on lock/unlock. Gates the code-entry
7029
- * field on the UI lock-controls panel. */
7030
- DeviceFeature["LockPinRequired"] = "lock-pin-required";
7031
- /** Lock supports a latch-release ("open door") action distinct from
7032
- * unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
7033
- * `supported_features`. Gates the Open Door button in the UI. */
7034
- DeviceFeature["LockOpen"] = "lock-open";
7035
- /** Media player exposes a seek-to-position surface. */
7036
- DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
7037
- /** Media player exposes a volume-level setter. */
7038
- DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
7039
- /** Media player exposes a mute toggle distinct from volume=0. */
7040
- DeviceFeature["MediaPlayerMute"] = "media-player-mute";
7041
- /** Media player exposes a shuffle toggle. */
7042
- DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
7043
- /** Media player exposes a repeat mode (off / all / one). */
7044
- DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
7045
- /** Media player exposes a source / input selector. */
7046
- DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
7047
- /** Media player exposes a play-arbitrary-media surface (URL / id). */
7048
- DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
7049
- /** Media player exposes next-track. */
7050
- DeviceFeature["MediaPlayerNext"] = "media-player-next";
7051
- /** Media player exposes previous-track. */
7052
- DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
7053
- /** Media player exposes stop distinct from pause. */
7054
- DeviceFeature["MediaPlayerStop"] = "media-player-stop";
7055
- /** Alarm panel requires a PIN code on arm/disarm. */
7056
- DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
7057
- /** Presence device carries GPS coordinates (lat/lng/accuracy) in
7058
- * addition to a textual location. */
7059
- DeviceFeature["PresenceGps"] = "presence-gps";
7060
- /** Notifier accepts an inline / URL image attachment. */
7061
- DeviceFeature["NotifierImage"] = "notifier-image";
7062
- /** Notifier accepts a priority hint (high/normal/low). */
7063
- DeviceFeature["NotifierPriority"] = "notifier-priority";
7064
- /** Notifier accepts a free-form `data` payload for platform-specific
7065
- * fields. */
7066
- DeviceFeature["NotifierData"] = "notifier-data";
7067
- /** Notifier supports interactive action buttons / callbacks. */
7068
- DeviceFeature["NotifierActions"] = "notifier-actions";
7069
- /** Notifier supports per-call recipient targeting (multi-user). */
7070
- DeviceFeature["NotifierRecipients"] = "notifier-recipients";
7071
- /** Script runner accepts a variables map on each run invocation. */
7072
- DeviceFeature["ScriptVariables"] = "script-variables";
7073
- /** Automation `trigger` accepts a skipCondition flag — fires the
7074
- * automation's actions while bypassing its condition block. */
7075
- DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
7076
- return DeviceFeature;
7077
- }({});
7078
- /**
7079
- * Semantic role a device plays within its parent. Populated by driver
7080
- * addons when creating accessory devices (Reolink siren/floodlight/
7081
- * PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
7082
- * admin UI to pick icons, labels, and widgets — a `Switch` with
7083
- * `role: Floodlight` renders as a bulb with a brightness slider,
7084
- * whereas a `Switch` with `role: Siren` renders as a klaxon.
7085
- *
7086
- * Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
7087
- * sqlite as a nullable TEXT column — old rows keep working unchanged.
7088
- */
7089
- var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
7090
- DeviceRole["Siren"] = "siren";
7091
- DeviceRole["Floodlight"] = "floodlight";
7092
- DeviceRole["Spotlight"] = "spotlight";
7093
- DeviceRole["PirSensor"] = "pir-sensor";
7094
- DeviceRole["Chime"] = "chime";
7095
- DeviceRole["Autotrack"] = "autotrack";
7096
- DeviceRole["Nightvision"] = "nightvision";
7097
- DeviceRole["PrivacyMask"] = "privacy-mask";
7098
- DeviceRole["Doorbell"] = "doorbell";
7099
- /** Virtual HA toggle (input_boolean.*) — distinguishable from a
7100
- * real Switch device for UI rendering / export adapters. */
7101
- DeviceRole["BinaryHelper"] = "binary-helper";
7102
- /** Generic motion / occupancy / moving event source. Distinct from
7103
- * the camera accessory PirSensor role: that one is a camera child;
7104
- * this is a standalone HA / 3rd-party motion sensor. */
7105
- DeviceRole["MotionSensor"] = "motion-sensor";
7106
- DeviceRole["ContactSensor"] = "contact-sensor";
7107
- DeviceRole["LeakSensor"] = "leak-sensor";
7108
- DeviceRole["SmokeSensor"] = "smoke-sensor";
7109
- DeviceRole["COSensor"] = "co-sensor";
7110
- DeviceRole["GasSensor"] = "gas-sensor";
7111
- DeviceRole["TamperSensor"] = "tamper-sensor";
7112
- DeviceRole["VibrationSensor"] = "vibration-sensor";
7113
- DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
7114
- DeviceRole["SoundSensor"] = "sound-sensor";
7115
- /** Fallback for `binary_sensor` without a known `device_class`. */
7116
- DeviceRole["BinarySensor"] = "binary-sensor";
7117
- DeviceRole["TemperatureSensor"] = "temperature-sensor";
7118
- DeviceRole["HumiditySensor"] = "humidity-sensor";
7119
- DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
7120
- DeviceRole["PressureSensor"] = "pressure-sensor";
7121
- DeviceRole["PowerSensor"] = "power-sensor";
7122
- DeviceRole["EnergySensor"] = "energy-sensor";
7123
- DeviceRole["VoltageSensor"] = "voltage-sensor";
7124
- DeviceRole["CurrentSensor"] = "current-sensor";
7125
- DeviceRole["AirQualitySensor"] = "air-quality-sensor";
7126
- /** Battery level (numeric % via `sensor` OR low-bool via
7127
- * `binary_sensor` — the cap distinguishes via the value type). */
7128
- DeviceRole["BatterySensor"] = "battery-sensor";
7129
- /** Fallback for `sensor` numeric without a known `device_class`. */
7130
- DeviceRole["NumericSensor"] = "numeric-sensor";
7131
- /** String / enum state (HA `sensor` with `state_class: enum` or
7132
- * `attributes.options`). */
7133
- DeviceRole["EnumSensor"] = "enum-sensor";
7134
- /** Date / timestamp state (HA `sensor` with `device_class: timestamp`
7135
- * or `date`). The slice carries the raw ISO string verbatim (hosted on
7136
- * the `enum-sensor` cap); the UI renders it locale-formatted. */
7137
- DeviceRole["DateTimeSensor"] = "datetime-sensor";
7138
- /** Last-resort fallback when nothing else matches. */
7139
- DeviceRole["GenericSensor"] = "generic-sensor";
7140
- DeviceRole["NumericControl"] = "numeric-control";
7141
- DeviceRole["SelectControl"] = "select-control";
7142
- DeviceRole["TextControl"] = "text-control";
7143
- DeviceRole["DateTimeControl"] = "datetime-control";
7144
- /** Mobile push notifier (HA `notify.mobile_app_*`) — supports
7145
- * rich features (image, priority, channel routing). */
7146
- DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
7147
- /** Chat / messaging service (HA `notify.telegram_*`,
7148
- * `notify.discord_*`, etc.). */
7149
- DeviceRole["MessagingNotifier"] = "messaging-notifier";
7150
- /** Email-based delivery (HA `notify.smtp`, etc.). */
7151
- DeviceRole["EmailNotifier"] = "email-notifier";
7152
- /** Fallback when the notifier service name doesn't match a known
7153
- * pattern. */
7154
- DeviceRole["GenericNotifier"] = "generic-notifier";
7155
- return DeviceRole;
7156
- }({});
6974
+ frameSink: _enum(["callback", "shm"]).default("callback")
6975
+ });
6976
+ var EncodeProfileSchema = object({
6977
+ video: object({
6978
+ codec: _enum([
6979
+ "h264",
6980
+ "h265",
6981
+ "copy"
6982
+ ]),
6983
+ profile: _enum([
6984
+ "baseline",
6985
+ "main",
6986
+ "high"
6987
+ ]).optional(),
6988
+ width: number$1().int().positive().optional(),
6989
+ height: number$1().int().positive().optional(),
6990
+ fps: number$1().positive().optional(),
6991
+ bitrateKbps: number$1().int().positive().optional(),
6992
+ gopFrames: number$1().int().positive().optional(),
6993
+ bf: number$1().int().min(0).optional(),
6994
+ preset: _enum([
6995
+ "ultrafast",
6996
+ "superfast",
6997
+ "veryfast",
6998
+ "faster",
6999
+ "fast",
7000
+ "medium"
7001
+ ]).optional(),
7002
+ tune: _enum([
7003
+ "zerolatency",
7004
+ "film",
7005
+ "animation"
7006
+ ]).optional()
7007
+ }),
7008
+ audio: union([literal("passthrough"), object({
7009
+ codec: _enum([
7010
+ "opus",
7011
+ "aac",
7012
+ "pcmu",
7013
+ "pcma",
7014
+ "copy"
7015
+ ]),
7016
+ bitrateKbps: number$1().int().positive().optional(),
7017
+ sampleRateHz: number$1().int().positive().optional(),
7018
+ channels: union([literal(1), literal(2)]).optional()
7019
+ })]),
7020
+ /**
7021
+ * ffmpeg input-side args, inserted between the fixed global flags
7022
+ * (`-hide_banner -loglevel error`) and `-i pipe:0`. Free-text array
7023
+ * the widget surfaces a textarea + suggestion chips for the most-
7024
+ * used demuxer/format options.
7025
+ */
7026
+ inputArgs: array(string()).optional(),
7027
+ /**
7028
+ * ffmpeg output-side args, inserted between the encode block and
7029
+ * the final `-f <muxer> pipe:1`. Use for muxer options, bitstream
7030
+ * filters, codec-specific overrides. Free-text array.
7031
+ */
7032
+ outputArgs: array(string()).optional()
7033
+ });
7034
+ var YAMNET_TO_MACRO = {
7035
+ mapping: {
7036
+ Speech: "speech",
7037
+ "Child speech, kid speaking": "speech",
7038
+ Conversation: "speech",
7039
+ "Narration, monologue": "speech",
7040
+ Babbling: "speech",
7041
+ Whispering: "speech",
7042
+ "Speech synthesizer": "speech",
7043
+ Humming: "speech",
7044
+ Rapping: "speech",
7045
+ Singing: "speech",
7046
+ Choir: "speech",
7047
+ "Child singing": "speech",
7048
+ Shout: "scream",
7049
+ Bellow: "scream",
7050
+ Yell: "scream",
7051
+ Screaming: "scream",
7052
+ "Children shouting": "scream",
7053
+ Whoop: "scream",
7054
+ "Crying, sobbing": "crying",
7055
+ "Baby cry, infant cry": "crying",
7056
+ Whimper: "crying",
7057
+ "Wail, moan": "crying",
7058
+ Groan: "crying",
7059
+ Laughter: "laughter",
7060
+ "Baby laughter": "laughter",
7061
+ Giggle: "laughter",
7062
+ Snicker: "laughter",
7063
+ "Belly laugh": "laughter",
7064
+ "Chuckle, chortle": "laughter",
7065
+ Music: "music",
7066
+ "Musical instrument": "music",
7067
+ Guitar: "music",
7068
+ Piano: "music",
7069
+ Drum: "music",
7070
+ "Drum kit": "music",
7071
+ "Violin, fiddle": "music",
7072
+ Flute: "music",
7073
+ Saxophone: "music",
7074
+ Trumpet: "music",
7075
+ Synthesizer: "music",
7076
+ "Pop music": "music",
7077
+ "Rock music": "music",
7078
+ "Hip hop music": "music",
7079
+ "Classical music": "music",
7080
+ Jazz: "music",
7081
+ "Electronic music": "music",
7082
+ "Background music": "music",
7083
+ Dog: "dog",
7084
+ Bark: "dog",
7085
+ Yip: "dog",
7086
+ Howl: "dog",
7087
+ "Bow-wow": "dog",
7088
+ Growling: "dog",
7089
+ "Whimper (dog)": "dog",
7090
+ Cat: "cat",
7091
+ Purr: "cat",
7092
+ Meow: "cat",
7093
+ Hiss: "cat",
7094
+ Caterwaul: "cat",
7095
+ Bird: "bird",
7096
+ "Bird vocalization, bird call, bird song": "bird",
7097
+ "Chirp, tweet": "bird",
7098
+ Squawk: "bird",
7099
+ Crow: "bird",
7100
+ Owl: "bird",
7101
+ "Pigeon, dove": "bird",
7102
+ Animal: "animal",
7103
+ "Domestic animals, pets": "animal",
7104
+ "Livestock, farm animals, working animals": "animal",
7105
+ Horse: "animal",
7106
+ "Cattle, bovinae": "animal",
7107
+ Pig: "animal",
7108
+ Sheep: "animal",
7109
+ Goat: "animal",
7110
+ Frog: "animal",
7111
+ Insect: "animal",
7112
+ Cricket: "animal",
7113
+ Alarm: "alarm",
7114
+ "Alarm clock": "alarm",
7115
+ "Smoke detector, smoke alarm": "alarm",
7116
+ "Fire alarm": "alarm",
7117
+ Buzzer: "alarm",
7118
+ "Civil defense siren": "alarm",
7119
+ "Car alarm": "alarm",
7120
+ Siren: "siren",
7121
+ "Police car (siren)": "siren",
7122
+ "Ambulance (siren)": "siren",
7123
+ "Fire engine, fire truck (siren)": "siren",
7124
+ "Emergency vehicle": "siren",
7125
+ Foghorn: "siren",
7126
+ Doorbell: "doorbell",
7127
+ "Ding-dong": "doorbell",
7128
+ Knock: "doorbell",
7129
+ Tap: "doorbell",
7130
+ Glass: "glass_breaking",
7131
+ Shatter: "glass_breaking",
7132
+ "Chink, clink": "glass_breaking",
7133
+ "Gunshot, gunfire": "gunshot",
7134
+ "Machine gun": "gunshot",
7135
+ Explosion: "gunshot",
7136
+ Fireworks: "gunshot",
7137
+ Firecracker: "gunshot",
7138
+ "Artillery fire": "gunshot",
7139
+ "Cap gun": "gunshot",
7140
+ Boom: "gunshot",
7141
+ Vehicle: "vehicle",
7142
+ Car: "vehicle",
7143
+ Truck: "vehicle",
7144
+ Bus: "vehicle",
7145
+ Motorcycle: "vehicle",
7146
+ "Car passing by": "vehicle",
7147
+ "Vehicle horn, car horn, honking": "vehicle",
7148
+ "Traffic noise, roadway noise": "vehicle",
7149
+ Train: "vehicle",
7150
+ Aircraft: "vehicle",
7151
+ Helicopter: "vehicle",
7152
+ Bicycle: "vehicle",
7153
+ Skateboard: "vehicle",
7154
+ Fire: "fire",
7155
+ Crackle: "fire",
7156
+ Water: "water",
7157
+ Rain: "water",
7158
+ Raindrop: "water",
7159
+ "Rain on surface": "water",
7160
+ Stream: "water",
7161
+ Waterfall: "water",
7162
+ Ocean: "water",
7163
+ "Waves, surf": "water",
7164
+ "Splash, splatter": "water",
7165
+ Wind: "wind",
7166
+ Thunderstorm: "wind",
7167
+ Thunder: "wind",
7168
+ "Wind noise (microphone)": "wind",
7169
+ "Rustling leaves": "wind",
7170
+ Door: "door",
7171
+ "Sliding door": "door",
7172
+ Slam: "door",
7173
+ "Cupboard open or close": "door",
7174
+ "Walk, footsteps": "footsteps",
7175
+ Run: "footsteps",
7176
+ Shuffle: "footsteps",
7177
+ Crowd: "crowd",
7178
+ Chatter: "crowd",
7179
+ Cheering: "crowd",
7180
+ Applause: "crowd",
7181
+ "Children playing": "crowd",
7182
+ "Hubbub, speech noise, speech babble": "crowd",
7183
+ Telephone: "telephone",
7184
+ "Telephone bell ringing": "telephone",
7185
+ Ringtone: "telephone",
7186
+ "Telephone dialing, DTMF": "telephone",
7187
+ "Busy signal": "telephone",
7188
+ Engine: "engine",
7189
+ "Engine starting": "engine",
7190
+ Idling: "engine",
7191
+ "Accelerating, revving, vroom": "engine",
7192
+ "Light engine (high frequency)": "engine",
7193
+ "Medium engine (mid frequency)": "engine",
7194
+ "Heavy engine (low frequency)": "engine",
7195
+ "Lawn mower": "engine",
7196
+ Chainsaw: "engine",
7197
+ Hammer: "tools",
7198
+ Jackhammer: "tools",
7199
+ Sawing: "tools",
7200
+ "Power tool": "tools",
7201
+ Drill: "tools",
7202
+ Sanding: "tools",
7203
+ Silence: "silence"
7204
+ },
7205
+ preserveOriginal: false
7206
+ };
7207
+ var APPLE_SA_TO_MACRO = {
7208
+ mapping: {
7209
+ speech: "speech",
7210
+ child_speech: "speech",
7211
+ conversation: "speech",
7212
+ whispering: "speech",
7213
+ singing: "speech",
7214
+ humming: "speech",
7215
+ shout: "scream",
7216
+ yell: "scream",
7217
+ screaming: "scream",
7218
+ crying: "crying",
7219
+ baby_crying: "crying",
7220
+ sobbing: "crying",
7221
+ laughter: "laughter",
7222
+ baby_laughter: "laughter",
7223
+ giggling: "laughter",
7224
+ music: "music",
7225
+ guitar: "music",
7226
+ piano: "music",
7227
+ drums: "music",
7228
+ dog_bark: "dog",
7229
+ dog_bow_wow: "dog",
7230
+ dog_growling: "dog",
7231
+ dog_howl: "dog",
7232
+ cat_meow: "cat",
7233
+ cat_purr: "cat",
7234
+ cat_hiss: "cat",
7235
+ bird: "bird",
7236
+ bird_chirp: "bird",
7237
+ bird_squawk: "bird",
7238
+ animal: "animal",
7239
+ horse: "animal",
7240
+ cow_moo: "animal",
7241
+ insect: "animal",
7242
+ alarm: "alarm",
7243
+ smoke_alarm: "alarm",
7244
+ fire_alarm: "alarm",
7245
+ car_alarm: "alarm",
7246
+ siren: "siren",
7247
+ police_siren: "siren",
7248
+ ambulance_siren: "siren",
7249
+ doorbell: "doorbell",
7250
+ door_knock: "doorbell",
7251
+ knocking: "doorbell",
7252
+ glass_breaking: "glass_breaking",
7253
+ glass_shatter: "glass_breaking",
7254
+ gunshot: "gunshot",
7255
+ explosion: "gunshot",
7256
+ fireworks: "gunshot",
7257
+ car: "vehicle",
7258
+ truck: "vehicle",
7259
+ motorcycle: "vehicle",
7260
+ car_horn: "vehicle",
7261
+ vehicle_horn: "vehicle",
7262
+ traffic: "vehicle",
7263
+ fire: "fire",
7264
+ fire_crackle: "fire",
7265
+ water: "water",
7266
+ rain: "water",
7267
+ ocean: "water",
7268
+ splash: "water",
7269
+ wind: "wind",
7270
+ thunder: "wind",
7271
+ thunderstorm: "wind",
7272
+ door: "door",
7273
+ door_slam: "door",
7274
+ sliding_door: "door",
7275
+ footsteps: "footsteps",
7276
+ walking: "footsteps",
7277
+ running: "footsteps",
7278
+ crowd: "crowd",
7279
+ chatter: "crowd",
7280
+ cheering: "crowd",
7281
+ applause: "crowd",
7282
+ telephone_ring: "telephone",
7283
+ ringtone: "telephone",
7284
+ engine: "engine",
7285
+ engine_starting: "engine",
7286
+ lawn_mower: "engine",
7287
+ chainsaw: "engine",
7288
+ hammer: "tools",
7289
+ jackhammer: "tools",
7290
+ drill: "tools",
7291
+ power_tool: "tools",
7292
+ silence: "silence"
7293
+ },
7294
+ preserveOriginal: false
7295
+ };
7296
+ var _macroLookup = /* @__PURE__ */ new Map();
7297
+ for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
7298
+ for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
7157
7299
  /**
7158
7300
  * Accessory device helpers — shared across drivers.
7159
7301
  *
@@ -7313,74 +7455,6 @@ object({
7313
7455
  });
7314
7456
  DeviceType.Sensor;
7315
7457
  /**
7316
- * Generic types for capability definitions.
7317
- *
7318
- * A capability is defined with Zod schemas for methods, events, and settings.
7319
- * TypeScript types are inferred via z.infer<> — zero duplication.
7320
- *
7321
- * Pattern:
7322
- * 1. Define Zod schemas for data, methods, settings
7323
- * 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
7324
- * 3. Export type IProvider = InferProvider<typeof capabilityDef>
7325
- * 4. Addon implements IProvider
7326
- * 5. Registry auto-mounts tRPC router from definition.methods
7327
- */
7328
- /**
7329
- * Output schema shared by the contribution + live methods.
7330
- *
7331
- * Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
7332
- * tabs[]) without importing from `../interfaces/config-ui.js` — a
7333
- * concrete-but-lenient Zod object keeps tRPC output inference happy
7334
- * (using `z.unknown()` here collapses unrelated router branches to
7335
- * `unknown` when the generator re-inlines the huge AppRouter type).
7336
- *
7337
- * `.passthrough()` on sections/fields accepts whatever FormBuilder
7338
- * extensions the caller adds (showWhen, displayScale, …) without
7339
- * rebuilding every time a new field kind is introduced.
7340
- */
7341
- var ContributionSectionSchema = object({
7342
- id: string(),
7343
- title: string(),
7344
- description: string().optional(),
7345
- style: _enum(["card", "accordion"]).optional(),
7346
- defaultCollapsed: boolean().optional(),
7347
- columns: union([
7348
- literal(1),
7349
- literal(2),
7350
- literal(3),
7351
- literal(4)
7352
- ]).optional(),
7353
- tab: string().optional(),
7354
- location: _enum(["settings", "top-tab"]).optional(),
7355
- order: number$1().optional(),
7356
- fields: array(any())
7357
- });
7358
- object({
7359
- tabs: array(object({
7360
- id: string(),
7361
- label: string(),
7362
- icon: string(),
7363
- order: number$1().optional()
7364
- })).optional(),
7365
- sections: array(ContributionSectionSchema)
7366
- }).nullable();
7367
- object({ deviceId: number$1() }), object({ deviceId: number$1() }), object({
7368
- deviceId: number$1(),
7369
- patch: record(string(), unknown())
7370
- }), object({ success: literal(true) });
7371
- object({ deviceId: number$1() }), unknown().nullable();
7372
- /** Shorthand to define a method schema */
7373
- function method(input, output, options) {
7374
- return {
7375
- input,
7376
- output,
7377
- kind: options?.kind ?? "query",
7378
- auth: options?.auth ?? "protected",
7379
- ...options?.access !== void 0 ? { access: options.access } : {},
7380
- timeoutMs: options?.timeoutMs
7381
- };
7382
- }
7383
- /**
7384
7458
  * Alarm-panel cap. Models HA `alarm_control_panel.*` on
7385
7459
  * `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
7386
7460
  * across disarmed / armed_(home|away|night|vacation|custom_bypass) /
@@ -9195,6 +9269,24 @@ var DetectorOutputSchema = object({
9195
9269
  inferenceMs: number$1(),
9196
9270
  modelId: string()
9197
9271
  });
9272
+ var EngineProvisioningSchema = object({
9273
+ runtimeId: _enum([
9274
+ "onnx",
9275
+ "openvino",
9276
+ "coreml"
9277
+ ]).nullable(),
9278
+ device: string().nullable(),
9279
+ state: _enum([
9280
+ "idle",
9281
+ "installing",
9282
+ "verifying",
9283
+ "ready",
9284
+ "failed"
9285
+ ]),
9286
+ progress: number$1().optional(),
9287
+ error: string().optional(),
9288
+ nextRetryAt: number$1().optional()
9289
+ });
9198
9290
  var PipelineStepInputSchema = lazy(() => object({
9199
9291
  addonId: string(),
9200
9292
  modelId: string(),
@@ -9263,7 +9355,7 @@ var PipelineRunResultBridge = custom();
9263
9355
  method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(_void(), PipelineEngineChoiceSchema, {
9264
9356
  kind: "mutation",
9265
9357
  auth: "admin"
9266
- }), method(_void(), record(string(), object({
9358
+ }), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
9267
9359
  modelId: string(),
9268
9360
  settings: record(string(), unknown()).readonly()
9269
9361
  }))), method(object({ steps: record(string(), object({
@@ -11364,9 +11456,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
11364
11456
  limit: number$1().optional(),
11365
11457
  tags: record(string(), string()).optional()
11366
11458
  }), array(LogEntrySchema).readonly());
11367
- var StaticDirOutputSchema = object({ staticDir: string() });
11368
- var VersionOutputSchema = object({ version: string() });
11369
- method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
11370
11459
  /**
11371
11460
  * Zod schemas for persisted record types.
11372
11461
  *
@@ -12875,7 +12964,10 @@ var AgentAddonConfigSchema = object({
12875
12964
  modelId: string(),
12876
12965
  settings: record(string(), unknown()).readonly()
12877
12966
  });
12878
- var AgentPipelineSettingsSchema = object({ addonDefaults: record(string(), AgentAddonConfigSchema).readonly() });
12967
+ var AgentPipelineSettingsSchema = object({
12968
+ addonDefaults: record(string(), AgentAddonConfigSchema).readonly(),
12969
+ maxCameras: number$1().int().nonnegative().nullable().default(null)
12970
+ });
12879
12971
  var CameraPipelineForAgentSchema = object({
12880
12972
  steps: array(PipelineStepInputSchema).readonly(),
12881
12973
  audio: object({
@@ -12977,6 +13069,133 @@ var GlobalMetricsSchema = object({
12977
13069
  * capability providers.
12978
13070
  */
12979
13071
  var CapabilityBindingsSchema = record(string(), string());
13072
+ /** Source block — always present; derives from the stream catalog. */
13073
+ var CameraSourceStatusSchema = object({ streams: array(object({
13074
+ camStreamId: string(),
13075
+ codec: string(),
13076
+ width: number$1(),
13077
+ height: number$1(),
13078
+ fps: number$1(),
13079
+ kind: string()
13080
+ })).readonly() });
13081
+ /** Assignment block — always present (orchestrator-local, no remote call). */
13082
+ var CameraAssignmentStatusSchema = object({
13083
+ detectionNodeId: string().nullable(),
13084
+ decoderNodeId: string().nullable(),
13085
+ audioNodeId: string().nullable(),
13086
+ pinned: object({
13087
+ detection: boolean(),
13088
+ decoder: boolean(),
13089
+ audio: boolean()
13090
+ }),
13091
+ reasons: object({
13092
+ detection: string().optional(),
13093
+ decoder: string().optional(),
13094
+ audio: string().optional()
13095
+ })
13096
+ });
13097
+ /** Broker block — null when the broker stage is unreachable or inactive. */
13098
+ var CameraBrokerStatusSchema = object({
13099
+ profiles: array(object({
13100
+ profile: string(),
13101
+ status: string(),
13102
+ codec: string(),
13103
+ width: number$1(),
13104
+ height: number$1(),
13105
+ subscribers: number$1(),
13106
+ inFps: number$1(),
13107
+ outFps: number$1()
13108
+ })).readonly(),
13109
+ webrtcSessions: number$1(),
13110
+ rtspRestream: boolean()
13111
+ });
13112
+ /** Shared-memory ring statistics within the decoder block. */
13113
+ var CameraDecoderShmSchema = object({
13114
+ framesWritten: number$1(),
13115
+ getFrameHits: number$1(),
13116
+ getFrameMisses: number$1(),
13117
+ budgetMb: number$1()
13118
+ });
13119
+ /** Decoder block — null when the decoder stage is unreachable or inactive. */
13120
+ var CameraDecoderStatusSchema = object({
13121
+ nodeId: string(),
13122
+ formats: array(string()).readonly(),
13123
+ sessionCount: number$1(),
13124
+ shm: CameraDecoderShmSchema
13125
+ });
13126
+ /** Motion block — null when motion detection is not active for this device. */
13127
+ var CameraMotionStatusSchema = object({
13128
+ enabled: boolean(),
13129
+ fps: number$1()
13130
+ });
13131
+ /** Detection provisioning sub-block. */
13132
+ var CameraDetectionProvisioningSchema = object({
13133
+ state: _enum([
13134
+ "idle",
13135
+ "installing",
13136
+ "verifying",
13137
+ "ready",
13138
+ "failed"
13139
+ ]),
13140
+ error: string().optional()
13141
+ });
13142
+ /** Detection phase — derived from the runner's engine phase. */
13143
+ var CameraDetectionPhaseSchema = _enum([
13144
+ "idle",
13145
+ "watching",
13146
+ "active"
13147
+ ]);
13148
+ /** Detection block — null when no detection node is assigned or reachable. */
13149
+ var CameraDetectionStatusSchema = object({
13150
+ nodeId: string(),
13151
+ engine: object({
13152
+ backend: string(),
13153
+ device: string()
13154
+ }),
13155
+ phase: CameraDetectionPhaseSchema,
13156
+ configuredFps: number$1(),
13157
+ actualFps: number$1(),
13158
+ queueDepth: number$1(),
13159
+ avgInferenceMs: number$1(),
13160
+ provisioning: CameraDetectionProvisioningSchema
13161
+ });
13162
+ /** Audio block — null when no audio node is assigned or reachable. */
13163
+ var CameraAudioStatusSchema = object({
13164
+ nodeId: string(),
13165
+ enabled: boolean()
13166
+ });
13167
+ /** Recording block — null when no recording cap is active for this device. */
13168
+ var CameraRecordingStatusSchema = object({
13169
+ mode: _enum([
13170
+ "off",
13171
+ "continuous",
13172
+ "events"
13173
+ ]),
13174
+ active: boolean(),
13175
+ storageBytes: number$1()
13176
+ });
13177
+ /**
13178
+ * Aggregated per-camera pipeline status — server-composed, single call.
13179
+ *
13180
+ * The `assignment` and `source` blocks are always present.
13181
+ * Every other block is `null` when the stage is inactive or unreachable
13182
+ * during the bounded parallel fan-out in the orchestrator implementation.
13183
+ *
13184
+ * See spec: `docs/superpowers/specs/2026-06-24-camera-status-aggregator-cap.md`
13185
+ */
13186
+ var CameraStatusSchema = object({
13187
+ deviceId: number$1(),
13188
+ assignment: CameraAssignmentStatusSchema,
13189
+ source: CameraSourceStatusSchema,
13190
+ broker: CameraBrokerStatusSchema.nullable(),
13191
+ decoder: CameraDecoderStatusSchema.nullable(),
13192
+ motion: CameraMotionStatusSchema.nullable(),
13193
+ detection: CameraDetectionStatusSchema.nullable(),
13194
+ audio: CameraAudioStatusSchema.nullable(),
13195
+ recording: CameraRecordingStatusSchema.nullable(),
13196
+ /** Unix timestamp (ms) when this snapshot was composed server-side. */
13197
+ fetchedAt: number$1()
13198
+ });
12980
13199
  method(object({
12981
13200
  deviceId: number$1(),
12982
13201
  agentNodeId: string()
@@ -13044,6 +13263,12 @@ method(object({
13044
13263
  }), {
13045
13264
  kind: "mutation",
13046
13265
  auth: "admin"
13266
+ }), method(object({
13267
+ agentNodeId: string(),
13268
+ maxCameras: number$1().int().nonnegative().nullable()
13269
+ }), object({ success: literal(true) }), {
13270
+ kind: "mutation",
13271
+ auth: "admin"
13047
13272
  }), method(object({ deviceId: number$1() }), CameraPipelineSettingsSchema.nullable()), method(object({
13048
13273
  deviceId: number$1(),
13049
13274
  addonId: string(),
@@ -13069,7 +13294,7 @@ method(object({
13069
13294
  }), method(object({
13070
13295
  deviceId: number$1(),
13071
13296
  agentNodeId: string().optional()
13072
- }), CameraPipelineConfigSchema), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13297
+ }), CameraPipelineConfigSchema), method(object({ deviceId: number$1() }), CameraStatusSchema), method(object({ deviceIds: array(number$1()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
13073
13298
  name: string(),
13074
13299
  description: string().optional(),
13075
13300
  config: CameraPipelineConfigSchema
@@ -13556,7 +13781,7 @@ method(object({
13556
13781
  }), _void(), {
13557
13782
  kind: "mutation",
13558
13783
  auth: "admin"
13559
- }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number$1() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number$1() }), array(DeviceInfoSchema)), method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema)), method(object({ deviceId: number$1() }), ConfigUISchemaOutput), method(object({
13784
+ }), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number$1() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number$1() }), array(DeviceInfoSchema)), method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema)), method(object({ deviceId: number$1() }), ConfigUISchemaOutput), method(object({
13560
13785
  deviceId: number$1(),
13561
13786
  values: record(string(), unknown())
13562
13787
  }), object({ success: literal(true) }), {
@@ -14238,7 +14463,20 @@ var DiskSpaceInfoSchema = object({
14238
14463
  var PidResourceStatsSchema = object({
14239
14464
  pid: number$1(),
14240
14465
  cpu: number$1(),
14241
- memory: number$1()
14466
+ memory: number$1(),
14467
+ /**
14468
+ * Private (anonymous) resident bytes — the per-process V8 heap + native
14469
+ * allocations NOT shared with other processes (Linux RssAnon). This is the
14470
+ * "real" per-runner cost; summing it across runners is meaningful, unlike
14471
+ * `memory` (RSS), which double-counts the shared mmap'd framework code.
14472
+ * Undefined where /proc is unavailable (e.g. macOS).
14473
+ */
14474
+ privateBytes: number$1().optional(),
14475
+ /**
14476
+ * Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
14477
+ * code shared copy-on-write across runners. Undefined on macOS.
14478
+ */
14479
+ sharedBytes: number$1().optional()
14242
14480
  });
14243
14481
  var AddonInstanceSchema = object({
14244
14482
  addonId: string(),
@@ -14287,6 +14525,17 @@ var KillProcessResultSchema = object({
14287
14525
  reason: string().optional(),
14288
14526
  signal: _enum(["SIGTERM", "SIGKILL"]).optional()
14289
14527
  });
14528
+ var DumpHeapSnapshotInputSchema = object({
14529
+ /** The addon whose runner should dump a heap snapshot. */
14530
+ addonId: string() });
14531
+ var DumpHeapSnapshotResultSchema = object({
14532
+ success: boolean(),
14533
+ /** Path of the written .heapsnapshot inside the runner's container/host. */
14534
+ path: string().optional(),
14535
+ /** Process pid that was signalled. */
14536
+ pid: number$1().optional(),
14537
+ reason: string().optional()
14538
+ });
14290
14539
  var SystemMetricsSchema = object({
14291
14540
  cpuPercent: number$1(),
14292
14541
  memoryPercent: number$1(),
@@ -14300,6 +14549,9 @@ var SystemMetricsSchema = object({
14300
14549
  method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number$1().nullable()), method(object({ pids: array(number$1()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(KillProcessInputSchema, KillProcessResultSchema, {
14301
14550
  kind: "mutation",
14302
14551
  auth: "admin"
14552
+ }), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
14553
+ kind: "mutation",
14554
+ auth: "admin"
14303
14555
  });
14304
14556
  var PtzPresetSchema = object({
14305
14557
  id: string(),
@@ -14666,63 +14918,6 @@ method(object({
14666
14918
  auth: "admin"
14667
14919
  });
14668
14920
  /**
14669
- * device-ops — device-scoped cap that unifies the per-IDevice operations
14670
- * previously routed through the `.device-ops` Moleculer bridge service.
14671
- *
14672
- * Each worker that hosts live `IDevice` instances auto-registers a native
14673
- * provider for this cap (per device) backed by its local
14674
- * `DeviceRegistry`. Hub-side callers reach it transparently through
14675
- * `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
14676
- * `deviceId` + `nodeId` and dispatches through the standard cap-router,
14677
- * so there's no parallel bridge path anymore.
14678
- *
14679
- * The surface is intentionally small — every method corresponds to a
14680
- * single action on the live `IDevice` (or `ICameraDevice` for
14681
- * `getStreamSources`). Richer orchestration (enable/disable with
14682
- * integration plumbing, bulk updates) stays in the `device-manager` cap;
14683
- * `device-ops` is the per-device primitive the device-manager routes to.
14684
- */
14685
- var StreamSourceEntrySchema$1 = object({
14686
- id: string(),
14687
- label: string(),
14688
- protocol: _enum([
14689
- "rtsp",
14690
- "rtmp",
14691
- "annexb",
14692
- "http-mjpeg",
14693
- "webrtc",
14694
- "custom"
14695
- ]),
14696
- url: string().optional(),
14697
- resolution: object({
14698
- width: number$1(),
14699
- height: number$1()
14700
- }).optional(),
14701
- fps: number$1().optional(),
14702
- bitrate: number$1().optional(),
14703
- codec: string().optional(),
14704
- profileHint: CamProfileSchema.optional(),
14705
- sdp: string().optional()
14706
- });
14707
- var ConfigEntrySchema$1 = object({
14708
- key: string(),
14709
- value: unknown()
14710
- });
14711
- var RawStateResultSchema = object({
14712
- /** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
14713
- source: string(),
14714
- /** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
14715
- data: record(string(), unknown())
14716
- });
14717
- method(object({ deviceId: number$1() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number$1() }), array(ConfigEntrySchema$1)), method(object({
14718
- deviceId: number$1(),
14719
- values: record(string(), unknown())
14720
- }), _void(), { kind: "mutation" }), method(object({
14721
- deviceId: number$1(),
14722
- action: string().min(1),
14723
- input: unknown()
14724
- }), unknown(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), unknown().nullable()), method(object({ deviceId: number$1() }), RawStateResultSchema.nullable(), { auth: "protected" });
14725
- /**
14726
14921
  * camera-credentials — device-scoped cap exposing the camera's network
14727
14922
  * + auth surface in a vendor-neutral shape.
14728
14923
  *
@@ -18405,6 +18600,12 @@ Object.freeze({
18405
18600
  addonId: null,
18406
18601
  access: "view"
18407
18602
  },
18603
+ "metricsProvider.dumpHeapSnapshot": {
18604
+ capName: "metrics-provider",
18605
+ capScope: "system",
18606
+ addonId: null,
18607
+ access: "create"
18608
+ },
18408
18609
  "metricsProvider.getAddonStats": {
18409
18610
  capName: "metrics-provider",
18410
18611
  capScope: "system",
@@ -18861,6 +19062,12 @@ Object.freeze({
18861
19062
  addonId: null,
18862
19063
  access: "view"
18863
19064
  },
19065
+ "pipelineExecutor.getEngineProvisioning": {
19066
+ capName: "pipeline-executor",
19067
+ capScope: "system",
19068
+ addonId: null,
19069
+ access: "view"
19070
+ },
18864
19071
  "pipelineExecutor.getGlobalPipelineConfig": {
18865
19072
  capName: "pipeline-executor",
18866
19073
  capScope: "system",
@@ -19065,6 +19272,18 @@ Object.freeze({
19065
19272
  addonId: null,
19066
19273
  access: "view"
19067
19274
  },
19275
+ "pipelineOrchestrator.getCameraStatus": {
19276
+ capName: "pipeline-orchestrator",
19277
+ capScope: "system",
19278
+ addonId: null,
19279
+ access: "view"
19280
+ },
19281
+ "pipelineOrchestrator.getCameraStatuses": {
19282
+ capName: "pipeline-orchestrator",
19283
+ capScope: "system",
19284
+ addonId: null,
19285
+ access: "view"
19286
+ },
19068
19287
  "pipelineOrchestrator.getCameraStepOverrides": {
19069
19288
  capName: "pipeline-orchestrator",
19070
19289
  capScope: "system",
@@ -19149,6 +19368,12 @@ Object.freeze({
19149
19368
  addonId: null,
19150
19369
  access: "create"
19151
19370
  },
19371
+ "pipelineOrchestrator.setAgentMaxCameras": {
19372
+ capName: "pipeline-orchestrator",
19373
+ capScope: "system",
19374
+ addonId: null,
19375
+ access: "create"
19376
+ },
19152
19377
  "pipelineOrchestrator.setCameraPipelineForAgent": {
19153
19378
  capName: "pipeline-orchestrator",
19154
19379
  capScope: "system",