@camstack/addon-provider-onvif 1.2.16 → 1.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2719 -88
  2. package/dist/addon.mjs +2719 -88
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
5
  //#endregion
6
- //#region ../types/dist/event-category-Cv9dO26A.mjs
6
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -210,6 +210,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
210
210
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
211
211
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
212
212
  /**
213
+ * A node the orchestrator would otherwise place cameras on has NO usable
214
+ * inference device: the operator enabled one or more accelerators there and
215
+ * the live probe reports every one of them unavailable. Emitted once per
216
+ * TRANSITION into that state (never per dispatch), and the node is dropped
217
+ * from the placement candidate set for as long as it holds.
218
+ *
219
+ * This exists because the state was previously invisible: little-unraid
220
+ * absorbed 283k inference errors in a day while still being handed cameras,
221
+ * and nothing in the system said so.
222
+ *
223
+ * A node with no accelerators configured at all is NOT this — its devices
224
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
225
+ * serves it exactly as before.
226
+ */
227
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
228
+ /**
229
+ * A camera has an OPEN detection session and has produced no detection at
230
+ * all for longer than the blind threshold — the camera is being decoded and
231
+ * inferred and is returning nothing. Emitted once per transition into blind,
232
+ * per camera.
233
+ *
234
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
235
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
236
+ * camera" produce byte-identical silence.
237
+ */
238
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
239
+ /**
213
240
  * Per-camera pipeline config was mutated by the orchestrator
214
241
  * (3-level settings change via `setAgentAddonDefaults` /
215
242
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3001,6 +3028,9 @@ function handlePipeResult(left, next, ctx) {
3001
3028
  fallback: left.fallback
3002
3029
  }, ctx);
3003
3030
  }
3031
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3032
+ $ZodPipe.init(inst, def);
3033
+ });
3004
3034
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3005
3035
  $ZodType.init(inst, def);
3006
3036
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5186,6 +5216,10 @@ function pipe(in_, out) {
5186
5216
  out
5187
5217
  });
5188
5218
  }
5219
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5220
+ ZodPipe.init(inst, def);
5221
+ $ZodPreprocess.init(inst, def);
5222
+ });
5189
5223
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5190
5224
  $ZodReadonly.init(inst, def);
5191
5225
  ZodType.init(inst, def);
@@ -5244,6 +5278,13 @@ function _instanceof(cls, params = {}) {
5244
5278
  };
5245
5279
  return inst;
5246
5280
  }
5281
+ function preprocess(fn, schema) {
5282
+ return new ZodPreprocess({
5283
+ type: "pipe",
5284
+ in: transform(fn),
5285
+ out: schema
5286
+ });
5287
+ }
5247
5288
  //#endregion
5248
5289
  //#region ../../node_modules/zod/v4/classic/compat.js
5249
5290
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10774,6 +10815,8 @@ var QueryFilterSchema = object({
10774
10815
  where: record(string(), unknown()).optional(),
10775
10816
  whereIn: record(string(), array(unknown())).optional(),
10776
10817
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10818
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10819
+ whereNot: record(string(), unknown()).optional(),
10777
10820
  orderBy: object({
10778
10821
  field: string(),
10779
10822
  direction: _enum(["asc", "desc"])
@@ -10793,7 +10836,8 @@ var QueryFilterSchema = object({
10793
10836
  var MutationFilterSchema = object({
10794
10837
  where: record(string(), unknown()).optional(),
10795
10838
  whereIn: record(string(), array(unknown())).optional(),
10796
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10839
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10840
+ whereNot: record(string(), unknown()).optional()
10797
10841
  });
10798
10842
  /** A single stored record: `{ id, data }`. */
