@camstack/addon-provider-gree 0.2.15 → 0.2.17

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