@camstack/addon-provider-dreo 0.2.17 → 0.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2912 -144
  2. package/dist/addon.mjs +2912 -144
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-Cv9dO26A.mjs
39
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -243,6 +243,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
243
243
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
244
244
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
245
245
  /**
246
+ * A node the orchestrator would otherwise place cameras on has NO usable
247
+ * inference device: the operator enabled one or more accelerators there and
248
+ * the live probe reports every one of them unavailable. Emitted once per
249
+ * TRANSITION into that state (never per dispatch), and the node is dropped
250
+ * from the placement candidate set for as long as it holds.
251
+ *
252
+ * This exists because the state was previously invisible: little-unraid
253
+ * absorbed 283k inference errors in a day while still being handed cameras,
254
+ * and nothing in the system said so.
255
+ *
256
+ * A node with no accelerators configured at all is NOT this — its devices
257
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
258
+ * serves it exactly as before.
259
+ */
260
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
261
+ /**
262
+ * A camera has an OPEN detection session and has produced no detection at
263
+ * all for longer than the blind threshold — the camera is being decoded and
264
+ * inferred and is returning nothing. Emitted once per transition into blind,
265
+ * per camera.
266
+ *
267
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
268
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
269
+ * camera" produce byte-identical silence.
270
+ */
271
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
272
+ /**
246
273
  * Per-camera pipeline config was mutated by the orchestrator
247
274
  * (3-level settings change via `setAgentAddonDefaults` /
248
275
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3034,6 +3061,9 @@ function handlePipeResult(left, next, ctx) {
3034
3061
  fallback: left.fallback
3035
3062
  }, ctx);
3036
3063
  }
3064
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3065
+ $ZodPipe.init(inst, def);
3066
+ });
3037
3067
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3038
3068
  $ZodType.init(inst, def);
3039
3069
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5219,6 +5249,10 @@ function pipe(in_, out) {
5219
5249
  out
5220
5250
  });
5221
5251
  }
5252
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5253
+ ZodPipe.init(inst, def);
5254
+ $ZodPreprocess.init(inst, def);
5255
+ });
5222
5256
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5223
5257
  $ZodReadonly.init(inst, def);
5224
5258
  ZodType.init(inst, def);
@@ -5277,6 +5311,13 @@ function _instanceof(cls, params = {}) {
5277
5311
  };
5278
5312
  return inst;
5279
5313
  }
5314
+ function preprocess(fn, schema) {
5315
+ return new ZodPreprocess({
5316
+ type: "pipe",
5317
+ in: transform(fn),
5318
+ out: schema
5319
+ });
5320
+ }
5280
5321
  //#endregion
5281
5322
  //#region ../../node_modules/zod/v4/classic/compat.js
5282
5323
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10913,6 +10954,8 @@ var QueryFilterSchema = object({
10913
10954
  where: record(string(), unknown()).optional(),
10914
10955
  whereIn: record(string(), array(unknown())).optional(),
10915
10956
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10957
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10958
+ whereNot: record(string(), unknown()).optional(),
10916
10959
  orderBy: object({
10917
10960
  field: string(),
10918
10961
  direction: _enum(["asc", "desc"])
@@ -10932,7 +10975,8 @@ var QueryFilterSchema = object({
10932
10975
  var MutationFilterSchema = object({
10933
10976
  where: record(string(), unknown()).optional(),
10934
10977
  whereIn: record(string(), array(unknown())).optional(),
10935
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10978
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10979
+ whereNot: record(string(), unknown()).optional()
10936
10980
  });
10937
10981
  /** A single stored record: `{ id, data }`. */
