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