@camstack/addon-provider-unraid 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,
@@ -22723,54 +23394,139 @@ var TalkAudioCodecSchema = _enum([
22723
23394
  "g711ulaw",
22724
23395
  "g711alaw"
22725
23396
  ]);
22726
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22727
- sessionId: string(),
22728
- sdpOffer: string()
22729
- }), {
22730
- kind: "mutation",
22731
- auth: "admin"
22732
- }), method(object({
22733
- deviceId: number(),
22734
- sessionId: string(),
22735
- sdpAnswer: string()
22736
- }), _void(), {
22737
- kind: "mutation",
22738
- auth: "admin"
22739
- }), method(object({
22740
- deviceId: number(),
22741
- sessionId: string()
22742
- }), _void(), {
22743
- kind: "mutation",
22744
- auth: "admin"
22745
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22746
- kind: "mutation",
22747
- auth: "admin"
22748
- }), method(object({
22749
- deviceId: number(),
22750
- /** Audio bytes for ONE frame, base64-encoded so the payload
22751
- * survives tRPC JSON serialization. */
22752
- audioBase64: string(),
22753
- /** Wire codec of the payload. Omit to let the provider default
22754
- * to its native expected format (s16le @ provider-native rate,
22755
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22756
- codec: TalkAudioCodecSchema.optional(),
22757
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22758
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22759
- sampleRate: number().int().positive().optional(),
22760
- /** Channel count. Default 1. */
22761
- channels: number().int().positive().optional(),
22762
- /** Sequence number for ordering / dropping out-of-order frames. */
22763
- sequenceNumber: number().int()
22764
- }), object({ accepted: boolean() }), {
22765
- kind: "mutation",
22766
- auth: "admin"
22767
- }), method(object({ deviceId: number() }), _void(), {
22768
- kind: "mutation",
22769
- auth: "admin"
22770
- }), object({
22771
- deviceId: number(),
22772
- status: IntercomStatusSchema
22773
- });
23397
+ var intercomCapability = {
23398
+ name: "intercom",
23399
+ scope: "device",
23400
+ deviceNative: true,
23401
+ mode: "singleton",
23402
+ deviceTypes: [DeviceType.Camera],
23403
+ methods: {
23404
+ /**
23405
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23406
+ * offer with a single sendonly audio m-line the client answers
23407
+ * (client → server direction). The server wakes battery cams
23408
+ * transparently before opening the upstream talk channel.
23409
+ */
23410
+ startSession: method(object({ deviceId: number() }), object({
23411
+ sessionId: string(),
23412
+ sdpOffer: string()
23413
+ }), {
23414
+ kind: "mutation",
23415
+ auth: "admin"
23416
+ }),
23417
+ handleAnswer: method(object({
23418
+ deviceId: number(),
23419
+ sessionId: string(),
23420
+ sdpAnswer: string()
23421
+ }), _void(), {
23422
+ kind: "mutation",
23423
+ auth: "admin"
23424
+ }),
23425
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23426
+ stopSession: method(object({
23427
+ deviceId: number(),
23428
+ sessionId: string()
23429
+ }), _void(), {
23430
+ kind: "mutation",
23431
+ auth: "admin"
23432
+ }),
23433
+ /**
23434
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23435
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23436
+ * harnesses) that already have decoded PCM frames and just need a
23437
+ * direct path onto the camera's talk channel. Mutually exclusive
23438
+ * with `startSession` (an active WebRTC session must be stopped
23439
+ * before a raw-PCM session can be opened on the same device, and
23440
+ * vice versa).
23441
+ */
23442
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23443
+ kind: "mutation",
23444
+ auth: "admin"
23445
+ }),
23446
+ /**
23447
+ * Push one chunk of talk-back audio onto the active talk session.
23448
+ * The cap is codec-agnostic: the caller declares (or omits) the
23449
+ * wire format via `codec`; the provider decides between passthrough
23450
+ * (when the wire codec matches the camera's native talk channel),
23451
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23452
+ *
23453
+ * Callers do NOT need to know the camera's wire format or sample
23454
+ * rate — that information lives entirely inside the provider.
23455
+ *
23456
+ * Sequence numbers MUST be monotonic per talk session; older frames
23457
+ * arriving after newer ones are dropped to avoid smearing the
23458
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23459
+ * predictor would corrupt with re-ordering).
23460
+ */
23461
+ pushTalkAudio: method(object({
23462
+ deviceId: number(),
23463
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23464
+ * survives tRPC JSON serialization. */
23465
+ audioBase64: string(),
23466
+ /** Wire codec of the payload. Omit to let the provider default
23467
+ * to its native expected format (s16le @ provider-native rate,
23468
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23469
+ codec: TalkAudioCodecSchema.optional(),
23470
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23471
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23472
+ sampleRate: number().int().positive().optional(),
23473
+ /** Channel count. Default 1. */
23474
+ channels: number().int().positive().optional(),
23475
+ /** Sequence number for ordering / dropping out-of-order frames. */
23476
+ sequenceNumber: number().int()
23477
+ }), object({ accepted: boolean() }), {
23478
+ kind: "mutation",
23479
+ auth: "admin"
23480
+ }),
23481
+ /** Close the raw-PCM talk session. Idempotent. */
23482
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23483
+ kind: "mutation",
23484
+ auth: "admin"
23485
+ })
23486
+ },
23487
+ events: { onStatusChanged: { data: object({
23488
+ deviceId: number(),
23489
+ status: IntercomStatusSchema
23490
+ }) } },
23491
+ status: {
23492
+ schema: IntercomStatusSchema,
23493
+ kind: "command-driven"
23494
+ },
23495
+ /**
23496
+ * Runtime-state slice — mirrored by the kernel.
23497
+ *
23498
+ * The cap declared `status` and nothing else, so the only two sources an
23499
+ * exporter has for a value — the `device.state-changed` slice event and the
23500
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23501
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23502
+ * have been published and never received a value, which is the defect the
23503
+ * export's two classification tables exist to prevent (177 of them, once), so
23504
+ * `intercom` was excluded rather than exported.
23505
+ *
23506
+ * The shape is the status shape: there is exactly one truth about talk-back
23507
+ * and duplicating it into a second schema is how two halves of one capability
23508
+ * come to disagree. Providers write it through
23509
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23510
+ * and close a session, and seed it at registration so the slice exists before
23511
+ * the first session rather than after it.
23512
+ *
23513
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23514
+ * session handle, so a session torn down by a transport death that never
23515
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23516
+ * session or the next restart. That is why the slice is `session` and not
23517
+ * `restored` — a restart must never restore "talking".
23518
+ */
23519
+ runtimeState: IntercomStatusSchema,
23520
+ /**
23521
+ * Runtime-state durability: **session** — `talking` describes a live audio
23522
+ * session, which by definition does not survive the process that held it.
23523
+ * Restoring it would publish a camera as talking to nobody.
23524
+ *
23525
+ * See `RuntimeStateDurability`. Enforced by
23526
+ * `scripts/check-runtime-state-durability.ts`.
23527
+ */
23528
+ durability: "session"
23529
+ };
22774
23530
  /**
22775
23531
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22776
23532
  * with a mowing lifecycle plus a dock action.
@@ -25467,7 +26223,7 @@ method(object({
25467
26223
  toMs: number()
25468
26224
  }), RecordingAvailabilitySchema, {
25469
26225
  kind: "query",
25470
- auth: "admin"
26226
+ auth: "protected"
25471
26227
  }), method(object({
25472
26228
  deviceId: number(),
25473
26229
  fromMs: number(),
@@ -25475,14 +26231,14 @@ method(object({
25475
26231
  tzOffsetMinutes: number()
25476
26232
  }), RecordingDaysSchema, {
25477
26233
  kind: "query",
25478
- auth: "admin"
26234
+ auth: "protected"
25479
26235
  }), method(object({
25480
26236
  deviceId: number(),
25481
26237
  fromMs: number(),
25482
26238
  toMs: number()
25483
26239
  }), RecordingManifestSchema, {
25484
26240
  kind: "query",
25485
- auth: "admin"
26241
+ auth: "protected"
25486
26242
  }), method(object({}), RecordingStorageUsageSchema, {
25487
26243
  kind: "query",
25488
26244
  auth: "admin"
@@ -25772,14 +26528,77 @@ method(object({
25772
26528
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25773
26529
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25774
26530
  *
25775
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) the framework
25776
- * derives the device-detail contribution; the provider carries NO hand-written
25777
- * settings-contribution methods. `status.kind:'push'` the engine pushes on
25778
- * every hysteresis flip / availability change; consumers never poll.
25779
- */
25780
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25781
- * be added without a wire break (matching falls back to any-condition refs). */
26531
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26532
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26533
+ * for the thing: a scene is a standing question about the property ("is the bin
26534
+ * still out"), and the operator's question is "which of my scenes have tripped",
26535
+ * across every camera at once — not "what does camera 617 think". Buried one
26536
+ * camera deep it also could not be found. The surface is now a top-level admin
26537
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26538
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26539
+ *
26540
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26541
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26542
+ * directions, so a registration nobody declares fails exactly as loudly as a
26543
+ * declaration nobody registers. The editor is imported directly by the page.
26544
+ *
26545
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26546
+ * availability change; consumers never poll.
26547
+ */
26548
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26549
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26550
+ * Open by design so more can be added without a wire break.
26551
+ *
26552
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26553
+ * not comparable, so "I have never seen this scene in this light" is reported
26554
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26555
+ * collapses the cosine and would latch a false alarm every single night. */
25782
26556
  var SceneConditionSchema = string();
26557
+ /**
26558
+ * What a scene does when the CURRENT light has no reference of its own.
26559
+ *
26560
+ * The lighting variants are not equally likely to exist. Almost every operator
26561
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26562
+ * scene that is only ever going to be asked about a daytime question ("is the
26563
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26564
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26565
+ * working without it rather than degrading into a permanent complaint.
26566
+ *
26567
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26568
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26569
+ * last covered light left it at, the latch is untouched, and the hysteresis
26570
+ * run is neither spent nor cleared. The scene resumes by itself at first
26571
+ * light. This is the only behaviour under which "I never captured IR" is a
26572
+ * configuration choice instead of a nightly fault.
26573
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26574
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26575
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26576
+ * cross-condition cosines are not comparable, so a day reference against a
26577
+ * true IR frame collapses and the scene reports a theft at 21:40.
26578
+ *
26579
+ * Never applies when the scene has NO comparable reference at all — that is
26580
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26581
+ * there would hide a scene the operator never finished setting up.
26582
+ */
26583
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26584
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26585
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26586
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26587
+ * and never counts toward hysteresis in either direction. */
26588
+ var SceneVerdictSchema = _enum([
26589
+ "matched",
26590
+ "diverged",
26591
+ "unknown"
26592
+ ]);
26593
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26594
+ * silence that reads as "nothing has happened". */
26595
+ var SceneUnavailableSchema = _enum([
26596
+ "no-reference-for-condition",
26597
+ "view-shifted",
26598
+ "no-vision-profile",
26599
+ "encoder-model-changed",
26600
+ "no-snapshot"
26601
+ ]);
25783
26602
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25784
26603
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25785
26604
  var SceneReferenceSchema = object({
@@ -25787,7 +26606,14 @@ var SceneReferenceSchema = object({
25787
26606
  modelId: string(),
25788
26607
  condition: SceneConditionSchema,
25789
26608
  capturedAt: number(),
25790
- thumbnailMediaId: string().optional()
26609
+ thumbnailMediaId: string().optional(),
26610
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26611
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26612
+ * normalized rect frame a different piece of world, and the scene would
26613
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26614
+ * when hysteresis is about to flip — one extra encode per candidate
26615
+ * transition, not per poll. */
26616
+ anchorEmbedding: array(number()).optional()
25791
26617
  });
25792
26618
  var SceneMonitorStateSchema = object({
25793
26619
  id: string(),
@@ -25809,6 +26635,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25809
26635
  profileId: string().optional(),
25810
26636
  hysteresisCount: number().int().positive()
25811
26637
  })]);
26638
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26639
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26640
+ * out in silence rather than reporting a fault every night. */
26641
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26642
+ /**
26643
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26644
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26645
+ *
26646
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26647
+ * fail-open: a notification suppressed is the worse error there, but a vision
26648
+ * model that timed out has not told us the bin is gone, and a latch is a
26649
+ * stateful claim that costs the operator a trip to reset.
26650
+ */
26651
+ var SceneConfirmSchema = object({
26652
+ enabled: boolean().default(false),
26653
+ prompt: string().min(1).max(1e3),
26654
+ profileId: string().optional(),
26655
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26656
+ maxImagePx: number().int().min(64).max(2048).default(448),
26657
+ /** What a timeout / unavailable model means for the PENDING flip. */
26658
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26659
+ });
25812
26660
  var SceneMonitorSchema = object({
25813
26661
  id: string(),
25814
26662
  label: string(),
@@ -25827,7 +26675,56 @@ var SceneMonitorSchema = object({
25827
26675
  lastConfidence: number().nullable(),
25828
26676
  currentCondition: SceneConditionSchema.nullable(),
25829
26677
  availability: _enum(["ok", "unavailable"]),
25830
- unavailableReason: string().nullable()
26678
+ unavailableReason: string().nullable(),
26679
+ /** Which state is "the initial screen". `null` until the first capture. */
26680
+ baselineStateId: string().nullable(),
26681
+ /** Which boolean drives notification rules and any export. */
26682
+ emit: _enum(["latched", "live"]).default("latched"),
26683
+ /** Live: does the region match the baseline RIGHT NOW. */
26684
+ verdict: SceneVerdictSchema,
26685
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26686
+ latched: boolean(),
26687
+ /** Last reset (or creation). */
26688
+ armedAt: number(),
26689
+ divergedAt: number().nullable(),
26690
+ restoredAt: number().nullable(),
26691
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26692
+ * during the window DISCARDS the observation — a car pulling up in front of
26693
+ * the bin must not be able to spend hysteresis credit. */
26694
+ quietSeconds: number().int().min(0).max(3600).default(60),
26695
+ /** An observation only advances the pending count when it is at least this
26696
+ * far from the previously counted one, so N agreeing checks span real time
26697
+ * rather than N adjacent polls inside one occlusion. */
26698
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26699
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26700
+ confirm: SceneConfirmSchema.optional(),
26701
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26702
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26703
+ /** Clear the latch on its own when the scene matches again? Default false —
26704
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26705
+ * automation can react to the bin coming back without the operator's own
26706
+ * alarm silently clearing itself. */
26707
+ autoRestore: boolean().default(false),
26708
+ /** What to do when the current light has no reference of its own. See
26709
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26710
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26711
+ /**
26712
+ * The light whose checks are currently being SAT OUT under
26713
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26714
+ *
26715
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26716
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26717
+ * nothing captured in this light"* in the same calm voice as the coverage
26718
+ * line, because the alternative is a scene that silently stops answering
26719
+ * after sunset with nothing anywhere saying why. A skipped check must never
26720
+ * read as a broken one.
26721
+ */
26722
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26723
+ /** Named cause when `verdict === 'unknown'`. */
26724
+ unavailable: SceneUnavailableSchema.nullable(),
26725
+ /** Conditions that have at least one comparable reference — the coverage line
26726
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26727
+ coveredConditions: array(SceneConditionSchema)
25831
26728
  });
25832
26729
  var SceneMonitorStatusSchema = object({
25833
26730
  monitors: array(SceneMonitorSchema),
@@ -25840,12 +26737,6 @@ var sceneMonitorCapability = {
25840
26737
  kind: "wrapper",
25841
26738
  defaultActive: true,
25842
26739
  deviceTypes: [DeviceType.Camera],
25843
- deviceConfig: { ui: {
25844
- kind: "widget",
25845
- widgetId: "host/scene-monitor-editor",
25846
- tab: "scenes",
25847
- label: "Scenes"
25848
- } },
25849
26740
  methods: {
25850
26741
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25851
26742
  createScene: method(object({
@@ -25876,7 +26767,15 @@ var sceneMonitorCapability = {
25876
26767
  "both"
25877
26768
  ]).optional(),
25878
26769
  checkIntervalSec: number().optional(),
25879
- check: SceneCheckSchema.optional()
26770
+ check: SceneCheckSchema.optional(),
26771
+ emit: _enum(["latched", "live"]).optional(),
26772
+ quietSeconds: number().int().min(0).max(3600).optional(),
26773
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26774
+ anchorThreshold: number().min(0).max(1).optional(),
26775
+ autoRestore: boolean().optional(),
26776
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26777
+ /** `null` clears the vision-model adjudicator. */
26778
+ confirm: SceneConfirmSchema.nullable().optional()
25880
26779
  })
25881
26780
  }), _void(), {
25882
26781
  kind: "mutation",
@@ -25917,6 +26816,26 @@ var sceneMonitorCapability = {
25917
26816
  }), _void(), {
25918
26817
  kind: "mutation",
25919
26818
  auth: "admin"
26819
+ }),
26820
+ /**
26821
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26822
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26823
+ * "reset" in the operator's head means *this is the new normal*, and
26824
+ * re-capture is what makes the feature self-healing against slow drift
26825
+ * instead of failing silently weeks later.
26826
+ *
26827
+ * Reachable from three surfaces on this one mutation: the scene card, a
26828
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26829
+ * no new Notification-Center code at all), and tRPC for scripts.
26830
+ */
26831
+ resetScene: method(object({
26832
+ deviceId: number(),
26833
+ monitorId: string(),
26834
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26835
+ recapture: boolean().optional()
26836
+ }), _void(), {
26837
+ kind: "mutation",
26838
+ auth: "admin"
25920
26839
  })
