@camstack/addon-decoder-nodeav 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/index.js +2690 -85
  2. package/dist/index.mjs +2690 -85
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  let node_crypto = require("node:crypto");
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". */
@@ -10811,6 +10852,8 @@ var QueryFilterSchema = object({
10811
10852
  where: record(string(), unknown()).optional(),
10812
10853
  whereIn: record(string(), array(unknown())).optional(),
10813
10854
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10855
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10856
+ whereNot: record(string(), unknown()).optional(),
10814
10857
  orderBy: object({
10815
10858
  field: string(),
10816
10859
  direction: _enum(["asc", "desc"])
@@ -10830,7 +10873,8 @@ var QueryFilterSchema = object({
10830
10873
  var MutationFilterSchema = object({
10831
10874
  where: record(string(), unknown()).optional(),
10832
10875
  whereIn: record(string(), array(unknown())).optional(),
10833
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10876
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10877
+ whereNot: record(string(), unknown()).optional()
10834
10878
  });
10835
10879
  /** A single stored record: `{ id, data }`. */
10836
10880
  var SettingsRecordSchema = object({
@@ -12280,6 +12324,17 @@ var LlmImageSchema = object({
12280
12324
  bytes: _instanceof(Uint8Array),
12281
12325
  mimeType: string()
12282
12326
  });
12327
+ /**
12328
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12329
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12330
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12331
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12332
+ */
12333
+ var LlmRetryPolicySchema = object({
12334
+ enabled: boolean().default(false),
12335
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12336
+ maxAttempts: number().int().min(1).max(5).default(1)
12337
+ });
12283
12338
  var LlmGenerateBaseInputSchema = object({
12284
12339
  /** Collection routing (the notification-output posture). */
12285
12340
  addonId: string().optional(),
@@ -12294,7 +12349,28 @@ var LlmGenerateBaseInputSchema = object({
12294
12349
  jsonSchema: record(string(), unknown()).optional(),
12295
12350
  /** Per-call override of the profile default. */
12296
12351
  maxTokens: number().int().positive().optional(),
12297
- temperature: number().optional()
12352
+ temperature: number().optional(),
12353
+ /** Per-call override of the profile default (nucleus sampling). */
12354
+ topP: number().min(0).max(1).optional(),
12355
+ /** Per-call override of the profile default (top-k sampling). */
12356
+ topK: number().int().positive().optional(),
12357
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12358
+ timeoutMs: number().int().positive().optional(),
12359
+ /** Per-call override; beats both the consumer table and the profile. */
12360
+ retry: LlmRetryPolicySchema.optional(),
12361
+ /**
12362
+ * Caller-minted id that makes this generation CANCELLABLE.
12363
+ *
12364
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12365
+ * the call against 8 s and free their own slot when the timer wins, while the
12366
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12367
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12368
+ * not generations, and the real load is unbounded.
12369
+ *
12370
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12371
+ * `llm.cancel({ requestId })` tears the socket down.
12372
+ */
12373
+ requestId: string().optional()
12298
12374
  });
12299
12375
  /**
12300
12376
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12307,6 +12383,18 @@ var LlmGenerateBaseInputSchema = object({
12307
12383
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12308
12384
  * watchdog — operator decision #3).
12309
12385
  */
12386
+ /**
12387
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12388
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12389
+ * REF rather than looked up at install time, so what the operator approved in
12390
+ * the preview is exactly what the node downloads.
12391
+ */
12392
+ var ManagedModelExtraFileSchema = object({
12393
+ url: string(),
12394
+ filename: string(),
12395
+ sizeBytes: number(),
12396
+ sha256: string().optional()
12397
+ });
12310
12398
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12311
12399
  object({
12312
12400
  kind: literal("catalog"),
@@ -12315,7 +12403,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12315
12403
  object({
12316
12404
  kind: literal("url"),
12317
12405
  url: string(),
12318
- sha256: string().optional()
12406
+ sha256: string().optional(),
12407
+ /** Picker/status label; the file basename when absent. */
12408
+ label: string().optional(),
12409
+ sizeBytes: number().optional(),
12410
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12319
12411
  }),
12320
12412
  object({
12321
12413
  kind: literal("path"),
@@ -12333,13 +12425,82 @@ var ManagedRuntimeConfigSchema = object({
12333
12425
  gpuLayers: number().int().default(0),
12334
12426
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12335
12427
  threads: number().int().optional(),
12336
- /** Concurrent slots. */
12428
+ /** Concurrent slots (`--parallel`). */
12337
12429
  parallel: number().int().default(1),
12430
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12431
+ batchSize: number().int().positive().optional(),
12432
+ /** Physical batch / micro-batch (`-ub`). */
12433
+ ubatchSize: number().int().positive().optional(),
12434
+ /**
12435
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12436
+ * is a no-op elsewhere, so it is offered rather than assumed.
12437
+ */
12438
+ flashAttention: boolean().default(false),
12439
+ /**
12440
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12441
+ * inference. Costs the full model size in resident memory — which is exactly
12442
+ * what the RAM budget is counting.
12443
+ */
12444
+ mlock: boolean().default(false),
12445
+ /**
12446
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12447
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12448
+ * store produces on every first token.
12449
+ */
12450
+ noMmap: boolean().default(false),
12451
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12452
+ * cheapest way to fit a longer context in the same RAM. */
12453
+ cacheTypeK: _enum([
12454
+ "f32",
12455
+ "f16",
12456
+ "q8_0",
12457
+ "q5_1",
12458
+ "q5_0",
12459
+ "q4_1",
12460
+ "q4_0"
12461
+ ]).optional(),
12462
+ cacheTypeV: _enum([
12463
+ "f32",
12464
+ "f16",
12465
+ "q8_0",
12466
+ "q5_1",
12467
+ "q5_0",
12468
+ "q4_1",
12469
+ "q4_0"
12470
+ ]).optional(),
12471
+ /**
12472
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12473
+ * (which most vision chat templates need and some language-only models
12474
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12475
+ *
12476
+ * It is NOT a second place to set the flags above. A token that collides
12477
+ * with a typed field is REJECTED at start, naming the field that owns it
12478
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12479
+ * the "two switches that disagree" failure this repo has already shipped
12480
+ * twice (D62).
12481
+ */
12482
+ extraArgs: array(string()).default([]),
12338
12483
  /** Else lazy: first generate boots it. */
12339
12484
  autoStart: boolean().default(false),
12340
12485
  /** 0 = never; frees RAM after quiet periods. */
12341
12486
  idleStopMinutes: number().int().default(30)
12342
12487
  });
12488
+ /**
12489
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12490
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12491
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12492
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12493
+ */
12494
+ var LlmDownloadProgressSchema = object({
12495
+ phase: _enum(["downloading", "verifying"]),
12496
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12497
+ file: string(),
12498
+ fileIndex: number().int(),
12499
+ fileCount: number().int(),
12500
+ /** Across the WHOLE install, not the current file. */
12501
+ downloadedBytes: number(),
12502
+ totalBytes: number().optional()
12503
+ });
12343
12504
  var LlmRuntimeStatusSchema = object({
12344
12505
  /** Status is ALWAYS node-qualified. */
12345
12506
  nodeId: string(),
@@ -12356,6 +12517,8 @@ var LlmRuntimeStatusSchema = object({
12356
12517
  modelPath: string().optional(),
12357
12518
  modelId: string().optional(),
12358
12519
  downloadProgress: number().min(0).max(1).optional(),
12520
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12521
+ download: LlmDownloadProgressSchema.optional(),
12359
12522
  lastError: string().optional(),
12360
12523
  crashesInWindow: number(),
12361
12524
  /** Child RSS (sampled best-effort). */
@@ -12366,7 +12529,14 @@ var LlmNodeModelSchema = object({
12366
12529
  file: string(),
12367
12530
  sizeBytes: number(),
12368
12531
  catalogId: string().optional(),
12369
- installedAt: number().optional()
12532
+ installedAt: number().optional(),
12533
+ /**
12534
+ * Absolute path on the node. Present so a file that is on disk but matches
12535
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12536
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12537
+ * it the picker could list such a file and do nothing with it.
12538
+ */
12539
+ path: string().optional()
12370
12540
  });
12371
12541
  var LlmRuntimeDiskUsageSchema = object({
12372
12542
  nodeId: string(),
@@ -12422,10 +12592,47 @@ var LlmProfileSchema = object({
12422
12592
  baseUrl: string().optional(),
12423
12593
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12424
12594
  apiKey: string().optional(),
12595
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12596
+ * degraded to text — that shipped once and produced a confident answer to a
12597
+ * question about a picture nobody sent. */
12425
12598
  supportsVision: boolean(),
12426
12599
  temperature: number().min(0).max(2).optional(),
12600
+ /** Nucleus sampling. Every wire we speak has it. */
12601
+ topP: number().min(0).max(1).optional(),
12602
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12603
+ * wire does, and the client drops it there (measured: the request body gets
12604
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12605
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12606
+ topK: number().int().positive().optional(),
12427
12607
  maxTokens: number().int().positive().optional(),
12608
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12609
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12610
+ * the model with, so it is the one field that changes a PROCESS. */
12611
+ contextLength: number().int().positive().optional(),
12612
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12613
+ * two system prompts fighting is worse than either alone). */
12614
+ systemPrompt: string().optional(),
12615
+ /** Total generation bound — the only one a unary call has. */
12428
12616
  timeoutMs: number().int().positive().default(6e4),
12617
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12618
+ * response headers: on the LM Studio / llama-server wire those are written
12619
+ * once the model has finished loading, so they belong to the bound below. */
12620
+ connectTimeoutMs: number().int().positive().default(1e4),
12621
+ /** Accepted, but no output yet — response headers included, because a cold
12622
+ * GPU load is exactly what happens before them. */
12623
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12624
+ /** Output started then stopped. */
12625
+ idleTimeoutMs: number().int().positive().default(6e4),
12626
+ /** Profile-level default. The per-consumer table and a per-call override
12627
+ * both beat it — see `resolveRetryPolicy`. */
12628
+ retry: LlmRetryPolicySchema.default({
12629
+ enabled: false,
12630
+ maxAttempts: 1
12631
+ }),
12632
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12633
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12634
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12635
+ toolsEnabled: boolean().default(false),
12429
12636
  extraHeaders: record(string(), string()).optional(),
12430
12637
  /** kind === 'managed-local' only (spec §4). */
12431
12638
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12475,6 +12682,36 @@ var ManagedModelCatalogEntrySchema = object({
12475
12682
  /** Vision models: companion projector file. */
12476
12683
  mmprojUrl: string().optional()
12477
12684
  });
12685
+ /**
12686
+ * The outcome of turning one operator-typed Hugging Face reference into a
12687
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12688
+ * I will not pick for you" is a normal answer the UI has to render, not an
12689
+ * exception.
12690
+ *
12691
+ * `candidates` is the whole reason the refusal is usable — every string in it
12692
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12693
+ */
12694
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12695
+ ok: literal(true),
12696
+ /** Ready to hand to `installModel` unchanged. */
12697
+ model: ManagedModelRefSchema,
12698
+ label: string(),
12699
+ repo: string(),
12700
+ quantization: string(),
12701
+ purpose: _enum(["text", "vision"]),
12702
+ totalBytes: number(),
12703
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12704
+ * see that 0.9 GB of it is a projector they did not name. */
12705
+ extraFilenames: array(string())
12706
+ }), object({
12707
+ ok: literal(false),
12708
+ code: string(),
12709
+ message: string(),
12710
+ candidates: array(string()).optional(),
12711
+ /** Set when the refusal was only the ceiling: re-calling with
12712
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12713
+ requiredBytes: number().optional()
12714
+ })]);
12478
12715
  var LlmRuntimeNodeSchema = object({
12479
12716
  nodeId: string(),
12480
12717
  reachable: boolean(),
@@ -12487,7 +12724,10 @@ var ProfileRefInputSchema = object({
12487
12724
  addonId: string(),
12488
12725
  profileId: string()
12489
12726
  });
12490
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12727
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12728
+ addonId: string().optional(),
12729
+ requestId: string()
12730
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12491
12731
  kind: "mutation",
12492
12732
  auth: "admin"
12493
12733
  }), method(ProfileRefInputSchema, _void(), {
@@ -12508,6 +12748,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12508
12748
  consumer: string().optional(),
12509
12749
  profileId: string().optional()
12510
12750
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12751
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12752
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12753
+ ref: string(),
12754
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12755
+ maxBytes: number().positive().optional()
12756
+ }), HfModelResolutionSchema, {
12757
+ kind: "mutation",
12758
+ auth: "admin"
12759
+ }), method(object({
12511
12760
  nodeId: string(),
12512
12761
  model: ManagedModelRefSchema
12513
12762
  }), _void(), {
@@ -14117,6 +14366,8 @@ var NcSystemEventKindSchema = _enum([
14117
14366
  "stream-offline",
14118
14367
  "node-online",
14119
14368
  "node-offline",
14369
+ "node-inference-unavailable",
14370
+ "detection-blind",
14120
14371
  "addon-update-available",
14121
14372
  "server-update-available",
14122
14373
  "alarm-triggered",
@@ -14178,7 +14429,16 @@ var NcScheduleSchema = object({
14178
14429
  });
14179
14430
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14180
14431
  var NcPlateMatcherSchema = object({
14181
- values: array(string().min(1)).min(1),
14432
+ /**
14433
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14434
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14435
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14436
+ * rather than merely seen. A subject carrying no plate still fails.
14437
+ *
14438
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14439
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14440
+ */
14441
+ values: array(string().min(1)),
14182
14442
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14183
14443
  maxDistance: number().int().min(0).max(3).default(1)
14184
14444
  });
@@ -14212,28 +14472,36 @@ var NcOccupancyConditionSchema = object({
14212
14472
  /**
14213
14473
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14214
14474
  *
14215
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14216
- * reference notifier uses, so an operator moving between them re-uses what
14217
- * they already know): a rule matches when, over a sampling window of
14218
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14219
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14220
- *
14221
- * - `dbThreshold` its level is at or above this many dBFS (see
14222
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14223
- * - `labels` the classifier put at least one of these labels on it.
14224
- *
14225
- * Both are OPTIONAL and independent, which is the point of the shape: a
14226
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14227
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14228
- * is given** a window in which every sample is trivially a hit would fire on
14229
- * silence, so the engine refuses such a condition rather than notifying on
14230
- * nothing (the schema cannot express "at least one of" without becoming a
14231
- * ZodEffects the cap path would have to special-case).
14232
- *
14233
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14234
- * must be FULL before it can match a window that has been open for two
14235
- * seconds of its ten is 100% of nothing, and firing on it would make
14236
- * `samplingSeconds` decorative.
14475
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14476
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14477
+ * there is no second switch that can disagree with the first and every rule
14478
+ * authored before the decision migrates for free (`audioModeOf`):
14479
+ *
14480
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14481
+ * classifier labels with one of them. No window, no percentage:
14482
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14483
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14484
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14485
+ * reaches this condition if the classifier was already confident enough.
14486
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14487
+ * the condition: at least `hitPercent`% of the samples over
14488
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14489
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14490
+ * must be FULL before it can match a window open for two of its ten
14491
+ * seconds is 100% of nothing.
14492
+ *
14493
+ * **Why label mode has no window.** It had one, and it never fired: the
14494
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14495
+ * of them per episode, even through continuous crying. The measured maximum
14496
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14497
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14498
+ * the wrong question to ask of a sparse classifier.
14499
+ *
14500
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14501
+ * and the rule would fire on silence. The schema cannot express "exactly one
14502
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14503
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14504
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14237
14505
  *
14238
14506
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14239
14507
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14241,13 +14509,13 @@ var NcOccupancyConditionSchema = object({
14241
14509
  * an operator who typed `dog` mean the same thing.
14242
14510
  */
14243
14511
  var NcAudioConditionSchema = object({
14244
- /** Audio macro labels; absent = any sound (level-only rule). */
14512
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14245
14513
  labels: array(string().min(1)).min(1).optional(),
14246
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14514
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14247
14515
  dbThreshold: number().min(-96).max(0).optional(),
14248
- /** Percentage of the window's samples that must be hits (1–100). */
14516
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14249
14517
  hitPercent: number().int().min(1).max(100).default(60),
14250
- /** Length of the sampling window in seconds. */
14518
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14251
14519
  samplingSeconds: number().int().min(1).max(300).default(10)
14252
14520
  });
14253
14521
  /**
@@ -14385,13 +14653,81 @@ var NcRuleActionsSchema = object({
14385
14653
  */
14386
14654
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14387
14655
  });
14656
+ /**
14657
+ * "This rule applies only while `deviceId` is in one of `states`."
14658
+ *
14659
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14660
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14661
+ * make the condition lie about devices whose states have no equivalent.
14662
+ *
14663
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14664
+ * condition that fired on "I could not read it" would be worse than no gate.
14665
+ */
14666
+ var NcDeviceStateConditionSchema = object({
14667
+ deviceId: number().int(),
14668
+ /** Any of these matches. */
14669
+ states: array(string().min(1)).min(1)
14670
+ });
14671
+ /**
14672
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14673
+ *
14674
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14675
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14676
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14677
+ * already has a trigger ("tell me about a person at the front door, but only
14678
+ * while the bin is still out"). That is why it composes with every delivery
14679
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14680
+ * kind exist for it — see D159.
14681
+ *
14682
+ * ── Identity ───────────────────────────────────────────────────────────────
14683
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14684
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14685
+ * carried as a HINT for the editor and for the log line, never as part of the
14686
+ * lookup key: a rule whose hint drifted must still gate correctly.
14687
+ *
14688
+ * ── Which boolean ──────────────────────────────────────────────────────────
14689
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14690
+ * already declares which boolean drives notification rules, and a second knob
14691
+ * that could disagree with it is exactly the D62 failure. Set it only to
14692
+ * override one rule against the scene's own default.
14693
+ *
14694
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14695
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14696
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14697
+ * evidence, in either direction.
14698
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14699
+ * The latch is a durable fact about the past ("it has diverged since I armed
14700
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14701
+ * reason the operator asked for a latch.
14702
+ *
14703
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14704
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14705
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14706
+ * said out loud in the log rather than dropped in silence.
14707
+ */
14708
+ var NcSceneConditionSchema = object({
14709
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14710
+ sceneId: string().min(1),
14711
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14712
+ deviceId: number().int().optional(),
14713
+ /** The state the scene must be in for the rule to fire. */
14714
+ requiredState: _enum(["matched", "diverged"]),
14715
+ /**
14716
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14717
+ * scene's own `emit` field, which is the only place that decision belongs.
14718
+ */
14719
+ latched: boolean().optional()
14720
+ });
14388
14721
  var NcConditionsSchema = object({
14389
14722
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14390
- deviceState: object({
14391
- deviceId: number().int(),
14392
- /** Any of these matches. */
14393
- states: array(string().min(1)).min(1)
14394
- }).optional(),
14723
+ deviceState: NcDeviceStateConditionSchema.optional(),
14724
+ /**
14725
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14726
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14727
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14728
+ * {@link NcSceneCondition} and D159.
14729
+ */
14730
+ scene: NcSceneConditionSchema.optional(),
14395
14731
  /** Device scope — absent = all devices. */
14396
14732
  devices: array(number()).optional(),
14397
14733
  /** Detector class names (any overlap with the record's class set). */
@@ -14417,18 +14753,47 @@ var NcConditionsSchema = object({
14417
14753
  */
14418
14754
  labelEquals: array(string().min(1)).optional(),
14419
14755
  /**
14420
- * Identity matcher. P1 boundary: matched against the record's collapsed
14421
- * `label` (the identity display name propagated by the face pipeline) —
14422
- * identity-ID matching rides in P2 when identity ids reach the record.
14756
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14757
+ * is about recognised people at all.
14758
+ *
14759
+ * Three states, and the empty one is the point:
14760
+ *
14761
+ * | value | meaning |
14762
+ * | --- | --- |
14763
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14764
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14765
+ * | a list | only these identities |
14766
+ *
14767
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14768
+ * `devices` list is every device), applied one level down: the operator has
14769
+ * turned the face scope ON and narrowed it to nothing, which is every known
14770
+ * face. No second field states the same thing — a switch that can disagree
14771
+ * with the list under it is worse than no switch (D62).
14772
+ *
14773
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14774
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14775
+ * the operator fixed the spelling. The id reaches the record on
14776
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14777
+ * `{{label}}` renders.
14778
+ *
14779
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
14780
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
14781
+ * for is left as it stands and reported, never dropped. The engine also
14782
+ * accepts a display-name hit as a compatibility leg, so a rule whose
14783
+ * migration could not resolve keeps matching exactly what it matched before.
14423
14784
  */
14424
14785
  identities: array(string().min(1)).optional(),
14425
- /** Fuzzy plate matcher against the record's `label` (plate text). */
14786
+ /**
14787
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
14788
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
14789
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
14790
+ */
14426
14791
  plates: NcPlateMatcherSchema.optional(),
14427
14792
  /**
14428
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14429
- * Same P1 boundary: matched against the record's collapsed `label` (the
14430
- * identity display name). A record with NO label passes (nothing to
14431
- * exclude), unlike the include variant which fails on an absent label.
14793
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
14794
+ * the same id members and the same lazy name→id migration. A record with NO
14795
+ * identity passes (nothing to exclude), unlike the include variant which
14796
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14432
14797
  */
14433
14798
  identitiesExclude: array(string().min(1)).optional(),
14434
14799
  /**
@@ -14820,7 +15185,80 @@ var NcRuleInputSchema = object({
14820
15185
  * a rule that predates the gate must keep delivering byte-for-byte as it
14821
15186
  * did, and absent is the only way to say that without a migration.
14822
15187
  */
14823
- confirm: NcConfirmSchema.optional()
15188
+ confirm: NcConfirmSchema.optional(),
15189
+ /**
15190
+ * WAIT for face/plate recognition before saying anything.
15191
+ *
15192
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15193
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15194
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15195
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15196
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15197
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15198
+ *
15199
+ * Only two honest answers exist, and this flag picks between them. It has
15200
+ * effect ONLY on a rule that declares a recognition scope
15201
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15202
+ * other rule there is nothing to wait for and the flag is inert.
15203
+ *
15204
+ * | value | what happens |
15205
+ * | --- | --- |
15206
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15207
+ * | 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) |
15208
+ *
15209
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15210
+ * on the addon cap path, and absent has to keep meaning exactly what every
15211
+ * rule authored before this field meant.
15212
+ *
15213
+ * The cost of `true` is stated here because the editor states it too: a rule
15214
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15215
+ * tests every zone the track visited and a `crossing` condition can no longer
15216
+ * be satisfied, because a closed track carries no crossing.
15217
+ */
15218
+ waitForEnhancement: boolean().optional(),
15219
+ /**
15220
+ * GROUP a burst of subjects into ONE notification that grows.
15221
+ *
15222
+ * Seconds of quiet after the last matching subject before the burst is
15223
+ * considered over. While it is open, the first subject enqueues immediately —
15224
+ * **exactly as today, with no added latency** — and every real growth (a new
15225
+ * subject, or a name confirmed on one already in it) REPLACES that
15226
+ * notification with an updated one naming everybody. The push carries the
15227
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15228
+ *
15229
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15230
+ *
15231
+ * ### Why an idle cutoff and not a window
15232
+ *
15233
+ * The measured seven-person arrival on device 590 spans 110 s with every
15234
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15235
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15236
+ * 30 is Frigate's shipped value for the same decision.
15237
+ *
15238
+ * ### What it replaces
15239
+ *
15240
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15241
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15242
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15243
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15244
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15245
+ * budget over GROUPS — which is what it always meant — and a growth is never
15246
+ * throttled by the window its own first member spent.
15247
+ *
15248
+ * ### Interaction with {@link waitForEnhancement}
15249
+ *
15250
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15251
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15252
+ * CLOSE — already carrying its name — and grows as later members close. That
15253
+ * is later, and complete. With grouping alone the group opens on the first
15254
+ * object event and picks up names as they are confirmed, through the growth
15255
+ * path. Neither combination fires twice for one subject.
15256
+ *
15257
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15258
+ * on the addon cap path, so absent must keep meaning what it meant before this
15259
+ * field existed.
15260
+ */
15261
+ groupIdleSec: number().int().min(0).max(600).optional()
14824
15262
  });
14825
15263
  /**
14826
15264
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -14927,6 +15365,7 @@ var NcConditionDescriptorSchema = object({
14927
15365
  "occupancy",
14928
15366
  "audio",
14929
15367
  "deviceState",
15368
+ "scene",
14930
15369
  "systemEvent"
14931
15370
  ]),
14932
15371
  operator: _enum([
@@ -15332,7 +15771,87 @@ var MethodAccessSchema = _enum([
15332
15771
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15333
15772
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15334
15773
  var CapScopeSchema = _enum(["device", "system"]);
15335
- var TokenScopeSchema = discriminatedUnion("type", [
15774
+ /**
15775
+ * DeviceSelector (scope model v3 — 2026-08-12).
15776
+ *
15777
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15778
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15779
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
15780
+ * AFTER the grant was minted — no re-grant, no re-login.
15781
+ *
15782
+ * - `all` — every device in the deployment. The broad viewer/operator
15783
+ * lever without a `category` grant (a `category` grant also covers device
15784
+ * caps that carry no deviceId; `all` is specifically the device set).
15785
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
15786
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
15787
+ * is NOT covered until the grant is edited.
15788
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
15789
+ * DYNAMIC. A device that changes type, or a new device of the type,
15790
+ * re-resolves on the next request.
15791
+ * - `locations` — every device whose operator-assigned `location` label is
15792
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
15793
+ * null/unset location matches NO `locations` selector.
15794
+ */
15795
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
15796
+ object({ kind: literal("all") }),
15797
+ object({
15798
+ kind: literal("ids"),
15799
+ ids: array(number().int()).min(1)
15800
+ }),
15801
+ object({
15802
+ kind: literal("types"),
15803
+ types: array(_enum(DeviceType)).min(1)
15804
+ }),
15805
+ object({
15806
+ kind: literal("locations"),
15807
+ locations: array(string().min(1)).min(1)
15808
+ })
15809
+ ]);
15810
+ var DeviceTokenScopeSchema = object({
15811
+ type: literal("device"),
15812
+ /** The device SET this grant covers — resolved against the live fleet. */
15813
+ selector: DeviceSelectorSchema,
15814
+ access: array(MethodAccessSchema).min(1),
15815
+ /**
15816
+ * Whether a grant on a PARENT device transparently covers its accessory
15817
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
15818
+ * Direction is parent → children ONLY.
15819
+ *
15820
+ * Absent → the matcher DERIVES it from the access flavour: `view`
15821
+ * inherits (a camera viewer sees the camera's accessories), `create` /
15822
+ * `delete` do NOT (actuating/removing a child is an explicit act the
15823
+ * operator must grant on the child, not inherit from the parent). Set it
15824
+ * explicitly to override that default per grant.
15825
+ */
15826
+ includeLinked: boolean().optional()
15827
+ });
15828
+ /**
15829
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
15830
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
15831
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
15832
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
15833
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
15834
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
15835
+ * migration cannot reach a JWT already in a client's hands; parse-time
15836
+ * migration covers both without a flag day. No cast — the raw object is read
15837
+ * through `Reflect.get` (its static type is `unknown`).
15838
+ */
15839
+ function migrateLegacyTokenScope(raw) {
15840
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
15841
+ if (Reflect.get(raw, "type") !== "device") return raw;
15842
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
15843
+ const targets = Reflect.get(raw, "targets");
15844
+ if (!Array.isArray(targets)) return raw;
15845
+ return {
15846
+ type: "device",
15847
+ selector: {
15848
+ kind: "ids",
15849
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
15850
+ },
15851
+ access: Reflect.get(raw, "access")
15852
+ };
15853
+ }
15854
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15336
15855
  object({
15337
15856
  type: literal("category"),
15338
15857
  target: CapScopeSchema,
@@ -15348,18 +15867,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15348
15867
  target: string(),
15349
15868
  access: array(MethodAccessSchema).min(1)
15350
15869
  }),
15351
- object({
15352
- type: literal("device"),
15353
- /**
15354
- * One or more deviceIds (serialised as strings for wire-format
15355
- * consistency with the rest of the union). Matcher accepts if
15356
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15357
- * of one scope-per-device when granting access to a set of cameras.
15358
- */
15359
- targets: array(string()).min(1),
15360
- access: array(MethodAccessSchema).min(1)
15361
- })
15362
- ]);
15870
+ DeviceTokenScopeSchema
15871
+ ]));
15363
15872
  object({
15364
15873
  id: string(),
15365
15874
  username: string(),
@@ -15676,7 +16185,7 @@ var TrackEnvelopeSchema = object({
15676
16185
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15677
16186
  * keeps every scalar the list surfaces actually render (ids, class(es),
15678
16187
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15679
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16188
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15680
16189
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15681
16190
  * `getTrack`. Mirrors the event-store `projection` convention
15682
16191
  * (`getObjectEvents` et al.).
@@ -15812,7 +16321,21 @@ union([literal(1), literal(2)]);
15812
16321
  var LabelAttributionSchema = object({
15813
16322
  stepId: string(),
15814
16323
  modelId: string().optional(),
15815
- decidedAt: number()
16324
+ decidedAt: number(),
16325
+ /**
16326
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16327
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16328
+ *
16329
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16330
+ * notification rule authored on "Gianluca" stopped matching the moment the
16331
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16332
+ * the thing that does not move, so it is what a rule matches on
16333
+ * (`NcConditions.identities`) and the text is what a human is shown.
16334
+ *
16335
+ * Absent when the label names no gallery row — a plate the OCR read but no
16336
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16337
+ */
16338
+ identityId: string().optional()
15816
16339
  });
15817
16340
  /**
15818
16341
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -15949,6 +16472,28 @@ var TrackSchema = object({
15949
16472
  * `=== true` and render nothing otherwise, never infer "no face".
15950
16473
  */
15951
16474
  hasFace: boolean().optional(),
16475
+ /**
16476
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16477
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16478
+ * so the passage is tracked once and as a VEHICLE.
16479
+ *
16480
+ * It exists because the fold's record was dishonest. D34 and the code both
16481
+ * said "the person is not lost — it is reported so both entities stay on the
16482
+ * record"; in fact the pair went into a per-processor RAM field behind an
16483
+ * accessor nobody called, and every durable surface said `vehicle`, full
16484
+ * stop. This is the composition note that makes the row true.
16485
+ *
16486
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16487
+ * person" is not an answer to "what is this" — both label tiers would refuse
16488
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16489
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16490
+ * and a `person` rule still does not fire for someone cycling past.
16491
+ *
16492
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16493
+ * the column, and every hub that predates the field, omits it. Test
16494
+ * `=== true` and render nothing otherwise — never infer "no rider".
16495
+ */
16496
+ hasRider: boolean().optional(),
15952
16497
  ...TrackFlagFields,
15953
16498
  ...TrackRetrainFields
15954
16499
  });
@@ -16298,7 +16843,10 @@ var RecentTracksQueryInput = object({
16298
16843
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16299
16844
  cursor: string().optional(),
16300
16845
  /** See {@link TrackProjectionSchema}. Default `full`. */
16301
- projection: TrackProjectionSchema.optional()
16846
+ projection: TrackProjectionSchema.optional(),
16847
+ /** Include stationary-promoted rows (parked objects). Default false: the
16848
+ * feed lists passages; parking records live on the stationary registry. */
16849
+ includeStationary: boolean().optional()
16302
16850
  });
16303
16851
  var RecentTracksPageSchema = object({
16304
16852
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16516,7 +17064,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16516
17064
  zone: TrackZoneFilterSchema.optional(),
16517
17065
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16518
17066
  * compatible — omitting the field keeps today's exact behaviour). */
16519
- projection: TrackProjectionSchema.optional()
17067
+ projection: TrackProjectionSchema.optional(),
17068
+ /** Include stationary-promoted rows (parked objects handed to the
17069
+ * stationary registry). Default false: the timeline lists passages,
17070
+ * not parking records (operator decision, 2026-08-15). */
17071
+ includeStationary: boolean().optional()
16520
17072
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16521
17073
  kind: "mutation",
16522
17074
  auth: "admin"
@@ -16680,11 +17232,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16680
17232
  auth: "admin"
16681
17233
  }), method(object({
16682
17234
  eventId: string(),
16683
- kind: MediaFileKindEnum.optional()
17235
+ kind: MediaFileKindEnum.optional(),
17236
+ deviceId: number()
16684
17237
  }), array(MediaFileSchema).readonly()), method(object({
16685
17238
  trackId: string(),
16686
- kinds: array(MediaFileKindEnum).optional()
16687
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17239
+ kinds: array(MediaFileKindEnum).optional(),
17240
+ deviceId: number()
17241
+ }), array(MediaFileSchema).readonly()), method(object({
17242
+ trackId: string(),
17243
+ deviceId: number()
17244
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16688
17245
  kind: "mutation",
16689
17246
  auth: "admin"
16690
17247
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17344,6 +17901,17 @@ var maxSessionHoldMsField = {
17344
17901
  default: 12e4,
17345
17902
  step: 5e3
17346
17903
  };
17904
+ /**
17905
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
17906
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
17907
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
17908
+ */
17909
+ var audioMotionWindowMsField = {
17910
+ min: 5e3,
17911
+ max: 6e5,
17912
+ default: 9e4,
17913
+ step: 5e3
17914
+ };
17347
17915
  var motionFpsField = {
17348
17916
  min: 1,
17349
17917
  max: 30,
@@ -17375,7 +17943,7 @@ var detectionFpsField = {
17375
17943
  var occupancyRecheckSecField = {
17376
17944
  min: 0,
17377
17945
  max: 300,
17378
- default: 30,
17946
+ default: 300,
17379
17947
  step: 5
17380
17948
  };
17381
17949
  var occupancyRecheckFramesField = {
@@ -17520,6 +18088,27 @@ var RunnerCameraConfigSchema = object({
17520
18088
  * resolved `CameraDetectionConfig`.
17521
18089
  */
17522
18090
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18091
+ /**
18092
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18093
+ * 'on-motion'` audio window, measured from the LAST motion event.
18094
+ *
18095
+ * This exists because the falling edge cannot be relied on. Camera-native
18096
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18097
+ * its email-push SMTP path both emit `detected: true` and never the
18098
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18099
+ * onboard-only camera a window that closed only on `detected: false` never
18100
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18101
+ * battery camera, the one failure mode the mode exists to prevent.
18102
+ *
18103
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18104
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18105
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18106
+ *
18107
+ * Not consumed by the runner: carried here so it shares the per-camera
18108
+ * device-settings surface with `motionCooldownMs`, exactly like
18109
+ * `maxSessionHoldMs`.
18110
+ */
18111
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17523
18112
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17524
18113
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17525
18114
  motionStreamId: string(),
@@ -17615,7 +18204,7 @@ var RunnerCameraConfigSchema = object({
17615
18204
  */
17616
18205
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17617
18206
  });
17618
- 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;
18207
+ 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;
17619
18208
  /**
17620
18209
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17621
18210
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18601,7 +19190,31 @@ DeviceType.Camera, method(object({
18601
19190
  lastCapturedAt: number().nullable(),
18602
19191
  cacheAgeMs: number().nullable(),
18603
19192
  etag: string().nullable()
18604
- }))), systemMethod(object({
19193
+ }))), systemMethod(object({ deviceId: number() }), object({
19194
+ /** The battery slice as read, or null when the device has none. */
19195
+ battery: object({
19196
+ sleeping: boolean(),
19197
+ lastUpdated: number(),
19198
+ lastContactAt: number().optional()
19199
+ }).nullable(),
19200
+ /** The resolved snapshot state (what the overlay decision used). */
19201
+ state: object({
19202
+ isBattery: boolean(),
19203
+ reason: _enum([
19204
+ "disabled",
19205
+ "sleeping",
19206
+ "unreachable",
19207
+ "waking"
19208
+ ]).nullable()
19209
+ }),
19210
+ /** The cached frame behind the next paint. */
19211
+ frame: object({
19212
+ capturedAt: number().nullable(),
19213
+ ageMs: number().nullable()
19214
+ }),
19215
+ /** A wake window is currently open (the Waking overlay's source). */
19216
+ waking: boolean()
19217
+ })), systemMethod(object({
18605
19218
  /** The tiles a surface is actually rendering. One entry per (device,
18606
19219
  * width) the caller will paint — the width is snapped to the server's
18607
19220
  * ladder and becomes part of the link's SIGNED identity. */
@@ -18631,7 +19244,16 @@ targets: array(object({
18631
19244
  /** A sleeping battery camera: the frame is deliberately stale and will
18632
19245
  * NOT refresh in the background. A surface should say so rather than
18633
19246
  * present it as current. */
18634
- sleeping: boolean()
19247
+ sleeping: boolean(),
19248
+ /** Current device state rendered over the cached frame. State images
19249
+ * remain authoritative even when their photographic background is
19250
+ * old; null means the link must carry a current camera frame. */
19251
+ stateReason: _enum([
19252
+ "disabled",
19253
+ "sleeping",
19254
+ "unreachable",
19255
+ "waking"
19256
+ ]).nullable()
18635
19257
  })));
18636
19258
  /**
18637
19259
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20153,6 +20775,25 @@ var BatteryStatusSchema = object({
20153
20775
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20154
20776
  lastUpdated: number(),
20155
20777
  /**
20778
+ * Ms epoch of the last time the device PROVED it was reachable — a
20779
+ * completed firmware round-trip, an observed wake, or an inbound push
20780
+ * (firmware event, email). `0`/absent = never since this slice was born.
20781
+ *
20782
+ * This is the ONLY input that separates "asleep" from "gone", and it is
20783
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
20784
+ * for the radio, because a poll that confirms reachability is the same
20785
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
20786
+ * single derivation every consumer must use; no surface computes its own.
20787
+ *
20788
+ * It is deliberately NOT a clock in the
20789
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
20790
+ * observation itself, and it is the only thing a 30-hour silence is
20791
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
20792
+ * Reolink provider) so a value that means "recently" cannot cost a
20793
+ * SQLite commit per round-trip.
20794
+ */
20795
+ lastContactAt: number().optional(),
20796
+ /**
20156
20797
  * True when the source is a BINARY low-battery indicator (HA
20157
20798
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20158
20799
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -23690,7 +24331,7 @@ method(object({
23690
24331
  toMs: number()
23691
24332
  }), RecordingAvailabilitySchema, {
23692
24333
  kind: "query",
23693
- auth: "admin"
24334
+ auth: "protected"
23694
24335
  }), method(object({
23695
24336
  deviceId: number(),
23696
24337
  fromMs: number(),
@@ -23698,14 +24339,14 @@ method(object({
23698
24339
  tzOffsetMinutes: number()
23699
24340
  }), RecordingDaysSchema, {
23700
24341
  kind: "query",
23701
- auth: "admin"
24342
+ auth: "protected"
23702
24343
  }), method(object({
23703
24344
  deviceId: number(),
23704
24345
  fromMs: number(),
23705
24346
  toMs: number()
23706
24347
  }), RecordingManifestSchema, {
23707
24348
  kind: "query",
23708
- auth: "admin"
24349
+ auth: "protected"
23709
24350
  }), method(object({}), RecordingStorageUsageSchema, {
23710
24351
  kind: "query",
23711
24352
  auth: "admin"
@@ -23995,14 +24636,77 @@ method(object({
23995
24636
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
23996
24637
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
23997
24638
  *
23998
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
23999
- * derives the device-detail contribution; the provider carries NO hand-written
24000
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
24001
- * every hysteresis flip / availability change; consumers never poll.
24002
- */
24003
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
24004
- * be added without a wire break (matching falls back to any-condition refs). */
24639
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
24640
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
24641
+ * for the thing: a scene is a standing question about the property ("is the bin
24642
+ * still out"), and the operator's question is "which of my scenes have tripped",
24643
+ * across every camera at once — not "what does camera 617 think". Buried one
24644
+ * camera deep it also could not be found. The surface is now a top-level admin
24645
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
24646
+ * picks the camera inside the create flow, the same shape Events and Faces have.
24647
+ *
24648
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
24649
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
24650
+ * directions, so a registration nobody declares fails exactly as loudly as a
24651
+ * declaration nobody registers. The editor is imported directly by the page.
24652
+ *
24653
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
24654
+ * availability change; consumers never poll.
24655
+ */
24656
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
24657
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
24658
+ * Open by design so more can be added without a wire break.
24659
+ *
24660
+ * Matching does NOT fall back across conditions: cross-condition cosines are
24661
+ * not comparable, so "I have never seen this scene in this light" is reported
24662
+ * as `unknown`, never guessed. A day reference scored against an IR frame
24663
+ * collapses the cosine and would latch a false alarm every single night. */
24005
24664
  var SceneConditionSchema = string();
24665
+ /**
24666
+ * What a scene does when the CURRENT light has no reference of its own.
24667
+ *
24668
+ * The lighting variants are not equally likely to exist. Almost every operator
24669
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
24670
+ * scene that is only ever going to be asked about a daytime question ("is the
24671
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
24672
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
24673
+ * working without it rather than degrading into a permanent complaint.
24674
+ *
24675
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
24676
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
24677
+ * last covered light left it at, the latch is untouched, and the hysteresis
24678
+ * run is neither spent nor cleared. The scene resumes by itself at first
24679
+ * light. This is the only behaviour under which "I never captured IR" is a
24680
+ * configuration choice instead of a nightly fault.
24681
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
24682
+ * for cameras whose IR frame is close enough to daylight (a floodlit
24683
+ * driveway, an always-white-light doorbell), and wrong for everything else:
24684
+ * cross-condition cosines are not comparable, so a day reference against a
24685
+ * true IR frame collapses and the scene reports a theft at 21:40.
24686
+ *
24687
+ * Never applies when the scene has NO comparable reference at all — that is
24688
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
24689
+ * there would hide a scene the operator never finished setting up.
24690
+ */
24691
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
24692
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
24693
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
24694
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
24695
+ * and never counts toward hysteresis in either direction. */
24696
+ var SceneVerdictSchema = _enum([
24697
+ "matched",
24698
+ "diverged",
24699
+ "unknown"
24700
+ ]);
24701
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
24702
+ * silence that reads as "nothing has happened". */
24703
+ var SceneUnavailableSchema = _enum([
24704
+ "no-reference-for-condition",
24705
+ "view-shifted",
24706
+ "no-vision-profile",
24707
+ "encoder-model-changed",
24708
+ "no-snapshot"
24709
+ ]);
24006
24710
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
24007
24711
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
24008
24712
  var SceneReferenceSchema = object({
@@ -24010,7 +24714,14 @@ var SceneReferenceSchema = object({
24010
24714
  modelId: string(),
24011
24715
  condition: SceneConditionSchema,
24012
24716
  capturedAt: number(),
24013
- thumbnailMediaId: string().optional()
24717
+ thumbnailMediaId: string().optional(),
24718
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
24719
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
24720
+ * normalized rect frame a different piece of world, and the scene would
24721
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
24722
+ * when hysteresis is about to flip — one extra encode per candidate
24723
+ * transition, not per poll. */
24724
+ anchorEmbedding: array(number()).optional()
24014
24725
  });
24015
24726
  var SceneMonitorStateSchema = object({
24016
24727
  id: string(),
@@ -24032,6 +24743,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
24032
24743
  profileId: string().optional(),
24033
24744
  hysteresisCount: number().int().positive()
24034
24745
  })]);
24746
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
24747
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
24748
+ * out in silence rather than reporting a fault every night. */
24749
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
24750
+ /**
24751
+ * Vision-model adjudication of a candidate flip. Field names deliberately
24752
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
24753
+ *
24754
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
24755
+ * fail-open: a notification suppressed is the worse error there, but a vision
24756
+ * model that timed out has not told us the bin is gone, and a latch is a
24757
+ * stateful claim that costs the operator a trip to reset.
24758
+ */
24759
+ var SceneConfirmSchema = object({
24760
+ enabled: boolean().default(false),
24761
+ prompt: string().min(1).max(1e3),
24762
+ profileId: string().optional(),
24763
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
24764
+ maxImagePx: number().int().min(64).max(2048).default(448),
24765
+ /** What a timeout / unavailable model means for the PENDING flip. */
24766
+ onTimeout: _enum(["flip", "hold"]).default("hold")
24767
+ });
24035
24768
  var SceneMonitorSchema = object({
24036
24769
  id: string(),
24037
24770
  label: string(),
@@ -24050,7 +24783,56 @@ var SceneMonitorSchema = object({
24050
24783
  lastConfidence: number().nullable(),
24051
24784
  currentCondition: SceneConditionSchema.nullable(),
24052
24785
  availability: _enum(["ok", "unavailable"]),
24053
- unavailableReason: string().nullable()
24786
+ unavailableReason: string().nullable(),
24787
+ /** Which state is "the initial screen". `null` until the first capture. */
24788
+ baselineStateId: string().nullable(),
24789
+ /** Which boolean drives notification rules and any export. */
24790
+ emit: _enum(["latched", "live"]).default("latched"),
24791
+ /** Live: does the region match the baseline RIGHT NOW. */
24792
+ verdict: SceneVerdictSchema,
24793
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
24794
+ latched: boolean(),
24795
+ /** Last reset (or creation). */
24796
+ armedAt: number(),
24797
+ divergedAt: number().nullable(),
24798
+ restoredAt: number().nullable(),
24799
+ /** A check is only COUNTED when the device has been quiet this long. Motion
24800
+ * during the window DISCARDS the observation — a car pulling up in front of
24801
+ * the bin must not be able to spend hysteresis credit. */
24802
+ quietSeconds: number().int().min(0).max(3600).default(60),
24803
+ /** An observation only advances the pending count when it is at least this
24804
+ * far from the previously counted one, so N agreeing checks span real time
24805
+ * rather than N adjacent polls inside one occlusion. */
24806
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
24807
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
24808
+ confirm: SceneConfirmSchema.optional(),
24809
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
24810
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
24811
+ /** Clear the latch on its own when the scene matches again? Default false —
24812
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
24813
+ * automation can react to the bin coming back without the operator's own
24814
+ * alarm silently clearing itself. */
24815
+ autoRestore: boolean().default(false),
24816
+ /** What to do when the current light has no reference of its own. See
24817
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
24818
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
24819
+ /**
24820
+ * The light whose checks are currently being SAT OUT under
24821
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
24822
+ *
24823
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
24824
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
24825
+ * nothing captured in this light"* in the same calm voice as the coverage
24826
+ * line, because the alternative is a scene that silently stops answering
24827
+ * after sunset with nothing anywhere saying why. A skipped check must never
24828
+ * read as a broken one.
24829
+ */
24830
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
24831
+ /** Named cause when `verdict === 'unknown'`. */
24832
+ unavailable: SceneUnavailableSchema.nullable(),
24833
+ /** Conditions that have at least one comparable reference — the coverage line
24834
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
24835
+ coveredConditions: array(SceneConditionSchema)
24054
24836
  });
24055
24837
  var SceneMonitorStatusSchema = object({
24056
24838
  monitors: array(SceneMonitorSchema),
@@ -24083,7 +24865,15 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24083
24865
  "both"
24084
24866
  ]).optional(),
24085
24867
  checkIntervalSec: number().optional(),
24086
- check: SceneCheckSchema.optional()
24868
+ check: SceneCheckSchema.optional(),
24869
+ emit: _enum(["latched", "live"]).optional(),
24870
+ quietSeconds: number().int().min(0).max(3600).optional(),
24871
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
24872
+ anchorThreshold: number().min(0).max(1).optional(),
24873
+ autoRestore: boolean().optional(),
24874
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
24875
+ /** `null` clears the vision-model adjudicator. */
24876
+ confirm: SceneConfirmSchema.nullable().optional()
24087
24877
  })
24088
24878
  }), _void(), {
24089
24879
  kind: "mutation",
@@ -24120,6 +24910,14 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
24120
24910
  }), _void(), {
24121
24911
  kind: "mutation",
24122
24912
  auth: "admin"
24913
+ }), method(object({
24914
+ deviceId: number(),
24915
+ monitorId: string(),
24916
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
24917
+ recapture: boolean().optional()
24918
+ }), _void(), {
24919
+ kind: "mutation",
24920
+ auth: "admin"
24123
24921
  });
24124
24922
  /**
24125
24923
  * Per-stage gating mode applied to the zones a rule references.
@@ -24273,6 +25071,16 @@ var CamStreamDescriptorSchema = object({
24273
25071
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
24274
25072
  metadata: record(string(), unknown()).optional()
24275
25073
  });
25074
+ object({
25075
+ /** The descriptors as last built from a real camera response. Never a guess:
25076
+ * a failed or refused build writes NOTHING, so a restored catalog is always
25077
+ * one the camera itself once produced. */
25078
+ descriptors: array(CamStreamDescriptorSchema),
25079
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
25080
+ * path decide whether the camera's own awake window is worth spending on a
25081
+ * re-read. */
25082
+ lastFetchedAt: number()
25083
+ });
24276
25084
  DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
24277
25085
  /** One of the camera's stream profiles. */
24278
25086
  var StreamProfileSchema = _enum([
@@ -24428,12 +25236,64 @@ var NetworkAddressSchema = object({
24428
25236
  family: string(),
24429
25237
  internal: boolean()
24430
25238
  });
25239
+ /**
25240
+ * Provenance of the site coordinates, and the whole reason this is not just two
25241
+ * numbers.
25242
+ *
25243
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
25244
+ * nothing overwrites it.
25245
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
25246
+ * default that is right to a few kilometres beats the coarse UTC clock split
25247
+ * the sun-times consumers otherwise fall back to.
25248
+ *
25249
+ * The UI shows which one it is. An operator who cannot tell a guess from their
25250
+ * own input will eventually trust the guess.
25251
+ */
25252
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
25253
+ /**
25254
+ * The read shape: the location plus the honest state of the one-shot derivation.
25255
+ *
25256
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
25257
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
25258
+ * failed; the hub will NOT try again on its own — the fallback is declared
25259
+ * (consumers degrade to their own last resort) and the operator either types the
25260
+ * coordinates or presses detect.
25261
+ */
25262
+ var SiteLocationStatusSchema = object({
25263
+ location: object({
25264
+ /** WGS84 decimal degrees. */
25265
+ latitude: number().min(-90).max(90),
25266
+ longitude: number().min(-180).max(180),
25267
+ source: SiteLocationSourceSchema,
25268
+ /** Epoch ms the value was last written. */
25269
+ updatedAt: number(),
25270
+ /**
25271
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
25272
+ * only — never parsed, never matched on. Absent for an operator-typed value.
25273
+ */
25274
+ label: string().optional()
25275
+ }).nullable(),
25276
+ derivationAttemptedAt: number().nullable(),
25277
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
25278
+ derivationError: string().nullable()
25279
+ });
25280
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
25281
+ var SetSiteLocationInputSchema = object({
25282
+ latitude: number().min(-90).max(90),
25283
+ longitude: number().min(-180).max(180)
25284
+ }).nullable();
24431
25285
  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(), {
24432
25286
  kind: "mutation",
24433
25287
  auth: "admin"
24434
25288
  }), method(_void(), _void(), {
24435
25289
  kind: "mutation",
24436
25290
  auth: "admin"
25291
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
25292
+ kind: "mutation",
25293
+ auth: "admin"
25294
+ }), method(_void(), SiteLocationStatusSchema, {
25295
+ kind: "mutation",
25296
+ auth: "admin"
24437
25297
  });
24438
25298
  object({
24439
25299
  /** True when the device's tamper switch / case-open contact is
@@ -27163,6 +28023,12 @@ Object.freeze({
27163
28023
  addonId: null,
27164
28024
  access: "create"
27165
28025
  },
28026
+ "llm.cancel": {
28027
+ capName: "llm",
28028
+ capScope: "system",
28029
+ addonId: null,
28030
+ access: "create"
28031
+ },
27166
28032
  "llm.deleteModel": {
27167
28033
  capName: "llm",
27168
28034
  capScope: "system",
@@ -27247,6 +28113,12 @@ Object.freeze({
27247
28113
  addonId: null,
27248
28114
  access: "view"
27249
28115
  },
28116
+ "llm.resolveModelRef": {
28117
+ capName: "llm",
28118
+ capScope: "system",
28119
+ addonId: null,
28120
+ access: "create"
28121
+ },
27250
28122
  "llm.setDefault": {
27251
28123
  capName: "llm",
27252
28124
  capScope: "system",
@@ -29413,6 +30285,12 @@ Object.freeze({
29413
30285
  addonId: null,
29414
30286
  access: "create"
29415
30287
  },
30288
+ "sceneMonitor.resetScene": {
30289
+ capName: "scene-monitor",
30290
+ capScope: "device",
30291
+ addonId: null,
30292
+ access: "delete"
30293
+ },
29416
30294
  "sceneMonitor.updateScene": {
29417
30295
  capName: "scene-monitor",
29418
30296
  capScope: "device",
@@ -29551,6 +30429,12 @@ Object.freeze({
29551
30429
  addonId: null,
29552
30430
  access: "view"
29553
30431
  },
30432
+ "snapshot.getDebugState": {
30433
+ capName: "snapshot",
30434
+ capScope: "device",
30435
+ addonId: null,
30436
+ access: "view"
30437
+ },
29554
30438
  "snapshot.getSnapshot": {
29555
30439
  capName: "snapshot",
29556
30440
  capScope: "device",
@@ -30091,6 +30975,12 @@ Object.freeze({
30091
30975
  addonId: null,
30092
30976
  access: "create"
30093
30977
  },
30978
+ "system.detectSiteLocation": {
30979
+ capName: "system",
30980
+ capScope: "system",
30981
+ addonId: null,
30982
+ access: "create"
30983
+ },
30094
30984
  "system.featureFlags": {
30095
30985
  capName: "system",
30096
30986
  capScope: "system",
@@ -30109,6 +30999,12 @@ Object.freeze({
30109
30999
  addonId: null,
30110
31000
  access: "view"
30111
31001
  },
31002
+ "system.getSiteLocation": {
31003
+ capName: "system",
31004
+ capScope: "system",
31005
+ addonId: null,
31006
+ access: "view"
31007
+ },
30112
31008
  "system.health": {
30113
31009
  capName: "system",
30114
31010
  capScope: "system",
@@ -30133,6 +31029,12 @@ Object.freeze({
30133
31029
  addonId: null,
30134
31030
  access: "create"
30135
31031
  },
31032
+ "system.setSiteLocation": {
31033
+ capName: "system",
31034
+ capScope: "system",
31035
+ addonId: null,
31036
+ access: "create"
31037
+ },
30136
31038
  "terminalSession.adoptLegacyMonitor": {
30137
31039
  capName: "terminal-session",
30138
31040
  capScope: "system",
@@ -30704,6 +31606,1709 @@ Object.freeze({
30704
31606
  access: "create"
30705
31607
  }
30706
31608
  });
31609
+ Object.freeze({
31610
+ "accessories.setChildHidden": [{
31611
+ name: "childDeviceId",
31612
+ form: "single",
31613
+ optional: false
31614
+ }, {
31615
+ name: "deviceId",
31616
+ form: "single",
31617
+ optional: false
31618
+ }],
31619
+ "addonSettings.getDeviceSettings": [{
31620
+ name: "deviceId",
31621
+ form: "single",
31622
+ optional: false
31623
+ }],
31624
+ "addonSettings.updateDeviceSettings": [{
31625
+ name: "deviceId",
31626
+ form: "single",
31627
+ optional: false
31628
+ }],
31629
+ "alarmPanel.arm": [{
31630
+ name: "deviceId",
31631
+ form: "single",
31632
+ optional: false
31633
+ }],
31634
+ "alarmPanel.disarm": [{
31635
+ name: "deviceId",
31636
+ form: "single",
31637
+ optional: false
31638
+ }],
31639
+ "alarmPanel.trigger": [{
31640
+ name: "deviceId",
31641
+ form: "single",
31642
+ optional: false
31643
+ }],
31644
+ "audioAnalysis.resolveDeviceSettings": [{
31645
+ name: "deviceId",
31646
+ form: "single",
31647
+ optional: false
31648
+ }],
31649
+ "audioAnalyzer.classify": [{
31650
+ name: "deviceId",
31651
+ form: "single",
31652
+ optional: true
31653
+ }],
31654
+ "audioMetrics.getCurrentSnapshot": [{
31655
+ name: "deviceId",
31656
+ form: "single",
31657
+ optional: false
31658
+ }],
31659
+ "audioMetrics.getHistory": [{
31660
+ name: "deviceId",
31661
+ form: "single",
31662
+ optional: false
31663
+ }],
31664
+ "automationControl.disable": [{
31665
+ name: "deviceId",
31666
+ form: "single",
31667
+ optional: false
31668
+ }],
31669
+ "automationControl.enable": [{
31670
+ name: "deviceId",
31671
+ form: "single",
31672
+ optional: false
31673
+ }],
31674
+ "automationControl.trigger": [{
31675
+ name: "deviceId",
31676
+ form: "single",
31677
+ optional: false
31678
+ }],
31679
+ "battery.wakeForStream": [{
31680
+ name: "deviceId",
31681
+ form: "single",
31682
+ optional: false
31683
+ }],
31684
+ "brightness.setBrightness": [{
31685
+ name: "deviceId",
31686
+ form: "single",
31687
+ optional: false
31688
+ }],
31689
+ "button.press": [{
31690
+ name: "deviceId",
31691
+ form: "single",
31692
+ optional: false
31693
+ }],
31694
+ "cameraCredentials.getCredentials": [{
31695
+ name: "deviceId",
31696
+ form: "single",
31697
+ optional: false
31698
+ }],
31699
+ "cameraStreams.getBrokerStreams": [{
31700
+ name: "deviceId",
31701
+ form: "single",
31702
+ optional: false
31703
+ }],
31704
+ "cameraStreams.getCameraStreams": [{
31705
+ name: "deviceId",
31706
+ form: "single",
31707
+ optional: false
31708
+ }],
31709
+ "cameraStreams.getProfileRtspEntries": [{
31710
+ name: "deviceId",
31711
+ form: "single",
31712
+ optional: false
31713
+ }],
31714
+ "cameraStreams.getRtspEntries": [{
31715
+ name: "deviceId",
31716
+ form: "single",
31717
+ optional: false
31718
+ }],
31719
+ "cameraStreams.pickStream": [{
31720
+ name: "deviceId",
31721
+ form: "single",
31722
+ optional: false
31723
+ }],
31724
+ "climateControl.setFanMode": [{
31725
+ name: "deviceId",
31726
+ form: "single",
31727
+ optional: false
31728
+ }],
31729
+ "climateControl.setMode": [{
31730
+ name: "deviceId",
31731
+ form: "single",
31732
+ optional: false
31733
+ }],
31734
+ "climateControl.setPreset": [{
31735
+ name: "deviceId",
31736
+ form: "single",
31737
+ optional: false
31738
+ }],
31739
+ "climateControl.setSwingHorizontal": [{
31740
+ name: "deviceId",
31741
+ form: "single",
31742
+ optional: false
31743
+ }],
31744
+ "climateControl.setSwingVertical": [{
31745
+ name: "deviceId",
31746
+ form: "single",
31747
+ optional: false
31748
+ }],
31749
+ "climateControl.setTarget": [{
31750
+ name: "deviceId",
31751
+ form: "single",
31752
+ optional: false
31753
+ }],
31754
+ "climateControl.setTargetHumidity": [{
31755
+ name: "deviceId",
31756
+ form: "single",
31757
+ optional: false
31758
+ }],
31759
+ "climateControl.setTargetRange": [{
31760
+ name: "deviceId",
31761
+ form: "single",
31762
+ optional: false
31763
+ }],
31764
+ "color.setColor": [{
31765
+ name: "deviceId",
31766
+ form: "single",
31767
+ optional: false
31768
+ }],
31769
+ "consumables.reset": [{
31770
+ name: "deviceId",
31771
+ form: "single",
31772
+ optional: false
31773
+ }],
31774
+ "control.setValue": [{
31775
+ name: "deviceId",
31776
+ form: "single",
31777
+ optional: false
31778
+ }],
31779
+ "cover.close": [{
31780
+ name: "deviceId",
31781
+ form: "single",
31782
+ optional: false
31783
+ }],
31784
+ "cover.open": [{
31785
+ name: "deviceId",
31786
+ form: "single",
31787
+ optional: false
31788
+ }],
31789
+ "cover.setPosition": [{
31790
+ name: "deviceId",
31791
+ form: "single",
31792
+ optional: false
31793
+ }],
31794
+ "cover.setTiltPosition": [{
31795
+ name: "deviceId",
31796
+ form: "single",
31797
+ optional: false
31798
+ }],
31799
+ "cover.stop": [{
31800
+ name: "deviceId",
31801
+ form: "single",
31802
+ optional: false
31803
+ }],
31804
+ "dayNight.getOptions": [{
31805
+ name: "deviceId",
31806
+ form: "single",
31807
+ optional: false
31808
+ }],
31809
+ "dayNight.setSettings": [{
31810
+ name: "deviceId",
31811
+ form: "single",
31812
+ optional: false
31813
+ }],
31814
+ "decoder.createSession": [{
31815
+ name: "deviceId",
31816
+ form: "single",
31817
+ optional: true
31818
+ }],
31819
+ "deviceAdoption.release": [{
31820
+ name: "camDeviceId",
31821
+ form: "single",
31822
+ optional: false
31823
+ }],
31824
+ "deviceAdoption.resync": [{
31825
+ name: "camDeviceId",
31826
+ form: "single",
31827
+ optional: false
31828
+ }],
31829
+ "deviceDiscovery.adoptDevice": [{
31830
+ name: "deviceId",
31831
+ form: "single",
31832
+ optional: false
31833
+ }],
31834
+ "deviceDiscovery.listDiscovered": [{
31835
+ name: "deviceId",
31836
+ form: "single",
31837
+ optional: false
31838
+ }],
31839
+ "deviceDiscovery.refreshDiscovery": [{
31840
+ name: "deviceId",
31841
+ form: "single",
31842
+ optional: false
31843
+ }],
31844
+ "deviceDiscovery.releaseDevice": [{
31845
+ name: "childDeviceId",
31846
+ form: "single",
31847
+ optional: false
31848
+ }, {
31849
+ name: "deviceId",
31850
+ form: "single",
31851
+ optional: false
31852
+ }],
31853
+ "deviceManager.adoptionRelease": [{
31854
+ name: "camDeviceId",
31855
+ form: "single",
31856
+ optional: false
31857
+ }],
31858
+ "deviceManager.adoptionResync": [{
31859
+ name: "camDeviceId",
31860
+ form: "single",
31861
+ optional: false
31862
+ }],
31863
+ "deviceManager.applyInitialMeta": [{
31864
+ name: "deviceId",
31865
+ form: "single",
31866
+ optional: false
31867
+ }, {
31868
+ name: "linkDeviceId",
31869
+ form: "single",
31870
+ optional: true
31871
+ }],
31872
+ "deviceManager.disable": [{
31873
+ name: "deviceId",
31874
+ form: "single",
31875
+ optional: false
31876
+ }],
31877
+ "deviceManager.enable": [{
31878
+ name: "deviceId",
31879
+ form: "single",
31880
+ optional: false
31881
+ }],
31882
+ "deviceManager.getBindings": [{
31883
+ name: "deviceId",
31884
+ form: "single",
31885
+ optional: false
31886
+ }],
31887
+ "deviceManager.getChildren": [{
31888
+ name: "parentDeviceId",
31889
+ form: "single",
31890
+ optional: false
31891
+ }],
31892
+ "deviceManager.getConfigSchema": [{
31893
+ name: "deviceId",
31894
+ form: "single",
31895
+ optional: false
31896
+ }],
31897
+ "deviceManager.getDevice": [{
31898
+ name: "deviceId",
31899
+ form: "single",
31900
+ optional: false
31901
+ }],
31902
+ "deviceManager.getDeviceAggregate": [{
31903
+ name: "deviceId",
31904
+ form: "single",
31905
+ optional: false
31906
+ }],
31907
+ "deviceManager.getDeviceLiveInfoAggregate": [{
31908
+ name: "deviceId",
31909
+ form: "single",
31910
+ optional: false
31911
+ }],
31912
+ "deviceManager.getDeviceSettingsAggregate": [{
31913
+ name: "deviceId",
31914
+ form: "single",
31915
+ optional: false
31916
+ }],
31917
+ "deviceManager.getDeviceStatusAggregate": [{
31918
+ name: "deviceId",
31919
+ form: "single",
31920
+ optional: false
31921
+ }],
31922
+ "deviceManager.getDeviceStatusAggregateBatch": [{
31923
+ name: "deviceIds",
31924
+ form: "array",
31925
+ optional: false
31926
+ }],
31927
+ "deviceManager.getLinkedDevices": [{
31928
+ name: "deviceId",
31929
+ form: "single",
31930
+ optional: false
31931
+ }],
31932
+ "deviceManager.getSettingsSchema": [{
31933
+ name: "deviceId",
31934
+ form: "single",
31935
+ optional: false
31936
+ }],
31937
+ "deviceManager.getStreamProfileMap": [{
31938
+ name: "deviceId",
31939
+ form: "single",
31940
+ optional: false
31941
+ }],
31942
+ "deviceManager.getStreamSources": [{
31943
+ name: "deviceId",
31944
+ form: "single",
31945
+ optional: false
31946
+ }],
31947
+ "deviceManager.getWireableFields": [{
31948
+ name: "deviceId",
31949
+ form: "single",
31950
+ optional: false
31951
+ }],
31952
+ "deviceManager.loadConfig": [{
31953
+ name: "deviceId",
31954
+ form: "single",
31955
+ optional: false
31956
+ }],
31957
+ "deviceManager.loadMeta": [{
31958
+ name: "deviceId",
31959
+ form: "single",
31960
+ optional: false
31961
+ }],
31962
+ "deviceManager.loadRuntimeState": [{
31963
+ name: "deviceId",
31964
+ form: "single",
31965
+ optional: false
31966
+ }],
31967
+ "deviceManager.persistConfig": [{
31968
+ name: "deviceId",
31969
+ form: "single",
31970
+ optional: false
31971
+ }],
31972
+ "deviceManager.probeStreams": [{
31973
+ name: "deviceId",
31974
+ form: "single",
31975
+ optional: false
31976
+ }],
31977
+ "deviceManager.registerDevice": [{
31978
+ name: "parentDeviceId",
31979
+ form: "single",
31980
+ optional: true
31981
+ }],
31982
+ "deviceManager.remove": [{
31983
+ name: "deviceId",
31984
+ form: "single",
31985
+ optional: false
31986
+ }],
31987
+ "deviceManager.removeDevice": [{
31988
+ name: "deviceId",
31989
+ form: "single",
31990
+ optional: false
31991
+ }],
31992
+ "deviceManager.runDeviceAction": [{
31993
+ name: "deviceId",
31994
+ form: "single",
31995
+ optional: false
31996
+ }],
31997
+ "deviceManager.setChildLayout": [{
31998
+ name: "deviceId",
31999
+ form: "single",
32000
+ optional: false
32001
+ }],
32002
+ "deviceManager.setDisabled": [{
32003
+ name: "deviceId",
32004
+ form: "single",
32005
+ optional: false
32006
+ }],
32007
+ "deviceManager.setDisplay": [{
32008
+ name: "deviceId",
32009
+ form: "single",
32010
+ optional: false
32011
+ }],
32012
+ "deviceManager.setIntegrationId": [{
32013
+ name: "deviceId",
32014
+ form: "single",
32015
+ optional: false
32016
+ }],
32017
+ "deviceManager.setLinkDeviceId": [{
32018
+ name: "deviceId",
32019
+ form: "single",
32020
+ optional: false
32021
+ }, {
32022
+ name: "linkDeviceId",
32023
+ form: "single",
32024
+ optional: true
32025
+ }],
32026
+ "deviceManager.setLocation": [{
32027
+ name: "deviceId",
32028
+ form: "single",
32029
+ optional: false
32030
+ }],
32031
+ "deviceManager.setMetadata": [{
32032
+ name: "deviceId",
32033
+ form: "single",
32034
+ optional: false
32035
+ }],
32036
+ "deviceManager.setName": [{
32037
+ name: "deviceId",
32038
+ form: "single",
32039
+ optional: false
32040
+ }],
32041
+ "deviceManager.setPrimaryChildEntityId": [{
32042
+ name: "deviceId",
32043
+ form: "single",
32044
+ optional: false
32045
+ }],
32046
+ "deviceManager.setRole": [{
32047
+ name: "deviceId",
32048
+ form: "single",
32049
+ optional: false
32050
+ }],
32051
+ "deviceManager.setStreamProfileMap": [{
32052
+ name: "deviceId",
32053
+ form: "single",
32054
+ optional: false
32055
+ }],
32056
+ "deviceManager.setType": [{
32057
+ name: "deviceId",
32058
+ form: "single",
32059
+ optional: false
32060
+ }],
32061
+ "deviceManager.setWrapperActive": [{
32062
+ name: "deviceId",
32063
+ form: "single",
32064
+ optional: false
32065
+ }],
32066
+ "deviceManager.testField": [{
32067
+ name: "deviceId",
32068
+ form: "single",
32069
+ optional: false
32070
+ }],
32071
+ "deviceManager.updateConfig": [{
32072
+ name: "deviceId",
32073
+ form: "single",
32074
+ optional: false
32075
+ }],
32076
+ "deviceManager.updateDeviceField": [{
32077
+ name: "deviceId",
32078
+ form: "single",
32079
+ optional: false
32080
+ }],
32081
+ "deviceManager.updateDeviceFieldsBatch": [{
32082
+ name: "deviceId",
32083
+ form: "single",
32084
+ optional: false
32085
+ }],
32086
+ "deviceOps.getConfigEntries": [{
32087
+ name: "deviceId",
32088
+ form: "single",
32089
+ optional: false
32090
+ }],
32091
+ "deviceOps.getRawState": [{
32092
+ name: "deviceId",
32093
+ form: "single",
32094
+ optional: false
32095
+ }],
32096
+ "deviceOps.getSettingsSchema": [{
32097
+ name: "deviceId",
32098
+ form: "single",
32099
+ optional: false
32100
+ }],
32101
+ "deviceOps.getStreamSources": [{
32102
+ name: "deviceId",
32103
+ form: "single",
32104
+ optional: false
32105
+ }],
32106
+ "deviceOps.removeDevice": [{
32107
+ name: "deviceId",
32108
+ form: "single",
32109
+ optional: false
32110
+ }],
32111
+ "deviceOps.runAction": [{
32112
+ name: "deviceId",
32113
+ form: "single",
32114
+ optional: false
32115
+ }],
32116
+ "deviceOps.setConfig": [{
32117
+ name: "deviceId",
32118
+ form: "single",
32119
+ optional: false
32120
+ }],
32121
+ "deviceState.getCapSlice": [{
32122
+ name: "deviceId",
32123
+ form: "single",
32124
+ optional: false
32125
+ }],
32126
+ "deviceState.getSnapshot": [{
32127
+ name: "deviceId",
32128
+ form: "single",
32129
+ optional: false
32130
+ }],
32131
+ "deviceState.setCapSlice": [{
32132
+ name: "deviceId",
32133
+ form: "single",
32134
+ optional: false
32135
+ }],
32136
+ "events.getEventClipUrl": [{
32137
+ name: "deviceId",
32138
+ form: "single",
32139
+ optional: false
32140
+ }],
32141
+ "events.getEvents": [{
32142
+ name: "deviceId",
32143
+ form: "single",
32144
+ optional: false
32145
+ }],
32146
+ "events.getEventThumbnail": [{
32147
+ name: "deviceId",
32148
+ form: "single",
32149
+ optional: false
32150
+ }],
32151
+ "faceGallery.getFaceByTrack": [{
32152
+ name: "deviceId",
32153
+ form: "single",
32154
+ optional: false
32155
+ }],
32156
+ "faceGallery.listRecentFaces": [{
32157
+ name: "deviceId",
32158
+ form: "single",
32159
+ optional: true
32160
+ }],
32161
+ "fanControl.setDirection": [{
32162
+ name: "deviceId",
32163
+ form: "single",
32164
+ optional: false
32165
+ }],
32166
+ "fanControl.setOscillating": [{
32167
+ name: "deviceId",
32168
+ form: "single",
32169
+ optional: false
32170
+ }],
32171
+ "fanControl.setPercentage": [{
32172
+ name: "deviceId",
32173
+ form: "single",
32174
+ optional: false
32175
+ }],
32176
+ "fanControl.setPreset": [{
32177
+ name: "deviceId",
32178
+ form: "single",
32179
+ optional: false
32180
+ }],
32181
+ "humidifier.setMode": [{
32182
+ name: "deviceId",
32183
+ form: "single",
32184
+ optional: false
32185
+ }],
32186
+ "humidifier.setOn": [{
32187
+ name: "deviceId",
32188
+ form: "single",
32189
+ optional: false
32190
+ }],
32191
+ "humidifier.setTargetHumidity": [{
32192
+ name: "deviceId",
32193
+ form: "single",
32194
+ optional: false
32195
+ }],
32196
+ "imageSettings.getOptions": [{
32197
+ name: "deviceId",
32198
+ form: "single",
32199
+ optional: false
32200
+ }],
32201
+ "imageSettings.setSettings": [{
32202
+ name: "deviceId",
32203
+ form: "single",
32204
+ optional: false
32205
+ }],
32206
+ "intercom.endTalkSession": [{
32207
+ name: "deviceId",
32208
+ form: "single",
32209
+ optional: false
32210
+ }],
32211
+ "intercom.handleAnswer": [{
32212
+ name: "deviceId",
32213
+ form: "single",
32214
+ optional: false
32215
+ }],
32216
+ "intercom.pushTalkAudio": [{
32217
+ name: "deviceId",
32218
+ form: "single",
32219
+ optional: false
32220
+ }],
32221
+ "intercom.startSession": [{
32222
+ name: "deviceId",
32223
+ form: "single",
32224
+ optional: false
32225
+ }],
32226
+ "intercom.startTalkSession": [{
32227
+ name: "deviceId",
32228
+ form: "single",
32229
+ optional: false
32230
+ }],
32231
+ "intercom.stopSession": [{
32232
+ name: "deviceId",
32233
+ form: "single",
32234
+ optional: false
32235
+ }],
32236
+ "lawnMowerControl.dock": [{
32237
+ name: "deviceId",
32238
+ form: "single",
32239
+ optional: false
32240
+ }],
32241
+ "lawnMowerControl.pause": [{
32242
+ name: "deviceId",
32243
+ form: "single",
32244
+ optional: false
32245
+ }],
32246
+ "lawnMowerControl.startMowing": [{
32247
+ name: "deviceId",
32248
+ form: "single",
32249
+ optional: false
32250
+ }],
32251
+ "lockControl.lock": [{
32252
+ name: "deviceId",
32253
+ form: "single",
32254
+ optional: false
32255
+ }],
32256
+ "lockControl.open": [{
32257
+ name: "deviceId",
32258
+ form: "single",
32259
+ optional: false
32260
+ }],
32261
+ "lockControl.unlock": [{
32262
+ name: "deviceId",
32263
+ form: "single",
32264
+ optional: false
32265
+ }],
32266
+ "mediaPlayer.next": [{
32267
+ name: "deviceId",
32268
+ form: "single",
32269
+ optional: false
32270
+ }],
32271
+ "mediaPlayer.pause": [{
32272
+ name: "deviceId",
32273
+ form: "single",
32274
+ optional: false
32275
+ }],
32276
+ "mediaPlayer.play": [{
32277
+ name: "deviceId",
32278
+ form: "single",
32279
+ optional: false
32280
+ }],
32281
+ "mediaPlayer.playMedia": [{
32282
+ name: "deviceId",
32283
+ form: "single",
32284
+ optional: false
32285
+ }],
32286
+ "mediaPlayer.previous": [{
32287
+ name: "deviceId",
32288
+ form: "single",
32289
+ optional: false
32290
+ }],
32291
+ "mediaPlayer.seek": [{
32292
+ name: "deviceId",
32293
+ form: "single",
32294
+ optional: false
32295
+ }],
32296
+ "mediaPlayer.selectSource": [{
32297
+ name: "deviceId",
32298
+ form: "single",
32299
+ optional: false
32300
+ }],
32301
+ "mediaPlayer.setMute": [{
32302
+ name: "deviceId",
32303
+ form: "single",
32304
+ optional: false
32305
+ }],
32306
+ "mediaPlayer.setRepeat": [{
32307
+ name: "deviceId",
32308
+ form: "single",
32309
+ optional: false
32310
+ }],
32311
+ "mediaPlayer.setShuffle": [{
32312
+ name: "deviceId",
32313
+ form: "single",
32314
+ optional: false
32315
+ }],
32316
+ "mediaPlayer.setVolume": [{
32317
+ name: "deviceId",
32318
+ form: "single",
32319
+ optional: false
32320
+ }],
32321
+ "mediaPlayer.stop": [{
32322
+ name: "deviceId",
32323
+ form: "single",
32324
+ optional: false
32325
+ }],
32326
+ "motion.isDetected": [{
32327
+ name: "deviceId",
32328
+ form: "single",
32329
+ optional: false
32330
+ }],
32331
+ "motionDetection.analyze": [{
32332
+ name: "deviceId",
32333
+ form: "single",
32334
+ optional: false
32335
+ }],
32336
+ "motionDetection.removeCamera": [{
32337
+ name: "deviceId",
32338
+ form: "single",
32339
+ optional: false
32340
+ }],
32341
+ "motionTrigger.setMotionTrigger": [{
32342
+ name: "deviceId",
32343
+ form: "single",
32344
+ optional: false
32345
+ }],
32346
+ "motionZones.getOptions": [{
32347
+ name: "deviceId",
32348
+ form: "single",
32349
+ optional: false
32350
+ }],
32351
+ "motionZones.setZone": [{
32352
+ name: "deviceId",
32353
+ form: "single",
32354
+ optional: false
32355
+ }],
32356
+ "nativeObjectDetection.setEnabled": [{
32357
+ name: "deviceId",
32358
+ form: "single",
32359
+ optional: false
32360
+ }],
32361
+ "networkQuality.getDeviceStats": [{
32362
+ name: "deviceId",
32363
+ form: "single",
32364
+ optional: false
32365
+ }],
32366
+ "networkQuality.reportClientStats": [{
32367
+ name: "deviceId",
32368
+ form: "single",
32369
+ optional: false
32370
+ }],
32371
+ "notificationRules.setDeviceMuted": [{
32372
+ name: "deviceId",
32373
+ form: "single",
32374
+ optional: false
32375
+ }],
32376
+ "notifier.cancel": [{
32377
+ name: "deviceId",
32378
+ form: "single",
32379
+ optional: false
32380
+ }],
32381
+ "notifier.send": [{
32382
+ name: "deviceId",
32383
+ form: "single",
32384
+ optional: false
32385
+ }],
32386
+ "osd.setOverlay": [{
32387
+ name: "deviceId",
32388
+ form: "single",
32389
+ optional: false
32390
+ }],
32391
+ "osdManager.clearSlotBinding": [{
32392
+ name: "deviceId",
32393
+ form: "single",
32394
+ optional: false
32395
+ }],
32396
+ "osdManager.copyDeviceConfiguration": [{
32397
+ name: "sourceDeviceId",
32398
+ form: "single",
32399
+ optional: false
32400
+ }, {
32401
+ name: "targetDeviceId",
32402
+ form: "single",
32403
+ optional: false
32404
+ }],
32405
+ "osdManager.getDeviceOsd": [{
32406
+ name: "deviceId",
32407
+ form: "single",
32408
+ optional: false
32409
+ }],
32410
+ "osdManager.getSourceCatalog": [{
32411
+ name: "deviceId",
32412
+ form: "single",
32413
+ optional: false
32414
+ }],
32415
+ "osdManager.previewSlot": [{
32416
+ name: "deviceId",
32417
+ form: "single",
32418
+ optional: false
32419
+ }],
32420
+ "osdManager.renderDevice": [{
32421
+ name: "deviceId",
32422
+ form: "single",
32423
+ optional: false
32424
+ }],
32425
+ "osdManager.setSlotBinding": [{
32426
+ name: "deviceId",
32427
+ form: "single",
32428
+ optional: false
32429
+ }],
32430
+ "petFeeder.callPet": [{
32431
+ name: "deviceId",
32432
+ form: "single",
32433
+ optional: false
32434
+ }],
32435
+ "petFeeder.cancelFeed": [{
32436
+ name: "deviceId",
32437
+ form: "single",
32438
+ optional: false
32439
+ }],
32440
+ "petFeeder.feed": [{
32441
+ name: "deviceId",
32442
+ form: "single",
32443
+ optional: false
32444
+ }],
32445
+ "petFeeder.markFoodReplenished": [{
32446
+ name: "deviceId",
32447
+ form: "single",
32448
+ optional: false
32449
+ }],
32450
+ "petFeeder.playSound": [{
32451
+ name: "deviceId",
32452
+ form: "single",
32453
+ optional: false
32454
+ }],
32455
+ "petFeeder.resetDesiccant": [{
32456
+ name: "deviceId",
32457
+ form: "single",
32458
+ optional: false
32459
+ }],
32460
+ "petFeeder.setChildLock": [{
32461
+ name: "deviceId",
32462
+ form: "single",
32463
+ optional: false
32464
+ }],
32465
+ "petFeeder.setFeedSound": [{
32466
+ name: "deviceId",
32467
+ form: "single",
32468
+ optional: false
32469
+ }],
32470
+ "petFeeder.setIndicatorLight": [{
32471
+ name: "deviceId",
32472
+ form: "single",
32473
+ optional: false
32474
+ }],
32475
+ "petFeeder.setVolume": [{
32476
+ name: "deviceId",
32477
+ form: "single",
32478
+ optional: false
32479
+ }],
32480
+ "pipelineAnalytics.clearTracks": [{
32481
+ name: "deviceId",
32482
+ form: "single",
32483
+ optional: false
32484
+ }],
32485
+ "pipelineAnalytics.completeRetrainTrack": [{
32486
+ name: "deviceId",
32487
+ form: "single",
32488
+ optional: false
32489
+ }],
32490
+ "pipelineAnalytics.deleteDeviceEvents": [{
32491
+ name: "deviceId",
32492
+ form: "single",
32493
+ optional: false
32494
+ }],
32495
+ "pipelineAnalytics.deleteTracks": [{
32496
+ name: "deviceId",
32497
+ form: "single",
32498
+ optional: false
32499
+ }],
32500
+ "pipelineAnalytics.deselectRetrainFrame": [{
32501
+ name: "deviceId",
32502
+ form: "single",
32503
+ optional: false
32504
+ }],
32505
+ "pipelineAnalytics.getActiveTracks": [{
32506
+ name: "deviceId",
32507
+ form: "single",
32508
+ optional: false
32509
+ }],
32510
+ "pipelineAnalytics.getAudioEvents": [{
32511
+ name: "deviceId",
32512
+ form: "single",
32513
+ optional: false
32514
+ }],
32515
+ "pipelineAnalytics.getEventDensity": [{
32516
+ name: "deviceId",
32517
+ form: "single",
32518
+ optional: false
32519
+ }],
32520
+ "pipelineAnalytics.getEventMedia": [{
32521
+ name: "deviceId",
32522
+ form: "single",
32523
+ optional: false
32524
+ }],
32525
+ "pipelineAnalytics.getKeyEvents": [{
32526
+ name: "deviceId",
32527
+ form: "single",
32528
+ optional: false
32529
+ }],
32530
+ "pipelineAnalytics.getMotionEvents": [{
32531
+ name: "deviceId",
32532
+ form: "single",
32533
+ optional: false
32534
+ }],
32535
+ "pipelineAnalytics.getObjectEvents": [{
32536
+ name: "deviceId",
32537
+ form: "single",
32538
+ optional: false
32539
+ }],
32540
+ "pipelineAnalytics.getRetrainExportUrl": [{
32541
+ name: "deviceIds",
32542
+ form: "array",
32543
+ optional: true
32544
+ }],
32545
+ "pipelineAnalytics.getSensorEvents": [{
32546
+ name: "deviceId",
32547
+ form: "single",
32548
+ optional: false
32549
+ }],
32550
+ "pipelineAnalytics.getTrack": [{
32551
+ name: "deviceId",
32552
+ form: "single",
32553
+ optional: false
32554
+ }],
32555
+ "pipelineAnalytics.getTrackMedia": [{
32556
+ name: "deviceId",
32557
+ form: "single",
32558
+ optional: false
32559
+ }],
32560
+ "pipelineAnalytics.getTrainingExportSummary": [{
32561
+ name: "deviceIds",
32562
+ form: "array",
32563
+ optional: true
32564
+ }],
32565
+ "pipelineAnalytics.getTrainingExportUrl": [{
32566
+ name: "deviceIds",
32567
+ form: "array",
32568
+ optional: true
32569
+ }],
32570
+ "pipelineAnalytics.listEventKinds": [{
32571
+ name: "deviceId",
32572
+ form: "single",
32573
+ optional: false
32574
+ }],
32575
+ "pipelineAnalytics.listEventKindsBatch": [{
32576
+ name: "deviceIds",
32577
+ form: "array",
32578
+ optional: false
32579
+ }],
32580
+ "pipelineAnalytics.listOpsLog": [{
32581
+ name: "deviceId",
32582
+ form: "single",
32583
+ optional: true
32584
+ }],
32585
+ "pipelineAnalytics.listRecentTracks": [{
32586
+ name: "deviceIds",
32587
+ form: "array",
32588
+ optional: false
32589
+ }],
32590
+ "pipelineAnalytics.listRetrainStaging": [{
32591
+ name: "deviceIds",
32592
+ form: "array",
32593
+ optional: true
32594
+ }],
32595
+ "pipelineAnalytics.listTrackMedia": [{
32596
+ name: "deviceId",
32597
+ form: "single",
32598
+ optional: false
32599
+ }],
32600
+ "pipelineAnalytics.listTracks": [{
32601
+ name: "deviceId",
32602
+ form: "single",
32603
+ optional: false
32604
+ }],
32605
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
32606
+ name: "deviceId",
32607
+ form: "single",
32608
+ optional: false
32609
+ }],
32610
+ "pipelineAnalytics.pruneEventsBefore": [{
32611
+ name: "deviceId",
32612
+ form: "single",
32613
+ optional: false
32614
+ }],
32615
+ "pipelineAnalytics.pruneTracksBefore": [{
32616
+ name: "deviceId",
32617
+ form: "single",
32618
+ optional: false
32619
+ }],
32620
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
32621
+ name: "deviceId",
32622
+ form: "single",
32623
+ optional: true
32624
+ }],
32625
+ "pipelineAnalytics.restageRetrainTrack": [{
32626
+ name: "deviceId",
32627
+ form: "single",
32628
+ optional: false
32629
+ }],
32630
+ "pipelineAnalytics.saveRetrainAnnotations": [{
32631
+ name: "deviceId",
32632
+ form: "single",
32633
+ optional: false
32634
+ }],
32635
+ "pipelineAnalytics.searchObjectEvents": [{
32636
+ name: "deviceId",
32637
+ form: "single",
32638
+ optional: true
32639
+ }],
32640
+ "pipelineAnalytics.selectRetrainFrames": [{
32641
+ name: "deviceId",
32642
+ form: "single",
32643
+ optional: false
32644
+ }],
32645
+ "pipelineAnalytics.setTrackFlags": [{
32646
+ name: "deviceId",
32647
+ form: "single",
32648
+ optional: false
32649
+ }],
32650
+ "pipelineAnalytics.wipeAllAnalytics": [{
32651
+ name: "deviceId",
32652
+ form: "single",
32653
+ optional: false
32654
+ }],
32655
+ "pipelineExecutor.runPipeline": [{
32656
+ name: "deviceId",
32657
+ form: "single",
32658
+ optional: true
32659
+ }],
32660
+ "pipelineExecutor.runPipelineBatch": [{
32661
+ name: "deviceId",
32662
+ form: "single",
32663
+ optional: true
32664
+ }],
32665
+ "pipelineOrchestrator.assignAudio": [{
32666
+ name: "deviceId",
32667
+ form: "single",
32668
+ optional: false
32669
+ }],
32670
+ "pipelineOrchestrator.assignPipeline": [{
32671
+ name: "deviceId",
32672
+ form: "single",
32673
+ optional: false
32674
+ }],
32675
+ "pipelineOrchestrator.getAudioAssignment": [{
32676
+ name: "deviceId",
32677
+ form: "single",
32678
+ optional: false
32679
+ }],
32680
+ "pipelineOrchestrator.getCameraMetrics": [{
32681
+ name: "deviceId",
32682
+ form: "single",
32683
+ optional: false
32684
+ }],
32685
+ "pipelineOrchestrator.getCameraSettings": [{
32686
+ name: "deviceId",
32687
+ form: "single",
32688
+ optional: false
32689
+ }],
32690
+ "pipelineOrchestrator.getCameraStatus": [{
32691
+ name: "deviceId",
32692
+ form: "single",
32693
+ optional: false
32694
+ }],
32695
+ "pipelineOrchestrator.getCameraStatuses": [{
32696
+ name: "deviceIds",
32697
+ form: "array",
32698
+ optional: true
32699
+ }],
32700
+ "pipelineOrchestrator.getCameraStepOverrides": [{
32701
+ name: "deviceId",
32702
+ form: "single",
32703
+ optional: false
32704
+ }],
32705
+ "pipelineOrchestrator.getCameraSwitches": [{
32706
+ name: "deviceId",
32707
+ form: "single",
32708
+ optional: false
32709
+ }],
32710
+ "pipelineOrchestrator.getPipelineAssignment": [{
32711
+ name: "deviceId",
32712
+ form: "single",
32713
+ optional: false
32714
+ }],
32715
+ "pipelineOrchestrator.getPipelineDevicePin": [{
32716
+ name: "deviceId",
32717
+ form: "single",
32718
+ optional: false
32719
+ }],
32720
+ "pipelineOrchestrator.resolvePipeline": [{
32721
+ name: "deviceId",
32722
+ form: "single",
32723
+ optional: false
32724
+ }],
32725
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
32726
+ name: "deviceId",
32727
+ form: "single",
32728
+ optional: false
32729
+ }],
32730
+ "pipelineOrchestrator.setCameraStepOverride": [{
32731
+ name: "deviceId",
32732
+ form: "single",
32733
+ optional: false
32734
+ }],
32735
+ "pipelineOrchestrator.setCameraStepToggle": [{
32736
+ name: "deviceId",
32737
+ form: "single",
32738
+ optional: false
32739
+ }],
32740
+ "pipelineOrchestrator.setCameraSwitch": [{
32741
+ name: "deviceId",
32742
+ form: "single",
32743
+ optional: false
32744
+ }],
32745
+ "pipelineOrchestrator.setPipelineDevicePin": [{
32746
+ name: "deviceId",
32747
+ form: "single",
32748
+ optional: false
32749
+ }],
32750
+ "pipelineOrchestrator.unassignAudio": [{
32751
+ name: "deviceId",
32752
+ form: "single",
32753
+ optional: false
32754
+ }],
32755
+ "pipelineOrchestrator.unassignPipeline": [{
32756
+ name: "deviceId",
32757
+ form: "single",
32758
+ optional: false
32759
+ }],
32760
+ "pipelineRunner.attachCamera": [{
32761
+ name: "deviceId",
32762
+ form: "single",
32763
+ optional: false
32764
+ }],
32765
+ "pipelineRunner.detachCamera": [{
32766
+ name: "deviceId",
32767
+ form: "single",
32768
+ optional: false
32769
+ }],
32770
+ "pipelineRunner.getCameraMetrics": [{
32771
+ name: "deviceId",
32772
+ form: "single",
32773
+ optional: false
32774
+ }],
32775
+ "pipelineRunner.reportMotion": [{
32776
+ name: "deviceId",
32777
+ form: "single",
32778
+ optional: false
32779
+ }],
32780
+ "pipelineRunner.runDetailSubtree": [{
32781
+ name: "deviceId",
32782
+ form: "single",
32783
+ optional: false
32784
+ }],
32785
+ "pipelineRunner.runStatelessStep": [{
32786
+ name: "sourceDeviceId",
32787
+ form: "single",
32788
+ optional: false
32789
+ }],
32790
+ "plateGallery.getPlateByTrack": [{
32791
+ name: "deviceId",
32792
+ form: "single",
32793
+ optional: false
32794
+ }],
32795
+ "plateGallery.listPlates": [{
32796
+ name: "deviceId",
32797
+ form: "single",
32798
+ optional: true
32799
+ }],
32800
+ "privacyMask.getOptions": [{
32801
+ name: "deviceId",
32802
+ form: "single",
32803
+ optional: false
32804
+ }],
32805
+ "privacyMask.setAudioEnabled": [{
32806
+ name: "deviceId",
32807
+ form: "single",
32808
+ optional: false
32809
+ }],
32810
+ "privacyMask.setMask": [{
32811
+ name: "deviceId",
32812
+ form: "single",
32813
+ optional: false
32814
+ }],
32815
+ "ptz.continuousMove": [{
32816
+ name: "deviceId",
32817
+ form: "single",
32818
+ optional: false
32819
+ }],
32820
+ "ptz.deletePreset": [{
32821
+ name: "deviceId",
32822
+ form: "single",
32823
+ optional: false
32824
+ }],
32825
+ "ptz.getOptions": [{
32826
+ name: "deviceId",
32827
+ form: "single",
32828
+ optional: false
32829
+ }],
32830
+ "ptz.getPosition": [{
32831
+ name: "deviceId",
32832
+ form: "single",
32833
+ optional: false
32834
+ }],
32835
+ "ptz.getPresets": [{
32836
+ name: "deviceId",
32837
+ form: "single",
32838
+ optional: false
32839
+ }],
32840
+ "ptz.goHome": [{
32841
+ name: "deviceId",
32842
+ form: "single",
32843
+ optional: false
32844
+ }],
32845
+ "ptz.goToPreset": [{
32846
+ name: "deviceId",
32847
+ form: "single",
32848
+ optional: false
32849
+ }],
32850
+ "ptz.move": [{
32851
+ name: "deviceId",
32852
+ form: "single",
32853
+ optional: false
32854
+ }],
32855
+ "ptz.savePreset": [{
32856
+ name: "deviceId",
32857
+ form: "single",
32858
+ optional: false
32859
+ }],
32860
+ "ptz.setAutofocus": [{
32861
+ name: "deviceId",
32862
+ form: "single",
32863
+ optional: false
32864
+ }],
32865
+ "ptz.stop": [{
32866
+ name: "deviceId",
32867
+ form: "single",
32868
+ optional: false
32869
+ }],
32870
+ "ptzAutotrack.getSettings": [{
32871
+ name: "deviceId",
32872
+ form: "single",
32873
+ optional: false
32874
+ }],
32875
+ "ptzAutotrack.getStatus": [{
32876
+ name: "deviceId",
32877
+ form: "single",
32878
+ optional: false
32879
+ }],
32880
+ "ptzAutotrack.setEnabled": [{
32881
+ name: "deviceId",
32882
+ form: "single",
32883
+ optional: false
32884
+ }],
32885
+ "ptzAutotrack.setSettings": [{
32886
+ name: "deviceId",
32887
+ form: "single",
32888
+ optional: false
32889
+ }],
32890
+ "reboot.reboot": [{
32891
+ name: "deviceId",
32892
+ form: "single",
32893
+ optional: false
32894
+ }],
32895
+ "recording.deleteFootprint": [{
32896
+ name: "deviceId",
32897
+ form: "single",
32898
+ optional: false
32899
+ }],
32900
+ "recording.getAvailability": [{
32901
+ name: "deviceId",
32902
+ form: "single",
32903
+ optional: false
32904
+ }],
32905
+ "recording.getDaysWithRecordings": [{
32906
+ name: "deviceId",
32907
+ form: "single",
32908
+ optional: false
32909
+ }],
32910
+ "recording.getDeviceConfig": [{
32911
+ name: "deviceId",
32912
+ form: "single",
32913
+ optional: false
32914
+ }],
32915
+ "recording.getPlaybackManifest": [{
32916
+ name: "deviceId",
32917
+ form: "single",
32918
+ optional: false
32919
+ }],
32920
+ "recording.listOpsLog": [{
32921
+ name: "deviceId",
32922
+ form: "single",
32923
+ optional: true
32924
+ }],
32925
+ "recording.locateSegment": [{
32926
+ name: "deviceId",
32927
+ form: "single",
32928
+ optional: false
32929
+ }],
32930
+ "recording.pruneFootage": [{
32931
+ name: "deviceId",
32932
+ form: "single",
32933
+ optional: false
32934
+ }],
32935
+ "recording.readGopBytes": [{
32936
+ name: "deviceId",
32937
+ form: "single",
32938
+ optional: false
32939
+ }],
32940
+ "recording.readSegmentBytes": [{
32941
+ name: "deviceId",
32942
+ form: "single",
32943
+ optional: false
32944
+ }],
32945
+ "recording.relocateFootage": [{
32946
+ name: "deviceId",
32947
+ form: "single",
32948
+ optional: true
32949
+ }],
32950
+ "recording.renderClip": [{
32951
+ name: "deviceId",
32952
+ form: "single",
32953
+ optional: false
32954
+ }],
32955
+ "recording.renderGif": [{
32956
+ name: "deviceId",
32957
+ form: "single",
32958
+ optional: false
32959
+ }],
32960
+ "recording.rescanStorage": [{
32961
+ name: "deviceId",
32962
+ form: "single",
32963
+ optional: false
32964
+ }],
32965
+ "recording.setDeviceConfig": [{
32966
+ name: "deviceId",
32967
+ form: "single",
32968
+ optional: false
32969
+ }],
32970
+ "recording.startStorageMigrationMove": [{
32971
+ name: "deviceId",
32972
+ form: "single",
32973
+ optional: true
32974
+ }],
32975
+ "recordingExport.createExport": [{
32976
+ name: "deviceId",
32977
+ form: "single",
32978
+ optional: false
32979
+ }],
32980
+ "recordingExport.listExports": [{
32981
+ name: "deviceId",
32982
+ form: "single",
32983
+ optional: true
32984
+ }],
32985
+ "sceneMonitor.captureReference": [{
32986
+ name: "deviceId",
32987
+ form: "single",
32988
+ optional: false
32989
+ }],
32990
+ "sceneMonitor.createScene": [{
32991
+ name: "deviceId",
32992
+ form: "single",
32993
+ optional: false
32994
+ }],
32995
+ "sceneMonitor.deleteReference": [{
32996
+ name: "deviceId",
32997
+ form: "single",
32998
+ optional: false
32999
+ }],
33000
+ "sceneMonitor.deleteScene": [{
33001
+ name: "deviceId",
33002
+ form: "single",
33003
+ optional: false
33004
+ }],
33005
+ "sceneMonitor.listScenes": [{
33006
+ name: "deviceId",
33007
+ form: "single",
33008
+ optional: false
33009
+ }],
33010
+ "sceneMonitor.recheckNow": [{
33011
+ name: "deviceId",
33012
+ form: "single",
33013
+ optional: false
33014
+ }],
33015
+ "sceneMonitor.resetScene": [{
33016
+ name: "deviceId",
33017
+ form: "single",
33018
+ optional: false
33019
+ }],
33020
+ "sceneMonitor.updateScene": [{
33021
+ name: "deviceId",
33022
+ form: "single",
33023
+ optional: false
33024
+ }],
33025
+ "scriptRunner.run": [{
33026
+ name: "deviceId",
33027
+ form: "single",
33028
+ optional: false
33029
+ }],
33030
+ "scriptRunner.stop": [{
33031
+ name: "deviceId",
33032
+ form: "single",
33033
+ optional: false
33034
+ }],
33035
+ "snapshot.getDebugState": [{
33036
+ name: "deviceId",
33037
+ form: "single",
33038
+ optional: false
33039
+ }],
33040
+ "snapshot.getSnapshot": [{
33041
+ name: "deviceId",
33042
+ form: "single",
33043
+ optional: false
33044
+ }],
33045
+ "snapshot.getSnapshotLinks": [{
33046
+ name: "targets",
33047
+ form: "object-array",
33048
+ optional: false,
33049
+ itemField: "deviceId"
33050
+ }],
33051
+ "snapshot.getSnapshotOverview": [{
33052
+ name: "deviceIds",
33053
+ form: "array",
33054
+ optional: false
33055
+ }],
33056
+ "snapshot.invalidateCache": [{
33057
+ name: "deviceId",
33058
+ form: "single",
33059
+ optional: false
33060
+ }],
33061
+ "streamBroker.acquireEgressTranscode": [{
33062
+ name: "deviceId",
33063
+ form: "single",
33064
+ optional: false
33065
+ }],
33066
+ "streamBroker.assignProfile": [{
33067
+ name: "deviceId",
33068
+ form: "single",
33069
+ optional: false
33070
+ }],
33071
+ "streamBroker.getDeviceAudioMute": [{
33072
+ name: "deviceId",
33073
+ form: "single",
33074
+ optional: false
33075
+ }],
33076
+ "streamBroker.getStreamWithCodec": [{
33077
+ name: "deviceId",
33078
+ form: "single",
33079
+ optional: false
33080
+ }],
33081
+ "streamBroker.produceEventMedia": [{
33082
+ name: "deviceId",
33083
+ form: "single",
33084
+ optional: false
33085
+ }],
33086
+ "streamBroker.publishCameraStream": [{
33087
+ name: "deviceId",
33088
+ form: "single",
33089
+ optional: false
33090
+ }],
33091
+ "streamBroker.renderPreBufferClip": [{
33092
+ name: "deviceId",
33093
+ form: "single",
33094
+ optional: false
33095
+ }],
33096
+ "streamBroker.restartProfile": [{
33097
+ name: "deviceId",
33098
+ form: "single",
33099
+ optional: false
33100
+ }],
33101
+ "streamBroker.retractCameraStream": [{
33102
+ name: "deviceId",
33103
+ form: "single",
33104
+ optional: false
33105
+ }],
33106
+ "streamBroker.setDeviceAudioMute": [{
33107
+ name: "deviceId",
33108
+ form: "single",
33109
+ optional: false
33110
+ }],
33111
+ "streamBroker.unassignProfile": [{
33112
+ name: "deviceId",
33113
+ form: "single",
33114
+ optional: false
33115
+ }],
33116
+ "streamCatalog.getCatalog": [{
33117
+ name: "deviceId",
33118
+ form: "single",
33119
+ optional: false
33120
+ }],
33121
+ "streamParams.getConfigSchema": [{
33122
+ name: "deviceId",
33123
+ form: "single",
33124
+ optional: false
33125
+ }],
33126
+ "streamParams.getOptions": [{
33127
+ name: "deviceId",
33128
+ form: "single",
33129
+ optional: false
33130
+ }],
33131
+ "streamParams.setProfile": [{
33132
+ name: "deviceId",
33133
+ form: "single",
33134
+ optional: false
33135
+ }],
33136
+ "switch.setState": [{
33137
+ name: "deviceId",
33138
+ form: "single",
33139
+ optional: false
33140
+ }],
33141
+ "vacuumControl.locate": [{
33142
+ name: "deviceId",
33143
+ form: "single",
33144
+ optional: false
33145
+ }],
33146
+ "vacuumControl.pause": [{
33147
+ name: "deviceId",
33148
+ form: "single",
33149
+ optional: false
33150
+ }],
33151
+ "vacuumControl.returnToBase": [{
33152
+ name: "deviceId",
33153
+ form: "single",
33154
+ optional: false
33155
+ }],
33156
+ "vacuumControl.setFanSpeed": [{
33157
+ name: "deviceId",
33158
+ form: "single",
33159
+ optional: false
33160
+ }],
33161
+ "vacuumControl.start": [{
33162
+ name: "deviceId",
33163
+ form: "single",
33164
+ optional: false
33165
+ }],
33166
+ "vacuumControl.stop": [{
33167
+ name: "deviceId",
33168
+ form: "single",
33169
+ optional: false
33170
+ }],
33171
+ "valve.close": [{
33172
+ name: "deviceId",
33173
+ form: "single",
33174
+ optional: false
33175
+ }],
33176
+ "valve.open": [{
33177
+ name: "deviceId",
33178
+ form: "single",
33179
+ optional: false
33180
+ }],
33181
+ "valve.setPosition": [{
33182
+ name: "deviceId",
33183
+ form: "single",
33184
+ optional: false
33185
+ }],
33186
+ "valve.stop": [{
33187
+ name: "deviceId",
33188
+ form: "single",
33189
+ optional: false
33190
+ }],
33191
+ "videoclips.getClipPlayback": [{
33192
+ name: "deviceId",
33193
+ form: "single",
33194
+ optional: false
33195
+ }],
33196
+ "videoclips.listClips": [{
33197
+ name: "deviceId",
33198
+ form: "single",
33199
+ optional: false
33200
+ }],
33201
+ "waterHeater.setAway": [{
33202
+ name: "deviceId",
33203
+ form: "single",
33204
+ optional: false
33205
+ }],
33206
+ "waterHeater.setOperationMode": [{
33207
+ name: "deviceId",
33208
+ form: "single",
33209
+ optional: false
33210
+ }],
33211
+ "waterHeater.setTargetTemp": [{
33212
+ name: "deviceId",
33213
+ form: "single",
33214
+ optional: false
33215
+ }],
33216
+ "webrtcSession.addIceCandidate": [{
33217
+ name: "deviceId",
33218
+ form: "single",
33219
+ optional: false
33220
+ }],
33221
+ "webrtcSession.closeSession": [{
33222
+ name: "deviceId",
33223
+ form: "single",
33224
+ optional: false
33225
+ }],
33226
+ "webrtcSession.createSession": [{
33227
+ name: "deviceId",
33228
+ form: "single",
33229
+ optional: false
33230
+ }],
33231
+ "webrtcSession.getIceCandidates": [{
33232
+ name: "deviceId",
33233
+ form: "single",
33234
+ optional: false
33235
+ }],
33236
+ "webrtcSession.getSessionState": [{
33237
+ name: "deviceId",
33238
+ form: "single",
33239
+ optional: false
33240
+ }],
33241
+ "webrtcSession.handleAnswer": [{
33242
+ name: "deviceId",
33243
+ form: "single",
33244
+ optional: false
33245
+ }],
33246
+ "webrtcSession.handleOffer": [{
33247
+ name: "deviceId",
33248
+ form: "single",
33249
+ optional: false
33250
+ }],
33251
+ "webrtcSession.hasAdaptiveBitrate": [{
33252
+ name: "deviceId",
33253
+ form: "single",
33254
+ optional: false
33255
+ }],
33256
+ "webrtcSession.listStreams": [{
33257
+ name: "deviceId",
33258
+ form: "single",
33259
+ optional: false
33260
+ }],
33261
+ "zoneAnalytics.getCameraHistory": [{
33262
+ name: "deviceId",
33263
+ form: "single",
33264
+ optional: false
33265
+ }],
33266
+ "zoneAnalytics.getCurrentSnapshot": [{
33267
+ name: "deviceId",
33268
+ form: "single",
33269
+ optional: false
33270
+ }],
33271
+ "zoneAnalytics.getUnzonedHistory": [{
33272
+ name: "deviceId",
33273
+ form: "single",
33274
+ optional: false
33275
+ }],
33276
+ "zoneAnalytics.getZoneHistory": [{
33277
+ name: "deviceId",
33278
+ form: "single",
33279
+ optional: false
33280
+ }],
33281
+ "zoneRules.listRules": [{
33282
+ name: "deviceId",
33283
+ form: "single",
33284
+ optional: false
33285
+ }],
33286
+ "zoneRules.setRules": [{
33287
+ name: "deviceId",
33288
+ form: "single",
33289
+ optional: false
33290
+ }],
33291
+ "zones.addZone": [{
33292
+ name: "deviceId",
33293
+ form: "single",
33294
+ optional: false
33295
+ }],
33296
+ "zones.listZones": [{
33297
+ name: "deviceId",
33298
+ form: "single",
33299
+ optional: false
33300
+ }],
33301
+ "zones.removeZone": [{
33302
+ name: "deviceId",
33303
+ form: "single",
33304
+ optional: false
33305
+ }],
33306
+ "zones.updateZone": [{
33307
+ name: "deviceId",
33308
+ form: "single",
33309
+ optional: false
33310
+ }]
33311
+ });
30707
33312
  Object.freeze({
30708
33313
  "broker": "broker",
30709
33314
  "device-export": "device-export",