@camstack/addon-provider-amcrest 0.2.18 → 0.2.20

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 +2907 -143
  2. package/dist/addon.mjs +2907 -143
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5,7 +5,7 @@ import { networkInterfaces } from "node:os";
5
5
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
6
6
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
7
7
  //#endregion
8
- //#region ../types/dist/event-category-Cv9dO26A.mjs
8
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
9
9
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
10
10
  EventCategory["SystemBoot"] = "system.boot";
11
11
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -212,6 +212,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
212
212
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
213
213
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
214
214
  /**
215
+ * A node the orchestrator would otherwise place cameras on has NO usable
216
+ * inference device: the operator enabled one or more accelerators there and
217
+ * the live probe reports every one of them unavailable. Emitted once per
218
+ * TRANSITION into that state (never per dispatch), and the node is dropped
219
+ * from the placement candidate set for as long as it holds.
220
+ *
221
+ * This exists because the state was previously invisible: little-unraid
222
+ * absorbed 283k inference errors in a day while still being handed cameras,
223
+ * and nothing in the system said so.
224
+ *
225
+ * A node with no accelerators configured at all is NOT this — its devices
226
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
227
+ * serves it exactly as before.
228
+ */
229
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
230
+ /**
231
+ * A camera has an OPEN detection session and has produced no detection at
232
+ * all for longer than the blind threshold — the camera is being decoded and
233
+ * inferred and is returning nothing. Emitted once per transition into blind,
234
+ * per camera.
235
+ *
236
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
237
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
238
+ * camera" produce byte-identical silence.
239
+ */
240
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
241
+ /**
215
242
  * Per-camera pipeline config was mutated by the orchestrator
216
243
  * (3-level settings change via `setAgentAddonDefaults` /
217
244
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -3003,6 +3030,9 @@ function handlePipeResult(left, next, ctx) {
3003
3030
  fallback: left.fallback
3004
3031
  }, ctx);
3005
3032
  }
3033
+ var $ZodPreprocess = /*@__PURE__*/ $constructor("$ZodPreprocess", (inst, def) => {
3034
+ $ZodPipe.init(inst, def);
3035
+ });
3006
3036
  var $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
3007
3037
  $ZodType.init(inst, def);
3008
3038
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -5188,6 +5218,10 @@ function pipe(in_, out) {
5188
5218
  out
5189
5219
  });
5190
5220
  }
5221
+ var ZodPreprocess = /*@__PURE__*/ $constructor("ZodPreprocess", (inst, def) => {
5222
+ ZodPipe.init(inst, def);
5223
+ $ZodPreprocess.init(inst, def);
5224
+ });
5191
5225
  var ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5192
5226
  $ZodReadonly.init(inst, def);
5193
5227
  ZodType.init(inst, def);
@@ -5246,6 +5280,13 @@ function _instanceof(cls, params = {}) {
5246
5280
  };
5247
5281
  return inst;
5248
5282
  }
5283
+ function preprocess(fn, schema) {
5284
+ return new ZodPreprocess({
5285
+ type: "pipe",
5286
+ in: transform(fn),
5287
+ out: schema
5288
+ });
5289
+ }
5249
5290
  //#endregion
5250
5291
  //#region ../../node_modules/zod/v4/classic/compat.js
5251
5292
  /** @deprecated Use the raw string literal codes instead, e.g. "invalid_type". */