25921
26840
  },
25922
26841
  status: {
@@ -26153,7 +27072,70 @@ var CamStreamDescriptorSchema = object({
26153
27072
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26154
27073
  metadata: record(string(), unknown()).optional()
26155
27074
  });
26156
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27075
+ /**
27076
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27077
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27078
+ * set of stream descriptors it can offer for the device, synchronously, so the
27079
+ * broker can reconcile its registry against the authoritative provider state.
27080
+ */
27081
+ /**
27082
+ * The catalog as a DURABLE fact rather than a live answer.
27083
+ *
27084
+ * A battery camera's descriptors are profile-stable — they change when the
27085
+ * operator rewrites an encoder profile, not minute to minute — but building
27086
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27087
+ * provider is allowed to build them exactly once per profile and must serve
27088
+ * every later pull from a cache.
27089
+ *
27090
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27091
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27092
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27093
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27094
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27095
+ * which on a battery cam is most of the day. The camera was fine. The stream
27096
+ * was unreachable because the process had forgotten what the camera offers.
27097
+ *
27098
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27099
+ * declared collection, with the same `restored` durability `battery` uses for
27100
+ * the same reason: the last known value is the only value there is while the
27101
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27102
+ * is the DIAL that wakes a camera, never the catalog (D173).
27103
+ */
27104
+ var StreamCatalogStateSchema = object({
27105
+ /** The descriptors as last built from a real camera response. Never a guess:
27106
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27107
+ * one the camera itself once produced. */
27108
+ descriptors: array(CamStreamDescriptorSchema),
27109
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27110
+ * path decide whether the camera's own awake window is worth spending on a
27111
+ * re-read. */
27112
+ lastFetchedAt: number()
27113
+ });
27114
+ var streamCatalogCapability = {
27115
+ name: "stream-catalog",
27116
+ scope: "device",
27117
+ deviceNative: true,
27118
+ mode: "singleton",
27119
+ deviceTypes: [DeviceType.Camera],
27120
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27121
+ runtimeState: StreamCatalogStateSchema,
27122
+ /**
27123
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27124
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27125
+ * camera that cannot be watched at all until it happens to wake.
27126
+ *
27127
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27128
+ * build, and a build only runs when there is no cached copy (or the copy is
27129
+ * a day old and the camera is awake anyway).
27130
+ *
27131
+ * See `RuntimeStateDurability`. Enforced by
27132
+ * `scripts/check-runtime-state-durability.ts`.
27133
+ */
27134
+ durability: "restored",
27135
+ /** Clock field: written, but excluded from the compare that decides whether
27136
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27137
+ volatileStateFields: ["lastFetchedAt"]
27138
+ };
26157
27139
  /** One of the camera's stream profiles. */
26158
27140
  var StreamProfileSchema = _enum([
26159
27141
  "main",
@@ -26407,12 +27389,64 @@ var NetworkAddressSchema = object({
26407
27389
  family: string(),
26408
27390
  internal: boolean()
26409
27391
  });
27392
+ /**
27393
+ * Provenance of the site coordinates, and the whole reason this is not just two
27394
+ * numbers.
27395
+ *
27396
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27397
+ * nothing overwrites it.
27398
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27399
+ * default that is right to a few kilometres beats the coarse UTC clock split
27400
+ * the sun-times consumers otherwise fall back to.
27401
+ *
27402
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27403
+ * own input will eventually trust the guess.
27404
+ */
27405
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27406
+ /**
27407
+ * The read shape: the location plus the honest state of the one-shot derivation.
27408
+ *
27409
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27410
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27411
+ * failed; the hub will NOT try again on its own — the fallback is declared
27412
+ * (consumers degrade to their own last resort) and the operator either types the
27413
+ * coordinates or presses detect.
27414
+ */
27415
+ var SiteLocationStatusSchema = object({
27416
+ location: object({
27417
+ /** WGS84 decimal degrees. */
27418
+ latitude: number().min(-90).max(90),
27419
+ longitude: number().min(-180).max(180),
27420
+ source: SiteLocationSourceSchema,
27421
+ /** Epoch ms the value was last written. */
27422
+ updatedAt: number(),
27423
+ /**
27424
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27425
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27426
+ */
27427
+ label: string().optional()
27428
+ }).nullable(),
27429
+ derivationAttemptedAt: number().nullable(),
27430
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27431
+ derivationError: string().nullable()
27432
+ });
27433
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27434
+ var SetSiteLocationInputSchema = object({
27435
+ latitude: number().min(-90).max(90),
27436
+ longitude: number().min(-180).max(180)
27437
+ }).nullable();
26410
27438
  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(), {
26411
27439
  kind: "mutation",
26412
27440
  auth: "admin"
26413
27441
  }), method(_void(), _void(), {
26414
27442
  kind: "mutation",
26415
27443
  auth: "admin"
27444
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27445
+ kind: "mutation",
27446
+ auth: "admin"
27447
+ }), method(_void(), SiteLocationStatusSchema, {
27448
+ kind: "mutation",
27449
+ auth: "admin"
26416
27450
  });
26417
27451
  /**
26418
27452
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27732,6 +28766,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27732
28766
  humiditySensor: humiditySensorCapability,
27733
28767
  image: imageCapability,
27734
28768
  imageSettings: imageSettingsCapability,
28769
+ intercom: intercomCapability,
27735
28770
  lawnMowerControl: lawnMowerControlCapability,
27736
28771
  lockControl: lockControlCapability,
27737
28772
  mediaPlayer: mediaPlayerCapability,
@@ -27750,6 +28785,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27750
28785
  sceneMonitor: sceneMonitorCapability,
27751
28786
  scriptRunner: scriptRunnerCapability,
27752
28787
  smoke: smokeCapability,
28788
+ streamCatalog: streamCatalogCapability,
27753
28789
  streamParams: streamParamsCapability,
27754
28790
  switch: switchCapability,
27755
28791
  tamper: tamperCapability,
@@ -28403,6 +29439,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28403
29439
  labels: ["probe not implemented"]
28404
29440
  };
28405
29441
  }
29442
+ /**
29443
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29444
+ *
29445
+ * Four covers the fleets this ships to without turning a boot into a burst a
29446
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29447
+ * session with a serial command channel (a Baichuan hub, an NVR that
29448
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29449
+ */
29450
+ restoreConcurrency = 4;
28406
29451
  async restoreDevices(savedDevices) {
28407
29452
  await this.onRestoreDevices(savedDevices);
28408
29453
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28434,15 +29479,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28434
29479
  */
28435
29480
  async onRestoreDevices(savedDevices) {
28436
29481
  const restored = /* @__PURE__ */ new Set();
28437
- for (const saved of savedDevices) {
28438
- if (saved.parentDeviceId !== null) continue;
29482
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29483
+ const restoreOne = async (saved) => {
28439
29484
  const Class = this.deviceClasses[saved.type];
28440
29485
  if (!Class) {
28441
29486
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28442
29487
  tags: { stableId: saved.stableId },
28443
29488
  meta: { type: saved.type }
28444
29489
  });
28445
- continue;
29490
+ return;
28446
29491
  }
28447
29492
  try {
28448
29493
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28456,7 +29501,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28456
29501
  }
28457
29502
  });
28458
29503
  }
28459
- }
29504
+ };
29505
+ let nextTopLevel = 0;
29506
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29507
+ for (;;) {
29508
+ const saved = topLevel[nextTopLevel++];
29509
+ if (saved === void 0) return;
29510
+ await restoreOne(saved);
29511
+ }
29512
+ }));
28460
29513
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28461
29514
  for (const saved of childRows) {
28462
29515
  const Class = this.deviceClasses[saved.type];
@@ -30547,6 +31600,12 @@ Object.freeze({
30547
31600
  addonId: null,
30548
31601
  access: "create"
30549
31602
  },
31603
+ "llm.cancel": {
31604
+ capName: "llm",
31605
+ capScope: "system",
31606
+ addonId: null,
31607
+ access: "create"
31608
+ },
30550
31609
  "llm.deleteModel": {
30551
31610
  capName: "llm",
30552
31611
  capScope: "system",
@@ -30631,6 +31690,12 @@ Object.freeze({
30631
31690
  addonId: null,
30632
31691
  access: "view"
30633
31692
  },
31693
+ "llm.resolveModelRef": {
31694
+ capName: "llm",
31695
+ capScope: "system",
31696
+ addonId: null,
31697
+ access: "create"
31698
+ },
30634
31699
  "llm.setDefault": {
30635
31700
  capName: "llm",
30636
31701
  capScope: "system",
@@ -32797,6 +33862,12 @@ Object.freeze({
32797
33862
  addonId: null,
32798
33863
  access: "create"
32799
33864
  },
33865
+ "sceneMonitor.resetScene": {
33866
+ capName: "scene-monitor",
33867
+ capScope: "device",
33868
+ addonId: null,
33869
+ access: "delete"
33870
+ },
32800
33871
  "sceneMonitor.updateScene": {
32801
33872
  capName: "scene-monitor",
32802
33873
  capScope: "device",
@@ -33475,6 +34546,12 @@ Object.freeze({
33475
34546
  addonId: null,
33476
34547
  access: "create"
33477
34548
  },
34549
+ "system.detectSiteLocation": {
34550
+ capName: "system",
34551
+ capScope: "system",
34552
+ addonId: null,
34553
+ access: "create"
34554
+ },
33478
34555
  "system.featureFlags": {
33479
34556
  capName: "system",
33480
34557
  capScope: "system",
@@ -33493,6 +34570,12 @@ Object.freeze({
33493
34570
  addonId: null,
33494
34571
  access: "view"
33495
34572
  },
34573
+ "system.getSiteLocation": {
34574
+ capName: "system",
34575
+ capScope: "system",
34576
+ addonId: null,
34577
+ access: "view"
34578
+ },
33496
34579
  "system.health": {
33497
34580
  capName: "system",
33498
34581
  capScope: "system",
@@ -33517,6 +34600,12 @@ Object.freeze({
33517
34600
  addonId: null,
33518
34601
  access: "create"
33519
34602
  },
34603
+ "system.setSiteLocation": {
34604
+ capName: "system",
34605
+ capScope: "system",
34606
+ addonId: null,
34607
+ access: "create"
34608
+ },
33520
34609
  "terminalSession.adoptLegacyMonitor": {
33521
34610
  capName: "terminal-session",
33522
34611
  capScope: "system",
@@ -34088,6 +35177,1704 @@ Object.freeze({
34088
35177
  access: "create"
34089
35178
  }
34090
35179
  });
35180
+ Object.freeze({
35181
+ "accessories.setChildHidden": [{
35182
+ name: "childDeviceId",
35183
+ form: "single",
35184
+ optional: false
35185
+ }, {
35186
+ name: "deviceId",
35187
+ form: "single",
35188
+ optional: false
35189
+ }],
35190
+ "addonSettings.getDeviceSettings": [{
35191
+ name: "deviceId",
35192
+ form: "single",
35193
+ optional: false
35194
+ }],
35195
+ "addonSettings.updateDeviceSettings": [{
35196
+ name: "deviceId",
35197
+ form: "single",
35198
+ optional: false
35199
+ }],
35200
+ "alarmPanel.arm": [{
35201
+ name: "deviceId",
35202
+ form: "single",
35203
+ optional: false
35204
+ }],
35205
+ "alarmPanel.disarm": [{
35206
+ name: "deviceId",
35207
+ form: "single",
35208
+ optional: false
35209
+ }],
35210
+ "alarmPanel.trigger": [{
35211
+ name: "deviceId",
35212
+ form: "single",
35213
+ optional: false
35214
+ }],
35215
+ "audioAnalysis.resolveDeviceSettings": [{
35216
+ name: "deviceId",
35217
+ form: "single",
35218
+ optional: false
35219
+ }],
35220
+ "audioAnalyzer.classify": [{
35221
+ name: "deviceId",
35222
+ form: "single",
35223
+ optional: true
35224
+ }],
35225
+ "audioMetrics.getCurrentSnapshot": [{
35226
+ name: "deviceId",
35227
+ form: "single",
35228
+ optional: false
35229
+ }],
35230
+ "audioMetrics.getHistory": [{
35231
+ name: "deviceId",
35232
+ form: "single",
35233
+ optional: false
35234
+ }],
35235
+ "automationControl.disable": [{
35236
+ name: "deviceId",
35237
+ form: "single",
35238
+ optional: false
35239
+ }],
35240
+ "automationControl.enable": [{
35241
+ name: "deviceId",
35242
+ form: "single",
35243
+ optional: false
35244
+ }],
35245
+ "automationControl.trigger": [{
35246
+ name: "deviceId",
35247
+ form: "single",
35248
+ optional: false
35249
+ }],
35250
+ "battery.wakeForStream": [{
35251
+ name: "deviceId",
35252
+ form: "single",
35253
+ optional: false
35254
+ }],
35255
+ "brightness.setBrightness": [{
35256
+ name: "deviceId",
35257
+ form: "single",
35258
+ optional: false
35259
+ }],
35260
+ "button.press": [{
35261
+ name: "deviceId",
35262
+ form: "single",
35263
+ optional: false
35264
+ }],
35265
+ "cameraCredentials.getCredentials": [{
35266
+ name: "deviceId",
35267
+ form: "single",
35268
+ optional: false
35269
+ }],
35270
+ "cameraStreams.getBrokerStreams": [{
35271
+ name: "deviceId",
35272
+ form: "single",
35273
+ optional: false
35274
+ }],
35275
+ "cameraStreams.getCameraStreams": [{
35276
+ name: "deviceId",
35277
+ form: "single",
35278
+ optional: false
35279
+ }],
35280
+ "cameraStreams.getProfileRtspEntries": [{
35281
+ name: "deviceId",
35282
+ form: "single",
35283
+ optional: false
35284
+ }],
35285
+ "cameraStreams.getRtspEntries": [{
35286
+ name: "deviceId",
35287
+ form: "single",
35288
+ optional: false
35289
+ }],
35290
+ "cameraStreams.pickStream": [{
35291
+ name: "deviceId",
35292
+ form: "single",
35293
+ optional: false
35294
+ }],
35295
+ "climateControl.setFanMode": [{
35296
+ name: "deviceId",
35297
+ form: "single",
35298
+ optional: false
35299
+ }],
35300
+ "climateControl.setMode": [{
35301
+ name: "deviceId",
35302
+ form: "single",
35303
+ optional: false
35304
+ }],
35305
+ "climateControl.setPreset": [{
35306
+ name: "deviceId",
35307
+ form: "single",
35308
+ optional: false
35309
+ }],
35310
+ "climateControl.setSwingHorizontal": [{
35311
+ name: "deviceId",
35312
+ form: "single",
35313
+ optional: false
35314
+ }],
35315
+ "climateControl.setSwingVertical": [{
35316
+ name: "deviceId",
35317
+ form: "single",
35318
+ optional: false
35319
+ }],
35320
+ "climateControl.setTarget": [{
35321
+ name: "deviceId",
35322
+ form: "single",
35323
+ optional: false
35324
+ }],
35325
+ "climateControl.setTargetHumidity": [{
35326
+ name: "deviceId",
35327
+ form: "single",
35328
+ optional: false
35329
+ }],
35330
+ "climateControl.setTargetRange": [{
35331
+ name: "deviceId",
35332
+ form: "single",
35333
+ optional: false
35334
+ }],
35335
+ "color.setColor": [{
35336
+ name: "deviceId",
35337
+ form: "single",
35338
+ optional: false
35339
+ }],
35340
+ "consumables.reset": [{
35341
+ name: "deviceId",
35342
+ form: "single",
35343
+ optional: false
35344
+ }],
35345
+ "control.setValue": [{
35346
+ name: "deviceId",
35347
+ form: "single",
35348
+ optional: false
35349
+ }],
35350
+ "cover.close": [{
35351
+ name: "deviceId",
35352
+ form: "single",
35353
+ optional: false
35354
+ }],
35355
+ "cover.open": [{
35356
+ name: "deviceId",
35357
+ form: "single",
35358
+ optional: false
35359
+ }],
35360
+ "cover.setPosition": [{
35361
+ name: "deviceId",
35362
+ form: "single",
35363
+ optional: false
35364
+ }],
35365
+ "cover.setTiltPosition": [{
35366
+ name: "deviceId",
35367
+ form: "single",
35368
+ optional: false
35369
+ }],
35370
+ "cover.stop": [{
35371
+ name: "deviceId",
35372
+ form: "single",
35373
+ optional: false
35374
+ }],
35375
+ "dayNight.getOptions": [{
35376
+ name: "deviceId",
35377
+ form: "single",
35378
+ optional: false
35379
+ }],
35380
+ "dayNight.setSettings": [{
35381
+ name: "deviceId",
35382
+ form: "single",
35383
+ optional: false
35384
+ }],
35385
+ "decoder.createSession": [{
35386
+ name: "deviceId",
35387
+ form: "single",
35388
+ optional: true
35389
+ }],
35390
+ "deviceAdoption.release": [{
35391
+ name: "camDeviceId",
35392
+ form: "single",
35393
+ optional: false
35394
+ }],
35395
+ "deviceAdoption.resync": [{
35396
+ name: "camDeviceId",
35397
+ form: "single",
35398
+ optional: false
35399
+ }],
35400
+ "deviceDiscovery.adoptDevice": [{
35401
+ name: "deviceId",
35402
+ form: "single",
35403
+ optional: false
35404
+ }],
35405
+ "deviceDiscovery.listDiscovered": [{
35406
+ name: "deviceId",
35407
+ form: "single",
35408
+ optional: false
35409
+ }],
35410
+ "deviceDiscovery.refreshDiscovery": [{
35411
+ name: "deviceId",
35412
+ form: "single",
35413
+ optional: false
35414
+ }],
35415
+ "deviceDiscovery.releaseDevice": [{
35416
+ name: "childDeviceId",
35417
+ form: "single",
35418
+ optional: false
35419
+ }, {
35420
+ name: "deviceId",
35421
+ form: "single",
35422
+ optional: false
35423
+ }],
35424
+ "deviceManager.adoptionRelease": [{
35425
+ name: "camDeviceId",
35426
+ form: "single",
35427
+ optional: false
35428
+ }],
35429
+ "deviceManager.adoptionResync": [{
35430
+ name: "camDeviceId",
35431
+ form: "single",
35432
+ optional: false
35433
+ }],
35434
+ "deviceManager.applyInitialMeta": [{
35435
+ name: "deviceId",
35436
+ form: "single",
35437
+ optional: false
35438
+ }, {
35439
+ name: "linkDeviceId",
35440
+ form: "single",
35441
+ optional: true
35442
+ }],
35443
+ "deviceManager.disable": [{
35444
+ name: "deviceId",
35445
+ form: "single",
35446
+ optional: false
35447
+ }],
35448
+ "deviceManager.enable": [{
35449
+ name: "deviceId",
35450
+ form: "single",
35451
+ optional: false
35452
+ }],
35453
+ "deviceManager.getBindings": [{
35454
+ name: "deviceId",
35455
+ form: "single",
35456
+ optional: false
35457
+ }],
35458
+ "deviceManager.getChildren": [{
35459
+ name: "parentDeviceId",
35460
+ form: "single",
35461
+ optional: false
35462
+ }],
35463
+ "deviceManager.getConfigSchema": [{
35464
+ name: "deviceId",
35465
+ form: "single",
35466
+ optional: false
35467
+ }],
35468
+ "deviceManager.getDevice": [{
35469
+ name: "deviceId",
35470
+ form: "single",
35471
+ optional: false
35472
+ }],
35473
+ "deviceManager.getDeviceAggregate": [{
35474
+ name: "deviceId",
35475
+ form: "single",
35476
+ optional: false
35477
+ }],
35478
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35479
+ name: "deviceId",
35480
+ form: "single",
35481
+ optional: false
35482
+ }],
35483
+ "deviceManager.getDeviceSettingsAggregate": [{
35484
+ name: "deviceId",
35485
+ form: "single",
35486
+ optional: false
35487
+ }],
35488
+ "deviceManager.getDeviceStatusAggregate": [{
35489
+ name: "deviceId",
35490
+ form: "single",
35491
+ optional: false
35492
+ }],
35493
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35494
+ name: "deviceIds",
35495
+ form: "array",
35496
+ optional: false
35497
+ }],
35498
+ "deviceManager.getLinkedDevices": [{
35499
+ name: "deviceId",
35500
+ form: "single",
35501
+ optional: false
35502
+ }],
35503
+ "deviceManager.getSettingsSchema": [{
35504
+ name: "deviceId",
35505
+ form: "single",
35506
+ optional: false
35507
+ }],
35508
+ "deviceManager.getStreamProfileMap": [{
35509
+ name: "deviceId",
35510
+ form: "single",
35511
+ optional: false
35512
+ }],
35513
+ "deviceManager.getStreamSources": [{
35514
+ name: "deviceId",
35515
+ form: "single",
35516
+ optional: false
35517
+ }],
35518
+ "deviceManager.getWireableFields": [{
35519
+ name: "deviceId",
35520
+ form: "single",
35521
+ optional: false
35522
+ }],
35523
+ "deviceManager.loadConfig": [{
35524
+ name: "deviceId",
35525
+ form: "single",
35526
+ optional: false
35527
+ }],
35528
+ "deviceManager.loadMeta": [{
35529
+ name: "deviceId",
35530
+ form: "single",
35531
+ optional: false
35532
+ }],
35533
+ "deviceManager.loadRuntimeState": [{
35534
+ name: "deviceId",
35535
+ form: "single",
35536
+ optional: false
35537
+ }],
35538
+ "deviceManager.persistConfig": [{
35539
+ name: "deviceId",
35540
+ form: "single",
35541
+ optional: false
35542
+ }],
35543
+ "deviceManager.probeStreams": [{
35544
+ name: "deviceId",
35545
+ form: "single",
35546
+ optional: false
35547
+ }],
35548
+ "deviceManager.registerDevice": [{
35549
+ name: "parentDeviceId",
35550
+ form: "single",
35551
+ optional: true
35552
+ }],
35553
+ "deviceManager.remove": [{
35554
+ name: "deviceId",
35555
+ form: "single",
35556
+ optional: false
35557
+ }],
35558
+ "deviceManager.removeDevice": [{
35559
+ name: "deviceId",
35560
+ form: "single",
35561
+ optional: false
35562
+ }],
35563
+ "deviceManager.runDeviceAction": [{
35564
+ name: "deviceId",
35565
+ form: "single",
35566
+ optional: false
35567
+ }],
35568
+ "deviceManager.setChildLayout": [{
35569
+ name: "deviceId",
35570
+ form: "single",
35571
+ optional: false
35572
+ }],
35573
+ "deviceManager.setDisabled": [{
35574
+ name: "deviceId",
35575
+ form: "single",
35576
+ optional: false
35577
+ }],
35578
+ "deviceManager.setDisplay": [{
35579
+ name: "deviceId",
35580
+ form: "single",
35581
+ optional: false
35582
+ }],
35583
+ "deviceManager.setIntegrationId": [{
35584
+ name: "deviceId",
35585
+ form: "single",
35586
+ optional: false
35587
+ }],
35588
+ "deviceManager.setLinkDeviceId": [{
35589
+ name: "deviceId",
35590
+ form: "single",
35591
+ optional: false
35592
+ }, {
35593
+ name: "linkDeviceId",
35594
+ form: "single",
35595
+ optional: true
35596
+ }],
35597
+ "deviceManager.setLocation": [{
35598
+ name: "deviceId",
35599
+ form: "single",
35600
+ optional: false
35601
+ }],
35602
+ "deviceManager.setMetadata": [{
35603
+ name: "deviceId",
35604
+ form: "single",
35605
+ optional: false
35606
+ }],
35607
+ "deviceManager.setName": [{
35608
+ name: "deviceId",
35609
+ form: "single",
35610
+ optional: false
35611
+ }],
35612
+ "deviceManager.setPrimaryChildEntityId": [{
35613
+ name: "deviceId",
35614
+ form: "single",
35615
+ optional: false
35616
+ }],
35617
+ "deviceManager.setRole": [{
35618
+ name: "deviceId",
35619
+ form: "single",
35620
+ optional: false
35621
+ }],
35622
+ "deviceManager.setStreamProfileMap": [{
35623
+ name: "deviceId",
35624
+ form: "single",
35625
+ optional: false
35626
+ }],
35627
+ "deviceManager.setType": [{
35628
+ name: "deviceId",
35629
+ form: "single",
35630
+ optional: false
35631
+ }],
35632
+ "deviceManager.setWrapperActive": [{
35633
+ name: "deviceId",
35634
+ form: "single",
35635
+ optional: false
35636
+ }],
35637
+ "deviceManager.testField": [{
35638
+ name: "deviceId",
35639
+ form: "single",
35640
+ optional: false
35641
+ }],
35642
+ "deviceManager.updateConfig": [{
35643
+ name: "deviceId",
35644
+ form: "single",
35645
+ optional: false
35646
+ }],
35647
+ "deviceManager.updateDeviceField": [{
35648
+ name: "deviceId",
35649
+ form: "single",
35650
+ optional: false
35651
+ }],
35652
+ "deviceManager.updateDeviceFieldsBatch": [{
35653
+ name: "deviceId",
35654
+ form: "single",
35655
+ optional: false
35656
+ }],
35657
+ "deviceOps.getConfigEntries": [{
35658
+ name: "deviceId",
35659
+ form: "single",
35660
+ optional: false
35661
+ }],
35662
+ "deviceOps.getRawState": [{
35663
+ name: "deviceId",
35664
+ form: "single",
35665
+ optional: false
35666
+ }],
35667
+ "deviceOps.getSettingsSchema": [{
35668
+ name: "deviceId",
35669
+ form: "single",
35670
+ optional: false
35671
+ }],
35672
+ "deviceOps.getStreamSources": [{
35673
+ name: "deviceId",
35674
+ form: "single",
35675
+ optional: false
35676
+ }],
35677
+ "deviceOps.removeDevice": [{
35678
+ name: "deviceId",
35679
+ form: "single",
35680
+ optional: false
35681
+ }],
35682
+ "deviceOps.runAction": [{
35683
+ name: "deviceId",
35684
+ form: "single",
35685
+ optional: false
35686
+ }],
35687
+ "deviceOps.setConfig": [{
35688
+ name: "deviceId",
35689
+ form: "single",
35690
+ optional: false
35691
+ }],
35692
+ "deviceState.getCapSlice": [{
35693
+ name: "deviceId",
35694
+ form: "single",
35695
+ optional: false
35696
+ }],
35697
+ "deviceState.getSnapshot": [{
35698
+ name: "deviceId",
35699
+ form: "single",
35700
+ optional: false
35701
+ }],
35702
+ "deviceState.setCapSlice": [{
35703
+ name: "deviceId",
35704
+ form: "single",
35705
+ optional: false
35706
+ }],
35707
+ "events.getEventClipUrl": [{
35708
+ name: "deviceId",
35709
+ form: "single",
35710
+ optional: false
35711
+ }],
35712
+ "events.getEvents": [{
35713
+ name: "deviceId",
35714
+ form: "single",
35715
+ optional: false
35716
+ }],
35717
+ "events.getEventThumbnail": [{
35718
+ name: "deviceId",
35719
+ form: "single",
35720
+ optional: false
35721
+ }],
35722
+ "faceGallery.getFaceByTrack": [{
35723
+ name: "deviceId",
35724
+ form: "single",
35725
+ optional: false
35726
+ }],
35727
+ "faceGallery.listRecentFaces": [{
35728
+ name: "deviceId",
35729
+ form: "single",
35730
+ optional: true
35731
+ }],
35732
+ "fanControl.setDirection": [{
35733
+ name: "deviceId",
35734
+ form: "single",
35735
+ optional: false
35736
+ }],
35737
+ "fanControl.setOscillating": [{
35738
+ name: "deviceId",
35739
+ form: "single",
35740
+ optional: false
35741
+ }],
35742
+ "fanControl.setPercentage": [{
35743
+ name: "deviceId",
35744
+ form: "single",
35745
+ optional: false
35746
+ }],
35747
+ "fanControl.setPreset": [{
35748
+ name: "deviceId",
35749
+ form: "single",
35750
+ optional: false
35751
+ }],
35752
+ "humidifier.setMode": [{
35753
+ name: "deviceId",
35754
+ form: "single",
35755
+ optional: false
35756
+ }],
35757
+ "humidifier.setOn": [{
35758
+ name: "deviceId",
35759
+ form: "single",
35760
+ optional: false
35761
+ }],
35762
+ "humidifier.setTargetHumidity": [{
35763
+ name: "deviceId",
35764
+ form: "single",
35765
+ optional: false
35766
+ }],
35767
+ "imageSettings.getOptions": [{
35768
+ name: "deviceId",
35769
+ form: "single",
35770
+ optional: false
35771
+ }],
35772
+ "imageSettings.setSettings": [{
35773
+ name: "deviceId",
35774
+ form: "single",
35775
+ optional: false
35776
+ }],
35777
+ "intercom.endTalkSession": [{
35778
+ name: "deviceId",
35779
+ form: "single",
35780
+ optional: false
35781
+ }],
35782
+ "intercom.handleAnswer": [{
35783
+ name: "deviceId",
35784
+ form: "single",
35785
+ optional: false
35786
+ }],
35787
+ "intercom.pushTalkAudio": [{
35788
+ name: "deviceId",
35789
+ form: "single",
35790
+ optional: false
35791
+ }],
35792
+ "intercom.startSession": [{
35793
+ name: "deviceId",
35794
+ form: "single",
35795
+ optional: false
35796
+ }],
35797
+ "intercom.startTalkSession": [{
35798
+ name: "deviceId",
35799
+ form: "single",
35800
+ optional: false
35801
+ }],
35802
+ "intercom.stopSession": [{
35803
+ name: "deviceId",
35804
+ form: "single",
35805
+ optional: false
35806
+ }],
35807
+ "lawnMowerControl.dock": [{
35808
+ name: "deviceId",
35809
+ form: "single",
35810
+ optional: false
35811
+ }],
35812
+ "lawnMowerControl.pause": [{
35813
+ name: "deviceId",
35814
+ form: "single",
35815
+ optional: false
35816
+ }],
35817
+ "lawnMowerControl.startMowing": [{
35818
+ name: "deviceId",
35819
+ form: "single",
35820
+ optional: false
35821
+ }],
35822
+ "lockControl.lock": [{
35823
+ name: "deviceId",
35824
+ form: "single",
35825
+ optional: false
35826
+ }],
35827
+ "lockControl.open": [{
35828
+ name: "deviceId",
35829
+ form: "single",
35830
+ optional: false
35831
+ }],
35832
+ "lockControl.unlock": [{
35833
+ name: "deviceId",
35834
+ form: "single",
35835
+ optional: false
35836
+ }],
35837
+ "mediaPlayer.next": [{
35838
+ name: "deviceId",
35839
+ form: "single",
35840
+ optional: false
35841
+ }],
35842
+ "mediaPlayer.pause": [{
35843
+ name: "deviceId",
35844
+ form: "single",
35845
+ optional: false
35846
+ }],
35847
+ "mediaPlayer.play": [{
35848
+ name: "deviceId",
35849
+ form: "single",
35850
+ optional: false
35851
+ }],
35852
+ "mediaPlayer.playMedia": [{
35853
+ name: "deviceId",
35854
+ form: "single",
35855
+ optional: false
35856
+ }],
35857
+ "mediaPlayer.previous": [{
35858
+ name: "deviceId",
35859
+ form: "single",
35860
+ optional: false
35861
+ }],
35862
+ "mediaPlayer.seek": [{
35863
+ name: "deviceId",
35864
+ form: "single",
35865
+ optional: false
35866
+ }],
35867
+ "mediaPlayer.selectSource": [{
35868
+ name: "deviceId",
35869
+ form: "single",
35870
+ optional: false
35871
+ }],
35872
+ "mediaPlayer.setMute": [{
35873
+ name: "deviceId",
35874
+ form: "single",
35875
+ optional: false
35876
+ }],
35877
+ "mediaPlayer.setRepeat": [{
35878
+ name: "deviceId",
35879
+ form: "single",
35880
+ optional: false
35881
+ }],
35882
+ "mediaPlayer.setShuffle": [{
35883
+ name: "deviceId",
35884
+ form: "single",
35885
+ optional: false
35886
+ }],
35887
+ "mediaPlayer.setVolume": [{
35888
+ name: "deviceId",
35889
+ form: "single",
35890
+ optional: false
35891
+ }],
35892
+ "mediaPlayer.stop": [{
35893
+ name: "deviceId",
35894
+ form: "single",
35895
+ optional: false
35896
+ }],
35897
+ "motion.isDetected": [{
35898
+ name: "deviceId",
35899
+ form: "single",
35900
+ optional: false
35901
+ }],
35902
+ "motionDetection.analyze": [{
35903
+ name: "deviceId",
35904
+ form: "single",
35905
+ optional: false
35906
+ }],
35907
+ "motionDetection.removeCamera": [{
35908
+ name: "deviceId",
35909
+ form: "single",
35910
+ optional: false
35911
+ }],
35912
+ "motionTrigger.setMotionTrigger": [{
35913
+ name: "deviceId",
35914
+ form: "single",
35915
+ optional: false
35916
+ }],
35917
+ "motionZones.getOptions": [{
35918
+ name: "deviceId",
35919
+ form: "single",
35920
+ optional: false
35921
+ }],
35922
+ "motionZones.setZone": [{
35923
+ name: "deviceId",
35924
+ form: "single",
35925
+ optional: false
35926
+ }],
35927
+ "nativeObjectDetection.setEnabled": [{
35928
+ name: "deviceId",
35929
+ form: "single",
35930
+ optional: false
35931
+ }],
35932
+ "networkQuality.getDeviceStats": [{
35933
+ name: "deviceId",
35934
+ form: "single",
35935
+ optional: false
35936
+ }],
35937
+ "networkQuality.reportClientStats": [{
35938
+ name: "deviceId",
35939
+ form: "single",
35940
+ optional: false
35941
+ }],
35942
+ "notificationRules.setDeviceMuted": [{
35943
+ name: "deviceId",
35944
+ form: "single",
35945
+ optional: false
35946
+ }],
35947
+ "notifier.cancel": [{
35948
+ name: "deviceId",
35949
+ form: "single",
35950
+ optional: false
35951
+ }],
35952
+ "notifier.send": [{
35953
+ name: "deviceId",
35954
+ form: "single",
35955
+ optional: false
35956
+ }],
35957
+ "osd.setOverlay": [{
35958
+ name: "deviceId",
35959
+ form: "single",
35960
+ optional: false
35961
+ }],
35962
+ "osdManager.clearSlotBinding": [{
35963
+ name: "deviceId",
35964
+ form: "single",
35965
+ optional: false
35966
+ }],
35967
+ "osdManager.copyDeviceConfiguration": [{
35968
+ name: "sourceDeviceId",
35969
+ form: "single",
35970
+ optional: false
35971
+ }, {
35972
+ name: "targetDeviceId",
35973
+ form: "single",
35974
+ optional: false
35975
+ }],
35976
+ "osdManager.getDeviceOsd": [{
35977
+ name: "deviceId",
35978
+ form: "single",
35979
+ optional: false
35980
+ }],
35981
+ "osdManager.getSourceCatalog": [{
35982
+ name: "deviceId",
35983
+ form: "single",
35984
+ optional: false
35985
+ }],
35986
+ "osdManager.previewSlot": [{
35987
+ name: "deviceId",
35988
+ form: "single",
35989
+ optional: false
35990
+ }],
35991
+ "osdManager.renderDevice": [{
35992
+ name: "deviceId",
35993
+ form: "single",
35994
+ optional: false
35995
+ }],
35996
+ "osdManager.setSlotBinding": [{
35997
+ name: "deviceId",
35998
+ form: "single",
35999
+ optional: false
36000
+ }],
36001
+ "petFeeder.callPet": [{
36002
+ name: "deviceId",
36003
+ form: "single",
36004
+ optional: false
36005
+ }],
36006
+ "petFeeder.cancelFeed": [{
36007
+ name: "deviceId",
36008
+ form: "single",
36009
+ optional: false
36010
+ }],
36011
+ "petFeeder.feed": [{
36012
+ name: "deviceId",
36013
+ form: "single",
36014
+ optional: false
36015
+ }],
36016
+ "petFeeder.markFoodReplenished": [{
36017
+ name: "deviceId",
36018
+ form: "single",
36019
+ optional: false
36020
+ }],
36021
+ "petFeeder.playSound": [{
36022
+ name: "deviceId",
36023
+ form: "single",
36024
+ optional: false
36025
+ }],
36026
+ "petFeeder.resetDesiccant": [{
36027
+ name: "deviceId",
36028
+ form: "single",
36029
+ optional: false
36030
+ }],
36031
+ "petFeeder.setChildLock": [{
36032
+ name: "deviceId",
36033
+ form: "single",
36034
+ optional: false
36035
+ }],
36036
+ "petFeeder.setFeedSound": [{
36037
+ name: "deviceId",
36038
+ form: "single",
36039
+ optional: false
36040
+ }],
36041
+ "petFeeder.setIndicatorLight": [{
36042
+ name: "deviceId",
36043
+ form: "single",
36044
+ optional: false
36045
+ }],
36046
+ "petFeeder.setVolume": [{
36047
+ name: "deviceId",
36048
+ form: "single",
36049
+ optional: false
36050
+ }],
36051
+ "pipelineAnalytics.clearTracks": [{
36052
+ name: "deviceId",
36053
+ form: "single",
36054
+ optional: false
36055
+ }],
36056
+ "pipelineAnalytics.completeRetrainTrack": [{
36057
+ name: "deviceId",
36058
+ form: "single",
36059
+ optional: false
36060
+ }],
36061
+ "pipelineAnalytics.deleteDeviceEvents": [{
36062
+ name: "deviceId",
36063
+ form: "single",
36064
+ optional: false
36065
+ }],
36066
+ "pipelineAnalytics.deleteTracks": [{
36067
+ name: "deviceId",
36068
+ form: "single",
36069
+ optional: false
36070
+ }],
36071
+ "pipelineAnalytics.deselectRetrainFrame": [{
36072
+ name: "deviceId",
36073
+ form: "single",
36074
+ optional: false
36075
+ }],
36076
+ "pipelineAnalytics.getActiveTracks": [{
36077
+ name: "deviceId",
36078
+ form: "single",
36079
+ optional: false
36080
+ }],
36081
+ "pipelineAnalytics.getAudioEvents": [{
36082
+ name: "deviceId",
36083
+ form: "single",
36084
+ optional: false
36085
+ }],
36086
+ "pipelineAnalytics.getEventDensity": [{
36087
+ name: "deviceId",
36088
+ form: "single",
36089
+ optional: false
36090
+ }],
36091
+ "pipelineAnalytics.getEventMedia": [{
36092
+ name: "deviceId",
36093
+ form: "single",
36094
+ optional: false
36095
+ }],
36096
+ "pipelineAnalytics.getKeyEvents": [{
36097
+ name: "deviceId",
36098
+ form: "single",
36099
+ optional: false
36100
+ }],
36101
+ "pipelineAnalytics.getMotionEvents": [{
36102
+ name: "deviceId",
36103
+ form: "single",
36104
+ optional: false
36105
+ }],
36106
+ "pipelineAnalytics.getObjectEvents": [{
36107
+ name: "deviceId",
36108
+ form: "single",
36109
+ optional: false
36110
+ }],
36111
+ "pipelineAnalytics.getRetrainExportUrl": [{
36112
+ name: "deviceIds",
36113
+ form: "array",
36114
+ optional: true
36115
+ }],
36116
+ "pipelineAnalytics.getSensorEvents": [{
36117
+ name: "deviceId",
36118
+ form: "single",
36119
+ optional: false
36120
+ }],
36121
+ "pipelineAnalytics.getTrack": [{
36122
+ name: "deviceId",
36123
+ form: "single",
36124
+ optional: false
36125
+ }],
36126
+ "pipelineAnalytics.getTrackMedia": [{
36127
+ name: "deviceId",
36128
+ form: "single",
36129
+ optional: false
36130
+ }],
36131
+ "pipelineAnalytics.getTrainingExportSummary": [{
36132
+ name: "deviceIds",
36133
+ form: "array",
36134
+ optional: true
36135
+ }],
36136
+ "pipelineAnalytics.getTrainingExportUrl": [{
36137
+ name: "deviceIds",
36138
+ form: "array",
36139
+ optional: true
36140
+ }],
36141
+ "pipelineAnalytics.listEventKinds": [{
36142
+ name: "deviceId",
36143
+ form: "single",
36144
+ optional: false
36145
+ }],
36146
+ "pipelineAnalytics.listEventKindsBatch": [{
36147
+ name: "deviceIds",
36148
+ form: "array",
36149
+ optional: false
36150
+ }],
36151
+ "pipelineAnalytics.listOpsLog": [{
36152
+ name: "deviceId",
36153
+ form: "single",
36154
+ optional: true
36155
+ }],
36156
+ "pipelineAnalytics.listRecentTracks": [{
36157
+ name: "deviceIds",
36158
+ form: "array",
36159
+ optional: false
36160
+ }],
36161
+ "pipelineAnalytics.listRetrainStaging": [{
36162
+ name: "deviceIds",
36163
+ form: "array",
36164
+ optional: true
36165
+ }],
36166
+ "pipelineAnalytics.listTrackMedia": [{
36167
+ name: "deviceId",
36168
+ form: "single",
36169
+ optional: false
36170
+ }],
36171
+ "pipelineAnalytics.listTracks": [{
36172
+ name: "deviceId",
36173
+ form: "single",
36174
+ optional: false
36175
+ }],
36176
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36177
+ name: "deviceId",
36178
+ form: "single",
36179
+ optional: false
36180
+ }],
36181
+ "pipelineAnalytics.pruneEventsBefore": [{
36182
+ name: "deviceId",
36183
+ form: "single",
36184
+ optional: false
36185
+ }],
36186
+ "pipelineAnalytics.pruneTracksBefore": [{
36187
+ name: "deviceId",
36188
+ form: "single",
36189
+ optional: false
36190
+ }],
36191
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36192
+ name: "deviceId",
36193
+ form: "single",
36194
+ optional: true
36195
+ }],
36196
+ "pipelineAnalytics.restageRetrainTrack": [{
36197
+ name: "deviceId",
36198
+ form: "single",
36199
+ optional: false
36200
+ }],
36201
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36202
+ name: "deviceId",
36203
+ form: "single",
36204
+ optional: false
36205
+ }],
36206
+ "pipelineAnalytics.searchObjectEvents": [{
36207
+ name: "deviceId",
36208
+ form: "single",
36209
+ optional: true
36210
+ }],
36211
+ "pipelineAnalytics.selectRetrainFrames": [{
36212
+ name: "deviceId",
36213
+ form: "single",
36214
+ optional: false
36215
+ }],
36216
+ "pipelineAnalytics.setTrackFlags": [{
36217
+ name: "deviceId",
36218
+ form: "single",
36219
+ optional: false
36220
+ }],
36221
+ "pipelineAnalytics.wipeAllAnalytics": [{
36222
+ name: "deviceId",
36223
+ form: "single",
36224
+ optional: false
36225
+ }],
36226
+ "pipelineExecutor.runPipeline": [{
36227
+ name: "deviceId",
36228
+ form: "single",
36229
+ optional: true
36230
+ }],
36231
+ "pipelineExecutor.runPipelineBatch": [{
36232
+ name: "deviceId",
36233
+ form: "single",
36234
+ optional: true
36235
+ }],
36236
+ "pipelineOrchestrator.assignAudio": [{
36237
+ name: "deviceId",
36238
+ form: "single",
36239
+ optional: false
36240
+ }],
36241
+ "pipelineOrchestrator.assignPipeline": [{
36242
+ name: "deviceId",
36243
+ form: "single",
36244
+ optional: false
36245
+ }],
36246
+ "pipelineOrchestrator.getAudioAssignment": [{
36247
+ name: "deviceId",
36248
+ form: "single",
36249
+ optional: false
36250
+ }],
36251
+ "pipelineOrchestrator.getCameraMetrics": [{
36252
+ name: "deviceId",
36253
+ form: "single",
36254
+ optional: false
36255
+ }],
36256
+ "pipelineOrchestrator.getCameraSettings": [{
36257
+ name: "deviceId",
36258
+ form: "single",
36259
+ optional: false
36260
+ }],
36261
+ "pipelineOrchestrator.getCameraStatus": [{
36262
+ name: "deviceId",
36263
+ form: "single",
36264
+ optional: false
36265
+ }],
36266
+ "pipelineOrchestrator.getCameraStatuses": [{
36267
+ name: "deviceIds",
36268
+ form: "array",
36269
+ optional: true
36270
+ }],
36271
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36272
+ name: "deviceId",
36273
+ form: "single",
36274
+ optional: false
36275
+ }],
36276
+ "pipelineOrchestrator.getCameraSwitches": [{
36277
+ name: "deviceId",
36278
+ form: "single",
36279
+ optional: false
36280
+ }],
36281
+ "pipelineOrchestrator.getPipelineAssignment": [{
36282
+ name: "deviceId",
36283
+ form: "single",
36284
+ optional: false
36285
+ }],
36286
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36287
+ name: "deviceId",
36288
+ form: "single",
36289
+ optional: false
36290
+ }],
36291
+ "pipelineOrchestrator.resolvePipeline": [{
36292
+ name: "deviceId",
36293
+ form: "single",
36294
+ optional: false
36295
+ }],
36296
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36297
+ name: "deviceId",
36298
+ form: "single",
36299
+ optional: false
36300
+ }],
36301
+ "pipelineOrchestrator.setCameraStepOverride": [{
36302
+ name: "deviceId",
36303
+ form: "single",
36304
+ optional: false
36305
+ }],
36306
+ "pipelineOrchestrator.setCameraStepToggle": [{
36307
+ name: "deviceId",
36308
+ form: "single",
36309
+ optional: false
36310
+ }],
36311
+ "pipelineOrchestrator.setCameraSwitch": [{
36312
+ name: "deviceId",
36313
+ form: "single",
36314
+ optional: false
36315
+ }],
36316
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36317
+ name: "deviceId",
36318
+ form: "single",
36319
+ optional: false
36320
+ }],
36321
+ "pipelineOrchestrator.unassignAudio": [{
36322
+ name: "deviceId",
36323
+ form: "single",
36324
+ optional: false
36325
+ }],
36326
+ "pipelineOrchestrator.unassignPipeline": [{
36327
+ name: "deviceId",
36328
+ form: "single",
36329
+ optional: false
36330
+ }],
36331
+ "pipelineRunner.attachCamera": [{
36332
+ name: "deviceId",
36333
+ form: "single",
36334
+ optional: false
36335
+ }],
36336
+ "pipelineRunner.detachCamera": [{
36337
+ name: "deviceId",
36338
+ form: "single",
36339
+ optional: false
36340
+ }],
36341
+ "pipelineRunner.getCameraMetrics": [{
36342
+ name: "deviceId",
36343
+ form: "single",
36344
+ optional: false
36345
+ }],
36346
+ "pipelineRunner.reportMotion": [{
36347
+ name: "deviceId",
36348
+ form: "single",
36349
+ optional: false
36350
+ }],
36351
+ "pipelineRunner.runDetailSubtree": [{
36352
+ name: "deviceId",
36353
+ form: "single",
36354
+ optional: false
36355
+ }],
36356
+ "pipelineRunner.runStatelessStep": [{
36357
+ name: "sourceDeviceId",
36358
+ form: "single",
36359
+ optional: false
36360
+ }],
36361
+ "plateGallery.getPlateByTrack": [{
36362
+ name: "deviceId",
36363
+ form: "single",
36364
+ optional: false
36365
+ }],
36366
+ "plateGallery.listPlates": [{
36367
+ name: "deviceId",
36368
+ form: "single",
36369
+ optional: true
36370
+ }],
36371
+ "privacyMask.getOptions": [{
36372
+ name: "deviceId",
36373
+ form: "single",
36374
+ optional: false
36375
+ }],
36376
+ "privacyMask.setAudioEnabled": [{
36377
+ name: "deviceId",
36378
+ form: "single",
36379
+ optional: false
36380
+ }],
36381
+ "privacyMask.setMask": [{
36382
+ name: "deviceId",
36383
+ form: "single",
36384
+ optional: false
36385
+ }],
36386
+ "ptz.continuousMove": [{
36387
+ name: "deviceId",
36388
+ form: "single",
36389
+ optional: false
36390
+ }],
36391
+ "ptz.deletePreset": [{
36392
+ name: "deviceId",
36393
+ form: "single",
36394
+ optional: false
36395
+ }],
36396
+ "ptz.getOptions": [{
36397
+ name: "deviceId",
36398
+ form: "single",
36399
+ optional: false
36400
+ }],
36401
+ "ptz.getPosition": [{
36402
+ name: "deviceId",
36403
+ form: "single",
36404
+ optional: false
36405
+ }],
36406
+ "ptz.getPresets": [{
36407
+ name: "deviceId",
36408
+ form: "single",
36409
+ optional: false
36410
+ }],
36411
+ "ptz.goHome": [{
36412
+ name: "deviceId",
36413
+ form: "single",
36414
+ optional: false
36415
+ }],
36416
+ "ptz.goToPreset": [{
36417
+ name: "deviceId",
36418
+ form: "single",
36419
+ optional: false
36420
+ }],
36421
+ "ptz.move": [{
36422
+ name: "deviceId",
36423
+ form: "single",
36424
+ optional: false
36425
+ }],
36426
+ "ptz.savePreset": [{
36427
+ name: "deviceId",
36428
+ form: "single",
36429
+ optional: false
36430
+ }],
36431
+ "ptz.setAutofocus": [{
36432
+ name: "deviceId",
36433
+ form: "single",
36434
+ optional: false
36435
+ }],
36436
+ "ptz.stop": [{
36437
+ name: "deviceId",
36438
+ form: "single",
36439
+ optional: false
36440
+ }],
36441
+ "ptzAutotrack.getSettings": [{
36442
+ name: "deviceId",
36443
+ form: "single",
36444
+ optional: false
36445
+ }],
36446
+ "ptzAutotrack.getStatus": [{
36447
+ name: "deviceId",
36448
+ form: "single",
36449
+ optional: false
36450
+ }],
36451
+ "ptzAutotrack.setEnabled": [{
36452
+ name: "deviceId",
36453
+ form: "single",
36454
+ optional: false
36455
+ }],
36456
+ "ptzAutotrack.setSettings": [{
36457
+ name: "deviceId",
36458
+ form: "single",
36459
+ optional: false
36460
+ }],
36461
+ "reboot.reboot": [{
36462
+ name: "deviceId",
36463
+ form: "single",
36464
+ optional: false
36465
+ }],
36466
+ "recording.deleteFootprint": [{
36467
+ name: "deviceId",
36468
+ form: "single",
36469
+ optional: false
36470
+ }],
36471
+ "recording.getAvailability": [{
36472
+ name: "deviceId",
36473
+ form: "single",
36474
+ optional: false
36475
+ }],
36476
+ "recording.getDaysWithRecordings": [{
36477
+ name: "deviceId",
36478
+ form: "single",
36479
+ optional: false
36480
+ }],
36481
+ "recording.getDeviceConfig": [{
36482
+ name: "deviceId",
36483
+ form: "single",
36484
+ optional: false
36485
+ }],
36486
+ "recording.getPlaybackManifest": [{
36487
+ name: "deviceId",
36488
+ form: "single",
36489
+ optional: false
36490
+ }],
36491
+ "recording.listOpsLog": [{
36492
+ name: "deviceId",
36493
+ form: "single",
36494
+ optional: true
36495
+ }],
36496
+ "recording.locateSegment": [{
36497
+ name: "deviceId",
36498
+ form: "single",
36499
+ optional: false
36500
+ }],
36501
+ "recording.pruneFootage": [{
36502
+ name: "deviceId",
36503
+ form: "single",
36504
+ optional: false
36505
+ }],
36506
+ "recording.readGopBytes": [{
36507
+ name: "deviceId",
36508
+ form: "single",
36509
+ optional: false
36510
+ }],
36511
+ "recording.readSegmentBytes": [{
36512
+ name: "deviceId",
36513
+ form: "single",
36514
+ optional: false
36515
+ }],
36516
+ "recording.relocateFootage": [{
36517
+ name: "deviceId",
36518
+ form: "single",
36519
+ optional: true
36520
+ }],
36521
+ "recording.renderClip": [{
36522
+ name: "deviceId",
36523
+ form: "single",
36524
+ optional: false
36525
+ }],
36526
+ "recording.renderGif": [{
36527
+ name: "deviceId",
36528
+ form: "single",
36529
+ optional: false
36530
+ }],
36531
+ "recording.rescanStorage": [{
36532
+ name: "deviceId",
36533
+ form: "single",
36534
+ optional: false
36535
+ }],
36536
+ "recording.setDeviceConfig": [{
36537
+ name: "deviceId",
36538
+ form: "single",
36539
+ optional: false
36540
+ }],
36541
+ "recording.startStorageMigrationMove": [{
36542
+ name: "deviceId",
36543
+ form: "single",
36544
+ optional: true
36545
+ }],
36546
+ "recordingExport.createExport": [{
36547
+ name: "deviceId",
36548
+ form: "single",
36549
+ optional: false
36550
+ }],
36551
+ "recordingExport.listExports": [{
36552
+ name: "deviceId",
36553
+ form: "single",
36554
+ optional: true
36555
+ }],
36556
+ "sceneMonitor.captureReference": [{
36557
+ name: "deviceId",
36558
+ form: "single",
36559
+ optional: false
36560
+ }],
36561
+ "sceneMonitor.createScene": [{
36562
+ name: "deviceId",
36563
+ form: "single",
36564
+ optional: false
36565
+ }],
36566
+ "sceneMonitor.deleteReference": [{
36567
+ name: "deviceId",
36568
+ form: "single",
36569
+ optional: false
36570
+ }],
36571
+ "sceneMonitor.deleteScene": [{
36572
+ name: "deviceId",
36573
+ form: "single",
36574
+ optional: false
36575
+ }],
36576
+ "sceneMonitor.listScenes": [{
36577
+ name: "deviceId",
36578
+ form: "single",
36579
+ optional: false
36580
+ }],
36581
+ "sceneMonitor.recheckNow": [{
36582
+ name: "deviceId",
36583
+ form: "single",
36584
+ optional: false
36585
+ }],
36586
+ "sceneMonitor.resetScene": [{
36587
+ name: "deviceId",
36588
+ form: "single",
36589
+ optional: false
36590
+ }],
36591
+ "sceneMonitor.updateScene": [{
36592
+ name: "deviceId",
36593
+ form: "single",
36594
+ optional: false
36595
+ }],
36596
+ "scriptRunner.run": [{
36597
+ name: "deviceId",
36598
+ form: "single",
36599
+ optional: false
36600
+ }],
36601
+ "scriptRunner.stop": [{
36602
+ name: "deviceId",
36603
+ form: "single",
36604
+ optional: false
36605
+ }],
36606
+ "snapshot.getSnapshot": [{
36607
+ name: "deviceId",
36608
+ form: "single",
36609
+ optional: false
36610
+ }],
36611
+ "snapshot.getSnapshotLinks": [{
36612
+ name: "targets",
36613
+ form: "object-array",
36614
+ optional: false,
36615
+ itemField: "deviceId"
36616
+ }],
36617
+ "snapshot.getSnapshotOverview": [{
36618
+ name: "deviceIds",
36619
+ form: "array",
36620
+ optional: false
36621
+ }],
36622
+ "snapshot.invalidateCache": [{
36623
+ name: "deviceId",
36624
+ form: "single",
36625
+ optional: false
36626
+ }],
36627
+ "streamBroker.acquireEgressTranscode": [{
36628
+ name: "deviceId",
36629
+ form: "single",
36630
+ optional: false
36631
+ }],
36632
+ "streamBroker.assignProfile": [{
36633
+ name: "deviceId",
36634
+ form: "single",
36635
+ optional: false
36636
+ }],
36637
+ "streamBroker.getDeviceAudioMute": [{
36638
+ name: "deviceId",
36639
+ form: "single",
36640
+ optional: false
36641
+ }],
36642
+ "streamBroker.getStreamWithCodec": [{
36643
+ name: "deviceId",
36644
+ form: "single",
36645
+ optional: false
36646
+ }],
36647
+ "streamBroker.produceEventMedia": [{
36648
+ name: "deviceId",
36649
+ form: "single",
36650
+ optional: false
36651
+ }],
36652
+ "streamBroker.publishCameraStream": [{
36653
+ name: "deviceId",
36654
+ form: "single",
36655
+ optional: false
36656
+ }],
36657
+ "streamBroker.renderPreBufferClip": [{
36658
+ name: "deviceId",
36659
+ form: "single",
36660
+ optional: false
36661
+ }],
36662
+ "streamBroker.restartProfile": [{
36663
+ name: "deviceId",
36664
+ form: "single",
36665
+ optional: false
36666
+ }],
36667
+ "streamBroker.retractCameraStream": [{
36668
+ name: "deviceId",
36669
+ form: "single",
36670
+ optional: false
36671
+ }],
36672
+ "streamBroker.setDeviceAudioMute": [{
36673
+ name: "deviceId",
36674
+ form: "single",
36675
+ optional: false
36676
+ }],
36677
+ "streamBroker.unassignProfile": [{
36678
+ name: "deviceId",
36679
+ form: "single",
36680
+ optional: false
36681
+ }],
36682
+ "streamCatalog.getCatalog": [{
36683
+ name: "deviceId",
36684
+ form: "single",
36685
+ optional: false
36686
+ }],
36687
+ "streamParams.getConfigSchema": [{
36688
+ name: "deviceId",
36689
+ form: "single",
36690
+ optional: false
36691
+ }],
36692
+ "streamParams.getOptions": [{
36693
+ name: "deviceId",
36694
+ form: "single",
36695
+ optional: false
36696
+ }],
36697
+ "streamParams.setProfile": [{
36698
+ name: "deviceId",
36699
+ form: "single",
36700
+ optional: false
36701
+ }],
36702
+ "switch.setState": [{
36703
+ name: "deviceId",
36704
+ form: "single",
36705
+ optional: false
36706
+ }],
36707
+ "vacuumControl.locate": [{
36708
+ name: "deviceId",
36709
+ form: "single",
36710
+ optional: false
36711
+ }],
36712
+ "vacuumControl.pause": [{
36713
+ name: "deviceId",
36714
+ form: "single",
36715
+ optional: false
36716
+ }],
36717
+ "vacuumControl.returnToBase": [{
36718
+ name: "deviceId",
36719
+ form: "single",
36720
+ optional: false
36721
+ }],
36722
+ "vacuumControl.setFanSpeed": [{
36723
+ name: "deviceId",
36724
+ form: "single",
36725
+ optional: false
36726
+ }],
36727
+ "vacuumControl.start": [{
36728
+ name: "deviceId",
36729
+ form: "single",
36730
+ optional: false
36731
+ }],
36732
+ "vacuumControl.stop": [{
36733
+ name: "deviceId",
36734
+ form: "single",
36735
+ optional: false
36736
+ }],
36737
+ "valve.close": [{
36738
+ name: "deviceId",
36739
+ form: "single",
36740
+ optional: false
36741
+ }],
36742
+ "valve.open": [{
36743
+ name: "deviceId",
36744
+ form: "single",
36745
+ optional: false
36746
+ }],
36747
+ "valve.setPosition": [{
36748
+ name: "deviceId",
36749
+ form: "single",
36750
+ optional: false
36751
+ }],
36752
+ "valve.stop": [{
36753
+ name: "deviceId",
36754
+ form: "single",
36755
+ optional: false
36756
+ }],
36757
+ "videoclips.getClipPlayback": [{
36758
+ name: "deviceId",
36759
+ form: "single",
36760
+ optional: false
36761
+ }],
36762
+ "videoclips.listClips": [{
36763
+ name: "deviceId",
36764
+ form: "single",
36765
+ optional: false
36766
+ }],
36767
+ "waterHeater.setAway": [{
36768
+ name: "deviceId",
36769
+ form: "single",
36770
+ optional: false
36771
+ }],
36772
+ "waterHeater.setOperationMode": [{
36773
+ name: "deviceId",
36774
+ form: "single",
36775
+ optional: false
36776
+ }],
36777
+ "waterHeater.setTargetTemp": [{
36778
+ name: "deviceId",
36779
+ form: "single",
36780
+ optional: false
36781
+ }],
36782
+ "webrtcSession.addIceCandidate": [{
36783
+ name: "deviceId",
36784
+ form: "single",
36785
+ optional: false
36786
+ }],
36787
+ "webrtcSession.closeSession": [{
36788
+ name: "deviceId",
36789
+ form: "single",
36790
+ optional: false
36791
+ }],
36792
+ "webrtcSession.createSession": [{
36793
+ name: "deviceId",
36794
+ form: "single",
36795
+ optional: false
36796
+ }],
36797
+ "webrtcSession.getIceCandidates": [{
36798
+ name: "deviceId",
36799
+ form: "single",
36800
+ optional: false
36801
+ }],
36802
+ "webrtcSession.getSessionState": [{
36803
+ name: "deviceId",
36804
+ form: "single",
36805
+ optional: false
36806
+ }],
36807
+ "webrtcSession.handleAnswer": [{
36808
+ name: "deviceId",
36809
+ form: "single",
36810
+ optional: false
36811
+ }],
36812
+ "webrtcSession.handleOffer": [{
36813
+ name: "deviceId",
36814
+ form: "single",
36815
+ optional: false
36816
+ }],
36817
+ "webrtcSession.hasAdaptiveBitrate": [{
36818
+ name: "deviceId",
36819
+ form: "single",
36820
+ optional: false
36821
+ }],
36822
+ "webrtcSession.listStreams": [{
36823
+ name: "deviceId",
36824
+ form: "single",
36825
+ optional: false
36826
+ }],
36827
+ "zoneAnalytics.getCameraHistory": [{
36828
+ name: "deviceId",
36829
+ form: "single",
36830
+ optional: false
36831
+ }],
36832
+ "zoneAnalytics.getCurrentSnapshot": [{
36833
+ name: "deviceId",
36834
+ form: "single",
36835
+ optional: false
36836
+ }],
36837
+ "zoneAnalytics.getUnzonedHistory": [{
36838
+ name: "deviceId",
36839
+ form: "single",
36840
+ optional: false
36841
+ }],
36842
+ "zoneAnalytics.getZoneHistory": [{
36843
+ name: "deviceId",
36844
+ form: "single",
36845
+ optional: false
36846
+ }],
36847
+ "zoneRules.listRules": [{
36848
+ name: "deviceId",
36849
+ form: "single",
36850
+ optional: false
36851
+ }],
36852
+ "zoneRules.setRules": [{
36853
+ name: "deviceId",
36854
+ form: "single",
36855
+ optional: false
36856
+ }],
36857
+ "zones.addZone": [{
36858
+ name: "deviceId",
36859
+ form: "single",
36860
+ optional: false
36861
+ }],
36862
+ "zones.listZones": [{
36863
+ name: "deviceId",
36864
+ form: "single",
36865
+ optional: false
36866
+ }],
36867
+ "zones.removeZone": [{
36868
+ name: "deviceId",
36869
+ form: "single",
36870
+ optional: false
36871
+ }],
36872
+ "zones.updateZone": [{
36873
+ name: "deviceId",
36874
+ form: "single",
36875
+ optional: false
36876
+ }]
36877
+ });
34091
36878
  Object.freeze({
34092
36879
  "broker": "broker",
34093
36880
  "device-export": "device-export",