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