@camstack/addon-provider-velux 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2938 -151
  2. package/dist/addon.mjs +2938 -151
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-Cv9dO26A.mjs
1
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -205,6 +205,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
205
205
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
206
206
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
207
207
  /**
208
+ * A node the orchestrator would otherwise place cameras on has NO usable
209
+ * inference device: the operator enabled one or more accelerators there and
210
+ * the live probe reports every one of them unavailable. Emitted once per
211
+ * TRANSITION into that state (never per dispatch), and the node is dropped
212
+ * from the placement candidate set for as long as it holds.
213
+ *
214
+ * This exists because the state was previously invisible: little-unraid
215
+ * absorbed 283k inference errors in a day while still being handed cameras,
216
+ * and nothing in the system said so.
217
+ *
218
+ * A node with no accelerators configured at all is NOT this — its devices
219
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
220
+ * serves it exactly as before.
221
+ */
222
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
223
+ /**
224
+ * A camera has an OPEN detection session and has produced no detection at
225
+ * all for longer than the blind threshold — the camera is being decoded and
226
+ * inferred and is returning nothing. Emitted once per transition into blind,
227
+ * per camera.
228
+ *
229
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
230
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
231
+ * camera" produce byte-identical silence.
232
+ */
233
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
234
+ /**
208
235
  * Per-camera pipeline config was mutated by the orchestrator
209
236
  * (3-level settings change via `setAgentAddonDefaults` /
210
237
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -10889,6 +10916,8 @@ var QueryFilterSchema = object({
10889
10916
  where: record(string(), unknown()).optional(),
10890
10917
  whereIn: record(string(), array(unknown())).optional(),
10891
10918
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10919
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10920
+ whereNot: record(string(), unknown()).optional(),
10892
10921
  orderBy: object({
10893
10922
  field: string(),
10894
10923
  direction: _enum(["asc", "desc"])
@@ -10908,7 +10937,8 @@ var QueryFilterSchema = object({
10908
10937
  var MutationFilterSchema = object({
10909
10938
  where: record(string(), unknown()).optional(),
10910
10939
  whereIn: record(string(), array(unknown())).optional(),
10911
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10940
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10941
+ whereNot: record(string(), unknown()).optional()
10912
10942
  });
10913
10943
  /** A single stored record: `{ id, data }`. */