10799
10843
  var SettingsRecordSchema = object({
@@ -12205,6 +12249,17 @@ var LlmImageSchema = object({
12205
12249
  bytes: _instanceof(Uint8Array),
12206
12250
  mimeType: string()
12207
12251
  });
12252
+ /**
12253
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12254
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12255
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12256
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12257
+ */
12258
+ var LlmRetryPolicySchema = object({
12259
+ enabled: boolean().default(false),
12260
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12261
+ maxAttempts: number().int().min(1).max(5).default(1)
12262
+ });
12208
12263
  var LlmGenerateBaseInputSchema = object({
12209
12264
  /** Collection routing (the notification-output posture). */
12210
12265
  addonId: string().optional(),
@@ -12219,7 +12274,28 @@ var LlmGenerateBaseInputSchema = object({
12219
12274
  jsonSchema: record(string(), unknown()).optional(),
12220
12275
  /** Per-call override of the profile default. */
12221
12276
  maxTokens: number().int().positive().optional(),
12222
- temperature: number().optional()
12277
+ temperature: number().optional(),
12278
+ /** Per-call override of the profile default (nucleus sampling). */
12279
+ topP: number().min(0).max(1).optional(),
12280
+ /** Per-call override of the profile default (top-k sampling). */
12281
+ topK: number().int().positive().optional(),
12282
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12283
+ timeoutMs: number().int().positive().optional(),
12284
+ /** Per-call override; beats both the consumer table and the profile. */
12285
+ retry: LlmRetryPolicySchema.optional(),
12286
+ /**
12287
+ * Caller-minted id that makes this generation CANCELLABLE.
12288
+ *
12289
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12290
+ * the call against 8 s and free their own slot when the timer wins, while the
12291
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12292
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12293
+ * not generations, and the real load is unbounded.
12294
+ *
12295
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12296
+ * `llm.cancel({ requestId })` tears the socket down.
12297
+ */
12298
+ requestId: string().optional()
12223
12299
  });
12224
12300
  /**
12225
12301
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12232,6 +12308,18 @@ var LlmGenerateBaseInputSchema = object({
12232
12308
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12233
12309
  * watchdog — operator decision #3).
12234
12310
  */
12311
+ /**
12312
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12313
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12314
+ * REF rather than looked up at install time, so what the operator approved in
12315
+ * the preview is exactly what the node downloads.
12316
+ */
12317
+ var ManagedModelExtraFileSchema = object({
12318
+ url: string(),
12319
+ filename: string(),
12320
+ sizeBytes: number(),
12321
+ sha256: string().optional()
12322
+ });
12235
12323
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12236
12324
  object({
12237
12325
  kind: literal("catalog"),
@@ -12240,7 +12328,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12240
12328
  object({
12241
12329
  kind: literal("url"),
12242
12330
  url: string(),
12243
- sha256: string().optional()
12331
+ sha256: string().optional(),
12332
+ /** Picker/status label; the file basename when absent. */
12333
+ label: string().optional(),
12334
+ sizeBytes: number().optional(),
12335
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12244
12336
  }),
12245
12337
  object({
12246
12338
  kind: literal("path"),
@@ -12258,13 +12350,82 @@ var ManagedRuntimeConfigSchema = object({
12258
12350
  gpuLayers: number().int().default(0),
12259
12351
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12260
12352
  threads: number().int().optional(),
12261
- /** Concurrent slots. */
12353
+ /** Concurrent slots (`--parallel`). */
12262
12354
  parallel: number().int().default(1),
12355
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12356
+ batchSize: number().int().positive().optional(),
12357
+ /** Physical batch / micro-batch (`-ub`). */
12358
+ ubatchSize: number().int().positive().optional(),
12359
+ /**
12360
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12361
+ * is a no-op elsewhere, so it is offered rather than assumed.
12362
+ */
12363
+ flashAttention: boolean().default(false),
12364
+ /**
12365
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12366
+ * inference. Costs the full model size in resident memory — which is exactly
12367
+ * what the RAM budget is counting.
12368
+ */
12369
+ mlock: boolean().default(false),
12370
+ /**
12371
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12372
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12373
+ * store produces on every first token.
12374
+ */
12375
+ noMmap: boolean().default(false),
12376
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12377
+ * cheapest way to fit a longer context in the same RAM. */
12378
+ cacheTypeK: _enum([
12379
+ "f32",
12380
+ "f16",
12381
+ "q8_0",
12382
+ "q5_1",
12383
+ "q5_0",
12384
+ "q4_1",
12385
+ "q4_0"
12386
+ ]).optional(),
12387
+ cacheTypeV: _enum([
12388
+ "f32",
12389
+ "f16",
12390
+ "q8_0",
12391
+ "q5_1",
12392
+ "q5_0",
12393
+ "q4_1",
12394
+ "q4_0"
12395
+ ]).optional(),
12396
+ /**
12397
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12398
+ * (which most vision chat templates need and some language-only models
12399
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12400
+ *
12401
+ * It is NOT a second place to set the flags above. A token that collides
12402
+ * with a typed field is REJECTED at start, naming the field that owns it
12403
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12404
+ * the "two switches that disagree" failure this repo has already shipped
12405
+ * twice (D62).
12406
+ */
12407
+ extraArgs: array(string()).default([]),
12263
12408
  /** Else lazy: first generate boots it. */
12264
12409
  autoStart: boolean().default(false),
12265
12410
  /** 0 = never; frees RAM after quiet periods. */
12266
12411
  idleStopMinutes: number().int().default(30)
12267
12412
  });
12413
+ /**
12414
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12415
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12416
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12417
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12418
+ */
12419
+ var LlmDownloadProgressSchema = object({
12420
+ phase: _enum(["downloading", "verifying"]),
12421
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12422
+ file: string(),
12423
+ fileIndex: number().int(),
12424
+ fileCount: number().int(),
12425
+ /** Across the WHOLE install, not the current file. */
12426
+ downloadedBytes: number(),
12427
+ totalBytes: number().optional()
12428
+ });
12268
12429
  var LlmRuntimeStatusSchema = object({
12269
12430
  /** Status is ALWAYS node-qualified. */
12270
12431
  nodeId: string(),
@@ -12281,6 +12442,8 @@ var LlmRuntimeStatusSchema = object({
12281
12442
  modelPath: string().optional(),
12282
12443
  modelId: string().optional(),
12283
12444
  downloadProgress: number().min(0).max(1).optional(),
12445
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12446
+ download: LlmDownloadProgressSchema.optional(),
12284
12447
  lastError: string().optional(),
12285
12448
  crashesInWindow: number(),
12286
12449
  /** Child RSS (sampled best-effort). */
@@ -12291,7 +12454,14 @@ var LlmNodeModelSchema = object({
12291
12454
  file: string(),
12292
12455
  sizeBytes: number(),
12293
12456
  catalogId: string().optional(),
12294
- installedAt: number().optional()
12457
+ installedAt: number().optional(),
12458
+ /**
12459
+ * Absolute path on the node. Present so a file that is on disk but matches
12460
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12461
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12462
+ * it the picker could list such a file and do nothing with it.
12463
+ */
12464
+ path: string().optional()
12295
12465
  });
12296
12466
  var LlmRuntimeDiskUsageSchema = object({
12297
12467
  nodeId: string(),
@@ -12347,10 +12517,47 @@ var LlmProfileSchema = object({
12347
12517
  baseUrl: string().optional(),
12348
12518
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12349
12519
  apiKey: string().optional(),
12520
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12521
+ * degraded to text — that shipped once and produced a confident answer to a
12522
+ * question about a picture nobody sent. */
12350
12523
  supportsVision: boolean(),
12351
12524
  temperature: number().min(0).max(2).optional(),
12525
+ /** Nucleus sampling. Every wire we speak has it. */
12526
+ topP: number().min(0).max(1).optional(),
12527
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12528
+ * wire does, and the client drops it there (measured: the request body gets
12529
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12530
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12531
+ topK: number().int().positive().optional(),
12352
12532
  maxTokens: number().int().positive().optional(),
12533
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12534
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12535
+ * the model with, so it is the one field that changes a PROCESS. */
12536
+ contextLength: number().int().positive().optional(),
12537
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12538
+ * two system prompts fighting is worse than either alone). */
12539
+ systemPrompt: string().optional(),
12540
+ /** Total generation bound — the only one a unary call has. */
12353
12541
  timeoutMs: number().int().positive().default(6e4),
12542
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12543
+ * response headers: on the LM Studio / llama-server wire those are written
12544
+ * once the model has finished loading, so they belong to the bound below. */
12545
+ connectTimeoutMs: number().int().positive().default(1e4),
12546
+ /** Accepted, but no output yet — response headers included, because a cold
12547
+ * GPU load is exactly what happens before them. */
12548
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12549
+ /** Output started then stopped. */
12550
+ idleTimeoutMs: number().int().positive().default(6e4),
12551
+ /** Profile-level default. The per-consumer table and a per-call override
12552
+ * both beat it — see `resolveRetryPolicy`. */
12553
+ retry: LlmRetryPolicySchema.default({
12554
+ enabled: false,
12555
+ maxAttempts: 1
12556
+ }),
12557
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12558
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12559
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12560
+ toolsEnabled: boolean().default(false),
12354
12561
  extraHeaders: record(string(), string()).optional(),
12355
12562
  /** kind === 'managed-local' only (spec §4). */
12356
12563
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12400,6 +12607,36 @@ var ManagedModelCatalogEntrySchema = object({
12400
12607
  /** Vision models: companion projector file. */
12401
12608
  mmprojUrl: string().optional()
12402
12609
  });
12610
+ /**
12611
+ * The outcome of turning one operator-typed Hugging Face reference into a
12612
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12613
+ * I will not pick for you" is a normal answer the UI has to render, not an
12614
+ * exception.
12615
+ *
12616
+ * `candidates` is the whole reason the refusal is usable — every string in it
12617
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12618
+ */
12619
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12620
+ ok: literal(true),
12621
+ /** Ready to hand to `installModel` unchanged. */
12622
+ model: ManagedModelRefSchema,
12623
+ label: string(),
12624
+ repo: string(),
12625
+ quantization: string(),
12626
+ purpose: _enum(["text", "vision"]),
12627
+ totalBytes: number(),
12628
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12629
+ * see that 0.9 GB of it is a projector they did not name. */
12630
+ extraFilenames: array(string())
12631
+ }), object({
12632
+ ok: literal(false),
12633
+ code: string(),
12634
+ message: string(),
12635
+ candidates: array(string()).optional(),
12636
+ /** Set when the refusal was only the ceiling: re-calling with
12637
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12638
+ requiredBytes: number().optional()
12639
+ })]);
12403
12640
  var LlmRuntimeNodeSchema = object({
12404
12641
  nodeId: string(),
12405
12642
  reachable: boolean(),
@@ -12412,7 +12649,10 @@ var ProfileRefInputSchema = object({
12412
12649
  addonId: string(),
12413
12650
  profileId: string()
12414
12651
  });
12415
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12652
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12653
+ addonId: string().optional(),
12654
+ requestId: string()
12655
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12416
12656
  kind: "mutation",
12417
12657
  auth: "admin"
12418
12658
  }), method(ProfileRefInputSchema, _void(), {
@@ -12433,6 +12673,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12433
12673
  consumer: string().optional(),
12434
12674
  profileId: string().optional()
12435
12675
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12676
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12677
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12678
+ ref: string(),
12679
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12680
+ maxBytes: number().positive().optional()
12681
+ }), HfModelResolutionSchema, {
12682
+ kind: "mutation",
12683
+ auth: "admin"
12684
+ }), method(object({
12436
12685
  nodeId: string(),
12437
12686
  model: ManagedModelRefSchema
12438
12687
  }), _void(), {
@@ -14042,6 +14291,8 @@ var NcSystemEventKindSchema = _enum([
14042
14291
  "stream-offline",
14043
14292
  "node-online",
14044
14293
  "node-offline",
14294
+ "node-inference-unavailable",
14295
+ "detection-blind",
14045
14296
  "addon-update-available",
14046
14297
  "server-update-available",
14047
14298
  "alarm-triggered",
@@ -14103,7 +14354,16 @@ var NcScheduleSchema = object({
14103
14354
  });
14104
14355
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14105
14356
  var NcPlateMatcherSchema = object({
14106
- values: array(string().min(1)).min(1),
14357
+ /**
14358
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14359
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14360
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14361
+ * rather than merely seen. A subject carrying no plate still fails.
14362
+ *
14363
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14364
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14365
+ */
14366
+ values: array(string().min(1)),
14107
14367
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14108
14368
  maxDistance: number().int().min(0).max(3).default(1)
14109
14369
  });
@@ -14137,28 +14397,36 @@ var NcOccupancyConditionSchema = object({
14137
14397
  /**
14138
14398
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14139
14399
  *
14140
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14141
- * reference notifier uses, so an operator moving between them re-uses what
14142
- * they already know): a rule matches when, over a sampling window of
14143
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14144
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14145
- *
14146
- * - `dbThreshold` its level is at or above this many dBFS (see
14147
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14148
- * - `labels` the classifier put at least one of these labels on it.
14149
- *
14150
- * Both are OPTIONAL and independent, which is the point of the shape: a
14151
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14152
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14153
- * is given** a window in which every sample is trivially a hit would fire on
14154
- * silence, so the engine refuses such a condition rather than notifying on
14155
- * nothing (the schema cannot express "at least one of" without becoming a
14156
- * ZodEffects the cap path would have to special-case).
14157
- *
14158
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14159
- * must be FULL before it can match a window that has been open for two
14160
- * seconds of its ten is 100% of nothing, and firing on it would make
14161
- * `samplingSeconds` decorative.
14400
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14401
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14402
+ * there is no second switch that can disagree with the first and every rule
14403
+ * authored before the decision migrates for free (`audioModeOf`):
14404
+ *
14405
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14406
+ * classifier labels with one of them. No window, no percentage:
14407
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14408
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14409
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14410
+ * reaches this condition if the classifier was already confident enough.
14411
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14412
+ * the condition: at least `hitPercent`% of the samples over
14413
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14414
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14415
+ * must be FULL before it can match a window open for two of its ten
14416
+ * seconds is 100% of nothing.
14417
+ *
14418
+ * **Why label mode has no window.** It had one, and it never fired: the
14419
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14420
+ * of them per episode, even through continuous crying. The measured maximum
14421
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14422
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14423
+ * the wrong question to ask of a sparse classifier.
14424
+ *
14425
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14426
+ * and the rule would fire on silence. The schema cannot express "exactly one
14427
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14428
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14429
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14162
14430
  *
14163
14431
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14164
14432
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14166,13 +14434,13 @@ var NcOccupancyConditionSchema = object({
14166
14434
  * an operator who typed `dog` mean the same thing.
14167
14435
  */
14168
14436
  var NcAudioConditionSchema = object({
14169
- /** Audio macro labels; absent = any sound (level-only rule). */
14437
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14170
14438
  labels: array(string().min(1)).min(1).optional(),
14171
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14439
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14172
14440
  dbThreshold: number().min(-96).max(0).optional(),
14173
- /** Percentage of the window's samples that must be hits (1–100). */
14441
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14174
14442
  hitPercent: number().int().min(1).max(100).default(60),
14175
- /** Length of the sampling window in seconds. */
14443
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14176
14444
  samplingSeconds: number().int().min(1).max(300).default(10)
14177
14445
  });
14178
14446
  /**
@@ -14310,13 +14578,81 @@ var NcRuleActionsSchema = object({
14310
14578
  */
14311
14579
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14312
14580
  });
14581
+ /**
14582
+ * "This rule applies only while `deviceId` is in one of `states`."
14583
+ *
14584
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14585
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14586
+ * make the condition lie about devices whose states have no equivalent.
14587
+ *
14588
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14589
+ * condition that fired on "I could not read it" would be worse than no gate.
14590
+ */
14591
+ var NcDeviceStateConditionSchema = object({
14592
+ deviceId: number().int(),
14593
+ /** Any of these matches. */
14594
+ states: array(string().min(1)).min(1)
14595
+ });
14596
+ /**
14597
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14598
+ *
14599
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14600
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14601
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14602
+ * already has a trigger ("tell me about a person at the front door, but only
14603
+ * while the bin is still out"). That is why it composes with every delivery
14604
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14605
+ * kind exist for it — see D159.
14606
+ *
14607
+ * ── Identity ───────────────────────────────────────────────────────────────
14608
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14609
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14610
+ * carried as a HINT for the editor and for the log line, never as part of the
14611
+ * lookup key: a rule whose hint drifted must still gate correctly.
14612
+ *
14613
+ * ── Which boolean ──────────────────────────────────────────────────────────
14614
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14615
+ * already declares which boolean drives notification rules, and a second knob
14616
+ * that could disagree with it is exactly the D62 failure. Set it only to
14617
+ * override one rule against the scene's own default.
14618
+ *
14619
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14620
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14621
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14622
+ * evidence, in either direction.
14623
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14624
+ * The latch is a durable fact about the past ("it has diverged since I armed
14625
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14626
+ * reason the operator asked for a latch.
14627
+ *
14628
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14629
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14630
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14631
+ * said out loud in the log rather than dropped in silence.
14632
+ */
14633
+ var NcSceneConditionSchema = object({
14634
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14635
+ sceneId: string().min(1),
14636
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14637
+ deviceId: number().int().optional(),
14638
+ /** The state the scene must be in for the rule to fire. */
14639
+ requiredState: _enum(["matched", "diverged"]),
14640
+ /**
14641
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14642
+ * scene's own `emit` field, which is the only place that decision belongs.
14643
+ */
14644
+ latched: boolean().optional()
14645
+ });
14313
14646
  var NcConditionsSchema = object({
14314
14647
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14315
- deviceState: object({
14316
- deviceId: number().int(),
14317
- /** Any of these matches. */
14318
- states: array(string().min(1)).min(1)
14319
- }).optional(),
14648
+ deviceState: NcDeviceStateConditionSchema.optional(),
14649
+ /**
14650
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14651
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14652
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14653
+ * {@link NcSceneCondition} and D159.
14654
+ */
14655
+ scene: NcSceneConditionSchema.optional(),
14320
14656
  /** Device scope — absent = all devices. */
14321
14657
  devices: array(number()).optional(),
14322
14658
  /** Detector class names (any overlap with the record's class set). */
@@ -14342,18 +14678,47 @@ var NcConditionsSchema = object({
14342
14678
  */
14343
14679
  labelEquals: array(string().min(1)).optional(),
14344
14680
  /**
14345
- * Identity matcher. P1 boundary: matched against the record's collapsed
14346
- * `label` (the identity display name propagated by the face pipeline) —
14347
- * identity-ID matching rides in P2 when identity ids reach the record.
14681
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14682
+ * is about recognised people at all.
14683
+ *
14684
+ * Three states, and the empty one is the point:
14685
+ *
14686
+ * | value | meaning |
14687
+ * | --- | --- |
14688
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14689
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14690
+ * | a list | only these identities |
14691
+ *
14692
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14693
+ * `devices` list is every device), applied one level down: the operator has
14694
+ * turned the face scope ON and narrowed it to nothing, which is every known
14695
+ * face. No second field states the same thing — a switch that can disagree
14696
+ * with the list under it is worse than no switch (D62).
14697
+ *
14698
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14699
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14700
+ * the operator fixed the spelling. The id reaches the record on
14701
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14702
+ * `{{label}}` renders.
14703
+ *
14704
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
14705
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
14706
+ * for is left as it stands and reported, never dropped. The engine also
14707
+ * accepts a display-name hit as a compatibility leg, so a rule whose
14708
+ * migration could not resolve keeps matching exactly what it matched before.
14348
14709
  */
14349
14710
  identities: array(string().min(1)).optional(),
14350
- /** Fuzzy plate matcher against the record's `label` (plate text). */
14711
+ /**
14712
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
14713
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
14714
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
14715
+ */
14351
14716
  plates: NcPlateMatcherSchema.optional(),
14352
14717
  /**
14353
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14354
- * Same P1 boundary: matched against the record's collapsed `label` (the
14355
- * identity display name). A record with NO label passes (nothing to
14356
- * exclude), unlike the include variant which fails on an absent label.
14718
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
14719
+ * the same id members and the same lazy name→id migration. A record with NO
14720
+ * identity passes (nothing to exclude), unlike the include variant which
14721
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14357
14722
  */
14358
14723
  identitiesExclude: array(string().min(1)).optional(),
14359
14724
  /**
@@ -14745,7 +15110,80 @@ var NcRuleInputSchema = object({
14745
15110
  * a rule that predates the gate must keep delivering byte-for-byte as it
14746
15111
  * did, and absent is the only way to say that without a migration.
14747
15112
  */
14748
- confirm: NcConfirmSchema.optional()
15113
+ confirm: NcConfirmSchema.optional(),
15114
+ /**
15115
+ * WAIT for face/plate recognition before saying anything.
15116
+ *
15117
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15118
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15119
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15120
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15121
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15122
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15123
+ *
15124
+ * Only two honest answers exist, and this flag picks between them. It has
15125
+ * effect ONLY on a rule that declares a recognition scope
15126
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15127
+ * other rule there is nothing to wait for and the flag is inert.
15128
+ *
15129
+ * | value | what happens |
15130
+ * | --- | --- |
15131
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15132
+ * | absent / `false` | it fires at once WITHOUT the name, and if recognition lands before the track closes a SECOND, "…is Gianluca" notification follows (one per track, per rule, per target) |
15133
+ *
15134
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15135
+ * on the addon cap path, and absent has to keep meaning exactly what every
15136
+ * rule authored before this field meant.
15137
+ *
15138
+ * The cost of `true` is stated here because the editor states it too: a rule
15139
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15140
+ * tests every zone the track visited and a `crossing` condition can no longer
15141
+ * be satisfied, because a closed track carries no crossing.
15142
+ */
15143
+ waitForEnhancement: boolean().optional(),
15144
+ /**
15145
+ * GROUP a burst of subjects into ONE notification that grows.
15146
+ *
15147
+ * Seconds of quiet after the last matching subject before the burst is
15148
+ * considered over. While it is open, the first subject enqueues immediately —
15149
+ * **exactly as today, with no added latency** — and every real growth (a new
15150
+ * subject, or a name confirmed on one already in it) REPLACES that
15151
+ * notification with an updated one naming everybody. The push carries the
15152
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15153
+ *
15154
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15155
+ *
15156
+ * ### Why an idle cutoff and not a window
15157
+ *
15158
+ * The measured seven-person arrival on device 590 spans 110 s with every
15159
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15160
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15161
+ * 30 is Frigate's shipped value for the same decision.
15162
+ *
15163
+ * ### What it replaces
15164
+ *
15165
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15166
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15167
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15168
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15169
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15170
+ * budget over GROUPS — which is what it always meant — and a growth is never
15171
+ * throttled by the window its own first member spent.
15172
+ *
15173
+ * ### Interaction with {@link waitForEnhancement}
15174
+ *
15175
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15176
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15177
+ * CLOSE — already carrying its name — and grows as later members close. That
15178
+ * is later, and complete. With grouping alone the group opens on the first
15179
+ * object event and picks up names as they are confirmed, through the growth
15180
+ * path. Neither combination fires twice for one subject.
15181
+ *
15182
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15183
+ * on the addon cap path, so absent must keep meaning what it meant before this
15184
+ * field existed.
15185
+ */
15186
+ groupIdleSec: number().int().min(0).max(600).optional()
14749
15187
  });
14750
15188
  /**
14751
15189
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14852,6 +15290,7 @@ var NcConditionDescriptorSchema = object({
14852
15290
  "occupancy",
14853
15291
  "audio",
14854
15292
  "deviceState",
15293
+ "scene",
14855
15294
  "systemEvent"
14856
15295
  ]),
14857
15296
  operator: _enum([
@@ -15257,7 +15696,87 @@ var MethodAccessSchema = _enum([
15257
15696
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15258
15697
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15259
15698
  var CapScopeSchema = _enum(["device", "system"]);
15260
- var TokenScopeSchema = discriminatedUnion("type", [
15699
+ /**
15700
+ * DeviceSelector (scope model v3 — 2026-08-12).
15701
+ *
15702
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15703
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15704
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
15705
+ * AFTER the grant was minted — no re-grant, no re-login.
15706
+ *
15707
+ * - `all` — every device in the deployment. The broad viewer/operator
15708
+ * lever without a `category` grant (a `category` grant also covers device
15709
+ * caps that carry no deviceId; `all` is specifically the device set).
15710
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
15711
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
15712
+ * is NOT covered until the grant is edited.
15713
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
15714
+ * DYNAMIC. A device that changes type, or a new device of the type,
15715
+ * re-resolves on the next request.
15716
+ * - `locations` — every device whose operator-assigned `location` label is
15717
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
15718
+ * null/unset location matches NO `locations` selector.
15719
+ */
15720
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
15721
+ object({ kind: literal("all") }),
15722
+ object({
15723
+ kind: literal("ids"),
15724
+ ids: array(number().int()).min(1)
15725
+ }),
15726
+ object({
15727
+ kind: literal("types"),
15728
+ types: array(_enum(DeviceType)).min(1)
15729
+ }),
15730
+ object({
15731
+ kind: literal("locations"),
15732
+ locations: array(string().min(1)).min(1)
15733
+ })
15734
+ ]);
15735
+ var DeviceTokenScopeSchema = object({
15736
+ type: literal("device"),
15737
+ /** The device SET this grant covers — resolved against the live fleet. */
15738
+ selector: DeviceSelectorSchema,
15739
+ access: array(MethodAccessSchema).min(1),
15740
+ /**
15741
+ * Whether a grant on a PARENT device transparently covers its accessory
15742
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
15743
+ * Direction is parent → children ONLY.
15744
+ *
15745
+ * Absent → the matcher DERIVES it from the access flavour: `view`
15746
+ * inherits (a camera viewer sees the camera's accessories), `create` /
15747
+ * `delete` do NOT (actuating/removing a child is an explicit act the
15748
+ * operator must grant on the child, not inherit from the parent). Set it
15749
+ * explicitly to override that default per grant.
15750
+ */
15751
+ includeLinked: boolean().optional()
15752
+ });
15753
+ /**
15754
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
15755
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
15756
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
15757
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
15758
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
15759
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
15760
+ * migration cannot reach a JWT already in a client's hands; parse-time
15761
+ * migration covers both without a flag day. No cast — the raw object is read
15762
+ * through `Reflect.get` (its static type is `unknown`).
15763
+ */
15764
+ function migrateLegacyTokenScope(raw) {
15765
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
15766
+ if (Reflect.get(raw, "type") !== "device") return raw;
15767
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
15768
+ const targets = Reflect.get(raw, "targets");
15769
+ if (!Array.isArray(targets)) return raw;
15770
+ return {
15771
+ type: "device",
15772
+ selector: {
15773
+ kind: "ids",
15774
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
15775
+ },
15776
+ access: Reflect.get(raw, "access")
15777
+ };
15778
+ }
15779
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15261
15780
  object({
15262
15781
  type: literal("category"),
15263
15782
  target: CapScopeSchema,
@@ -15273,18 +15792,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15273
15792
  target: string(),
15274
15793
  access: array(MethodAccessSchema).min(1)
15275
15794
  }),
15276
- object({
15277
- type: literal("device"),
15278
- /**
15279
- * One or more deviceIds (serialised as strings for wire-format
15280
- * consistency with the rest of the union). Matcher accepts if
15281
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15282
- * of one scope-per-device when granting access to a set of cameras.
15283
- */
15284
- targets: array(string()).min(1),
15285
- access: array(MethodAccessSchema).min(1)
15286
- })
15287
- ]);
15795
+ DeviceTokenScopeSchema
15796
+ ]));
15288
15797
  object({
15289
15798
  id: string(),
15290
15799
  username: string(),
@@ -15601,7 +16110,7 @@ var TrackEnvelopeSchema = object({
15601
16110
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15602
16111
  * keeps every scalar the list surfaces actually render (ids, class(es),
15603
16112
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15604
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16113
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15605
16114
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15606
16115
  * `getTrack`. Mirrors the event-store `projection` convention
15607
16116
  * (`getObjectEvents` et al.).
@@ -15737,7 +16246,21 @@ union([literal(1), literal(2)]);
15737
16246
  var LabelAttributionSchema = object({
15738
16247
  stepId: string(),
15739
16248
  modelId: string().optional(),
15740
- decidedAt: number()
16249
+ decidedAt: number(),
16250
+ /**
16251
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16252
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16253
+ *
16254
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16255
+ * notification rule authored on "Gianluca" stopped matching the moment the
16256
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16257
+ * the thing that does not move, so it is what a rule matches on
16258
+ * (`NcConditions.identities`) and the text is what a human is shown.
16259
+ *
16260
+ * Absent when the label names no gallery row — a plate the OCR read but no
16261
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16262
+ */
16263
+ identityId: string().optional()
15741
16264
  });
15742
16265
  /**
15743
16266
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -15874,6 +16397,28 @@ var TrackSchema = object({
15874
16397
  * `=== true` and render nothing otherwise, never infer "no face".
15875
16398
  */
15876
16399
  hasFace: boolean().optional(),
16400
+ /**
16401
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16402
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16403
+ * so the passage is tracked once and as a VEHICLE.
16404
+ *
16405
+ * It exists because the fold's record was dishonest. D34 and the code both
16406
+ * said "the person is not lost — it is reported so both entities stay on the
16407
+ * record"; in fact the pair went into a per-processor RAM field behind an
16408
+ * accessor nobody called, and every durable surface said `vehicle`, full
16409
+ * stop. This is the composition note that makes the row true.
16410
+ *
16411
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16412
+ * person" is not an answer to "what is this" — both label tiers would refuse
16413
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16414
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16415
+ * and a `person` rule still does not fire for someone cycling past.
16416
+ *
16417
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16418
+ * the column, and every hub that predates the field, omits it. Test
16419
+ * `=== true` and render nothing otherwise — never infer "no rider".
16420
+ */
16421
+ hasRider: boolean().optional(),
15877
16422
  ...TrackFlagFields,
15878
16423
  ...TrackRetrainFields
15879
16424
  });
@@ -16223,7 +16768,10 @@ var RecentTracksQueryInput = object({
16223
16768
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16224
16769
  cursor: string().optional(),
16225
16770
  /** See {@link TrackProjectionSchema}. Default `full`. */
16226
- projection: TrackProjectionSchema.optional()
16771
+ projection: TrackProjectionSchema.optional(),
16772
+ /** Include stationary-promoted rows (parked objects). Default false: the
16773
+ * feed lists passages; parking records live on the stationary registry. */
16774
+ includeStationary: boolean().optional()
16227
16775
  });
16228
16776
  var RecentTracksPageSchema = object({
16229
16777
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16441,7 +16989,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16441
16989
  zone: TrackZoneFilterSchema.optional(),
16442
16990
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16443
16991
  * compatible — omitting the field keeps today's exact behaviour). */
16444
- projection: TrackProjectionSchema.optional()
16992
+ projection: TrackProjectionSchema.optional(),
16993
+ /** Include stationary-promoted rows (parked objects handed to the
16994
+ * stationary registry). Default false: the timeline lists passages,
16995
+ * not parking records (operator decision, 2026-08-15). */
16996
+ includeStationary: boolean().optional()
16445
16997
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16446
16998
  kind: "mutation",
16447
16999
  auth: "admin"
@@ -16605,11 +17157,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16605
17157
  auth: "admin"
16606
17158
  }), method(object({
16607
17159
  eventId: string(),
16608
- kind: MediaFileKindEnum.optional()
17160
+ kind: MediaFileKindEnum.optional(),
17161
+ deviceId: number()
16609
17162
  }), array(MediaFileSchema).readonly()), method(object({
16610
17163
  trackId: string(),
16611
- kinds: array(MediaFileKindEnum).optional()
16612
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17164
+ kinds: array(MediaFileKindEnum).optional(),
17165
+ deviceId: number()
17166
+ }), array(MediaFileSchema).readonly()), method(object({
17167
+ trackId: string(),
17168
+ deviceId: number()
17169
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16613
17170
  kind: "mutation",
16614
17171
  auth: "admin"
16615
17172
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17269,6 +17826,17 @@ var maxSessionHoldMsField = {
17269
17826
  default: 12e4,
17270
17827
  step: 5e3
17271
17828
  };
17829
+ /**
17830
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
17831
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
17832
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
17833
+ */
17834
+ var audioMotionWindowMsField = {
17835
+ min: 5e3,
17836
+ max: 6e5,
17837
+ default: 9e4,
17838
+ step: 5e3
17839
+ };
17272
17840
  var motionFpsField = {
17273
17841
  min: 1,
17274
17842
  max: 30,
@@ -17300,7 +17868,7 @@ var detectionFpsField = {
17300
17868
  var occupancyRecheckSecField = {
17301
17869
  min: 0,
17302
17870
  max: 300,
17303
- default: 30,
17871
+ default: 300,
17304
17872
  step: 5
17305
17873
  };
17306
17874
  var occupancyRecheckFramesField = {
@@ -17445,6 +18013,27 @@ var RunnerCameraConfigSchema = object({
17445
18013
  * resolved `CameraDetectionConfig`.
17446
18014
  */
17447
18015
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18016
+ /**
18017
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18018
+ * 'on-motion'` audio window, measured from the LAST motion event.
18019
+ *
18020
+ * This exists because the falling edge cannot be relied on. Camera-native
18021
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18022
+ * its email-push SMTP path both emit `detected: true` and never the
18023
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18024
+ * onboard-only camera a window that closed only on `detected: false` never
18025
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18026
+ * battery camera, the one failure mode the mode exists to prevent.
18027
+ *
18028
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18029
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18030
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18031
+ *
18032
+ * Not consumed by the runner: carried here so it shares the per-camera
18033
+ * device-settings surface with `motionCooldownMs`, exactly like
18034
+ * `maxSessionHoldMs`.
18035
+ */
18036
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17448
18037
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17449
18038
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17450
18039
  motionStreamId: string(),
@@ -17540,7 +18129,7 @@ var RunnerCameraConfigSchema = object({
17540
18129
  */
17541
18130
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17542
18131
  });
17543
- motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
18132
+ motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
17544
18133
  /**
17545
18134
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17546
18135
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18573,6 +19162,39 @@ var snapshotCapability = {
18573
19162
  etag: string().nullable()
18574
19163
  }))),
18575
19164
  /**
19165
+ * The full decision chain for ONE device, for the viewer's debug readout —
19166
+ * the answer to "why does this tile show what it shows" in a single poll:
19167
+ * the battery slice the state was derived from, the resolved state + its
19168
+ * reason, the cached frame's identity/age, whether a wake window is open,
19169
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
19170
+ * a debug read must never wake a battery camera.
19171
+ */
19172
+ getDebugState: systemMethod(object({ deviceId: number() }), object({
19173
+ /** The battery slice as read, or null when the device has none. */
19174
+ battery: object({
19175
+ sleeping: boolean(),
19176
+ lastUpdated: number(),
19177
+ lastContactAt: number().optional()
19178
+ }).nullable(),
19179
+ /** The resolved snapshot state (what the overlay decision used). */
19180
+ state: object({
19181
+ isBattery: boolean(),
19182
+ reason: _enum([
19183
+ "disabled",
19184
+ "sleeping",
19185
+ "unreachable",
19186
+ "waking"
19187
+ ]).nullable()
19188
+ }),
19189
+ /** The cached frame behind the next paint. */
19190
+ frame: object({
19191
+ capturedAt: number().nullable(),
19192
+ ageMs: number().nullable()
19193
+ }),
19194
+ /** A wake window is currently open (the Waking overlay's source). */
19195
+ waking: boolean()
19196
+ })),
19197
+ /**
18576
19198
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
18577
19199
  * that makes those frames current.
18578
19200
  *
@@ -18645,7 +19267,16 @@ targets: array(object({
18645
19267
  /** A sleeping battery camera: the frame is deliberately stale and will
18646
19268
  * NOT refresh in the background. A surface should say so rather than
18647
19269
  * present it as current. */
18648
- sleeping: boolean()
19270
+ sleeping: boolean(),
19271
+ /** Current device state rendered over the cached frame. State images
19272
+ * remain authoritative even when their photographic background is
19273
+ * old; null means the link must carry a current camera frame. */
19274
+ stateReason: _enum([
19275
+ "disabled",
19276
+ "sleeping",
19277
+ "unreachable",
19278
+ "waking"
19279
+ ]).nullable()
18649
19280
  })))
18650
19281
  },
18651
19282
  status: {
@@ -20173,6 +20804,25 @@ var BatteryStatusSchema = object({
20173
20804
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20174
20805
  lastUpdated: number(),
20175
20806
  /**
20807
+ * Ms epoch of the last time the device PROVED it was reachable — a
20808
+ * completed firmware round-trip, an observed wake, or an inbound push
20809
+ * (firmware event, email). `0`/absent = never since this slice was born.
20810
+ *
20811
+ * This is the ONLY input that separates "asleep" from "gone", and it is
20812
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
20813
+ * for the radio, because a poll that confirms reachability is the same
20814
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
20815
+ * single derivation every consumer must use; no surface computes its own.
20816
+ *
20817
+ * It is deliberately NOT a clock in the
20818
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
20819
+ * observation itself, and it is the only thing a 30-hour silence is
20820
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
20821
+ * Reolink provider) so a value that means "recently" cannot cost a
20822
+ * SQLite commit per round-trip.
20823
+ */
20824
+ lastContactAt: number().optional(),
20825
+ /**
20176
20826
  * True when the source is a BINARY low-battery indicator (HA
20177
20827
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20178
20828
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -23752,7 +24402,7 @@ method(object({
23752
24402
  toMs: number()
23753
24403
  }), RecordingAvailabilitySchema, {
23754
24404
  kind: "query",
23755
- auth: "admin"
24405
+ auth: "protected"
23756
24406
  }), method(object({
23757
24407
  deviceId: number(),
23758
24408
  fromMs: number(),
@@ -23760,14 +24410,14 @@ method(object({
23760
24410
  tzOffsetMinutes: number()
23761
24411
  }), RecordingDaysSchema, {
23762
24412
  kind: "query",
23763
- auth: "admin"
24413
+ auth: "protected"
23764
24414
  }), method(object({
23765
24415
  deviceId: number(),
23766
24416
  fromMs: number(),
23767
24417
  toMs: number()
23768
24418
  }), RecordingManifestSchema, {
23769
24419
  kind: "query",
23770
- auth: "admin"
24420
+ auth: "protected"
23771
24421
  }), method(object({}), RecordingStorageUsageSchema, {
23772
24422
  kind: "query",
23773
24423
  auth: "admin"
@@ -24057,14 +24707,77 @@ method(object({
24057
24707
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
24058
24708
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
24059
24709
  *
24060
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
24061
- * derives the device-detail contribution; the provider carries NO hand-written
24062
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
24063
- * every hysteresis flip / availability change; consumers never poll.
24064
- */
24065
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
24066
- * be added without a wire break (matching falls back to any-condition refs). */
24710
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
24711
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
24712
+ * for the thing: a scene is a standing question about the property ("is the bin
24713
+ * still out"), and the operator's question is "which of my scenes have tripped",
24714
+ * across every camera at once — not "what does camera 617 think". Buried one
24715
+ * camera deep it also could not be found. The surface is now a top-level admin
24716
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
24717
+ * picks the camera inside the create flow, the same shape Events and Faces have.
24718
+ *
24719
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
24720
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
24721
+ * directions, so a registration nobody declares fails exactly as loudly as a
24722
+ * declaration nobody registers. The editor is imported directly by the page.
24723
+ *
24724
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
24725
+ * availability change; consumers never poll.
24726
+ */
24727
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
24728
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
24729
+ * Open by design so more can be added without a wire break.
24730
+ *
24731
+ * Matching does NOT fall back across conditions: cross-condition cosines are
24732
+ * not comparable, so "I have never seen this scene in this light" is reported
24733
+ * as `unknown`, never guessed. A day reference scored against an IR frame
24734
+ * collapses the cosine and would latch a false alarm every single night. */
24067
24735
  var SceneConditionSchema = string();
24736
+ /**
24737
+ * What a scene does when the CURRENT light has no reference of its own.
24738
+ *
24739
+ * The lighting variants are not equally likely to exist. Almost every operator
24740
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
24741
+ * scene that is only ever going to be asked about a daytime question ("is the
24742
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
24743
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
24744
+ * working without it rather than degrading into a permanent complaint.
24745
+ *
24746
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
24747
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
24748
+ * last covered light left it at, the latch is untouched, and the hysteresis
24749
+ * run is neither spent nor cleared. The scene resumes by itself at first
24750
+ * light. This is the only behaviour under which "I never captured IR" is a
24751
+ * configuration choice instead of a nightly fault.
24752
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
24753
+ * for cameras whose IR frame is close enough to daylight (a floodlit
24754
+ * driveway, an always-white-light doorbell), and wrong for everything else:
24755
+ * cross-condition cosines are not comparable, so a day reference against a
24756
+ * true IR frame collapses and the scene reports a theft at 21:40.
24757
+ *
24758
+ * Never applies when the scene has NO comparable reference at all — that is
24759
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
24760
+ * there would hide a scene the operator never finished setting up.
24761
+ */
24762
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
24763
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
24764
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
24765
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
24766
+ * and never counts toward hysteresis in either direction. */
24767
+ var SceneVerdictSchema = _enum([
24768
+ "matched",
24769
+ "diverged",
24770
+ "unknown"
24771
+ ]);
24772
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
24773
+ * silence that reads as "nothing has happened". */
24774
+ var SceneUnavailableSchema = _enum([
24775
+ "no-reference-for-condition",
24776
+ "view-shifted",
24777
+ "no-vision-profile",
24778
+ "encoder-model-changed",
24779
+ "no-snapshot"
24780
+ ]);
24068
24781
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
24069
24782
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
24070
24783
  var SceneReferenceSchema = object({
@@ -24072,7 +24785,14 @@ var SceneReferenceSchema = object({
24072
24785
  modelId: string(),
24073
24786
  condition: SceneConditionSchema,
24074
24787
  capturedAt: number(),
24075
- thumbnailMediaId: string().optional()
24788
+ thumbnailMediaId: string().optional(),
24789
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
24790
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
24791
+ * normalized rect frame a different piece of world, and the scene would
24792
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
24793
+ * when hysteresis is about to flip — one extra encode per candidate
24794
+ * transition, not per poll. */
24795
+ anchorEmbedding: array(number()).optional()
24076
24796
  });
24077
24797
  var SceneMonitorStateSchema = object({
24078
24798
  id: string(),
@@ -24094,6 +24814,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
24094
24814
  profileId: string().optional(),
24095
24815
  hysteresisCount: number().int().positive()
24096
24816
  })]);
24817
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
24818
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
24819
+ * out in silence rather than reporting a fault every night. */
24820
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
24821
+ /**
24822
+ * Vision-model adjudication of a candidate flip. Field names deliberately
24823
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
24824
+ *
24825
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
24826
+ * fail-open: a notification suppressed is the worse error there, but a vision
24827
+ * model that timed out has not told us the bin is gone, and a latch is a
24828
+ * stateful claim that costs the operator a trip to reset.
24829
+ */
24830
+ var SceneConfirmSchema = object({
24831
+ enabled: boolean().default(false),
24832
+ prompt: string().min(1).max(1e3),
24833
+ profileId: string().optional(),
24834
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
24835
+ maxImagePx: number().int().min(64).max(2048).default(448),
24836
+ /** What a timeout / unavailable model means for the PENDING flip. */
24837
+ onTimeout: _enum(["flip", "hold"]).default("hold")
24838
+ });
24097
24839
  var SceneMonitorSchema = object({
24098
24840
  id: string(),
24099
24841
  label: string(),
@@ -24112,7 +24854,56 @@ var SceneMonitorSchema = object({
24112
24854
  lastConfidence: number().nullable(),
24113
24855
  currentCondition: SceneConditionSchema.nullable(),
24114
24856
  availability: _enum(["ok", "unavailable"]),
24115
- unavailableReason: string().nullable()
24857
+ unavailableReason: string().nullable(),
24858
+ /** Which state is "the initial screen". `null` until the first capture. */
24859
+ baselineStateId: string().nullable(),
24860
+ /** Which boolean drives notification rules and any export. */
24861
+ emit: _enum(["latched", "live"]).default("latched"),
24862
+ /** Live: does the region match the baseline RIGHT NOW. */
24863
+ verdict: SceneVerdictSchema,
24864
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
24865
+ latched: boolean(),
24866
+ /** Last reset (or creation). */
24867
+ armedAt: number(),
24868
+ divergedAt: number().nullable(),
24869
+ restoredAt: number().nullable(),
24870
+ /** A check is only COUNTED when the device has been quiet this long. Motion
24871
+ * during the window DISCARDS the observation — a car pulling up in front of
24872
+ * the bin must not be able to spend hysteresis credit. */
24873
+ quietSeconds: number().int().min(0).max(3600).default(60),
24874
+ /** An observation only advances the pending count when it is at least this
24875
+ * far from the previously counted one, so N agreeing checks span real time
24876
+ * rather than N adjacent polls inside one occlusion. */
24877
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
24878
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
24879
+ confirm: SceneConfirmSchema.optional(),
24880
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
24881
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
24882
+ /** Clear the latch on its own when the scene matches again? Default false —
24883
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
24884
+ * automation can react to the bin coming back without the operator's own
24885
+ * alarm silently clearing itself. */
24886
+ autoRestore: boolean().default(false),
24887
+ /** What to do when the current light has no reference of its own. See
24888
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
24889
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
24890
+ /**
24891
+ * The light whose checks are currently being SAT OUT under
24892
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
24893
+ *
24894
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
24895
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
24896
+ * nothing captured in this light"* in the same calm voice as the coverage
24897
+ * line, because the alternative is a scene that silently stops answering
24898
+ * after sunset with nothing anywhere saying why. A skipped check must never
24899
+ * read as a broken one.
24900
+ */
24901
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
24902
+ /** Named cause when `verdict === 'unknown'`. */
24903
+ unavailable: SceneUnavailableSchema.nullable(),
24904
+ /** Conditions that have at least one comparable reference — the coverage line
24905
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
24906
+ coveredConditions: array(SceneConditionSchema)
24116
24907
  });
24117
24908
  var SceneMonitorStatusSchema = object({
24118
24909
  monitors: array(SceneMonitorSchema),
@@ -24145,7 +24936,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24145
24936
  "both"
24146
24937
  ]).optional(),
24147
24938
  checkIntervalSec: number().optional(),
24148
- check: SceneCheckSchema.optional()
24939
+ check: SceneCheckSchema.optional(),
24940
+ emit: _enum(["latched", "live"]).optional(),
24941
+ quietSeconds: number().int().min(0).max(3600).optional(),
24942
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
24943
+ anchorThreshold: number().min(0).max(1).optional(),
24944
+ autoRestore: boolean().optional(),
24945
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
24946
+ /** `null` clears the vision-model adjudicator. */
24947
+ confirm: SceneConfirmSchema.nullable().optional()
24149
24948
  })
24150
24949
  }), _void(), {
24151
24950
  kind: "mutation",
@@ -24182,6 +24981,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24182
24981
  }), _void(), {
24183
24982
  kind: "mutation",
24184
24983
  auth: "admin"
24984
+ }), method(object({
24985
+ deviceId: number(),
24986
+ monitorId: string(),
24987
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
24988
+ recapture: boolean().optional()
24989
+ }), _void(), {
24990
+ kind: "mutation",
24991
+ auth: "admin"
24185
24992
  });
24186
24993
  /**
24187
24994
  * Per-stage gating mode applied to the zones a rule references.
@@ -24335,6 +25142,16 @@ var CamStreamDescriptorSchema = object({
24335
25142
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
24336
25143
  metadata: record(string(), unknown()).optional()
24337
25144
  });
25145
+ object({
25146
+ /** The descriptors as last built from a real camera response. Never a guess:
25147
+ * a failed or refused build writes NOTHING, so a restored catalog is always
25148
+ * one the camera itself once produced. */
25149
+ descriptors: array(CamStreamDescriptorSchema),
25150
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
25151
+ * path decide whether the camera's own awake window is worth spending on a
25152
+ * re-read. */
25153
+ lastFetchedAt: number()
25154
+ });
24338
25155
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
24339
25156
  /** One of the camera's stream profiles. */
24340
25157
  var StreamProfileSchema = _enum([
@@ -24490,12 +25307,64 @@ var NetworkAddressSchema = object({
24490
25307
  family: string(),
24491
25308
  internal: boolean()
24492
25309
  });
25310
+ /**
25311
+ * Provenance of the site coordinates, and the whole reason this is not just two
25312
+ * numbers.
25313
+ *
25314
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
25315
+ * nothing overwrites it.
25316
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
25317
+ * default that is right to a few kilometres beats the coarse UTC clock split
25318
+ * the sun-times consumers otherwise fall back to.
25319
+ *
25320
+ * The UI shows which one it is. An operator who cannot tell a guess from their
25321
+ * own input will eventually trust the guess.
25322
+ */
25323
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
25324
+ /**
25325
+ * The read shape: the location plus the honest state of the one-shot derivation.
25326
+ *
25327
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
25328
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
25329
+ * failed; the hub will NOT try again on its own — the fallback is declared
25330
+ * (consumers degrade to their own last resort) and the operator either types the
25331
+ * coordinates or presses detect.
25332
+ */
25333
+ var SiteLocationStatusSchema = object({
25334
+ location: object({
25335
+ /** WGS84 decimal degrees. */
25336
+ latitude: number().min(-90).max(90),
25337
+ longitude: number().min(-180).max(180),
25338
+ source: SiteLocationSourceSchema,
25339
+ /** Epoch ms the value was last written. */
25340
+ updatedAt: number(),
25341
+ /**
25342
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
25343
+ * only — never parsed, never matched on. Absent for an operator-typed value.
25344
+ */
25345
+ label: string().optional()
25346
+ }).nullable(),
25347
+ derivationAttemptedAt: number().nullable(),
25348
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
25349
+ derivationError: string().nullable()
25350
+ });
25351
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
25352
+ var SetSiteLocationInputSchema = object({
25353
+ latitude: number().min(-90).max(90),
25354
+ longitude: number().min(-180).max(180)
25355
+ }).nullable();
24493
25356
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
24494
25357
  kind: "mutation",
24495
25358
  auth: "admin"
24496
25359
  }), method(_void(), _void(), {
24497
25360
  kind: "mutation",
24498
25361
  auth: "admin"
25362
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
25363
+ kind: "mutation",
25364
+ auth: "admin"
25365
+ }), method(_void(), SiteLocationStatusSchema, {
25366
+ kind: "mutation",
25367
+ auth: "admin"
24499
25368
  });
24500
25369
  object({
24501
25370
  /** True when the device's tamper switch / case-open contact is
@@ -25424,6 +26293,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25424
26293
  labels: ["probe not implemented"]
25425
26294
  };
25426
26295
  }
26296
+ /**
26297
+ * Top-level devices restored at once in {@link onRestoreDevices}.
26298
+ *
26299
+ * Four covers the fleets this ships to without turning a boot into a burst a
26300
+ * camera NVR answers with a refusal. A provider whose upstream is a single
26301
+ * session with a serial command channel (a Baichuan hub, an NVR that
26302
+ * serialises ISAPI) should lower it; nothing needs to raise it.
26303
+ */
26304
+ restoreConcurrency = 4;
25427
26305
  async restoreDevices(savedDevices) {
25428
26306
  await this.onRestoreDevices(savedDevices);
25429
26307
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -25455,15 +26333,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25455
26333
  */
25456
26334
  async onRestoreDevices(savedDevices) {
25457
26335
  const restored = /* @__PURE__ */ new Set();
25458
- for (const saved of savedDevices) {
25459
- if (saved.parentDeviceId !== null) continue;
26336
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
26337
+ const restoreOne = async (saved) => {
25460
26338
  const Class = this.deviceClasses[saved.type];
25461
26339
  if (!Class) {
25462
26340
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
25463
26341
  tags: { stableId: saved.stableId },
25464
26342
  meta: { type: saved.type }
25465
26343
  });
25466
- continue;
26344
+ return;
25467
26345
  }
25468
26346
  try {
25469
26347
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -25477,7 +26355,15 @@ var BaseDeviceProvider = class extends BaseAddon {
25477
26355
  }
25478
26356
  });
25479
26357
  }
25480
- }
26358
+ };
26359
+ let nextTopLevel = 0;
26360
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
26361
+ for (;;) {
26362
+ const saved = topLevel[nextTopLevel++];
26363
+ if (saved === void 0) return;
26364
+ await restoreOne(saved);
26365
+ }
26366
+ }));
25481
26367
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
25482
26368
  for (const saved of childRows) {
25483
26369
  const Class = this.deviceClasses[saved.type];
@@ -27634,6 +28520,12 @@ Object.freeze({
27634
28520
  addonId: null,
27635
28521
  access: "create"
27636
28522
  },
28523
+ "llm.cancel": {
28524
+ capName: "llm",
28525
+ capScope: "system",
28526
+ addonId: null,
28527
+ access: "create"
28528
+ },
27637
28529
  "llm.deleteModel": {
27638
28530
  capName: "llm",
27639
28531
  capScope: "system",
@@ -27718,6 +28610,12 @@ Object.freeze({
27718
28610
  addonId: null,
27719
28611
  access: "view"
27720
28612
  },
28613
+ "llm.resolveModelRef": {
28614
+ capName: "llm",
28615
+ capScope: "system",
28616
+ addonId: null,
28617
+ access: "create"
28618
+ },
27721
28619
  "llm.setDefault": {
27722
28620
  capName: "llm",
27723
28621
  capScope: "system",
@@ -29884,6 +30782,12 @@ Object.freeze({
29884
30782
  addonId: null,
29885
30783
  access: "create"
29886
30784
  },
30785
+ "sceneMonitor.resetScene": {
30786
+ capName: "scene-monitor",
30787
+ capScope: "device",
30788
+ addonId: null,
30789
+ access: "delete"
30790
+ },
29887
30791
  "sceneMonitor.updateScene": {
29888
30792
  capName: "scene-monitor",
29889
30793
  capScope: "device",
@@ -30022,6 +30926,12 @@ Object.freeze({
30022
30926
  addonId: null,
30023
30927
  access: "view"
30024
30928
  },
30929
+ "snapshot.getDebugState": {
30930
+ capName: "snapshot",
30931
+ capScope: "device",
30932
+ addonId: null,
30933
+ access: "view"
30934
+ },
30025
30935
  "snapshot.getSnapshot": {
30026
30936
  capName: "snapshot",
30027
30937
  capScope: "device",
@@ -30562,6 +31472,12 @@ Object.freeze({
30562
31472
  addonId: null,
30563
31473
  access: "create"
30564
31474
  },
31475
+ "system.detectSiteLocation": {
31476
+ capName: "system",
31477
+ capScope: "system",
31478
+ addonId: null,
31479
+ access: "create"
31480
+ },
30565
31481
  "system.featureFlags": {
30566
31482
  capName: "system",
30567
31483
  capScope: "system",
@@ -30580,6 +31496,12 @@ Object.freeze({
30580
31496
  addonId: null,
30581
31497
  access: "view"
30582
31498
  },
31499
+ "system.getSiteLocation": {
31500
+ capName: "system",
31501
+ capScope: "system",
31502
+ addonId: null,
31503
+ access: "view"
31504
+ },
30583
31505
  "system.health": {
30584
31506
  capName: "system",
30585
31507
  capScope: "system",
@@ -30604,6 +31526,12 @@ Object.freeze({
30604
31526
  addonId: null,
30605
31527
  access: "create"
30606
31528
  },
31529
+ "system.setSiteLocation": {
31530
+ capName: "system",
31531
+ capScope: "system",
31532
+ addonId: null,
31533
+ access: "create"
31534
+ },
30607
31535
  "terminalSession.adoptLegacyMonitor": {
30608
31536
  capName: "terminal-session",
30609
31537
  capScope: "system",
@@ -31175,6 +32103,1709 @@ Object.freeze({
31175
32103
  access: "create"
31176
32104
  }
31177
32105
  });
32106
+ Object.freeze({
32107
+ "accessories.setChildHidden": [{
32108
+ name: "childDeviceId",
32109
+ form: "single",
32110
+ optional: false
32111
+ }, {
32112
+ name: "deviceId",
32113
+ form: "single",
32114
+ optional: false
32115
+ }],
32116
+ "addonSettings.getDeviceSettings": [{
32117
+ name: "deviceId",
32118
+ form: "single",
32119
+ optional: false
32120
+ }],
32121
+ "addonSettings.updateDeviceSettings": [{
32122
+ name: "deviceId",
32123
+ form: "single",
32124
+ optional: false
32125
+ }],
32126
+ "alarmPanel.arm": [{
32127
+ name: "deviceId",
32128
+ form: "single",
32129
+ optional: false
32130
+ }],
32131
+ "alarmPanel.disarm": [{
32132
+ name: "deviceId",
32133
+ form: "single",
32134
+ optional: false
32135
+ }],
32136
+ "alarmPanel.trigger": [{
32137
+ name: "deviceId",
32138
+ form: "single",
32139
+ optional: false
32140
+ }],
32141
+ "audioAnalysis.resolveDeviceSettings": [{
32142
+ name: "deviceId",
32143
+ form: "single",
32144
+ optional: false
32145
+ }],
32146
+ "audioAnalyzer.classify": [{
32147
+ name: "deviceId",
32148
+ form: "single",
32149
+ optional: true
32150
+ }],
32151
+ "audioMetrics.getCurrentSnapshot": [{
32152
+ name: "deviceId",
32153
+ form: "single",
32154
+ optional: false
32155
+ }],
32156
+ "audioMetrics.getHistory": [{
32157
+ name: "deviceId",
32158
+ form: "single",
32159
+ optional: false
32160
+ }],
32161
+ "automationControl.disable": [{
32162
+ name: "deviceId",
32163
+ form: "single",
32164
+ optional: false
32165
+ }],
32166
+ "automationControl.enable": [{
32167
+ name: "deviceId",
32168
+ form: "single",
32169
+ optional: false
32170
+ }],
32171
+ "automationControl.trigger": [{
32172
+ name: "deviceId",
32173
+ form: "single",
32174
+ optional: false
32175
+ }],
32176
+ "battery.wakeForStream": [{
32177
+ name: "deviceId",
32178
+ form: "single",
32179
+ optional: false
32180
+ }],
32181
+ "brightness.setBrightness": [{
32182
+ name: "deviceId",
32183
+ form: "single",
32184
+ optional: false
32185
+ }],
32186
+ "button.press": [{
32187
+ name: "deviceId",
32188
+ form: "single",
32189
+ optional: false
32190
+ }],
32191
+ "cameraCredentials.getCredentials": [{
32192
+ name: "deviceId",
32193
+ form: "single",
32194
+ optional: false
32195
+ }],
32196
+ "cameraStreams.getBrokerStreams": [{
32197
+ name: "deviceId",
32198
+ form: "single",
32199
+ optional: false
32200
+ }],
32201
+ "cameraStreams.getCameraStreams": [{
32202
+ name: "deviceId",
32203
+ form: "single",
32204
+ optional: false
32205
+ }],
32206
+ "cameraStreams.getProfileRtspEntries": [{
32207
+ name: "deviceId",
32208
+ form: "single",
32209
+ optional: false
32210
+ }],
32211
+ "cameraStreams.getRtspEntries": [{
32212
+ name: "deviceId",
32213
+ form: "single",
32214
+ optional: false
32215
+ }],
32216
+ "cameraStreams.pickStream": [{
32217
+ name: "deviceId",
32218
+ form: "single",
32219
+ optional: false
32220
+ }],
32221
+ "climateControl.setFanMode": [{
32222
+ name: "deviceId",
32223
+ form: "single",
32224
+ optional: false
32225
+ }],
32226
+ "climateControl.setMode": [{
32227
+ name: "deviceId",
32228
+ form: "single",
32229
+ optional: false
32230
+ }],
32231
+ "climateControl.setPreset": [{
32232
+ name: "deviceId",
32233
+ form: "single",
32234
+ optional: false
32235
+ }],
32236
+ "climateControl.setSwingHorizontal": [{
32237
+ name: "deviceId",
32238
+ form: "single",
32239
+ optional: false
32240
+ }],
32241
+ "climateControl.setSwingVertical": [{
32242
+ name: "deviceId",
32243
+ form: "single",
32244
+ optional: false
32245
+ }],
32246
+ "climateControl.setTarget": [{
32247
+ name: "deviceId",
32248
+ form: "single",
32249
+ optional: false
32250
+ }],
32251
+ "climateControl.setTargetHumidity": [{
32252
+ name: "deviceId",
32253
+ form: "single",
32254
+ optional: false
32255
+ }],
32256
+ "climateControl.setTargetRange": [{
32257
+ name: "deviceId",
32258
+ form: "single",
32259
+ optional: false
32260
+ }],
32261
+ "color.setColor": [{
32262
+ name: "deviceId",
32263
+ form: "single",
32264
+ optional: false
32265
+ }],
32266
+ "consumables.reset": [{
32267
+ name: "deviceId",
32268
+ form: "single",
32269
+ optional: false
32270
+ }],
32271
+ "control.setValue": [{
32272
+ name: "deviceId",
32273
+ form: "single",
32274
+ optional: false
32275
+ }],
32276
+ "cover.close": [{
32277
+ name: "deviceId",
32278
+ form: "single",
32279
+ optional: false
32280
+ }],
32281
+ "cover.open": [{
32282
+ name: "deviceId",
32283
+ form: "single",
32284
+ optional: false
32285
+ }],
32286
+ "cover.setPosition": [{
32287
+ name: "deviceId",
32288
+ form: "single",
32289
+ optional: false
32290
+ }],
32291
+ "cover.setTiltPosition": [{
32292
+ name: "deviceId",
32293
+ form: "single",
32294
+ optional: false
32295
+ }],
32296
+ "cover.stop": [{
32297
+ name: "deviceId",
32298
+ form: "single",
32299
+ optional: false
32300
+ }],
32301
+ "dayNight.getOptions": [{
32302
+ name: "deviceId",
32303
+ form: "single",
32304
+ optional: false
32305
+ }],
32306
+ "dayNight.setSettings": [{
32307
+ name: "deviceId",
32308
+ form: "single",
32309
+ optional: false
32310
+ }],
32311
+ "decoder.createSession": [{
32312
+ name: "deviceId",
32313
+ form: "single",
32314
+ optional: true
32315
+ }],
32316
+ "deviceAdoption.release": [{
32317
+ name: "camDeviceId",
32318
+ form: "single",
32319
+ optional: false
32320
+ }],
32321
+ "deviceAdoption.resync": [{
32322
+ name: "camDeviceId",
32323
+ form: "single",
32324
+ optional: false
32325
+ }],
32326
+ "deviceDiscovery.adoptDevice": [{
32327
+ name: "deviceId",
32328
+ form: "single",
32329
+ optional: false
32330
+ }],
32331
+ "deviceDiscovery.listDiscovered": [{
32332
+ name: "deviceId",
32333
+ form: "single",
32334
+ optional: false
32335
+ }],
32336
+ "deviceDiscovery.refreshDiscovery": [{
32337
+ name: "deviceId",
32338
+ form: "single",
32339
+ optional: false
32340
+ }],
32341
+ "deviceDiscovery.releaseDevice": [{
32342
+ name: "childDeviceId",
32343
+ form: "single",
32344
+ optional: false
32345
+ }, {
32346
+ name: "deviceId",
32347
+ form: "single",
32348
+ optional: false
32349
+ }],
32350
+ "deviceManager.adoptionRelease": [{
32351
+ name: "camDeviceId",
32352
+ form: "single",
32353
+ optional: false
32354
+ }],
32355
+ "deviceManager.adoptionResync": [{
32356
+ name: "camDeviceId",
32357
+ form: "single",
32358
+ optional: false
32359
+ }],
32360
+ "deviceManager.applyInitialMeta": [{
32361
+ name: "deviceId",
32362
+ form: "single",
32363
+ optional: false
32364
+ }, {
32365
+ name: "linkDeviceId",
32366
+ form: "single",
32367
+ optional: true
32368
+ }],
32369
+ "deviceManager.disable": [{
32370
+ name: "deviceId",
32371
+ form: "single",
32372
+ optional: false
32373
+ }],
32374
+ "deviceManager.enable": [{
32375
+ name: "deviceId",
32376
+ form: "single",
32377
+ optional: false
32378
+ }],
32379
+ "deviceManager.getBindings": [{
32380
+ name: "deviceId",
32381
+ form: "single",
32382
+ optional: false
32383
+ }],
32384
+ "deviceManager.getChildren": [{
32385
+ name: "parentDeviceId",
32386
+ form: "single",
32387
+ optional: false
32388
+ }],
32389
+ "deviceManager.getConfigSchema": [{
32390
+ name: "deviceId",
32391
+ form: "single",
32392
+ optional: false
32393
+ }],
32394
+ "deviceManager.getDevice": [{
32395
+ name: "deviceId",
32396
+ form: "single",
32397
+ optional: false
32398
+ }],
32399
+ "deviceManager.getDeviceAggregate": [{
32400
+ name: "deviceId",
32401
+ form: "single",
32402
+ optional: false
32403
+ }],
32404
+ "deviceManager.getDeviceLiveInfoAggregate": [{
32405
+ name: "deviceId",
32406
+ form: "single",
32407
+ optional: false
32408
+ }],
32409
+ "deviceManager.getDeviceSettingsAggregate": [{
32410
+ name: "deviceId",
32411
+ form: "single",
32412
+ optional: false
32413
+ }],
32414
+ "deviceManager.getDeviceStatusAggregate": [{
32415
+ name: "deviceId",
32416
+ form: "single",
32417
+ optional: false
32418
+ }],
32419
+ "deviceManager.getDeviceStatusAggregateBatch": [{
32420
+ name: "deviceIds",
32421
+ form: "array",
32422
+ optional: false
32423
+ }],
32424
+ "deviceManager.getLinkedDevices": [{
32425
+ name: "deviceId",
32426
+ form: "single",
32427
+ optional: false
32428
+ }],
32429
+ "deviceManager.getSettingsSchema": [{
32430
+ name: "deviceId",
32431
+ form: "single",
32432
+ optional: false
32433
+ }],
32434
+ "deviceManager.getStreamProfileMap": [{
32435
+ name: "deviceId",
32436
+ form: "single",
32437
+ optional: false
32438
+ }],
32439
+ "deviceManager.getStreamSources": [{
32440
+ name: "deviceId",
32441
+ form: "single",
32442
+ optional: false
32443
+ }],
32444
+ "deviceManager.getWireableFields": [{
32445
+ name: "deviceId",
32446
+ form: "single",
32447
+ optional: false
32448
+ }],
32449
+ "deviceManager.loadConfig": [{
32450
+ name: "deviceId",
32451
+ form: "single",
32452
+ optional: false
32453
+ }],
32454
+ "deviceManager.loadMeta": [{
32455
+ name: "deviceId",
32456
+ form: "single",
32457
+ optional: false
32458
+ }],
32459
+ "deviceManager.loadRuntimeState": [{
32460
+ name: "deviceId",
32461
+ form: "single",
32462
+ optional: false
32463
+ }],
32464
+ "deviceManager.persistConfig": [{
32465
+ name: "deviceId",
32466
+ form: "single",
32467
+ optional: false
32468
+ }],
32469
+ "deviceManager.probeStreams": [{
32470
+ name: "deviceId",
32471
+ form: "single",
32472
+ optional: false
32473
+ }],
32474
+ "deviceManager.registerDevice": [{
32475
+ name: "parentDeviceId",
32476
+ form: "single",
32477
+ optional: true
32478
+ }],
32479
+ "deviceManager.remove": [{
32480
+ name: "deviceId",
32481
+ form: "single",
32482
+ optional: false
32483
+ }],
32484
+ "deviceManager.removeDevice": [{
32485
+ name: "deviceId",
32486
+ form: "single",
32487
+ optional: false
32488
+ }],
32489
+ "deviceManager.runDeviceAction": [{
32490
+ name: "deviceId",
32491
+ form: "single",
32492
+ optional: false
32493
+ }],
32494
+ "deviceManager.setChildLayout": [{
32495
+ name: "deviceId",
32496
+ form: "single",
32497
+ optional: false
32498
+ }],
32499
+ "deviceManager.setDisabled": [{
32500
+ name: "deviceId",
32501
+ form: "single",
32502
+ optional: false
32503
+ }],
32504
+ "deviceManager.setDisplay": [{
32505
+ name: "deviceId",
32506
+ form: "single",
32507
+ optional: false
32508
+ }],
32509
+ "deviceManager.setIntegrationId": [{
32510
+ name: "deviceId",
32511
+ form: "single",
32512
+ optional: false
32513
+ }],
32514
+ "deviceManager.setLinkDeviceId": [{
32515
+ name: "deviceId",
32516
+ form: "single",
32517
+ optional: false
32518
+ }, {
32519
+ name: "linkDeviceId",
32520
+ form: "single",
32521
+ optional: true
32522
+ }],
32523
+ "deviceManager.setLocation": [{
32524
+ name: "deviceId",
32525
+ form: "single",
32526
+ optional: false
32527
+ }],
32528
+ "deviceManager.setMetadata": [{
32529
+ name: "deviceId",
32530
+ form: "single",
32531
+ optional: false
32532
+ }],
32533
+ "deviceManager.setName": [{
32534
+ name: "deviceId",
32535
+ form: "single",
32536
+ optional: false
32537
+ }],
32538
+ "deviceManager.setPrimaryChildEntityId": [{
32539
+ name: "deviceId",
32540
+ form: "single",
32541
+ optional: false
32542
+ }],
32543
+ "deviceManager.setRole": [{
32544
+ name: "deviceId",
32545
+ form: "single",
32546
+ optional: false
32547
+ }],
32548
+ "deviceManager.setStreamProfileMap": [{
32549
+ name: "deviceId",
32550
+ form: "single",
32551
+ optional: false
32552
+ }],
32553
+ "deviceManager.setType": [{
32554
+ name: "deviceId",
32555
+ form: "single",
32556
+ optional: false
32557
+ }],
32558
+ "deviceManager.setWrapperActive": [{
32559
+ name: "deviceId",
32560
+ form: "single",
32561
+ optional: false
32562
+ }],
32563
+ "deviceManager.testField": [{
32564
+ name: "deviceId",
32565
+ form: "single",
32566
+ optional: false
32567
+ }],
32568
+ "deviceManager.updateConfig": [{
32569
+ name: "deviceId",
32570
+ form: "single",
32571
+ optional: false
32572
+ }],
32573
+ "deviceManager.updateDeviceField": [{
32574
+ name: "deviceId",
32575
+ form: "single",
32576
+ optional: false
32577
+ }],
32578
+ "deviceManager.updateDeviceFieldsBatch": [{
32579
+ name: "deviceId",
32580
+ form: "single",
32581
+ optional: false
32582
+ }],
32583
+ "deviceOps.getConfigEntries": [{
32584
+ name: "deviceId",
32585
+ form: "single",
32586
+ optional: false
32587
+ }],
32588
+ "deviceOps.getRawState": [{
32589
+ name: "deviceId",
32590
+ form: "single",
32591
+ optional: false
32592
+ }],
32593
+ "deviceOps.getSettingsSchema": [{
32594
+ name: "deviceId",
32595
+ form: "single",
32596
+ optional: false
32597
+ }],
32598
+ "deviceOps.getStreamSources": [{
32599
+ name: "deviceId",
32600
+ form: "single",
32601
+ optional: false
32602
+ }],
32603
+ "deviceOps.removeDevice": [{
32604
+ name: "deviceId",
32605
+ form: "single",
32606
+ optional: false
32607
+ }],
32608
+ "deviceOps.runAction": [{
32609
+ name: "deviceId",
32610
+ form: "single",
32611
+ optional: false
32612
+ }],
32613
+ "deviceOps.setConfig": [{
32614
+ name: "deviceId",
32615
+ form: "single",
32616
+ optional: false
32617
+ }],
32618
+ "deviceState.getCapSlice": [{
32619
+ name: "deviceId",
32620
+ form: "single",
32621
+ optional: false
32622
+ }],
32623
+ "deviceState.getSnapshot": [{
32624
+ name: "deviceId",
32625
+ form: "single",
32626
+ optional: false
32627
+ }],
32628
+ "deviceState.setCapSlice": [{
32629
+ name: "deviceId",
32630
+ form: "single",
32631
+ optional: false
32632
+ }],
32633
+ "events.getEventClipUrl": [{
32634
+ name: "deviceId",
32635
+ form: "single",
32636
+ optional: false
32637
+ }],
32638
+ "events.getEvents": [{
32639
+ name: "deviceId",
32640
+ form: "single",
32641
+ optional: false
32642
+ }],
32643
+ "events.getEventThumbnail": [{
32644
+ name: "deviceId",
32645
+ form: "single",
32646
+ optional: false
32647
+ }],
32648
+ "faceGallery.getFaceByTrack": [{
32649
+ name: "deviceId",
32650
+ form: "single",
32651
+ optional: false
32652
+ }],
32653
+ "faceGallery.listRecentFaces": [{
32654
+ name: "deviceId",
32655
+ form: "single",
32656
+ optional: true
32657
+ }],
32658
+ "fanControl.setDirection": [{
32659
+ name: "deviceId",
32660
+ form: "single",
32661
+ optional: false
32662
+ }],
32663
+ "fanControl.setOscillating": [{
32664
+ name: "deviceId",
32665
+ form: "single",
32666
+ optional: false
32667
+ }],
32668
+ "fanControl.setPercentage": [{
32669
+ name: "deviceId",
32670
+ form: "single",
32671
+ optional: false
32672
+ }],
32673
+ "fanControl.setPreset": [{
32674
+ name: "deviceId",
32675
+ form: "single",
32676
+ optional: false
32677
+ }],
32678
+ "humidifier.setMode": [{
32679
+ name: "deviceId",
32680
+ form: "single",
32681
+ optional: false
32682
+ }],
32683
+ "humidifier.setOn": [{
32684
+ name: "deviceId",
32685
+ form: "single",
32686
+ optional: false
32687
+ }],
32688
+ "humidifier.setTargetHumidity": [{
32689
+ name: "deviceId",
32690
+ form: "single",
32691
+ optional: false
32692
+ }],
32693
+ "imageSettings.getOptions": [{
32694
+ name: "deviceId",
32695
+ form: "single",
32696
+ optional: false
32697
+ }],
32698
+ "imageSettings.setSettings": [{
32699
+ name: "deviceId",
32700
+ form: "single",
32701
+ optional: false
32702
+ }],
32703
+ "intercom.endTalkSession": [{
32704
+ name: "deviceId",
32705
+ form: "single",
32706
+ optional: false
32707
+ }],
32708
+ "intercom.handleAnswer": [{
32709
+ name: "deviceId",
32710
+ form: "single",
32711
+ optional: false
32712
+ }],
32713
+ "intercom.pushTalkAudio": [{
32714
+ name: "deviceId",
32715
+ form: "single",
32716
+ optional: false
32717
+ }],
32718
+ "intercom.startSession": [{
32719
+ name: "deviceId",
32720
+ form: "single",
32721
+ optional: false
32722
+ }],
32723
+ "intercom.startTalkSession": [{
32724
+ name: "deviceId",
32725
+ form: "single",
32726
+ optional: false
32727
+ }],
32728
+ "intercom.stopSession": [{
32729
+ name: "deviceId",
32730
+ form: "single",
32731
+ optional: false
32732
+ }],
32733
+ "lawnMowerControl.dock": [{
32734
+ name: "deviceId",
32735
+ form: "single",
32736
+ optional: false
32737
+ }],
32738
+ "lawnMowerControl.pause": [{
32739
+ name: "deviceId",
32740
+ form: "single",
32741
+ optional: false
32742
+ }],
32743
+ "lawnMowerControl.startMowing": [{
32744
+ name: "deviceId",
32745
+ form: "single",
32746
+ optional: false
32747
+ }],
32748
+ "lockControl.lock": [{
32749
+ name: "deviceId",
32750
+ form: "single",
32751
+ optional: false
32752
+ }],
32753
+ "lockControl.open": [{
32754
+ name: "deviceId",
32755
+ form: "single",
32756
+ optional: false
32757
+ }],
32758
+ "lockControl.unlock": [{
32759
+ name: "deviceId",
32760
+ form: "single",
32761
+ optional: false
32762
+ }],
32763
+ "mediaPlayer.next": [{
32764
+ name: "deviceId",
32765
+ form: "single",
32766
+ optional: false
32767
+ }],
32768
+ "mediaPlayer.pause": [{
32769
+ name: "deviceId",
32770
+ form: "single",
32771
+ optional: false
32772
+ }],
32773
+ "mediaPlayer.play": [{
32774
+ name: "deviceId",
32775
+ form: "single",
32776
+ optional: false
32777
+ }],
32778
+ "mediaPlayer.playMedia": [{
32779
+ name: "deviceId",
32780
+ form: "single",
32781
+ optional: false
32782
+ }],
32783
+ "mediaPlayer.previous": [{
32784
+ name: "deviceId",
32785
+ form: "single",
32786
+ optional: false
32787
+ }],
32788
+ "mediaPlayer.seek": [{
32789
+ name: "deviceId",
32790
+ form: "single",
32791
+ optional: false
32792
+ }],
32793
+ "mediaPlayer.selectSource": [{
32794
+ name: "deviceId",
32795
+ form: "single",
32796
+ optional: false
32797
+ }],
32798
+ "mediaPlayer.setMute": [{
32799
+ name: "deviceId",
32800
+ form: "single",
32801
+ optional: false
32802
+ }],
32803
+ "mediaPlayer.setRepeat": [{
32804
+ name: "deviceId",
32805
+ form: "single",
32806
+ optional: false
32807
+ }],
32808
+ "mediaPlayer.setShuffle": [{
32809
+ name: "deviceId",
32810
+ form: "single",
32811
+ optional: false
32812
+ }],
32813
+ "mediaPlayer.setVolume": [{
32814
+ name: "deviceId",
32815
+ form: "single",
32816
+ optional: false
32817
+ }],
32818
+ "mediaPlayer.stop": [{
32819
+ name: "deviceId",
32820
+ form: "single",
32821
+ optional: false
32822
+ }],
32823
+ "motion.isDetected": [{
32824
+ name: "deviceId",
32825
+ form: "single",
32826
+ optional: false
32827
+ }],
32828
+ "motionDetection.analyze": [{
32829
+ name: "deviceId",
32830
+ form: "single",
32831
+ optional: false
32832
+ }],
32833
+ "motionDetection.removeCamera": [{
32834
+ name: "deviceId",
32835
+ form: "single",
32836
+ optional: false
32837
+ }],
32838
+ "motionTrigger.setMotionTrigger": [{
32839
+ name: "deviceId",
32840
+ form: "single",
32841
+ optional: false
32842
+ }],
32843
+ "motionZones.getOptions": [{
32844
+ name: "deviceId",
32845
+ form: "single",
32846
+ optional: false
32847
+ }],
32848
+ "motionZones.setZone": [{
32849
+ name: "deviceId",
32850
+ form: "single",
32851
+ optional: false
32852
+ }],
32853
+ "nativeObjectDetection.setEnabled": [{
32854
+ name: "deviceId",
32855
+ form: "single",
32856
+ optional: false
32857
+ }],
32858
+ "networkQuality.getDeviceStats": [{
32859
+ name: "deviceId",
32860
+ form: "single",
32861
+ optional: false
32862
+ }],
32863
+ "networkQuality.reportClientStats": [{
32864
+ name: "deviceId",
32865
+ form: "single",
32866
+ optional: false
32867
+ }],
32868
+ "notificationRules.setDeviceMuted": [{
32869
+ name: "deviceId",
32870
+ form: "single",
32871
+ optional: false
32872
+ }],
32873
+ "notifier.cancel": [{
32874
+ name: "deviceId",
32875
+ form: "single",
32876
+ optional: false
32877
+ }],
32878
+ "notifier.send": [{
32879
+ name: "deviceId",
32880
+ form: "single",
32881
+ optional: false
32882
+ }],
32883
+ "osd.setOverlay": [{
32884
+ name: "deviceId",
32885
+ form: "single",
32886
+ optional: false
32887
+ }],
32888
+ "osdManager.clearSlotBinding": [{
32889
+ name: "deviceId",
32890
+ form: "single",
32891
+ optional: false
32892
+ }],
32893
+ "osdManager.copyDeviceConfiguration": [{
32894
+ name: "sourceDeviceId",
32895
+ form: "single",
32896
+ optional: false
32897
+ }, {
32898
+ name: "targetDeviceId",
32899
+ form: "single",
32900
+ optional: false
32901
+ }],
32902
+ "osdManager.getDeviceOsd": [{
32903
+ name: "deviceId",
32904
+ form: "single",
32905
+ optional: false
32906
+ }],
32907
+ "osdManager.getSourceCatalog": [{
32908
+ name: "deviceId",
32909
+ form: "single",
32910
+ optional: false
32911
+ }],
32912
+ "osdManager.previewSlot": [{
32913
+ name: "deviceId",
32914
+ form: "single",
32915
+ optional: false
32916
+ }],
32917
+ "osdManager.renderDevice": [{
32918
+ name: "deviceId",
32919
+ form: "single",
32920
+ optional: false
32921
+ }],
32922
+ "osdManager.setSlotBinding": [{
32923
+ name: "deviceId",
32924
+ form: "single",
32925
+ optional: false
32926
+ }],
32927
+ "petFeeder.callPet": [{
32928
+ name: "deviceId",
32929
+ form: "single",
32930
+ optional: false
32931
+ }],
32932
+ "petFeeder.cancelFeed": [{
32933
+ name: "deviceId",
32934
+ form: "single",
32935
+ optional: false
32936
+ }],
32937
+ "petFeeder.feed": [{
32938
+ name: "deviceId",
32939
+ form: "single",
32940
+ optional: false
32941
+ }],
32942
+ "petFeeder.markFoodReplenished": [{
32943
+ name: "deviceId",
32944
+ form: "single",
32945
+ optional: false
32946
+ }],
32947
+ "petFeeder.playSound": [{
32948
+ name: "deviceId",
32949
+ form: "single",
32950
+ optional: false
32951
+ }],
32952
+ "petFeeder.resetDesiccant": [{
32953
+ name: "deviceId",
32954
+ form: "single",
32955
+ optional: false
32956
+ }],
32957
+ "petFeeder.setChildLock": [{
32958
+ name: "deviceId",
32959
+ form: "single",
32960
+ optional: false
32961
+ }],
32962
+ "petFeeder.setFeedSound": [{
32963
+ name: "deviceId",
32964
+ form: "single",
32965
+ optional: false
32966
+ }],
32967
+ "petFeeder.setIndicatorLight": [{
32968
+ name: "deviceId",
32969
+ form: "single",
32970
+ optional: false
32971
+ }],
32972
+ "petFeeder.setVolume": [{
32973
+ name: "deviceId",
32974
+ form: "single",
32975
+ optional: false
32976
+ }],
32977
+ "pipelineAnalytics.clearTracks": [{
32978
+ name: "deviceId",
32979
+ form: "single",
32980
+ optional: false
32981
+ }],
32982
+ "pipelineAnalytics.completeRetrainTrack": [{
32983
+ name: "deviceId",
32984
+ form: "single",
32985
+ optional: false
32986
+ }],
32987
+ "pipelineAnalytics.deleteDeviceEvents": [{
32988
+ name: "deviceId",
32989
+ form: "single",
32990
+ optional: false
32991
+ }],
32992
+ "pipelineAnalytics.deleteTracks": [{
32993
+ name: "deviceId",
32994
+ form: "single",
32995
+ optional: false
32996
+ }],
32997
+ "pipelineAnalytics.deselectRetrainFrame": [{
32998
+ name: "deviceId",
32999
+ form: "single",
33000
+ optional: false
33001
+ }],
33002
+ "pipelineAnalytics.getActiveTracks": [{
33003
+ name: "deviceId",
33004
+ form: "single",
33005
+ optional: false
33006
+ }],
33007
+ "pipelineAnalytics.getAudioEvents": [{
33008
+ name: "deviceId",
33009
+ form: "single",
33010
+ optional: false
33011
+ }],
33012
+ "pipelineAnalytics.getEventDensity": [{
33013
+ name: "deviceId",
33014
+ form: "single",
33015
+ optional: false
33016
+ }],
33017
+ "pipelineAnalytics.getEventMedia": [{
33018
+ name: "deviceId",
33019
+ form: "single",
33020
+ optional: false
33021
+ }],
33022
+ "pipelineAnalytics.getKeyEvents": [{
33023
+ name: "deviceId",
33024
+ form: "single",
33025
+ optional: false
33026
+ }],
33027
+ "pipelineAnalytics.getMotionEvents": [{
33028
+ name: "deviceId",
33029
+ form: "single",
33030
+ optional: false
33031
+ }],
33032
+ "pipelineAnalytics.getObjectEvents": [{
33033
+ name: "deviceId",
33034
+ form: "single",
33035
+ optional: false
33036
+ }],
33037
+ "pipelineAnalytics.getRetrainExportUrl": [{
33038
+ name: "deviceIds",
33039
+ form: "array",
33040
+ optional: true
33041
+ }],
33042
+ "pipelineAnalytics.getSensorEvents": [{
33043
+ name: "deviceId",
33044
+ form: "single",
33045
+ optional: false
33046
+ }],
33047
+ "pipelineAnalytics.getTrack": [{
33048
+ name: "deviceId",
33049
+ form: "single",
33050
+ optional: false
33051
+ }],
33052
+ "pipelineAnalytics.getTrackMedia": [{
33053
+ name: "deviceId",
33054
+ form: "single",
33055
+ optional: false
33056
+ }],
33057
+ "pipelineAnalytics.getTrainingExportSummary": [{
33058
+ name: "deviceIds",
33059
+ form: "array",
33060
+ optional: true
33061
+ }],
33062
+ "pipelineAnalytics.getTrainingExportUrl": [{
33063
+ name: "deviceIds",
33064
+ form: "array",
33065
+ optional: true
33066
+ }],
33067
+ "pipelineAnalytics.listEventKinds": [{
33068
+ name: "deviceId",
33069
+ form: "single",
33070
+ optional: false
33071
+ }],
33072
+ "pipelineAnalytics.listEventKindsBatch": [{
33073
+ name: "deviceIds",
33074
+ form: "array",
33075
+ optional: false
33076
+ }],
33077
+ "pipelineAnalytics.listOpsLog": [{
33078
+ name: "deviceId",
33079
+ form: "single",
33080
+ optional: true
33081
+ }],
33082
+ "pipelineAnalytics.listRecentTracks": [{
33083
+ name: "deviceIds",
33084
+ form: "array",
33085
+ optional: false
33086
+ }],
33087
+ "pipelineAnalytics.listRetrainStaging": [{
33088
+ name: "deviceIds",
33089
+ form: "array",
33090
+ optional: true
33091
+ }],
33092
+ "pipelineAnalytics.listTrackMedia": [{
33093
+ name: "deviceId",
33094
+ form: "single",
33095
+ optional: false
33096
+ }],
33097
+ "pipelineAnalytics.listTracks": [{
33098
+ name: "deviceId",
33099
+ form: "single",
33100
+ optional: false
33101
+ }],
33102
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
33103
+ name: "deviceId",
33104
+ form: "single",
33105
+ optional: false
33106
+ }],
33107
+ "pipelineAnalytics.pruneEventsBefore": [{
33108
+ name: "deviceId",
33109
+ form: "single",
33110
+ optional: false
33111
+ }],
33112
+ "pipelineAnalytics.pruneTracksBefore": [{
33113
+ name: "deviceId",
33114
+ form: "single",
33115
+ optional: false
33116
+ }],
33117
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
33118
+ name: "deviceId",
33119
+ form: "single",
33120
+ optional: true
33121
+ }],
33122
+ "pipelineAnalytics.restageRetrainTrack": [{
33123
+ name: "deviceId",
33124
+ form: "single",
33125
+ optional: false
33126
+ }],
33127
+ "pipelineAnalytics.saveRetrainAnnotations": [{
33128
+ name: "deviceId",
33129
+ form: "single",
33130
+ optional: false
33131
+ }],
33132
+ "pipelineAnalytics.searchObjectEvents": [{
33133
+ name: "deviceId",
33134
+ form: "single",
33135
+ optional: true
33136
+ }],
33137
+ "pipelineAnalytics.selectRetrainFrames": [{
33138
+ name: "deviceId",
33139
+ form: "single",
33140
+ optional: false
33141
+ }],
33142
+ "pipelineAnalytics.setTrackFlags": [{
33143
+ name: "deviceId",
33144
+ form: "single",
33145
+ optional: false
33146
+ }],
33147
+ "pipelineAnalytics.wipeAllAnalytics": [{
33148
+ name: "deviceId",
33149
+ form: "single",
33150
+ optional: false
33151
+ }],
33152
+ "pipelineExecutor.runPipeline": [{
33153
+ name: "deviceId",
33154
+ form: "single",
33155
+ optional: true
33156
+ }],
33157
+ "pipelineExecutor.runPipelineBatch": [{
33158
+ name: "deviceId",
33159
+ form: "single",
33160
+ optional: true
33161
+ }],
33162
+ "pipelineOrchestrator.assignAudio": [{
33163
+ name: "deviceId",
33164
+ form: "single",
33165
+ optional: false
33166
+ }],
33167
+ "pipelineOrchestrator.assignPipeline": [{
33168
+ name: "deviceId",
33169
+ form: "single",
33170
+ optional: false
33171
+ }],
33172
+ "pipelineOrchestrator.getAudioAssignment": [{
33173
+ name: "deviceId",
33174
+ form: "single",
33175
+ optional: false
33176
+ }],
33177
+ "pipelineOrchestrator.getCameraMetrics": [{
33178
+ name: "deviceId",
33179
+ form: "single",
33180
+ optional: false
33181
+ }],
33182
+ "pipelineOrchestrator.getCameraSettings": [{
33183
+ name: "deviceId",
33184
+ form: "single",
33185
+ optional: false
33186
+ }],
33187
+ "pipelineOrchestrator.getCameraStatus": [{
33188
+ name: "deviceId",
33189
+ form: "single",
33190
+ optional: false
33191
+ }],
33192
+ "pipelineOrchestrator.getCameraStatuses": [{
33193
+ name: "deviceIds",
33194
+ form: "array",
33195
+ optional: true
33196
+ }],
33197
+ "pipelineOrchestrator.getCameraStepOverrides": [{
33198
+ name: "deviceId",
33199
+ form: "single",
33200
+ optional: false
33201
+ }],
33202
+ "pipelineOrchestrator.getCameraSwitches": [{
33203
+ name: "deviceId",
33204
+ form: "single",
33205
+ optional: false
33206
+ }],
33207
+ "pipelineOrchestrator.getPipelineAssignment": [{
33208
+ name: "deviceId",
33209
+ form: "single",
33210
+ optional: false
33211
+ }],
33212
+ "pipelineOrchestrator.getPipelineDevicePin": [{
33213
+ name: "deviceId",
33214
+ form: "single",
33215
+ optional: false
33216
+ }],
33217
+ "pipelineOrchestrator.resolvePipeline": [{
33218
+ name: "deviceId",
33219
+ form: "single",
33220
+ optional: false
33221
+ }],
33222
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
33223
+ name: "deviceId",
33224
+ form: "single",
33225
+ optional: false
33226
+ }],
33227
+ "pipelineOrchestrator.setCameraStepOverride": [{
33228
+ name: "deviceId",
33229
+ form: "single",
33230
+ optional: false
33231
+ }],
33232
+ "pipelineOrchestrator.setCameraStepToggle": [{
33233
+ name: "deviceId",
33234
+ form: "single",
33235
+ optional: false
33236
+ }],
33237
+ "pipelineOrchestrator.setCameraSwitch": [{
33238
+ name: "deviceId",
33239
+ form: "single",
33240
+ optional: false
33241
+ }],
33242
+ "pipelineOrchestrator.setPipelineDevicePin": [{
33243
+ name: "deviceId",
33244
+ form: "single",
33245
+ optional: false
33246
+ }],
33247
+ "pipelineOrchestrator.unassignAudio": [{
33248
+ name: "deviceId",
33249
+ form: "single",
33250
+ optional: false
33251
+ }],
33252
+ "pipelineOrchestrator.unassignPipeline": [{
33253
+ name: "deviceId",
33254
+ form: "single",
33255
+ optional: false
33256
+ }],
33257
+ "pipelineRunner.attachCamera": [{
33258
+ name: "deviceId",
33259
+ form: "single",
33260
+ optional: false
33261
+ }],
33262
+ "pipelineRunner.detachCamera": [{
33263
+ name: "deviceId",
33264
+ form: "single",
33265
+ optional: false
33266
+ }],
33267
+ "pipelineRunner.getCameraMetrics": [{
33268
+ name: "deviceId",
33269
+ form: "single",
33270
+ optional: false
33271
+ }],
33272
+ "pipelineRunner.reportMotion": [{
33273
+ name: "deviceId",
33274
+ form: "single",
33275
+ optional: false
33276
+ }],
33277
+ "pipelineRunner.runDetailSubtree": [{
33278
+ name: "deviceId",
33279
+ form: "single",
33280
+ optional: false
33281
+ }],
33282
+ "pipelineRunner.runStatelessStep": [{
33283
+ name: "sourceDeviceId",
33284
+ form: "single",
33285
+ optional: false
33286
+ }],
33287
+ "plateGallery.getPlateByTrack": [{
33288
+ name: "deviceId",
33289
+ form: "single",
33290
+ optional: false
33291
+ }],
33292
+ "plateGallery.listPlates": [{
33293
+ name: "deviceId",
33294
+ form: "single",
33295
+ optional: true
33296
+ }],
33297
+ "privacyMask.getOptions": [{
33298
+ name: "deviceId",
33299
+ form: "single",
33300
+ optional: false
33301
+ }],
33302
+ "privacyMask.setAudioEnabled": [{
33303
+ name: "deviceId",
33304
+ form: "single",
33305
+ optional: false
33306
+ }],
33307
+ "privacyMask.setMask": [{
33308
+ name: "deviceId",
33309
+ form: "single",
33310
+ optional: false
33311
+ }],
33312
+ "ptz.continuousMove": [{
33313
+ name: "deviceId",
33314
+ form: "single",
33315
+ optional: false
33316
+ }],
33317
+ "ptz.deletePreset": [{
33318
+ name: "deviceId",
33319
+ form: "single",
33320
+ optional: false
33321
+ }],
33322
+ "ptz.getOptions": [{
33323
+ name: "deviceId",
33324
+ form: "single",
33325
+ optional: false
33326
+ }],
33327
+ "ptz.getPosition": [{
33328
+ name: "deviceId",
33329
+ form: "single",
33330
+ optional: false
33331
+ }],
33332
+ "ptz.getPresets": [{
33333
+ name: "deviceId",
33334
+ form: "single",
33335
+ optional: false
33336
+ }],
33337
+ "ptz.goHome": [{
33338
+ name: "deviceId",
33339
+ form: "single",
33340
+ optional: false
33341
+ }],
33342
+ "ptz.goToPreset": [{
33343
+ name: "deviceId",
33344
+ form: "single",
33345
+ optional: false
33346
+ }],
33347
+ "ptz.move": [{
33348
+ name: "deviceId",
33349
+ form: "single",
33350
+ optional: false
33351
+ }],
33352
+ "ptz.savePreset": [{
33353
+ name: "deviceId",
33354
+ form: "single",
33355
+ optional: false
33356
+ }],
33357
+ "ptz.setAutofocus": [{
33358
+ name: "deviceId",
33359
+ form: "single",
33360
+ optional: false
33361
+ }],
33362
+ "ptz.stop": [{
33363
+ name: "deviceId",
33364
+ form: "single",
33365
+ optional: false
33366
+ }],
33367
+ "ptzAutotrack.getSettings": [{
33368
+ name: "deviceId",
33369
+ form: "single",
33370
+ optional: false
33371
+ }],
33372
+ "ptzAutotrack.getStatus": [{
33373
+ name: "deviceId",
33374
+ form: "single",
33375
+ optional: false
33376
+ }],
33377
+ "ptzAutotrack.setEnabled": [{
33378
+ name: "deviceId",
33379
+ form: "single",
33380
+ optional: false
33381
+ }],
33382
+ "ptzAutotrack.setSettings": [{
33383
+ name: "deviceId",
33384
+ form: "single",
33385
+ optional: false
33386
+ }],
33387
+ "reboot.reboot": [{
33388
+ name: "deviceId",
33389
+ form: "single",
33390
+ optional: false
33391
+ }],
33392
+ "recording.deleteFootprint": [{
33393
+ name: "deviceId",
33394
+ form: "single",
33395
+ optional: false
33396
+ }],
33397
+ "recording.getAvailability": [{
33398
+ name: "deviceId",
33399
+ form: "single",
33400
+ optional: false
33401
+ }],
33402
+ "recording.getDaysWithRecordings": [{
33403
+ name: "deviceId",
33404
+ form: "single",
33405
+ optional: false
33406
+ }],
33407
+ "recording.getDeviceConfig": [{
33408
+ name: "deviceId",
33409
+ form: "single",
33410
+ optional: false
33411
+ }],
33412
+ "recording.getPlaybackManifest": [{
33413
+ name: "deviceId",
33414
+ form: "single",
33415
+ optional: false
33416
+ }],
33417
+ "recording.listOpsLog": [{
33418
+ name: "deviceId",
33419
+ form: "single",
33420
+ optional: true
33421
+ }],
33422
+ "recording.locateSegment": [{
33423
+ name: "deviceId",
33424
+ form: "single",
33425
+ optional: false
33426
+ }],
33427
+ "recording.pruneFootage": [{
33428
+ name: "deviceId",
33429
+ form: "single",
33430
+ optional: false
33431
+ }],
33432
+ "recording.readGopBytes": [{
33433
+ name: "deviceId",
33434
+ form: "single",
33435
+ optional: false
33436
+ }],
33437
+ "recording.readSegmentBytes": [{
33438
+ name: "deviceId",
33439
+ form: "single",
33440
+ optional: false
33441
+ }],
33442
+ "recording.relocateFootage": [{
33443
+ name: "deviceId",
33444
+ form: "single",
33445
+ optional: true
33446
+ }],
33447
+ "recording.renderClip": [{
33448
+ name: "deviceId",
33449
+ form: "single",
33450
+ optional: false
33451
+ }],
33452
+ "recording.renderGif": [{
33453
+ name: "deviceId",
33454
+ form: "single",
33455
+ optional: false
33456
+ }],
33457
+ "recording.rescanStorage": [{
33458
+ name: "deviceId",
33459
+ form: "single",
33460
+ optional: false
33461
+ }],
33462
+ "recording.setDeviceConfig": [{
33463
+ name: "deviceId",
33464
+ form: "single",
33465
+ optional: false
33466
+ }],
33467
+ "recording.startStorageMigrationMove": [{
33468
+ name: "deviceId",
33469
+ form: "single",
33470
+ optional: true
33471
+ }],
33472
+ "recordingExport.createExport": [{
33473
+ name: "deviceId",
33474
+ form: "single",
33475
+ optional: false
33476
+ }],
33477
+ "recordingExport.listExports": [{
33478
+ name: "deviceId",
33479
+ form: "single",
33480
+ optional: true
33481
+ }],
33482
+ "sceneMonitor.captureReference": [{
33483
+ name: "deviceId",
33484
+ form: "single",
33485
+ optional: false
33486
+ }],
33487
+ "sceneMonitor.createScene": [{
33488
+ name: "deviceId",
33489
+ form: "single",
33490
+ optional: false
33491
+ }],
33492
+ "sceneMonitor.deleteReference": [{
33493
+ name: "deviceId",
33494
+ form: "single",
33495
+ optional: false
33496
+ }],
33497
+ "sceneMonitor.deleteScene": [{
33498
+ name: "deviceId",
33499
+ form: "single",
33500
+ optional: false
33501
+ }],
33502
+ "sceneMonitor.listScenes": [{
33503
+ name: "deviceId",
33504
+ form: "single",
33505
+ optional: false
33506
+ }],
33507
+ "sceneMonitor.recheckNow": [{
33508
+ name: "deviceId",
33509
+ form: "single",
33510
+ optional: false
33511
+ }],
33512
+ "sceneMonitor.resetScene": [{
33513
+ name: "deviceId",
33514
+ form: "single",
33515
+ optional: false
33516
+ }],
33517
+ "sceneMonitor.updateScene": [{
33518
+ name: "deviceId",
33519
+ form: "single",
33520
+ optional: false
33521
+ }],
33522
+ "scriptRunner.run": [{
33523
+ name: "deviceId",
33524
+ form: "single",
33525
+ optional: false
33526
+ }],
33527
+ "scriptRunner.stop": [{
33528
+ name: "deviceId",
33529
+ form: "single",
33530
+ optional: false
33531
+ }],
33532
+ "snapshot.getDebugState": [{
33533
+ name: "deviceId",
33534
+ form: "single",
33535
+ optional: false
33536
+ }],
33537
+ "snapshot.getSnapshot": [{
33538
+ name: "deviceId",
33539
+ form: "single",
33540
+ optional: false
33541
+ }],
33542
+ "snapshot.getSnapshotLinks": [{
33543
+ name: "targets",
33544
+ form: "object-array",
33545
+ optional: false,
33546
+ itemField: "deviceId"
33547
+ }],
33548
+ "snapshot.getSnapshotOverview": [{
33549
+ name: "deviceIds",
33550
+ form: "array",
33551
+ optional: false
33552
+ }],
33553
+ "snapshot.invalidateCache": [{
33554
+ name: "deviceId",
33555
+ form: "single",
33556
+ optional: false
33557
+ }],
33558
+ "streamBroker.acquireEgressTranscode": [{
33559
+ name: "deviceId",
33560
+ form: "single",
33561
+ optional: false
33562
+ }],
33563
+ "streamBroker.assignProfile": [{
33564
+ name: "deviceId",
33565
+ form: "single",
33566
+ optional: false
33567
+ }],
33568
+ "streamBroker.getDeviceAudioMute": [{
33569
+ name: "deviceId",
33570
+ form: "single",
33571
+ optional: false
33572
+ }],
33573
+ "streamBroker.getStreamWithCodec": [{
33574
+ name: "deviceId",
33575
+ form: "single",
33576
+ optional: false
33577
+ }],
33578
+ "streamBroker.produceEventMedia": [{
33579
+ name: "deviceId",
33580
+ form: "single",
33581
+ optional: false
33582
+ }],
33583
+ "streamBroker.publishCameraStream": [{
33584
+ name: "deviceId",
33585
+ form: "single",
33586
+ optional: false
33587
+ }],
33588
+ "streamBroker.renderPreBufferClip": [{
33589
+ name: "deviceId",
33590
+ form: "single",
33591
+ optional: false
33592
+ }],
33593
+ "streamBroker.restartProfile": [{
33594
+ name: "deviceId",
33595
+ form: "single",
33596
+ optional: false
33597
+ }],
33598
+ "streamBroker.retractCameraStream": [{
33599
+ name: "deviceId",
33600
+ form: "single",
33601
+ optional: false
33602
+ }],
33603
+ "streamBroker.setDeviceAudioMute": [{
33604
+ name: "deviceId",
33605
+ form: "single",
33606
+ optional: false
33607
+ }],
33608
+ "streamBroker.unassignProfile": [{
33609
+ name: "deviceId",
33610
+ form: "single",
33611
+ optional: false
33612
+ }],
33613
+ "streamCatalog.getCatalog": [{
33614
+ name: "deviceId",
33615
+ form: "single",
33616
+ optional: false
33617
+ }],
33618
+ "streamParams.getConfigSchema": [{
33619
+ name: "deviceId",
33620
+ form: "single",
33621
+ optional: false
33622
+ }],
33623
+ "streamParams.getOptions": [{
33624
+ name: "deviceId",
33625
+ form: "single",
33626
+ optional: false
33627
+ }],
33628
+ "streamParams.setProfile": [{
33629
+ name: "deviceId",
33630
+ form: "single",
33631
+ optional: false
33632
+ }],
33633
+ "switch.setState": [{
33634
+ name: "deviceId",
33635
+ form: "single",
33636
+ optional: false
33637
+ }],
33638
+ "vacuumControl.locate": [{
33639
+ name: "deviceId",
33640
+ form: "single",
33641
+ optional: false
33642
+ }],
33643
+ "vacuumControl.pause": [{
33644
+ name: "deviceId",
33645
+ form: "single",
33646
+ optional: false
33647
+ }],
33648
+ "vacuumControl.returnToBase": [{
33649
+ name: "deviceId",
33650
+ form: "single",
33651
+ optional: false
33652
+ }],
33653
+ "vacuumControl.setFanSpeed": [{
33654
+ name: "deviceId",
33655
+ form: "single",
33656
+ optional: false
33657
+ }],
33658
+ "vacuumControl.start": [{
33659
+ name: "deviceId",
33660
+ form: "single",
33661
+ optional: false
33662
+ }],
33663
+ "vacuumControl.stop": [{
33664
+ name: "deviceId",
33665
+ form: "single",
33666
+ optional: false
33667
+ }],
33668
+ "valve.close": [{
33669
+ name: "deviceId",
33670
+ form: "single",
33671
+ optional: false
33672
+ }],
33673
+ "valve.open": [{
33674
+ name: "deviceId",
33675
+ form: "single",
33676
+ optional: false
33677
+ }],
33678
+ "valve.setPosition": [{
33679
+ name: "deviceId",
33680
+ form: "single",
33681
+ optional: false
33682
+ }],
33683
+ "valve.stop": [{
33684
+ name: "deviceId",
33685
+ form: "single",
33686
+ optional: false
33687
+ }],
33688
+ "videoclips.getClipPlayback": [{
33689
+ name: "deviceId",
33690
+ form: "single",
33691
+ optional: false
33692
+ }],
33693
+ "videoclips.listClips": [{
33694
+ name: "deviceId",
33695
+ form: "single",
33696
+ optional: false
33697
+ }],
33698
+ "waterHeater.setAway": [{
33699
+ name: "deviceId",
33700
+ form: "single",
33701
+ optional: false
33702
+ }],
33703
+ "waterHeater.setOperationMode": [{
33704
+ name: "deviceId",
33705
+ form: "single",
33706
+ optional: false
33707
+ }],
33708
+ "waterHeater.setTargetTemp": [{
33709
+ name: "deviceId",
33710
+ form: "single",
33711
+ optional: false
33712
+ }],
33713
+ "webrtcSession.addIceCandidate": [{
33714
+ name: "deviceId",
33715
+ form: "single",
33716
+ optional: false
33717
+ }],
33718
+ "webrtcSession.closeSession": [{
33719
+ name: "deviceId",
33720
+ form: "single",
33721
+ optional: false
33722
+ }],
33723
+ "webrtcSession.createSession": [{
33724
+ name: "deviceId",
33725
+ form: "single",
33726
+ optional: false
33727
+ }],
33728
+ "webrtcSession.getIceCandidates": [{
33729
+ name: "deviceId",
33730
+ form: "single",
33731
+ optional: false
33732
+ }],
33733
+ "webrtcSession.getSessionState": [{
33734
+ name: "deviceId",
33735
+ form: "single",
33736
+ optional: false
33737
+ }],
33738
+ "webrtcSession.handleAnswer": [{
33739
+ name: "deviceId",
33740
+ form: "single",
33741
+ optional: false
33742
+ }],
33743
+ "webrtcSession.handleOffer": [{
33744
+ name: "deviceId",
33745
+ form: "single",
33746
+ optional: false
33747
+ }],
33748
+ "webrtcSession.hasAdaptiveBitrate": [{
33749
+ name: "deviceId",
33750
+ form: "single",
33751
+ optional: false
33752
+ }],
33753
+ "webrtcSession.listStreams": [{
33754
+ name: "deviceId",
33755
+ form: "single",
33756
+ optional: false
33757
+ }],
33758
+ "zoneAnalytics.getCameraHistory": [{
33759
+ name: "deviceId",
33760
+ form: "single",
33761
+ optional: false
33762
+ }],
33763
+ "zoneAnalytics.getCurrentSnapshot": [{
33764
+ name: "deviceId",
33765
+ form: "single",
33766
+ optional: false
33767
+ }],
33768
+ "zoneAnalytics.getUnzonedHistory": [{
33769
+ name: "deviceId",
33770
+ form: "single",
33771
+ optional: false
33772
+ }],
33773
+ "zoneAnalytics.getZoneHistory": [{
33774
+ name: "deviceId",
33775
+ form: "single",
33776
+ optional: false
33777
+ }],
33778
+ "zoneRules.listRules": [{
33779
+ name: "deviceId",
33780
+ form: "single",
33781
+ optional: false
33782
+ }],
33783
+ "zoneRules.setRules": [{
33784
+ name: "deviceId",
33785
+ form: "single",
33786
+ optional: false
33787
+ }],
33788
+ "zones.addZone": [{
33789
+ name: "deviceId",
33790
+ form: "single",
33791
+ optional: false
33792
+ }],
33793
+ "zones.listZones": [{
33794
+ name: "deviceId",
33795
+ form: "single",
33796
+ optional: false
33797
+ }],
33798
+ "zones.removeZone": [{
33799
+ name: "deviceId",
33800
+ form: "single",
33801
+ optional: false
33802
+ }],
33803
+ "zones.updateZone": [{
33804
+ name: "deviceId",
33805
+ form: "single",
33806
+ optional: false
33807
+ }]
33808
+ });
31178
33809
  Object.freeze({
31179
33810
  "broker": "broker",
31180
33811
  "device-export": "device-export",