@camstack/addon-provider-homematic 1.2.17 → 1.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +2938 -151
  2. package/dist/addon.mjs +2938 -151
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8,7 +8,7 @@ let http = require("http");
8
8
  let crypto$1 = require("crypto");
9
9
  let fs_promises = require("fs/promises");
10
10
  let path = require("path");
11
- //#region ../types/dist/event-category-Cv9dO26A.mjs
11
+ //#region ../types/dist/event-category-Bxo5yJjt.mjs
12
12
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
13
13
  EventCategory["SystemBoot"] = "system.boot";
14
14
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -215,6 +215,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
215
215
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
216
216
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
217
217
  /**
218
+ * A node the orchestrator would otherwise place cameras on has NO usable
219
+ * inference device: the operator enabled one or more accelerators there and
220
+ * the live probe reports every one of them unavailable. Emitted once per
221
+ * TRANSITION into that state (never per dispatch), and the node is dropped
222
+ * from the placement candidate set for as long as it holds.
223
+ *
224
+ * This exists because the state was previously invisible: little-unraid
225
+ * absorbed 283k inference errors in a day while still being handed cameras,
226
+ * and nothing in the system said so.
227
+ *
228
+ * A node with no accelerators configured at all is NOT this — its devices
229
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
230
+ * serves it exactly as before.
231
+ */
232
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
233
+ /**
234
+ * A camera has an OPEN detection session and has produced no detection at
235
+ * all for longer than the blind threshold — the camera is being decoded and
236
+ * inferred and is returning nothing. Emitted once per transition into blind,
237
+ * per camera.
238
+ *
239
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
240
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
241
+ * camera" produce byte-identical silence.
242
+ */
243
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
244
+ /**
218
245
  * Per-camera pipeline config was mutated by the orchestrator
219
246
  * (3-level settings change via `setAgentAddonDefaults` /
220
247
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -10948,6 +10975,8 @@ var QueryFilterSchema = object({
10948
10975
  where: record(string(), unknown()).optional(),
10949
10976
  whereIn: record(string(), array(unknown())).optional(),
10950
10977
  whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
10978
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
10979
+ whereNot: record(string(), unknown()).optional(),
10951
10980
  orderBy: object({
10952
10981
  field: string(),
10953
10982
  direction: _enum(["asc", "desc"])
@@ -10967,7 +10996,8 @@ var QueryFilterSchema = object({
10967
10996
  var MutationFilterSchema = object({
10968
10997
  where: record(string(), unknown()).optional(),
10969
10998
  whereIn: record(string(), array(unknown())).optional(),
10970
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional()
10999
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
11000
+ whereNot: record(string(), unknown()).optional()
10971
11001
  });
10972
11002
  /** A single stored record: `{ id, data }`. */