10938
10982
  var SettingsRecordSchema = object({
@@ -12468,6 +12512,17 @@ var LlmImageSchema = object({
12468
12512
  bytes: _instanceof(Uint8Array),
12469
12513
  mimeType: string()
12470
12514
  });
12515
+ /**
12516
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12517
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12518
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12519
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12520
+ */
12521
+ var LlmRetryPolicySchema = object({
12522
+ enabled: boolean().default(false),
12523
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12524
+ maxAttempts: number().int().min(1).max(5).default(1)
12525
+ });
12471
12526
  var LlmGenerateBaseInputSchema = object({
12472
12527
  /** Collection routing (the notification-output posture). */
12473
12528
  addonId: string().optional(),
@@ -12482,7 +12537,28 @@ var LlmGenerateBaseInputSchema = object({
12482
12537
  jsonSchema: record(string(), unknown()).optional(),
12483
12538
  /** Per-call override of the profile default. */
12484
12539
  maxTokens: number().int().positive().optional(),
12485
- temperature: number().optional()
12540
+ temperature: number().optional(),
12541
+ /** Per-call override of the profile default (nucleus sampling). */
12542
+ topP: number().min(0).max(1).optional(),
12543
+ /** Per-call override of the profile default (top-k sampling). */
12544
+ topK: number().int().positive().optional(),
12545
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12546
+ timeoutMs: number().int().positive().optional(),
12547
+ /** Per-call override; beats both the consumer table and the profile. */
12548
+ retry: LlmRetryPolicySchema.optional(),
12549
+ /**
12550
+ * Caller-minted id that makes this generation CANCELLABLE.
12551
+ *
12552
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12553
+ * the call against 8 s and free their own slot when the timer wins, while the
12554
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12555
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12556
+ * not generations, and the real load is unbounded.
12557
+ *
12558
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12559
+ * `llm.cancel({ requestId })` tears the socket down.
12560
+ */
12561
+ requestId: string().optional()
12486
12562
  });
12487
12563
  /**
12488
12564
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12495,6 +12571,18 @@ var LlmGenerateBaseInputSchema = object({
12495
12571
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12496
12572
  * watchdog — operator decision #3).
12497
12573
  */
12574
+ /**
12575
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12576
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12577
+ * REF rather than looked up at install time, so what the operator approved in
12578
+ * the preview is exactly what the node downloads.
12579
+ */
12580
+ var ManagedModelExtraFileSchema = object({
12581
+ url: string(),
12582
+ filename: string(),
12583
+ sizeBytes: number(),
12584
+ sha256: string().optional()
12585
+ });
12498
12586
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12499
12587
  object({
12500
12588
  kind: literal("catalog"),
@@ -12503,7 +12591,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12503
12591
  object({
12504
12592
  kind: literal("url"),
12505
12593
  url: string(),
12506
- sha256: string().optional()
12594
+ sha256: string().optional(),
12595
+ /** Picker/status label; the file basename when absent. */
12596
+ label: string().optional(),
12597
+ sizeBytes: number().optional(),
12598
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12507
12599
  }),
12508
12600
  object({
12509
12601
  kind: literal("path"),
@@ -12521,13 +12613,82 @@ var ManagedRuntimeConfigSchema = object({
12521
12613
  gpuLayers: number().int().default(0),
12522
12614
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12523
12615
  threads: number().int().optional(),
12524
- /** Concurrent slots. */
12616
+ /** Concurrent slots (`--parallel`). */
12525
12617
  parallel: number().int().default(1),
12618
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12619
+ batchSize: number().int().positive().optional(),
12620
+ /** Physical batch / micro-batch (`-ub`). */
12621
+ ubatchSize: number().int().positive().optional(),
12622
+ /**
12623
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12624
+ * is a no-op elsewhere, so it is offered rather than assumed.
12625
+ */
12626
+ flashAttention: boolean().default(false),
12627
+ /**
12628
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12629
+ * inference. Costs the full model size in resident memory — which is exactly
12630
+ * what the RAM budget is counting.
12631
+ */
12632
+ mlock: boolean().default(false),
12633
+ /**
12634
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12635
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12636
+ * store produces on every first token.
12637
+ */
12638
+ noMmap: boolean().default(false),
12639
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12640
+ * cheapest way to fit a longer context in the same RAM. */
12641
+ cacheTypeK: _enum([
12642
+ "f32",
12643
+ "f16",
12644
+ "q8_0",
12645
+ "q5_1",
12646
+ "q5_0",
12647
+ "q4_1",
12648
+ "q4_0"
12649
+ ]).optional(),
12650
+ cacheTypeV: _enum([
12651
+ "f32",
12652
+ "f16",
12653
+ "q8_0",
12654
+ "q5_1",
12655
+ "q5_0",
12656
+ "q4_1",
12657
+ "q4_0"
12658
+ ]).optional(),
12659
+ /**
12660
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12661
+ * (which most vision chat templates need and some language-only models
12662
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12663
+ *
12664
+ * It is NOT a second place to set the flags above. A token that collides
12665
+ * with a typed field is REJECTED at start, naming the field that owns it
12666
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12667
+ * the "two switches that disagree" failure this repo has already shipped
12668
+ * twice (D62).
12669
+ */
12670
+ extraArgs: array(string()).default([]),
12526
12671
  /** Else lazy: first generate boots it. */
12527
12672
  autoStart: boolean().default(false),
12528
12673
  /** 0 = never; frees RAM after quiet periods. */
12529
12674
  idleStopMinutes: number().int().default(30)
12530
12675
  });
12676
+ /**
12677
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12678
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12679
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12680
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12681
+ */
12682
+ var LlmDownloadProgressSchema = object({
12683
+ phase: _enum(["downloading", "verifying"]),
12684
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12685
+ file: string(),
12686
+ fileIndex: number().int(),
12687
+ fileCount: number().int(),
12688
+ /** Across the WHOLE install, not the current file. */
12689
+ downloadedBytes: number(),
12690
+ totalBytes: number().optional()
12691
+ });
12531
12692
  var LlmRuntimeStatusSchema = object({
12532
12693
  /** Status is ALWAYS node-qualified. */
12533
12694
  nodeId: string(),
@@ -12544,6 +12705,8 @@ var LlmRuntimeStatusSchema = object({
12544
12705
  modelPath: string().optional(),
12545
12706
  modelId: string().optional(),
12546
12707
  downloadProgress: number().min(0).max(1).optional(),
12708
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12709
+ download: LlmDownloadProgressSchema.optional(),
12547
12710
  lastError: string().optional(),
12548
12711
  crashesInWindow: number(),
12549
12712
  /** Child RSS (sampled best-effort). */
@@ -12554,7 +12717,14 @@ var LlmNodeModelSchema = object({
12554
12717
  file: string(),
12555
12718
  sizeBytes: number(),
12556
12719
  catalogId: string().optional(),
12557
- installedAt: number().optional()
12720
+ installedAt: number().optional(),
12721
+ /**
12722
+ * Absolute path on the node. Present so a file that is on disk but matches
12723
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12724
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12725
+ * it the picker could list such a file and do nothing with it.
12726
+ */
12727
+ path: string().optional()
12558
12728
  });
12559
12729
  var LlmRuntimeDiskUsageSchema = object({
12560
12730
  nodeId: string(),
@@ -12610,10 +12780,47 @@ var LlmProfileSchema = object({
12610
12780
  baseUrl: string().optional(),
12611
12781
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12612
12782
  apiKey: string().optional(),
12783
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12784
+ * degraded to text — that shipped once and produced a confident answer to a
12785
+ * question about a picture nobody sent. */
12613
12786
  supportsVision: boolean(),
12614
12787
  temperature: number().min(0).max(2).optional(),
12788
+ /** Nucleus sampling. Every wire we speak has it. */
12789
+ topP: number().min(0).max(1).optional(),
12790
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12791
+ * wire does, and the client drops it there (measured: the request body gets
12792
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12793
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12794
+ topK: number().int().positive().optional(),
12615
12795
  maxTokens: number().int().positive().optional(),
12796
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12797
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12798
+ * the model with, so it is the one field that changes a PROCESS. */
12799
+ contextLength: number().int().positive().optional(),
12800
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12801
+ * two system prompts fighting is worse than either alone). */
12802
+ systemPrompt: string().optional(),
12803
+ /** Total generation bound — the only one a unary call has. */
12616
12804
  timeoutMs: number().int().positive().default(6e4),
12805
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12806
+ * response headers: on the LM Studio / llama-server wire those are written
12807
+ * once the model has finished loading, so they belong to the bound below. */
12808
+ connectTimeoutMs: number().int().positive().default(1e4),
12809
+ /** Accepted, but no output yet — response headers included, because a cold
12810
+ * GPU load is exactly what happens before them. */
12811
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12812
+ /** Output started then stopped. */
12813
+ idleTimeoutMs: number().int().positive().default(6e4),
12814
+ /** Profile-level default. The per-consumer table and a per-call override
12815
+ * both beat it — see `resolveRetryPolicy`. */
12816
+ retry: LlmRetryPolicySchema.default({
12817
+ enabled: false,
12818
+ maxAttempts: 1
12819
+ }),
12820
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12821
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12822
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12823
+ toolsEnabled: boolean().default(false),
12617
12824
  extraHeaders: record(string(), string()).optional(),
12618
12825
  /** kind === 'managed-local' only (spec §4). */
12619
12826
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12663,6 +12870,36 @@ var ManagedModelCatalogEntrySchema = object({
12663
12870
  /** Vision models: companion projector file. */
12664
12871
  mmprojUrl: string().optional()
12665
12872
  });
12873
+ /**
12874
+ * The outcome of turning one operator-typed Hugging Face reference into a
12875
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12876
+ * I will not pick for you" is a normal answer the UI has to render, not an
12877
+ * exception.
12878
+ *
12879
+ * `candidates` is the whole reason the refusal is usable — every string in it
12880
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12881
+ */
12882
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12883
+ ok: literal(true),
12884
+ /** Ready to hand to `installModel` unchanged. */
12885
+ model: ManagedModelRefSchema,
12886
+ label: string(),
12887
+ repo: string(),
12888
+ quantization: string(),
12889
+ purpose: _enum(["text", "vision"]),
12890
+ totalBytes: number(),
12891
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12892
+ * see that 0.9 GB of it is a projector they did not name. */
12893
+ extraFilenames: array(string())
12894
+ }), object({
12895
+ ok: literal(false),
12896
+ code: string(),
12897
+ message: string(),
12898
+ candidates: array(string()).optional(),
12899
+ /** Set when the refusal was only the ceiling: re-calling with
12900
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12901
+ requiredBytes: number().optional()
12902
+ })]);
12666
12903
  var LlmRuntimeNodeSchema = object({
12667
12904
  nodeId: string(),
12668
12905
  reachable: boolean(),
@@ -12675,7 +12912,10 @@ var ProfileRefInputSchema = object({
12675
12912
  addonId: string(),
12676
12913
  profileId: string()
12677
12914
  });
12678
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12915
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12916
+ addonId: string().optional(),
12917
+ requestId: string()
12918
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12679
12919
  kind: "mutation",
12680
12920
  auth: "admin"
12681
12921
  }), method(ProfileRefInputSchema, _void(), {
@@ -12696,6 +12936,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12696
12936
  consumer: string().optional(),
12697
12937
  profileId: string().optional()
12698
12938
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12939
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12940
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12941
+ ref: string(),
12942
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12943
+ maxBytes: number().positive().optional()
12944
+ }), HfModelResolutionSchema, {
12945
+ kind: "mutation",
12946
+ auth: "admin"
12947
+ }), method(object({
12699
12948
  nodeId: string(),
12700
12949
  model: ManagedModelRefSchema
12701
12950
  }), _void(), {
@@ -14343,6 +14592,8 @@ var NcSystemEventKindSchema = _enum([
14343
14592
  "stream-offline",
14344
14593
  "node-online",
14345
14594
  "node-offline",
14595
+ "node-inference-unavailable",
14596
+ "detection-blind",
14346
14597
  "addon-update-available",
14347
14598
  "server-update-available",
14348
14599
  "alarm-triggered",
@@ -14404,7 +14655,16 @@ var NcScheduleSchema = object({
14404
14655
  });
14405
14656
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14406
14657
  var NcPlateMatcherSchema = object({
14407
- values: array(string().min(1)).min(1),
14658
+ /**
14659
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14660
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14661
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14662
+ * rather than merely seen. A subject carrying no plate still fails.
14663
+ *
14664
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14665
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14666
+ */
14667
+ values: array(string().min(1)),
14408
14668
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14409
14669
  maxDistance: number().int().min(0).max(3).default(1)
14410
14670
  });
@@ -14438,28 +14698,36 @@ var NcOccupancyConditionSchema = object({
14438
14698
  /**
14439
14699
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14440
14700
  *
14441
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14442
- * reference notifier uses, so an operator moving between them re-uses what
14443
- * they already know): a rule matches when, over a sampling window of
14444
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14445
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14446
- *
14447
- * - `dbThreshold` its level is at or above this many dBFS (see
14448
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14449
- * - `labels` the classifier put at least one of these labels on it.
14450
- *
14451
- * Both are OPTIONAL and independent, which is the point of the shape: a
14452
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14453
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14454
- * is given** a window in which every sample is trivially a hit would fire on
14455
- * silence, so the engine refuses such a condition rather than notifying on
14456
- * nothing (the schema cannot express "at least one of" without becoming a
14457
- * ZodEffects the cap path would have to special-case).
14458
- *
14459
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14460
- * must be FULL before it can match a window that has been open for two
14461
- * seconds of its ten is 100% of nothing, and firing on it would make
14462
- * `samplingSeconds` decorative.
14701
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14702
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14703
+ * there is no second switch that can disagree with the first and every rule
14704
+ * authored before the decision migrates for free (`audioModeOf`):
14705
+ *
14706
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14707
+ * classifier labels with one of them. No window, no percentage:
14708
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14709
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14710
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14711
+ * reaches this condition if the classifier was already confident enough.
14712
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14713
+ * the condition: at least `hitPercent`% of the samples over
14714
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14715
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14716
+ * must be FULL before it can match a window open for two of its ten
14717
+ * seconds is 100% of nothing.
14718
+ *
14719
+ * **Why label mode has no window.** It had one, and it never fired: the
14720
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14721
+ * of them per episode, even through continuous crying. The measured maximum
14722
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14723
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14724
+ * the wrong question to ask of a sparse classifier.
14725
+ *
14726
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14727
+ * and the rule would fire on silence. The schema cannot express "exactly one
14728
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14729
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14730
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14463
14731
  *
14464
14732
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14465
14733
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14467,13 +14735,13 @@ var NcOccupancyConditionSchema = object({
14467
14735
  * an operator who typed `dog` mean the same thing.
14468
14736
  */
14469
14737
  var NcAudioConditionSchema = object({
14470
- /** Audio macro labels; absent = any sound (level-only rule). */
14738
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14471
14739
  labels: array(string().min(1)).min(1).optional(),
14472
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14740
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14473
14741
  dbThreshold: number().min(-96).max(0).optional(),
14474
- /** Percentage of the window's samples that must be hits (1–100). */
14742
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14475
14743
  hitPercent: number().int().min(1).max(100).default(60),
14476
- /** Length of the sampling window in seconds. */
14744
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14477
14745
  samplingSeconds: number().int().min(1).max(300).default(10)
14478
14746
  });
14479
14747
  /**
@@ -14611,13 +14879,81 @@ var NcRuleActionsSchema = object({
14611
14879
  */
14612
14880
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14613
14881
  });
14882
+ /**
14883
+ * "This rule applies only while `deviceId` is in one of `states`."
14884
+ *
14885
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14886
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14887
+ * make the condition lie about devices whose states have no equivalent.
14888
+ *
14889
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14890
+ * condition that fired on "I could not read it" would be worse than no gate.
14891
+ */
14892
+ var NcDeviceStateConditionSchema = object({
14893
+ deviceId: number().int(),
14894
+ /** Any of these matches. */
14895
+ states: array(string().min(1)).min(1)
14896
+ });
14897
+ /**
14898
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14899
+ *
14900
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14901
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14902
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14903
+ * already has a trigger ("tell me about a person at the front door, but only
14904
+ * while the bin is still out"). That is why it composes with every delivery
14905
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14906
+ * kind exist for it — see D159.
14907
+ *
14908
+ * ── Identity ───────────────────────────────────────────────────────────────
14909
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14910
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14911
+ * carried as a HINT for the editor and for the log line, never as part of the
14912
+ * lookup key: a rule whose hint drifted must still gate correctly.
14913
+ *
14914
+ * ── Which boolean ──────────────────────────────────────────────────────────
14915
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14916
+ * already declares which boolean drives notification rules, and a second knob
14917
+ * that could disagree with it is exactly the D62 failure. Set it only to
14918
+ * override one rule against the scene's own default.
14919
+ *
14920
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14921
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14922
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14923
+ * evidence, in either direction.
14924
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14925
+ * The latch is a durable fact about the past ("it has diverged since I armed
14926
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14927
+ * reason the operator asked for a latch.
14928
+ *
14929
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14930
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14931
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14932
+ * said out loud in the log rather than dropped in silence.
14933
+ */
14934
+ var NcSceneConditionSchema = object({
14935
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14936
+ sceneId: string().min(1),
14937
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14938
+ deviceId: number().int().optional(),
14939
+ /** The state the scene must be in for the rule to fire. */
14940
+ requiredState: _enum(["matched", "diverged"]),
14941
+ /**
14942
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14943
+ * scene's own `emit` field, which is the only place that decision belongs.
14944
+ */
14945
+ latched: boolean().optional()
14946
+ });
14614
14947
  var NcConditionsSchema = object({
14615
14948
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14616
- deviceState: object({
14617
- deviceId: number().int(),
14618
- /** Any of these matches. */
14619
- states: array(string().min(1)).min(1)
14620
- }).optional(),
14949
+ deviceState: NcDeviceStateConditionSchema.optional(),
14950
+ /**
14951
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14952
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14953
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14954
+ * {@link NcSceneCondition} and D159.
14955
+ */
14956
+ scene: NcSceneConditionSchema.optional(),
14621
14957
  /** Device scope — absent = all devices. */
14622
14958
  devices: array(number()).optional(),
14623
14959
  /** Detector class names (any overlap with the record's class set). */
@@ -14643,18 +14979,47 @@ var NcConditionsSchema = object({
14643
14979
  */
14644
14980
  labelEquals: array(string().min(1)).optional(),
14645
14981
  /**
14646
- * Identity matcher. P1 boundary: matched against the record's collapsed
14647
- * `label` (the identity display name propagated by the face pipeline) —
14648
- * identity-ID matching rides in P2 when identity ids reach the record.
14982
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14983
+ * is about recognised people at all.
14984
+ *
14985
+ * Three states, and the empty one is the point:
14986
+ *
14987
+ * | value | meaning |
14988
+ * | --- | --- |
14989
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14990
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14991
+ * | a list | only these identities |
14992
+ *
14993
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14994
+ * `devices` list is every device), applied one level down: the operator has
14995
+ * turned the face scope ON and narrowed it to nothing, which is every known
14996
+ * face. No second field states the same thing — a switch that can disagree
14997
+ * with the list under it is worse than no switch (D62).
14998
+ *
14999
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
15000
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
15001
+ * the operator fixed the spelling. The id reaches the record on
15002
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
15003
+ * `{{label}}` renders.
15004
+ *
15005
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
15006
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
15007
+ * for is left as it stands and reported, never dropped. The engine also
15008
+ * accepts a display-name hit as a compatibility leg, so a rule whose
15009
+ * migration could not resolve keeps matching exactly what it matched before.
14649
15010
  */
14650
15011
  identities: array(string().min(1)).optional(),
14651
- /** Fuzzy plate matcher against the record's `label` (plate text). */
15012
+ /**
15013
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
15014
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
15015
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
15016
+ */
14652
15017
  plates: NcPlateMatcherSchema.optional(),
14653
15018
  /**
14654
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14655
- * Same P1 boundary: matched against the record's collapsed `label` (the
14656
- * identity display name). A record with NO label passes (nothing to
14657
- * exclude), unlike the include variant which fails on an absent label.
15019
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
15020
+ * the same id members and the same lazy name→id migration. A record with NO
15021
+ * identity passes (nothing to exclude), unlike the include variant which
15022
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14658
15023
  */
14659
15024
  identitiesExclude: array(string().min(1)).optional(),
14660
15025
  /**
@@ -15046,7 +15411,80 @@ var NcRuleInputSchema = object({
15046
15411
  * a rule that predates the gate must keep delivering byte-for-byte as it
15047
15412
  * did, and absent is the only way to say that without a migration.
15048
15413
  */
15049
- confirm: NcConfirmSchema.optional()
15414
+ confirm: NcConfirmSchema.optional(),
15415
+ /**
15416
+ * WAIT for face/plate recognition before saying anything.
15417
+ *
15418
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15419
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15420
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15421
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15422
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15423
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15424
+ *
15425
+ * Only two honest answers exist, and this flag picks between them. It has
15426
+ * effect ONLY on a rule that declares a recognition scope
15427
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15428
+ * other rule there is nothing to wait for and the flag is inert.
15429
+ *
15430
+ * | value | what happens |
15431
+ * | --- | --- |
15432
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15433
+ * | 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) |
15434
+ *
15435
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15436
+ * on the addon cap path, and absent has to keep meaning exactly what every
15437
+ * rule authored before this field meant.
15438
+ *
15439
+ * The cost of `true` is stated here because the editor states it too: a rule
15440
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15441
+ * tests every zone the track visited and a `crossing` condition can no longer
15442
+ * be satisfied, because a closed track carries no crossing.
15443
+ */
15444
+ waitForEnhancement: boolean().optional(),
15445
+ /**
15446
+ * GROUP a burst of subjects into ONE notification that grows.
15447
+ *
15448
+ * Seconds of quiet after the last matching subject before the burst is
15449
+ * considered over. While it is open, the first subject enqueues immediately —
15450
+ * **exactly as today, with no added latency** — and every real growth (a new
15451
+ * subject, or a name confirmed on one already in it) REPLACES that
15452
+ * notification with an updated one naming everybody. The push carries the
15453
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15454
+ *
15455
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15456
+ *
15457
+ * ### Why an idle cutoff and not a window
15458
+ *
15459
+ * The measured seven-person arrival on device 590 spans 110 s with every
15460
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15461
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15462
+ * 30 is Frigate's shipped value for the same decision.
15463
+ *
15464
+ * ### What it replaces
15465
+ *
15466
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15467
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15468
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15469
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15470
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15471
+ * budget over GROUPS — which is what it always meant — and a growth is never
15472
+ * throttled by the window its own first member spent.
15473
+ *
15474
+ * ### Interaction with {@link waitForEnhancement}
15475
+ *
15476
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15477
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15478
+ * CLOSE — already carrying its name — and grows as later members close. That
15479
+ * is later, and complete. With grouping alone the group opens on the first
15480
+ * object event and picks up names as they are confirmed, through the growth
15481
+ * path. Neither combination fires twice for one subject.
15482
+ *
15483
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15484
+ * on the addon cap path, so absent must keep meaning what it meant before this
15485
+ * field existed.
15486
+ */
15487
+ groupIdleSec: number().int().min(0).max(600).optional()
15050
15488
  });
15051
15489
  /**
15052
15490
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15153,6 +15591,7 @@ var NcConditionDescriptorSchema = object({
15153
15591
  "occupancy",
15154
15592
  "audio",
15155
15593
  "deviceState",
15594
+ "scene",
15156
15595
  "systemEvent"
15157
15596
  ]),
15158
15597
  operator: _enum([
@@ -15558,7 +15997,87 @@ var MethodAccessSchema = _enum([
15558
15997
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15559
15998
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15560
15999
  var CapScopeSchema = _enum(["device", "system"]);
15561
- var TokenScopeSchema = discriminatedUnion("type", [
16000
+ /**
16001
+ * DeviceSelector (scope model v3 — 2026-08-12).
16002
+ *
16003
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
16004
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
16005
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
16006
+ * AFTER the grant was minted — no re-grant, no re-login.
16007
+ *
16008
+ * - `all` — every device in the deployment. The broad viewer/operator
16009
+ * lever without a `category` grant (a `category` grant also covers device
16010
+ * caps that carry no deviceId; `all` is specifically the device set).
16011
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
16012
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
16013
+ * is NOT covered until the grant is edited.
16014
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
16015
+ * DYNAMIC. A device that changes type, or a new device of the type,
16016
+ * re-resolves on the next request.
16017
+ * - `locations` — every device whose operator-assigned `location` label is
16018
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
16019
+ * null/unset location matches NO `locations` selector.
16020
+ */
16021
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
16022
+ object({ kind: literal("all") }),
16023
+ object({
16024
+ kind: literal("ids"),
16025
+ ids: array(number().int()).min(1)
16026
+ }),
16027
+ object({
16028
+ kind: literal("types"),
16029
+ types: array(_enum(DeviceType)).min(1)
16030
+ }),
16031
+ object({
16032
+ kind: literal("locations"),
16033
+ locations: array(string().min(1)).min(1)
16034
+ })
16035
+ ]);
16036
+ var DeviceTokenScopeSchema = object({
16037
+ type: literal("device"),
16038
+ /** The device SET this grant covers — resolved against the live fleet. */
16039
+ selector: DeviceSelectorSchema,
16040
+ access: array(MethodAccessSchema).min(1),
16041
+ /**
16042
+ * Whether a grant on a PARENT device transparently covers its accessory
16043
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
16044
+ * Direction is parent → children ONLY.
16045
+ *
16046
+ * Absent → the matcher DERIVES it from the access flavour: `view`
16047
+ * inherits (a camera viewer sees the camera's accessories), `create` /
16048
+ * `delete` do NOT (actuating/removing a child is an explicit act the
16049
+ * operator must grant on the child, not inherit from the parent). Set it
16050
+ * explicitly to override that default per grant.
16051
+ */
16052
+ includeLinked: boolean().optional()
16053
+ });
16054
+ /**
16055
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16056
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16057
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16058
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16059
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16060
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16061
+ * migration cannot reach a JWT already in a client's hands; parse-time
16062
+ * migration covers both without a flag day. No cast — the raw object is read
16063
+ * through `Reflect.get` (its static type is `unknown`).
16064
+ */
16065
+ function migrateLegacyTokenScope(raw) {
16066
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16067
+ if (Reflect.get(raw, "type") !== "device") return raw;
16068
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16069
+ const targets = Reflect.get(raw, "targets");
16070
+ if (!Array.isArray(targets)) return raw;
16071
+ return {
16072
+ type: "device",
16073
+ selector: {
16074
+ kind: "ids",
16075
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16076
+ },
16077
+ access: Reflect.get(raw, "access")
16078
+ };
16079
+ }
16080
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15562
16081
  object({
15563
16082
  type: literal("category"),
15564
16083
  target: CapScopeSchema,
@@ -15574,18 +16093,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15574
16093
  target: string(),
15575
16094
  access: array(MethodAccessSchema).min(1)
15576
16095
  }),
15577
- object({
15578
- type: literal("device"),
15579
- /**
15580
- * One or more deviceIds (serialised as strings for wire-format
15581
- * consistency with the rest of the union). Matcher accepts if
15582
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15583
- * of one scope-per-device when granting access to a set of cameras.
15584
- */
15585
- targets: array(string()).min(1),
15586
- access: array(MethodAccessSchema).min(1)
15587
- })
15588
- ]);
16096
+ DeviceTokenScopeSchema
16097
+ ]));
15589
16098
  object({
15590
16099
  id: string(),
15591
16100
  username: string(),
@@ -15902,7 +16411,7 @@ var TrackEnvelopeSchema = object({
15902
16411
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15903
16412
  * keeps every scalar the list surfaces actually render (ids, class(es),
15904
16413
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15905
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16414
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15906
16415
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15907
16416
  * `getTrack`. Mirrors the event-store `projection` convention
15908
16417
  * (`getObjectEvents` et al.).
@@ -16038,7 +16547,21 @@ union([literal(1), literal(2)]);
16038
16547
  var LabelAttributionSchema = object({
16039
16548
  stepId: string(),
16040
16549
  modelId: string().optional(),
16041
- decidedAt: number()
16550
+ decidedAt: number(),
16551
+ /**
16552
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16553
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16554
+ *
16555
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16556
+ * notification rule authored on "Gianluca" stopped matching the moment the
16557
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16558
+ * the thing that does not move, so it is what a rule matches on
16559
+ * (`NcConditions.identities`) and the text is what a human is shown.
16560
+ *
16561
+ * Absent when the label names no gallery row — a plate the OCR read but no
16562
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16563
+ */
16564
+ identityId: string().optional()
16042
16565
  });
16043
16566
  /**
16044
16567
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16175,6 +16698,28 @@ var TrackSchema = object({
16175
16698
  * `=== true` and render nothing otherwise, never infer "no face".
16176
16699
  */
16177
16700
  hasFace: boolean().optional(),
16701
+ /**
16702
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16703
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16704
+ * so the passage is tracked once and as a VEHICLE.
16705
+ *
16706
+ * It exists because the fold's record was dishonest. D34 and the code both
16707
+ * said "the person is not lost — it is reported so both entities stay on the
16708
+ * record"; in fact the pair went into a per-processor RAM field behind an
16709
+ * accessor nobody called, and every durable surface said `vehicle`, full
16710
+ * stop. This is the composition note that makes the row true.
16711
+ *
16712
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16713
+ * person" is not an answer to "what is this" — both label tiers would refuse
16714
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16715
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16716
+ * and a `person` rule still does not fire for someone cycling past.
16717
+ *
16718
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16719
+ * the column, and every hub that predates the field, omits it. Test
16720
+ * `=== true` and render nothing otherwise — never infer "no rider".
16721
+ */
16722
+ hasRider: boolean().optional(),
16178
16723
  ...TrackFlagFields,
16179
16724
  ...TrackRetrainFields
16180
16725
  });
@@ -16524,7 +17069,10 @@ var RecentTracksQueryInput = object({
16524
17069
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16525
17070
  cursor: string().optional(),
16526
17071
  /** See {@link TrackProjectionSchema}. Default `full`. */
16527
- projection: TrackProjectionSchema.optional()
17072
+ projection: TrackProjectionSchema.optional(),
17073
+ /** Include stationary-promoted rows (parked objects). Default false: the
17074
+ * feed lists passages; parking records live on the stationary registry. */
17075
+ includeStationary: boolean().optional()
16528
17076
  });
16529
17077
  var RecentTracksPageSchema = object({
16530
17078
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16742,7 +17290,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16742
17290
  zone: TrackZoneFilterSchema.optional(),
16743
17291
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16744
17292
  * compatible — omitting the field keeps today's exact behaviour). */
16745
- projection: TrackProjectionSchema.optional()
17293
+ projection: TrackProjectionSchema.optional(),
17294
+ /** Include stationary-promoted rows (parked objects handed to the
17295
+ * stationary registry). Default false: the timeline lists passages,
17296
+ * not parking records (operator decision, 2026-08-15). */
17297
+ includeStationary: boolean().optional()
16746
17298
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16747
17299
  kind: "mutation",
16748
17300
  auth: "admin"
@@ -16906,11 +17458,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16906
17458
  auth: "admin"
16907
17459
  }), method(object({
16908
17460
  eventId: string(),
16909
- kind: MediaFileKindEnum.optional()
17461
+ kind: MediaFileKindEnum.optional(),
17462
+ deviceId: number()
17463
+ }), array(MediaFileSchema).readonly()), method(object({
17464
+ trackId: string(),
17465
+ kinds: array(MediaFileKindEnum).optional(),
17466
+ deviceId: number()
16910
17467
  }), array(MediaFileSchema).readonly()), method(object({
16911
17468
  trackId: string(),
16912
- kinds: array(MediaFileKindEnum).optional()
16913
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17469
+ deviceId: number()
17470
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16914
17471
  kind: "mutation",
16915
17472
  auth: "admin"
16916
17473
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17610,6 +18167,17 @@ var maxSessionHoldMsField = {
17610
18167
  default: 12e4,
17611
18168
  step: 5e3
17612
18169
  };
18170
+ /**
18171
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18172
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18173
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18174
+ */
18175
+ var audioMotionWindowMsField = {
18176
+ min: 5e3,
18177
+ max: 6e5,
18178
+ default: 9e4,
18179
+ step: 5e3
18180
+ };
17613
18181
  var motionFpsField = {
17614
18182
  min: 1,
17615
18183
  max: 30,
@@ -17641,7 +18209,7 @@ var detectionFpsField = {
17641
18209
  var occupancyRecheckSecField = {
17642
18210
  min: 0,
17643
18211
  max: 300,
17644
- default: 30,
18212
+ default: 300,
17645
18213
  step: 5
17646
18214
  };
17647
18215
  var occupancyRecheckFramesField = {
@@ -17786,6 +18354,27 @@ var RunnerCameraConfigSchema = object({
17786
18354
  * resolved `CameraDetectionConfig`.
17787
18355
  */
17788
18356
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18357
+ /**
18358
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18359
+ * 'on-motion'` audio window, measured from the LAST motion event.
18360
+ *
18361
+ * This exists because the falling edge cannot be relied on. Camera-native
18362
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18363
+ * its email-push SMTP path both emit `detected: true` and never the
18364
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18365
+ * onboard-only camera a window that closed only on `detected: false` never
18366
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18367
+ * battery camera, the one failure mode the mode exists to prevent.
18368
+ *
18369
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18370
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18371
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18372
+ *
18373
+ * Not consumed by the runner: carried here so it shares the per-camera
18374
+ * device-settings surface with `motionCooldownMs`, exactly like
18375
+ * `maxSessionHoldMs`.
18376
+ */
18377
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17789
18378
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17790
18379
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17791
18380
  motionStreamId: string(),
@@ -17881,7 +18470,7 @@ var RunnerCameraConfigSchema = object({
17881
18470
  */
17882
18471
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17883
18472
  });
17884
- 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;
18473
+ 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;
17885
18474
  /**
17886
18475
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17887
18476
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18867,7 +19456,31 @@ DeviceType.Camera, method(object({
18867
19456
  lastCapturedAt: number().nullable(),
18868
19457
  cacheAgeMs: number().nullable(),
18869
19458
  etag: string().nullable()
18870
- }))), systemMethod(object({
19459
+ }))), systemMethod(object({ deviceId: number() }), object({
19460
+ /** The battery slice as read, or null when the device has none. */
19461
+ battery: object({
19462
+ sleeping: boolean(),
19463
+ lastUpdated: number(),
19464
+ lastContactAt: number().optional()
19465
+ }).nullable(),
19466
+ /** The resolved snapshot state (what the overlay decision used). */
19467
+ state: object({
19468
+ isBattery: boolean(),
19469
+ reason: _enum([
19470
+ "disabled",
19471
+ "sleeping",
19472
+ "unreachable",
19473
+ "waking"
19474
+ ]).nullable()
19475
+ }),
19476
+ /** The cached frame behind the next paint. */
19477
+ frame: object({
19478
+ capturedAt: number().nullable(),
19479
+ ageMs: number().nullable()
19480
+ }),
19481
+ /** A wake window is currently open (the Waking overlay's source). */
19482
+ waking: boolean()
19483
+ })), systemMethod(object({
18871
19484
  /** The tiles a surface is actually rendering. One entry per (device,
18872
19485
  * width) the caller will paint — the width is snapped to the server's
18873
19486
  * ladder and becomes part of the link's SIGNED identity. */
@@ -18897,7 +19510,16 @@ targets: array(object({
18897
19510
  /** A sleeping battery camera: the frame is deliberately stale and will
18898
19511
  * NOT refresh in the background. A surface should say so rather than
18899
19512
  * present it as current. */
18900
- sleeping: boolean()
19513
+ sleeping: boolean(),
19514
+ /** Current device state rendered over the cached frame. State images
19515
+ * remain authoritative even when their photographic background is
19516
+ * old; null means the link must carry a current camera frame. */
19517
+ stateReason: _enum([
19518
+ "disabled",
19519
+ "sleeping",
19520
+ "unreachable",
19521
+ "waking"
19522
+ ]).nullable()
18901
19523
  })));
18902
19524
  /**
18903
19525
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20551,6 +21173,25 @@ var BatteryStatusSchema = object({
20551
21173
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20552
21174
  lastUpdated: number(),
20553
21175
  /**
21176
+ * Ms epoch of the last time the device PROVED it was reachable — a
21177
+ * completed firmware round-trip, an observed wake, or an inbound push
21178
+ * (firmware event, email). `0`/absent = never since this slice was born.
21179
+ *
21180
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21181
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21182
+ * for the radio, because a poll that confirms reachability is the same
21183
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21184
+ * single derivation every consumer must use; no surface computes its own.
21185
+ *
21186
+ * It is deliberately NOT a clock in the
21187
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21188
+ * observation itself, and it is the only thing a 30-hour silence is
21189
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21190
+ * Reolink provider) so a value that means "recently" cannot cost a
21191
+ * SQLite commit per round-trip.
21192
+ */
21193
+ lastContactAt: number().optional(),
21194
+ /**
20554
21195
  * True when the source is a BINARY low-battery indicator (HA
20555
21196
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20556
21197
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22823,54 +23464,139 @@ var TalkAudioCodecSchema = _enum([
22823
23464
  "g711ulaw",
22824
23465
  "g711alaw"
22825
23466
  ]);
22826
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22827
- sessionId: string(),
22828
- sdpOffer: string()
22829
- }), {
22830
- kind: "mutation",
22831
- auth: "admin"
22832
- }), method(object({
22833
- deviceId: number(),
22834
- sessionId: string(),
22835
- sdpAnswer: string()
22836
- }), _void(), {
22837
- kind: "mutation",
22838
- auth: "admin"
22839
- }), method(object({
22840
- deviceId: number(),
22841
- sessionId: string()
22842
- }), _void(), {
22843
- kind: "mutation",
22844
- auth: "admin"
22845
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22846
- kind: "mutation",
22847
- auth: "admin"
22848
- }), method(object({
22849
- deviceId: number(),
22850
- /** Audio bytes for ONE frame, base64-encoded so the payload
22851
- * survives tRPC JSON serialization. */
22852
- audioBase64: string(),
22853
- /** Wire codec of the payload. Omit to let the provider default
22854
- * to its native expected format (s16le @ provider-native rate,
22855
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22856
- codec: TalkAudioCodecSchema.optional(),
22857
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22858
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22859
- sampleRate: number().int().positive().optional(),
22860
- /** Channel count. Default 1. */
22861
- channels: number().int().positive().optional(),
22862
- /** Sequence number for ordering / dropping out-of-order frames. */
22863
- sequenceNumber: number().int()
22864
- }), object({ accepted: boolean() }), {
22865
- kind: "mutation",
22866
- auth: "admin"
22867
- }), method(object({ deviceId: number() }), _void(), {
22868
- kind: "mutation",
22869
- auth: "admin"
22870
- }), object({
22871
- deviceId: number(),
22872
- status: IntercomStatusSchema
22873
- });
23467
+ var intercomCapability = {
23468
+ name: "intercom",
23469
+ scope: "device",
23470
+ deviceNative: true,
23471
+ mode: "singleton",
23472
+ deviceTypes: [DeviceType.Camera],
23473
+ methods: {
23474
+ /**
23475
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23476
+ * offer with a single sendonly audio m-line the client answers
23477
+ * (client → server direction). The server wakes battery cams
23478
+ * transparently before opening the upstream talk channel.
23479
+ */
23480
+ startSession: method(object({ deviceId: number() }), object({
23481
+ sessionId: string(),
23482
+ sdpOffer: string()
23483
+ }), {
23484
+ kind: "mutation",
23485
+ auth: "admin"
23486
+ }),
23487
+ handleAnswer: method(object({
23488
+ deviceId: number(),
23489
+ sessionId: string(),
23490
+ sdpAnswer: string()
23491
+ }), _void(), {
23492
+ kind: "mutation",
23493
+ auth: "admin"
23494
+ }),
23495
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23496
+ stopSession: method(object({
23497
+ deviceId: number(),
23498
+ sessionId: string()
23499
+ }), _void(), {
23500
+ kind: "mutation",
23501
+ auth: "admin"
23502
+ }),
23503
+ /**
23504
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23505
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23506
+ * harnesses) that already have decoded PCM frames and just need a
23507
+ * direct path onto the camera's talk channel. Mutually exclusive
23508
+ * with `startSession` (an active WebRTC session must be stopped
23509
+ * before a raw-PCM session can be opened on the same device, and
23510
+ * vice versa).
23511
+ */
23512
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23513
+ kind: "mutation",
23514
+ auth: "admin"
23515
+ }),
23516
+ /**
23517
+ * Push one chunk of talk-back audio onto the active talk session.
23518
+ * The cap is codec-agnostic: the caller declares (or omits) the
23519
+ * wire format via `codec`; the provider decides between passthrough
23520
+ * (when the wire codec matches the camera's native talk channel),
23521
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23522
+ *
23523
+ * Callers do NOT need to know the camera's wire format or sample
23524
+ * rate — that information lives entirely inside the provider.
23525
+ *
23526
+ * Sequence numbers MUST be monotonic per talk session; older frames
23527
+ * arriving after newer ones are dropped to avoid smearing the
23528
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23529
+ * predictor would corrupt with re-ordering).
23530
+ */
23531
+ pushTalkAudio: method(object({
23532
+ deviceId: number(),
23533
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23534
+ * survives tRPC JSON serialization. */
23535
+ audioBase64: string(),
23536
+ /** Wire codec of the payload. Omit to let the provider default
23537
+ * to its native expected format (s16le @ provider-native rate,
23538
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23539
+ codec: TalkAudioCodecSchema.optional(),
23540
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23541
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23542
+ sampleRate: number().int().positive().optional(),
23543
+ /** Channel count. Default 1. */
23544
+ channels: number().int().positive().optional(),
23545
+ /** Sequence number for ordering / dropping out-of-order frames. */
23546
+ sequenceNumber: number().int()
23547
+ }), object({ accepted: boolean() }), {
23548
+ kind: "mutation",
23549
+ auth: "admin"
23550
+ }),
23551
+ /** Close the raw-PCM talk session. Idempotent. */
23552
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23553
+ kind: "mutation",
23554
+ auth: "admin"
23555
+ })
23556
+ },
23557
+ events: { onStatusChanged: { data: object({
23558
+ deviceId: number(),
23559
+ status: IntercomStatusSchema
23560
+ }) } },
23561
+ status: {
23562
+ schema: IntercomStatusSchema,
23563
+ kind: "command-driven"
23564
+ },
23565
+ /**
23566
+ * Runtime-state slice — mirrored by the kernel.
23567
+ *
23568
+ * The cap declared `status` and nothing else, so the only two sources an
23569
+ * exporter has for a value — the `device.state-changed` slice event and the
23570
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23571
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23572
+ * have been published and never received a value, which is the defect the
23573
+ * export's two classification tables exist to prevent (177 of them, once), so
23574
+ * `intercom` was excluded rather than exported.
23575
+ *
23576
+ * The shape is the status shape: there is exactly one truth about talk-back
23577
+ * and duplicating it into a second schema is how two halves of one capability
23578
+ * come to disagree. Providers write it through
23579
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23580
+ * and close a session, and seed it at registration so the slice exists before
23581
+ * the first session rather than after it.
23582
+ *
23583
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23584
+ * session handle, so a session torn down by a transport death that never
23585
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23586
+ * session or the next restart. That is why the slice is `session` and not
23587
+ * `restored` — a restart must never restore "talking".
23588
+ */
23589
+ runtimeState: IntercomStatusSchema,
23590
+ /**
23591
+ * Runtime-state durability: **session** — `talking` describes a live audio
23592
+ * session, which by definition does not survive the process that held it.
23593
+ * Restoring it would publish a camera as talking to nobody.
23594
+ *
23595
+ * See `RuntimeStateDurability`. Enforced by
23596
+ * `scripts/check-runtime-state-durability.ts`.
23597
+ */
23598
+ durability: "session"
23599
+ };
22874
23600
  /**
22875
23601
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22876
23602
  * with a mowing lifecycle plus a dock action.
@@ -25567,7 +26293,7 @@ method(object({
25567
26293
  toMs: number()
25568
26294
  }), RecordingAvailabilitySchema, {
25569
26295
  kind: "query",
25570
- auth: "admin"
26296
+ auth: "protected"
25571
26297
  }), method(object({
25572
26298
  deviceId: number(),
25573
26299
  fromMs: number(),
@@ -25575,14 +26301,14 @@ method(object({
25575
26301
  tzOffsetMinutes: number()
25576
26302
  }), RecordingDaysSchema, {
25577
26303
  kind: "query",
25578
- auth: "admin"
26304
+ auth: "protected"
25579
26305
  }), method(object({
25580
26306
  deviceId: number(),
25581
26307
  fromMs: number(),
25582
26308
  toMs: number()
25583
26309
  }), RecordingManifestSchema, {
25584
26310
  kind: "query",
25585
- auth: "admin"
26311
+ auth: "protected"
25586
26312
  }), method(object({}), RecordingStorageUsageSchema, {
25587
26313
  kind: "query",
25588
26314
  auth: "admin"
@@ -25872,14 +26598,77 @@ method(object({
25872
26598
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25873
26599
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25874
26600
  *
25875
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
25876
- * derives the device-detail contribution; the provider carries NO hand-written
25877
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
25878
- * every hysteresis flip / availability change; consumers never poll.
25879
- */
25880
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25881
- * be added without a wire break (matching falls back to any-condition refs). */
26601
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26602
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26603
+ * for the thing: a scene is a standing question about the property ("is the bin
26604
+ * still out"), and the operator's question is "which of my scenes have tripped",
26605
+ * across every camera at once — not "what does camera 617 think". Buried one
26606
+ * camera deep it also could not be found. The surface is now a top-level admin
26607
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26608
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26609
+ *
26610
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26611
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26612
+ * directions, so a registration nobody declares fails exactly as loudly as a
26613
+ * declaration nobody registers. The editor is imported directly by the page.
26614
+ *
26615
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26616
+ * availability change; consumers never poll.
26617
+ */
26618
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26619
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26620
+ * Open by design so more can be added without a wire break.
26621
+ *
26622
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26623
+ * not comparable, so "I have never seen this scene in this light" is reported
26624
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26625
+ * collapses the cosine and would latch a false alarm every single night. */
25882
26626
  var SceneConditionSchema = string();
26627
+ /**
26628
+ * What a scene does when the CURRENT light has no reference of its own.
26629
+ *
26630
+ * The lighting variants are not equally likely to exist. Almost every operator
26631
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26632
+ * scene that is only ever going to be asked about a daytime question ("is the
26633
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26634
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26635
+ * working without it rather than degrading into a permanent complaint.
26636
+ *
26637
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26638
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26639
+ * last covered light left it at, the latch is untouched, and the hysteresis
26640
+ * run is neither spent nor cleared. The scene resumes by itself at first
26641
+ * light. This is the only behaviour under which "I never captured IR" is a
26642
+ * configuration choice instead of a nightly fault.
26643
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26644
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26645
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26646
+ * cross-condition cosines are not comparable, so a day reference against a
26647
+ * true IR frame collapses and the scene reports a theft at 21:40.
26648
+ *
26649
+ * Never applies when the scene has NO comparable reference at all — that is
26650
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26651
+ * there would hide a scene the operator never finished setting up.
26652
+ */
26653
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26654
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26655
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26656
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26657
+ * and never counts toward hysteresis in either direction. */
26658
+ var SceneVerdictSchema = _enum([
26659
+ "matched",
26660
+ "diverged",
26661
+ "unknown"
26662
+ ]);
26663
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26664
+ * silence that reads as "nothing has happened". */
26665
+ var SceneUnavailableSchema = _enum([
26666
+ "no-reference-for-condition",
26667
+ "view-shifted",
26668
+ "no-vision-profile",
26669
+ "encoder-model-changed",
26670
+ "no-snapshot"
26671
+ ]);
25883
26672
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25884
26673
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25885
26674
  var SceneReferenceSchema = object({
@@ -25887,7 +26676,14 @@ var SceneReferenceSchema = object({
25887
26676
  modelId: string(),
25888
26677
  condition: SceneConditionSchema,
25889
26678
  capturedAt: number(),
25890
- thumbnailMediaId: string().optional()
26679
+ thumbnailMediaId: string().optional(),
26680
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26681
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26682
+ * normalized rect frame a different piece of world, and the scene would
26683
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26684
+ * when hysteresis is about to flip — one extra encode per candidate
26685
+ * transition, not per poll. */
26686
+ anchorEmbedding: array(number()).optional()
25891
26687
  });
25892
26688
  var SceneMonitorStateSchema = object({
25893
26689
  id: string(),
@@ -25909,6 +26705,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25909
26705
  profileId: string().optional(),
25910
26706
  hysteresisCount: number().int().positive()
25911
26707
  })]);
26708
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26709
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26710
+ * out in silence rather than reporting a fault every night. */
26711
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26712
+ /**
26713
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26714
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26715
+ *
26716
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26717
+ * fail-open: a notification suppressed is the worse error there, but a vision
26718
+ * model that timed out has not told us the bin is gone, and a latch is a
26719
+ * stateful claim that costs the operator a trip to reset.
26720
+ */
26721
+ var SceneConfirmSchema = object({
26722
+ enabled: boolean().default(false),
26723
+ prompt: string().min(1).max(1e3),
26724
+ profileId: string().optional(),
26725
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26726
+ maxImagePx: number().int().min(64).max(2048).default(448),
26727
+ /** What a timeout / unavailable model means for the PENDING flip. */
26728
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26729
+ });
25912
26730
  var SceneMonitorSchema = object({
25913
26731
  id: string(),
25914
26732
  label: string(),
@@ -25927,7 +26745,56 @@ var SceneMonitorSchema = object({
25927
26745
  lastConfidence: number().nullable(),
25928
26746
  currentCondition: SceneConditionSchema.nullable(),
25929
26747
  availability: _enum(["ok", "unavailable"]),
25930
- unavailableReason: string().nullable()
26748
+ unavailableReason: string().nullable(),
26749
+ /** Which state is "the initial screen". `null` until the first capture. */
26750
+ baselineStateId: string().nullable(),
26751
+ /** Which boolean drives notification rules and any export. */
26752
+ emit: _enum(["latched", "live"]).default("latched"),
26753
+ /** Live: does the region match the baseline RIGHT NOW. */
26754
+ verdict: SceneVerdictSchema,
26755
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26756
+ latched: boolean(),
26757
+ /** Last reset (or creation). */
26758
+ armedAt: number(),
26759
+ divergedAt: number().nullable(),
26760
+ restoredAt: number().nullable(),
26761
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26762
+ * during the window DISCARDS the observation — a car pulling up in front of
26763
+ * the bin must not be able to spend hysteresis credit. */
26764
+ quietSeconds: number().int().min(0).max(3600).default(60),
26765
+ /** An observation only advances the pending count when it is at least this
26766
+ * far from the previously counted one, so N agreeing checks span real time
26767
+ * rather than N adjacent polls inside one occlusion. */
26768
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26769
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26770
+ confirm: SceneConfirmSchema.optional(),
26771
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26772
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26773
+ /** Clear the latch on its own when the scene matches again? Default false —
26774
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26775
+ * automation can react to the bin coming back without the operator's own
26776
+ * alarm silently clearing itself. */
26777
+ autoRestore: boolean().default(false),
26778
+ /** What to do when the current light has no reference of its own. See
26779
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26780
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26781
+ /**
26782
+ * The light whose checks are currently being SAT OUT under
26783
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26784
+ *
26785
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26786
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26787
+ * nothing captured in this light"* in the same calm voice as the coverage
26788
+ * line, because the alternative is a scene that silently stops answering
26789
+ * after sunset with nothing anywhere saying why. A skipped check must never
26790
+ * read as a broken one.
26791
+ */
26792
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26793
+ /** Named cause when `verdict === 'unknown'`. */
26794
+ unavailable: SceneUnavailableSchema.nullable(),
26795
+ /** Conditions that have at least one comparable reference — the coverage line
26796
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26797
+ coveredConditions: array(SceneConditionSchema)
25931
26798
  });
25932
26799
  var SceneMonitorStatusSchema = object({
25933
26800
  monitors: array(SceneMonitorSchema),
@@ -25940,12 +26807,6 @@ var sceneMonitorCapability = {
25940
26807
  kind: "wrapper",
25941
26808
  defaultActive: true,
25942
26809
  deviceTypes: [DeviceType.Camera],
25943
- deviceConfig: { ui: {
25944
- kind: "widget",
25945
- widgetId: "host/scene-monitor-editor",
25946
- tab: "scenes",
25947
- label: "Scenes"
25948
- } },
25949
26810
  methods: {
25950
26811
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25951
26812
  createScene: method(object({
@@ -25976,7 +26837,15 @@ var sceneMonitorCapability = {
25976
26837
  "both"
25977
26838
  ]).optional(),
25978
26839
  checkIntervalSec: number().optional(),
25979
- check: SceneCheckSchema.optional()
26840
+ check: SceneCheckSchema.optional(),
26841
+ emit: _enum(["latched", "live"]).optional(),
26842
+ quietSeconds: number().int().min(0).max(3600).optional(),
26843
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26844
+ anchorThreshold: number().min(0).max(1).optional(),
26845
+ autoRestore: boolean().optional(),
26846
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26847
+ /** `null` clears the vision-model adjudicator. */
26848
+ confirm: SceneConfirmSchema.nullable().optional()
25980
26849
  })
25981
26850
  }), _void(), {
25982
26851
  kind: "mutation",
@@ -26017,6 +26886,26 @@ var sceneMonitorCapability = {
26017
26886
  }), _void(), {
26018
26887
  kind: "mutation",
26019
26888
  auth: "admin"
26889
+ }),
26890
+ /**
26891
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26892
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26893
+ * "reset" in the operator's head means *this is the new normal*, and
26894
+ * re-capture is what makes the feature self-healing against slow drift
26895
+ * instead of failing silently weeks later.
26896
+ *
26897
+ * Reachable from three surfaces on this one mutation: the scene card, a
26898
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26899
+ * no new Notification-Center code at all), and tRPC for scripts.
26900
+ */
26901
+ resetScene: method(object({
26902
+ deviceId: number(),
26903
+ monitorId: string(),
26904
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26905
+ recapture: boolean().optional()
26906
+ }), _void(), {
26907
+ kind: "mutation",
26908
+ auth: "admin"
26020
26909
  })
26021
26910
  },
26022
26911
  status: {
@@ -26253,7 +27142,70 @@ var CamStreamDescriptorSchema = object({
26253
27142
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26254
27143
  metadata: record(string(), unknown()).optional()
26255
27144
  });
26256
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27145
+ /**
27146
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27147
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27148
+ * set of stream descriptors it can offer for the device, synchronously, so the
27149
+ * broker can reconcile its registry against the authoritative provider state.
27150
+ */
27151
+ /**
27152
+ * The catalog as a DURABLE fact rather than a live answer.
27153
+ *
27154
+ * A battery camera's descriptors are profile-stable — they change when the
27155
+ * operator rewrites an encoder profile, not minute to minute — but building
27156
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27157
+ * provider is allowed to build them exactly once per profile and must serve
27158
+ * every later pull from a cache.
27159
+ *
27160
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27161
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27162
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27163
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27164
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27165
+ * which on a battery cam is most of the day. The camera was fine. The stream
27166
+ * was unreachable because the process had forgotten what the camera offers.
27167
+ *
27168
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27169
+ * declared collection, with the same `restored` durability `battery` uses for
27170
+ * the same reason: the last known value is the only value there is while the
27171
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27172
+ * is the DIAL that wakes a camera, never the catalog (D173).
27173
+ */
27174
+ var StreamCatalogStateSchema = object({
27175
+ /** The descriptors as last built from a real camera response. Never a guess:
27176
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27177
+ * one the camera itself once produced. */
27178
+ descriptors: array(CamStreamDescriptorSchema),
27179
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27180
+ * path decide whether the camera's own awake window is worth spending on a
27181
+ * re-read. */
27182
+ lastFetchedAt: number()
27183
+ });
27184
+ var streamCatalogCapability = {
27185
+ name: "stream-catalog",
27186
+ scope: "device",
27187
+ deviceNative: true,
27188
+ mode: "singleton",
27189
+ deviceTypes: [DeviceType.Camera],
27190
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27191
+ runtimeState: StreamCatalogStateSchema,
27192
+ /**
27193
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27194
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27195
+ * camera that cannot be watched at all until it happens to wake.
27196
+ *
27197
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27198
+ * build, and a build only runs when there is no cached copy (or the copy is
27199
+ * a day old and the camera is awake anyway).
27200
+ *
27201
+ * See `RuntimeStateDurability`. Enforced by
27202
+ * `scripts/check-runtime-state-durability.ts`.
27203
+ */
27204
+ durability: "restored",
27205
+ /** Clock field: written, but excluded from the compare that decides whether
27206
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27207
+ volatileStateFields: ["lastFetchedAt"]
27208
+ };
26257
27209
  /** One of the camera's stream profiles. */
26258
27210
  var StreamProfileSchema = _enum([
26259
27211
  "main",
@@ -26507,12 +27459,64 @@ var NetworkAddressSchema = object({
26507
27459
  family: string(),
26508
27460
  internal: boolean()
26509
27461
  });
27462
+ /**
27463
+ * Provenance of the site coordinates, and the whole reason this is not just two
27464
+ * numbers.
27465
+ *
27466
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27467
+ * nothing overwrites it.
27468
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27469
+ * default that is right to a few kilometres beats the coarse UTC clock split
27470
+ * the sun-times consumers otherwise fall back to.
27471
+ *
27472
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27473
+ * own input will eventually trust the guess.
27474
+ */
27475
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27476
+ /**
27477
+ * The read shape: the location plus the honest state of the one-shot derivation.
27478
+ *
27479
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27480
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27481
+ * failed; the hub will NOT try again on its own — the fallback is declared
27482
+ * (consumers degrade to their own last resort) and the operator either types the
27483
+ * coordinates or presses detect.
27484
+ */
27485
+ var SiteLocationStatusSchema = object({
27486
+ location: object({
27487
+ /** WGS84 decimal degrees. */
27488
+ latitude: number().min(-90).max(90),
27489
+ longitude: number().min(-180).max(180),
27490
+ source: SiteLocationSourceSchema,
27491
+ /** Epoch ms the value was last written. */
27492
+ updatedAt: number(),
27493
+ /**
27494
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27495
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27496
+ */
27497
+ label: string().optional()
27498
+ }).nullable(),
27499
+ derivationAttemptedAt: number().nullable(),
27500
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27501
+ derivationError: string().nullable()
27502
+ });
27503
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27504
+ var SetSiteLocationInputSchema = object({
27505
+ latitude: number().min(-90).max(90),
27506
+ longitude: number().min(-180).max(180)
27507
+ }).nullable();
26510
27508
  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(), {
26511
27509
  kind: "mutation",
26512
27510
  auth: "admin"
26513
27511
  }), method(_void(), _void(), {
26514
27512
  kind: "mutation",
26515
27513
  auth: "admin"
27514
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27515
+ kind: "mutation",
27516
+ auth: "admin"
27517
+ }), method(_void(), SiteLocationStatusSchema, {
27518
+ kind: "mutation",
27519
+ auth: "admin"
26516
27520
  });
26517
27521
  /**
26518
27522
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27832,6 +28836,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27832
28836
  humiditySensor: humiditySensorCapability,
27833
28837
  image: imageCapability,
27834
28838
  imageSettings: imageSettingsCapability,
28839
+ intercom: intercomCapability,
27835
28840
  lawnMowerControl: lawnMowerControlCapability,
27836
28841
  lockControl: lockControlCapability,
27837
28842
  mediaPlayer: mediaPlayerCapability,
@@ -27850,6 +28855,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27850
28855
  sceneMonitor: sceneMonitorCapability,
27851
28856
  scriptRunner: scriptRunnerCapability,
27852
28857
  smoke: smokeCapability,
28858
+ streamCatalog: streamCatalogCapability,
27853
28859
  streamParams: streamParamsCapability,
27854
28860
  switch: switchCapability,
27855
28861
  tamper: tamperCapability,
@@ -28503,6 +29509,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28503
29509
  labels: ["probe not implemented"]
28504
29510
  };
28505
29511
  }
29512
+ /**
29513
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29514
+ *
29515
+ * Four covers the fleets this ships to without turning a boot into a burst a
29516
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29517
+ * session with a serial command channel (a Baichuan hub, an NVR that
29518
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29519
+ */
29520
+ restoreConcurrency = 4;
28506
29521
  async restoreDevices(savedDevices) {
28507
29522
  await this.onRestoreDevices(savedDevices);
28508
29523
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28534,15 +29549,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28534
29549
  */
28535
29550
  async onRestoreDevices(savedDevices) {
28536
29551
  const restored = /* @__PURE__ */ new Set();
28537
- for (const saved of savedDevices) {
28538
- if (saved.parentDeviceId !== null) continue;
29552
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29553
+ const restoreOne = async (saved) => {
28539
29554
  const Class = this.deviceClasses[saved.type];
28540
29555
  if (!Class) {
28541
29556
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28542
29557
  tags: { stableId: saved.stableId },
28543
29558
  meta: { type: saved.type }
28544
29559
  });
28545
- continue;
29560
+ return;
28546
29561
  }
28547
29562
  try {
28548
29563
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28556,7 +29571,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28556
29571
  }
28557
29572
  });
28558
29573
  }
28559
- }
29574
+ };
29575
+ let nextTopLevel = 0;
29576
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29577
+ for (;;) {
29578
+ const saved = topLevel[nextTopLevel++];
29579
+ if (saved === void 0) return;
29580
+ await restoreOne(saved);
29581
+ }
29582
+ }));
28560
29583
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28561
29584
  for (const saved of childRows) {
28562
29585
  const Class = this.deviceClasses[saved.type];
@@ -30647,6 +31670,12 @@ Object.freeze({
30647
31670
  addonId: null,
30648
31671
  access: "create"
30649
31672
  },
31673
+ "llm.cancel": {
31674
+ capName: "llm",
31675
+ capScope: "system",
31676
+ addonId: null,
31677
+ access: "create"
31678
+ },
30650
31679
  "llm.deleteModel": {
30651
31680
  capName: "llm",
30652
31681
  capScope: "system",
@@ -30731,6 +31760,12 @@ Object.freeze({
30731
31760
  addonId: null,
30732
31761
  access: "view"
30733
31762
  },
31763
+ "llm.resolveModelRef": {
31764
+ capName: "llm",
31765
+ capScope: "system",
31766
+ addonId: null,
31767
+ access: "create"
31768
+ },
30734
31769
  "llm.setDefault": {
30735
31770
  capName: "llm",
30736
31771
  capScope: "system",
@@ -32897,6 +33932,12 @@ Object.freeze({
32897
33932
  addonId: null,
32898
33933
  access: "create"
32899
33934
  },
33935
+ "sceneMonitor.resetScene": {
33936
+ capName: "scene-monitor",
33937
+ capScope: "device",
33938
+ addonId: null,
33939
+ access: "delete"
33940
+ },
32900
33941
  "sceneMonitor.updateScene": {
32901
33942
  capName: "scene-monitor",
32902
33943
  capScope: "device",
@@ -33035,6 +34076,12 @@ Object.freeze({
33035
34076
  addonId: null,
33036
34077
  access: "view"
33037
34078
  },
34079
+ "snapshot.getDebugState": {
34080
+ capName: "snapshot",
34081
+ capScope: "device",
34082
+ addonId: null,
34083
+ access: "view"
34084
+ },
33038
34085
  "snapshot.getSnapshot": {
33039
34086
  capName: "snapshot",
33040
34087
  capScope: "device",
@@ -33575,6 +34622,12 @@ Object.freeze({
33575
34622
  addonId: null,
33576
34623
  access: "create"
33577
34624
  },
34625
+ "system.detectSiteLocation": {
34626
+ capName: "system",
34627
+ capScope: "system",
34628
+ addonId: null,
34629
+ access: "create"
34630
+ },
33578
34631
  "system.featureFlags": {
33579
34632
  capName: "system",
33580
34633
  capScope: "system",
@@ -33593,6 +34646,12 @@ Object.freeze({
33593
34646
  addonId: null,
33594
34647
  access: "view"
33595
34648
  },
34649
+ "system.getSiteLocation": {
34650
+ capName: "system",
34651
+ capScope: "system",
34652
+ addonId: null,
34653
+ access: "view"
34654
+ },
33596
34655
  "system.health": {
33597
34656
  capName: "system",
33598
34657
  capScope: "system",
@@ -33617,6 +34676,12 @@ Object.freeze({
33617
34676
  addonId: null,
33618
34677
  access: "create"
33619
34678
  },
34679
+ "system.setSiteLocation": {
34680
+ capName: "system",
34681
+ capScope: "system",
34682
+ addonId: null,
34683
+ access: "create"
34684
+ },
33620
34685
  "terminalSession.adoptLegacyMonitor": {
33621
34686
  capName: "terminal-session",
33622
34687
  capScope: "system",
@@ -34188,6 +35253,1709 @@ Object.freeze({
34188
35253
  access: "create"
34189
35254
  }
34190
35255
  });
35256
+ Object.freeze({
35257
+ "accessories.setChildHidden": [{
35258
+ name: "childDeviceId",
35259
+ form: "single",
35260
+ optional: false
35261
+ }, {
35262
+ name: "deviceId",
35263
+ form: "single",
35264
+ optional: false
35265
+ }],
35266
+ "addonSettings.getDeviceSettings": [{
35267
+ name: "deviceId",
35268
+ form: "single",
35269
+ optional: false
35270
+ }],
35271
+ "addonSettings.updateDeviceSettings": [{
35272
+ name: "deviceId",
35273
+ form: "single",
35274
+ optional: false
35275
+ }],
35276
+ "alarmPanel.arm": [{
35277
+ name: "deviceId",
35278
+ form: "single",
35279
+ optional: false
35280
+ }],
35281
+ "alarmPanel.disarm": [{
35282
+ name: "deviceId",
35283
+ form: "single",
35284
+ optional: false
35285
+ }],
35286
+ "alarmPanel.trigger": [{
35287
+ name: "deviceId",
35288
+ form: "single",
35289
+ optional: false
35290
+ }],
35291
+ "audioAnalysis.resolveDeviceSettings": [{
35292
+ name: "deviceId",
35293
+ form: "single",
35294
+ optional: false
35295
+ }],
35296
+ "audioAnalyzer.classify": [{
35297
+ name: "deviceId",
35298
+ form: "single",
35299
+ optional: true
35300
+ }],
35301
+ "audioMetrics.getCurrentSnapshot": [{
35302
+ name: "deviceId",
35303
+ form: "single",
35304
+ optional: false
35305
+ }],
35306
+ "audioMetrics.getHistory": [{
35307
+ name: "deviceId",
35308
+ form: "single",
35309
+ optional: false
35310
+ }],
35311
+ "automationControl.disable": [{
35312
+ name: "deviceId",
35313
+ form: "single",
35314
+ optional: false
35315
+ }],
35316
+ "automationControl.enable": [{
35317
+ name: "deviceId",
35318
+ form: "single",
35319
+ optional: false
35320
+ }],
35321
+ "automationControl.trigger": [{
35322
+ name: "deviceId",
35323
+ form: "single",
35324
+ optional: false
35325
+ }],
35326
+ "battery.wakeForStream": [{
35327
+ name: "deviceId",
35328
+ form: "single",
35329
+ optional: false
35330
+ }],
35331
+ "brightness.setBrightness": [{
35332
+ name: "deviceId",
35333
+ form: "single",
35334
+ optional: false
35335
+ }],
35336
+ "button.press": [{
35337
+ name: "deviceId",
35338
+ form: "single",
35339
+ optional: false
35340
+ }],
35341
+ "cameraCredentials.getCredentials": [{
35342
+ name: "deviceId",
35343
+ form: "single",
35344
+ optional: false
35345
+ }],
35346
+ "cameraStreams.getBrokerStreams": [{
35347
+ name: "deviceId",
35348
+ form: "single",
35349
+ optional: false
35350
+ }],
35351
+ "cameraStreams.getCameraStreams": [{
35352
+ name: "deviceId",
35353
+ form: "single",
35354
+ optional: false
35355
+ }],
35356
+ "cameraStreams.getProfileRtspEntries": [{
35357
+ name: "deviceId",
35358
+ form: "single",
35359
+ optional: false
35360
+ }],
35361
+ "cameraStreams.getRtspEntries": [{
35362
+ name: "deviceId",
35363
+ form: "single",
35364
+ optional: false
35365
+ }],
35366
+ "cameraStreams.pickStream": [{
35367
+ name: "deviceId",
35368
+ form: "single",
35369
+ optional: false
35370
+ }],
35371
+ "climateControl.setFanMode": [{
35372
+ name: "deviceId",
35373
+ form: "single",
35374
+ optional: false
35375
+ }],
35376
+ "climateControl.setMode": [{
35377
+ name: "deviceId",
35378
+ form: "single",
35379
+ optional: false
35380
+ }],
35381
+ "climateControl.setPreset": [{
35382
+ name: "deviceId",
35383
+ form: "single",
35384
+ optional: false
35385
+ }],
35386
+ "climateControl.setSwingHorizontal": [{
35387
+ name: "deviceId",
35388
+ form: "single",
35389
+ optional: false
35390
+ }],
35391
+ "climateControl.setSwingVertical": [{
35392
+ name: "deviceId",
35393
+ form: "single",
35394
+ optional: false
35395
+ }],
35396
+ "climateControl.setTarget": [{
35397
+ name: "deviceId",
35398
+ form: "single",
35399
+ optional: false
35400
+ }],
35401
+ "climateControl.setTargetHumidity": [{
35402
+ name: "deviceId",
35403
+ form: "single",
35404
+ optional: false
35405
+ }],
35406
+ "climateControl.setTargetRange": [{
35407
+ name: "deviceId",
35408
+ form: "single",
35409
+ optional: false
35410
+ }],
35411
+ "color.setColor": [{
35412
+ name: "deviceId",
35413
+ form: "single",
35414
+ optional: false
35415
+ }],
35416
+ "consumables.reset": [{
35417
+ name: "deviceId",
35418
+ form: "single",
35419
+ optional: false
35420
+ }],
35421
+ "control.setValue": [{
35422
+ name: "deviceId",
35423
+ form: "single",
35424
+ optional: false
35425
+ }],
35426
+ "cover.close": [{
35427
+ name: "deviceId",
35428
+ form: "single",
35429
+ optional: false
35430
+ }],
35431
+ "cover.open": [{
35432
+ name: "deviceId",
35433
+ form: "single",
35434
+ optional: false
35435
+ }],
35436
+ "cover.setPosition": [{
35437
+ name: "deviceId",
35438
+ form: "single",
35439
+ optional: false
35440
+ }],
35441
+ "cover.setTiltPosition": [{
35442
+ name: "deviceId",
35443
+ form: "single",
35444
+ optional: false
35445
+ }],
35446
+ "cover.stop": [{
35447
+ name: "deviceId",
35448
+ form: "single",
35449
+ optional: false
35450
+ }],
35451
+ "dayNight.getOptions": [{
35452
+ name: "deviceId",
35453
+ form: "single",
35454
+ optional: false
35455
+ }],
35456
+ "dayNight.setSettings": [{
35457
+ name: "deviceId",
35458
+ form: "single",
35459
+ optional: false
35460
+ }],
35461
+ "decoder.createSession": [{
35462
+ name: "deviceId",
35463
+ form: "single",
35464
+ optional: true
35465
+ }],
35466
+ "deviceAdoption.release": [{
35467
+ name: "camDeviceId",
35468
+ form: "single",
35469
+ optional: false
35470
+ }],
35471
+ "deviceAdoption.resync": [{
35472
+ name: "camDeviceId",
35473
+ form: "single",
35474
+ optional: false
35475
+ }],
35476
+ "deviceDiscovery.adoptDevice": [{
35477
+ name: "deviceId",
35478
+ form: "single",
35479
+ optional: false
35480
+ }],
35481
+ "deviceDiscovery.listDiscovered": [{
35482
+ name: "deviceId",
35483
+ form: "single",
35484
+ optional: false
35485
+ }],
35486
+ "deviceDiscovery.refreshDiscovery": [{
35487
+ name: "deviceId",
35488
+ form: "single",
35489
+ optional: false
35490
+ }],
35491
+ "deviceDiscovery.releaseDevice": [{
35492
+ name: "childDeviceId",
35493
+ form: "single",
35494
+ optional: false
35495
+ }, {
35496
+ name: "deviceId",
35497
+ form: "single",
35498
+ optional: false
35499
+ }],
35500
+ "deviceManager.adoptionRelease": [{
35501
+ name: "camDeviceId",
35502
+ form: "single",
35503
+ optional: false
35504
+ }],
35505
+ "deviceManager.adoptionResync": [{
35506
+ name: "camDeviceId",
35507
+ form: "single",
35508
+ optional: false
35509
+ }],
35510
+ "deviceManager.applyInitialMeta": [{
35511
+ name: "deviceId",
35512
+ form: "single",
35513
+ optional: false
35514
+ }, {
35515
+ name: "linkDeviceId",
35516
+ form: "single",
35517
+ optional: true
35518
+ }],
35519
+ "deviceManager.disable": [{
35520
+ name: "deviceId",
35521
+ form: "single",
35522
+ optional: false
35523
+ }],
35524
+ "deviceManager.enable": [{
35525
+ name: "deviceId",
35526
+ form: "single",
35527
+ optional: false
35528
+ }],
35529
+ "deviceManager.getBindings": [{
35530
+ name: "deviceId",
35531
+ form: "single",
35532
+ optional: false
35533
+ }],
35534
+ "deviceManager.getChildren": [{
35535
+ name: "parentDeviceId",
35536
+ form: "single",
35537
+ optional: false
35538
+ }],
35539
+ "deviceManager.getConfigSchema": [{
35540
+ name: "deviceId",
35541
+ form: "single",
35542
+ optional: false
35543
+ }],
35544
+ "deviceManager.getDevice": [{
35545
+ name: "deviceId",
35546
+ form: "single",
35547
+ optional: false
35548
+ }],
35549
+ "deviceManager.getDeviceAggregate": [{
35550
+ name: "deviceId",
35551
+ form: "single",
35552
+ optional: false
35553
+ }],
35554
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35555
+ name: "deviceId",
35556
+ form: "single",
35557
+ optional: false
35558
+ }],
35559
+ "deviceManager.getDeviceSettingsAggregate": [{
35560
+ name: "deviceId",
35561
+ form: "single",
35562
+ optional: false
35563
+ }],
35564
+ "deviceManager.getDeviceStatusAggregate": [{
35565
+ name: "deviceId",
35566
+ form: "single",
35567
+ optional: false
35568
+ }],
35569
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35570
+ name: "deviceIds",
35571
+ form: "array",
35572
+ optional: false
35573
+ }],
35574
+ "deviceManager.getLinkedDevices": [{
35575
+ name: "deviceId",
35576
+ form: "single",
35577
+ optional: false
35578
+ }],
35579
+ "deviceManager.getSettingsSchema": [{
35580
+ name: "deviceId",
35581
+ form: "single",
35582
+ optional: false
35583
+ }],
35584
+ "deviceManager.getStreamProfileMap": [{
35585
+ name: "deviceId",
35586
+ form: "single",
35587
+ optional: false
35588
+ }],
35589
+ "deviceManager.getStreamSources": [{
35590
+ name: "deviceId",
35591
+ form: "single",
35592
+ optional: false
35593
+ }],
35594
+ "deviceManager.getWireableFields": [{
35595
+ name: "deviceId",
35596
+ form: "single",
35597
+ optional: false
35598
+ }],
35599
+ "deviceManager.loadConfig": [{
35600
+ name: "deviceId",
35601
+ form: "single",
35602
+ optional: false
35603
+ }],
35604
+ "deviceManager.loadMeta": [{
35605
+ name: "deviceId",
35606
+ form: "single",
35607
+ optional: false
35608
+ }],
35609
+ "deviceManager.loadRuntimeState": [{
35610
+ name: "deviceId",
35611
+ form: "single",
35612
+ optional: false
35613
+ }],
35614
+ "deviceManager.persistConfig": [{
35615
+ name: "deviceId",
35616
+ form: "single",
35617
+ optional: false
35618
+ }],
35619
+ "deviceManager.probeStreams": [{
35620
+ name: "deviceId",
35621
+ form: "single",
35622
+ optional: false
35623
+ }],
35624
+ "deviceManager.registerDevice": [{
35625
+ name: "parentDeviceId",
35626
+ form: "single",
35627
+ optional: true
35628
+ }],
35629
+ "deviceManager.remove": [{
35630
+ name: "deviceId",
35631
+ form: "single",
35632
+ optional: false
35633
+ }],
35634
+ "deviceManager.removeDevice": [{
35635
+ name: "deviceId",
35636
+ form: "single",
35637
+ optional: false
35638
+ }],
35639
+ "deviceManager.runDeviceAction": [{
35640
+ name: "deviceId",
35641
+ form: "single",
35642
+ optional: false
35643
+ }],
35644
+ "deviceManager.setChildLayout": [{
35645
+ name: "deviceId",
35646
+ form: "single",
35647
+ optional: false
35648
+ }],
35649
+ "deviceManager.setDisabled": [{
35650
+ name: "deviceId",
35651
+ form: "single",
35652
+ optional: false
35653
+ }],
35654
+ "deviceManager.setDisplay": [{
35655
+ name: "deviceId",
35656
+ form: "single",
35657
+ optional: false
35658
+ }],
35659
+ "deviceManager.setIntegrationId": [{
35660
+ name: "deviceId",
35661
+ form: "single",
35662
+ optional: false
35663
+ }],
35664
+ "deviceManager.setLinkDeviceId": [{
35665
+ name: "deviceId",
35666
+ form: "single",
35667
+ optional: false
35668
+ }, {
35669
+ name: "linkDeviceId",
35670
+ form: "single",
35671
+ optional: true
35672
+ }],
35673
+ "deviceManager.setLocation": [{
35674
+ name: "deviceId",
35675
+ form: "single",
35676
+ optional: false
35677
+ }],
35678
+ "deviceManager.setMetadata": [{
35679
+ name: "deviceId",
35680
+ form: "single",
35681
+ optional: false
35682
+ }],
35683
+ "deviceManager.setName": [{
35684
+ name: "deviceId",
35685
+ form: "single",
35686
+ optional: false
35687
+ }],
35688
+ "deviceManager.setPrimaryChildEntityId": [{
35689
+ name: "deviceId",
35690
+ form: "single",
35691
+ optional: false
35692
+ }],
35693
+ "deviceManager.setRole": [{
35694
+ name: "deviceId",
35695
+ form: "single",
35696
+ optional: false
35697
+ }],
35698
+ "deviceManager.setStreamProfileMap": [{
35699
+ name: "deviceId",
35700
+ form: "single",
35701
+ optional: false
35702
+ }],
35703
+ "deviceManager.setType": [{
35704
+ name: "deviceId",
35705
+ form: "single",
35706
+ optional: false
35707
+ }],
35708
+ "deviceManager.setWrapperActive": [{
35709
+ name: "deviceId",
35710
+ form: "single",
35711
+ optional: false
35712
+ }],
35713
+ "deviceManager.testField": [{
35714
+ name: "deviceId",
35715
+ form: "single",
35716
+ optional: false
35717
+ }],
35718
+ "deviceManager.updateConfig": [{
35719
+ name: "deviceId",
35720
+ form: "single",
35721
+ optional: false
35722
+ }],
35723
+ "deviceManager.updateDeviceField": [{
35724
+ name: "deviceId",
35725
+ form: "single",
35726
+ optional: false
35727
+ }],
35728
+ "deviceManager.updateDeviceFieldsBatch": [{
35729
+ name: "deviceId",
35730
+ form: "single",
35731
+ optional: false
35732
+ }],
35733
+ "deviceOps.getConfigEntries": [{
35734
+ name: "deviceId",
35735
+ form: "single",
35736
+ optional: false
35737
+ }],
35738
+ "deviceOps.getRawState": [{
35739
+ name: "deviceId",
35740
+ form: "single",
35741
+ optional: false
35742
+ }],
35743
+ "deviceOps.getSettingsSchema": [{
35744
+ name: "deviceId",
35745
+ form: "single",
35746
+ optional: false
35747
+ }],
35748
+ "deviceOps.getStreamSources": [{
35749
+ name: "deviceId",
35750
+ form: "single",
35751
+ optional: false
35752
+ }],
35753
+ "deviceOps.removeDevice": [{
35754
+ name: "deviceId",
35755
+ form: "single",
35756
+ optional: false
35757
+ }],
35758
+ "deviceOps.runAction": [{
35759
+ name: "deviceId",
35760
+ form: "single",
35761
+ optional: false
35762
+ }],
35763
+ "deviceOps.setConfig": [{
35764
+ name: "deviceId",
35765
+ form: "single",
35766
+ optional: false
35767
+ }],
35768
+ "deviceState.getCapSlice": [{
35769
+ name: "deviceId",
35770
+ form: "single",
35771
+ optional: false
35772
+ }],
35773
+ "deviceState.getSnapshot": [{
35774
+ name: "deviceId",
35775
+ form: "single",
35776
+ optional: false
35777
+ }],
35778
+ "deviceState.setCapSlice": [{
35779
+ name: "deviceId",
35780
+ form: "single",
35781
+ optional: false
35782
+ }],
35783
+ "events.getEventClipUrl": [{
35784
+ name: "deviceId",
35785
+ form: "single",
35786
+ optional: false
35787
+ }],
35788
+ "events.getEvents": [{
35789
+ name: "deviceId",
35790
+ form: "single",
35791
+ optional: false
35792
+ }],
35793
+ "events.getEventThumbnail": [{
35794
+ name: "deviceId",
35795
+ form: "single",
35796
+ optional: false
35797
+ }],
35798
+ "faceGallery.getFaceByTrack": [{
35799
+ name: "deviceId",
35800
+ form: "single",
35801
+ optional: false
35802
+ }],
35803
+ "faceGallery.listRecentFaces": [{
35804
+ name: "deviceId",
35805
+ form: "single",
35806
+ optional: true
35807
+ }],
35808
+ "fanControl.setDirection": [{
35809
+ name: "deviceId",
35810
+ form: "single",
35811
+ optional: false
35812
+ }],
35813
+ "fanControl.setOscillating": [{
35814
+ name: "deviceId",
35815
+ form: "single",
35816
+ optional: false
35817
+ }],
35818
+ "fanControl.setPercentage": [{
35819
+ name: "deviceId",
35820
+ form: "single",
35821
+ optional: false
35822
+ }],
35823
+ "fanControl.setPreset": [{
35824
+ name: "deviceId",
35825
+ form: "single",
35826
+ optional: false
35827
+ }],
35828
+ "humidifier.setMode": [{
35829
+ name: "deviceId",
35830
+ form: "single",
35831
+ optional: false
35832
+ }],
35833
+ "humidifier.setOn": [{
35834
+ name: "deviceId",
35835
+ form: "single",
35836
+ optional: false
35837
+ }],
35838
+ "humidifier.setTargetHumidity": [{
35839
+ name: "deviceId",
35840
+ form: "single",
35841
+ optional: false
35842
+ }],
35843
+ "imageSettings.getOptions": [{
35844
+ name: "deviceId",
35845
+ form: "single",
35846
+ optional: false
35847
+ }],
35848
+ "imageSettings.setSettings": [{
35849
+ name: "deviceId",
35850
+ form: "single",
35851
+ optional: false
35852
+ }],
35853
+ "intercom.endTalkSession": [{
35854
+ name: "deviceId",
35855
+ form: "single",
35856
+ optional: false
35857
+ }],
35858
+ "intercom.handleAnswer": [{
35859
+ name: "deviceId",
35860
+ form: "single",
35861
+ optional: false
35862
+ }],
35863
+ "intercom.pushTalkAudio": [{
35864
+ name: "deviceId",
35865
+ form: "single",
35866
+ optional: false
35867
+ }],
35868
+ "intercom.startSession": [{
35869
+ name: "deviceId",
35870
+ form: "single",
35871
+ optional: false
35872
+ }],
35873
+ "intercom.startTalkSession": [{
35874
+ name: "deviceId",
35875
+ form: "single",
35876
+ optional: false
35877
+ }],
35878
+ "intercom.stopSession": [{
35879
+ name: "deviceId",
35880
+ form: "single",
35881
+ optional: false
35882
+ }],
35883
+ "lawnMowerControl.dock": [{
35884
+ name: "deviceId",
35885
+ form: "single",
35886
+ optional: false
35887
+ }],
35888
+ "lawnMowerControl.pause": [{
35889
+ name: "deviceId",
35890
+ form: "single",
35891
+ optional: false
35892
+ }],
35893
+ "lawnMowerControl.startMowing": [{
35894
+ name: "deviceId",
35895
+ form: "single",
35896
+ optional: false
35897
+ }],
35898
+ "lockControl.lock": [{
35899
+ name: "deviceId",
35900
+ form: "single",
35901
+ optional: false
35902
+ }],
35903
+ "lockControl.open": [{
35904
+ name: "deviceId",
35905
+ form: "single",
35906
+ optional: false
35907
+ }],
35908
+ "lockControl.unlock": [{
35909
+ name: "deviceId",
35910
+ form: "single",
35911
+ optional: false
35912
+ }],
35913
+ "mediaPlayer.next": [{
35914
+ name: "deviceId",
35915
+ form: "single",
35916
+ optional: false
35917
+ }],
35918
+ "mediaPlayer.pause": [{
35919
+ name: "deviceId",
35920
+ form: "single",
35921
+ optional: false
35922
+ }],
35923
+ "mediaPlayer.play": [{
35924
+ name: "deviceId",
35925
+ form: "single",
35926
+ optional: false
35927
+ }],
35928
+ "mediaPlayer.playMedia": [{
35929
+ name: "deviceId",
35930
+ form: "single",
35931
+ optional: false
35932
+ }],
35933
+ "mediaPlayer.previous": [{
35934
+ name: "deviceId",
35935
+ form: "single",
35936
+ optional: false
35937
+ }],
35938
+ "mediaPlayer.seek": [{
35939
+ name: "deviceId",
35940
+ form: "single",
35941
+ optional: false
35942
+ }],
35943
+ "mediaPlayer.selectSource": [{
35944
+ name: "deviceId",
35945
+ form: "single",
35946
+ optional: false
35947
+ }],
35948
+ "mediaPlayer.setMute": [{
35949
+ name: "deviceId",
35950
+ form: "single",
35951
+ optional: false
35952
+ }],
35953
+ "mediaPlayer.setRepeat": [{
35954
+ name: "deviceId",
35955
+ form: "single",
35956
+ optional: false
35957
+ }],
35958
+ "mediaPlayer.setShuffle": [{
35959
+ name: "deviceId",
35960
+ form: "single",
35961
+ optional: false
35962
+ }],
35963
+ "mediaPlayer.setVolume": [{
35964
+ name: "deviceId",
35965
+ form: "single",
35966
+ optional: false
35967
+ }],
35968
+ "mediaPlayer.stop": [{
35969
+ name: "deviceId",
35970
+ form: "single",
35971
+ optional: false
35972
+ }],
35973
+ "motion.isDetected": [{
35974
+ name: "deviceId",
35975
+ form: "single",
35976
+ optional: false
35977
+ }],
35978
+ "motionDetection.analyze": [{
35979
+ name: "deviceId",
35980
+ form: "single",
35981
+ optional: false
35982
+ }],
35983
+ "motionDetection.removeCamera": [{
35984
+ name: "deviceId",
35985
+ form: "single",
35986
+ optional: false
35987
+ }],
35988
+ "motionTrigger.setMotionTrigger": [{
35989
+ name: "deviceId",
35990
+ form: "single",
35991
+ optional: false
35992
+ }],
35993
+ "motionZones.getOptions": [{
35994
+ name: "deviceId",
35995
+ form: "single",
35996
+ optional: false
35997
+ }],
35998
+ "motionZones.setZone": [{
35999
+ name: "deviceId",
36000
+ form: "single",
36001
+ optional: false
36002
+ }],
36003
+ "nativeObjectDetection.setEnabled": [{
36004
+ name: "deviceId",
36005
+ form: "single",
36006
+ optional: false
36007
+ }],
36008
+ "networkQuality.getDeviceStats": [{
36009
+ name: "deviceId",
36010
+ form: "single",
36011
+ optional: false
36012
+ }],
36013
+ "networkQuality.reportClientStats": [{
36014
+ name: "deviceId",
36015
+ form: "single",
36016
+ optional: false
36017
+ }],
36018
+ "notificationRules.setDeviceMuted": [{
36019
+ name: "deviceId",
36020
+ form: "single",
36021
+ optional: false
36022
+ }],
36023
+ "notifier.cancel": [{
36024
+ name: "deviceId",
36025
+ form: "single",
36026
+ optional: false
36027
+ }],
36028
+ "notifier.send": [{
36029
+ name: "deviceId",
36030
+ form: "single",
36031
+ optional: false
36032
+ }],
36033
+ "osd.setOverlay": [{
36034
+ name: "deviceId",
36035
+ form: "single",
36036
+ optional: false
36037
+ }],
36038
+ "osdManager.clearSlotBinding": [{
36039
+ name: "deviceId",
36040
+ form: "single",
36041
+ optional: false
36042
+ }],
36043
+ "osdManager.copyDeviceConfiguration": [{
36044
+ name: "sourceDeviceId",
36045
+ form: "single",
36046
+ optional: false
36047
+ }, {
36048
+ name: "targetDeviceId",
36049
+ form: "single",
36050
+ optional: false
36051
+ }],
36052
+ "osdManager.getDeviceOsd": [{
36053
+ name: "deviceId",
36054
+ form: "single",
36055
+ optional: false
36056
+ }],
36057
+ "osdManager.getSourceCatalog": [{
36058
+ name: "deviceId",
36059
+ form: "single",
36060
+ optional: false
36061
+ }],
36062
+ "osdManager.previewSlot": [{
36063
+ name: "deviceId",
36064
+ form: "single",
36065
+ optional: false
36066
+ }],
36067
+ "osdManager.renderDevice": [{
36068
+ name: "deviceId",
36069
+ form: "single",
36070
+ optional: false
36071
+ }],
36072
+ "osdManager.setSlotBinding": [{
36073
+ name: "deviceId",
36074
+ form: "single",
36075
+ optional: false
36076
+ }],
36077
+ "petFeeder.callPet": [{
36078
+ name: "deviceId",
36079
+ form: "single",
36080
+ optional: false
36081
+ }],
36082
+ "petFeeder.cancelFeed": [{
36083
+ name: "deviceId",
36084
+ form: "single",
36085
+ optional: false
36086
+ }],
36087
+ "petFeeder.feed": [{
36088
+ name: "deviceId",
36089
+ form: "single",
36090
+ optional: false
36091
+ }],
36092
+ "petFeeder.markFoodReplenished": [{
36093
+ name: "deviceId",
36094
+ form: "single",
36095
+ optional: false
36096
+ }],
36097
+ "petFeeder.playSound": [{
36098
+ name: "deviceId",
36099
+ form: "single",
36100
+ optional: false
36101
+ }],
36102
+ "petFeeder.resetDesiccant": [{
36103
+ name: "deviceId",
36104
+ form: "single",
36105
+ optional: false
36106
+ }],
36107
+ "petFeeder.setChildLock": [{
36108
+ name: "deviceId",
36109
+ form: "single",
36110
+ optional: false
36111
+ }],
36112
+ "petFeeder.setFeedSound": [{
36113
+ name: "deviceId",
36114
+ form: "single",
36115
+ optional: false
36116
+ }],
36117
+ "petFeeder.setIndicatorLight": [{
36118
+ name: "deviceId",
36119
+ form: "single",
36120
+ optional: false
36121
+ }],
36122
+ "petFeeder.setVolume": [{
36123
+ name: "deviceId",
36124
+ form: "single",
36125
+ optional: false
36126
+ }],
36127
+ "pipelineAnalytics.clearTracks": [{
36128
+ name: "deviceId",
36129
+ form: "single",
36130
+ optional: false
36131
+ }],
36132
+ "pipelineAnalytics.completeRetrainTrack": [{
36133
+ name: "deviceId",
36134
+ form: "single",
36135
+ optional: false
36136
+ }],
36137
+ "pipelineAnalytics.deleteDeviceEvents": [{
36138
+ name: "deviceId",
36139
+ form: "single",
36140
+ optional: false
36141
+ }],
36142
+ "pipelineAnalytics.deleteTracks": [{
36143
+ name: "deviceId",
36144
+ form: "single",
36145
+ optional: false
36146
+ }],
36147
+ "pipelineAnalytics.deselectRetrainFrame": [{
36148
+ name: "deviceId",
36149
+ form: "single",
36150
+ optional: false
36151
+ }],
36152
+ "pipelineAnalytics.getActiveTracks": [{
36153
+ name: "deviceId",
36154
+ form: "single",
36155
+ optional: false
36156
+ }],
36157
+ "pipelineAnalytics.getAudioEvents": [{
36158
+ name: "deviceId",
36159
+ form: "single",
36160
+ optional: false
36161
+ }],
36162
+ "pipelineAnalytics.getEventDensity": [{
36163
+ name: "deviceId",
36164
+ form: "single",
36165
+ optional: false
36166
+ }],
36167
+ "pipelineAnalytics.getEventMedia": [{
36168
+ name: "deviceId",
36169
+ form: "single",
36170
+ optional: false
36171
+ }],
36172
+ "pipelineAnalytics.getKeyEvents": [{
36173
+ name: "deviceId",
36174
+ form: "single",
36175
+ optional: false
36176
+ }],
36177
+ "pipelineAnalytics.getMotionEvents": [{
36178
+ name: "deviceId",
36179
+ form: "single",
36180
+ optional: false
36181
+ }],
36182
+ "pipelineAnalytics.getObjectEvents": [{
36183
+ name: "deviceId",
36184
+ form: "single",
36185
+ optional: false
36186
+ }],
36187
+ "pipelineAnalytics.getRetrainExportUrl": [{
36188
+ name: "deviceIds",
36189
+ form: "array",
36190
+ optional: true
36191
+ }],
36192
+ "pipelineAnalytics.getSensorEvents": [{
36193
+ name: "deviceId",
36194
+ form: "single",
36195
+ optional: false
36196
+ }],
36197
+ "pipelineAnalytics.getTrack": [{
36198
+ name: "deviceId",
36199
+ form: "single",
36200
+ optional: false
36201
+ }],
36202
+ "pipelineAnalytics.getTrackMedia": [{
36203
+ name: "deviceId",
36204
+ form: "single",
36205
+ optional: false
36206
+ }],
36207
+ "pipelineAnalytics.getTrainingExportSummary": [{
36208
+ name: "deviceIds",
36209
+ form: "array",
36210
+ optional: true
36211
+ }],
36212
+ "pipelineAnalytics.getTrainingExportUrl": [{
36213
+ name: "deviceIds",
36214
+ form: "array",
36215
+ optional: true
36216
+ }],
36217
+ "pipelineAnalytics.listEventKinds": [{
36218
+ name: "deviceId",
36219
+ form: "single",
36220
+ optional: false
36221
+ }],
36222
+ "pipelineAnalytics.listEventKindsBatch": [{
36223
+ name: "deviceIds",
36224
+ form: "array",
36225
+ optional: false
36226
+ }],
36227
+ "pipelineAnalytics.listOpsLog": [{
36228
+ name: "deviceId",
36229
+ form: "single",
36230
+ optional: true
36231
+ }],
36232
+ "pipelineAnalytics.listRecentTracks": [{
36233
+ name: "deviceIds",
36234
+ form: "array",
36235
+ optional: false
36236
+ }],
36237
+ "pipelineAnalytics.listRetrainStaging": [{
36238
+ name: "deviceIds",
36239
+ form: "array",
36240
+ optional: true
36241
+ }],
36242
+ "pipelineAnalytics.listTrackMedia": [{
36243
+ name: "deviceId",
36244
+ form: "single",
36245
+ optional: false
36246
+ }],
36247
+ "pipelineAnalytics.listTracks": [{
36248
+ name: "deviceId",
36249
+ form: "single",
36250
+ optional: false
36251
+ }],
36252
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36253
+ name: "deviceId",
36254
+ form: "single",
36255
+ optional: false
36256
+ }],
36257
+ "pipelineAnalytics.pruneEventsBefore": [{
36258
+ name: "deviceId",
36259
+ form: "single",
36260
+ optional: false
36261
+ }],
36262
+ "pipelineAnalytics.pruneTracksBefore": [{
36263
+ name: "deviceId",
36264
+ form: "single",
36265
+ optional: false
36266
+ }],
36267
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36268
+ name: "deviceId",
36269
+ form: "single",
36270
+ optional: true
36271
+ }],
36272
+ "pipelineAnalytics.restageRetrainTrack": [{
36273
+ name: "deviceId",
36274
+ form: "single",
36275
+ optional: false
36276
+ }],
36277
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36278
+ name: "deviceId",
36279
+ form: "single",
36280
+ optional: false
36281
+ }],
36282
+ "pipelineAnalytics.searchObjectEvents": [{
36283
+ name: "deviceId",
36284
+ form: "single",
36285
+ optional: true
36286
+ }],
36287
+ "pipelineAnalytics.selectRetrainFrames": [{
36288
+ name: "deviceId",
36289
+ form: "single",
36290
+ optional: false
36291
+ }],
36292
+ "pipelineAnalytics.setTrackFlags": [{
36293
+ name: "deviceId",
36294
+ form: "single",
36295
+ optional: false
36296
+ }],
36297
+ "pipelineAnalytics.wipeAllAnalytics": [{
36298
+ name: "deviceId",
36299
+ form: "single",
36300
+ optional: false
36301
+ }],
36302
+ "pipelineExecutor.runPipeline": [{
36303
+ name: "deviceId",
36304
+ form: "single",
36305
+ optional: true
36306
+ }],
36307
+ "pipelineExecutor.runPipelineBatch": [{
36308
+ name: "deviceId",
36309
+ form: "single",
36310
+ optional: true
36311
+ }],
36312
+ "pipelineOrchestrator.assignAudio": [{
36313
+ name: "deviceId",
36314
+ form: "single",
36315
+ optional: false
36316
+ }],
36317
+ "pipelineOrchestrator.assignPipeline": [{
36318
+ name: "deviceId",
36319
+ form: "single",
36320
+ optional: false
36321
+ }],
36322
+ "pipelineOrchestrator.getAudioAssignment": [{
36323
+ name: "deviceId",
36324
+ form: "single",
36325
+ optional: false
36326
+ }],
36327
+ "pipelineOrchestrator.getCameraMetrics": [{
36328
+ name: "deviceId",
36329
+ form: "single",
36330
+ optional: false
36331
+ }],
36332
+ "pipelineOrchestrator.getCameraSettings": [{
36333
+ name: "deviceId",
36334
+ form: "single",
36335
+ optional: false
36336
+ }],
36337
+ "pipelineOrchestrator.getCameraStatus": [{
36338
+ name: "deviceId",
36339
+ form: "single",
36340
+ optional: false
36341
+ }],
36342
+ "pipelineOrchestrator.getCameraStatuses": [{
36343
+ name: "deviceIds",
36344
+ form: "array",
36345
+ optional: true
36346
+ }],
36347
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36348
+ name: "deviceId",
36349
+ form: "single",
36350
+ optional: false
36351
+ }],
36352
+ "pipelineOrchestrator.getCameraSwitches": [{
36353
+ name: "deviceId",
36354
+ form: "single",
36355
+ optional: false
36356
+ }],
36357
+ "pipelineOrchestrator.getPipelineAssignment": [{
36358
+ name: "deviceId",
36359
+ form: "single",
36360
+ optional: false
36361
+ }],
36362
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36363
+ name: "deviceId",
36364
+ form: "single",
36365
+ optional: false
36366
+ }],
36367
+ "pipelineOrchestrator.resolvePipeline": [{
36368
+ name: "deviceId",
36369
+ form: "single",
36370
+ optional: false
36371
+ }],
36372
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36373
+ name: "deviceId",
36374
+ form: "single",
36375
+ optional: false
36376
+ }],
36377
+ "pipelineOrchestrator.setCameraStepOverride": [{
36378
+ name: "deviceId",
36379
+ form: "single",
36380
+ optional: false
36381
+ }],
36382
+ "pipelineOrchestrator.setCameraStepToggle": [{
36383
+ name: "deviceId",
36384
+ form: "single",
36385
+ optional: false
36386
+ }],
36387
+ "pipelineOrchestrator.setCameraSwitch": [{
36388
+ name: "deviceId",
36389
+ form: "single",
36390
+ optional: false
36391
+ }],
36392
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36393
+ name: "deviceId",
36394
+ form: "single",
36395
+ optional: false
36396
+ }],
36397
+ "pipelineOrchestrator.unassignAudio": [{
36398
+ name: "deviceId",
36399
+ form: "single",
36400
+ optional: false
36401
+ }],
36402
+ "pipelineOrchestrator.unassignPipeline": [{
36403
+ name: "deviceId",
36404
+ form: "single",
36405
+ optional: false
36406
+ }],
36407
+ "pipelineRunner.attachCamera": [{
36408
+ name: "deviceId",
36409
+ form: "single",
36410
+ optional: false
36411
+ }],
36412
+ "pipelineRunner.detachCamera": [{
36413
+ name: "deviceId",
36414
+ form: "single",
36415
+ optional: false
36416
+ }],
36417
+ "pipelineRunner.getCameraMetrics": [{
36418
+ name: "deviceId",
36419
+ form: "single",
36420
+ optional: false
36421
+ }],
36422
+ "pipelineRunner.reportMotion": [{
36423
+ name: "deviceId",
36424
+ form: "single",
36425
+ optional: false
36426
+ }],
36427
+ "pipelineRunner.runDetailSubtree": [{
36428
+ name: "deviceId",
36429
+ form: "single",
36430
+ optional: false
36431
+ }],
36432
+ "pipelineRunner.runStatelessStep": [{
36433
+ name: "sourceDeviceId",
36434
+ form: "single",
36435
+ optional: false
36436
+ }],
36437
+ "plateGallery.getPlateByTrack": [{
36438
+ name: "deviceId",
36439
+ form: "single",
36440
+ optional: false
36441
+ }],
36442
+ "plateGallery.listPlates": [{
36443
+ name: "deviceId",
36444
+ form: "single",
36445
+ optional: true
36446
+ }],
36447
+ "privacyMask.getOptions": [{
36448
+ name: "deviceId",
36449
+ form: "single",
36450
+ optional: false
36451
+ }],
36452
+ "privacyMask.setAudioEnabled": [{
36453
+ name: "deviceId",
36454
+ form: "single",
36455
+ optional: false
36456
+ }],
36457
+ "privacyMask.setMask": [{
36458
+ name: "deviceId",
36459
+ form: "single",
36460
+ optional: false
36461
+ }],
36462
+ "ptz.continuousMove": [{
36463
+ name: "deviceId",
36464
+ form: "single",
36465
+ optional: false
36466
+ }],
36467
+ "ptz.deletePreset": [{
36468
+ name: "deviceId",
36469
+ form: "single",
36470
+ optional: false
36471
+ }],
36472
+ "ptz.getOptions": [{
36473
+ name: "deviceId",
36474
+ form: "single",
36475
+ optional: false
36476
+ }],
36477
+ "ptz.getPosition": [{
36478
+ name: "deviceId",
36479
+ form: "single",
36480
+ optional: false
36481
+ }],
36482
+ "ptz.getPresets": [{
36483
+ name: "deviceId",
36484
+ form: "single",
36485
+ optional: false
36486
+ }],
36487
+ "ptz.goHome": [{
36488
+ name: "deviceId",
36489
+ form: "single",
36490
+ optional: false
36491
+ }],
36492
+ "ptz.goToPreset": [{
36493
+ name: "deviceId",
36494
+ form: "single",
36495
+ optional: false
36496
+ }],
36497
+ "ptz.move": [{
36498
+ name: "deviceId",
36499
+ form: "single",
36500
+ optional: false
36501
+ }],
36502
+ "ptz.savePreset": [{
36503
+ name: "deviceId",
36504
+ form: "single",
36505
+ optional: false
36506
+ }],
36507
+ "ptz.setAutofocus": [{
36508
+ name: "deviceId",
36509
+ form: "single",
36510
+ optional: false
36511
+ }],
36512
+ "ptz.stop": [{
36513
+ name: "deviceId",
36514
+ form: "single",
36515
+ optional: false
36516
+ }],
36517
+ "ptzAutotrack.getSettings": [{
36518
+ name: "deviceId",
36519
+ form: "single",
36520
+ optional: false
36521
+ }],
36522
+ "ptzAutotrack.getStatus": [{
36523
+ name: "deviceId",
36524
+ form: "single",
36525
+ optional: false
36526
+ }],
36527
+ "ptzAutotrack.setEnabled": [{
36528
+ name: "deviceId",
36529
+ form: "single",
36530
+ optional: false
36531
+ }],
36532
+ "ptzAutotrack.setSettings": [{
36533
+ name: "deviceId",
36534
+ form: "single",
36535
+ optional: false
36536
+ }],
36537
+ "reboot.reboot": [{
36538
+ name: "deviceId",
36539
+ form: "single",
36540
+ optional: false
36541
+ }],
36542
+ "recording.deleteFootprint": [{
36543
+ name: "deviceId",
36544
+ form: "single",
36545
+ optional: false
36546
+ }],
36547
+ "recording.getAvailability": [{
36548
+ name: "deviceId",
36549
+ form: "single",
36550
+ optional: false
36551
+ }],
36552
+ "recording.getDaysWithRecordings": [{
36553
+ name: "deviceId",
36554
+ form: "single",
36555
+ optional: false
36556
+ }],
36557
+ "recording.getDeviceConfig": [{
36558
+ name: "deviceId",
36559
+ form: "single",
36560
+ optional: false
36561
+ }],
36562
+ "recording.getPlaybackManifest": [{
36563
+ name: "deviceId",
36564
+ form: "single",
36565
+ optional: false
36566
+ }],
36567
+ "recording.listOpsLog": [{
36568
+ name: "deviceId",
36569
+ form: "single",
36570
+ optional: true
36571
+ }],
36572
+ "recording.locateSegment": [{
36573
+ name: "deviceId",
36574
+ form: "single",
36575
+ optional: false
36576
+ }],
36577
+ "recording.pruneFootage": [{
36578
+ name: "deviceId",
36579
+ form: "single",
36580
+ optional: false
36581
+ }],
36582
+ "recording.readGopBytes": [{
36583
+ name: "deviceId",
36584
+ form: "single",
36585
+ optional: false
36586
+ }],
36587
+ "recording.readSegmentBytes": [{
36588
+ name: "deviceId",
36589
+ form: "single",
36590
+ optional: false
36591
+ }],
36592
+ "recording.relocateFootage": [{
36593
+ name: "deviceId",
36594
+ form: "single",
36595
+ optional: true
36596
+ }],
36597
+ "recording.renderClip": [{
36598
+ name: "deviceId",
36599
+ form: "single",
36600
+ optional: false
36601
+ }],
36602
+ "recording.renderGif": [{
36603
+ name: "deviceId",
36604
+ form: "single",
36605
+ optional: false
36606
+ }],
36607
+ "recording.rescanStorage": [{
36608
+ name: "deviceId",
36609
+ form: "single",
36610
+ optional: false
36611
+ }],
36612
+ "recording.setDeviceConfig": [{
36613
+ name: "deviceId",
36614
+ form: "single",
36615
+ optional: false
36616
+ }],
36617
+ "recording.startStorageMigrationMove": [{
36618
+ name: "deviceId",
36619
+ form: "single",
36620
+ optional: true
36621
+ }],
36622
+ "recordingExport.createExport": [{
36623
+ name: "deviceId",
36624
+ form: "single",
36625
+ optional: false
36626
+ }],
36627
+ "recordingExport.listExports": [{
36628
+ name: "deviceId",
36629
+ form: "single",
36630
+ optional: true
36631
+ }],
36632
+ "sceneMonitor.captureReference": [{
36633
+ name: "deviceId",
36634
+ form: "single",
36635
+ optional: false
36636
+ }],
36637
+ "sceneMonitor.createScene": [{
36638
+ name: "deviceId",
36639
+ form: "single",
36640
+ optional: false
36641
+ }],
36642
+ "sceneMonitor.deleteReference": [{
36643
+ name: "deviceId",
36644
+ form: "single",
36645
+ optional: false
36646
+ }],
36647
+ "sceneMonitor.deleteScene": [{
36648
+ name: "deviceId",
36649
+ form: "single",
36650
+ optional: false
36651
+ }],
36652
+ "sceneMonitor.listScenes": [{
36653
+ name: "deviceId",
36654
+ form: "single",
36655
+ optional: false
36656
+ }],
36657
+ "sceneMonitor.recheckNow": [{
36658
+ name: "deviceId",
36659
+ form: "single",
36660
+ optional: false
36661
+ }],
36662
+ "sceneMonitor.resetScene": [{
36663
+ name: "deviceId",
36664
+ form: "single",
36665
+ optional: false
36666
+ }],
36667
+ "sceneMonitor.updateScene": [{
36668
+ name: "deviceId",
36669
+ form: "single",
36670
+ optional: false
36671
+ }],
36672
+ "scriptRunner.run": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36677
+ "scriptRunner.stop": [{
36678
+ name: "deviceId",
36679
+ form: "single",
36680
+ optional: false
36681
+ }],
36682
+ "snapshot.getDebugState": [{
36683
+ name: "deviceId",
36684
+ form: "single",
36685
+ optional: false
36686
+ }],
36687
+ "snapshot.getSnapshot": [{
36688
+ name: "deviceId",
36689
+ form: "single",
36690
+ optional: false
36691
+ }],
36692
+ "snapshot.getSnapshotLinks": [{
36693
+ name: "targets",
36694
+ form: "object-array",
36695
+ optional: false,
36696
+ itemField: "deviceId"
36697
+ }],
36698
+ "snapshot.getSnapshotOverview": [{
36699
+ name: "deviceIds",
36700
+ form: "array",
36701
+ optional: false
36702
+ }],
36703
+ "snapshot.invalidateCache": [{
36704
+ name: "deviceId",
36705
+ form: "single",
36706
+ optional: false
36707
+ }],
36708
+ "streamBroker.acquireEgressTranscode": [{
36709
+ name: "deviceId",
36710
+ form: "single",
36711
+ optional: false
36712
+ }],
36713
+ "streamBroker.assignProfile": [{
36714
+ name: "deviceId",
36715
+ form: "single",
36716
+ optional: false
36717
+ }],
36718
+ "streamBroker.getDeviceAudioMute": [{
36719
+ name: "deviceId",
36720
+ form: "single",
36721
+ optional: false
36722
+ }],
36723
+ "streamBroker.getStreamWithCodec": [{
36724
+ name: "deviceId",
36725
+ form: "single",
36726
+ optional: false
36727
+ }],
36728
+ "streamBroker.produceEventMedia": [{
36729
+ name: "deviceId",
36730
+ form: "single",
36731
+ optional: false
36732
+ }],
36733
+ "streamBroker.publishCameraStream": [{
36734
+ name: "deviceId",
36735
+ form: "single",
36736
+ optional: false
36737
+ }],
36738
+ "streamBroker.renderPreBufferClip": [{
36739
+ name: "deviceId",
36740
+ form: "single",
36741
+ optional: false
36742
+ }],
36743
+ "streamBroker.restartProfile": [{
36744
+ name: "deviceId",
36745
+ form: "single",
36746
+ optional: false
36747
+ }],
36748
+ "streamBroker.retractCameraStream": [{
36749
+ name: "deviceId",
36750
+ form: "single",
36751
+ optional: false
36752
+ }],
36753
+ "streamBroker.setDeviceAudioMute": [{
36754
+ name: "deviceId",
36755
+ form: "single",
36756
+ optional: false
36757
+ }],
36758
+ "streamBroker.unassignProfile": [{
36759
+ name: "deviceId",
36760
+ form: "single",
36761
+ optional: false
36762
+ }],
36763
+ "streamCatalog.getCatalog": [{
36764
+ name: "deviceId",
36765
+ form: "single",
36766
+ optional: false
36767
+ }],
36768
+ "streamParams.getConfigSchema": [{
36769
+ name: "deviceId",
36770
+ form: "single",
36771
+ optional: false
36772
+ }],
36773
+ "streamParams.getOptions": [{
36774
+ name: "deviceId",
36775
+ form: "single",
36776
+ optional: false
36777
+ }],
36778
+ "streamParams.setProfile": [{
36779
+ name: "deviceId",
36780
+ form: "single",
36781
+ optional: false
36782
+ }],
36783
+ "switch.setState": [{
36784
+ name: "deviceId",
36785
+ form: "single",
36786
+ optional: false
36787
+ }],
36788
+ "vacuumControl.locate": [{
36789
+ name: "deviceId",
36790
+ form: "single",
36791
+ optional: false
36792
+ }],
36793
+ "vacuumControl.pause": [{
36794
+ name: "deviceId",
36795
+ form: "single",
36796
+ optional: false
36797
+ }],
36798
+ "vacuumControl.returnToBase": [{
36799
+ name: "deviceId",
36800
+ form: "single",
36801
+ optional: false
36802
+ }],
36803
+ "vacuumControl.setFanSpeed": [{
36804
+ name: "deviceId",
36805
+ form: "single",
36806
+ optional: false
36807
+ }],
36808
+ "vacuumControl.start": [{
36809
+ name: "deviceId",
36810
+ form: "single",
36811
+ optional: false
36812
+ }],
36813
+ "vacuumControl.stop": [{
36814
+ name: "deviceId",
36815
+ form: "single",
36816
+ optional: false
36817
+ }],
36818
+ "valve.close": [{
36819
+ name: "deviceId",
36820
+ form: "single",
36821
+ optional: false
36822
+ }],
36823
+ "valve.open": [{
36824
+ name: "deviceId",
36825
+ form: "single",
36826
+ optional: false
36827
+ }],
36828
+ "valve.setPosition": [{
36829
+ name: "deviceId",
36830
+ form: "single",
36831
+ optional: false
36832
+ }],
36833
+ "valve.stop": [{
36834
+ name: "deviceId",
36835
+ form: "single",
36836
+ optional: false
36837
+ }],
36838
+ "videoclips.getClipPlayback": [{
36839
+ name: "deviceId",
36840
+ form: "single",
36841
+ optional: false
36842
+ }],
36843
+ "videoclips.listClips": [{
36844
+ name: "deviceId",
36845
+ form: "single",
36846
+ optional: false
36847
+ }],
36848
+ "waterHeater.setAway": [{
36849
+ name: "deviceId",
36850
+ form: "single",
36851
+ optional: false
36852
+ }],
36853
+ "waterHeater.setOperationMode": [{
36854
+ name: "deviceId",
36855
+ form: "single",
36856
+ optional: false
36857
+ }],
36858
+ "waterHeater.setTargetTemp": [{
36859
+ name: "deviceId",
36860
+ form: "single",
36861
+ optional: false
36862
+ }],
36863
+ "webrtcSession.addIceCandidate": [{
36864
+ name: "deviceId",
36865
+ form: "single",
36866
+ optional: false
36867
+ }],
36868
+ "webrtcSession.closeSession": [{
36869
+ name: "deviceId",
36870
+ form: "single",
36871
+ optional: false
36872
+ }],
36873
+ "webrtcSession.createSession": [{
36874
+ name: "deviceId",
36875
+ form: "single",
36876
+ optional: false
36877
+ }],
36878
+ "webrtcSession.getIceCandidates": [{
36879
+ name: "deviceId",
36880
+ form: "single",
36881
+ optional: false
36882
+ }],
36883
+ "webrtcSession.getSessionState": [{
36884
+ name: "deviceId",
36885
+ form: "single",
36886
+ optional: false
36887
+ }],
36888
+ "webrtcSession.handleAnswer": [{
36889
+ name: "deviceId",
36890
+ form: "single",
36891
+ optional: false
36892
+ }],
36893
+ "webrtcSession.handleOffer": [{
36894
+ name: "deviceId",
36895
+ form: "single",
36896
+ optional: false
36897
+ }],
36898
+ "webrtcSession.hasAdaptiveBitrate": [{
36899
+ name: "deviceId",
36900
+ form: "single",
36901
+ optional: false
36902
+ }],
36903
+ "webrtcSession.listStreams": [{
36904
+ name: "deviceId",
36905
+ form: "single",
36906
+ optional: false
36907
+ }],
36908
+ "zoneAnalytics.getCameraHistory": [{
36909
+ name: "deviceId",
36910
+ form: "single",
36911
+ optional: false
36912
+ }],
36913
+ "zoneAnalytics.getCurrentSnapshot": [{
36914
+ name: "deviceId",
36915
+ form: "single",
36916
+ optional: false
36917
+ }],
36918
+ "zoneAnalytics.getUnzonedHistory": [{
36919
+ name: "deviceId",
36920
+ form: "single",
36921
+ optional: false
36922
+ }],
36923
+ "zoneAnalytics.getZoneHistory": [{
36924
+ name: "deviceId",
36925
+ form: "single",
36926
+ optional: false
36927
+ }],
36928
+ "zoneRules.listRules": [{
36929
+ name: "deviceId",
36930
+ form: "single",
36931
+ optional: false
36932
+ }],
36933
+ "zoneRules.setRules": [{
36934
+ name: "deviceId",
36935
+ form: "single",
36936
+ optional: false
36937
+ }],
36938
+ "zones.addZone": [{
36939
+ name: "deviceId",
36940
+ form: "single",
36941
+ optional: false
36942
+ }],
36943
+ "zones.listZones": [{
36944
+ name: "deviceId",
36945
+ form: "single",
36946
+ optional: false
36947
+ }],
36948
+ "zones.removeZone": [{
36949
+ name: "deviceId",
36950
+ form: "single",
36951
+ optional: false
36952
+ }],
36953
+ "zones.updateZone": [{
36954
+ name: "deviceId",
36955
+ form: "single",
36956
+ optional: false
36957
+ }]
36958
+ });
34191
36959
  Object.freeze({
34192
36960
  "broker": "broker",
34193
36961
  "device-export": "device-export",