10914
10944
  var SettingsRecordSchema = object({
@@ -12427,6 +12457,17 @@ var LlmImageSchema = object({
12427
12457
  bytes: _instanceof(Uint8Array),
12428
12458
  mimeType: string()
12429
12459
  });
12460
+ /**
12461
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12462
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12463
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12464
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12465
+ */
12466
+ var LlmRetryPolicySchema = object({
12467
+ enabled: boolean().default(false),
12468
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12469
+ maxAttempts: number().int().min(1).max(5).default(1)
12470
+ });
12430
12471
  var LlmGenerateBaseInputSchema = object({
12431
12472
  /** Collection routing (the notification-output posture). */
12432
12473
  addonId: string().optional(),
@@ -12441,7 +12482,28 @@ var LlmGenerateBaseInputSchema = object({
12441
12482
  jsonSchema: record(string(), unknown()).optional(),
12442
12483
  /** Per-call override of the profile default. */
12443
12484
  maxTokens: number().int().positive().optional(),
12444
- temperature: number().optional()
12485
+ temperature: number().optional(),
12486
+ /** Per-call override of the profile default (nucleus sampling). */
12487
+ topP: number().min(0).max(1).optional(),
12488
+ /** Per-call override of the profile default (top-k sampling). */
12489
+ topK: number().int().positive().optional(),
12490
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12491
+ timeoutMs: number().int().positive().optional(),
12492
+ /** Per-call override; beats both the consumer table and the profile. */
12493
+ retry: LlmRetryPolicySchema.optional(),
12494
+ /**
12495
+ * Caller-minted id that makes this generation CANCELLABLE.
12496
+ *
12497
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12498
+ * the call against 8 s and free their own slot when the timer wins, while the
12499
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12500
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12501
+ * not generations, and the real load is unbounded.
12502
+ *
12503
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12504
+ * `llm.cancel({ requestId })` tears the socket down.
12505
+ */
12506
+ requestId: string().optional()
12445
12507
  });
12446
12508
  /**
12447
12509
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12454,6 +12516,18 @@ var LlmGenerateBaseInputSchema = object({
12454
12516
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12455
12517
  * watchdog — operator decision #3).
12456
12518
  */
12519
+ /**
12520
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12521
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12522
+ * REF rather than looked up at install time, so what the operator approved in
12523
+ * the preview is exactly what the node downloads.
12524
+ */
12525
+ var ManagedModelExtraFileSchema = object({
12526
+ url: string(),
12527
+ filename: string(),
12528
+ sizeBytes: number(),
12529
+ sha256: string().optional()
12530
+ });
12457
12531
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12458
12532
  object({
12459
12533
  kind: literal("catalog"),
@@ -12462,7 +12536,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12462
12536
  object({
12463
12537
  kind: literal("url"),
12464
12538
  url: string(),
12465
- sha256: string().optional()
12539
+ sha256: string().optional(),
12540
+ /** Picker/status label; the file basename when absent. */
12541
+ label: string().optional(),
12542
+ sizeBytes: number().optional(),
12543
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12466
12544
  }),
12467
12545
  object({
12468
12546
  kind: literal("path"),
@@ -12480,13 +12558,82 @@ var ManagedRuntimeConfigSchema = object({
12480
12558
  gpuLayers: number().int().default(0),
12481
12559
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12482
12560
  threads: number().int().optional(),
12483
- /** Concurrent slots. */
12561
+ /** Concurrent slots (`--parallel`). */
12484
12562
  parallel: number().int().default(1),
12563
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12564
+ batchSize: number().int().positive().optional(),
12565
+ /** Physical batch / micro-batch (`-ub`). */
12566
+ ubatchSize: number().int().positive().optional(),
12567
+ /**
12568
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12569
+ * is a no-op elsewhere, so it is offered rather than assumed.
12570
+ */
12571
+ flashAttention: boolean().default(false),
12572
+ /**
12573
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12574
+ * inference. Costs the full model size in resident memory — which is exactly
12575
+ * what the RAM budget is counting.
12576
+ */
12577
+ mlock: boolean().default(false),
12578
+ /**
12579
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12580
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12581
+ * store produces on every first token.
12582
+ */
12583
+ noMmap: boolean().default(false),
12584
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12585
+ * cheapest way to fit a longer context in the same RAM. */
12586
+ cacheTypeK: _enum([
12587
+ "f32",
12588
+ "f16",
12589
+ "q8_0",
12590
+ "q5_1",
12591
+ "q5_0",
12592
+ "q4_1",
12593
+ "q4_0"
12594
+ ]).optional(),
12595
+ cacheTypeV: _enum([
12596
+ "f32",
12597
+ "f16",
12598
+ "q8_0",
12599
+ "q5_1",
12600
+ "q5_0",
12601
+ "q4_1",
12602
+ "q4_0"
12603
+ ]).optional(),
12604
+ /**
12605
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12606
+ * (which most vision chat templates need and some language-only models
12607
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12608
+ *
12609
+ * It is NOT a second place to set the flags above. A token that collides
12610
+ * with a typed field is REJECTED at start, naming the field that owns it
12611
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12612
+ * the "two switches that disagree" failure this repo has already shipped
12613
+ * twice (D62).
12614
+ */
12615
+ extraArgs: array(string()).default([]),
12485
12616
  /** Else lazy: first generate boots it. */
12486
12617
  autoStart: boolean().default(false),
12487
12618
  /** 0 = never; frees RAM after quiet periods. */
12488
12619
  idleStopMinutes: number().int().default(30)
12489
12620
  });
12621
+ /**
12622
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12623
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12624
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12625
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12626
+ */
12627
+ var LlmDownloadProgressSchema = object({
12628
+ phase: _enum(["downloading", "verifying"]),
12629
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12630
+ file: string(),
12631
+ fileIndex: number().int(),
12632
+ fileCount: number().int(),
12633
+ /** Across the WHOLE install, not the current file. */
12634
+ downloadedBytes: number(),
12635
+ totalBytes: number().optional()
12636
+ });
12490
12637
  var LlmRuntimeStatusSchema = object({
12491
12638
  /** Status is ALWAYS node-qualified. */
12492
12639
  nodeId: string(),
@@ -12503,6 +12650,8 @@ var LlmRuntimeStatusSchema = object({
12503
12650
  modelPath: string().optional(),
12504
12651
  modelId: string().optional(),
12505
12652
  downloadProgress: number().min(0).max(1).optional(),
12653
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12654
+ download: LlmDownloadProgressSchema.optional(),
12506
12655
  lastError: string().optional(),
12507
12656
  crashesInWindow: number(),
12508
12657
  /** Child RSS (sampled best-effort). */
@@ -12513,7 +12662,14 @@ var LlmNodeModelSchema = object({
12513
12662
  file: string(),
12514
12663
  sizeBytes: number(),
12515
12664
  catalogId: string().optional(),
12516
- installedAt: number().optional()
12665
+ installedAt: number().optional(),
12666
+ /**
12667
+ * Absolute path on the node. Present so a file that is on disk but matches
12668
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12669
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12670
+ * it the picker could list such a file and do nothing with it.
12671
+ */
12672
+ path: string().optional()
12517
12673
  });
12518
12674
  var LlmRuntimeDiskUsageSchema = object({
12519
12675
  nodeId: string(),
@@ -12569,10 +12725,47 @@ var LlmProfileSchema = object({
12569
12725
  baseUrl: string().optional(),
12570
12726
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12571
12727
  apiKey: string().optional(),
12728
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12729
+ * degraded to text — that shipped once and produced a confident answer to a
12730
+ * question about a picture nobody sent. */
12572
12731
  supportsVision: boolean(),
12573
12732
  temperature: number().min(0).max(2).optional(),
12733
+ /** Nucleus sampling. Every wire we speak has it. */
12734
+ topP: number().min(0).max(1).optional(),
12735
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12736
+ * wire does, and the client drops it there (measured: the request body gets
12737
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12738
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12739
+ topK: number().int().positive().optional(),
12574
12740
  maxTokens: number().int().positive().optional(),
12741
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12742
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12743
+ * the model with, so it is the one field that changes a PROCESS. */
12744
+ contextLength: number().int().positive().optional(),
12745
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12746
+ * two system prompts fighting is worse than either alone). */
12747
+ systemPrompt: string().optional(),
12748
+ /** Total generation bound — the only one a unary call has. */
12575
12749
  timeoutMs: number().int().positive().default(6e4),
12750
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12751
+ * response headers: on the LM Studio / llama-server wire those are written
12752
+ * once the model has finished loading, so they belong to the bound below. */
12753
+ connectTimeoutMs: number().int().positive().default(1e4),
12754
+ /** Accepted, but no output yet — response headers included, because a cold
12755
+ * GPU load is exactly what happens before them. */
12756
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12757
+ /** Output started then stopped. */
12758
+ idleTimeoutMs: number().int().positive().default(6e4),
12759
+ /** Profile-level default. The per-consumer table and a per-call override
12760
+ * both beat it — see `resolveRetryPolicy`. */
12761
+ retry: LlmRetryPolicySchema.default({
12762
+ enabled: false,
12763
+ maxAttempts: 1
12764
+ }),
12765
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12766
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12767
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12768
+ toolsEnabled: boolean().default(false),
12576
12769
  extraHeaders: record(string(), string()).optional(),
12577
12770
  /** kind === 'managed-local' only (spec §4). */
12578
12771
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12622,6 +12815,36 @@ var ManagedModelCatalogEntrySchema = object({
12622
12815
  /** Vision models: companion projector file. */
12623
12816
  mmprojUrl: string().optional()
12624
12817
  });
12818
+ /**
12819
+ * The outcome of turning one operator-typed Hugging Face reference into a
12820
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12821
+ * I will not pick for you" is a normal answer the UI has to render, not an
12822
+ * exception.
12823
+ *
12824
+ * `candidates` is the whole reason the refusal is usable — every string in it
12825
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12826
+ */
12827
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12828
+ ok: literal(true),
12829
+ /** Ready to hand to `installModel` unchanged. */
12830
+ model: ManagedModelRefSchema,
12831
+ label: string(),
12832
+ repo: string(),
12833
+ quantization: string(),
12834
+ purpose: _enum(["text", "vision"]),
12835
+ totalBytes: number(),
12836
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12837
+ * see that 0.9 GB of it is a projector they did not name. */
12838
+ extraFilenames: array(string())
12839
+ }), object({
12840
+ ok: literal(false),
12841
+ code: string(),
12842
+ message: string(),
12843
+ candidates: array(string()).optional(),
12844
+ /** Set when the refusal was only the ceiling: re-calling with
12845
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12846
+ requiredBytes: number().optional()
12847
+ })]);
12625
12848
  var LlmRuntimeNodeSchema = object({
12626
12849
  nodeId: string(),
12627
12850
  reachable: boolean(),
@@ -12634,7 +12857,10 @@ var ProfileRefInputSchema = object({
12634
12857
  addonId: string(),
12635
12858
  profileId: string()
12636
12859
  });
12637
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12860
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12861
+ addonId: string().optional(),
12862
+ requestId: string()
12863
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12638
12864
  kind: "mutation",
12639
12865
  auth: "admin"
12640
12866
  }), method(ProfileRefInputSchema, _void(), {
@@ -12655,6 +12881,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12655
12881
  consumer: string().optional(),
12656
12882
  profileId: string().optional()
12657
12883
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12884
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12885
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12886
+ ref: string(),
12887
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12888
+ maxBytes: number().positive().optional()
12889
+ }), HfModelResolutionSchema, {
12890
+ kind: "mutation",
12891
+ auth: "admin"
12892
+ }), method(object({
12658
12893
  nodeId: string(),
12659
12894
  model: ManagedModelRefSchema
12660
12895
  }), _void(), {
@@ -13214,11 +13449,33 @@ var NotificationFormatSchema = _enum([
13214
13449
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13215
13450
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13216
13451
  * differently.
13452
+ *
13453
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13454
+ *
13455
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13456
+ * the whole set onto its own renderer's vocabulary through a
13457
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13458
+ * fallback, so adding a member here fails every adapter's build until someone
13459
+ * decides its glyph, which is the only place that decision can be made
13460
+ * honestly.
13461
+ *
13462
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13463
+ * `disarm` straight through; iOS feeds that string to
13464
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13465
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13466
+ * mapping, and "the field is documented" is not "the value renders".
13467
+ *
13468
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13469
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13470
+ * so an addon that emits a token the running hub does not know does not lose an
13471
+ * icon — its whole `send` fails Zod validation and the notification never
13472
+ * arrives. Never emit a new token from an addon before the train carrying it.
13217
13473
  */
13218
13474
  var NotificationActionIconSchema = _enum([
13219
13475
  "acknowledge",
13220
13476
  "dismiss",
13221
13477
  "silence",
13478
+ "snooze",
13222
13479
  "view",
13223
13480
  "play",
13224
13481
  "open",
@@ -13226,9 +13483,13 @@ var NotificationActionIconSchema = _enum([
13226
13483
  "lock",
13227
13484
  "unlock",
13228
13485
  "arm",
13486
+ "arm-home",
13487
+ "arm-away",
13488
+ "arm-night",
13229
13489
  "disarm",
13230
13490
  "light",
13231
- "alert"
13491
+ "alert",
13492
+ "camera"
13232
13493
  ]);
13233
13494
  /** A single tap-through action button. */
13234
13495
  var NotificationActionSchema = object({
@@ -13428,6 +13689,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13428
13689
  targetId: string(),
13429
13690
  enabled: boolean()
13430
13691
  }), _void(), { kind: "mutation" });
13692
+ new Set([
13693
+ {
13694
+ id: "person",
13695
+ name: "Person"
13696
+ },
13697
+ {
13698
+ id: "vehicle",
13699
+ name: "Vehicle"
13700
+ },
13701
+ {
13702
+ id: "animal",
13703
+ name: "Animal"
13704
+ },
13705
+ {
13706
+ id: "package",
13707
+ name: "Package"
13708
+ }
13709
+ ].map((l) => l.id));
13431
13710
  var COCO_TO_MACRO = {
13432
13711
  mapping: {
13433
13712
  person: "person",
@@ -14258,11 +14537,15 @@ var NcSystemEventKindSchema = _enum([
14258
14537
  "stream-offline",
14259
14538
  "node-online",
14260
14539
  "node-offline",
14540
+ "node-inference-unavailable",
14541
+ "detection-blind",
14261
14542
  "addon-update-available",
14262
14543
  "server-update-available",
14263
14544
  "alarm-triggered",
14264
14545
  "alarm-armed",
14265
14546
  "alarm-disarmed",
14547
+ "alarm-arming",
14548
+ "alarm-arm-refused",
14266
14549
  "camera-online",
14267
14550
  "camera-offline",
14268
14551
  "camera-disabled",
@@ -14317,7 +14600,16 @@ var NcScheduleSchema = object({
14317
14600
  });
14318
14601
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14319
14602
  var NcPlateMatcherSchema = object({
14320
- values: array(string().min(1)).min(1),
14603
+ /**
14604
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14605
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14606
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14607
+ * rather than merely seen. A subject carrying no plate still fails.
14608
+ *
14609
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14610
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14611
+ */
14612
+ values: array(string().min(1)),
14321
14613
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14322
14614
  maxDistance: number().int().min(0).max(3).default(1)
14323
14615
  });
@@ -14351,28 +14643,36 @@ var NcOccupancyConditionSchema = object({
14351
14643
  /**
14352
14644
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14353
14645
  *
14354
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14355
- * reference notifier uses, so an operator moving between them re-uses what
14356
- * they already know): a rule matches when, over a sampling window of
14357
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14358
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14359
- *
14360
- * - `dbThreshold` — its level is at or above this many dBFS (see
14361
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14362
- * - `labels` — the classifier put at least one of these labels on it.
14363
- *
14364
- * Both are OPTIONAL and independent, which is the point of the shape: a
14365
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14366
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14367
- * is given** — a window in which every sample is trivially a hit would fire on
14368
- * silence, so the engine refuses such a condition rather than notifying on
14369
- * nothing (the schema cannot express "at least one of" without becoming a
14370
- * ZodEffects the cap path would have to special-case).
14371
- *
14372
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14373
- * must be FULL before it can match — a window that has been open for two
14374
- * seconds of its ten is 100% of nothing, and firing on it would make
14375
- * `samplingSeconds` decorative.
14646
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14647
+ * rule is in is not a stored field — it is WHICH FILTER the rule carries, so
14648
+ * there is no second switch that can disagree with the first and every rule
14649
+ * authored before the decision migrates for free (`audioModeOf`):
14650
+ *
14651
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14652
+ * classifier labels with one of them. No window, no percentage:
14653
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14654
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14655
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14656
+ * reaches this condition if the classifier was already confident enough.
14657
+ * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14658
+ * the condition: at least `hitPercent`% of the samples over
14659
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14660
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14661
+ * must be FULL before it can match — a window open for two of its ten
14662
+ * seconds is 100% of nothing.
14663
+ *
14664
+ * **Why label mode has no window.** It had one, and it never fired: the
14665
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14666
+ * of them per episode, even through continuous crying. The measured maximum
14667
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14668
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14669
+ * the wrong question to ask of a sparse classifier.
14670
+ *
14671
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14672
+ * and the rule would fire on silence. The schema cannot express "exactly one
14673
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14674
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14675
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14376
14676
  *
14377
14677
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14378
14678
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14380,13 +14680,13 @@ var NcOccupancyConditionSchema = object({
14380
14680
  * an operator who typed `dog` mean the same thing.
14381
14681
  */
14382
14682
  var NcAudioConditionSchema = object({
14383
- /** Audio macro labels; absent = any sound (level-only rule). */
14683
+ /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14384
14684
  labels: array(string().min(1)).min(1).optional(),
14385
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14685
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14386
14686
  dbThreshold: number().min(-96).max(0).optional(),
14387
- /** Percentage of the window's samples that must be hits (1–100). */
14687
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14388
14688
  hitPercent: number().int().min(1).max(100).default(60),
14389
- /** Length of the sampling window in seconds. */
14689
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14390
14690
  samplingSeconds: number().int().min(1).max(300).default(10)
14391
14691
  });
14392
14692
  /**
@@ -14524,13 +14824,81 @@ var NcRuleActionsSchema = object({
14524
14824
  */
14525
14825
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14526
14826
  });
14827
+ /**
14828
+ * "This rule applies only while `deviceId` is in one of `states`."
14829
+ *
14830
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14831
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14832
+ * make the condition lie about devices whose states have no equivalent.
14833
+ *
14834
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14835
+ * condition that fired on "I could not read it" would be worse than no gate.
14836
+ */
14837
+ var NcDeviceStateConditionSchema = object({
14838
+ deviceId: number().int(),
14839
+ /** Any of these matches. */
14840
+ states: array(string().min(1)).min(1)
14841
+ });
14842
+ /**
14843
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14844
+ *
14845
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14846
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14847
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14848
+ * already has a trigger ("tell me about a person at the front door, but only
14849
+ * while the bin is still out"). That is why it composes with every delivery
14850
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14851
+ * kind exist for it — see D159.
14852
+ *
14853
+ * ── Identity ───────────────────────────────────────────────────────────────
14854
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14855
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14856
+ * carried as a HINT for the editor and for the log line, never as part of the
14857
+ * lookup key: a rule whose hint drifted must still gate correctly.
14858
+ *
14859
+ * ── Which boolean ──────────────────────────────────────────────────────────
14860
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14861
+ * already declares which boolean drives notification rules, and a second knob
14862
+ * that could disagree with it is exactly the D62 failure. Set it only to
14863
+ * override one rule against the scene's own default.
14864
+ *
14865
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14866
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14867
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14868
+ * evidence, in either direction.
14869
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14870
+ * The latch is a durable fact about the past ("it has diverged since I armed
14871
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14872
+ * reason the operator asked for a latch.
14873
+ *
14874
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14875
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14876
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14877
+ * said out loud in the log rather than dropped in silence.
14878
+ */
14879
+ var NcSceneConditionSchema = object({
14880
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14881
+ sceneId: string().min(1),
14882
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14883
+ deviceId: number().int().optional(),
14884
+ /** The state the scene must be in for the rule to fire. */
14885
+ requiredState: _enum(["matched", "diverged"]),
14886
+ /**
14887
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14888
+ * scene's own `emit` field, which is the only place that decision belongs.
14889
+ */
14890
+ latched: boolean().optional()
14891
+ });
14527
14892
  var NcConditionsSchema = object({
14528
14893
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14529
- deviceState: object({
14530
- deviceId: number().int(),
14531
- /** Any of these matches. */
14532
- states: array(string().min(1)).min(1)
14533
- }).optional(),
14894
+ deviceState: NcDeviceStateConditionSchema.optional(),
14895
+ /**
14896
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14897
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14898
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14899
+ * {@link NcSceneCondition} and D159.
14900
+ */
14901
+ scene: NcSceneConditionSchema.optional(),
14534
14902
  /** Device scope — absent = all devices. */
14535
14903
  devices: array(number()).optional(),
14536
14904
  /** Detector class names (any overlap with the record's class set). */
@@ -14556,18 +14924,47 @@ var NcConditionsSchema = object({
14556
14924
  */
14557
14925
  labelEquals: array(string().min(1)).optional(),
14558
14926
  /**
14559
- * Identity matcher. P1 boundary: matched against the record's collapsed
14560
- * `label` (the identity display name propagated by the face pipeline) —
14561
- * identity-ID matching rides in P2 when identity ids reach the record.
14927
+ * KNOWN FACES — the rule's identity scope, and the switch that says the rule
14928
+ * is about recognised people at all.
14929
+ *
14930
+ * Three states, and the empty one is the point:
14931
+ *
14932
+ * | value | meaning |
14933
+ * | --- | --- |
14934
+ * | absent | the rule does not care who it is; an unrecognised person matches |
14935
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
14936
+ * | a list | only these identities |
14937
+ *
14938
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
14939
+ * `devices` list is every device), applied one level down: the operator has
14940
+ * turned the face scope ON and narrowed it to nothing, which is every known
14941
+ * face. No second field states the same thing — a switch that can disagree
14942
+ * with the list under it is worse than no switch (D62).
14943
+ *
14944
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
14945
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
14946
+ * the operator fixed the spelling. The id reaches the record on
14947
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
14948
+ * `{{label}}` renders.
14949
+ *
14950
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
14951
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
14952
+ * for is left as it stands and reported, never dropped. The engine also
14953
+ * accepts a display-name hit as a compatibility leg, so a rule whose
14954
+ * migration could not resolve keeps matching exactly what it matched before.
14562
14955
  */
14563
14956
  identities: array(string().min(1)).optional(),
14564
- /** Fuzzy plate matcher against the record's `label` (plate text). */
14957
+ /**
14958
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
14959
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
14960
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
14961
+ */
14565
14962
  plates: NcPlateMatcherSchema.optional(),
14566
14963
  /**
14567
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14568
- * Same P1 boundary: matched against the record's collapsed `label` (the
14569
- * identity display name). A record with NO label passes (nothing to
14570
- * exclude), unlike the include variant which fails on an absent label.
14964
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
14965
+ * the same id members and the same lazy name→id migration. A record with NO
14966
+ * identity passes (nothing to exclude), unlike the include variant which
14967
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14571
14968
  */
14572
14969
  identitiesExclude: array(string().min(1)).optional(),
14573
14970
  /**
@@ -14959,7 +15356,80 @@ var NcRuleInputSchema = object({
14959
15356
  * a rule that predates the gate must keep delivering byte-for-byte as it
14960
15357
  * did, and absent is the only way to say that without a migration.
14961
15358
  */
14962
- confirm: NcConfirmSchema.optional()
15359
+ confirm: NcConfirmSchema.optional(),
15360
+ /**
15361
+ * WAIT for face/plate recognition before saying anything.
15362
+ *
15363
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15364
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15365
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15366
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15367
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15368
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15369
+ *
15370
+ * Only two honest answers exist, and this flag picks between them. It has
15371
+ * effect ONLY on a rule that declares a recognition scope
15372
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15373
+ * other rule there is nothing to wait for and the flag is inert.
15374
+ *
15375
+ * | value | what happens |
15376
+ * | --- | --- |
15377
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15378
+ * | 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) |
15379
+ *
15380
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15381
+ * on the addon cap path, and absent has to keep meaning exactly what every
15382
+ * rule authored before this field meant.
15383
+ *
15384
+ * The cost of `true` is stated here because the editor states it too: a rule
15385
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15386
+ * tests every zone the track visited and a `crossing` condition can no longer
15387
+ * be satisfied, because a closed track carries no crossing.
15388
+ */
15389
+ waitForEnhancement: boolean().optional(),
15390
+ /**
15391
+ * GROUP a burst of subjects into ONE notification that grows.
15392
+ *
15393
+ * Seconds of quiet after the last matching subject before the burst is
15394
+ * considered over. While it is open, the first subject enqueues immediately —
15395
+ * **exactly as today, with no added latency** — and every real growth (a new
15396
+ * subject, or a name confirmed on one already in it) REPLACES that
15397
+ * notification with an updated one naming everybody. The push carries the
15398
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15399
+ *
15400
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15401
+ *
15402
+ * ### Why an idle cutoff and not a window
15403
+ *
15404
+ * The measured seven-person arrival on device 590 spans 110 s with every
15405
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15406
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15407
+ * 30 is Frigate's shipped value for the same decision.
15408
+ *
15409
+ * ### What it replaces
15410
+ *
15411
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15412
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15413
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15414
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15415
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15416
+ * budget over GROUPS — which is what it always meant — and a growth is never
15417
+ * throttled by the window its own first member spent.
15418
+ *
15419
+ * ### Interaction with {@link waitForEnhancement}
15420
+ *
15421
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15422
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15423
+ * CLOSE — already carrying its name — and grows as later members close. That
15424
+ * is later, and complete. With grouping alone the group opens on the first
15425
+ * object event and picks up names as they are confirmed, through the growth
15426
+ * path. Neither combination fires twice for one subject.
15427
+ *
15428
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15429
+ * on the addon cap path, so absent must keep meaning what it meant before this
15430
+ * field existed.
15431
+ */
15432
+ groupIdleSec: number().int().min(0).max(600).optional()
14963
15433
  });
14964
15434
  /**
14965
15435
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15066,6 +15536,7 @@ var NcConditionDescriptorSchema = object({
15066
15536
  "occupancy",
15067
15537
  "audio",
15068
15538
  "deviceState",
15539
+ "scene",
15069
15540
  "systemEvent"
15070
15541
  ]),
15071
15542
  operator: _enum([
@@ -15471,7 +15942,87 @@ var MethodAccessSchema = _enum([
15471
15942
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15472
15943
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15473
15944
  var CapScopeSchema = _enum(["device", "system"]);
15474
- var TokenScopeSchema = discriminatedUnion("type", [
15945
+ /**
15946
+ * DeviceSelector (scope model v3 — 2026-08-12).
15947
+ *
15948
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
15949
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
15950
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
15951
+ * AFTER the grant was minted — no re-grant, no re-login.
15952
+ *
15953
+ * - `all` — every device in the deployment. The broad viewer/operator
15954
+ * lever without a `category` grant (a `category` grant also covers device
15955
+ * caps that carry no deviceId; `all` is specifically the device set).
15956
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
15957
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
15958
+ * is NOT covered until the grant is edited.
15959
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
15960
+ * DYNAMIC. A device that changes type, or a new device of the type,
15961
+ * re-resolves on the next request.
15962
+ * - `locations` — every device whose operator-assigned `location` label is
15963
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
15964
+ * null/unset location matches NO `locations` selector.
15965
+ */
15966
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
15967
+ object({ kind: literal("all") }),
15968
+ object({
15969
+ kind: literal("ids"),
15970
+ ids: array(number().int()).min(1)
15971
+ }),
15972
+ object({
15973
+ kind: literal("types"),
15974
+ types: array(_enum(DeviceType)).min(1)
15975
+ }),
15976
+ object({
15977
+ kind: literal("locations"),
15978
+ locations: array(string().min(1)).min(1)
15979
+ })
15980
+ ]);
15981
+ var DeviceTokenScopeSchema = object({
15982
+ type: literal("device"),
15983
+ /** The device SET this grant covers — resolved against the live fleet. */
15984
+ selector: DeviceSelectorSchema,
15985
+ access: array(MethodAccessSchema).min(1),
15986
+ /**
15987
+ * Whether a grant on a PARENT device transparently covers its accessory
15988
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
15989
+ * Direction is parent → children ONLY.
15990
+ *
15991
+ * Absent → the matcher DERIVES it from the access flavour: `view`
15992
+ * inherits (a camera viewer sees the camera's accessories), `create` /
15993
+ * `delete` do NOT (actuating/removing a child is an explicit act the
15994
+ * operator must grant on the child, not inherit from the parent). Set it
15995
+ * explicitly to override that default per grant.
15996
+ */
15997
+ includeLinked: boolean().optional()
15998
+ });
15999
+ /**
16000
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16001
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16002
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16003
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16004
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16005
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16006
+ * migration cannot reach a JWT already in a client's hands; parse-time
16007
+ * migration covers both without a flag day. No cast — the raw object is read
16008
+ * through `Reflect.get` (its static type is `unknown`).
16009
+ */
16010
+ function migrateLegacyTokenScope(raw) {
16011
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16012
+ if (Reflect.get(raw, "type") !== "device") return raw;
16013
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16014
+ const targets = Reflect.get(raw, "targets");
16015
+ if (!Array.isArray(targets)) return raw;
16016
+ return {
16017
+ type: "device",
16018
+ selector: {
16019
+ kind: "ids",
16020
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16021
+ },
16022
+ access: Reflect.get(raw, "access")
16023
+ };
16024
+ }
16025
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15475
16026
  object({
15476
16027
  type: literal("category"),
15477
16028
  target: CapScopeSchema,
@@ -15487,18 +16038,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15487
16038
  target: string(),
15488
16039
  access: array(MethodAccessSchema).min(1)
15489
16040
  }),
15490
- object({
15491
- type: literal("device"),
15492
- /**
15493
- * One or more deviceIds (serialised as strings for wire-format
15494
- * consistency with the rest of the union). Matcher accepts if
15495
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15496
- * of one scope-per-device when granting access to a set of cameras.
15497
- */
15498
- targets: array(string()).min(1),
15499
- access: array(MethodAccessSchema).min(1)
15500
- })
15501
- ]);
16041
+ DeviceTokenScopeSchema
16042
+ ]));
15502
16043
  object({
15503
16044
  id: string(),
15504
16045
  username: string(),
@@ -15815,7 +16356,7 @@ var TrackEnvelopeSchema = object({
15815
16356
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15816
16357
  * keeps every scalar the list surfaces actually render (ids, class(es),
15817
16358
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15818
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16359
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15819
16360
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15820
16361
  * `getTrack`. Mirrors the event-store `projection` convention
15821
16362
  * (`getObjectEvents` et al.).
@@ -15951,7 +16492,21 @@ union([literal(1), literal(2)]);
15951
16492
  var LabelAttributionSchema = object({
15952
16493
  stepId: string(),
15953
16494
  modelId: string().optional(),
15954
- decidedAt: number()
16495
+ decidedAt: number(),
16496
+ /**
16497
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16498
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16499
+ *
16500
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16501
+ * notification rule authored on "Gianluca" stopped matching the moment the
16502
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16503
+ * the thing that does not move, so it is what a rule matches on
16504
+ * (`NcConditions.identities`) and the text is what a human is shown.
16505
+ *
16506
+ * Absent when the label names no gallery row — a plate the OCR read but no
16507
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16508
+ */
16509
+ identityId: string().optional()
15955
16510
  });
15956
16511
  /**
15957
16512
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16088,6 +16643,28 @@ var TrackSchema = object({
16088
16643
  * `=== true` and render nothing otherwise, never infer "no face".
16089
16644
  */
16090
16645
  hasFace: boolean().optional(),
16646
+ /**
16647
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16648
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16649
+ * so the passage is tracked once and as a VEHICLE.
16650
+ *
16651
+ * It exists because the fold's record was dishonest. D34 and the code both
16652
+ * said "the person is not lost — it is reported so both entities stay on the
16653
+ * record"; in fact the pair went into a per-processor RAM field behind an
16654
+ * accessor nobody called, and every durable surface said `vehicle`, full
16655
+ * stop. This is the composition note that makes the row true.
16656
+ *
16657
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16658
+ * person" is not an answer to "what is this" — both label tiers would refuse
16659
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16660
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16661
+ * and a `person` rule still does not fire for someone cycling past.
16662
+ *
16663
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16664
+ * the column, and every hub that predates the field, omits it. Test
16665
+ * `=== true` and render nothing otherwise — never infer "no rider".
16666
+ */
16667
+ hasRider: boolean().optional(),
16091
16668
  ...TrackFlagFields,
16092
16669
  ...TrackRetrainFields
16093
16670
  });
@@ -16437,7 +17014,10 @@ var RecentTracksQueryInput = object({
16437
17014
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16438
17015
  cursor: string().optional(),
16439
17016
  /** See {@link TrackProjectionSchema}. Default `full`. */
16440
- projection: TrackProjectionSchema.optional()
17017
+ projection: TrackProjectionSchema.optional(),
17018
+ /** Include stationary-promoted rows (parked objects). Default false: the
17019
+ * feed lists passages; parking records live on the stationary registry. */
17020
+ includeStationary: boolean().optional()
16441
17021
  });
16442
17022
  var RecentTracksPageSchema = object({
16443
17023
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16655,7 +17235,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16655
17235
  zone: TrackZoneFilterSchema.optional(),
16656
17236
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16657
17237
  * compatible — omitting the field keeps today's exact behaviour). */
16658
- projection: TrackProjectionSchema.optional()
17238
+ projection: TrackProjectionSchema.optional(),
17239
+ /** Include stationary-promoted rows (parked objects handed to the
17240
+ * stationary registry). Default false: the timeline lists passages,
17241
+ * not parking records (operator decision, 2026-08-15). */
17242
+ includeStationary: boolean().optional()
16659
17243
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16660
17244
  kind: "mutation",
16661
17245
  auth: "admin"
@@ -16819,11 +17403,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16819
17403
  auth: "admin"
16820
17404
  }), method(object({
16821
17405
  eventId: string(),
16822
- kind: MediaFileKindEnum.optional()
17406
+ kind: MediaFileKindEnum.optional(),
17407
+ deviceId: number()
16823
17408
  }), array(MediaFileSchema).readonly()), method(object({
16824
17409
  trackId: string(),
16825
- kinds: array(MediaFileKindEnum).optional()
16826
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17410
+ kinds: array(MediaFileKindEnum).optional(),
17411
+ deviceId: number()
17412
+ }), array(MediaFileSchema).readonly()), method(object({
17413
+ trackId: string(),
17414
+ deviceId: number()
17415
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16827
17416
  kind: "mutation",
16828
17417
  auth: "admin"
16829
17418
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17523,6 +18112,17 @@ var maxSessionHoldMsField = {
17523
18112
  default: 12e4,
17524
18113
  step: 5e3
17525
18114
  };
18115
+ /**
18116
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18117
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18118
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18119
+ */
18120
+ var audioMotionWindowMsField = {
18121
+ min: 5e3,
18122
+ max: 6e5,
18123
+ default: 9e4,
18124
+ step: 5e3
18125
+ };
17526
18126
  var motionFpsField = {
17527
18127
  min: 1,
17528
18128
  max: 30,
@@ -17535,10 +18135,26 @@ var detectionFpsField = {
17535
18135
  default: 10,
17536
18136
  step: 1
17537
18137
  };
18138
+ /**
18139
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
18140
+ *
18141
+ * The recheck is now on by default (a parked car is invisible to occupancy
18142
+ * rules until the stationary registry has been rebuilt by motion, which after a
18143
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
18144
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
18145
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
18146
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
18147
+ *
18148
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
18149
+ * the host validates `attachCamera` against ITS copy of this schema, so a
18150
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
18151
+ * carrying the wider bound is installed everywhere. 300 is the widest value
18152
+ * that ships with an addon deploy.
18153
+ */
17538
18154
  var occupancyRecheckSecField = {
17539
18155
  min: 0,
17540
18156
  max: 300,
17541
- default: 30,
18157
+ default: 300,
17542
18158
  step: 5
17543
18159
  };
17544
18160
  var occupancyRecheckFramesField = {
@@ -17683,6 +18299,27 @@ var RunnerCameraConfigSchema = object({
17683
18299
  * resolved `CameraDetectionConfig`.
17684
18300
  */
17685
18301
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18302
+ /**
18303
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18304
+ * 'on-motion'` audio window, measured from the LAST motion event.
18305
+ *
18306
+ * This exists because the falling edge cannot be relied on. Camera-native
18307
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18308
+ * its email-push SMTP path both emit `detected: true` and never the
18309
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18310
+ * onboard-only camera a window that closed only on `detected: false` never
18311
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18312
+ * battery camera, the one failure mode the mode exists to prevent.
18313
+ *
18314
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18315
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18316
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18317
+ *
18318
+ * Not consumed by the runner: carried here so it shares the per-camera
18319
+ * device-settings surface with `motionCooldownMs`, exactly like
18320
+ * `maxSessionHoldMs`.
18321
+ */
18322
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17686
18323
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17687
18324
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17688
18325
  motionStreamId: string(),
@@ -17736,15 +18373,21 @@ var RunnerCameraConfigSchema = object({
17736
18373
  */
17737
18374
  onboardMotionDrivesAnalyzer: boolean().default(true),
17738
18375
  /**
17739
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17740
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17741
- * this is off by default because the recheck re-subscribes a detection session
17742
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17743
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18376
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18377
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17744
18378
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17745
18379
  * (and only render) when this is enabled.
17746
- */
17747
- occupancyRecheckEnabled: boolean().default(false),
18380
+ *
18381
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18382
+ * recheck re-subscribes a detection session every N seconds while `watching`
18383
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18384
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18385
+ * object is counted only while the stationary registry holds it, and the
18386
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18387
+ * to every occupancy rule until something moved in front of it. The churn is
18388
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
18389
+ */
18390
+ occupancyRecheckEnabled: boolean().default(true),
17748
18391
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17749
18392
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17750
18393
  /**
@@ -17772,7 +18415,7 @@ var RunnerCameraConfigSchema = object({
17772
18415
  */
17773
18416
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17774
18417
  });
17775
- 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;
18418
+ 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;
17776
18419
  /**
17777
18420
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17778
18421
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18788,7 +19431,16 @@ targets: array(object({
18788
19431
  /** A sleeping battery camera: the frame is deliberately stale and will
18789
19432
  * NOT refresh in the background. A surface should say so rather than
18790
19433
  * present it as current. */
18791
- sleeping: boolean()
19434
+ sleeping: boolean(),
19435
+ /** Current device state rendered over the cached frame. State images
19436
+ * remain authoritative even when their photographic background is
19437
+ * old; null means the link must carry a current camera frame. */
19438
+ stateReason: _enum([
19439
+ "disabled",
19440
+ "sleeping",
19441
+ "unreachable",
19442
+ "waking"
19443
+ ]).nullable()
18792
19444
  })));
18793
19445
  /**
18794
19446
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20442,6 +21094,25 @@ var BatteryStatusSchema = object({
20442
21094
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20443
21095
  lastUpdated: number(),
20444
21096
  /**
21097
+ * Ms epoch of the last time the device PROVED it was reachable — a
21098
+ * completed firmware round-trip, an observed wake, or an inbound push
21099
+ * (firmware event, email). `0`/absent = never since this slice was born.
21100
+ *
21101
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21102
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21103
+ * for the radio, because a poll that confirms reachability is the same
21104
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21105
+ * single derivation every consumer must use; no surface computes its own.
21106
+ *
21107
+ * It is deliberately NOT a clock in the
21108
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21109
+ * observation itself, and it is the only thing a 30-hour silence is
21110
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21111
+ * Reolink provider) so a value that means "recently" cannot cost a
21112
+ * SQLite commit per round-trip.
21113
+ */
21114
+ lastContactAt: number().optional(),
21115
+ /**
20445
21116
  * True when the source is a BINARY low-battery indicator (HA
20446
21117
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20447
21118
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22706,54 +23377,139 @@ var TalkAudioCodecSchema = _enum([
22706
23377
  "g711ulaw",
22707
23378
  "g711alaw"
22708
23379
  ]);
22709
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22710
- sessionId: string(),
22711
- sdpOffer: string()
22712
- }), {
22713
- kind: "mutation",
22714
- auth: "admin"
22715
- }), method(object({
22716
- deviceId: number(),
22717
- sessionId: string(),
22718
- sdpAnswer: string()
22719
- }), _void(), {
22720
- kind: "mutation",
22721
- auth: "admin"
22722
- }), method(object({
22723
- deviceId: number(),
22724
- sessionId: string()
22725
- }), _void(), {
22726
- kind: "mutation",
22727
- auth: "admin"
22728
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22729
- kind: "mutation",
22730
- auth: "admin"
22731
- }), method(object({
22732
- deviceId: number(),
22733
- /** Audio bytes for ONE frame, base64-encoded so the payload
22734
- * survives tRPC JSON serialization. */
22735
- audioBase64: string(),
22736
- /** Wire codec of the payload. Omit to let the provider default
22737
- * to its native expected format (s16le @ provider-native rate,
22738
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22739
- codec: TalkAudioCodecSchema.optional(),
22740
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22741
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22742
- sampleRate: number().int().positive().optional(),
22743
- /** Channel count. Default 1. */
22744
- channels: number().int().positive().optional(),
22745
- /** Sequence number for ordering / dropping out-of-order frames. */
22746
- sequenceNumber: number().int()
22747
- }), object({ accepted: boolean() }), {
22748
- kind: "mutation",
22749
- auth: "admin"
22750
- }), method(object({ deviceId: number() }), _void(), {
22751
- kind: "mutation",
22752
- auth: "admin"
22753
- }), object({
22754
- deviceId: number(),
22755
- status: IntercomStatusSchema
22756
- });
23380
+ var intercomCapability = {
23381
+ name: "intercom",
23382
+ scope: "device",
23383
+ deviceNative: true,
23384
+ mode: "singleton",
23385
+ deviceTypes: [DeviceType.Camera],
23386
+ methods: {
23387
+ /**
23388
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23389
+ * offer with a single sendonly audio m-line the client answers
23390
+ * (client → server direction). The server wakes battery cams
23391
+ * transparently before opening the upstream talk channel.
23392
+ */
23393
+ startSession: method(object({ deviceId: number() }), object({
23394
+ sessionId: string(),
23395
+ sdpOffer: string()
23396
+ }), {
23397
+ kind: "mutation",
23398
+ auth: "admin"
23399
+ }),
23400
+ handleAnswer: method(object({
23401
+ deviceId: number(),
23402
+ sessionId: string(),
23403
+ sdpAnswer: string()
23404
+ }), _void(), {
23405
+ kind: "mutation",
23406
+ auth: "admin"
23407
+ }),
23408
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23409
+ stopSession: method(object({
23410
+ deviceId: number(),
23411
+ sessionId: string()
23412
+ }), _void(), {
23413
+ kind: "mutation",
23414
+ auth: "admin"
23415
+ }),
23416
+ /**
23417
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23418
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23419
+ * harnesses) that already have decoded PCM frames and just need a
23420
+ * direct path onto the camera's talk channel. Mutually exclusive
23421
+ * with `startSession` (an active WebRTC session must be stopped
23422
+ * before a raw-PCM session can be opened on the same device, and
23423
+ * vice versa).
23424
+ */
23425
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23426
+ kind: "mutation",
23427
+ auth: "admin"
23428
+ }),
23429
+ /**
23430
+ * Push one chunk of talk-back audio onto the active talk session.
23431
+ * The cap is codec-agnostic: the caller declares (or omits) the
23432
+ * wire format via `codec`; the provider decides between passthrough
23433
+ * (when the wire codec matches the camera's native talk channel),
23434
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23435
+ *
23436
+ * Callers do NOT need to know the camera's wire format or sample
23437
+ * rate — that information lives entirely inside the provider.
23438
+ *
23439
+ * Sequence numbers MUST be monotonic per talk session; older frames
23440
+ * arriving after newer ones are dropped to avoid smearing the
23441
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23442
+ * predictor would corrupt with re-ordering).
23443
+ */
23444
+ pushTalkAudio: method(object({
23445
+ deviceId: number(),
23446
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23447
+ * survives tRPC JSON serialization. */
23448
+ audioBase64: string(),
23449
+ /** Wire codec of the payload. Omit to let the provider default
23450
+ * to its native expected format (s16le @ provider-native rate,
23451
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23452
+ codec: TalkAudioCodecSchema.optional(),
23453
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23454
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23455
+ sampleRate: number().int().positive().optional(),
23456
+ /** Channel count. Default 1. */
23457
+ channels: number().int().positive().optional(),
23458
+ /** Sequence number for ordering / dropping out-of-order frames. */
23459
+ sequenceNumber: number().int()
23460
+ }), object({ accepted: boolean() }), {
23461
+ kind: "mutation",
23462
+ auth: "admin"
23463
+ }),
23464
+ /** Close the raw-PCM talk session. Idempotent. */
23465
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23466
+ kind: "mutation",
23467
+ auth: "admin"
23468
+ })
23469
+ },
23470
+ events: { onStatusChanged: { data: object({
23471
+ deviceId: number(),
23472
+ status: IntercomStatusSchema
23473
+ }) } },
23474
+ status: {
23475
+ schema: IntercomStatusSchema,
23476
+ kind: "command-driven"
23477
+ },
23478
+ /**
23479
+ * Runtime-state slice — mirrored by the kernel.
23480
+ *
23481
+ * The cap declared `status` and nothing else, so the only two sources an
23482
+ * exporter has for a value — the `device.state-changed` slice event and the
23483
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23484
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23485
+ * have been published and never received a value, which is the defect the
23486
+ * export's two classification tables exist to prevent (177 of them, once), so
23487
+ * `intercom` was excluded rather than exported.
23488
+ *
23489
+ * The shape is the status shape: there is exactly one truth about talk-back
23490
+ * and duplicating it into a second schema is how two halves of one capability
23491
+ * come to disagree. Providers write it through
23492
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23493
+ * and close a session, and seed it at registration so the slice exists before
23494
+ * the first session rather than after it.
23495
+ *
23496
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23497
+ * session handle, so a session torn down by a transport death that never
23498
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23499
+ * session or the next restart. That is why the slice is `session` and not
23500
+ * `restored` — a restart must never restore "talking".
23501
+ */
23502
+ runtimeState: IntercomStatusSchema,
23503
+ /**
23504
+ * Runtime-state durability: **session** — `talking` describes a live audio
23505
+ * session, which by definition does not survive the process that held it.
23506
+ * Restoring it would publish a camera as talking to nobody.
23507
+ *
23508
+ * See `RuntimeStateDurability`. Enforced by
23509
+ * `scripts/check-runtime-state-durability.ts`.
23510
+ */
23511
+ durability: "session"
23512
+ };
22757
23513
  /**
22758
23514
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22759
23515
  * with a mowing lifecycle plus a dock action.
@@ -25450,7 +26206,7 @@ method(object({
25450
26206
  toMs: number()
25451
26207
  }), RecordingAvailabilitySchema, {
25452
26208
  kind: "query",
25453
- auth: "admin"
26209
+ auth: "protected"
25454
26210
  }), method(object({
25455
26211
  deviceId: number(),
25456
26212
  fromMs: number(),
@@ -25458,14 +26214,14 @@ method(object({
25458
26214
  tzOffsetMinutes: number()
25459
26215
  }), RecordingDaysSchema, {
25460
26216
  kind: "query",
25461
- auth: "admin"
26217
+ auth: "protected"
25462
26218
  }), method(object({
25463
26219
  deviceId: number(),
25464
26220
  fromMs: number(),
25465
26221
  toMs: number()
25466
26222
  }), RecordingManifestSchema, {
25467
26223
  kind: "query",
25468
- auth: "admin"
26224
+ auth: "protected"
25469
26225
  }), method(object({}), RecordingStorageUsageSchema, {
25470
26226
  kind: "query",
25471
26227
  auth: "admin"
@@ -25755,14 +26511,77 @@ method(object({
25755
26511
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25756
26512
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25757
26513
  *
25758
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
25759
- * derives the device-detail contribution; the provider carries NO hand-written
25760
- * settings-contribution methods. `status.kind:'push'` — the engine pushes on
25761
- * every hysteresis flip / availability change; consumers never poll.
25762
- */
25763
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25764
- * be added without a wire break (matching falls back to any-condition refs). */
26514
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26515
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26516
+ * for the thing: a scene is a standing question about the property ("is the bin
26517
+ * still out"), and the operator's question is "which of my scenes have tripped",
26518
+ * across every camera at once — not "what does camera 617 think". Buried one
26519
+ * camera deep it also could not be found. The surface is now a top-level admin
26520
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26521
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26522
+ *
26523
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26524
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26525
+ * directions, so a registration nobody declares fails exactly as loudly as a
26526
+ * declaration nobody registers. The editor is imported directly by the page.
26527
+ *
26528
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26529
+ * availability change; consumers never poll.
26530
+ */
26531
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26532
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26533
+ * Open by design so more can be added without a wire break.
26534
+ *
26535
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26536
+ * not comparable, so "I have never seen this scene in this light" is reported
26537
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26538
+ * collapses the cosine and would latch a false alarm every single night. */
25765
26539
  var SceneConditionSchema = string();
26540
+ /**
26541
+ * What a scene does when the CURRENT light has no reference of its own.
26542
+ *
26543
+ * The lighting variants are not equally likely to exist. Almost every operator
26544
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26545
+ * scene that is only ever going to be asked about a daytime question ("is the
26546
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26547
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26548
+ * working without it rather than degrading into a permanent complaint.
26549
+ *
26550
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26551
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26552
+ * last covered light left it at, the latch is untouched, and the hysteresis
26553
+ * run is neither spent nor cleared. The scene resumes by itself at first
26554
+ * light. This is the only behaviour under which "I never captured IR" is a
26555
+ * configuration choice instead of a nightly fault.
26556
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26557
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26558
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26559
+ * cross-condition cosines are not comparable, so a day reference against a
26560
+ * true IR frame collapses and the scene reports a theft at 21:40.
26561
+ *
26562
+ * Never applies when the scene has NO comparable reference at all — that is
26563
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26564
+ * there would hide a scene the operator never finished setting up.
26565
+ */
26566
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26567
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26568
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26569
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26570
+ * and never counts toward hysteresis in either direction. */
26571
+ var SceneVerdictSchema = _enum([
26572
+ "matched",
26573
+ "diverged",
26574
+ "unknown"
26575
+ ]);
26576
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26577
+ * silence that reads as "nothing has happened". */
26578
+ var SceneUnavailableSchema = _enum([
26579
+ "no-reference-for-condition",
26580
+ "view-shifted",
26581
+ "no-vision-profile",
26582
+ "encoder-model-changed",
26583
+ "no-snapshot"
26584
+ ]);
25766
26585
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25767
26586
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25768
26587
  var SceneReferenceSchema = object({
@@ -25770,7 +26589,14 @@ var SceneReferenceSchema = object({
25770
26589
  modelId: string(),
25771
26590
  condition: SceneConditionSchema,
25772
26591
  capturedAt: number(),
25773
- thumbnailMediaId: string().optional()
26592
+ thumbnailMediaId: string().optional(),
26593
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26594
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26595
+ * normalized rect frame a different piece of world, and the scene would
26596
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26597
+ * when hysteresis is about to flip — one extra encode per candidate
26598
+ * transition, not per poll. */
26599
+ anchorEmbedding: array(number()).optional()
25774
26600
  });
25775
26601
  var SceneMonitorStateSchema = object({
25776
26602
  id: string(),
@@ -25792,6 +26618,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25792
26618
  profileId: string().optional(),
25793
26619
  hysteresisCount: number().int().positive()
25794
26620
  })]);
26621
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26622
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26623
+ * out in silence rather than reporting a fault every night. */
26624
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26625
+ /**
26626
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26627
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26628
+ *
26629
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26630
+ * fail-open: a notification suppressed is the worse error there, but a vision
26631
+ * model that timed out has not told us the bin is gone, and a latch is a
26632
+ * stateful claim that costs the operator a trip to reset.
26633
+ */
26634
+ var SceneConfirmSchema = object({
26635
+ enabled: boolean().default(false),
26636
+ prompt: string().min(1).max(1e3),
26637
+ profileId: string().optional(),
26638
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26639
+ maxImagePx: number().int().min(64).max(2048).default(448),
26640
+ /** What a timeout / unavailable model means for the PENDING flip. */
26641
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26642
+ });
25795
26643
  var SceneMonitorSchema = object({
25796
26644
  id: string(),
25797
26645
  label: string(),
@@ -25810,7 +26658,56 @@ var SceneMonitorSchema = object({
25810
26658
  lastConfidence: number().nullable(),
25811
26659
  currentCondition: SceneConditionSchema.nullable(),
25812
26660
  availability: _enum(["ok", "unavailable"]),
25813
- unavailableReason: string().nullable()
26661
+ unavailableReason: string().nullable(),
26662
+ /** Which state is "the initial screen". `null` until the first capture. */
26663
+ baselineStateId: string().nullable(),
26664
+ /** Which boolean drives notification rules and any export. */
26665
+ emit: _enum(["latched", "live"]).default("latched"),
26666
+ /** Live: does the region match the baseline RIGHT NOW. */
26667
+ verdict: SceneVerdictSchema,
26668
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26669
+ latched: boolean(),
26670
+ /** Last reset (or creation). */
26671
+ armedAt: number(),
26672
+ divergedAt: number().nullable(),
26673
+ restoredAt: number().nullable(),
26674
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26675
+ * during the window DISCARDS the observation — a car pulling up in front of
26676
+ * the bin must not be able to spend hysteresis credit. */
26677
+ quietSeconds: number().int().min(0).max(3600).default(60),
26678
+ /** An observation only advances the pending count when it is at least this
26679
+ * far from the previously counted one, so N agreeing checks span real time
26680
+ * rather than N adjacent polls inside one occlusion. */
26681
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26682
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26683
+ confirm: SceneConfirmSchema.optional(),
26684
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26685
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26686
+ /** Clear the latch on its own when the scene matches again? Default false —
26687
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26688
+ * automation can react to the bin coming back without the operator's own
26689
+ * alarm silently clearing itself. */
26690
+ autoRestore: boolean().default(false),
26691
+ /** What to do when the current light has no reference of its own. See
26692
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26693
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26694
+ /**
26695
+ * The light whose checks are currently being SAT OUT under
26696
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26697
+ *
26698
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26699
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26700
+ * nothing captured in this light"* in the same calm voice as the coverage
26701
+ * line, because the alternative is a scene that silently stops answering
26702
+ * after sunset with nothing anywhere saying why. A skipped check must never
26703
+ * read as a broken one.
26704
+ */
26705
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26706
+ /** Named cause when `verdict === 'unknown'`. */
26707
+ unavailable: SceneUnavailableSchema.nullable(),
26708
+ /** Conditions that have at least one comparable reference — the coverage line
26709
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26710
+ coveredConditions: array(SceneConditionSchema)
25814
26711
  });
25815
26712
  var SceneMonitorStatusSchema = object({
25816
26713
  monitors: array(SceneMonitorSchema),
@@ -25823,12 +26720,6 @@ var sceneMonitorCapability = {
25823
26720
  kind: "wrapper",
25824
26721
  defaultActive: true,
25825
26722
  deviceTypes: [DeviceType.Camera],
25826
- deviceConfig: { ui: {
25827
- kind: "widget",
25828
- widgetId: "host/scene-monitor-editor",
25829
- tab: "scenes",
25830
- label: "Scenes"
25831
- } },
25832
26723
  methods: {
25833
26724
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25834
26725
  createScene: method(object({
@@ -25859,7 +26750,15 @@ var sceneMonitorCapability = {
25859
26750
  "both"
25860
26751
  ]).optional(),
25861
26752
  checkIntervalSec: number().optional(),
25862
- check: SceneCheckSchema.optional()
26753
+ check: SceneCheckSchema.optional(),
26754
+ emit: _enum(["latched", "live"]).optional(),
26755
+ quietSeconds: number().int().min(0).max(3600).optional(),
26756
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26757
+ anchorThreshold: number().min(0).max(1).optional(),
26758
+ autoRestore: boolean().optional(),
26759
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26760
+ /** `null` clears the vision-model adjudicator. */
26761
+ confirm: SceneConfirmSchema.nullable().optional()
25863
26762
  })
25864
26763
  }), _void(), {
25865
26764
  kind: "mutation",
@@ -25900,6 +26799,26 @@ var sceneMonitorCapability = {
25900
26799
  }), _void(), {
25901
26800
  kind: "mutation",
25902
26801
  auth: "admin"
26802
+ }),
26803
+ /**
26804
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26805
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26806
+ * "reset" in the operator's head means *this is the new normal*, and
26807
+ * re-capture is what makes the feature self-healing against slow drift
26808
+ * instead of failing silently weeks later.
26809
+ *
26810
+ * Reachable from three surfaces on this one mutation: the scene card, a
26811
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26812
+ * no new Notification-Center code at all), and tRPC for scripts.
26813
+ */
26814
+ resetScene: method(object({
26815
+ deviceId: number(),
26816
+ monitorId: string(),
26817
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26818
+ recapture: boolean().optional()
26819
+ }), _void(), {
26820
+ kind: "mutation",
26821
+ auth: "admin"
25903
26822
  })
25904
26823
  },
25905
26824
  status: {
@@ -26136,7 +27055,70 @@ var CamStreamDescriptorSchema = object({
26136
27055
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26137
27056
  metadata: record(string(), unknown()).optional()
26138
27057
  });
26139
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27058
+ /**
27059
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27060
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27061
+ * set of stream descriptors it can offer for the device, synchronously, so the
27062
+ * broker can reconcile its registry against the authoritative provider state.
27063
+ */
27064
+ /**
27065
+ * The catalog as a DURABLE fact rather than a live answer.
27066
+ *
27067
+ * A battery camera's descriptors are profile-stable — they change when the
27068
+ * operator rewrites an encoder profile, not minute to minute — but building
27069
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27070
+ * provider is allowed to build them exactly once per profile and must serve
27071
+ * every later pull from a cache.
27072
+ *
27073
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27074
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27075
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27076
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27077
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27078
+ * which on a battery cam is most of the day. The camera was fine. The stream
27079
+ * was unreachable because the process had forgotten what the camera offers.
27080
+ *
27081
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27082
+ * declared collection, with the same `restored` durability `battery` uses for
27083
+ * the same reason: the last known value is the only value there is while the
27084
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27085
+ * is the DIAL that wakes a camera, never the catalog (D173).
27086
+ */
27087
+ var StreamCatalogStateSchema = object({
27088
+ /** The descriptors as last built from a real camera response. Never a guess:
27089
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27090
+ * one the camera itself once produced. */
27091
+ descriptors: array(CamStreamDescriptorSchema),
27092
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27093
+ * path decide whether the camera's own awake window is worth spending on a
27094
+ * re-read. */
27095
+ lastFetchedAt: number()
27096
+ });
27097
+ var streamCatalogCapability = {
27098
+ name: "stream-catalog",
27099
+ scope: "device",
27100
+ deviceNative: true,
27101
+ mode: "singleton",
27102
+ deviceTypes: [DeviceType.Camera],
27103
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27104
+ runtimeState: StreamCatalogStateSchema,
27105
+ /**
27106
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27107
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27108
+ * camera that cannot be watched at all until it happens to wake.
27109
+ *
27110
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27111
+ * build, and a build only runs when there is no cached copy (or the copy is
27112
+ * a day old and the camera is awake anyway).
27113
+ *
27114
+ * See `RuntimeStateDurability`. Enforced by
27115
+ * `scripts/check-runtime-state-durability.ts`.
27116
+ */
27117
+ durability: "restored",
27118
+ /** Clock field: written, but excluded from the compare that decides whether
27119
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27120
+ volatileStateFields: ["lastFetchedAt"]
27121
+ };
26140
27122
  /** One of the camera's stream profiles. */
26141
27123
  var StreamProfileSchema = _enum([
26142
27124
  "main",
@@ -26390,12 +27372,64 @@ var NetworkAddressSchema = object({
26390
27372
  family: string(),
26391
27373
  internal: boolean()
26392
27374
  });
27375
+ /**
27376
+ * Provenance of the site coordinates, and the whole reason this is not just two
27377
+ * numbers.
27378
+ *
27379
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27380
+ * nothing overwrites it.
27381
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27382
+ * default that is right to a few kilometres beats the coarse UTC clock split
27383
+ * the sun-times consumers otherwise fall back to.
27384
+ *
27385
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27386
+ * own input will eventually trust the guess.
27387
+ */
27388
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27389
+ /**
27390
+ * The read shape: the location plus the honest state of the one-shot derivation.
27391
+ *
27392
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27393
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27394
+ * failed; the hub will NOT try again on its own — the fallback is declared
27395
+ * (consumers degrade to their own last resort) and the operator either types the
27396
+ * coordinates or presses detect.
27397
+ */
27398
+ var SiteLocationStatusSchema = object({
27399
+ location: object({
27400
+ /** WGS84 decimal degrees. */
27401
+ latitude: number().min(-90).max(90),
27402
+ longitude: number().min(-180).max(180),
27403
+ source: SiteLocationSourceSchema,
27404
+ /** Epoch ms the value was last written. */
27405
+ updatedAt: number(),
27406
+ /**
27407
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27408
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27409
+ */
27410
+ label: string().optional()
27411
+ }).nullable(),
27412
+ derivationAttemptedAt: number().nullable(),
27413
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27414
+ derivationError: string().nullable()
27415
+ });
27416
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27417
+ var SetSiteLocationInputSchema = object({
27418
+ latitude: number().min(-90).max(90),
27419
+ longitude: number().min(-180).max(180)
27420
+ }).nullable();
26393
27421
  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(), {
26394
27422
  kind: "mutation",
26395
27423
  auth: "admin"
26396
27424
  }), method(_void(), _void(), {
26397
27425
  kind: "mutation",
26398
27426
  auth: "admin"
27427
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27428
+ kind: "mutation",
27429
+ auth: "admin"
27430
+ }), method(_void(), SiteLocationStatusSchema, {
27431
+ kind: "mutation",
27432
+ auth: "admin"
26399
27433
  });
26400
27434
  /**
26401
27435
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27715,6 +28749,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27715
28749
  humiditySensor: humiditySensorCapability,
27716
28750
  image: imageCapability,
27717
28751
  imageSettings: imageSettingsCapability,
28752
+ intercom: intercomCapability,
27718
28753
  lawnMowerControl: lawnMowerControlCapability,
27719
28754
  lockControl: lockControlCapability,
27720
28755
  mediaPlayer: mediaPlayerCapability,
@@ -27733,6 +28768,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27733
28768
  sceneMonitor: sceneMonitorCapability,
27734
28769
  scriptRunner: scriptRunnerCapability,
27735
28770
  smoke: smokeCapability,
28771
+ streamCatalog: streamCatalogCapability,
27736
28772
  streamParams: streamParamsCapability,
27737
28773
  switch: switchCapability,
27738
28774
  tamper: tamperCapability,
@@ -28386,6 +29422,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28386
29422
  labels: ["probe not implemented"]
28387
29423
  };
28388
29424
  }
29425
+ /**
29426
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29427
+ *
29428
+ * Four covers the fleets this ships to without turning a boot into a burst a
29429
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29430
+ * session with a serial command channel (a Baichuan hub, an NVR that
29431
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29432
+ */
29433
+ restoreConcurrency = 4;
28389
29434
  async restoreDevices(savedDevices) {
28390
29435
  await this.onRestoreDevices(savedDevices);
28391
29436
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28417,15 +29462,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28417
29462
  */
28418
29463
  async onRestoreDevices(savedDevices) {
28419
29464
  const restored = /* @__PURE__ */ new Set();
28420
- for (const saved of savedDevices) {
28421
- if (saved.parentDeviceId !== null) continue;
29465
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29466
+ const restoreOne = async (saved) => {
28422
29467
  const Class = this.deviceClasses[saved.type];
28423
29468
  if (!Class) {
28424
29469
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28425
29470
  tags: { stableId: saved.stableId },
28426
29471
  meta: { type: saved.type }
28427
29472
  });
28428
- continue;
29473
+ return;
28429
29474
  }
28430
29475
  try {
28431
29476
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28439,7 +29484,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28439
29484
  }
28440
29485
  });
28441
29486
  }
28442
- }
29487
+ };
29488
+ let nextTopLevel = 0;
29489
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29490
+ for (;;) {
29491
+ const saved = topLevel[nextTopLevel++];
29492
+ if (saved === void 0) return;
29493
+ await restoreOne(saved);
29494
+ }
29495
+ }));
28443
29496
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28444
29497
  for (const saved of childRows) {
28445
29498
  const Class = this.deviceClasses[saved.type];
@@ -30530,6 +31583,12 @@ Object.freeze({
30530
31583
  addonId: null,
30531
31584
  access: "create"
30532
31585
  },
31586
+ "llm.cancel": {
31587
+ capName: "llm",
31588
+ capScope: "system",
31589
+ addonId: null,
31590
+ access: "create"
31591
+ },
30533
31592
  "llm.deleteModel": {
30534
31593
  capName: "llm",
30535
31594
  capScope: "system",
@@ -30614,6 +31673,12 @@ Object.freeze({
30614
31673
  addonId: null,
30615
31674
  access: "view"
30616
31675
  },
31676
+ "llm.resolveModelRef": {
31677
+ capName: "llm",
31678
+ capScope: "system",
31679
+ addonId: null,
31680
+ access: "create"
31681
+ },
30617
31682
  "llm.setDefault": {
30618
31683
  capName: "llm",
30619
31684
  capScope: "system",
@@ -32780,6 +33845,12 @@ Object.freeze({
32780
33845
  addonId: null,
32781
33846
  access: "create"
32782
33847
  },
33848
+ "sceneMonitor.resetScene": {
33849
+ capName: "scene-monitor",
33850
+ capScope: "device",
33851
+ addonId: null,
33852
+ access: "delete"
33853
+ },
32783
33854
  "sceneMonitor.updateScene": {
32784
33855
  capName: "scene-monitor",
32785
33856
  capScope: "device",
@@ -33458,6 +34529,12 @@ Object.freeze({
33458
34529
  addonId: null,
33459
34530
  access: "create"
33460
34531
  },
34532
+ "system.detectSiteLocation": {
34533
+ capName: "system",
34534
+ capScope: "system",
34535
+ addonId: null,
34536
+ access: "create"
34537
+ },
33461
34538
  "system.featureFlags": {
33462
34539
  capName: "system",
33463
34540
  capScope: "system",
@@ -33476,6 +34553,12 @@ Object.freeze({
33476
34553
  addonId: null,
33477
34554
  access: "view"
33478
34555
  },
34556
+ "system.getSiteLocation": {
34557
+ capName: "system",
34558
+ capScope: "system",
34559
+ addonId: null,
34560
+ access: "view"
34561
+ },
33479
34562
  "system.health": {
33480
34563
  capName: "system",
33481
34564
  capScope: "system",
@@ -33500,6 +34583,12 @@ Object.freeze({
33500
34583
  addonId: null,
33501
34584
  access: "create"
33502
34585
  },
34586
+ "system.setSiteLocation": {
34587
+ capName: "system",
34588
+ capScope: "system",
34589
+ addonId: null,
34590
+ access: "create"
34591
+ },
33503
34592
  "terminalSession.adoptLegacyMonitor": {
33504
34593
  capName: "terminal-session",
33505
34594
  capScope: "system",
@@ -34071,6 +35160,1704 @@ Object.freeze({
34071
35160
  access: "create"
34072
35161
  }
34073
35162
  });
35163
+ Object.freeze({
35164
+ "accessories.setChildHidden": [{
35165
+ name: "childDeviceId",
35166
+ form: "single",
35167
+ optional: false
35168
+ }, {
35169
+ name: "deviceId",
35170
+ form: "single",
35171
+ optional: false
35172
+ }],
35173
+ "addonSettings.getDeviceSettings": [{
35174
+ name: "deviceId",
35175
+ form: "single",
35176
+ optional: false
35177
+ }],
35178
+ "addonSettings.updateDeviceSettings": [{
35179
+ name: "deviceId",
35180
+ form: "single",
35181
+ optional: false
35182
+ }],
35183
+ "alarmPanel.arm": [{
35184
+ name: "deviceId",
35185
+ form: "single",
35186
+ optional: false
35187
+ }],
35188
+ "alarmPanel.disarm": [{
35189
+ name: "deviceId",
35190
+ form: "single",
35191
+ optional: false
35192
+ }],
35193
+ "alarmPanel.trigger": [{
35194
+ name: "deviceId",
35195
+ form: "single",
35196
+ optional: false
35197
+ }],
35198
+ "audioAnalysis.resolveDeviceSettings": [{
35199
+ name: "deviceId",
35200
+ form: "single",
35201
+ optional: false
35202
+ }],
35203
+ "audioAnalyzer.classify": [{
35204
+ name: "deviceId",
35205
+ form: "single",
35206
+ optional: true
35207
+ }],
35208
+ "audioMetrics.getCurrentSnapshot": [{
35209
+ name: "deviceId",
35210
+ form: "single",
35211
+ optional: false
35212
+ }],
35213
+ "audioMetrics.getHistory": [{
35214
+ name: "deviceId",
35215
+ form: "single",
35216
+ optional: false
35217
+ }],
35218
+ "automationControl.disable": [{
35219
+ name: "deviceId",
35220
+ form: "single",
35221
+ optional: false
35222
+ }],
35223
+ "automationControl.enable": [{
35224
+ name: "deviceId",
35225
+ form: "single",
35226
+ optional: false
35227
+ }],
35228
+ "automationControl.trigger": [{
35229
+ name: "deviceId",
35230
+ form: "single",
35231
+ optional: false
35232
+ }],
35233
+ "battery.wakeForStream": [{
35234
+ name: "deviceId",
35235
+ form: "single",
35236
+ optional: false
35237
+ }],
35238
+ "brightness.setBrightness": [{
35239
+ name: "deviceId",
35240
+ form: "single",
35241
+ optional: false
35242
+ }],
35243
+ "button.press": [{
35244
+ name: "deviceId",
35245
+ form: "single",
35246
+ optional: false
35247
+ }],
35248
+ "cameraCredentials.getCredentials": [{
35249
+ name: "deviceId",
35250
+ form: "single",
35251
+ optional: false
35252
+ }],
35253
+ "cameraStreams.getBrokerStreams": [{
35254
+ name: "deviceId",
35255
+ form: "single",
35256
+ optional: false
35257
+ }],
35258
+ "cameraStreams.getCameraStreams": [{
35259
+ name: "deviceId",
35260
+ form: "single",
35261
+ optional: false
35262
+ }],
35263
+ "cameraStreams.getProfileRtspEntries": [{
35264
+ name: "deviceId",
35265
+ form: "single",
35266
+ optional: false
35267
+ }],
35268
+ "cameraStreams.getRtspEntries": [{
35269
+ name: "deviceId",
35270
+ form: "single",
35271
+ optional: false
35272
+ }],
35273
+ "cameraStreams.pickStream": [{
35274
+ name: "deviceId",
35275
+ form: "single",
35276
+ optional: false
35277
+ }],
35278
+ "climateControl.setFanMode": [{
35279
+ name: "deviceId",
35280
+ form: "single",
35281
+ optional: false
35282
+ }],
35283
+ "climateControl.setMode": [{
35284
+ name: "deviceId",
35285
+ form: "single",
35286
+ optional: false
35287
+ }],
35288
+ "climateControl.setPreset": [{
35289
+ name: "deviceId",
35290
+ form: "single",
35291
+ optional: false
35292
+ }],
35293
+ "climateControl.setSwingHorizontal": [{
35294
+ name: "deviceId",
35295
+ form: "single",
35296
+ optional: false
35297
+ }],
35298
+ "climateControl.setSwingVertical": [{
35299
+ name: "deviceId",
35300
+ form: "single",
35301
+ optional: false
35302
+ }],
35303
+ "climateControl.setTarget": [{
35304
+ name: "deviceId",
35305
+ form: "single",
35306
+ optional: false
35307
+ }],
35308
+ "climateControl.setTargetHumidity": [{
35309
+ name: "deviceId",
35310
+ form: "single",
35311
+ optional: false
35312
+ }],
35313
+ "climateControl.setTargetRange": [{
35314
+ name: "deviceId",
35315
+ form: "single",
35316
+ optional: false
35317
+ }],
35318
+ "color.setColor": [{
35319
+ name: "deviceId",
35320
+ form: "single",
35321
+ optional: false
35322
+ }],
35323
+ "consumables.reset": [{
35324
+ name: "deviceId",
35325
+ form: "single",
35326
+ optional: false
35327
+ }],
35328
+ "control.setValue": [{
35329
+ name: "deviceId",
35330
+ form: "single",
35331
+ optional: false
35332
+ }],
35333
+ "cover.close": [{
35334
+ name: "deviceId",
35335
+ form: "single",
35336
+ optional: false
35337
+ }],
35338
+ "cover.open": [{
35339
+ name: "deviceId",
35340
+ form: "single",
35341
+ optional: false
35342
+ }],
35343
+ "cover.setPosition": [{
35344
+ name: "deviceId",
35345
+ form: "single",
35346
+ optional: false
35347
+ }],
35348
+ "cover.setTiltPosition": [{
35349
+ name: "deviceId",
35350
+ form: "single",
35351
+ optional: false
35352
+ }],
35353
+ "cover.stop": [{
35354
+ name: "deviceId",
35355
+ form: "single",
35356
+ optional: false
35357
+ }],
35358
+ "dayNight.getOptions": [{
35359
+ name: "deviceId",
35360
+ form: "single",
35361
+ optional: false
35362
+ }],
35363
+ "dayNight.setSettings": [{
35364
+ name: "deviceId",
35365
+ form: "single",
35366
+ optional: false
35367
+ }],
35368
+ "decoder.createSession": [{
35369
+ name: "deviceId",
35370
+ form: "single",
35371
+ optional: true
35372
+ }],
35373
+ "deviceAdoption.release": [{
35374
+ name: "camDeviceId",
35375
+ form: "single",
35376
+ optional: false
35377
+ }],
35378
+ "deviceAdoption.resync": [{
35379
+ name: "camDeviceId",
35380
+ form: "single",
35381
+ optional: false
35382
+ }],
35383
+ "deviceDiscovery.adoptDevice": [{
35384
+ name: "deviceId",
35385
+ form: "single",
35386
+ optional: false
35387
+ }],
35388
+ "deviceDiscovery.listDiscovered": [{
35389
+ name: "deviceId",
35390
+ form: "single",
35391
+ optional: false
35392
+ }],
35393
+ "deviceDiscovery.refreshDiscovery": [{
35394
+ name: "deviceId",
35395
+ form: "single",
35396
+ optional: false
35397
+ }],
35398
+ "deviceDiscovery.releaseDevice": [{
35399
+ name: "childDeviceId",
35400
+ form: "single",
35401
+ optional: false
35402
+ }, {
35403
+ name: "deviceId",
35404
+ form: "single",
35405
+ optional: false
35406
+ }],
35407
+ "deviceManager.adoptionRelease": [{
35408
+ name: "camDeviceId",
35409
+ form: "single",
35410
+ optional: false
35411
+ }],
35412
+ "deviceManager.adoptionResync": [{
35413
+ name: "camDeviceId",
35414
+ form: "single",
35415
+ optional: false
35416
+ }],
35417
+ "deviceManager.applyInitialMeta": [{
35418
+ name: "deviceId",
35419
+ form: "single",
35420
+ optional: false
35421
+ }, {
35422
+ name: "linkDeviceId",
35423
+ form: "single",
35424
+ optional: true
35425
+ }],
35426
+ "deviceManager.disable": [{
35427
+ name: "deviceId",
35428
+ form: "single",
35429
+ optional: false
35430
+ }],
35431
+ "deviceManager.enable": [{
35432
+ name: "deviceId",
35433
+ form: "single",
35434
+ optional: false
35435
+ }],
35436
+ "deviceManager.getBindings": [{
35437
+ name: "deviceId",
35438
+ form: "single",
35439
+ optional: false
35440
+ }],
35441
+ "deviceManager.getChildren": [{
35442
+ name: "parentDeviceId",
35443
+ form: "single",
35444
+ optional: false
35445
+ }],
35446
+ "deviceManager.getConfigSchema": [{
35447
+ name: "deviceId",
35448
+ form: "single",
35449
+ optional: false
35450
+ }],
35451
+ "deviceManager.getDevice": [{
35452
+ name: "deviceId",
35453
+ form: "single",
35454
+ optional: false
35455
+ }],
35456
+ "deviceManager.getDeviceAggregate": [{
35457
+ name: "deviceId",
35458
+ form: "single",
35459
+ optional: false
35460
+ }],
35461
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35462
+ name: "deviceId",
35463
+ form: "single",
35464
+ optional: false
35465
+ }],
35466
+ "deviceManager.getDeviceSettingsAggregate": [{
35467
+ name: "deviceId",
35468
+ form: "single",
35469
+ optional: false
35470
+ }],
35471
+ "deviceManager.getDeviceStatusAggregate": [{
35472
+ name: "deviceId",
35473
+ form: "single",
35474
+ optional: false
35475
+ }],
35476
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35477
+ name: "deviceIds",
35478
+ form: "array",
35479
+ optional: false
35480
+ }],
35481
+ "deviceManager.getLinkedDevices": [{
35482
+ name: "deviceId",
35483
+ form: "single",
35484
+ optional: false
35485
+ }],
35486
+ "deviceManager.getSettingsSchema": [{
35487
+ name: "deviceId",
35488
+ form: "single",
35489
+ optional: false
35490
+ }],
35491
+ "deviceManager.getStreamProfileMap": [{
35492
+ name: "deviceId",
35493
+ form: "single",
35494
+ optional: false
35495
+ }],
35496
+ "deviceManager.getStreamSources": [{
35497
+ name: "deviceId",
35498
+ form: "single",
35499
+ optional: false
35500
+ }],
35501
+ "deviceManager.getWireableFields": [{
35502
+ name: "deviceId",
35503
+ form: "single",
35504
+ optional: false
35505
+ }],
35506
+ "deviceManager.loadConfig": [{
35507
+ name: "deviceId",
35508
+ form: "single",
35509
+ optional: false
35510
+ }],
35511
+ "deviceManager.loadMeta": [{
35512
+ name: "deviceId",
35513
+ form: "single",
35514
+ optional: false
35515
+ }],
35516
+ "deviceManager.loadRuntimeState": [{
35517
+ name: "deviceId",
35518
+ form: "single",
35519
+ optional: false
35520
+ }],
35521
+ "deviceManager.persistConfig": [{
35522
+ name: "deviceId",
35523
+ form: "single",
35524
+ optional: false
35525
+ }],
35526
+ "deviceManager.probeStreams": [{
35527
+ name: "deviceId",
35528
+ form: "single",
35529
+ optional: false
35530
+ }],
35531
+ "deviceManager.registerDevice": [{
35532
+ name: "parentDeviceId",
35533
+ form: "single",
35534
+ optional: true
35535
+ }],
35536
+ "deviceManager.remove": [{
35537
+ name: "deviceId",
35538
+ form: "single",
35539
+ optional: false
35540
+ }],
35541
+ "deviceManager.removeDevice": [{
35542
+ name: "deviceId",
35543
+ form: "single",
35544
+ optional: false
35545
+ }],
35546
+ "deviceManager.runDeviceAction": [{
35547
+ name: "deviceId",
35548
+ form: "single",
35549
+ optional: false
35550
+ }],
35551
+ "deviceManager.setChildLayout": [{
35552
+ name: "deviceId",
35553
+ form: "single",
35554
+ optional: false
35555
+ }],
35556
+ "deviceManager.setDisabled": [{
35557
+ name: "deviceId",
35558
+ form: "single",
35559
+ optional: false
35560
+ }],
35561
+ "deviceManager.setDisplay": [{
35562
+ name: "deviceId",
35563
+ form: "single",
35564
+ optional: false
35565
+ }],
35566
+ "deviceManager.setIntegrationId": [{
35567
+ name: "deviceId",
35568
+ form: "single",
35569
+ optional: false
35570
+ }],
35571
+ "deviceManager.setLinkDeviceId": [{
35572
+ name: "deviceId",
35573
+ form: "single",
35574
+ optional: false
35575
+ }, {
35576
+ name: "linkDeviceId",
35577
+ form: "single",
35578
+ optional: true
35579
+ }],
35580
+ "deviceManager.setLocation": [{
35581
+ name: "deviceId",
35582
+ form: "single",
35583
+ optional: false
35584
+ }],
35585
+ "deviceManager.setMetadata": [{
35586
+ name: "deviceId",
35587
+ form: "single",
35588
+ optional: false
35589
+ }],
35590
+ "deviceManager.setName": [{
35591
+ name: "deviceId",
35592
+ form: "single",
35593
+ optional: false
35594
+ }],
35595
+ "deviceManager.setPrimaryChildEntityId": [{
35596
+ name: "deviceId",
35597
+ form: "single",
35598
+ optional: false
35599
+ }],
35600
+ "deviceManager.setRole": [{
35601
+ name: "deviceId",
35602
+ form: "single",
35603
+ optional: false
35604
+ }],
35605
+ "deviceManager.setStreamProfileMap": [{
35606
+ name: "deviceId",
35607
+ form: "single",
35608
+ optional: false
35609
+ }],
35610
+ "deviceManager.setType": [{
35611
+ name: "deviceId",
35612
+ form: "single",
35613
+ optional: false
35614
+ }],
35615
+ "deviceManager.setWrapperActive": [{
35616
+ name: "deviceId",
35617
+ form: "single",
35618
+ optional: false
35619
+ }],
35620
+ "deviceManager.testField": [{
35621
+ name: "deviceId",
35622
+ form: "single",
35623
+ optional: false
35624
+ }],
35625
+ "deviceManager.updateConfig": [{
35626
+ name: "deviceId",
35627
+ form: "single",
35628
+ optional: false
35629
+ }],
35630
+ "deviceManager.updateDeviceField": [{
35631
+ name: "deviceId",
35632
+ form: "single",
35633
+ optional: false
35634
+ }],
35635
+ "deviceManager.updateDeviceFieldsBatch": [{
35636
+ name: "deviceId",
35637
+ form: "single",
35638
+ optional: false
35639
+ }],
35640
+ "deviceOps.getConfigEntries": [{
35641
+ name: "deviceId",
35642
+ form: "single",
35643
+ optional: false
35644
+ }],
35645
+ "deviceOps.getRawState": [{
35646
+ name: "deviceId",
35647
+ form: "single",
35648
+ optional: false
35649
+ }],
35650
+ "deviceOps.getSettingsSchema": [{
35651
+ name: "deviceId",
35652
+ form: "single",
35653
+ optional: false
35654
+ }],
35655
+ "deviceOps.getStreamSources": [{
35656
+ name: "deviceId",
35657
+ form: "single",
35658
+ optional: false
35659
+ }],
35660
+ "deviceOps.removeDevice": [{
35661
+ name: "deviceId",
35662
+ form: "single",
35663
+ optional: false
35664
+ }],
35665
+ "deviceOps.runAction": [{
35666
+ name: "deviceId",
35667
+ form: "single",
35668
+ optional: false
35669
+ }],
35670
+ "deviceOps.setConfig": [{
35671
+ name: "deviceId",
35672
+ form: "single",
35673
+ optional: false
35674
+ }],
35675
+ "deviceState.getCapSlice": [{
35676
+ name: "deviceId",
35677
+ form: "single",
35678
+ optional: false
35679
+ }],
35680
+ "deviceState.getSnapshot": [{
35681
+ name: "deviceId",
35682
+ form: "single",
35683
+ optional: false
35684
+ }],
35685
+ "deviceState.setCapSlice": [{
35686
+ name: "deviceId",
35687
+ form: "single",
35688
+ optional: false
35689
+ }],
35690
+ "events.getEventClipUrl": [{
35691
+ name: "deviceId",
35692
+ form: "single",
35693
+ optional: false
35694
+ }],
35695
+ "events.getEvents": [{
35696
+ name: "deviceId",
35697
+ form: "single",
35698
+ optional: false
35699
+ }],
35700
+ "events.getEventThumbnail": [{
35701
+ name: "deviceId",
35702
+ form: "single",
35703
+ optional: false
35704
+ }],
35705
+ "faceGallery.getFaceByTrack": [{
35706
+ name: "deviceId",
35707
+ form: "single",
35708
+ optional: false
35709
+ }],
35710
+ "faceGallery.listRecentFaces": [{
35711
+ name: "deviceId",
35712
+ form: "single",
35713
+ optional: true
35714
+ }],
35715
+ "fanControl.setDirection": [{
35716
+ name: "deviceId",
35717
+ form: "single",
35718
+ optional: false
35719
+ }],
35720
+ "fanControl.setOscillating": [{
35721
+ name: "deviceId",
35722
+ form: "single",
35723
+ optional: false
35724
+ }],
35725
+ "fanControl.setPercentage": [{
35726
+ name: "deviceId",
35727
+ form: "single",
35728
+ optional: false
35729
+ }],
35730
+ "fanControl.setPreset": [{
35731
+ name: "deviceId",
35732
+ form: "single",
35733
+ optional: false
35734
+ }],
35735
+ "humidifier.setMode": [{
35736
+ name: "deviceId",
35737
+ form: "single",
35738
+ optional: false
35739
+ }],
35740
+ "humidifier.setOn": [{
35741
+ name: "deviceId",
35742
+ form: "single",
35743
+ optional: false
35744
+ }],
35745
+ "humidifier.setTargetHumidity": [{
35746
+ name: "deviceId",
35747
+ form: "single",
35748
+ optional: false
35749
+ }],
35750
+ "imageSettings.getOptions": [{
35751
+ name: "deviceId",
35752
+ form: "single",
35753
+ optional: false
35754
+ }],
35755
+ "imageSettings.setSettings": [{
35756
+ name: "deviceId",
35757
+ form: "single",
35758
+ optional: false
35759
+ }],
35760
+ "intercom.endTalkSession": [{
35761
+ name: "deviceId",
35762
+ form: "single",
35763
+ optional: false
35764
+ }],
35765
+ "intercom.handleAnswer": [{
35766
+ name: "deviceId",
35767
+ form: "single",
35768
+ optional: false
35769
+ }],
35770
+ "intercom.pushTalkAudio": [{
35771
+ name: "deviceId",
35772
+ form: "single",
35773
+ optional: false
35774
+ }],
35775
+ "intercom.startSession": [{
35776
+ name: "deviceId",
35777
+ form: "single",
35778
+ optional: false
35779
+ }],
35780
+ "intercom.startTalkSession": [{
35781
+ name: "deviceId",
35782
+ form: "single",
35783
+ optional: false
35784
+ }],
35785
+ "intercom.stopSession": [{
35786
+ name: "deviceId",
35787
+ form: "single",
35788
+ optional: false
35789
+ }],
35790
+ "lawnMowerControl.dock": [{
35791
+ name: "deviceId",
35792
+ form: "single",
35793
+ optional: false
35794
+ }],
35795
+ "lawnMowerControl.pause": [{
35796
+ name: "deviceId",
35797
+ form: "single",
35798
+ optional: false
35799
+ }],
35800
+ "lawnMowerControl.startMowing": [{
35801
+ name: "deviceId",
35802
+ form: "single",
35803
+ optional: false
35804
+ }],
35805
+ "lockControl.lock": [{
35806
+ name: "deviceId",
35807
+ form: "single",
35808
+ optional: false
35809
+ }],
35810
+ "lockControl.open": [{
35811
+ name: "deviceId",
35812
+ form: "single",
35813
+ optional: false
35814
+ }],
35815
+ "lockControl.unlock": [{
35816
+ name: "deviceId",
35817
+ form: "single",
35818
+ optional: false
35819
+ }],
35820
+ "mediaPlayer.next": [{
35821
+ name: "deviceId",
35822
+ form: "single",
35823
+ optional: false
35824
+ }],
35825
+ "mediaPlayer.pause": [{
35826
+ name: "deviceId",
35827
+ form: "single",
35828
+ optional: false
35829
+ }],
35830
+ "mediaPlayer.play": [{
35831
+ name: "deviceId",
35832
+ form: "single",
35833
+ optional: false
35834
+ }],
35835
+ "mediaPlayer.playMedia": [{
35836
+ name: "deviceId",
35837
+ form: "single",
35838
+ optional: false
35839
+ }],
35840
+ "mediaPlayer.previous": [{
35841
+ name: "deviceId",
35842
+ form: "single",
35843
+ optional: false
35844
+ }],
35845
+ "mediaPlayer.seek": [{
35846
+ name: "deviceId",
35847
+ form: "single",
35848
+ optional: false
35849
+ }],
35850
+ "mediaPlayer.selectSource": [{
35851
+ name: "deviceId",
35852
+ form: "single",
35853
+ optional: false
35854
+ }],
35855
+ "mediaPlayer.setMute": [{
35856
+ name: "deviceId",
35857
+ form: "single",
35858
+ optional: false
35859
+ }],
35860
+ "mediaPlayer.setRepeat": [{
35861
+ name: "deviceId",
35862
+ form: "single",
35863
+ optional: false
35864
+ }],
35865
+ "mediaPlayer.setShuffle": [{
35866
+ name: "deviceId",
35867
+ form: "single",
35868
+ optional: false
35869
+ }],
35870
+ "mediaPlayer.setVolume": [{
35871
+ name: "deviceId",
35872
+ form: "single",
35873
+ optional: false
35874
+ }],
35875
+ "mediaPlayer.stop": [{
35876
+ name: "deviceId",
35877
+ form: "single",
35878
+ optional: false
35879
+ }],
35880
+ "motion.isDetected": [{
35881
+ name: "deviceId",
35882
+ form: "single",
35883
+ optional: false
35884
+ }],
35885
+ "motionDetection.analyze": [{
35886
+ name: "deviceId",
35887
+ form: "single",
35888
+ optional: false
35889
+ }],
35890
+ "motionDetection.removeCamera": [{
35891
+ name: "deviceId",
35892
+ form: "single",
35893
+ optional: false
35894
+ }],
35895
+ "motionTrigger.setMotionTrigger": [{
35896
+ name: "deviceId",
35897
+ form: "single",
35898
+ optional: false
35899
+ }],
35900
+ "motionZones.getOptions": [{
35901
+ name: "deviceId",
35902
+ form: "single",
35903
+ optional: false
35904
+ }],
35905
+ "motionZones.setZone": [{
35906
+ name: "deviceId",
35907
+ form: "single",
35908
+ optional: false
35909
+ }],
35910
+ "nativeObjectDetection.setEnabled": [{
35911
+ name: "deviceId",
35912
+ form: "single",
35913
+ optional: false
35914
+ }],
35915
+ "networkQuality.getDeviceStats": [{
35916
+ name: "deviceId",
35917
+ form: "single",
35918
+ optional: false
35919
+ }],
35920
+ "networkQuality.reportClientStats": [{
35921
+ name: "deviceId",
35922
+ form: "single",
35923
+ optional: false
35924
+ }],
35925
+ "notificationRules.setDeviceMuted": [{
35926
+ name: "deviceId",
35927
+ form: "single",
35928
+ optional: false
35929
+ }],
35930
+ "notifier.cancel": [{
35931
+ name: "deviceId",
35932
+ form: "single",
35933
+ optional: false
35934
+ }],
35935
+ "notifier.send": [{
35936
+ name: "deviceId",
35937
+ form: "single",
35938
+ optional: false
35939
+ }],
35940
+ "osd.setOverlay": [{
35941
+ name: "deviceId",
35942
+ form: "single",
35943
+ optional: false
35944
+ }],
35945
+ "osdManager.clearSlotBinding": [{
35946
+ name: "deviceId",
35947
+ form: "single",
35948
+ optional: false
35949
+ }],
35950
+ "osdManager.copyDeviceConfiguration": [{
35951
+ name: "sourceDeviceId",
35952
+ form: "single",
35953
+ optional: false
35954
+ }, {
35955
+ name: "targetDeviceId",
35956
+ form: "single",
35957
+ optional: false
35958
+ }],
35959
+ "osdManager.getDeviceOsd": [{
35960
+ name: "deviceId",
35961
+ form: "single",
35962
+ optional: false
35963
+ }],
35964
+ "osdManager.getSourceCatalog": [{
35965
+ name: "deviceId",
35966
+ form: "single",
35967
+ optional: false
35968
+ }],
35969
+ "osdManager.previewSlot": [{
35970
+ name: "deviceId",
35971
+ form: "single",
35972
+ optional: false
35973
+ }],
35974
+ "osdManager.renderDevice": [{
35975
+ name: "deviceId",
35976
+ form: "single",
35977
+ optional: false
35978
+ }],
35979
+ "osdManager.setSlotBinding": [{
35980
+ name: "deviceId",
35981
+ form: "single",
35982
+ optional: false
35983
+ }],
35984
+ "petFeeder.callPet": [{
35985
+ name: "deviceId",
35986
+ form: "single",
35987
+ optional: false
35988
+ }],
35989
+ "petFeeder.cancelFeed": [{
35990
+ name: "deviceId",
35991
+ form: "single",
35992
+ optional: false
35993
+ }],
35994
+ "petFeeder.feed": [{
35995
+ name: "deviceId",
35996
+ form: "single",
35997
+ optional: false
35998
+ }],
35999
+ "petFeeder.markFoodReplenished": [{
36000
+ name: "deviceId",
36001
+ form: "single",
36002
+ optional: false
36003
+ }],
36004
+ "petFeeder.playSound": [{
36005
+ name: "deviceId",
36006
+ form: "single",
36007
+ optional: false
36008
+ }],
36009
+ "petFeeder.resetDesiccant": [{
36010
+ name: "deviceId",
36011
+ form: "single",
36012
+ optional: false
36013
+ }],
36014
+ "petFeeder.setChildLock": [{
36015
+ name: "deviceId",
36016
+ form: "single",
36017
+ optional: false
36018
+ }],
36019
+ "petFeeder.setFeedSound": [{
36020
+ name: "deviceId",
36021
+ form: "single",
36022
+ optional: false
36023
+ }],
36024
+ "petFeeder.setIndicatorLight": [{
36025
+ name: "deviceId",
36026
+ form: "single",
36027
+ optional: false
36028
+ }],
36029
+ "petFeeder.setVolume": [{
36030
+ name: "deviceId",
36031
+ form: "single",
36032
+ optional: false
36033
+ }],
36034
+ "pipelineAnalytics.clearTracks": [{
36035
+ name: "deviceId",
36036
+ form: "single",
36037
+ optional: false
36038
+ }],
36039
+ "pipelineAnalytics.completeRetrainTrack": [{
36040
+ name: "deviceId",
36041
+ form: "single",
36042
+ optional: false
36043
+ }],
36044
+ "pipelineAnalytics.deleteDeviceEvents": [{
36045
+ name: "deviceId",
36046
+ form: "single",
36047
+ optional: false
36048
+ }],
36049
+ "pipelineAnalytics.deleteTracks": [{
36050
+ name: "deviceId",
36051
+ form: "single",
36052
+ optional: false
36053
+ }],
36054
+ "pipelineAnalytics.deselectRetrainFrame": [{
36055
+ name: "deviceId",
36056
+ form: "single",
36057
+ optional: false
36058
+ }],
36059
+ "pipelineAnalytics.getActiveTracks": [{
36060
+ name: "deviceId",
36061
+ form: "single",
36062
+ optional: false
36063
+ }],
36064
+ "pipelineAnalytics.getAudioEvents": [{
36065
+ name: "deviceId",
36066
+ form: "single",
36067
+ optional: false
36068
+ }],
36069
+ "pipelineAnalytics.getEventDensity": [{
36070
+ name: "deviceId",
36071
+ form: "single",
36072
+ optional: false
36073
+ }],
36074
+ "pipelineAnalytics.getEventMedia": [{
36075
+ name: "deviceId",
36076
+ form: "single",
36077
+ optional: false
36078
+ }],
36079
+ "pipelineAnalytics.getKeyEvents": [{
36080
+ name: "deviceId",
36081
+ form: "single",
36082
+ optional: false
36083
+ }],
36084
+ "pipelineAnalytics.getMotionEvents": [{
36085
+ name: "deviceId",
36086
+ form: "single",
36087
+ optional: false
36088
+ }],
36089
+ "pipelineAnalytics.getObjectEvents": [{
36090
+ name: "deviceId",
36091
+ form: "single",
36092
+ optional: false
36093
+ }],
36094
+ "pipelineAnalytics.getRetrainExportUrl": [{
36095
+ name: "deviceIds",
36096
+ form: "array",
36097
+ optional: true
36098
+ }],
36099
+ "pipelineAnalytics.getSensorEvents": [{
36100
+ name: "deviceId",
36101
+ form: "single",
36102
+ optional: false
36103
+ }],
36104
+ "pipelineAnalytics.getTrack": [{
36105
+ name: "deviceId",
36106
+ form: "single",
36107
+ optional: false
36108
+ }],
36109
+ "pipelineAnalytics.getTrackMedia": [{
36110
+ name: "deviceId",
36111
+ form: "single",
36112
+ optional: false
36113
+ }],
36114
+ "pipelineAnalytics.getTrainingExportSummary": [{
36115
+ name: "deviceIds",
36116
+ form: "array",
36117
+ optional: true
36118
+ }],
36119
+ "pipelineAnalytics.getTrainingExportUrl": [{
36120
+ name: "deviceIds",
36121
+ form: "array",
36122
+ optional: true
36123
+ }],
36124
+ "pipelineAnalytics.listEventKinds": [{
36125
+ name: "deviceId",
36126
+ form: "single",
36127
+ optional: false
36128
+ }],
36129
+ "pipelineAnalytics.listEventKindsBatch": [{
36130
+ name: "deviceIds",
36131
+ form: "array",
36132
+ optional: false
36133
+ }],
36134
+ "pipelineAnalytics.listOpsLog": [{
36135
+ name: "deviceId",
36136
+ form: "single",
36137
+ optional: true
36138
+ }],
36139
+ "pipelineAnalytics.listRecentTracks": [{
36140
+ name: "deviceIds",
36141
+ form: "array",
36142
+ optional: false
36143
+ }],
36144
+ "pipelineAnalytics.listRetrainStaging": [{
36145
+ name: "deviceIds",
36146
+ form: "array",
36147
+ optional: true
36148
+ }],
36149
+ "pipelineAnalytics.listTrackMedia": [{
36150
+ name: "deviceId",
36151
+ form: "single",
36152
+ optional: false
36153
+ }],
36154
+ "pipelineAnalytics.listTracks": [{
36155
+ name: "deviceId",
36156
+ form: "single",
36157
+ optional: false
36158
+ }],
36159
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36160
+ name: "deviceId",
36161
+ form: "single",
36162
+ optional: false
36163
+ }],
36164
+ "pipelineAnalytics.pruneEventsBefore": [{
36165
+ name: "deviceId",
36166
+ form: "single",
36167
+ optional: false
36168
+ }],
36169
+ "pipelineAnalytics.pruneTracksBefore": [{
36170
+ name: "deviceId",
36171
+ form: "single",
36172
+ optional: false
36173
+ }],
36174
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36175
+ name: "deviceId",
36176
+ form: "single",
36177
+ optional: true
36178
+ }],
36179
+ "pipelineAnalytics.restageRetrainTrack": [{
36180
+ name: "deviceId",
36181
+ form: "single",
36182
+ optional: false
36183
+ }],
36184
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36185
+ name: "deviceId",
36186
+ form: "single",
36187
+ optional: false
36188
+ }],
36189
+ "pipelineAnalytics.searchObjectEvents": [{
36190
+ name: "deviceId",
36191
+ form: "single",
36192
+ optional: true
36193
+ }],
36194
+ "pipelineAnalytics.selectRetrainFrames": [{
36195
+ name: "deviceId",
36196
+ form: "single",
36197
+ optional: false
36198
+ }],
36199
+ "pipelineAnalytics.setTrackFlags": [{
36200
+ name: "deviceId",
36201
+ form: "single",
36202
+ optional: false
36203
+ }],
36204
+ "pipelineAnalytics.wipeAllAnalytics": [{
36205
+ name: "deviceId",
36206
+ form: "single",
36207
+ optional: false
36208
+ }],
36209
+ "pipelineExecutor.runPipeline": [{
36210
+ name: "deviceId",
36211
+ form: "single",
36212
+ optional: true
36213
+ }],
36214
+ "pipelineExecutor.runPipelineBatch": [{
36215
+ name: "deviceId",
36216
+ form: "single",
36217
+ optional: true
36218
+ }],
36219
+ "pipelineOrchestrator.assignAudio": [{
36220
+ name: "deviceId",
36221
+ form: "single",
36222
+ optional: false
36223
+ }],
36224
+ "pipelineOrchestrator.assignPipeline": [{
36225
+ name: "deviceId",
36226
+ form: "single",
36227
+ optional: false
36228
+ }],
36229
+ "pipelineOrchestrator.getAudioAssignment": [{
36230
+ name: "deviceId",
36231
+ form: "single",
36232
+ optional: false
36233
+ }],
36234
+ "pipelineOrchestrator.getCameraMetrics": [{
36235
+ name: "deviceId",
36236
+ form: "single",
36237
+ optional: false
36238
+ }],
36239
+ "pipelineOrchestrator.getCameraSettings": [{
36240
+ name: "deviceId",
36241
+ form: "single",
36242
+ optional: false
36243
+ }],
36244
+ "pipelineOrchestrator.getCameraStatus": [{
36245
+ name: "deviceId",
36246
+ form: "single",
36247
+ optional: false
36248
+ }],
36249
+ "pipelineOrchestrator.getCameraStatuses": [{
36250
+ name: "deviceIds",
36251
+ form: "array",
36252
+ optional: true
36253
+ }],
36254
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36255
+ name: "deviceId",
36256
+ form: "single",
36257
+ optional: false
36258
+ }],
36259
+ "pipelineOrchestrator.getCameraSwitches": [{
36260
+ name: "deviceId",
36261
+ form: "single",
36262
+ optional: false
36263
+ }],
36264
+ "pipelineOrchestrator.getPipelineAssignment": [{
36265
+ name: "deviceId",
36266
+ form: "single",
36267
+ optional: false
36268
+ }],
36269
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36270
+ name: "deviceId",
36271
+ form: "single",
36272
+ optional: false
36273
+ }],
36274
+ "pipelineOrchestrator.resolvePipeline": [{
36275
+ name: "deviceId",
36276
+ form: "single",
36277
+ optional: false
36278
+ }],
36279
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36280
+ name: "deviceId",
36281
+ form: "single",
36282
+ optional: false
36283
+ }],
36284
+ "pipelineOrchestrator.setCameraStepOverride": [{
36285
+ name: "deviceId",
36286
+ form: "single",
36287
+ optional: false
36288
+ }],
36289
+ "pipelineOrchestrator.setCameraStepToggle": [{
36290
+ name: "deviceId",
36291
+ form: "single",
36292
+ optional: false
36293
+ }],
36294
+ "pipelineOrchestrator.setCameraSwitch": [{
36295
+ name: "deviceId",
36296
+ form: "single",
36297
+ optional: false
36298
+ }],
36299
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36300
+ name: "deviceId",
36301
+ form: "single",
36302
+ optional: false
36303
+ }],
36304
+ "pipelineOrchestrator.unassignAudio": [{
36305
+ name: "deviceId",
36306
+ form: "single",
36307
+ optional: false
36308
+ }],
36309
+ "pipelineOrchestrator.unassignPipeline": [{
36310
+ name: "deviceId",
36311
+ form: "single",
36312
+ optional: false
36313
+ }],
36314
+ "pipelineRunner.attachCamera": [{
36315
+ name: "deviceId",
36316
+ form: "single",
36317
+ optional: false
36318
+ }],
36319
+ "pipelineRunner.detachCamera": [{
36320
+ name: "deviceId",
36321
+ form: "single",
36322
+ optional: false
36323
+ }],
36324
+ "pipelineRunner.getCameraMetrics": [{
36325
+ name: "deviceId",
36326
+ form: "single",
36327
+ optional: false
36328
+ }],
36329
+ "pipelineRunner.reportMotion": [{
36330
+ name: "deviceId",
36331
+ form: "single",
36332
+ optional: false
36333
+ }],
36334
+ "pipelineRunner.runDetailSubtree": [{
36335
+ name: "deviceId",
36336
+ form: "single",
36337
+ optional: false
36338
+ }],
36339
+ "pipelineRunner.runStatelessStep": [{
36340
+ name: "sourceDeviceId",
36341
+ form: "single",
36342
+ optional: false
36343
+ }],
36344
+ "plateGallery.getPlateByTrack": [{
36345
+ name: "deviceId",
36346
+ form: "single",
36347
+ optional: false
36348
+ }],
36349
+ "plateGallery.listPlates": [{
36350
+ name: "deviceId",
36351
+ form: "single",
36352
+ optional: true
36353
+ }],
36354
+ "privacyMask.getOptions": [{
36355
+ name: "deviceId",
36356
+ form: "single",
36357
+ optional: false
36358
+ }],
36359
+ "privacyMask.setAudioEnabled": [{
36360
+ name: "deviceId",
36361
+ form: "single",
36362
+ optional: false
36363
+ }],
36364
+ "privacyMask.setMask": [{
36365
+ name: "deviceId",
36366
+ form: "single",
36367
+ optional: false
36368
+ }],
36369
+ "ptz.continuousMove": [{
36370
+ name: "deviceId",
36371
+ form: "single",
36372
+ optional: false
36373
+ }],
36374
+ "ptz.deletePreset": [{
36375
+ name: "deviceId",
36376
+ form: "single",
36377
+ optional: false
36378
+ }],
36379
+ "ptz.getOptions": [{
36380
+ name: "deviceId",
36381
+ form: "single",
36382
+ optional: false
36383
+ }],
36384
+ "ptz.getPosition": [{
36385
+ name: "deviceId",
36386
+ form: "single",
36387
+ optional: false
36388
+ }],
36389
+ "ptz.getPresets": [{
36390
+ name: "deviceId",
36391
+ form: "single",
36392
+ optional: false
36393
+ }],
36394
+ "ptz.goHome": [{
36395
+ name: "deviceId",
36396
+ form: "single",
36397
+ optional: false
36398
+ }],
36399
+ "ptz.goToPreset": [{
36400
+ name: "deviceId",
36401
+ form: "single",
36402
+ optional: false
36403
+ }],
36404
+ "ptz.move": [{
36405
+ name: "deviceId",
36406
+ form: "single",
36407
+ optional: false
36408
+ }],
36409
+ "ptz.savePreset": [{
36410
+ name: "deviceId",
36411
+ form: "single",
36412
+ optional: false
36413
+ }],
36414
+ "ptz.setAutofocus": [{
36415
+ name: "deviceId",
36416
+ form: "single",
36417
+ optional: false
36418
+ }],
36419
+ "ptz.stop": [{
36420
+ name: "deviceId",
36421
+ form: "single",
36422
+ optional: false
36423
+ }],
36424
+ "ptzAutotrack.getSettings": [{
36425
+ name: "deviceId",
36426
+ form: "single",
36427
+ optional: false
36428
+ }],
36429
+ "ptzAutotrack.getStatus": [{
36430
+ name: "deviceId",
36431
+ form: "single",
36432
+ optional: false
36433
+ }],
36434
+ "ptzAutotrack.setEnabled": [{
36435
+ name: "deviceId",
36436
+ form: "single",
36437
+ optional: false
36438
+ }],
36439
+ "ptzAutotrack.setSettings": [{
36440
+ name: "deviceId",
36441
+ form: "single",
36442
+ optional: false
36443
+ }],
36444
+ "reboot.reboot": [{
36445
+ name: "deviceId",
36446
+ form: "single",
36447
+ optional: false
36448
+ }],
36449
+ "recording.deleteFootprint": [{
36450
+ name: "deviceId",
36451
+ form: "single",
36452
+ optional: false
36453
+ }],
36454
+ "recording.getAvailability": [{
36455
+ name: "deviceId",
36456
+ form: "single",
36457
+ optional: false
36458
+ }],
36459
+ "recording.getDaysWithRecordings": [{
36460
+ name: "deviceId",
36461
+ form: "single",
36462
+ optional: false
36463
+ }],
36464
+ "recording.getDeviceConfig": [{
36465
+ name: "deviceId",
36466
+ form: "single",
36467
+ optional: false
36468
+ }],
36469
+ "recording.getPlaybackManifest": [{
36470
+ name: "deviceId",
36471
+ form: "single",
36472
+ optional: false
36473
+ }],
36474
+ "recording.listOpsLog": [{
36475
+ name: "deviceId",
36476
+ form: "single",
36477
+ optional: true
36478
+ }],
36479
+ "recording.locateSegment": [{
36480
+ name: "deviceId",
36481
+ form: "single",
36482
+ optional: false
36483
+ }],
36484
+ "recording.pruneFootage": [{
36485
+ name: "deviceId",
36486
+ form: "single",
36487
+ optional: false
36488
+ }],
36489
+ "recording.readGopBytes": [{
36490
+ name: "deviceId",
36491
+ form: "single",
36492
+ optional: false
36493
+ }],
36494
+ "recording.readSegmentBytes": [{
36495
+ name: "deviceId",
36496
+ form: "single",
36497
+ optional: false
36498
+ }],
36499
+ "recording.relocateFootage": [{
36500
+ name: "deviceId",
36501
+ form: "single",
36502
+ optional: true
36503
+ }],
36504
+ "recording.renderClip": [{
36505
+ name: "deviceId",
36506
+ form: "single",
36507
+ optional: false
36508
+ }],
36509
+ "recording.renderGif": [{
36510
+ name: "deviceId",
36511
+ form: "single",
36512
+ optional: false
36513
+ }],
36514
+ "recording.rescanStorage": [{
36515
+ name: "deviceId",
36516
+ form: "single",
36517
+ optional: false
36518
+ }],
36519
+ "recording.setDeviceConfig": [{
36520
+ name: "deviceId",
36521
+ form: "single",
36522
+ optional: false
36523
+ }],
36524
+ "recording.startStorageMigrationMove": [{
36525
+ name: "deviceId",
36526
+ form: "single",
36527
+ optional: true
36528
+ }],
36529
+ "recordingExport.createExport": [{
36530
+ name: "deviceId",
36531
+ form: "single",
36532
+ optional: false
36533
+ }],
36534
+ "recordingExport.listExports": [{
36535
+ name: "deviceId",
36536
+ form: "single",
36537
+ optional: true
36538
+ }],
36539
+ "sceneMonitor.captureReference": [{
36540
+ name: "deviceId",
36541
+ form: "single",
36542
+ optional: false
36543
+ }],
36544
+ "sceneMonitor.createScene": [{
36545
+ name: "deviceId",
36546
+ form: "single",
36547
+ optional: false
36548
+ }],
36549
+ "sceneMonitor.deleteReference": [{
36550
+ name: "deviceId",
36551
+ form: "single",
36552
+ optional: false
36553
+ }],
36554
+ "sceneMonitor.deleteScene": [{
36555
+ name: "deviceId",
36556
+ form: "single",
36557
+ optional: false
36558
+ }],
36559
+ "sceneMonitor.listScenes": [{
36560
+ name: "deviceId",
36561
+ form: "single",
36562
+ optional: false
36563
+ }],
36564
+ "sceneMonitor.recheckNow": [{
36565
+ name: "deviceId",
36566
+ form: "single",
36567
+ optional: false
36568
+ }],
36569
+ "sceneMonitor.resetScene": [{
36570
+ name: "deviceId",
36571
+ form: "single",
36572
+ optional: false
36573
+ }],
36574
+ "sceneMonitor.updateScene": [{
36575
+ name: "deviceId",
36576
+ form: "single",
36577
+ optional: false
36578
+ }],
36579
+ "scriptRunner.run": [{
36580
+ name: "deviceId",
36581
+ form: "single",
36582
+ optional: false
36583
+ }],
36584
+ "scriptRunner.stop": [{
36585
+ name: "deviceId",
36586
+ form: "single",
36587
+ optional: false
36588
+ }],
36589
+ "snapshot.getSnapshot": [{
36590
+ name: "deviceId",
36591
+ form: "single",
36592
+ optional: false
36593
+ }],
36594
+ "snapshot.getSnapshotLinks": [{
36595
+ name: "targets",
36596
+ form: "object-array",
36597
+ optional: false,
36598
+ itemField: "deviceId"
36599
+ }],
36600
+ "snapshot.getSnapshotOverview": [{
36601
+ name: "deviceIds",
36602
+ form: "array",
36603
+ optional: false
36604
+ }],
36605
+ "snapshot.invalidateCache": [{
36606
+ name: "deviceId",
36607
+ form: "single",
36608
+ optional: false
36609
+ }],
36610
+ "streamBroker.acquireEgressTranscode": [{
36611
+ name: "deviceId",
36612
+ form: "single",
36613
+ optional: false
36614
+ }],
36615
+ "streamBroker.assignProfile": [{
36616
+ name: "deviceId",
36617
+ form: "single",
36618
+ optional: false
36619
+ }],
36620
+ "streamBroker.getDeviceAudioMute": [{
36621
+ name: "deviceId",
36622
+ form: "single",
36623
+ optional: false
36624
+ }],
36625
+ "streamBroker.getStreamWithCodec": [{
36626
+ name: "deviceId",
36627
+ form: "single",
36628
+ optional: false
36629
+ }],
36630
+ "streamBroker.produceEventMedia": [{
36631
+ name: "deviceId",
36632
+ form: "single",
36633
+ optional: false
36634
+ }],
36635
+ "streamBroker.publishCameraStream": [{
36636
+ name: "deviceId",
36637
+ form: "single",
36638
+ optional: false
36639
+ }],
36640
+ "streamBroker.renderPreBufferClip": [{
36641
+ name: "deviceId",
36642
+ form: "single",
36643
+ optional: false
36644
+ }],
36645
+ "streamBroker.restartProfile": [{
36646
+ name: "deviceId",
36647
+ form: "single",
36648
+ optional: false
36649
+ }],
36650
+ "streamBroker.retractCameraStream": [{
36651
+ name: "deviceId",
36652
+ form: "single",
36653
+ optional: false
36654
+ }],
36655
+ "streamBroker.setDeviceAudioMute": [{
36656
+ name: "deviceId",
36657
+ form: "single",
36658
+ optional: false
36659
+ }],
36660
+ "streamBroker.unassignProfile": [{
36661
+ name: "deviceId",
36662
+ form: "single",
36663
+ optional: false
36664
+ }],
36665
+ "streamCatalog.getCatalog": [{
36666
+ name: "deviceId",
36667
+ form: "single",
36668
+ optional: false
36669
+ }],
36670
+ "streamParams.getConfigSchema": [{
36671
+ name: "deviceId",
36672
+ form: "single",
36673
+ optional: false
36674
+ }],
36675
+ "streamParams.getOptions": [{
36676
+ name: "deviceId",
36677
+ form: "single",
36678
+ optional: false
36679
+ }],
36680
+ "streamParams.setProfile": [{
36681
+ name: "deviceId",
36682
+ form: "single",
36683
+ optional: false
36684
+ }],
36685
+ "switch.setState": [{
36686
+ name: "deviceId",
36687
+ form: "single",
36688
+ optional: false
36689
+ }],
36690
+ "vacuumControl.locate": [{
36691
+ name: "deviceId",
36692
+ form: "single",
36693
+ optional: false
36694
+ }],
36695
+ "vacuumControl.pause": [{
36696
+ name: "deviceId",
36697
+ form: "single",
36698
+ optional: false
36699
+ }],
36700
+ "vacuumControl.returnToBase": [{
36701
+ name: "deviceId",
36702
+ form: "single",
36703
+ optional: false
36704
+ }],
36705
+ "vacuumControl.setFanSpeed": [{
36706
+ name: "deviceId",
36707
+ form: "single",
36708
+ optional: false
36709
+ }],
36710
+ "vacuumControl.start": [{
36711
+ name: "deviceId",
36712
+ form: "single",
36713
+ optional: false
36714
+ }],
36715
+ "vacuumControl.stop": [{
36716
+ name: "deviceId",
36717
+ form: "single",
36718
+ optional: false
36719
+ }],
36720
+ "valve.close": [{
36721
+ name: "deviceId",
36722
+ form: "single",
36723
+ optional: false
36724
+ }],
36725
+ "valve.open": [{
36726
+ name: "deviceId",
36727
+ form: "single",
36728
+ optional: false
36729
+ }],
36730
+ "valve.setPosition": [{
36731
+ name: "deviceId",
36732
+ form: "single",
36733
+ optional: false
36734
+ }],
36735
+ "valve.stop": [{
36736
+ name: "deviceId",
36737
+ form: "single",
36738
+ optional: false
36739
+ }],
36740
+ "videoclips.getClipPlayback": [{
36741
+ name: "deviceId",
36742
+ form: "single",
36743
+ optional: false
36744
+ }],
36745
+ "videoclips.listClips": [{
36746
+ name: "deviceId",
36747
+ form: "single",
36748
+ optional: false
36749
+ }],
36750
+ "waterHeater.setAway": [{
36751
+ name: "deviceId",
36752
+ form: "single",
36753
+ optional: false
36754
+ }],
36755
+ "waterHeater.setOperationMode": [{
36756
+ name: "deviceId",
36757
+ form: "single",
36758
+ optional: false
36759
+ }],
36760
+ "waterHeater.setTargetTemp": [{
36761
+ name: "deviceId",
36762
+ form: "single",
36763
+ optional: false
36764
+ }],
36765
+ "webrtcSession.addIceCandidate": [{
36766
+ name: "deviceId",
36767
+ form: "single",
36768
+ optional: false
36769
+ }],
36770
+ "webrtcSession.closeSession": [{
36771
+ name: "deviceId",
36772
+ form: "single",
36773
+ optional: false
36774
+ }],
36775
+ "webrtcSession.createSession": [{
36776
+ name: "deviceId",
36777
+ form: "single",
36778
+ optional: false
36779
+ }],
36780
+ "webrtcSession.getIceCandidates": [{
36781
+ name: "deviceId",
36782
+ form: "single",
36783
+ optional: false
36784
+ }],
36785
+ "webrtcSession.getSessionState": [{
36786
+ name: "deviceId",
36787
+ form: "single",
36788
+ optional: false
36789
+ }],
36790
+ "webrtcSession.handleAnswer": [{
36791
+ name: "deviceId",
36792
+ form: "single",
36793
+ optional: false
36794
+ }],
36795
+ "webrtcSession.handleOffer": [{
36796
+ name: "deviceId",
36797
+ form: "single",
36798
+ optional: false
36799
+ }],
36800
+ "webrtcSession.hasAdaptiveBitrate": [{
36801
+ name: "deviceId",
36802
+ form: "single",
36803
+ optional: false
36804
+ }],
36805
+ "webrtcSession.listStreams": [{
36806
+ name: "deviceId",
36807
+ form: "single",
36808
+ optional: false
36809
+ }],
36810
+ "zoneAnalytics.getCameraHistory": [{
36811
+ name: "deviceId",
36812
+ form: "single",
36813
+ optional: false
36814
+ }],
36815
+ "zoneAnalytics.getCurrentSnapshot": [{
36816
+ name: "deviceId",
36817
+ form: "single",
36818
+ optional: false
36819
+ }],
36820
+ "zoneAnalytics.getUnzonedHistory": [{
36821
+ name: "deviceId",
36822
+ form: "single",
36823
+ optional: false
36824
+ }],
36825
+ "zoneAnalytics.getZoneHistory": [{
36826
+ name: "deviceId",
36827
+ form: "single",
36828
+ optional: false
36829
+ }],
36830
+ "zoneRules.listRules": [{
36831
+ name: "deviceId",
36832
+ form: "single",
36833
+ optional: false
36834
+ }],
36835
+ "zoneRules.setRules": [{
36836
+ name: "deviceId",
36837
+ form: "single",
36838
+ optional: false
36839
+ }],
36840
+ "zones.addZone": [{
36841
+ name: "deviceId",
36842
+ form: "single",
36843
+ optional: false
36844
+ }],
36845
+ "zones.listZones": [{
36846
+ name: "deviceId",
36847
+ form: "single",
36848
+ optional: false
36849
+ }],
36850
+ "zones.removeZone": [{
36851
+ name: "deviceId",
36852
+ form: "single",
36853
+ optional: false
36854
+ }],
36855
+ "zones.updateZone": [{
36856
+ name: "deviceId",
36857
+ form: "single",
36858
+ optional: false
36859
+ }]
36860
+ });
34074
36861
  Object.freeze({
34075
36862
  "broker": "broker",
34076
36863
  "device-export": "device-export",