@@ -10870,6 +10911,8 @@ var QueryFilterSchema = object({
10870
10911
  where: record(string(), unknown()).optional(),
10871
10912
  whereIn: record(string(), array(unknown())).optional(),
10872
10913
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10914
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10915
+ whereNot: record(string(), unknown()).optional(),
10873
10916
  orderBy: object({
10874
10917
  field: string(),
10875
10918
  direction: _enum(["asc", "desc"])
@@ -10889,7 +10932,8 @@ var QueryFilterSchema = object({
10889
10932
  var MutationFilterSchema = object({
10890
10933
  where: record(string(), unknown()).optional(),
10891
10934
  whereIn: record(string(), array(unknown())).optional(),
10892
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10935
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10936
+ whereNot: record(string(), unknown()).optional()
10893
10937
  });
10894
10938
  /** A single stored record: `{ id, data }`. */
10895
10939
  var SettingsRecordSchema = object({
@@ -12408,6 +12452,17 @@ var LlmImageSchema = object({
12408
12452
  bytes: _instanceof(Uint8Array),
12409
12453
  mimeType: string()
12410
12454
  });
12455
+ /**
12456
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12457
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12458
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12459
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12460
+ */
12461
+ var LlmRetryPolicySchema = object({
12462
+ enabled: boolean().default(false),
12463
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12464
+ maxAttempts: number().int().min(1).max(5).default(1)
12465
+ });
12411
12466
  var LlmGenerateBaseInputSchema = object({
12412
12467
  /** Collection routing (the notification-output posture). */
12413
12468
  addonId: string().optional(),
@@ -12422,7 +12477,28 @@ var LlmGenerateBaseInputSchema = object({
12422
12477
  jsonSchema: record(string(), unknown()).optional(),
12423
12478
  /** Per-call override of the profile default. */
12424
12479
  maxTokens: number().int().positive().optional(),
12425
- temperature: number().optional()
12480
+ temperature: number().optional(),
12481
+ /** Per-call override of the profile default (nucleus sampling). */
12482
+ topP: number().min(0).max(1).optional(),
12483
+ /** Per-call override of the profile default (top-k sampling). */
12484
+ topK: number().int().positive().optional(),
12485
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12486
+ timeoutMs: number().int().positive().optional(),
12487
+ /** Per-call override; beats both the consumer table and the profile. */
12488
+ retry: LlmRetryPolicySchema.optional(),
12489
+ /**
12490
+ * Caller-minted id that makes this generation CANCELLABLE.
12491
+ *
12492
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12493
+ * the call against 8 s and free their own slot when the timer wins, while the
12494
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12495
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12496
+ * not generations, and the real load is unbounded.
12497
+ *
12498
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12499
+ * `llm.cancel({ requestId })` tears the socket down.
12500
+ */
12501
+ requestId: string().optional()
12426
12502
  });
12427
12503
  /**
12428
12504
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12435,6 +12511,18 @@ var LlmGenerateBaseInputSchema = object({
12435
12511
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12436
12512
  * watchdog — operator decision #3).
12437
12513
  */
12514
+ /**
12515
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12516
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12517
+ * REF rather than looked up at install time, so what the operator approved in
12518
+ * the preview is exactly what the node downloads.
12519
+ */
12520
+ var ManagedModelExtraFileSchema = object({
12521
+ url: string(),
12522
+ filename: string(),
12523
+ sizeBytes: number(),
12524
+ sha256: string().optional()
12525
+ });
12438
12526
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12439
12527
  object({
12440
12528
  kind: literal("catalog"),
@@ -12443,7 +12531,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12443
12531
  object({
12444
12532
  kind: literal("url"),
12445
12533
  url: string(),
12446
- sha256: string().optional()
12534
+ sha256: string().optional(),
12535
+ /** Picker/status label; the file basename when absent. */
12536
+ label: string().optional(),
12537
+ sizeBytes: number().optional(),
12538
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12447
12539
  }),
12448
12540
  object({
12449
12541
  kind: literal("path"),
@@ -12461,13 +12553,82 @@ var ManagedRuntimeConfigSchema = object({
12461
12553
  gpuLayers: number().int().default(0),
12462
12554
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12463
12555
  threads: number().int().optional(),
12464
- /** Concurrent slots. */
12556
+ /** Concurrent slots (`--parallel`). */
12465
12557
  parallel: number().int().default(1),
12558
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12559
+ batchSize: number().int().positive().optional(),
12560
+ /** Physical batch / micro-batch (`-ub`). */
12561
+ ubatchSize: number().int().positive().optional(),
12562
+ /**
12563
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12564
+ * is a no-op elsewhere, so it is offered rather than assumed.
12565
+ */
12566
+ flashAttention: boolean().default(false),
12567
+ /**
12568
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12569
+ * inference. Costs the full model size in resident memory — which is exactly
12570
+ * what the RAM budget is counting.
12571
+ */
12572
+ mlock: boolean().default(false),
12573
+ /**
12574
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12575
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12576
+ * store produces on every first token.
12577
+ */
12578
+ noMmap: boolean().default(false),
12579
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12580
+ * cheapest way to fit a longer context in the same RAM. */
12581
+ cacheTypeK: _enum([
12582
+ "f32",
12583
+ "f16",
12584
+ "q8_0",
12585
+ "q5_1",
12586
+ "q5_0",
12587
+ "q4_1",
12588
+ "q4_0"
12589
+ ]).optional(),
12590
+ cacheTypeV: _enum([
12591
+ "f32",
12592
+ "f16",
12593
+ "q8_0",
12594
+ "q5_1",
12595
+ "q5_0",
12596
+ "q4_1",
12597
+ "q4_0"
12598
+ ]).optional(),
12599
+ /**
12600
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12601
+ * (which most vision chat templates need and some language-only models
12602
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12603
+ *
12604
+ * It is NOT a second place to set the flags above. A token that collides
12605
+ * with a typed field is REJECTED at start, naming the field that owns it
12606
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12607
+ * the "two switches that disagree" failure this repo has already shipped
12608
+ * twice (D62).
12609
+ */
12610
+ extraArgs: array(string()).default([]),
12466
12611
  /** Else lazy: first generate boots it. */
12467
12612
  autoStart: boolean().default(false),
12468
12613
  /** 0 = never; frees RAM after quiet periods. */
12469
12614
  idleStopMinutes: number().int().default(30)
12470
12615
  });
12616
+ /**
12617
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12618
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12619
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12620
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12621
+ */
12622
+ var LlmDownloadProgressSchema = object({
12623
+ phase: _enum(["downloading", "verifying"]),
12624
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12625
+ file: string(),
12626
+ fileIndex: number().int(),
12627
+ fileCount: number().int(),
12628
+ /** Across the WHOLE install, not the current file. */
12629
+ downloadedBytes: number(),
12630
+ totalBytes: number().optional()
12631
+ });
12471
12632
  var LlmRuntimeStatusSchema = object({
12472
12633
  /** Status is ALWAYS node-qualified. */
12473
12634
  nodeId: string(),
@@ -12484,6 +12645,8 @@ var LlmRuntimeStatusSchema = object({
12484
12645
  modelPath: string().optional(),
12485
12646
  modelId: string().optional(),
12486
12647
  downloadProgress: number().min(0).max(1).optional(),
12648
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12649
+ download: LlmDownloadProgressSchema.optional(),
12487
12650
  lastError: string().optional(),
12488
12651
  crashesInWindow: number(),
12489
12652
  /** Child RSS (sampled best-effort). */
@@ -12494,7 +12657,14 @@ var LlmNodeModelSchema = object({
12494
12657
  file: string(),
12495
12658
  sizeBytes: number(),
12496
12659
  catalogId: string().optional(),
12497
- installedAt: number().optional()
12660
+ installedAt: number().optional(),
12661
+ /**
12662
+ * Absolute path on the node. Present so a file that is on disk but matches
12663
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12664
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12665
+ * it the picker could list such a file and do nothing with it.
12666
+ */
12667
+ path: string().optional()
12498
12668
  });
12499
12669
  var LlmRuntimeDiskUsageSchema = object({
12500
12670
  nodeId: string(),
@@ -12550,10 +12720,47 @@ var LlmProfileSchema = object({
12550
12720
  baseUrl: string().optional(),
12551
12721
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12552
12722
  apiKey: string().optional(),
12723
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12724
+ * degraded to text — that shipped once and produced a confident answer to a
12725
+ * question about a picture nobody sent. */
12553
12726
  supportsVision: boolean(),
12554
12727
  temperature: number().min(0).max(2).optional(),
12728
+ /** Nucleus sampling. Every wire we speak has it. */
12729
+ topP: number().min(0).max(1).optional(),
12730
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12731
+ * wire does, and the client drops it there (measured: the request body gets
12732
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12733
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12734
+ topK: number().int().positive().optional(),
12555
12735
  maxTokens: number().int().positive().optional(),
12736
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12737
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12738
+ * the model with, so it is the one field that changes a PROCESS. */
12739
+ contextLength: number().int().positive().optional(),
12740
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12741
+ * two system prompts fighting is worse than either alone). */
12742
+ systemPrompt: string().optional(),
12743
+ /** Total generation bound — the only one a unary call has. */
12556
12744
  timeoutMs: number().int().positive().default(6e4),
12745
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12746
+ * response headers: on the LM Studio / llama-server wire those are written
12747
+ * once the model has finished loading, so they belong to the bound below. */
12748
+ connectTimeoutMs: number().int().positive().default(1e4),
12749
+ /** Accepted, but no output yet — response headers included, because a cold
12750
+ * GPU load is exactly what happens before them. */
12751
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12752
+ /** Output started then stopped. */
12753
+ idleTimeoutMs: number().int().positive().default(6e4),
12754
+ /** Profile-level default. The per-consumer table and a per-call override
12755
+ * both beat it — see `resolveRetryPolicy`. */
12756
+ retry: LlmRetryPolicySchema.default({
12757
+ enabled: false,
12758
+ maxAttempts: 1
12759
+ }),
12760
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12761
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12762
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12763
+ toolsEnabled: boolean().default(false),
12557
12764
  extraHeaders: record(string(), string()).optional(),
12558
12765
  /** kind === 'managed-local' only (spec §4). */
12559
12766
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12603,6 +12810,36 @@ var ManagedModelCatalogEntrySchema = object({
12603
12810
  /** Vision models: companion projector file. */
12604
12811
  mmprojUrl: string().optional()
12605
12812
  });
12813
+ /**
12814
+ * The outcome of turning one operator-typed Hugging Face reference into a
12815
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12816
+ * I will not pick for you" is a normal answer the UI has to render, not an
12817
+ * exception.
12818
+ *
12819
+ * `candidates` is the whole reason the refusal is usable — every string in it
12820
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12821
+ */
12822
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12823
+ ok: literal(true),
12824
+ /** Ready to hand to `installModel` unchanged. */
12825
+ model: ManagedModelRefSchema,
12826
+ label: string(),
12827
+ repo: string(),
12828
+ quantization: string(),
12829
+ purpose: _enum(["text", "vision"]),
12830
+ totalBytes: number(),
12831
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12832
+ * see that 0.9 GB of it is a projector they did not name. */
12833
+ extraFilenames: array(string())
12834
+ }), object({
12835
+ ok: literal(false),
12836
+ code: string(),
12837
+ message: string(),
12838
+ candidates: array(string()).optional(),
12839
+ /** Set when the refusal was only the ceiling: re-calling with
12840
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12841
+ requiredBytes: number().optional()
12842
+ })]);
12606
12843
  var LlmRuntimeNodeSchema = object({
12607
12844
  nodeId: string(),
12608
12845
  reachable: boolean(),
@@ -12615,7 +12852,10 @@ var ProfileRefInputSchema = object({
12615
12852
  addonId: string(),
12616
12853
  profileId: string()
12617
12854
  });
12618
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12855
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12856
+ addonId: string().optional(),
12857
+ requestId: string()
12858
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12619
12859
  kind: "mutation",
12620
12860
  auth: "admin"
12621
12861
  }), method(ProfileRefInputSchema, _void(), {
@@ -12636,6 +12876,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12636
12876
  consumer: string().optional(),
12637
12877
  profileId: string().optional()
12638
12878
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12879
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12880
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12881
+ ref: string(),
12882
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12883
+ maxBytes: number().positive().optional()
12884
+ }), HfModelResolutionSchema, {
12885
+ kind: "mutation",
12886
+ auth: "admin"
12887
+ }), method(object({
12639
12888
  nodeId: string(),
12640
12889
  model: ManagedModelRefSchema
12641
12890
  }), _void(), {
@@ -14283,6 +14532,8 @@ var NcSystemEventKindSchema = _enum([
14283
14532
  "stream-offline",
14284
14533
  "node-online",
14285
14534
  "node-offline",
14535
+ "node-inference-unavailable",
14536
+ "detection-blind",
14286
14537
  "addon-update-available",
14287
14538
  "server-update-available",
14288
14539
  "alarm-triggered",
@@ -14344,7 +14595,16 @@ var NcScheduleSchema = object({
14344
14595
  });
14345
14596
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14346
14597
  var NcPlateMatcherSchema = object({
14347
- values: array(string().min(1)).min(1),
14598
+ /**
14599
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14600
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14601
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14602
+ * rather than merely seen. A subject carrying no plate still fails.
14603
+ *
14604
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14605
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14606
+ */
14607
+ values: array(string().min(1)),
14348
14608
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14349
14609
  maxDistance: number().int().min(0).max(3).default(1)
14350
14610
  });
@@ -14378,28 +14638,36 @@ var NcOccupancyConditionSchema = object({
14378
14638
  /**
14379
14639
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14380
14640
  *
14381
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14382
- * reference notifier uses, so an operator moving between them re-uses what
14383
- * they already know): a rule matches when, over a sampling window of
14384
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14385
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14386
- *
14387
- * - `dbThreshold` its level is at or above this many dBFS (see
14388
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14389
- * - `labels` the classifier put at least one of these labels on it.
14390
- *
14391
- * Both are OPTIONAL and independent, which is the point of the shape: a
14392
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14393
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14394
- * is given** a window in which every sample is trivially a hit would fire on
14395
- * silence, so the engine refuses such a condition rather than notifying on
14396
- * nothing (the schema cannot express "at least one of" without becoming a
14397
- * ZodEffects the cap path would have to special-case).
14398
- *
14399
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14400
- * must be FULL before it can match a window that has been open for two
14401
- * seconds of its ten is 100% of nothing, and firing on it would make
14402
- * `samplingSeconds` decorative.
14641
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14642
+ * rule is in is not a stored field it is WHICH FILTER the rule carries, so
14643
+ * there is no second switch that can disagree with the first and every rule
14644
+ * authored before the decision migrates for free (`audioModeOf`):
14645
+ *
14646
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14647
+ * classifier labels with one of them. No window, no percentage:
14648
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14649
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14650
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14651
+ * reaches this condition if the classifier was already confident enough.
14652
+ * - **LEVEL mode `dbThreshold` present, no labels.** The sampling window IS
14653
+ * the condition: at least `hitPercent`% of the samples over
14654
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14655
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14656
+ * must be FULL before it can match a window open for two of its ten
14657
+ * seconds is 100% of nothing.
14658
+ *
14659
+ * **Why label mode has no window.** It had one, and it never fired: the
14660
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14661
+ * of them per episode, even through continuous crying. The measured maximum
14662
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14663
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14664
+ * the wrong question to ask of a sparse classifier.
14665
+ *
14666
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14667
+ * and the rule would fire on silence. The schema cannot express "exactly one
14668
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14669
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14670
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14403
14671
  *
14404
14672
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14405
14673
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14407,13 +14675,13 @@ var NcOccupancyConditionSchema = object({
14407
14675
  * an operator who typed `dog` mean the same thing.
14408
14676
  */
14409
14677
  var NcAudioConditionSchema = object({
14410
- /** Audio macro labels; absent = any sound (level-only rule). */
14678
+ /** LABEL MODE: audio macro labels. Present fires on the first labelled frame. */
14411
14679
  labels: array(string().min(1)).min(1).optional(),
14412
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14680
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14413
14681
  dbThreshold: number().min(-96).max(0).optional(),
14414
- /** Percentage of the window's samples that must be hits (1–100). */
14682
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14415
14683
  hitPercent: number().int().min(1).max(100).default(60),
14416
- /** Length of the sampling window in seconds. */
14684
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14417
14685
  samplingSeconds: number().int().min(1).max(300).default(10)
14418
14686
  });
14419
14687
  /**
@@ -14551,13 +14819,81 @@ var NcRuleActionsSchema = object({
14551
14819
  */
14552
14820
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14553
14821
  });
14822
+ /**
14823
+ * "This rule applies only while `deviceId` is in one of `states`."
14824
+ *
14825
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14826
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14827
+ * make the condition lie about devices whose states have no equivalent.
14828
+ *
14829
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14830
+ * condition that fired on "I could not read it" would be worse than no gate.
14831
+ */
14832
+ var NcDeviceStateConditionSchema = object({
14833
+ deviceId: number().int(),
14834
+ /** Any of these matches. */
14835
+ states: array(string().min(1)).min(1)
14836
+ });
14837
+ /**
14838
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14839
+ *
14840
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14841
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14842
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14843
+ * already has a trigger ("tell me about a person at the front door, but only
14844
+ * while the bin is still out"). That is why it composes with every delivery
14845
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14846
+ * kind exist for it — see D159.
14847
+ *
14848
+ * ── Identity ───────────────────────────────────────────────────────────────
14849
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14850
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14851
+ * carried as a HINT for the editor and for the log line, never as part of the
14852
+ * lookup key: a rule whose hint drifted must still gate correctly.
14853
+ *
14854
+ * ── Which boolean ──────────────────────────────────────────────────────────
14855
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14856
+ * already declares which boolean drives notification rules, and a second knob
14857
+ * that could disagree with it is exactly the D62 failure. Set it only to
14858
+ * override one rule against the scene's own default.
14859
+ *
14860
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14861
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14862
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14863
+ * evidence, in either direction.
14864
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14865
+ * The latch is a durable fact about the past ("it has diverged since I armed
14866
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14867
+ * reason the operator asked for a latch.
14868
+ *
14869
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14870
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14871
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14872
+ * said out loud in the log rather than dropped in silence.
14873
+ */
14874
+ var NcSceneConditionSchema = object({
14875
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14876
+ sceneId: string().min(1),
14877
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14878
+ deviceId: number().int().optional(),
14879
+ /** The state the scene must be in for the rule to fire. */
14880
+ requiredState: _enum(["matched", "diverged"]),
14881
+ /**
14882
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14883
+ * scene's own `emit` field, which is the only place that decision belongs.
14884
+ */
14885
+ latched: boolean().optional()
14886
+ });
14554
14887
  var NcConditionsSchema = object({
14555
14888
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14556
- deviceState: object({
14557
- deviceId: number().int(),
14558
- /** Any of these matches. */
14559
- states: array(string().min(1)).min(1)
14560
- }).optional(),
14889
+ deviceState: NcDeviceStateConditionSchema.optional(),
14890
+ /**
14891
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14892
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14893
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14894
+ * {@link NcSceneCondition} and D159.
14895
+ */
14896
+ scene: NcSceneConditionSchema.optional(),
14561
14897
  /** Device scope — absent = all devices. */
14562
14898
  devices: array(number()).optional(),
14563
14899
  /** Detector class names (any overlap with the record's class set). */
@@ -14583,18 +14919,47 @@ var NcConditionsSchema = object({
14583
14919
  */
14584
14920
  labelEquals: array(string().min(1)).optional(),
14585
14921
  /**
14586
- * Identity matcher. P1 boundary: matched against the record's collapsed
14587
- * `label` (the identity display name propagated by the face pipeline) —
14588
- * identity-ID matching rides in P2 when identity ids reach the record.
14922
+ * KNOWN FACES the rule's identity scope, and the switch that says the rule
14923
+ * is about recognised people at all.
14924
+ *
14925
+ * Three states, and the empty one is the point:
14926
+ *
14927
+ * | value | meaning |
14928
+ * | --- | --- |
14929
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14930
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14931
+ * | a list | only these identities |
14932
+ *
14933
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14934
+ * `devices` list is every device), applied one level down: the operator has
14935
+ * turned the face scope ON and narrowed it to nothing, which is every known
14936
+ * face. No second field states the same thing — a switch that can disagree
14937
+ * with the list under it is worse than no switch (D62).
14938
+ *
14939
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14940
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14941
+ * the operator fixed the spelling. The id reaches the record on
14942
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14943
+ * `{{label}}` renders.
14944
+ *
14945
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
14946
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
14947
+ * for is left as it stands and reported, never dropped. The engine also
14948
+ * accepts a display-name hit as a compatibility leg, so a rule whose
14949
+ * migration could not resolve keeps matching exactly what it matched before.
14589
14950
  */
14590
14951
  identities: array(string().min(1)).optional(),
14591
- /** Fuzzy plate matcher against the record's `label` (plate text). */
14952
+ /**
14953
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
14954
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
14955
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
14956
+ */
14592
14957
  plates: NcPlateMatcherSchema.optional(),
14593
14958
  /**
14594
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14595
- * Same P1 boundary: matched against the record's collapsed `label` (the
14596
- * identity display name). A record with NO label passes (nothing to
14597
- * exclude), unlike the include variant which fails on an absent label.
14959
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
14960
+ * the same id members and the same lazy name→id migration. A record with NO
14961
+ * identity passes (nothing to exclude), unlike the include variant which
14962
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14598
14963
  */
14599
14964
  identitiesExclude: array(string().min(1)).optional(),
14600
14965
  /**
@@ -14986,7 +15351,80 @@ var NcRuleInputSchema = object({
14986
15351
  * a rule that predates the gate must keep delivering byte-for-byte as it
14987
15352
  * did, and absent is the only way to say that without a migration.
14988
15353
  */
14989
- confirm: NcConfirmSchema.optional()
15354
+ confirm: NcConfirmSchema.optional(),
15355
+ /**
15356
+ * WAIT for face/plate recognition before saying anything.
15357
+ *
15358
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15359
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15360
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15361
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15362
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15363
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15364
+ *
15365
+ * Only two honest answers exist, and this flag picks between them. It has
15366
+ * effect ONLY on a rule that declares a recognition scope
15367
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15368
+ * other rule there is nothing to wait for and the flag is inert.
15369
+ *
15370
+ * | value | what happens |
15371
+ * | --- | --- |
15372
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15373
+ * | 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) |
15374
+ *
15375
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15376
+ * on the addon cap path, and absent has to keep meaning exactly what every
15377
+ * rule authored before this field meant.
15378
+ *
15379
+ * The cost of `true` is stated here because the editor states it too: a rule
15380
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15381
+ * tests every zone the track visited and a `crossing` condition can no longer
15382
+ * be satisfied, because a closed track carries no crossing.
15383
+ */
15384
+ waitForEnhancement: boolean().optional(),
15385
+ /**
15386
+ * GROUP a burst of subjects into ONE notification that grows.
15387
+ *
15388
+ * Seconds of quiet after the last matching subject before the burst is
15389
+ * considered over. While it is open, the first subject enqueues immediately —
15390
+ * **exactly as today, with no added latency** — and every real growth (a new
15391
+ * subject, or a name confirmed on one already in it) REPLACES that
15392
+ * notification with an updated one naming everybody. The push carries the
15393
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15394
+ *
15395
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15396
+ *
15397
+ * ### Why an idle cutoff and not a window
15398
+ *
15399
+ * The measured seven-person arrival on device 590 spans 110 s with every
15400
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15401
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15402
+ * 30 is Frigate's shipped value for the same decision.
15403
+ *
15404
+ * ### What it replaces
15405
+ *
15406
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15407
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15408
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15409
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15410
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15411
+ * budget over GROUPS — which is what it always meant — and a growth is never
15412
+ * throttled by the window its own first member spent.
15413
+ *
15414
+ * ### Interaction with {@link waitForEnhancement}
15415
+ *
15416
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15417
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15418
+ * CLOSE — already carrying its name — and grows as later members close. That
15419
+ * is later, and complete. With grouping alone the group opens on the first
15420
+ * object event and picks up names as they are confirmed, through the growth
15421
+ * path. Neither combination fires twice for one subject.
15422
+ *
15423
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15424
+ * on the addon cap path, so absent must keep meaning what it meant before this
15425
+ * field existed.
15426
+ */
15427
+ groupIdleSec: number().int().min(0).max(600).optional()
14990
15428
  });
14991
15429
  /**
14992
15430
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15093,6 +15531,7 @@ var NcConditionDescriptorSchema = object({
15093
15531
  "occupancy",
15094
15532
  "audio",
15095
15533
  "deviceState",
15534
+ "scene",
15096
15535
  "systemEvent"
15097
15536
  ]),
15098
15537
  operator: _enum([
@@ -15498,7 +15937,87 @@ var MethodAccessSchema = _enum([
15498
15937
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15499
15938
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15500
15939
  var CapScopeSchema = _enum(["device", "system"]);
15501
- var TokenScopeSchema = discriminatedUnion("type", [
15940
+ /**
15941
+ * DeviceSelector (scope model v3 — 2026-08-12).
15942
+ *
15943
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15944
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15945
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
15946
+ * AFTER the grant was minted — no re-grant, no re-login.
15947
+ *
15948
+ * - `all` — every device in the deployment. The broad viewer/operator
15949
+ * lever without a `category` grant (a `category` grant also covers device
15950
+ * caps that carry no deviceId; `all` is specifically the device set).
15951
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
15952
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
15953
+ * is NOT covered until the grant is edited.
15954
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
15955
+ * DYNAMIC. A device that changes type, or a new device of the type,
15956
+ * re-resolves on the next request.
15957
+ * - `locations` — every device whose operator-assigned `location` label is
15958
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
15959
+ * null/unset location matches NO `locations` selector.
15960
+ */
15961
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
15962
+ object({ kind: literal("all") }),
15963
+ object({
15964
+ kind: literal("ids"),
15965
+ ids: array(number().int()).min(1)
15966
+ }),
15967
+ object({
15968
+ kind: literal("types"),
15969
+ types: array(_enum(DeviceType)).min(1)
15970
+ }),
15971
+ object({
15972
+ kind: literal("locations"),
15973
+ locations: array(string().min(1)).min(1)
15974
+ })
15975
+ ]);
15976
+ var DeviceTokenScopeSchema = object({
15977
+ type: literal("device"),
15978
+ /** The device SET this grant covers — resolved against the live fleet. */
15979
+ selector: DeviceSelectorSchema,
15980
+ access: array(MethodAccessSchema).min(1),
15981
+ /**
15982
+ * Whether a grant on a PARENT device transparently covers its accessory
15983
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
15984
+ * Direction is parent → children ONLY.
15985
+ *
15986
+ * Absent → the matcher DERIVES it from the access flavour: `view`
15987
+ * inherits (a camera viewer sees the camera's accessories), `create` /
15988
+ * `delete` do NOT (actuating/removing a child is an explicit act the
15989
+ * operator must grant on the child, not inherit from the parent). Set it
15990
+ * explicitly to override that default per grant.
15991
+ */
15992
+ includeLinked: boolean().optional()
15993
+ });
15994
+ /**
15995
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
15996
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
15997
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
15998
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
15999
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16000
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16001
+ * migration cannot reach a JWT already in a client's hands; parse-time
16002
+ * migration covers both without a flag day. No cast — the raw object is read
16003
+ * through `Reflect.get` (its static type is `unknown`).
16004
+ */
16005
+ function migrateLegacyTokenScope(raw) {
16006
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16007
+ if (Reflect.get(raw, "type") !== "device") return raw;
16008
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16009
+ const targets = Reflect.get(raw, "targets");
16010
+ if (!Array.isArray(targets)) return raw;
16011
+ return {
16012
+ type: "device",
16013
+ selector: {
16014
+ kind: "ids",
16015
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16016
+ },
16017
+ access: Reflect.get(raw, "access")
16018
+ };
16019
+ }
16020
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15502
16021
  object({
15503
16022
  type: literal("category"),
15504
16023
  target: CapScopeSchema,
@@ -15514,18 +16033,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15514
16033
  target: string(),
15515
16034
  access: array(MethodAccessSchema).min(1)
15516
16035
  }),
15517
- object({
15518
- type: literal("device"),
15519
- /**
15520
- * One or more deviceIds (serialised as strings for wire-format
15521
- * consistency with the rest of the union). Matcher accepts if
15522
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15523
- * of one scope-per-device when granting access to a set of cameras.
15524
- */
15525
- targets: array(string()).min(1),
15526
- access: array(MethodAccessSchema).min(1)
15527
- })
15528
- ]);
16036
+ DeviceTokenScopeSchema
16037
+ ]));
15529
16038
  object({
15530
16039
  id: string(),
15531
16040
  username: string(),
@@ -15842,7 +16351,7 @@ var TrackEnvelopeSchema = object({
15842
16351
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15843
16352
  * keeps every scalar the list surfaces actually render (ids, class(es),
15844
16353
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15845
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16354
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15846
16355
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15847
16356
  * `getTrack`. Mirrors the event-store `projection` convention
15848
16357
  * (`getObjectEvents` et al.).
@@ -15978,7 +16487,21 @@ union([literal(1), literal(2)]);
15978
16487
  var LabelAttributionSchema = object({
15979
16488
  stepId: string(),
15980
16489
  modelId: string().optional(),
15981
- decidedAt: number()
16490
+ decidedAt: number(),
16491
+ /**
16492
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16493
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16494
+ *
16495
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16496
+ * notification rule authored on "Gianluca" stopped matching the moment the
16497
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16498
+ * the thing that does not move, so it is what a rule matches on
16499
+ * (`NcConditions.identities`) and the text is what a human is shown.
16500
+ *
16501
+ * Absent when the label names no gallery row — a plate the OCR read but no
16502
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16503
+ */
16504
+ identityId: string().optional()
15982
16505
  });
15983
16506
  /**
15984
16507
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16115,6 +16638,28 @@ var TrackSchema = object({
16115
16638
  * `=== true` and render nothing otherwise, never infer "no face".
16116
16639
  */
16117
16640
  hasFace: boolean().optional(),
16641
+ /**
16642
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16643
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16644
+ * so the passage is tracked once and as a VEHICLE.
16645
+ *
16646
+ * It exists because the fold's record was dishonest. D34 and the code both
16647
+ * said "the person is not lost — it is reported so both entities stay on the
16648
+ * record"; in fact the pair went into a per-processor RAM field behind an
16649
+ * accessor nobody called, and every durable surface said `vehicle`, full
16650
+ * stop. This is the composition note that makes the row true.
16651
+ *
16652
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16653
+ * person" is not an answer to "what is this" — both label tiers would refuse
16654
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16655
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16656
+ * and a `person` rule still does not fire for someone cycling past.
16657
+ *
16658
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16659
+ * the column, and every hub that predates the field, omits it. Test
16660
+ * `=== true` and render nothing otherwise — never infer "no rider".
16661
+ */
16662
+ hasRider: boolean().optional(),
16118
16663
  ...TrackFlagFields,
16119
16664
  ...TrackRetrainFields
16120
16665
  });
@@ -16464,7 +17009,10 @@ var RecentTracksQueryInput = object({
16464
17009
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16465
17010
  cursor: string().optional(),
16466
17011
  /** See {@link TrackProjectionSchema}. Default `full`. */
16467
- projection: TrackProjectionSchema.optional()
17012
+ projection: TrackProjectionSchema.optional(),
17013
+ /** Include stationary-promoted rows (parked objects). Default false: the
17014
+ * feed lists passages; parking records live on the stationary registry. */
17015
+ includeStationary: boolean().optional()
16468
17016
  });
16469
17017
  var RecentTracksPageSchema = object({
16470
17018
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16682,7 +17230,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16682
17230
  zone: TrackZoneFilterSchema.optional(),
16683
17231
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16684
17232
  * compatible — omitting the field keeps today's exact behaviour). */
16685
- projection: TrackProjectionSchema.optional()
17233
+ projection: TrackProjectionSchema.optional(),
17234
+ /** Include stationary-promoted rows (parked objects handed to the
17235
+ * stationary registry). Default false: the timeline lists passages,
17236
+ * not parking records (operator decision, 2026-08-15). */
17237
+ includeStationary: boolean().optional()
16686
17238
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16687
17239
  kind: "mutation",
16688
17240
  auth: "admin"
@@ -16846,11 +17398,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16846
17398
  auth: "admin"
16847
17399
  }), method(object({
16848
17400
  eventId: string(),
16849
- kind: MediaFileKindEnum.optional()
17401
+ kind: MediaFileKindEnum.optional(),
17402
+ deviceId: number()
17403
+ }), array(MediaFileSchema).readonly()), method(object({
17404
+ trackId: string(),
17405
+ kinds: array(MediaFileKindEnum).optional(),
17406
+ deviceId: number()
16850
17407
  }), array(MediaFileSchema).readonly()), method(object({
16851
17408
  trackId: string(),
16852
- kinds: array(MediaFileKindEnum).optional()
16853
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17409
+ deviceId: number()
17410
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16854
17411
  kind: "mutation",
16855
17412
  auth: "admin"
16856
17413
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17550,6 +18107,17 @@ var maxSessionHoldMsField = {
17550
18107
  default: 12e4,
17551
18108
  step: 5e3
17552
18109
  };
18110
+ /**
18111
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18112
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18113
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18114
+ */
18115
+ var audioMotionWindowMsField = {
18116
+ min: 5e3,
18117
+ max: 6e5,
18118
+ default: 9e4,
18119
+ step: 5e3
18120
+ };
17553
18121
  var motionFpsField = {
17554
18122
  min: 1,
17555
18123
  max: 30,
@@ -17581,7 +18149,7 @@ var detectionFpsField = {
17581
18149
  var occupancyRecheckSecField = {
17582
18150
  min: 0,
17583
18151
  max: 300,
17584
- default: 30,
18152
+ default: 300,
17585
18153
  step: 5
17586
18154
  };
17587
18155
  var occupancyRecheckFramesField = {
@@ -17726,6 +18294,27 @@ var RunnerCameraConfigSchema = object({
17726
18294
  * resolved `CameraDetectionConfig`.
17727
18295
  */
17728
18296
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18297
+ /**
18298
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18299
+ * 'on-motion'` audio window, measured from the LAST motion event.
18300
+ *
18301
+ * This exists because the falling edge cannot be relied on. Camera-native
18302
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18303
+ * its email-push SMTP path both emit `detected: true` and never the
18304
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18305
+ * onboard-only camera a window that closed only on `detected: false` never
18306
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18307
+ * battery camera, the one failure mode the mode exists to prevent.
18308
+ *
18309
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18310
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18311
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18312
+ *
18313
+ * Not consumed by the runner: carried here so it shares the per-camera
18314
+ * device-settings surface with `motionCooldownMs`, exactly like
18315
+ * `maxSessionHoldMs`.
18316
+ */
18317
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17729
18318
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17730
18319
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17731
18320
  motionStreamId: string(),
@@ -17821,7 +18410,7 @@ var RunnerCameraConfigSchema = object({
17821
18410
  */
17822
18411
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17823
18412
  });
17824
- 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;
18413
+ 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;
17825
18414
  /**
17826
18415
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17827
18416
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18854,6 +19443,39 @@ var snapshotCapability = {
18854
19443
  etag: string().nullable()
18855
19444
  }))),
18856
19445
  /**
19446
+ * The full decision chain for ONE device, for the viewer's debug readout —
19447
+ * the answer to "why does this tile show what it shows" in a single poll:
19448
+ * the battery slice the state was derived from, the resolved state + its
19449
+ * reason, the cached frame's identity/age, whether a wake window is open,
19450
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
19451
+ * a debug read must never wake a battery camera.
19452
+ */
19453
+ getDebugState: systemMethod(object({ deviceId: number() }), object({
19454
+ /** The battery slice as read, or null when the device has none. */
19455
+ battery: object({
19456
+ sleeping: boolean(),
19457
+ lastUpdated: number(),
19458
+ lastContactAt: number().optional()
19459
+ }).nullable(),
19460
+ /** The resolved snapshot state (what the overlay decision used). */
19461
+ state: object({
19462
+ isBattery: boolean(),
19463
+ reason: _enum([
19464
+ "disabled",
19465
+ "sleeping",
19466
+ "unreachable",
19467
+ "waking"
19468
+ ]).nullable()
19469
+ }),
19470
+ /** The cached frame behind the next paint. */
19471
+ frame: object({
19472
+ capturedAt: number().nullable(),
19473
+ ageMs: number().nullable()
19474
+ }),
19475
+ /** A wake window is currently open (the Waking overlay's source). */
19476
+ waking: boolean()
19477
+ })),
19478
+ /**
18857
19479
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
18858
19480
  * that makes those frames current.
18859
19481
  *
@@ -18926,7 +19548,16 @@ targets: array(object({
18926
19548
  /** A sleeping battery camera: the frame is deliberately stale and will
18927
19549
  * NOT refresh in the background. A surface should say so rather than
18928
19550
  * present it as current. */
18929
- sleeping: boolean()
19551
+ sleeping: boolean(),
19552
+ /** Current device state rendered over the cached frame. State images
19553
+ * remain authoritative even when their photographic background is
19554
+ * old; null means the link must carry a current camera frame. */
19555
+ stateReason: _enum([
19556
+ "disabled",
19557
+ "sleeping",
19558
+ "unreachable",
19559
+ "waking"
19560
+ ]).nullable()
18930
19561
  })))
18931
19562
  },
18932
19563
  status: {
@@ -20586,6 +21217,25 @@ var BatteryStatusSchema = object({
20586
21217
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20587
21218
  lastUpdated: number(),
20588
21219
  /**
21220
+ * Ms epoch of the last time the device PROVED it was reachable — a
21221
+ * completed firmware round-trip, an observed wake, or an inbound push
21222
+ * (firmware event, email). `0`/absent = never since this slice was born.
21223
+ *
21224
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21225
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21226
+ * for the radio, because a poll that confirms reachability is the same
21227
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21228
+ * single derivation every consumer must use; no surface computes its own.
21229
+ *
21230
+ * It is deliberately NOT a clock in the
21231
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21232
+ * observation itself, and it is the only thing a 30-hour silence is
21233
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21234
+ * Reolink provider) so a value that means "recently" cannot cost a
21235
+ * SQLite commit per round-trip.
21236
+ */
21237
+ lastContactAt: number().optional(),
21238
+ /**
20589
21239
  * True when the source is a BINARY low-battery indicator (HA
20590
21240
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20591
21241
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22850,54 +23500,139 @@ var TalkAudioCodecSchema = _enum([
22850
23500
  "g711ulaw",
22851
23501
  "g711alaw"
22852
23502
  ]);
22853
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22854
- sessionId: string(),
22855
- sdpOffer: string()
22856
- }), {
22857
- kind: "mutation",
22858
- auth: "admin"
22859
- }), method(object({
22860
- deviceId: number(),
22861
- sessionId: string(),
22862
- sdpAnswer: string()
22863
- }), _void(), {
22864
- kind: "mutation",
22865
- auth: "admin"
22866
- }), method(object({
22867
- deviceId: number(),
22868
- sessionId: string()
22869
- }), _void(), {
22870
- kind: "mutation",
22871
- auth: "admin"
22872
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22873
- kind: "mutation",
22874
- auth: "admin"
22875
- }), method(object({
22876
- deviceId: number(),
22877
- /** Audio bytes for ONE frame, base64-encoded so the payload
22878
- * survives tRPC JSON serialization. */
22879
- audioBase64: string(),
22880
- /** Wire codec of the payload. Omit to let the provider default
22881
- * to its native expected format (s16le @ provider-native rate,
22882
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22883
- codec: TalkAudioCodecSchema.optional(),
22884
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22885
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22886
- sampleRate: number().int().positive().optional(),
22887
- /** Channel count. Default 1. */
22888
- channels: number().int().positive().optional(),
22889
- /** Sequence number for ordering / dropping out-of-order frames. */
22890
- sequenceNumber: number().int()
22891
- }), object({ accepted: boolean() }), {
22892
- kind: "mutation",
22893
- auth: "admin"
22894
- }), method(object({ deviceId: number() }), _void(), {
22895
- kind: "mutation",
22896
- auth: "admin"
22897
- }), object({
22898
- deviceId: number(),
22899
- status: IntercomStatusSchema
22900
- });
23503
+ var intercomCapability = {
23504
+ name: "intercom",
23505
+ scope: "device",
23506
+ deviceNative: true,
23507
+ mode: "singleton",
23508
+ deviceTypes: [DeviceType.Camera],
23509
+ methods: {
23510
+ /**
23511
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23512
+ * offer with a single sendonly audio m-line the client answers
23513
+ * (client → server direction). The server wakes battery cams
23514
+ * transparently before opening the upstream talk channel.
23515
+ */
23516
+ startSession: method(object({ deviceId: number() }), object({
23517
+ sessionId: string(),
23518
+ sdpOffer: string()
23519
+ }), {
23520
+ kind: "mutation",
23521
+ auth: "admin"
23522
+ }),
23523
+ handleAnswer: method(object({
23524
+ deviceId: number(),
23525
+ sessionId: string(),
23526
+ sdpAnswer: string()
23527
+ }), _void(), {
23528
+ kind: "mutation",
23529
+ auth: "admin"
23530
+ }),
23531
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23532
+ stopSession: method(object({
23533
+ deviceId: number(),
23534
+ sessionId: string()
23535
+ }), _void(), {
23536
+ kind: "mutation",
23537
+ auth: "admin"
23538
+ }),
23539
+ /**
23540
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23541
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23542
+ * harnesses) that already have decoded PCM frames and just need a
23543
+ * direct path onto the camera's talk channel. Mutually exclusive
23544
+ * with `startSession` (an active WebRTC session must be stopped
23545
+ * before a raw-PCM session can be opened on the same device, and
23546
+ * vice versa).
23547
+ */
23548
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23549
+ kind: "mutation",
23550
+ auth: "admin"
23551
+ }),
23552
+ /**
23553
+ * Push one chunk of talk-back audio onto the active talk session.
23554
+ * The cap is codec-agnostic: the caller declares (or omits) the
23555
+ * wire format via `codec`; the provider decides between passthrough
23556
+ * (when the wire codec matches the camera's native talk channel),
23557
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23558
+ *
23559
+ * Callers do NOT need to know the camera's wire format or sample
23560
+ * rate — that information lives entirely inside the provider.
23561
+ *
23562
+ * Sequence numbers MUST be monotonic per talk session; older frames
23563
+ * arriving after newer ones are dropped to avoid smearing the
23564
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23565
+ * predictor would corrupt with re-ordering).
23566
+ */
23567
+ pushTalkAudio: method(object({
23568
+ deviceId: number(),
23569
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23570
+ * survives tRPC JSON serialization. */
23571
+ audioBase64: string(),
23572
+ /** Wire codec of the payload. Omit to let the provider default
23573
+ * to its native expected format (s16le @ provider-native rate,
23574
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23575
+ codec: TalkAudioCodecSchema.optional(),
23576
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23577
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23578
+ sampleRate: number().int().positive().optional(),
23579
+ /** Channel count. Default 1. */
23580
+ channels: number().int().positive().optional(),
23581
+ /** Sequence number for ordering / dropping out-of-order frames. */
23582
+ sequenceNumber: number().int()
23583
+ }), object({ accepted: boolean() }), {
23584
+ kind: "mutation",
23585
+ auth: "admin"
23586
+ }),
23587
+ /** Close the raw-PCM talk session. Idempotent. */
23588
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23589
+ kind: "mutation",
23590
+ auth: "admin"
23591
+ })
23592
+ },
23593
+ events: { onStatusChanged: { data: object({
23594
+ deviceId: number(),
23595
+ status: IntercomStatusSchema
23596
+ }) } },
23597
+ status: {
23598
+ schema: IntercomStatusSchema,
23599
+ kind: "command-driven"
23600
+ },
23601
+ /**
23602
+ * Runtime-state slice — mirrored by the kernel.
23603
+ *
23604
+ * The cap declared `status` and nothing else, so the only two sources an
23605
+ * exporter has for a value — the `device.state-changed` slice event and the
23606
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23607
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23608
+ * have been published and never received a value, which is the defect the
23609
+ * export's two classification tables exist to prevent (177 of them, once), so
23610
+ * `intercom` was excluded rather than exported.
23611
+ *
23612
+ * The shape is the status shape: there is exactly one truth about talk-back
23613
+ * and duplicating it into a second schema is how two halves of one capability
23614
+ * come to disagree. Providers write it through
23615
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23616
+ * and close a session, and seed it at registration so the slice exists before
23617
+ * the first session rather than after it.
23618
+ *
23619
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23620
+ * session handle, so a session torn down by a transport death that never
23621
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23622
+ * session or the next restart. That is why the slice is `session` and not
23623
+ * `restored` — a restart must never restore "talking".
23624
+ */
23625
+ runtimeState: IntercomStatusSchema,
23626
+ /**
23627
+ * Runtime-state durability: **session** — `talking` describes a live audio
23628
+ * session, which by definition does not survive the process that held it.
23629
+ * Restoring it would publish a camera as talking to nobody.
23630
+ *
23631
+ * See `RuntimeStateDurability`. Enforced by
23632
+ * `scripts/check-runtime-state-durability.ts`.
23633
+ */
23634
+ durability: "session"
23635
+ };
22901
23636
  /**
22902
23637
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22903
23638
  * with a mowing lifecycle plus a dock action.
@@ -25682,7 +26417,7 @@ method(object({
25682
26417
  toMs: number()
25683
26418
  }), RecordingAvailabilitySchema, {
25684
26419
  kind: "query",
25685
- auth: "admin"
26420
+ auth: "protected"
25686
26421
  }), method(object({
25687
26422
  deviceId: number(),
25688
26423
  fromMs: number(),
@@ -25690,14 +26425,14 @@ method(object({
25690
26425
  tzOffsetMinutes: number()
25691
26426
  }), RecordingDaysSchema, {
25692
26427
  kind: "query",
25693
- auth: "admin"
26428
+ auth: "protected"
25694
26429
  }), method(object({
25695
26430
  deviceId: number(),
25696
26431
  fromMs: number(),
25697
26432
  toMs: number()
25698
26433
  }), RecordingManifestSchema, {
25699
26434
  kind: "query",
25700
- auth: "admin"
26435
+ auth: "protected"
25701
26436
  }), method(object({}), RecordingStorageUsageSchema, {
25702
26437
  kind: "query",
25703
26438
  auth: "admin"
@@ -25987,14 +26722,77 @@ method(object({
25987
26722
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25988
26723
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25989
26724
  *
25990
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
25991
- * derives the device-detail contribution; the provider carries NO hand-written
25992
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
25993
- * every hysteresis flip / availability change; consumers never poll.
25994
- */
25995
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25996
- * be added without a wire break (matching falls back to any-condition refs). */
26725
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26726
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26727
+ * for the thing: a scene is a standing question about the property ("is the bin
26728
+ * still out"), and the operator's question is "which of my scenes have tripped",
26729
+ * across every camera at once — not "what does camera 617 think". Buried one
26730
+ * camera deep it also could not be found. The surface is now a top-level admin
26731
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26732
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26733
+ *
26734
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26735
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26736
+ * directions, so a registration nobody declares fails exactly as loudly as a
26737
+ * declaration nobody registers. The editor is imported directly by the page.
26738
+ *
26739
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26740
+ * availability change; consumers never poll.
26741
+ */
26742
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26743
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26744
+ * Open by design so more can be added without a wire break.
26745
+ *
26746
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26747
+ * not comparable, so "I have never seen this scene in this light" is reported
26748
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26749
+ * collapses the cosine and would latch a false alarm every single night. */
25997
26750
  var SceneConditionSchema = string();
26751
+ /**
26752
+ * What a scene does when the CURRENT light has no reference of its own.
26753
+ *
26754
+ * The lighting variants are not equally likely to exist. Almost every operator
26755
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26756
+ * scene that is only ever going to be asked about a daytime question ("is the
26757
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26758
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26759
+ * working without it rather than degrading into a permanent complaint.
26760
+ *
26761
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26762
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26763
+ * last covered light left it at, the latch is untouched, and the hysteresis
26764
+ * run is neither spent nor cleared. The scene resumes by itself at first
26765
+ * light. This is the only behaviour under which "I never captured IR" is a
26766
+ * configuration choice instead of a nightly fault.
26767
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26768
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26769
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26770
+ * cross-condition cosines are not comparable, so a day reference against a
26771
+ * true IR frame collapses and the scene reports a theft at 21:40.
26772
+ *
26773
+ * Never applies when the scene has NO comparable reference at all — that is
26774
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26775
+ * there would hide a scene the operator never finished setting up.
26776
+ */
26777
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26778
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26779
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26780
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26781
+ * and never counts toward hysteresis in either direction. */
26782
+ var SceneVerdictSchema = _enum([
26783
+ "matched",
26784
+ "diverged",
26785
+ "unknown"
26786
+ ]);
26787
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26788
+ * silence that reads as "nothing has happened". */
26789
+ var SceneUnavailableSchema = _enum([
26790
+ "no-reference-for-condition",
26791
+ "view-shifted",
26792
+ "no-vision-profile",
26793
+ "encoder-model-changed",
26794
+ "no-snapshot"
26795
+ ]);
25998
26796
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25999
26797
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
26000
26798
  var SceneReferenceSchema = object({
@@ -26002,7 +26800,14 @@ var SceneReferenceSchema = object({
26002
26800
  modelId: string(),
26003
26801
  condition: SceneConditionSchema,
26004
26802
  capturedAt: number(),
26005
- thumbnailMediaId: string().optional()
26803
+ thumbnailMediaId: string().optional(),
26804
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26805
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26806
+ * normalized rect frame a different piece of world, and the scene would
26807
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26808
+ * when hysteresis is about to flip — one extra encode per candidate
26809
+ * transition, not per poll. */
26810
+ anchorEmbedding: array(number()).optional()
26006
26811
  });
26007
26812
  var SceneMonitorStateSchema = object({
26008
26813
  id: string(),
@@ -26024,6 +26829,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
26024
26829
  profileId: string().optional(),
26025
26830
  hysteresisCount: number().int().positive()
26026
26831
  })]);
26832
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26833
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26834
+ * out in silence rather than reporting a fault every night. */
26835
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26836
+ /**
26837
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26838
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26839
+ *
26840
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26841
+ * fail-open: a notification suppressed is the worse error there, but a vision
26842
+ * model that timed out has not told us the bin is gone, and a latch is a
26843
+ * stateful claim that costs the operator a trip to reset.
26844
+ */
26845
+ var SceneConfirmSchema = object({
26846
+ enabled: boolean().default(false),
26847
+ prompt: string().min(1).max(1e3),
26848
+ profileId: string().optional(),
26849
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26850
+ maxImagePx: number().int().min(64).max(2048).default(448),
26851
+ /** What a timeout / unavailable model means for the PENDING flip. */
26852
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26853
+ });
26027
26854
  var SceneMonitorSchema = object({
26028
26855
  id: string(),
26029
26856
  label: string(),
@@ -26042,7 +26869,56 @@ var SceneMonitorSchema = object({
26042
26869
  lastConfidence: number().nullable(),
26043
26870
  currentCondition: SceneConditionSchema.nullable(),
26044
26871
  availability: _enum(["ok", "unavailable"]),
26045
- unavailableReason: string().nullable()
26872
+ unavailableReason: string().nullable(),
26873
+ /** Which state is "the initial screen". `null` until the first capture. */
26874
+ baselineStateId: string().nullable(),
26875
+ /** Which boolean drives notification rules and any export. */
26876
+ emit: _enum(["latched", "live"]).default("latched"),
26877
+ /** Live: does the region match the baseline RIGHT NOW. */
26878
+ verdict: SceneVerdictSchema,
26879
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26880
+ latched: boolean(),
26881
+ /** Last reset (or creation). */
26882
+ armedAt: number(),
26883
+ divergedAt: number().nullable(),
26884
+ restoredAt: number().nullable(),
26885
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26886
+ * during the window DISCARDS the observation — a car pulling up in front of
26887
+ * the bin must not be able to spend hysteresis credit. */
26888
+ quietSeconds: number().int().min(0).max(3600).default(60),
26889
+ /** An observation only advances the pending count when it is at least this
26890
+ * far from the previously counted one, so N agreeing checks span real time
26891
+ * rather than N adjacent polls inside one occlusion. */
26892
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26893
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26894
+ confirm: SceneConfirmSchema.optional(),
26895
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26896
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26897
+ /** Clear the latch on its own when the scene matches again? Default false —
26898
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26899
+ * automation can react to the bin coming back without the operator's own
26900
+ * alarm silently clearing itself. */
26901
+ autoRestore: boolean().default(false),
26902
+ /** What to do when the current light has no reference of its own. See
26903
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26904
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26905
+ /**
26906
+ * The light whose checks are currently being SAT OUT under
26907
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26908
+ *
26909
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26910
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26911
+ * nothing captured in this light"* in the same calm voice as the coverage
26912
+ * line, because the alternative is a scene that silently stops answering
26913
+ * after sunset with nothing anywhere saying why. A skipped check must never
26914
+ * read as a broken one.
26915
+ */
26916
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26917
+ /** Named cause when `verdict === 'unknown'`. */
26918
+ unavailable: SceneUnavailableSchema.nullable(),
26919
+ /** Conditions that have at least one comparable reference — the coverage line
26920
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26921
+ coveredConditions: array(SceneConditionSchema)
26046
26922
  });
26047
26923
  var SceneMonitorStatusSchema = object({
26048
26924
  monitors: array(SceneMonitorSchema),
@@ -26055,12 +26931,6 @@ var sceneMonitorCapability = {
26055
26931
  kind: "wrapper",
26056
26932
  defaultActive: true,
26057
26933
  deviceTypes: [DeviceType.Camera],
26058
- deviceConfig: { ui: {
26059
- kind: "widget",
26060
- widgetId: "host/scene-monitor-editor",
26061
- tab: "scenes",
26062
- label: "Scenes"
26063
- } },
26064
26934
  methods: {
26065
26935
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
26066
26936
  createScene: method(object({
@@ -26091,7 +26961,15 @@ var sceneMonitorCapability = {
26091
26961
  "both"
26092
26962
  ]).optional(),
26093
26963
  checkIntervalSec: number().optional(),
26094
- check: SceneCheckSchema.optional()
26964
+ check: SceneCheckSchema.optional(),
26965
+ emit: _enum(["latched", "live"]).optional(),
26966
+ quietSeconds: number().int().min(0).max(3600).optional(),
26967
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26968
+ anchorThreshold: number().min(0).max(1).optional(),
26969
+ autoRestore: boolean().optional(),
26970
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26971
+ /** `null` clears the vision-model adjudicator. */
26972
+ confirm: SceneConfirmSchema.nullable().optional()
26095
26973
  })
26096
26974
  }), _void(), {
26097
26975
  kind: "mutation",
@@ -26132,6 +27010,26 @@ var sceneMonitorCapability = {
26132
27010
  }), _void(), {
26133
27011
  kind: "mutation",
26134
27012
  auth: "admin"
27013
+ }),
27014
+ /**
27015
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
27016
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
27017
+ * "reset" in the operator's head means *this is the new normal*, and
27018
+ * re-capture is what makes the feature self-healing against slow drift
27019
+ * instead of failing silently weeks later.
27020
+ *
27021
+ * Reachable from three surfaces on this one mutation: the scene card, a
27022
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
27023
+ * no new Notification-Center code at all), and tRPC for scripts.
27024
+ */
27025
+ resetScene: method(object({
27026
+ deviceId: number(),
27027
+ monitorId: string(),
27028
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
27029
+ recapture: boolean().optional()
27030
+ }), _void(), {
27031
+ kind: "mutation",
27032
+ auth: "admin"
26135
27033
  })
26136
27034
  },
26137
27035
  status: {
@@ -26374,13 +27272,63 @@ var CamStreamDescriptorSchema = object({
26374
27272
  * set of stream descriptors it can offer for the device, synchronously, so the
26375
27273
  * broker can reconcile its registry against the authoritative provider state.
26376
27274
  */
27275
+ /**
27276
+ * The catalog as a DURABLE fact rather than a live answer.
27277
+ *
27278
+ * A battery camera's descriptors are profile-stable — they change when the
27279
+ * operator rewrites an encoder profile, not minute to minute — but building
27280
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27281
+ * provider is allowed to build them exactly once per profile and must serve
27282
+ * every later pull from a cache.
27283
+ *
27284
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27285
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27286
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27287
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27288
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27289
+ * which on a battery cam is most of the day. The camera was fine. The stream
27290
+ * was unreachable because the process had forgotten what the camera offers.
27291
+ *
27292
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27293
+ * declared collection, with the same `restored` durability `battery` uses for
27294
+ * the same reason: the last known value is the only value there is while the
27295
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27296
+ * is the DIAL that wakes a camera, never the catalog (D173).
27297
+ */
27298
+ var StreamCatalogStateSchema = object({
27299
+ /** The descriptors as last built from a real camera response. Never a guess:
27300
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27301
+ * one the camera itself once produced. */
27302
+ descriptors: array(CamStreamDescriptorSchema),
27303
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27304
+ * path decide whether the camera's own awake window is worth spending on a
27305
+ * re-read. */
27306
+ lastFetchedAt: number()
27307
+ });
26377
27308
  var streamCatalogCapability = {
26378
27309
  name: "stream-catalog",
26379
27310
  scope: "device",
26380
27311
  deviceNative: true,
26381
27312
  mode: "singleton",
26382
27313
  deviceTypes: [DeviceType.Camera],
26383
- methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) }
27314
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27315
+ runtimeState: StreamCatalogStateSchema,
27316
+ /**
27317
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27318
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27319
+ * camera that cannot be watched at all until it happens to wake.
27320
+ *
27321
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27322
+ * build, and a build only runs when there is no cached copy (or the copy is
27323
+ * a day old and the camera is awake anyway).
27324
+ *
27325
+ * See `RuntimeStateDurability`. Enforced by
27326
+ * `scripts/check-runtime-state-durability.ts`.
27327
+ */
27328
+ durability: "restored",
27329
+ /** Clock field: written, but excluded from the compare that decides whether
27330
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27331
+ volatileStateFields: ["lastFetchedAt"]
26384
27332
  };
26385
27333
  /** One of the camera's stream profiles. */
26386
27334
  var StreamProfileSchema = _enum([
@@ -26833,12 +27781,64 @@ var NetworkAddressSchema = object({
26833
27781
  family: string(),
26834
27782
  internal: boolean()
26835
27783
  });
27784
+ /**
27785
+ * Provenance of the site coordinates, and the whole reason this is not just two
27786
+ * numbers.
27787
+ *
27788
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27789
+ * nothing overwrites it.
27790
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27791
+ * default that is right to a few kilometres beats the coarse UTC clock split
27792
+ * the sun-times consumers otherwise fall back to.
27793
+ *
27794
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27795
+ * own input will eventually trust the guess.
27796
+ */
27797
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27798
+ /**
27799
+ * The read shape: the location plus the honest state of the one-shot derivation.
27800
+ *
27801
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27802
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27803
+ * failed; the hub will NOT try again on its own — the fallback is declared
27804
+ * (consumers degrade to their own last resort) and the operator either types the
27805
+ * coordinates or presses detect.
27806
+ */
27807
+ var SiteLocationStatusSchema = object({
27808
+ location: object({
27809
+ /** WGS84 decimal degrees. */
27810
+ latitude: number().min(-90).max(90),
27811
+ longitude: number().min(-180).max(180),
27812
+ source: SiteLocationSourceSchema,
27813
+ /** Epoch ms the value was last written. */
27814
+ updatedAt: number(),
27815
+ /**
27816
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27817
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27818
+ */
27819
+ label: string().optional()
27820
+ }).nullable(),
27821
+ derivationAttemptedAt: number().nullable(),
27822
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27823
+ derivationError: string().nullable()
27824
+ });
27825
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27826
+ var SetSiteLocationInputSchema = object({
27827
+ latitude: number().min(-90).max(90),
27828
+ longitude: number().min(-180).max(180)
27829
+ }).nullable();
26836
27830
  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(), {
26837
27831
  kind: "mutation",
26838
27832
  auth: "admin"
26839
27833
  }), method(_void(), _void(), {
26840
27834
  kind: "mutation",
26841
27835
  auth: "admin"
27836
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27837
+ kind: "mutation",
27838
+ auth: "admin"
27839
+ }), method(_void(), SiteLocationStatusSchema, {
27840
+ kind: "mutation",
27841
+ auth: "admin"
26842
27842
  });
26843
27843
  /**
26844
27844
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -28158,6 +29158,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
28158
29158
  humiditySensor: humiditySensorCapability,
28159
29159
  image: imageCapability,
28160
29160
  imageSettings: imageSettingsCapability,
29161
+ intercom: intercomCapability,
28161
29162
  lawnMowerControl: lawnMowerControlCapability,
28162
29163
  lockControl: lockControlCapability,
28163
29164
  mediaPlayer: mediaPlayerCapability,
@@ -28176,6 +29177,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
28176
29177
  sceneMonitor: sceneMonitorCapability,
28177
29178
  scriptRunner: scriptRunnerCapability,
28178
29179
  smoke: smokeCapability,
29180
+ streamCatalog: streamCatalogCapability,
28179
29181
  streamParams: streamParamsCapability,
28180
29182
  switch: switchCapability,
28181
29183
  tamper: tamperCapability,
@@ -28829,6 +29831,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28829
29831
  labels: ["probe not implemented"]
28830
29832
  };
28831
29833
  }
29834
+ /**
29835
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29836
+ *
29837
+ * Four covers the fleets this ships to without turning a boot into a burst a
29838
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29839
+ * session with a serial command channel (a Baichuan hub, an NVR that
29840
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29841
+ */
29842
+ restoreConcurrency = 4;
28832
29843
  async restoreDevices(savedDevices) {
28833
29844
  await this.onRestoreDevices(savedDevices);
28834
29845
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28860,15 +29871,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28860
29871
  */
28861
29872
  async onRestoreDevices(savedDevices) {
28862
29873
  const restored = /* @__PURE__ */ new Set();
28863
- for (const saved of savedDevices) {
28864
- if (saved.parentDeviceId !== null) continue;
29874
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29875
+ const restoreOne = async (saved) => {
28865
29876
  const Class = this.deviceClasses[saved.type];
28866
29877
  if (!Class) {
28867
29878
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28868
29879
  tags: { stableId: saved.stableId },
28869
29880
  meta: { type: saved.type }
28870
29881
  });
28871
- continue;
29882
+ return;
28872
29883
  }
28873
29884
  try {
28874
29885
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28882,7 +29893,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28882
29893
  }
28883
29894
  });
28884
29895
  }
28885
- }
29896
+ };
29897
+ let nextTopLevel = 0;
29898
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29899
+ for (;;) {
29900
+ const saved = topLevel[nextTopLevel++];
29901
+ if (saved === void 0) return;
29902
+ await restoreOne(saved);
29903
+ }
29904
+ }));
28886
29905
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28887
29906
  for (const saved of childRows) {
28888
29907
  const Class = this.deviceClasses[saved.type];
@@ -31104,6 +32123,12 @@ Object.freeze({
31104
32123
  addonId: null,
31105
32124
  access: "create"
31106
32125
  },
32126
+ "llm.cancel": {
32127
+ capName: "llm",
32128
+ capScope: "system",
32129
+ addonId: null,
32130
+ access: "create"
32131
+ },
31107
32132
  "llm.deleteModel": {
31108
32133
  capName: "llm",
31109
32134
  capScope: "system",
@@ -31188,6 +32213,12 @@ Object.freeze({
31188
32213
  addonId: null,
31189
32214
  access: "view"
31190
32215
  },
32216
+ "llm.resolveModelRef": {
32217
+ capName: "llm",
32218
+ capScope: "system",
32219
+ addonId: null,
32220
+ access: "create"
32221
+ },
31191
32222
  "llm.setDefault": {
31192
32223
  capName: "llm",
31193
32224
  capScope: "system",
@@ -33354,6 +34385,12 @@ Object.freeze({
33354
34385
  addonId: null,
33355
34386
  access: "create"
33356
34387
  },
34388
+ "sceneMonitor.resetScene": {
34389
+ capName: "scene-monitor",
34390
+ capScope: "device",
34391
+ addonId: null,
34392
+ access: "delete"
34393
+ },
33357
34394
  "sceneMonitor.updateScene": {
33358
34395
  capName: "scene-monitor",
33359
34396
  capScope: "device",
@@ -33492,6 +34529,12 @@ Object.freeze({
33492
34529
  addonId: null,
33493
34530
  access: "view"
33494
34531
  },
34532
+ "snapshot.getDebugState": {
34533
+ capName: "snapshot",
34534
+ capScope: "device",
34535
+ addonId: null,
34536
+ access: "view"
34537
+ },
33495
34538
  "snapshot.getSnapshot": {
33496
34539
  capName: "snapshot",
33497
34540
  capScope: "device",
@@ -34032,6 +35075,12 @@ Object.freeze({
34032
35075
  addonId: null,
34033
35076
  access: "create"
34034
35077
  },
35078
+ "system.detectSiteLocation": {
35079
+ capName: "system",
35080
+ capScope: "system",
35081
+ addonId: null,
35082
+ access: "create"
35083
+ },
34035
35084
  "system.featureFlags": {
34036
35085
  capName: "system",
34037
35086
  capScope: "system",
@@ -34050,6 +35099,12 @@ Object.freeze({
34050
35099
  addonId: null,
34051
35100
  access: "view"
34052
35101
  },
35102
+ "system.getSiteLocation": {
35103
+ capName: "system",
35104
+ capScope: "system",
35105
+ addonId: null,
35106
+ access: "view"
35107
+ },
34053
35108
  "system.health": {
34054
35109
  capName: "system",
34055
35110
  capScope: "system",
@@ -34074,6 +35129,12 @@ Object.freeze({
34074
35129
  addonId: null,
34075
35130
  access: "create"
34076
35131
  },
35132
+ "system.setSiteLocation": {
35133
+ capName: "system",
35134
+ capScope: "system",
35135
+ addonId: null,
35136
+ access: "create"
35137
+ },
34077
35138
  "terminalSession.adoptLegacyMonitor": {
34078
35139
  capName: "terminal-session",
34079
35140
  capScope: "system",
@@ -34645,6 +35706,1709 @@ Object.freeze({
34645
35706
  access: "create"
34646
35707
  }
34647
35708
  });
35709
+ Object.freeze({
35710
+ "accessories.setChildHidden": [{
35711
+ name: "childDeviceId",
35712
+ form: "single",
35713
+ optional: false
35714
+ }, {
35715
+ name: "deviceId",
35716
+ form: "single",
35717
+ optional: false
35718
+ }],
35719
+ "addonSettings.getDeviceSettings": [{
35720
+ name: "deviceId",
35721
+ form: "single",
35722
+ optional: false
35723
+ }],
35724
+ "addonSettings.updateDeviceSettings": [{
35725
+ name: "deviceId",
35726
+ form: "single",
35727
+ optional: false
35728
+ }],
35729
+ "alarmPanel.arm": [{
35730
+ name: "deviceId",
35731
+ form: "single",
35732
+ optional: false
35733
+ }],
35734
+ "alarmPanel.disarm": [{
35735
+ name: "deviceId",
35736
+ form: "single",
35737
+ optional: false
35738
+ }],
35739
+ "alarmPanel.trigger": [{
35740
+ name: "deviceId",
35741
+ form: "single",
35742
+ optional: false
35743
+ }],
35744
+ "audioAnalysis.resolveDeviceSettings": [{
35745
+ name: "deviceId",
35746
+ form: "single",
35747
+ optional: false
35748
+ }],
35749
+ "audioAnalyzer.classify": [{
35750
+ name: "deviceId",
35751
+ form: "single",
35752
+ optional: true
35753
+ }],
35754
+ "audioMetrics.getCurrentSnapshot": [{
35755
+ name: "deviceId",
35756
+ form: "single",
35757
+ optional: false
35758
+ }],
35759
+ "audioMetrics.getHistory": [{
35760
+ name: "deviceId",
35761
+ form: "single",
35762
+ optional: false
35763
+ }],
35764
+ "automationControl.disable": [{
35765
+ name: "deviceId",
35766
+ form: "single",
35767
+ optional: false
35768
+ }],
35769
+ "automationControl.enable": [{
35770
+ name: "deviceId",
35771
+ form: "single",
35772
+ optional: false
35773
+ }],
35774
+ "automationControl.trigger": [{
35775
+ name: "deviceId",
35776
+ form: "single",
35777
+ optional: false
35778
+ }],
35779
+ "battery.wakeForStream": [{
35780
+ name: "deviceId",
35781
+ form: "single",
35782
+ optional: false
35783
+ }],
35784
+ "brightness.setBrightness": [{
35785
+ name: "deviceId",
35786
+ form: "single",
35787
+ optional: false
35788
+ }],
35789
+ "button.press": [{
35790
+ name: "deviceId",
35791
+ form: "single",
35792
+ optional: false
35793
+ }],
35794
+ "cameraCredentials.getCredentials": [{
35795
+ name: "deviceId",
35796
+ form: "single",
35797
+ optional: false
35798
+ }],
35799
+ "cameraStreams.getBrokerStreams": [{
35800
+ name: "deviceId",
35801
+ form: "single",
35802
+ optional: false
35803
+ }],
35804
+ "cameraStreams.getCameraStreams": [{
35805
+ name: "deviceId",
35806
+ form: "single",
35807
+ optional: false
35808
+ }],
35809
+ "cameraStreams.getProfileRtspEntries": [{
35810
+ name: "deviceId",
35811
+ form: "single",
35812
+ optional: false
35813
+ }],
35814
+ "cameraStreams.getRtspEntries": [{
35815
+ name: "deviceId",
35816
+ form: "single",
35817
+ optional: false
35818
+ }],
35819
+ "cameraStreams.pickStream": [{
35820
+ name: "deviceId",
35821
+ form: "single",
35822
+ optional: false
35823
+ }],
35824
+ "climateControl.setFanMode": [{
35825
+ name: "deviceId",
35826
+ form: "single",
35827
+ optional: false
35828
+ }],
35829
+ "climateControl.setMode": [{
35830
+ name: "deviceId",
35831
+ form: "single",
35832
+ optional: false
35833
+ }],
35834
+ "climateControl.setPreset": [{
35835
+ name: "deviceId",
35836
+ form: "single",
35837
+ optional: false
35838
+ }],
35839
+ "climateControl.setSwingHorizontal": [{
35840
+ name: "deviceId",
35841
+ form: "single",
35842
+ optional: false
35843
+ }],
35844
+ "climateControl.setSwingVertical": [{
35845
+ name: "deviceId",
35846
+ form: "single",
35847
+ optional: false
35848
+ }],
35849
+ "climateControl.setTarget": [{
35850
+ name: "deviceId",
35851
+ form: "single",
35852
+ optional: false
35853
+ }],
35854
+ "climateControl.setTargetHumidity": [{
35855
+ name: "deviceId",
35856
+ form: "single",
35857
+ optional: false
35858
+ }],
35859
+ "climateControl.setTargetRange": [{
35860
+ name: "deviceId",
35861
+ form: "single",
35862
+ optional: false
35863
+ }],
35864
+ "color.setColor": [{
35865
+ name: "deviceId",
35866
+ form: "single",
35867
+ optional: false
35868
+ }],
35869
+ "consumables.reset": [{
35870
+ name: "deviceId",
35871
+ form: "single",
35872
+ optional: false
35873
+ }],
35874
+ "control.setValue": [{
35875
+ name: "deviceId",
35876
+ form: "single",
35877
+ optional: false
35878
+ }],
35879
+ "cover.close": [{
35880
+ name: "deviceId",
35881
+ form: "single",
35882
+ optional: false
35883
+ }],
35884
+ "cover.open": [{
35885
+ name: "deviceId",
35886
+ form: "single",
35887
+ optional: false
35888
+ }],
35889
+ "cover.setPosition": [{
35890
+ name: "deviceId",
35891
+ form: "single",
35892
+ optional: false
35893
+ }],
35894
+ "cover.setTiltPosition": [{
35895
+ name: "deviceId",
35896
+ form: "single",
35897
+ optional: false
35898
+ }],
35899
+ "cover.stop": [{
35900
+ name: "deviceId",
35901
+ form: "single",
35902
+ optional: false
35903
+ }],
35904
+ "dayNight.getOptions": [{
35905
+ name: "deviceId",
35906
+ form: "single",
35907
+ optional: false
35908
+ }],
35909
+ "dayNight.setSettings": [{
35910
+ name: "deviceId",
35911
+ form: "single",
35912
+ optional: false
35913
+ }],
35914
+ "decoder.createSession": [{
35915
+ name: "deviceId",
35916
+ form: "single",
35917
+ optional: true
35918
+ }],
35919
+ "deviceAdoption.release": [{
35920
+ name: "camDeviceId",
35921
+ form: "single",
35922
+ optional: false
35923
+ }],
35924
+ "deviceAdoption.resync": [{
35925
+ name: "camDeviceId",
35926
+ form: "single",
35927
+ optional: false
35928
+ }],
35929
+ "deviceDiscovery.adoptDevice": [{
35930
+ name: "deviceId",
35931
+ form: "single",
35932
+ optional: false
35933
+ }],
35934
+ "deviceDiscovery.listDiscovered": [{
35935
+ name: "deviceId",
35936
+ form: "single",
35937
+ optional: false
35938
+ }],
35939
+ "deviceDiscovery.refreshDiscovery": [{
35940
+ name: "deviceId",
35941
+ form: "single",
35942
+ optional: false
35943
+ }],
35944
+ "deviceDiscovery.releaseDevice": [{
35945
+ name: "childDeviceId",
35946
+ form: "single",
35947
+ optional: false
35948
+ }, {
35949
+ name: "deviceId",
35950
+ form: "single",
35951
+ optional: false
35952
+ }],
35953
+ "deviceManager.adoptionRelease": [{
35954
+ name: "camDeviceId",
35955
+ form: "single",
35956
+ optional: false
35957
+ }],
35958
+ "deviceManager.adoptionResync": [{
35959
+ name: "camDeviceId",
35960
+ form: "single",
35961
+ optional: false
35962
+ }],
35963
+ "deviceManager.applyInitialMeta": [{
35964
+ name: "deviceId",
35965
+ form: "single",
35966
+ optional: false
35967
+ }, {
35968
+ name: "linkDeviceId",
35969
+ form: "single",
35970
+ optional: true
35971
+ }],
35972
+ "deviceManager.disable": [{
35973
+ name: "deviceId",
35974
+ form: "single",
35975
+ optional: false
35976
+ }],
35977
+ "deviceManager.enable": [{
35978
+ name: "deviceId",
35979
+ form: "single",
35980
+ optional: false
35981
+ }],
35982
+ "deviceManager.getBindings": [{
35983
+ name: "deviceId",
35984
+ form: "single",
35985
+ optional: false
35986
+ }],
35987
+ "deviceManager.getChildren": [{
35988
+ name: "parentDeviceId",
35989
+ form: "single",
35990
+ optional: false
35991
+ }],
35992
+ "deviceManager.getConfigSchema": [{
35993
+ name: "deviceId",
35994
+ form: "single",
35995
+ optional: false
35996
+ }],
35997
+ "deviceManager.getDevice": [{
35998
+ name: "deviceId",
35999
+ form: "single",
36000
+ optional: false
36001
+ }],
36002
+ "deviceManager.getDeviceAggregate": [{
36003
+ name: "deviceId",
36004
+ form: "single",
36005
+ optional: false
36006
+ }],
36007
+ "deviceManager.getDeviceLiveInfoAggregate": [{
36008
+ name: "deviceId",
36009
+ form: "single",
36010
+ optional: false
36011
+ }],
36012
+ "deviceManager.getDeviceSettingsAggregate": [{
36013
+ name: "deviceId",
36014
+ form: "single",
36015
+ optional: false
36016
+ }],
36017
+ "deviceManager.getDeviceStatusAggregate": [{
36018
+ name: "deviceId",
36019
+ form: "single",
36020
+ optional: false
36021
+ }],
36022
+ "deviceManager.getDeviceStatusAggregateBatch": [{
36023
+ name: "deviceIds",
36024
+ form: "array",
36025
+ optional: false
36026
+ }],
36027
+ "deviceManager.getLinkedDevices": [{
36028
+ name: "deviceId",
36029
+ form: "single",
36030
+ optional: false
36031
+ }],
36032
+ "deviceManager.getSettingsSchema": [{
36033
+ name: "deviceId",
36034
+ form: "single",
36035
+ optional: false
36036
+ }],
36037
+ "deviceManager.getStreamProfileMap": [{
36038
+ name: "deviceId",
36039
+ form: "single",
36040
+ optional: false
36041
+ }],
36042
+ "deviceManager.getStreamSources": [{
36043
+ name: "deviceId",
36044
+ form: "single",
36045
+ optional: false
36046
+ }],
36047
+ "deviceManager.getWireableFields": [{
36048
+ name: "deviceId",
36049
+ form: "single",
36050
+ optional: false
36051
+ }],
36052
+ "deviceManager.loadConfig": [{
36053
+ name: "deviceId",
36054
+ form: "single",
36055
+ optional: false
36056
+ }],
36057
+ "deviceManager.loadMeta": [{
36058
+ name: "deviceId",
36059
+ form: "single",
36060
+ optional: false
36061
+ }],
36062
+ "deviceManager.loadRuntimeState": [{
36063
+ name: "deviceId",
36064
+ form: "single",
36065
+ optional: false
36066
+ }],
36067
+ "deviceManager.persistConfig": [{
36068
+ name: "deviceId",
36069
+ form: "single",
36070
+ optional: false
36071
+ }],
36072
+ "deviceManager.probeStreams": [{
36073
+ name: "deviceId",
36074
+ form: "single",
36075
+ optional: false
36076
+ }],
36077
+ "deviceManager.registerDevice": [{
36078
+ name: "parentDeviceId",
36079
+ form: "single",
36080
+ optional: true
36081
+ }],
36082
+ "deviceManager.remove": [{
36083
+ name: "deviceId",
36084
+ form: "single",
36085
+ optional: false
36086
+ }],
36087
+ "deviceManager.removeDevice": [{
36088
+ name: "deviceId",
36089
+ form: "single",
36090
+ optional: false
36091
+ }],
36092
+ "deviceManager.runDeviceAction": [{
36093
+ name: "deviceId",
36094
+ form: "single",
36095
+ optional: false
36096
+ }],
36097
+ "deviceManager.setChildLayout": [{
36098
+ name: "deviceId",
36099
+ form: "single",
36100
+ optional: false
36101
+ }],
36102
+ "deviceManager.setDisabled": [{
36103
+ name: "deviceId",
36104
+ form: "single",
36105
+ optional: false
36106
+ }],
36107
+ "deviceManager.setDisplay": [{
36108
+ name: "deviceId",
36109
+ form: "single",
36110
+ optional: false
36111
+ }],
36112
+ "deviceManager.setIntegrationId": [{
36113
+ name: "deviceId",
36114
+ form: "single",
36115
+ optional: false
36116
+ }],
36117
+ "deviceManager.setLinkDeviceId": [{
36118
+ name: "deviceId",
36119
+ form: "single",
36120
+ optional: false
36121
+ }, {
36122
+ name: "linkDeviceId",
36123
+ form: "single",
36124
+ optional: true
36125
+ }],
36126
+ "deviceManager.setLocation": [{
36127
+ name: "deviceId",
36128
+ form: "single",
36129
+ optional: false
36130
+ }],
36131
+ "deviceManager.setMetadata": [{
36132
+ name: "deviceId",
36133
+ form: "single",
36134
+ optional: false
36135
+ }],
36136
+ "deviceManager.setName": [{
36137
+ name: "deviceId",
36138
+ form: "single",
36139
+ optional: false
36140
+ }],
36141
+ "deviceManager.setPrimaryChildEntityId": [{
36142
+ name: "deviceId",
36143
+ form: "single",
36144
+ optional: false
36145
+ }],
36146
+ "deviceManager.setRole": [{
36147
+ name: "deviceId",
36148
+ form: "single",
36149
+ optional: false
36150
+ }],
36151
+ "deviceManager.setStreamProfileMap": [{
36152
+ name: "deviceId",
36153
+ form: "single",
36154
+ optional: false
36155
+ }],
36156
+ "deviceManager.setType": [{
36157
+ name: "deviceId",
36158
+ form: "single",
36159
+ optional: false
36160
+ }],
36161
+ "deviceManager.setWrapperActive": [{
36162
+ name: "deviceId",
36163
+ form: "single",
36164
+ optional: false
36165
+ }],
36166
+ "deviceManager.testField": [{
36167
+ name: "deviceId",
36168
+ form: "single",
36169
+ optional: false
36170
+ }],
36171
+ "deviceManager.updateConfig": [{
36172
+ name: "deviceId",
36173
+ form: "single",
36174
+ optional: false
36175
+ }],
36176
+ "deviceManager.updateDeviceField": [{
36177
+ name: "deviceId",
36178
+ form: "single",
36179
+ optional: false
36180
+ }],
36181
+ "deviceManager.updateDeviceFieldsBatch": [{
36182
+ name: "deviceId",
36183
+ form: "single",
36184
+ optional: false
36185
+ }],
36186
+ "deviceOps.getConfigEntries": [{
36187
+ name: "deviceId",
36188
+ form: "single",
36189
+ optional: false
36190
+ }],
36191
+ "deviceOps.getRawState": [{
36192
+ name: "deviceId",
36193
+ form: "single",
36194
+ optional: false
36195
+ }],
36196
+ "deviceOps.getSettingsSchema": [{
36197
+ name: "deviceId",
36198
+ form: "single",
36199
+ optional: false
36200
+ }],
36201
+ "deviceOps.getStreamSources": [{
36202
+ name: "deviceId",
36203
+ form: "single",
36204
+ optional: false
36205
+ }],
36206
+ "deviceOps.removeDevice": [{
36207
+ name: "deviceId",
36208
+ form: "single",
36209
+ optional: false
36210
+ }],
36211
+ "deviceOps.runAction": [{
36212
+ name: "deviceId",
36213
+ form: "single",
36214
+ optional: false
36215
+ }],
36216
+ "deviceOps.setConfig": [{
36217
+ name: "deviceId",
36218
+ form: "single",
36219
+ optional: false
36220
+ }],
36221
+ "deviceState.getCapSlice": [{
36222
+ name: "deviceId",
36223
+ form: "single",
36224
+ optional: false
36225
+ }],
36226
+ "deviceState.getSnapshot": [{
36227
+ name: "deviceId",
36228
+ form: "single",
36229
+ optional: false
36230
+ }],
36231
+ "deviceState.setCapSlice": [{
36232
+ name: "deviceId",
36233
+ form: "single",
36234
+ optional: false
36235
+ }],
36236
+ "events.getEventClipUrl": [{
36237
+ name: "deviceId",
36238
+ form: "single",
36239
+ optional: false
36240
+ }],
36241
+ "events.getEvents": [{
36242
+ name: "deviceId",
36243
+ form: "single",
36244
+ optional: false
36245
+ }],
36246
+ "events.getEventThumbnail": [{
36247
+ name: "deviceId",
36248
+ form: "single",
36249
+ optional: false
36250
+ }],
36251
+ "faceGallery.getFaceByTrack": [{
36252
+ name: "deviceId",
36253
+ form: "single",
36254
+ optional: false
36255
+ }],
36256
+ "faceGallery.listRecentFaces": [{
36257
+ name: "deviceId",
36258
+ form: "single",
36259
+ optional: true
36260
+ }],
36261
+ "fanControl.setDirection": [{
36262
+ name: "deviceId",
36263
+ form: "single",
36264
+ optional: false
36265
+ }],
36266
+ "fanControl.setOscillating": [{
36267
+ name: "deviceId",
36268
+ form: "single",
36269
+ optional: false
36270
+ }],
36271
+ "fanControl.setPercentage": [{
36272
+ name: "deviceId",
36273
+ form: "single",
36274
+ optional: false
36275
+ }],
36276
+ "fanControl.setPreset": [{
36277
+ name: "deviceId",
36278
+ form: "single",
36279
+ optional: false
36280
+ }],
36281
+ "humidifier.setMode": [{
36282
+ name: "deviceId",
36283
+ form: "single",
36284
+ optional: false
36285
+ }],
36286
+ "humidifier.setOn": [{
36287
+ name: "deviceId",
36288
+ form: "single",
36289
+ optional: false
36290
+ }],
36291
+ "humidifier.setTargetHumidity": [{
36292
+ name: "deviceId",
36293
+ form: "single",
36294
+ optional: false
36295
+ }],
36296
+ "imageSettings.getOptions": [{
36297
+ name: "deviceId",
36298
+ form: "single",
36299
+ optional: false
36300
+ }],
36301
+ "imageSettings.setSettings": [{
36302
+ name: "deviceId",
36303
+ form: "single",
36304
+ optional: false
36305
+ }],
36306
+ "intercom.endTalkSession": [{
36307
+ name: "deviceId",
36308
+ form: "single",
36309
+ optional: false
36310
+ }],
36311
+ "intercom.handleAnswer": [{
36312
+ name: "deviceId",
36313
+ form: "single",
36314
+ optional: false
36315
+ }],
36316
+ "intercom.pushTalkAudio": [{
36317
+ name: "deviceId",
36318
+ form: "single",
36319
+ optional: false
36320
+ }],
36321
+ "intercom.startSession": [{
36322
+ name: "deviceId",
36323
+ form: "single",
36324
+ optional: false
36325
+ }],
36326
+ "intercom.startTalkSession": [{
36327
+ name: "deviceId",
36328
+ form: "single",
36329
+ optional: false
36330
+ }],
36331
+ "intercom.stopSession": [{
36332
+ name: "deviceId",
36333
+ form: "single",
36334
+ optional: false
36335
+ }],
36336
+ "lawnMowerControl.dock": [{
36337
+ name: "deviceId",
36338
+ form: "single",
36339
+ optional: false
36340
+ }],
36341
+ "lawnMowerControl.pause": [{
36342
+ name: "deviceId",
36343
+ form: "single",
36344
+ optional: false
36345
+ }],
36346
+ "lawnMowerControl.startMowing": [{
36347
+ name: "deviceId",
36348
+ form: "single",
36349
+ optional: false
36350
+ }],
36351
+ "lockControl.lock": [{
36352
+ name: "deviceId",
36353
+ form: "single",
36354
+ optional: false
36355
+ }],
36356
+ "lockControl.open": [{
36357
+ name: "deviceId",
36358
+ form: "single",
36359
+ optional: false
36360
+ }],
36361
+ "lockControl.unlock": [{
36362
+ name: "deviceId",
36363
+ form: "single",
36364
+ optional: false
36365
+ }],
36366
+ "mediaPlayer.next": [{
36367
+ name: "deviceId",
36368
+ form: "single",
36369
+ optional: false
36370
+ }],
36371
+ "mediaPlayer.pause": [{
36372
+ name: "deviceId",
36373
+ form: "single",
36374
+ optional: false
36375
+ }],
36376
+ "mediaPlayer.play": [{
36377
+ name: "deviceId",
36378
+ form: "single",
36379
+ optional: false
36380
+ }],
36381
+ "mediaPlayer.playMedia": [{
36382
+ name: "deviceId",
36383
+ form: "single",
36384
+ optional: false
36385
+ }],
36386
+ "mediaPlayer.previous": [{
36387
+ name: "deviceId",
36388
+ form: "single",
36389
+ optional: false
36390
+ }],
36391
+ "mediaPlayer.seek": [{
36392
+ name: "deviceId",
36393
+ form: "single",
36394
+ optional: false
36395
+ }],
36396
+ "mediaPlayer.selectSource": [{
36397
+ name: "deviceId",
36398
+ form: "single",
36399
+ optional: false
36400
+ }],
36401
+ "mediaPlayer.setMute": [{
36402
+ name: "deviceId",
36403
+ form: "single",
36404
+ optional: false
36405
+ }],
36406
+ "mediaPlayer.setRepeat": [{
36407
+ name: "deviceId",
36408
+ form: "single",
36409
+ optional: false
36410
+ }],
36411
+ "mediaPlayer.setShuffle": [{
36412
+ name: "deviceId",
36413
+ form: "single",
36414
+ optional: false
36415
+ }],
36416
+ "mediaPlayer.setVolume": [{
36417
+ name: "deviceId",
36418
+ form: "single",
36419
+ optional: false
36420
+ }],
36421
+ "mediaPlayer.stop": [{
36422
+ name: "deviceId",
36423
+ form: "single",
36424
+ optional: false
36425
+ }],
36426
+ "motion.isDetected": [{
36427
+ name: "deviceId",
36428
+ form: "single",
36429
+ optional: false
36430
+ }],
36431
+ "motionDetection.analyze": [{
36432
+ name: "deviceId",
36433
+ form: "single",
36434
+ optional: false
36435
+ }],
36436
+ "motionDetection.removeCamera": [{
36437
+ name: "deviceId",
36438
+ form: "single",
36439
+ optional: false
36440
+ }],
36441
+ "motionTrigger.setMotionTrigger": [{
36442
+ name: "deviceId",
36443
+ form: "single",
36444
+ optional: false
36445
+ }],
36446
+ "motionZones.getOptions": [{
36447
+ name: "deviceId",
36448
+ form: "single",
36449
+ optional: false
36450
+ }],
36451
+ "motionZones.setZone": [{
36452
+ name: "deviceId",
36453
+ form: "single",
36454
+ optional: false
36455
+ }],
36456
+ "nativeObjectDetection.setEnabled": [{
36457
+ name: "deviceId",
36458
+ form: "single",
36459
+ optional: false
36460
+ }],
36461
+ "networkQuality.getDeviceStats": [{
36462
+ name: "deviceId",
36463
+ form: "single",
36464
+ optional: false
36465
+ }],
36466
+ "networkQuality.reportClientStats": [{
36467
+ name: "deviceId",
36468
+ form: "single",
36469
+ optional: false
36470
+ }],
36471
+ "notificationRules.setDeviceMuted": [{
36472
+ name: "deviceId",
36473
+ form: "single",
36474
+ optional: false
36475
+ }],
36476
+ "notifier.cancel": [{
36477
+ name: "deviceId",
36478
+ form: "single",
36479
+ optional: false
36480
+ }],
36481
+ "notifier.send": [{
36482
+ name: "deviceId",
36483
+ form: "single",
36484
+ optional: false
36485
+ }],
36486
+ "osd.setOverlay": [{
36487
+ name: "deviceId",
36488
+ form: "single",
36489
+ optional: false
36490
+ }],
36491
+ "osdManager.clearSlotBinding": [{
36492
+ name: "deviceId",
36493
+ form: "single",
36494
+ optional: false
36495
+ }],
36496
+ "osdManager.copyDeviceConfiguration": [{
36497
+ name: "sourceDeviceId",
36498
+ form: "single",
36499
+ optional: false
36500
+ }, {
36501
+ name: "targetDeviceId",
36502
+ form: "single",
36503
+ optional: false
36504
+ }],
36505
+ "osdManager.getDeviceOsd": [{
36506
+ name: "deviceId",
36507
+ form: "single",
36508
+ optional: false
36509
+ }],
36510
+ "osdManager.getSourceCatalog": [{
36511
+ name: "deviceId",
36512
+ form: "single",
36513
+ optional: false
36514
+ }],
36515
+ "osdManager.previewSlot": [{
36516
+ name: "deviceId",
36517
+ form: "single",
36518
+ optional: false
36519
+ }],
36520
+ "osdManager.renderDevice": [{
36521
+ name: "deviceId",
36522
+ form: "single",
36523
+ optional: false
36524
+ }],
36525
+ "osdManager.setSlotBinding": [{
36526
+ name: "deviceId",
36527
+ form: "single",
36528
+ optional: false
36529
+ }],
36530
+ "petFeeder.callPet": [{
36531
+ name: "deviceId",
36532
+ form: "single",
36533
+ optional: false
36534
+ }],
36535
+ "petFeeder.cancelFeed": [{
36536
+ name: "deviceId",
36537
+ form: "single",
36538
+ optional: false
36539
+ }],
36540
+ "petFeeder.feed": [{
36541
+ name: "deviceId",
36542
+ form: "single",
36543
+ optional: false
36544
+ }],
36545
+ "petFeeder.markFoodReplenished": [{
36546
+ name: "deviceId",
36547
+ form: "single",
36548
+ optional: false
36549
+ }],
36550
+ "petFeeder.playSound": [{
36551
+ name: "deviceId",
36552
+ form: "single",
36553
+ optional: false
36554
+ }],
36555
+ "petFeeder.resetDesiccant": [{
36556
+ name: "deviceId",
36557
+ form: "single",
36558
+ optional: false
36559
+ }],
36560
+ "petFeeder.setChildLock": [{
36561
+ name: "deviceId",
36562
+ form: "single",
36563
+ optional: false
36564
+ }],
36565
+ "petFeeder.setFeedSound": [{
36566
+ name: "deviceId",
36567
+ form: "single",
36568
+ optional: false
36569
+ }],
36570
+ "petFeeder.setIndicatorLight": [{
36571
+ name: "deviceId",
36572
+ form: "single",
36573
+ optional: false
36574
+ }],
36575
+ "petFeeder.setVolume": [{
36576
+ name: "deviceId",
36577
+ form: "single",
36578
+ optional: false
36579
+ }],
36580
+ "pipelineAnalytics.clearTracks": [{
36581
+ name: "deviceId",
36582
+ form: "single",
36583
+ optional: false
36584
+ }],
36585
+ "pipelineAnalytics.completeRetrainTrack": [{
36586
+ name: "deviceId",
36587
+ form: "single",
36588
+ optional: false
36589
+ }],
36590
+ "pipelineAnalytics.deleteDeviceEvents": [{
36591
+ name: "deviceId",
36592
+ form: "single",
36593
+ optional: false
36594
+ }],
36595
+ "pipelineAnalytics.deleteTracks": [{
36596
+ name: "deviceId",
36597
+ form: "single",
36598
+ optional: false
36599
+ }],
36600
+ "pipelineAnalytics.deselectRetrainFrame": [{
36601
+ name: "deviceId",
36602
+ form: "single",
36603
+ optional: false
36604
+ }],
36605
+ "pipelineAnalytics.getActiveTracks": [{
36606
+ name: "deviceId",
36607
+ form: "single",
36608
+ optional: false
36609
+ }],
36610
+ "pipelineAnalytics.getAudioEvents": [{
36611
+ name: "deviceId",
36612
+ form: "single",
36613
+ optional: false
36614
+ }],
36615
+ "pipelineAnalytics.getEventDensity": [{
36616
+ name: "deviceId",
36617
+ form: "single",
36618
+ optional: false
36619
+ }],
36620
+ "pipelineAnalytics.getEventMedia": [{
36621
+ name: "deviceId",
36622
+ form: "single",
36623
+ optional: false
36624
+ }],
36625
+ "pipelineAnalytics.getKeyEvents": [{
36626
+ name: "deviceId",
36627
+ form: "single",
36628
+ optional: false
36629
+ }],
36630
+ "pipelineAnalytics.getMotionEvents": [{
36631
+ name: "deviceId",
36632
+ form: "single",
36633
+ optional: false
36634
+ }],
36635
+ "pipelineAnalytics.getObjectEvents": [{
36636
+ name: "deviceId",
36637
+ form: "single",
36638
+ optional: false
36639
+ }],
36640
+ "pipelineAnalytics.getRetrainExportUrl": [{
36641
+ name: "deviceIds",
36642
+ form: "array",
36643
+ optional: true
36644
+ }],
36645
+ "pipelineAnalytics.getSensorEvents": [{
36646
+ name: "deviceId",
36647
+ form: "single",
36648
+ optional: false
36649
+ }],
36650
+ "pipelineAnalytics.getTrack": [{
36651
+ name: "deviceId",
36652
+ form: "single",
36653
+ optional: false
36654
+ }],
36655
+ "pipelineAnalytics.getTrackMedia": [{
36656
+ name: "deviceId",
36657
+ form: "single",
36658
+ optional: false
36659
+ }],
36660
+ "pipelineAnalytics.getTrainingExportSummary": [{
36661
+ name: "deviceIds",
36662
+ form: "array",
36663
+ optional: true
36664
+ }],
36665
+ "pipelineAnalytics.getTrainingExportUrl": [{
36666
+ name: "deviceIds",
36667
+ form: "array",
36668
+ optional: true
36669
+ }],
36670
+ "pipelineAnalytics.listEventKinds": [{
36671
+ name: "deviceId",
36672
+ form: "single",
36673
+ optional: false
36674
+ }],
36675
+ "pipelineAnalytics.listEventKindsBatch": [{
36676
+ name: "deviceIds",
36677
+ form: "array",
36678
+ optional: false
36679
+ }],
36680
+ "pipelineAnalytics.listOpsLog": [{
36681
+ name: "deviceId",
36682
+ form: "single",
36683
+ optional: true
36684
+ }],
36685
+ "pipelineAnalytics.listRecentTracks": [{
36686
+ name: "deviceIds",
36687
+ form: "array",
36688
+ optional: false
36689
+ }],
36690
+ "pipelineAnalytics.listRetrainStaging": [{
36691
+ name: "deviceIds",
36692
+ form: "array",
36693
+ optional: true
36694
+ }],
36695
+ "pipelineAnalytics.listTrackMedia": [{
36696
+ name: "deviceId",
36697
+ form: "single",
36698
+ optional: false
36699
+ }],
36700
+ "pipelineAnalytics.listTracks": [{
36701
+ name: "deviceId",
36702
+ form: "single",
36703
+ optional: false
36704
+ }],
36705
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36706
+ name: "deviceId",
36707
+ form: "single",
36708
+ optional: false
36709
+ }],
36710
+ "pipelineAnalytics.pruneEventsBefore": [{
36711
+ name: "deviceId",
36712
+ form: "single",
36713
+ optional: false
36714
+ }],
36715
+ "pipelineAnalytics.pruneTracksBefore": [{
36716
+ name: "deviceId",
36717
+ form: "single",
36718
+ optional: false
36719
+ }],
36720
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36721
+ name: "deviceId",
36722
+ form: "single",
36723
+ optional: true
36724
+ }],
36725
+ "pipelineAnalytics.restageRetrainTrack": [{
36726
+ name: "deviceId",
36727
+ form: "single",
36728
+ optional: false
36729
+ }],
36730
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36731
+ name: "deviceId",
36732
+ form: "single",
36733
+ optional: false
36734
+ }],
36735
+ "pipelineAnalytics.searchObjectEvents": [{
36736
+ name: "deviceId",
36737
+ form: "single",
36738
+ optional: true
36739
+ }],
36740
+ "pipelineAnalytics.selectRetrainFrames": [{
36741
+ name: "deviceId",
36742
+ form: "single",
36743
+ optional: false
36744
+ }],
36745
+ "pipelineAnalytics.setTrackFlags": [{
36746
+ name: "deviceId",
36747
+ form: "single",
36748
+ optional: false
36749
+ }],
36750
+ "pipelineAnalytics.wipeAllAnalytics": [{
36751
+ name: "deviceId",
36752
+ form: "single",
36753
+ optional: false
36754
+ }],
36755
+ "pipelineExecutor.runPipeline": [{
36756
+ name: "deviceId",
36757
+ form: "single",
36758
+ optional: true
36759
+ }],
36760
+ "pipelineExecutor.runPipelineBatch": [{
36761
+ name: "deviceId",
36762
+ form: "single",
36763
+ optional: true
36764
+ }],
36765
+ "pipelineOrchestrator.assignAudio": [{
36766
+ name: "deviceId",
36767
+ form: "single",
36768
+ optional: false
36769
+ }],
36770
+ "pipelineOrchestrator.assignPipeline": [{
36771
+ name: "deviceId",
36772
+ form: "single",
36773
+ optional: false
36774
+ }],
36775
+ "pipelineOrchestrator.getAudioAssignment": [{
36776
+ name: "deviceId",
36777
+ form: "single",
36778
+ optional: false
36779
+ }],
36780
+ "pipelineOrchestrator.getCameraMetrics": [{
36781
+ name: "deviceId",
36782
+ form: "single",
36783
+ optional: false
36784
+ }],
36785
+ "pipelineOrchestrator.getCameraSettings": [{
36786
+ name: "deviceId",
36787
+ form: "single",
36788
+ optional: false
36789
+ }],
36790
+ "pipelineOrchestrator.getCameraStatus": [{
36791
+ name: "deviceId",
36792
+ form: "single",
36793
+ optional: false
36794
+ }],
36795
+ "pipelineOrchestrator.getCameraStatuses": [{
36796
+ name: "deviceIds",
36797
+ form: "array",
36798
+ optional: true
36799
+ }],
36800
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36801
+ name: "deviceId",
36802
+ form: "single",
36803
+ optional: false
36804
+ }],
36805
+ "pipelineOrchestrator.getCameraSwitches": [{
36806
+ name: "deviceId",
36807
+ form: "single",
36808
+ optional: false
36809
+ }],
36810
+ "pipelineOrchestrator.getPipelineAssignment": [{
36811
+ name: "deviceId",
36812
+ form: "single",
36813
+ optional: false
36814
+ }],
36815
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36816
+ name: "deviceId",
36817
+ form: "single",
36818
+ optional: false
36819
+ }],
36820
+ "pipelineOrchestrator.resolvePipeline": [{
36821
+ name: "deviceId",
36822
+ form: "single",
36823
+ optional: false
36824
+ }],
36825
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36826
+ name: "deviceId",
36827
+ form: "single",
36828
+ optional: false
36829
+ }],
36830
+ "pipelineOrchestrator.setCameraStepOverride": [{
36831
+ name: "deviceId",
36832
+ form: "single",
36833
+ optional: false
36834
+ }],
36835
+ "pipelineOrchestrator.setCameraStepToggle": [{
36836
+ name: "deviceId",
36837
+ form: "single",
36838
+ optional: false
36839
+ }],
36840
+ "pipelineOrchestrator.setCameraSwitch": [{
36841
+ name: "deviceId",
36842
+ form: "single",
36843
+ optional: false
36844
+ }],
36845
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36846
+ name: "deviceId",
36847
+ form: "single",
36848
+ optional: false
36849
+ }],
36850
+ "pipelineOrchestrator.unassignAudio": [{
36851
+ name: "deviceId",
36852
+ form: "single",
36853
+ optional: false
36854
+ }],
36855
+ "pipelineOrchestrator.unassignPipeline": [{
36856
+ name: "deviceId",
36857
+ form: "single",
36858
+ optional: false
36859
+ }],
36860
+ "pipelineRunner.attachCamera": [{
36861
+ name: "deviceId",
36862
+ form: "single",
36863
+ optional: false
36864
+ }],
36865
+ "pipelineRunner.detachCamera": [{
36866
+ name: "deviceId",
36867
+ form: "single",
36868
+ optional: false
36869
+ }],
36870
+ "pipelineRunner.getCameraMetrics": [{
36871
+ name: "deviceId",
36872
+ form: "single",
36873
+ optional: false
36874
+ }],
36875
+ "pipelineRunner.reportMotion": [{
36876
+ name: "deviceId",
36877
+ form: "single",
36878
+ optional: false
36879
+ }],
36880
+ "pipelineRunner.runDetailSubtree": [{
36881
+ name: "deviceId",
36882
+ form: "single",
36883
+ optional: false
36884
+ }],
36885
+ "pipelineRunner.runStatelessStep": [{
36886
+ name: "sourceDeviceId",
36887
+ form: "single",
36888
+ optional: false
36889
+ }],
36890
+ "plateGallery.getPlateByTrack": [{
36891
+ name: "deviceId",
36892
+ form: "single",
36893
+ optional: false
36894
+ }],
36895
+ "plateGallery.listPlates": [{
36896
+ name: "deviceId",
36897
+ form: "single",
36898
+ optional: true
36899
+ }],
36900
+ "privacyMask.getOptions": [{
36901
+ name: "deviceId",
36902
+ form: "single",
36903
+ optional: false
36904
+ }],
36905
+ "privacyMask.setAudioEnabled": [{
36906
+ name: "deviceId",
36907
+ form: "single",
36908
+ optional: false
36909
+ }],
36910
+ "privacyMask.setMask": [{
36911
+ name: "deviceId",
36912
+ form: "single",
36913
+ optional: false
36914
+ }],
36915
+ "ptz.continuousMove": [{
36916
+ name: "deviceId",
36917
+ form: "single",
36918
+ optional: false
36919
+ }],
36920
+ "ptz.deletePreset": [{
36921
+ name: "deviceId",
36922
+ form: "single",
36923
+ optional: false
36924
+ }],
36925
+ "ptz.getOptions": [{
36926
+ name: "deviceId",
36927
+ form: "single",
36928
+ optional: false
36929
+ }],
36930
+ "ptz.getPosition": [{
36931
+ name: "deviceId",
36932
+ form: "single",
36933
+ optional: false
36934
+ }],
36935
+ "ptz.getPresets": [{
36936
+ name: "deviceId",
36937
+ form: "single",
36938
+ optional: false
36939
+ }],
36940
+ "ptz.goHome": [{
36941
+ name: "deviceId",
36942
+ form: "single",
36943
+ optional: false
36944
+ }],
36945
+ "ptz.goToPreset": [{
36946
+ name: "deviceId",
36947
+ form: "single",
36948
+ optional: false
36949
+ }],
36950
+ "ptz.move": [{
36951
+ name: "deviceId",
36952
+ form: "single",
36953
+ optional: false
36954
+ }],
36955
+ "ptz.savePreset": [{
36956
+ name: "deviceId",
36957
+ form: "single",
36958
+ optional: false
36959
+ }],
36960
+ "ptz.setAutofocus": [{
36961
+ name: "deviceId",
36962
+ form: "single",
36963
+ optional: false
36964
+ }],
36965
+ "ptz.stop": [{
36966
+ name: "deviceId",
36967
+ form: "single",
36968
+ optional: false
36969
+ }],
36970
+ "ptzAutotrack.getSettings": [{
36971
+ name: "deviceId",
36972
+ form: "single",
36973
+ optional: false
36974
+ }],
36975
+ "ptzAutotrack.getStatus": [{
36976
+ name: "deviceId",
36977
+ form: "single",
36978
+ optional: false
36979
+ }],
36980
+ "ptzAutotrack.setEnabled": [{
36981
+ name: "deviceId",
36982
+ form: "single",
36983
+ optional: false
36984
+ }],
36985
+ "ptzAutotrack.setSettings": [{
36986
+ name: "deviceId",
36987
+ form: "single",
36988
+ optional: false
36989
+ }],
36990
+ "reboot.reboot": [{
36991
+ name: "deviceId",
36992
+ form: "single",
36993
+ optional: false
36994
+ }],
36995
+ "recording.deleteFootprint": [{
36996
+ name: "deviceId",
36997
+ form: "single",
36998
+ optional: false
36999
+ }],
37000
+ "recording.getAvailability": [{
37001
+ name: "deviceId",
37002
+ form: "single",
37003
+ optional: false
37004
+ }],
37005
+ "recording.getDaysWithRecordings": [{
37006
+ name: "deviceId",
37007
+ form: "single",
37008
+ optional: false
37009
+ }],
37010
+ "recording.getDeviceConfig": [{
37011
+ name: "deviceId",
37012
+ form: "single",
37013
+ optional: false
37014
+ }],
37015
+ "recording.getPlaybackManifest": [{
37016
+ name: "deviceId",
37017
+ form: "single",
37018
+ optional: false
37019
+ }],
37020
+ "recording.listOpsLog": [{
37021
+ name: "deviceId",
37022
+ form: "single",
37023
+ optional: true
37024
+ }],
37025
+ "recording.locateSegment": [{
37026
+ name: "deviceId",
37027
+ form: "single",
37028
+ optional: false
37029
+ }],
37030
+ "recording.pruneFootage": [{
37031
+ name: "deviceId",
37032
+ form: "single",
37033
+ optional: false
37034
+ }],
37035
+ "recording.readGopBytes": [{
37036
+ name: "deviceId",
37037
+ form: "single",
37038
+ optional: false
37039
+ }],
37040
+ "recording.readSegmentBytes": [{
37041
+ name: "deviceId",
37042
+ form: "single",
37043
+ optional: false
37044
+ }],
37045
+ "recording.relocateFootage": [{
37046
+ name: "deviceId",
37047
+ form: "single",
37048
+ optional: true
37049
+ }],
37050
+ "recording.renderClip": [{
37051
+ name: "deviceId",
37052
+ form: "single",
37053
+ optional: false
37054
+ }],
37055
+ "recording.renderGif": [{
37056
+ name: "deviceId",
37057
+ form: "single",
37058
+ optional: false
37059
+ }],
37060
+ "recording.rescanStorage": [{
37061
+ name: "deviceId",
37062
+ form: "single",
37063
+ optional: false
37064
+ }],
37065
+ "recording.setDeviceConfig": [{
37066
+ name: "deviceId",
37067
+ form: "single",
37068
+ optional: false
37069
+ }],
37070
+ "recording.startStorageMigrationMove": [{
37071
+ name: "deviceId",
37072
+ form: "single",
37073
+ optional: true
37074
+ }],
37075
+ "recordingExport.createExport": [{
37076
+ name: "deviceId",
37077
+ form: "single",
37078
+ optional: false
37079
+ }],
37080
+ "recordingExport.listExports": [{
37081
+ name: "deviceId",
37082
+ form: "single",
37083
+ optional: true
37084
+ }],
37085
+ "sceneMonitor.captureReference": [{
37086
+ name: "deviceId",
37087
+ form: "single",
37088
+ optional: false
37089
+ }],
37090
+ "sceneMonitor.createScene": [{
37091
+ name: "deviceId",
37092
+ form: "single",
37093
+ optional: false
37094
+ }],
37095
+ "sceneMonitor.deleteReference": [{
37096
+ name: "deviceId",
37097
+ form: "single",
37098
+ optional: false
37099
+ }],
37100
+ "sceneMonitor.deleteScene": [{
37101
+ name: "deviceId",
37102
+ form: "single",
37103
+ optional: false
37104
+ }],
37105
+ "sceneMonitor.listScenes": [{
37106
+ name: "deviceId",
37107
+ form: "single",
37108
+ optional: false
37109
+ }],
37110
+ "sceneMonitor.recheckNow": [{
37111
+ name: "deviceId",
37112
+ form: "single",
37113
+ optional: false
37114
+ }],
37115
+ "sceneMonitor.resetScene": [{
37116
+ name: "deviceId",
37117
+ form: "single",
37118
+ optional: false
37119
+ }],
37120
+ "sceneMonitor.updateScene": [{
37121
+ name: "deviceId",
37122
+ form: "single",
37123
+ optional: false
37124
+ }],
37125
+ "scriptRunner.run": [{
37126
+ name: "deviceId",
37127
+ form: "single",
37128
+ optional: false
37129
+ }],
37130
+ "scriptRunner.stop": [{
37131
+ name: "deviceId",
37132
+ form: "single",
37133
+ optional: false
37134
+ }],
37135
+ "snapshot.getDebugState": [{
37136
+ name: "deviceId",
37137
+ form: "single",
37138
+ optional: false
37139
+ }],
37140
+ "snapshot.getSnapshot": [{
37141
+ name: "deviceId",
37142
+ form: "single",
37143
+ optional: false
37144
+ }],
37145
+ "snapshot.getSnapshotLinks": [{
37146
+ name: "targets",
37147
+ form: "object-array",
37148
+ optional: false,
37149
+ itemField: "deviceId"
37150
+ }],
37151
+ "snapshot.getSnapshotOverview": [{
37152
+ name: "deviceIds",
37153
+ form: "array",
37154
+ optional: false
37155
+ }],
37156
+ "snapshot.invalidateCache": [{
37157
+ name: "deviceId",
37158
+ form: "single",
37159
+ optional: false
37160
+ }],
37161
+ "streamBroker.acquireEgressTranscode": [{
37162
+ name: "deviceId",
37163
+ form: "single",
37164
+ optional: false
37165
+ }],
37166
+ "streamBroker.assignProfile": [{
37167
+ name: "deviceId",
37168
+ form: "single",
37169
+ optional: false
37170
+ }],
37171
+ "streamBroker.getDeviceAudioMute": [{
37172
+ name: "deviceId",
37173
+ form: "single",
37174
+ optional: false
37175
+ }],
37176
+ "streamBroker.getStreamWithCodec": [{
37177
+ name: "deviceId",
37178
+ form: "single",
37179
+ optional: false
37180
+ }],
37181
+ "streamBroker.produceEventMedia": [{
37182
+ name: "deviceId",
37183
+ form: "single",
37184
+ optional: false
37185
+ }],
37186
+ "streamBroker.publishCameraStream": [{
37187
+ name: "deviceId",
37188
+ form: "single",
37189
+ optional: false
37190
+ }],
37191
+ "streamBroker.renderPreBufferClip": [{
37192
+ name: "deviceId",
37193
+ form: "single",
37194
+ optional: false
37195
+ }],
37196
+ "streamBroker.restartProfile": [{
37197
+ name: "deviceId",
37198
+ form: "single",
37199
+ optional: false
37200
+ }],
37201
+ "streamBroker.retractCameraStream": [{
37202
+ name: "deviceId",
37203
+ form: "single",
37204
+ optional: false
37205
+ }],
37206
+ "streamBroker.setDeviceAudioMute": [{
37207
+ name: "deviceId",
37208
+ form: "single",
37209
+ optional: false
37210
+ }],
37211
+ "streamBroker.unassignProfile": [{
37212
+ name: "deviceId",
37213
+ form: "single",
37214
+ optional: false
37215
+ }],
37216
+ "streamCatalog.getCatalog": [{
37217
+ name: "deviceId",
37218
+ form: "single",
37219
+ optional: false
37220
+ }],
37221
+ "streamParams.getConfigSchema": [{
37222
+ name: "deviceId",
37223
+ form: "single",
37224
+ optional: false
37225
+ }],
37226
+ "streamParams.getOptions": [{
37227
+ name: "deviceId",
37228
+ form: "single",
37229
+ optional: false
37230
+ }],
37231
+ "streamParams.setProfile": [{
37232
+ name: "deviceId",
37233
+ form: "single",
37234
+ optional: false
37235
+ }],
37236
+ "switch.setState": [{
37237
+ name: "deviceId",
37238
+ form: "single",
37239
+ optional: false
37240
+ }],
37241
+ "vacuumControl.locate": [{
37242
+ name: "deviceId",
37243
+ form: "single",
37244
+ optional: false
37245
+ }],
37246
+ "vacuumControl.pause": [{
37247
+ name: "deviceId",
37248
+ form: "single",
37249
+ optional: false
37250
+ }],
37251
+ "vacuumControl.returnToBase": [{
37252
+ name: "deviceId",
37253
+ form: "single",
37254
+ optional: false
37255
+ }],
37256
+ "vacuumControl.setFanSpeed": [{
37257
+ name: "deviceId",
37258
+ form: "single",
37259
+ optional: false
37260
+ }],
37261
+ "vacuumControl.start": [{
37262
+ name: "deviceId",
37263
+ form: "single",
37264
+ optional: false
37265
+ }],
37266
+ "vacuumControl.stop": [{
37267
+ name: "deviceId",
37268
+ form: "single",
37269
+ optional: false
37270
+ }],
37271
+ "valve.close": [{
37272
+ name: "deviceId",
37273
+ form: "single",
37274
+ optional: false
37275
+ }],
37276
+ "valve.open": [{
37277
+ name: "deviceId",
37278
+ form: "single",
37279
+ optional: false
37280
+ }],
37281
+ "valve.setPosition": [{
37282
+ name: "deviceId",
37283
+ form: "single",
37284
+ optional: false
37285
+ }],
37286
+ "valve.stop": [{
37287
+ name: "deviceId",
37288
+ form: "single",
37289
+ optional: false
37290
+ }],
37291
+ "videoclips.getClipPlayback": [{
37292
+ name: "deviceId",
37293
+ form: "single",
37294
+ optional: false
37295
+ }],
37296
+ "videoclips.listClips": [{
37297
+ name: "deviceId",
37298
+ form: "single",
37299
+ optional: false
37300
+ }],
37301
+ "waterHeater.setAway": [{
37302
+ name: "deviceId",
37303
+ form: "single",
37304
+ optional: false
37305
+ }],
37306
+ "waterHeater.setOperationMode": [{
37307
+ name: "deviceId",
37308
+ form: "single",
37309
+ optional: false
37310
+ }],
37311
+ "waterHeater.setTargetTemp": [{
37312
+ name: "deviceId",
37313
+ form: "single",
37314
+ optional: false
37315
+ }],
37316
+ "webrtcSession.addIceCandidate": [{
37317
+ name: "deviceId",
37318
+ form: "single",
37319
+ optional: false
37320
+ }],
37321
+ "webrtcSession.closeSession": [{
37322
+ name: "deviceId",
37323
+ form: "single",
37324
+ optional: false
37325
+ }],
37326
+ "webrtcSession.createSession": [{
37327
+ name: "deviceId",
37328
+ form: "single",
37329
+ optional: false
37330
+ }],
37331
+ "webrtcSession.getIceCandidates": [{
37332
+ name: "deviceId",
37333
+ form: "single",
37334
+ optional: false
37335
+ }],
37336
+ "webrtcSession.getSessionState": [{
37337
+ name: "deviceId",
37338
+ form: "single",
37339
+ optional: false
37340
+ }],
37341
+ "webrtcSession.handleAnswer": [{
37342
+ name: "deviceId",
37343
+ form: "single",
37344
+ optional: false
37345
+ }],
37346
+ "webrtcSession.handleOffer": [{
37347
+ name: "deviceId",
37348
+ form: "single",
37349
+ optional: false
37350
+ }],
37351
+ "webrtcSession.hasAdaptiveBitrate": [{
37352
+ name: "deviceId",
37353
+ form: "single",
37354
+ optional: false
37355
+ }],
37356
+ "webrtcSession.listStreams": [{
37357
+ name: "deviceId",
37358
+ form: "single",
37359
+ optional: false
37360
+ }],
37361
+ "zoneAnalytics.getCameraHistory": [{
37362
+ name: "deviceId",
37363
+ form: "single",
37364
+ optional: false
37365
+ }],
37366
+ "zoneAnalytics.getCurrentSnapshot": [{
37367
+ name: "deviceId",
37368
+ form: "single",
37369
+ optional: false
37370
+ }],
37371
+ "zoneAnalytics.getUnzonedHistory": [{
37372
+ name: "deviceId",
37373
+ form: "single",
37374
+ optional: false
37375
+ }],
37376
+ "zoneAnalytics.getZoneHistory": [{
37377
+ name: "deviceId",
37378
+ form: "single",
37379
+ optional: false
37380
+ }],
37381
+ "zoneRules.listRules": [{
37382
+ name: "deviceId",
37383
+ form: "single",
37384
+ optional: false
37385
+ }],
37386
+ "zoneRules.setRules": [{
37387
+ name: "deviceId",
37388
+ form: "single",
37389
+ optional: false
37390
+ }],
37391
+ "zones.addZone": [{
37392
+ name: "deviceId",
37393
+ form: "single",
37394
+ optional: false
37395
+ }],
37396
+ "zones.listZones": [{
37397
+ name: "deviceId",
37398
+ form: "single",
37399
+ optional: false
37400
+ }],
37401
+ "zones.removeZone": [{
37402
+ name: "deviceId",
37403
+ form: "single",
37404
+ optional: false
37405
+ }],
37406
+ "zones.updateZone": [{
37407
+ name: "deviceId",
37408
+ form: "single",
37409
+ optional: false
37410
+ }]
37411
+ });
34648
37412
  Object.freeze({
34649
37413
  "broker": "broker",
34650
37414
  "device-export": "device-export",