10973
11003
  var SettingsRecordSchema = object({
@@ -12503,6 +12533,17 @@ var LlmImageSchema = object({
12503
12533
  bytes: _instanceof(Uint8Array),
12504
12534
  mimeType: string()
12505
12535
  });
12536
+ /**
12537
+ * Retry policy. `enabled: false` is NOT the same as `maxAttempts: 1` in intent —
12538
+ * the flag is what a consumer table flips, the count is what the operator tunes.
12539
+ * A retry doubles the wall time of a call, so the two gates that run inside a
12540
+ * notification's budget keep it off (see `CONSUMER_RETRY_POLICY` in addon-ai).
12541
+ */
12542
+ var LlmRetryPolicySchema = object({
12543
+ enabled: boolean().default(false),
12544
+ /** Total attempts INCLUDING the first. 1 = no retry. */
12545
+ maxAttempts: number().int().min(1).max(5).default(1)
12546
+ });
12506
12547
  var LlmGenerateBaseInputSchema = object({
12507
12548
  /** Collection routing (the notification-output posture). */
12508
12549
  addonId: string().optional(),
@@ -12517,7 +12558,28 @@ var LlmGenerateBaseInputSchema = object({
12517
12558
  jsonSchema: record(string(), unknown()).optional(),
12518
12559
  /** Per-call override of the profile default. */
12519
12560
  maxTokens: number().int().positive().optional(),
12520
- temperature: number().optional()
12561
+ temperature: number().optional(),
12562
+ /** Per-call override of the profile default (nucleus sampling). */
12563
+ topP: number().min(0).max(1).optional(),
12564
+ /** Per-call override of the profile default (top-k sampling). */
12565
+ topK: number().int().positive().optional(),
12566
+ /** Per-call override of `profile.timeoutMs` — the total generation bound. */
12567
+ timeoutMs: number().int().positive().optional(),
12568
+ /** Per-call override; beats both the consumer table and the profile. */
12569
+ retry: LlmRetryPolicySchema.optional(),
12570
+ /**
12571
+ * Caller-minted id that makes this generation CANCELLABLE.
12572
+ *
12573
+ * Without it a caller that stops waiting cannot stop the work: the gates race
12574
+ * the call against 8 s and free their own slot when the timer wins, while the
12575
+ * generation upstream keeps running to `profile.timeoutMs` — 60 s by default,
12576
+ * on a single-threaded local model. The per-camera bound then counts WAITS,
12577
+ * not generations, and the real load is unbounded.
12578
+ *
12579
+ * `AbortSignal` cannot cross a process boundary; an id can. Pass one here and
12580
+ * `llm.cancel({ requestId })` tears the socket down.
12581
+ */
12582
+ requestId: string().optional()
12521
12583
  });
12522
12584
  /**
12523
12585
  * `llm-runtime` — node-side managed llama.cpp executor (spec §4). Registered
@@ -12530,6 +12592,18 @@ var LlmGenerateBaseInputSchema = object({
12530
12592
  * Resource ceiling = llama-server flags + idleStopMinutes ONLY (no RSS
12531
12593
  * watchdog — operator decision #3).
12532
12594
  */
12595
+ /**
12596
+ * A companion artifact that MUST land beside the main GGUF: the `mmproj`
12597
+ * projector of a vision model, or shards 2..N of a split GGUF. Carried on the
12598
+ * REF rather than looked up at install time, so what the operator approved in
12599
+ * the preview is exactly what the node downloads.
12600
+ */
12601
+ var ManagedModelExtraFileSchema = object({
12602
+ url: string(),
12603
+ filename: string(),
12604
+ sizeBytes: number(),
12605
+ sha256: string().optional()
12606
+ });
12533
12607
  var ManagedModelRefSchema = discriminatedUnion("kind", [
12534
12608
  object({
12535
12609
  kind: literal("catalog"),
@@ -12538,7 +12612,11 @@ var ManagedModelRefSchema = discriminatedUnion("kind", [
12538
12612
  object({
12539
12613
  kind: literal("url"),
12540
12614
  url: string(),
12541
- sha256: string().optional()
12615
+ sha256: string().optional(),
12616
+ /** Picker/status label; the file basename when absent. */
12617
+ label: string().optional(),
12618
+ sizeBytes: number().optional(),
12619
+ extraFiles: array(ManagedModelExtraFileSchema).optional()
12542
12620
  }),
12543
12621
  object({
12544
12622
  kind: literal("path"),
@@ -12556,13 +12634,82 @@ var ManagedRuntimeConfigSchema = object({
12556
12634
  gpuLayers: number().int().default(0),
12557
12635
  /** Default: cpus-2, clamped ≥1 (resolved node-side). */
12558
12636
  threads: number().int().optional(),
12559
- /** Concurrent slots. */
12637
+ /** Concurrent slots (`--parallel`). */
12560
12638
  parallel: number().int().default(1),
12639
+ /** Logical batch size (`-b`). Larger = faster prompt ingest, more RAM. */
12640
+ batchSize: number().int().positive().optional(),
12641
+ /** Physical batch / micro-batch (`-ub`). */
12642
+ ubatchSize: number().int().positive().optional(),
12643
+ /**
12644
+ * `--flash-attn`. Cuts KV-cache memory on the backends that implement it and
12645
+ * is a no-op elsewhere, so it is offered rather than assumed.
12646
+ */
12647
+ flashAttention: boolean().default(false),
12648
+ /**
12649
+ * `--mlock`. Pins the weights in RAM so the OS cannot page them out mid
12650
+ * inference. Costs the full model size in resident memory — which is exactly
12651
+ * what the RAM budget is counting.
12652
+ */
12653
+ mlock: boolean().default(false),
12654
+ /**
12655
+ * `--no-mmap`. Reads the whole GGUF up front instead of mapping it. Slower to
12656
+ * start, but avoids the page-fault stalls a network or spinning-disk model
12657
+ * store produces on every first token.
12658
+ */
12659
+ noMmap: boolean().default(false),
12660
+ /** `--cache-type-k` / `--cache-type-v` — quantising the KV cache is the
12661
+ * cheapest way to fit a longer context in the same RAM. */
12662
+ cacheTypeK: _enum([
12663
+ "f32",
12664
+ "f16",
12665
+ "q8_0",
12666
+ "q5_1",
12667
+ "q5_0",
12668
+ "q4_1",
12669
+ "q4_0"
12670
+ ]).optional(),
12671
+ cacheTypeV: _enum([
12672
+ "f32",
12673
+ "f16",
12674
+ "q8_0",
12675
+ "q5_1",
12676
+ "q5_0",
12677
+ "q4_1",
12678
+ "q4_0"
12679
+ ]).optional(),
12680
+ /**
12681
+ * Escape hatch for llama-server flags this schema does NOT model — `--jinja`
12682
+ * (which most vision chat templates need and some language-only models
12683
+ * dislike), `--cont-batching`, `--rope-scaling`, …
12684
+ *
12685
+ * It is NOT a second place to set the flags above. A token that collides
12686
+ * with a typed field is REJECTED at start, naming the field that owns it
12687
+ * (`assertNoOwnedFlags`), because two knobs writing the same argv is exactly
12688
+ * the "two switches that disagree" failure this repo has already shipped
12689
+ * twice (D62).
12690
+ */
12691
+ extraArgs: array(string()).default([]),
12561
12692
  /** Else lazy: first generate boots it. */
12562
12693
  autoStart: boolean().default(false),
12563
12694
  /** 0 = never; frees RAM after quiet periods. */
12564
12695
  idleStopMinutes: number().int().default(30)
12565
12696
  });
12697
+ /**
12698
+ * Where a multi-GB install currently is. A single 0..1 fraction cannot answer
12699
+ * "is it stuck?" for an install that is three files (shards + mmproj) followed
12700
+ * by a sha256 pass over 22 GB — during which the fraction sat at 1.0 and the
12701
+ * node looked hung. Phase + file + bytes is the smallest shape that does.
12702
+ */
12703
+ var LlmDownloadProgressSchema = object({
12704
+ phase: _enum(["downloading", "verifying"]),
12705
+ /** The artifact currently moving, e.g. `mmproj-F16.gguf`. */
12706
+ file: string(),
12707
+ fileIndex: number().int(),
12708
+ fileCount: number().int(),
12709
+ /** Across the WHOLE install, not the current file. */
12710
+ downloadedBytes: number(),
12711
+ totalBytes: number().optional()
12712
+ });
12566
12713
  var LlmRuntimeStatusSchema = object({
12567
12714
  /** Status is ALWAYS node-qualified. */
12568
12715
  nodeId: string(),
@@ -12579,6 +12726,8 @@ var LlmRuntimeStatusSchema = object({
12579
12726
  modelPath: string().optional(),
12580
12727
  modelId: string().optional(),
12581
12728
  downloadProgress: number().min(0).max(1).optional(),
12729
+ /** Detail behind `downloadProgress`; present for the same lifetime. */
12730
+ download: LlmDownloadProgressSchema.optional(),
12582
12731
  lastError: string().optional(),
12583
12732
  crashesInWindow: number(),
12584
12733
  /** Child RSS (sampled best-effort). */
@@ -12589,7 +12738,14 @@ var LlmNodeModelSchema = object({
12589
12738
  file: string(),
12590
12739
  sizeBytes: number(),
12591
12740
  catalogId: string().optional(),
12592
- installedAt: number().optional()
12741
+ installedAt: number().optional(),
12742
+ /**
12743
+ * Absolute path on the node. Present so a file that is on disk but matches
12744
+ * no catalog entry — a custom Hugging Face install, or a GGUF the operator
12745
+ * copied in by hand — is still SELECTABLE, as a `{kind:'path'}` ref. Without
12746
+ * it the picker could list such a file and do nothing with it.
12747
+ */
12748
+ path: string().optional()
12593
12749
  });
12594
12750
  var LlmRuntimeDiskUsageSchema = object({
12595
12751
  nodeId: string(),
@@ -12645,10 +12801,47 @@ var LlmProfileSchema = object({
12645
12801
  baseUrl: string().optional(),
12646
12802
  /** ConfigUISchema type:'password' — never round-trips (spec §5). */
12647
12803
  apiKey: string().optional(),
12804
+ /** Vision on/off. A vision call against a `false` profile is REFUSED, never
12805
+ * degraded to text — that shipped once and produced a confident answer to a
12806
+ * question about a picture nobody sent. */
12648
12807
  supportsVision: boolean(),
12649
12808
  temperature: number().min(0).max(2).optional(),
12809
+ /** Nucleus sampling. Every wire we speak has it. */
12810
+ topP: number().min(0).max(1).optional(),
12811
+ /** Top-k sampling. Carried only by the wires that have it — NEITHER OpenAI
12812
+ * wire does, and the client drops it there (measured: the request body gets
12813
+ * `top_p` and no `top_k`). The profile editor hides the field wherever it
12814
+ * would change nothing; `KINDS_WITH_TOP_K` is the single owner of that list. */
12815
+ topK: number().int().positive().optional(),
12650
12816
  maxTokens: number().int().positive().optional(),
12817
+ /** Prompt context window. Advisory for cloud kinds (they enforce their own);
12818
+ * for `managed-local` it is the llama.cpp `--ctx-size` the runtime starts
12819
+ * the model with, so it is the one field that changes a PROCESS. */
12820
+ contextLength: number().int().positive().optional(),
12821
+ /** Default system prompt. A caller's `system` REPLACES it (never appends —
12822
+ * two system prompts fighting is worse than either alone). */
12823
+ systemPrompt: string().optional(),
12824
+ /** Total generation bound — the only one a unary call has. */
12651
12825
  timeoutMs: number().int().positive().default(6e4),
12826
+ /** The TCP handshake only — "is the port even open". NOT the wait for
12827
+ * response headers: on the LM Studio / llama-server wire those are written
12828
+ * once the model has finished loading, so they belong to the bound below. */
12829
+ connectTimeoutMs: number().int().positive().default(1e4),
12830
+ /** Accepted, but no output yet — response headers included, because a cold
12831
+ * GPU load is exactly what happens before them. */
12832
+ firstTokenTimeoutMs: number().int().positive().default(12e4),
12833
+ /** Output started then stopped. */
12834
+ idleTimeoutMs: number().int().positive().default(6e4),
12835
+ /** Profile-level default. The per-consumer table and a per-call override
12836
+ * both beat it — see `resolveRetryPolicy`. */
12837
+ retry: LlmRetryPolicySchema.default({
12838
+ enabled: false,
12839
+ maxAttempts: 1
12840
+ }),
12841
+ /** Whether this profile may use tools. The tool-call plumbing rides the
12842
+ * library; the REGISTRY of callable tools is ours and is empty in v1, so a
12843
+ * `true` here buys the wiring, not behaviour, until tools are registered. */
12844
+ toolsEnabled: boolean().default(false),
12652
12845
  extraHeaders: record(string(), string()).optional(),
12653
12846
  /** kind === 'managed-local' only (spec §4). */
12654
12847
  runtime: ManagedRuntimeConfigSchema.optional()
@@ -12698,6 +12891,36 @@ var ManagedModelCatalogEntrySchema = object({
12698
12891
  /** Vision models: companion projector file. */
12699
12892
  mmprojUrl: string().optional()
12700
12893
  });
12894
+ /**
12895
+ * The outcome of turning one operator-typed Hugging Face reference into a
12896
+ * download plan. A RESULT, never a throw: "this repo has 24 quantizations and
12897
+ * I will not pick for you" is a normal answer the UI has to render, not an
12898
+ * exception.
12899
+ *
12900
+ * `candidates` is the whole reason the refusal is usable — every string in it
12901
+ * is a tag that resolves when pasted back as `<org>/<repo>:<TAG>`.
12902
+ */
12903
+ var HfModelResolutionSchema = discriminatedUnion("ok", [object({
12904
+ ok: literal(true),
12905
+ /** Ready to hand to `installModel` unchanged. */
12906
+ model: ManagedModelRefSchema,
12907
+ label: string(),
12908
+ repo: string(),
12909
+ quantization: string(),
12910
+ purpose: _enum(["text", "vision"]),
12911
+ totalBytes: number(),
12912
+ /** mmproj + shards, for the preview: an operator approving 23 GB should
12913
+ * see that 0.9 GB of it is a projector they did not name. */
12914
+ extraFilenames: array(string())
12915
+ }), object({
12916
+ ok: literal(false),
12917
+ code: string(),
12918
+ message: string(),
12919
+ candidates: array(string()).optional(),
12920
+ /** Set when the refusal was only the ceiling: re-calling with
12921
+ * `maxBytes: requiredBytes` is the operator's explicit override. */
12922
+ requiredBytes: number().optional()
12923
+ })]);
12701
12924
  var LlmRuntimeNodeSchema = object({
12702
12925
  nodeId: string(),
12703
12926
  reachable: boolean(),
@@ -12710,7 +12933,10 @@ var ProfileRefInputSchema = object({
12710
12933
  addonId: string(),
12711
12934
  profileId: string()
12712
12935
  });
12713
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12936
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
12937
+ addonId: string().optional(),
12938
+ requestId: string()
12939
+ }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
12714
12940
  kind: "mutation",
12715
12941
  auth: "admin"
12716
12942
  }), method(ProfileRefInputSchema, _void(), {
@@ -12731,6 +12957,15 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
12731
12957
  consumer: string().optional(),
12732
12958
  profileId: string().optional()
12733
12959
  }), array(LlmUsageRollupSchema)), method(object({}), array(ManagedModelCatalogEntrySchema)), method(object({}), array(LlmRuntimeNodeSchema)), method(object({ nodeId: string() }), array(LlmNodeModelSchema)), method(object({
12960
+ /** `https://huggingface.co/<org>/<repo>/resolve/main/<f>.gguf`,
12961
+ * `<org>/<repo>/<f>.gguf`, `<org>/<repo>` or `<org>/<repo>:<QUANT>`. */
12962
+ ref: string(),
12963
+ /** Explicit ceiling override, in bytes. Absent = the built-in ceiling. */
12964
+ maxBytes: number().positive().optional()
12965
+ }), HfModelResolutionSchema, {
12966
+ kind: "mutation",
12967
+ auth: "admin"
12968
+ }), method(object({
12734
12969
  nodeId: string(),
12735
12970
  model: ManagedModelRefSchema
12736
12971
  }), _void(), {
@@ -13290,11 +13525,33 @@ var NotificationFormatSchema = _enum([
13290
13525
  * Named by INTENT, never by glyph. "check" would tie the vocabulary to one
13291
13526
  * renderer's icon set; "acknowledge" survives an adapter that draws it
13292
13527
  * differently.
13528
+ *
13529
+ * ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
13530
+ *
13531
+ * These names are for US. **No adapter may forward one verbatim.** Each maps
13532
+ * the whole set onto its own renderer's vocabulary through a
13533
+ * `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
13534
+ * fallback, so adding a member here fails every adapter's build until someone
13535
+ * decides its glyph, which is the only place that decision can be made
13536
+ * honestly.
13537
+ *
13538
+ * This paragraph is the bug. Zentik declared `actionIcons: true` and passed
13539
+ * `disarm` straight through; iOS feeds that string to
13540
+ * `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
13541
+ * and every snooze and alarm button arrived BLANK. A pass-through is not a
13542
+ * mapping, and "the field is documented" is not "the value renders".
13543
+ *
13544
+ * Adding a member is TRAIN-BOUND. The enum lives in the published
13545
+ * `@camstack/server` closure and the cap seam validates against the HUB's copy,
13546
+ * so an addon that emits a token the running hub does not know does not lose an
13547
+ * icon — its whole `send` fails Zod validation and the notification never
13548
+ * arrives. Never emit a new token from an addon before the train carrying it.
13293
13549
  */
13294
13550
  var NotificationActionIconSchema = _enum([
13295
13551
  "acknowledge",
13296
13552
  "dismiss",
13297
13553
  "silence",
13554
+ "snooze",
13298
13555
  "view",
13299
13556
  "play",
13300
13557
  "open",
@@ -13302,9 +13559,13 @@ var NotificationActionIconSchema = _enum([
13302
13559
  "lock",
13303
13560
  "unlock",
13304
13561
  "arm",
13562
+ "arm-home",
13563
+ "arm-away",
13564
+ "arm-night",
13305
13565
  "disarm",
13306
13566
  "light",
13307
- "alert"
13567
+ "alert",
13568
+ "camera"
13308
13569
  ]);
13309
13570
  /** A single tap-through action button. */
13310
13571
  var NotificationActionSchema = object({
@@ -13504,6 +13765,24 @@ method(object({}), array(TargetKindSchema)), method(object({}), array(TargetSche
13504
13765
  targetId: string(),
13505
13766
  enabled: boolean()
13506
13767
  }), _void(), { kind: "mutation" });
13768
+ new Set([
13769
+ {
13770
+ id: "person",
13771
+ name: "Person"
13772
+ },
13773
+ {
13774
+ id: "vehicle",
13775
+ name: "Vehicle"
13776
+ },
13777
+ {
13778
+ id: "animal",
13779
+ name: "Animal"
13780
+ },
13781
+ {
13782
+ id: "package",
13783
+ name: "Package"
13784
+ }
13785
+ ].map((l) => l.id));
13507
13786
  var COCO_TO_MACRO = {
13508
13787
  mapping: {
13509
13788
  person: "person",
@@ -14334,11 +14613,15 @@ var NcSystemEventKindSchema = _enum([
14334
14613
  "stream-offline",
14335
14614
  "node-online",
14336
14615
  "node-offline",
14616
+ "node-inference-unavailable",
14617
+ "detection-blind",
14337
14618
  "addon-update-available",
14338
14619
  "server-update-available",
14339
14620
  "alarm-triggered",
14340
14621
  "alarm-armed",
14341
14622
  "alarm-disarmed",
14623
+ "alarm-arming",
14624
+ "alarm-arm-refused",
14342
14625
  "camera-online",
14343
14626
  "camera-offline",
14344
14627
  "camera-disabled",
@@ -14393,7 +14676,16 @@ var NcScheduleSchema = object({
14393
14676
  });
14394
14677
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
14395
14678
  var NcPlateMatcherSchema = object({
14396
- values: array(string().min(1)).min(1),
14679
+ /**
14680
+ * Plate texts (or gallery vehicle names) to match. EMPTY = **any plate the
14681
+ * pipeline could read** — the plate half of "no selection = no narrowing",
14682
+ * and the switch that says this rule is about vehicles that were IDENTIFIED
14683
+ * rather than merely seen. A subject carrying no plate still fails.
14684
+ *
14685
+ * The `.min(1)` this used to carry made that state unauthorable; nothing has
14686
+ * ever persisted an empty list, so widening it cannot change an existing rule.
14687
+ */
14688
+ values: array(string().min(1)),
14397
14689
  /** Max Levenshtein distance after normalization (uppercase alphanumeric). */
14398
14690
  maxDistance: number().int().min(0).max(3).default(1)
14399
14691
  });
@@ -14427,28 +14719,36 @@ var NcOccupancyConditionSchema = object({
14427
14719
  /**
14428
14720
  * Audio condition (IMMEDIATE trigger) — a rule on SOUND, not on a picture.
14429
14721
  *
14430
- * Operator-approved vocabulary (2026-08-12, option A — the same one the
14431
- * reference notifier uses, so an operator moving between them re-uses what
14432
- * they already know): a rule matches when, over a sampling window of
14433
- * `samplingSeconds`, at least `hitPercent`% of the audio samples in that
14434
- * window are HITS. A sample is a hit when it satisfies BOTH present filters:
14435
- *
14436
- * - `dbThreshold` — its level is at or above this many dBFS (see
14437
- * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale);
14438
- * - `labels` — the classifier put at least one of these labels on it.
14439
- *
14440
- * Both are OPTIONAL and independent, which is the point of the shape: a
14441
- * loudness rule ("something loud at 3am") needs no model to be right, and a
14442
- * label rule ("a dog barked") needs no threshold. **Fail-closed when NEITHER
14443
- * is given** — a window in which every sample is trivially a hit would fire on
14444
- * silence, so the engine refuses such a condition rather than notifying on
14445
- * nothing (the schema cannot express "at least one of" without becoming a
14446
- * ZodEffects the cap path would have to special-case).
14447
- *
14448
- * `hitPercent` is over the samples the window actually HOLDS, and the window
14449
- * must be FULL before it can match — a window that has been open for two
14450
- * seconds of its ten is 100% of nothing, and firing on it would make
14451
- * `samplingSeconds` decorative.
14722
+ * **TWO EXCLUSIVE MODES** (operator decision 2026-08-14, D157). Which one a
14723
+ * rule is in is not a stored field — it is WHICH FILTER the rule carries, so
14724
+ * there is no second switch that can disagree with the first and every rule
14725
+ * authored before the decision migrates for free (`audioModeOf`):
14726
+ *
14727
+ * - **LABEL mode — `labels` present.** The rule fires on the FIRST frame the
14728
+ * classifier labels with one of them. No window, no percentage:
14729
+ * `hitPercent` and `samplingSeconds` are ignored, and the rule's own
14730
+ * `throttle` cooldown is the only brake. The per-label confidence floor is
14731
+ * the analyzer's (`classificationMinScore`, per device) — a label only
14732
+ * reaches this condition if the classifier was already confident enough.
14733
+ * - **LEVEL mode — `dbThreshold` present, no labels.** The sampling window IS
14734
+ * the condition: at least `hitPercent`% of the samples over
14735
+ * `samplingSeconds` must be at or above `dbThreshold` dBFS (see
14736
+ * {@link NC_AUDIO_DBFS_FLOOR}: negative-going, `0` = full scale). The window
14737
+ * must be FULL before it can match — a window open for two of its ten
14738
+ * seconds is 100% of nothing.
14739
+ *
14740
+ * **Why label mode has no window.** It had one, and it never fired: the
14741
+ * analyzer emits ~1 audio frame per second but YAMNet only LABELS one to three
14742
+ * of them per episode, even through continuous crying. The measured maximum
14743
+ * `hitPercent` over the whole live history was 40 — under the shipped default
14744
+ * of 60, so a label rule could not fire at all, ever. A percentage of frames is
14745
+ * the wrong question to ask of a sparse classifier.
14746
+ *
14747
+ * **Fail-closed when NEITHER is given** — every sample would be a trivial hit
14748
+ * and the rule would fire on silence. The schema cannot express "exactly one
14749
+ * of" without becoming a ZodEffects the cap path would have to special-case, so
14750
+ * the exclusivity is enforced where every editor writes (`patchAudio`) and a
14751
+ * legacy rule carrying both resolves to LABEL (the mode that fires).
14452
14752
  *
14453
14753
  * Labels are the audio macro classes (`AUDIO_MACRO_LABELS` / the NC taxonomy's
14454
14754
  * `audio-*` ids). Both spellings are accepted — the matcher normalizes the
@@ -14456,13 +14756,13 @@ var NcOccupancyConditionSchema = object({
14456
14756
  * an operator who typed `dog` mean the same thing.
14457
14757
  */
14458
14758
  var NcAudioConditionSchema = object({
14459
- /** Audio macro labels; absent = any sound (level-only rule). */
14759
+ /** LABEL MODE: audio macro labels. Present ⇒ fires on the first labelled frame. */
14460
14760
  labels: array(string().min(1)).min(1).optional(),
14461
- /** Level floor in dBFS (negative-going, `0` = full scale); absent = any level. */
14761
+ /** LEVEL MODE: floor in dBFS (negative-going, `0` = full scale). */
14462
14762
  dbThreshold: number().min(-96).max(0).optional(),
14463
- /** Percentage of the window's samples that must be hits (1–100). */
14763
+ /** LEVEL MODE ONLY: percentage of the window's samples that must be hits (1–100). */
14464
14764
  hitPercent: number().int().min(1).max(100).default(60),
14465
- /** Length of the sampling window in seconds. */
14765
+ /** LEVEL MODE ONLY: length of the sampling window in seconds. */
14466
14766
  samplingSeconds: number().int().min(1).max(300).default(10)
14467
14767
  });
14468
14768
  /**
@@ -14600,13 +14900,81 @@ var NcRuleActionsSchema = object({
14600
14900
  */
14601
14901
  buttons: array(NcRuleNotificationButtonSchema).max(8).optional()
14602
14902
  });
14903
+ /**
14904
+ * "This rule applies only while `deviceId` is in one of `states`."
14905
+ *
14906
+ * The states are the DEVICE's own vocabulary — `AlarmState` for a panel,
14907
+ * `on`/`off` for a switch — not a normalised set, because normalising would
14908
+ * make the condition lie about devices whose states have no equivalent.
14909
+ *
14910
+ * An unreadable state does NOT match: see the engine's fail-closed gate. A
14911
+ * condition that fired on "I could not read it" would be worse than no gate.
14912
+ */
14913
+ var NcDeviceStateConditionSchema = object({
14914
+ deviceId: number().int(),
14915
+ /** Any of these matches. */
14916
+ states: array(string().min(1)).min(1)
14917
+ });
14918
+ /**
14919
+ * "This rule applies only while scene `sceneId` is `matched` / `diverged`."
14920
+ *
14921
+ * A GATE, not a trigger. `occupancy` and `audio` each DISCRIMINATE their rule —
14922
+ * carrying one makes the rule fire on that subject and nothing else. Scene is
14923
+ * the other shape entirely, the `deviceState` shape: it narrows a rule that
14924
+ * already has a trigger ("tell me about a person at the front door, but only
14925
+ * while the bin is still out"). That is why it composes with every delivery
14926
+ * instead of owning one, and why no new `NcDelivery` member and no new subject
14927
+ * kind exist for it — see D159.
14928
+ *
14929
+ * ── Identity ───────────────────────────────────────────────────────────────
14930
+ * `sceneId` is `SceneMonitor.id`, a `randomUUID()` minted by `createScene` —
14931
+ * globally unique, so it needs no device to disambiguate it. `deviceId` is
14932
+ * carried as a HINT for the editor and for the log line, never as part of the
14933
+ * lookup key: a rule whose hint drifted must still gate correctly.
14934
+ *
14935
+ * ── Which boolean ──────────────────────────────────────────────────────────
14936
+ * `latched` ABSENT means "whatever the scene itself says" — `SceneMonitor.emit`
14937
+ * already declares which boolean drives notification rules, and a second knob
14938
+ * that could disagree with it is exactly the D62 failure. Set it only to
14939
+ * override one rule against the scene's own default.
14940
+ *
14941
+ * - LIVE reading (`emit`/`latched` resolve to live): passes iff
14942
+ * `verdict === requiredState`. `unknown` — no reference for this light, view
14943
+ * shifted, no snapshot — passes NEITHER. A scene that cannot judge is not
14944
+ * evidence, in either direction.
14945
+ * - LATCHED reading: passes iff `latched === (requiredState === 'diverged')`.
14946
+ * The latch is a durable fact about the past ("it has diverged since I armed
14947
+ * it"), so a camera that has gone dark does not clear it — that is the whole
14948
+ * reason the operator asked for a latch.
14949
+ *
14950
+ * The gate reads an in-memory mirror (`NcSceneStateCache`) refreshed OFF the
14951
+ * event path, never the cap: D49. A mirror that has never loaded, or a scene it
14952
+ * does not carry, reads absent and the rule does NOT fire — fail closed, and
14953
+ * said out loud in the log rather than dropped in silence.
14954
+ */
14955
+ var NcSceneConditionSchema = object({
14956
+ /** `SceneMonitor.id` — the uuid the cap mints. The whole lookup key. */
14957
+ sceneId: string().min(1),
14958
+ /** The camera the scene lives on. A hint for the editor and the log line. */
14959
+ deviceId: number().int().optional(),
14960
+ /** The state the scene must be in for the rule to fire. */
14961
+ requiredState: _enum(["matched", "diverged"]),
14962
+ /**
14963
+ * Read the LATCH (`true`) or the LIVE verdict (`false`). Absent = follow the
14964
+ * scene's own `emit` field, which is the only place that decision belongs.
14965
+ */
14966
+ latched: boolean().optional()
14967
+ });
14603
14968
  var NcConditionsSchema = object({
14604
14969
  /** Gate on ANOTHER device's current state (the alarm armed, a switch on). */
14605
- deviceState: object({
14606
- deviceId: number().int(),
14607
- /** Any of these matches. */
14608
- states: array(string().min(1)).min(1)
14609
- }).optional(),
14970
+ deviceState: NcDeviceStateConditionSchema.optional(),
14971
+ /**
14972
+ * Gate on a SCENE's state — "only while the bin is still out". Composes with
14973
+ * every trigger (detection, occupancy, audio, sensor, package, track-end);
14974
+ * unlike `occupancy`/`audio` it discriminates nothing. See
14975
+ * {@link NcSceneCondition} and D159.
14976
+ */
14977
+ scene: NcSceneConditionSchema.optional(),
14610
14978
  /** Device scope — absent = all devices. */
14611
14979
  devices: array(number()).optional(),
14612
14980
  /** Detector class names (any overlap with the record's class set). */
@@ -14632,18 +15000,47 @@ var NcConditionsSchema = object({
14632
15000
  */
14633
15001
  labelEquals: array(string().min(1)).optional(),
14634
15002
  /**
14635
- * Identity matcher. P1 boundary: matched against the record's collapsed
14636
- * `label` (the identity display name propagated by the face pipeline) —
14637
- * identity-ID matching rides in P2 when identity ids reach the record.
15003
+ * KNOWN FACES — the rule's identity scope, and the switch that says the rule
15004
+ * is about recognised people at all.
15005
+ *
15006
+ * Three states, and the empty one is the point:
15007
+ *
15008
+ * | value | meaning |
15009
+ * | --- | --- |
15010
+ * | absent | the rule does not care who it is; an unrecognised person matches |
15011
+ * | `[]` | **only known faces** — any identity in the gallery, nobody in particular |
15012
+ * | a list | only these identities |
15013
+ *
15014
+ * `[]` is the repo-wide "no selection = no narrowing" reading (an absent
15015
+ * `devices` list is every device), applied one level down: the operator has
15016
+ * turned the face scope ON and narrowed it to nothing, which is every known
15017
+ * face. No second field states the same thing — a switch that can disagree
15018
+ * with the list under it is worse than no switch (D62).
15019
+ *
15020
+ * MEMBERS ARE FACE-GALLERY `Identity.id`s (uuid), not display names. A name is
15021
+ * renameable, and a rule authored on "Gianluca" went silently dark the moment
15022
+ * the operator fixed the spelling. The id reaches the record on
15023
+ * `LabelAttribution.identityId`; the name is what the editor shows and what
15024
+ * `{{label}}` renders.
15025
+ *
15026
+ * Rules written before this carry NAMES, and are resolved to ids lazily at
15027
+ * load (`NcRuleStore.load`) against the live gallery — a name nothing answers
15028
+ * for is left as it stands and reported, never dropped. The engine also
15029
+ * accepts a display-name hit as a compatibility leg, so a rule whose
15030
+ * migration could not resolve keeps matching exactly what it matched before.
14638
15031
  */
14639
15032
  identities: array(string().min(1)).optional(),
14640
- /** Fuzzy plate matcher against the record's `label` (plate text). */
15033
+ /**
15034
+ * KNOWN PLATES / VEHICLES — the plate mirror of {@link identities}, including
15035
+ * the empty-list reading: `values: []` is "any plate the OCR could read",
15036
+ * a non-empty list is those plates (fuzzily). See {@link NcPlateMatcherSchema}.
15037
+ */
14641
15038
  plates: NcPlateMatcherSchema.optional(),
14642
15039
  /**
14643
- * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics.
14644
- * Same P1 boundary: matched against the record's collapsed `label` (the
14645
- * identity display name). A record with NO label passes (nothing to
14646
- * exclude), unlike the include variant which fails on an absent label.
15040
+ * Identity EXCLUDE — mirror of {@link identities} with `notIn` semantics, and
15041
+ * the same id members and the same lazy name→id migration. A record with NO
15042
+ * identity passes (nothing to exclude), unlike the include variant which
15043
+ * fails on an unrecognised subject. An EMPTY list excludes nobody.
14647
15044
  */
14648
15045
  identitiesExclude: array(string().min(1)).optional(),
14649
15046
  /**
@@ -15035,7 +15432,80 @@ var NcRuleInputSchema = object({
15035
15432
  * a rule that predates the gate must keep delivering byte-for-byte as it
15036
15433
  * did, and absent is the only way to say that without a migration.
15037
15434
  */
15038
- confirm: NcConfirmSchema.optional()
15435
+ confirm: NcConfirmSchema.optional(),
15436
+ /**
15437
+ * WAIT for face/plate recognition before saying anything.
15438
+ *
15439
+ * A notification's TEXT is frozen at enqueue and its media is re-resolved at
15440
+ * send; the identity is neither. A face is confirmed after `confirmFrames`
15441
+ * agreeing observations — p50 **11.4 s** after the track was first seen,
15442
+ * measured on this hub — and an `immediate` rule enqueues on the first object
15443
+ * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
15444
+ * immediate path, and no amount of media re-resolution fixes a sentence.
15445
+ *
15446
+ * Only two honest answers exist, and this flag picks between them. It has
15447
+ * effect ONLY on a rule that declares a recognition scope
15448
+ * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
15449
+ * other rule there is nothing to wait for and the flag is inert.
15450
+ *
15451
+ * | value | what happens |
15452
+ * | --- | --- |
15453
+ * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
15454
+ * | 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) |
15455
+ *
15456
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15457
+ * on the addon cap path, and absent has to keep meaning exactly what every
15458
+ * rule authored before this field meant.
15459
+ *
15460
+ * The cost of `true` is stated here because the editor states it too: a rule
15461
+ * that waits also inherits track-close SEMANTICS — its `zones` condition
15462
+ * tests every zone the track visited and a `crossing` condition can no longer
15463
+ * be satisfied, because a closed track carries no crossing.
15464
+ */
15465
+ waitForEnhancement: boolean().optional(),
15466
+ /**
15467
+ * GROUP a burst of subjects into ONE notification that grows.
15468
+ *
15469
+ * Seconds of quiet after the last matching subject before the burst is
15470
+ * considered over. While it is open, the first subject enqueues immediately —
15471
+ * **exactly as today, with no added latency** — and every real growth (a new
15472
+ * subject, or a name confirmed on one already in it) REPLACES that
15473
+ * notification with an updated one naming everybody. The push carries the
15474
+ * group's own coalescing tag, so the phone replaces rather than stacks.
15475
+ *
15476
+ * `0` / absent = off, and off is today's behaviour byte for byte.
15477
+ *
15478
+ * ### Why an idle cutoff and not a window
15479
+ *
15480
+ * The measured seven-person arrival on device 590 spans 110 s with every
15481
+ * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
15482
+ * idle cutoff holds it as one and ends it when the arrival actually ends.
15483
+ * 30 is Frigate's shipped value for the same decision.
15484
+ *
15485
+ * ### What it replaces
15486
+ *
15487
+ * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
15488
+ * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
15489
+ * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
15490
+ * track that did fire and 7 carrying a confirmed identity nobody heard about.
15491
+ * A group collapses the same volume by MERGING, so the cooldown becomes a
15492
+ * budget over GROUPS — which is what it always meant — and a growth is never
15493
+ * throttled by the window its own first member spent.
15494
+ *
15495
+ * ### Interaction with {@link waitForEnhancement}
15496
+ *
15497
+ * They compose, and the order matters. `waitForEnhancement` defers the rule to
15498
+ * TRACK CLOSE, so with both set the group is opened by the first member to
15499
+ * CLOSE — already carrying its name — and grows as later members close. That
15500
+ * is later, and complete. With grouping alone the group opens on the first
15501
+ * object event and picks up names as they are confirmed, through the growth
15502
+ * path. Neither combination fires twice for one subject.
15503
+ *
15504
+ * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
15505
+ * on the addon cap path, so absent must keep meaning what it meant before this
15506
+ * field existed.
15507
+ */
15508
+ groupIdleSec: number().int().min(0).max(600).optional()
15039
15509
  });
15040
15510
  /**
15041
15511
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -15142,6 +15612,7 @@ var NcConditionDescriptorSchema = object({
15142
15612
  "occupancy",
15143
15613
  "audio",
15144
15614
  "deviceState",
15615
+ "scene",
15145
15616
  "systemEvent"
15146
15617
  ]),
15147
15618
  operator: _enum([
@@ -15547,7 +16018,87 @@ var MethodAccessSchema = _enum([
15547
16018
  var AllowedProviderSchema = union([literal("*"), array(string())]);
15548
16019
  var AllowedDevicesSchema = record(string(), union([literal("*"), array(string())]));
15549
16020
  var CapScopeSchema = _enum(["device", "system"]);
15550
- var TokenScopeSchema = discriminatedUnion("type", [
16021
+ /**
16022
+ * DeviceSelector (scope model v3 — 2026-08-12).
16023
+ *
16024
+ * A `device` grant no longer carries a frozen list of deviceIds. It carries
16025
+ * a SELECTOR the matcher resolves against the live fleet, so the grant can be
16026
+ * DYNAMIC: a `types:['camera']` selector automatically covers a camera added
16027
+ * AFTER the grant was minted — no re-grant, no re-login.
16028
+ *
16029
+ * - `all` — every device in the deployment. The broad viewer/operator
16030
+ * lever without a `category` grant (a `category` grant also covers device
16031
+ * caps that carry no deviceId; `all` is specifically the device set).
16032
+ * - `ids` — an explicit deviceId list. This is what a v2 `device:[…]`
16033
+ * grant migrates to (see {@link TokenScopeSchema}); STATIC — a new camera
16034
+ * is NOT covered until the grant is edited.
16035
+ * - `types` — every device of a `DeviceType` (e.g. every `camera`).
16036
+ * DYNAMIC. A device that changes type, or a new device of the type,
16037
+ * re-resolves on the next request.
16038
+ * - `locations` — every device whose operator-assigned `location` label is
16039
+ * in the set (e.g. "Garden", "Front door"). DYNAMIC. A device with a
16040
+ * null/unset location matches NO `locations` selector.
16041
+ */
16042
+ var DeviceSelectorSchema = discriminatedUnion("kind", [
16043
+ object({ kind: literal("all") }),
16044
+ object({
16045
+ kind: literal("ids"),
16046
+ ids: array(number().int()).min(1)
16047
+ }),
16048
+ object({
16049
+ kind: literal("types"),
16050
+ types: array(_enum(DeviceType)).min(1)
16051
+ }),
16052
+ object({
16053
+ kind: literal("locations"),
16054
+ locations: array(string().min(1)).min(1)
16055
+ })
16056
+ ]);
16057
+ var DeviceTokenScopeSchema = object({
16058
+ type: literal("device"),
16059
+ /** The device SET this grant covers — resolved against the live fleet. */
16060
+ selector: DeviceSelectorSchema,
16061
+ access: array(MethodAccessSchema).min(1),
16062
+ /**
16063
+ * Whether a grant on a PARENT device transparently covers its accessory
16064
+ * CHILDREN (siren / floodlight / PIR) via the persisted-parentage walk.
16065
+ * Direction is parent → children ONLY.
16066
+ *
16067
+ * Absent → the matcher DERIVES it from the access flavour: `view`
16068
+ * inherits (a camera viewer sees the camera's accessories), `create` /
16069
+ * `delete` do NOT (actuating/removing a child is an explicit act the
16070
+ * operator must grant on the child, not inherit from the parent). Set it
16071
+ * explicitly to override that default per grant.
16072
+ */
16073
+ includeLinked: boolean().optional()
16074
+ });
16075
+ /**
16076
+ * v2 → v3 lazy migration. A pre-v3 `device` grant carried
16077
+ * `targets: string[]` (stringified deviceIds); it rewrites to the equivalent
16078
+ * `selector: {kind:'ids', ids}`. Applied as a `preprocess` so it runs on
16079
+ * EVERY parse path — stored records AND the JWT-carried scope arrays
16080
+ * normalised at the request boundary ({@link normalizeTokenScopes} in
16081
+ * `device-selector.ts`). Chosen over a one-time DB migration because a
16082
+ * migration cannot reach a JWT already in a client's hands; parse-time
16083
+ * migration covers both without a flag day. No cast — the raw object is read
16084
+ * through `Reflect.get` (its static type is `unknown`).
16085
+ */
16086
+ function migrateLegacyTokenScope(raw) {
16087
+ if (raw === null || typeof raw !== "object" || Array.isArray(raw)) return raw;
16088
+ if (Reflect.get(raw, "type") !== "device") return raw;
16089
+ if (Reflect.get(raw, "selector") !== void 0) return raw;
16090
+ const targets = Reflect.get(raw, "targets");
16091
+ if (!Array.isArray(targets)) return raw;
16092
+ return {
16093
+ type: "device",
16094
+ selector: {
16095
+ kind: "ids",
16096
+ ids: targets.map((t) => typeof t === "string" ? Number(t) : t).filter((n) => typeof n === "number" && Number.isInteger(n))
16097
+ },
16098
+ access: Reflect.get(raw, "access")
16099
+ };
16100
+ }
16101
+ var TokenScopeSchema = preprocess(migrateLegacyTokenScope, discriminatedUnion("type", [
15551
16102
  object({
15552
16103
  type: literal("category"),
15553
16104
  target: CapScopeSchema,
@@ -15563,18 +16114,8 @@ var TokenScopeSchema = discriminatedUnion("type", [
15563
16114
  target: string(),
15564
16115
  access: array(MethodAccessSchema).min(1)
15565
16116
  }),
15566
- object({
15567
- type: literal("device"),
15568
- /**
15569
- * One or more deviceIds (serialised as strings for wire-format
15570
- * consistency with the rest of the union). Matcher accepts if
15571
- * `input.deviceId` ∈ `targets`. Array shape avoids the row-explosion
15572
- * of one scope-per-device when granting access to a set of cameras.
15573
- */
15574
- targets: array(string()).min(1),
15575
- access: array(MethodAccessSchema).min(1)
15576
- })
15577
- ]);
16117
+ DeviceTokenScopeSchema
16118
+ ]));
15578
16119
  object({
15579
16120
  id: string(),
15580
16121
  username: string(),
@@ -15891,7 +16432,7 @@ var TrackEnvelopeSchema = object({
15891
16432
  * `snapshots[]` references — megabytes across a page of tracks. `slim`
15892
16433
  * keeps every scalar the list surfaces actually render (ids, class(es),
15893
16434
  * label / audioLabels / importance enrichment, firstSeen/lastSeen, state,
15894
- * zonesVisited, bestEventId, envelope, hasFace) and returns `positions` /
16435
+ * zonesVisited, bestEventId, envelope, hasFace, hasRider) and returns `positions` /
15895
16436
  * `snapshots` as EMPTY arrays — detail views re-fetch the full row via
15896
16437
  * `getTrack`. Mirrors the event-store `projection` convention
15897
16438
  * (`getObjectEvents` et al.).
@@ -16027,7 +16568,21 @@ union([literal(1), literal(2)]);
16027
16568
  var LabelAttributionSchema = object({
16028
16569
  stepId: string(),
16029
16570
  modelId: string().optional(),
16030
- decidedAt: number()
16571
+ decidedAt: number(),
16572
+ /**
16573
+ * The GALLERY id behind a recognised tier-2 label — a face-gallery
16574
+ * `Identity.id` or a plate-gallery `Vehicle.id` (both `randomUUID`).
16575
+ *
16576
+ * The text alone is a DISPLAY NAME, and a display name is renameable: a
16577
+ * notification rule authored on "Gianluca" stopped matching the moment the
16578
+ * operator fixed the spelling in the gallery, and nothing said so. The id is
16579
+ * the thing that does not move, so it is what a rule matches on
16580
+ * (`NcConditions.identities`) and the text is what a human is shown.
16581
+ *
16582
+ * Absent when the label names no gallery row — a plate the OCR read but no
16583
+ * vehicle claims, a sub-class, a species, any tier-1 value.
16584
+ */
16585
+ identityId: string().optional()
16031
16586
  });
16032
16587
  /**
16033
16588
  * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
@@ -16164,6 +16719,28 @@ var TrackSchema = object({
16164
16719
  * `=== true` and render nothing otherwise, never infer "no face".
16165
16720
  */
16166
16721
  hasFace: boolean().optional(),
16722
+ /**
16723
+ * This subject CONTAINS a folded rider — a person the rider-pairing step
16724
+ * ([D34](../decisions/adr-0034.md)) removed from the frame BEFORE the tracker,
16725
+ * so the passage is tracked once and as a VEHICLE.
16726
+ *
16727
+ * It exists because the fold's record was dishonest. D34 and the code both
16728
+ * said "the person is not lost — it is reported so both entities stay on the
16729
+ * record"; in fact the pair went into a per-processor RAM field behind an
16730
+ * accessor nobody called, and every durable surface said `vehicle`, full
16731
+ * stop. This is the composition note that makes the row true.
16732
+ *
16733
+ * A COMPOSITION, never a class and never a label. "This vehicle contains a
16734
+ * person" is not an answer to "what is this" — both label tiers would refuse
16735
+ * a macro token anyway (D89), and correctly. Nothing here changes what the
16736
+ * subject IS: a cyclist stays one vehicle track, occupancy still counts one,
16737
+ * and a `person` rule still does not fire for someone cycling past.
16738
+ *
16739
+ * **Absent ≠ false**, exactly like {@link hasFace}: every row written before
16740
+ * the column, and every hub that predates the field, omits it. Test
16741
+ * `=== true` and render nothing otherwise — never infer "no rider".
16742
+ */
16743
+ hasRider: boolean().optional(),
16167
16744
  ...TrackFlagFields,
16168
16745
  ...TrackRetrainFields
16169
16746
  });
@@ -16513,7 +17090,10 @@ var RecentTracksQueryInput = object({
16513
17090
  * Encodes the (lastSeen, trackId) sort position — treat as opaque. */
16514
17091
  cursor: string().optional(),
16515
17092
  /** See {@link TrackProjectionSchema}. Default `full`. */
16516
- projection: TrackProjectionSchema.optional()
17093
+ projection: TrackProjectionSchema.optional(),
17094
+ /** Include stationary-promoted rows (parked objects). Default false: the
17095
+ * feed lists passages; parking records live on the stationary registry. */
17096
+ includeStationary: boolean().optional()
16517
17097
  });
16518
17098
  var RecentTracksPageSchema = object({
16519
17099
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -16731,7 +17311,11 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16731
17311
  zone: TrackZoneFilterSchema.optional(),
16732
17312
  /** See {@link TrackProjectionSchema}. Default `full` (backward
16733
17313
  * compatible — omitting the field keeps today's exact behaviour). */
16734
- projection: TrackProjectionSchema.optional()
17314
+ projection: TrackProjectionSchema.optional(),
17315
+ /** Include stationary-promoted rows (parked objects handed to the
17316
+ * stationary registry). Default false: the timeline lists passages,
17317
+ * not parking records (operator decision, 2026-08-15). */
17318
+ includeStationary: boolean().optional()
16735
17319
  }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
16736
17320
  kind: "mutation",
16737
17321
  auth: "admin"
@@ -16895,11 +17479,16 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
16895
17479
  auth: "admin"
16896
17480
  }), method(object({
16897
17481
  eventId: string(),
16898
- kind: MediaFileKindEnum.optional()
17482
+ kind: MediaFileKindEnum.optional(),
17483
+ deviceId: number()
17484
+ }), array(MediaFileSchema).readonly()), method(object({
17485
+ trackId: string(),
17486
+ kinds: array(MediaFileKindEnum).optional(),
17487
+ deviceId: number()
16899
17488
  }), array(MediaFileSchema).readonly()), method(object({
16900
17489
  trackId: string(),
16901
- kinds: array(MediaFileKindEnum).optional()
16902
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
17490
+ deviceId: number()
17491
+ }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
16903
17492
  kind: "mutation",
16904
17493
  auth: "admin"
16905
17494
  }), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
@@ -17599,6 +18188,17 @@ var maxSessionHoldMsField = {
17599
18188
  default: 12e4,
17600
18189
  step: 5e3
17601
18190
  };
18191
+ /**
18192
+ * Quiet period that closes an `audioMode: 'on-motion'` audio window. Floor of
18193
+ * 5s so a rearm can never degenerate into per-event stream churn; default 90s
18194
+ * comfortably outlives the gap between two PIR wakes on a battery camera.
18195
+ */
18196
+ var audioMotionWindowMsField = {
18197
+ min: 5e3,
18198
+ max: 6e5,
18199
+ default: 9e4,
18200
+ step: 5e3
18201
+ };
17602
18202
  var motionFpsField = {
17603
18203
  min: 1,
17604
18204
  max: 30,
@@ -17611,10 +18211,26 @@ var detectionFpsField = {
17611
18211
  default: 10,
17612
18212
  step: 1
17613
18213
  };
18214
+ /**
18215
+ * The occupancy re-check interval. DEFAULT 300 s (2026-08-13 — was 30 s).
18216
+ *
18217
+ * The recheck is now on by default (a parked car is invisible to occupancy
18218
+ * rules until the stationary registry has been rebuilt by motion, which after a
18219
+ * restart may be never on a quiet camera). Each cycle re-subscribes a detection
18220
+ * session — an RTSP re-dial — so the switch is only affordable at a WIDE
18221
+ * interval: 300 s is ~12 re-dials an hour per camera, against 120 at the old
18222
+ * 30 s. A parked car is therefore counted within 5 minutes of a restart.
18223
+ *
18224
+ * Why not wider: `max` is 300 and raising it is TRAIN-BOUND, not addon-bound —
18225
+ * the host validates `attachCamera` against ITS copy of this schema, so a
18226
+ * runner asked for 600 would be rejected by the hub until a `@camstack/server`
18227
+ * carrying the wider bound is installed everywhere. 300 is the widest value
18228
+ * that ships with an addon deploy.
18229
+ */
17614
18230
  var occupancyRecheckSecField = {
17615
18231
  min: 0,
17616
18232
  max: 300,
17617
- default: 30,
18233
+ default: 300,
17618
18234
  step: 5
17619
18235
  };
17620
18236
  var occupancyRecheckFramesField = {
@@ -17759,6 +18375,27 @@ var RunnerCameraConfigSchema = object({
17759
18375
  * resolved `CameraDetectionConfig`.
17760
18376
  */
17761
18377
  maxSessionHoldMs: number().min(maxSessionHoldMsField.min).max(maxSessionHoldMsField.max).optional(),
18378
+ /**
18379
+ * Orchestrator-side quiet period (ms) that closes an `audioMode:
18380
+ * 'on-motion'` audio window, measured from the LAST motion event.
18381
+ *
18382
+ * This exists because the falling edge cannot be relied on. Camera-native
18383
+ * providers emit motion as a RISING EDGE ONLY (Reolink's Baichuan push and
18384
+ * its email-push SMTP path both emit `detected: true` and never the
18385
+ * counterpart); only the frame-diff analyzer emits falls. So on an
18386
+ * onboard-only camera a window that closed only on `detected: false` never
18387
+ * closed at all, and `on-motion` silently behaved as `always-on` — on a
18388
+ * battery camera, the one failure mode the mode exists to prevent.
18389
+ *
18390
+ * Every motion event rearms this timer WITHOUT restarting the stream, so a
18391
+ * burst of re-fires costs nothing. A falling edge, when one does arrive,
18392
+ * still closes earlier via `motionCooldownMs` — whichever comes first wins.
18393
+ *
18394
+ * Not consumed by the runner: carried here so it shares the per-camera
18395
+ * device-settings surface with `motionCooldownMs`, exactly like
18396
+ * `maxSessionHoldMs`.
18397
+ */
18398
+ audioMotionWindowMs: number().min(audioMotionWindowMsField.min).max(audioMotionWindowMsField.max).optional(),
17762
18399
  motionFps: number().min(motionFpsField.min).max(motionFpsField.max).default(motionFpsField.default),
17763
18400
  detectionFps: number().min(detectionFpsField.min).max(detectionFpsField.max).default(detectionFpsField.default),
17764
18401
  motionStreamId: string(),
@@ -17812,15 +18449,21 @@ var RunnerCameraConfigSchema = object({
17812
18449
  */
17813
18450
  onboardMotionDrivesAnalyzer: boolean().default(true),
17814
18451
  /**
17815
- * Master toggle for the occupancy re-check. When `false` (DEFAULT) the runner
17816
- * never arms the periodic recheck timer, regardless of `occupancyRecheckSec` —
17817
- * this is off by default because the recheck re-subscribes a detection session
17818
- * every N seconds while `watching`, a major source of pull-decoder re-dial
17819
- * churn (each cycle creates+tears a session → RTSP re-dial → latency). The
18452
+ * Master toggle for the occupancy re-check. When `false` the runner never arms
18453
+ * the periodic recheck timer, regardless of `occupancyRecheckSec`; the
17820
18454
  * `occupancyRecheckSec` / `occupancyRecheckFrames` sliders only take effect
17821
18455
  * (and only render) when this is enabled.
17822
- */
17823
- occupancyRecheckEnabled: boolean().default(false),
18456
+ *
18457
+ * DEFAULT `true` since 2026-08-13 (was `false`). It was off because the
18458
+ * recheck re-subscribes a detection session every N seconds while `watching`
18459
+ * — each cycle creates+tears a session ⇒ an RTSP re-dial ⇒ latency, a major
18460
+ * pull-decoder churn source. What that bought was a blind spot: a STATIONARY
18461
+ * object is counted only while the stationary registry holds it, and the
18462
+ * registry rebuilds from motion, so after a restart a parked car was invisible
18463
+ * to every occupancy rule until something moved in front of it. The churn is
18464
+ * now paid on the interval instead — see `occupancyRecheckSecField`.
18465
+ */
18466
+ occupancyRecheckEnabled: boolean().default(true),
17824
18467
  occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
17825
18468
  occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
17826
18469
  /**
@@ -17848,7 +18491,7 @@ var RunnerCameraConfigSchema = object({
17848
18491
  */
17849
18492
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
17850
18493
  });
17851
- 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;
18494
+ 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;
17852
18495
  /**
17853
18496
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
17854
18497
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -18864,7 +19507,16 @@ targets: array(object({
18864
19507
  /** A sleeping battery camera: the frame is deliberately stale and will
18865
19508
  * NOT refresh in the background. A surface should say so rather than
18866
19509
  * present it as current. */
18867
- sleeping: boolean()
19510
+ sleeping: boolean(),
19511
+ /** Current device state rendered over the cached frame. State images
19512
+ * remain authoritative even when their photographic background is
19513
+ * old; null means the link must carry a current camera frame. */
19514
+ stateReason: _enum([
19515
+ "disabled",
19516
+ "sleeping",
19517
+ "unreachable",
19518
+ "waking"
19519
+ ]).nullable()
18868
19520
  })));
18869
19521
  /**
18870
19522
  * `sso-bridge` — internal hub-only cap that lets SSO-style auth
@@ -20518,6 +21170,25 @@ var BatteryStatusSchema = object({
20518
21170
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
20519
21171
  lastUpdated: number(),
20520
21172
  /**
21173
+ * Ms epoch of the last time the device PROVED it was reachable — a
21174
+ * completed firmware round-trip, an observed wake, or an inbound push
21175
+ * (firmware event, email). `0`/absent = never since this slice was born.
21176
+ *
21177
+ * This is the ONLY input that separates "asleep" from "gone", and it is
21178
+ * fed exclusively by PASSIVE signals: nothing may write it by reaching
21179
+ * for the radio, because a poll that confirms reachability is the same
21180
+ * poll that drains the battery. See {@link deriveBatteryPresence} — the
21181
+ * single derivation every consumer must use; no surface computes its own.
21182
+ *
21183
+ * It is deliberately NOT a clock in the
21184
+ * `scripts/check-runtime-state-durability.ts` sense: it is the
21185
+ * observation itself, and it is the only thing a 30-hour silence is
21186
+ * visible in. Writers quantise it (see `CONTACT_WRITE_QUANTUM_MS` in the
21187
+ * Reolink provider) so a value that means "recently" cannot cost a
21188
+ * SQLite commit per round-trip.
21189
+ */
21190
+ lastContactAt: number().optional(),
21191
+ /**
20521
21192
  * True when the source is a BINARY low-battery indicator (HA
20522
21193
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
20523
21194
  * charge level — `percentage` is then a coarse stand-in (100 = normal,
@@ -22782,54 +23453,139 @@ var TalkAudioCodecSchema = _enum([
22782
23453
  "g711ulaw",
22783
23454
  "g711alaw"
22784
23455
  ]);
22785
- DeviceType.Camera, method(object({ deviceId: number() }), object({
22786
- sessionId: string(),
22787
- sdpOffer: string()
22788
- }), {
22789
- kind: "mutation",
22790
- auth: "admin"
22791
- }), method(object({
22792
- deviceId: number(),
22793
- sessionId: string(),
22794
- sdpAnswer: string()
22795
- }), _void(), {
22796
- kind: "mutation",
22797
- auth: "admin"
22798
- }), method(object({
22799
- deviceId: number(),
22800
- sessionId: string()
22801
- }), _void(), {
22802
- kind: "mutation",
22803
- auth: "admin"
22804
- }), method(object({ deviceId: number() }), object({ sessionId: string() }), {
22805
- kind: "mutation",
22806
- auth: "admin"
22807
- }), method(object({
22808
- deviceId: number(),
22809
- /** Audio bytes for ONE frame, base64-encoded so the payload
22810
- * survives tRPC JSON serialization. */
22811
- audioBase64: string(),
22812
- /** Wire codec of the payload. Omit to let the provider default
22813
- * to its native expected format (s16le @ provider-native rate,
22814
- * mono). See {@link TalkAudioCodecSchema} for the supported set. */
22815
- codec: TalkAudioCodecSchema.optional(),
22816
- /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
22817
- * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
22818
- sampleRate: number().int().positive().optional(),
22819
- /** Channel count. Default 1. */
22820
- channels: number().int().positive().optional(),
22821
- /** Sequence number for ordering / dropping out-of-order frames. */
22822
- sequenceNumber: number().int()
22823
- }), object({ accepted: boolean() }), {
22824
- kind: "mutation",
22825
- auth: "admin"
22826
- }), method(object({ deviceId: number() }), _void(), {
22827
- kind: "mutation",
22828
- auth: "admin"
22829
- }), object({
22830
- deviceId: number(),
22831
- status: IntercomStatusSchema
22832
- });
23456
+ var intercomCapability = {
23457
+ name: "intercom",
23458
+ scope: "device",
23459
+ deviceNative: true,
23460
+ mode: "singleton",
23461
+ deviceTypes: [DeviceType.Camera],
23462
+ methods: {
23463
+ /**
23464
+ * Open a server-side WebRTC audio-only session. Returns an SDP
23465
+ * offer with a single sendonly audio m-line the client answers
23466
+ * (client → server direction). The server wakes battery cams
23467
+ * transparently before opening the upstream talk channel.
23468
+ */
23469
+ startSession: method(object({ deviceId: number() }), object({
23470
+ sessionId: string(),
23471
+ sdpOffer: string()
23472
+ }), {
23473
+ kind: "mutation",
23474
+ auth: "admin"
23475
+ }),
23476
+ handleAnswer: method(object({
23477
+ deviceId: number(),
23478
+ sessionId: string(),
23479
+ sdpAnswer: string()
23480
+ }), _void(), {
23481
+ kind: "mutation",
23482
+ auth: "admin"
23483
+ }),
23484
+ /** Close explicitly. Server also auto-closes on 30s idle. */
23485
+ stopSession: method(object({
23486
+ deviceId: number(),
23487
+ sessionId: string()
23488
+ }), _void(), {
23489
+ kind: "mutation",
23490
+ auth: "admin"
23491
+ }),
23492
+ /**
23493
+ * Open a raw-PCM talk session (no WebRTC SDP plumbing). Used by
23494
+ * non-WebRTC consumers (HomeKit export, Alexa raw audio, test
23495
+ * harnesses) that already have decoded PCM frames and just need a
23496
+ * direct path onto the camera's talk channel. Mutually exclusive
23497
+ * with `startSession` (an active WebRTC session must be stopped
23498
+ * before a raw-PCM session can be opened on the same device, and
23499
+ * vice versa).
23500
+ */
23501
+ startTalkSession: method(object({ deviceId: number() }), object({ sessionId: string() }), {
23502
+ kind: "mutation",
23503
+ auth: "admin"
23504
+ }),
23505
+ /**
23506
+ * Push one chunk of talk-back audio onto the active talk session.
23507
+ * The cap is codec-agnostic: the caller declares (or omits) the
23508
+ * wire format via `codec`; the provider decides between passthrough
23509
+ * (when the wire codec matches the camera's native talk channel),
23510
+ * transcoding via the `audio-codec` cap, or rejecting the call.
23511
+ *
23512
+ * Callers do NOT need to know the camera's wire format or sample
23513
+ * rate — that information lives entirely inside the provider.
23514
+ *
23515
+ * Sequence numbers MUST be monotonic per talk session; older frames
23516
+ * arriving after newer ones are dropped to avoid smearing the
23517
+ * downstream encoder state (G.711 is stateless but IMA ADPCM's
23518
+ * predictor would corrupt with re-ordering).
23519
+ */
23520
+ pushTalkAudio: method(object({
23521
+ deviceId: number(),
23522
+ /** Audio bytes for ONE frame, base64-encoded so the payload
23523
+ * survives tRPC JSON serialization. */
23524
+ audioBase64: string(),
23525
+ /** Wire codec of the payload. Omit to let the provider default
23526
+ * to its native expected format (s16le @ provider-native rate,
23527
+ * mono). See {@link TalkAudioCodecSchema} for the supported set. */
23528
+ codec: TalkAudioCodecSchema.optional(),
23529
+ /** Sample rate (Hz). REQUIRED for `s16le`; advisory for
23530
+ * `opus` (encoder clock); ignored for `g711*` (implied 8000). */
23531
+ sampleRate: number().int().positive().optional(),
23532
+ /** Channel count. Default 1. */
23533
+ channels: number().int().positive().optional(),
23534
+ /** Sequence number for ordering / dropping out-of-order frames. */
23535
+ sequenceNumber: number().int()
23536
+ }), object({ accepted: boolean() }), {
23537
+ kind: "mutation",
23538
+ auth: "admin"
23539
+ }),
23540
+ /** Close the raw-PCM talk session. Idempotent. */
23541
+ endTalkSession: method(object({ deviceId: number() }), _void(), {
23542
+ kind: "mutation",
23543
+ auth: "admin"
23544
+ })
23545
+ },
23546
+ events: { onStatusChanged: { data: object({
23547
+ deviceId: number(),
23548
+ status: IntercomStatusSchema
23549
+ }) } },
23550
+ status: {
23551
+ schema: IntercomStatusSchema,
23552
+ kind: "command-driven"
23553
+ },
23554
+ /**
23555
+ * Runtime-state slice — mirrored by the kernel.
23556
+ *
23557
+ * The cap declared `status` and nothing else, so the only two sources an
23558
+ * exporter has for a value — the `device.state-changed` slice event and the
23559
+ * `deviceState.getAllSnapshots` snapshot, both built from runtime state —
23560
+ * carried nothing for `intercom`. A talk-back entity in Home Assistant would
23561
+ * have been published and never received a value, which is the defect the
23562
+ * export's two classification tables exist to prevent (177 of them, once), so
23563
+ * `intercom` was excluded rather than exported.
23564
+ *
23565
+ * The shape is the status shape: there is exactly one truth about talk-back
23566
+ * and duplicating it into a second schema is how two halves of one capability
23567
+ * come to disagree. Providers write it through
23568
+ * `this.runtimeState.setCapState('intercom', …)` at the four points that open
23569
+ * and close a session, and seed it at registration so the slice exists before
23570
+ * the first session rather than after it.
23571
+ *
23572
+ * **Bound, named rather than hidden:** `talking` mirrors the provider's own
23573
+ * session handle, so a session torn down by a transport death that never
23574
+ * reaches `stopSession` / `endTalkSession` leaves it latched until the next
23575
+ * session or the next restart. That is why the slice is `session` and not
23576
+ * `restored` — a restart must never restore "talking".
23577
+ */
23578
+ runtimeState: IntercomStatusSchema,
23579
+ /**
23580
+ * Runtime-state durability: **session** — `talking` describes a live audio
23581
+ * session, which by definition does not survive the process that held it.
23582
+ * Restoring it would publish a camera as talking to nobody.
23583
+ *
23584
+ * See `RuntimeStateDurability`. Enforced by
23585
+ * `scripts/check-runtime-state-durability.ts`.
23586
+ */
23587
+ durability: "session"
23588
+ };
22833
23589
  /**
22834
23590
  * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
22835
23591
  * with a mowing lifecycle plus a dock action.
@@ -25526,7 +26282,7 @@ method(object({
25526
26282
  toMs: number()
25527
26283
  }), RecordingAvailabilitySchema, {
25528
26284
  kind: "query",
25529
- auth: "admin"
26285
+ auth: "protected"
25530
26286
  }), method(object({
25531
26287
  deviceId: number(),
25532
26288
  fromMs: number(),
@@ -25534,14 +26290,14 @@ method(object({
25534
26290
  tzOffsetMinutes: number()
25535
26291
  }), RecordingDaysSchema, {
25536
26292
  kind: "query",
25537
- auth: "admin"
26293
+ auth: "protected"
25538
26294
  }), method(object({
25539
26295
  deviceId: number(),
25540
26296
  fromMs: number(),
25541
26297
  toMs: number()
25542
26298
  }), RecordingManifestSchema, {
25543
26299
  kind: "query",
25544
- auth: "admin"
26300
+ auth: "protected"
25545
26301
  }), method(object({}), RecordingStorageUsageSchema, {
25546
26302
  kind: "query",
25547
26303
  auth: "admin"
@@ -25831,14 +26587,77 @@ method(object({
25831
26587
  * thing except the comparator: `similarity` (CLIP cosine at the same ROI coords
25832
26588
  * vs condition-tagged references) and `llm` (vision-LLM judgment over the crop).
25833
26589
  *
25834
- * D14 device-config archetype (`deviceConfig.ui.kind:'widget'`) — the framework
25835
- * derives the device-detail contribution; the provider carries NO hand-written
25836
- * settings-contribution methods. `status.kind:'push'` — the engine pushes on
25837
- * every hysteresis flip / availability change; consumers never poll.
25838
- */
25839
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
25840
- * be added without a wire break (matching falls back to any-condition refs). */
26590
+ * **No `deviceConfig`, deliberately.** This shipped as the D14 widget archetype,
26591
+ * which put a "Scenes" tab on one camera's detail page. That is the wrong shape
26592
+ * for the thing: a scene is a standing question about the property ("is the bin
26593
+ * still out"), and the operator's question is "which of my scenes have tripped",
26594
+ * across every camera at once — not "what does camera 617 think". Buried one
26595
+ * camera deep it also could not be found. The surface is now a top-level admin
26596
+ * page (`/scenes`, `pages/Scenes.tsx`) that lists every scene on every camera and
26597
+ * picks the camera inside the create flow, the same shape Events and Faces have.
26598
+ *
26599
+ * The consequence to keep in mind: `host/scene-monitor-editor` is gone from
26600
+ * `HOST_WIDGETS` too. `scripts/check-host-widget-resolves.ts` asserts BOTH
26601
+ * directions, so a registration nobody declares fails exactly as loudly as a
26602
+ * declaration nobody registers. The editor is imported directly by the page.
26603
+ *
26604
+ * `status.kind:'push'` — the engine pushes on every hysteresis flip /
26605
+ * availability change; consumers never poll.
26606
+ */
26607
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
26608
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
26609
+ * Open by design so more can be added without a wire break.
26610
+ *
26611
+ * Matching does NOT fall back across conditions: cross-condition cosines are
26612
+ * not comparable, so "I have never seen this scene in this light" is reported
26613
+ * as `unknown`, never guessed. A day reference scored against an IR frame
26614
+ * collapses the cosine and would latch a false alarm every single night. */
25841
26615
  var SceneConditionSchema = string();
26616
+ /**
26617
+ * What a scene does when the CURRENT light has no reference of its own.
26618
+ *
26619
+ * The lighting variants are not equally likely to exist. Almost every operator
26620
+ * captures daylight and then never stands outside at 22:00 to capture IR, and a
26621
+ * scene that is only ever going to be asked about a daytime question ("is the
26622
+ * bin still on the kerb at 08:00") does not need a night reference at all. The
26623
+ * night half must therefore be OPTIONAL, and optional means the scene keeps
26624
+ * working without it rather than degrading into a permanent complaint.
26625
+ *
26626
+ * - `skip` (default) — the check in that light is not made. Not a verdict, not
26627
+ * an alarm, not even an `unknown`: the live state simply stays whatever the
26628
+ * last covered light left it at, the latch is untouched, and the hysteresis
26629
+ * run is neither spent nor cleared. The scene resumes by itself at first
26630
+ * light. This is the only behaviour under which "I never captured IR" is a
26631
+ * configuration choice instead of a nightly fault.
26632
+ * - `judge-anyway` — score against the OTHER conditions' references. Available
26633
+ * for cameras whose IR frame is close enough to daylight (a floodlit
26634
+ * driveway, an always-white-light doorbell), and wrong for everything else:
26635
+ * cross-condition cosines are not comparable, so a day reference against a
26636
+ * true IR frame collapses and the scene reports a theft at 21:40.
26637
+ *
26638
+ * Never applies when the scene has NO comparable reference at all — that is
26639
+ * "not armed yet", it is reported as `no-reference-for-condition`, and silence
26640
+ * there would hide a scene the operator never finished setting up.
26641
+ */
26642
+ var SceneUncoveredPolicySchema = _enum(["skip", "judge-anyway"]);
26643
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
26644
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
26645
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
26646
+ * and never counts toward hysteresis in either direction. */
26647
+ var SceneVerdictSchema = _enum([
26648
+ "matched",
26649
+ "diverged",
26650
+ "unknown"
26651
+ ]);
26652
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
26653
+ * silence that reads as "nothing has happened". */
26654
+ var SceneUnavailableSchema = _enum([
26655
+ "no-reference-for-condition",
26656
+ "view-shifted",
26657
+ "no-vision-profile",
26658
+ "encoder-model-changed",
26659
+ "no-snapshot"
26660
+ ]);
25842
26661
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
25843
26662
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
25844
26663
  var SceneReferenceSchema = object({
@@ -25846,7 +26665,14 @@ var SceneReferenceSchema = object({
25846
26665
  modelId: string(),
25847
26666
  condition: SceneConditionSchema,
25848
26667
  capturedAt: number(),
25849
- thumbnailMediaId: string().optional()
26668
+ thumbnailMediaId: string().optional(),
26669
+ /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
26670
+ * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
26671
+ * normalized rect frame a different piece of world, and the scene would
26672
+ * diverge forever with a perfectly plausible cosine. Checked LAZILY, only
26673
+ * when hysteresis is about to flip — one extra encode per candidate
26674
+ * transition, not per poll. */
26675
+ anchorEmbedding: array(number()).optional()
25850
26676
  });
25851
26677
  var SceneMonitorStateSchema = object({
25852
26678
  id: string(),
@@ -25868,6 +26694,28 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
25868
26694
  profileId: string().optional(),
25869
26695
  hysteresisCount: number().int().positive()
25870
26696
  })]);
26697
+ var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
26698
+ /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
26699
+ * out in silence rather than reporting a fault every night. */
26700
+ var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
26701
+ /**
26702
+ * Vision-model adjudication of a candidate flip. Field names deliberately
26703
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
26704
+ *
26705
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
26706
+ * fail-open: a notification suppressed is the worse error there, but a vision
26707
+ * model that timed out has not told us the bin is gone, and a latch is a
26708
+ * stateful claim that costs the operator a trip to reset.
26709
+ */
26710
+ var SceneConfirmSchema = object({
26711
+ enabled: boolean().default(false),
26712
+ prompt: string().min(1).max(1e3),
26713
+ profileId: string().optional(),
26714
+ timeoutMs: number().int().min(1e3).max(2e4).default(8e3),
26715
+ maxImagePx: number().int().min(64).max(2048).default(448),
26716
+ /** What a timeout / unavailable model means for the PENDING flip. */
26717
+ onTimeout: _enum(["flip", "hold"]).default("hold")
26718
+ });
25871
26719
  var SceneMonitorSchema = object({
25872
26720
  id: string(),
25873
26721
  label: string(),
@@ -25886,7 +26734,56 @@ var SceneMonitorSchema = object({
25886
26734
  lastConfidence: number().nullable(),
25887
26735
  currentCondition: SceneConditionSchema.nullable(),
25888
26736
  availability: _enum(["ok", "unavailable"]),
25889
- unavailableReason: string().nullable()
26737
+ unavailableReason: string().nullable(),
26738
+ /** Which state is "the initial screen". `null` until the first capture. */
26739
+ baselineStateId: string().nullable(),
26740
+ /** Which boolean drives notification rules and any export. */
26741
+ emit: _enum(["latched", "live"]).default("latched"),
26742
+ /** Live: does the region match the baseline RIGHT NOW. */
26743
+ verdict: SceneVerdictSchema,
26744
+ /** Has it been `diverged` at least once since `armedAt` — the operator's boolean. */
26745
+ latched: boolean(),
26746
+ /** Last reset (or creation). */
26747
+ armedAt: number(),
26748
+ divergedAt: number().nullable(),
26749
+ restoredAt: number().nullable(),
26750
+ /** A check is only COUNTED when the device has been quiet this long. Motion
26751
+ * during the window DISCARDS the observation — a car pulling up in front of
26752
+ * the bin must not be able to spend hysteresis credit. */
26753
+ quietSeconds: number().int().min(0).max(3600).default(60),
26754
+ /** An observation only advances the pending count when it is at least this
26755
+ * far from the previously counted one, so N agreeing checks span real time
26756
+ * rather than N adjacent polls inside one occlusion. */
26757
+ minObservationSpacingSec: number().int().min(0).max(3600).default(120),
26758
+ /** Vision-model adjudication of a candidate flip. Similarity primary only. */
26759
+ confirm: SceneConfirmSchema.optional(),
26760
+ /** Whole-frame anchor cosine below which a flip is REFUSED as `view-shifted`. */
26761
+ anchorThreshold: number().min(0).max(1).default(SCENE_DEFAULT_ANCHOR_THRESHOLD),
26762
+ /** Clear the latch on its own when the scene matches again? Default false —
26763
+ * `restoredAt` and the `scene-restored` edge are recorded regardless, so an
26764
+ * automation can react to the bin coming back without the operator's own
26765
+ * alarm silently clearing itself. */
26766
+ autoRestore: boolean().default(false),
26767
+ /** What to do when the current light has no reference of its own. See
26768
+ * {@link SceneUncoveredPolicySchema} — the default makes night OPTIONAL. */
26769
+ onUncoveredCondition: SceneUncoveredPolicySchema.default(SCENE_DEFAULT_UNCOVERED_POLICY),
26770
+ /**
26771
+ * The light whose checks are currently being SAT OUT under
26772
+ * `onUncoveredCondition: 'skip'` — `null` when the scene is checking normally.
26773
+ *
26774
+ * Engine-reported and advisory only: it moves no verdict, no latch and no
26775
+ * hysteresis. It exists so the card can say *"night (IR) — checks paused,
26776
+ * nothing captured in this light"* in the same calm voice as the coverage
26777
+ * line, because the alternative is a scene that silently stops answering
26778
+ * after sunset with nothing anywhere saying why. A skipped check must never
26779
+ * read as a broken one.
26780
+ */
26781
+ suspendedCondition: SceneConditionSchema.nullable().default(null),
26782
+ /** Named cause when `verdict === 'unknown'`. */
26783
+ unavailable: SceneUnavailableSchema.nullable(),
26784
+ /** Conditions that have at least one comparable reference — the coverage line
26785
+ * ("day ✓ · ir ✓ · dusk ✗") that turns a silent fallback into a visible fact. */
26786
+ coveredConditions: array(SceneConditionSchema)
25890
26787
  });
25891
26788
  var SceneMonitorStatusSchema = object({
25892
26789
  monitors: array(SceneMonitorSchema),
@@ -25899,12 +26796,6 @@ var sceneMonitorCapability = {
25899
26796
  kind: "wrapper",
25900
26797
  defaultActive: true,
25901
26798
  deviceTypes: [DeviceType.Camera],
25902
- deviceConfig: { ui: {
25903
- kind: "widget",
25904
- widgetId: "host/scene-monitor-editor",
25905
- tab: "scenes",
25906
- label: "Scenes"
25907
- } },
25908
26799
  methods: {
25909
26800
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
25910
26801
  createScene: method(object({
@@ -25935,7 +26826,15 @@ var sceneMonitorCapability = {
25935
26826
  "both"
25936
26827
  ]).optional(),
25937
26828
  checkIntervalSec: number().optional(),
25938
- check: SceneCheckSchema.optional()
26829
+ check: SceneCheckSchema.optional(),
26830
+ emit: _enum(["latched", "live"]).optional(),
26831
+ quietSeconds: number().int().min(0).max(3600).optional(),
26832
+ minObservationSpacingSec: number().int().min(0).max(3600).optional(),
26833
+ anchorThreshold: number().min(0).max(1).optional(),
26834
+ autoRestore: boolean().optional(),
26835
+ onUncoveredCondition: SceneUncoveredPolicySchema.optional(),
26836
+ /** `null` clears the vision-model adjudicator. */
26837
+ confirm: SceneConfirmSchema.nullable().optional()
25939
26838
  })
25940
26839
  }), _void(), {
25941
26840
  kind: "mutation",
@@ -25976,6 +26875,26 @@ var sceneMonitorCapability = {
25976
26875
  }), _void(), {
25977
26876
  kind: "mutation",
25978
26877
  auth: "admin"
26878
+ }),
26879
+ /**
26880
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
26881
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
26882
+ * "reset" in the operator's head means *this is the new normal*, and
26883
+ * re-capture is what makes the feature self-healing against slow drift
26884
+ * instead of failing silently weeks later.
26885
+ *
26886
+ * Reachable from three surfaces on this one mutation: the scene card, a
26887
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
26888
+ * no new Notification-Center code at all), and tRPC for scripts.
26889
+ */
26890
+ resetScene: method(object({
26891
+ deviceId: number(),
26892
+ monitorId: string(),
26893
+ /** Defaults to TRUE at the provider seam — see `SCENE_RESET_RECAPTURES`. */
26894
+ recapture: boolean().optional()
26895
+ }), _void(), {
26896
+ kind: "mutation",
26897
+ auth: "admin"
25979
26898
  })
25980
26899
  },
25981
26900
  status: {
@@ -26212,7 +27131,70 @@ var CamStreamDescriptorSchema = object({
26212
27131
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
26213
27132
  metadata: record(string(), unknown()).optional()
26214
27133
  });
26215
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly());
27134
+ /**
27135
+ * `stream-catalog` — device-scoped, provider-implemented. The pull counterpart
27136
+ * of the removed `publishCameraStream` push: a camera provider returns the full
27137
+ * set of stream descriptors it can offer for the device, synchronously, so the
27138
+ * broker can reconcile its registry against the authoritative provider state.
27139
+ */
27140
+ /**
27141
+ * The catalog as a DURABLE fact rather than a live answer.
27142
+ *
27143
+ * A battery camera's descriptors are profile-stable — they change when the
27144
+ * operator rewrites an encoder profile, not minute to minute — but building
27145
+ * them costs a Baichuan login, which on a sleeping Argus IS a wake. So the
27146
+ * provider is allowed to build them exactly once per profile and must serve
27147
+ * every later pull from a cache.
27148
+ *
27149
+ * Holding that cache only in RAM is what turned a restart into an outage. The
27150
+ * runner comes back with the camera asleep, `buildStreamCatalogUncached`
27151
+ * correctly refuses to wake it, the pull answers `[]`, the broker has no
27152
+ * cam-stream entry to build a broker from, and `webrtcSession.handleOffer`
27153
+ * fails with a flat "No broker for stream" — for as long as the camera sleeps,
27154
+ * which on a battery cam is most of the day. The camera was fine. The stream
27155
+ * was unreachable because the process had forgotten what the camera offers.
27156
+ *
27157
+ * Declaring it here puts it in `device-runtime-state`, the kernel's canonical
27158
+ * declared collection, with the same `restored` durability `battery` uses for
27159
+ * the same reason: the last known value is the only value there is while the
27160
+ * device is asleep. The broker's brokers are therefore always DEFINABLE — it
27161
+ * is the DIAL that wakes a camera, never the catalog (D173).
27162
+ */
27163
+ var StreamCatalogStateSchema = object({
27164
+ /** The descriptors as last built from a real camera response. Never a guess:
27165
+ * a failed or refused build writes NOTHING, so a restored catalog is always
27166
+ * one the camera itself once produced. */
27167
+ descriptors: array(CamStreamDescriptorSchema),
27168
+ /** Ms epoch of the build that produced {@link descriptors}. Lets the wake
27169
+ * path decide whether the camera's own awake window is worth spending on a
27170
+ * re-read. */
27171
+ lastFetchedAt: number()
27172
+ });
27173
+ var streamCatalogCapability = {
27174
+ name: "stream-catalog",
27175
+ scope: "device",
27176
+ deviceNative: true,
27177
+ mode: "singleton",
27178
+ deviceTypes: [DeviceType.Camera],
27179
+ methods: { getCatalog: method(object({ deviceId: number().int().nonnegative() }), array(CamStreamDescriptorSchema).readonly()) },
27180
+ runtimeState: StreamCatalogStateSchema,
27181
+ /**
27182
+ * Runtime-state durability: **restored** — see the schema doc. A cold
27183
+ * catalog on a sleeping battery camera is not a slow first frame, it is a
27184
+ * camera that cannot be watched at all until it happens to wake.
27185
+ *
27186
+ * Churn is nil by construction: the slice is written only by a SUCCESSFUL
27187
+ * build, and a build only runs when there is no cached copy (or the copy is
27188
+ * a day old and the camera is awake anyway).
27189
+ *
27190
+ * See `RuntimeStateDurability`. Enforced by
27191
+ * `scripts/check-runtime-state-durability.ts`.
27192
+ */
27193
+ durability: "restored",
27194
+ /** Clock field: written, but excluded from the compare that decides whether
27195
+ * persisting is worth a SQLite commit — the descriptors are the value. */
27196
+ volatileStateFields: ["lastFetchedAt"]
27197
+ };
26216
27198
  /** One of the camera's stream profiles. */
26217
27199
  var StreamProfileSchema = _enum([
26218
27200
  "main",
@@ -26466,12 +27448,64 @@ var NetworkAddressSchema = object({
26466
27448
  family: string(),
26467
27449
  internal: boolean()
26468
27450
  });
27451
+ /**
27452
+ * Provenance of the site coordinates, and the whole reason this is not just two
27453
+ * numbers.
27454
+ *
27455
+ * - `operator-set` — a human typed it, or accepted a detection. Authoritative;
27456
+ * nothing overwrites it.
27457
+ * - `derived-from-ip` — the hub geolocated its own public IP once, because a
27458
+ * default that is right to a few kilometres beats the coarse UTC clock split
27459
+ * the sun-times consumers otherwise fall back to.
27460
+ *
27461
+ * The UI shows which one it is. An operator who cannot tell a guess from their
27462
+ * own input will eventually trust the guess.
27463
+ */
27464
+ var SiteLocationSourceSchema = _enum(["operator-set", "derived-from-ip"]);
27465
+ /**
27466
+ * The read shape: the location plus the honest state of the one-shot derivation.
27467
+ *
27468
+ * `derivationAttemptedAt` is what makes the "one call, ever" contract
27469
+ * inspectable. When it is set and `location` is null, the geo-IP lookup ran and
27470
+ * failed; the hub will NOT try again on its own — the fallback is declared
27471
+ * (consumers degrade to their own last resort) and the operator either types the
27472
+ * coordinates or presses detect.
27473
+ */
27474
+ var SiteLocationStatusSchema = object({
27475
+ location: object({
27476
+ /** WGS84 decimal degrees. */
27477
+ latitude: number().min(-90).max(90),
27478
+ longitude: number().min(-180).max(180),
27479
+ source: SiteLocationSourceSchema,
27480
+ /** Epoch ms the value was last written. */
27481
+ updatedAt: number(),
27482
+ /**
27483
+ * Human-readable place the geo-IP service reported ("Napoli, IT"). Display
27484
+ * only — never parsed, never matched on. Absent for an operator-typed value.
27485
+ */
27486
+ label: string().optional()
27487
+ }).nullable(),
27488
+ derivationAttemptedAt: number().nullable(),
27489
+ /** Why the last derivation failed, for the UI to show instead of a shrug. */
27490
+ derivationError: string().nullable()
27491
+ });
27492
+ /** `null` clears the location and re-arms nothing — the derivation stays spent. */
27493
+ var SetSiteLocationInputSchema = object({
27494
+ latitude: number().min(-90).max(90),
27495
+ longitude: number().min(-180).max(180)
27496
+ }).nullable();
26469
27497
  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(), {
26470
27498
  kind: "mutation",
26471
27499
  auth: "admin"
26472
27500
  }), method(_void(), _void(), {
26473
27501
  kind: "mutation",
26474
27502
  auth: "admin"
27503
+ }), method(_void(), SiteLocationStatusSchema), method(SetSiteLocationInputSchema, SiteLocationStatusSchema, {
27504
+ kind: "mutation",
27505
+ auth: "admin"
27506
+ }), method(_void(), SiteLocationStatusSchema, {
27507
+ kind: "mutation",
27508
+ auth: "admin"
26475
27509
  });
26476
27510
  /**
26477
27511
  * Tamper / case-open detection sensor. Drives Home Assistant
@@ -27791,6 +28825,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27791
28825
  humiditySensor: humiditySensorCapability,
27792
28826
  image: imageCapability,
27793
28827
  imageSettings: imageSettingsCapability,
28828
+ intercom: intercomCapability,
27794
28829
  lawnMowerControl: lawnMowerControlCapability,
27795
28830
  lockControl: lockControlCapability,
27796
28831
  mediaPlayer: mediaPlayerCapability,
@@ -27809,6 +28844,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
27809
28844
  sceneMonitor: sceneMonitorCapability,
27810
28845
  scriptRunner: scriptRunnerCapability,
27811
28846
  smoke: smokeCapability,
28847
+ streamCatalog: streamCatalogCapability,
27812
28848
  streamParams: streamParamsCapability,
27813
28849
  switch: switchCapability,
27814
28850
  tamper: tamperCapability,
@@ -28462,6 +29498,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28462
29498
  labels: ["probe not implemented"]
28463
29499
  };
28464
29500
  }
29501
+ /**
29502
+ * Top-level devices restored at once in {@link onRestoreDevices}.
29503
+ *
29504
+ * Four covers the fleets this ships to without turning a boot into a burst a
29505
+ * camera NVR answers with a refusal. A provider whose upstream is a single
29506
+ * session with a serial command channel (a Baichuan hub, an NVR that
29507
+ * serialises ISAPI) should lower it; nothing needs to raise it.
29508
+ */
29509
+ restoreConcurrency = 4;
28465
29510
  async restoreDevices(savedDevices) {
28466
29511
  await this.onRestoreDevices(savedDevices);
28467
29512
  if (savedDevices.length > 0) this.ctx.logger.info(`Restored ${savedDevices.length} ${this.providerName} device(s)`);
@@ -28493,15 +29538,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28493
29538
  */
28494
29539
  async onRestoreDevices(savedDevices) {
28495
29540
  const restored = /* @__PURE__ */ new Set();
28496
- for (const saved of savedDevices) {
28497
- if (saved.parentDeviceId !== null) continue;
29541
+ const topLevel = savedDevices.filter((saved) => saved.parentDeviceId === null);
29542
+ const restoreOne = async (saved) => {
28498
29543
  const Class = this.deviceClasses[saved.type];
28499
29544
  if (!Class) {
28500
29545
  this.ctx.logger.warn("No device class registered for restored type — skipping", {
28501
29546
  tags: { stableId: saved.stableId },
28502
29547
  meta: { type: saved.type }
28503
29548
  });
28504
- continue;
29549
+ return;
28505
29550
  }
28506
29551
  try {
28507
29552
  await this.ctx.kernel.devices.create(saved.stableId, Class, {});
@@ -28515,7 +29560,15 @@ var BaseDeviceProvider = class extends BaseAddon {
28515
29560
  }
28516
29561
  });
28517
29562
  }
28518
- }
29563
+ };
29564
+ let nextTopLevel = 0;
29565
+ await Promise.all(Array.from({ length: Math.min(Math.max(1, this.restoreConcurrency), topLevel.length) }, async () => {
29566
+ for (;;) {
29567
+ const saved = topLevel[nextTopLevel++];
29568
+ if (saved === void 0) return;
29569
+ await restoreOne(saved);
29570
+ }
29571
+ }));
28519
29572
  const childRows = savedDevices.filter((s) => s.parentDeviceId !== null);
28520
29573
  for (const saved of childRows) {
28521
29574
  const Class = this.deviceClasses[saved.type];
@@ -30606,6 +31659,12 @@ Object.freeze({
30606
31659
  addonId: null,
30607
31660
  access: "create"
30608
31661
  },
31662
+ "llm.cancel": {
31663
+ capName: "llm",
31664
+ capScope: "system",
31665
+ addonId: null,
31666
+ access: "create"
31667
+ },
30609
31668
  "llm.deleteModel": {
30610
31669
  capName: "llm",
30611
31670
  capScope: "system",
@@ -30690,6 +31749,12 @@ Object.freeze({
30690
31749
  addonId: null,
30691
31750
  access: "view"
30692
31751
  },
31752
+ "llm.resolveModelRef": {
31753
+ capName: "llm",
31754
+ capScope: "system",
31755
+ addonId: null,
31756
+ access: "create"
31757
+ },
30693
31758
  "llm.setDefault": {
30694
31759
  capName: "llm",
30695
31760
  capScope: "system",
@@ -32856,6 +33921,12 @@ Object.freeze({
32856
33921
  addonId: null,
32857
33922
  access: "create"
32858
33923
  },
33924
+ "sceneMonitor.resetScene": {
33925
+ capName: "scene-monitor",
33926
+ capScope: "device",
33927
+ addonId: null,
33928
+ access: "delete"
33929
+ },
32859
33930
  "sceneMonitor.updateScene": {
32860
33931
  capName: "scene-monitor",
32861
33932
  capScope: "device",
@@ -33534,6 +34605,12 @@ Object.freeze({
33534
34605
  addonId: null,
33535
34606
  access: "create"
33536
34607
  },
34608
+ "system.detectSiteLocation": {
34609
+ capName: "system",
34610
+ capScope: "system",
34611
+ addonId: null,
34612
+ access: "create"
34613
+ },
33537
34614
  "system.featureFlags": {
33538
34615
  capName: "system",
33539
34616
  capScope: "system",
@@ -33552,6 +34629,12 @@ Object.freeze({
33552
34629
  addonId: null,
33553
34630
  access: "view"
33554
34631
  },
34632
+ "system.getSiteLocation": {
34633
+ capName: "system",
34634
+ capScope: "system",
34635
+ addonId: null,
34636
+ access: "view"
34637
+ },
33555
34638
  "system.health": {
33556
34639
  capName: "system",
33557
34640
  capScope: "system",
@@ -33576,6 +34659,12 @@ Object.freeze({
33576
34659
  addonId: null,
33577
34660
  access: "create"
33578
34661
  },
34662
+ "system.setSiteLocation": {
34663
+ capName: "system",
34664
+ capScope: "system",
34665
+ addonId: null,
34666
+ access: "create"
34667
+ },
33579
34668
  "terminalSession.adoptLegacyMonitor": {
33580
34669
  capName: "terminal-session",
33581
34670
  capScope: "system",
@@ -34147,6 +35236,1704 @@ Object.freeze({
34147
35236
  access: "create"
34148
35237
  }
34149
35238
  });
35239
+ Object.freeze({
35240
+ "accessories.setChildHidden": [{
35241
+ name: "childDeviceId",
35242
+ form: "single",
35243
+ optional: false
35244
+ }, {
35245
+ name: "deviceId",
35246
+ form: "single",
35247
+ optional: false
35248
+ }],
35249
+ "addonSettings.getDeviceSettings": [{
35250
+ name: "deviceId",
35251
+ form: "single",
35252
+ optional: false
35253
+ }],
35254
+ "addonSettings.updateDeviceSettings": [{
35255
+ name: "deviceId",
35256
+ form: "single",
35257
+ optional: false
35258
+ }],
35259
+ "alarmPanel.arm": [{
35260
+ name: "deviceId",
35261
+ form: "single",
35262
+ optional: false
35263
+ }],
35264
+ "alarmPanel.disarm": [{
35265
+ name: "deviceId",
35266
+ form: "single",
35267
+ optional: false
35268
+ }],
35269
+ "alarmPanel.trigger": [{
35270
+ name: "deviceId",
35271
+ form: "single",
35272
+ optional: false
35273
+ }],
35274
+ "audioAnalysis.resolveDeviceSettings": [{
35275
+ name: "deviceId",
35276
+ form: "single",
35277
+ optional: false
35278
+ }],
35279
+ "audioAnalyzer.classify": [{
35280
+ name: "deviceId",
35281
+ form: "single",
35282
+ optional: true
35283
+ }],
35284
+ "audioMetrics.getCurrentSnapshot": [{
35285
+ name: "deviceId",
35286
+ form: "single",
35287
+ optional: false
35288
+ }],
35289
+ "audioMetrics.getHistory": [{
35290
+ name: "deviceId",
35291
+ form: "single",
35292
+ optional: false
35293
+ }],
35294
+ "automationControl.disable": [{
35295
+ name: "deviceId",
35296
+ form: "single",
35297
+ optional: false
35298
+ }],
35299
+ "automationControl.enable": [{
35300
+ name: "deviceId",
35301
+ form: "single",
35302
+ optional: false
35303
+ }],
35304
+ "automationControl.trigger": [{
35305
+ name: "deviceId",
35306
+ form: "single",
35307
+ optional: false
35308
+ }],
35309
+ "battery.wakeForStream": [{
35310
+ name: "deviceId",
35311
+ form: "single",
35312
+ optional: false
35313
+ }],
35314
+ "brightness.setBrightness": [{
35315
+ name: "deviceId",
35316
+ form: "single",
35317
+ optional: false
35318
+ }],
35319
+ "button.press": [{
35320
+ name: "deviceId",
35321
+ form: "single",
35322
+ optional: false
35323
+ }],
35324
+ "cameraCredentials.getCredentials": [{
35325
+ name: "deviceId",
35326
+ form: "single",
35327
+ optional: false
35328
+ }],
35329
+ "cameraStreams.getBrokerStreams": [{
35330
+ name: "deviceId",
35331
+ form: "single",
35332
+ optional: false
35333
+ }],
35334
+ "cameraStreams.getCameraStreams": [{
35335
+ name: "deviceId",
35336
+ form: "single",
35337
+ optional: false
35338
+ }],
35339
+ "cameraStreams.getProfileRtspEntries": [{
35340
+ name: "deviceId",
35341
+ form: "single",
35342
+ optional: false
35343
+ }],
35344
+ "cameraStreams.getRtspEntries": [{
35345
+ name: "deviceId",
35346
+ form: "single",
35347
+ optional: false
35348
+ }],
35349
+ "cameraStreams.pickStream": [{
35350
+ name: "deviceId",
35351
+ form: "single",
35352
+ optional: false
35353
+ }],
35354
+ "climateControl.setFanMode": [{
35355
+ name: "deviceId",
35356
+ form: "single",
35357
+ optional: false
35358
+ }],
35359
+ "climateControl.setMode": [{
35360
+ name: "deviceId",
35361
+ form: "single",
35362
+ optional: false
35363
+ }],
35364
+ "climateControl.setPreset": [{
35365
+ name: "deviceId",
35366
+ form: "single",
35367
+ optional: false
35368
+ }],
35369
+ "climateControl.setSwingHorizontal": [{
35370
+ name: "deviceId",
35371
+ form: "single",
35372
+ optional: false
35373
+ }],
35374
+ "climateControl.setSwingVertical": [{
35375
+ name: "deviceId",
35376
+ form: "single",
35377
+ optional: false
35378
+ }],
35379
+ "climateControl.setTarget": [{
35380
+ name: "deviceId",
35381
+ form: "single",
35382
+ optional: false
35383
+ }],
35384
+ "climateControl.setTargetHumidity": [{
35385
+ name: "deviceId",
35386
+ form: "single",
35387
+ optional: false
35388
+ }],
35389
+ "climateControl.setTargetRange": [{
35390
+ name: "deviceId",
35391
+ form: "single",
35392
+ optional: false
35393
+ }],
35394
+ "color.setColor": [{
35395
+ name: "deviceId",
35396
+ form: "single",
35397
+ optional: false
35398
+ }],
35399
+ "consumables.reset": [{
35400
+ name: "deviceId",
35401
+ form: "single",
35402
+ optional: false
35403
+ }],
35404
+ "control.setValue": [{
35405
+ name: "deviceId",
35406
+ form: "single",
35407
+ optional: false
35408
+ }],
35409
+ "cover.close": [{
35410
+ name: "deviceId",
35411
+ form: "single",
35412
+ optional: false
35413
+ }],
35414
+ "cover.open": [{
35415
+ name: "deviceId",
35416
+ form: "single",
35417
+ optional: false
35418
+ }],
35419
+ "cover.setPosition": [{
35420
+ name: "deviceId",
35421
+ form: "single",
35422
+ optional: false
35423
+ }],
35424
+ "cover.setTiltPosition": [{
35425
+ name: "deviceId",
35426
+ form: "single",
35427
+ optional: false
35428
+ }],
35429
+ "cover.stop": [{
35430
+ name: "deviceId",
35431
+ form: "single",
35432
+ optional: false
35433
+ }],
35434
+ "dayNight.getOptions": [{
35435
+ name: "deviceId",
35436
+ form: "single",
35437
+ optional: false
35438
+ }],
35439
+ "dayNight.setSettings": [{
35440
+ name: "deviceId",
35441
+ form: "single",
35442
+ optional: false
35443
+ }],
35444
+ "decoder.createSession": [{
35445
+ name: "deviceId",
35446
+ form: "single",
35447
+ optional: true
35448
+ }],
35449
+ "deviceAdoption.release": [{
35450
+ name: "camDeviceId",
35451
+ form: "single",
35452
+ optional: false
35453
+ }],
35454
+ "deviceAdoption.resync": [{
35455
+ name: "camDeviceId",
35456
+ form: "single",
35457
+ optional: false
35458
+ }],
35459
+ "deviceDiscovery.adoptDevice": [{
35460
+ name: "deviceId",
35461
+ form: "single",
35462
+ optional: false
35463
+ }],
35464
+ "deviceDiscovery.listDiscovered": [{
35465
+ name: "deviceId",
35466
+ form: "single",
35467
+ optional: false
35468
+ }],
35469
+ "deviceDiscovery.refreshDiscovery": [{
35470
+ name: "deviceId",
35471
+ form: "single",
35472
+ optional: false
35473
+ }],
35474
+ "deviceDiscovery.releaseDevice": [{
35475
+ name: "childDeviceId",
35476
+ form: "single",
35477
+ optional: false
35478
+ }, {
35479
+ name: "deviceId",
35480
+ form: "single",
35481
+ optional: false
35482
+ }],
35483
+ "deviceManager.adoptionRelease": [{
35484
+ name: "camDeviceId",
35485
+ form: "single",
35486
+ optional: false
35487
+ }],
35488
+ "deviceManager.adoptionResync": [{
35489
+ name: "camDeviceId",
35490
+ form: "single",
35491
+ optional: false
35492
+ }],
35493
+ "deviceManager.applyInitialMeta": [{
35494
+ name: "deviceId",
35495
+ form: "single",
35496
+ optional: false
35497
+ }, {
35498
+ name: "linkDeviceId",
35499
+ form: "single",
35500
+ optional: true
35501
+ }],
35502
+ "deviceManager.disable": [{
35503
+ name: "deviceId",
35504
+ form: "single",
35505
+ optional: false
35506
+ }],
35507
+ "deviceManager.enable": [{
35508
+ name: "deviceId",
35509
+ form: "single",
35510
+ optional: false
35511
+ }],
35512
+ "deviceManager.getBindings": [{
35513
+ name: "deviceId",
35514
+ form: "single",
35515
+ optional: false
35516
+ }],
35517
+ "deviceManager.getChildren": [{
35518
+ name: "parentDeviceId",
35519
+ form: "single",
35520
+ optional: false
35521
+ }],
35522
+ "deviceManager.getConfigSchema": [{
35523
+ name: "deviceId",
35524
+ form: "single",
35525
+ optional: false
35526
+ }],
35527
+ "deviceManager.getDevice": [{
35528
+ name: "deviceId",
35529
+ form: "single",
35530
+ optional: false
35531
+ }],
35532
+ "deviceManager.getDeviceAggregate": [{
35533
+ name: "deviceId",
35534
+ form: "single",
35535
+ optional: false
35536
+ }],
35537
+ "deviceManager.getDeviceLiveInfoAggregate": [{
35538
+ name: "deviceId",
35539
+ form: "single",
35540
+ optional: false
35541
+ }],
35542
+ "deviceManager.getDeviceSettingsAggregate": [{
35543
+ name: "deviceId",
35544
+ form: "single",
35545
+ optional: false
35546
+ }],
35547
+ "deviceManager.getDeviceStatusAggregate": [{
35548
+ name: "deviceId",
35549
+ form: "single",
35550
+ optional: false
35551
+ }],
35552
+ "deviceManager.getDeviceStatusAggregateBatch": [{
35553
+ name: "deviceIds",
35554
+ form: "array",
35555
+ optional: false
35556
+ }],
35557
+ "deviceManager.getLinkedDevices": [{
35558
+ name: "deviceId",
35559
+ form: "single",
35560
+ optional: false
35561
+ }],
35562
+ "deviceManager.getSettingsSchema": [{
35563
+ name: "deviceId",
35564
+ form: "single",
35565
+ optional: false
35566
+ }],
35567
+ "deviceManager.getStreamProfileMap": [{
35568
+ name: "deviceId",
35569
+ form: "single",
35570
+ optional: false
35571
+ }],
35572
+ "deviceManager.getStreamSources": [{
35573
+ name: "deviceId",
35574
+ form: "single",
35575
+ optional: false
35576
+ }],
35577
+ "deviceManager.getWireableFields": [{
35578
+ name: "deviceId",
35579
+ form: "single",
35580
+ optional: false
35581
+ }],
35582
+ "deviceManager.loadConfig": [{
35583
+ name: "deviceId",
35584
+ form: "single",
35585
+ optional: false
35586
+ }],
35587
+ "deviceManager.loadMeta": [{
35588
+ name: "deviceId",
35589
+ form: "single",
35590
+ optional: false
35591
+ }],
35592
+ "deviceManager.loadRuntimeState": [{
35593
+ name: "deviceId",
35594
+ form: "single",
35595
+ optional: false
35596
+ }],
35597
+ "deviceManager.persistConfig": [{
35598
+ name: "deviceId",
35599
+ form: "single",
35600
+ optional: false
35601
+ }],
35602
+ "deviceManager.probeStreams": [{
35603
+ name: "deviceId",
35604
+ form: "single",
35605
+ optional: false
35606
+ }],
35607
+ "deviceManager.registerDevice": [{
35608
+ name: "parentDeviceId",
35609
+ form: "single",
35610
+ optional: true
35611
+ }],
35612
+ "deviceManager.remove": [{
35613
+ name: "deviceId",
35614
+ form: "single",
35615
+ optional: false
35616
+ }],
35617
+ "deviceManager.removeDevice": [{
35618
+ name: "deviceId",
35619
+ form: "single",
35620
+ optional: false
35621
+ }],
35622
+ "deviceManager.runDeviceAction": [{
35623
+ name: "deviceId",
35624
+ form: "single",
35625
+ optional: false
35626
+ }],
35627
+ "deviceManager.setChildLayout": [{
35628
+ name: "deviceId",
35629
+ form: "single",
35630
+ optional: false
35631
+ }],
35632
+ "deviceManager.setDisabled": [{
35633
+ name: "deviceId",
35634
+ form: "single",
35635
+ optional: false
35636
+ }],
35637
+ "deviceManager.setDisplay": [{
35638
+ name: "deviceId",
35639
+ form: "single",
35640
+ optional: false
35641
+ }],
35642
+ "deviceManager.setIntegrationId": [{
35643
+ name: "deviceId",
35644
+ form: "single",
35645
+ optional: false
35646
+ }],
35647
+ "deviceManager.setLinkDeviceId": [{
35648
+ name: "deviceId",
35649
+ form: "single",
35650
+ optional: false
35651
+ }, {
35652
+ name: "linkDeviceId",
35653
+ form: "single",
35654
+ optional: true
35655
+ }],
35656
+ "deviceManager.setLocation": [{
35657
+ name: "deviceId",
35658
+ form: "single",
35659
+ optional: false
35660
+ }],
35661
+ "deviceManager.setMetadata": [{
35662
+ name: "deviceId",
35663
+ form: "single",
35664
+ optional: false
35665
+ }],
35666
+ "deviceManager.setName": [{
35667
+ name: "deviceId",
35668
+ form: "single",
35669
+ optional: false
35670
+ }],
35671
+ "deviceManager.setPrimaryChildEntityId": [{
35672
+ name: "deviceId",
35673
+ form: "single",
35674
+ optional: false
35675
+ }],
35676
+ "deviceManager.setRole": [{
35677
+ name: "deviceId",
35678
+ form: "single",
35679
+ optional: false
35680
+ }],
35681
+ "deviceManager.setStreamProfileMap": [{
35682
+ name: "deviceId",
35683
+ form: "single",
35684
+ optional: false
35685
+ }],
35686
+ "deviceManager.setType": [{
35687
+ name: "deviceId",
35688
+ form: "single",
35689
+ optional: false
35690
+ }],
35691
+ "deviceManager.setWrapperActive": [{
35692
+ name: "deviceId",
35693
+ form: "single",
35694
+ optional: false
35695
+ }],
35696
+ "deviceManager.testField": [{
35697
+ name: "deviceId",
35698
+ form: "single",
35699
+ optional: false
35700
+ }],
35701
+ "deviceManager.updateConfig": [{
35702
+ name: "deviceId",
35703
+ form: "single",
35704
+ optional: false
35705
+ }],
35706
+ "deviceManager.updateDeviceField": [{
35707
+ name: "deviceId",
35708
+ form: "single",
35709
+ optional: false
35710
+ }],
35711
+ "deviceManager.updateDeviceFieldsBatch": [{
35712
+ name: "deviceId",
35713
+ form: "single",
35714
+ optional: false
35715
+ }],
35716
+ "deviceOps.getConfigEntries": [{
35717
+ name: "deviceId",
35718
+ form: "single",
35719
+ optional: false
35720
+ }],
35721
+ "deviceOps.getRawState": [{
35722
+ name: "deviceId",
35723
+ form: "single",
35724
+ optional: false
35725
+ }],
35726
+ "deviceOps.getSettingsSchema": [{
35727
+ name: "deviceId",
35728
+ form: "single",
35729
+ optional: false
35730
+ }],
35731
+ "deviceOps.getStreamSources": [{
35732
+ name: "deviceId",
35733
+ form: "single",
35734
+ optional: false
35735
+ }],
35736
+ "deviceOps.removeDevice": [{
35737
+ name: "deviceId",
35738
+ form: "single",
35739
+ optional: false
35740
+ }],
35741
+ "deviceOps.runAction": [{
35742
+ name: "deviceId",
35743
+ form: "single",
35744
+ optional: false
35745
+ }],
35746
+ "deviceOps.setConfig": [{
35747
+ name: "deviceId",
35748
+ form: "single",
35749
+ optional: false
35750
+ }],
35751
+ "deviceState.getCapSlice": [{
35752
+ name: "deviceId",
35753
+ form: "single",
35754
+ optional: false
35755
+ }],
35756
+ "deviceState.getSnapshot": [{
35757
+ name: "deviceId",
35758
+ form: "single",
35759
+ optional: false
35760
+ }],
35761
+ "deviceState.setCapSlice": [{
35762
+ name: "deviceId",
35763
+ form: "single",
35764
+ optional: false
35765
+ }],
35766
+ "events.getEventClipUrl": [{
35767
+ name: "deviceId",
35768
+ form: "single",
35769
+ optional: false
35770
+ }],
35771
+ "events.getEvents": [{
35772
+ name: "deviceId",
35773
+ form: "single",
35774
+ optional: false
35775
+ }],
35776
+ "events.getEventThumbnail": [{
35777
+ name: "deviceId",
35778
+ form: "single",
35779
+ optional: false
35780
+ }],
35781
+ "faceGallery.getFaceByTrack": [{
35782
+ name: "deviceId",
35783
+ form: "single",
35784
+ optional: false
35785
+ }],
35786
+ "faceGallery.listRecentFaces": [{
35787
+ name: "deviceId",
35788
+ form: "single",
35789
+ optional: true
35790
+ }],
35791
+ "fanControl.setDirection": [{
35792
+ name: "deviceId",
35793
+ form: "single",
35794
+ optional: false
35795
+ }],
35796
+ "fanControl.setOscillating": [{
35797
+ name: "deviceId",
35798
+ form: "single",
35799
+ optional: false
35800
+ }],
35801
+ "fanControl.setPercentage": [{
35802
+ name: "deviceId",
35803
+ form: "single",
35804
+ optional: false
35805
+ }],
35806
+ "fanControl.setPreset": [{
35807
+ name: "deviceId",
35808
+ form: "single",
35809
+ optional: false
35810
+ }],
35811
+ "humidifier.setMode": [{
35812
+ name: "deviceId",
35813
+ form: "single",
35814
+ optional: false
35815
+ }],
35816
+ "humidifier.setOn": [{
35817
+ name: "deviceId",
35818
+ form: "single",
35819
+ optional: false
35820
+ }],
35821
+ "humidifier.setTargetHumidity": [{
35822
+ name: "deviceId",
35823
+ form: "single",
35824
+ optional: false
35825
+ }],
35826
+ "imageSettings.getOptions": [{
35827
+ name: "deviceId",
35828
+ form: "single",
35829
+ optional: false
35830
+ }],
35831
+ "imageSettings.setSettings": [{
35832
+ name: "deviceId",
35833
+ form: "single",
35834
+ optional: false
35835
+ }],
35836
+ "intercom.endTalkSession": [{
35837
+ name: "deviceId",
35838
+ form: "single",
35839
+ optional: false
35840
+ }],
35841
+ "intercom.handleAnswer": [{
35842
+ name: "deviceId",
35843
+ form: "single",
35844
+ optional: false
35845
+ }],
35846
+ "intercom.pushTalkAudio": [{
35847
+ name: "deviceId",
35848
+ form: "single",
35849
+ optional: false
35850
+ }],
35851
+ "intercom.startSession": [{
35852
+ name: "deviceId",
35853
+ form: "single",
35854
+ optional: false
35855
+ }],
35856
+ "intercom.startTalkSession": [{
35857
+ name: "deviceId",
35858
+ form: "single",
35859
+ optional: false
35860
+ }],
35861
+ "intercom.stopSession": [{
35862
+ name: "deviceId",
35863
+ form: "single",
35864
+ optional: false
35865
+ }],
35866
+ "lawnMowerControl.dock": [{
35867
+ name: "deviceId",
35868
+ form: "single",
35869
+ optional: false
35870
+ }],
35871
+ "lawnMowerControl.pause": [{
35872
+ name: "deviceId",
35873
+ form: "single",
35874
+ optional: false
35875
+ }],
35876
+ "lawnMowerControl.startMowing": [{
35877
+ name: "deviceId",
35878
+ form: "single",
35879
+ optional: false
35880
+ }],
35881
+ "lockControl.lock": [{
35882
+ name: "deviceId",
35883
+ form: "single",
35884
+ optional: false
35885
+ }],
35886
+ "lockControl.open": [{
35887
+ name: "deviceId",
35888
+ form: "single",
35889
+ optional: false
35890
+ }],
35891
+ "lockControl.unlock": [{
35892
+ name: "deviceId",
35893
+ form: "single",
35894
+ optional: false
35895
+ }],
35896
+ "mediaPlayer.next": [{
35897
+ name: "deviceId",
35898
+ form: "single",
35899
+ optional: false
35900
+ }],
35901
+ "mediaPlayer.pause": [{
35902
+ name: "deviceId",
35903
+ form: "single",
35904
+ optional: false
35905
+ }],
35906
+ "mediaPlayer.play": [{
35907
+ name: "deviceId",
35908
+ form: "single",
35909
+ optional: false
35910
+ }],
35911
+ "mediaPlayer.playMedia": [{
35912
+ name: "deviceId",
35913
+ form: "single",
35914
+ optional: false
35915
+ }],
35916
+ "mediaPlayer.previous": [{
35917
+ name: "deviceId",
35918
+ form: "single",
35919
+ optional: false
35920
+ }],
35921
+ "mediaPlayer.seek": [{
35922
+ name: "deviceId",
35923
+ form: "single",
35924
+ optional: false
35925
+ }],
35926
+ "mediaPlayer.selectSource": [{
35927
+ name: "deviceId",
35928
+ form: "single",
35929
+ optional: false
35930
+ }],
35931
+ "mediaPlayer.setMute": [{
35932
+ name: "deviceId",
35933
+ form: "single",
35934
+ optional: false
35935
+ }],
35936
+ "mediaPlayer.setRepeat": [{
35937
+ name: "deviceId",
35938
+ form: "single",
35939
+ optional: false
35940
+ }],
35941
+ "mediaPlayer.setShuffle": [{
35942
+ name: "deviceId",
35943
+ form: "single",
35944
+ optional: false
35945
+ }],
35946
+ "mediaPlayer.setVolume": [{
35947
+ name: "deviceId",
35948
+ form: "single",
35949
+ optional: false
35950
+ }],
35951
+ "mediaPlayer.stop": [{
35952
+ name: "deviceId",
35953
+ form: "single",
35954
+ optional: false
35955
+ }],
35956
+ "motion.isDetected": [{
35957
+ name: "deviceId",
35958
+ form: "single",
35959
+ optional: false
35960
+ }],
35961
+ "motionDetection.analyze": [{
35962
+ name: "deviceId",
35963
+ form: "single",
35964
+ optional: false
35965
+ }],
35966
+ "motionDetection.removeCamera": [{
35967
+ name: "deviceId",
35968
+ form: "single",
35969
+ optional: false
35970
+ }],
35971
+ "motionTrigger.setMotionTrigger": [{
35972
+ name: "deviceId",
35973
+ form: "single",
35974
+ optional: false
35975
+ }],
35976
+ "motionZones.getOptions": [{
35977
+ name: "deviceId",
35978
+ form: "single",
35979
+ optional: false
35980
+ }],
35981
+ "motionZones.setZone": [{
35982
+ name: "deviceId",
35983
+ form: "single",
35984
+ optional: false
35985
+ }],
35986
+ "nativeObjectDetection.setEnabled": [{
35987
+ name: "deviceId",
35988
+ form: "single",
35989
+ optional: false
35990
+ }],
35991
+ "networkQuality.getDeviceStats": [{
35992
+ name: "deviceId",
35993
+ form: "single",
35994
+ optional: false
35995
+ }],
35996
+ "networkQuality.reportClientStats": [{
35997
+ name: "deviceId",
35998
+ form: "single",
35999
+ optional: false
36000
+ }],
36001
+ "notificationRules.setDeviceMuted": [{
36002
+ name: "deviceId",
36003
+ form: "single",
36004
+ optional: false
36005
+ }],
36006
+ "notifier.cancel": [{
36007
+ name: "deviceId",
36008
+ form: "single",
36009
+ optional: false
36010
+ }],
36011
+ "notifier.send": [{
36012
+ name: "deviceId",
36013
+ form: "single",
36014
+ optional: false
36015
+ }],
36016
+ "osd.setOverlay": [{
36017
+ name: "deviceId",
36018
+ form: "single",
36019
+ optional: false
36020
+ }],
36021
+ "osdManager.clearSlotBinding": [{
36022
+ name: "deviceId",
36023
+ form: "single",
36024
+ optional: false
36025
+ }],
36026
+ "osdManager.copyDeviceConfiguration": [{
36027
+ name: "sourceDeviceId",
36028
+ form: "single",
36029
+ optional: false
36030
+ }, {
36031
+ name: "targetDeviceId",
36032
+ form: "single",
36033
+ optional: false
36034
+ }],
36035
+ "osdManager.getDeviceOsd": [{
36036
+ name: "deviceId",
36037
+ form: "single",
36038
+ optional: false
36039
+ }],
36040
+ "osdManager.getSourceCatalog": [{
36041
+ name: "deviceId",
36042
+ form: "single",
36043
+ optional: false
36044
+ }],
36045
+ "osdManager.previewSlot": [{
36046
+ name: "deviceId",
36047
+ form: "single",
36048
+ optional: false
36049
+ }],
36050
+ "osdManager.renderDevice": [{
36051
+ name: "deviceId",
36052
+ form: "single",
36053
+ optional: false
36054
+ }],
36055
+ "osdManager.setSlotBinding": [{
36056
+ name: "deviceId",
36057
+ form: "single",
36058
+ optional: false
36059
+ }],
36060
+ "petFeeder.callPet": [{
36061
+ name: "deviceId",
36062
+ form: "single",
36063
+ optional: false
36064
+ }],
36065
+ "petFeeder.cancelFeed": [{
36066
+ name: "deviceId",
36067
+ form: "single",
36068
+ optional: false
36069
+ }],
36070
+ "petFeeder.feed": [{
36071
+ name: "deviceId",
36072
+ form: "single",
36073
+ optional: false
36074
+ }],
36075
+ "petFeeder.markFoodReplenished": [{
36076
+ name: "deviceId",
36077
+ form: "single",
36078
+ optional: false
36079
+ }],
36080
+ "petFeeder.playSound": [{
36081
+ name: "deviceId",
36082
+ form: "single",
36083
+ optional: false
36084
+ }],
36085
+ "petFeeder.resetDesiccant": [{
36086
+ name: "deviceId",
36087
+ form: "single",
36088
+ optional: false
36089
+ }],
36090
+ "petFeeder.setChildLock": [{
36091
+ name: "deviceId",
36092
+ form: "single",
36093
+ optional: false
36094
+ }],
36095
+ "petFeeder.setFeedSound": [{
36096
+ name: "deviceId",
36097
+ form: "single",
36098
+ optional: false
36099
+ }],
36100
+ "petFeeder.setIndicatorLight": [{
36101
+ name: "deviceId",
36102
+ form: "single",
36103
+ optional: false
36104
+ }],
36105
+ "petFeeder.setVolume": [{
36106
+ name: "deviceId",
36107
+ form: "single",
36108
+ optional: false
36109
+ }],
36110
+ "pipelineAnalytics.clearTracks": [{
36111
+ name: "deviceId",
36112
+ form: "single",
36113
+ optional: false
36114
+ }],
36115
+ "pipelineAnalytics.completeRetrainTrack": [{
36116
+ name: "deviceId",
36117
+ form: "single",
36118
+ optional: false
36119
+ }],
36120
+ "pipelineAnalytics.deleteDeviceEvents": [{
36121
+ name: "deviceId",
36122
+ form: "single",
36123
+ optional: false
36124
+ }],
36125
+ "pipelineAnalytics.deleteTracks": [{
36126
+ name: "deviceId",
36127
+ form: "single",
36128
+ optional: false
36129
+ }],
36130
+ "pipelineAnalytics.deselectRetrainFrame": [{
36131
+ name: "deviceId",
36132
+ form: "single",
36133
+ optional: false
36134
+ }],
36135
+ "pipelineAnalytics.getActiveTracks": [{
36136
+ name: "deviceId",
36137
+ form: "single",
36138
+ optional: false
36139
+ }],
36140
+ "pipelineAnalytics.getAudioEvents": [{
36141
+ name: "deviceId",
36142
+ form: "single",
36143
+ optional: false
36144
+ }],
36145
+ "pipelineAnalytics.getEventDensity": [{
36146
+ name: "deviceId",
36147
+ form: "single",
36148
+ optional: false
36149
+ }],
36150
+ "pipelineAnalytics.getEventMedia": [{
36151
+ name: "deviceId",
36152
+ form: "single",
36153
+ optional: false
36154
+ }],
36155
+ "pipelineAnalytics.getKeyEvents": [{
36156
+ name: "deviceId",
36157
+ form: "single",
36158
+ optional: false
36159
+ }],
36160
+ "pipelineAnalytics.getMotionEvents": [{
36161
+ name: "deviceId",
36162
+ form: "single",
36163
+ optional: false
36164
+ }],
36165
+ "pipelineAnalytics.getObjectEvents": [{
36166
+ name: "deviceId",
36167
+ form: "single",
36168
+ optional: false
36169
+ }],
36170
+ "pipelineAnalytics.getRetrainExportUrl": [{
36171
+ name: "deviceIds",
36172
+ form: "array",
36173
+ optional: true
36174
+ }],
36175
+ "pipelineAnalytics.getSensorEvents": [{
36176
+ name: "deviceId",
36177
+ form: "single",
36178
+ optional: false
36179
+ }],
36180
+ "pipelineAnalytics.getTrack": [{
36181
+ name: "deviceId",
36182
+ form: "single",
36183
+ optional: false
36184
+ }],
36185
+ "pipelineAnalytics.getTrackMedia": [{
36186
+ name: "deviceId",
36187
+ form: "single",
36188
+ optional: false
36189
+ }],
36190
+ "pipelineAnalytics.getTrainingExportSummary": [{
36191
+ name: "deviceIds",
36192
+ form: "array",
36193
+ optional: true
36194
+ }],
36195
+ "pipelineAnalytics.getTrainingExportUrl": [{
36196
+ name: "deviceIds",
36197
+ form: "array",
36198
+ optional: true
36199
+ }],
36200
+ "pipelineAnalytics.listEventKinds": [{
36201
+ name: "deviceId",
36202
+ form: "single",
36203
+ optional: false
36204
+ }],
36205
+ "pipelineAnalytics.listEventKindsBatch": [{
36206
+ name: "deviceIds",
36207
+ form: "array",
36208
+ optional: false
36209
+ }],
36210
+ "pipelineAnalytics.listOpsLog": [{
36211
+ name: "deviceId",
36212
+ form: "single",
36213
+ optional: true
36214
+ }],
36215
+ "pipelineAnalytics.listRecentTracks": [{
36216
+ name: "deviceIds",
36217
+ form: "array",
36218
+ optional: false
36219
+ }],
36220
+ "pipelineAnalytics.listRetrainStaging": [{
36221
+ name: "deviceIds",
36222
+ form: "array",
36223
+ optional: true
36224
+ }],
36225
+ "pipelineAnalytics.listTrackMedia": [{
36226
+ name: "deviceId",
36227
+ form: "single",
36228
+ optional: false
36229
+ }],
36230
+ "pipelineAnalytics.listTracks": [{
36231
+ name: "deviceId",
36232
+ form: "single",
36233
+ optional: false
36234
+ }],
36235
+ "pipelineAnalytics.proposeRetrainAnnotations": [{
36236
+ name: "deviceId",
36237
+ form: "single",
36238
+ optional: false
36239
+ }],
36240
+ "pipelineAnalytics.pruneEventsBefore": [{
36241
+ name: "deviceId",
36242
+ form: "single",
36243
+ optional: false
36244
+ }],
36245
+ "pipelineAnalytics.pruneTracksBefore": [{
36246
+ name: "deviceId",
36247
+ form: "single",
36248
+ optional: false
36249
+ }],
36250
+ "pipelineAnalytics.rebuildObjectEmbeddings": [{
36251
+ name: "deviceId",
36252
+ form: "single",
36253
+ optional: true
36254
+ }],
36255
+ "pipelineAnalytics.restageRetrainTrack": [{
36256
+ name: "deviceId",
36257
+ form: "single",
36258
+ optional: false
36259
+ }],
36260
+ "pipelineAnalytics.saveRetrainAnnotations": [{
36261
+ name: "deviceId",
36262
+ form: "single",
36263
+ optional: false
36264
+ }],
36265
+ "pipelineAnalytics.searchObjectEvents": [{
36266
+ name: "deviceId",
36267
+ form: "single",
36268
+ optional: true
36269
+ }],
36270
+ "pipelineAnalytics.selectRetrainFrames": [{
36271
+ name: "deviceId",
36272
+ form: "single",
36273
+ optional: false
36274
+ }],
36275
+ "pipelineAnalytics.setTrackFlags": [{
36276
+ name: "deviceId",
36277
+ form: "single",
36278
+ optional: false
36279
+ }],
36280
+ "pipelineAnalytics.wipeAllAnalytics": [{
36281
+ name: "deviceId",
36282
+ form: "single",
36283
+ optional: false
36284
+ }],
36285
+ "pipelineExecutor.runPipeline": [{
36286
+ name: "deviceId",
36287
+ form: "single",
36288
+ optional: true
36289
+ }],
36290
+ "pipelineExecutor.runPipelineBatch": [{
36291
+ name: "deviceId",
36292
+ form: "single",
36293
+ optional: true
36294
+ }],
36295
+ "pipelineOrchestrator.assignAudio": [{
36296
+ name: "deviceId",
36297
+ form: "single",
36298
+ optional: false
36299
+ }],
36300
+ "pipelineOrchestrator.assignPipeline": [{
36301
+ name: "deviceId",
36302
+ form: "single",
36303
+ optional: false
36304
+ }],
36305
+ "pipelineOrchestrator.getAudioAssignment": [{
36306
+ name: "deviceId",
36307
+ form: "single",
36308
+ optional: false
36309
+ }],
36310
+ "pipelineOrchestrator.getCameraMetrics": [{
36311
+ name: "deviceId",
36312
+ form: "single",
36313
+ optional: false
36314
+ }],
36315
+ "pipelineOrchestrator.getCameraSettings": [{
36316
+ name: "deviceId",
36317
+ form: "single",
36318
+ optional: false
36319
+ }],
36320
+ "pipelineOrchestrator.getCameraStatus": [{
36321
+ name: "deviceId",
36322
+ form: "single",
36323
+ optional: false
36324
+ }],
36325
+ "pipelineOrchestrator.getCameraStatuses": [{
36326
+ name: "deviceIds",
36327
+ form: "array",
36328
+ optional: true
36329
+ }],
36330
+ "pipelineOrchestrator.getCameraStepOverrides": [{
36331
+ name: "deviceId",
36332
+ form: "single",
36333
+ optional: false
36334
+ }],
36335
+ "pipelineOrchestrator.getCameraSwitches": [{
36336
+ name: "deviceId",
36337
+ form: "single",
36338
+ optional: false
36339
+ }],
36340
+ "pipelineOrchestrator.getPipelineAssignment": [{
36341
+ name: "deviceId",
36342
+ form: "single",
36343
+ optional: false
36344
+ }],
36345
+ "pipelineOrchestrator.getPipelineDevicePin": [{
36346
+ name: "deviceId",
36347
+ form: "single",
36348
+ optional: false
36349
+ }],
36350
+ "pipelineOrchestrator.resolvePipeline": [{
36351
+ name: "deviceId",
36352
+ form: "single",
36353
+ optional: false
36354
+ }],
36355
+ "pipelineOrchestrator.setCameraPipelineForAgent": [{
36356
+ name: "deviceId",
36357
+ form: "single",
36358
+ optional: false
36359
+ }],
36360
+ "pipelineOrchestrator.setCameraStepOverride": [{
36361
+ name: "deviceId",
36362
+ form: "single",
36363
+ optional: false
36364
+ }],
36365
+ "pipelineOrchestrator.setCameraStepToggle": [{
36366
+ name: "deviceId",
36367
+ form: "single",
36368
+ optional: false
36369
+ }],
36370
+ "pipelineOrchestrator.setCameraSwitch": [{
36371
+ name: "deviceId",
36372
+ form: "single",
36373
+ optional: false
36374
+ }],
36375
+ "pipelineOrchestrator.setPipelineDevicePin": [{
36376
+ name: "deviceId",
36377
+ form: "single",
36378
+ optional: false
36379
+ }],
36380
+ "pipelineOrchestrator.unassignAudio": [{
36381
+ name: "deviceId",
36382
+ form: "single",
36383
+ optional: false
36384
+ }],
36385
+ "pipelineOrchestrator.unassignPipeline": [{
36386
+ name: "deviceId",
36387
+ form: "single",
36388
+ optional: false
36389
+ }],
36390
+ "pipelineRunner.attachCamera": [{
36391
+ name: "deviceId",
36392
+ form: "single",
36393
+ optional: false
36394
+ }],
36395
+ "pipelineRunner.detachCamera": [{
36396
+ name: "deviceId",
36397
+ form: "single",
36398
+ optional: false
36399
+ }],
36400
+ "pipelineRunner.getCameraMetrics": [{
36401
+ name: "deviceId",
36402
+ form: "single",
36403
+ optional: false
36404
+ }],
36405
+ "pipelineRunner.reportMotion": [{
36406
+ name: "deviceId",
36407
+ form: "single",
36408
+ optional: false
36409
+ }],
36410
+ "pipelineRunner.runDetailSubtree": [{
36411
+ name: "deviceId",
36412
+ form: "single",
36413
+ optional: false
36414
+ }],
36415
+ "pipelineRunner.runStatelessStep": [{
36416
+ name: "sourceDeviceId",
36417
+ form: "single",
36418
+ optional: false
36419
+ }],
36420
+ "plateGallery.getPlateByTrack": [{
36421
+ name: "deviceId",
36422
+ form: "single",
36423
+ optional: false
36424
+ }],
36425
+ "plateGallery.listPlates": [{
36426
+ name: "deviceId",
36427
+ form: "single",
36428
+ optional: true
36429
+ }],
36430
+ "privacyMask.getOptions": [{
36431
+ name: "deviceId",
36432
+ form: "single",
36433
+ optional: false
36434
+ }],
36435
+ "privacyMask.setAudioEnabled": [{
36436
+ name: "deviceId",
36437
+ form: "single",
36438
+ optional: false
36439
+ }],
36440
+ "privacyMask.setMask": [{
36441
+ name: "deviceId",
36442
+ form: "single",
36443
+ optional: false
36444
+ }],
36445
+ "ptz.continuousMove": [{
36446
+ name: "deviceId",
36447
+ form: "single",
36448
+ optional: false
36449
+ }],
36450
+ "ptz.deletePreset": [{
36451
+ name: "deviceId",
36452
+ form: "single",
36453
+ optional: false
36454
+ }],
36455
+ "ptz.getOptions": [{
36456
+ name: "deviceId",
36457
+ form: "single",
36458
+ optional: false
36459
+ }],
36460
+ "ptz.getPosition": [{
36461
+ name: "deviceId",
36462
+ form: "single",
36463
+ optional: false
36464
+ }],
36465
+ "ptz.getPresets": [{
36466
+ name: "deviceId",
36467
+ form: "single",
36468
+ optional: false
36469
+ }],
36470
+ "ptz.goHome": [{
36471
+ name: "deviceId",
36472
+ form: "single",
36473
+ optional: false
36474
+ }],
36475
+ "ptz.goToPreset": [{
36476
+ name: "deviceId",
36477
+ form: "single",
36478
+ optional: false
36479
+ }],
36480
+ "ptz.move": [{
36481
+ name: "deviceId",
36482
+ form: "single",
36483
+ optional: false
36484
+ }],
36485
+ "ptz.savePreset": [{
36486
+ name: "deviceId",
36487
+ form: "single",
36488
+ optional: false
36489
+ }],
36490
+ "ptz.setAutofocus": [{
36491
+ name: "deviceId",
36492
+ form: "single",
36493
+ optional: false
36494
+ }],
36495
+ "ptz.stop": [{
36496
+ name: "deviceId",
36497
+ form: "single",
36498
+ optional: false
36499
+ }],
36500
+ "ptzAutotrack.getSettings": [{
36501
+ name: "deviceId",
36502
+ form: "single",
36503
+ optional: false
36504
+ }],
36505
+ "ptzAutotrack.getStatus": [{
36506
+ name: "deviceId",
36507
+ form: "single",
36508
+ optional: false
36509
+ }],
36510
+ "ptzAutotrack.setEnabled": [{
36511
+ name: "deviceId",
36512
+ form: "single",
36513
+ optional: false
36514
+ }],
36515
+ "ptzAutotrack.setSettings": [{
36516
+ name: "deviceId",
36517
+ form: "single",
36518
+ optional: false
36519
+ }],
36520
+ "reboot.reboot": [{
36521
+ name: "deviceId",
36522
+ form: "single",
36523
+ optional: false
36524
+ }],
36525
+ "recording.deleteFootprint": [{
36526
+ name: "deviceId",
36527
+ form: "single",
36528
+ optional: false
36529
+ }],
36530
+ "recording.getAvailability": [{
36531
+ name: "deviceId",
36532
+ form: "single",
36533
+ optional: false
36534
+ }],
36535
+ "recording.getDaysWithRecordings": [{
36536
+ name: "deviceId",
36537
+ form: "single",
36538
+ optional: false
36539
+ }],
36540
+ "recording.getDeviceConfig": [{
36541
+ name: "deviceId",
36542
+ form: "single",
36543
+ optional: false
36544
+ }],
36545
+ "recording.getPlaybackManifest": [{
36546
+ name: "deviceId",
36547
+ form: "single",
36548
+ optional: false
36549
+ }],
36550
+ "recording.listOpsLog": [{
36551
+ name: "deviceId",
36552
+ form: "single",
36553
+ optional: true
36554
+ }],
36555
+ "recording.locateSegment": [{
36556
+ name: "deviceId",
36557
+ form: "single",
36558
+ optional: false
36559
+ }],
36560
+ "recording.pruneFootage": [{
36561
+ name: "deviceId",
36562
+ form: "single",
36563
+ optional: false
36564
+ }],
36565
+ "recording.readGopBytes": [{
36566
+ name: "deviceId",
36567
+ form: "single",
36568
+ optional: false
36569
+ }],
36570
+ "recording.readSegmentBytes": [{
36571
+ name: "deviceId",
36572
+ form: "single",
36573
+ optional: false
36574
+ }],
36575
+ "recording.relocateFootage": [{
36576
+ name: "deviceId",
36577
+ form: "single",
36578
+ optional: true
36579
+ }],
36580
+ "recording.renderClip": [{
36581
+ name: "deviceId",
36582
+ form: "single",
36583
+ optional: false
36584
+ }],
36585
+ "recording.renderGif": [{
36586
+ name: "deviceId",
36587
+ form: "single",
36588
+ optional: false
36589
+ }],
36590
+ "recording.rescanStorage": [{
36591
+ name: "deviceId",
36592
+ form: "single",
36593
+ optional: false
36594
+ }],
36595
+ "recording.setDeviceConfig": [{
36596
+ name: "deviceId",
36597
+ form: "single",
36598
+ optional: false
36599
+ }],
36600
+ "recording.startStorageMigrationMove": [{
36601
+ name: "deviceId",
36602
+ form: "single",
36603
+ optional: true
36604
+ }],
36605
+ "recordingExport.createExport": [{
36606
+ name: "deviceId",
36607
+ form: "single",
36608
+ optional: false
36609
+ }],
36610
+ "recordingExport.listExports": [{
36611
+ name: "deviceId",
36612
+ form: "single",
36613
+ optional: true
36614
+ }],
36615
+ "sceneMonitor.captureReference": [{
36616
+ name: "deviceId",
36617
+ form: "single",
36618
+ optional: false
36619
+ }],
36620
+ "sceneMonitor.createScene": [{
36621
+ name: "deviceId",
36622
+ form: "single",
36623
+ optional: false
36624
+ }],
36625
+ "sceneMonitor.deleteReference": [{
36626
+ name: "deviceId",
36627
+ form: "single",
36628
+ optional: false
36629
+ }],
36630
+ "sceneMonitor.deleteScene": [{
36631
+ name: "deviceId",
36632
+ form: "single",
36633
+ optional: false
36634
+ }],
36635
+ "sceneMonitor.listScenes": [{
36636
+ name: "deviceId",
36637
+ form: "single",
36638
+ optional: false
36639
+ }],
36640
+ "sceneMonitor.recheckNow": [{
36641
+ name: "deviceId",
36642
+ form: "single",
36643
+ optional: false
36644
+ }],
36645
+ "sceneMonitor.resetScene": [{
36646
+ name: "deviceId",
36647
+ form: "single",
36648
+ optional: false
36649
+ }],
36650
+ "sceneMonitor.updateScene": [{
36651
+ name: "deviceId",
36652
+ form: "single",
36653
+ optional: false
36654
+ }],
36655
+ "scriptRunner.run": [{
36656
+ name: "deviceId",
36657
+ form: "single",
36658
+ optional: false
36659
+ }],
36660
+ "scriptRunner.stop": [{
36661
+ name: "deviceId",
36662
+ form: "single",
36663
+ optional: false
36664
+ }],
36665
+ "snapshot.getSnapshot": [{
36666
+ name: "deviceId",
36667
+ form: "single",
36668
+ optional: false
36669
+ }],
36670
+ "snapshot.getSnapshotLinks": [{
36671
+ name: "targets",
36672
+ form: "object-array",
36673
+ optional: false,
36674
+ itemField: "deviceId"
36675
+ }],
36676
+ "snapshot.getSnapshotOverview": [{
36677
+ name: "deviceIds",
36678
+ form: "array",
36679
+ optional: false
36680
+ }],
36681
+ "snapshot.invalidateCache": [{
36682
+ name: "deviceId",
36683
+ form: "single",
36684
+ optional: false
36685
+ }],
36686
+ "streamBroker.acquireEgressTranscode": [{
36687
+ name: "deviceId",
36688
+ form: "single",
36689
+ optional: false
36690
+ }],
36691
+ "streamBroker.assignProfile": [{
36692
+ name: "deviceId",
36693
+ form: "single",
36694
+ optional: false
36695
+ }],
36696
+ "streamBroker.getDeviceAudioMute": [{
36697
+ name: "deviceId",
36698
+ form: "single",
36699
+ optional: false
36700
+ }],
36701
+ "streamBroker.getStreamWithCodec": [{
36702
+ name: "deviceId",
36703
+ form: "single",
36704
+ optional: false
36705
+ }],
36706
+ "streamBroker.produceEventMedia": [{
36707
+ name: "deviceId",
36708
+ form: "single",
36709
+ optional: false
36710
+ }],
36711
+ "streamBroker.publishCameraStream": [{
36712
+ name: "deviceId",
36713
+ form: "single",
36714
+ optional: false
36715
+ }],
36716
+ "streamBroker.renderPreBufferClip": [{
36717
+ name: "deviceId",
36718
+ form: "single",
36719
+ optional: false
36720
+ }],
36721
+ "streamBroker.restartProfile": [{
36722
+ name: "deviceId",
36723
+ form: "single",
36724
+ optional: false
36725
+ }],
36726
+ "streamBroker.retractCameraStream": [{
36727
+ name: "deviceId",
36728
+ form: "single",
36729
+ optional: false
36730
+ }],
36731
+ "streamBroker.setDeviceAudioMute": [{
36732
+ name: "deviceId",
36733
+ form: "single",
36734
+ optional: false
36735
+ }],
36736
+ "streamBroker.unassignProfile": [{
36737
+ name: "deviceId",
36738
+ form: "single",
36739
+ optional: false
36740
+ }],
36741
+ "streamCatalog.getCatalog": [{
36742
+ name: "deviceId",
36743
+ form: "single",
36744
+ optional: false
36745
+ }],
36746
+ "streamParams.getConfigSchema": [{
36747
+ name: "deviceId",
36748
+ form: "single",
36749
+ optional: false
36750
+ }],
36751
+ "streamParams.getOptions": [{
36752
+ name: "deviceId",
36753
+ form: "single",
36754
+ optional: false
36755
+ }],
36756
+ "streamParams.setProfile": [{
36757
+ name: "deviceId",
36758
+ form: "single",
36759
+ optional: false
36760
+ }],
36761
+ "switch.setState": [{
36762
+ name: "deviceId",
36763
+ form: "single",
36764
+ optional: false
36765
+ }],
36766
+ "vacuumControl.locate": [{
36767
+ name: "deviceId",
36768
+ form: "single",
36769
+ optional: false
36770
+ }],
36771
+ "vacuumControl.pause": [{
36772
+ name: "deviceId",
36773
+ form: "single",
36774
+ optional: false
36775
+ }],
36776
+ "vacuumControl.returnToBase": [{
36777
+ name: "deviceId",
36778
+ form: "single",
36779
+ optional: false
36780
+ }],
36781
+ "vacuumControl.setFanSpeed": [{
36782
+ name: "deviceId",
36783
+ form: "single",
36784
+ optional: false
36785
+ }],
36786
+ "vacuumControl.start": [{
36787
+ name: "deviceId",
36788
+ form: "single",
36789
+ optional: false
36790
+ }],
36791
+ "vacuumControl.stop": [{
36792
+ name: "deviceId",
36793
+ form: "single",
36794
+ optional: false
36795
+ }],
36796
+ "valve.close": [{
36797
+ name: "deviceId",
36798
+ form: "single",
36799
+ optional: false
36800
+ }],
36801
+ "valve.open": [{
36802
+ name: "deviceId",
36803
+ form: "single",
36804
+ optional: false
36805
+ }],
36806
+ "valve.setPosition": [{
36807
+ name: "deviceId",
36808
+ form: "single",
36809
+ optional: false
36810
+ }],
36811
+ "valve.stop": [{
36812
+ name: "deviceId",
36813
+ form: "single",
36814
+ optional: false
36815
+ }],
36816
+ "videoclips.getClipPlayback": [{
36817
+ name: "deviceId",
36818
+ form: "single",
36819
+ optional: false
36820
+ }],
36821
+ "videoclips.listClips": [{
36822
+ name: "deviceId",
36823
+ form: "single",
36824
+ optional: false
36825
+ }],
36826
+ "waterHeater.setAway": [{
36827
+ name: "deviceId",
36828
+ form: "single",
36829
+ optional: false
36830
+ }],
36831
+ "waterHeater.setOperationMode": [{
36832
+ name: "deviceId",
36833
+ form: "single",
36834
+ optional: false
36835
+ }],
36836
+ "waterHeater.setTargetTemp": [{
36837
+ name: "deviceId",
36838
+ form: "single",
36839
+ optional: false
36840
+ }],
36841
+ "webrtcSession.addIceCandidate": [{
36842
+ name: "deviceId",
36843
+ form: "single",
36844
+ optional: false
36845
+ }],
36846
+ "webrtcSession.closeSession": [{
36847
+ name: "deviceId",
36848
+ form: "single",
36849
+ optional: false
36850
+ }],
36851
+ "webrtcSession.createSession": [{
36852
+ name: "deviceId",
36853
+ form: "single",
36854
+ optional: false
36855
+ }],
36856
+ "webrtcSession.getIceCandidates": [{
36857
+ name: "deviceId",
36858
+ form: "single",
36859
+ optional: false
36860
+ }],
36861
+ "webrtcSession.getSessionState": [{
36862
+ name: "deviceId",
36863
+ form: "single",
36864
+ optional: false
36865
+ }],
36866
+ "webrtcSession.handleAnswer": [{
36867
+ name: "deviceId",
36868
+ form: "single",
36869
+ optional: false
36870
+ }],
36871
+ "webrtcSession.handleOffer": [{
36872
+ name: "deviceId",
36873
+ form: "single",
36874
+ optional: false
36875
+ }],
36876
+ "webrtcSession.hasAdaptiveBitrate": [{
36877
+ name: "deviceId",
36878
+ form: "single",
36879
+ optional: false
36880
+ }],
36881
+ "webrtcSession.listStreams": [{
36882
+ name: "deviceId",
36883
+ form: "single",
36884
+ optional: false
36885
+ }],
36886
+ "zoneAnalytics.getCameraHistory": [{
36887
+ name: "deviceId",
36888
+ form: "single",
36889
+ optional: false
36890
+ }],
36891
+ "zoneAnalytics.getCurrentSnapshot": [{
36892
+ name: "deviceId",
36893
+ form: "single",
36894
+ optional: false
36895
+ }],
36896
+ "zoneAnalytics.getUnzonedHistory": [{
36897
+ name: "deviceId",
36898
+ form: "single",
36899
+ optional: false
36900
+ }],
36901
+ "zoneAnalytics.getZoneHistory": [{
36902
+ name: "deviceId",
36903
+ form: "single",
36904
+ optional: false
36905
+ }],
36906
+ "zoneRules.listRules": [{
36907
+ name: "deviceId",
36908
+ form: "single",
36909
+ optional: false
36910
+ }],
36911
+ "zoneRules.setRules": [{
36912
+ name: "deviceId",
36913
+ form: "single",
36914
+ optional: false
36915
+ }],
36916
+ "zones.addZone": [{
36917
+ name: "deviceId",
36918
+ form: "single",
36919
+ optional: false
36920
+ }],
36921
+ "zones.listZones": [{
36922
+ name: "deviceId",
36923
+ form: "single",
36924
+ optional: false
36925
+ }],
36926
+ "zones.removeZone": [{
36927
+ name: "deviceId",
36928
+ form: "single",
36929
+ optional: false
36930
+ }],
36931
+ "zones.updateZone": [{
36932
+ name: "deviceId",
36933
+ form: "single",
36934
+ optional: false
36935
+ }]
36936
+ });
34150
36937
  Object.freeze({
34151
36938
  "broker": "broker",
34152
36939
  "device-export": "device-export",